Skip to content

Lambda Calculus

Advanced Logic Computation

Most of mathematics describes things that exist — numbers, shapes, probabilities. The lambda calculus (λ-calculus) describes something different: computation itself. It is a tiny formal system invented by the logician Alonzo Church in the 1930s, and it is famous for a wild claim: with almost nothing in it, it can compute anything any computer can compute.

Everything is a function

Lambda calculus has exactly three kinds of expression:

x a variable — a name that stands for something λx.M a function — "takes x, gives back M" M N application — "feed N into M"

No numbers. No strings. No if. No loops. No names that stick around. Just variables, nameless functions, and feeding one to another — forever.

Read it aloud λx.M reads as "a function that takes x and gives M." So λx.x is "takes x, gives x" — the function that returns whatever you hand it. Mathematicians call it the identity function.

The one rule

Computation in λ-calculus is a single rewrite rule. When a function meets an argument —

(λx.M) N → M, with every x swapped for N

That's it. That rule is called β-reduction, and the entire field is what falls out of applying it over and over. Try it:

(λx.x) y → y identity just hands the argument back (λx.x) 7 → 7 works on anything — even things λ-calculus doesn't have

Why anyone cares

Fair warning λ-calculus is honest but austere. Adding two numbers means building numbers out of functions first. That is the point — by the last page of this track you will have built arithmetic, logic, and recursion from nothing but that one rewrite rule.

The road ahead

Practice

How many kinds of expression does λ-calculus have?

λx.x is…

Reduce: (λx.x) y → ___

The name of the single computation rule is…