SlideShare a Scribd company logo
Proving decidability
of Intuitionistic Propositional Calculus
                 on Coq
           Masaki Hara (qnighy)
       University of Tokyo, first grade
           Logic Zoo 2013 にて
1. Task & Known results
2. Brief methodology of the proof
  1.   Cut elimination
  2.   Contraction elimination
  3.   → 𝐿 elimination
  4.   Proof of strictly-decreasingness
3. Implementation detail
4. Further implementation plan
Task
• Proposition: 𝐴𝑡𝑜𝑚 𝑛 , ∧, ∨, →, ⊥
• Task: Is given propositional formula P provable
  in LJ?
  – It’s known to be decidable. [Dyckhoff]


• This talk: how to prove this decidability on
  Coq
Known results
• Decision problem on IPC is PSPACE complete
  [Statman]
  – Especially, O(N log N) space decision procedure is
    known [Hudelmaier]
• These approaches are backtracking on LJ
  syntax.
Known results
• cf. classical counterpart of this problem is
  co-NP complete.
  – Proof: find counterexample in boolean-valued
    semantics (SAT).
methodology
• To prove decidability, all rules should be
  strictly decreasing on some measuring.
                                 𝑆1 ,𝑆2 ,…,𝑆 𝑁
• More formally, for all rules                   𝑟𝑢𝑙𝑒
                                       𝑆0
  and all number 𝑖 (1 ≤ 𝑖 ≤ 𝑁),
                     𝑆 𝑖 < 𝑆0
   on certain well-founded relation <.
methodology
1.   Eliminate cut rule of LJ
2.   Eliminate contraction rule
3.   Split → 𝑳 rule into 4 pieces
4.   Prove that every rule is strictly decreasing
Sequent Calculus LJ
    Γ⊢𝐺                    𝐴,𝐴,Γ⊢𝐺            Γ⊢𝐴 𝐴,Δ⊢𝐺
•              𝑤𝑒𝑎𝑘                  𝑐𝑜𝑛𝑡𝑟              (𝑐𝑢𝑡)
    𝐴,Γ⊢𝐺                   𝐴,Γ⊢𝐺               Γ,Δ⊢𝐺

•           𝑎𝑥𝑖𝑜𝑚             (𝑒𝑥𝑓𝑎𝑙𝑠𝑜)
    𝐴⊢𝐴                ⊥⊢𝐺
    Γ⊢𝐴    𝐵,Γ⊢𝐺               𝐴,Γ⊢𝐵
•                     →𝐿             (→ 𝑅 )
      𝐴→𝐵,Γ⊢𝐺                 Γ⊢𝐴→𝐵
     𝐴,𝐵,Γ⊢𝐺           Γ⊢𝐴 Γ⊢𝐵
•               ∧𝐿             (∧ 𝑅 )
    𝐴∧𝐵,Γ⊢𝐺             Γ⊢𝐴∧𝐵
    𝐴,Γ⊢𝐺 𝐵,Γ⊢𝐺                Γ⊢𝐴             Γ⊢𝐵
•                     ∨𝐿              ∨ 𝑅1            ∨ 𝑅2
       𝐴∨𝐵,Γ⊢𝐺                Γ⊢𝐴∨𝐵           Γ⊢𝐴∨𝐵
•
Sequent Calculus LJ
    Γ⊢𝐺                    𝐴,𝐴,Γ⊢𝐺            Γ⊢𝐴 𝐴,Δ⊢𝐺
•              𝑤𝑒𝑎𝑘                  𝑐𝑜𝑛𝑡𝑟              (𝑐𝑢𝑡)
    𝐴,Γ⊢𝐺                   𝐴,Γ⊢𝐺               Γ,Δ⊢𝐺

•           𝑎𝑥𝑖𝑜𝑚             (𝑒𝑥𝑓𝑎𝑙𝑠𝑜)
    𝐴⊢𝐴                ⊥⊢𝐺
    Γ⊢𝐴    𝐵,Γ⊢𝐺               𝐴,Γ⊢𝐵
•                     →𝐿             (→ 𝑅 )
      𝐴→𝐵,Γ⊢𝐺                 Γ⊢𝐴→𝐵
     𝐴,𝐵,Γ⊢𝐺           Γ⊢𝐴 Γ⊢𝐵
•               ∧𝐿             (∧ 𝑅 )
    𝐴∧𝐵,Γ⊢𝐺             Γ⊢𝐴∧𝐵
    𝐴,Γ⊢𝐺 𝐵,Γ⊢𝐺                Γ⊢𝐴             Γ⊢𝐵
•                     ∨𝐿              ∨ 𝑅1            ∨ 𝑅2
       𝐴∨𝐵,Γ⊢𝐺                Γ⊢𝐴∨𝐵           Γ⊢𝐴∨𝐵
• We eliminate cut rule first.
Cut elimination
• 1. Prove these rule by induction on proof structure.
     Γ⊢𝐺           Δ,Δ,Γ⊢𝐺
•          𝑤𝑒𝑎𝑘𝐺            𝑐𝑜𝑛𝑡𝑟𝐺
    Δ,Γ⊢𝐺           Δ,Γ⊢𝐺
    Γ⊢⊥
•        ⊥ 𝑅𝐸
    Γ⊢𝐺
    Γ⊢𝐴∧𝐵        Γ⊢𝐴∧𝐵
•          ∧ 𝑅𝐸1         ∧ 𝑅𝐸2
     Γ⊢𝐴          Γ⊢𝐵
    Γ⊢𝐴→𝐵
•          → 𝑅𝐸
     𝐴,Γ⊢𝐵
       Γ1 ⊢𝐴 𝐴,Δ1 ⊢𝐺1                     Γ2 ⊢𝐵 𝐵,Δ2 ⊢𝐺2
• If                  (𝑐𝑢𝑡 𝐴 )        and                (𝑐𝑢𝑡 𝐵 ) for all
          Γ1 ,Δ1 ⊢𝐺1                         Γ2 ,Δ2 ⊢𝐺2
                                         Γ⊢𝐴∨𝐵 A,Δ⊢𝐺 𝐵,Δ⊢𝐺
    Γ1 , Γ2 , Δ1 , Δ2 , 𝐺1 , 𝐺2 ,   then                       (∨ 𝑅𝐸 )
                                                  Γ,Δ⊢𝐺
Cut elimination
• 2. Prove the general cut rule
             Γ ⊢ 𝐴 𝐴 𝑛 , Δ ⊢ 𝐺
                                𝑐𝑢𝑡𝐺
                 Γ, Δ ⊢ 𝐺
  by induction on the size of 𝐴
  and proof structure of the right hand.
• 3. specialize 𝑐𝑢𝑡𝐺 (n = 1) ■
Cut-free LJ
    Γ⊢𝐺                    𝐴,𝐴,Γ⊢𝐺
•              𝑤𝑒𝑎𝑘                  𝑐𝑜𝑛𝑡𝑟
    𝐴,Γ⊢𝐺                   𝐴,Γ⊢𝐺

