Chapter 14
Properties of the System
So far we have claimed that the kernel's algorithm terminates and that it never accepts a proof of False. Both claims rely on theorems about the type system, whose proofs are much harder than the kernel's own computations. This chapter states those theorems, explains why each matters, and sketches how they establish consistency; Appendix D gives the full proof.
The core system
The theorems below concern the core system: the rules of Figure 3.1, with the universes of Chapter 13 and without the constants of Part II. This is a Pure Type System in the sense of Barendregt: the Calculus of Constructions [Coquand 1988] with a hierarchy of predicative universes above its impredicative , close to Luo's Extended Calculus of Constructions [Luo 1990]. The first three properties hold for every functional Pure Type System [Barendregt 1992]. Strong normalization is much harder in the presence of impredicativity and needs Girard's method of reducibility candidates [Girard 1972; Coquand 1988; Luo 1990]. The end of the chapter says what changes with inductive types.
Four properties
Theorem 14.1 (Uniqueness of types). If and , then .
A term has, up to conversion, one type. depends on this: there is a single answer for it to compute, and can compare against it without worrying that some other derivation would have produced a different, non-convertible type.
Theorem 14.2 (Type correctness). If , then either for some , or for some .
The type of a well-typed term is itself a type (or is a universe, which has a type by T-Sort but need not be written as one). So the result of can always be fed back into , and contexts built by the algorithm stay well formed.
Theorem 14.3 (Subject reduction). If and , then .
Computation preserves types. This is what justifies T-Conv and the whole strategy of deciding equality by normalization: reducing a term never takes it out of its type, so comparing normal forms compares the right things.
Theorem 14.4 (Strong normalization). If , then every sequence of beta-reductions starting from is finite.
Every well-typed term reaches a normal form, whatever order reductions are performed in. This is the deep one. , , and therefore and terminate on well-typed input because of it, and the next section shows that consistency rests on it too.
The four properties support the two guarantees in a definite pattern, drawn below: the arrows read "is needed for".
Figure 14.1. How the metatheory fits together.
Together these give the two guarantees we want from a kernel.
- Decidability. Algorithm 5.1 terminates on every input, so whether a proof is correct can always be determined.
- Consistency. No closed term proves False.
Consistency
Theorem 14.5 (Consistency). There is no closed term with .
The argument has two halves, and their shape is visible without the details.
Reduce to normal forms. By strong normalization, such a term would have a normal form , and by subject reduction, would have the same type. So it suffices to show that no normal closed term has type . This step is where all the difficulty lies, because it uses Theorem 14.4.
Analyse normal forms. A normal term is a universe, a , a , or a variable applied to some arguments (a neutral term). A closed normal term whose type is a must be a : it cannot be neutral, since no variable is in scope, and universes and -types have a universe as their type, not a . So with and normal. Now ask what can be. A universe, a , or a would have a universe or a as its type, not the variable . A neutral term would have to start with a variable in scope, and the only one is itself, whose type is : it is not , so cannot be ; and it is not a function type, so cannot be applied to anything. Every case is impossible.
Appendix D carries this out carefully, including the standard facts about typing and conversion (generation, confluence, substitution) that the case analysis silently uses.
With inductive types
The iota-rules of Part II do not overlap with each other or with beta, so reduction remains confluent. Subject reduction, strong normalization, and consistency are known for the Calculus of Inductive Constructions [Werner 1994], of which our system with inductive types is a small fragment. The short consistency argument above no longer suffices by itself, because normal forms now include stuck recursor applications such as with a variable; consistency follows from strong normalization by a more careful analysis of normal forms, in which a neutral term may also be headed by a constant.
Each of the acceptance conditions of Chapter 8 corresponds to a way this analysis could fail: without positivity, iota-reduction can loop and strong normalization is lost; without the universe condition, a type could contain its own universe and the paradox of Chapter 13 returns; without the elimination restriction on propositions, proof irrelevance (which Lean assumes) would be refuted.
Lean's full theory, with definitional proof irrelevance, universe polymorphism, quotient types, and general nested and mutual inductive types, has subtler metatheory; Carneiro's thesis [Carneiro 2019] is the reference. The central structure, strong normalization plus an analysis of normal forms, is the same.
Exercises
Which of the four properties does a kernel with lose, according to Chapter 13?
Solution
Strong normalization (Hurkens' term has no normal form) and consistency (it has type ). Uniqueness of types and subject reduction still hold; they are properties of the rule shapes, not of the universe structure.
The consistency argument says a closed normal term of -type must be a . Why does this fail once constants are added, and what replaces it?
Solution
A constant such as or is closed and can head a normal term, so a closed normal term of -type may be, for instance, itself or a stuck recursor application. The analysis must then also consider neutral terms headed by constants and show, using the specific types the schema assigns to constructors and recursors, that none of them can inhabit . Werner's thesis does this for the Calculus of Inductive Constructions.
What to remember
- Uniqueness of types and type correctness make well defined; subject reduction justifies deciding equality by normalization; strong normalization makes everything terminate.
- Consistency follows from strong normalization plus a case analysis of normal forms: nothing in scope can prove an arbitrary .
- Inductive types preserve all four properties provided the acceptance conditions hold; each condition blocks a specific failure.
- The kernel assumes these theorems rather than proving them. Its job is to implement the system they are about, faithfully and legibly.