Computational interpretation of classical forcing Lionel R ieg - - PowerPoint PPT Presentation

computational interpretation of classical forcing
SMART_READER_LITE
LIVE PREVIEW

Computational interpretation of classical forcing Lionel R ieg - - PowerPoint PPT Presentation

Formal proof system: PA + Forcing in PA + An example of computation by forcing Computational interpretation of classical forcing Lionel R ieg Collge de France July 22 nd , 2016 July 22 nd , 2016 Lionel R ieg (Collge de France)


slide-1
SLIDE 1

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Computational interpretation

  • f classical forcing

Lionel Rieg

Collège de France

July 22nd, 2016

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 1 / 29

slide-2
SLIDE 2

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

The question

Logic Programs

¬¬-translation

CPS translation

formula ⊥ return type

Forcing

forcing conditions

???

forcing transformation

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 2 / 29

slide-3
SLIDE 3

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing in one drawing

g construction

(model theory)

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 3 / 29

slide-4
SLIDE 4

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing in one drawing

g construction translation

(model theory) (proof theory)

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 3 / 29

slide-5
SLIDE 5

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing in one drawing

g construction translation t : A t* : p F A

(model theory) (proof theory)

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 3 / 29

slide-6
SLIDE 6

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Outline

1

Formal proof system: PAω+

2

Forcing in PAω+

3

An example of computation by forcing

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 4 / 29

slide-7
SLIDE 7

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

PAω+: syntax

Sorts

τ, σ := ι |

  • |

τ → σ

Expressions M, N, A, B

:=

| λxτ. M |

M N

λ-calculus | |

S

|

recτ arithmetic

|

A ⇒ B

| ∀xτ. A

minimal logic Proof-terms t, u

:=

x

| λx. t |

t u

|

callcc

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 5 / 29

slide-8
SLIDE 8

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

PAω+: Logical connectives

Second-order encodings:

⊥ := ∀Z. Z ¬A :=

A ⇒ ⊥ A ∧ B

:= ∀Z. (A ⇒ B ⇒ Z) ⇒ Z

A ∨ B

:= ∀Z. (A ⇒ Z) ⇒ (B ⇒ Z) ⇒ Z ∃x. A := ∀Z. (∀x. A ⇒ Z) ⇒ Z

e1 = e2

:= ∀Z. Z e1 ⇒ Z e2

Notations: x ∈ P := P(x)

∀x ∈ P. A := ∀x. x ∈ P ⇒ A ∃x ∈ P. A := ∃x. x ∈ P ∧ A

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 6 / 29

slide-9
SLIDE 9

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

PAω+: syntax

Sorts

τ, σ := ι |

  • |

τ → σ

Expressions M, N, A, B

:=

| λxτ. M |

M N

| |

S

|

recτ

|

A ⇒ B

| ∀xτ. A |

M τ N ֒→ A Proof-terms t, u

:=

x

| λx. t |

t u

|

callcc M τ N ֒→ A ⇐⇒ M = N ⇒ A + some congruence on formulas

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 7 / 29

slide-10
SLIDE 10

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

PAω+: proof system

Axiom E; Γ, x : A ⊢ x : A Peirce

E; Γ ⊢ callcc : ((A ⇒ B) ⇒ A) ⇒ A E; Γ ⊢ t : A

Congruence A ≈E A′

E; Γ ⊢ t : A′ E; Γ, x : A ⊢ t : B

⇒i E; Γ

⊢ λx. t : A ⇒ B E; Γ ⊢ t : A ⇒ B E; Γ ⊢ u : A

⇒e

E; Γ ⊢ t u : B E; Γ ⊢ t : A

∀i x FV(Γ, E)

E; Γ ⊢ t : ∀xτ. A E; Γ ⊢ t : ∀xτ. A

∀e

E; Γ ⊢ t : A[Nτ/xτ] E, M = N; Γ ⊢ t : A

֒→i

E; Γ ⊢ t : M τ N ֒→ A E; Γ ⊢ t : M τ M ֒→ A

֒→e

E; Γ ⊢ t : A

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 8 / 29

slide-11
SLIDE 11

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Classical realizability semantics

Different from intuitionistic realizability

