Lambda Calculus and the Curry–Howard Correspondence

How substitution became a theory of computation, and how typed terms came to represent proofs with computational behavior.

Modern logic · Part 15Historical questions · mathematical ideas

When does a computation represent a proof, and what does normalization establish?

Construct a typed proof term and separate type preservation, termination, canonical forms, and unrestricted recursion.

Selected landmarksSeries timeline ↗

Combinators express combinations of functions without bound variables; Curry subsequently develops the subject.

Source: Propositions as Types

A proof of an implication explains how to obtain its conclusion from its hypothesis. A function explains how to obtain an output from an input. Making this resemblance precise required a language of functions, a discipline of types, and a detailed analysis of proof rules.

The result is usually called the Curry–Howard correspondence. It is a family of exact relationships between particular calculi. Understanding one small correspondence is more informative than memorizing a table of slogans.

William A. Howard at Carnegie Mellon University in May 2004
William A. Howard (1926–2026) Constructive derivations and typed terms.
Sources and credit for William A. Howard

Andrej Bauer, 22 May 2004, CC BY-SA 2.5 Slovenia, via Wikimedia Commons Image source · CC BY-SA 2.5 si · Biographical dates

Functions without unnecessary notation

Moses Schönfinkel's 1924 paper developed combinators: operations designed to express combinations of functions without bound variables. Haskell Curry extended combinatory logic and investigated its connections with logic.

Alonzo Church developed lambda calculus in the early 1930s, initially within a larger foundational project. Inconsistency results affected that original logical system, while lambda calculus continued as a mathematical account of functions and computation.

The distinction between the logical project and the calculus matters. Kleene and Rosser's 1935 paradox concerned Church's proposed foundational system; it did not show that the bare reduction calculus proves every mathematical proposition. The subsequent histories of untyped computation and typed logical foundations followed related but different paths.

Schönfinkel's combinators make the earlier contribution concrete. The two basic patterns

K a b⟶a,S f g x⟶f x (g x)K\,a\,b\longrightarrow a, \qquad S\,f\,g\,x\longrightarrow f\,x\,(g\,x)

capture constant functions and distribution of one argument to two uses. The identity is expressible as S K KS\,K\,K: applied to xx, it reduces to K x (K x)K\,x\,(K\,x) and then to xx. Variable abstraction can be translated systematically into combinators. Their point was not simply a different notation for a few functions: they showed how binding could be replaced by a finite stock of operations with explicit reduction laws.

Graduation portrait of Alonzo Church
Alonzo Church (1903–1995) Princeton graduation portrait, published in 1924.
Sources and credit for Alonzo Church

Photographer not identified. Nassau Herald, 1924, p. 101; Princeton University Library. Portrait extracted from the page; no retouching. Image source · Public domain (published before 1931) · Biographical dates

Photograph from around 1922; his death is generally dated to 1942. Portrait of Moses Schönfinkel
Moses Schönfinkel (1888–1942) Photograph from around 1922; his death is generally dated to 1942.
Sources and credit for Moses Schönfinkel

Open Logic. Via Wikimedia Commons. Image source · CC BY-SA 4.0 · Biographical dates

The untyped lambda calculus has three basic forms:

t::=x∣λx.t∣t u.t ::= x\mid\lambda x.t\mid t\,u.

A term is a variable, an abstraction, or an application. In λx.t\lambda x.t, the variable xx is bound in tt. Application associates to the left, so f a bf\,a\,b means (f a) b(f\,a)\,b.

The expression λx.x\lambda x.x represents the identity function. Applying it to uu gives

(λx.x) u⟶u.(\lambda x.x)\,u\longrightarrow u.

The general computation rule is beta reduction:

(λx.t) u⟶t[u/x].(\lambda x.t)\,u\longrightarrow t[u/x].

Substitution must avoid capturing free variables. For example, substituting yy for xx in λy.x\lambda y.x requires renaming the bound variable first. The result can be λz.y\lambda z.y; writing λy.y\lambda y.y would change the meaning.

Computation without guaranteed termination

