Normalization in Intuitionistic Set Theories
Ulrik Buchholtz
Stanford
April 13, 2010
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 1 / 37
Outline
Outline
1 Introduction
2 Propositional logic
3 Set theory
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 2 / 37
Introduction
Introduction
We summarize the work by Wojciech Moczydłowski, primarily from his2007 PhD dissertation, Investigation on Sets and Types, supervised byRobert Constable and Richard Shore at Cornell.
The thesis was awarded the 2007 Sacks Prize by the ASL.
Any mistakes in the following are almost surely mine.
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 3 / 37
Propositional logic IPC
IPC
We warm up by studying intuitionistic propositional logic. Formulas:
ϕ ::= p | ⊥ | ϕ∧ϕ | ϕ∨ϕ | ϕ→ ϕ
Rules:
Γ ,ϕ ` ϕΓ ` ⊥Γ ` ϕ
Γ ,ϕ ` ψΓ ` ϕ→ ψ
Γ ` ϕ→ ψ Γ ` ϕΓ ` ψ
Γ ` ϕ Γ ` ψΓ ` ϕ∧ψ
Γ ` ϕ∧ψ
Γ ` ϕΓ ` ϕ∧ψ
Γ ` ψΓ ` ϕ
Γ ` ϕ∨ψΓ ` ψ
Γ ` ϕ∨ψ
Γ ` ϕ∨ψ Γ ,ϕ ` θ Γ ,ψ ` θΓ ` θ
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 4 / 37
Propositional logic The calculus
The λ→ calculus
Simply-typed lambda calculus, λ→. The types are IPC formulas. The (raw)terms are given by
M ::= x |MN | λx:ϕ,M | inl(M) | inr(M)
| caseM of(inl x:ϕ⇒ N1
inr y:ψ⇒ N2
)| 〈M,N〉 | fst(M) | snd(M) | magic(M)
These correspond exactly to the inference rules for IPC, and give notationsfor IPC proofs.
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 5 / 37
Propositional logic Typing
Typing for λ→
Typing rules for terms of λ→ match the rules of IPC:
Γ , x:ϕ ` x:ϕΓ `M:⊥
Γ ` magic(M):ϕ
Γ , x:ϕ `M:ψx 6∈ dom(Γ)
Γ ` (λx:ϕ,M):ϕ→ ψ
Γ `M:ϕ→ ψ Γ ` N:ϕ
Γ ` (MN):ψ
Γ `M:ϕ Γ ` N:ψ
Γ ` 〈M,N〉:ϕ∧ψ
Γ `M:ϕ∧ψ
Γ ` fst(M):ϕ
Γ `M:ϕ∧ψ
Γ ` snd(M):ψ
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 6 / 37
Propositional logic Typing
Typing for λ→, II
Typing rules for disjunction:
Γ `M:ϕΓ ` inl(M):ϕ∨ψ
Γ `M:ψ
Γ ` inr(M):ϕ∨ψ
Γ `M:ϕ∨ψ Γ , x:ϕ ` N1:θ Γ ,y:ψ ` N2:θ
Γ ` caseM of(inl x:ϕ⇒ N1
inr y:ψ⇒ N2
):θ
Note: If Γ `M:ϕ, then FV(M) ⊂ dom(Γ).
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 7 / 37
Propositional logic Reductions
Reduction for λ→
For our later application to set theory, it essential to use a deterministicreduction. Reduce terms to values:
V ::= λx:ϕ,M | inl(M) | inr(M) | 〈M,N〉
Non-values have a principal argument:In MN, M is the principal argument.
In caseM of(inl x:ϕ⇒ N1
inr y:ψ⇒ N2
), M is the principal argument.
In fst(M), snd(M) and magic(M), M is the principal argument.
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 8 / 37
Propositional logic Reductions
Reduction for λ→, II
A non-value whose principal argument is value may be reduced:
fst〈M,N〉 −→M
snd〈M,N〉 −→ N
(λx:ϕ,M)N −→M[N/x]
case inlM of(inl x:ϕ⇒ N1
inr y:ψ⇒ N2
)−→ N1[M/x]
case inrM of(inl x:ϕ⇒ N1
inr y:ψ⇒ N2
)−→ N2[M/x]
If the principal argument is a non-value, then that may be reduced (lazyevaluation).
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 9 / 37
Propositional logic Properties
Properties for λ→
Lemma (Correspondence)
If Γ ` O:ϕ, then rg(Γ) ` ϕ. If IPC+ Γ ` ϕ, then there is a term M of λ→
so that Γ ′ `M:ϕ.
Lemma (Inversion)
We can determine the final typing judgment in a proof by inspecting theproof term.
Lemma (Subject-reduction)
If Γ `M:ϕ and M −→ N, then Γ ` N:ϕ.
Lemma (Progress)
Non-values can always be reduced in an empty context.
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 10 / 37
Propositional logic Realizability
Realizability for λ→
The terms of the untyped calculus λ→ are obtained from λ→ by erasingthe types:
M ::= x |MN | λx,M | inl(M) | inr(M)
| caseM of(inl x⇒ N1
inr y⇒ N2
)| 〈M,N〉 | fst(M) | snd(M) | magic(M)
We can erase the types of λ→-terms to get λ→-terms.
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 11 / 37
Propositional logic Realizability
Realizability for λ→, II
We use untyped closed lambda-terms as realizers. This works because thereductions are type-oblivious. We define a realizability relation betweenrealizers and formulas:
M p iff M ↓M ⊥ iff ⊥
M ϕ∧ψ iff M ↓ 〈M1,M2〉∧ (M1 ϕ)∧ (M2 ψ)
M ϕ∨ψ iff (M ↓ inl(M1)∧M1 ϕ)
∨ (M ↓ inr(M2)∧M2 ψ)
M ϕ→ ψ iff (M ↓ λx,M1)∧ ∀N, (N ϕ)→ (M1[N/x] ψ)
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 12 / 37
Propositional logic Normalization
Normalization for λ→
A realizability environment ρ is partial function from proof variables torealizers. Write ρ � Γ if ρ(x) ψ for (x:ψ) ∈ Γ .
Theorem
If Γ `M:ϕ, then for all ρ � Γ , we have M[ρ] ϕ.
Corollaries:Normalization: If `M:ϕ, then M normalizes.IPC is consistent: There is no M with `M:⊥.The disjunction property for IPC: If ` ϕ∨ψ, then ` ϕ or ` ψ.
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 13 / 37
Set theory
Set theory
Moczydłowski studies Intuitionistic ZF with Replacement. Terms andformulas are defined by a mutual grammar:
t ::= a | ∅ | {t, t} | ω |⋃t | P(t)
| Sϕ(a,~f)(t,~t) | Rϕ(a,b,~f)(t,~t)
ϕ ::= ⊥ | t ∈ t | t = t | t ∈I t
| ϕ∨ϕ | ϕ∧ϕ | ϕ→ ϕ
| ∀a,ϕ | ∃a,ϕ
Here:
Sϕ(a,~f)(t,~t) ≡ { v ∈ t | ϕ(c,~t) }
Rϕ(a,b,~f)(t,~t) ≡ { c | (∀x ∈ t,∃!y,ϕ(x,y,~t))∧ (∃x ∈ t,ϕ(x, c,~t)) }
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 14 / 37
Set theory The axioms
Axioms of IZFR
(IN) a ∈ b↔ ∃c, c ∈I b∧ c = a
(EQ) a = b↔ ∀d, (d ∈I a→ d ∈ b)∧ (d ∈I b→ d ∈ a)(EMPTY) c ∈I ∅ ↔ ⊥(PAIR) c ∈I {a,b}↔ c = a∨ c = b
(INF) c ∈I ω↔ c = ∅∨ ∃b ∈ ω, c = S(b)
(SEPϕ(a,~f)) c ∈I Sϕ(a,~f)(a, ~f)↔ c ∈ a∧ϕ(c, ~f)
(UNION) c ∈I⋃a↔ ∃b ∈ a, c ∈ b
(POWER) c ∈I P(a)↔ ∀b ∈ c,b ∈ a
continues . . .
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 15 / 37
Set theory The axioms
Axioms of IZFR, II
continued:
(REPLϕ(a,b,~f)) c ∈I Rϕ(a,b,~f)(a, ~f)↔
(∀x ∈ a,∃!y,ϕ(x,y, ~f))∧ (∃x ∈ a,ϕ(x, c, ~f))(INDϕ(a,~f)) (∀a, (∀b ∈I a,ϕ(b, ~f))→ ϕ(a, ~f))
→ ∀a,ϕ(a, ~f)
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 16 / 37
Set theory The calculus
The λZ calculus
We use two sets of variables, proof- and set-variables.Terms:
M ::= x |M t |MN | λa,M | λx:ϕ,M
| inl(M) | inr(M) | caseM of(inl x:ϕ⇒ N1
inr y:ψ⇒ N2
)| 〈M,N〉 | fst(M) | snd(M) | magic(M)
| [t,M] | let [a, x:ϕ] :=M inN
continues . . .
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 17 / 37
Set theory The calculus
The λZ calculus, II
M ::= . . . | inProp(t,u,M) | inRep(t,u,M)
| eqProp(t,u,M) | eqRep(t,u,M)
| pairProp(t,u1,u2,M) | pairRep(t,u1,u2,M)
| unionProp(t,u,M) | unionRep(t,u,M)
| sepϕ(a,~f)Prop(t,u, ~u,M) | sepϕ(a,~f)Rep(t,u, ~u,M)
| powerProp(t,u,M) | powerRep(t,u,M)
| infProp(t,M) | infRep(t,M)
| replϕ(a,b,~f)Prop(t,u, ~u,M) | replϕ(a,b,~f)Rep(t,u, ~u,M)
| indϕ(a,~f)(M,~t)
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 18 / 37
Set theory The calculus
The λZ calculus, III
We’ll abbreviate the -Prop and -Rep-axioms as
axProp(t, ~u,M) | axRep(t, ~u,M),
where the length of ~u depends on the axiom.
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 19 / 37
Set theory Typing
Typing for the λZ calculus
Same rules as for IPC plus first-order rules:
Γ `M:ϕ a 6∈ FVs(Γ)Γ ` (λa,M):∀a,ϕ
Γ `M:∀a,ϕΓ `M t:ϕ[t/a]
Γ `M:ϕ[t/a]
Γ ` [t,M]:∃a,ϕ
Γ `M:∃a,ϕ Γ , x:ϕ ` N:ψa 6∈ FVs(Γ ,ψ)
Γ ` (let [a, x:ϕ] :=M inN):ψ
continues . . .
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 20 / 37
Set theory Typing
Typing for the λZ calculus, II
Plus rules for the axioms, first equality (EQ):
Γ `M:∀d, (d ∈I t→ d ∈ u)∧ (d ∈I u→ d ∈ t)Γ ` eqRep(t,u,M):t = u
Γ `M:t = uΓ ` eqProp(t,u,M):∀d, (d ∈I t→ d ∈ u)∧ (d ∈I u→ d ∈ t)
continues . . .
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 21 / 37
Set theory Typing
Typing for the λZ calculus, III
Then, membership (IN):
Γ `M:∃c, c ∈I u∧ t = c
Γ ` inRep(t,u,M):t ∈ u
Γ `M:t ∈ uΓ ` inProp(t,u,M):∃c, c ∈I u∧ t = c
continues . . .
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 22 / 37
Set theory Typing
Typing for the λZ calculus, IV
The other axioms all follow the same pattern:
Γ `M:ϕA(t, ~u)Γ ` axRep(t, ~u,M):t ∈I tA(~u)
Γ `M:t ∈I tA(~u)
Γ ` axProp(t, ~u,M):ϕA(t, ~u)
continues . . .
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 23 / 37
Set theory Typing
Typing for the λZ calculus, V
Except ∈I-induction (IND):
Γ `M:∀c, (∀b,b ∈I c→ ϕ(b,~t))→ ϕ(c,~t)
Γ ` indϕ(a,~f)(M,~t):∀a,ϕ(a,~t)
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 24 / 37
Set theory Reductions
Reduction for the λZ calculus
Same reductions as for IPC plus:
(λa,M) t −→M[t/a]
let [a, x:ϕ] := [t,M] inN −→ N[t/a][M/x]
axProp(t, ~u, axRep(t, ~u,M)) −→M
indϕ(a,~f)(M,~t) −→ λc,M c (λb, λx:(b ∈I c),
indϕ(a,~f)(M,~t)b)
Values:
V ::= λa,M | λx:ϕ,M | inr(M) | inr(M)
| [t,M] | 〈M,N〉 | axRep(t, ~u,M)
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 25 / 37
Set theory Realizability
Realizability for the λZ calculus
Realizability for IZF was first defined by David McCarty in his 1984PhD-thesis. Moczydłowski builds on this work to prove normalization.To get realizers, we erase types and sets from λZ-terms to get λZ-terms(all sets disappear or become ∅):
M ::= x |M ∅ |MN | λa,M | λx,M
| inl(M) | inr(M) | caseM of(inl x⇒ N1
inr y⇒ N2
)| 〈M,N〉 | fst(M) | snd(M) | magic(M)
| [∅,M] | let [a, x] :=M inN| axProp(M) | axRep(M) | ind(M)
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 26 / 37
Set theory Realizability
Lambda names
The idea is to have a version of the cumulative hierarchy that for each setincludes realizers as evidence for the placement in the hiearchy.
Definition
A λ-name is a set of pairs (v,B) where v ∈ λZvc and B is a λ-name.The class of λ-names is denoted Vλ.We have
Vλ =⋃α∈Ord
Vλα, Vλα =⋃β<α
P(λZvc × Vλβ),
and for a λ-name A we let λrk(A) denote the smallest ordinal α withA ∈ Vλα.
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 27 / 37
Set theory Realizability
Prerealizability
Define M A ∈I B, M A ∈ B and M A = B for M ∈ λZc, andA,B ∈ Vλ:
M A ∈I B ≡M ↓ v∧ (v,A) ∈ BM A ∈ B ≡M ↓ inRep(N)∧N ↓ [∅,O]
∧ ∃C ∈ Vλ,O ↓ 〈O1,O2〉∧O1 C ∈I B∧O2 A = C
M A = B ≡M ↓ eqRep(M0)∧M0 ↓ λa,M1
∀D ∈ Vλ,M1[∅/a] ↓ 〈O,P〉∧O ↓ λx,O1 ∧ (∀N D ∈I A,O1[N/x] D ∈ B)∧ P ↓ λx,P1 ∧ (∀N D ∈I A,P1[N/x] D ∈ A)
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 28 / 37
Set theory Realizability
Enriched language
Definition
For C ∈ Vλ, let C+ ≡ {(M,A) |M A ∈ C}.
Definition
Let L(Vλ) be the first-order language obtained by enriching the signatureof IZFR with constants for all λ-names.
Definition
A realizabilty environment ρ is a partial function from variables in L(Vλ) tothe class of λ-names, Vλ.
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 29 / 37
Set theory Realizability
Realizability for IZFR
We define by mutual induction, for ϕ a formula of L(Vλ), a term t ofL(Vλ), and for an environment ρ defined on the free variables in ϕ or t, arealizability relation M ρ ϕ (for M ∈ λZc), and a denotation JtKρ ∈ Vλ.
JaKρ ≡ ρ(a)JAKρ ≡ AJωKρ ≡ ω ′ (a suitable λ-name for ω)
JtA(~u)Kρ ≡ {(axRep(N),B) ∈ λZvc × Vλγ | N ρ ϕA(B, ~JuKρ)}(for a suitable ordinal γ depending on the λ-ranks of the parametersto the axiom)
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 30 / 37
Set theory Realizability
Realizability for IZFR, II
M ρ ⊥ iff ⊥M ρ t ∈I s iff M JtKρ ∈I JsKρM ρ t ∈ s iff M JtKρ ∈ JsKρM ρ t = s iff M JtKρ = JsKρM ρ ϕ∧ψ iff M ↓ 〈M1,M2〉∧ (M1 ρ ϕ)∧ (M2 ρ ψ)
M ρ ϕ∨ψ iff (M ↓ inl(M1)∧M1 ρ ϕ)
∨ (M ↓ inr(M2)∧M2 ρ ψ)
M ρ ϕ→ ψ iff (M ↓ λx,M1)∧ ∀N ρ ϕ,M1[N/x] ρ ψ
M ρ ∃a,ϕ iff M ↓ [∅,N]∧ ∃A ∈ Vλ,N ρ ϕ[A/a]
M ρ ∀a,ϕ iff M ↓ λa,N∧ ∀A ∈ Vλ,N[∅/a] ρ ϕ[A/a]
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 31 / 37
Set theory Realizability
Properties of this interpretation
Lemma
If A ∈ Vλα, then there is a β < α, so that if M B ∈ A, then B ∈ Vλβ.If M B = A, then B ∈ Vλα.If M B ∈I A, then λrkB < λrkA.
LemmaFor any intensional axiom we have
(M,C) ∈ JtA(~u)Kρ iff M = axRep(N) and N ρ ϕA(C, ~JuKρ)
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 32 / 37
Set theory Normalization
Normalization of λZ
We write ρ � Γ `M:ϕ if ρ assigns lambda-names to free first-ordervariables and realizers to context proof variables, so that for (x:ψ) ∈ Γ , wehave ρ(x) ρ ψ.
Theorem
If Γ `M:ϕ, then for all ρ � Γ `M:ϕ, we have M[ρ] ρ ϕ.
CorollaryIf `M:ϕ, then M normalizes.
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 33 / 37
Set theory Applications
Applications
CorollaryIf IZFR ` ϕ∨ψ, then IZFR ` ϕ or IZFR ` ψ.
Corollary
If IZFR ` ∃x,ϕ(x), then there is a term t so that IZFR ` ϕ(t).
Corollary
If IZFR ` ∃x ∈ ω,ϕ(x), then there is number n so that IZFR ` ϕ(n̄).
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 34 / 37
Set theory Strong normalization
Failure of strong normalization
An obstacle to strong normalization of intuitionistic set theories is Crabbé’sCounterexample:
Let t = { x ∈ ∅ | x ∈ x→ ⊥ }. There is a term M:(t ∈ ∅ → ⊥) that doesnot normalize if we allow reductions under the binder.
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 35 / 37
Set theory Extensions
Extensions
Moczydłowski’s approach extends to give normalizing calculi for IZFR withcountably many inaccessibles. He also gives a dependent set theory thatproves collection (which is stronger than replacement, intuitionistically).
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 36 / 37
Set theory Extensions
References
Wojciech Moczydłowski.Investigations on Sets and Types.PhD thesis, Cornell University, August 2007.Awarded the 2007 Sacks Prize.
Wojciech Moczydłowski.Normalization of IZF with replacement.Log. Methods Comput. Sci., 4(2):2:1, 29, 2008.
Ulrik Buchholtz (Stanford) Normalization of IZF April 13, 2010 37 / 37