Resolution (logic)

Last updated

In mathematical logic and automated theorem proving, resolution is a rule of inference leading to a refutation-complete theorem-proving technique for sentences in propositional logic and first-order logic. For propositional logic, systematically applying the resolution rule acts as a decision procedure for formula unsatisfiability, solving the (complement of the) Boolean satisfiability problem. For first-order logic, resolution can be used as the basis for a semi-algorithm for the unsatisfiability problem of first-order logic, providing a more practical method than one following from Gödel's completeness theorem.

Contents

The resolution rule can be traced back to Davis and Putnam (1960); [1] however, their algorithm required trying all ground instances of the given formula. This source of combinatorial explosion was eliminated in 1965 by John Alan Robinson's syntactical unification algorithm, which allowed one to instantiate the formula during the proof "on demand" just as far as needed to keep refutation completeness. [2]

The clause produced by a resolution rule is sometimes called a resolvent.

Resolution in propositional logic

Resolution rule

The resolution rule in propositional logic is a single valid inference rule that produces a new clause implied by two clauses containing complementary literals. A literal is a propositional variable or the negation of a propositional variable. Two literals are said to be complements if one is the negation of the other (in the following, is taken to be the complement to ). The resulting clause contains all the literals that do not have complements. Formally:

where

all , , and are literals,
the dividing line stands for "entails".

The above may also be written as:

Or schematically as:

We have the following terminology:

The clause produced by the resolution rule is called the resolvent of the two input clauses. It is the principle of consensus applied to clauses rather than terms. [3]

When the two clauses contain more than one pair of complementary literals, the resolution rule can be applied (independently) for each such pair; however, the result is always a tautology.

Modus ponens can be seen as a special case of resolution (of a one-literal clause and a two-literal clause).

is equivalent to

A resolution technique

When coupled with a complete search algorithm, the resolution rule yields a sound and complete algorithm for deciding the satisfiability of a propositional formula, and, by extension, the validity of a sentence under a set of axioms.

This resolution technique uses proof by contradiction and is based on the fact that any sentence in propositional logic can be transformed into an equivalent sentence in conjunctive normal form. [4] The steps are as follows.

One instance of this algorithm is the original Davis–Putnam algorithm that was later refined into the DPLL algorithm that removed the need for explicit representation of the resolvents.

This description of the resolution technique uses a set S as the underlying data-structure to represent resolution derivations. Lists, Trees and Directed Acyclic Graphs are other possible and common alternatives. Tree representations are more faithful to the fact that the resolution rule is binary. Together with a sequent notation for clauses, a tree representation also makes it clear to see how the resolution rule is related to a special case of the cut-rule, restricted to atomic cut-formulas. However, tree representations are not as compact as set or list representations, because they explicitly show redundant subderivations of clauses that are used more than once in the derivation of the empty clause. Graph representations can be as compact in the number of clauses as list representations and they also store structural information regarding which clauses were resolved to derive each resolvent.

A simple example

In plain language: Suppose is false. In order for the premise to be true, must be true. Alternatively, suppose is true. In order for the premise to be true, must be true. Therefore, regardless of falsehood or veracity of , if both premises hold, then the conclusion is true.

Resolution in first-order logic

Resolution rule can be generalized to first-order logic to: [5]

where is a most general unifier of and , and and have no common variables.

Example

The clauses and can apply this rule with as unifier.

Here x is a variable and b is a constant.

Here we see that

Informal explanation

In first-order logic, resolution condenses the traditional syllogisms of logical inference down to a single rule.

To understand how resolution works, consider the following example syllogism of term logic:

All Greeks are Europeans.
Homer is a Greek.
Therefore, Homer is a European.

Or, more generally:

Therefore,

To recast the reasoning using the resolution technique, first the clauses must be converted to conjunctive normal form (CNF). In this form, all quantification becomes implicit: universal quantifiers on variables (X, Y, ...) are simply omitted as understood, while existentially-quantified variables are replaced by Skolem functions.

Therefore,

So the question is, how does the resolution technique derive the last clause from the first two? The rule is simple:

To apply this rule to the above example, we find the predicate P occurs in negated form

¬P(X)

in the first clause, and in non-negated form

P(a)

in the second clause. X is an unbound variable, while a is a bound value (term). Unifying the two produces the substitution

Xa

Discarding the unified predicates, and applying this substitution to the remaining predicates (just Q(X), in this case), produces the conclusion:

Q(a)

For another example, consider the syllogistic form

All Cretans are islanders.
All islanders are liars.
Therefore all Cretans are liars.

Or more generally,

XP(X) → Q(X)
XQ(X) → R(X)
Therefore, ∀XP(X) → R(X)