Lambda terms can represent arithmetic and general effective computation. The computability note placed Church's results alongside recursive functions and Turing machines.

This expressive power includes divergence. Let

Ω=(λx.x x)(λx.x x).\Omega=(\lambda x.x\,x)(\lambda x.x\,x).

A beta step returns exactly the same term. There is no normal form.

The Church–Rosser theorem establishes confluence of beta reduction: if a term reduces along two finite paths, the resulting terms have a common reduct. Consequently, a normal form, when it exists, is unique up to the usual renaming of bound variables.

Confluence does not say that every term terminates. It does not even say that every reduction strategy reaches a normal form whenever one exists. An evaluator can spend forever reducing Ω\Omega inside an argument that another evaluation strategy would discard.

These distinctions become central when a calculus is used both to execute programs and to represent proofs.

Adding simple types

In the simply typed lambda calculus, types can be built from atomic types using the function constructor A→BA\to B.

A context records variable assumptions, such as x:A,y:Bx:A,y:B. The judgment

Γ⊢t:A\Gamma\vdash t:A

says that tt has type AA under the assumptions in Γ\Gamma.

Two rules expose the connection with implication:

Γ,x:A⊢t:BΓ⊢λx.t:A→B,Γ⊢f:A→BΓ⊢u:AΓ⊢f u:B.\frac{\Gamma,x:A\vdash t:B} {\Gamma\vdash\lambda x.t:A\to B}, \qquad \frac{\Gamma\vdash f:A\to B\quad\Gamma\vdash u:A} {\Gamma\vdash f\,u:B}.

Abstraction discharges an input assumption. Application uses a function together with a suitable input.

Church's 1940 simple type theory belongs to this history, although its full logical setting includes choices different from the purely intuitionistic correspondence developed below. “Typed” does not by itself determine whether a logic is classical or constructive.

Simple types also explain why the divergent self-application above is excluded. To type x xx\,x, suppose xx has type AA. As the function in the application it must also have a type A→BA\to B. The equation A=A→BA=A\to B has no solution among finite simple types. A calculus with recursive types would have different formation rules and would need its own analysis; the conclusion is about the specified simply typed calculus.

Type preservation and termination must be kept distinct. Subject reduction says that if Γ⊢t:A\Gamma\vdash t:A and t→βut\to_\beta u, then Γ⊢u:A\Gamma\vdash u:A. Its central lemma is typed substitution: replacing a variable of type BB with a term of type BB preserves the surrounding judgment. Weak normalization says that some reduction sequence reaches a normal form; strong normalization excludes every infinite reduction sequence. A system may preserve types during every step while allowing an infinite sequence of well-typed steps. Type preservation alone is therefore not a consistency proof.

Constructing a proof and a term together

Consider the proposition

A→(B→A).A\to(B\to A).

Assume AA. Under that assumption, also assume BB. The original assumption already supplies AA. Discharge the assumption BB to obtain B→AB\to A, then discharge AA to obtain the whole proposition.

Attach names to the assumptions. Let x:Ax:A and y:By:B. The proof of AA is represented by xx. Discharging yy creates λy.x\lambda y.x, and discharging xx creates

k=λx:A.λy:B.x.k=\lambda x:A.\lambda y:B.x.

The type of kk is A→(B→A)A\to(B\to A).

Now give it a term a:Aa:A and a term b:Bb:B, choosing the bound variable yy fresh for aa so that substitution does not capture a free variable:

((λx.λy.x) a) b⟶(λy.a) b⟶a.((\lambda x.\lambda y.x)\,a)\,b \longrightarrow(\lambda y.a)\,b \longrightarrow a.

On the proof side, introducing an implication and then immediately eliminating it creates a detour. Removing that detour substitutes the supplied proof for the discharged assumption.

Beta reduction is therefore the computational counterpart of this proof normalization step. The correspondence concerns the internal structure and transformation of derivations, not just a resemblance between the words “proof” and “program.”

The example also depends on permitting an unused assumption BB. In a strictly linear fragment, that use of weakening would need justification, connecting this note with the preceding discussion of structural rules.

