Resolution is a single inference rule that, when used in the right
way, yields an inference algorithm that is complete. Resolution
was invented by John Alan Robinson in 1965, building on ideas developed
in
the previous decade in the U.S. and in the Soviet Union.
So-called modus ponens is a very special case of
resolution. Suppose that p and q are the same literal, excpet
that q is negated.
Then we have the inference rule.
The modus ponens special case illustrates how resolution can make progress by yielding a conclusion that is shorter than its antecedents. In general, resolution yields a conclusion that is longer than either of the two inputsp ~q v r
------------
r
Usually, the literals p
and q will not match
exactly. We may need to match a
variable in one with a constant in the other. This process
is called unification; see later.
Example: How to prove eats(jo,fish) from the following axioms? (Here x, y, z are variables that are implicitly universally quantified.)
Answer: add ~eats(jo,fish) and derive ~beta and beta separately for some literal beta. For example:~cat(x) v likes(x,fish)
~cat(y) v ~likes(y,z) v eats(y,z)
cat(jo)
~eats(jo,fish)
~cat(y) v ~likes(y,z) v eats(y,z)
\\
/
~cat(jo) v
~likes(jo,fish) cat(jo)
\\
/
~cat(x) v likes(x,fish) ~likes(jo,fish)
\ //
~cat(jo) cat(jo)
\ /
false
The proof above is typical, although of course it is very small. Some typical aspects:
Suppose that positive literal pj and the negative literal qk match each other. Then
In words, the consequent of the resolution inference rule is the disjunction of the two antecedent clauses, with the unifying literals pj and qk removed.p1 v ... v pj v ... v pm q1 v ... qk v ... v qn
---------------------------------------------------------------
p1 v ... pj-1 v pj+1 ... v pm v q1 v ... qk-1 v qk+1 v ... v qn
Resolution is a form of reasoning by cases: pj is either true or false (after unification). If pj is true, then qk is false, so one of q1 v ... qk-1 v qk+1 v ... v qn must be true. If pj is false, then one of p1 v ... pj-1 v pj+1 ... v pm must be true. Putting the either-or back together, one of the following must be true: p1 v ... pj-1 v pj+1 ... v pm v q1 v ... qk-1 v qk+1 v ... v qn.
Resolution is a generalization of modus ponens, and also of unit
propagation, which we saw as
part of the DPLL algorithm.
As with modus ponens, usually the literals pj and qk will not match
exactly. We may need to match a
variable in one clause with a constant in the other. This process
is called unification; see later.
Definition: The proof algorithm |- is refutation-complete if whenever KB |= A then KB union { ~A} |- false eventually, in finite time.
Theorem: Resolution is refutation-complete.
This theorem says that if KB entails A, then resolution will
demonstrate
this fact eventually. Of course, resolution is sound also,
which is even more important than
completeness!
As stressed before, if A is not entailed by KB then resolution
applied to KB
union {~A} may fail to terminate.
It is possible that neither A nor ~A is entailed by KB. In this case it is possible to get non-termination from KB union {~A} and from KB union {A}.
To translate into CNF, connectives other than "or" are eliminated by de Morgan's laws, associativity, and distributivity. Existential quantifiers are eliminated by Skolemization, which introduces new constants and/or function symbols. For example,
forall x exists y loves(x,y)becomes
forall x loves(x,objectof(x))The Skolem term objectof(x) that replaces y has x as an argument because the scope of y is nested inside the scope of x.
The substitution that unifies the two loves literals is a set of two bindings: { y := x, z := mother(x) }forall x loves(x,mother(x))
forall y,z loves(y,z) -> likes(y,z)
After applying the substitution to both clauses, we can then conclude by resolution that
forall x likes(x,mother(x))