intuitionistic: limits proofs, full extraction classical: full proofs, limits extraction

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 9 / 29

slide-12
SLIDE 12

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Classical realizability semantics

Different from intuitionistic realizability

intuitionistic: limits proofs, full extraction classical: full proofs, limits extraction

The KAM (Krivine’s Abstract Machine) Stack machine for λ-calculus + callcc

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 9 / 29

slide-13
SLIDE 13

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Classical realizability semantics

Different from intuitionistic realizability

intuitionistic: limits proofs, full extraction classical: full proofs, limits extraction

The KAM (Krivine’s Abstract Machine) Stack machine for λ-calculus + callcc Realizability interpretation

Based on a pole (set of processes of the KAM) Propositions interpreted by stacks (refutations) Realizers defined by orthogonality: |A| := A

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 9 / 29

slide-14
SLIDE 14

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Classical realizability semantics

Different from intuitionistic realizability

intuitionistic: limits proofs, full extraction classical: full proofs, limits extraction

The KAM (Krivine’s Abstract Machine) Stack machine for λ-calculus + callcc Realizability interpretation

Based on a pole (set of processes of the KAM) Propositions interpreted by stacks (refutations) Realizers defined by orthogonality: |A| := A

Results:

Adequacy: ⊢ t : A implies t A Logical consistency: when = ∅, Tarski model Simple methods to extract witnesses for Σ0

1 formulas

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 9 / 29

slide-15
SLIDE 15

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Outline

1

Formal proof system: PAω+

2

Forcing in PAω+

3

An example of computation by forcing

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 10 / 29

slide-16
SLIDE 16

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing: overall idea

g translation t : A t* : p F A

(proof theory)

PAω⁺ PAω⁺+G

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 11 / 29

slide-17
SLIDE 17

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing: input

Definition (Forcing structure) A forcing structure is given by a sort κ of forcing conditions a predicate Cκ→o of well-formed conditions

(p ∈ C written C[p])

a product operation · on forcing conditions a maximal condition 1 a bunch of proof terms α0, . . . , α8 G = generic filter on the set of forcing conditions

= “approximations of g”

g = G

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 12 / 29

slide-18
SLIDE 18

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing: input (example)

Example (Forcing structure) The forcing structure to add a single Cohen real

κ := ι (finite relations between N and Bool)

C[p] := “p is functional”

(p : N ⇀ Bool)

p · q := p ∪ q 1 := ∅

α0, . . . , α8

G := pair-wise compatible finite functions from N to Bool

= “approximations of g”

g = G (a full function from N to Bool)

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 13 / 29

slide-19
SLIDE 19

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing: output

3 translations (_)∗:

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 14 / 29

slide-20
SLIDE 20

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing: output

3 translations (_)∗:

  • n kinds:

ι∗ := ι

  • ∗ := κ → o

(σ → τ)∗ := σ∗ → τ∗

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 14 / 29

slide-21
SLIDE 21

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing: output

3 translations (_)∗:

  • n kinds:

ι∗ := ι

  • ∗ := κ → o

(σ → τ)∗ := σ∗ → τ∗

  • n expressions:

(A ⇒ B)∗ p := ∀q∀r. p q · r ֒→ (∀s. C[q · s] ⇒ A∗ s) ⇒ B∗ r merely propagates through other constructions

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 14 / 29

slide-22
SLIDE 22

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing: output

3 translations (_)∗:

  • n kinds:

ι∗ := ι

  • ∗ := κ → o

(σ → τ)∗ := σ∗ → τ∗

  • n expressions:

(A ⇒ B)∗ p := ∀q∀r. p q · r ֒→ (∀s. C[q · s] ⇒ A∗ s) ⇒ B∗ r merely propagates through other constructions The forcing transformation: p F A := ∀r. C[p · r] ⇒ A∗ r

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 14 / 29

slide-23
SLIDE 23

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing: output

3 translations (_)∗:

  • n kinds:

ι∗ := ι

  • ∗ := κ → o

(σ → τ)∗ := σ∗ → τ∗

  • n expressions:

