# Clone (algebra)

In universal algebra, a clone is a set C of finitary operations on a set A such that
* C contains all the projections π$_k$$^n$: A$^n$ → A, defined by π$_k$$^n$(x$_1$, …, x$_n$) = x$_k$,
* C is closed under (finitary multiple) composition (or "superposition"): if f, g$_1$, …, g$_m$ are members of C such that f is m-ary, and g$_j$ is n-ary for all j, then the n-ary operation h(x$_1$, …, x$_n$) := f(g$_1$(x$_1$, …, x$_n$), …, g$_m$(x$_1$, …, x$_n$)) is in C.
The question whether clones should contain nullary operations or not is not treated uniformly in the literature. The classical approach as evidenced by the standard monographs on clone theory considers clones only containing at least unary operations. However, with only minor modifications (related to the empty invariant relation) most of the usual theory can be lifted to clones allowing nullary operations.$^{:4–5}$ The more general concept includes all clones without nullary operations as subclones of the clone of all at least unary operations$^{:5}$ and is in accordance with the custom to allow nullary terms and nullary term operations in universal algebra. Typically, publications studying clones as abstract clones, e.g. in the category theoretic setting of Lawvere's algebraic theories, will include nullary operations.
Given an algebra in a signature σ, the set of operations on its carrier definable by a σ-term (the term functions) is a clone. Conversely, every clone can be realized as the clone of term functions in a suitable algebra by simply taking the clone itself as source for the signature σ so that the algebra has the whole clone as its fundamental operations.
If A and B are algebras with the same carrier such that every basic function of A is a term function in B and vice versa, then A and B have the same clone. For this reason, modern universal algebra often treats clones as a representation of algebras which abstracts from their signature.
There is only one clone on the one-element set (there are two if nullary operations are considered). The lattice of clones on a two-element set is countable,$^{:39}$ and has been completely described by Emil Post (see Post's lattice,$^{:37}$ which traditionally does not show clones with nullary operations). Clones on larger sets do not admit a simple classification; there are continuum-many clones on a finite set of size at least three,$^{:39}$ and 2$^{2κ}$ (even just maximal,$^{:39}$ i.e. precomplete) clones on an infinite set of cardinality κ.$^{:39}$

## Abstract clones

Philip Hall introduced the concept of abstract clone. An abstract clone is different from a concrete clone in that the set A is not given. Formally, an abstract clone comprises
* a set C$_n$ for each natural number n,
* elements π$_{k,n}$ in C$_n$ for all k ≤ n, and
* a family of functions ∗:C$_m$ × (C$_n$)$^m$ → C$_n$ for all m and n
such that
* c * (π$_{1,n}$, …, π$_{n,n}$) = c
* π$_{k,m}$ * (c$_1$, …, c$_m$) = c$_k$
* c * (d$_1$ * (e$_1$, …, e$_n$), …, d$_m$ * (e$_1$, …, e$_n$)) = (c * (d$_1$, …, d$_m$)) * (e$_1$, …, e$_n$).
Any concrete clone determines an abstract clone in the obvious manner.
Any algebraic theory determines an abstract clone where C$_n$ is the set of terms in n variables, π$_{k,n}$ are variables, and ∗ is substitution. Two theories determine isomorphic clones if and only if the corresponding categories of algebras are isomorphic. Conversely every abstract clone determines an algebraic theory with an n-ary operation for each element of C$_n$. This gives a bijective correspondence between abstract clones and algebraic theories.
Every abstract clone C induces a Lawvere theory in which the morphisms m → n are elements of (C$_m$)$^n$. This induces a bijective correspondence between Lawvere theories and abstract clones.