The basis for the method of proof referred to as "resolution" is the tautology
It gives rise to the "resolution rule of inference":
p ∨ Q, ¬p ∨ R
Q ∨ R |
(where p is a propositional variable) |
In applying this rule you combine two disjunctions to form a (typically larger) disjunction, but from each disjunction one of its disjuncts (a propositional variable in one and the negated form of that variable in the other) is "cancelled out" by its counterpart in the other disjunction. (E.g., p and ¬p cancel each other out.)
Special cases of this rule include
p, ¬p ∨ R R |
p ∨ Q, ¬p Q |
p, ¬p false |
The first case is obtained by taking Q:=false in the general rule; the second case is obtained by taking R:=false; the third is obtained by taking Q,R := false,false.
Definition: A literal is a propositional variable or a negated propositional variable.
Example 1: p
Example 2: ¬p
Definition: A clause is a disjunction of zero or more literals.
Example 1: p ∨ ¬q ∨ r
Example 2: ¬r
Example 3: [] (this denotes an "empty clause", which equals false,
the identity element of disjunction)
Note: If a particular literal occurs two or more times in the same clause, you get an equivalent clause by removing all but one occurrence of that literal. (This is due to symmetry/commutativity and idempotency of disjunction.) End of note.
Note: If a clause contains both the positive and negated forms of some literal (e.g. both p and ¬p), it is equivalent to true. Such a clause is of no use in the context of proof by resolution. (Reason: In a conjunction, a conjunct having value true can be omitted, because true is the identity element of conjunction.) End of note.
Definition: A boolean expression is said to be in conjunctive normal form (CNF) if it is a conjunction of zero or more clauses. (A conjunction of zero clauses equals true, because true is the identity element of conjunction.)
Example: (p ∨ q ∨ ¬r ∨ ¬s) ∧ q ∧ (¬p ∨ ¬q)
Theorem: For any boolean expression E, there is an equivalent boolean expression E' that is in CNF.
Proof: (sketch) Here is an algorithm for transforming an arbitrary boolean expression E into an equivalent expression E' that is in CNF. Repeat each step until it is no longer applicable. (Implicitly, you may use symmetry of ∧ or ∨ anywhere it is convenient.)
Step 0: Find a subexpression P≠Q and rewrite it (by (3.14)) as ¬P = Q
Step 1: Find a subexpression P=Q and rewrite it (by (3.80)) as (P ⇒ Q) ∧ (Q ⇒ P).
Step 2: Find a subexpression P <== Q and rewrite it (by (3.58)) as Q ⇒ P.
Step 3: Find a subexpression P ⇒ Q and rewrite it (by (3.59)) as ¬P ∨ Q.
Step 4: Find a subexpression ¬(P ∧ Q) and rewrite it (by (3.47a)) as ¬(P) ∨ ¬(Q) or else find a subexpression ¬(P ∨ Q) and rewrite it (by (3.47b)) as ¬(P) ∧ ¬(Q).
Step 5: Find a subexpression ¬¬P and rewrite it (by (3.12)) as P.
Step 6: Find a subexpression P ∨ (Q ∧ R) and rewrite it (by (3.45)) as (P ∨ Q) ∧ (P ∨ R).
Definition: An argument consists of a set of premises and a conclusion. An argument is said to be valid if the premises entail the conclusion (i.e., if the truth of all the premises guarantees the truth of the conclusion). (To put it one more way, an argument is valid if there is no state in which all its premises are true but its conclusion is false.) Formally, an argument can be written as an implication
where the Pi's are boolean expressions corresponding to the premises and C is a boolean expresson corresponding to the conclusion. The argument is valid if this implication is valid (i.e., a tautology).
Our goal, then, is to prove the validity of (*) (where the Pi's and C have been suitably chosen). Letting P stand for the conjunction P1 ∧ P2 ∧ ... ∧ Pk, formula (*) can be written P ⇒ C. Consider this:
P ⇒ C = < (3.59) > ¬P ∨ C = < (3.12) > ¬P ∨ ¬¬C = < (3.47a) > ¬(P ∧ ¬C) = < (3.15) > P ∧ ¬C ≡ false = < (3.80) > (P ∧ ¬C ⇒ false) ∧ (false ⇒ P ∧ ¬C) = < (3.75) > (P ∧ ¬C ⇒ false) ∧ true = < (3.30) > P ∧ ¬C ⇒ false (*') |
This shows that, to prove (*), we may just as well prove (*'). In order to do so, we do the following:
By virtue of the tautology stated at the very beginning and the transitive property of implication, every clause appearing in such a proof is a consequence of F. Hence, such a proof demonstrates F ⇒ false, which equivales (*'), exactly what we want to prove.
EXAMPLE: Suppose that the result of translating P1 ∧ P2 ∧ ... ∧ Pk ∧ ¬C into CNF is the formula L1 ∧ L2 ∧ L3 ∧ L4, where
L1: ¬p | L2: p ∨ q ∨ r | L3: ¬q ∨ r | L4: p ∨ ¬r |
One proof is as follows:
1. ¬p (L1) 2. p ∨ q ∨ r (L2) 3. q ∨ r (1,2) 4. ¬q ∨ r (L3) 5. r (3,4) (note: r ∨ r = r) 6. p ∨ ¬r (L4) 7. p (5,6) 8. [] (1,7) (note: the "empty clause" [] equivales false) |
Notice that we annotate each line by mentioning either that it corresponds to a premise (such as L1) or else by identifying the two lines containing the clauses from which the current line was derived, via an application of the resolution rule of inference.
A valid application of the rule would either cancel the p in L with the ¬p in M to conclude ¬q∨r∨q∨s or else cancel the ¬q in L with the q in M to conclude p∨r∨¬p∨s. Either way, the conclusion simplifies to true and hence is useless to us.
What is the underlying reason for why cancelling two or more pairs of literals "won't work"? It is because
is not a tautology. (To demonstrate this, take p and q to be equivalent but both r and s to be false. Moreover, if we swap p with ¬p and/or q with ¬q, we can still falsify the implication.)
Hence, a clause obtained by applying the rule in this invalid way is not guaranteed to be a consequence of the premises and thus should not appear as a line in a proof.