# Post's lattice

In logic and universal algebra, Post's lattice denotes the lattice of all clones on a two-element set {0, 1}, ordered by inclusion. It is named for Emil Post, who published a complete description of the lattice in 1941. The relative simplicity of Post's lattice is in stark contrast to the lattice of clones on a three-element (or larger) set, which has the cardinality of the continuum, and a complicated inner structure. A modern exposition of Post's result can be found in Lau (2006).

## Basic concepts

A Boolean function, or logical connective, is an n-ary operation f: 2$^n$ → 2 for some n ≥ 1, where 2 denotes the two-element set {0, 1}. Particular Boolean functions are the projections
    $\pi _{k}^{n}(x_{1},\dots ,x_{n})=x_{k},$
and given an m-ary function f, and n-ary functions g$_1$, ..., g$_m$, we can construct another n-ary function
    $h(x_{1},\dots ,x_{n})=f(g_{1}(x_{1},\dots ,x_{n}),\dots ,g_{m}(x_{1},\dots ,x_{n})),$
called their composition. A set of functions closed under composition, and containing all projections, is called a clone.
Let B be a set of connectives. The functions which can be defined by a formula using propositional variables and connectives from B form a clone [B], indeed it is the smallest clone which includes B. We call [B] the clone generated by B, and say that B is the basis of [B]. For example, [¬, ∧] are all Boolean functions, and [0, 1, ∧, ∨] are the monotone functions.
We use the operations ¬, Np, (negation), ∧, Kpq, (conjunction or meet), ∨, Apq, (disjunction or join), →, Cpq, (implication), ↔, Epq, (biconditional), +, Jpq (exclusive disjunction or Boolean ring addition), ↛, Lpq, (nonimplication), ?: (the ternary conditional operator) and the constant unary functions 0 and 1. Moreover, we need the threshold functions
    $\mathrm {th} _{k}^{n}(x_{1},\dots ,x_{n})={\begin{cases}1&{\text{if }}{\bigl |}\{i\mid x_{i}=1\}{\bigr |}\geq k,\\0&{\text{otherwise.}}\end{cases}}$
For example, th$^n$ $_1$ is the large disjunction of all the variables x$_i$, and th$^n$ $_n$ is the large conjunction. Of particular importance is the majority function
    $\mathrm {maj} =\mathrm {th} _{2}^{3}=(x\land y)\lor (x\land z)\lor (y\land z).$
We denote elements of 2$^n$ (i.e., truth-assignments) as vectors: a = (a$_1$, ..., a$_n$). The set 2$^n$ carries a natural product Boolean algebra structure. That is, ordering, meets, joins, and other operations on n-ary truth assignments are defined pointwise:
    $(a_{1},\dots ,a_{n})\leq (b_{1},\dots ,b_{n})\iff a_{i}\leq b_{i}{\text{ for }}i=1,\dots ,n,$
    $(a_{1},\dots ,a_{n})\land (b_{1},\dots ,b_{n})=(a_{1}\land b_{1},\dots ,a_{n}\land b_{n}).$

## Naming of clones

Intersection of an arbitrary number of clones is again a clone. It is convenient to denote intersection of clones by simple juxtaposition, i.e., the clone C$_1$ ∩ C$_2$ ∩ ... ∩ C$_k$ is denoted by C$_1$C$_2$...C$_k$. Some special clones are introduced below:
* M = [∧, ∨, 0, 1] is the set of monotone functions: f(a) ≤ f(b) for every a ≤ b.
* D = [maj, ¬] is the set of self-dual functions: ¬f(a) = f(¬a).
* A = [↔, 0] is the set of affine functions: the functions satisfying
       ${\begin{aligned}&f(a_{1},\dots ,a_{i-1},c,a_{i+1},\dots ,a_{n})=f(a_{1},\dots ,d,a_{i+1},\dots )\\\Rightarrow &f(b_{1},\dots ,c,b_{i+1},\dots )=f(b_{1},\dots ,d,b_{i+1},\dots )\end{aligned}}$
    for every i ≤ n, a, b ∈ 2$^n$, and c, d ∈ 2. Equivalently, the functions expressible as f(x$_1$, ..., x$_n$) = a$_0$ + a$_1$x$_1$ + ... + a$_n$x$_n$ for some a$_0$, a.
