Transcript
Page 1: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Proving decidability of Intuitionistic Propositional Calculus

on Coq

Masaki Hara (qnighy)

University of Tokyo, first grade

Logic Zoo 2013 にて

Page 2: Proving Decidability of Intuitionistic Propositional Calculus on 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

Page 3: Proving Decidability of Intuitionistic Propositional Calculus on Coq

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

Page 4: Proving Decidability of Intuitionistic Propositional Calculus 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.

Page 5: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Known results

β€’ cf. classical counterpart of this problem is co-NP complete.

– Proof: find counterexample in boolean-valued semantics (SAT).

Page 6: Proving Decidability of Intuitionistic Propositional Calculus on Coq

methodology

β€’ To prove decidability, all rules should be strictly decreasing on some measuring.

β€’ More formally, for all rules 𝑆1,𝑆2,…,𝑆𝑁

𝑆0π‘Ÿπ‘’π‘™π‘’

and all number 𝑖 (1 ≀ 𝑖 ≀ 𝑁), 𝑆𝑖 < 𝑆0

on certain well-founded relation <.

Page 7: Proving Decidability of Intuitionistic Propositional Calculus on Coq

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

Page 8: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Sequent Calculus LJ

β€’Ξ“βŠ’πΊ

𝐴,Ξ“βŠ’πΊπ‘€π‘’π‘Žπ‘˜

𝐴,𝐴,Ξ“βŠ’πΊ

𝐴,Ξ“βŠ’πΊπ‘π‘œπ‘›π‘‘π‘Ÿ

Ξ“βŠ’π΄ 𝐴,Ξ”βŠ’πΊ

Ξ“,Ξ”βŠ’πΊ(𝑐𝑒𝑑)

β€’

π΄βŠ’π΄π‘Žπ‘₯π‘–π‘œπ‘š

βŠ₯⊒𝐺(𝑒π‘₯π‘“π‘Žπ‘™π‘ π‘œ)

β€’Ξ“βŠ’π΄ 𝐡,Ξ“βŠ’πΊ

𝐴→𝐡,Ξ“βŠ’πΊβ†’πΏ

𝐴,Ξ“βŠ’π΅

Ξ“βŠ’π΄β†’π΅(→𝑅)

‒𝐴,𝐡,Ξ“βŠ’πΊ

𝐴∧𝐡,Ξ“βŠ’πΊβˆ§πΏ

Ξ“βŠ’π΄ Ξ“βŠ’π΅

Ξ“βŠ’π΄βˆ§π΅(βˆ§π‘…)

‒𝐴,Ξ“βŠ’πΊ 𝐡,Ξ“βŠ’πΊ

𝐴∨𝐡,Ξ“βŠ’πΊβˆ¨πΏ

Ξ“βŠ’π΄

Ξ“βŠ’π΄βˆ¨π΅βˆ¨π‘…1

Ξ“βŠ’π΅

Ξ“βŠ’π΄βˆ¨π΅βˆ¨π‘…2

β€’

Page 9: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Sequent Calculus LJ

β€’Ξ“βŠ’πΊ

𝐴,Ξ“βŠ’πΊπ‘€π‘’π‘Žπ‘˜

𝐴,𝐴,Ξ“βŠ’πΊ

𝐴,Ξ“βŠ’πΊπ‘π‘œπ‘›π‘‘π‘Ÿ

Ξ“βŠ’π΄ 𝐴,Ξ”βŠ’πΊ

Ξ“,Ξ”βŠ’πΊ(𝑐𝑒𝑑)

β€’

π΄βŠ’π΄π‘Žπ‘₯π‘–π‘œπ‘š

βŠ₯⊒𝐺(𝑒π‘₯π‘“π‘Žπ‘™π‘ π‘œ)

β€’Ξ“βŠ’π΄ 𝐡,Ξ“βŠ’πΊ

𝐴→𝐡,Ξ“βŠ’πΊβ†’πΏ

𝐴,Ξ“βŠ’π΅

Ξ“βŠ’π΄β†’π΅(→𝑅)

‒𝐴,𝐡,Ξ“βŠ’πΊ

𝐴∧𝐡,Ξ“βŠ’πΊβˆ§πΏ

