In mathematical logic, a formula is in negation normal form (NNF) if the negation operator ( ¬ {\displaystyle \lnot } , not) is only applied to variables and the only other allowed Boolean operators are conjunction ( ∧ {\displaystyle \land } , and) and disjunction ( ∨ {\displaystyle \lor } , or). Negation normal form is not a canonical form: for example, a ∧ ( b ∨ ¬ c ) {\displaystyle a\land (b\lor \lnot c)} and ( a ∧ b ) ∨ ( a ∧ ¬ c ) {\displaystyle (a\land b)\lor (a\land \lnot c)} are equivalent, and are both in negation normal form.
Definition The following is a context-free grammar for NNF:
where Variable is any variable.
Examples and counterexamples
The following formulae are all in negation normal form:
( ( A ∨ B ) ∧ C ) ( A ∨ ¬ B ) ( A ∧ ¬ B ) ( ( A ∧ ( ¬ B ∨ C ) ) ∧ ¬ C ) {\displaystyle {\begin{aligned}&((A\lor B)\land C)\\&(A\lor \lnot B)\\&(A\land \lnot B)\\&((A\land (\lnot B\lor C))\land \lnot C)\end{aligned}}}
The first example is also in conjunctive normal form, the next two are in both conjunctive normal form and disjunctive normal form, but the last example is in neither. The following formulae are not in negation normal form:
( A → B ) ¬ ( A ∨ B ) ¬ ( A ∧ B ) ¬ ( A ∨ ¬ C ) {\displaystyle {\begin{aligned}(A&\to B)\\\lnot (A&\lor B)\\\lnot (A&\land B)\\\lnot (A&\lor \lnot C)\end{aligned}}}
They are however respectively equivalent to the following formulae in negation normal form:
( ¬ A ∨ B ) ( ¬ A ∧ ¬ B ) ( ¬ A ∨ ¬ B ) ( ¬ A ∧ C ) {\displaystyle {\begin{aligned}(\lnot A&\lor B)\\(\lnot A&\land \lnot B)\\(\lnot A&\lor \lnot B)\\(\lnot A&\land C)\end{aligned}}}
Conversion to NNF In classical logic and many modal logics, every formula can be brought into this form by replacing implications ( → {\displaystyle \to } ) and equivalences ( ↔ {\displaystyle \leftrightarrow } ) by their definitions, using De Morgan's laws to push negation inwards, and eliminating double negations. This process can be represented using the following rewrite rules:
… excerpt ends here. Continue reading the full article.
