General Operation from Binary Operation

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

Then there a unique sequence $\left \langle {\circ_k} \right \rangle_{k \ge 1}$ such that:


 * $\forall n \in \N_{>0}: \circ_n$ is an $n$-ary operation on $S$ such that:


 * $\forall \left({a_1, \ldots, a_k}\right) \in S^k: \circ_k \left({a_1, \ldots, a_k}\right) = \begin{cases}

a: & k = 1 \\ \circ_n \left({a_1, \ldots, a_n}\right) \circ a_{n+1}: & k = n + 1 \end{cases}$

In particular, $\circ_2$ is the same as the given binary operation $\circ$.

The $n$th term $\circ_n$ of the sequence $\left \langle {\circ} \right \rangle$ is called the $n$-ary operation defined by $\circ$.

Proof
Let $\Bbb S = \left\{{\odot:}\right.$ for some $n \in \N_{>0}$, $\odot$ is an $n$-ary operation on $\left.{S}\right\}$.

Let $s: \Bbb S\to \Bbb S$ be the mapping defined as follows.

Let $\odot$ be any $n$-ary operation defined on $\Bbb S$.

Then $s \left({\odot}\right)$ is the $\left({n+1}\right)$-ary operation defined by:


 * $\forall \left({a_1, \ldots, a_n, a_{n+1}}\right) \in S^{n+1}: s \left({\odot}\right) \left({a_1, \ldots, a_n, a_{n+1}}\right) = \odot \left({a_1, \ldots, a_n}\right) \circ a_{n+1}$

By the Principle of Recursive Definition, there is a unique sequence $\left \langle {\circ_k} \right \rangle_{k \ge 1}$ such that:
 * $\circ_1$ is the unary operation defined as $\circ_1 \left({a}\right) = a$

and:
 * $\circ_{n+1} = s \left({\circ_n}\right)$ for each $n \in \N_{>0}$.

By induction it can be shown that:
 * $\circ_n$ is an $n$-ary operation on $S$ for each $n \in \N_{>0}$

and:
 * by the definition of $s$, the hypothesis holds for every $n+1$-tuple in $S^{n+1}$.