SLIDE 1 Cut elimination for infinitary proofs
Amina Doumane IRIF-Université Paris Diderot August 2016 - CSL Joint work with: David Baelde
LSV-ENS Cachan IRIF-Université Paris 7
SLIDE 2
Introduction
SLIDE 3
Introduction
Inductive and coinductive definitions A natural number is either 0 or the successor of a natural number.
SLIDE 4
Introduction
Inductive and coinductive definitions N = 1 ⊕ N
SLIDE 5
Introduction
Inductive and coinductive definitions N = µX.1⊕X
SLIDE 6
Introduction
Inductive and coinductive definitions N = µX.1⊕X A stream is made of a natural number (head) and a stream (tail).
SLIDE 7
Introduction
Inductive and coinductive definitions N = µX.1⊕X S = N ⊗ S
SLIDE 8
Introduction
Inductive and coinductive definitions N = µX.1⊕X S = νX.N⊗X
SLIDE 9
Introduction
Inductive and coinductive definitions N = µX.1⊕X S = νX.N⊗X
SLIDE 10
Introduction
Inductive and coinductive definitions N = µX.1⊕X S = νX.N⊗X Proofs-programs over these data types double(n) = if n = 0 = succ(succ(double(m))) if n = succ(m)
SLIDE 11 Introduction
Inductive and coinductive definitions N = µX.1⊕X S = νX.N⊗X Proofs-programs over these data types double(n) = if n = 0 = succ(succ(double(m))) if n = succ(m) Πdouble =
(1)
1 ⊢ 1
(⊕1)
1 ⊢ 1⊕N
(µl)
1 ⊢ N Πdouble N ⊢ N
(⊕2)
N ⊢ 1⊕N
(µr)
N ⊢ N
(⊕2)
N ⊢ 1⊕N
(µr)
N ⊢ N (⊕l) 1⊕N ⊢ N
(µl)
N ⊢ N
SLIDE 12 Infinitary (circular) proofs in the litterature
Verification device: Complete deduction sytem giving algorithms for checking validity (Tableaux, sequent calculi) Success → Validity µ-calulus formula → Proof search ր
ց
Failure → Invalidity
SLIDE 13 Infinitary (circular) proofs in the litterature
Verification device: Complete deduction sytem giving algorithms for checking validity (Tableaux, sequent calculi) Success → Validity µ-calulus formula → Proof search ր
ց
Failure → Invalidity Completeness arguments: Intermediate objects between syntax and semantics (Kozen, Kaivola, Walukiewicz) µ-calulus formula → Circular proof → Finite axiomatization
SLIDE 14 Infinitary (circular) proofs in the litterature
Verification device: Complete deduction sytem giving algorithms for checking validity (Tableaux, sequent calculi) Success → Validity µ-calulus formula → Proof search ր
ց
Failure → Invalidity Completeness arguments: Intermediate objects between syntax and semantics (Kozen, Kaivola, Walukiewicz) µ-calulus formula → Circular proof → Finite axiomatization But rarely as proof/programm objects in themselves
SLIDE 15
Structural proof theory
Two main properties: Syntactic cut-elimination
SLIDE 16
Structural proof theory
Two main properties: Syntactic cut-elimination
Motivation: At the heart of proofs-as-programms viewpoint
Focalization
Motivation: Proof search strategy based on the notion of polarity
State of art de la focalization: le nothing peut être provoquant.
SLIDE 17
Structural proof theory
Two main properties: Syntactic cut-elimination
Motivation: At the heart of proofs-as-programms viewpoint State of art: Semantical cut elimination (Brotherstone), Additive fragment (Fortier-Santocanale)
Focalization
Motivation: Proof search strategy based on the notion of polarity State of art: Nothing
State of art de la focalization: le nothing peut être provoquant.
SLIDE 18
Structural proof theory
Two main properties: Syntactic cut-elimination
Motivation: At the heart of proofs-as-programms viewpoint State of art: Semantical cut elimination (Brotherstone), Additive fragment (Fortier-Santocanale)
Focalization
Motivation: Proof search strategy based on the notion of polarity State of art: Nothing
State of art de la focalization: le nothing peut être provoquant.
SLIDE 19
Infinitary proof system µMALL∞
SLIDE 20
Formulas
µMALL∞ formulas
F ::= X | ⊤ |⊥| 0 | 1 | F ⊗F | FF | FF | F ⊕F MALL | µX.F least fixed point | νX.F greatest fixed point µ and ν are dual. Example: ¬(νX.X ⊗X) = µX.XX. Data types encoding Nat := µX.1⊕X Stream(A) := νX.A⊗X
SLIDE 21 Sequent calculus
µMALL∞ pre-proofs are the trees coinductively generated by:
Usual logical rules
⊢ Γ,F ⊢ ∆,G
(⊗)
⊢ Γ,∆,F ⊗G ⊢ Γ,F,G
()
⊢ Γ,FG ⊢ Γ,F ⊢ Γ,G
()
⊢ Γ,FG ⊢ Γ,Fi
(⊕i)
⊢ Γ,F1 ⊕F2
Identity rules
(ax)
⊢ F,¬F ⊢ Γ,F ⊢ ∆,¬F
(cut)
⊢ Γ,∆
Rules for µ and ν
⊢ Γ,F[µX.F/X]
(µ)
⊢ Γ,µX.F ⊢ Γ,F[νX.F/X]
(ν)
⊢ Γ,νX.F
SLIDE 22 Sequent calculus
. . .
(µ)
⊢ µX.X
(µ)
⊢ µX.X . . .
(ν)
⊢ νX.X,F
(ν)
⊢ νX.X,F
(cut)
⊢ F
SLIDE 23 Sequent calculus
. . .
(µ)
⊢ µX.X
(µ)
⊢ µX.X . . .
(ν)
⊢ νX.X,F
(ν)
⊢ νX.X,F
(cut)
⊢ F Pre-proofs are unsound, hence the need for a validity condition.
SLIDE 24 Sequent calculus
. . .
(µ)
⊢ µX.X
(µ)
⊢ µX.X . . .
(ν)
⊢ νX.X,F
(ν)
⊢ νX.X,F
(cut)
⊢ F Pre-proofs are unsound, hence the need for a validity condition.
Validity condition
A proof is a pre-proof such that every infinite branch must unfold a ν formula infinitly often.
SLIDE 25
Focalization
SLIDE 26 Focalization in MALL
Idea: classify the connectives into 2 categories Negative connectives: Invertible connectives ie. we don’t lose provability by applying these rules (,). If ⊢ Γ,AB is provable then ⊢ Γ,A,B is also provable. Positive connectives: Non Invertible connectives ie. there is a choice to make, a bad choice may lead to a loss of provability (⊕,⊗).
⊢ ⊥
(⊕)
⊢ ⊤⊕⊥ ⊢ X ⊢ 1,X ⊥
(⊗)
⊢ X ⊗1,X ⊥
SLIDE 27 Focalization in MALL
To prove a sequent Γ, apply the following:
Γ contains a negative formula Γ contains no negative formula choose a negative choose some positive formula and formula and apply the unique decompose it hereditarily until negative rule available. negative subformulas are reached.
(ax)
⊢ B,B⊥
(⊕)
⊢ B,D ⊕B⊥
(ax)
⊢ C,C⊥
(⊕)
⊢ C,D ⊕C⊥
(⊗)
⊢ B ⊗C,D ⊕B⊥,D ⊕C⊥
(⊕)
⊢ A⊕(B ⊗C),D ⊕B⊥,D ⊕C⊥
()
⊢ A⊕(B ⊗C),(D ⊕B⊥)(D ⊕C⊥)
SLIDE 28 Focalization in MALL
To prove a sequent Γ, apply the following:
Γ contains a negative formula Γ contains no negative formula choose a negative choose some positive formula and formula and apply the unique decompose it hereditarily until negative rule available. negative subformulas are reached.
(ax)
⊢ B,B⊥
(⊕)
⊢ B,D ⊕B⊥
(ax)
⊢ C,C⊥
(⊕)
⊢ C,D ⊕C⊥
(⊗)
⊢ B ⊗C,D ⊕B⊥,D ⊕C⊥
()
⊢ B ⊗C,(D ⊕B⊥)(D ⊕C⊥)
(⊕)
⊢ A⊕(B ⊗C),(D ⊕B⊥)(D ⊕C⊥)
SLIDE 29 Focalization in MALL
To prove a sequent Γ, apply the following:
Γ contains a negative formula Γ contains no negative formula choose a negative choose some positive formula and formula and apply the unique decompose it hereditarily until negative rule available. negative subformulas are reached.
(ax)
⊢ B,B⊥
(ax)
⊢ C,C⊥
(⊕)
⊢ C,D ⊕C⊥
(⊗)
⊢ B ⊗C,B⊥,D ⊕C⊥
(⊕)
⊢ B ⊗C,B⊥,D ⊕C⊥
(⊕)
⊢ A⊕(B ⊗C),D ⊕B⊥,D ⊕C⊥
()
⊢ A⊕(B ⊗C),(D ⊕B⊥)(D ⊕C⊥)
SLIDE 30 Focalization for µMALL
Classification of connectives ν is classified negative and µ is classified positive, even though both are invertible. If µ is classified negative, we would have ⊢ . . .
(µ)
⊢ ⊤⊗⊤,µX.X
(µ)
⊢ ⊤⊗⊤,µX.X ... which is not a valid proof.
SLIDE 31 Proof of completeness of Focalization for MALL
Transforms a MALL proof into a focused proof by using: Strong commutation of Negatives: negative connectives commute down with all other connectives. Exemple: (/)
⊢ F,P,Q
()
⊢ F,PQ ⊢ G,P,Q
()
⊢ G,PQ
()
⊢ FG,PQ → ⊢ F,P,Q ⊢ G,P,Q
()
⊢ FG,P,Q
()
⊢ FG,PQ
Weak commutation of positives: positive connectives commute with each others only. Exemple: (⊕/⊕)
⊢ G,P,Γ
(⊕)
⊢ G,P ⊕Q,Γ
(⊕)
⊢ F ⊕G,P ⊕Q,Γ → ⊢ G,P,Γ
(⊕)
⊢ F ⊕G,P,Γ
(⊕)
⊢ F ⊕G,P ⊕Q,Γ
SLIDE 32 Proof of completeness of Focalization for µMALL
Works in the same way, under some adaptations. Rules commutations cannot be performed locally:
(⋆) ⊢ F,PQ π ⊢ F,P,Q
()
⊢ F,PQ
()
⊢ FF,PQ ⊢ F,PQ π ⊢ F,P,Q
()
⊢ F,PQ
()
⊢ FF,PQ
(ν)
(⋆) ⊢ F,PQ
The commutation process is productive. The commutation process preserves validity.
SLIDE 33
Cut elimination
SLIDE 34 Cut elimination procedure
Strategy: “push” the cuts away from the root. Cut-Cut: ⊢ Γ,F ⊢ ¬F,∆,G
(cut)
⊢ Γ,∆,G ⊢ ¬G,Σ
(cut)
⊢ Γ,∆,Σ
⊢ ¬F,∆,G ⊢ ¬G,Σ
(cut)
⊢ ¬F,∆,Σ
(cut)
⊢ Γ,∆,Σ
SLIDE 35 Cut elimination procedure
Strategy: “push” the cuts away from the root. Cut-Cut: ⊢ Γ,F ⊢ ¬F,∆,G
(cut)
⊢ Γ,∆,G ⊢ ¬G,Σ
(cut)
⊢ Γ,∆,Σ ↓ ⊢ Γ,F ⊢ ¬F,∆,G ⊢ ¬G,Σ
(m-cut)
⊢ Γ,∆,Σ
SLIDE 36 Cut elimination procedure - External operations
⊢ ∆,F,G
()
⊢ ∆,FG ...
(m-cut)
⊢ Σ,FG ⇒ ⊢ ∆,F,G ...
(m-cut)
⊢ Σ,F,G
()
⊢ Σ,FG ⊢ ∆,F ⊢ ∆,G
()
⊢ ∆,FG ...
(m-cut)
⊢ Σ,FG ⇒ ⊢ ∆,F ...
(m-cut)
⊢ Σ,F ⊢ ∆,G ...
(m-cut)
⊢ Σ,G
()
⊢ Σ,FG ⊢ ∆,F[µX.F/X]
(µ)
⊢ ∆,µX.F ...
(m −cut)
⊢ Σ,µX.F ⇒ ⊢ ∆,F[µX.F/X] ...
(m −cut)
⊢ Σ,F[µX.F/X]
(µ)
⊢ Σ,µX.F
External operations are productive
SLIDE 37 Cut elimination procedure - Internal operations
... ⊢ ∆,F2 ⊢ ∆,F1
()
⊢ ∆,F2F1 ⊢ Γ,F ⊥
i (⊕i)
⊢ Γ,F ⊥
1 ⊕F ⊥ 2 (m-cut)
⊢ Σ ⇒ ... ⊢ ∆,Fi ⊢ Γ,F ⊥
i (m-cut)
⊢ Σ ... ⊢ ∆,F[µX.F/X]
(µ)
⊢ ∆,µX.F ⊢ Γ,F ⊥[νX.F ⊥/X]
(ν)
⊢ Γ,νX.F ⊥
(m-cut)
⊢ Σ ⇒ ... ⊢ ∆,F[µX.F/X] ⊢ Γ,F ⊥[νX.F ⊥/X]
(m-cut)
⊢ Σ
Internal operations are not productive
SLIDE 38
Cut elimination algorithm
Internal phase: Perform internal transformations while you can’t do anything else. External phase: Build a part of the output tree whenever you can.
SLIDE 39
Cut elimination algorithm
Internal phase: Perform internal transformations while you can’t do anything else. External phase: Build a part of the output tree whenever you can. Repeat.
SLIDE 40
Cut elimination algorithm
Internal phase: Perform internal transformations while you can’t do anything else. External phase: Build a part of the output tree whenever you can. Repeat.
SLIDE 41
Cut elimination is productive
Theorem
Internal phase always halts.
SLIDE 42
Cut elimination is productive
Theorem
Internal phase always halts. Proof sketch: Suppose that the internal phase diverges for a proof π of ⊢ ∆. Let θ be the sub-derivation of π explored by the reduction. Extract from θ a proof of the empty sequent. We define a truth semantics for µMALL∞ formulas and show that the proof system is sound with respect to it. Contradiction.
SLIDE 43
Cut elimination produces a proof
Theorem
The pre-proof obtained by the cut elimination algorithm is valid. Follows the same proof idea.
SLIDE 44
Conclusion
SLIDE 45
Conclusion
Contributions:
Proper foundations for infinitary proof theory Syntactic cut elimination and Focalization
Future work:
Go beyond Linear Logic and handle structural rules Translate infinitrary proofs to finitary ones Same question by preserving the computational content
SLIDE 46
Conclusion
Contributions:
Proper foundations for infinitary proof theory Syntactic cut elimination and Focalization
Future work:
Go beyond Linear Logic and handle structural rules Translate infinitrary proofs to finitary ones Same question by preserving the computational content
Thank you for your attention!