•           𝑎𝑥𝑖𝑜𝑚             (𝑒𝑥𝑓𝑎𝑙𝑠𝑜)
    𝐴⊢𝐴                ⊥⊢𝐺
    Γ⊢𝐴    𝐵,Γ⊢𝐺               𝐴,Γ⊢𝐵
•                     →𝐿             (→ 𝑅 )
      𝐴→𝐵,Γ⊢𝐺                 Γ⊢𝐴→𝐵
     𝐴,𝐵,Γ⊢𝐺           Γ⊢𝐴 Γ⊢𝐵
•               ∧𝐿             (∧ 𝑅 )
    𝐴∧𝐵,Γ⊢𝐺             Γ⊢𝐴∧𝐵
    𝐴,Γ⊢𝐺 𝐵,Γ⊢𝐺                Γ⊢𝐴             Γ⊢𝐵
•                     ∨𝐿              ∨ 𝑅1            ∨ 𝑅2
       𝐴∨𝐵,Γ⊢𝐺                Γ⊢𝐴∨𝐵           Γ⊢𝐴∨𝐵
•
Cut-free LJ
    Γ⊢𝐺                    𝐴,𝐴,Γ⊢𝐺
•              𝑤𝑒𝑎𝑘                  𝑐𝑜𝑛𝑡𝑟
    𝐴,Γ⊢𝐺                   𝐴,Γ⊢𝐺

•           𝑎𝑥𝑖𝑜𝑚             (𝑒𝑥𝑓𝑎𝑙𝑠𝑜)
    𝐴⊢𝐴                ⊥⊢𝐺
    Γ⊢𝐴    𝐵,Γ⊢𝐺               𝐴,Γ⊢𝐵
•                     →𝐿             (→ 𝑅 )
      𝐴→𝐵,Γ⊢𝐺                 Γ⊢𝐴→𝐵
     𝐴,𝐵,Γ⊢𝐺           Γ⊢𝐴 Γ⊢𝐵
•               ∧𝐿             (∧ 𝑅 )
    𝐴∧𝐵,Γ⊢𝐺             Γ⊢𝐴∧𝐵
    𝐴,Γ⊢𝐺 𝐵,Γ⊢𝐺                Γ⊢𝐴             Γ⊢𝐵
•                     ∨𝐿              ∨ 𝑅1            ∨ 𝑅2
       𝐴∨𝐵,Γ⊢𝐺                Γ⊢𝐴∨𝐵           Γ⊢𝐴∨𝐵
• Contraction rule is not strictly decreasing
Contraction-free LJ
•           𝑎𝑥𝑖𝑜𝑚                (𝑒𝑥𝑓𝑎𝑙𝑠𝑜)
    𝐴,Γ⊢𝐴                ⊥,Γ⊢𝐺
    𝐴→𝐵,Γ⊢𝐴   𝐵,Γ⊢𝐺                𝐴,Γ⊢𝐵
•                        →𝐿              (→ 𝑅 )
        𝐴→𝐵,Γ⊢𝐺                   Γ⊢𝐴→𝐵
     𝐴,𝐵,Γ⊢𝐺         Γ⊢𝐴 Γ⊢𝐵
•              ∧𝐿            (∧ 𝑅 )
    𝐴∧𝐵,Γ⊢𝐺           Γ⊢𝐴∧𝐵
    𝐴,Γ⊢𝐺 𝐵,Γ⊢𝐺             Γ⊢𝐴               Γ⊢𝐵
•                   ∨𝐿               ∨ 𝑅1            ∨ 𝑅2
       𝐴∨𝐵,Γ⊢𝐺             Γ⊢𝐴∨𝐵             Γ⊢𝐴∨𝐵
Contraction-free LJ
• Implicit weak
  –           𝑎𝑥𝑖𝑜𝑚            (𝑒𝑥𝑓𝑎𝑙𝑠𝑜)
      𝐴,Γ⊢𝐴            ⊥,Γ⊢𝐺
• Implicit contraction
      𝐴→𝐵,Γ⊢𝐴   𝐵,Γ⊢𝐺
  –                      →𝐿
          𝐴→𝐵,Γ⊢𝐺
      Γ⊢𝐴 Γ⊢𝐵
  –           (∧ 𝑅 )
       Γ⊢𝐴∧𝐵
      𝐴,Γ⊢𝐺 𝐵,Γ⊢𝐺
  –                 ∨𝐿
         𝐴∨𝐵,Γ⊢𝐺
Contraction-free LJ
• Implicit weak
  –           𝑎𝑥𝑖𝑜𝑚            (𝑒𝑥𝑓𝑎𝑙𝑠𝑜)
      𝐴,Γ⊢𝐴            ⊥,Γ⊢𝐺
• Implicit contraction
      𝐴→𝐵,Γ⊢𝐴   𝐵,Γ⊢𝐺
  –                      →𝐿
          𝐴→𝐵,Γ⊢𝐺
      Γ⊢𝐴 Γ⊢𝐵
  –           (∧ 𝑅 )
       Γ⊢𝐴∧𝐵
      𝐴,Γ⊢𝐺 𝐵,Γ⊢𝐺
  –                 ∨𝐿
         𝐴∨𝐵,Γ⊢𝐺
Proof of weak rule
• Easily done by induction ■
Proof of contr rule
• 1. prove these rules by induction on proof
  structure.
      𝐴∧𝐵,Γ⊢𝐺           𝐴∨𝐵,Γ⊢𝐺           𝐴∨𝐵,Γ⊢𝐺
  –              ∧ 𝐿𝐸             ∨ 𝐿𝐸1           (∨ 𝐿𝐸2 )
       𝐴,𝐵,Γ⊢𝐺           𝐴,Γ⊢𝐺             𝐵,Γ⊢𝐺
      𝐴→𝐵,Γ⊢𝐺
  –           (→ 𝑤𝑒𝑎𝑘 )
       𝐵,Γ⊢𝐺
• 2. prove contr rule by induction on proof
  structure.■
Contraction-free LJ
•           𝑎𝑥𝑖𝑜𝑚                (𝑒𝑥𝑓𝑎𝑙𝑠𝑜)
    𝐴,Γ⊢𝐴                ⊥,Γ⊢𝐺
    𝐴→𝐵,Γ⊢𝐴   𝐵,Γ⊢𝐺                𝐴,Γ⊢𝐵
•                        →𝐿              (→ 𝑅 )
        𝐴→𝐵,Γ⊢𝐺                   Γ⊢𝐴→𝐵
     𝐴,𝐵,Γ⊢𝐺         Γ⊢𝐴 Γ⊢𝐵
•              ∧𝐿            (∧ 𝑅 )
    𝐴∧𝐵,Γ⊢𝐺           Γ⊢𝐴∧𝐵
    𝐴,Γ⊢𝐺 𝐵,Γ⊢𝐺             Γ⊢𝐴               Γ⊢𝐵
