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?

This is called the associative law which says precisely: $$\forall x,y,z [(x*(y*z))=((x*y)*z))] $$
That it extends to arbitrary finite products can then proven using induction.
Some more details: you will prove that every expresention is equivalent to the one with brackets on left e.g. to $(((x*y)*z)*w))$ (every expresion uses each variable only once). Then you can define complexity $C:\mathrm{EXP}\to\mathbb{N}$ of an expression recursively as : $C(x)=0$, and for composed expressions $C(e*f)=C(e)+C(f)+\mathrm{length}(f)-1$, where $e,f$ are expressions and $\mathrm{length}(f)$ is a number of variables in $f$. 
Examples:
 $C(x*y)=C(x)+C(y)+1-1=0$,
$C((x*y)*z))=C(x*y)+C(z)+1-1=0$, 
but $C(x*(y*z))=C(x)+C(y*z)+2-1=1$,
and use induction on the complexity. Calculate that any one application of associativity decreases the complexity.
