Concepts for Maths Lambda Calculus
The exam references specific standard combinators[cite: 15, 16, 17, 18]. Think of these as reusable function patterns.
λx.xλxy.xλxyz.xz(yz)λx.xxI = lambda x: x K = lambda x: lambda y: x S = lambda x: lambda y: lambda z: x(z)(y(z)) B = lambda x: x(x)
These are the "computation" rules of the system.
λx.x is the same as λy.y).# Beta Reduction Example: (λx.x) y => y
print(I("y")) # Output: y
The exam defines the "size" of a term [cite: 21-24]. This is critical for Question 1(c) and 2(c).
|v| = 1 (Variables)|PQ| = |P| + |Q| (Applications)|λv.P| = 1 + |P| (Abstractions)Example: |λx.x| = 1 + |x| = 1 + 1 = 2. [cite: 25]
A term is in Normal Form when it cannot be reduced further[cite: 39].
Python Warning: Some terms (like the Y-Combinator or Omega (λx.xx)(λx.xx)) cause infinite loops (RecursionError).
Question 2(g) asks for De Bruijn indices[cite: 66]. This is a way to represent lambda terms without using variable names, using numbers to point to the "binder" (the λ).
λx.λy.x becomes λλ2 (the 2 points to the second λ out).