Logic for Computer Scientists/Propositional Logic/Equivalence and Normal Forms
From Wikibooks, the open-content textbooks collection
Contents |
[edit] Equivalence and Normal Forms
Until now, we only discussed single formulae and their semantical properties. In this section we start investigating whether formulae can be transformed into another form, without changing their semantics. For this we introduce the concept of logical equivalence, which can be used to investigate the transformation of a given formula into its normal form.
[edit] Definition 6
The formulae F and G are called (semantically) equivalent, iff for all assignments
for F and G,
. We write
.
Formulae containing different subformulae can be equivalent, e.g. all tautologies are equivalent. More interesting is the following theorem:
[edit] Theorem 3 (Substituitivity)
Let
and H a formula which contains at least one occurrence of the subformula F. Then it holds
, where H' is obtained from H by substituting any occurrence of F by G.
Proof: The proof is by induction over the structure of the subformula H:
Assume for the induction start, that H is atomic, hence H = F holds, and the result of substituting the only occurrence of F by G results in H' = G and because
, we have
. Assume the theorem holds for all proper subformulae of H: If F = H we have the same argumentation as above in the start of the induction. If
we have three cases:
: Because h1 is a subformula of H we can conclude that
, where h1' is constructed by substituting any occurrence of F by G. From the definition of the semantics of
we conclude that
and hence
. Where H_1 is equivalent formula constructed by replacing F in H by G, resulting in H_1
: Assume without loss of generality, that F occurs in h1. Then, again we can conclude from the induction assumption, that
and from the definition of the semantics of
we conclude, that
.
is similar.
[edit] Theorem 4
The following equivalences hold:
F
F (Idempotence)

(Commutativity)

(Associativity)
F
F (Absorption)

(Distributivity)
F (Double negation)

(deMorgan's rule)
F, if F is a tautology
G, if F is a tautology (Rule of Tautology)
G, if F is unsatisfiable
F, if F is unsatisfiable (Rule of Unsatisfiability)
Proof: All equivalences can be proved by truth tables. This is done here for the second rule of absorption:
| F | G | ( ) |
( )) |
|---|---|---|---|
| false | false |
|
|
| false | true |
|
|
| true | false |
|
|
| true | true |
|
|
Let us now use these equivalences together with the theorem of substituitivity (TS) to prove the following equivalence:

Associativity and TS
Commutativity and TS
Distributivity
Commutativity and TS
Distributivity and TS
Unsatisfiability and TS
Commutativity and TS
Commutativity and TS
[edit] Problems
[edit] Problem 9 (Propositional)
The binary junctor
for exclusive disjunction is defined by
. Show that the following holds for propositional logic formulae F, G and H:
\hfill (Commutativity).
(Associativity)

[edit] Problem 10 (Propositional)
Show the following by equivalence transformation. Give to all remodelling steps the used rules!

[edit] Problem 11 (Propositional)
Prove with equivalences:
is a tautology.
is unsatisfiable.

[edit] Problem 12 (Propositional)
The binary junctor
with the meaning neither-nor is defined by
. Let F be a propositional logic formula, which contains only the operators
and
. Prove that for every formula F a formula
exists, such that
and
is built by using only the junctor
.

[edit] Problem 13 (Propositional)
Let F be a propositional logic formula, which contains only the operators
,
and
. Prove that for every formula F a formula
exists, such that
and
is built by using only the junctors
and
.

[edit] Problem 14 (Propositional)
The following formulae are given:
- Simplify
by using
. - Simplify
by using equivalences but not
.

[edit] Definition 7 (Normal Forms)
A literal is an atomic formula or the negation of an atomic formula (positive or negative, resp.) A formula F is in conjunctive normalform (CNF) iff

where Lij is a literal.
A formula F is in disjunctive normalform (DNF) iff

where Lij is a literal
[edit] Theorem 5
For every formula F there is an equivalent formula which is in DNF and an equivalent formula which is in CNF.
Let us formulate an algorithm to transform a given formula F into an equivalent normalform:
Given: A formula F
1. Substitute in F every subformula of the form
until there is no subformula of this kind.
2. Substitute in the result from the above step every subformula of the form
until there is no subformula of this kind.
Result: An equivalent formula in CNF
Until now, we investigate the transformation of a propositional formula into an equivalent normal form. Another problem in the context of normal forms is, to construct a normal form formula from a given truth table; i.e. the formula itself is not known, but its behaviour is given by a truth table. Let's read a normalform formula from a truth table: Assume a formula F, which is given by the following truthtable.
| A | B | C | F |
|---|---|---|---|
| false | false | false | true |
| false | false | true | false |
| false | true | false | false |
| false | true | true | false |
| true | false | false | true |
| true | false | true | true |
| true | true | false | false |
| true | true | true | false |
In order to construct a formula in DNF, which is equivalent to F, we have to take into account, that every line of the table which yields the truthvalue true gives one conjunction: if the assignment of the literal Ai is true it is included as
, if is false we include
. For the above example we get as a DNF:



If we change in the above procedure the roles of true and false and
and
we arrive at a CNF:





We introduce a special representation for formulae in normalform. In our circuit-example (circuit) from the introduction we already used a very special form of normalforms, namely the implication form for formulae in CNF: every subformula Fi of a conjunction
is written as:

It is easy to see, that this implication is logically equivalent to a disjunction
. Sometimes the implication is written as

Even the following ambiguous notation is used in some cases, where the comma in the premiss stands for a conjunction and the comma in the conclusion for a disjunction:

For some important procedures for logical reasoning it is mandatory to represent the formulae not only in one of the above notations for a normalform, moreover, it is necessary to use the so-called clause-form from the following definition.
[edit] Definition 8
If F is a formula in CNF, i.e.

then its corresponding representation in clause form is given as

The sets
are called clauses.
This representation as sets of literals has the advantage that literals occur in no special order and that multiple occurrences of a literal in a disjunction are "merged" in its clause form. Note that as a consequence we have built in associativity, commutativity and Idempotence into the representation.

[edit] Problems
[edit] Problem 15 (Propositional)
Create formulae in (a) conjunctive or (b) disjuncive normal form which are equivalent to:

where
denotes exclusive or.

[edit] Problem 16 (Propositional)
The theorem prover OTTER uses the following optimization rules for clause sets:
Subsumption: If the literals of a clause K are a subset of an another clause K' remove K' from the set of clauses.
Deleting by unit clause: If the set of clauses contains a unit clause L -here L is single literal unit-clause- every occurrence of a complementary literal
in a clause is deleted.
Which laws of the logic justify these procedures?

[edit] Problem 17 (Propositional)
Generate truth tables for the following formulae. Give the conjunctive and disjunctive normal forms of the formulae. Which one of the relations
,
,
and F = G holds?
whereas
applies.

[edit] Problem 18 (Propositional)
Generate a CNF and a DNF form the following truth table for the formula F.
| A | B | C | F |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 |
| 0 | 1 | 0 | 0 |
| 1 | 0 | 0 | 1 |
| 1 | 1 | 0 | 1 |
| 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 1 | 1 | 0 |

[edit] Problem 19 (Propositional)
Generate a CNF from the formula 

)
))