In CNF, the antecedents become:

¬P(X) ∨ Q(X)
¬Q(Y) ∨ R(Y)

(Note that the variable in the second clause was renamed to make it clear that variables in different clauses are distinct.)

Now, unifying Q(X) in the first clause with ¬Q(Y) in the second clause means that X and Y become the same variable anyway. Substituting this into the remaining clauses and combining them gives the conclusion:

¬P(X) ∨ R(X)

Factoring

The resolution rule, as defined by Robinson, also incorporated factoring, which unifies two literals in the same clause, before or during the application of resolution as defined above. The resulting inference rule is refutation-complete, [6] in that a set of clauses is unsatisfiable if and only if there exists a derivation of the empty clause using only resolution, enhanced by factoring.

An example for an unsatisfiable clause set for which factoring is needed to derive the empty clause is:

Since each clause consists of two literals, so does each possible resolvent. Therefore, by resolution without factoring, the empty clause can never be obtained. Using factoring, it can be obtained e.g. as follows: [7]

Non-clausal resolution

Generalizations of the above resolution rule have been devised that do not require the originating formulas to be in clausal normal form. [8] [9] [10] [11] [12] [13]

These techniques are useful mainly in interactive theorem proving where it is important to preserve human readability of intermediate result formulas. Besides, they avoid combinatorial explosion during transformation to clause-form, [10] :98 and sometimes save resolution steps. [13] :425

Non-clausal resolution in propositional logic

For propositional logic, Murray [9] :18 and Manna and Waldinger [10] :98 use the rule

,

where denotes an arbitrary formula, denotes a formula containing as a subformula, and is built by replacing in every occurrence of by ; likewise for . The resolvent is intended to be simplified using rules like , etc. In order to prevent generating useless trivial resolvents, the rule shall be applied only when has at least one "negative" and "positive" [14] occurrence in and , respectively. Murray has shown that this rule is complete if augmented by appropriate logical transformation rules. [10] :103

Traugott uses the rule

,

where the exponents of indicate the polarity of its occurrences. While and are built as before, the formula is obtained by replacing each positive and each negative occurrence of in with and , respectively. Similar to Murray's approach, appropriate simplifying transformations are to be applied to the resolvent. Traugott proved his rule to be complete, provided are the only connectives used in formulas. [12] :398–400

Traugott's resolvent is stronger than Murray's. [12] :395 Moreover, it does not introduce new binary junctors, thus avoiding a tendency towards clausal form in repeated resolution. However, formulas may grow longer when a small is replaced multiple times with a larger and/or . [12] :398

Propositional non-clausal resolution example

As an example, starting from the user-given assumptions

the Murray rule can be used as follows to infer a contradiction: [15]

For the same purpose, the Traugott rule can be used as follows : [12] :397

From a comparison of both deductions, the following issues can be seen:

Non-clausal resolution in first-order logic

For first-order predicate logic, Murray's rule is generalized to allow distinct, but unifiable, subformulas and of and , respectively. If is the most general unifier of and , then the generalized resolvent is . While the rule remains sound if a more special substitution is used, no such rule applications are needed to achieve completeness.[ citation needed ]

Traugott's rule is generalized to allow several pairwise distinct subformulas of and of , as long as have a common most general unifier, say . The generalized resolvent is obtained after applying to the parent formulas, thus making the propositional version applicable. Traugott's completeness proof relies on the assumption that this fully general rule is used; [12] :401 it is not clear whether his rule would remain complete if restricted to and . [16]

Paramodulation

Paramodulation is a related technique for reasoning on sets of clauses where the predicate symbol is equality. It generates all "equal" versions of clauses, except reflexive identities. The paramodulation operation takes a positive from clause, which must contain an equality literal. It then searches an into clause with a subterm that unifies with one side of the equality. The subterm is then replaced by the other side of the equality. The general aim of paramodulation is to reduce the system to atoms, reducing the size of the terms when substituting. [17]

Implementations

See also

