THE COMPLETENESS OF PROPOSITIONAL RESOLUTION A SIMPLE AND CONSTRUCTIVE PROOF

Similar documents
Propositional Logic Language

Computational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/30)

Propositional Logic: Models and Proofs

Propositional Logic: Gentzen System, G

Propositional and Predicate Logic - V

Deductive Systems. Lecture - 3

Resolution In Propositional Logic

3 Propositional Logic

Mathematical Logic Propositional Logic - Tableaux*

Part 1: Propositional Logic

Propositional Logic Resolution (6A) Young W. Lim 12/12/16

Propositional Resolution Introduction

Propositional Logic Resolution (6A) Young W. Lim 12/31/16

Chapter 11: Automated Proof Systems

A Resolution Method for Modal Logic S5

CHAPTER 10. Gentzen Style Proof Systems for Classical Logic

Version January Please send comments and corrections to

SLD-Resolution And Logic Programming (PROLOG)

Classical Propositional Logic

Propositional Calculus - Semantics (3/3) Moonzoo Kim CS Dept. KAIST

Chapter 3: Propositional Calculus: Deductive Systems. September 19, 2008

The Calculus of Computation: Decision Procedures with Applications to Verification. Part I: FOUNDATIONS. by Aaron Bradley Zohar Manna

Predicate Logic - Semantic Tableau

Propositional Logic. Testing, Quality Assurance, and Maintenance Winter Prof. Arie Gurfinkel

Propositional Resolution Part 1. Short Review Professor Anita Wasilewska CSE 352 Artificial Intelligence

Advanced Topics in LP and FP

A Connection Based Proof Method for Intuitionistic Logic

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

Propositional and Predicate Logic. jean/gbooks/logic.html

Chapter 11: Automated Proof Systems (1)

The NP-hardness of finding a directed acyclic graph for regular resolution

Natural Deduction. Formal Methods in Verification of Computer Systems Jeremy Johnson

Overview. I Review of natural deduction. I Soundness and completeness. I Semantics of propositional formulas. I Soundness proof. I Completeness proof.

Computation and Logic Definitions

6. Logical Inference

Predicate Calculus - Semantic Tableau (2/2) Moonzoo Kim CS Division of EECS Dept. KAIST

Induction on Failing Derivations

Knowledge representation DATA INFORMATION KNOWLEDGE WISDOM. Figure Relation ship between data, information knowledge and wisdom.

Propositional Resolution

Decision Procedures for Satisfiability and Validity in Propositional Logic

Clausal Presentation of Theories in Deduction Modulo

Lecture 10: Gentzen Systems to Refinement Logic CS 4860 Spring 2009 Thursday, February 19, 2009

Propositional Calculus: Formula Simplification, Essential Laws, Normal Forms

LOGIC PROPOSITIONAL REASONING

2.5.2 Basic CNF/DNF Transformation

Labelled Superposition for PLTL. Martin Suda and Christoph Weidenbach

Classical Propositional Logic

Tecniche di Verifica. Introduction to Propositional Logic

Inference in Propositional Logic

Proof Complexity of Intuitionistic Propositional Logic

On Refutation Rules. Tomasz Skura. 1. Introduction. Logica Universalis

Propositional logic. Programming and Modal Logic

A Non-clausal Connection Calculus

Clause/Term Resolution and Learning in the Evaluation of Quantified Boolean Formulas

Language of Propositional Logic

Warm-Up Problem. Is the following true or false? 1/35

cis32-ai lecture # 18 mon-3-apr-2006

Critical Reading of Optimization Methods for Logical Inference [1]

Some Properties of Fuzzy Logic

Proof Methods for Propositional Logic

On Modal Logics of Partial Recursive Functions

NP-Completeness Part II

Inference Methods In Propositional Logic

Propositional logic. Programming and Modal Logic

Introduction to Logic in Computer Science: Autumn 2006