For a less degenerate example, compose two implications. From f:A→Bf:A\to B, g:B→Cg:B\to C, and x:Ax:A, implication elimination yields f x:Bf\,x:B and then g(f x):Cg(f\,x):C. Discharging assumptions gives

λf.λg.λx.g(f x):(A→B)→(B→C)→A→C.\lambda f.\lambda g.\lambda x.g(f\,x) : (A\to B)\to(B\to C)\to A\to C.

The term records the dependency of the proof: the conclusion uses the result of the first inference as the input to the second. A type checker can reconstruct this dependency without deciding the truth of arbitrary propositions AA, BB, and CC. Its task is to verify that each construction obeys the rules under the stated assumptions.

From Curry's observation to Howard's formulation

Curry had recognized relationships between types of combinators and implicational logic. William Howard's 1969 manuscript, published in 1980 as “The Formulae-as-Types Notion of Construction,” developed the connection with natural deduction and constructive arithmetic.

Graduation portrait of Haskell Curry
Haskell Curry (1900–1982) Harvard graduation portrait, published in 1920.
Sources and credit for Haskell Curry

Photographer not identified. Harvard Class Album, 1920, p. 173; Allen County Public Library via Internet Archive. Portrait extracted from the page; no retouching. Image source · Public domain (published before 1931) · Biographical dates

Related ideas appeared in work by de Bruijn on Automath and by Martin-Löf on constructive type theory. The modern name joins some of these threads without exhausting their history.

Wadler's historical presentation is useful for tracing the contributions and explaining why several discoveries and rediscoveries belong to the account.

Extending the correspondence

For an appropriate intuitionistic calculus, the connection extends beyond implication.

Logical constructionType constructionProof or term behavior
A→BA\to BFunction typeTransform an input of type AA into an output of type BB
A∧BA\land BProduct typeSupply a pair and project either component
A∨BA\lor BSum typeSupply a tagged alternative and analyze both cases
TruthUnit typeSupply its canonical inhabitant
FalsehoodEmpty typeEliminate an impossible inhabitant

For conjunction, a pair ⟨a,b⟩\langle a,b\rangle represents the combined proof. Projecting its first component reduces to aa, matching the elimination of a conjunction-introduction detour.

For disjunction, a tag records which alternative has been supplied. Eliminating it requires a construction for each case. The tag is part of the evidence; an unstructured claim that one of two propositions holds does not yet explain the elimination rule.

Dependent products and sums extend the account to quantifiers. Their additional structure belongs in the next note.

Functions and products provide enough structure to inspect the correspondence directly. The lab checks each typed reduction against its original judgment; its separate untyped examples prepare the question of termination that follows.

Interactive lab · Proofs, types, and computation

Check a term, then watch its proof normalize

Reduce a term one step at a time. Inspect the corresponding proof and the judgment preserved by each typed step.

Before you check: How many β steps are needed to reach a?

Simply typed lambda calculus

Edit the term and its assumptions
Assumptions and target
Syntax and rules

Write fun x: A => x for an abstraction, f(a) for application, pair(a, b) for pairing, and fst(h) or snd(h) for projections. Write A -> B for a function type and A * B for a product. Parentheses make grouping explicit.

Atomic types begin with an uppercase letter; term variables begin with a lowercase letter. Untyped functions may omit their type annotation. Each reduction uses capture-avoiding substitution. Bound assumptions are renamed when needed to give the displayed proof distinct discharge labels.

In the weak call-by-value mode, variables and functions are values, as are pairs of values. Applying a free variable to a value is stuck; stopping there does not mean the whole term is a value or a full normal form.

Ready to inspect a term

Check the starting term to obtain its type and proof tree.

Hint

The first application substitutes a for x. The second substitutes b for y, but y is not used in the body.

Try a variation

Step through the reductions and inspect the proof tree before and after. Its final judgment is preserved.

Scope and notation

Scope: simply typed lambda calculus with atomic types, functions, and products. Typed normal-order reduction includes reductions inside abstractions. Untyped mode makes no proof claim; call-by-value is weak and does not reduce inside a function body until application. Runs are bounded to 100 steps and 1,500 term nodes. A bound does not establish divergence.

