General Associativity Theorem/Formulation 3

Theorem
Let $\left({S, \circ}\right)$ be a semigroup.

Let $a_i$ denote elements of $S$.

Let $\circ$ be associative.

Let $n \in \Z$ be a positive integer such that $n \ge 3$.

Then all possible parenthesizations of the expression:


 * $a_1 \circ a_2 \circ \cdots \circ a_n$

are equivalent.

Proof
Let $\circ$ be associative.

It will be shown that any parenthesization of $a_1 \circ a_2 \circ \dots \circ a_n$ is equal to the left-associated expression:
 * $\left({\left({\left({\cdots \left({a_1 \circ a_2}\right) \circ a_3}\right) \circ \cdots}\right) \circ a_n}\right)$

The proof proceeds by induction on $n$.

Basis for the Induction
The base case, $n = 3$:

The product $a_1 \circ a_2 \circ a_3$ has two parenthesizations:
 * $P_1: a_1 \circ \left({a_2 \circ a_3}\right)$
 * $P_2: \left({a_1 \circ a_2}\right) \circ a_3$

$P_2$ is the left-associative parenthesization for $n = 3$.

From the associativity condition, $P_1$ and $P_2$ are identical.

This is the basis for the induction.

Induction Hypothesis
If for all $m < n$, all parenthesizations of the $m$-product are identical to its left-associated parenthesization:
 * $\left({\left({\left({\cdots \left({a_1 \circ a_2}\right) \circ a_3}\right) \circ \cdots}\right) \circ a_m}\right)$

then all parenthesizations of the $n$-product are identical to its left-associated parenthesization:
 * $\left({\left({\left({\cdots \left({a_1 \circ a_2}\right) \circ a_3}\right) \circ \cdots}\right) \circ a_n}\right)$

This is the induction hypothesis.

Induction Step
Let $P_i$ denote any parenthesization of $a_1 \circ a_2 \circ \dots \circ a_n$.

Then $P_i$ is always the product of two smaller products:

By the Principle of Mathematical Induction, the proof is complete.

It follows that all parenthesizations of $a_1 \circ a_2 \circ \dots \circ a_n$ yield identical results.

So the theorem holds.