•                   ∨𝐿               ∨ 𝑅1            ∨ 𝑅2
       𝐴∨𝐵,Γ⊢𝐺             Γ⊢𝐴∨𝐵             Γ⊢𝐴∨𝐵
Contraction-free LJ
•           𝑎𝑥𝑖𝑜𝑚                (𝑒𝑥𝑓𝑎𝑙𝑠𝑜)
    𝐴,Γ⊢𝐴                ⊥,Γ⊢𝐺
    𝐴→𝐵,Γ⊢𝐴   𝐵,Γ⊢𝐺                𝐴,Γ⊢𝐵
•                        →𝐿              (→ 𝑅 )
        𝐴→𝐵,Γ⊢𝐺                   Γ⊢𝐴→𝐵
     𝐴,𝐵,Γ⊢𝐺         Γ⊢𝐴 Γ⊢𝐵
•              ∧𝐿            (∧ 𝑅 )
    𝐴∧𝐵,Γ⊢𝐺           Γ⊢𝐴∧𝐵
    𝐴,Γ⊢𝐺 𝐵,Γ⊢𝐺             Γ⊢𝐴               Γ⊢𝐵
•                   ∨𝐿               ∨ 𝑅1            ∨ 𝑅2
       𝐴∨𝐵,Γ⊢𝐺             Γ⊢𝐴∨𝐵             Γ⊢𝐴∨𝐵
• This time, → 𝐿 rule is not decreasing
Terminating LJ
          𝐴→𝐵,Γ⊢𝐴   𝐵,Γ⊢𝐺
• Split                         →𝐿   into 4 pieces
              𝐴→𝐵,Γ⊢𝐺
              𝐶,𝐴𝑡𝑜𝑚 𝑛 ,Γ⊢𝐺
   1.                             → 𝐿1
          𝐴𝑡𝑜𝑚 𝑛 →𝐶,𝐴𝑡𝑜𝑚 𝑛 ,Γ⊢𝐺
          𝐵→𝐶,Γ⊢𝐴→𝐵 C,Γ⊢𝐺
   2.                     (→ 𝐿2 )
             𝐴→𝐵 →𝐶,Γ⊢𝐺
          𝐴→ 𝐵→𝐶 ,Γ⊢𝐺
   3.                 (→ 𝐿3 )
           𝐴∧𝐵 →𝐶,Γ⊢𝐺
          𝐴→𝐶,𝐵→𝐶,Γ⊢𝐺
   4.                 (→ 𝐿4 )
           𝐴∨𝐵 →𝐶,Γ⊢𝐺
Correctness of Terminating LJ
• 1. If Γ ⊢ 𝐺 is provable in Contraction-free LJ,
  At least one of these is true:
  – Γ includes ⊥, 𝐴 ∧ 𝐵, or 𝐴 ∨ 𝐵
  – Γ includes both 𝐴𝑡𝑜𝑚(𝑛) and 𝐴𝑡𝑜𝑚 𝑛 → 𝐵
  – Γ ⊢ 𝐺 has a proof whose bottommost rule is not
    the form of
     𝐴𝑡𝑜𝑚 𝑛 →𝐵,𝐴𝑡𝑜𝑚 𝑛 ,Γ⊢𝐴𝑡𝑜𝑚 𝑛   𝐵,𝐴𝑡𝑜𝑚 𝑛 ,Γ⊢𝐺
                                                (→ 𝐿 )
               𝐴𝑡𝑜𝑚 𝑛 →𝐵,𝐴𝑡𝑜𝑚(𝑛),Γ⊢𝐺

• Proof: induction on proof structure
Correctness of Terminating LJ
• 2. every sequent provable in Contraction-free
  LJ is also provable in Terminating LJ.
• Proof: induction by size of the sequent.
  – Size: we will introduce later
Terminating LJ
•            𝑎𝑥𝑖𝑜𝑚             (𝑒𝑥𝑓𝑎𝑙𝑠𝑜)
    𝐴,Γ⊢𝐴              ⊥,Γ⊢𝐺
         𝐶,𝐴𝑡𝑜𝑚 𝑛 ,Γ⊢𝐺                     𝐵→𝐶,Γ⊢𝐴→𝐵 C,Γ⊢𝐺
•                               → 𝐿1                         → 𝐿2
     𝐴𝑡𝑜𝑚 𝑛 →𝐶,𝐴𝑡𝑜𝑚 𝑛 ,Γ⊢𝐺                    𝐴→𝐵 →𝐶,Γ⊢𝐺
    𝐴→ 𝐵→𝐶 ,Γ⊢𝐺               𝐴→𝐶,𝐵→𝐶,Γ⊢𝐺
•                    → 𝐿3                    → 𝐿4
     𝐴∧𝐵 →𝐶,Γ⊢𝐺                𝐴∨𝐵 →𝐶,Γ⊢𝐺
     𝐴,Γ⊢𝐵         𝐴,𝐵,Γ⊢𝐺          Γ⊢𝐴 Γ⊢𝐵
•            →𝑅               ∧𝐿            (∧ 𝑅 )
    Γ⊢𝐴→𝐵         𝐴∧𝐵,Γ⊢𝐺            Γ⊢𝐴∧𝐵
    𝐴,Γ⊢𝐺 𝐵,Γ⊢𝐺              Γ⊢𝐴             Γ⊢𝐵
•                 ∨𝐿                ∨ 𝑅1            ∨ 𝑅2
       𝐴∨𝐵,Γ⊢𝐺              Γ⊢𝐴∨𝐵           Γ⊢𝐴∨𝐵
Proof of termination
• Weight of Proposition
  –   𝑤    𝐴𝑡𝑜𝑚 𝑛 = 1
  –   𝑤   ⊥ =1
  –   𝑤   𝐴 → 𝐵 = 𝑤 𝐴 + 𝑤 𝐵 +1
  –   𝑤   𝐴∧ 𝐵 = 𝑤 𝐴 + 𝑤 𝐵 +2
  –   𝑤   𝐴∨ 𝐵 = 𝑤 𝐴 + 𝑤 𝐵 +1
• 𝐴 < 𝐵 ⇔ 𝑤 𝐴 < 𝑤(𝐵)
Proof of termination
• ordering of Proposition List
  – Use Multiset ordering (Dershowitz and Manna
    ordering)
Multiset Ordering
• Multiset Ordering: a binary relation between
  multisets (not necessarily be ordering)
• 𝐴> 𝐵⇔                                Not empty



      A

      B
Multiset Ordering
• If 𝑅 is a well-founded binary relation, the
  Multiset Ordering over 𝑅 is also well-founded.

• Well-founded: every element is accessible
• 𝐴 is accessible : every element 𝐵 such that
  𝐵 < 𝐴 is accessible
Multiset Ordering
Proof
• 1. induction on list
• Nil ⇒ there is no 𝐴 such that 𝐴 < 𝑀 Nil,
  therefore it’s accessible.
