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 \ast b = b \ast a$$.

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

Proof
Proof by finite induction:

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

Because $$\left({T, *}\right)$$ is a semigroup, $$\ast$$ 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({\ast^m a}\right) \ast \left({\ast^n b}\right) = \left({\ast^n b}\right) \ast \left({\ast^m a}\right)$$:

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


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

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

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

We have:
 * $$a \ast b = b \ast a \implies \left({\ast^1 a}\right) \ast b = b \ast \left({\ast^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({\ast^m a}\right) \ast b = b \ast \left({\ast^m a}\right)$$

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

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


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

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


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

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

So $$0 \in S'$$ whether or not $$a \ast b = b \ast 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: \ast^n \left({a \ast b}\right) = \left({\ast^n a}\right) \ast \left({\ast^n b}\right)$$.