(A ⇒ B)∗ p := ∀q∀r. p q · r ֒→ (∀s. C[q · s] ⇒ A∗ s) ⇒ B∗ r merely propagates through other constructions The forcing transformation: p F A := ∀r. C[p · r] ⇒ A∗ r

  • n proof terms:

x∗ := x (t u)∗ := γ3 t∗ u∗ (λx. t)∗ := γ1(λx. t∗[(β3y)/y][(β4x)/x]) y x callcc∗ := λcx. callcc (λk. x (α14 c) (γ4 k))

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 14 / 29

slide-24
SLIDE 24

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

The KFAM: regular mode

Like the KAM terms t, u

:=

x

| λx. t |

t u

|

callcc

| . . .

environments e

:= ∅ |

e, x ← c closures c

:=

t[e]

|

kπ stacks

π := α |

c · π processes p

:=

c ⋆ π Skip x[e, y ← c] ⋆

π ≻

x[e]

⋆ π

Access x[e, x ← c] ⋆

π ≻

c

⋆ π

Push

(t u)[e] ⋆ π ≻

t[e]

⋆ u[e] · π

Grab

(λx. t)[e] ⋆ c · π ≻

t[e, x ← c] ⋆

π

Save callcc[e]

⋆ c · π ≻

c

kπ · π Restore kπ′

⋆ c · π ≻

c

⋆ π′

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 15 / 29

slide-25
SLIDE 25

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

The KFAM: regular mode

Like the KAM + forcing terms t, u

:=

x

| λx. t |

t u

|

callcc

| . . .

environments e

:= ∅ |

e, x ← c closures c

:=

t[e]

|

|

t[e]∗

|

k ∗

π

stacks

π := α |

c · π processes p

:=

c ⋆ π Skip x[e, y ← c] ⋆

π ≻

x[e]

⋆ π

Access x[e, x ← c] ⋆

π ≻

c

⋆ π

Push

(t u)[e] ⋆ π ≻

t[e]

⋆ u[e] · π

Grab

(λx. t)[e] ⋆ c · π ≻

t[e, x ← c] ⋆

π

Save callcc[e]

⋆ c · π ≻

c

kπ · π Restore kπ′

⋆ c · π ≻

c

⋆ π′

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 15 / 29

slide-26
SLIDE 26

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

The KFAM: evaluation

Skip x[e, y ← c] ⋆

π ≻

x[e]

⋆ π

Access x[e, x ← c] ⋆

π ≻

c

⋆ π

Push

(t u)[e] ⋆ π ≻

t[e]

⋆ u[e] · π

Grab

(λx. t)[e] ⋆ c · π ≻

t[e, x ← c] ⋆

π

Save callcc[e]

⋆ c · π ≻

c

kπ · π Restore kπ′

⋆ c · π ≻

c

⋆ π′ ⇑ ⇓

Skip∗ x[e, y ← c]∗ ⋆ f·

π ≻

x[e]∗

⋆ α9 f· π

Access∗ x[e, x ← c]∗ ⋆ f·

π ≻

c

⋆ α10 f· π

Push∗

(t u)[e]∗ ⋆ f· π ≻

t[e]∗

⋆ α11 f·u[e]∗ · π

Grab∗

(λx. t)[e]∗ ⋆ f·c · π ≻

t[e, x ← c]∗ ⋆ α6 f·

π

Save∗ callcc∗

⋆ f·c · π ≻

c

⋆ α14 f·

k ∗

π · π

Restore∗ k ∗

π′

⋆ f·c · π ≻

c

⋆ α15 f· π′

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 16 / 29

slide-27
SLIDE 27

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing: overall idea

g translation t : A t* : p F A

(proof theory)

PAω⁺ PAω⁺+G

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 17 / 29

slide-28
SLIDE 28

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing: extension to the generic filter

Restriction: C is invariant by forcing (arithmetical)

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 18 / 29

slide-29
SLIDE 29

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing: extension to the generic filter

Restriction: C is invariant by forcing (arithmetical) PAω+ + G

−→

Forcing translation

−→

PAω+ A p F A t : A t∗ : p F A q ∈ G

??

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 18 / 29

slide-30
SLIDE 30

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing: extension to the generic filter

Restriction: C is invariant by forcing (arithmetical) PAω+ + G

−→

Forcing translation

