# Index Laws/Sum of Indices

## Theorem

### Semigroup

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

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

$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$

Then:

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

### Monoid

Let $\left({S, \circ}\right)$ be a monoid whose identity element is $e$.

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

$a^n = \begin{cases} e & : n = 0 \\ 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 \left({a}\right)$

while:

$a^0 = e$

Then:

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

## 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} = \map {\circ^n} a$

Recall the index law for sum of indices:

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

This result can be expressed:

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

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

$\left({n + m}\right) a = n a + m a$

or:

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