How to formalize "It doesn't matter how places the brackets" Let $X$ be a set and $X\times X\to X: (a, b)\mapsto a\cdot b$ an associative operation on $X$. Now one can prove by induction that it doesn't matter how one places the brackets in a product $x_1\cdot x_2\cdot\text{ }\dots\text{ } \cdot x_n$, the product always evaluates to the same value. This result justifies the notation of a product $x_1\cdot x_2\cdot\text{ }\dots\text{ } \cdot x_n$ without any brackets. But how can one formalize it?

Assume your operation is associative, i.e. $\forall a,b,c\in X$:
$$a\cdot (b\cdot c) =(a\cdot b)\cdot c$$
Now, we want to prove that brackets don't matter for any general expression using induction. 
Starting with a product of three items, the claim is true due to the associative property. Now assume the claim is true for some expression involving $n>3$ terms, which we'll denote by $x_n$. Any expression involving $n+1$ terms, is of the forms:
$$x_{n+1}=a\cdot (x_n)\ \text{or}\ x_{n+1}=(a\cdot x_{n_1})\cdot x_{n_2}$$
Where $n_1 + n_2 = n$, and we want to prove these two forms are identical.
Due again to the associative property, and the induction hypotheses we have that:
$$(a\cdot x_{n_1})\cdot x_{n_2} = a\cdot(x_{n_1}\cdot x_{n_2}) = a \cdot (x_n)$$
Q.E.D
