advertisement

CSE 463/563, Spring 2003 http://www.cse.buffalo.edu/∼rapaport/563.html CLAUSE FORM Notation: X → Y for: Rewrite all occurrences of X as Y . Algorithm Clause-Form; Input A wff α of FOL (or propositional logic); Output A logically equivalent formula in clause form; begin 1. Convert α to a logically equivalent formula in Prenex Normal Form: (a) (α ≡ β) → ((α ⊃ β) ∧ (β ⊃ α)) (b) (α ⊃ β) → (¬α ∨ β) (c) repeat: i. ¬¬α → α ii. ¬(α ∧ β) → (¬α ∨ ¬β) iii. ¬(α ∨ β) → (¬α ∧ ¬β) iv. ¬∃x[α] → ∀x[¬α] v. ¬∀x[α] → ∃x[¬α] until ‘¬’ only applies to atomic wffs; (d) begin optional section: i. (α ∨ α) → α ii. (α ∧ α) → α end optional section; (e) Rename variables such that variables bound by different quantifiers have unique names (f) Move all quantifiers to the left, without changing their order 2. Convert PNF(α) to Skolem Normal Form: repeat: (a) ∀x1 . . . ∀xn ∃y[α(y)] → ∀x1 . . . ∀xn [α( f (x1 . . . xn ))] // f is a new Skolem function (b) ∃y[α(y)] → α(c) // c is a new Skolem constant until all existential quantifiers are eliminated 3. Convert SNF(α) to Conjunctive Normal Form: (a) ∀x[α(x)] → α(x) (b) repeat: i. (α ∨ (β ∧ γ)) → ((α ∨ β) ∧ (α ∨ γ)) ii. begin optional section: A. (α ∨ α) → α B. (α ∧ α) → α end optional section; until the formula is a conjunction of disjunctions of literals 4. (optionally:) Convert CNF(α) to Clause Form: (a) (α ∨ β) → αβ (or: [α, β]) // αβ (or: [α, β]) is a “clause” (b) (α ∧ β) → {α, β} // these are sets of clauses (c) Rename variables again such that each clause has different variables end. c 2003, William J. Rapaport rapaport@cse.buffalo.edu http://www.cse.buffalo.edu/∼rapaport/563/clause-form.2003.03.25.pdf 1