22.01.2014 Views

Metatheory - University of Cambridge

Metatheory - University of Cambridge

Metatheory - University of Cambridge

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3. Normal forms 27<br />

3.4 Cleaning up DNF sentences<br />

I have <strong>of</strong>fered two different pro<strong>of</strong>s <strong>of</strong> the DNF Theorem. They also described<br />

two different algorithms for putting sentences into DNF. But these algorithms<br />

do not always leave you with the most elegant output. Indeed, just as we can<br />

‘clean up’ the output <strong>of</strong> the algorithm for calculating interpolants (see §2.2), we<br />

can ‘clean up’ the output <strong>of</strong> our algorithms for calculating DNF-equivalents.<br />

Here are the clean-up rules; I leave it as an exercise to justify them. First,<br />

we rewrite our DNF sentence using the relaxed notational conventions <strong>of</strong> fx C.<br />

Now:<br />

Rule 1: remove repetitious conjuncts. If any disjunct contains the same conjunct<br />

more than once, remove all but one instance <strong>of</strong> that conjunct (respecting<br />

bracketing conventions as appropriate).<br />

Rule 2: remove overly-specific disjuncts. Delete any disjunct which entails any<br />

other disjunct. (If two or more disjuncts entail each other, delete all but the<br />

first <strong>of</strong> those disjuncts.)<br />

Example: the output <strong>of</strong> our example in §3.3 was:<br />

(A ∧ B) ∨ (A ∧ ¬C) ∨ (¬D ∧ D) ∨ (¬E ∧ D) ∨ (¬D ∧ E) ∨ (¬E ∧ E)<br />

Noting that a contradiction entails everything, we should remove both contradictory<br />

disjuncts, obtaining (still with relaxed conventions):<br />

(A ∧ B) ∨ (A ∧ ¬C) ∨ (¬E ∧ D) ∨ (¬D ∧ E)<br />

Rule 3: invoke excluded middle. Suppose there is a disjunct whose conjuncts<br />

are just A 1 , . . . , A m and B (in any order), and another disjunct whose conjuncts<br />

are just A 1 , . . . , A m and ¬B (in any order), so that the two disjuncts disagree<br />

only on whether whether B should be prefixed with a negation. In that case,<br />

delete both disjuncts and replace them with the simpler disjunct (A 1 ∧. . .∧A m ).<br />

(However, if we have just B and ¬B as disjuncts, then delete the entire sentence<br />

and leave the tautology (B ∨ ¬B).)<br />

Example: the output <strong>of</strong> the example in §3.2 was:<br />

(A ∧ B ∧ C) ∨ (A ∧ ¬B ∧ C) ∨ (¬A ∧ ¬B ∧ C) ∨ (¬A ∧ ¬B ∧ ¬C)<br />

which can be simplified to:<br />

(A ∧ C) ∨ (¬A ∧ ¬B)<br />

3.5 Conjunctive Normal Form<br />

So far in this chapter, I have discussed disjunctive normal form. Given the<br />

duality <strong>of</strong> disjunction and conjunction (see §2.3), it may not come as a surprise<br />

to hear that there is also such a thing as conjunctive normal form (CNF).<br />

The definition <strong>of</strong> CNF is exactly analogous to the definition <strong>of</strong> DNF. So, a<br />

sentence is in CNF iff it meets all <strong>of</strong> the following conditions:<br />

(cnf1) No connectives occur in the sentence other than negations, conjunctions<br />

and disjunctions;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!