---
tag: 97SRYBF41G
kind: statement
role: theorem
name: Baker–Pixley theorem
msc: [08A40, 08B05]
uses: [4CRH8NNFEF, N9M2N27END, WJ73XYBNE4]
about: [4CRH8NNFEF, N9M2N27END]
sources:
  - url: https://en.wikipedia.org/wiki/Majority_function
  - book: isbn:9780387905785
---

## Statement

Let $A$ be a finite algebra and let $d \ge 2$ be an integer.
Assume that $A$ has a [[near-unanimity term|4CRH8NNFEF]] of arity $d + 1$.
Let $n \ge 1$ and let $f \colon A^n \to A$ be an operation.
Then $f$ is a [[term operation|N9M2N27END]] of $A$ if and only if every [[subalgebra|7CHG6SD365]] of the [[direct power|WJ73XYBNE4]] $A^d$ is closed under $f$, applied coordinatewise.

## Remarks

Every term operation preserves every subalgebra of every power, so only the converse needs work.
The idea is interpolation.
The operation $f$ agrees with a term operation on each set of at most $d$ points of $A^n$.
The reason is that $f$ preserves the subalgebra of $A^d$ generated by the coordinate tuples of those points.
The near-unanimity term then glues such local interpolations, by induction on the number $k > d$ of points.
Given $k$ points, pick $d + 1$ of them, $p_1, \dots, p_{d + 1}$, and by induction take $d + 1$ terms, the $i$-th agreeing with $f$ on all $k$ points except possibly $p_i$.
At each point at most one of these terms disagrees with $f$, so the near-unanimity term applied to them agrees with $f$ on all $k$ points.
Since $A^n$ is finite, one reaches a term that agrees with $f$ on all of $A^n$.
For a [[majority term|9879ZMW5AA]], so $d = 2$, the theorem says that the term operations are the operations that preserve all subalgebras of $A^2$.
For example, a finite lattice $L$ has the majority term $(x \wedge y) \vee (y \wedge z) \vee (x \wedge z)$, so an operation on $L$ is a lattice term operation exactly when it preserves all sublattices of $L^2$.
For an infinite algebra the same argument only shows that $f$ agrees with some term operation on each finite subset of $A^n$.

## Explanations

### L1 human

To test whether an operation can be written with the operations of an algebra, one would like a finite list of conditions to check.
The theorem gives such a list when the algebra has a near-unanimity term.
It is enough to check that the operation respects every subalgebra of a fixed small power $A^d$.

### L2 human

The theorem is a strong form of the statement that the clone of term operations of $A$ equals the set of polymorphisms of the subalgebras of $A^d$.
In the language of the Galois connection between operations and relations, the term clone of $A$ is determined by relations of arity at most $d$.
It also shows that two finite algebras on the same set with near-unanimity terms have the same term operations once they have the same subalgebras of $A^d$.
In an arithmetical variety a Pixley term $p$ gives the majority term $p(x, p(x, y, z), z)$, so the theorem applies there with $d = 2$.
