Commutativity of Powers in Semigroup

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

Let $a, b \in S$ both be cancellable elements of $S$.

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

Proof
Let $a, b \in S: a \circ b = b \circ a$.

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

Let $T$ be the set of all $n \in \N_{>0}$ such that:
 * $a^n \circ b = b \circ a^n$

We have:
 * $a \circ b = b \circ a \implies a^1 \circ b = b \circ a^1$.

So $1 \in T$.

Now suppose $n \in T$. Then we have:

So $n + 1 \in T$.

Thus by the Principle of Finite Induction, $T = \N_{>0}$. Thus:


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

Thus, from the preceding: $\forall m, n \in \N_{>0}: a^m$ and $b^n$ also commute with each other.

For the above relationships and equalities to hold, it follows that $a$ and $b$ must commute.

The result follows.