Notes

  1. Davis, Martin; Putnam, Hilary (1960). "A Computing Procedure for Quantification Theory". J. ACM. 7 (3): 201–215. doi: 10.1145/321033.321034 . S2CID   31888376. Here: p. 210, "III. Rule for Eliminating Atomic Formulas".
  2. Robinson 1965
  3. D.E. Knuth, The Art of Computer Programming 4A: Combinatorial Algorithms, part 1, p. 539
  4. 1 2 Leitsch 1997 , p. 11 "Before applying the inference method itself, we transform the formulas to quantifier-free conjunctive normal form."
  5. Arís, Enrique P.; González, Juan L.; Rubio, Fernando M. (2005). Lógica Computacional. Ediciones Paraninfo, S.A. ISBN   9788497321822.
  6. Russell, Stuart J.; Norvig, Peter (2009). Artificial Intelligence: A Modern Approach (3rd ed.). Prentice Hall. p. 350. ISBN   978-0-13-604259-4.
  7. Duffy, David A. (1991). Principles of Automated Theorem Proving. Wiley. ISBN   978-0-471-92784-6. See p. 77. The example here is slightly modified to demonstrate a not-trivial factoring substitution. For clarity, the factoring step, (5), is shown separately. In step (6), the fresh variable was introduced to enable unifiability of (5) and (6), needed for (7).
  8. Wilkins, D. (1973). QUEST: A Non-Clausal Theorem Proving System (Master's Thesis). University of Essex.
  9. 1 2 Murray, Neil V. (February 1979). A Proof Procedure for Quantifier-Free Non-Clausal First Order Logic (Technical report). Electrical Engineering and Computer Science, Syracuse University. 39. (Cited from Manna, Waldinger, 1980 as: "A Proof Procedure for Non-Clausal First-Order Logic", 1978)
  10. 1 2 3 4 Manna, Zohar; Waldinger, Richard (January 1980). "A Deductive Approach to Program Synthesis". ACM Transactions on Programming Languages and Systems . 2: 90–121. doi:10.1145/357084.357090. S2CID   14770735.
  11. Murray, N.V. (1982). "Completely Non-Clausal Theorem Proving". Artificial Intelligence . 18: 67–85. doi:10.1016/0004-3702(82)90011-x.
  12. 1 2 3 4 5 6 Traugott, J. (1986). "Nested Resolution". 8th International Conference on Automated Deduction. CADE 1986. LNCS. Vol. 230. Springer. pp. 394–403. doi:10.1007/3-540-16780-3_106. ISBN   978-3-540-39861-5.
  13. 1 2 Schmerl, U.R. (1988). "Resolution on Formula-Trees". Acta Informatica . 25 (4): 425–438. doi:10.1007/bf02737109. S2CID   32702782. Summary
  14. These notions, called "polarities", refer to the number of explicit or implicit negations found above . For example, occurs positive in and in , negative in and in , and in both polarities in .
  15. "" is used to indicate simplification after resolution.
  16. Here, "" denotes syntactical term equality modulo renaming
  17. Nieuwenhuis, Robert; Rubio, Alberto (2001). "7. Paramodulation-Based Theorem Proving" (PDF). In Robinson, Alan J.A.; Voronkov, Andrei (eds.). Handbook of Automated Reasoning. Elsevier. pp. 371–444. ISBN   978-0-08-053279-0.

Related Research Articles

First-order logic—also known as predicate logic, quantificational logic, and first-order predicate calculus—is a collection of formal systems used in mathematics, philosophy, linguistics, and computer science. First-order logic uses quantified variables over non-logical objects, and allows the use of sentences that contain variables, so that rather than propositions such as "Socrates is a man", one can have expressions in the form "there exists x such that x is Socrates and x is a man", where "there exists" is a quantifier, while x is a variable. This distinguishes it from propositional logic, which does not use quantifiers or relations; in this sense, propositional logic is the foundation of first-order logic.

Propositional calculus is a branch of logic. It is also called propositional logic, statement logic, sentential calculus, sentential logic, or sometimes zeroth-order logic. It deals with propositions and relations between propositions, including the construction of arguments based on them. Compound propositions are formed by connecting propositions by logical connectives. Propositions that contain no logical connectives are called atomic propositions.

In logic, proof by contradiction is a form of proof that establishes the truth or the validity of a proposition, by showing that assuming the proposition to be false leads to a contradiction. Although it is quite freely used in mathematical proofs, not every school of mathematical thought accepts this kind of nonconstructive proof as universally valid.

<span class="mw-page-title-main">De Morgan's laws</span> Pair of logical equivalences

In propositional logic and Boolean algebra, De Morgan's laws, also known as De Morgan's theorem, are a pair of transformation rules that are both valid rules of inference. They are named after Augustus De Morgan, a 19th-century British mathematician. The rules allow the expression of conjunctions and disjunctions purely in terms of each other via negation.

In boolean logic, a disjunctive normal form (DNF) is a canonical normal form of a logical formula consisting of a disjunction of conjunctions; it can also be described as an OR of ANDs, a sum of products, or — in philosophical logic — a cluster concept. As a normal form, it is useful in automated theorem proving.

In Boolean logic, a formula is in conjunctive normal form (CNF) or clausal normal form if it is a conjunction of one or more clauses, where a clause is a disjunction of literals; otherwise put, it is a product of sums or an AND of ORs. As a canonical normal form, it is useful in automated theorem proving and circuit theory.

<span class="mw-page-title-main">Negation</span> Logical operation

In logic, negation, also called the logical not or logical complement, is an operation that takes a proposition to another proposition "not ", standing for " is not true", written , or . It is interpreted intuitively as being true when is false, and false when is true. Negation is thus a unary logical connective. It may be applied as an operation on notions, propositions, truth values, or semantic values more generally. In classical logic, negation is normally identified with the truth function that takes truth to falsity. In intuitionistic logic, according to the Brouwer–Heyting–Kolmogorov interpretation, the negation of a proposition is the proposition whose proofs are the refutations of .

Intuitionistic logic, sometimes more generally called constructive logic, refers to systems of symbolic logic that differ from the systems used for classical logic by more closely mirroring the notion of constructive proof. In particular, systems of intuitionistic logic do not assume the law of the excluded middle and double negation elimination, which are fundamental inference rules in classical logic.

In mathematical logic, sequent calculus is a style of formal logical argumentation in which every line of a proof is a conditional tautology instead of an unconditional tautology. Each conditional tautology is inferred from other conditional tautologies on earlier lines in a formal argument according to rules and procedures of inference, giving a better approximation to the natural style of deduction used by mathematicians than to David Hilbert's earlier style of formal logic, in which every line was an unconditional tautology. More subtle distinctions may exist; for example, propositions may implicitly depend upon non-logical axioms. In that case, sequents signify conditional theorems in a first-order language rather than conditional tautologies.

A formula of the predicate calculus is in prenex normal form (PNF) if it is written as a string of quantifiers and bound variables, called the prefix, followed by a quantifier-free part, called the matrix. Together with the normal forms in propositional logic, it provides a canonical normal form useful in automated theorem proving.

A paraconsistent logic is an attempt at a logical system to deal with contradictions in a discriminating way. Alternatively, paraconsistent logic is the subfield of logic that is concerned with studying and developing "inconsistency-tolerant" systems of logic, which reject the principle of explosion.

In computer science, program synthesis is the task to construct a program that provably satisfies a given high-level formal specification. In contrast to program verification, the program is to be constructed rather than given; however, both fields make use of formal proof techniques, and both comprise approaches of different degrees of automation. In contrast to automatic programming techniques, specifications in program synthesis are usually non-algorithmic statements in an appropriate logical calculus.

Golem is an inductive logic programming algorithm developed by Stephen Muggleton and Cao Feng in 1990. It uses the technique of relative least general generalisation proposed by Gordon Plotkin, leading to a bottom-up search through the subsumption lattice. In 1992, shortly after its introduction, Golem was considered the only inductive logic programming system capable of scaling to tens of thousands of examples.

<span class="mw-page-title-main">Method of analytic tableaux</span>

In proof theory, the semantic tableau is a decision procedure for sentential and related logics, and a proof procedure for formulae of first-order logic. An analytic tableau is a tree structure computed for a logical formula, having at each node a subformula of the original formula to be proved or refuted. Computation constructs this tree and uses it to prove or refute the whole formula. The tableau method can also determine the satisfiability of finite sets of formulas of various logics. It is the most popular proof procedure for modal logics.

The situation calculus is a logic formalism designed for representing and reasoning about dynamical domains. It was first introduced by John McCarthy in 1963. The main version of the situational calculus that is presented in this article is based on that introduced by Ray Reiter in 1991. It is followed by sections about McCarthy's 1986 version and a logic programming formulation.

In logic and mathematics, contraposition refers to the inference of going from a conditional statement into its logically equivalent contrapositive, and an associated proof method known as proof by contraposition. The contrapositive of a statement has its antecedent and consequent inverted and flipped.

SLD resolution is the basic inference rule used in logic programming. It is a refinement of resolution, which is both sound and refutation complete for Horn clauses.

The Tseytin transformation, alternatively written Tseitin transformation, takes as input an arbitrary combinatorial logic circuit and produces an equisatisfiable boolean formula in conjunctive normal form (CNF). The length of the formula is linear in the size of the circuit. Input vectors that make the circuit output "true" are in 1-to-1 correspondence with assignments that satisfy the formula. This reduces the problem of circuit satisfiability on any circuit to the satisfiability problem on 3-CNF formulas. It was discovered by the Russian scientist Grigori Tseitin.

In computer science, conflict-driven clause learning (CDCL) is an algorithm for solving the Boolean satisfiability problem (SAT). Given a Boolean formula, the SAT problem asks for an assignment of variables so that the entire formula evaluates to true. The internal workings of CDCL SAT solvers were inspired by DPLL solvers. The main difference between CDCL and DPLL is that CDCL's backjumping is non-chronological.

References