Lambda abstraction Created 2026-10-06 Updated 2026-10-14
A lambda abstraction binds the variable in the lambda term . In the simply typed lambda calculus, if under , the abstraction has type ; this is the implication introduction rule under the Curry-Howard correspondence.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 20 4 Solution Created 2026-10-03 Updated 2026-10-07
In the simply typed lambda calculus, types are generated from atomic types by the arrow constructor . A typed lambda term is a lambda term equipped with a derivation of a judgement , where the context assigns types to its free variables. The basic typing rules areThe Implicational Curry-Howard correspondence reads atomic types as propositions and as logical implication. A typed variable is an assumption, abstraction is the implication introduction rule discharging that assumption, and application is the implication elimination rule. Consequently a typed lambda term is a proof in implicational Intuitionistic propositional logic, and a natural deduction proof recursively supplies such a term. For example, expresses implication reflexivity. Products, sums, and the empty type extend the correspondence to conjunction, disjunction, and falsity; pure arrow types give precisely the implicational fragment. Beta reduction removes an introduction followed immediately by its elimination, matching proof simplification.
A Church numeral iswhere means repetitions of application. At base type , it has type . The following Church numeral arithmetic terms use left-associated application:Their concise conclusions areFor successor, the initial adds one application. For addition, the inner supplies applications and supplies more. For multiplication, the repeated operation applies times, and repetitions give . For exponentiation, iterates the operation on : each iteration replaces a function by its -fold iterate, yielding . Zero iterations give , so this encoding takes , including . The explicit outer abstractions make the result the standard Church numeral even at exponent zero, without needing eta equivalence.
Successor, addition, and multiplication operate on the same . The displayed exponentiation term has type : its exponent iterates an operation on functions. Thus the numeral syntax admits several type instances; one should not force every occurrence into one fixed monomorphic Church type.
The Y combinator is the fixed-point combinatorFor , beta reduction gives . Since , we obtain . This allows a recursive program body to receive a representation of itself.
Here the computation is in the untyped lambda calculus. The self-application would require a simple type satisfying , impossible for finite simple types. Accordingly is not a typed lambda term of the simply typed system. The Strong normalization theorem for simply typed lambda calculus also rules out a universal divergent fixed-point operator there.
To obtain a lambda representation of partial computable functions, encode machine configurations as finite data using Church numerals, Church pairs, and Church Booleans. Initial configuration, one transition, the halting test, and output extraction are primitive recursive functions, represented by lambda terms through the initial functions, composition, and lambda definition of primitive recursion by pair iteration. If these representations are , , , and , defineUse normal-order beta reduction so the Church Boolean halting test selects one branch without evaluating the unused recursive branch. A halting computation follows finitely many transitions and returns the Church numeral of the output. A nonhalting computation forces successive tests forever and has no head normal form; by normal-order normalization theorem, it cannot be beta equivalent to a Church numeral. Thus every partial computable function is represented, with divergence preserved; every total computable function is the halting special case. This explains the role of in computational universality while keeping the typed proof interpretation precise.
Past exam of the mathematics course of the University of Cambridge 2022 iii Paper 120 1 a Solution 2026-09-28
Under the Curry-Howard correspondence, Intuitionistic propositional logic propositions are types and proofs are typed terms. Assumptions correspond to typed variables. The logical implication corresponds to the function type, logical conjunction to the product type, logical disjunction to the sum type, logical truth to the unit type, and logical falsity to the empty type.
The rules of natural deduction become term constructors. Implication introduction sends a derivation of from a variable to the abstraction , while implication elimination becomes application . Pairing and projection implement conjunction, and injections with case analysis implement disjunction. Under this correspondence, normalization of proofs is computation by beta reduction in the simply typed lambda calculus.
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 120 2 d Solution 2026-09-28
The Weak normalization theorem for simply typed lambda calculus states that every well-typed term of the simply typed lambda calculus admits at least one finite sequence of beta reductions ending in a beta-normal form.
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 b Solution Created 2026-09-24 Updated 2026-09-25
The Weak normalization theorem for simply typed lambda calculus says that every term typable in the implicational simply typed lambda calculus has a beta-normal form. Define reducibility by induction on types: a term of atomic type is reducible when it is weakly normalizing, and is reducible when is reducible at for every reducible . Induction on types shows that every reducible term is weakly normalizing and that variables are reducible.
The fundamental substitution lemma is proved by induction on a typing derivation: if and each variable in is replaced by a reducible term of its declared type, then the resulting term is reducible at . The application case is the definition at arrow type; in the abstraction case, applying the abstraction to any reducible argument makes one beta step to the substituted body, which is reducible by induction. Substituting each free variable by itself makes every well-typed term reducible, hence weakly normalizing.