Polarized Rewriting and Tableaux in B Set Theory SETS 2018 Olivier Hermant CRI, MINES ParisTech, PSL Research University June 5, 2018 O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 1 / 17
Introduction ◮ Assumes familiarity with FOL ◮ Tableaux method ◮ Extension with rewriting : Tableaux Modulo Theory ◮ Implementation and benchmark : Zenon Modulo and B Set theory ◮ Proposed extension : polarized rewriting ◮ Discussions O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 2 / 17
Tableaux Method ⊥ ⊙ ⊥ F , ¬ F ⊙ ¬⊤ ⊙ ¬⊤ ⊙ ⊙ ⊙ ¬ ( F ∨ G ) α ¬∨ ¬ ( F ⇒ G ) α ¬⇒ ¬¬ F α ¬¬ F ∧ G α ∧ F F , G ¬ F , ¬ G F , ¬ G ¬ ( F ∧ G ) β ¬∧ F ∨ G β ∨ F ⇒ G β ⇒ F | G ¬ F | G ¬ F | ¬ G ∃ x F ( x ) δ ∃ ¬∀ x F ( x ) δ ¬∀ F ( c ) ¬ F ( c ) ∀ x F ( x ) γ ∀ ¬∃ x F ( x ) γ ¬∃ F ( t ) ¬ F ( t ) O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 3 / 17
Example : Inclusion ◮ we want to show A ⊆ A , for a given set A ◮ axiomatization of inclusion is ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) ◮ we shall refute ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) , ¬ ( A ⊆ A ) ◮ the proof : ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) , ¬ ( A ⊆ A ) O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 4 / 17
Example : Inclusion ◮ we want to show A ⊆ A , for a given set A ◮ axiomatization of inclusion is ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) ◮ we shall refute ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) , ¬ ( A ⊆ A ) ◮ the proof : ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) , ¬ ( A ⊆ A ) γ ∀ ∀ y A ⊆ Y ⇔ ( ∀ z z ∈ A ⇒ z ∈ Y ) O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 4 / 17
Example : Inclusion ◮ we want to show A ⊆ A , for a given set A ◮ axiomatization of inclusion is ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) ◮ we shall refute ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) , ¬ ( A ⊆ A ) ◮ the proof : ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) , ¬ ( A ⊆ A ) γ ∀ ∀ y A ⊆ Y ⇔ ( ∀ z z ∈ A ⇒ z ∈ Y ) γ ∀ A ⊆ A ⇔ ( ∀ z z ∈ A ⇒ z ∈ A ) O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 4 / 17
Example : Inclusion ◮ we want to show A ⊆ A , for a given set A ◮ axiomatization of inclusion is ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) ◮ we shall refute ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) , ¬ ( A ⊆ A ) ◮ the proof : ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) , ¬ ( A ⊆ A ) γ ∀ ∀ y A ⊆ Y ⇔ ( ∀ z z ∈ A ⇒ z ∈ Y ) γ ∀ A ⊆ A ⇔ ( ∀ z z ∈ A ⇒ z ∈ A ) α ∧ ( ∀ z z ∈ A ⇒ z ∈ A ) ⇒ A ⊆ A , A ⊆ A ⇒ ( ∀ z z ∈ A ⇒ z ∈ A ) O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 4 / 17
Example : Inclusion ◮ we want to show A ⊆ A , for a given set A ◮ axiomatization of inclusion is ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) ◮ we shall refute ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) , ¬ ( A ⊆ A ) ◮ the proof : ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) , ¬ ( A ⊆ A ) γ ∀ ∀ y A ⊆ Y ⇔ ( ∀ z z ∈ A ⇒ z ∈ Y ) γ ∀ A ⊆ A ⇔ ( ∀ z z ∈ A ⇒ z ∈ A ) α ∧ ( ∀ z z ∈ A ⇒ z ∈ A ) ⇒ A ⊆ A , A ⊆ A ⇒ ( ∀ z z ∈ A ⇒ z ∈ A ) β ⇒ A ⊆ A | ¬∀ z ( z ∈ A ⇒ z ∈ A ) O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 4 / 17
Example : Inclusion ◮ we want to show A ⊆ A , for a given set A ◮ axiomatization of inclusion is ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) ◮ we shall refute ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) , ¬ ( A ⊆ A ) ◮ the proof : ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) , ¬ ( A ⊆ A ) γ ∀ ∀ y A ⊆ Y ⇔ ( ∀ z z ∈ A ⇒ z ∈ Y ) γ ∀ A ⊆ A ⇔ ( ∀ z z ∈ A ⇒ z ∈ A ) α ∧ ( ∀ z z ∈ A ⇒ z ∈ A ) ⇒ A ⊆ A , A ⊆ A ⇒ ( ∀ z z ∈ A ⇒ z ∈ A ) β ⇒ A ⊆ A | ¬∀ z ( z ∈ A ⇒ z ∈ A ) ⊙ ⊙ O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 4 / 17
Example : Inclusion ◮ we want to show A ⊆ A , for a given set A ◮ axiomatization of inclusion is ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) ◮ we shall refute ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) , ¬ ( A ⊆ A ) ◮ the proof : ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) , ¬ ( A ⊆ A ) γ ∀ ∀ y A ⊆ Y ⇔ ( ∀ z z ∈ A ⇒ z ∈ Y ) γ ∀ A ⊆ A ⇔ ( ∀ z z ∈ A ⇒ z ∈ A ) α ∧ ( ∀ z z ∈ A ⇒ z ∈ A ) ⇒ A ⊆ A , A ⊆ A ⇒ ( ∀ z z ∈ A ⇒ z ∈ A ) β ⇒ A ⊆ A | ¬∀ z ( z ∈ A ⇒ z ∈ A ) δ ¬∀ ⊙ ⊙ ¬ ( c ∈ A ⇒ c ∈ A ) O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 4 / 17
Example : Inclusion ◮ we want to show A ⊆ A , for a given set A ◮ axiomatization of inclusion is ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) ◮ we shall refute ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) , ¬ ( A ⊆ A ) ◮ the proof : ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) , ¬ ( A ⊆ A ) γ ∀ ∀ y A ⊆ Y ⇔ ( ∀ z z ∈ A ⇒ z ∈ Y ) γ ∀ A ⊆ A ⇔ ( ∀ z z ∈ A ⇒ z ∈ A ) α ∧ ( ∀ z z ∈ A ⇒ z ∈ A ) ⇒ A ⊆ A , A ⊆ A ⇒ ( ∀ z z ∈ A ⇒ z ∈ A ) β ⇒ A ⊆ A | ¬∀ z ( z ∈ A ⇒ z ∈ A ) δ ¬∀ ⊙ ⊙ ¬ ( c ∈ A ⇒ c ∈ A ) α ¬⇒ c ∈ A , ¬ ( c ∈ A ) O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 4 / 17
Example : Inclusion ◮ we want to show A ⊆ A , for a given set A ◮ axiomatization of inclusion is ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) ◮ we shall refute ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) , ¬ ( A ⊆ A ) ◮ the proof : ∀ X ∀ Y X ⊆ Y ⇔ ( ∀ z z ∈ X ⇒ z ∈ Y ) , ¬ ( A ⊆ A ) γ ∀ ∀ y A ⊆ Y ⇔ ( ∀ z z ∈ A ⇒ z ∈ Y ) γ ∀ A ⊆ A ⇔ ( ∀ z z ∈ A ⇒ z ∈ A ) α ∧ ( ∀ z z ∈ A ⇒ z ∈ A ) ⇒ A ⊆ A , A ⊆ A ⇒ ( ∀ z z ∈ A ⇒ z ∈ A ) β ⇒ A ⊆ A | ¬∀ z ( z ∈ A ⇒ z ∈ A ) δ ¬∀ ⊙ ⊙ ¬ ( c ∈ A ⇒ c ∈ A ) α ¬⇒ c ∈ A , ¬ ( c ∈ A ) ⊙ ⊙ O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 4 / 17
Deduction Modulo Theory Rewrite Rule A term (resp. proposition) rewrite rule is a pair of terms (resp. formulæ) l → r , where F V ( l ) ⊆ F V ( r ) and, in the propositiona case, l is atomic. Examples : ◮ term rewrite rule : a ∪ ∅ → a ◮ proposition rewrite rule : a ⊆ b → ∀ x x ∈ a ⇒ x ∈ b Conversion modulo a Rewrite System We consider the congruence ≡ generated by a set of proposition rewrite rules R and a set of term rewrite rules E (often implicit). Forward-only rewriting is denoted ։ . Example : A ∪ ∅ ⊆ A ≡ ∀ x x ∈ A ⇒ x ∈ A O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 5 / 17
Tableaux Modulo Theory ◮ two flavors, essentially equivalent ◮ add a conversion rule : F ( Conv ) , if F ≡ G G ◮ or integrate conversion inside each rule : H α ∧ , if H ≡ F ∧ G F , G O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 6 / 17
Example : Inclusion ◮ delete the axiom ∀ X ∀ Y ( X ⊆ Y ⇔ ∀ z z ∈ X ⇒ z ∈ Y ) ◮ replace with the rewrite rule X ⊆ Y → ∀ z z ∈ X ⇒ z ∈ Y ◮ we now refute only ¬ ( A ⊆ A ) O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 7 / 17
Example : Inclusion ◮ delete the axiom ∀ X ∀ Y ( X ⊆ Y ⇔ ∀ z z ∈ X ⇒ z ∈ Y ) ◮ replace with the rewrite rule X ⊆ Y → ∀ z z ∈ X ⇒ z ∈ Y ◮ we now refute only ¬ ( A ⊆ A ) ◮ yields ¬ ( A ⊆ A ) ( Conv ) ¬ ( ∀ z z ∈ A ⇒ z ∈ A ) α ¬∀ ¬ ( c ∈ A ⇒ c ∈ A ) α ¬⇒ ¬ ( c ∈ A ) , c ∈ A ⊙ ⊙ O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 7 / 17
Expressing B Set Theory with Rewriting ◮ for power set and comprehension s ∈ P ( t ) −→ ∀ x · ( x ∈ s ⇒ x ∈ t ) x ∈ { z | P ( z ) } −→ P ( x ) ◮ derived constructs ◮ with typing, too s ∈ set ( α ) P α ( t ) −→ ∀ x : α · ( x ∈ α s ⇒ x ∈ α t ) O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 8 / 17
Zenon ◮ Zenon : classical first-order tableaux-based ATP ◮ Extended to ML polymorphism ◮ Extended to Deduction Modulo Theory ◮ Extended to linear arithmetic ◮ Reads TPTP input format ◮ Dedukti certificates ◮ work of P . Halmagrand, G. Bury O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 9 / 17
Zenon ◮ Zenon : classical first-order tableaux-based ATP ◮ Extended to ML polymorphism ◮ Extended to Deduction Modulo Theory ◮ Extended to linear arithmetic ◮ Reads TPTP input format ◮ Dedukti certificates ◮ work of P . Halmagrand, G. Bury ◮ We propose to extend it to Polarized Deduction Modulo Theory O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 9 / 17
Benchmarks A set of Proof Obligations ◮ Provided by Industrial Partners ◮ 12.876 PO ◮ Provable : proved in Atelier B (automatically or interactively) ◮ Wide spectrum ◮ Mild difficulty, large files O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 10 / 17
Recommend
More recommend