* U = [¬, 0] is the set of essentially unary functions, i.e., functions which depend on at most one input variable: there exists an i = 1, ..., n such that f(a) = f(b) whenever a$_i$ = b$_i$.
* Λ = [∧, 0, 1] is the set of conjunctive functions: f(a ∧ b) = f(a) ∧ f(b). The clone Λ consists of the conjunctions $f(x_{1},\dots ,x_{n})=\bigwedge _{i\in I}x_{i}$ for all subsets I of {1, ..., n} (including the empty conjunction, i.e., the constant 1), and the constant 0.
* V = [∨, 0, 1] is the set of disjunctive functions: f(a ∨ b) = f(a) ∨ f(b). Equivalently, V consists of the disjunctions $f(x_{1},\dots ,x_{n})=\bigvee _{i\in I}x_{i}$ for all subsets I of {1, ..., n} (including the empty disjunction 0), and the constant 1.
* For any k ≥ 1, T$^k$ $_0$ = [th$^{k+2}$ $_{k+1}$, ↛] is the set of functions f such that
       $\mathbf {a} ^{1}\land \cdots \land \mathbf {a} ^{k}=\mathbf {0} \ \Rightarrow \ f(\mathbf {a} ^{1})\land \cdots \land f(\mathbf {a} ^{k})=0.$
    Moreover, $\mathrm {T} _{0}^{\infty }=\bigcap _{k=1}^{\infty }\mathrm {T} _{0}^{k}$ = [↛] is the set of functions bounded above by a variable: there exists i = 1, ..., n such that f(a) ≤ a$_i$ for all a.
    As a special case, P$_0$ = T$^1$ $_0$ = [∨, +] is the set of 0-preserving functions: f(0) = 0. Furthermore, ⊤ can be considered T$^0$ $_0$ when one takes the empty meet into account.
* For any k ≥ 1, T$^k$ $_1$ = [th$^{k+2}$ $_{k+1}$, →] is the set of functions f such that
       $\mathbf {a} ^{1}\lor \cdots \lor \mathbf {a} ^{k}=\mathbf {1} \ \Rightarrow \ f(\mathbf {a} ^{1})\lor \cdots \lor f(\mathbf {a} ^{k})=1,$
    and $\mathrm {T} _{1}^{\infty }=\bigcap _{k=1}^{\infty }\mathrm {T} _{1}^{k}$ = [→] is the set of functions bounded below by a variable: there exists i = 1, ..., n such that f(a) ≥ a$_i$ for all a.
    The special case P$_1$ = T$^1$ $_1$ = [∧, →] consists of the 1-preserving functions: f(1) = 1. Furthermore, ⊤ can be considered T$^0$ $_1$ when one takes the empty join into account.
* The largest clone of all functions is denoted ⊤ = [∨, ¬], the smallest clone (which contains only projections) is denoted ⊥ =, and P = P$_0$P$_1$ = [x ? y : z] is the clone of constant-preserving functions.

## Description of the lattice