Ξ“βŠ’π΄ Ξ“βŠ’π΅

Ξ“βŠ’π΄βˆ§π΅(βˆ§π‘…)

‒𝐴,Ξ“βŠ’πΊ 𝐡,Ξ“βŠ’πΊ

𝐴∨𝐡,Ξ“βŠ’πΊβˆ¨πΏ

Ξ“βŠ’π΄

Ξ“βŠ’π΄βˆ¨π΅βˆ¨π‘…1

Ξ“βŠ’π΅

Ξ“βŠ’π΄βˆ¨π΅βˆ¨π‘…2

β€’ We eliminate cut rule first.

Page 10: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Cut elimination

β€’ 1. Prove these rule by induction on proof structure.

β€’Ξ“βŠ’πΊ

Ξ”,Ξ“βŠ’πΊπ‘€π‘’π‘Žπ‘˜πΊ

Ξ”,Ξ”,Ξ“βŠ’πΊ

Ξ”,Ξ“βŠ’πΊπ‘π‘œπ‘›π‘‘π‘ŸπΊ

β€’Ξ“βŠ’βŠ₯

Ξ“βŠ’πΊβŠ₯𝑅𝐸

β€’Ξ“βŠ’π΄βˆ§π΅

Ξ“βŠ’π΄βˆ§π‘…πΈ1

Ξ“βŠ’π΄βˆ§π΅

Ξ“βŠ’π΅βˆ§π‘…πΈ2

β€’Ξ“βŠ’π΄β†’π΅

𝐴,Ξ“βŠ’π΅β†’π‘…πΈ

β€’ If Ξ“1⊒𝐴 𝐴,Ξ”1⊒𝐺1

Ξ“1,Ξ”1⊒𝐺1(𝑐𝑒𝑑𝐴) and

Ξ“2⊒𝐡 𝐡,Ξ”2⊒𝐺2

Ξ“2,Ξ”2⊒𝐺2(𝑐𝑒𝑑𝐡) for all

Ξ“1, Ξ“2, Ξ”1, Ξ”2, 𝐺1, 𝐺2 , then Ξ“βŠ’π΄βˆ¨π΅ A,Ξ”βŠ’πΊ 𝐡,Ξ”βŠ’πΊ

Ξ“,Ξ”βŠ’πΊ(βˆ¨π‘…πΈ)

Page 11: Proving Decidability of Intuitionistic Propositional Calculus on Coq

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) β– 

Page 12: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Cut-free LJ

β€’Ξ“βŠ’πΊ

𝐴,Ξ“βŠ’πΊπ‘€π‘’π‘Žπ‘˜

𝐴,𝐴,Ξ“βŠ’πΊ

𝐴,Ξ“βŠ’πΊπ‘π‘œπ‘›π‘‘π‘Ÿ

β€’

π΄βŠ’π΄π‘Žπ‘₯π‘–π‘œπ‘š

βŠ₯⊒𝐺(𝑒π‘₯π‘“π‘Žπ‘™π‘ π‘œ)

β€’Ξ“βŠ’π΄ 𝐡,Ξ“βŠ’πΊ

𝐴→𝐡,Ξ“βŠ’πΊβ†’πΏ

𝐴,Ξ“βŠ’π΅

Ξ“βŠ’π΄β†’π΅(→𝑅)

‒𝐴,𝐡,Ξ“βŠ’πΊ

𝐴∧𝐡,Ξ“βŠ’πΊβˆ§πΏ

Ξ“βŠ’π΄ Ξ“βŠ’π΅

Ξ“βŠ’π΄βˆ§π΅(βˆ§π‘…)

‒𝐴,Ξ“βŠ’πΊ 𝐡,Ξ“βŠ’πΊ

𝐴∨𝐡,Ξ“βŠ’πΊβˆ¨πΏ

Ξ“βŠ’π΄

Ξ“βŠ’π΄βˆ¨π΅βˆ¨π‘…1

Ξ“βŠ’π΅

Ξ“βŠ’π΄βˆ¨π΅βˆ¨π‘…2

β€’

Page 13: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Cut-free LJ

β€’Ξ“βŠ’πΊ