−→

PAω+ A p F A t : A t∗ : p F A q ∈ G p q p F q ∈ G

p q

:= ∀r. C[p · r] ⇒ C[q · r]

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 18 / 29

slide-31
SLIDE 31

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing: extension to the generic filter

Restriction: C is invariant by forcing (arithmetical) PAω+ + G

−→

Forcing translation

−→

PAω+ A p F A t : A t∗ : p F A q ∈ G p q p F q ∈ G

p q

:= ∀r. C[p · r] ⇒ C[q · r]

Nice properties of G in the forcing universe:

non empty 1 ∈ G subset of C ∀p ∈ G. C[p] filter ∀p∀q. (p · q) ∈ G ⇒ p ∈ G ∀p ∈ G. ∀q ∈ G. (p · q) ∈ G genericity . . .

We need to prove that they are forced forcing/kernel modes

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 18 / 29

slide-32
SLIDE 32

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing usage : the big picture

We want to prove A1

. . .

An A . Base universe Forcing universe

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 19 / 29

slide-33
SLIDE 33

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing usage : the big picture

We want to prove A1

. . .

An A . Base universe

1

Build the forcing structure Forcing universe

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 19 / 29

slide-34
SLIDE 34

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing usage : the big picture

We want to prove A1

. . .

An A . Base universe

1

Build the forcing structure

2

Assume the premises x1 . . . xn Forcing universe

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 19 / 29

slide-35
SLIDE 35

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing usage : the big picture

We want to prove A1

. . .

An A . Base universe

1

Build the forcing structure

2

Assume the premises x1 . . . xn Forcing universe

3

Lift the premises x1 . . . xn

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 19 / 29

slide-36
SLIDE 36

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing usage : the big picture

We want to prove A1

. . .

An A . Base universe

1

Build the forcing structure

2

Assume the premises x1 . . . xn Forcing universe

3

Lift the premises x1 . . . xn

4

Make the proof (using g/G) t(x1, . . . , xn) : A

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 19 / 29

slide-37
SLIDE 37

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing usage : the big picture

We want to prove A1

. . .

An A . Base universe

1

Build the forcing structure

2

Assume the premises x1 . . . xn

5

Use the forcing translation t∗(x∗

1, . . . , x∗ n) : 1 F A

Forcing universe

3

Lift the premises x1 . . . xn

4

Make the proof (using g/G) t(x1, . . . , xn) : A

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 19 / 29

slide-38
SLIDE 38

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing usage : the big picture

We want to prove A1

. . .

An A . Base universe

1

Build the forcing structure

2

Assume the premises x1 . . . xn

5

Use the forcing translation t∗(x∗

1, . . . , x∗ n) : 1 F A

6

Remove forcing w t∗(x∗

1, . . . , x∗ n) : A

Forcing universe

3

Lift the premises x1 . . . xn

4

Make the proof (using g/G) t(x1, . . . , xn) : A

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 19 / 29

slide-39
SLIDE 39

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Forcing usage : the big picture

We want to prove A1

. . .

An A . Base universe

1

Build the forcing structure

2

Assume the premises x1 . . . xn

5

Use the forcing translation t∗(x∗

1, . . . , x∗ n) : 1 F A

6

Remove forcing w t∗(x∗

1, . . . , x∗ n) : A

7

Extract a witness (classical realizability) Forcing universe

3

Lift the premises x1 . . . xn

4

Make the proof (using g/G) t(x1, . . . , xn) : A

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 19 / 29

slide-40
SLIDE 40

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Outline

1

Formal proof system: PAω+

2

Forcing in PAω+

3

An example of computation by forcing

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 20 / 29

slide-41
SLIDE 41

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Disjunction property and Herbrand’s theorem

Disjunction property (intuitionistic logic) If ∃

  • x. F(

x) is provable, then there exists a closed term t such that F( t) is provable. Herbrand’s theorem (classical logic) If ∃

  • x. F(

x) is provable, then there exists closed terms t1, . . . , tk such that F( t1) ∨ . . . ∨ F( tk) is provable.

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 21 / 29

slide-42
SLIDE 42

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Disjunction property and Herbrand’s theorem

