The proof of completeness wrote each row of a truth
table as a list of signed atoms
(Section 4.8). Join the signed atoms of one row by , and you get a
formula that is true in that row and in no other. Join
those formulas, one for each row where a given formula
is true, by
, and you get a
formula with the same truth table as . This section
turns that observation into two standard shapes for
formulas, the disjunctive and the conjunctive normal
form. It then reads validity off the conjunctive shape
at a glance, and asks how few connectives are really
needed.
On a first reading this section may wait: it is a
second-pass section, and nothing in Chapters 5–8 uses
it.
Normal forms are long conjunctions and disjunctions.
Section 4.5 fixed how to write them, in the paragraph on
long conjunctions after Proposition 4.5.1.
For formulas with , is the
conjunction grouped to the right, , and likewise for ; for it is itself. That
paragraph proved, by induction on the number of terms,
how such formulas are evaluated: for every valuation
,
(4.9.1)
We use these two lines constantly below, and we cite
them by this display.
So a long conjunction is true when
all its parts are, and a long
disjunction when at least one is, just
as the words say.
The building blocks are the smallest formulas that
still carry a sign.
Definition
4.9.1 (Literal)
A literal is an atom or the negation
of an atom.
So , , and are literals.
The signed atom of Section 4.8 is
always a literal. The formulas , and
are not: in
the first two,
is applied to something other than an atom, and is neither an atom
nor a negation. The opposite of a
literal is
if the literal is , and if it is . By the clause for
in Definition 4.4.2,
a literal and its opposite take opposite values under
every valuation.
From literals we build two kinds of blocks and two
kinds of formulas.
- A clause joins one or more literals
by , such as
, or alone.
- A conjunctive clause joins one or
more literals by , such as ,
or alone.
(We do not shorten it to “conjunct”, which keeps its
ordinary meaning, one side of a conjunction.)
A normal form is a formula whose connectives come
in fixed layers: negations only on atoms, then one layer
of one connective, then one layer of the other.
Definition
4.9.2 (Disjunctive Normal Form)
A formula has disjunctive normal
form (DNF), or is in DNF, when
it has the shape , with , where every
joins
one or more literals by .
Definition
4.9.3 (Conjunctive Normal Form)
A formula has conjunctive normal
form (CNF), or is in CNF, when
it has the shape , with , where every
joins
one or more literals by .
In words: a DNF is an “or of ands” and a CNF an “and
of ors”, and in both the only negations sit directly on
atoms. Read a DNF as a list of situations, any one of
which makes it true; read a CNF as a list of
requirements, all of which must be met.
Check some formulas against the definitions, clause
by clause.
- is in DNF: two conjunctive
clauses, each a conjunction of literals. It is not in
CNF: as a conjunction of clauses it would have to be a
single clause (it is not a conjunction), and a clause
cannot contain .
- is in CNF, with two clauses, and
not in DNF.
-
is in both: in DNF with one conjunctive clause, and in
CNF with two clauses of one literal each. Likewise is in
both.
- A single literal, , is in both forms: one conjunctive clause of
one literal, and one clause of one literal. This
degenerate case matters, because a formula such as must count as
already normal.
A nonexample by a minimal change:
is in DNF, but is not in either form. Only one
symbol moved, and the literal condition fails: now stands on the
conjunction , not on an atom. The formula is in neither
form either, since is not allowed at
all.
Why these layers? Because they are the shapes that
the truth table hands us, as the next theorem shows, and
because in these shapes some questions become easy: the
subsection “Reading validity off a CNF” below decides
validity of a CNF without a table.
Warning. A literal is an atom with
at most one , and nothing else.
is
equivalent to the literal but is not a literal,
so is not in CNF as written. Likewise is not a literal, so
a “normal form” containing is not one; that is
why the constructions below never use it.
Quick check. Which of the following
are in CNF, and which are in DNF? (i) ;
(ii) ; (iii) .
Solution. (i) CNF, with
clauses and ;
not DNF, since the conjunctive clause would have to be
the whole formula and is not a literal. (ii) Neither: stands on a
disjunction. (iii) DNF, with conjunctive clauses and ; not CNF,
since the one clause would contain .
Reading a
DNF off the truth table
Take a valuation and atoms with
, and form
the minterm of the row of , the conjunctive clause
of its signed atoms, For every valuation , each is true under
exactly when
: if
, then ; if , then
,
which is true under exactly when . By
Eq. 4.9.1,
(4.9.2)
So is true
in the row of and
in no other row. It is a formula that “names” one
row.
Example
(Exactly one of two)
Find a formula in DNF that is true exactly when
exactly one of ,
is true, and
check it.
Solution. The rows with exactly one
of , true are and .
Their minterms are and , so the answer is Check against the table: in the row T, F the
first minterm is true; in F, T the second is; in T, T
each minterm has a false literal (, ); in F, F likewise
(, ). So the formula is
true in exactly the two rows wanted.
The same recipe works for any formula.
Theorem
4.9.1 (Disjunctive Normal Form)
Every formula is equivalent to
a formula in DNF. If has at least one
atom, the DNF can be chosen so that every atom in it is
an atom of .
Idea. List the rows where is true and
disjoin their minterms . A valuation makes
the disjunction true exactly when it agrees with one of
those rows, which by Lemma 4.4.1
is exactly when it makes true. Two
degenerate cases need a convention: a formula with no
T-row, whose disjunction would be empty, and a formula
with no atoms, which has no rows to speak of.
Proof. By the paraphrase of Definition 4.5.4,
two formulas and are equivalent
exactly when for every valuation .
Case 1: has at least one
atom. Let () be the atoms of . A
row is a choice of a value for each
; there are
rows, and for
each we fix a valuation that takes those values at (and,
say, T at every other atom). By Lemma 4.4.1,
depends
only on the row of . Let be the
fixed valuations of the rows in which is T.
If , let
, which is in DNF by Definition 4.9.2,
with atoms among . Let
be any valuation. By Eq. 4.9.1
and Eq. 4.9.2,
exactly when
agrees with some on . If it
does, then by Lemma 4.4.1.
Conversely, if , then the row of is one where is T, so agrees on with the
valuation fixed
for that row. Hence for every , and .
If , then
is F in
every row, hence under every valuation. The formula
is in DNF (one conjunctive clause of two literals) and
is F under every valuation by Definition 4.4.2.
So .
Case 2: has no
atoms. Any two valuations agree on all the atoms of
(there are
none), so by Lemma 4.4.1
is the
same for every .
Let be an atom.
If that value is T, then , which is true under every valuation and is
in DNF (two conjunctive clauses of one literal); if it
is F, then . This proves the theorem.
The minterms of different rows are never true
together, and in each row exactly one of the minterms is true:
they divide the rows like the pieces of a partition, and
a full disjunctive normal form collects the pieces in
which the formula is true.
The minterms
are the signed atoms of Section 4.8 joined by . There the signed
atoms of a row were premises from which was derived;
here they are joined into a formula that is true in that
row only. The proof is the proof of completeness with
the derivations taken out.
↺Second readingWhy
not the constant for contradiction
For we could have written , which is also F
under every valuation. We did not, because is not a literal,
and because the adequacy theorem at the end of this
section reuses the construction in a language without
.
A DNF lists the rows where a formula is true. A CNF
does the opposite: it lists the rows where the formula
is false, one clause per row, each
clause being false in its row and true in every
other.
Theorem
4.9.2 (Conjunctive Normal Form)
Every formula is equivalent to
a formula in CNF. If has at least one
atom, the CNF can be chosen so that every atom in it is
an atom of .
Idea. Apply Theorem 4.9.1
to and
negate the result: . Now push the inwards with De
Morgan’s laws and double negation (Proposition 4.5.1):
becomes , and each
, the
negation of a conjunction of literals, becomes the
disjunction of the opposite literals. The proof checks
the outcome directly with Eq. 4.9.1,
which avoids De Morgan’s laws for many terms.
Proof. By Theorem 4.9.1,
for some conjunctive clauses
(with atoms among those of if it has any,
since
has the same atoms). For each , let be the disjunction of
the opposites of the literals of , in the same order,
and let . Then is in CNF, with the
same atoms as .
Let be a
valuation. Each literal of is true under exactly when the
corresponding literal of is false. By Eq. 4.9.1,
used at each step: Since , the last
line holds exactly when , that is, when .
So for every , and .
Unwinding the construction: the conjunctive clauses
of the DNF of
are the
rows where
is false, and is the clause that is
false exactly in the row of . So the CNF can be
read straight off the table: one clause per
F-row, built from the opposites of that row’s
signed atoms. In the row , , for instance, the clause is . A formula
with no F-row gets, by the proof, the clause of a
contradiction’s DNF negated, (from ),
which is true in every row.
Quick check. On the atoms , , , write the CNF clause
for the F-row , , .
Solution. The row’s signed atoms
are , , ; their opposites
give . It is false exactly when is F, is T and is F, that is, in that
row only.
Alternatively, a CNF can be reached by
rewriting. First replace each , which is not a
literal, by for an atom ; both are false in
every row. Replace by and by ;
push each
inwards by De Morgan’s laws, and remove ; finally
distribute
over ,
replacing by . Each step replaces a part of the
formula by an equivalent one: the equivalences are and those of Proposition 4.5.1,
which hold for arbitrary formulas, and Lemma 4.5.2
says the whole formula stays equivalent; since is transitive
(Section 4.5), the steps chain. Stopping before the
distribution step, and distributing over instead, gives a
DNF. The rewriting route is often much shorter than the
table, as the next example shows, but it can also
explode, as the warning after it shows.
Solution. The table route.
Work backwards from F (Section 4.4): is false exactly
when is T
and is
F. The latter needs true and false, so ; then
true needs
. So
has exactly
one F-row, , as the table confirms: The DNF of Theorem 4.9.1
has one minterm for each of the seven T-rows: The CNF of Theorem 4.9.2
has one clause for the single F-row, built from the
opposites of : it is the single clause .
The rewriting route. Eliminate the three
implications, then push the negation in: using (c) of Proposition 4.5.1
three times, then De Morgan’s law (b) for ,
then double negation (d) twice. This is already a DNF,
with three conjunctive clauses. For a CNF, distribute,
by (g) together with commutativity (f) and associativity
(h): . The second clause contains and , so it is true in
every row, and a conjunction with a part that is true in
every row is equivalent to its other part. So : one clause, as the table route found.
The formula is also a DNF, with three conjunctive clauses
of one literal each. So the table’s seven minterms and
the rewriting’s three conjunctive clauses can both be
replaced by three one-literal conjunctive clauses. Both
routes are correct; they differ in length, and neither
is guaranteed to give the shortest normal form.
Warning. A formula has
many equivalent CNFs and DNFs; “normal
form” does not mean “unique form”. and are both CNFs of the formula
above. And the two routes have opposite weaknesses. The
table route needs all rows for atoms. The rewriting
route can explode at the distribution step: distributing
gives 8
clauses, one for each way of picking or from every
conjunctive clause, and such conjunctive
clauses give
clauses.
Reading
validity off a CNF
A CNF is a list of requirements, all of which must
hold. That makes one question easy.
Proposition
4.9.3 (Validity of a CNF)
- (a) A formula in CNF
is a tautology exactly when every
clause contains some atom together with its
negation.
- (b) A formula in DNF
is satisfiable exactly when some
conjunctive clause contains no atom together with its
negation.
Try it first (ten minutes): take a clause in
which no atom occurs both with and without , such as . Can
you find a row that makes it false? What does that row
do to a CNF containing this clause?
Idea. The direction “every clause
has a pair tautology” is
the easy one: is true in every row, so a clause containing
both is too, and a conjunction of clauses true in every
row is true in every row. The attempt above is the other
direction. To make a CNF false, it is enough to make
one clause false, and a clause is false
only when all its literals are. So set
every atom of the clause against its literal: F for a
plain atom, T for a negated one. The one thing that
could stop us is an atom that appears both plain and
negated, since it would have to be both F and T. That is
exactly the pair the proposition talks about.
Proof. (a) Let be in CNF.
Suppose every clause contains some atom
and its negation
. Let be a valuation. One of
, is true under
, by Definition 4.4.2,
so by Eq. 4.9.1.
This holds for every , so by Eq. 4.9.1.
As was arbitrary,
is a tautology
(Definition 4.5.1).
We
prove the contrapositive. Suppose some clause contains no atom
together with its negation. Define a valuation by:
if the literal
occurs in ;
if the literal occurs in ;
for every other atom. This is well defined, because no
atom occurs in
both as and as
. Every
literal of is
false under , so
by Eq. 4.9.1,
and hence , again by Eq. 4.9.1.
So is not a
tautology.
(b) Let be in DNF.
Suppose
contains no atom together with its negation. Define
by
if occurs in
,
if occurs in
, and
otherwise; this is well defined as in (a). Every literal
of is true
under , so and
by Eq. 4.9.1.
So is satisfiable
(Definition 4.5.2).
If
every conjunctive clause contains some and , then under every
valuation one of these two literals is false, so every
conjunctive clause is false and so is , by Eq. 4.9.1.
So is not
satisfiable. This proves the proposition.
↺Second readingTwo
faces of one fact
The two parts are two faces of one fact. Section 4.5
showed that a formula is a tautology exactly when its
negation is unsatisfiable (after Definition 4.5.2).
Let be in DNF,
and let be the
CNF whose clauses are the conjunctive clauses of with every literal
replaced by its opposite. The proof of Theorem 4.9.2,
applied to with
itself as the DNF of ,
shows . A clause of has an atom together
with its negation exactly when the corresponding
conjunctive clause of has. So is unsatisfiable
exactly when , and so , is a tautology, which
by (a) happens exactly when every conjunctive clause of
has such a pair.
That is (b) again.
The proposition trades one kind of work for another.
Checking a CNF for validity is now a glance, but getting
the CNF in the first place may take the rows of the table
route or the explosion of the rewriting route. Nothing
is free: the work has moved, not vanished.
Example
(Validity at a glance)
Decide whether each formula is a tautology, without a
table.
- (a) .
- (b) The same formula
with the third clause changed to .
Solution. (a) Each clause
has a pair: in the first; in the second;
in the
third; in
the fourth. By Proposition 4.9.3
(a), it is a tautology. A table would have needed 16
rows.
(b) The new third clause
has the atoms ,
, , each once, so it has
no pair, and the formula is not a tautology. The proof
of Proposition 4.9.3
names a refuting row: , , , and , like every atom not in the clause;
in fact either value of works. In that row the
third clause is F, so the conjunction is F.
Calculating
with equivalences
Section 4.5 replaced a part of a formula by an
equivalent part (Lemma 4.5.2)
and chained such steps, since is transitive.
Normal forms can be reached in this way, as the
rewriting route did, and so can shorter formulas. Each
step cites a law, as each line of a derivation cites a
rule. A few more laws make the calculations run; in
them,
serves as a formula that is true in every row.
Proposition
4.9.4 (Laws of the Constants, Idempotence and
Absorption)
For all formulas and :
- (a) and ;
- (b) and ;
- (c) and ;
- (d) and ;
- (e) and .
↺Second readingThe
tables for the further laws
Proof. As for Proposition 4.5.1:
fix a valuation ,
and let and . By (V1) and (V2) of Definition 4.4.2,
and ,
so the value of each side under is computed from (and ) by the clauses of its
connectives. The first table covers (a)–(d), with one
row for each value of ; the second covers (e),
with one row for each pair . In (a), (d) and (e) both columns agree with
; in (b) and (c)
the columns are constant, F where the right side is
and T where it
is . So
both sides of each law have the same value under , and as was arbitrary they are
equivalent, by the paraphrase of Definition 4.5.4.
Example
(Simplifying by a chain)
Simplify , citing a law at each step.
Solution. Step 1 is (c) of Proposition 4.5.1,
used twice, each time applied inside the formula by Lemma 4.5.2.
Step 2 is (g), second form, read from right to left with
,
, . Step 3 is
(c) of Proposition 4.9.4,
applied inside. Step 4 is (a).
Read the result: if gives both and not , then not . This is the table’s
face of .
Quick check. Simplify , citing a law at each step.
Stronger
and weaker parts
Replacing a part by an equivalent part keeps the
value of the whole (Lemma 4.5.2).
Replacing it by a stronger or a weaker part moves the
value in one direction, and which direction depends on
where the part sits.
Definition
4.9.4 (Positive and Negative
Occurrences)
Each node of the parse tree of a formula (an
occurrence of a subformula, Section
4.5) is positive,
negative, or unsigned,
by the path from the root: the root is positive; the
part of a node , and the left
part of a node , have the sign opposite to that node;
the parts of a node or ,
and the right part of ,
have the same sign as that node; the parts of a node
, and every node below them, are
unsigned.
In words: walk down from the root; the sign flips at
each negation and at each hypothesis of an implication,
and stays at every other step. A biconditional uses each
part in both directions, as hypothesis and as
conclusion, so below it nothing is signed. The sign is
well defined because a formula has only one parse tree
(Section 4.3).
The parse tree of , each node with its sign. Signs flip at each
and on the
left of each :
here is positive
(two flips),
positive,
negative.
Theorem
4.9.5 (Monotonicity)
Let , and let be obtained
from by
replacing one occurrence of by . If the occurrence
is positive, then ; if it is negative, then
.
In words: a stronger part in a positive place makes
the whole stronger; in a negative place, weaker. Two
readings are used daily. A stronger hypothesis
gives a weaker theorem: the hypothesis of is
negative, so from we get . It suffices to prove
something stronger: the conclusion is positive,
so from we get . For example, from the
theorem gives and .
Idea. Induct on , as for Lemma 4.5.2.
There the replaced part kept its value, and so did the
whole. Here truth passes one way only: from the old part
to the new one, and up through , and the right of
unchanged; at a
and at the
left of a the
direction turns round, exactly where the sign flips.
↺Second readingThe
proof of monotonicity
Proof. We apply Theorem 4.3.1
to the property : for every
positive or negative occurrence of in , with the result of
replacing it by , and every
valuation : if the
occurrence is positive,
implies ; if it is negative,
implies . By Definition 4.5.3,
these say and .
Signs inside a part. Let be an immediate
part of . The
parse tree of is a subtree of
that of (Definition 4.1.2),
and the path from the root of to a node of is the path from
the root of
with one step on top. So the node’s sign in is its sign in if is positive in
, the opposite
sign if is
negative, and none if is unsigned.
If the occurrence is the root, it is positive, and , and
implies
because . An atom or has no other node.
Otherwise the occurrence lies in one immediate part, and
is with that part replaced by the
result
of the replacement inside it.
. The part is negative, so the
occurrence has opposite signs in and in . If it is positive
in , it is
negative in ,
and
gives: implies .
So if , then ,
hence , and by (V2). If it is negative in , the same argument
runs with
and
exchanged.
or . Both parts are positive, so the
signs in and
in the part agree. Clauses (V3) and (V4) are monotone in
each part: if a part is replaced by one that is true
whenever it was, a true conjunction or disjunction stays
true. With of the
part, this gives the claim in both cases.
. In the signs agree,
and (V5) is monotone in the conclusion: if
implies , then implies . In the signs are
opposite, and (V5) is antitone in the hypothesis: if
implies ,
then implies , since a false leaves false. An
occurrence positive in is negative in , so supplies
exactly this premise; a negative one is positive in
, and the
argument runs with and
exchanged.
. Every node below
the root is unsigned, so there is no occurrence to
treat.
By Theorem 4.3.1,
holds for
every formula .
This proves the theorem.
Quick check. Give the sign of each
atom occurrence in .
Solution. is positive: flipped by
the , and again
as the hypothesis of . is negative: flipped by
the only.
is positive.
Warning. Below a nothing
may be strengthened. , but and entail each other in neither
direction: the row , makes the first true and the second
false, and the row , does the reverse.
Adequate
sets of connectives
Our formulas use five connectives and . Chapter 2 already
showed that some of them can be traded for others: an
implication for a disjunction (Proposition 2.5.6),
a biconditional for two implications (Proposition 2.4.1).
How far can this go? Before we can answer, we need to
say what a set of connectives must be able to “say”.
Every formula whose atoms are among has a
truth table: a value for each of the rows. Turn this
around, and ask whether every table is
the table of some formula.
Section 4.4 called such a table a truth
function (Definition 4.4.4):
a value for each list of inputs, with no formula
attached; a formula expresses it when
it has that table.
There are
lists of inputs and two choices of output for each, so
there are
truth functions with inputs: with one input and
with two.
Examples: the negation function with
one input, , , expressed by ; the two-input
function that is T only at ,
expressed by ; the three-input majority
function, T when at least two inputs are T, expressed by
. A degenerate
case: the one-input function that is always T is
expressed by , and also by , which does
not mention at
all. The definition allows that.
We say a formula is in a set of connectives if every
connective occurring in it belongs to , and occurs in it only if
belongs to
(for this purpose
counts as a
connective with no inputs).
Definition
4.9.5 (Adequate Set of Connectives)
A set of
connectives is adequate if
every truth function, with
any number of inputs, is
expressed by some formula in .
A set containing an adequate set is adequate, since a
formula in the smaller set is also in the larger one.
The theorem below shows that is
adequate, so the full set is too. The question is
which smaller sets are.
Rewriting “or” with “not” and “and”.
The DNF of a truth table uses , and . To do without , rewrite each
disjunction by De Morgan’s law: has the
same table as . Done everywhere, from the leaves
up, this is a translation of the formulas built
from atoms with , , (the proof below
gives the clauses for , , ): , , , . For
instance In the row , , both sides are T: on the left and are T; on the
right is F, so its negation is T, and is T. Two more
translations do the same for the other sets of the
theorem below:
|
|
|
|
|
|
|
|
|
|
|
|
Quick check. Use the translation
to express
with
and only, and check your
formula in the row , .
Solution. . In the row , : is , so T; then is T;
then the whole is , so F, which agrees with .
Theorem
4.9.6 (Adequate Sets)
- (a) The sets ,
,
and
are
adequate.
- (b) The set is
not adequate: no formula in it expresses the negation
function.
Idea. For (a), the construction of
Theorem 4.9.1
works for any table, not only for the table of a
formula, and its output uses only , , . To shrink the set
further, rewrite each missing connective in terms of the
others, for instance as , recursively through the formula.
For (b), look at the row where every atom is true: , and all give T on T
inputs, so every formula in them is T there, while
negation must give F.
Proof. (a) The set
. Let be a truth function
with
inputs. For each of the lists of inputs, fix
a valuation taking those values at , and let
be
those fixed for the lists where is T. If , let , with the minterms formed from ; if , let . By Eq. 4.9.1
and Eq. 4.9.2,
a valuation makes
true exactly when
is a list where is T, that is, when
. So expresses , and is in .
The other three sets. By Theorem 4.3.4,
the following clauses define three functions on all
formulas. Each has for every atom , and ,
and (these last clauses are never used
below). The other clauses rewrite the connectives , , :
- , into : , , and ;
- , into : , ,
and ;
- , into : , , and .
Claim. Let ,
, . For every formula in
and each , the
formula is in , and for every valuation .
Proof of Claim. By structural
induction (Theorem 4.3.1)
on , with
the property “if is in ,
then for each ,
is in
and has the
same value as under every
valuation”. The immediate parts of a formula in
are in , so the induction hypothesis applies to
them. For ,
and the property holds vacuously, since these
formulas are not in . For an atom, . In the other
cases, write and , by the induction hypothesis. Each
clause for
above uses only the connectives of , applied to formulas
in , so is in . For the values, use
Definition 4.4.2,
and that is true exactly when is false ( is always F):
- and are
true exactly when , as is .
- is true exactly when
neither nor is, that
is, when . And is true exactly when is false, that is, when and is
false, that is, when . Both agree with .
- is true exactly when
and are not both F. And
is true exactly when is
false or , that is, when or . Both
agree with .
The remaining clauses, for
and , keep the connective and have the right
value by the induction hypothesis.
Now let be any
truth function, and the formula in
that expresses it. By the Claim, is in and for every valuation . So each is adequate.
(b) Let be the
valuation with for every atom . We show by structural
induction that every formula in is
true under ; the
property is “if is in ,
then ”. For an atom, . The formulas , and are not in the set, so for them the
property holds vacuously. If is ,
or
and is in the set, then so are and , and by the
induction hypothesis . By Definition 4.4.2,
and ; and because its conclusion is true. By Theorem 4.3.1,
every formula in the set is true under .
Now suppose some in
expressed the negation function . Then , contradicting . So no such exists, and the
set is not adequate. This proves the theorem.
In the implication case of (b), the reason is that
the conclusion is true. That is
where a careless argument goes wrong, and Exercise (C2: Find the error, used later)
asked you to find a “proof” that goes wrong there.
The five connectives were chosen because each matches
a word mathematicians use, not because they are needed:
two suffice, and Exercise (C1: One connective is enough)
shows that one well-chosen connective suffices.
Warning. The in is
essential. Without it, is not adequate:
every formula in is also in , so
by (b) of Theorem 4.9.6
none expresses negation. Implication alone cannot say
“false”; implication together with a formula that is
always false can.
Exercises
A. Check your
understanding
Solution. (a) and . has two
negations, is
not an atom, and negates a disjunction.
(b) is a clause. is both (one literal). is
neither: its part is not a literal.
(c) The first is not a tautology: its first
clause has
no pair, and the row (any ) makes it false, hence
the whole conjunction. The second is: each clause has a
pair ( and
), by Proposition 4.9.3
(a).
(d) : its one conjunctive clause contains a
pair, so by Proposition 4.9.3
(b) it is not satisfiable.
(e) True. A single clause is a disjunction of conjunctive clauses of
one literal each.
Solution.
(a) , by Proposition 4.9.4
(e).
(b) : (c),
then (b), then (d) of Proposition 4.5.1
give , , .
(c) :
distributivity and commutativity give ; then (c) of Proposition 4.9.4
gives , and (a) with commutativity gives .
(d) : (g) read from right to
left gives , then (c) and (a) of Proposition 4.9.4.
(e) Positive: the
flips it, and
so does the hypothesis place of .
(f) Negative: the
right side of
keeps the sign, the flips it.
(g) Unsigned: it
is a part of a biconditional.
(h) : sits in the conclusion, a positive
place.
(i) , one minterm per T-row.
(j) , one clause per F-row.
(k) : one for each of the
eight rows, since all are T-rows.
(l) Yes: , so a formula in , adequate
by Theorem 4.9.6,
can be rewritten into , from the
leaves up.
B. Practice
Solution. (a) By the
table: is true when and have opposite values,
so its T-rows are T, F and F, T, and its F-rows are T, T
and F, F. DNF: , as in Example (Exactly one of two).
CNF, one clause per F-row from the opposite literals:
the row T, T gives and the row F, F gives , so . Check the CNF: in the row T, F both
clauses are true, and so is ;
in the row T, T the first clause is false, and so is
.
(b) By rewriting: . This is a single clause, so it is a CNF, and
it is also a DNF with three one-literal conjunctive
clauses. Check: in the row T, T, F it is false (every
literal false), as is ; in the row F, T, F it is true,
as is the original (its hypothesis is false).
(c) By rewriting: .
This single conjunctive clause is a DNF, and it is also
a CNF with three one-literal clauses. Check: in the row
F, T, F it is true, and so is the original ( is false and
is false); in the
row F, T, T it is false, and so is the original ( is true).
Solution. : this is the translation in the proof of Theorem 4.9.6,
and the right side is F exactly when and are both true,
that is, when is F.
For the biconditional, says and , and says “not without ”, that is, . So
. The table: The last two columns agree in every row.
Solution. The rows with an odd
number of T’s are those with three T’s, T T T, and those
with one, T F F, F T F, and F F T. One minterm per row,
as in Theorem 4.9.1:
The properties an answer must have: (i) it is
in DNF (a disjunction of conjunctions of literals); (ii)
its atoms are among , , ; (iii) it is T in the
four rows T T T, T F F, F T F, F F T; (iv) it is F in
the other four, T T F, T F T, F T T, F F F. Check: (i)
and (ii) hold by inspection. By Eq. 4.9.2,
each minterm is T in its own row only, so the
disjunction is T exactly in the four rows listed, which
gives (iii) and (iv).
A different correct answer, for instance the same
minterms in another order, or with the literals of a
minterm reordered, passes the same checks. No DNF with
fewer conjunctive clauses works. A conjunctive clause
containing an atom and its negation is T in no row and
contributes nothing. Any other conjunctive clause
omitting an atom, say , is T in two rows that differ at that
atom, and changing one atom always changes the parity,
so one of those rows has even parity. So every
conjunctive clause that is T somewhere mentions all
three atoms and is T in exactly one row, and four T-rows
need at least four conjunctive clauses.
C. Going deeper
Solution. (a) First, two
equivalences, checked from the table of :
is F exactly when is T, so ; and , which is T
exactly when
and are both
T, so it is equivalent to . Now
define, by recursion on formulas as in Theorem 4.3.4,
,
, (the other clauses do not
matter). By structural induction, exactly as in the
Claim in the proof of Theorem 4.9.6,
every formula in has
in and for every : the atom case is
immediate, and the two equivalences above give the and cases from the
induction hypothesis. Given a truth function , Theorem 4.9.6
(a) gives a formula in
expressing it, and then expresses
and is in .
(b) The same, with :
is T exactly when is F, so ; and . The
recursive translation , turns a formula in expressing
into one in .
(Recursion and structural induction for the language
with the new connectives hold by the same proofs as Theorem 4.3.4
and Theorem 4.3.1,
with one more formation clause.)
Marking scheme. (10 points)
- 3: (a) two equivalences expressing the connectives
of an adequate set from Theorem 4.9.6
(a) in terms of , read off its
table (for instance and ).
- 3: (a) the recursive translation and the structural
induction showing that it keeps the value under every
valuation.
- 1: (a) the conclusion, via Theorem 4.9.6
(a).
- 3: (b) the same for , with .
Fatal errors (0 for the step): checking the
translation on examples only, with no induction.
Solution (Hint 1). For (b): compare
each row with the row in which every atom’s value is
flipped.
Solution (Hint 2). For (b): show
that every formula in and takes opposite
values in a row and in its flipped row.
Solution. (a) Let make every
atom true. Every formula in is true under , by the
structural induction in the proof of Theorem 4.9.6
(b) with one more case: if , then , since the
two values are equal. As there, no such formula
expresses negation, which must give F at the input
T.
(b) For a valuation , let be the
flipped valuation: is the opposite
of , for every
atom . We show by
structural induction that every formula in
satisfies: for every valuation , is the
opposite of . For an atom
this is the definition of . If is the
opposite of , then , the
opposite of , is , which is the
opposite of . If the
property holds for , , , then flipping
flips all three
values; at least two of them are T after the flip
exactly when at least two were F before, that is,
exactly when at most one was T, that is, exactly when
was F. So is the opposite of . The other connectives and do not occur in
formulas of , so those cases are vacuous.
(Structural induction for the extended language holds by
the proof of Theorem 4.3.1,
with one more formation clause.)
Now the two-input function of is F at
and at the flipped input .
If a formula in
expressed it, then for a valuation with ,
we would have and , since
and . But these values must be opposite.
So no formula in expresses it, and the set is not
adequate.
Marking scheme. (10 points)
- 3: (a) states the all-T valuation and runs the
induction, with the case and
the vacuous cases (, ) named.
- 1: (a) names a truth function that is not expressed
(negation), with the reason.
- 4: (b) states the flipped-row property for
every formula in and
proves it by structural induction, including the case.
- 2: (b) exhibits a truth function that takes the same
value on some row and on its flipped row, and
concludes.
Fatal errors (0 for the step): in (b), checking the
flipped-row property on a few formulas instead of
proving it for all; in (a), an implication case
justified by the hypothesis being true rather than by
the conclusion.
Solution. By rewriting.
Eliminate the outer implication and then the inner one,
and push the negation in: The last line is a DNF. Here , since an implication is false exactly when
its hypothesis is true and its conclusion false. For a
CNF, distribute: and drop the clause , which is
true in every row: the CNF is . (The clause is redundant
too: is an equivalent CNF, as splitting on
shows. Either is
correct.)
The check. The formula is false exactly when
holds and
fails.
Its table: The T-rows are T T T, T F T, T F F, and F T T.
The DNF is true in exactly these:
in
T F T and T F F, and in T T T and F T T. In each of the
four F-rows the CNF has a false clause: in T T F
and F T F,
in F F T and F F F.
By the table route, the DNF has four
minterms, one per T-row, and the CNF four clauses, one
per F-row, for instance for the row T T F. Any
correct DNF and CNF earns full marks; a CNF is not
unique.
Marking scheme. (10 points)
- 2: the route carried out correctly: eliminated, with
and its reason, or the T-rows and
F-rows read off a correct table.
- 3: a correct DNF.
- 3: a correct CNF, by distribution carried out in
full or by one clause per F-row.
- 2: the check against the table, covering at least
the four F-rows (or the four T-rows).
Fatal errors (0 for the step): rewritten
as ; a “CNF” with a conjunction inside a
clause.
Solution. (a) The formulas
are and . They are equivalent by Proposition 4.5.1
(b). Each member
of gives a
valuation of and
, by whether it
lies in and in
, and under that
valuation the two formulas have the same value. So is in one collection
exactly when it is in the other.
(b) The formulas are and
, equivalent by Proposition 4.5.1
(g); conclude as in (a).
(c) Work backwards from F. Falsity needs
true and
false, so and true and false. Then
is true, by , so is true: no
row makes the formula false, and it is a tautology. For
each , its
memberships give a valuation making the formula true: so
if “ implies
” holds,
then “ implies ” holds. If every member of is in , the first holds for
every , hence so
does the second.
Marking scheme. (8 points)
- 3: (a), with the step from an equivalence to equal
membership argued (each gives a
valuation).
- 2: (b).
- 3: (c): the tautology, and the step to
collections.
Fatal errors (0 for the step): checking the set
equality on one example collection only.
Solution. (a) If ,
every row in which is true is one in
which is true,
so there are at least as many of the second. The
converse fails: on the atoms , , the formulas and are each true in two
rows, so , but (the row , ).
(b) By (V4), the rows of are
those of
together with those of . By (V3), the rows
in both are the rows of . The
sum counts those twice and every other row
of once.
(c) Two different rows differ at some ; one minterm contains
and the other
, and no
valuation makes both literals true. Each row makes its
own minterm true (Eq. 4.9.2),
so the disjunction of all is true in every row
(Eq. 4.9.1).
The full DNF over has one minterm for each row on them
in which is
true, and different rows give different minterms, so it
has of
them. (It is not always the DNF that the proof of Theorem 4.9.1
builds. That proof uses only the atoms of , so when is satisfiable
and has at least one atom, and of the do not occur in , it gives minterms
on the remaining atoms. When has no atoms it
gives
or .
When
it gives a contradiction for some atom , which is a conjunctive
clause but no minterm. Hence the restriction to
satisfiable .)
Marking scheme. (8 points)
- 2: (a) the inequality; 1: a counterexample to the
converse, checked.
- 2: (b), with the rows counted twice named.
- 3: (c): different rows give minterms never true
together; the disjunction of all is a tautology; the
count.
Fatal errors (0 for the step): in (a), a “converse”
argued from one pair of formulas that happen to entail
each other.
Solution (Hint 1). Let say: the shared
atoms take values that some row making true also gives
them.
Solution (Hint 2). To show ,
build one row that agrees with a row of on the atoms of
and with
the given row on the other atoms of .
Solution. (a) : and
.
(c) (Proved first, since (b) uses it.)
Suppose no atom is shared. Take a row making true, and any row
. The row that
agrees with on
the atoms of and with on every other atom
makes true
(Lemma 4.4.1),
hence ; it
agrees with on
the atoms of ,
none of which is an atom of , so makes true (Lemma 4.4.1
again). As was
any row, would
be a tautology.
(b) Let be the shared atoms ( by (c)). Call a
row on
good if some valuation making true gives the
the values of
; there is at
least one, since is satisfiable.
Let be the
disjunction of the minterms, on , of the
good rows. Its atoms are shared.
: a valuation making true gives the
the values of a
good row , so it
makes the minterm of true (Eq. 4.9.2),
hence .
: let make true. Then makes the minterm of
some good row
true, so gives
the the values
of ; and some
making true does the
same. Let
agree with on the
atoms of
and with on every
other atom. By Lemma 4.4.1,
makes true, so it makes
true, since
. Now agrees with on every atom of : on the shared atoms
both give the values of , and the other atoms of
are not atoms
of . By Lemma 4.4.1,
makes true.
Marking scheme. (12 points)
- 1: (a).
- 2: the definition of from the good
rows, with its existence (satisfiable ).
- 2: .
- 5: , with the glued row and both uses of Lemma 4.4.1.
- 2: (c).
Fatal errors (0 for the step): a with an atom of
alone; a
glued row that is not shown to agree with on every atom of .