• We will prove: 𝐴𝑐𝑐 𝑀 𝐿 ⇒ 𝐴𝑐𝑐 𝑀 (𝑥 ∷ 𝐿)
Multiset Ordering
• 2. duplicate assumption
• Using 𝐴𝑐𝑐(𝑥) and 𝐴𝑐𝑐 𝑀 (𝐿), we will prove
   𝐴𝑐𝑐 𝑀 𝐿 ⇒ 𝐴𝑐𝑐 𝑀 (𝑥 ∷ 𝐿)
• 3. induction on 𝑥 and 𝐿
  – We can use these two inductive hypotheses.
     1. ∀𝐾 𝑦, 𝑦 < 𝑥 ⇒ 𝐴𝑐𝑐 𝑀 𝐾 ⇒ 𝐴𝑐𝑐 𝑀 (𝑦 ∷ 𝐾)
     2. ∀𝐾, 𝐾 < 𝑀 𝐿 ⇒ 𝐴𝑐𝑐 𝑀 𝐾 ⇒ 𝐴𝑐𝑐 𝑀 (𝑥 ∷ 𝐾)
Multiset Ordering
• 4. Case Analysis
• By definition, 𝐴𝑐𝑐 𝑀 (𝑥 ∷ 𝐿) is equivalent to
          ∀𝐾, 𝐾 < 𝑀 (𝑥 ∷ 𝐿) ⇒ 𝐴𝑐𝑐 𝑀 (𝐾)
• And there are 3 patterns:
   1.   𝐾 includes 𝑥
   2.   𝐾 includes 𝑦s s.t. 𝑦 < 𝑥, and 𝐾 minus all such 𝑦 is
      equal to 𝐿
   3. 𝐾 includes 𝑦s s.t. 𝑦 < 𝑥, and 𝐾 minus all such 𝑦 is
      less than 𝐿
• Each pattern is proved using the Inductive
  Hypotheses.
Decidability
• Now, decidability can be proved by induction
  on the size of sequent.
Implementation Detail
•
IPC Proposition (Coq)
 Inductive PProp:Set :=
• | PPbot : PProp
   | PPatom : nat -> PProp
   | PPimpl : PProp -> PProp -> PProp
   | PPconj : PProp -> PProp -> PProp
   | PPdisj : PProp -> PProp -> PProp.
Cut-free LJ (Coq)
 Inductive LJ_provable : list PProp -> PProp -> Prop :=
• | LJ_perm P1 L1 L2 :
      Permutation L1 L2 ->
      LJ_provable L1 P1 ->
      LJ_provable L2 P1
   | LJ_weak P1 P2 L1 :
      LJ_provable L1 P2 ->
      LJ_provable (P1::L1) P2
   | LJ_contr P1 P2 L1 :
      LJ_provable (P1::P1::L1) P2 ->
      LJ_provable (P1::L1) P2
 …
Exchange rule
• Exchange rule :
               Γ, 𝐴, 𝐵, Δ ⊢ 𝐺
                              𝑒𝑥𝑐ℎ
               Γ, 𝐵, 𝐴, Δ ⊢ 𝐺
  is replaced by more useful
            Γ⊢ 𝐺
              ′ ⊢ 𝐺
                       𝑝𝑒𝑟𝑚𝑢𝑡𝑎𝑡𝑖𝑜𝑛
            Γ
  where Γ, Γ′ are permutation
Permutation Compatibility (Coq)
Instance LJ_provable_compat :
  Proper
   (@Permutation _==>eq==>iff)
   LJ_provable.


• Allows rewriting over Permutation equality
Permutation solver (Coq)
• Permutation should be solved automatically
Ltac perm :=
 match goal with
…
Further implementation plan
•
Further implementation plan
• Refactoring (1) : improve Permutation-
  associated tactics
  – A smarter auto-unifying tactics is needed
  – Write tactics using Objective Caml
• Refactoring (2) : use Ssreflect tacticals
  – This makes the proof more manageable
Further implementation plan
• Refactoring (3) : change proof order
  – Contraction first, cut next
  – It will make the proof shorter
• Refactoring (4) : discard Multiset Ordering
  – If we choose appropriate weight function of
    Propositional Formula, we don’t need Multiset
    Ordering. (See [Hudelmaier])
  – It also enables us to analyze complexity of this
    procedure
Further implementation plan
• Refactoring (5) : Proof of completeness
  – Now completeness theorem depends on the
    decidability
• New Theorem (1) : Other Syntaxes
  – NJ and HJ may be introduced
• New Theorem (2) : Other Semantics
  – Heyting Algebra
Further implementation plan
• New Theorem (3) : Other decision procedure
  – Decision procedure using semantics (if any)
  – More efficient decision procedure (especially
     𝑂(𝑁 log 𝑁)-space decision procedure)
• New Theorem (4) : Complexity
  – Proof of PSPACE-completeness
Source code
• Source codes are:
• https://github.com/qnighy/IPC-Coq
おわり
1. Task & Known results
2. Brief methodology of the proof
  1.   Cut elimination
  2.   Contraction elimination
  3.   → 𝐿 elimination
  4.   Proof of strictly-decreasingness
3. Implementation detail
4. Further implementation plan
References
• [Dyckhoff] Roy Dyckhoff, Contraction-free Sequent
  Calculi for Intuitionistic Logic, The Journal of Symbolic
  Logic, Vol. 57, No.3, 1992, pp. 795 – 807
• [Statman] Richard Statman, Intuitionistic Propositional
  Logic is Polynomial-Space Complete, Theoretical
  Computer Science 9, 1979, pp. 67 – 72
• [Hudelmaier] Jörg Hudelmaier, An O(n log n)-Space
  Decision Procedure for Intuitionistic Propositional Logic,
  Journal of Logic and Computation, Vol. 3, Issue 1, pp.
  63-75

More Related Content

PDF
“A ::= aAa / a” in PEG
PDF
Spaceships 解説
PPTX
joi2012-sp-day2-broadcasting
PPTX
ご静聴ありがとうございました
PDF
いろいろな問題の解説
PPTX
Coqの公理
PPTX
永続データ構造が分からない人のためのスライド
PDF
Re永続データ構造が分からない人のためのスライド
“A ::= aAa / a” in PEG
Spaceships 解説
joi2012-sp-day2-broadcasting
ご静聴ありがとうございました
いろいろな問題の解説
Coqの公理
永続データ構造が分からない人のためのスライド
Re永続データ構造が分からない人のためのスライド

Similar to Proving Decidability of Intuitionistic Propositional Calculus on Coq (20)

