Powers of Commuting Elements of Monoid Commute

Theorem
Let $\struct {S, \circ}$ be a monoid whose identity element is $e$.

For $a \in S$, let $\circ^n a = a^n$ denote the $n$th power of $a$.

Let $a, b \in S$ such that $a$ commutes with $b$:
 * $a \circ b = b \circ a$

Then:
 * $\forall m, n \in \N: \paren {\circ^m a} \circ \paren {\circ^n b} = \paren {\circ^n b} \circ \paren {\circ^m a}$

That is:
 * $\forall m, n \in \N: a^m \circ b^n = b^n \circ a^m$

Proof
Because $\struct {S, \circ}$ is a monoid, it is a fortiori also a semigroup.

From Powers of Commuting Elements of Semigroup Commute:
 * $\forall m, n \in \N_{>0}: \paren {\circ^m a} \circ \paren {\circ^n b} = \paren {\circ^n b} \circ \paren {\circ^m a}$

That is:
 * $\forall m, n \in \N_{>0}: a^m \circ b^n = b^n \circ a^m$

It remains to be shown that the result holds for the cases where $m = 0$ and $n = 0$.

Let $n \in \N$:

Similarly, let $m \in \N$:

and:

Thus:
 * $a^m \circ b^n = b^n \circ a^m$

holds for $n = 0$ and $m = 0$.

Thus:
 * $\forall m, n \in \N: a^m \circ b^n = b^n \circ a^m$