Church Numerals
Advanced Logic Arithmetic
λ-calculus has no numbers. So Church invented them — and the trick is one of the loveliest ideas in mathematics: a number is how many times you do something.
Counting as applying
Read λf.λx.… as "give me a way to step (f) and a
place to start (x)." The numeral n is the machine that steps
n times. This is called a Church numeral.
Successor: add one application
Watch SUCC 1 become 2 — four β-steps, one at a time:
Addition and multiplication
The catch
Church numerals add and multiply beautifully. Subtraction is famously
painful — PRED exists but took the field years to find.
It needs pairs, which are the next page's business.
λf.λx.f (f (f x)) encodes which number? ___
ZERO = λf.λx.x — applying ZERO g v gives…
Write the Church numeral for 2: ___
SUCC n adds one by…
Next: booleans & pairs · Back: beta reduction