PDF
Bounded arithmetic in free logic
PDF
Bounded arithmetic in free logic
PDF
Quadratic form and functional optimization
PDF
Generalized Intersection over Union: A Metric and A Loss for Bounding Box Reg...
PDF
Regularisation & Auxiliary Information in OOD Detection
PDF
Blow up in a degenerate keller--segel system(Eng.)
PDF
PR 113: The Perception Distortion Tradeoff
PPTX
Page rank - from theory to application
PPTX
PDF
Basic calculus (i)
PDF
Differential Geometry for Machine Learning
PDF
Geometry Theorems 1 REMC Tutoring
PPTX
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 3 Rombel 3
PDF
On a certain family of meromorphic p valent functions
PDF
Милан Циркович. Антропная тень
PPTX
Mathematics of nyquist plot [autosaved] [autosaved]
PPT
Unit-2-1.ppt introduction to correlation
PDF
1sem4 and 5
PDF
Network theory
Bounded arithmetic in free logic
Bounded arithmetic in free logic
Quadratic form and functional optimization
Generalized Intersection over Union: A Metric and A Loss for Bounding Box Reg...
Regularisation & Auxiliary Information in OOD Detection
Blow up in a degenerate keller--segel system(Eng.)
PR 113: The Perception Distortion Tradeoff
Page rank - from theory to application
Basic calculus (i)
Differential Geometry for Machine Learning
Geometry Theorems 1 REMC Tutoring
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 3 Rombel 3
On a certain family of meromorphic p valent functions
Милан Циркович. Антропная тень
Mathematics of nyquist plot [autosaved] [autosaved]
Unit-2-1.ppt introduction to correlation
1sem4 and 5
Network theory
Ad

Recently uploaded (20)

PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Empathic Computing: Creating Shared Understanding
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PPT
Teaching material agriculture food technology
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
Spectroscopy.pptx food analysis technology
PDF
August Patch Tuesday
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Machine Learning_overview_presentation.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Unlocking AI with Model Context Protocol (MCP)
A comparative study of natural language inference in Swahili using monolingua...
Empathic Computing: Creating Shared Understanding
A comparative analysis of optical character recognition models for extracting...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Univ-Connecticut-ChatGPT-Presentaion.pdf
Heart disease approach using modified random forest and particle swarm optimi...
Teaching material agriculture food technology
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
NewMind AI Weekly Chronicles - August'25-Week II
Spectroscopy.pptx food analysis technology
August Patch Tuesday
Assigned Numbers - 2025 - Bluetooth® Document
OMC Textile Division Presentation 2021.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Machine Learning_overview_presentation.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
cloud_computing_Infrastucture_as_cloud_p
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Ad

