Böhm tree 2026-10-14
The Böhm tree of an unsolvable lambda term is . If is a head normal form, its Böhm tree has root label and ordered children . The tree may be infinite. Church-Rosser theorem and alpha equivalence make this independent of the selected head reduct.
A reduction relation has the Church-Rosser property when its equivalence relation generated by forward and backward steps satisfies . It is equivalent to confluence of . The Church-Rosser theorem establishes it for beta reduction.
Parallel beta reduction 2026-10-14
Parallel beta reduction permits simultaneous reduction in the body of a lambda abstraction and both sides of an application, together with when and . Variables reduce to themselves. Its capture-avoiding substitution lemma is . Its transitive closure equals ordinary finite beta reduction, while its one-step diamond property yields the Church-Rosser theorem.
Past exam of the mathematics course of the University of Cambridge 2002 iii Paper 76 2 Solution Created 2026-10-03 Updated 2026-10-14
A fixed-point combinator is a closed lambda term such that for every lambda term . It suffices to check this for a fresh free variable , since capture-avoiding substitution then gives every instance. TakeIf , applying both sides to gives . Conversely suppose is a fixed-point combinator. Its application to a fresh has a head normal form, because it is beta equivalent to . Since is closed, head reduction of must first expose a lambda abstraction in itself. Thus , andThis establishes the needed abstraction equality by beta reduction, without assuming eta conversion. Abstracting now gives .
Two examples are the Curry fixed-point combinator and the Turing fixed-point combinator:Writing , we have , while . Different displayed syntax alone would not prove that the two combinators are distinct under beta equivalence. Here is a reduct invariant that does. Every finite reduct of is , up to alpha equivalence: is beta-normal and the one remaining beta-redex is its self-application. No such reduct contains the closed subterm .
Every finite reduct of , in contrast, retains a closed subterm . The contraction recreates one. The only other redexes created by these expansions are abstractions applied to variables; contracting them substitutes a variable, so preserves any closed inside their bodies. This describes all redexes inductively: expansion inserts only a variable-headed application and a copy of , and a variable substitution preserves that description. Thus every finite reduct contains . A common reduct of and is impossible, so the Church-Rosser theorem proves .
Finally put , with . The fixed-point combinator equation giveswhere is fresh. If had a head normal form with leading abstractions, then would have one with . A reduct of a head normal form preserves its initial abstraction count and variable-headed spine: only its argument subterms can still contract. These two head normal forms therefore cannot have a common reduct, contradicting the Church-Rosser theorem. Hence is unsolvable.
Past exam of the mathematics course of the University of Cambridge 2002 iii Paper 76 4 Solution Created 2026-10-03 Updated 2026-10-14
Use Church numeralsExplicit lambda terms for the successor and zero test areDirect beta reduction gives , and the Church numeral zero test returns exactly at zero. For the predecessor, use the Church pair operationsand setAfter iterations this pair holds : the initial pair gives the case , and one step moves the old first coordinate into the second and increments the first. This proves the predecessor equation, including .
A total function is a lambda-definable function when a closed lambda term sends each tuple of numerals to the numeral of its value. Suppose represent total , andFor lambda definition of primitive recursion by pair iteration, putOn numeral inputs, induction gives the pair after iterations. The base case is the equation for , and the induction step is exactly the equation for . Hence represents , proving closure of total lambda-definable functions under primitive recursion.
For unbounded minimization, the careful closure statement is partial: if total is lambda-definable, thenis a lambda-definable partial function, defined when a zero exists and otherwise undefined. It need not be total. With representing , use a fixed-point combinator to defineEach test terminates because is total. Normal-order beta reduction chooses the return branch at the first zero and does not evaluate the discarded branch. If there is no zero, the required head computation passes through tests for all , never exposing a numeral; standardization theorem for beta reduction rules out a hidden numeral reduct. For partial , the usual mu operator is defined only if all earlier tests terminate and the successful test is zero. This stronger partial closure requires representatives that diverge on undefined inputs, or an explicit strict evaluator; the weaker condition of producing no numeral on undefined inputs alone must not be used as a test for convergence.
The zero function, successor, and projections have immediate numeral representations; function composition in recursion theory is implemented by substitution on total inputs. Thus every primitive recursive function is lambda-definable. The Kleene normal form theorem writes every partial recursive function as a total primitive-recursive decoding after a single minimization of a total primitive-recursive computation-history predicate. The search above consequently represents every partial recursive function, diverging when no successful history exists. Conversely a machine can effectively enumerate the beta reductions of a fixed representing lambda term on numeral inputs until it finds a Church numeral; distinct numerals cannot be beta-equivalent by the Church-Rosser theorem. It computes exactly the represented partial function. Therefore lambda-definable partial functions are precisely partial computable functions, and the total ones are precisely total computable functions.
This also gives the full partial minimization closure without assuming that an arbitrary weak representative diverges on every undefined input. Run its effective numeral evaluator successively at ; stop at the first zero, and run forever if an earlier evaluation fails to terminate or no zero is found. This is exactly the sequential-domain convention for the mu operator. The resulting partial computable function has a lambda representation by the construction just proved. Thus partial lambda-definable functions are closed under partial minimization; a minimized function belongs to the total family only when the required successful search exists for every input.
Past exam of the mathematics course of the University of Cambridge 2002 iii Paper 76 6 Solution Created 2026-10-03 Updated 2026-10-14
The Böhm tree is if is an unsolvable lambda term. Otherwise choose a head normal formIts root is labeled by the binder prefix and head variable, and its ordered children are . Repeat recursively, possibly forever. Bound names are identified by alpha equivalence; the Church-Rosser theorem makes this tree independent of the selected head reduct. An address is a finite sequence of child numbers; denotes the corresponding argument term encountered after these head reductions.
A Böhm transformation is a finite composition of capture-avoiding substitutions and applications to chosen auxiliary terms. Here is a constructive Böhm-out lemma. Along the finite path to , choose at least the number of children of each preceding head node, and defineInitially replace all relevant free variables by . At a head node with initial binders and children, supply its binders with . Its head is now and its arguments are the substituted children . Apply extra copies of as padding and then . Direct beta reduction givesRepeat with the next child number. The term reached at each stage is the selected original child with the accumulated substitutions for its ancestors' binders. Thus the finite composite satisfies for a suitable substitution . The empty path uses the identity transformation. Tupling, rather than immediately replacing a head variable by a fixed projection, is important: the same variable can occur later where a different child must be selected.
For the Böhm separation theorem, two distinct closed normal forms for both beta reduction and eta conversion have finite Böhm trees with a genuine disagreement in a head label or argument structure. A Böhm transformation first extracts their common-prefix node. Projections at a differing head variable select different supplied Church Booleans; differing arities are handled by padding, with the exclusion of mere eta expansions ensuring a genuine disagreement. This yields a context separating the two normal forms. Distinct beta-normal forms that differ only by eta conversion are not covered by this separation statement.
The PDF prints a free in both the definitions of and . Taken literally, this makes the last request impossible. To see why, suppose , where , and choose a fresh . By solvability and its stability under substitution, has a head normal form . If , substituting either or leaves the same variable-headed spine; it cannot be in one case and in the other. If , obtaining requires and , hence . Substituting then leaves at least leading abstractions, whereas has two. A variable-headed normal form cannot lose initial abstractions under beta reduction. The Church-Rosser theorem rules out the required equality.
For the intended closed first projection and , an explicit answer isIndeed , whereas . These computations solve the corrected closed-combinator version while identifying the obstruction in the literal printed one.
Past exam of the mathematics course of the University of Cambridge 2007 iii Paper 87 1 Solution Created 2026-10-03 Updated 2026-10-14
A lambda term is built recursively as a variable , an application , or a lambda abstraction . Application associates to the left and abstraction binds occurrences of its variable. We identify consistent renamings of bound variables by alpha equivalence. A beta reduction contracts to the capture-avoiding substitution , at any subterm. Write for finitely many such steps, including none. Beta equivalence is the reflexive, symmetric, transitive closure of reduction, so it is represented by a finite zigzag of forward and backward steps.
To prove the Church-Rosser theorem, introduce parallel beta reduction by the four rulesBy structural induction every term parallel-reduces to itself. Each ordinary step is a parallel step. Conversely, each parallel step can be performed by an ordinary finite sequence: reduce the displayed subterms recursively, and in the fourth rule contract the root last. Hence and are the same relation.
The substitution lemma isProve it by induction on the parallel-reduction derivation for . The variable case separates from other variables; application and abstraction follow from their inductive hypotheses. For abstraction, rename its binder fresh for before substituting. For a contracted redex, choose its binder distinct from and fresh for . The substitution identity follows by structural induction with fresh binders; the variable cases use , and application and abstraction preserve the identity. Apply the hypotheses to the body and argument, then the parallel contraction rule and this identity. This proves the lemma for every derivation, including simultaneous contractions inside a redex.
Define the complete development of a lambda term byOnly a root redex already present in the source application is contracted by this clause; a newly created root redex need not be contracted.
We claim that implies . Induct on the derivation. The variable and abstraction cases are immediate. In the ordinary application rule, use the inductive developments of both components. If its original function is an abstraction, also contract the resulting root redex by the parallel contraction rule; otherwise just use the application rule, even if the reduct has acquired a new root redex. In the contraction rule, the reduct has form , and the substitution lemma with , gives . This establishes the claim.
Consequently, any two parallel reducts of each parallel-reduce to . Thus parallel reduction has the one-step diamond property. Its finite transitive closure is confluent: fill a finite grid of elementary diamonds to join two finite reduction paths from the same term. Since its closure equals ordinary finite beta reduction,A finite conversion zigzag now also has a common reduct, by induction along it. If the next zigzag step points forward from a term already having a common reduct, join its two outgoing paths by confluence; if it points backward, compose the new forward path to that common reduct. The reverse implication is immediate because two paths to a common reduct form a conversion zigzag. This proves
A beta-normal form contains no beta-redex, so its only finite reduct is itself. If two normal forms are beta-equivalent, their common reduct must equal both. Hence a term has at most one beta-normal form up to alpha equivalence. The qualification about bound-variable names is essential.
For an example without normal form, take the Omega combinatorIts only redex is the root, and contracting it reproduces . Every finite reduct is therefore , which is not a beta-normal form. By the theorem it cannot even be beta-equivalent to any normal form.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 135 6 Solution Created 2026-10-03 Updated 2026-10-05
Use untyped lambda calculus and normal-order beta reduction. Write for the Church numeral of . We will construct a closed term such thatwhen is defined, and with no head normal form otherwise. The latter condition implies that the result is not in beta equivalence with any Church numeral, so both definedness and the output are represented.
First represent all total primitive recursive functions. The zero function is , the successor function isand the th projection function is . Function composition in recursion theory is represented by . This composition claim is used here for total functions, whose inner terms all reduce to numerals.
For primitive recursion use Church pairs and iteration. PutSuppose represent the total constituents of and . DefineAfter iterations the pair reduces to , by mathematical induction on . Its second projection is the required result. This lambda definition of primitive recursion by pair iteration and structural induction on the primitive recursive construction give terms for all primitive recursive functions.
For an arbitrary partial computable function use the Kleene normal form theorem with its program index fixed. There are total primitive recursive functions and such that is zero exactly when codes a valid halting computation history on , and extracts that history's output. Checking finite coded configurations and each transition is primitive recursive. Determinism ensures that every accepted history on an input has the same output. HenceIf the input computation never halts, no history is accepted. Let be the total numeral-representing terms already obtained. The Church numeral zero test is , returning exactly on zero. A Church Boolean applied to two arguments selects the appropriate branch without evaluating the other.
Take the fixed-point combinator . For the input tuple defineExpanding the displayed abbreviations gives a genuine finite combinator. At a numeral code , the total predicate computation terminates. If it returns a positive numeral, the false Church Boolean selects the next search code. If it returns zero, the true Church Boolean selects , which reduces to the output numeral. If the least accepted code is , a finite sequence of these tests reaches it and then produces .
If there is no accepted code, every test is false and head reduction moves through codes forever. At no finite point can a head variable or an outer numeral abstraction be produced: the applied search term must first unfold the fixed point and evaluate the next total test, and the decoder branch is always discarded. Thus it has no head normal form. The standard head-normalization property, or the Church-Rosser theorem together with normalization of normal-order reduction, rules out beta equivalence to a numeral. In particular, we have avoided a lazy-composition pitfall: an outer function that discards an argument need not force a divergent inner computation. The decoder is reached only after the guarded search succeeds. This proves lambda representation of partial computable functions:
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 135 3 Solution Created 2026-10-03 Updated 2026-10-05
The machine characterization is computation by a Turing machine: the machine halts with exactly on inputs in the domain of a partial function and does not halt elsewhere. The syntactic characterization is the least class containing the initial functions of recursion theory and closed under composition of partial functions, primitive recursion and unbounded minimization. Such functions are the partial recursive functions, equivalently the partial computable functions.
For clarity, composition here is strict: is defined only when every inner value is defined and is defined on the resulting tuple. Likewise primitive recursion requires all preceding recursive values. The partial minimization is defined when such a exists and all earlier values are defined and nonzero; an undefined earlier value blocks the search.
A lambda-definable partial function is represented by a closed untyped lambda calculus term satisfyingOn an input outside its domain there must be no Church numeral beta-equivalent to the result. A stronger representation can be arranged: undefined inputs have no head normal form.
Here are the components for proving that every partial recursive function is lambda-definable. Zero and projections are immediate; lambda definition of the successor function uses . Church Booleans encode a conditional by , with and . PutIteration takes to for , proving that encodes the predecessor function and that correctly tests zero.
Use a fixed-point combinator and the strict sequencing operationFor any numeral , reduces to . If the first argument has no head normal form, neither does the whole expression. Thus composition is implemented by nesting on every inner result before applying the outer representing term. This guard is important: an unguarded projection could discard an undefined inner computation.
For lambda definition of primitive recursion, with already represented by , takeThe tuple notation abbreviates successive abstractions and applications. On numeral inputs, induction on proves the required recursion equations, including strict propagation of undefined preceding values. The beta reduction follows the selected conditional branch only.
For lambda definition of unbounded minimization, useThis searches in increasing order. An undefined value blocks the zero test; an infinite sequence of nonzero values continues forever; the first zero returns its numeral. Under normal-order beta reduction, both failure cases have no head normal form. Structural induction on partial-recursive declarations now supplies the stronger representation claimed above.
Conversely, beta reduction is an effective operation on finitely encoded lambda terms. Enumerate all finite reduction sequences from , stopping when a result is a Church numeral in beta-normal form. If , the Church-Rosser theorem gives a reduction to that numeral. It also makes the output unique. The enumeration therefore computes exactly the represented partial function; by the equivalence of the first two characterizations it is partial recursive. Hence
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 120 2 f Solution 2026-09-28
Suppose a fixed-point combinator were typable in the simply typed lambda calculus. By the Weak normalization theorem for simply typed lambda calculus, it would have a beta-normal form. For a fresh variable , the term would then also possess a beta-normal form, say .
The fixed-point property givesReducing the occurrence of on the right to gives the normal form . The Church-Rosser theorem says that these beta-equivalent terms must have alpha-equivalent normal forms. This is impossible because contains more symbols than . Hence no typing context and simple type can type .
Past exam of the mathematics course of the University of Cambridge 2025 iii Paper 120 2 a Solution Created 2026-09-24 Updated 2026-09-25
The Church-Rosser theorem states that if and , then there is a term with and . Equivalently, beta reduction is confluent.
Past exam of the mathematics course of the University of Cambridge 2025 iii Paper 120 2 d Solution Created 2026-09-24 Updated 2026-10-03
No. Let and setBoth terms send every Church numeral to , so both define the constant-zero function. They are distinct beta-normal forms, however, and the Church-Rosser theorem implies that distinct beta-normal forms cannot be beta-equivalent.
Turing fixed-point combinator 2026-10-14
Put and . Then . Unlike the Curry fixed-point combinator, every finite reduct retains a closed subterm . Contracting this subterm recreates one; every other generated redex substitutes a variable and preserves it. The Church-Rosser theorem therefore proves .