Computational Interpretations of Classical Linear Logic
Computational Interpretations of Classical Linear Logic Paulo Oliva Queen Mary, University of London, UK (
[email protected])
WoLLIC, Rio de Janeiro 4 July 2007
Computational Interpretations of Classical Linear Logic
Outline 1
Introduction Functional Interpretations of IL Linear Logic
2
Functional Interpretation of LL Motivation: Games The Interpretation Relation to Interpretations of IL
3
Conclusions Characterisation Summary
Computational Interpretations of Classical Linear Logic Introduction
Outline 1
Introduction Functional Interpretations of IL Linear Logic
2
Functional Interpretation of LL Motivation: Games The Interpretation Relation to Interpretations of IL
3
Conclusions Characterisation Summary
Computational Interpretations of Classical Linear Logic Introduction Functional Interpretations of IL
Proof Interpretations (
Syntax e.g. “blue car”
⇒
Semantics real blue cars
)
Computational Interpretations of Classical Linear Logic Introduction Functional Interpretations of IL
Proof Interpretations (
Syntax e.g. “blue car”
(
Syntax e.g. Java
⇒
⇒
Semantics
)
real blue cars Syntax Machine code
)
Computational Interpretations of Classical Linear Logic Introduction Functional Interpretations of IL
Proof Interpretations (
Syntax e.g. “blue car”
(
Syntax e.g. Java
Proofs e.g. CL e.g. PA
⇒
⇒
⇒
Semantics
)
real blue cars Syntax
)
Machine code Proofs IL PRA
Computational Interpretations of Classical Linear Logic Introduction Functional Interpretations of IL
Functional Interpretations
Formula A
⇒ Set of functionals |A|
Computational Interpretations of Classical Linear Logic Introduction Functional Interpretations of IL
Functional Interpretations
Formula A
Proof π
⇒ Set of functionals |A|
⇒ Functional fπ ∈ |A|
Computational Interpretations of Classical Linear Logic Introduction Functional Interpretations of IL
Functional Interpretations
Formula A
⇒ Set of functionals |A|
Proof π
⇒ Functional fπ ∈ |A|
S 1 `π A
⇒ S2 ` fπ ∈ |A|
Computational Interpretations of Classical Linear Logic Introduction Functional Interpretations of IL
Functional Interpretations
Formula A ∀x∃y(y > x)
⇒ Set of functionals |A| {f : f x > x}
Proof π
⇒ Functional fπ ∈ |A|
S 1 `π A
⇒ S2 ` fπ ∈ |A|
Computational Interpretations of Classical Linear Logic Introduction Functional Interpretations of IL
Functional Interpretations
Formula A ∀x∃y(y > x) Proof π ... S 1 `π A
⇒ Set of functionals |A| {f : f x > x} ⇒ Functional fπ ∈ |A| λx.x + 1 ⇒ S2 ` fπ ∈ |A|
Computational Interpretations of Classical Linear Logic Introduction Functional Interpretations of IL
Functional Interpretations Dialectica G¨odel 1958 Relative consistency of arithmetic
Computational Interpretations of Classical Linear Logic Introduction Functional Interpretations of IL
Functional Interpretations Dialectica G¨odel 1958 Relative consistency of arithmetic ( Falsity interpreted as empty set (| ⊥ | ≡ ∅) PA `⊥ ⇒
PRAω ` ∃f (f ∈ ∅)
Computational Interpretations of Classical Linear Logic Introduction Functional Interpretations of IL
Functional Interpretations Dialectica G¨odel 1958 Relative consistency of arithmetic ( Falsity interpreted as empty set (| ⊥ | ≡ ∅) PA `⊥ ⇒
PRAω ` ∃f (f ∈ ∅)
Modified realizability Kreisel 1959 Independence results for IL
Computational Interpretations of Classical Linear Logic Introduction Functional Interpretations of IL
Functional Interpretations Dialectica G¨odel 1958 Relative consistency of arithmetic ( Falsity interpreted as empty set (| ⊥ | ≡ ∅) PA `⊥ ⇒
PRAω ` ∃f (f ∈ ∅)
Modified realizability Kreisel 1959 Independence results for IL ( |P | set of non-computable functionals IL ` P
⇒
IL ` ∃f (f ∈ |P |)
Computational Interpretations of Classical Linear Logic Introduction Functional Interpretations of IL
Functional Interpretations G¨odel’s Dialectica interpretation Kreisel’s modified realizability Diller-Nahm interpretation Stein’s family of interpretations Monotone variants of the above (Kohlenbach) Bounded Dialectica interpretation (Ferreira/O.) Bounded modified realizability (Ferreira) ...
Computational Interpretations of Classical Linear Logic Introduction Functional Interpretations of IL
Functional Interpretations G¨odel’s Dialectica interpretation Kreisel’s modified realizability Diller-Nahm interpretation Stein’s family of interpretations Monotone variants of the above (Kohlenbach) Bounded Dialectica interpretation (Ferreira/O.) Bounded modified realizability (Ferreira) ...
Computational Interpretations of Classical Linear Logic Introduction Functional Interpretations of IL
Functional Interpretations G¨odel’s Dialectica interpretation Kreisel’s modified realizability Diller-Nahm interpretation Stein’s family of interpretations Monotone variants of the above (Kohlenbach) Bounded Dialectica interpretation (Ferreira/O.) Bounded modified realizability (Ferreira) ...
Computational Interpretations of Classical Linear Logic Introduction Functional Interpretations of IL
Functional Interpretations G¨odel’s Dialectica interpretation Kreisel’s modified realizability Diller-Nahm interpretation Stein’s family of interpretations Monotone variants of the above (Kohlenbach) Bounded Dialectica interpretation (Ferreira/O.) Bounded modified realizability (Ferreira) ...
Computational Interpretations of Classical Linear Logic Introduction Functional Interpretations of IL
Functional Interpretations G¨odel’s Dialectica interpretation Kreisel’s modified realizability Diller-Nahm interpretation Stein’s family of interpretations Monotone variants of the above (Kohlenbach) Bounded Dialectica interpretation (Ferreira/O.) Bounded modified realizability (Ferreira) ...
Computational Interpretations of Classical Linear Logic Introduction Functional Interpretations of IL
Goal
Understand different functional interpretations
Computational Interpretations of Classical Linear Logic Introduction Functional Interpretations of IL
Goal
Understand different functional interpretations Functional interpretation of a refinement of IL
Computational Interpretations of Classical Linear Logic Introduction Functional Interpretations of IL
Goal
Understand different functional interpretations Functional interpretation of a refinement of IL Linear logic
Computational Interpretations of Classical Linear Logic Introduction Linear Logic
Linear Logic (Girard 1987) Explicit treatment of contraction Γ, A, A ` B Γ, A ` B
⇒
Γ, !A, !A ` B Γ, !A ` B
Computational Interpretations of Classical Linear Logic Introduction Linear Logic
Linear Logic (Girard 1987) Explicit treatment of contraction Γ, A, A ` B Γ, A ` B
⇒
Γ, !A, !A ` B Γ, !A ` B
Refinement of intuitionistic implication A→B
≡ !A ( B
Computational Interpretations of Classical Linear Logic Introduction Linear Logic
Linear Logic (Girard 1987) Explicit treatment of contraction Γ, A, A ` B Γ, A ` B
⇒
Γ, !A, !A ` B Γ, !A ` B
Refinement of intuitionistic implication A→B
≡ !A ( B
Refinement of logical connectives conjunction disjunction additive
∧
multiplicative
⊗
∨ O
Computational Interpretations of Classical Linear Logic Introduction Linear Logic
Linear Logic: Duality (A ∨ B)⊥ ≡ A⊥ ∧ B ⊥
(∃zA)⊥ ≡ ∀zA⊥
(A ∧ B)⊥ ≡ A⊥ ∨ B ⊥
(∀zA)⊥ ≡ ∃zA⊥
Computational Interpretations of Classical Linear Logic Introduction Linear Logic
Linear Logic: Duality (A ∨ B)⊥ ≡ A⊥ ∧ B ⊥
(∃zA)⊥ ≡ ∀zA⊥
(A ∧ B)⊥ ≡ A⊥ ∨ B ⊥
(∀zA)⊥ ≡ ∃zA⊥
(A O B)⊥ ≡ A⊥ ⊗ B ⊥
(?A)⊥ ≡ !(A⊥ )
(A ⊗ B)⊥ ≡ A⊥ O B ⊥
(!A)⊥
≡ ?(A⊥ )
Computational Interpretations of Classical Linear Logic Introduction Linear Logic
Linear Logic: Duality (A ∨ B)⊥ ≡ A⊥ ∧ B ⊥
(∃zA)⊥ ≡ ∀zA⊥
(A ∧ B)⊥ ≡ A⊥ ∨ B ⊥
(∀zA)⊥ ≡ ∃zA⊥
(A O B)⊥ ≡ A⊥ ⊗ B ⊥
(?A)⊥ ≡ !(A⊥ )
(A ⊗ B)⊥ ≡ A⊥ O B ⊥
(!A)⊥
A ( B ≡ A⊥ O B AOB
≡ A⊥ ( B
≡ ?(A⊥ )
Computational Interpretations of Classical Linear Logic Introduction Linear Logic
Linear Logic: Structural
Γ ` A ∆, A ` B (cut) Γ, ∆ ` B Γ, A ` B (⊥) Γ, B ⊥ ` A⊥
A`A
(id)
Γ`A (per) π{Γ} ` A
Computational Interpretations of Classical Linear Logic Introduction Linear Logic
Linear Logic: Structural
Γ ` A ∆, A ` B (cut) Γ, ∆ ` B Γ, A ` B (⊥) Γ, B ⊥ ` A⊥
A`A
(id)
Γ`A (per) π{Γ} ` A
Computational Interpretations of Classical Linear Logic Introduction Linear Logic
Linear Logic: Connectives and Quantifiers
Γ`A Γ`B Γ`A∧B
Γ`A Γ`A∨B
Γ`A ∆`B Γ, ∆ ` A ⊗ B
Γ, A ` B Γ`A(B
Γ`A Γ ` ∀zA
Γ ` A[t/z] Γ ` ∃zA
Computational Interpretations of Classical Linear Logic Introduction Linear Logic
Linear Logic: Connectives and Quantifiers
Γ`A Γ`B Γ`A∧B
Γ`A Γ`A∨B
Γ`A ∆`B Γ, ∆ ` A ⊗ B
Γ, A ` B Γ`A(B
Γ`A Γ ` ∀zA
Γ ` A[t/z] Γ ` ∃zA
Computational Interpretations of Classical Linear Logic Introduction Linear Logic
Linear Logic: Modalities
Γ`B Γ, !A, !A ` B (con) (wkn) Γ, !A ` B Γ, !A ` B !Γ ` A (!) !Γ ` !A
Γ`A (?) Γ ` ?A
Computational Interpretations of Classical Linear Logic Functional Interpretation of LL
Outline 1
Introduction Functional Interpretations of IL Linear Logic
2
Functional Interpretation of LL Motivation: Games The Interpretation Relation to Interpretations of IL
3
Conclusions Characterisation Summary
Mathematicians are happy with proof or counter-example
Mathematicians are happy with proof or counter-example
Mathematics is like a game, mathematicians are always winners because they play both roles
Mathematicians are happy with proof or counter-example
Mathematics is like a game, mathematicians are always winners because they play both roles
View a mathematical statement as the description of a game
∀n ≥ 2 ∃x, y, z(
4 1 1 1 = + + ) n x y z Paul Erd¨os
∀n ≥ 2 ∃x, y, z(
4 1 1 1 = + + ) n x y z Paul Erd¨os
f0 , f1 , f2 : N → N∗
n ∈ {2, . . .}
∀n ≥ 2 ∃x, y, z(
4 1 1 1 = + + ) n x y z Paul Erd¨os
f0 , f1 , f2 : N → N∗
n ∈ {2, . . .}
4 1 1 1 = + + n f0 (n) f1 (n) f2 (n)
Games: Formal Description Game G ≡ (D1 , D2 , R ⊆ D1 × D2 )
Games: Formal Description Game G ≡ (D1 , D2 , R ⊆ D1 × D2 ) Two players Eloise and Abelard Two domains of moves x ∈ D1 and y ∈ D2
Games: Formal Description Game G ≡ (D1 , D2 , R ⊆ D1 × D2 ) Two players Eloise and Abelard Two domains of moves x ∈ D1 and y ∈ D2 Adjudication of Winner Relation R(x, y) between players’ moves (usually |G|xy )
Computational Interpretations of Classical Linear Logic Functional Interpretation of LL Motivation: Games
Games: Examples Domain 1
Domain 2
Adjudication
x ∈ {0, 1, 2}
y ∈ {0, 1, 2}
x + 1 = y mod 3
Computational Interpretations of Classical Linear Logic Functional Interpretation of LL Motivation: Games
Games: Examples Domain 1
Domain 2
Adjudication
x ∈ {0, 1, 2}
y ∈ {0, 1, 2}
x + 1 = y mod 3
x ∈ {0, . . . , 5} y ∈ {0, . . . , 5}
x + y is even
Computational Interpretations of Classical Linear Logic Functional Interpretation of LL Motivation: Games
Games: Examples Domain 1
Domain 2
Adjudication
x ∈ {0, 1, 2}
y ∈ {0, 1, 2}
x + 1 = y mod 3
x ∈ {0, . . . , 5} y ∈ {0, . . . , 5} x∈N
y∈N
x + y is even x≥y
Computational Interpretations of Classical Linear Logic Functional Interpretation of LL Motivation: Games
Games: Examples Domain 1
Domain 2
Adjudication
x ∈ {0, 1, 2}
y ∈ {0, 1, 2}
x + 1 = y mod 3
x ∈ {0, . . . , 5} y ∈ {0, . . . , 5}
x + y is even
x∈N
y∈N
x≥y
f ∈N→N
y∈N
f (y) ≥ y
Computational Interpretations of Classical Linear Logic Functional Interpretation of LL Motivation: Games
Games: Examples Domain 1
Domain 2
Adjudication
x ∈ {0, 1, 2}
y ∈ {0, 1, 2}
x + 1 = y mod 3
x ∈ {0, . . . , 5} y ∈ {0, . . . , 5}
x + y is even
x∈N
y∈N
x≥y
f ∈N→N
y∈N
f (y) ≥ y
fi ∈ N → N∗
n≥2
4 n
=
1 f0 n
+
1 f1 n
+
1 f2 n
Computational Interpretations of Classical Linear Logic Functional Interpretation of LL Motivation: Games
Goal
A is true (is provable) iff Eloise has winning move in game |A|xy
Computational Interpretations of Classical Linear Logic Functional Interpretation of LL Motivation: Games
Symmetry
Game A⊥ should be game A with roles reversed |A⊥ |xy ≡ ¬|A|yx |(A⊥ )⊥ |xy ≡ |A|xy
Computational Interpretations of Classical Linear Logic Functional Interpretation of LL The Interpretation
Interpretation
|A ⊗ B|x,v f,g
:≡ |A|xfv and |B|vgx
Computational Interpretations of Classical Linear Logic Functional Interpretation of LL The Interpretation
Interpretation
|A ⊗ B|x,v f,g
:≡ |A|xfv and |B|vgx
x gx |A ( B|f,g x,w :≡ |A|f w implies |B|w
Computational Interpretations of Classical Linear Logic Functional Interpretation of LL The Interpretation
Interpretation
|A ⊗ B|x,v f,g
:≡ |A|xfv and |B|vgx
x gx |A ( B|f,g x,w :≡ |A|f w implies |B|w
|∀zA(z)|fy,z
:≡ |A(z)|fy z
Computational Interpretations of Classical Linear Logic Functional Interpretation of LL The Interpretation
Interpretation
|A ⊗ B|x,v f,g
:≡ |A|xfv and |B|vgx
x gx |A ( B|f,g x,w :≡ |A|f w implies |B|w
|∀zA(z)|fy,z
:≡ |A(z)|fy z
|∃zA(z)|x,z f
:≡ |A(z)|xfz
Exponential Games One of the players plays first (break symmetry)
Exponential Games One of the players plays first (break symmetry) The other player responds with (multiple copies of game)
Exponential Games One of the players plays first (break symmetry) The other player responds with (multiple copies of game) (1) unlimited number of copies ( |!A|x :≡ ∀y|A|xy |?A|y :≡ ∃x|A|xy
Exponential Games One of the players plays first (break symmetry) The other player responds with (multiple copies of game) (1) unlimited number of copies ( |!A|x :≡ ∀y|A|xy |?A|y :≡ ∃x|A|xy (2) finitely many copies ( |!A|x :≡ ∀y ∈ f x|A|xy |?A|y :≡ ∃x ∈ f y|A|xy
Exponential Games One of the players plays first (break symmetry) The other player responds with (multiple copies of game) (1) unlimited number of copies ( |!A|x :≡ ∀y|A|xy |?A|y :≡ ∃x|A|xy (2) finitely many copies ( |!A|x :≡ ∀y ∈ f x|A|xy |?A|y :≡ ∃x ∈ f y|A|xy (3) no copying allowed (make single move) ( |!A|xf :≡ |A|xfx |?A|fy :≡ |A|fy y
Computational Interpretations of Classical Linear Logic Functional Interpretation of LL The Interpretation
Soundness Theorem If Γ ` A is provable in linear logic then Eloise wins game Γ ( A
Computational Interpretations of Classical Linear Logic Functional Interpretation of LL The Interpretation
Soundness Theorem If Γ ` A is provable in linear logic then Eloise wins game Γ ( A , i.e. she has moves t, r such that for all v, y |Γ|vr(y) ` |A|t(v) y
IL
Q Q Q Q
?
Q Q
(·)
Q Q Q ?
LL
Q Q s Q -
G
Modified realizability IL Q
(Kreisel’1959)
Q Q Q ?
Q Q
(·)
Q Q Q Q Q s Q -
?
LL
(1) ∀y|A|xy
G
Diller-Nahm interpretation (Diller-Nahm’1974) Modified realizability IL Q
(Kreisel’1959)
Q Q Q ?
Q Q
(·)
Q Q Q Q Q s Q -
?
LL
(1) ∀y|A|xy (2) ∀y ∈ f x |A|xy
G
Dialectica interpretation
(G¨odel’1958)
Diller-Nahm interpretation (Diller-Nahm’1974) Modified realizability IL Q
(Kreisel’1959)
Q Q Q ?
Q Q
(·)
Q Q Q Q Q s Q -
?
LL
(1) ∀y|A|xy (2) ∀y ∈ f x |A|xy (3) |A|xfx
G
Computational Interpretations of Classical Linear Logic Functional Interpretation of LL Relation to Interpretations of IL
Parametrised Interpretation ∗
∗
Bounded quantifiers ∀xρ @ aρ A and ∃xρ @ aρ A (∀x @ a A)⊥ ≡ ∃x @ a A⊥ (∃x @ a A)⊥ ≡ ∀x @ a A⊥ Parametrised interpretation: |!A|xf :≡ ∀y @ f x |A|xy |?A|fy :≡ ∃x @ f y |A|xy
Computational Interpretations of Classical Linear Logic Functional Interpretation of LL Relation to Interpretations of IL
Parametrised Interpretation Γ`B Γ, !A ` B Γ, !A, !A ` B Γ, !A ` B
cA :
ρ∗
εA : ρ∗ × ρ∗ ,→
ρ∗
Γ`A Γ `?A
ηA :
ρ∗
!Γ ` A !Γ `!A
µA : ρ → τ ∗ ,→ ρ∗ → τ ∗
ρ
,→
Computational Interpretations of Classical Linear Logic Conclusions
Outline 1
Introduction Functional Interpretations of IL Linear Logic
2
Functional Interpretation of LL Motivation: Games The Interpretation Relation to Interpretations of IL
3
Conclusions Characterisation Summary
Computational Interpretations of Classical Linear Logic Conclusions Characterisation
Characterisation
We have seen that if A is provable in LL then Eloise has a winning move
Computational Interpretations of Classical Linear Logic Conclusions Characterisation
Characterisation
We have seen that if A is provable in LL then Eloise has a winning move What about the other way around?
Computational Interpretations of Classical Linear Logic Conclusions Characterisation
Characterisation
We have seen that if A is provable in LL then Eloise has a winning move What about the other way around? For which extension of LL do we have the converse?
Computational Interpretations of Classical Linear Logic Conclusions Characterisation
Characterisation (modified realizability) |A ⊗ B|x,v f,g
:≡ |A|xfv ⊗ |B|vgx
x gx |A ( B|f,g x,w :≡ |A|f w ( |B|w
|∀zA(z)|fy,z
:≡ |A(z)|fy z
|∃zA(z)|x,z f
:≡ |A(z)|xfz
|!A|x
:≡ !∀y|A|xy
|?A|y
:≡ ?∃x|A|xy
Computational Interpretations of Classical Linear Logic Conclusions Characterisation
Characterisation (modified realizability) t[v]
|Γ|vr[y] ` |A|y
Computational Interpretations of Classical Linear Logic Conclusions Characterisation
Characterisation (modified realizability) t[v]
|Γ|vr[y] ` |A|y
∀w∃v|Γ|vw `
∃x∀y|A|xy
Computational Interpretations of Classical Linear Logic Conclusions Characterisation
Characterisation (modified realizability) t[v]
|Γ|vr[y] ` |A|y
axiom
v ∀w∃v|Γ|w ` ∃x∀y|A|xy
Computational Interpretations of Classical Linear Logic Conclusions Characterisation
Characterisation (modified realizability) t[v]
|Γ|vr[y] ` |A|y
axiom
v ∀w∃v|Γ|w ` ∃x∀y|A|xy
J J J J J ^ J
∃v∀w|Γ|vw ` ∀y∃x|A|xy
Computational Interpretations of Classical Linear Logic Conclusions Characterisation
Characterisation (modified realizability) t[v]
|Γ|vr[y] ` |A|y
axiom
v ∀w∃v|Γ|w ` ∃x∀y|A|xy
J J J cut rule J J ^ J ∃v∀w|Γ|vw ` ∀y∃x|A|xy
Computational Interpretations of Classical Linear Logic Conclusions Characterisation
Characterisation (modified realizability) t[v]
|Γ|vr[y] ` |A|y
axiom
v ∀w∃v|Γ|w ` ∃x∀y|A|xy
J J J cut rule J J ^ J ∃v∀w|Γ|vw ` ∀y∃x|A|xy ?
`
x x y |A|y
Æ
v v w |Γ|w
Æ
Computational Interpretations of Classical Linear Logic Conclusions Characterisation
Simultaneous Quantifier
Æ
A0 (a0 , y0 ), . . . , An (an , yn ) x0 xn y0 A0 (x0 , y0 ), . . . , yn An (xn , yn )
( )
Æ
Æ
yi may only appear free in the terms aj , for j 6= i
Computational Interpretations of Classical Linear Logic Conclusions Characterisation
Simultaneous Quantifier
Æ
A0 (a0 , y0 ), . . . , An (an , yn ) x0 xn y0 A0 (x0 , y0 ), . . . , yn An (xn , yn )
( )
Æ
Æ
yi may only appear free in the terms aj , for j 6= i (x = y), (x 6= y) ( ) = y), xy (x 6= y) Æ
Æ
x y (x
Æ
New Principles f y,z A(f z, y, z)
Æ
Sequential choice ∀z yx A(x, y, z) ( Æ
New Principles f y,z A(f z, y, z)
Æ
Æ
Parallel choice x v y A(x) O w B(v) (
f,g y,w (A(f w)
Æ
Sequential choice ∀z yx A(x, y, z) (
O B(gy))
Æ
Æ
New Principles f y,z A(f z, y, z)
Æ
Æ
Parallel choice x v y A(x) O w B(v) ( Æ
Æ
Trump advantage ! yx A ( ∃x!∀yA
f,g y,w (A(f w)
Æ
Sequential choice ∀z yx A(x, y, z) (
O B(gy))
Æ
New Principles f y,z A(f z, y, z)
Æ
Æ
Parallel choice x v y A(x) O w B(v) (
f,g y,w (A(f w)
Æ
Sequential choice ∀z yx A(x, y, z) (
O B(gy))
Æ
Æ
Trump advantage ! yx A ( ∃x!∀yA Æ
Theorem These are sufficient for deriving the equivalence between A and its interpretation yx |A|xy . Æ
Computational Interpretations of Classical Linear Logic Conclusions Summary
Summary
Functional interpretations of linear logic Usual interpretations of IL derivable
Interesting use of (simple) branching quantifier Characterisation using branching quantifier
Sound extensions of linear logic