ProofComplete

Propositional Logic - Key Proof

Proof

Theorem: Every propositional formula is logically equivalent to a formula in conjunctive normal form (CNF).

We prove this constructively by providing an algorithm to convert any formula to CNF.

Step 1: Eliminate implication and biconditional

Replace every occurrence of ϕψ\phi \to \psi with ¬ϕψ\neg \phi \lor \psi, and every occurrence of ϕψ\phi \leftrightarrow \psi with (¬ϕψ)(ϕ¬ψ)(\neg \phi \lor \psi) \land (\phi \lor \neg \psi). These replacements are justified by logical equivalence. After this step, the formula contains only ¬\neg, \land, and \lor.

Step 2: Push negations inward (De Morgan's Laws)

Repeatedly apply the following equivalences until all negations apply directly to propositional variables:

  • ¬¬ϕϕ\neg \neg \phi \equiv \phi (double negation)
  • ¬(ϕψ)¬ϕ¬ψ\neg(\phi \land \psi) \equiv \neg \phi \lor \neg \psi (De Morgan)
  • ¬(ϕψ)¬ϕ¬ψ\neg(\phi \lor \psi) \equiv \neg \phi \land \neg \psi (De Morgan)

After this step, the formula is in negation normal form (NNF): only variables are negated, and the formula uses only \land and \lor (besides negations of variables).

Step 3: Distribute disjunction over conjunction

Repeatedly apply the distributive law:

ϕ(ψχ)(ϕψ)(ϕχ)\phi \lor (\psi \land \chi) \equiv (\phi \lor \psi) \land (\phi \lor \chi)

and its symmetric version:

(ψχ)ϕ(ψϕ)(χϕ)(\psi \land \chi) \lor \phi \equiv (\psi \lor \phi) \land (\chi \lor \phi)

This moves all conjunctions to the outermost level and all disjunctions inside.

Step 4: Simplification (optional)

Remove redundant clauses and literals using:

  • ϕϕϕ\phi \land \phi \equiv \phi (idempotency)
  • ϕϕϕ\phi \lor \phi \equiv \phi (idempotency)
  • ϕ¬ϕ\phi \lor \neg \phi \equiv \top (excluded middle)
  • If a clause contains both pp and ¬p\neg p, it can be removed (tautological clause)

Example: Convert ϕ=¬((pq)¬r)\phi = \neg((p \to q) \land \neg r) to CNF.

  1. Eliminate implication: ¬((¬pq)¬r)\neg((\neg p \lor q) \land \neg r)
  2. Apply De Morgan: ¬(¬pq)¬¬r\neg(\neg p \lor q) \lor \neg \neg r
  3. Apply De Morgan and double negation: (p¬q)r(p \land \neg q) \lor r
  4. Distribute: (pr)(¬qr)(p \lor r) \land (\neg q \lor r)

The result is in CNF.

Correctness: Each transformation preserves logical equivalence, so the final CNF formula is equivalent to the original. The algorithm terminates because each step either reduces the formula size (eliminating connectives) or moves the structure closer to CNF without increasing formula depth beyond a bounded limit.

Complexity: The CNF conversion can exponentially increase formula size in the worst case. For example, a formula with structure (a1b1)(a2b2)(anbn)(a_1 \lor b_1) \land (a_2 \lor b_2) \land \cdots \land (a_n \lor b_n) is already in CNF, but its "dual" formed by swapping \land and \lor requires 2n2^n clauses when converted to CNF.

Remark

Despite the exponential worst case, CNF conversion is fundamental to automated reasoning. The SAT problem (satisfiability of CNF formulas) is central to computational complexity, and many practical SAT solvers work directly with CNF input. Alternative approaches like Tseitin transformation can convert to CNF in linear time by introducing auxiliary variables, trading formula size for additional variables.