Past exam of the mathematics course of the University of Cambridge 2021 iii Paper 120 3 Solution 2026-09-28
A partial function is lambda-definable when a lambda term sends the corresponding Church numerals to the numeral for whenever the value is defined and produces no numeral otherwise; in other words, it is a lambda-definable partial function. The initial functions are represented byand the appropriate variable in . If represent , thenrepresents their composition.
Church Booleans supply a lazy conditional, andtests whether a Church numeral is zero. A standard predecessor term isLet and represent the base and step functions of a primitive recursion. With a fixed-point combinator , defineNormal-order beta reduction evaluates only the selected branch. Induction on the input numeral gives the two recursion equations, so this is the lambda definition of primitive recursion.
For unbounded minimization, let represent and defineThen tests in order and returns the least zero of . If no zero is reached, or a required earlier computation is undefined, reduction never produces a Church numeral. This is the lambda definition of unbounded minimization. Since the partial recursive functions are generated from the initial functions by composition, primitive recursion, and minimization, every partial computable function is represented by a lambda term on Church numerals.