Polarized Rewriting and Tableaux in B Set Theory

Similar documents
Dedukti: a Logical Framework based on the λπ-calculus Modulo Theory

The Typed λ Calculus and Type Inferencing in ML

Basic Foundations of Isabelle/HOL

Toward explicit rewrite rules in the λπ-calculus modulo

Typed Lambda Calculus for Syntacticians

3.4 Deduction and Evaluation: Tools Conditional-Equational Logic

A Logic of Proofs for Differential Dynamic Logic

DPLL(Γ+T): a new style of reasoning for program checking

Typed Lambda Calculus

Lecture 17: Continuous Functions

Linear Clause Generation by Tableaux and DAGs

Improving Coq Propositional Reasoning Using a Lazy CNF Conversion

Isabelle/HOL:Selected Features and Recent Improvements

Standard Boolean Forms

Knowledge Representation and Reasoning Logics for Artificial Intelligence

Introduction to the Lambda Calculus. Chris Lomont

Solving Quantified Verification Conditions using Satisfiability Modulo Theories

Instantiation Schemes for Nested Theories

Lost in translation. Leonardo de Moura Microsoft Research. how easy problems become hard due to bad encodings. Vampire Workshop 2015

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur

Lecture 17 of 41. Clausal (Conjunctive Normal) Form and Resolution Techniques

Integration of SMT Solvers with ITPs There and Back Again

An LCF-Style Interface between HOL and First-Order Logic

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur

KeYmaera X: An Axiomatic Tactical Theorem Prover for Hybrid Systems

Higher-Order Logic. Specification and Verification with Higher-Order Logic

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution

Revisiting Kalmar completeness metaproof

Decision Procedures for Recursive Data Structures with Integer Constraints

Chapter 3 Complexity of Classical Planning

Formal Predicate Calculus. Michael Meyling

Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic.

Encoding TLA + set theory into many-sorted first-order logic

HOL DEFINING HIGHER ORDER LOGIC LAST TIME ON HOL CONTENT. Slide 3. Slide 1. Slide 4. Slide 2 WHAT IS HIGHER ORDER LOGIC? 2 LAST TIME ON HOL 1

arxiv:cs/ v1 [cs.db] 29 Nov 2002

Lecture 5 - Axiomatic semantics

Lecture 7: Counting classes

Numerical Computations and Formal Methods

Encryption as an Abstract Datatype:

Calculus of Inductive Constructions

Leonardo de Moura and Nikolaj Bjorner Microsoft Research

A computer implemented philosophy of mathematics

LINEAR LOGIC AS A FRAMEWORK FOR SPECIFYING SEQUENT CALCULUS

Lambda Logic. Michael Beeson. San José State University, San Jose, CA, USA. Abstract

Principles of AI Planning. Principles of AI Planning. 7.1 How to obtain a heuristic. 7.2 Relaxed planning tasks. 7.1 How to obtain a heuristic

Quantifier-Free Equational Logic and Prime Implicate Generation

Formally Certified Satisfiability Solving

Computation Club: Gödel s theorem

Algebraic Processors

What if current foundations of mathematics are inconsistent? Vladimir Voevodsky September 25, 2010

Evaluation Trees for Proposition Algebra

Automatic Reasoning (Section 8.3)

Refutation-Based Synthesis in SMT

Knowledge Representation and Reasoning Logics for Artificial Intelligence

Introduction to Parameterized Complexity

Problem Libraries for Non-Classical Logics

An Evolution of Mathematical Tools

Lambda Calculus and Type Inference

Types Summer School Gothenburg Sweden August Dogma oftype Theory. Everything has a type

From Types to Sets in Isabelle/HOL

Activity. CSCI 334: Principles of Programming Languages. Lecture 4: Fundamentals II. What is computable? What is computable?

Typed First-order Logic

in this web service Cambridge University Press

Logical Verification Course Notes. Femke van Raamsdonk Vrije Universiteit Amsterdam

THREE LECTURES ON BASIC TOPOLOGY. 1. Basic notions.

Propositional Logic. Part I

Towards a Logical Reconstruction of Relational Database Theory

Introduction to Axiomatic Semantics

Embedding logics in Dedukti

MA513: Formal Languages and Automata Theory Topic: Context-free Grammars (CFG) Lecture Number 18 Date: September 12, 2011

COMP 4161 NICTA Advanced Course. Advanced Topics in Software Verification. Toby Murray, June Andronick, Gerwin Klein

Formally Optimal Boxing

A Semantic Framework for Proof Evidence

Automated Reasoning. Natural Deduction in First-Order Logic

Lecture 4: January 12, 2015

Programming Languages and Compilers (CS 421)

Computer-supported Modeling and Reasoning. First-Order Logic. 1 More on Isabelle. 1.1 Isabelle System Architecture

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/27

