General Commutativity Theorem

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

Let $\left \langle {a_k} \right \rangle_{1 \le k \le n}$ be a sequence of terms of $S$.

Suppose $\forall i, j \in \left[{1 \,. \, . \, n}\right]: a_i \circ a_j = a_j \circ a_i$.

Then for every permutation $\sigma: \N^*_n \to \N^*_n$:


 * $a_{\sigma \left({1}\right)} \circ \cdots \circ a_{\sigma \left({n}\right)} = a_1 \circ \cdots \circ a_n$

Proof

 * Let $T$ be the set of all $n \in \N^*$ such that:
 * $a_{\sigma \left({1}\right)} \circ \cdots \circ a_{\sigma \left({n}\right)} = a_1 \circ \cdots \circ a_n$

holds for all sequences $\left \langle {a_k} \right \rangle_{1 \le k \le n}$ of $n$ terms of $S$ which satisfy:
 * $\forall i, j \in \left[{1 \, . \, . \, n}\right]: a_i \circ a_j = a_j \circ a_i$

for every permutation $\sigma: \N^*_n \to \N^*_n$.


 * It is clear that $1 \in T$.


 * Suppose $n \in T$.

Let $\left \langle {a_k} \right \rangle_{1 \le k \le n+1}$ be a sequence of $n+1$ terms in $S$ which satisfy:
 * $\forall i, j \in \left[{1 \, . \, . \, n+1}\right]: a_i \circ a_j = a_j \circ a_i$

Let $\sigma: \N^*_{n+1} \to \N^*_{n+1}$ be a permutation of $\left[{1 \,. \, . \, n+1}\right]$.

There are three cases to consider:


 * 1) $\sigma \left({n+1}\right) = n + 1$
 * 2) $\sigma \left({1}\right)= n + 1$
 * 3) $\sigma \left({m}\right) = n + 1$ for some $m \in \left[{2 \, . \, . \, n}\right]$.


 * Suppose $\sigma \left({n+1}\right) = n + 1$:

Then the restriction of $\sigma$ to $\N^*_n$ is then a permutation of $\N^*_n$.

Thus, as $n \in T$:


 * $a_{\sigma \left({1}\right)} \circ \cdots \circ a_{\sigma \left({n}\right)} = a_1 \circ \cdots \circ a_n$

from which:


 * Suppose $\sigma \left({1}\right)= n + 1$:

Let $\tau: \N^*_n \to \N^*_n$ be the mapping defined as:


 * $\forall k \in \left[{1 \, . \, . \, n}\right]: \tau \left({k}\right) = \sigma \left({k + 1}\right)$

From Closed Interval of Successor, $\left[{1 \,. \, . \, n+1}\right] = \left[{1 \,. \, . \, n}\right] \cup \left\{{n+1}\right\}$.

Thus $\tau$ is clearly a permutation on $\left[{1 \,. \, . \, n}\right]$.

Thus, as $n \in T$:


 * $a_{\tau \left({1}\right)} \circ \cdots \circ a_{\tau \left({n}\right)} = a_1 \circ \cdots \circ a_n$

So:


 * Suppose $\sigma \left({m}\right) = n + 1$ for some $m \in \left[{2 \, . \, . \, n}\right]$:

Let $\tau: \N^*_{n+1} \to \N^*_{n+1}$ be a mapping defined by:


 * $\forall k \in \N^*_{n+1}: \tau \left({k}\right) = \begin{cases}

\sigma \left({k}\right): & k \in \left[{1 \,. \, . \, m-1}\right] \\ \sigma \left({k+1}\right): & k \in \left[{m \,. \, . \, n}\right] \\ n + 1: & k = n + 1 \end{cases}$

Clearly $\tau$ is a permutation of $\N^*_{n+1}$. So, by the first case:


 * $a_{\tau \left({1}\right)} \circ \cdots \circ a_{\tau \left({n+1}\right)} = a_1 \circ \cdots \circ a_{n+1}$

Thus:

So in all cases, $n+1 \in T$.

Thus by induction $T = \N^*$, and the result follows.