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.
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.
The clause produced by a resolution rule is sometimes called a resolvent.
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,
lnotc
c
a1\lora2\lor … \lorc, b1\lorb2\lor … \lor\negc | |
a1\lora2\lor … \lorb1\lorb2\lor … |
all
ai
bi
c
the dividing line stands for "entails".
The above may also be written as:
(\nega1\land\nega2\land … ) → c, c → (b1\lorb2\lor … ) | |
(\nega1\land\nega2\land … ) → (b1\lorb2\lor … ) |
Or schematically as:
\Gamma1\cup\left\{\ell\right\ | |
\Gamma2\cup\left\{\overline{\ell}\right\}}{\Gamma1\cup\Gamma2}|\ell|
We have the following terminology:
\Gamma1\cup\left\{\ell\right\}
\Gamma2\cup\left\{\overline{\ell}\right\}
\Gamma1\cup\Gamma2
\ell
\overline{\ell}
|\ell|
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.[2]
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).
p → q, p | |
q |
lnotp\lorq, p | |
q |
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.[3] The steps are as follows.
(A1\lorA2)\land(B1\lorB2\lorB3)\land(C1)
S=\{A1\lorA2,B1\lorB2\lorB3,C1\}
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\veeb, \nega\veec | |
b\veec |
In plain language: Suppose
a
a\veeb
b
a
\nega\veec
c
a
b\veec
Resolution rule can be generalized to first-order logic to:[4]
\Gamma1\cup\left\{L1\right\ | |
\Gamma2\cup\left\{L2\right\}}{(\Gamma1\cup\Gamma2)\phi}\phi
where
\phi
L1
\overline{L2}
\Gamma1
\Gamma2
The clauses
P(x),Q(x)
\negP(b)
[b/x]
Here x is a variable and b is a constant.
P(x),Q(x)\negP(b) | |
Q(b) |
[b/x]
Here we see that
P(x),Q(x)
\negP(b)
Q(b)
P(x)
\negP(b)
P
[b/x]
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:
\forallx.P(x) ⇒ Q(x)
P(a)
Therefore,
Q(a)
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.
\negP(x)\veeQ(x)
P(a)
Therefore,
Q(a)
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
X a
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,
∀X P(X) → Q(X)
∀X Q(X) → R(X)
Therefore, ∀X P(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)
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,[5] 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:
\begin{array}{rlcl}(1):&P(u)&\lor&P(f(u))\ (2):&lnotP(v)&\lor&P(f(w))\ (3):&lnotP(x)&\lor&lnotP(f(x))\ \end{array}
\begin{array}{rll}(4):&P(u)\lorP(f(w))&byresolving(1)and(2),withv=f(u)\ (5):&P(f(w))&byfactoring(4),withu=f(w)\ (6):&lnotP(f(f(w')))&byresolving(5)and(3),withw=w',x=f(w')\ (7):&false&byresolving(5)and(6),withw=f(w')\ \end{array}
Generalizations of the above resolution rule have been devised that do not require the originating formulas to be in clausal normal form.[7] [8] [9] [10] [11] [12]
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,[9] and sometimes save resolution steps.[12]
For propositional logic, Murray[8] and Manna and Waldinger[9] use the rule
\begin{array}{c}F[p] G[p]\ \hlineF[it{true}]\lorG[it{false}]\ \end{array}
p
F[p]
p
F[it{true}]
F[p]
p
it{true}
G
F[it{true}]\lorG[it{false}]
q\landit{true}\impliesq
p
F
G
Traugott uses the rule
\begin{array}{c}F[p+,p-] G[p]\ \hlineF[G[it{true}],lnotG[it{false}]]\ \end{array}
p
G[it{true}]
G[it{false}]
F[G[it{true}],lnotG[it{false}]]
p
F
G[it{true}]
G[it{false}]
\land,\lor, → ,lnot
Traugott's resolvent is stronger than Murray's.[11] 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
p
G[it{true}]
G[it{false}]
As an example, starting from the user-given assumptions
\begin{array}{rccc}(1):&a& → &b\landc\ (2):&c& → &d\ (3):&b\landd& → &e\ (4):&lnot(a& → &e)\ \end{array}
\begin{array}{rrclccl}(5):&(it{true} → d)&\lor&(a → b\landit{false})&\implies&d\lorlnota&from(2)and(1),withp=c\ (6):&(b\landit{true} → e)&\lor&(it{false}\lorlnota)&\implies&(b → e)\lorlnota&from(3)and(5),withp=d\ (7):&((it{true} → e)\lorlnota)&\lor&(a → it{false}\landc)&\implies&e\lorlnota\lorlnota&from(6)and(1),withp=b\ (8):&(e\lorlnotit{true}\lorlnotit{true})&\lor&lnot(it{false} → e)&\implies&e&from(7)and(4),withp=a\ (9):&lnot(a → it{true})&\lor&it{false}&\implies&it{false}&from(4)and(8),withp=e\ \end{array}
\begin{array}{rcccl}(10):&a → b\land(it{true} → d)&\implies&a → b\landd&from(1)and(2),withp=c\ (11):&a → (it{true} → e)&\implies&a → e&from(10)and(3),withp=(b\landd)\ (12):&lnotit{true}&\implies&it{false}&from(11)and(4),withp=(a → e)\ \end{array}
p=c
p
a → e
e\lorlnota\lorlnota
p
For first-order predicate logic, Murray's rule is generalized to allow distinct, but unifiable, subformulas
p1
p2
F
G
\phi
p1
p2
F\phi[it{true}]\lorG\phi[it{false}]
\phi
Traugott's rule is generalized to allow several pairwise distinct subformulas
p1,\ldots,pm
F
pm+1,\ldots,pn
G
p1,\ldots,pn
\phi
\phi
p1= … =pm
pm+1= … =pn
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.[16]
. Jean Gallier . Logic for Computer Science: Foundations of Automatic Theorem Proving . . 1986 .
w'
p
p
(p\landq)\lorr
q → p
lnot(p\landq)\lorr
p → q
p\leftrightarrowq
\implies
=