Hw 4 Due Feb 22. D(fg) x y z (

PRocH: Proof Reconstruction for HOL Light

Blocked Clauses in First-Order Logic

Encoding First Order Proofs in SMT

Course notes for Data Compression - 2 Kolmogorov complexity Fall 2005

2. Metric and Topological Spaces

Solutions to Exercises

Logic and its Applications

Geometric Queries for Ray Tracing

Proving Theorems with Athena

Unification in Maude. Steven Eker

Rewriting. Andreas Rümpel Faculty of Computer Science Technische Universität Dresden Dresden, Germany.

Evolving model evolution

Lecture Notes on Real-world SMT

The semantics of a programming language is concerned with the meaning of programs, that is, how programs behave when executed on computers.

Towards certification of TLA + proof obligations with SMT solvers

Inductive datatypes in HOL. lessons learned in Formal-Logic Engineering

Computational Linguistics: Syntax-Semantics Interface

Lee Pike. June 3, 2005

Interaction Nets vs. the ρ-calculus: Introducing Bigraphical Nets

Jaykov Foukzon. Israel Institute of Technology, Haifa, Israel.

A Rule-based Verification Strategy for Array Manipulating Programs

Transcription:

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 F α F G α F, G (F G) α F, G (F G) α F, G F G β F G (F G) β F G F G β F G x F(x) δ F(c) x F(x) δ F(c) x F(x) γ F(t) x F(x) γ 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) β 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) 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) β 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) 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) β 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) 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) β 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) 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

term rewrite rule : a a 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 : 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 F, G α, if H 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

Zenon results All Tools (98,9%) 12.876 mp Zenon Zenon Zenon Zenon Zenon Types Arith Modulo Mod+Ari % 85% 2% 48% 57% 80% 95% Time (s) - 6,9 2,3 2,5 3,0 2,6 Unique 329 0 0 0 34 946 Protocol Processor Intel Xeon E5-2660 v2 Timeout 120 s Memory 1 GiB O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 11 / 17

Polarized Rewriting asymetry rewrite positive formulas a certain way rewrite negative formulas another way interchangeable : F G iff F + G let R+ and R be two sets of rewrite rules Polarized Rewriting F + G is there exists a positive (resp. negative) occurrence H in F, a substitution σ, and a rule l r R + (resp. R ), such that H = lσ and G is F where H has been replaced with rσ. O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 12 / 17

Tableaux Modulo Polarized Theory tableaux is one-sided, we need only positive rewriting add to first-order tableau, the conversion rule F +, if F + G G notice forward rewriting only O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 13 / 17

Example : Inclusion delete the axiom X Y (X Y z z X z Y) replace it with two rewrite rules X Y + ( z z X z Y), X Y (f(x, Y) X f(x, Y) Y) f is a fresh symbol (Skolem symbol) negative quantifiers can be Skolemized! impossible in Deduction Modulo Theory : unpolarized rewriting here positive rewriting applied in positive contexts, negative in negative contexts pre-apply δ and δ : Skolemize O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 14 / 17

Example : Inclusion delete the axiom X Y (X Y z z X z Y) replace it with two rewrite rules X Y + ( z z X z Y), X Y (f(x, Y) X f(x, Y) Y) f is a fresh symbol (Skolem symbol) negative quantifiers can be Skolemized! impossible in Deduction Modulo Theory : unpolarized rewriting here positive rewriting applied in positive contexts, negative in negative contexts pre-apply δ and δ : Skolemize the proof becomes (A A) (f(a, A) A f(a, A) A) α (f(a, A) A), f(a, A) A O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 14 / 17

Advantages Skolemization of the rules = a single Skolem symbol instead of a fresh one for each δ-rule, even if the formula is the same fixable with ɛ-hilbert operator? Skolemization at pre-processing, once and for all more axioms become rewrite rules Deduction Modulo Theory, sole shape x(p F) Polarization allows two more shapes x(p F) turned into P + F x(f P) turned into P F x(p F) subsumed O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 15 / 17

Issues Deciding rewriting in Deduction Modulo Theory : strongly needs non confusion if F G, then they have the same main connective needs confluence if F G, then there is H such that F H G allows to have a simpler additional tableaux rule F (Conv), if F G G termination of rewriting helps, too the more rules, the more potential troubles needs proper study (and definitions!) Completeness not implied by confluence and termination e.g. requires narrowing we do not care much, except for nice theoretical results performance is more important O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 16 / 17

Issues Deciding rewriting in Deduction Modulo Theory : strongly needs non confusion if F G, then they have the same main connective needs confluence if F G, then there is H such that F H G allows to have a simpler additional tableaux rule F (Conv), if F G G termination of rewriting helps, too the more rules, the more potential troubles needs proper study (and definitions!) Completeness not implied by confluence and termination e.g. requires narrowing we do not care much, except for nice theoretical results performance is more important O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 16 / 17

Conclusion implement and test theory can come later except soundness develop proper notions of confluence, cut elimination, models, etc. which Skolemization? O. Hermant (MINES ParisTech) Polarized Tableaux Modulo in B June 5, 2018 17 / 17