Disjunction property (intuitionistic logic) If ∃

  • x. F(

x) is provable, then there exists a closed term t such that F( t) is provable. Herbrand’s theorem (classical logic) If ∃

  • x. F(

x) is provable, then there exists closed terms t1, . . . , tk such that F( t1) ∨ . . . ∨ F( tk) is provable. To which model correspond each witness?

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 21 / 29

slide-43
SLIDE 43

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Herbrand trees

Definition (Herbrand tree) A Herbrand tree is a finite binary tree such that: inner nodes = atomic formulas branch = partial valuation leaves = witnesses t Example F n := F1 ∨ F2 ∨ F3 F1 := ¬P 3 F2 := P n∧¬P (n+1) F3 := P 6

P 3 P 4 T F₁ F P 5 T F₂ 3 F P 6 T F₂ 4 F F₃ T F₂ 5 F

P 3 F₂ 3 T F₁ F P 4 F P 5 T P 6 T F₂ 4 F F₃ T F₂ 5 F

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 22 / 29

slide-44
SLIDE 44

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Build Herbrand trees by a proof of Herbrand’s theorem

If ∃

  • x. F(

x) is provable, then there exists closed terms t1, . . . , tk such that F( t1) ∨ . . . ∨ F( tk) is provable.

Let us fix an enumeration (ai)i∈N of the atoms.

(atoms = closed atomic formulas)

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 23 / 29

slide-45
SLIDE 45

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Build Herbrand trees by a proof of Herbrand’s theorem

If ∃

  • x. F(

x) is provable, then there exists closed terms t1, . . . , tk such that F( t1) ∨ . . . ∨ F( tk) is provable.

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₄ a₄ a₄

consider the atom-enumerating complete infinite tree

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 23 / 29

slide-46
SLIDE 46

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Build Herbrand trees by a proof of Herbrand’s theorem

If ∃

  • x. F(

x) is provable, then there exists closed terms t1, . . . , tk such that F( t1) ∨ . . . ∨ F( tk) is provable.

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₄ a₄ a₄

pick any infinite branch

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 23 / 29

slide-47
SLIDE 47

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Build Herbrand trees by a proof of Herbrand’s theorem

If ∃

  • x. F(

x) is provable, then there exists closed terms t1, . . . , tk such that F( t1) ∨ . . . ∨ F( tk) is provable.

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₄

w

by hypothesis (and F(−

w) finite), we can cut it at finite depth

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 23 / 29

slide-48
SLIDE 48

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Build Herbrand trees by a proof of Herbrand’s theorem

If ∃

  • x. F(

x) is provable, then there exists closed terms t1, . . . , tk such that F( t1) ∨ . . . ∨ F( tk) is provable.

a₀ a₁ a₂ a₃

w w w w w

1 2 3 4 5

conclude using the fan theorem

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 23 / 29

slide-49
SLIDE 49

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

The interest of forcing here

forcing takes care of the tree structure

  • nly perform the proof on the generic branch

no need to give a priori an order on atoms g is here a generic model i.e. a generic branch

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 24 / 29

slide-50
SLIDE 50

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

The interest of forcing here

forcing takes care of the tree structure

  • nly perform the proof on the generic branch

no need to give a priori an order on atoms g is here a generic model i.e. a generic branch Our forcing structure: 1 specific Cohen real forcing conditions := finite functions from atoms to bool

κ := ι

C[p] := (p : Atom ⇀ Bool) ∧ k p · q := p ∪ q 1 := ∅ G = pairwise compatible conditions

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 24 / 29

slide-51
SLIDE 51

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

The computational content of forcing conditions

C[p] := p : Atom ⇀ Bool ∧ k

p

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 25 / 29

slide-52
SLIDE 52

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Key ingredients of the forcing proof

1

Forcing structure:

contains the Herbrand tree under construction

4

Proof in the forcing universe:

uses only one model: g uses the (classical) proof of ∃

  • x. F(

x) uses the axioms about g: specifically the genericity axiom

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 26 / 29

slide-53
SLIDE 53

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Key ingredients of the forcing proof

1

Forcing structure:

contains the Herbrand tree under construction

4

Proof in the forcing universe:

uses only one model: g uses the (classical) proof of ∃

  • x. F(

x) uses the axioms about g: specifically the genericity axiom actually a weaker form: the totality of g (A) ∀a ∈ Atom. ∃q ∈ G. ∃b ∈ Bool. q(a) = b

5

Realize the axiom A

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 26 / 29

slide-54
SLIDE 54

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

The totality axiom

Used instead of genericity p F ∀a ∈ Atom. ∃q ∈ G. ∃b ∈ Bool. q(a) = b

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 27 / 29

slide-55
SLIDE 55

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

The totality axiom

Used instead of genericity p F ∀a ∈ Atom. ∃q ∈ G. ∃b ∈ Bool. q(a) = b 2 cases:

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 27 / 29

slide-56
SLIDE 56

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

The totality axiom

Used instead of genericity p F ∀a ∈ Atom. ∃q ∈ G. ∃b ∈ Bool. q(a) = b 2 cases: a ∈ p: answer b as in p

p a

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 27 / 29

slide-57
SLIDE 57

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

The totality axiom

Used instead of genericity p F ∀a ∈ Atom. ∃q ∈ G. ∃b ∈ Bool. q(a) = b 2 cases: a ∈ p: answer b as in p a p: we try both true and false

p a

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 27 / 29

slide-58
SLIDE 58

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

The totality axiom

Used instead of genericity p F ∀a ∈ Atom. ∃q ∈ G. ∃b ∈ Bool. q(a) = b 2 cases: a ∈ p: answer b as in p a p: we try both true and false

p a

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 27 / 29

slide-59
SLIDE 59

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

The totality axiom

Used instead of genericity p F ∀a ∈ Atom. ∃q ∈ G. ∃b ∈ Bool. q(a) = b 2 cases: a ∈ p: answer b as in p a p: we try both true and false

p

The program realizing the totality axiom λcaf. let p, t := α c in

if Tottest a′ true p then f (α c) I true∗ I∗ else if Tottest a′ false p then f (α c) I false∗ I∗ else f UpFVal ((a′)+ ∪ p), λu. f UpFVal ((a′)- ∪ p), λv. t (merge a′ u v) I false∗ I∗ I true∗ I∗

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 27 / 29

slide-60
SLIDE 60

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

The totality axiom

Used instead of genericity p F ∀a ∈ Atom. ∃q ∈ G. ∃b ∈ Bool. q(a) = b 2 cases: a ∈ p: answer b as in p a p: we try both true and false

p a

The program realizing the totality axiom λcaf. let p, t := α c in

if Tottest a′ true p then f (α c) I true∗ I∗ else if Tottest a′ false p then f (α c) I false∗ I∗ else f UpFVal ((a′)+ ∪ p), λu. f UpFVal ((a′)- ∪ p), λv. t (merge a′ u v) I false∗ I∗ I true∗ I∗

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 27 / 29

slide-61
SLIDE 61

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

The totality axiom

Used instead of genericity p F ∀a ∈ Atom. ∃q ∈ G. ∃b ∈ Bool. q(a) = b 2 cases: a ∈ p: answer b as in p a p: we try both true and false

p a

The program realizing the totality axiom λcaf. let p, t := α c in

if Tottest a′ true p then f (α c) I true∗ I∗ else if Tottest a′ false p then f (α c) I false∗ I∗ else f UpFVal ((a′)+ ∪ p), λu. f UpFVal ((a′)- ∪ p), λv. t (merge a′ u v) I false∗ I∗ I true∗ I∗

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 27 / 29

slide-62
SLIDE 62

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

The totality axiom

Used instead of genericity p F ∀a ∈ Atom. ∃q ∈ G. ∃b ∈ Bool. q(a) = b 2 cases: a ∈ p: answer b as in p a p: we try both true and false

p a

The program realizing the totality axiom λcaf. let p, t := α c in

if Tottest a′ true p then f (α c) I true∗ I∗ else if Tottest a′ false p then f (α c) I false∗ I∗ else f UpFVal ((a′)+ ∪ p), λu. f UpFVal ((a′)- ∪ p), λv. t (merge a′ u v) I false∗ I∗ I true∗ I∗

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 27 / 29

slide-63
SLIDE 63

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

