Using Existential Graphs for Automated Theorem Proving

Slides:



Advertisements
Similar presentations
Inference Rules Universal Instantiation Existential Generalization
Advertisements

Possible World Semantics for Modal Logic
Introduction to Theorem Proving
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
1 Logic Logic in general is a subfield of philosophy and its development is credited to ancient Greeks. Symbolic or mathematical logic is used in AI. In.
Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Logic Use mathematical deduction to derive new knowledge.
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
1 Introduction to Abstract Mathematics Valid AND Invalid Arguments 2.3 Instructor: Hayk Melikya
Deduction In addition to being able to represent facts, or real- world statements, as formulas, we want to be able to manipulate facts, e.g., derive new.
Logic CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Logic.
Logic Concepts Lecture Module 11.
Truth Trees Intermediate Logic.
Formal Logic Proof Methods Direct Proof / Natural Deduction Conditional Proof (Implication Introduction) Reductio ad Absurdum Resolution Refutation.
Proof methods Proof methods divide into (roughly) two kinds: –Application of inference rules Legitimate (sound) generation of new sentences from old Proof.
Automated Proof Generation for EG Bram van Heuveln Spring 2003 AI & Reasoning Lab, RPI.
Formalizing Alpha: Soundness and Completeness Bram van Heuveln Dept. of Cognitive Science RPI.
Existential Graphs and Davis-Putnam April 3, 2002 Bram van Heuveln Department of Cognitive Science.
Methods of Proof Chapter 7, second half.
Knoweldge Representation & Reasoning
Alpha: Symbolization and Inference Bram van Heuveln Minds and Machines Lab RPI.
Chapter 3 Propositional Logic
Proof by Deduction. Deductions and Formal Proofs A deduction is a sequence of logic statements, each of which is known or assumed to be true A formal.
Discrete Mathematics and its Applications
CS1502 Formal Methods in Computer Science Lecture Notes 10 Resolution and Horn Sentences.
Propositional Logic Review
Proof Systems KB |- Q iff there is a sequence of wffs D1,..., Dn such that Dn is Q and for each Di in the sequence: a) either Di is in KB or b) Di can.
Logics for Data and Knowledge Representation Propositional Logic: Reasoning Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
Propositional Resolution Computational LogicLecture 4 Michael Genesereth Spring 2005.
CHAPTERS 7, 8 Oliver Schulte Logical Inference: Through Proof to Truth.
INTRODUCTION TO ARTIFICIAL INTELLIGENCE COS302 MICHAEL L. LITTMAN FALL 2001 Satisfiability.
Pattern-directed inference systems
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
Logical Agents Logic Propositional Logic Summary
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
Existential Graphs Intermediate Logic. Existential Graphs A graphical logic system developed by C.S. Peirce almost 100 years ago. Peirce studied semiotics:
An Introduction to Artificial Intelligence – CE Chapter 7- Logical Agents Ramin Halavati
S P Vimal, Department of CSIS, BITS, Pilani
Automated Theorem Proving: Resolution and Davis-Putnam Intermediate Logic.
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
1 CA 208 Logic PQ PQPQPQPQPQPQPQPQ
Logical Agents Chapter 7. Knowledge bases Knowledge base (KB): set of sentences in a formal language Inference: deriving new sentences from the KB. E.g.:
LECTURE LECTURE Propositional Logic Syntax 1 Source: MIT OpenCourseWare.
Propositional calculus
LDK R Logics for Data and Knowledge Representation Propositional Logic: Reasoning First version by Alessandro Agostini and Fausto Giunchiglia Second version.
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Extra slides for Chapter 3: Propositional Calculus & Normal Forms Based on Prof. Lila Kari’s slides For CS2209A, 2009 By Dr. Charles Ling;
CS6133 Software Specification and Verification
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part B Propositional Logic.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
1 Propositional Proofs 1. Problem 2 Deduction In deduction, the conclusion is true whenever the premises are true.  Premise: p Conclusion: (p ∨ q) 
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
March 23 rd. Four Additional Rules of Inference  Constructive Dilemma (CD): (p  q) (r  s) p v r q v s.
EA C461 Artificial Intelligence
Knowledge Representation and Reasoning
Logical Inference: Through Proof to Truth
Logics for Data and Knowledge Representation
Logical Agents Chapter 7 Selected and slightly modified slides from
Automated Proof Generation for EG
Artificial Intelligence
Artificial Intelligence: Agents and Propositional Logic.
CS 416 Artificial Intelligence
Methods of Proof Chapter 7, second half.
Chapter 8 Natural Deduction
Presentation transcript:

Using Existential Graphs for Automated Theorem Proving Bram van Heuveln March 13, 2002

Overview Automated Theorem Proving Existential Graphs What is it? ATP procedures Existential Graphs Quick Overview Using EG for ATP

Automated Theorem Proving In ATP, one tries to come up with procedures that check whether some statement  (the conclusion, or theorem) logically follows from (is logically entailed by; is a logical consequence of) a set of statements  = {1 ,  , n} (the premises, or axioms). In this definition, ‘logically’ means ‘according to some system of logic’. This talk, we will restrict ourselves to the system of truth-functional logic. I will assume the audience to be familiar with the formal syntax and formal semantics of truth-functional logic.

Decision Procedures A procedure P that checks for logical entailment is called a decision procedure if and only if for any statement  and any set of statements : (P is a positive test) P declares that  is logically entailed by  if and only if  is indeed logically entailed by , and (P is a negative test) P declares that  is not logically entailed by  if and only if  is indeed not logically entailed by  (these two properties are crucially different, since not declaring that something is the case is not the same as declaring that something is not the case. E.g. consider P going into an infinite loop)

Logical Entailment and Logical Consistency A statement  is a logical consequence of a set of statements  = {1, …, n} if and only if it is impossible for  to be false while each i is true. We write this as  |=  Logical Consistency: A set of statements  = {1, …, n} is logically consistent if and only if it is possible for each i to be true. So, a statement  is logically entailed by a set of statements {1, …, n} if and only if the set {1, …, n, } is logically inconsistent. Therefore, a decision procedure for logical entailment can be used as a decision procedure for logical consistency, and vice versa. We will see both main types of decision procedures in this talk.

Procedures for checking logical entailment or logical consistency Derivations Truth Tables Short Truth Tables Truth Trees Resolution Davis-Putnam Non-Clausal Davis-Putnam

Running Problems K  (L  M) U  (V  W) (P  Q) M  L U  W (Q  R) M V P  R Is {(X  Y), (X  Y), (X  Y), (X  Y)} consistent? A  (B  C) (A  B)  (D  E) E A C  D

Derivations Systems of derivation define a finite number of rules of inference that allow one to infer (derive) a statement from other statements. A formal proof is a sequence of statements, where each statement is either an assumption, or is derived from any of the previous statements using some rule of inference. If there is a formal proof with 1, …, n as initial assumptions, and with  as the last statement, then we write {1, …, n } |- 

Derivation Example 1. A  (B  C) Assumption 2. (A  B)  (D  E) 3. E Assumption 4. A Assumption 5. B  C DS 1,4 6. B Simp 5 7. C Simp 5 8. A  B Add 6 9. D  E MP 2,8 10. D DS 3,9 11. C  D Conj 7,10

The Good, the Bad, and the Ugly The good news is that there exist systems of derivation (e.g. Fitch) for which it holds that for any statement  and any set of statements : (Soundness) If  |-  then  |= , and (Completeness) If  |=  then  |-  The bad news is that the systems do not tell us how to construct a formal proof. The ugly news is that the systems are unable to tell us that  is not logically entailed by . With some effort, a decision procedure can be based on derivational systems, but it is going to be inefficient.

Truth Tables Truth tables systematically exhaust all possible truth-value assignments. The good news is that this will provide us with a decision procedure. The bad news is that it is a very inefficient procedure.

Truth Table Example U V W U  (V  W) U  W V T F

A More Focused Search K  (L  M) M  L M We are interested in whether all premises can be true and the conclusion false: In order for the conclusion to be false, M must be false. In order for the second premise to be true while M is false, L must be false. In order for the first premise to be true while L and M are both false, K must be false.

The Short Truth Table Method The Short Truth Table Method assigns truth values to the involved complex statements, and sees if that can be made to work out: K  (L  M) M   L / M F T F F F F T T F F works out  invalid A  (B  C) (A  B)  (D  E) E A / C  D F T T T T F ? T T F F F T F T F T F F does not work out  valid

Drawback of the Short Truth Table Method A drawback of the short truth table method is that you are not always forced to assign any further truth values: U  (V  W) U  W V T T T FT At this point, you can choose to assign certain truth values, but if your choice does not lead to the kind of row you are looking for, then you need to try a different option, and the short truth table method has no tools to do go through all of your options in a systematic way.

