MathLabs
TheoremProved

Strong normalization for simply typed lambda calculus

Statement

If Γ⊢t:A\Gamma \vdash t : A in the simply typed lambda calculus, then tt is strongly normalizing: every sequence of β\beta-reductions starting from tt terminates after finitely many steps.

Why is it true?

This is why simply typed lambda calculus, despite having function application and recursion-like nesting, is not Turing-complete — no well-typed term can loop forever, which is exactly what makes type-checkers in this fragment always terminate.

Proof sketch

(Tait's reducibility method.) Define, by induction on the structure of types, a set REDA\mathrm{RED}_A of "reducible terms" for every type AA: for a base type oo, let REDo\mathrm{RED}_o be the set SNSN of all strongly normalizing terms; for a function type, let REDA→B={t:for every u∈REDA, t u∈REDB}\mathrm{RED}_{A\to B} = \{t : \text{for every } u \in \mathrm{RED}_A,\ t\,u \in \mathrm{RED}_B\}.

One first proves, by induction on AA, three technical properties together: (CR1) every term in REDA\mathrm{RED}_A is strongly normalizing; (CR2) REDA\mathrm{RED}_A is closed under β\beta-reduction (if t∈REDAt\in\mathrm{RED}_A and t→t′t\to t' then t′∈REDAt'\in\mathrm{RED}_A); (CR3) any "neutral" term (a variable or application, not an abstraction) all of whose one-step reducts already lie in REDA\mathrm{RED}_A must itself lie in REDA\mathrm{RED}_A. The base case is immediate from the definition of SNSN; the function-type case unfolds the definition of REDA→B\mathrm{RED}_{A\to B} and uses the induction hypothesis on the smaller types AA and BB.

Next, one shows every well-typed term is reducible under any substitution of reducible terms for its free variables: by induction on the typing derivation of Γ⊢t:A\Gamma \vdash t:A, if σ\sigma assigns each variable xx in Γ\Gamma a term σ(x)∈REDΓ(x)\sigma(x)\in\mathrm{RED}_{\Gamma(x)}, then tσ∈REDAt\sigma \in \mathrm{RED}_A. The variable case is immediate. The application case follows directly from the definition of REDA→B\mathrm{RED}_{A\to B}. The abstraction case needs the most care: for (λx. t)σ(\lambda x.\,t)\sigma applied to any u∈REDAu\in\mathrm{RED}_A, the term reduces in one β\beta-step to t(σ,x:=u)t(\sigma,x{:=}u), which is in REDB\mathrm{RED}_B by the induction hypothesis (applied to the extended substitution); property (CR3) — closure under "expansion" for terms whose reducts are all already reducible — then places (λx. t)σ u(\lambda x.\,t)\sigma\,u itself in REDB\mathrm{RED}_B, so (λx. t)σ∈REDA→B(\lambda x.\,t)\sigma \in \mathrm{RED}_{A\to B} by definition.

Finally, apply this to the identity substitution: every variable x:Ax{:}A is itself neutral with no reducts at all, so it is vacuously in REDA\mathrm{RED}_A by (CR3). So for any closed derivation Γ⊢t:A\Gamma \vdash t:A, taking σ\sigma to map each xx to itself gives t=tσ∈REDAt = t\sigma \in \mathrm{RED}_A. By (CR1), REDA⊆SN\mathrm{RED}_A \subseteq SN, so t∈SNt \in SN: every well-typed term is strongly normalizing. ■\blacksquare

Topics that use this theorem

Step-by-step proofs

No step-by-step proof yet for this theorem.

References

  1. The Univalent Foundations Program (2013). Homotopy Type Theory: Univalent Foundations of Mathematics
  2. Wikipedia contributors (2024). Curry–Howard correspondence
  3. Wikipedia contributors (2024). Intuitionistic type theory