Power of Product of Commuting Elements in Semigroup equals Product of Powers

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

Let $\left({T, *}\right)$ be a monoid whose identity is $e$, and let $a \in T$.

Let the mapping $*^n: S \to T$ be defined by means of $g_a$ in Recursive Mapping with Identity:


 * $\forall n \in \left({S, \circ, \preceq}\right): *^n a = g_a \left({n}\right)$ such that:


 * $\forall n \in S: g_a \left({n}\right) = \begin{cases}

e & : n = 0 \\ g_a \left({r}\right) * a & : n = r \circ 1 \end{cases}$

In addition, suppose that $a, b \in T: a * b = b * a$.

Then the following results hold for all $n, m \in S$:
 * $\left({*^m a}\right) * \left({*^n b}\right) = \left({*^n b}\right) * \left({*^m a}\right)$
 * $*^n \left({a * b}\right) = \left({*^n a}\right) * \left({*^n b}\right)$

Proof
Proof by finite induction:

Let $a, b \in T: a * b = b * a$.

Because $\left({T, *}\right)$ is a semigroup, $*$ is associative on $T$.

Let $0$ be understood in this immediate context as the Zero of the naturally ordered semigroup.

Let $1$ be understood in this immediate context as the One of the naturally ordered semigroup.


 * To show that $\left({*^m a}\right) * \left({*^n b}\right) = \left({*^n b}\right) * \left({*^m a}\right)$:

Let $S'$ be the set of all $n \in S$ such that:


 * $\left({*^n a}\right) * b = b * \left({*^n a}\right)$

We have:
 * $\left({*^0 a}\right) * b = e * b = b = b * e = b * \left({*^0 a}\right)$

So $0 \in S'$ whether or not $a * b = b * a$.

We have:
 * $a * b = b * a \implies \left({*^1 a}\right) * b = b * \left({*^1 a}\right)$

So $1 \in S'$.

Now suppose $n \in S'$. Then we have:

So $n \circ 1 \in S'$.

Thus by the Principle of Finite Induction, $S' = S$.

Thus:


 * $\forall m \in S: \left({*^m a}\right) * b = b * \left({*^m a}\right)$

Thus, from the preceding: $\forall m, n \in S: *^m a$ and $*^n b$ also commute with each other.

The result follows:
 * $\forall m, n \in S: \left({*^m a}\right) * \left({*^n b}\right) = \left({*^n b}\right) * \left({*^m a}\right)$


 * To show that $*^n \left({a * b}\right) = \left({*^n a}\right) * \left({*^n b}\right)$:

Let $S'$ be the set of all $n \in S$ such that:


 * $*^n \left({a * b}\right) = \left({*^n a}\right) * \left({*^n b}\right)$

We have:
 * $*^0 \left({a * b}\right) = e = e * e = \left({*^0 a}\right) * \left({*^0 b}\right)$

So $0 \in S'$ whether or not $a * b = b * a$.

Now:

So $1 \in S'$.

Now suppose $n \in S'$. Then we have:

So $n \circ 1 \in S'$.

Thus by the Principle of Finite Induction, $S' = S$, and the result holds for all $n \in S$:
 * $\forall n \in S: *^n \left({a * b}\right) = \left({*^n a}\right) * \left({*^n b}\right)$