KE/Tableaux. What is it for?

A Note on Backward Dual Resolution and Its Application to Proving Completeness of Rule-Based Systems*

On the Complexity of the Reflected Logic of Proofs

CS 512, Spring 2017, Handout 10 Propositional Logic: Conjunctive Normal Forms, Disjunctive Normal Forms, Horn Formulas, and other special forms

Logic as a Tool Chapter 1: Understanding Propositional Logic 1.1 Propositions and logical connectives. Truth tables and tautologies

Logical Agents (I) Instructor: Tsung-Che Chiang

Natural Deduction for Propositional Logic

Prefixed Tableaus and Nested Sequents

Some Rewriting Systems as a Background of Proving Methods

Propositional Logic: Evaluating the Formulas

Propositional Resolution

NP-Completeness of Refutability by Literal-Once Resolution

A New 3-CNF Transformation by Parallel-Serial Graphs 1

Resolution for mixed Post logic

Inference Methods In Propositional Logic

On sequent calculi vs natural deductions in logic and computer science

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

Propositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. Propositional Logic.

On evaluating decision procedures for modal logic

Introduction to Logic in Computer Science: Autumn 2007

Syntax of FOL. Introduction to Logic in Computer Science: Autumn Tableaux for First-order Logic. Syntax of FOL (2)