Truth Trees The obvious solution to the drawback of the short truth table method is to incorporate tools to systematically keep track of multiple options. One method that does so is the truth tree method: The truth tree method tries to systematically derive a contradiction from the assumption that certain statements are all true. Like the short table method, it infers which other statements are forced to be true under this assumption. When nothing is forced, then the tree branches into the possible options.

Truth Tree Example U  (V  W) U  W V V U V  W U U V W W W   U U W W

Decomposition Rules for Truth Trees  PQ  (PQ)  P P P Q Q PQ  PQ  (PQ)  P P Q P Q Q (PQ)  (PQ)  PQ  P P P P P Q Q Q Q Q

Rules of KE Calculus P (P  Q) P  Q (P  Q) P P P P Q Q   Q DN Alpha Branch P  Q P  Q P  Q (P  Q) P P P P Q Q Q Q (P  Q) P  Q P  Q (P  Q) P Q P P Q P Q Q Beta Eta

Truth Trees as Decision Procedures The truth tree method can easily be made into a decision procedure. Efficiency can be increased by strategically choosing sentences to be decomposed.

Resolution Resolution is, like the tree method, a method to check for the logical consistency of a set of statements. Resolution requires all sentences to be put into CNF. A set of sentences in CNF is made into a clause set: a set of clauses, where a clause is a set of literals. Clauses are resolved using the resolution rule, and the resulting clause (the resolvent) is added to the clause set: L  C1 L’  C2 CNEW = C1/L  C2/L’

Putting into CNF (P  Q)  (Equiv) ((P  Q)  (Q  P))  (Impl)  (DeM) (P  Q)  (Q  P)  (DeM, DN) (P  Q)  (Q  P)  (Dist) ((P  Q)  Q)  ((P  Q)  P)  (Dist) (P  Q)  (Q  Q)  (P  P)  (Q  P)

Resolution Graph (P  Q) (Q  R) (P  R)    (P  Q)  (P  Q) (Q  R)  (Q  R) (P  R)  (P  R)    {P, Q} {P, Q} {Q, R} {Q, R} {P, R} {P, R} {P, R} {P, Q} {P} {P} {}

Soundness and Completeness of Resolution A clause is satisfied by a truth-value assignment if and only if that assignment makes at least one literal in that clause true. A clause set is satisfiable if and only if there is a truth-value assignment that satisfies all clauses in that clause set. A set of sentences is inconsistent if and only if the corresponding clause set is unsatisfiable. It can be shown that a clause set is unsatisfiable if and only if the empty clause (which is a generalized disjunction of 0 disjuncts, which is a contradiction) can be resolved from that clause set.

Resolutions as Derivations 1. {A, B} A  (B  C)  (A  B)  (A  C)  2. {A, C} 3. {A, D, E} (A  B)  (D  E) (A  D  E)  (B  D  E)  4. {B, D, E}   E  5. {E} (A  B)  (D  E)  (A  B)  (D  E) A  6. {A} (C  D)  C  D  7. {C, D} 8. {B} 1,6 9. {C} 2,6 10. {D, E} 4,8 11. {D} 5,10 12. {D} 7,9 13. {} 11,12

Resolutions as Decision Procedures Resolution can be made into a decision procedure by systematically exhausting all possible resolvents (of which there are finitely many). This will not be very efficient unless we add some resolution strategies.

Resolution Strategies Clause Elimination Strategies Tautology Elimination Subsumption Elimination Pure Literal Elimination Resolving Strategies Unit Preference Resolution Linear Resolution Ordered Resolution Etc.

Tautology Elimination A tautologous clause is a clause that contains an atomic statement as well as the negation of that atomic statement. Obviously, for any tautologous clause C, any truth-value assignment is going to satisfy C. Hence, with S any clause set, and with S’ the clause set S with all tautologous clauses removed: S is satisfiable if and only if S’ is satisfiable.

Subsumption Elimination A clause C1 subsumes a clause C2 if and only if every literal contained in C1 is contained in C1, i.e. C1  C2. Obviously, if C1 subsumes C2 , then any truth-value assignment that satisfies C1 will satisfy C2. Hence, with S any clause set, and S’ the clause set S with all subsumed clauses removed: S is satisfiable if and only if S’ is satisfiable.

