All roads lead to Rome. Do they? The Church–Rosser theorem says so: it guarantees uniqueness of the normal form, whichever paths we take towards it. Admittedly, in a Turing-complete language we may never reach a normal form at all — but if we do reach one, it is unique: whichever way you go, you arrive precisely in Rome.
If and , then there is an such that and . In other words, has the diamond property (confluence):
The proof is best carried out via parallel reduction. We need three reduction operators on terms:
- — ordinary, single-step β-reduction: means one redex in is chosen and contracted (one step — one redex);
- — parallel reduction: means an arbitrary set of redexes already present in is contracted (zero, one, two — any number), each at most once, and only the existing ones, not their future copies;
- — multi-step reduction (the reflexive-transitive closure of ): means there is a chain of any length, including zero.
Single-step reduction is a special case of parallel reduction, which in turn is a special case of multi-step reduction:
Why can't the diamond property be proved directly for single-step reduction (fig. 1.1, a)? Redex copying gets in the way. Take a term with two redexes — an outer and an inner one:
Contract the outer redex — the substitution duplicates the inner one: we get . Contract the inner one — we get . The paths have diverged by one step, but they can no longer meet in one step: the second term yields immediately, while the first needs two steps, one per copy. So the single-step diamond property for is simply false.
Parallel reduction cures exactly this disease: it contracts all the multiplied copies of a redex at once, in a single tick. For it the diamond property does hold (fig. 1.1, b), and it is proved by Takahashi's trick — via the complete development.
The complete development is the term in which all redexes visible in are contracted simultaneously — the greediest parallel step possible. It is defined by induction on the structure of the term:
The first rule: — a variable develops into itself.
The second rule: — the development goes under the abstraction.
The third rule: if is not a redex ( is not an abstraction): the parts are developed independently.
The fourth rule: — the redex itself is contracted, and its parts are developed as well.
Let us develop the counterexample term by these rules:
- — the whole term is a redex, so the fourth rule fires: the outer redex is contracted and both its parts go into development;
- — the application is not a redex: the third rule, then the first for each variable;
- — the inner redex: the fourth rule, then the first twice;
- — it remains to perform the substitution.
So : the development has contracted both the outer redex and the inner one — before the latter had a chance to multiply. The whole construction rests on the triangle lemma.
Triangle lemma. The complete development cannot be overtaken: whatever the parallel step , exactly one parallel step leads from to :
A parallel step is not obliged to contract all the redexes — from a single the steps lead to a whole fan of terms, and the complete development is merely the extreme, greediest point of that fan. So the step is in general a real one; it is a zero step only when everything has already been contracted and .
A reduction that contracts all visible redexes at once, in a single sweep, is called the Gross–Knuth reduction . But it is of no interest to us: it has no variability — from a given term such a step leads to exactly one result. And the Church–Rosser theorem is precisely about variability: the paths contract redexes in an arbitrary order, and they cannot be decomposed into rigid Gross–Knuth steps. What is needed is precisely the freedom to contract any subset.
The diamond property follows from the triangle immediately. Suppose and . By the triangle lemma and — take , and both sides close in one step (fig. 1.2, right). The common point is the same for all: it depends neither on nor on .
It remains to lift the diamond property from a single parallel step to multi-step reduction (fig. 1.1, c). The inclusions (1.32) let us read any chain of -steps as a chain of -steps and vice versa. So let us write out and as two chains of parallel steps, lay them along the sides of a grid and complete it cell by cell — each cell is closed by the diamond property for .
Having filled the whole grid, we obtain at the bottom vertex a term where both chains converge. All edges of the grid are parallel steps, and , so and . The Church–Rosser theorem is proved.
The Church–Rosser theorem (1.31) immediately gives the existence of a common reduct: if , there is an with and (induction on the definition of ). Hence the uniqueness of the normal form: a term has at most one β-NF — two paths would meet at a common , and an NF does not reduce further, so . Next, reduction to NF: if is a normal form of , then (not merely ). Finally, consistency: distinct normal forms are not β-equal — e.g. and — otherwise uniqueness of the NF would fail; this is how term “inequalities” are proved.
The order of contracting redexes, then, does not change the result — only whether the computation terminates and in how many steps. Choosing that order is the job of reduction strategies.