Why an arbitrary program is not a proof

The simply typed lambda calculus, with its standard rules and without unrestricted recursion, is strongly normalizing: every reduction sequence terminates.

Why is that theorem nontrivial? Substitution can make terms larger and can duplicate reducible subterms, so term length does not decrease at every beta step. Reducibility methods, associated with Tait and developed further by Girard, use the type to define a stronger invariant. At an atomic type one requires strong normalization; at a function type one additionally requires that applying the term to a reducible input produces a reducible output. A fundamental induction on typing derivations shows that replacing free variables by reducible terms yields a reducible term. This invariant gives the termination conclusion that a naive size argument cannot supply. Proofs and Types, by Girard with Lafont and Taylor, develops the proof and its extensions.

This matters logically. Under the intended empty-type interpretation, a closed term of the empty type would represent a proof of falsehood. A sound normalization argument helps exclude such a term by analyzing possible normal forms.

Now add an unrestricted fixed-point operator at every type. A recursive definition can diverge while being assigned a type whose logical reading would be absurd. General-purpose type safety may ensure that a program does not perform certain invalid operations, while leaving termination unproved.

Thus a language can be well typed and still fail to support the direct interpretation “every program of this type is a terminating proof of this proposition.”

Effects, exceptions, control operators, and evaluation strategy introduce further distinctions. Some have sophisticated logical interpretations, including connections with classical logic, but each interpretation needs its own formal account.

A canonical-form argument adds another step beyond termination. In a closed normal proof term for a disjunction, the outer constructor identifies which disjunct has been proved; in the usual constructive arithmetic setting, a closed normal term of natural-number type is a numeral. These facts depend on the available constants and axioms. Adding a new axiom as an uninterpreted constant can preserve useful checking behavior while preventing every closed expression from computing to an ordinary data constructor.

Classical logic consequently does not fall outside every proof–program correspondence. Continuation-passing translations and control calculi give computational accounts of classical proofs by changing the term language and the interpretation. The historically important lesson is the specificity of the correspondence: its logic, type constructors, equality of terms, and operational rules must be stated together. Wadler's account follows these extensions while distinguishing them from the elementary intuitionistic case.

What the correspondence made possible

The correspondence gave proof checking a computational organization. A proposition could be represented by a type, a proof by a term, and a basic proof transformation by reduction.

It also gave programming languages a logical vocabulary for abstraction, composition, and specification. Those consequences developed along different paths: richer foundational type theories, categorical semantics, and executable functional languages.

We follow those paths separately so that the history does not jump directly from Church to a modern proof assistant without explaining the intervening mathematics.

Check your understanding: can a well-typed reduction still run forever?

Suppose a language preserves the type of every term after every evaluation step. Has it established that its programs can be treated as terminating proofs?

Reasoning. No. Type preservation constrains each step but gives no bound on how many steps occur. Adding a general fixed-point operator can produce divergent terms at types read as propositions. The direct constructive interpretation additionally needs appropriate normalization and canonical-form results, and an account of the constants or axioms admitted. The pure simply typed calculus has these properties; a general recursive programming language does not inherit them just by having types.

Sources and further reading

  • Moses Schönfinkel, “Über die Bausteine der mathematischen Logik” (1924).
  • Alonzo Church, “A Set of Postulates for the Foundation of Logic” (1932–1933); Church and J. Barkley Rosser, “Some Properties of Conversion” (1936).
  • Alonzo Church, “A Formulation of the Simple Theory of Types” (1940).
  • Haskell B. Curry and Robert Feys, Combinatory Logic, volume I (1958).
  • William A. Howard, “The Formulae-as-Types Notion of Construction,” manuscript of 1969, published in To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism (1980).
  • Philip Wadler, “Propositions as Types” (2015).
  • Jean-Yves Girard, Yves Lafont, and Paul Taylor, Proofs and Types (1989; corrected printing 1990), for subject reduction, reducibility, and typed calculi.