Proving Decidability of Intuitionistic Propositional Calculus on Coq

  • 1. Proving decidability of Intuitionistic Propositional Calculus on Coq Masaki Hara (qnighy) University of Tokyo, first grade Logic Zoo 2013 にて
  • 2. 1. Task & Known results 2. Brief methodology of the proof 1. Cut elimination 2. Contraction elimination 3. → 𝐿 elimination 4. Proof of strictly-decreasingness 3. Implementation detail 4. Further implementation plan
  • 3. Task • Proposition: 𝐴𝑡𝑜𝑚 𝑛 , ∧, ∨, →, ⊥ • Task: Is given propositional formula P provable in LJ? – It’s known to be decidable. [Dyckhoff] • This talk: how to prove this decidability on Coq
  • 4. Known results • Decision problem on IPC is PSPACE complete [Statman] – Especially, O(N log N) space decision procedure is known [Hudelmaier] • These approaches are backtracking on LJ syntax.
  • 5. Known results • cf. classical counterpart of this problem is co-NP complete. – Proof: find counterexample in boolean-valued semantics (SAT).
  • 6. methodology • To prove decidability, all rules should be strictly decreasing on some measuring. 𝑆1 ,𝑆2 ,…,𝑆 𝑁 • More formally, for all rules 𝑟𝑢𝑙𝑒 𝑆0 and all number 𝑖 (1 ≤ 𝑖 ≤ 𝑁), 𝑆 𝑖 < 𝑆0 on certain well-founded relation <.
  • 7. methodology 1. Eliminate cut rule of LJ 2. Eliminate contraction rule 3. Split → 𝑳 rule into 4 pieces 4. Prove that every rule is strictly decreasing
  • 8. Sequent Calculus LJ Γ⊢𝐺 𝐴,𝐴,Γ⊢𝐺 Γ⊢𝐴 𝐴,Δ⊢𝐺 • 𝑤𝑒𝑎𝑘 𝑐𝑜𝑛𝑡𝑟 (𝑐𝑢𝑡) 𝐴,Γ⊢𝐺 𝐴,Γ⊢𝐺 Γ,Δ⊢𝐺 • 𝑎𝑥𝑖𝑜𝑚 (𝑒𝑥𝑓𝑎𝑙𝑠𝑜) 𝐴⊢𝐴 ⊥⊢𝐺 Γ⊢𝐴 𝐵,Γ⊢𝐺 𝐴,Γ⊢𝐵 • →𝐿 (→ 𝑅 ) 𝐴→𝐵,Γ⊢𝐺 Γ⊢𝐴→𝐵 𝐴,𝐵,Γ⊢𝐺 Γ⊢𝐴 Γ⊢𝐵 • ∧𝐿 (∧ 𝑅 ) 𝐴∧𝐵,Γ⊢𝐺 Γ⊢𝐴∧𝐵 𝐴,Γ⊢𝐺 𝐵,Γ⊢𝐺 Γ⊢𝐴 Γ⊢𝐵 • ∨𝐿 ∨ 𝑅1 ∨ 𝑅2 𝐴∨𝐵,Γ⊢𝐺 Γ⊢𝐴∨𝐵 Γ⊢𝐴∨𝐵 •
  • 9. Sequent Calculus LJ Γ⊢𝐺 𝐴,𝐴,Γ⊢𝐺 Γ⊢𝐴 𝐴,Δ⊢𝐺 • 𝑤𝑒𝑎𝑘 𝑐𝑜𝑛𝑡𝑟 (𝑐𝑢𝑡) 𝐴,Γ⊢𝐺 𝐴,Γ⊢𝐺 Γ,Δ⊢𝐺 • 𝑎𝑥𝑖𝑜𝑚 (𝑒𝑥𝑓𝑎𝑙𝑠𝑜) 𝐴⊢𝐴 ⊥⊢𝐺 Γ⊢𝐴 𝐵,Γ⊢𝐺 𝐴,Γ⊢𝐵 • →𝐿 (→ 𝑅 ) 𝐴→𝐵,Γ⊢𝐺 Γ⊢𝐴→𝐵 𝐴,𝐵,Γ⊢𝐺 Γ⊢𝐴 Γ⊢𝐵 • ∧𝐿 (∧ 𝑅 ) 𝐴∧𝐵,Γ⊢𝐺 Γ⊢𝐴∧𝐵 𝐴,Γ⊢𝐺 𝐵,Γ⊢𝐺 Γ⊢𝐴 Γ⊢𝐵 • ∨𝐿 ∨ 𝑅1 ∨ 𝑅2 𝐴∨𝐵,Γ⊢𝐺 Γ⊢𝐴∨𝐵 Γ⊢𝐴∨𝐵 • We eliminate cut rule first.
  • 10. Cut elimination • 1. Prove these rule by induction on proof structure. Γ⊢𝐺 Δ,Δ,Γ⊢𝐺 • 𝑤𝑒𝑎𝑘𝐺 𝑐𝑜𝑛𝑡𝑟𝐺 Δ,Γ⊢𝐺 Δ,Γ⊢𝐺 Γ⊢⊥ • ⊥ 𝑅𝐸 Γ⊢𝐺 Γ⊢𝐴∧𝐵 Γ⊢𝐴∧𝐵 • ∧ 𝑅𝐸1 ∧ 𝑅𝐸2 Γ⊢𝐴 Γ⊢𝐵 Γ⊢𝐴→𝐵 • → 𝑅𝐸 𝐴,Γ⊢𝐵 Γ1 ⊢𝐴 𝐴,Δ1 ⊢𝐺1 Γ2 ⊢𝐵 𝐵,Δ2 ⊢𝐺2 • If (𝑐𝑢𝑡 𝐴 ) and (𝑐𝑢𝑡 𝐵 ) for all Γ1 ,Δ1 ⊢𝐺1 Γ2 ,Δ2 ⊢𝐺2 Γ⊢𝐴∨𝐵 A,Δ⊢𝐺 𝐵,Δ⊢𝐺 Γ1 , Γ2 , Δ1 , Δ2 , 𝐺1 , 𝐺2 , then (∨ 𝑅𝐸 ) Γ,Δ⊢𝐺
  • 11. Cut elimination • 2. Prove the general cut rule Γ ⊢ 𝐴 𝐴 𝑛 , Δ ⊢ 𝐺 𝑐𝑢𝑡𝐺 Γ, Δ ⊢ 𝐺 by induction on the size of 𝐴 and proof structure of the right hand. • 3. specialize 𝑐𝑢𝑡𝐺 (n = 1) ■
  • 12. Cut-free LJ Γ⊢𝐺 𝐴,𝐴,Γ⊢𝐺 • 𝑤𝑒𝑎𝑘 𝑐𝑜𝑛𝑡𝑟 𝐴,Γ⊢𝐺 𝐴,Γ⊢𝐺 • 𝑎𝑥𝑖𝑜𝑚 (𝑒𝑥𝑓𝑎𝑙𝑠𝑜) 𝐴⊢𝐴 ⊥⊢𝐺 Γ⊢𝐴 𝐵,Γ⊢𝐺 𝐴,Γ⊢𝐵 • →𝐿 (→ 𝑅 ) 𝐴→𝐵,Γ⊢𝐺 Γ⊢𝐴→𝐵 𝐴,𝐵,Γ⊢𝐺 Γ⊢𝐴 Γ⊢𝐵 • ∧𝐿 (∧ 𝑅 ) 𝐴∧𝐵,Γ⊢𝐺 Γ⊢𝐴∧𝐵 𝐴,Γ⊢𝐺 𝐵,Γ⊢𝐺 Γ⊢𝐴 Γ⊢𝐵 • ∨𝐿 ∨ 𝑅1 ∨ 𝑅2 𝐴∨𝐵,Γ⊢𝐺 Γ⊢𝐴∨𝐵 Γ⊢𝐴∨𝐵 •
  • 13. Cut-free LJ Γ⊢𝐺 𝐴,𝐴,Γ⊢𝐺 • 𝑤𝑒𝑎𝑘 𝑐𝑜𝑛𝑡𝑟 𝐴,Γ⊢𝐺 𝐴,Γ⊢𝐺 • 𝑎𝑥𝑖𝑜𝑚 (𝑒𝑥𝑓𝑎𝑙𝑠𝑜) 𝐴⊢𝐴 ⊥⊢𝐺 Γ⊢𝐴 𝐵,Γ⊢𝐺 𝐴,Γ⊢𝐵 • →𝐿 (→ 𝑅 ) 𝐴→𝐵,Γ⊢𝐺 Γ⊢𝐴→𝐵 𝐴,𝐵,Γ⊢𝐺 Γ⊢𝐴 Γ⊢𝐵 • ∧𝐿 (∧ 𝑅 ) 𝐴∧𝐵,Γ⊢𝐺 Γ⊢𝐴∧𝐵 𝐴,Γ⊢𝐺 𝐵,Γ⊢𝐺 Γ⊢𝐴 Γ⊢𝐵 • ∨𝐿 ∨ 𝑅1 ∨ 𝑅2 𝐴∨𝐵,Γ⊢𝐺 Γ⊢𝐴∨𝐵 Γ⊢𝐴∨𝐵 • Contraction rule is not strictly decreasing
  • 14. Contraction-free LJ • 𝑎𝑥𝑖𝑜𝑚 (𝑒𝑥𝑓𝑎𝑙𝑠𝑜) 𝐴,Γ⊢𝐴 ⊥,Γ⊢𝐺 𝐴→𝐵,Γ⊢𝐴 𝐵,Γ⊢𝐺 𝐴,Γ⊢𝐵 • →𝐿 (→ 𝑅 ) 𝐴→𝐵,Γ⊢𝐺 Γ⊢𝐴→𝐵 𝐴,𝐵,Γ⊢𝐺 Γ⊢𝐴 Γ⊢𝐵 • ∧𝐿 (∧ 𝑅 ) 𝐴∧𝐵,Γ⊢𝐺 Γ⊢𝐴∧𝐵 𝐴,Γ⊢𝐺 𝐵,Γ⊢𝐺 Γ⊢𝐴 Γ⊢𝐵 • ∨𝐿 ∨ 𝑅1 ∨ 𝑅2 𝐴∨𝐵,Γ⊢𝐺 Γ⊢𝐴∨𝐵 Γ⊢𝐴∨𝐵
  • 15. Contraction-free LJ • Implicit weak – 𝑎𝑥𝑖𝑜𝑚 (𝑒𝑥𝑓𝑎𝑙𝑠𝑜) 𝐴,Γ⊢𝐴 ⊥,Γ⊢𝐺 • Implicit contraction 𝐴→𝐵,Γ⊢𝐴 𝐵,Γ⊢𝐺 – →𝐿 𝐴→𝐵,Γ⊢𝐺 Γ⊢𝐴 Γ⊢𝐵 – (∧ 𝑅 ) Γ⊢𝐴∧𝐵 𝐴,Γ⊢𝐺 𝐵,Γ⊢𝐺 – ∨𝐿 𝐴∨𝐵,Γ⊢𝐺
  • 16. Contraction-free LJ • Implicit weak – 𝑎𝑥𝑖𝑜𝑚 (𝑒𝑥𝑓𝑎𝑙𝑠𝑜) 𝐴,Γ⊢𝐴 ⊥,Γ⊢𝐺 • Implicit contraction 𝐴→𝐵,Γ⊢𝐴 𝐵,Γ⊢𝐺 – →𝐿 𝐴→𝐵,Γ⊢𝐺 Γ⊢𝐴 Γ⊢𝐵 – (∧ 𝑅 ) Γ⊢𝐴∧𝐵 𝐴,Γ⊢𝐺 𝐵,Γ⊢𝐺 – ∨𝐿 𝐴∨𝐵,Γ⊢𝐺
  • 17. Proof of weak rule • Easily done by induction ■
  • 18. Proof of contr rule • 1. prove these rules by induction on proof structure. 𝐴∧𝐵,Γ⊢𝐺 𝐴∨𝐵,Γ⊢𝐺 𝐴∨𝐵,Γ⊢𝐺 – ∧ 𝐿𝐸 ∨ 𝐿𝐸1 (∨ 𝐿𝐸2 ) 𝐴,𝐵,Γ⊢𝐺 𝐴,Γ⊢𝐺 𝐵,Γ⊢𝐺 𝐴→𝐵,Γ⊢𝐺 – (→ 𝑤𝑒𝑎𝑘 ) 𝐵,Γ⊢𝐺 • 2. prove contr rule by induction on proof structure.■
  • 19. Contraction-free LJ • 𝑎𝑥𝑖𝑜𝑚 (𝑒𝑥𝑓𝑎𝑙𝑠𝑜) 𝐴,Γ⊢𝐴 ⊥,Γ⊢𝐺 𝐴→𝐵,Γ⊢𝐴 𝐵,Γ⊢𝐺 𝐴,Γ⊢𝐵 • →𝐿 (→ 𝑅 ) 𝐴→𝐵,Γ⊢𝐺 Γ⊢𝐴→𝐵 𝐴,𝐵,Γ⊢𝐺 Γ⊢𝐴 Γ⊢𝐵 • ∧𝐿 (∧ 𝑅 ) 𝐴∧𝐵,Γ⊢𝐺 Γ⊢𝐴∧𝐵 𝐴,Γ⊢𝐺 𝐵,Γ⊢𝐺 Γ⊢𝐴 Γ⊢𝐵 • ∨𝐿 ∨ 𝑅1 ∨ 𝑅2 𝐴∨𝐵,Γ⊢𝐺 Γ⊢𝐴∨𝐵 Γ⊢𝐴∨𝐵
  • 20. Contraction-free LJ • 𝑎𝑥𝑖𝑜𝑚 (𝑒𝑥𝑓𝑎𝑙𝑠𝑜) 𝐴,Γ⊢𝐴 ⊥,Γ⊢𝐺 𝐴→𝐵,Γ⊢𝐴 𝐵,Γ⊢𝐺 𝐴,Γ⊢𝐵 • →𝐿 (→ 𝑅 ) 𝐴→𝐵,Γ⊢𝐺 Γ⊢𝐴→𝐵 𝐴,𝐵,Γ⊢𝐺 Γ⊢𝐴 Γ⊢𝐵 • ∧𝐿 (∧ 𝑅 ) 𝐴∧𝐵,Γ⊢𝐺 Γ⊢𝐴∧𝐵 𝐴,Γ⊢𝐺 𝐵,Γ⊢𝐺 Γ⊢𝐴 Γ⊢𝐵 • ∨𝐿 ∨ 𝑅1 ∨ 𝑅2 𝐴∨𝐵,Γ⊢𝐺 Γ⊢𝐴∨𝐵 Γ⊢𝐴∨𝐵 • This time, → 𝐿 rule is not decreasing
  • 21. Terminating LJ 𝐴→𝐵,Γ⊢𝐴 𝐵,Γ⊢𝐺 • Split →𝐿 into 4 pieces 𝐴→𝐵,Γ⊢𝐺 𝐶,𝐴𝑡𝑜𝑚 𝑛 ,Γ⊢𝐺 1. → 𝐿1 𝐴𝑡𝑜𝑚 𝑛 →𝐶,𝐴𝑡𝑜𝑚 𝑛 ,Γ⊢𝐺 𝐵→𝐶,Γ⊢𝐴→𝐵 C,Γ⊢𝐺 2. (→ 𝐿2 ) 𝐴→𝐵 →𝐶,Γ⊢𝐺 𝐴→ 𝐵→𝐶 ,Γ⊢𝐺 3. (→ 𝐿3 ) 𝐴∧𝐵 →𝐶,Γ⊢𝐺 𝐴→𝐶,𝐵→𝐶,Γ⊢𝐺 4. (→ 𝐿4 ) 𝐴∨𝐵 →𝐶,Γ⊢𝐺
  • 22. Correctness of Terminating LJ • 1. If Γ ⊢ 𝐺 is provable in Contraction-free LJ, At least one of these is true: – Γ includes ⊥, 𝐴 ∧ 𝐵, or 𝐴 ∨ 𝐵 – Γ includes both 𝐴𝑡𝑜𝑚(𝑛) and 𝐴𝑡𝑜𝑚 𝑛 → 𝐵 – Γ ⊢ 𝐺 has a proof whose bottommost rule is not the form of 𝐴𝑡𝑜𝑚 𝑛 →𝐵,𝐴𝑡𝑜𝑚 𝑛 ,Γ⊢𝐴𝑡𝑜𝑚 𝑛 𝐵,𝐴𝑡𝑜𝑚 𝑛 ,Γ⊢𝐺 (→ 𝐿 ) 𝐴𝑡𝑜𝑚 𝑛 →𝐵,𝐴𝑡𝑜𝑚(𝑛),Γ⊢𝐺 • Proof: induction on proof structure
  • 23. Correctness of Terminating LJ • 2. every sequent provable in Contraction-free LJ is also provable in Terminating LJ. • Proof: induction by size of the sequent. – Size: we will introduce later
  • 24. Terminating LJ • 𝑎𝑥𝑖𝑜𝑚 (𝑒𝑥𝑓𝑎𝑙𝑠𝑜) 𝐴,Γ⊢𝐴 ⊥,Γ⊢𝐺 𝐶,𝐴𝑡𝑜𝑚 𝑛 ,Γ⊢𝐺 𝐵→𝐶,Γ⊢𝐴→𝐵 C,Γ⊢𝐺 • → 𝐿1 → 𝐿2 𝐴𝑡𝑜𝑚 𝑛 →𝐶,𝐴𝑡𝑜𝑚 𝑛 ,Γ⊢𝐺 𝐴→𝐵 →𝐶,Γ⊢𝐺 𝐴→ 𝐵→𝐶 ,Γ⊢𝐺 𝐴→𝐶,𝐵→𝐶,Γ⊢𝐺 • → 𝐿3 → 𝐿4 𝐴∧𝐵 →𝐶,Γ⊢𝐺 𝐴∨𝐵 →𝐶,Γ⊢𝐺 𝐴,Γ⊢𝐵 𝐴,𝐵,Γ⊢𝐺 Γ⊢𝐴 Γ⊢𝐵 • →𝑅 ∧𝐿 (∧ 𝑅 ) Γ⊢𝐴→𝐵 𝐴∧𝐵,Γ⊢𝐺 Γ⊢𝐴∧𝐵 𝐴,Γ⊢𝐺 𝐵,Γ⊢𝐺 Γ⊢𝐴 Γ⊢𝐵 • ∨𝐿 ∨ 𝑅1 ∨ 𝑅2 𝐴∨𝐵,Γ⊢𝐺 Γ⊢𝐴∨𝐵 Γ⊢𝐴∨𝐵
  • 25. Proof of termination • Weight of Proposition – 𝑤 𝐴𝑡𝑜𝑚 𝑛 = 1 – 𝑤 ⊥ =1 – 𝑤 𝐴 → 𝐵 = 𝑤 𝐴 + 𝑤 𝐵 +1 – 𝑤 𝐴∧ 𝐵 = 𝑤 𝐴 + 𝑤 𝐵 +2 – 𝑤 𝐴∨ 𝐵 = 𝑤 𝐴 + 𝑤 𝐵 +1 • 𝐴 < 𝐵 ⇔ 𝑤 𝐴 < 𝑤(𝐵)
  • 26. Proof of termination • ordering of Proposition List – Use Multiset ordering (Dershowitz and Manna ordering)
  • 27. Multiset Ordering • Multiset Ordering: a binary relation between multisets (not necessarily be ordering) • 𝐴> 𝐵⇔ Not empty A B
  • 28. Multiset Ordering • If 𝑅 is a well-founded binary relation, the Multiset Ordering over 𝑅 is also well-founded. • Well-founded: every element is accessible • 𝐴 is accessible : every element 𝐵 such that 𝐵 < 𝐴 is accessible
  • 29. Multiset Ordering Proof • 1. induction on list • Nil ⇒ there is no 𝐴 such that 𝐴 < 𝑀 Nil, therefore it’s accessible. • We will prove: 𝐴𝑐𝑐 𝑀 𝐿 ⇒ 𝐴𝑐𝑐 𝑀 (𝑥 ∷ 𝐿)
  • 30. Multiset Ordering • 2. duplicate assumption • Using 𝐴𝑐𝑐(𝑥) and 𝐴𝑐𝑐 𝑀 (𝐿), we will prove 𝐴𝑐𝑐 𝑀 𝐿 ⇒ 𝐴𝑐𝑐 𝑀 (𝑥 ∷ 𝐿) • 3. induction on 𝑥 and 𝐿 – We can use these two inductive hypotheses. 1. ∀𝐾 𝑦, 𝑦 < 𝑥 ⇒ 𝐴𝑐𝑐 𝑀 𝐾 ⇒ 𝐴𝑐𝑐 𝑀 (𝑦 ∷ 𝐾) 2. ∀𝐾, 𝐾 < 𝑀 𝐿 ⇒ 𝐴𝑐𝑐 𝑀 𝐾 ⇒ 𝐴𝑐𝑐 𝑀 (𝑥 ∷ 𝐾)
  • 31. Multiset Ordering • 4. Case Analysis • By definition, 𝐴𝑐𝑐 𝑀 (𝑥 ∷ 𝐿) is equivalent to ∀𝐾, 𝐾 < 𝑀 (𝑥 ∷ 𝐿) ⇒ 𝐴𝑐𝑐 𝑀 (𝐾) • And there are 3 patterns: 1. 𝐾 includes 𝑥 2. 𝐾 includes 𝑦s s.t. 𝑦 < 𝑥, and 𝐾 minus all such 𝑦 is equal to 𝐿 3. 𝐾 includes 𝑦s s.t. 𝑦 < 𝑥, and 𝐾 minus all such 𝑦 is less than 𝐿 • Each pattern is proved using the Inductive Hypotheses.
  • 32. Decidability • Now, decidability can be proved by induction on the size of sequent.
  • 34. IPC Proposition (Coq) Inductive PProp:Set := • | PPbot : PProp | PPatom : nat -> PProp | PPimpl : PProp -> PProp -> PProp | PPconj : PProp -> PProp -> PProp | PPdisj : PProp -> PProp -> PProp.
  • 35. Cut-free LJ (Coq) Inductive LJ_provable : list PProp -> PProp -> Prop := • | LJ_perm P1 L1 L2 : Permutation L1 L2 -> LJ_provable L1 P1 -> LJ_provable L2 P1 | LJ_weak P1 P2 L1 : LJ_provable L1 P2 -> LJ_provable (P1::L1) P2 | LJ_contr P1 P2 L1 : LJ_provable (P1::P1::L1) P2 -> LJ_provable (P1::L1) P2 …
  • 36. Exchange rule • Exchange rule : Γ, 𝐴, 𝐵, Δ ⊢ 𝐺 𝑒𝑥𝑐ℎ Γ, 𝐵, 𝐴, Δ ⊢ 𝐺 is replaced by more useful Γ⊢ 𝐺 ′ ⊢ 𝐺 𝑝𝑒𝑟𝑚𝑢𝑡𝑎𝑡𝑖𝑜𝑛 Γ where Γ, Γ′ are permutation
  • 37. Permutation Compatibility (Coq) Instance LJ_provable_compat : Proper (@Permutation _==>eq==>iff) LJ_provable. • Allows rewriting over Permutation equality
  • 38. Permutation solver (Coq) • Permutation should be solved automatically Ltac perm := match goal with …
  • 40. Further implementation plan • Refactoring (1) : improve Permutation- associated tactics – A smarter auto-unifying tactics is needed – Write tactics using Objective Caml • Refactoring (2) : use Ssreflect tacticals – This makes the proof more manageable
  • 41. Further implementation plan • Refactoring (3) : change proof order – Contraction first, cut next – It will make the proof shorter • Refactoring (4) : discard Multiset Ordering – If we choose appropriate weight function of Propositional Formula, we don’t need Multiset Ordering. (See [Hudelmaier]) – It also enables us to analyze complexity of this procedure
  • 42. Further implementation plan • Refactoring (5) : Proof of completeness – Now completeness theorem depends on the decidability • New Theorem (1) : Other Syntaxes – NJ and HJ may be introduced • New Theorem (2) : Other Semantics – Heyting Algebra
  • 43. Further implementation plan • New Theorem (3) : Other decision procedure – Decision procedure using semantics (if any) – More efficient decision procedure (especially 𝑂(𝑁 log 𝑁)-space decision procedure) • New Theorem (4) : Complexity – Proof of PSPACE-completeness
  • 44. Source code • Source codes are: • https://github.com/qnighy/IPC-Coq
  • 45. おわり 1. Task & Known results 2. Brief methodology of the proof 1. Cut elimination 2. Contraction elimination 3. → 𝐿 elimination 4. Proof of strictly-decreasingness 3. Implementation detail 4. Further implementation plan
  • 46. References • [Dyckhoff] Roy Dyckhoff, Contraction-free Sequent Calculi for Intuitionistic Logic, The Journal of Symbolic Logic, Vol. 57, No.3, 1992, pp. 795 – 807 • [Statman] Richard Statman, Intuitionistic Propositional Logic is Polynomial-Space Complete, Theoretical Computer Science 9, 1979, pp. 67 – 72 • [Hudelmaier] Jörg Hudelmaier, An O(n log n)-Space Decision Procedure for Intuitionistic Propositional Logic, Journal of Logic and Computation, Vol. 3, Issue 1, pp. 63-75