A case study of forcing in classical realizability: Herbrand`s theorem

Herbrand theorem
PA ω
Forcing
The proof
A case study of forcing in classical realizability:
Herbrand’s theorem, proof and extracted
algorithm
Lionel Rieg
LIP, ENS Lyon
Récré Meeting, November 15th 2012
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
Motivations
Extracting Herbrand trees
through formalization in Coq and extraction:
safe (adequacy) but slow (a lot of backtracks on the tree)
direct program:
faster but unsafe (implemented in a modified KAM)
through a forcing transformation:
the best of both worlds:
safe (adequacy with forcing)
fast (intuitionistic proof: no backtrack on the tree)
Conclusion
Herbrand theorem
PA ω
Outline
1
Herbrand theorem
2
PA ω
3
Forcing
4
The proof
Forcing
The proof
Conclusion
Herbrand theorem
PA ω
Outline
1
Herbrand theorem
2
PA ω
3
Forcing
4
The proof
Forcing
The proof
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
Idea behind Herbrand theorem
We start from an inconsistent universal theory U.
(i.e. a set of universal formulæ Ui = ∀~x .Fi ~x with Fi quantifier-free)
infinite
interpretations
→ compactness →
finite information
for each interpretation
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
Idea behind Herbrand theorem
We start from an inconsistent universal theory U.
(i.e. a set of universal formulæ Ui = ∀~x .Fi ~x with Fi quantifier-free)
infinite
interpretations
→ compactness →
finite information
for each interpretation
finite information
infinite number
→ Herbrand theorem →
for all interpretations
of interpretations
This information can be presented as a decision tree or BDD.
Herbrand theorem
PA ω
Forcing
What is a Herbrand tree?
Definition (Herbrand tree)
A binary tree where
inner nodes are labeled by atomic formulæ
branches represent partial interpretations
leaves contain contradictions
The proof
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
What is a Herbrand tree?
Definition (Herbrand tree)
A binary tree where
inner nodes are labeled by atomic formulæ
branches represent partial interpretations
leaves contain contradictions
Example
P3
T
P4
F1 = P 3
T
F2 = ∀n.P n → P (n + 1)
P5
T
F3 = ¬P 6
P6
T
F₃
F₂ 4
F
F₂ 5
F
F₂ 3
F
F
F₁
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
What is a Herbrand tree?
Definition (Herbrand tree)
A binary tree where
inner nodes are labeled by atomic formulæ
branches represent partial interpretations
leaves contain contradictions
Example
P4
T
F1 = P 3
P5
F2 = ∀n.P n → P (n + 1)
T
F3 = ¬P 6
P6
T
F₃
F
F₂ 4
F
F₂ 5
F
P3
T
F₂ 3
F
F₁
Herbrand theorem
PA ω
Forcing
The proof
Usual proof of Herbrand’s theorem
Theorem (Herbrand)
If for all interpretations I , I =
6| U, then U has a Herbrand tree.
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
Usual proof of Herbrand’s theorem
Theorem (Herbrand)
If for all interpretations I , I =
6| U, then U has a Herbrand tree.
Let us fix an enumeration (ai )i ∈N of the atoms.
(atoms = atomic formulæ)
Conclusion
PA ω
Herbrand theorem
Forcing
The proof
Conclusion
Usual proof of Herbrand’s theorem
Theorem (Herbrand)
If for all interpretations I , I =
6| U, then U has a Herbrand tree.
a₀
a₂
a₃
a₄
a₄
a₃
a₄
a₄
a₄
a₁
a₁
a₂
a₂
a₃
a₃
a₄
a₄
a₄
a₄
a₂
a₃
a₃
a₄
a₄
a₃
a₄
a₄
a₃
a₄
consider the atom-enumerating complete infinite tree
a₄
a₄
PA ω
Herbrand theorem
Forcing
The proof
Conclusion
Usual proof of Herbrand’s theorem
Theorem (Herbrand)
If for all interpretations I , I =
6| U, then U has a Herbrand tree.
a₀
a₂
a₃
a₄
a₄
a₃
a₄
a₄
a₄
a₁
a₁
a₂
a₂
a₃
a₃
a₄
a₄
a₄
a₄
a₂
a₃
a₃
a₄
a₄
pick any infinite branch
a₃
a₄
a₄
a₃
a₄
a₄
a₄
PA ω
Herbrand theorem
Forcing
The proof
Conclusion
Usual proof of Herbrand’s theorem
Theorem (Herbrand)
If for all interpretations I , I =
6| U, then U has a Herbrand tree.
a₀
a₂
a₃
a₄
a₄
a₃
a₄
⊥
a₄
a₁
a₁
a₂
a₂
a₃
a₄
a₄
a₄
a₂
a₃
a₃
a₄
a₄
a₃
a₄
a₄
a₃
a₄
a₄
a₄
by hypothesis (and compactness), we can cut it at finite depth
PA ω
Herbrand theorem
Forcing
The proof
Usual proof of Herbrand’s theorem
Theorem (Herbrand)
If for all interpretations I , I =
6| U, then U has a Herbrand tree.
a₀
⊥
a₁
⊥
a₂
⊥
a₃
⊥
⊥
conclude using weak Kőnig’s lemma
Conclusion
Herbrand theorem
PA ω
Forcing
What can be improved
We want to avoid:
the fixed enumeration of atoms
weak Kőnig’s lemma
The proof
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
What can be improved
We want to avoid:
the fixed enumeration of atoms
weak Kőnig’s lemma
P3
T
P4
T
P5
T
P6
T
F₃
F
F₁
F
F₂ 3
F
F₂ 4
F
F₂ 5
A good enumeration
Conclusion
PA ω
Herbrand theorem
Forcing
The proof
Conclusion
What can be improved
We want to avoid:
the fixed enumeration of atoms
weak Kőnig’s lemma
P0
P2
P3
T
P4
T
P5
T
P6
T
F₃
T
F₁
T
F₂ 3
P5
F
T
F₂ 4
P6
T
F₃
F₂ 5
T
F₂ 3
P5
T
T
F₃
T
F₁
P4
F
T
F₂ 3
F₂ 4
F
P5
T
F₃
P3
F
F₂ 4
F
F₂ 5
T
F₁
P4
F
T
F₂ 3
F
P6
T
F₂ 5
P2
P3
F
P6
P2
F
P4
F
P1
P3
T
F₁
F
F₂ 4
F
F
P4
F
F
F₂ 5
P3
F
P1
P5
T
P6
T
F₃
F₂ 4
F
F₂ 5
P3
F
T
F₁
P4
F
T
F₂ 3
F
P5
T
P6
T
F₃
P2
F₂ 4
F₂ 5
T
F₁
T
F₂ 3
P5
T
P6
T
F₃
P3
F
P4
F
F
F
A bad enumeration
P3
F
F₂ 4
T
F₂ 3
F₂ 5
P5
T
P6
T
F₃
F
P4
F
F
F
T
F₁
F
F₂ 4
F
F₂ 5
F₁
F
F₂ 3
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
A simpler proof of Herbrand’s theorem
Restriction: U = {∀n. F n}
(take F hi , ~x i = Fi ~x )
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
A simpler proof of Herbrand’s theorem
Restriction: U = {∀n. F n}
Proof. (by contraposition)
Assume that there is no Herbrand tree (for U)
and build a model of U.
1
We start from a leaf.
(take F hi , ~x i = Fi ~x )
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
A simpler proof of Herbrand’s theorem
Restriction: U = {∀n. F n}
(take F hi , ~x i = Fi ~x )
Proof. (by contraposition)
Assume that there is no Herbrand tree (for U)
and build a model of U.
1
We start from a leaf.
2
It is not a Herbrand tree so one of its
leaves does not contain a contradiction.
?
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
A simpler proof of Herbrand’s theorem
Restriction: U = {∀n. F n}
(take F hi , ~x i = Fi ~x )
Proof. (by contraposition)
Assume that there is no Herbrand tree (for U)
and build a model of U.
1
We start from a leaf.
2
It is not a Herbrand tree so one of its
leaves does not contain a contradiction.
3
Replace this leaf with an inner node.
a₄
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
A simpler proof of Herbrand’s theorem
Restriction: U = {∀n. F n}
(take F hi , ~x i = Fi ~x )
Proof. (by contraposition)
Assume that there is no Herbrand tree (for U)
and build a model of U.
1
We start from a leaf.
2
It is not a Herbrand tree so one of its
leaves does not contain a contradiction.
3
Replace this leaf with an inner node.
4
Repeat this process.
a₄
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
A simpler proof of Herbrand’s theorem
Restriction: U = {∀n. F n}
(take F hi , ~x i = Fi ~x )
Proof. (by contraposition)
Assume that there is no Herbrand tree (for U)
and build a model of U.
1
We start from a leaf.
2
It is not a Herbrand tree so one of its
leaves does not contain a contradiction.
3
Replace this leaf with an inner node.
4
Repeat this process.
a₄
?
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
A simpler proof of Herbrand’s theorem
Restriction: U = {∀n. F n}
(take F hi , ~x i = Fi ~x )
Proof. (by contraposition)
Assume that there is no Herbrand tree (for U)
and build a model of U.
1
We start from a leaf.
2
It is not a Herbrand tree so one of its
leaves does not contain a contradiction.
3
Replace this leaf with an inner node.
4
Repeat this process.
a₄
a₇
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
A simpler proof of Herbrand’s theorem
Restriction: U = {∀n. F n}
(take F hi , ~x i = Fi ~x )
Proof. (by contraposition)
Assume that there is no Herbrand tree (for U)
and build a model of U.
1
We start from a leaf.
2
It is not a Herbrand tree so one of its
leaves does not contain a contradiction.
3
Replace this leaf with an inner node.
4
Repeat this process.
a₄
a₇
?
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
A simpler proof of Herbrand’s theorem
Restriction: U = {∀n. F n}
(take F hi , ~x i = Fi ~x )
Proof. (by contraposition)
Assume that there is no Herbrand tree (for U)
and build a model of U.
1
We start from a leaf.
2
It is not a Herbrand tree so one of its
leaves does not contain a contradiction.
3
Replace this leaf with an inner node.
4
Repeat this process.
a₄
a₇
a₀
?
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
A simpler proof of Herbrand’s theorem
Restriction: U = {∀n. F n}
(take F hi , ~x i = Fi ~x )
Proof. (by contraposition)
Assume that there is no Herbrand tree (for U)
and build a model of U.
1
We start from a leaf.
2
It is not a Herbrand tree so one of its
leaves does not contain a contradiction.
3
Replace this leaf with an inner node.
4
Repeat this process.
a₄
a₇
a₀
a₂
?
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
A simpler proof of Herbrand’s theorem
Restriction: U = {∀n. F n}
(take F hi , ~x i = Fi ~x )
Proof. (by contraposition)
Assume that there is no Herbrand tree (for U)
and build a model of U.
1
We start from a leaf.
2
It is not a Herbrand tree so one of its
leaves does not contain a contradiction.
3
Replace this leaf with an inner node.
4
Repeat this process.
The infinite branch is a model.
a₄
a₇
a₀
a₂
?
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
A simpler proof of Herbrand’s theorem
Restriction: U = {∀n. F n}
(take F hi , ~x i = Fi ~x )
Proof. (by contraposition)
Assume that there is no Herbrand tree (for U)
and build a model of U.
1
We start from a leaf.
2
It is not a Herbrand tree so one of its
leaves does not contain a contradiction.
3
Replace this leaf with an inner node.
4
Repeat this process.
The infinite branch is a model.
But proof is classical { backtracking
a₄
a₇
a₀
a₂
?
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
A simpler proof of Herbrand’s theorem
Restriction: U = {∀n. F n}
(take F hi , ~x i = Fi ~x )
Proof. (by contraposition)
Assume that there is no Herbrand tree (for U)
and build a model of U.
1
We start from a leaf.
2
It is not a Herbrand tree so one of its
leaves does not contain a contradiction.
3
Replace this leaf with an inner node.
4
Repeat this process.
The infinite branch is a model.
But proof is classical { backtracking
This infinite branch can be provided by a Cohen real
a₄
a₇
a₀
a₂
?
Herbrand theorem
PA ω
Forcing
The proof
Checking Herbrand trees
How can we check that a tree t is a Herbrand tree?
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
Checking Herbrand trees
How can we check that a tree t is a Herbrand tree?
By induction on t:
while descending along t, remember a finite valuation p
use this finite valuation p for evaluation at the leaves
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
Checking Herbrand trees
How can we check that a tree t is a Herbrand tree?
By induction on t:
subHtree : finite valuation → tree → Bool
while descending along t, remember a finite valuation p
subHtree p (Node a t1 t2 ) =
subHtree (a + ∪ p ) t1 && subHtree (a - ∪ p ) t2
use this finite valuation p for evaluation at the leaves
subHtree p (Leaf n) = eval p (F n) 0
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
Checking Herbrand trees
How can we check that a tree t is a Herbrand tree?
By induction on t:
subHtree : finite valuation → tree → Bool
while descending along t, remember a finite valuation p
subHtree p (Node a t1 t2 ) =
subHtree (a + ∪ p ) t1 && subHtree (a - ∪ p ) t2
use this finite valuation p for evaluation at the leaves
subHtree p (Leaf n) = eval p (F n) 0
t is a Herbrand tree ⇐⇒ subHtree ∅ t = 1
PA ω
Herbrand theorem
Forcing
The proof
Conclusion
Checking Herbrand trees
How can we check that a tree t is a Herbrand tree?
By induction on t:
subHtree : finite valuation → tree → Bool
while descending along t, remember a finite valuation p
subHtree p (Node a t1 t2 ) =
subHtree (a + ∪ p ) t1 && subHtree (a - ∪ p ) t2
use this finite valuation p for evaluation at the leaves
subHtree p (Leaf n) = eval p (F n) 0
t is a Herbrand tree ⇐⇒ subHtree ∅ t = 1
Remarks
eval p (F n) b = 1 means:
1
2
p has enough information to evaluate F n
the result of evaluation is b
building the tree bottom-up:
unordered partial valuation { ordered branches
Herbrand theorem
PA ω
Outline
1
Herbrand theorem
2
PA ω
3
Forcing
4
The proof
Forcing
The proof
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
Higher order Peano Arithmetic
1
Logical setting:
minimal language: ∀, →
multi-sorted classical logic
basic sorts: ι
individuals
o propositions (higher-order)
Conclusion
PA ω
Herbrand theorem
Forcing
The proof
Higher order Peano Arithmetic
1
Logical setting:
minimal language: ∀, →
multi-sorted classical logic
basic sorts: ι
individuals
o propositions (higher-order)
2
datatype: relativization predicate on the sort ι
Example
Bool : b ∈ Bool := ∀Z . Z (0) → Z (1) → Z (b )
:
x∈
:= ∀Z . Z (0) → ∀n, Z (n) → Z (n + 1) → Z (x )
N
N
Notations
∀n ∈ . A := ∀n. n ∈
N
N→A
∃n ∈
N. A := ∃n. n ∈ N ∧ A
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
Datatypes used in the formalization
Inductive definitions:
Atom (atomic formulæ)
Comp (∀/∃-free formulæ)
tree
(binary trees)
FVal
(finite valuations)
<abstract datatype>
c := ⊥ | Atomic a | c ⇒ c
t := Leaf n | Node a t t
p := ∅ | a + :: p | a - :: p
a ∈ Atom, a < p
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
Datatypes used in the formalization
Inductive definitions:
Atom (atomic formulæ)
Comp (∀/∃-free formulæ)
tree
(binary trees)
FVal
(finite valuations)
<abstract datatype>
c := ⊥ | Atomic a | c ⇒ c
t := Leaf n | Node a t t
p := ∅ | a + :: p | a - :: p
a ∈ Atom, a < p
Relativization predicates:
c ∈ Comp := ∀Z . Z (⊥) →
∀a ∈ Atom . Z (Atomic a ) →
∀c1 .∀c2 . Z (c1 ) → Z (c2 ) → Z (c1 ⇒ c2 ) →
Z (c )
p ∈ FVal := ∀Z . Z (∅) →
∀q.∀a ∈ Atom. a < q 7→ Z (q) → Z (a + :: q) →
∀q.∀a ∈ Atom. a < q 7→ Z (q) → Z (a - :: q) →
Z (p )
t ∈ tree := . . .
Herbrand theorem
PA ω
Forcing
The proof
Herbrand’s theorem in PAω
Usual statement: (∀I. I =
6| U ) → ∃t . t is a Herbrand tree (for U)
premise:
conclusion:
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
Herbrand’s theorem in PAω
Usual statement: (∀I. I =
6| U ) → ∃t . t is a Herbrand tree (for U)
premise: some transformations
∀I. I =
6| U ≡ ∀I. I =
6| (∀n ∈ . F n)
⇐⇒ ∀I. ∃n ∈ . I =
6| F n
⇐⇒ ∀ι→o ρ. ∃n ∈ . ¬(interp ρ (F n))
conclusion:
N
N
N
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
Herbrand’s theorem in PAω
Usual statement: (∀I. I =
6| U ) → ∃t . t is a Herbrand tree (for U)
premise: some transformations
∀I. I =
6| U ≡ ∀I. I =
6| (∀n ∈ . F n)
⇐⇒ ∀I. ∃n ∈ . I =
6| F n
⇐⇒ ∀ι→o ρ. ∃n ∈ . ¬(interp ρ (F n))
conclusion: direct translation
∃t ∈ tree. subHtree ∅ t = 1
N
N
N
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
Herbrand’s theorem in PAω
Usual statement: (∀I. I =
6| U ) → ∃t . t is a Herbrand tree (for U)
premise: some transformations
∀I. I =
6| U ≡ ∀I. I =
6| (∀n ∈ . F n)
⇐⇒ ∀I. ∃n ∈ . I =
6| F n
⇐⇒ ∀ι→o ρ. ∃n ∈ . ¬(interp ρ (F n))
conclusion: direct translation
∃t ∈ tree. subHtree ∅ t = 1
N
N
N
We write subH p := ∃t ∈ tree. subHtree p t = 1.
∀ι→o ρ. ∃n ∈
N. ¬(interp ρ (U n))
→ subH ∅
Conclusion
Herbrand theorem
PA ω
Outline
1
Herbrand theorem
2
PA ω
3
Forcing
4
The proof
Forcing
The proof
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
Recall on the forcing transformation
Taken from [Kri11] and [Miq11]
Input (forcing structure)
A forcing structure is given by
a set (κ, C ) of forcing conditions
(p ∈ C written C [p ])
a product operation · on forcing conditions
a maximal condition 1
a bunch of proof terms α0 , . . . , α8
Output (program transformation)
A logical transformation:
t : A { t∗ : p F A
Adequacy lemmas:
t :A →t A
t : A → t∗ p F A
A wrapper w s.t.
t :1FA →wt :A
(if A arithmetical)
Herbrand theorem
PA ω
Forcing
The proof
In our case (1/3): prerequisites
Implementation of finite relations over Atom × Bool into ι:
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
In our case (1/3): prerequisites
Implementation of finite relations over Atom × Bool into ι:
Primitives:
empty relation
singleton relation
union of relation
test of a binding
:
sing :
∪
:
test :
∅
ι
ι → ι → ι (notations: a + and a - )
ι→ι→ι
ι→ι→ι→ι
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
In our case (1/3): prerequisites
Implementation of finite relations over Atom × Bool into ι:
Primitives:
empty relation
singleton relation
union of relation
test of a binding
Properties:
:
sing :
∪
:
test :
∅
ι
ι → ι → ι (notations: a + and a - )
ι→ι→ι
ι→ι→ι→ι
commutativity, associativity, idempotence of ∪
∅ is a neutral element for ∪
totality of test: ∀a ∈ Atom .∀b ∈ Bool .∀p . test a b p ∈ Bool
behavior of test w.r.t. ∪, ∅, a + , a -
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
In our case (1/3): prerequisites
Implementation of finite relations over Atom × Bool into ι:
Primitives:
empty relation
singleton relation
union of relation
test of a binding
Properties:
:
sing :
∪
:
test :
∅
ι
ι → ι → ι (notations: a + and a - )
ι→ι→ι
ι→ι→ι→ι
commutativity, associativity, idempotence of ∪
∅ is a neutral element for ∪
totality of test: ∀a ∈ Atom .∀b ∈ Bool .∀p . test a b p ∈ Bool
behavior of test w.r.t. ∪, ∅, a + , a -
Two definitions:
membership test
adding a binding
mem a p := test a 0 p || test a 1 p
(a , b ) :: p := sing a b ∪ p
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
In our case (2/3): the forcing structure
Our forcing structure:
κ := ι,
C [p ] := p ∈ FVal ∧(subH p → subH ∅)
p · q := p ∪ q
1 := ∅
α0 , . . . , α8 comes from the interface of finite relations
Remarks
C is a datatype
FVal represents finite functions from ω to 2
C [p ] = p ∈ FVal
gives Cohen forcing conditions
{ add a single new (non computable) real number
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
In our case (3/3): the generic set G
Forcing universe = Base universe + a new set G
PA ω + G
A
t :A
q∈G
−→
Forcing translation
−→
PA ω
pFA
t∗ : p F A
p6q
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
In our case (3/3): the generic set G
Forcing universe = Base universe + a new set G
PA ω + G
A
t :A
q∈G
−→
Forcing translation
−→
PA ω
pFA
t∗ : p F A
p6q
Nice properties of G in the forcing universe:
non empty
G (1)
included in C ∀p . G (p ) → C [p ]
filter
∀p ∀q. G (p ) → G (q) → G (p · q)
genericity
(we shall use instead a simple instance)
Simple translation in the base universe
p F q ∈ G ≡ p 6 q := ∀r . C [p · r ] → C [q · r ]
Conclusion
Herbrand theorem
PA ω
Outline
1
Herbrand theorem
2
PA ω
3
Forcing
4
The proof
Forcing
The proof
Conclusion
PA ω
Herbrand theorem
Forcing
The proof
The big picture
The proof is split across the forcing and base universes.
Base universe
Forcing universe
Conclusion
PA ω
Herbrand theorem
Forcing
The proof
The big picture
The proof is split across the forcing and base universes.
Base universe
1
Build the forcing structure
Forcing universe
Conclusion
PA ω
Herbrand theorem
Forcing
The proof
The big picture
The proof is split across the forcing and base universes.
Base universe
1
Build the forcing structure
2
Assume the premise
Forcing universe
Conclusion
PA ω
Herbrand theorem
Forcing
The proof
The big picture
The proof is split across the forcing and base universes.
Base universe
1
Build the forcing structure
2
Assume the premise
Forcing universe
3
Lift the premise
Conclusion
PA ω
Herbrand theorem
Forcing
The proof
The big picture
The proof is split across the forcing and base universes.
Base universe
1
Build the forcing structure
2
Assume the premise
Forcing universe
3
Lift the premise
4
Make the proof
t : subH ∅
Conclusion
PA ω
Herbrand theorem
Forcing
The proof
The big picture
The proof is split across the forcing and base universes.
Base universe
1
Build the forcing structure
2
Assume the premise
5
Use the forcing translation
t ∗ : 1 F subH ∅
Forcing universe
3
Lift the premise
4
Make the proof
t : subH ∅
Conclusion
PA ω
Herbrand theorem
Forcing
The proof
The big picture
The proof is split across the forcing and base universes.
Base universe
1
Build the forcing structure
2
Assume the premise
5
Use the forcing translation
t ∗ : 1 F subH ∅
6
Remove forcing
w t ∗ : subH ∅
Forcing universe
3
Lift the premise
4
Make the proof
t : subH ∅
Conclusion
PA ω
Herbrand theorem
Forcing
The proof
The big picture
The proof is split across the forcing and base universes.
Base universe
1
Build the forcing structure
2
Assume the premise
5
Use the forcing translation
t ∗ : 1 F subH ∅
6
Remove forcing
w t ∗ : subH ∅
7
Extract a witness
(classical realizability)
Forcing universe
3
Lift the premise
4
Make the proof
t : subH ∅
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
Step 4: The proof (in the forcing universe)
Best done on the blackboard
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
Step 5: Translating axioms
The usual axioms of G are already done.
(G non empty, G included in C, G filter)
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
Step 5: Translating axioms
The usual axioms of G are already done.
(G non empty, G included in C, G filter)
Last axiom to translate:
∀a ∈ Atom. ∃p ∈ G . ∃b ∈ Bool. test a b p = 1
i.e. find a proof term for
1 F ∀a ∈ Atom. ∃p ∈ G . ∃b ∈ Bool. test a b p = 1
Two solutions { two ways of building the tree:
left-to-right scan
right-to-left scan
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
Step 6: Absolute formulæ
Definition (Absolute formula)
A formula is absolute when ∀p ∈ C . A ↔ p F A
that is there exists proof terms
ξA : p F A → C [p ] → A
ξA0 : (C [p ] → A ) → p F A
Absolute sort: ι∗ = ι whereas o ∗ = κ → o
everything in ι { no computational object changes
Absolute set = absolute sort + absolute relativization predicate
N
example: datatypes ( , Bool, FVal, Atom, Comp, tree)
equality on ι
counter-example: total valuations ι → o
subH ∅ := ∃t ∈ tree. subHtree ∅ t = 1 is absolute
The wrapper w is simply ξ
Herbrand theorem
PA ω
Forcing
The proof
Extracted algorithm
No fixed enumeration needed
{ enumeration built by the proof of the premise
Herbrand tree inside forcing condition:
p ∈ FVal
position in the tree
subH p → subH ∅ context of the current tree
Intuitionistic proof: no backtrack in real mode
Execution in the KFAM
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
One example of forcing on individuals
Example of forcing to find better proofs, not new results
Goal reached: fast and safe algorithm
Conclusion
Herbrand theorem
PA ω
Forcing
The proof
Conclusion
One example of forcing on individuals
Example of forcing to find better proofs, not new results
Goal reached: fast and safe algorithm
Thank you
Conclusion