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 \mathop \ge 1}$ such that:


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


 * $(2): \quad \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 \mathop \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}$.

Let $A$ be the set defined as the set of all $n$ such that:
 * $\circ_n$ is an $n$-ary operation on $S$

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

It will be demonstrated by the Principle of Finite Induction that $A = \N$.

Basis for the Induction
We have that:
 * $\circ_1$ is the unary operation defined as $\circ_1 \left({a}\right) = a$

By the Principle of Recursive Definition:
 * $\circ_2 = s \left({\circ_1}\right)$

is the unique operation on $S$ such that:

By the definition of a magma, $\circ$ is a operation defined such that:
 * $\forall \left({a_1, a_2}\right) \in S \times S: \circ \left({a_1, a_2}\right) \in S$

where $\circ: S \times S \to S$ is a mapping.

$a_1 \circ a_2$ is defined as:
 * $\forall \left({a_1, a_2}\right) \in S \times S: a_1 \circ a_2 := \circ \left({a_1, a_2}\right)$

So $1 \in A$.

This is our basis for the induction.

Induction Hypothesis
It is to be shown that, if $m \in A$ where $m \ge 1$, then it follows that $m + 1 \in A$.

This is the induction hypothesis:


 * $\circ_m$ is an $m$-ary operation on $S$

and:
 * by the definition of $s$, $(2)$ holds for every ordered $m + 1$-tuple in $S^{m+1}$.

It is to be demonstrated that it follows that:


 * $\circ_{m+1}$ is an $m+1$-ary operation on $S$

and:
 * by the definition of $s$, $(2)$ holds for every ordered $m + 2$-tuple in $S^{m+2}$.

Induction Step
This is our induction step:

By the Principle of Recursive Definition:
 * $\circ_{m+1} = s \left({\circ_m}\right)$

is the unique operation on $S$ such that:

By the definition of a magma, $\circ$ is a operation defined such that:
 * $\forall \left({a_1, a_2}\right) \in S \times S: \circ \left({a_1, a_2}\right) \in S$

where $\circ: S \times S \to S$ is a mapping.

By the induction hypothesis:
 * $\circ_m \left({a_1, a_2, \ldots, a_m}\right) \circ a_{m+1} \in S$

So by definition: $\circ_{m+1} \left({a_1, a_2, \ldots, a_m, a_{m+1} }\right) \in S$

Let $b := \circ_{m+1} \left({a_1, a_2, \ldots, a_m, a_{m+1} }\right)$.

But then by the basis of the induction:
 * $b \circ a_{m+2} \in S$

That is:
 * $\circ_{m+1} \left({a_1, a_2, \ldots, a_m, a_{m+1} }\right) \circ a_{m+2} = \circ_{m+2} \left({a_1, a_2, \ldots, a_m, a_{m+1}, a_{m+2} }\right) \in S$

So $m \in A \implies m + 1 \in A$ and the result follows by the Principle of Finite Induction: