Lectures onType Theory
Chapter 92
Chapter 92Optional

Logic-Enriched Type Theory and Predicative Mathematics

Prerequisites. Direct starred prerequisites: none. No later core chapter depends on this route.

The assertion that a natural number is even needs no computational payload in order to define the set of even numbers. Under propositions-as-types, however, the assertion and its proofs inhabit the same typed term language as the number. Classical double-negation elimination then becomes a data constructor with no reduction rule. A predicative development has a second reason to resist this identification: a set may be defined by quantifying over numbers without thereby permitting quantification over the totality of all sets.

Write Even(n):=k:N. n=k+k. The expression Even(n) below is a proposition, not a type, and a derivation of it is not a term stored beside n. This separation is the operation performed by a logic-enriched type theory: its logical judgments may depend on typed terms, while its term judgments do not acquire proof objects merely because the logic is classical.

The four judgments

Convention 92.1 — The frozen predicative LTT

The system LTT0 used in this chapter is the Adams–Luo subsystem corresponding to ACA0. Its type component contains natural numbers, products, functions, a Tarski universe U of small types, and Set(A). The codes in U are generated by N^ and binary product; function and set types have no codes. Natural-number recursion may return only a decoded small type.

There are four principal judgments: ΓA type,Γt:A,ΓPProp,Γ;ΔP. Here Γ contains typed term variables and Δ is a finite list of propositions. The last judgment records derivability in classical predicate logic. A proof is a derivation of that judgment; the object syntax contains no proof variable and no proof term. Small propositions additionally have codes pprop with decoding V(p)Prop.

The stronger system LTT0 differs only by allowing induction on analytic propositions: their quantifiers range over decoded small types or Set(N). The unrestricted Weyl system LTTW allows elimination into every type and induction on every proposition. No theorem below transfers that unrestricted strength to LTT0.

The context split has a visible consequence. If h:Even(n) were a term variable, then Γ,h:Even(n) would be a term context, which is ill formed because Even(n) is not a type. The correct hypothesis is Even(n)Δ.

Definition 92.2 — Arithmetic and small propositions

The proposition grammar needed here is P,Q::=s=atsaXPQx:A.P. The annotation a:U satisfies AT(a). A proposition is small when every quantified type is decoded from a code in U. The small-proposition codes are generated in the same order: ^,s=^at,s^aX,p^q,^x:a.p. Their decoding equations are judgmental; for example, V(^x:a.p)x:T(a).V(p).

The logical formation rules are stated before their proof rules. The omitted well-formedness premises are restored where a dependency matters.

Γvalid
ΓProp
LTT–F
ΓPPropΓQProp
ΓPQProp
LTT–F
ΓA typeΓ,x:APProp
Γx:A.PProp
LTT–F
Γa:UΓt:T(a)ΓX:Set(T(a))
ΓtaXProp
LTT–F

Classical entailment is generated by the following introduction, elimination, and classical rules together with structural exchange, weakening, and contraction on Δ.

PΔ
Γ;ΔP
LTT-Hyp
Γ;Δ,PQ
Γ;ΔPQ
LTT–I
Γ;ΔPQΓ;ΔP
Γ;ΔQ
LTT–E
Γ,x:A;ΔPxFV(Δ)
Γ;Δx:A.P
LTT–I
Γ;Δx:A.PΓt:A
Γ;ΔP[t/x]
LTT–E
Γ;Δ,P
Γ;ΔP
LTT-Classical

For example, let P be well formed. The derivation

PΔ,P
Γ;Δ,PP
LTT-Hyp
Γ;ΔPP
LTT–I

has no corresponding term λp.p in the type language. Its absence is not proof irrelevance; there are simply no proof terms to compare.

Exercise 92.1

★☆☆ Derive Γ;Δ((P))P. Name the unique application of LTT-Classical. Explain why the result adds no closed term to any type A.

Predicative sets

The type component may depend on a name of a small proposition. This is the one controlled passage from logic to data.

Definition 92.3 — Small comprehension

For a:U, the formation, introduction, elimination, computation, and extensional uniqueness rules for sets are

