Summary
One and the same truth function admits infinitely many formulas that represent it, and none of them, taken at random, lets one see what it says. This lesson fixes two moulds into which every formula fits up to equivalence: the disjunctive normal form, a disjunction of conjunctions of literals, and the conjunctive normal form, a conjunction of disjunctions of literals. It defines literals, clauses and elementary conjunctions; it proves that negation turns one form into the other when each literal is changed into its opposite, which is the duality between the two; it builds the canonical forms from the truth table and proves that they are unique. The existence theorem receives two proofs: by the table, as a corollary of functional completeness, and by induction on complexity, with the single case of joint denial and with the double hypothesis that this proof requires. At the end it shows why they are worth the effort: the validity of a conjunctive form and the satisfiability of a disjunctive one are decided at a glance.
Learning objectives
- Recognize literals, clauses, elementary conjunctions and formulas in disjunctive or conjunctive normal form, distinguishing form, which is a property of the string, from equivalence, which is a property of the meaning.
- Build from the truth table the disjunctive and conjunctive canonical forms of a formula, and prove that the canonical form is unique and that it determines the equivalence class of the formula.
- Prove by induction on complexity that every formula is equivalent to a disjunctive normal form and to a conjunctive one, using duality, the generalized De Morgan and distributive laws and semantic replacement.
- Decide at a glance the validity of a conjunctive normal form and the satisfiability of a disjunctive one, and apply normal forms to semantic consequence and to measuring the minimum size of a normal form.
In the previous lessons of this unit the formulas were given a meaning: the lesson on the semantics of propositional logic extended each valuation to all formulas; the lesson on semantic consequence and equivalence defined the equivalence and proved semantic replacement; the lesson on the generalized De Morgan and distributive laws extended those laws to conjunctions and disjunctions of formulas; and the lesson on functional completeness showed that every truth function is represented by some formula. Now, a truth function is represented by infinitely many formulas, which may be very different from one another: , and are three names of the same thing. If this is so, it is convenient to choose in each equivalence class a representative of fixed form, which can be read without effort and with which certain questions are answered by looking. That is what normal forms are.
Literals, clauses and normal forms
Recall, from the lesson on the generalized laws, the notation for the conjunction and the disjunction of formulas, defined by recursion and associating to the left; that of a single formula is the formula itself.
In the same lesson it was proved that the order and the grouping of the terms do not alter the formula up to equivalence (generalized associativity and independence of order and of repetitions); for that reason we shall also write without parentheses, with the grouping understood to the left.
A literal is a variable , which is called a positive literal, or the negation of a variable, which is called a negative literal. The opposite of a literal , which we write , is the literal of the same variable and of the other sign:
It follows from the definition that . Two literals form a complementary pair if one is the opposite of the other, like and .
A clause is a disjunction of literals, , and an elementary conjunction is a conjunction of literals, , with in both cases; a single literal is, therefore, at once a clause and an elementary conjunction. A literal is said to be in a clause or in an elementary conjunction if it is one of its .
A formula is in disjunctive normal form if it is a disjunction of elementary conjunctions, and in conjunctive normal form if it is a conjunction of clauses; that is, if it is, respectively, of one of the following two forms, where and are natural numbers and each is a literal:
We shall say that is a disjunctive normal form of if it is in disjunctive normal form and , and likewise for the conjunctive one. The lengths may vary from one conjunction (or clause) to another: requiring the same number of literals in all of them would force padding with repetitions and would add nothing.
The formula is in disjunctive normal form, with , and ; it is not in conjunctive form, because it is not a conjunction (its two components are distinct, and a conjunction is a double negation), nor is it a clause: read as a disjunction, it has a term, , which is neither a literal nor a disjunction of literals. The formula is in both forms: as a disjunction of a single elementary conjunction () and as a conjunction of three clauses of one literal each. In the same way, is at once a clause, that is, a conjunctive form with , and a disjunctive form of two conjunctions of one literal.
On the other hand, and are in neither of the two forms, although the first is equivalent to and the second to , which are.
It is worth pausing on what “being in normal form” means. It is a property of the string of circles and disks, not of its meaning: the lesson on induction on the natural numbers and on formulas proved unique readability, so that asking whether a formula is a disjunction, and of what, has a single answer. Now, the official abbreviations make some formulas be in normal form without looking like it. The implication is defined as : it is not that it is equivalent to that clause, but that it is that very string, and therefore it is already in normal form. More surprising is double negation. By the definitions of and of , the string is , that is, ; hence is not a literal, but it is, symbol by symbol, the clause .
The value of conjunctions and disjunctions
From the lesson on semantics we take the values of the defined connectives: ; , which equals if and only if both equal ; and if and only if both equal . The lesson on the generalized De Morgan and distributive laws extended them to formulas, by induction on the number of terms, in the value lemma: for every valuation , the conjunction takes the value under if and only if each takes the value under , and the disjunction takes the value under if and only if some takes the value under . That lemma, which is cited here without repeating its proof, is the instrument with which the value of any normal form is computed.
For every literal , the negation of is equivalent to its opposite, ; in particular, for every valuation .
Proof
If is a variable , its opposite is , which is exactly the string : there is nothing to prove.
If is , its negation is , which is not a literal; by the law of double negation (lesson on semantic consequence and equivalence), it is equivalent to , which is the opposite of .
In both cases, and have the same value under every valuation, and that of is given by the value of negation.
The second case is easy to overlook: when negating a normal form one tends to write instead of a literal, and is not one. Double negation is what brings the result back into the mould.
An elementary conjunction is satisfiable if and only if it contains no complementary pair. A clause is valid if and only if it contains some complementary pair.
Proof
If an elementary conjunction contains and , under every valuation one of the two takes the value , by the previous lemma; by the value lemma, the conjunction takes the value under every valuation.
If it contains no complementary pair, one defines a valuation that gives to each variable that is in it as a positive literal and to each variable that is in it as a negative literal (to the others, ). The definition is not contradictory, because no variable is in it in both ways.
Under that valuation all its literals take the value , and by the value lemma the conjunction takes the value : it is satisfiable.
If a clause contains and , under every valuation one of the two takes the value , and the clause takes the value : it is valid.
If it contains no complementary pair, the valuation that gives to its positive variables and to its negated variables makes all its literals take the value ; by the value lemma, the clause takes the value under it and is not valid.
Loading the content…
Completed
Sign in to save your progress