More insight on the computational content

Realizer of C[p]: zipper with hole

p

Proof in the forcing universe

gives a user-level program no direct access to the forcing condition access to the tree is provided by the axioms on G (mostly A)

Realizer of A performs the extension of the tree + querrying No erasing of the tree (even with backtrack in the forcing proof) G is a “moving set” and g a “moving branch”

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 28 / 29

slide-64
SLIDE 64

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

More insight on the computational content

Realizer of C[p]: zipper with hole

p

Proof in the forcing universe

gives a user-level program no direct access to the forcing condition access to the tree is provided by the axioms on G (mostly A)

Realizer of A performs the extension of the tree + querrying No erasing of the tree (even with backtrack in the forcing proof) G is a “moving set” and g a “moving branch” We can put datatypes inside C[p]

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 28 / 29

slide-65
SLIDE 65

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Conclusion

Practical method for extracting proofs using forcing Extend Curry-Howard correspondence Logic Programs forcing transformation add a memory cell forcing conditions value of the memory cell axioms on G instructions on the memory cell new object g “meaning” of the memory cell One example (Herbrand) where forcing “=” tree library More generally: forcing performs an abstraction barrier Very efficient: datatypes

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 29 / 29

slide-66
SLIDE 66

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Conclusion

Practical method for extracting proofs using forcing Extend Curry-Howard correspondence Logic Programs forcing transformation add a memory cell forcing conditions value of the memory cell axioms on G instructions on the memory cell new object g “meaning” of the memory cell One example (Herbrand) where forcing “=” tree library More generally: forcing performs an abstraction barrier Very efficient: datatypes

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 29 / 29

slide-67
SLIDE 67

Formal proof system: PAω+ Forcing in PAω+ An example of computation by forcing

Conclusion

Practical method for extracting proofs using forcing Extend Curry-Howard correspondence Logic Programs forcing transformation add a memory cell forcing conditions value of the memory cell axioms on G instructions on the memory cell new object g “meaning” of the memory cell One example (Herbrand) where forcing “=” tree library More generally: forcing performs an abstraction barrier Very efficient: datatypes

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 29 / 29

slide-68
SLIDE 68

PAω+: congruence

Reflexivity, symmetry, transitivity and base case M ≈E M M ≈E N N ≈E M M ≈E N N ≈E P M ≈E P (M = N) ∈ E M ≈E N Context closure . . . βηι-conversion (λxτ. M) Nτ ≈E M[Nτ/xτ] x FV(M) λx. M x ≈E M recτ M N 0 ≈E M recτ M N(S P) ≈E N P (recτ M N P) Semantically equivalent propositions ∀xτ∀yσ. A ≈E ∀yσ∀xτ. A x FV(A) ∀xτ. A ≈E A x FV(A) A ⇒ ∀xτ. B ≈E ∀xτ. A ⇒ B M M ֒→ A ≈E A M N ֒→ A ≈E N M ֒→ A M N ֒→ P Q ֒→ A ≈E P Q ֒→ M N ֒→ A A ⇒ M N ֒→ B ≈E M N ֒→ A ⇒ B x FV(M, N) ∀xτ. M N ֒→ A ≈E M N ֒→ ∀xτ. A

Lionel Rieg (Collège de France) Computational interpretation of classical forcing July 22nd, 2016 1 / 2

slide-69
SLIDE 69

Classical realizability interpretation

Sorts

ι := N

  • :=

P (Π) σ → τ := τσ

Terms

xτρ := ρ(x) λx. Mρ :=

v → Mρ,xτ←v

MNρ := Mρ Nρ 0ρ := Sρ :=

n → n + 1

recτρ :=

recτ

A ⇒ Bρ :=

  • t · π
  • t ∈ |A|ρ ∧ π ∈ Bρ
  • ∀xτ.Aρ

:=

  • v∈τ Aρ,xτ←v

M τ N ֒→ Aρ :=        Aρ

if Mρ = Nρ

  • therwise

Truth values

|A|ρ :=

  • t ∈ Λ
  • ∀π ∈ Aρ . t ⋆ π ∈
  • Lionel Rieg (Collège de France)

Computational interpretation of classical forcing July 22nd, 2016 2 / 2