Γa:U
ΓSet(T(a)) type
LTT-Set-F
Γa:UΓ,x:T(a)pprop
Γ{x:T(a)p}:Set(T(a))
LTT-Set-I
ΓX:Set(T(a))Γt:T(a)
ΓtaXProp
LTT-Set-E
Γ,x:T(a)ppropΓt:T(a)
Γ;(ta{x:T(a)p})V(p[t/x])
LTT-Set-β
ΓX:Set(T(a))ΓY:Set(T(a))Γ;x:T(a).(xaXxaY)
ΓXY:Set(T(a))
LTT-Set-η

Here PQ abbreviates (PQ)(QP) in the classical logic. Rule LTT-Set-I permits quantification in p only over coded small types. A quantifier over Set(N) is therefore forbidden inside a set comprehension even though it is permitted in an ordinary proposition.

Let Even^(n) be a code for k:N. n=k+k. The set E:={n:NEven^(n)} is well formed. At 6, membership computes by LTT-Set-β to k:N.6=k+k, and the witness 3 proves that proposition. At 5, classical arithmetic proves its negation. Neither proof changes the runtime representation of E; E is a characteristic specification, not a list containing certificates.

The tempting set {n:NX:Set(N). nXnX} is rejected. Its predicate is analytic but not small. Analyticity is enough for induction in LTT0, not for comprehension in either predicative subsystem.

Exercise 92.2

★★☆ Classify each proposition as small, analytic but not small, or neither: n:N.n=n,X:Set(N).0X0X,F:Set2(N).. For each class, state whether it may occur in comprehension, in LTT0 induction, and in LTT0 induction.

Recursion and induction have different ranges

Natural-number recursion constructs terms; induction derives propositions. Conflating the two would erase the architectural distinction.

Definition 92.4 — Predicative recursion and induction

Let b:NU be a family of codes and let B(n):=T(bn). The recursion and induction rules are

Γn:NΓz:B(0)Γ,k:N,r:B(k)s:B(k+1)
ΓrecB(n;z;k,r.s):B(n)
LTT-Nat-rec
recB(0;z;k,r.s)z
LTT-Nat-rec-0
recB(n+1;z;k,r.s)s[n/k][recB(n;z;k,r.s)/r]
LTT-Nat-rec-S
Γ,n:Np(n)propΓ;ΔV(p(0))Γ,n:N;Δ,V(p(n))V(p(n+1))Γm:N
Γ;ΔV(p(m))
LTT-Nat-Ind_0

The two computation rules are judgmental equations for terms. Induction has no proof term and hence no proof-level computation rule.

Define double(n) by recursion with z=0 and s(k,r)=r+2. Its first three reductions are double(2)LTTNatrecSdouble(1)+2LTTNatrecSdouble(0)+2+2LTTNatrec04. The derivation that double(n) is even is instead an instance of LTT-Nat-Ind0. Its step uses the arithmetic implication Even(r)Even(r+2); no certificate appears in the recursive output.

The exact conservativity calculation

Write t for the translation of a second-order arithmetic term into a term of N, and P for the translation of a formula into an LTT proposition. The decisive clauses are nX:=nN^X,n.P:=n:N.P,X.P:=X:Set(N).P,PQ:=PQ. An arithmetical formula also has a small code |P| satisfying V(|P|)P. This equation is what converts the arithmetical comprehension axiom into LTT-Set-I.

Theorem 92.5 — Displayed conservativity pair

Let P be a formula of second-order arithmetic with free number variables n¯ and free set variables X¯.

  1. If ACA0P, then n¯:N,X¯:Set(N);P in LTT0.

  2. If that LTT entailment is derivable, then ACA0P.

Replacing unrestricted formula induction on the arithmetic side by ACA and analytic induction on the LTT side gives the corresponding two implications for LTT0.

Proof of Theorem 92.5 — Displayed conservativity pair

Proof. For the first implication, translate an ACA0 derivation rule by rule. Logical rules map to the rules above. An arithmetical comprehension instance X.n.(nXP(n)) maps to the set {n:N|P(n)|}; rule LTT-Set-β supplies the translated biconditional. Set induction maps to LTT-Nat-Ind0 because its predicate has a small code.