𝐴,Ξ“βŠ’πΊπ‘€π‘’π‘Žπ‘˜

𝐴,𝐴,Ξ“βŠ’πΊ

𝐴,Ξ“βŠ’πΊπ‘π‘œπ‘›π‘‘π‘Ÿ

β€’

π΄βŠ’π΄π‘Žπ‘₯π‘–π‘œπ‘š

βŠ₯⊒𝐺(𝑒π‘₯π‘“π‘Žπ‘™π‘ π‘œ)

β€’Ξ“βŠ’π΄ 𝐡,Ξ“βŠ’πΊ

𝐴→𝐡,Ξ“βŠ’πΊβ†’πΏ

𝐴,Ξ“βŠ’π΅

Ξ“βŠ’π΄β†’π΅(→𝑅)

‒𝐴,𝐡,Ξ“βŠ’πΊ

𝐴∧𝐡,Ξ“βŠ’πΊβˆ§πΏ

Ξ“βŠ’π΄ Ξ“βŠ’π΅

Ξ“βŠ’π΄βˆ§π΅(βˆ§π‘…)

‒𝐴,Ξ“βŠ’πΊ 𝐡,Ξ“βŠ’πΊ

𝐴∨𝐡,Ξ“βŠ’πΊβˆ¨πΏ

Ξ“βŠ’π΄

Ξ“βŠ’π΄βˆ¨π΅βˆ¨π‘…1

Ξ“βŠ’π΅

Ξ“βŠ’π΄βˆ¨π΅βˆ¨π‘…2

β€’ Contraction rule is not strictly decreasing

Page 14: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Contraction-free LJ

β€’

𝐴,Ξ“βŠ’π΄π‘Žπ‘₯π‘–π‘œπ‘š

βŠ₯,Ξ“βŠ’πΊ(𝑒π‘₯π‘“π‘Žπ‘™π‘ π‘œ)

‒𝐴→𝐡,Ξ“βŠ’π΄ 𝐡,Ξ“βŠ’πΊ

𝐴→𝐡,Ξ“βŠ’πΊβ†’πΏ

𝐴,Ξ“βŠ’π΅

Ξ“βŠ’π΄β†’π΅(→𝑅)

‒𝐴,𝐡,Ξ“βŠ’πΊ

𝐴∧𝐡,Ξ“βŠ’πΊβˆ§πΏ

Ξ“βŠ’π΄ Ξ“βŠ’π΅

Ξ“βŠ’π΄βˆ§π΅(βˆ§π‘…)

‒𝐴,Ξ“βŠ’πΊ 𝐡,Ξ“βŠ’πΊ

𝐴∨𝐡,Ξ“βŠ’πΊβˆ¨πΏ

Ξ“βŠ’π΄

Ξ“βŠ’π΄βˆ¨π΅βˆ¨π‘…1

Ξ“βŠ’π΅

Ξ“βŠ’π΄βˆ¨π΅βˆ¨π‘…2

Page 15: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Contraction-free LJ

β€’ Implicit weak

–

𝐴,Ξ“βŠ’π΄π‘Žπ‘₯π‘–π‘œπ‘š

βŠ₯,Ξ“βŠ’πΊ(𝑒π‘₯π‘“π‘Žπ‘™π‘ π‘œ)

β€’ Implicit contraction

–𝐴→𝐡,Ξ“βŠ’π΄ 𝐡,Ξ“βŠ’πΊ

𝐴→𝐡,Ξ“βŠ’πΊβ†’πΏ

β€“Ξ“βŠ’π΄ Ξ“βŠ’π΅

Ξ“βŠ’π΄βˆ§π΅(βˆ§π‘…)

–𝐴,Ξ“βŠ’πΊ 𝐡,Ξ“βŠ’πΊ

𝐴∨𝐡,Ξ“βŠ’πΊβˆ¨πΏ

Page 16: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Contraction-free LJ

β€’ Implicit weak

–

𝐴,Ξ“βŠ’π΄π‘Žπ‘₯π‘–π‘œπ‘š

βŠ₯,Ξ“βŠ’πΊ(𝑒π‘₯π‘“π‘Žπ‘™π‘ π‘œ)