A brief introduction to Logic. (slides from

Lecture 1: The arithmetic hierarchy

Lecture Notes on Sequent Calculus

The Wumpus Game. Stench Gold. Start. Cao Hoang Tru CSE Faculty - HCMUT

Foundations of Artificial Intelligence

T -resolution: Refinements and Model Elimination

Resolution Lower Bounds for the Weak Pigeonhole Principle

Foundations of Artificial Intelligence

RESOLUTION TREES WITH LEMMAS: RESOLUTION REFINEMENTS THAT CHARACTERIZE DLL ALGORITHMS WITH CLAUSE LEARNING

First-order resolution for CTL

Comp487/587 - Boolean Formulas

Part 1: Propositional Logic

Regular Resolution Lower Bounds for the Weak Pigeonhole Principle

Transcription:

Logical Methods in Computer Science Vol. 2 (5:3) 2006, pp. 1 7 www.lmcs-online.org Submitted Jun. 9, 2006 Published Nov. 07, 2006 THE COMPLETENESS OF PROPOSITIONAL RESOLUTION A SIMPLE AND CONSTRUCTIVE PROOF JEAN GALLIER CIS Department, University of Pennsylvania, Philadelphia, PA 19104, USA e-mail address: jean@cis.upenn.edu Abstract. It is well known that the resolution method (for propositional logic) is complete. However, completeness proofs found in the literature use an argument by contradiction showing that if a set of clauses is unsatisfiable, then it must have a resolution refutation. As a consequence, none of these proofs actually gives an algorithm for producing a resolution refutation from an unsatisfiable set of clauses. In this note, we give a simple and constructive proof of the completeness of propositional resolution which consists of an algorithm together with a proof of its correctness. 1. Introduction The resolution method for (propositional) logic due to J.A. Robinson [4] (1965) is wellknown to be a sound and complete procedure for checking the unsatisfiability of a set of clauses. However, it appears that the completeness proofs that can be found in the literature (for instance, Chang and Lee [1], Lewis and Papadimitriou [3], Robinson [5]) are existence proofs that proceed by contradiction to show that if a set of clauses is unsatisfiable, then it must have a resolution refutation because otherwise a satisfying assignment can be obtained. In particular, none of these proofs yields (directly) an algorithm producing a resolution refutation from an unsatisfiable set of clauses. In that sense, these proofs are nonconstructive. In Gallier [2] (1986), we gave a completeness proof based on an algorithm for converting a Gentzen-like proof (using sequents) into a resolution DAG (see Chapter 4). Such a method is more constructive than the others but, we found later on that it is possible to give a simple and constructive proof of the completeness of propositional resolution which consists of an algorithm together with a proof of its correctness. This algorithm and its correctness are the object of this note. It should be noted that Judith Underwood gave other constructive proof procedures in her Ph.D. thesis, notably for the intuitionistic propositional calculus [6]. 2000 ACM Subject Classification: F.4.1, I.2. Key words and phrases: Resolution method, Unsatisfiability, Completeness, Constructive proof. LOGICAL METHODS Ð IN COMPUTER SCIENCE DOI:10.2168/LMCS-2 (5:3) 2006 c J. Gallier CC Creative Commons

2 J. GALLIER 2. Review of Propositional Resolution Recall that a literal, L, is either a propositional letter, P, or the negation, P, of a propositional letter. A clause is a finite set of literals, {L 1,...,L k }, interpreted as the disjunction L 1 L k (when k = 0, this is the empty clause denoted ). A set of clauses, Γ = {C 1,...,C n }, is interpreted as the conjunction C 1 C n. For short, we write Γ = C 1,...,C n. The resolution method (J.A. Robinson [4]) is a procedure for checking whether a set of clauses, Γ, is unsatisfiable. The resolution method consists in building a certain kind of labeled DAG whose leaves are labeled with clauses in Γ and whose interior nodes are labeled according to the resolution rule. Given two clauses C = A {P } and C = B (where P is a propositional letter, P / A and P / B), the resolvent of C and C is the clause R = A B obtained by cancelling out P and P. A resolution DAG for Γ is a DAG whose leaves are labeled with clauses from Γ and such that every interior node n has exactly two predecessors, n 1 and n 2 so that n is labeled with the resolvent of the clauses labeling n 1 and n 2. In a resolution step involving the nodes, n 1,n 2 and n, as above, we say that the two clauses C and C labeling the nodes n 1 and n 2 are the parent clauses of the resolvent clause, R, labeling the node n. In a resolution DAG, D, a clause, C is said to be a descendant of a clause, C, iff there is a (directed) path from some node labeled with C to a node labeled with C. A resolution refutation for Γ is a resolution DAG with a single root whose label is the empty clause. (For more details on the resolution method, resolution DAGs, etc., one may consult Gallier [2], Chapter 4, or any of the books cited in Section 1.) Here is an example of a resolution refutation for the set of clauses shown in Figure 1: Γ = {{P,Q}, {P, Q}, { P,Q}, { P, Q}} {P, Q} {P, Q} { P, Q} { P, Q} {P } Figure 1: A Resolution Refutation 3. Completeness of Propositional Resolution: An Algorithm and its Correctness Let Γ be a set of clauses. Thus, Γ is either the empty clause,, or it is a conjunction of clauses, Γ = C 1,...,C n. We define the complexity, c(c), of a clause, C, as the number of disjunction symbols in C; i.e., if C consists of a single literal (i.e., C = {L}, for some literal, L), then c(c) = 0, else if C = {L 1,...,L m } (with m 2) where the L i s are literals,

THE COMPLETENESS OF PROPOSITIONAL RESOLUTION A SIMPLE AND CONSTRUCTIVE PROOF3 then c(c) = m 1 (we also set c( ) = 0). If Γ is a conjunction of clauses, Γ = C 1,...,C n, then we set c(γ) = c(c 1 ) + + c(c n ). We now give a recursive algorithm, buildresol, for constructing a resolution DAG from any set of clauses and then prove its correctness, namely, that if the input set of clauses is unsatisfiable, then the output resolution DAG is a resolution refutation. This establishes the completeness of propositional resolution constructively. Our algorithm makes use of two functions, percolate, and graft. 1. The function percolate(d, A, L) The inputs are: a resolution DAG, D, some selected leaf of D labeled with a clause, A, and some literal, L. This function adds the literal L to the clause A to form the clause A {L} and then percolates L down to the root of D. More precisely, we construct the resolution DAG, D, whose underlying unlabeled DAG is identical to D, as follows: Since D and D have the same unlabeled DAG we refer to two nodes of D of D as corresponding nodes if they are identical in the underlying unlabeled DAG. Consider any resolution step of D. If both parent clauses are not descendants of the premise A, then the corresponding resolution step of D is the same. If the parent clauses in D are C and C where C is a descendant of the premise A (resp. C is a descendant of the premise A) and if R is the resolvent ot C and C in D, then the corresponding parent nodes in D are labeled with C and C {L} and their resolvent node with R {L} (resp. the corresponding parent nodes in D are labeled with C {L} and C and their resolvent node wih R {L}). If both parent clauses C and C in D are descendant of the premise A, then the corresponding parent nodes in D are labeled with C {L} and C {L} and their resolvent node with R {L}. Observe that if {A} is the set of premises of D, then Γ = {A {L}} is the set of premises of percolate(d,a,l). For example, if D is the resolution DAG shown in Figure 2 (in fact, a resolution refutation) {P,Q} { P,Q} A = { Q} Figure 2: Resolution DAG D then adding L = P to A = { Q} in D yields the resolution DAG D produced by percolate(d,a,l) shown in Figure 3: 2. The function graft(d 1,D 2 ) {P, Q} { P, Q} { P, Q} Figure 3: Resolution DAG D = percolate(d,a,l)

4 J. GALLIER Its inputs are two resolution DAGs, D 1 and D 2, where the clause, C, labeling the root of D 1 is identical to one of the premises of D 2. Then, this function combines D 1 and D 2 by connecting the links to the premise labeled C in D 2 to the root of D 1, also labeled C, obtaining the resolution DAG graft(d 1,D 2 ). For example, if D 1 and D 2 are the resolution refutation DAGs shown in Figure 4 and Figure 5 we obtain the resolution DAG in Figure 6 {P, Q} { P, Q} { P, Q} Figure 4: Resolution DAG D 1 {P,Q} {P, Q} {P } Figure 5: Resolution DAG D 2 {P, Q} {P, Q} { P, Q} { P, Q} {P } Figure 6: Resolution DAG graft(d 1,D 2 ) where the edges coming from D 2 are indicated with thicker lines. The algorithmbuildresol is shown below. 3. The algorithm buildresol(γ) The input to buildresol is a set of clauses, Γ. function buildresol(γ) begin if all clauses in Γ are literals then if Γ contains complementary literals L and L, then return a resolution refutation with leaves L and L else abort endif

THE COMPLETENESS OF PROPOSITIONAL RESOLUTION A SIMPLE AND CONSTRUCTIVE PROOF5 else select any nonliteral clause, C, in Γ and select any literal, L, in C; let C = A {L}; let Γ = {C}; D 1 = buildresol( {A}); D 2 = buildresol( {L}); D 1 = percolate(d 1,A,L); if D 1 is a resolution DAG then return D 1 else D = graft(d 1,D 2); return D endif endif end Finally, we prove the correctness of our recursive algorithm buildresol. Theorem 3.1. For every conjunction of clauses, Γ, if Γ is unsatisfiable, then the algorithm builresol outputs a resolution refutation for Γ. Therefore, propositional resolution is complete. Proof. We prove the correctness of the algorithm buildresol by induction on c(γ). Let Γ = C 1,...,C n. We may assume Γ, since the case Γ = is trivial. We proceed by induction on c(γ). If c(γ) = 0, then every clause, C i, contains a single literal and if Γ is unsatisfiable, then there must be two complementary clauses, C i = {P } and C j =, in Γ. Thus, we instantly get a resolution refutation by applying the resolution rule to {P } and. Otherwise, c(γ) > 0, so there is some clause in Γ that contains at least two literals. Pick any such clause, C, and pick any literal, L, in C. Write C = A {L} with A and write Γ =,C ( can t be empty since Γ is unsatisfiable). As Γ =,A {L} is unsatisfiable, both,a and,l must be unsatisfiable. However, observe that c(,a) < c(γ) and c(,l) < c(γ). Therefore, by the induction hypothesis, the algorithm buildresol produces two resolution refutations, D 1 and D 2, with sets of premises,a and,l, respectively. Now, consider the resolution DAG, D 1 = percolate(d 1,A,L), obtained from D 1 by adding L to the clause A and letting L percolate down to the root. Observe that in D 1, every clause that is a descendant of the premise A {L} is of the form C {L}, where C is the corresponding clause in D 1. Therefore, the root of the new DAG D 1 obtained from D 1 is either labeled (this may happen when the other clause in a resolution step involving a descendent of the clause A already contains L) or L. In the first case, D 1 is already a resolution refutation for Γ and we are done. In the second case, we can combine D 1 and D 2 using graft(d 1,D 2) since the root of D 1 is also labeled L, one of the premises of D 2. Clearly, we obtain a resolution refutation for Γ. As an illustration of our algorithm, consider the set of clauses Γ = {{P,Q}, {P, Q}, { P,Q}, { P, Q}} as above and pick C = { P, Q}, L = P and A = { Q}. After the two calls buildresol( {A}) andbuildresol( {L}), we get the resolution refutations D 1 shown in Figure 7:

6 J. GALLIER and D 2 shown in Figure 8: {P,Q} { P,Q} { Q} Figure 7: Resolution DAG D 1 = buildresol( {A}) {P,Q} {P, Q} {P } Figure 8: Resolution DAG D 2 = buildresol( {L}) When we add L = P to A = { Q} in D 1, we get the resolution DAG D 1 = percolate(d 1,A,L) shown in Figure 9: {P, Q} { P, Q} { P, Q} Figure 9: Resolution DAG D 1 = percolate(d 1,A,L) Finally, we construct the resolution refutation D = graft(d 1,D 2) shown in Figure 10: {P, Q} {P, Q} { P, Q} { P, Q} {P } Figure 10: Resolution DAG D = graft(d 1,D 2) where the edges coming from D 2 are indicated with thicker lines. Observe that the proof of Theorem 3.1 proves that if Γ is unsatisfiable, then our algorithm succeeds no matter which clause containing at least two literals is chosen and no matter which literal is picked in such a clause. Furthermore, as pointed out by one of the referees, although the proof of completeness is constructive in the sense that it shows an algorithm is correct, it does not explicitly use constructive logic. Nevertheless the logical proof can be recovered from the algorithm and it is constructive.

THE COMPLETENESS OF PROPOSITIONAL RESOLUTION A SIMPLE AND CONSTRUCTIVE PROOF7 Acknowledgement The author wishes to thank Robert Constable and the referees for very helpful comments. References [1] Chin-Liang Chang and Richard Char-Tung Lee. Symbolic Logic and Mechanical Theorem Proving. Academic Press, first edition, 1973. [2] Jean H. Gallier. Logic For Computer Science. Wiley, first edition, 1986. [3] Harry R. Lewis and Christos H. Papadimitriou. Elements of the Theory of Computation. Prentice-Hall, first edition, 1981. [4] J.A. Robinson. A machine oriented logic based on the resolution principle. J.ACM, 12(1):23 41, 1965. [5] J.A. Robinson. Logic: Form and Function. North-Holland, first edition, 1979. [6] Judith Underwood. The tableau algorithm for intuitionistic propositional calculus as a constructive completeness proof. In Basin D., Fronhofer B., Hahnle R., Posegga J., and Schwind C., editors, Second Workshop on Theorem Proving with Analytic Tableaux and Related Methods, Marseille, France, pages 245 248. Max Planck Institut fur Informatik, Saarbrucken, Germany, 1993. This work is licensed under the Creative Commons Attribution-NoDerivs License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nd/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.