The reverse implication is the imported half. Adams and Luo first define the satisfaction relation for the exact bounded signatures Bn in Definitions 5.30 and 5.31, prove its soundness and completeness in Theorems 5.32 and 5.33, and derive Corollary 5.33.1: J a Bn judgment,Bn+1JBnJ. Corollaries 5.33.2 and 5.33.3 then compose the exact chain LTT0TωUTωT2ACA0. In the notation of this theorem, Corollary 5.33.3 has precisely the signature n¯:N,X¯:Set(N);PACA0P. We import that corollary, including its satisfaction definitions and the well-formedness hypotheses on the displayed contexts, from pages 35–36 of the primary source. For the analytic system we import Theorem 6.1 and the three transferred corollaries listed immediately after it on page 37; they replace T2,Tω,TωU,LTT0 by their starred signatures and conclude conservativity over ACA. This import widens induction, not comprehension [AL10a]. ◻

Dropping the smallness premise from comprehension destroys the displayed argument: the characteristic predicate can quantify over the very collection of sets being encoded, so depth lowering no longer produces an arithmetical membership formula. The theorem makes no conservativity claim for that impredicative extension or for LTTW.

Exercise 92.3

★★☆ Translate the ACA0 instance X.n.(nXk.n=kk) into LTT0. Give the set term and derive both directions of the membership biconditional from LTT-Set-β.

One predicative analysis construction

A bounded increasing rational sequence q:NQ determines a lower cut without quantifying over sets: Lq:={r:Qn:N. r<q(n)^}. The predicate is small because its only quantifier ranges over N. If rLq and s<r, choose n with r<q(n); transitivity gives s<q(n) and hence sLq. If rLq, choose n with r<q(n) and then a rational t with r<t<q(n); thus tLq. These two calculations prove downward closure and roundedness. The construction does not form the set of all upper bounds of an arbitrary set of reals; that tempting neighbor quantifies over a large set type and lies outside small comprehension.

Five architectures, five answers

System propositions are types proofs are terms classical rule here
LTT0 no no LTT-Classical
propositions-as-types MLTT yes yes not derivable in the base
CIC Prop yes, in a sort yes an added axiom
HOL Boolean-valued terms theorem derivations classical kernel logic
Nuprl meaning theory types are PERs programs realize judgments source-dependent

The rows do not define translations. In particular, the conservative translation above does not transport an arbitrary theorem from HOL, CIC, or Nuprl into LTT0.

The recovered Plastic distribution accepts the historical chain weyl.lf -> set.lf -> nat.lf and the pluralist chain construct.lf -> example1.lf. This is preservation evidence for those scripts under the 2010–2011 i386 checker. The Weyl formalization index marks later results that remain axioms, and the replay neither audits the historical kernel nor reproves theorem 92.5.

Suggested first pass.

Begin with exercise 92.4, then complete exercise 92.6.

Exercise 92.4

★★☆ For the proposition X:Set(N).n:N.nX, write its translation to the type-free second-order language. Then explain why the translation does not make the proposition small. Identify the exact quantifier that prevents its use in comprehension.

Exercise 92.5

★★★ Reconstruct the comprehension and induction cases of the first implication in theorem 92.5. For the imported reverse implication, write the exact four-stage chain from LTT0 to ACA0, identify the satisfaction soundness/completeness result that lowers Bn+1 to Bn, and state why this semantic import supplies no effective proof translator.

Exercise 92.6

★★★ Practical project.ltt-predicativity-classifier Implement in Kappa a classifier for proposition syntax with quantifiers over N, Set(N), and Set(Set(N)). Maintain the invariant that small implies analytic. The program must print, for each named input, whether comprehension, LTT0 induction, and LTT0 induction are permitted. It must accept number-only quantification for all three operations, reject a set-of-naturals quantifier for comprehension and LTT0 induction while accepting it for LTT0 induction, and reject a set-of-sets quantifier for all three. Mutating the comprehension check to use analyticity must make the acceptance test fail.

Sources. The exact calculi, translations, and depth-lowering conservativity proof are from Adams and Luo’s classical predicative LTT development [AL10a]. The Weyl case study supplies the rational and set constructions and the historical Plastic chain. The pluralist development supplies the distinct script-reuse example under a displayed translation [AL11, AL10b]. These artifact replays establish acceptance of frozen scripts, not conservativity or modern kernel correctness.

Search the book

Type to search the local edition.