β€’ Implicit contraction

–𝐴→𝐡,Ξ“βŠ’π΄ 𝐡,Ξ“βŠ’πΊ

𝐴→𝐡,Ξ“βŠ’πΊβ†’πΏ

β€“Ξ“βŠ’π΄ Ξ“βŠ’π΅

Ξ“βŠ’π΄βˆ§π΅(βˆ§π‘…)

–𝐴,Ξ“βŠ’πΊ 𝐡,Ξ“βŠ’πΊ

𝐴∨𝐡,Ξ“βŠ’πΊβˆ¨πΏ

Page 17: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Proof of weak rule

β€’ Easily done by induction β– 

Page 18: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Proof of contr rule

β€’ 1. prove these rules by induction on proof structure.

β€“π΄βˆ§π΅,Ξ“βŠ’πΊ

𝐴,𝐡,Ξ“βŠ’πΊβˆ§πΏπΈ

𝐴∨𝐡,Ξ“βŠ’πΊ

𝐴,Ξ“βŠ’πΊβˆ¨πΏπΈ1

𝐴∨𝐡,Ξ“βŠ’πΊ

𝐡,Ξ“βŠ’πΊ(∨𝐿𝐸2)

–𝐴→𝐡,Ξ“βŠ’πΊ

𝐡,Ξ“βŠ’πΊ(β†’π‘€π‘’π‘Žπ‘˜)

β€’ 2. prove contr rule by induction on proof structure.β– 

Page 19: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Contraction-free LJ

β€’

𝐴,Ξ“βŠ’π΄π‘Žπ‘₯π‘–π‘œπ‘š

βŠ₯,Ξ“βŠ’πΊ(𝑒π‘₯π‘“π‘Žπ‘™π‘ π‘œ)

‒𝐴→𝐡,Ξ“βŠ’π΄ 𝐡,Ξ“βŠ’πΊ

𝐴→𝐡,Ξ“βŠ’πΊβ†’πΏ

𝐴,Ξ“βŠ’π΅

Ξ“βŠ’π΄β†’π΅(→𝑅)

‒𝐴,𝐡,Ξ“βŠ’πΊ

𝐴∧𝐡,Ξ“βŠ’πΊβˆ§πΏ

Ξ“βŠ’π΄ Ξ“βŠ’π΅

Ξ“βŠ’π΄βˆ§π΅(βˆ§π‘…)

‒𝐴,Ξ“βŠ’πΊ 𝐡,Ξ“βŠ’πΊ

𝐴∨𝐡,Ξ“βŠ’πΊβˆ¨πΏ

Ξ“βŠ’π΄

Ξ“βŠ’π΄βˆ¨π΅βˆ¨π‘…1

Ξ“βŠ’π΅

Ξ“βŠ’π΄βˆ¨π΅βˆ¨π‘…2

Page 20: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Contraction-free LJ

β€’

𝐴,Ξ“βŠ’π΄π‘Žπ‘₯π‘–π‘œπ‘š

βŠ₯,Ξ“βŠ’πΊ(𝑒π‘₯π‘“π‘Žπ‘™π‘ π‘œ)

‒𝐴→𝐡,Ξ“βŠ’π΄ 𝐡,Ξ“βŠ’πΊ

𝐴→𝐡,Ξ“βŠ’πΊβ†’πΏ

𝐴,Ξ“βŠ’π΅

Ξ“βŠ’π΄β†’π΅(→𝑅)

‒𝐴,𝐡,Ξ“βŠ’πΊ

𝐴∧𝐡,Ξ“βŠ’πΊβˆ§πΏ

Ξ“βŠ’π΄ Ξ“βŠ’π΅

Ξ“βŠ’π΄βˆ§π΅(βˆ§π‘…)

‒𝐴,Ξ“βŠ’πΊ 𝐡,Ξ“βŠ’πΊ

𝐴∨𝐡,Ξ“βŠ’πΊβˆ¨πΏ

Ξ“βŠ’π΄

Ξ“βŠ’π΄βˆ¨π΅βˆ¨π‘…1

Ξ“βŠ’π΅

Ξ“βŠ’π΄βˆ¨π΅βˆ¨π‘…2