Pure Literal Elimination A literal L is pure with regard to a clause set S if and only if L is contained in at least one clause in S, but L’ is not. A clause is pure with regard to a clause set S if and only if it contains a pure literal. Obviously, with S any clause set, and with S’ the clause set S with all pure clauses removed: S is satisfiable if and only if S’ is satisfiable.

Unit Preference Resolution A unit clause is a clause that contains one literal. Unit preference resolution tries to resolve using unit clauses first.

Unit Literal Deletion and Splitting For any clause set S, SL is the clause set that is generated from S as follows: Remove all clauses from S that contain L. Remove all instances of L’ from all other clauses Obviously, with C = {L}  S, S is satisfiable if and only if SL is satisfiable. It is also easy to see that for any clause set S, and any literal L: S is satisfiable if and only if SL is satisfiable or SL’ is satisfiable. The last observation suggests a splitting strategy that forms the basis of Davis-Putnam.

Davis-Putnam Recursive routine Satisfiable(S) returns true iff S is satisfiable: boolean Satisfiable(S) begin if S = {} return true; if S = {{}} return false; select L  lit(S); return Satisfiable(SL) || Satisfiable(SL’); end

Making Davis-Putnam Efficient: Adding Bells and Whistles The routine on the previous slide is not very efficient. However, we can easily make it more efficient: return false as soon as {}S add the unit rule: if {L}S return Satisfiable(SL) strategically add deletion strategies strategically choose the literal on which to split As far as I have gathered from the ATP literature, such efficient Davis-Putnam routines are credited to do well in comparison to other ATP routines.

Davis-Putnam as Trees {P, Q} {P, Q} {P, Q} {P, Q} (P) (P) {Q} {Q} {} {} {} {}

EG and ATP I will present 2 routines: 1. A decision procedure to decide on consistency (satisfiability): this routine can be seen as a generalized Davis-Putnam routine. 2. A routine to systematically derive a conclusion from a set of premises, assuming that the conclusion is logically entailed by the premises (if not, the routine will stop, so you know that the conclusion is not logically entailed). This routine is an extension of the first routine.

Symbolization in EG Expression in PL Symbolization in EG P P ~                

Inference Rules in EG     Double Cut              (De)Iteration   Erasure    2k 1 2k 1     Insertion  2k+1 1 2k+1 1

Unit Rule for EG Where L is a literal graph, and  any graph, the procedure Unit(L, ), returns the graph  with all occurrences of L removed, and with all complements of L replaced with the empty cut. Again, we’ll write this as L.

Gaining Efficiency by Avoiding Clauses Clausifying DE (2x!) DC (2x!) A B C C A C No Clausifying! DE DC A B C A B C B C

Satisfiability Decision Procedure for EG boolean Satisfiable(G) begin if G = return true; if G = return false; if G =   return Satisfiable(   ); if G =    return Satisfiable(   ); if G = L  return Satisfiable(L); if G = 1 2  return Satisfiable( 1  ) || Satisfiable( 2  ); end

Satisfiability Example C D A B C C D ) = Sat( ) = Sat( B C A B D E B D B C Sat( C D B D ) = Sat( D D ) = Sat( ) = False

Adding Bells and Whistles Again, this procedure can be made a lot more efficient by dealing with empty cuts, double cuts, and duplicates more efficiently, by various other deletion strategies, and by strategically picking the subgraph on which to split.

Satisfaction Graph A model is a list of literals where for each literal in the list, its complement is not in the list. A satisfaction graph is a graph of the following form: M1  Mn for n = 1: M for n = 0:

Routine for Transforming any Graph into a Satisfaction Graph graph Transform(G) begin // when applicable, remove DC’s and duplicates if G = or return G; if G = L  return Paste(L, Transform(L); if G = 1  n  return Transform( 1  )  Transform( n  ) end

U W Trans( U V W V ) = W U Trans( U V W U W W U V ) = V Trans( U W U ) Trans( W W U ) = V U W U W = U V W U V W

Routine for Systematic Derivations in EG Given any graphs  and , if  |= , then the following routine systematically transforms  into , using the inference rules from EG: Trans         DC IT(2x) DC E        IN DC

X Y X Y Sat( ) = X Y X Y X X X Y Y X Y Sat( ) | | Sat( ) = X Y X Y X Y X Y Sat( Y Y ) | | Sat( X X ) = Sat( ) | | Sat( ) = False | | False = False

X Y X Y Trans( ) = X Y X Y X X X Y Y X Y Trans( ) Trans( ) = X Y X Y X Y X Y X X Trans( Y Y ) Y Trans( X X ) = =