On October 23rd, 2014, we updated our
By continuing to use LinkedIn’s SlideShare service, you agree to the revised terms, so please take a few minutes to review them.
Proving Decidability of Intuitionistic Propositional Calculus on CoqPresentation Transcript
Proving decidabilityof Intuitionistic Propositional Calculus on Coq Masaki Hara (qnighy) University of Tokyo, first grade Logic Zoo 2013 にて
1. Task & Known results2. Brief methodology of the proof 1. Cut elimination 2. Contraction elimination 3. → 𝐿 elimination 4. Proof of strictly-decreasingness3. Implementation detail4. 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 <.
methodology1. Eliminate cut rule of LJ2. Eliminate contraction rule3. Split → 𝑳 rule into 4 pieces4. Prove that every rule is strictly decreasing
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
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 OrderingProof• 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.
Permutation solver (Coq)• Permutation should be solved automaticallyLtac 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
おわり1. Task & Known results2. Brief methodology of the proof 1. Cut elimination 2. Contraction elimination 3. → 𝐿 elimination 4. Proof of strictly-decreasingness3. Implementation detail4. 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