β€’ This time, →𝐿 rule is not decreasing

Page 21: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Terminating LJ

β€’ Split 𝐴→𝐡,Ξ“βŠ’π΄ 𝐡,Ξ“βŠ’πΊ

𝐴→𝐡,Ξ“βŠ’πΊβ†’πΏ into 4 pieces

1. 𝐢,π΄π‘‘π‘œπ‘š 𝑛 ,Ξ“βŠ’πΊ

π΄π‘‘π‘œπ‘š 𝑛 →𝐢,π΄π‘‘π‘œπ‘š 𝑛 ,Ξ“βŠ’πΊβ†’πΏ1

2. 𝐡→𝐢,Ξ“βŠ’π΄β†’π΅ C,Ξ“βŠ’πΊ

𝐴→𝐡 →𝐢,Ξ“βŠ’πΊ(→𝐿2)

3. 𝐴→ 𝐡→𝐢 ,Ξ“βŠ’πΊ

𝐴∧𝐡 →𝐢,Ξ“βŠ’πΊ(→𝐿3)

4. 𝐴→𝐢,𝐡→𝐢,Ξ“βŠ’πΊ

𝐴∨𝐡 →𝐢,Ξ“βŠ’πΊ(→𝐿4)

Page 22: Proving Decidability of Intuitionistic Propositional Calculus on Coq

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

Page 23: Proving Decidability of Intuitionistic Propositional Calculus on Coq

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

Page 24: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Terminating LJ

β€’

𝐴,Ξ“βŠ’π΄π‘Žπ‘₯π‘–π‘œπ‘š

βŠ₯,Ξ“βŠ’πΊ(𝑒π‘₯π‘“π‘Žπ‘™π‘ π‘œ)

β€’ 𝐢,π΄π‘‘π‘œπ‘š 𝑛 ,Ξ“βŠ’πΊ

π΄π‘‘π‘œπ‘š 𝑛 →𝐢,π΄π‘‘π‘œπ‘š 𝑛 ,Ξ“βŠ’πΊβ†’πΏ1

𝐡→𝐢,Ξ“βŠ’π΄β†’π΅ C,Ξ“βŠ’πΊ

𝐴→𝐡 →𝐢,Ξ“βŠ’πΊβ†’πΏ2

‒𝐴→ 𝐡→𝐢 ,Ξ“βŠ’πΊ

𝐴∧𝐡 →𝐢,Ξ“βŠ’πΊβ†’πΏ3

𝐴→𝐢,𝐡→𝐢,Ξ“βŠ’πΊ

𝐴∨𝐡 →𝐢,Ξ“βŠ’πΊβ†’πΏ4

‒𝐴,Ξ“βŠ’π΅

Ξ“βŠ’π΄β†’π΅β†’π‘…

𝐴,𝐡,Ξ“βŠ’πΊ

𝐴∧𝐡,Ξ“βŠ’πΊβˆ§πΏ

Ξ“βŠ’π΄ Ξ“βŠ’π΅

Ξ“βŠ’π΄βˆ§π΅(βˆ§π‘…)

‒𝐴,Ξ“βŠ’πΊ 𝐡,Ξ“βŠ’πΊ

𝐴∨𝐡,Ξ“βŠ’πΊβˆ¨πΏ

Ξ“βŠ’π΄

Ξ“βŠ’π΄βˆ¨π΅βˆ¨π‘…1

Ξ“βŠ’π΅

Ξ“βŠ’π΄βˆ¨π΅βˆ¨π‘…2

Page 25: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Proof of termination

β€’ Weight of Proposition

– 𝑀 π΄π‘‘π‘œπ‘š 𝑛 = 1

– 𝑀 βŠ₯ = 1

– 𝑀 𝐴 β†’ 𝐡 = 𝑀 𝐴 + 𝑀 𝐡 + 1

– 𝑀 𝐴 ∧ 𝐡 = 𝑀 𝐴 + 𝑀 𝐡 + 2

– 𝑀 𝐴 ∨ 𝐡 = 𝑀 𝐴 + 𝑀 𝐡 + 1

