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

Theorem
Let $\left({S, \circ}\right)$ 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 n \in \N: \circ^n \left({a \circ b}\right) = \left({\circ^n a}\right) \circ \left({\circ^n b}\right)$

That is:
 * $\forall n \in \N: \left({a \circ b}\right)^n = a^n \circ b^n$

Proof
Because $\left({S, \circ}\right)$ is a monoid, it is a fortiori also a semigroup.

From Power of Product of Commuting Elements in Semigroup equals Product of Powers:
 * $\forall n \in \N_{>0}: \circ^n \left({a \circ b}\right) = \left({\circ^n a}\right) \circ \left({\circ^n b}\right)$

That is:
 * $\forall n \in \N_{>0}: \left({a \circ b}\right)^n = a^n \circ b^n$

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

Thus:

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

holds for $n = 0$.

Thus:
 * $\forall n \in \N: \left({a \circ b}\right)^n = a^n \circ b^n$