# Index Laws/Product of Indices

## Theorem

### Semigroup

Let $\struct {S, \circ}$ be a semigroup.

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

Then:

$\forall m, n \in \N_{>0}: a^{n m} = \paren {a^n}^m = \paren {a^m}^n$

### Monoid

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

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

Then:

$\forall m, n \in \N: a^{n m} = \paren {a^n}^m = \paren {a^m}^n$

## Notation

Let $a^n$ be defined as the power of an element of a magma:

$a^n = \begin{cases} a : & n = 1 \\ a^x \circ a : & n = x + 1 \end{cases}$

... that is:

$a^n = \underbrace {a \circ a \circ \cdots \circ a}_{n \text{ copies of } a} = \circ^n \paren a$

Recall the index law for product of indices:

$\circ^{n m} a = \circ^m \paren {\circ^n a} = \circ^n \paren {\circ^m a}$

This result can be expressed:

$a^{n m} = \paren {a^n}^m = \paren {a^m}^n$

When additive notation $\struct {S, +}$ is used, the following is a common convention:

$\paren {n m} a = m \paren {n a} = n \paren {m a}$

or:

$\forall m, n \in \N_{>0}: \paren {n m} \cdot a = m \cdot \paren {n \cdot a} = n \cdot \paren {m \cdot a}$