The set of all clones is a closure system, hence it forms a complete lattice. The lattice is countably infinite, and all its members are finitely generated. All the clones are listed in the table below.
| clone | one of its bases |
| P$_0$ | ∨, + |
| P$_1$ | ∧, → |
| P | x ? y : z |
| T$_0$$^k$, k ≥ 2 | th$_k$$^{k+1}$, ↛ |
| T$_0$$^∞$ | ↛ |
| PT$_0$$^k$, k ≥ 2 | th$_k$$^{k+1}$, x ∧ (y → z) |
| PT$_0$$^∞$ | x ∧ (y → z) |
| T$_1$$^k$, k ≥ 2 | th$_2$$^{k+1}$, → |
| T$_1$$^∞$ | → |
| PT$_1$$^k$, k ≥ 2 | th$_2$$^{k+1}$, x ∨ (y + z) |
| PT$_1$$^∞$ | x ∨ (y + z) |
| M | ∧, ∨, 0, 1 |
| MP$_0$ | ∧, ∨, 0 |
| MP$_1$ | ∧, ∨, 1 |
| MP | ∧, ∨ |
| MT$_0$$^k$, k ≥ 2 | th$_k$$^{k+1}$, 0 |
| MT$_0$$^∞$ | x ∧ (y ∨ z), 0 |
| MPT$_0$$^k$, k ≥ 2 | th$_k$$^{k+1}$ for k ≥ 3, maj, x ∧ (y ∨ z) for k = 2 |
| MPT$_0$$^∞$ | x ∧ (y ∨ z) |
| MT$_1$$^k$, k ≥ 2 | th$_2$$^{k+1}$, 1 |
| MT$_1$$^∞$ | x ∨ (y ∧ z), 1 |
| MPT$_1$$^k$, k ≥ 2 | th$_2$$^{k+1}$ for k ≥ 3, maj, x ∨ (y ∧ z) for k = 2 |
| MPT$_1$$^∞$ | x ∨ (y ∧ z) |
| Λ | ∧, 0, 1 |
| ΛP$_0$ | ∧, 0 |
| ΛP$_1$ | ∧, 1 |
| ΛP | ∧ |
| V | ∨, 0, 1 |
| VP$_0$ | ∨, 0 |
| VP$_1$ | ∨, 1 |
| VP | ∨ |
| D | maj, ¬ |
| DP | maj, x + y + z |
| DM | maj |
| A | ↔, 0 |
| AD | ¬, x + y + z |
| AP$_0$ | + |
| AP$_1$ | ↔ |
| AP | x + y + z |
| U | ¬, 0 |
| UD | ¬ |
| UM | 0, 1 |
| UP$_0$ | 0 |
| UP$_1$ | 1 |
The eight infinite families have actually also members with k = 1, but these appear separately in the table: T$_0$$^1$ = P$_0$, T$_1$$^1$ = P$_1$, PT$_0$$^1$ = PT$_1$$^1$ = P, MT$_0$$^1$ = MP$_0$, MT$_1$$^1$ = MP$_1$, MPT$_0$$^1$ = MPT$_1$$^1$ = MP.
The lattice has a natural symmetry mapping each clone C to its dual clone C$^d$ = {f$^d$ | f ∈ C}, where f$^d$(x$_1$, ..., x$_n$) = ¬f(¬x$_1$, ..., ¬x$_n$) is the de Morgan dual of a Boolean function f. For example, Λ$^d$ = V, (T$_0$$^k$)$^d$ = T$_1$$^k$, and M$^d$ = M.

## Applications

The complete classification of Boolean clones given by Post helps to resolve various questions about classes of Boolean functions. For example:
* An inspection of the lattice shows that the maximal clones different from ⊤ (often called Post's classes) are M, D, A, P$_0$, P$_1$, and every proper subclone of ⊤ is contained in one of them. As a set B of connectives is functionally complete if and only if it generates ⊤, we obtain the following characterization: B is functionally complete iff it is not included in one of the five Post's classes.
* The satisfiability problem for Boolean formulas is NP-complete by Cook's theorem. Consider a restricted version of the problem: for a fixed finite set B of connectives, let B-SAT be the algorithmic problem of checking whether a given B-formula is satisfiable. Lewis used the description of Post's lattice to show that B-SAT is NP-complete if the function ↛ can be generated from B (i.e., [B] ⊇ T$_0$$^∞$), and in all the other cases B-SAT is polynomial-time decidable.

## Variants
### Clones requiring the constant functions

If one only considers clones that are required to contain the constant functions, the classification is much simpler: there are only 7 such clones: UM, Λ, V, U, A, M, and ⊤. While this can be derived from the full classification, there is a simpler proof, taking less than a page.

### Clones allowing nullary functions

Composition alone does not allow to generate a nullary function from the corresponding unary constant function, this is the technical reason why nullary functions are excluded from clones in Post's classification. If we lift the restriction, we get more clones. Namely, each clone C in Post's lattice which contains at least one constant function corresponds to two clones under the less restrictive definition: C, and C together with all nullary functions whose unary versions are in C.

### Iterative systems

Post originally did not work with the modern definition of clones, but with the so-called iterative systems, which are sets of operations closed under substitution
    $h(x_{1},\dots ,x_{n+m-1})=f(x_{1},\dots ,x_{n-1},g(x_{n},\dots ,x_{n+m-1})),$
as well as permutation and identification of variables. The main difference is that iterative systems do not necessarily contain all projections. Every clone is an iterative system, and there are 20 non-empty iterative systems which are not clones. (Post also excluded the empty iterative system from the classification, hence his diagram has no least element and fails to be a lattice.) As another alternative, some authors work with the notion of a closed class, which is an iterative system closed under introduction of dummy variables. There are four closed classes which are not clones: the empty set, the set of constant 0 functions, the set of constant 1 functions, and the set of all constant functions.