β€’ 𝐴 < 𝐡 ⇔ 𝑀 𝐴 < 𝑀(𝐡)

Page 26: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Proof of termination

β€’ ordering of Proposition List

– Use Multiset ordering (Dershowitz and Manna ordering)

Page 27: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Multiset Ordering

β€’ Multiset Ordering: a binary relation between multisets (not necessarily be ordering)

β€’ 𝐴 > 𝐡 ⇔

A

B

Not empty

Page 28: Proving Decidability of Intuitionistic Propositional Calculus on Coq

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

Page 29: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Multiset Ordering

Proof

β€’ 1. induction on list

β€’ Nil β‡’ there is no 𝐴 such that 𝐴 <𝑀 Nil, therefore it’s accessible.

β€’ We will prove: 𝐴𝑐𝑐𝑀 𝐿 β‡’ 𝐴𝑐𝑐𝑀(π‘₯ ∷ 𝐿)

Page 30: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Multiset Ordering

β€’ 2. duplicate assumption

β€’ Using 𝐴𝑐𝑐(π‘₯) and 𝐴𝑐𝑐𝑀(𝐿), we will prove 𝐴𝑐𝑐𝑀 𝐿 β‡’ 𝐴𝑐𝑐𝑀(π‘₯ ∷ 𝐿)

β€’ 3. induction on π‘₯ and 𝐿

– We can use these two inductive hypotheses.

1. βˆ€πΎ 𝑦, 𝑦 < π‘₯ β‡’ 𝐴𝑐𝑐𝑀 𝐾 β‡’ 𝐴𝑐𝑐𝑀(𝑦 ∷ 𝐾)

2. βˆ€πΎ, 𝐾 <𝑀 𝐿 β‡’ 𝐴𝑐𝑐𝑀 𝐾 β‡’ 𝐴𝑐𝑐𝑀(π‘₯ ∷ 𝐾)

Page 31: Proving Decidability of Intuitionistic Propositional Calculus on Coq

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.

Page 32: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Decidability

β€’ Now, decidability can be proved by induction on the size of sequent.

Page 33: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Implementation Detail

β€’

Page 34: Proving Decidability of Intuitionistic Propositional Calculus on Coq

IPC Proposition (Coq)

β€’ Inductive PProp:Set := | PPbot : PProp | PPatom : nat -> PProp | PPimpl : PProp -> PProp -> PProp | PPconj : PProp -> PProp -> PProp | PPdisj : PProp -> PProp -> PProp.

Page 35: Proving Decidability of Intuitionistic Propositional Calculus on Coq

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 …

Page 36: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Exchange rule

β€’ Exchange rule : Ξ“, 𝐴, 𝐡, Ξ” ⊒ 𝐺

Ξ“, 𝐡, 𝐴, Ξ” ⊒ 𝐺𝑒π‘₯π‘β„Ž

is replaced by more useful Ξ“ ⊒ 𝐺

Ξ“β€² ⊒ πΊπ‘π‘’π‘Ÿπ‘šπ‘’π‘‘π‘Žπ‘‘π‘–π‘œπ‘›

where Ξ“, Ξ“β€² are permutation

Page 37: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Permutation Compatibility (Coq)

β€’ Allows rewriting over Permutation equality

Instance LJ_provable_compat : Proper (@Permutation _==>eq==>iff) LJ_provable.

Page 38: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Permutation solver (Coq)

β€’ Permutation should be solved automatically

Ltac perm := match goal with …

Page 39: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Further implementation plan

β€’

Page 40: Proving Decidability of Intuitionistic Propositional Calculus on Coq

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

Page 41: Proving Decidability of Intuitionistic Propositional Calculus on Coq

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

Page 42: Proving Decidability of Intuitionistic Propositional Calculus on Coq

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

Page 43: Proving Decidability of Intuitionistic Propositional Calculus on Coq

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

Page 44: Proving Decidability of Intuitionistic Propositional Calculus on Coq

Source code

β€’ Source codes are:

β€’ https://github.com/qnighy/IPC-Coq

Page 45: Proving Decidability of Intuitionistic Propositional Calculus on 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

Page 46: Proving Decidability of Intuitionistic Propositional Calculus on Coq

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


Top Related