Summary
Semantics promised methods for deciding unsatisfiability that would not run through the truth table; this lesson delivers the main one. A set of formulas is written as a set of clauses, each a finite set of literals, by means of the conjunctive normal form or, to avoid its exponential growth, by means of definition clauses with new variables, which preserve satisfiability. A single rule acts on the clauses, the resolution rule: from a clause that contains a literal and another that contains its opposite, one infers the union of both without that pair. A refutation is a derivation that reaches the empty clause. Soundness is proved (if there is a refutation, the set is unsatisfiable), by induction on the length of the derivation, and so is refutation completeness (if a finite set is unsatisfiable, there is a refutation), by induction on the number of variables, eliminating them one by one; with the compactness theorem, completeness extends to infinite sets. The result is a method for deciding consequences, which is compared with the tables, and a presentation of the satisfiability problem, with two cases that are decided quickly: Horn clauses and clauses of two literals.
Learning objectives
- Represent a set of formulas as a set of clauses, by means of the conjunctive normal form or of definition clauses with new variables, and justify that the representation preserves satisfiability and consequence.
- Construct refutations by resolution and use them to decide consequences and unsatisfiability, without falling into the typical errors, such as eliminating two complementary pairs in a single step.
- Prove the soundness of resolution by induction on the length of derivations and its refutation completeness by elimination of variables, and extend the latter to infinite sets with the compactness theorem.
- Explain the satisfiability problem, its known cost and the cases that are decided quickly (Horn clauses and clauses of two literals), and compare resolution with truth tables.
The lesson on the semantics of propositional logic showed that validity and satisfiability are decidable by the truth table, at a cost that doubles with each variable, and announced methods that would not require running through it. The lesson on semantic consequence and equivalence reduced every consequence to an unsatisfiability: if and only if is unsatisfiable. The lessons on normal forms and on their algorithm gave every formula a conjunctive form, whose validity can be seen at a glance, but whose satisfiability cannot. If this is so, what is missing is a procedure that decides the unsatisfiability of a conjunction of clauses by operating on the clauses themselves. That procedure is resolution, proposed by John Alan Robinson in 1965 on the basis of ideas of Martin Davis and Hilary Putnam (1960); it is the core of the programs that today decide the satisfiability of formulas with millions of variables. Unlike the system of the unit on deduction, whose relations with semantics are studied in the lessons on soundness and completeness and on the compactness theorem, resolution does not deduce conclusions: it refutes sets. This lesson proves that it does so soundly and completely.
As in the previous lessons, , , , and name the variables to ; the letter without a subscript, and also , denote valuations; and is the set of the variables of .
Clauses and sets of clauses
Recall from the lesson on normal forms that a literal is a variable or the negation of a variable, and that the opposite of a literal , written , is the literal of the same variable and of the other sign; two opposite literals form a complementary pair. By the lemma on the negation of a literal, for every valuation . There a clause was a disjunction of literals; here it is convenient to forget order and repetitions, which do not alter the value, and to keep the set.
A clause is a finite set of literals. The clause without literals is called the empty clause and is written . A valuation satisfies a clause , written , if some literal of takes the value under ; otherwise, falsifies it. A clause of a single literal is called a unit clause. The variables of a clause form the set ; those of a set of clauses, the set , the union of the former. A valuation satisfies a set of clauses, , if it satisfies each of its clauses; is satisfiable if some valuation satisfies it, and unsatisfiable otherwise. Finally, if is a set of clauses and a clause, means that every valuation that satisfies satisfies .
Two extreme cases follow from the definition, and it is worth fixing them. The empty clause has no literals; therefore none of its literals takes the value , and no valuation satisfies it: is unsatisfiable, and so is every set that contains it. The empty set of clauses, on the other hand, has no clauses to satisfy, and every valuation satisfies it. They must not be confused: is unsatisfiable and is satisfied by all valuations.
Let be a nonempty clause, with its literals written in any order and without repetition. For every valuation , if and only if . In particular, all the disjunctions of the literals of , in any order and with repetitions, are equivalent to one another. Moreover, is satisfied by every valuation if and only if it contains a complementary pair.
Proof
By the value lemma for disjunctions of formulas, proved in the lesson on the generalized De Morgan and distributive laws, the disjunction takes the value if and only if some of its terms takes the value .
That some takes the value means that some literal of takes the value , that is, that satisfies . The condition does not depend on order or on repetitions, because it only asks which literals are present.
By the lemma on elementary conjunctions and clauses (lesson on normal forms), a disjunction of literals is valid if and only if it contains a complementary pair; by the above, the same holds for .
A clause that contains a complementary pair is called tautological: it imposes no condition, and it can be removed from any set without altering its models. Writing clauses as sets is not a notational whim. If from and one wants to obtain , the disjunction gives , which is equivalent to but is not the same formula; with sets, , and the merging of repeated literals happens by itself.
Let . The clause requires ; then requires , and then requires . The valuation that gives to and to and to the other variables satisfies , and it is the only possibility on . If the clause is added, no valuation satisfies the enlarged set: it is unsatisfiable, although it does not contain .
Loading the content…
Completed
Sign in to save your progress