Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and...

115
Goranko Logic as a Tool Chapter 4: Deductive Reasoning in First-Order Logic 4.4 Prenex normal form. Skolemization. Clausal form. Valentin Goranko Stockholm University October 2016

Transcript of Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and...

Page 1: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Logic as a Tool

Chapter 4: Deductive Reasoning in First-Order Logic4.4 Prenex normal form.

Skolemization. Clausal form.

Valentin GorankoStockholm University

October 2016

Page 2: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Revision: CNF and DNF of propositional formulae

• A literal is a propositional variable or its negation.

• An elementary disjunction is a disjunction of literals.An elementary conjunction is a conjunction of literals.

• A disjunctive normal form (DNF) is a disjunction of elementaryconjunctions.

• A conjunctive normal form (CNF) is a conjunction of elementarydisjunctions.

Page 3: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Revision: CNF and DNF of propositional formulae

• A literal is a propositional variable or its negation.

• An elementary disjunction is a disjunction of literals.An elementary conjunction is a conjunction of literals.

• A disjunctive normal form (DNF) is a disjunction of elementaryconjunctions.

• A conjunctive normal form (CNF) is a conjunction of elementarydisjunctions.

Page 4: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Revision: CNF and DNF of propositional formulae

• A literal is a propositional variable or its negation.

• An elementary disjunction is a disjunction of literals.An elementary conjunction is a conjunction of literals.

• A disjunctive normal form (DNF) is a disjunction of elementaryconjunctions.

• A conjunctive normal form (CNF) is a conjunction of elementarydisjunctions.

Page 5: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Revision: CNF and DNF of propositional formulae

• A literal is a propositional variable or its negation.

• An elementary disjunction is a disjunction of literals.An elementary conjunction is a conjunction of literals.

• A disjunctive normal form (DNF) is a disjunction of elementaryconjunctions.

• A conjunctive normal form (CNF) is a conjunction of elementarydisjunctions.

Page 6: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Revision: CNF and DNF of propositional formulae

• A literal is a propositional variable or its negation.

• An elementary disjunction is a disjunction of literals.An elementary conjunction is a conjunction of literals.

• A disjunctive normal form (DNF) is a disjunction of elementaryconjunctions.

• A conjunctive normal form (CNF) is a conjunction of elementarydisjunctions.

Page 7: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Conjunctive and disjunctive normal formsof first-order formulae

An open first-order formula is in disjunctive normal form (resp.,conjunctive normal form) if it is a first-order instance of a propositionalformula in DNF (resp. CNF), obtained by uniform substitution of atomicformulae for propositional variables.

Examples:(¬P(x) ∨ Q(x , y)) ∧ (P(x) ∨ ¬R(y))

is in CNF, as it is a first-order instance of (¬p ∨ q) ∧ (p ∨ ¬r);

(P(x) ∧ Q(x , y) ∧ R(y)) ∨ ¬P(x)

is in DNF, as it is a first-order instance of (¬p ∧ q ∧ r) ∨ ¬p.

∀xP(x) ∨ Q(x , y)

and¬P(x) ∨ (Q(x , y) ∧ R(y)) ∧ ¬R(y)

are not in either CNF or DNF.

Page 8: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Conjunctive and disjunctive normal formsof first-order formulae

An open first-order formula is in disjunctive normal form (resp.,conjunctive normal form) if it is a first-order instance of a propositionalformula in DNF (resp. CNF), obtained by uniform substitution of atomicformulae for propositional variables.

Examples:(¬P(x) ∨ Q(x , y)) ∧ (P(x) ∨ ¬R(y))

is in CNF, as it is a first-order instance of (¬p ∨ q) ∧ (p ∨ ¬r);

(P(x) ∧ Q(x , y) ∧ R(y)) ∨ ¬P(x)

is in DNF, as it is a first-order instance of (¬p ∧ q ∧ r) ∨ ¬p.

∀xP(x) ∨ Q(x , y)

and¬P(x) ∨ (Q(x , y) ∧ R(y)) ∧ ¬R(y)

are not in either CNF or DNF.

Page 9: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Conjunctive and disjunctive normal formsof first-order formulae

An open first-order formula is in disjunctive normal form (resp.,conjunctive normal form) if it is a first-order instance of a propositionalformula in DNF (resp. CNF), obtained by uniform substitution of atomicformulae for propositional variables.

Examples:

(¬P(x) ∨ Q(x , y)) ∧ (P(x) ∨ ¬R(y))

is in CNF, as it is a first-order instance of (¬p ∨ q) ∧ (p ∨ ¬r);

(P(x) ∧ Q(x , y) ∧ R(y)) ∨ ¬P(x)

is in DNF, as it is a first-order instance of (¬p ∧ q ∧ r) ∨ ¬p.

∀xP(x) ∨ Q(x , y)

and¬P(x) ∨ (Q(x , y) ∧ R(y)) ∧ ¬R(y)

are not in either CNF or DNF.

Page 10: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Conjunctive and disjunctive normal formsof first-order formulae

An open first-order formula is in disjunctive normal form (resp.,conjunctive normal form) if it is a first-order instance of a propositionalformula in DNF (resp. CNF), obtained by uniform substitution of atomicformulae for propositional variables.

Examples:(¬P(x) ∨ Q(x , y)) ∧ (P(x) ∨ ¬R(y))

is in CNF, as it is a first-order instance of (¬p ∨ q) ∧ (p ∨ ¬r);

(P(x) ∧ Q(x , y) ∧ R(y)) ∨ ¬P(x)

is in DNF, as it is a first-order instance of (¬p ∧ q ∧ r) ∨ ¬p.

∀xP(x) ∨ Q(x , y)

and¬P(x) ∨ (Q(x , y) ∧ R(y)) ∧ ¬R(y)

are not in either CNF or DNF.

Page 11: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Conjunctive and disjunctive normal formsof first-order formulae

An open first-order formula is in disjunctive normal form (resp.,conjunctive normal form) if it is a first-order instance of a propositionalformula in DNF (resp. CNF), obtained by uniform substitution of atomicformulae for propositional variables.

Examples:(¬P(x) ∨ Q(x , y)) ∧ (P(x) ∨ ¬R(y))

is in CNF, as it is a first-order instance of (¬p ∨ q) ∧ (p ∨ ¬r);

(P(x) ∧ Q(x , y) ∧ R(y)) ∨ ¬P(x)

is in DNF, as it is a first-order instance of (¬p ∧ q ∧ r) ∨ ¬p.

∀xP(x) ∨ Q(x , y)

and¬P(x) ∨ (Q(x , y) ∧ R(y)) ∧ ¬R(y)

are not in either CNF or DNF.

Page 12: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Conjunctive and disjunctive normal formsof first-order formulae

An open first-order formula is in disjunctive normal form (resp.,conjunctive normal form) if it is a first-order instance of a propositionalformula in DNF (resp. CNF), obtained by uniform substitution of atomicformulae for propositional variables.

Examples:(¬P(x) ∨ Q(x , y)) ∧ (P(x) ∨ ¬R(y))

is in CNF, as it is a first-order instance of (¬p ∨ q) ∧ (p ∨ ¬r);

(P(x) ∧ Q(x , y) ∧ R(y)) ∨ ¬P(x)

is in DNF, as it is a first-order instance of (¬p ∧ q ∧ r) ∨ ¬p.

∀xP(x) ∨ Q(x , y)

and¬P(x) ∨ (Q(x , y) ∧ R(y)) ∧ ¬R(y)

are not in either CNF or DNF.

Page 13: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Conjunctive and disjunctive normal formsof first-order formulae

An open first-order formula is in disjunctive normal form (resp.,conjunctive normal form) if it is a first-order instance of a propositionalformula in DNF (resp. CNF), obtained by uniform substitution of atomicformulae for propositional variables.

Examples:(¬P(x) ∨ Q(x , y)) ∧ (P(x) ∨ ¬R(y))

is in CNF, as it is a first-order instance of (¬p ∨ q) ∧ (p ∨ ¬r);

(P(x) ∧ Q(x , y) ∧ R(y)) ∨ ¬P(x)

is in DNF, as it is a first-order instance of (¬p ∧ q ∧ r) ∨ ¬p.

∀xP(x) ∨ Q(x , y)

and¬P(x) ∨ (Q(x , y) ∧ R(y)) ∧ ¬R(y)

are not in either CNF or DNF.

Page 14: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Conjunctive and disjunctive normal formsof first-order formulae

An open first-order formula is in disjunctive normal form (resp.,conjunctive normal form) if it is a first-order instance of a propositionalformula in DNF (resp. CNF), obtained by uniform substitution of atomicformulae for propositional variables.

Examples:(¬P(x) ∨ Q(x , y)) ∧ (P(x) ∨ ¬R(y))

is in CNF, as it is a first-order instance of (¬p ∨ q) ∧ (p ∨ ¬r);

(P(x) ∧ Q(x , y) ∧ R(y)) ∨ ¬P(x)

is in DNF, as it is a first-order instance of (¬p ∧ q ∧ r) ∨ ¬p.

∀xP(x) ∨ Q(x , y)

and¬P(x) ∨ (Q(x , y) ∧ R(y)) ∧ ¬R(y)

are not in either CNF or DNF.

Page 15: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Prenex normal forms

A first-order formula Q1x1...QnxnA, where Q1, ...,Qn are quantifiers andA is an open formula, is in a prenex form.

The quantifier string Q1x1...Qnxn is called the prefix,and the formula A is the matrix of the prenex form.

Examples:

∀x∃y(x > 0→ (y > 0 ∧ x = y2))

is in prenex form, while

∃x(x = 0) ∧ ∃y(y < 0)

and∀x(x > 0 ∨ ∃y(y > 0 ∧ x = y2))

are not in prenex form.

Page 16: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Prenex normal forms

A first-order formula Q1x1...QnxnA, where Q1, ...,Qn are quantifiers andA is an open formula, is in a prenex form.

The quantifier string Q1x1...Qnxn is called the prefix,and the formula A is the matrix of the prenex form.

Examples:

∀x∃y(x > 0→ (y > 0 ∧ x = y2))

is in prenex form, while

∃x(x = 0) ∧ ∃y(y < 0)

and∀x(x > 0 ∨ ∃y(y > 0 ∧ x = y2))

are not in prenex form.

Page 17: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Prenex normal forms

A first-order formula Q1x1...QnxnA, where Q1, ...,Qn are quantifiers andA is an open formula, is in a prenex form.

The quantifier string Q1x1...Qnxn is called the prefix,and the formula A is the matrix of the prenex form.

Examples:

∀x∃y(x > 0→ (y > 0 ∧ x = y2))

is in prenex form, while

∃x(x = 0) ∧ ∃y(y < 0)

and∀x(x > 0 ∨ ∃y(y > 0 ∧ x = y2))

are not in prenex form.

Page 18: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Prenex normal forms

A first-order formula Q1x1...QnxnA, where Q1, ...,Qn are quantifiers andA is an open formula, is in a prenex form.

The quantifier string Q1x1...Qnxn is called the prefix,and the formula A is the matrix of the prenex form.

Examples:

∀x∃y(x > 0→ (y > 0 ∧ x = y2))

is in prenex form, while

∃x(x = 0) ∧ ∃y(y < 0)

and∀x(x > 0 ∨ ∃y(y > 0 ∧ x = y2))

are not in prenex form.

Page 19: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Prenex normal forms

A first-order formula Q1x1...QnxnA, where Q1, ...,Qn are quantifiers andA is an open formula, is in a prenex form.

The quantifier string Q1x1...Qnxn is called the prefix,and the formula A is the matrix of the prenex form.

Examples:

∀x∃y(x > 0→ (y > 0 ∧ x = y2))

is in prenex form, while

∃x(x = 0) ∧ ∃y(y < 0)

and∀x(x > 0 ∨ ∃y(y > 0 ∧ x = y2))

are not in prenex form.

Page 20: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Prenex normal forms

A first-order formula Q1x1...QnxnA, where Q1, ...,Qn are quantifiers andA is an open formula, is in a prenex form.

The quantifier string Q1x1...Qnxn is called the prefix,and the formula A is the matrix of the prenex form.

Examples:

∀x∃y(x > 0→ (y > 0 ∧ x = y2))

is in prenex form, while

∃x(x = 0) ∧ ∃y(y < 0)

and∀x(x > 0 ∨ ∃y(y > 0 ∧ x = y2))

are not in prenex form.

Page 21: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Prenex normal forms

A first-order formula Q1x1...QnxnA, where Q1, ...,Qn are quantifiers andA is an open formula, is in a prenex form.

The quantifier string Q1x1...Qnxn is called the prefix,and the formula A is the matrix of the prenex form.

Examples:

∀x∃y(x > 0→ (y > 0 ∧ x = y2))

is in prenex form, while

∃x(x = 0) ∧ ∃y(y < 0)

and∀x(x > 0 ∨ ∃y(y > 0 ∧ x = y2))

are not in prenex form.

Page 22: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Prenex normal forms

A first-order formula Q1x1...QnxnA, where Q1, ...,Qn are quantifiers andA is an open formula, is in a prenex form.

The quantifier string Q1x1...Qnxn is called the prefix,and the formula A is the matrix of the prenex form.

Examples:

∀x∃y(x > 0→ (y > 0 ∧ x = y2))

is in prenex form, while

∃x(x = 0) ∧ ∃y(y < 0)

and∀x(x > 0 ∨ ∃y(y > 0 ∧ x = y2))

are not in prenex form.

Page 23: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Prenex conjunctive and disjunctive normal forms

If A is in DNF then Q1x1...QnxnA is in prenex disjunctive normal form(PDNF); if A is in CNF then Q1x1...QnxnA is in prenex conjunctivenormal form (PCNF).

Examples:∀x∃y(¬x > 0 ∨ y > 0)

is both in PDNF and in PCNF.

∀x∃y(¬x > 0 ∨ (y > 0 ∧ ¬x = y2))

is in PDNF, but not in PCNF.

∀x∀y(¬P(x) ∨ (Q(x , y) ∧ R(y)) ∧ ¬R(y))

is neither in PCNF nor in PDNF.

Page 24: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Prenex conjunctive and disjunctive normal forms

If A is in DNF then Q1x1...QnxnA is in prenex disjunctive normal form(PDNF); if A is in CNF then Q1x1...QnxnA is in prenex conjunctivenormal form (PCNF).

Examples:∀x∃y(¬x > 0 ∨ y > 0)

is both in PDNF and in PCNF.

∀x∃y(¬x > 0 ∨ (y > 0 ∧ ¬x = y2))

is in PDNF, but not in PCNF.

∀x∀y(¬P(x) ∨ (Q(x , y) ∧ R(y)) ∧ ¬R(y))

is neither in PCNF nor in PDNF.

Page 25: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Prenex conjunctive and disjunctive normal forms

If A is in DNF then Q1x1...QnxnA is in prenex disjunctive normal form(PDNF); if A is in CNF then Q1x1...QnxnA is in prenex conjunctivenormal form (PCNF).

Examples:

∀x∃y(¬x > 0 ∨ y > 0)

is both in PDNF and in PCNF.

∀x∃y(¬x > 0 ∨ (y > 0 ∧ ¬x = y2))

is in PDNF, but not in PCNF.

∀x∀y(¬P(x) ∨ (Q(x , y) ∧ R(y)) ∧ ¬R(y))

is neither in PCNF nor in PDNF.

Page 26: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Prenex conjunctive and disjunctive normal forms

If A is in DNF then Q1x1...QnxnA is in prenex disjunctive normal form(PDNF); if A is in CNF then Q1x1...QnxnA is in prenex conjunctivenormal form (PCNF).

Examples:∀x∃y(¬x > 0 ∨ y > 0)

is both in PDNF and in PCNF.

∀x∃y(¬x > 0 ∨ (y > 0 ∧ ¬x = y2))

is in PDNF, but not in PCNF.

∀x∀y(¬P(x) ∨ (Q(x , y) ∧ R(y)) ∧ ¬R(y))

is neither in PCNF nor in PDNF.

Page 27: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Prenex conjunctive and disjunctive normal forms

If A is in DNF then Q1x1...QnxnA is in prenex disjunctive normal form(PDNF); if A is in CNF then Q1x1...QnxnA is in prenex conjunctivenormal form (PCNF).

Examples:∀x∃y(¬x > 0 ∨ y > 0)

is both in PDNF and in PCNF.

∀x∃y(¬x > 0 ∨ (y > 0 ∧ ¬x = y2))

is in PDNF, but not in PCNF.

∀x∀y(¬P(x) ∨ (Q(x , y) ∧ R(y)) ∧ ¬R(y))

is neither in PCNF nor in PDNF.

Page 28: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Prenex conjunctive and disjunctive normal forms

If A is in DNF then Q1x1...QnxnA is in prenex disjunctive normal form(PDNF); if A is in CNF then Q1x1...QnxnA is in prenex conjunctivenormal form (PCNF).

Examples:∀x∃y(¬x > 0 ∨ y > 0)

is both in PDNF and in PCNF.

∀x∃y(¬x > 0 ∨ (y > 0 ∧ ¬x = y2))

is in PDNF, but not in PCNF.

∀x∀y(¬P(x) ∨ (Q(x , y) ∧ R(y)) ∧ ¬R(y))

is neither in PCNF nor in PDNF.

Page 29: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms

THEOREM: Every first-order formula is equivalent to a formula in aprenex disjunctive normal form (PDNF) and to a formula in a prenexconjunctive normal form (PCNF).

Here is an algorithmic procedure:

1. Eliminate all occurrences of → and ↔.

2. Import all negations inside all other logical connectives.

3. Use the equivalences:

(a) ∀xP ∧ ∀xQ ≡ ∀x(P ∧ Q),

(b) ∃xP ∨ ∃xQ ≡ ∃x(P ∨ Q),

to pull some quantifiers outwards and, after renaming one of the boundvariables if necessary.

Page 30: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms

THEOREM: Every first-order formula is equivalent to a formula in aprenex disjunctive normal form (PDNF) and to a formula in a prenexconjunctive normal form (PCNF).

Here is an algorithmic procedure:

1. Eliminate all occurrences of → and ↔.

2. Import all negations inside all other logical connectives.

3. Use the equivalences:

(a) ∀xP ∧ ∀xQ ≡ ∀x(P ∧ Q),

(b) ∃xP ∨ ∃xQ ≡ ∃x(P ∨ Q),

to pull some quantifiers outwards and, after renaming one of the boundvariables if necessary.

Page 31: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms

THEOREM: Every first-order formula is equivalent to a formula in aprenex disjunctive normal form (PDNF) and to a formula in a prenexconjunctive normal form (PCNF).

Here is an algorithmic procedure:

1. Eliminate all occurrences of → and ↔.

2. Import all negations inside all other logical connectives.

3. Use the equivalences:

(a) ∀xP ∧ ∀xQ ≡ ∀x(P ∧ Q),

(b) ∃xP ∨ ∃xQ ≡ ∃x(P ∨ Q),

to pull some quantifiers outwards and, after renaming one of the boundvariables if necessary.

Page 32: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms

THEOREM: Every first-order formula is equivalent to a formula in aprenex disjunctive normal form (PDNF) and to a formula in a prenexconjunctive normal form (PCNF).

Here is an algorithmic procedure:

1. Eliminate all occurrences of → and ↔.

2. Import all negations inside all other logical connectives.

3. Use the equivalences:

(a) ∀xP ∧ ∀xQ ≡ ∀x(P ∧ Q),

(b) ∃xP ∨ ∃xQ ≡ ∃x(P ∨ Q),

to pull some quantifiers outwards and, after renaming one of the boundvariables if necessary.

Page 33: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms

THEOREM: Every first-order formula is equivalent to a formula in aprenex disjunctive normal form (PDNF) and to a formula in a prenexconjunctive normal form (PCNF).

Here is an algorithmic procedure:

1. Eliminate all occurrences of → and ↔.

2. Import all negations inside all other logical connectives.

3. Use the equivalences:

(a) ∀xP ∧ ∀xQ ≡ ∀x(P ∧ Q),

(b) ∃xP ∨ ∃xQ ≡ ∃x(P ∨ Q),

to pull some quantifiers outwards and, after renaming one of the boundvariables if necessary.

Page 34: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms

THEOREM: Every first-order formula is equivalent to a formula in aprenex disjunctive normal form (PDNF) and to a formula in a prenexconjunctive normal form (PCNF).

Here is an algorithmic procedure:

1. Eliminate all occurrences of → and ↔.

2. Import all negations inside all other logical connectives.

3. Use the equivalences:

(a) ∀xP ∧ ∀xQ ≡ ∀x(P ∧ Q),

(b) ∃xP ∨ ∃xQ ≡ ∃x(P ∨ Q),

to pull some quantifiers outwards and, after renaming one of the boundvariables if necessary.

Page 35: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms

THEOREM: Every first-order formula is equivalent to a formula in aprenex disjunctive normal form (PDNF) and to a formula in a prenexconjunctive normal form (PCNF).

Here is an algorithmic procedure:

1. Eliminate all occurrences of → and ↔.

2. Import all negations inside all other logical connectives.

3. Use the equivalences:

(a) ∀xP ∧ ∀xQ ≡ ∀x(P ∧ Q),

(b) ∃xP ∨ ∃xQ ≡ ∃x(P ∨ Q),

to pull some quantifiers outwards and, after renaming one of the boundvariables if necessary.

Page 36: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms

THEOREM: Every first-order formula is equivalent to a formula in aprenex disjunctive normal form (PDNF) and to a formula in a prenexconjunctive normal form (PCNF).

Here is an algorithmic procedure:

1. Eliminate all occurrences of → and ↔.

2. Import all negations inside all other logical connectives.

3. Use the equivalences:

(a) ∀xP ∧ ∀xQ ≡ ∀x(P ∧ Q),

(b) ∃xP ∨ ∃xQ ≡ ∃x(P ∨ Q),

to pull some quantifiers outwards and, after renaming one of the boundvariables if necessary.

Page 37: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms cont’d

4. To pull all quantifiers in front of the formula and thus transform it intoa prenex form, use the following equivalences, where x is not free in Q:

(c) ∀xP ∧ Q ≡ Q ∧ ∀xP ≡ ∀x(P ∧ Q),

(d) ∀xP ∨ Q ≡ Q ∨ ∀xP ≡ ∀x(P ∨ Q),

(e) ∃xP ∨ Q ≡ Q ∨ ∃xP ≡ ∃x(P ∨ Q),

(f) ∃xP ∧ Q ≡ Q ∧ ∃xP ≡ ∃x(P ∧ Q),

If necessary, use renaming in order to apply these.

Example: ∀xP(x) ∧ ∃xQ(x) ≡ ∀x(P(x) ∧ ∃xQ(x)) ≡∀x(P(x) ∧ ∃yQ(y)) ≡ ∀x∃y(P(x) ∧ Q(y)).

Better: ∀xP(x) ∧ ∃xQ(x) ≡ ∃x(∀xP(x) ∧ Q(x)) ≡∃x(∀yP(y) ∧ Q(x)) ≡ ∃x∀y(P(y) ∧ Q(x)).

5. Finally, transform the matrix in a DNF or CNF, just like apropositional formula.

Page 38: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms cont’d

4. To pull all quantifiers in front of the formula and thus transform it intoa prenex form, use the following equivalences, where x is not free in Q:

(c) ∀xP ∧ Q ≡ Q ∧ ∀xP ≡ ∀x(P ∧ Q),

(d) ∀xP ∨ Q ≡ Q ∨ ∀xP ≡ ∀x(P ∨ Q),

(e) ∃xP ∨ Q ≡ Q ∨ ∃xP ≡ ∃x(P ∨ Q),

(f) ∃xP ∧ Q ≡ Q ∧ ∃xP ≡ ∃x(P ∧ Q),

If necessary, use renaming in order to apply these.

Example: ∀xP(x) ∧ ∃xQ(x) ≡ ∀x(P(x) ∧ ∃xQ(x)) ≡∀x(P(x) ∧ ∃yQ(y)) ≡ ∀x∃y(P(x) ∧ Q(y)).

Better: ∀xP(x) ∧ ∃xQ(x) ≡ ∃x(∀xP(x) ∧ Q(x)) ≡∃x(∀yP(y) ∧ Q(x)) ≡ ∃x∀y(P(y) ∧ Q(x)).

5. Finally, transform the matrix in a DNF or CNF, just like apropositional formula.

Page 39: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms cont’d

4. To pull all quantifiers in front of the formula and thus transform it intoa prenex form, use the following equivalences, where x is not free in Q:

(c) ∀xP ∧ Q ≡ Q ∧ ∀xP ≡ ∀x(P ∧ Q),

(d) ∀xP ∨ Q ≡ Q ∨ ∀xP ≡ ∀x(P ∨ Q),

(e) ∃xP ∨ Q ≡ Q ∨ ∃xP ≡ ∃x(P ∨ Q),

(f) ∃xP ∧ Q ≡ Q ∧ ∃xP ≡ ∃x(P ∧ Q),

If necessary, use renaming in order to apply these.

Example: ∀xP(x) ∧ ∃xQ(x) ≡ ∀x(P(x) ∧ ∃xQ(x)) ≡∀x(P(x) ∧ ∃yQ(y)) ≡ ∀x∃y(P(x) ∧ Q(y)).

Better: ∀xP(x) ∧ ∃xQ(x) ≡ ∃x(∀xP(x) ∧ Q(x)) ≡∃x(∀yP(y) ∧ Q(x)) ≡ ∃x∀y(P(y) ∧ Q(x)).

5. Finally, transform the matrix in a DNF or CNF, just like apropositional formula.

Page 40: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms cont’d

4. To pull all quantifiers in front of the formula and thus transform it intoa prenex form, use the following equivalences, where x is not free in Q:

(c) ∀xP ∧ Q ≡ Q ∧ ∀xP ≡ ∀x(P ∧ Q),

(d) ∀xP ∨ Q ≡ Q ∨ ∀xP ≡ ∀x(P ∨ Q),

(e) ∃xP ∨ Q ≡ Q ∨ ∃xP ≡ ∃x(P ∨ Q),

(f) ∃xP ∧ Q ≡ Q ∧ ∃xP ≡ ∃x(P ∧ Q),

If necessary, use renaming in order to apply these.

Example: ∀xP(x) ∧ ∃xQ(x) ≡ ∀x(P(x) ∧ ∃xQ(x)) ≡∀x(P(x) ∧ ∃yQ(y)) ≡ ∀x∃y(P(x) ∧ Q(y)).

Better: ∀xP(x) ∧ ∃xQ(x) ≡ ∃x(∀xP(x) ∧ Q(x)) ≡∃x(∀yP(y) ∧ Q(x)) ≡ ∃x∀y(P(y) ∧ Q(x)).

5. Finally, transform the matrix in a DNF or CNF, just like apropositional formula.

Page 41: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms cont’d

4. To pull all quantifiers in front of the formula and thus transform it intoa prenex form, use the following equivalences, where x is not free in Q:

(c) ∀xP ∧ Q ≡ Q ∧ ∀xP ≡ ∀x(P ∧ Q),

(d) ∀xP ∨ Q ≡ Q ∨ ∀xP ≡ ∀x(P ∨ Q),

(e) ∃xP ∨ Q ≡ Q ∨ ∃xP ≡ ∃x(P ∨ Q),

(f) ∃xP ∧ Q ≡ Q ∧ ∃xP ≡ ∃x(P ∧ Q),

If necessary, use renaming in order to apply these.

Example: ∀xP(x) ∧ ∃xQ(x) ≡ ∀x(P(x) ∧ ∃xQ(x)) ≡∀x(P(x) ∧ ∃yQ(y)) ≡ ∀x∃y(P(x) ∧ Q(y)).

Better: ∀xP(x) ∧ ∃xQ(x) ≡ ∃x(∀xP(x) ∧ Q(x)) ≡∃x(∀yP(y) ∧ Q(x)) ≡ ∃x∀y(P(y) ∧ Q(x)).

5. Finally, transform the matrix in a DNF or CNF, just like apropositional formula.

Page 42: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms cont’d

4. To pull all quantifiers in front of the formula and thus transform it intoa prenex form, use the following equivalences, where x is not free in Q:

(c) ∀xP ∧ Q ≡ Q ∧ ∀xP ≡ ∀x(P ∧ Q),

(d) ∀xP ∨ Q ≡ Q ∨ ∀xP ≡ ∀x(P ∨ Q),

(e) ∃xP ∨ Q ≡ Q ∨ ∃xP ≡ ∃x(P ∨ Q),

(f) ∃xP ∧ Q ≡ Q ∧ ∃xP ≡ ∃x(P ∧ Q),

If necessary, use renaming in order to apply these.

Example: ∀xP(x) ∧ ∃xQ(x) ≡ ∀x(P(x) ∧ ∃xQ(x)) ≡∀x(P(x) ∧ ∃yQ(y)) ≡ ∀x∃y(P(x) ∧ Q(y)).

Better: ∀xP(x) ∧ ∃xQ(x) ≡ ∃x(∀xP(x) ∧ Q(x)) ≡∃x(∀yP(y) ∧ Q(x)) ≡ ∃x∀y(P(y) ∧ Q(x)).

5. Finally, transform the matrix in a DNF or CNF, just like apropositional formula.

Page 43: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms cont’d

4. To pull all quantifiers in front of the formula and thus transform it intoa prenex form, use the following equivalences, where x is not free in Q:

(c) ∀xP ∧ Q ≡ Q ∧ ∀xP ≡ ∀x(P ∧ Q),

(d) ∀xP ∨ Q ≡ Q ∨ ∀xP ≡ ∀x(P ∨ Q),

(e) ∃xP ∨ Q ≡ Q ∨ ∃xP ≡ ∃x(P ∨ Q),

(f) ∃xP ∧ Q ≡ Q ∧ ∃xP ≡ ∃x(P ∧ Q),

If necessary, use renaming in order to apply these.

Example: ∀xP(x) ∧ ∃xQ(x)

≡ ∀x(P(x) ∧ ∃xQ(x)) ≡∀x(P(x) ∧ ∃yQ(y)) ≡ ∀x∃y(P(x) ∧ Q(y)).

Better: ∀xP(x) ∧ ∃xQ(x) ≡ ∃x(∀xP(x) ∧ Q(x)) ≡∃x(∀yP(y) ∧ Q(x)) ≡ ∃x∀y(P(y) ∧ Q(x)).

5. Finally, transform the matrix in a DNF or CNF, just like apropositional formula.

Page 44: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms cont’d

4. To pull all quantifiers in front of the formula and thus transform it intoa prenex form, use the following equivalences, where x is not free in Q:

(c) ∀xP ∧ Q ≡ Q ∧ ∀xP ≡ ∀x(P ∧ Q),

(d) ∀xP ∨ Q ≡ Q ∨ ∀xP ≡ ∀x(P ∨ Q),

(e) ∃xP ∨ Q ≡ Q ∨ ∃xP ≡ ∃x(P ∨ Q),

(f) ∃xP ∧ Q ≡ Q ∧ ∃xP ≡ ∃x(P ∧ Q),

If necessary, use renaming in order to apply these.

Example: ∀xP(x) ∧ ∃xQ(x) ≡ ∀x(P(x) ∧ ∃xQ(x))

≡∀x(P(x) ∧ ∃yQ(y)) ≡ ∀x∃y(P(x) ∧ Q(y)).

Better: ∀xP(x) ∧ ∃xQ(x) ≡ ∃x(∀xP(x) ∧ Q(x)) ≡∃x(∀yP(y) ∧ Q(x)) ≡ ∃x∀y(P(y) ∧ Q(x)).

5. Finally, transform the matrix in a DNF or CNF, just like apropositional formula.

Page 45: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms cont’d

4. To pull all quantifiers in front of the formula and thus transform it intoa prenex form, use the following equivalences, where x is not free in Q:

(c) ∀xP ∧ Q ≡ Q ∧ ∀xP ≡ ∀x(P ∧ Q),

(d) ∀xP ∨ Q ≡ Q ∨ ∀xP ≡ ∀x(P ∨ Q),

(e) ∃xP ∨ Q ≡ Q ∨ ∃xP ≡ ∃x(P ∨ Q),

(f) ∃xP ∧ Q ≡ Q ∧ ∃xP ≡ ∃x(P ∧ Q),

If necessary, use renaming in order to apply these.

Example: ∀xP(x) ∧ ∃xQ(x) ≡ ∀x(P(x) ∧ ∃xQ(x)) ≡∀x(P(x) ∧ ∃yQ(y))

≡ ∀x∃y(P(x) ∧ Q(y)).

Better: ∀xP(x) ∧ ∃xQ(x) ≡ ∃x(∀xP(x) ∧ Q(x)) ≡∃x(∀yP(y) ∧ Q(x)) ≡ ∃x∀y(P(y) ∧ Q(x)).

5. Finally, transform the matrix in a DNF or CNF, just like apropositional formula.

Page 46: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms cont’d

4. To pull all quantifiers in front of the formula and thus transform it intoa prenex form, use the following equivalences, where x is not free in Q:

(c) ∀xP ∧ Q ≡ Q ∧ ∀xP ≡ ∀x(P ∧ Q),

(d) ∀xP ∨ Q ≡ Q ∨ ∀xP ≡ ∀x(P ∨ Q),

(e) ∃xP ∨ Q ≡ Q ∨ ∃xP ≡ ∃x(P ∨ Q),

(f) ∃xP ∧ Q ≡ Q ∧ ∃xP ≡ ∃x(P ∧ Q),

If necessary, use renaming in order to apply these.

Example: ∀xP(x) ∧ ∃xQ(x) ≡ ∀x(P(x) ∧ ∃xQ(x)) ≡∀x(P(x) ∧ ∃yQ(y)) ≡ ∀x∃y(P(x) ∧ Q(y)).

Better: ∀xP(x) ∧ ∃xQ(x) ≡ ∃x(∀xP(x) ∧ Q(x)) ≡∃x(∀yP(y) ∧ Q(x)) ≡ ∃x∀y(P(y) ∧ Q(x)).

5. Finally, transform the matrix in a DNF or CNF, just like apropositional formula.

Page 47: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms cont’d

4. To pull all quantifiers in front of the formula and thus transform it intoa prenex form, use the following equivalences, where x is not free in Q:

(c) ∀xP ∧ Q ≡ Q ∧ ∀xP ≡ ∀x(P ∧ Q),

(d) ∀xP ∨ Q ≡ Q ∨ ∀xP ≡ ∀x(P ∨ Q),

(e) ∃xP ∨ Q ≡ Q ∨ ∃xP ≡ ∃x(P ∨ Q),

(f) ∃xP ∧ Q ≡ Q ∧ ∃xP ≡ ∃x(P ∧ Q),

If necessary, use renaming in order to apply these.

Example: ∀xP(x) ∧ ∃xQ(x) ≡ ∀x(P(x) ∧ ∃xQ(x)) ≡∀x(P(x) ∧ ∃yQ(y)) ≡ ∀x∃y(P(x) ∧ Q(y)).

Better: ∀xP(x) ∧ ∃xQ(x)

≡ ∃x(∀xP(x) ∧ Q(x)) ≡∃x(∀yP(y) ∧ Q(x)) ≡ ∃x∀y(P(y) ∧ Q(x)).

5. Finally, transform the matrix in a DNF or CNF, just like apropositional formula.

Page 48: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms cont’d

4. To pull all quantifiers in front of the formula and thus transform it intoa prenex form, use the following equivalences, where x is not free in Q:

(c) ∀xP ∧ Q ≡ Q ∧ ∀xP ≡ ∀x(P ∧ Q),

(d) ∀xP ∨ Q ≡ Q ∨ ∀xP ≡ ∀x(P ∨ Q),

(e) ∃xP ∨ Q ≡ Q ∨ ∃xP ≡ ∃x(P ∨ Q),

(f) ∃xP ∧ Q ≡ Q ∧ ∃xP ≡ ∃x(P ∧ Q),

If necessary, use renaming in order to apply these.

Example: ∀xP(x) ∧ ∃xQ(x) ≡ ∀x(P(x) ∧ ∃xQ(x)) ≡∀x(P(x) ∧ ∃yQ(y)) ≡ ∀x∃y(P(x) ∧ Q(y)).

Better: ∀xP(x) ∧ ∃xQ(x) ≡ ∃x(∀xP(x) ∧ Q(x))

≡∃x(∀yP(y) ∧ Q(x)) ≡ ∃x∀y(P(y) ∧ Q(x)).

5. Finally, transform the matrix in a DNF or CNF, just like apropositional formula.

Page 49: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms cont’d

4. To pull all quantifiers in front of the formula and thus transform it intoa prenex form, use the following equivalences, where x is not free in Q:

(c) ∀xP ∧ Q ≡ Q ∧ ∀xP ≡ ∀x(P ∧ Q),

(d) ∀xP ∨ Q ≡ Q ∨ ∀xP ≡ ∀x(P ∨ Q),

(e) ∃xP ∨ Q ≡ Q ∨ ∃xP ≡ ∃x(P ∨ Q),

(f) ∃xP ∧ Q ≡ Q ∧ ∃xP ≡ ∃x(P ∧ Q),

If necessary, use renaming in order to apply these.

Example: ∀xP(x) ∧ ∃xQ(x) ≡ ∀x(P(x) ∧ ∃xQ(x)) ≡∀x(P(x) ∧ ∃yQ(y)) ≡ ∀x∃y(P(x) ∧ Q(y)).

Better: ∀xP(x) ∧ ∃xQ(x) ≡ ∃x(∀xP(x) ∧ Q(x)) ≡∃x(∀yP(y) ∧ Q(x))

≡ ∃x∀y(P(y) ∧ Q(x)).

5. Finally, transform the matrix in a DNF or CNF, just like apropositional formula.

Page 50: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms cont’d

4. To pull all quantifiers in front of the formula and thus transform it intoa prenex form, use the following equivalences, where x is not free in Q:

(c) ∀xP ∧ Q ≡ Q ∧ ∀xP ≡ ∀x(P ∧ Q),

(d) ∀xP ∨ Q ≡ Q ∨ ∀xP ≡ ∀x(P ∨ Q),

(e) ∃xP ∨ Q ≡ Q ∨ ∃xP ≡ ∃x(P ∨ Q),

(f) ∃xP ∧ Q ≡ Q ∧ ∃xP ≡ ∃x(P ∧ Q),

If necessary, use renaming in order to apply these.

Example: ∀xP(x) ∧ ∃xQ(x) ≡ ∀x(P(x) ∧ ∃xQ(x)) ≡∀x(P(x) ∧ ∃yQ(y)) ≡ ∀x∃y(P(x) ∧ Q(y)).

Better: ∀xP(x) ∧ ∃xQ(x) ≡ ∃x(∀xP(x) ∧ Q(x)) ≡∃x(∀yP(y) ∧ Q(x)) ≡ ∃x∀y(P(y) ∧ Q(x)).

5. Finally, transform the matrix in a DNF or CNF, just like apropositional formula.

Page 51: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms cont’d

4. To pull all quantifiers in front of the formula and thus transform it intoa prenex form, use the following equivalences, where x is not free in Q:

(c) ∀xP ∧ Q ≡ Q ∧ ∀xP ≡ ∀x(P ∧ Q),

(d) ∀xP ∨ Q ≡ Q ∨ ∀xP ≡ ∀x(P ∨ Q),

(e) ∃xP ∨ Q ≡ Q ∨ ∃xP ≡ ∃x(P ∨ Q),

(f) ∃xP ∧ Q ≡ Q ∧ ∃xP ≡ ∃x(P ∧ Q),

If necessary, use renaming in order to apply these.

Example: ∀xP(x) ∧ ∃xQ(x) ≡ ∀x(P(x) ∧ ∃xQ(x)) ≡∀x(P(x) ∧ ∃yQ(y)) ≡ ∀x∃y(P(x) ∧ Q(y)).

Better: ∀xP(x) ∧ ∃xQ(x) ≡ ∃x(∀xP(x) ∧ Q(x)) ≡∃x(∀yP(y) ∧ Q(x)) ≡ ∃x∀y(P(y) ∧ Q(x)).

5. Finally, transform the matrix in a DNF or CNF, just like apropositional formula.

Page 52: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms: example

A = ∃z(∃xQ(x , z) ∨ ∃xP(x))→ ¬(¬∃xP(x) ∧ ∀x∃zQ(z , x)).

1. Eliminating →:A ≡ ¬∃z(∃xQ(x , z) ∨ ∃xP(x)) ∨ ¬(¬∃xP(x) ∧ ∀x∃zQ(z , x))2. Importing the negation:A ≡ ∀z(¬∃xQ(x , z) ∧ ¬∃xP(x)) ∨ (¬¬∃xP(x) ∨ ¬∀x∃zQ(z , x))≡ ∀z(∀x¬Q(x , z) ∧ ∀x¬P(x)) ∨ (∃xP(x) ∨ ∃x∀z¬Q(z , x)).3. Using the equivalences (a) and (b):A ≡ ∀z∀x(¬Q(x , z) ∧ ¬P(x)) ∨ ∃x(P(x) ∨ ∀z¬Q(z , x)).4. Renaming:A ≡ ∀z∀x(¬Q(x , z) ∧ ¬P(x)) ∨ ∃y(P(y) ∨ ∀w¬Q(w , y)).5. Using the equivalences (c)-(f) to pull the quantifiers in front:A ≡ ∀z∀x∃y∀w((¬Q(x , z) ∧ ¬P(x)) ∨ P(y) ∨ ¬Q(w , y)).

6. The resulting formula is in a prenex DNF.

For a prenex CNF we have to distribute the ∨ over ∧:A ≡∀z∀x∃y∀w((¬Q(x , z)∨P(y)∨¬Q(w , y))∧(¬P(x)∨P(y)∨¬Q(w , y))).

Page 53: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms: example

A = ∃z(∃xQ(x , z) ∨ ∃xP(x))→ ¬(¬∃xP(x) ∧ ∀x∃zQ(z , x)).

1. Eliminating →:A ≡ ¬∃z(∃xQ(x , z) ∨ ∃xP(x)) ∨ ¬(¬∃xP(x) ∧ ∀x∃zQ(z , x))

2. Importing the negation:A ≡ ∀z(¬∃xQ(x , z) ∧ ¬∃xP(x)) ∨ (¬¬∃xP(x) ∨ ¬∀x∃zQ(z , x))≡ ∀z(∀x¬Q(x , z) ∧ ∀x¬P(x)) ∨ (∃xP(x) ∨ ∃x∀z¬Q(z , x)).3. Using the equivalences (a) and (b):A ≡ ∀z∀x(¬Q(x , z) ∧ ¬P(x)) ∨ ∃x(P(x) ∨ ∀z¬Q(z , x)).4. Renaming:A ≡ ∀z∀x(¬Q(x , z) ∧ ¬P(x)) ∨ ∃y(P(y) ∨ ∀w¬Q(w , y)).5. Using the equivalences (c)-(f) to pull the quantifiers in front:A ≡ ∀z∀x∃y∀w((¬Q(x , z) ∧ ¬P(x)) ∨ P(y) ∨ ¬Q(w , y)).

6. The resulting formula is in a prenex DNF.

For a prenex CNF we have to distribute the ∨ over ∧:A ≡∀z∀x∃y∀w((¬Q(x , z)∨P(y)∨¬Q(w , y))∧(¬P(x)∨P(y)∨¬Q(w , y))).

Page 54: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms: example

A = ∃z(∃xQ(x , z) ∨ ∃xP(x))→ ¬(¬∃xP(x) ∧ ∀x∃zQ(z , x)).

1. Eliminating →:A ≡ ¬∃z(∃xQ(x , z) ∨ ∃xP(x)) ∨ ¬(¬∃xP(x) ∧ ∀x∃zQ(z , x))2. Importing the negation:A ≡ ∀z(¬∃xQ(x , z) ∧ ¬∃xP(x)) ∨ (¬¬∃xP(x) ∨ ¬∀x∃zQ(z , x))

≡ ∀z(∀x¬Q(x , z) ∧ ∀x¬P(x)) ∨ (∃xP(x) ∨ ∃x∀z¬Q(z , x)).3. Using the equivalences (a) and (b):A ≡ ∀z∀x(¬Q(x , z) ∧ ¬P(x)) ∨ ∃x(P(x) ∨ ∀z¬Q(z , x)).4. Renaming:A ≡ ∀z∀x(¬Q(x , z) ∧ ¬P(x)) ∨ ∃y(P(y) ∨ ∀w¬Q(w , y)).5. Using the equivalences (c)-(f) to pull the quantifiers in front:A ≡ ∀z∀x∃y∀w((¬Q(x , z) ∧ ¬P(x)) ∨ P(y) ∨ ¬Q(w , y)).

6. The resulting formula is in a prenex DNF.

For a prenex CNF we have to distribute the ∨ over ∧:A ≡∀z∀x∃y∀w((¬Q(x , z)∨P(y)∨¬Q(w , y))∧(¬P(x)∨P(y)∨¬Q(w , y))).

Page 55: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms: example

A = ∃z(∃xQ(x , z) ∨ ∃xP(x))→ ¬(¬∃xP(x) ∧ ∀x∃zQ(z , x)).

1. Eliminating →:A ≡ ¬∃z(∃xQ(x , z) ∨ ∃xP(x)) ∨ ¬(¬∃xP(x) ∧ ∀x∃zQ(z , x))2. Importing the negation:A ≡ ∀z(¬∃xQ(x , z) ∧ ¬∃xP(x)) ∨ (¬¬∃xP(x) ∨ ¬∀x∃zQ(z , x))≡ ∀z(∀x¬Q(x , z) ∧ ∀x¬P(x)) ∨ (∃xP(x) ∨ ∃x∀z¬Q(z , x)).

3. Using the equivalences (a) and (b):A ≡ ∀z∀x(¬Q(x , z) ∧ ¬P(x)) ∨ ∃x(P(x) ∨ ∀z¬Q(z , x)).4. Renaming:A ≡ ∀z∀x(¬Q(x , z) ∧ ¬P(x)) ∨ ∃y(P(y) ∨ ∀w¬Q(w , y)).5. Using the equivalences (c)-(f) to pull the quantifiers in front:A ≡ ∀z∀x∃y∀w((¬Q(x , z) ∧ ¬P(x)) ∨ P(y) ∨ ¬Q(w , y)).

6. The resulting formula is in a prenex DNF.

For a prenex CNF we have to distribute the ∨ over ∧:A ≡∀z∀x∃y∀w((¬Q(x , z)∨P(y)∨¬Q(w , y))∧(¬P(x)∨P(y)∨¬Q(w , y))).

Page 56: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms: example

A = ∃z(∃xQ(x , z) ∨ ∃xP(x))→ ¬(¬∃xP(x) ∧ ∀x∃zQ(z , x)).

1. Eliminating →:A ≡ ¬∃z(∃xQ(x , z) ∨ ∃xP(x)) ∨ ¬(¬∃xP(x) ∧ ∀x∃zQ(z , x))2. Importing the negation:A ≡ ∀z(¬∃xQ(x , z) ∧ ¬∃xP(x)) ∨ (¬¬∃xP(x) ∨ ¬∀x∃zQ(z , x))≡ ∀z(∀x¬Q(x , z) ∧ ∀x¬P(x)) ∨ (∃xP(x) ∨ ∃x∀z¬Q(z , x)).3. Using the equivalences (a) and (b):A ≡ ∀z∀x(¬Q(x , z) ∧ ¬P(x)) ∨ ∃x(P(x) ∨ ∀z¬Q(z , x)).

4. Renaming:A ≡ ∀z∀x(¬Q(x , z) ∧ ¬P(x)) ∨ ∃y(P(y) ∨ ∀w¬Q(w , y)).5. Using the equivalences (c)-(f) to pull the quantifiers in front:A ≡ ∀z∀x∃y∀w((¬Q(x , z) ∧ ¬P(x)) ∨ P(y) ∨ ¬Q(w , y)).

6. The resulting formula is in a prenex DNF.

For a prenex CNF we have to distribute the ∨ over ∧:A ≡∀z∀x∃y∀w((¬Q(x , z)∨P(y)∨¬Q(w , y))∧(¬P(x)∨P(y)∨¬Q(w , y))).

Page 57: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms: example

A = ∃z(∃xQ(x , z) ∨ ∃xP(x))→ ¬(¬∃xP(x) ∧ ∀x∃zQ(z , x)).

1. Eliminating →:A ≡ ¬∃z(∃xQ(x , z) ∨ ∃xP(x)) ∨ ¬(¬∃xP(x) ∧ ∀x∃zQ(z , x))2. Importing the negation:A ≡ ∀z(¬∃xQ(x , z) ∧ ¬∃xP(x)) ∨ (¬¬∃xP(x) ∨ ¬∀x∃zQ(z , x))≡ ∀z(∀x¬Q(x , z) ∧ ∀x¬P(x)) ∨ (∃xP(x) ∨ ∃x∀z¬Q(z , x)).3. Using the equivalences (a) and (b):A ≡ ∀z∀x(¬Q(x , z) ∧ ¬P(x)) ∨ ∃x(P(x) ∨ ∀z¬Q(z , x)).4. Renaming:A ≡ ∀z∀x(¬Q(x , z) ∧ ¬P(x)) ∨ ∃y(P(y) ∨ ∀w¬Q(w , y)).

5. Using the equivalences (c)-(f) to pull the quantifiers in front:A ≡ ∀z∀x∃y∀w((¬Q(x , z) ∧ ¬P(x)) ∨ P(y) ∨ ¬Q(w , y)).

6. The resulting formula is in a prenex DNF.

For a prenex CNF we have to distribute the ∨ over ∧:A ≡∀z∀x∃y∀w((¬Q(x , z)∨P(y)∨¬Q(w , y))∧(¬P(x)∨P(y)∨¬Q(w , y))).

Page 58: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms: example

A = ∃z(∃xQ(x , z) ∨ ∃xP(x))→ ¬(¬∃xP(x) ∧ ∀x∃zQ(z , x)).

1. Eliminating →:A ≡ ¬∃z(∃xQ(x , z) ∨ ∃xP(x)) ∨ ¬(¬∃xP(x) ∧ ∀x∃zQ(z , x))2. Importing the negation:A ≡ ∀z(¬∃xQ(x , z) ∧ ¬∃xP(x)) ∨ (¬¬∃xP(x) ∨ ¬∀x∃zQ(z , x))≡ ∀z(∀x¬Q(x , z) ∧ ∀x¬P(x)) ∨ (∃xP(x) ∨ ∃x∀z¬Q(z , x)).3. Using the equivalences (a) and (b):A ≡ ∀z∀x(¬Q(x , z) ∧ ¬P(x)) ∨ ∃x(P(x) ∨ ∀z¬Q(z , x)).4. Renaming:A ≡ ∀z∀x(¬Q(x , z) ∧ ¬P(x)) ∨ ∃y(P(y) ∨ ∀w¬Q(w , y)).5. Using the equivalences (c)-(f) to pull the quantifiers in front:A ≡ ∀z∀x∃y∀w((¬Q(x , z) ∧ ¬P(x)) ∨ P(y) ∨ ¬Q(w , y)).

6. The resulting formula is in a prenex DNF.

For a prenex CNF we have to distribute the ∨ over ∧:A ≡∀z∀x∃y∀w((¬Q(x , z)∨P(y)∨¬Q(w , y))∧(¬P(x)∨P(y)∨¬Q(w , y))).

Page 59: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms: example

A = ∃z(∃xQ(x , z) ∨ ∃xP(x))→ ¬(¬∃xP(x) ∧ ∀x∃zQ(z , x)).

1. Eliminating →:A ≡ ¬∃z(∃xQ(x , z) ∨ ∃xP(x)) ∨ ¬(¬∃xP(x) ∧ ∀x∃zQ(z , x))2. Importing the negation:A ≡ ∀z(¬∃xQ(x , z) ∧ ¬∃xP(x)) ∨ (¬¬∃xP(x) ∨ ¬∀x∃zQ(z , x))≡ ∀z(∀x¬Q(x , z) ∧ ∀x¬P(x)) ∨ (∃xP(x) ∨ ∃x∀z¬Q(z , x)).3. Using the equivalences (a) and (b):A ≡ ∀z∀x(¬Q(x , z) ∧ ¬P(x)) ∨ ∃x(P(x) ∨ ∀z¬Q(z , x)).4. Renaming:A ≡ ∀z∀x(¬Q(x , z) ∧ ¬P(x)) ∨ ∃y(P(y) ∨ ∀w¬Q(w , y)).5. Using the equivalences (c)-(f) to pull the quantifiers in front:A ≡ ∀z∀x∃y∀w((¬Q(x , z) ∧ ¬P(x)) ∨ P(y) ∨ ¬Q(w , y)).

6. The resulting formula is in a prenex DNF.

For a prenex CNF we have to distribute the ∨ over ∧:A ≡∀z∀x∃y∀w((¬Q(x , z)∨P(y)∨¬Q(w , y))∧(¬P(x)∨P(y)∨¬Q(w , y))).

Page 60: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms: example

A = ∃z(∃xQ(x , z) ∨ ∃xP(x))→ ¬(¬∃xP(x) ∧ ∀x∃zQ(z , x)).

1. Eliminating →:A ≡ ¬∃z(∃xQ(x , z) ∨ ∃xP(x)) ∨ ¬(¬∃xP(x) ∧ ∀x∃zQ(z , x))2. Importing the negation:A ≡ ∀z(¬∃xQ(x , z) ∧ ¬∃xP(x)) ∨ (¬¬∃xP(x) ∨ ¬∀x∃zQ(z , x))≡ ∀z(∀x¬Q(x , z) ∧ ∀x¬P(x)) ∨ (∃xP(x) ∨ ∃x∀z¬Q(z , x)).3. Using the equivalences (a) and (b):A ≡ ∀z∀x(¬Q(x , z) ∧ ¬P(x)) ∨ ∃x(P(x) ∨ ∀z¬Q(z , x)).4. Renaming:A ≡ ∀z∀x(¬Q(x , z) ∧ ¬P(x)) ∨ ∃y(P(y) ∨ ∀w¬Q(w , y)).5. Using the equivalences (c)-(f) to pull the quantifiers in front:A ≡ ∀z∀x∃y∀w((¬Q(x , z) ∧ ¬P(x)) ∨ P(y) ∨ ¬Q(w , y)).

6. The resulting formula is in a prenex DNF.

For a prenex CNF we have to distribute the ∨ over ∧:

A ≡∀z∀x∃y∀w((¬Q(x , z)∨P(y)∨¬Q(w , y))∧(¬P(x)∨P(y)∨¬Q(w , y))).

Page 61: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation to prenex normal forms: example

A = ∃z(∃xQ(x , z) ∨ ∃xP(x))→ ¬(¬∃xP(x) ∧ ∀x∃zQ(z , x)).

1. Eliminating →:A ≡ ¬∃z(∃xQ(x , z) ∨ ∃xP(x)) ∨ ¬(¬∃xP(x) ∧ ∀x∃zQ(z , x))2. Importing the negation:A ≡ ∀z(¬∃xQ(x , z) ∧ ¬∃xP(x)) ∨ (¬¬∃xP(x) ∨ ¬∀x∃zQ(z , x))≡ ∀z(∀x¬Q(x , z) ∧ ∀x¬P(x)) ∨ (∃xP(x) ∨ ∃x∀z¬Q(z , x)).3. Using the equivalences (a) and (b):A ≡ ∀z∀x(¬Q(x , z) ∧ ¬P(x)) ∨ ∃x(P(x) ∨ ∀z¬Q(z , x)).4. Renaming:A ≡ ∀z∀x(¬Q(x , z) ∧ ¬P(x)) ∨ ∃y(P(y) ∨ ∀w¬Q(w , y)).5. Using the equivalences (c)-(f) to pull the quantifiers in front:A ≡ ∀z∀x∃y∀w((¬Q(x , z) ∧ ¬P(x)) ∨ P(y) ∨ ¬Q(w , y)).

6. The resulting formula is in a prenex DNF.

For a prenex CNF we have to distribute the ∨ over ∧:A ≡∀z∀x∃y∀w((¬Q(x , z)∨P(y)∨¬Q(w , y))∧(¬P(x)∨P(y)∨¬Q(w , y))).

Page 62: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Skolemization I: Skolem constants

Skolemization: procedure for systematic elimination of the existentialquantifiers in a first-order formula in a prenex form, by introducing newconstant and functional symbols, called Skolem constants and Skolemfunctions, in the formula.

I Simple case: the result of Skolemization of the formula ∃x∀y∀zA isthe formula ∀y∀zA[c/x ], where c is a new (Skolem) constant.

.. For instance, the result of Skolemization of the formula∃x∀y∀z(P(x , y)→ Q(x , z)) is ∀y∀z(P(c , y)→ Q(c , z)).

I More generally, the result of Skolemization of the formula∃x1 · · · ∃xk∀y1 · · · ∀ynA is ∀y1 · · · ∀ynA[c1/x1, . . . , ck/xk ],where c1, . . . , ck are new (Skolem) constants.

Note that the resulting formula is not equivalent to the original one, butis equally satisfiable with it.

Page 63: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Skolemization I: Skolem constants

Skolemization: procedure for systematic elimination of the existentialquantifiers in a first-order formula in a prenex form, by introducing newconstant and functional symbols, called Skolem constants and Skolemfunctions, in the formula.

I Simple case: the result of Skolemization of the formula ∃x∀y∀zA isthe formula ∀y∀zA[c/x ], where c is a new (Skolem) constant.

.. For instance, the result of Skolemization of the formula∃x∀y∀z(P(x , y)→ Q(x , z)) is ∀y∀z(P(c , y)→ Q(c , z)).

I More generally, the result of Skolemization of the formula∃x1 · · · ∃xk∀y1 · · · ∀ynA is ∀y1 · · · ∀ynA[c1/x1, . . . , ck/xk ],where c1, . . . , ck are new (Skolem) constants.

Note that the resulting formula is not equivalent to the original one, butis equally satisfiable with it.

Page 64: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Skolemization I: Skolem constants

Skolemization: procedure for systematic elimination of the existentialquantifiers in a first-order formula in a prenex form, by introducing newconstant and functional symbols, called Skolem constants and Skolemfunctions, in the formula.

I Simple case: the result of Skolemization of the formula ∃x∀y∀zA isthe formula ∀y∀zA[c/x ], where c is a new (Skolem) constant.

.. For instance, the result of Skolemization of the formula∃x∀y∀z(P(x , y)→ Q(x , z))

is ∀y∀z(P(c , y)→ Q(c , z)).

I More generally, the result of Skolemization of the formula∃x1 · · · ∃xk∀y1 · · · ∀ynA is ∀y1 · · · ∀ynA[c1/x1, . . . , ck/xk ],where c1, . . . , ck are new (Skolem) constants.

Note that the resulting formula is not equivalent to the original one, butis equally satisfiable with it.

Page 65: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Skolemization I: Skolem constants

Skolemization: procedure for systematic elimination of the existentialquantifiers in a first-order formula in a prenex form, by introducing newconstant and functional symbols, called Skolem constants and Skolemfunctions, in the formula.

I Simple case: the result of Skolemization of the formula ∃x∀y∀zA isthe formula ∀y∀zA[c/x ], where c is a new (Skolem) constant.

.. For instance, the result of Skolemization of the formula∃x∀y∀z(P(x , y)→ Q(x , z)) is ∀y∀z(P(c , y)→ Q(c , z)).

I More generally, the result of Skolemization of the formula∃x1 · · · ∃xk∀y1 · · · ∀ynA is ∀y1 · · · ∀ynA[c1/x1, . . . , ck/xk ],where c1, . . . , ck are new (Skolem) constants.

Note that the resulting formula is not equivalent to the original one, butis equally satisfiable with it.

Page 66: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Skolemization I: Skolem constants

Skolemization: procedure for systematic elimination of the existentialquantifiers in a first-order formula in a prenex form, by introducing newconstant and functional symbols, called Skolem constants and Skolemfunctions, in the formula.

I Simple case: the result of Skolemization of the formula ∃x∀y∀zA isthe formula ∀y∀zA[c/x ], where c is a new (Skolem) constant.

.. For instance, the result of Skolemization of the formula∃x∀y∀z(P(x , y)→ Q(x , z)) is ∀y∀z(P(c , y)→ Q(c , z)).

I More generally, the result of Skolemization of the formula∃x1 · · · ∃xk∀y1 · · · ∀ynA

is ∀y1 · · · ∀ynA[c1/x1, . . . , ck/xk ],where c1, . . . , ck are new (Skolem) constants.

Note that the resulting formula is not equivalent to the original one, butis equally satisfiable with it.

Page 67: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Skolemization I: Skolem constants

Skolemization: procedure for systematic elimination of the existentialquantifiers in a first-order formula in a prenex form, by introducing newconstant and functional symbols, called Skolem constants and Skolemfunctions, in the formula.

I Simple case: the result of Skolemization of the formula ∃x∀y∀zA isthe formula ∀y∀zA[c/x ], where c is a new (Skolem) constant.

.. For instance, the result of Skolemization of the formula∃x∀y∀z(P(x , y)→ Q(x , z)) is ∀y∀z(P(c , y)→ Q(c , z)).

I More generally, the result of Skolemization of the formula∃x1 · · · ∃xk∀y1 · · · ∀ynA is ∀y1 · · · ∀ynA[c1/x1, . . . , ck/xk ],where c1, . . . , ck are new (Skolem) constants.

Note that the resulting formula is not equivalent to the original one, butis equally satisfiable with it.

Page 68: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Skolemization I: Skolem constants

Skolemization: procedure for systematic elimination of the existentialquantifiers in a first-order formula in a prenex form, by introducing newconstant and functional symbols, called Skolem constants and Skolemfunctions, in the formula.

I Simple case: the result of Skolemization of the formula ∃x∀y∀zA isthe formula ∀y∀zA[c/x ], where c is a new (Skolem) constant.

.. For instance, the result of Skolemization of the formula∃x∀y∀z(P(x , y)→ Q(x , z)) is ∀y∀z(P(c , y)→ Q(c , z)).

I More generally, the result of Skolemization of the formula∃x1 · · · ∃xk∀y1 · · · ∀ynA is ∀y1 · · · ∀ynA[c1/x1, . . . , ck/xk ],where c1, . . . , ck are new (Skolem) constants.

Note that the resulting formula is not equivalent to the original one, butis equally satisfiable with it.

Page 69: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Skolemization II: Skolem functions

I The result of Skolemization of ∀y∃zP(y , z)

is ∀yP(y , f (y)),where f is a new unary function, called Skolem function.

I More generally, the result of Skolemization of∀y∃x1 · · · ∃xk∀y1 · · · ∀ynA is ∀y∀y1 · · · ∀ynA[f1(y)/x1, . . . , fk(y)/xk ],where f1, . . . , fk are new Skolem functions.

I The result of Skolemization of

∀x∃y∀z∃uA(x , y , z , u)

is∀x∀zA[x , f (x)/y , z , g(x , z)/u),

where f is a new unary Skolem function and g is a new binary Skolemfunction.

Page 70: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Skolemization II: Skolem functions

I The result of Skolemization of ∀y∃zP(y , z) is ∀yP(y , f (y)),where f is a new unary function, called Skolem function.

I More generally, the result of Skolemization of∀y∃x1 · · · ∃xk∀y1 · · · ∀ynA is ∀y∀y1 · · · ∀ynA[f1(y)/x1, . . . , fk(y)/xk ],where f1, . . . , fk are new Skolem functions.

I The result of Skolemization of

∀x∃y∀z∃uA(x , y , z , u)

is∀x∀zA[x , f (x)/y , z , g(x , z)/u),

where f is a new unary Skolem function and g is a new binary Skolemfunction.

Page 71: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Skolemization II: Skolem functions

I The result of Skolemization of ∀y∃zP(y , z) is ∀yP(y , f (y)),where f is a new unary function, called Skolem function.

I More generally, the result of Skolemization of∀y∃x1 · · · ∃xk∀y1 · · · ∀ynA

is ∀y∀y1 · · · ∀ynA[f1(y)/x1, . . . , fk(y)/xk ],where f1, . . . , fk are new Skolem functions.

I The result of Skolemization of

∀x∃y∀z∃uA(x , y , z , u)

is∀x∀zA[x , f (x)/y , z , g(x , z)/u),

where f is a new unary Skolem function and g is a new binary Skolemfunction.

Page 72: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Skolemization II: Skolem functions

I The result of Skolemization of ∀y∃zP(y , z) is ∀yP(y , f (y)),where f is a new unary function, called Skolem function.

I More generally, the result of Skolemization of∀y∃x1 · · · ∃xk∀y1 · · · ∀ynA is ∀y∀y1 · · · ∀ynA[f1(y)/x1, . . . , fk(y)/xk ],where f1, . . . , fk are new Skolem functions.

I The result of Skolemization of

∀x∃y∀z∃uA(x , y , z , u)

is∀x∀zA[x , f (x)/y , z , g(x , z)/u),

where f is a new unary Skolem function and g is a new binary Skolemfunction.

Page 73: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Skolemization II: Skolem functions

I The result of Skolemization of ∀y∃zP(y , z) is ∀yP(y , f (y)),where f is a new unary function, called Skolem function.

I More generally, the result of Skolemization of∀y∃x1 · · · ∃xk∀y1 · · · ∀ynA is ∀y∀y1 · · · ∀ynA[f1(y)/x1, . . . , fk(y)/xk ],where f1, . . . , fk are new Skolem functions.

I The result of Skolemization of

∀x∃y∀z∃uA(x , y , z , u)

is∀x∀zA[x , f (x)/y , z , g(x , z)/u),

where f is a new unary Skolem function and g is a new binary Skolemfunction.

Page 74: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Skolemization II: Skolem functions

I The result of Skolemization of ∀y∃zP(y , z) is ∀yP(y , f (y)),where f is a new unary function, called Skolem function.

I More generally, the result of Skolemization of∀y∃x1 · · · ∃xk∀y1 · · · ∀ynA is ∀y∀y1 · · · ∀ynA[f1(y)/x1, . . . , fk(y)/xk ],where f1, . . . , fk are new Skolem functions.

I The result of Skolemization of

∀x∃y∀z∃uA(x , y , z , u)

is∀x∀zA[x , f (x)/y , z , g(x , z)/u),

where f is a new unary Skolem function and g is a new binary Skolemfunction.

Page 75: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Skolemization III: the general case

I In the general case of Skolemization, the existential quantifiers areeliminated one by one, from left to right, by introducing at every step aSkolem function depending on all existentially quantified variables to theleft of the existential quantifier that is being eliminated:

∀x1 . . . ∀xk∃yA(x1, . . . , xk , y , . . .)

is transformed to

∀x1 . . . ∀xkA(x1, . . . , xk , y , . . .)[f (x1, . . . , xk)/y ]

where f is a new k-ary Skolem function.

Thus, eventually, all existential quantifiers are eliminated.

Again, the resulting formula after Skolemization is generally notequivalent to the original one, but is equally satisfiable with it.

Page 76: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Skolemization III: the general case

I In the general case of Skolemization, the existential quantifiers areeliminated one by one, from left to right, by introducing at every step aSkolem function depending on all existentially quantified variables to theleft of the existential quantifier that is being eliminated:

∀x1 . . . ∀xk∃yA(x1, . . . , xk , y , . . .)

is transformed to

∀x1 . . . ∀xkA(x1, . . . , xk , y , . . .)[f (x1, . . . , xk)/y ]

where f is a new k-ary Skolem function.

Thus, eventually, all existential quantifiers are eliminated.

Again, the resulting formula after Skolemization is generally notequivalent to the original one, but is equally satisfiable with it.

Page 77: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Skolemization III: the general case

I In the general case of Skolemization, the existential quantifiers areeliminated one by one, from left to right, by introducing at every step aSkolem function depending on all existentially quantified variables to theleft of the existential quantifier that is being eliminated:

∀x1 . . . ∀xk∃yA(x1, . . . , xk , y , . . .)

is transformed to

∀x1 . . . ∀xkA(x1, . . . , xk , y , . . .)[f (x1, . . . , xk)/y ]

where f is a new k-ary Skolem function.

Thus, eventually, all existential quantifiers are eliminated.

Again, the resulting formula after Skolemization is generally notequivalent to the original one, but is equally satisfiable with it.

Page 78: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Skolemization III: the general case

I In the general case of Skolemization, the existential quantifiers areeliminated one by one, from left to right, by introducing at every step aSkolem function depending on all existentially quantified variables to theleft of the existential quantifier that is being eliminated:

∀x1 . . . ∀xk∃yA(x1, . . . , xk , y , . . .)

is transformed to

∀x1 . . . ∀xkA(x1, . . . , xk , y , . . .)[f (x1, . . . , xk)/y ]

where f is a new k-ary Skolem function.

Thus, eventually, all existential quantifiers are eliminated.

Again, the resulting formula after Skolemization is generally notequivalent to the original one, but is equally satisfiable with it.

Page 79: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Skolemization III: the general case

I In the general case of Skolemization, the existential quantifiers areeliminated one by one, from left to right, by introducing at every step aSkolem function depending on all existentially quantified variables to theleft of the existential quantifier that is being eliminated:

∀x1 . . . ∀xk∃yA(x1, . . . , xk , y , . . .)

is transformed to

∀x1 . . . ∀xkA(x1, . . . , xk , y , . . .)[f (x1, . . . , xk)/y ]

where f is a new k-ary Skolem function.

Thus, eventually, all existential quantifiers are eliminated.

Again, the resulting formula after Skolemization is generally notequivalent to the original one, but is equally satisfiable with it.

Page 80: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Skolemization III: the general case

I In the general case of Skolemization, the existential quantifiers areeliminated one by one, from left to right, by introducing at every step aSkolem function depending on all existentially quantified variables to theleft of the existential quantifier that is being eliminated:

∀x1 . . . ∀xk∃yA(x1, . . . , xk , y , . . .)

is transformed to

∀x1 . . . ∀xkA(x1, . . . , xk , y , . . .)[f (x1, . . . , xk)/y ]

where f is a new k-ary Skolem function.

Thus, eventually, all existential quantifiers are eliminated.

Again, the resulting formula after Skolemization is generally notequivalent to the original one, but is equally satisfiable with it.

Page 81: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Skolemization III: the general case

I In the general case of Skolemization, the existential quantifiers areeliminated one by one, from left to right, by introducing at every step aSkolem function depending on all existentially quantified variables to theleft of the existential quantifier that is being eliminated:

∀x1 . . . ∀xk∃yA(x1, . . . , xk , y , . . .)

is transformed to

∀x1 . . . ∀xkA(x1, . . . , xk , y , . . .)[f (x1, . . . , xk)/y ]

where f is a new k-ary Skolem function.

Thus, eventually, all existential quantifiers are eliminated.

Again, the resulting formula after Skolemization is generally notequivalent to the original one, but is equally satisfiable with it.

Page 82: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Clausal form of first-order formulae

A literal is an atomic formula or a negation of an atomic formula.

Examples: P(x), ¬P(f (c , g(y))), ¬Q (f (x , g(c)), g(g(g(y)))).

A clause is a set of literals.

Example: {P(x),¬P(f (c , g(y))),¬Q(f (x , g(c)), g(g(g(y))))}.

A clausal form is a set of clauses.

Example:{{P(x)},{¬P(f (c)),¬Q(g(x , x), y)},{¬P(f (y)),P(f (c)),Q(y , f (x))}}.

Page 83: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Clausal form of first-order formulae

A literal is an atomic formula or a negation of an atomic formula.

Examples: P(x), ¬P(f (c , g(y))), ¬Q (f (x , g(c)), g(g(g(y)))).

A clause is a set of literals.

Example: {P(x),¬P(f (c , g(y))),¬Q(f (x , g(c)), g(g(g(y))))}.

A clausal form is a set of clauses.

Example:{{P(x)},{¬P(f (c)),¬Q(g(x , x), y)},{¬P(f (y)),P(f (c)),Q(y , f (x))}}.

Page 84: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Clausal form of first-order formulae

A literal is an atomic formula or a negation of an atomic formula.

Examples: P(x),

¬P(f (c , g(y))), ¬Q (f (x , g(c)), g(g(g(y)))).

A clause is a set of literals.

Example: {P(x),¬P(f (c , g(y))),¬Q(f (x , g(c)), g(g(g(y))))}.

A clausal form is a set of clauses.

Example:{{P(x)},{¬P(f (c)),¬Q(g(x , x), y)},{¬P(f (y)),P(f (c)),Q(y , f (x))}}.

Page 85: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Clausal form of first-order formulae

A literal is an atomic formula or a negation of an atomic formula.

Examples: P(x), ¬P(f (c , g(y))),

¬Q (f (x , g(c)), g(g(g(y)))).

A clause is a set of literals.

Example: {P(x),¬P(f (c , g(y))),¬Q(f (x , g(c)), g(g(g(y))))}.

A clausal form is a set of clauses.

Example:{{P(x)},{¬P(f (c)),¬Q(g(x , x), y)},{¬P(f (y)),P(f (c)),Q(y , f (x))}}.

Page 86: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Clausal form of first-order formulae

A literal is an atomic formula or a negation of an atomic formula.

Examples: P(x), ¬P(f (c , g(y))), ¬Q (f (x , g(c)), g(g(g(y)))).

A clause is a set of literals.

Example: {P(x),¬P(f (c , g(y))),¬Q(f (x , g(c)), g(g(g(y))))}.

A clausal form is a set of clauses.

Example:{{P(x)},{¬P(f (c)),¬Q(g(x , x), y)},{¬P(f (y)),P(f (c)),Q(y , f (x))}}.

Page 87: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Clausal form of first-order formulae

A literal is an atomic formula or a negation of an atomic formula.

Examples: P(x), ¬P(f (c , g(y))), ¬Q (f (x , g(c)), g(g(g(y)))).

A clause is a set of literals.

Example: {P(x),¬P(f (c , g(y))),¬Q(f (x , g(c)), g(g(g(y))))}.

A clausal form is a set of clauses.

Example:{{P(x)},{¬P(f (c)),¬Q(g(x , x), y)},{¬P(f (y)),P(f (c)),Q(y , f (x))}}.

Page 88: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Clausal form of first-order formulae

A literal is an atomic formula or a negation of an atomic formula.

Examples: P(x), ¬P(f (c , g(y))), ¬Q (f (x , g(c)), g(g(g(y)))).

A clause is a set of literals.

Example: {P(x),¬P(f (c , g(y))),¬Q(f (x , g(c)), g(g(g(y))))}.

A clausal form is a set of clauses.

Example:{{P(x)},{¬P(f (c)),¬Q(g(x , x), y)},{¬P(f (y)),P(f (c)),Q(y , f (x))}}.

Page 89: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Clausal form of first-order formulae

A literal is an atomic formula or a negation of an atomic formula.

Examples: P(x), ¬P(f (c , g(y))), ¬Q (f (x , g(c)), g(g(g(y)))).

A clause is a set of literals.

Example: {P(x),¬P(f (c , g(y))),¬Q(f (x , g(c)), g(g(g(y))))}.

A clausal form is a set of clauses.

Example:{{P(x)},{¬P(f (c)),¬Q(g(x , x), y)},{¬P(f (y)),P(f (c)),Q(y , f (x))}}.

Page 90: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Clausal form of first-order formulae

A literal is an atomic formula or a negation of an atomic formula.

Examples: P(x), ¬P(f (c , g(y))), ¬Q (f (x , g(c)), g(g(g(y)))).

A clause is a set of literals.

Example: {P(x),¬P(f (c , g(y))),¬Q(f (x , g(c)), g(g(g(y))))}.

A clausal form is a set of clauses.

Example:{

{P(x)},{¬P(f (c)),¬Q(g(x , x), y)},{¬P(f (y)),P(f (c)),Q(y , f (x))}}.

Page 91: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Clausal form of first-order formulae

A literal is an atomic formula or a negation of an atomic formula.

Examples: P(x), ¬P(f (c , g(y))), ¬Q (f (x , g(c)), g(g(g(y)))).

A clause is a set of literals.

Example: {P(x),¬P(f (c , g(y))),¬Q(f (x , g(c)), g(g(g(y))))}.

A clausal form is a set of clauses.

Example:{{P(x)},

{¬P(f (c)),¬Q(g(x , x), y)},{¬P(f (y)),P(f (c)),Q(y , f (x))}}.

Page 92: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Clausal form of first-order formulae

A literal is an atomic formula or a negation of an atomic formula.

Examples: P(x), ¬P(f (c , g(y))), ¬Q (f (x , g(c)), g(g(g(y)))).

A clause is a set of literals.

Example: {P(x),¬P(f (c , g(y))),¬Q(f (x , g(c)), g(g(g(y))))}.

A clausal form is a set of clauses.

Example:{{P(x)},{¬P(f (c)),¬Q(g(x , x), y)},

{¬P(f (y)),P(f (c)),Q(y , f (x))}}.

Page 93: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Clausal form of first-order formulae

A literal is an atomic formula or a negation of an atomic formula.

Examples: P(x), ¬P(f (c , g(y))), ¬Q (f (x , g(c)), g(g(g(y)))).

A clause is a set of literals.

Example: {P(x),¬P(f (c , g(y))),¬Q(f (x , g(c)), g(g(g(y))))}.

A clausal form is a set of clauses.

Example:{{P(x)},{¬P(f (c)),¬Q(g(x , x), y)},{¬P(f (y)),P(f (c)),Q(y , f (x))}

}.

Page 94: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Clausal form of first-order formulae

A literal is an atomic formula or a negation of an atomic formula.

Examples: P(x), ¬P(f (c , g(y))), ¬Q (f (x , g(c)), g(g(g(y)))).

A clause is a set of literals.

Example: {P(x),¬P(f (c , g(y))),¬Q(f (x , g(c)), g(g(g(y))))}.

A clausal form is a set of clauses.

Example:{{P(x)},{¬P(f (c)),¬Q(g(x , x), y)},{¬P(f (y)),P(f (c)),Q(y , f (x))}}.

Page 95: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

The logical meaning of first-order clauses

All variables in a clause are assumed to be universally quantified.

Thus, a clause represents the universal closure of the disjunction ofliterals in it.

Example: {P(x),¬P(f (c , g(y))),¬Q(f (x , g(c)), g(g(g(y))))}

represents

∀x∀y(P(x) ∨ ¬P(f (c , g(y))) ∨ ¬Q(f (x , g(c)), g(g(g(y))))

)The universal quantifiers will hereafter be omitted.

Page 96: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

The logical meaning of first-order clauses

All variables in a clause are assumed to be universally quantified.

Thus, a clause represents the universal closure of the disjunction ofliterals in it.

Example: {P(x),¬P(f (c , g(y))),¬Q(f (x , g(c)), g(g(g(y))))}

represents

∀x∀y(P(x) ∨ ¬P(f (c , g(y))) ∨ ¬Q(f (x , g(c)), g(g(g(y))))

)The universal quantifiers will hereafter be omitted.

Page 97: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

The logical meaning of first-order clauses

All variables in a clause are assumed to be universally quantified.

Thus, a clause represents the universal closure of the disjunction ofliterals in it.

Example: {P(x),¬P(f (c , g(y))),¬Q(f (x , g(c)), g(g(g(y))))}

represents

∀x∀y(P(x) ∨ ¬P(f (c , g(y))) ∨ ¬Q(f (x , g(c)), g(g(g(y))))

)The universal quantifiers will hereafter be omitted.

Page 98: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

The logical meaning of first-order clauses

All variables in a clause are assumed to be universally quantified.

Thus, a clause represents the universal closure of the disjunction ofliterals in it.

Example: {P(x),¬P(f (c , g(y))),¬Q(f (x , g(c)), g(g(g(y))))}

represents

∀x∀y(P(x) ∨ ¬P(f (c , g(y))) ∨ ¬Q(f (x , g(c)), g(g(g(y))))

)The universal quantifiers will hereafter be omitted.

Page 99: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

The logical meaning of first-order clauses

All variables in a clause are assumed to be universally quantified.

Thus, a clause represents the universal closure of the disjunction ofliterals in it.

Example: {P(x),¬P(f (c , g(y))),¬Q(f (x , g(c)), g(g(g(y))))}

represents

∀x∀y(P(x) ∨ ¬P(f (c , g(y))) ∨ ¬Q(f (x , g(c)), g(g(g(y))))

)The universal quantifiers will hereafter be omitted.

Page 100: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

The logical meaning of first-order clauses

All variables in a clause are assumed to be universally quantified.

Thus, a clause represents the universal closure of the disjunction ofliterals in it.

Example: {P(x),¬P(f (c , g(y))),¬Q(f (x , g(c)), g(g(g(y))))}

represents

∀x∀y(P(x) ∨ ¬P(f (c , g(y))) ∨ ¬Q(f (x , g(c)), g(g(g(y))))

)

The universal quantifiers will hereafter be omitted.

Page 101: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

The logical meaning of first-order clauses

All variables in a clause are assumed to be universally quantified.

Thus, a clause represents the universal closure of the disjunction ofliterals in it.

Example: {P(x),¬P(f (c , g(y))),¬Q(f (x , g(c)), g(g(g(y))))}

represents

∀x∀y(P(x) ∨ ¬P(f (c , g(y))) ∨ ¬Q(f (x , g(c)), g(g(g(y))))

)The universal quantifiers will hereafter be omitted.

Page 102: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

The logical meaning of sets of first-order clauses

A set of clauses represents the conjunction of the (formulae representedby the) clauses contained in it.

Example: the set{{P(x)}, {¬P(f (c)),¬Q(x , y)}, {¬P(f (y)),Q(y , f (x))}

}represents the formula

∀xP(x) ∧ ∀x∀y(¬P(f (c)) ∨ ¬Q(x , y)

)∧ ∀x∀y

(¬P(f (y)) ∨ Q(y , f (x))

).

Hereafter we will assume that no two clauses in a clausal form sharecommon variables, which can always be achieved by means of renaming.Thus, the clausal form above can be re-written as:{{P(x)}, {¬P(f (c)),¬Q(x1, y1)}, {¬P(f (y2)),Q(y2, f (x2))}

}representing the formula

∀xP(x) ∧ ∀x1∀y1(¬P(f (c)) ∨ ¬Q(x1, y1)

)∧ ∀x2∀y2

(¬P(f (y2)) ∨ Q(y2, f (x2))

).

Because ∀ distributes over ∧, after the renaming the clausal form alsorepresent the universal closure of the conjunction of the disjunctionsrepresented by the clauses contained in it:

∀x∀x1∀y1∀x2∀y2(P(x) ∧

(¬P(f (c)) ∨ ¬Q(x1, y1)

)∧(¬P(f (y2)) ∨ Q(y2, f (x2))

)).

Page 103: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

The logical meaning of sets of first-order clausesA set of clauses represents the conjunction of the (formulae representedby the) clauses contained in it.

Example: the set{{P(x)}, {¬P(f (c)),¬Q(x , y)}, {¬P(f (y)),Q(y , f (x))}

}represents the formula

∀xP(x) ∧ ∀x∀y(¬P(f (c)) ∨ ¬Q(x , y)

)∧ ∀x∀y

(¬P(f (y)) ∨ Q(y , f (x))

).

Hereafter we will assume that no two clauses in a clausal form sharecommon variables, which can always be achieved by means of renaming.Thus, the clausal form above can be re-written as:{{P(x)}, {¬P(f (c)),¬Q(x1, y1)}, {¬P(f (y2)),Q(y2, f (x2))}

}representing the formula

∀xP(x) ∧ ∀x1∀y1(¬P(f (c)) ∨ ¬Q(x1, y1)

)∧ ∀x2∀y2

(¬P(f (y2)) ∨ Q(y2, f (x2))

).

Because ∀ distributes over ∧, after the renaming the clausal form alsorepresent the universal closure of the conjunction of the disjunctionsrepresented by the clauses contained in it:

∀x∀x1∀y1∀x2∀y2(P(x) ∧

(¬P(f (c)) ∨ ¬Q(x1, y1)

)∧(¬P(f (y2)) ∨ Q(y2, f (x2))

)).

Page 104: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

The logical meaning of sets of first-order clausesA set of clauses represents the conjunction of the (formulae representedby the) clauses contained in it.

Example: the set{{P(x)}, {¬P(f (c)),¬Q(x , y)}, {¬P(f (y)),Q(y , f (x))}

}

represents the formula

∀xP(x) ∧ ∀x∀y(¬P(f (c)) ∨ ¬Q(x , y)

)∧ ∀x∀y

(¬P(f (y)) ∨ Q(y , f (x))

).

Hereafter we will assume that no two clauses in a clausal form sharecommon variables, which can always be achieved by means of renaming.Thus, the clausal form above can be re-written as:{{P(x)}, {¬P(f (c)),¬Q(x1, y1)}, {¬P(f (y2)),Q(y2, f (x2))}

}representing the formula

∀xP(x) ∧ ∀x1∀y1(¬P(f (c)) ∨ ¬Q(x1, y1)

)∧ ∀x2∀y2

(¬P(f (y2)) ∨ Q(y2, f (x2))

).

Because ∀ distributes over ∧, after the renaming the clausal form alsorepresent the universal closure of the conjunction of the disjunctionsrepresented by the clauses contained in it:

∀x∀x1∀y1∀x2∀y2(P(x) ∧

(¬P(f (c)) ∨ ¬Q(x1, y1)

)∧(¬P(f (y2)) ∨ Q(y2, f (x2))

)).

Page 105: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

The logical meaning of sets of first-order clausesA set of clauses represents the conjunction of the (formulae representedby the) clauses contained in it.

Example: the set{{P(x)}, {¬P(f (c)),¬Q(x , y)}, {¬P(f (y)),Q(y , f (x))}

}represents the formula

∀xP(x) ∧ ∀x∀y(¬P(f (c)) ∨ ¬Q(x , y)

)∧ ∀x∀y

(¬P(f (y)) ∨ Q(y , f (x))

).

Hereafter we will assume that no two clauses in a clausal form sharecommon variables, which can always be achieved by means of renaming.Thus, the clausal form above can be re-written as:{{P(x)}, {¬P(f (c)),¬Q(x1, y1)}, {¬P(f (y2)),Q(y2, f (x2))}

}representing the formula

∀xP(x) ∧ ∀x1∀y1(¬P(f (c)) ∨ ¬Q(x1, y1)

)∧ ∀x2∀y2

(¬P(f (y2)) ∨ Q(y2, f (x2))

).

Because ∀ distributes over ∧, after the renaming the clausal form alsorepresent the universal closure of the conjunction of the disjunctionsrepresented by the clauses contained in it:

∀x∀x1∀y1∀x2∀y2(P(x) ∧

(¬P(f (c)) ∨ ¬Q(x1, y1)

)∧(¬P(f (y2)) ∨ Q(y2, f (x2))

)).

Page 106: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

The logical meaning of sets of first-order clausesA set of clauses represents the conjunction of the (formulae representedby the) clauses contained in it.

Example: the set{{P(x)}, {¬P(f (c)),¬Q(x , y)}, {¬P(f (y)),Q(y , f (x))}

}represents the formula

∀xP(x) ∧ ∀x∀y(¬P(f (c)) ∨ ¬Q(x , y)

)∧ ∀x∀y

(¬P(f (y)) ∨ Q(y , f (x))

).

Hereafter we will assume that no two clauses in a clausal form sharecommon variables, which can always be achieved by means of renaming.

Thus, the clausal form above can be re-written as:{{P(x)}, {¬P(f (c)),¬Q(x1, y1)}, {¬P(f (y2)),Q(y2, f (x2))}

}representing the formula

∀xP(x) ∧ ∀x1∀y1(¬P(f (c)) ∨ ¬Q(x1, y1)

)∧ ∀x2∀y2

(¬P(f (y2)) ∨ Q(y2, f (x2))

).

Because ∀ distributes over ∧, after the renaming the clausal form alsorepresent the universal closure of the conjunction of the disjunctionsrepresented by the clauses contained in it:

∀x∀x1∀y1∀x2∀y2(P(x) ∧

(¬P(f (c)) ∨ ¬Q(x1, y1)

)∧(¬P(f (y2)) ∨ Q(y2, f (x2))

)).

Page 107: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

The logical meaning of sets of first-order clausesA set of clauses represents the conjunction of the (formulae representedby the) clauses contained in it.

Example: the set{{P(x)}, {¬P(f (c)),¬Q(x , y)}, {¬P(f (y)),Q(y , f (x))}

}represents the formula

∀xP(x) ∧ ∀x∀y(¬P(f (c)) ∨ ¬Q(x , y)

)∧ ∀x∀y

(¬P(f (y)) ∨ Q(y , f (x))

).

Hereafter we will assume that no two clauses in a clausal form sharecommon variables, which can always be achieved by means of renaming.Thus, the clausal form above can be re-written as:{{P(x)}, {¬P(f (c)),¬Q(x1, y1)}, {¬P(f (y2)),Q(y2, f (x2))}

}representing the formula

∀xP(x) ∧ ∀x1∀y1(¬P(f (c)) ∨ ¬Q(x1, y1)

)∧ ∀x2∀y2

(¬P(f (y2)) ∨ Q(y2, f (x2))

).

Because ∀ distributes over ∧, after the renaming the clausal form alsorepresent the universal closure of the conjunction of the disjunctionsrepresented by the clauses contained in it:

∀x∀x1∀y1∀x2∀y2(P(x) ∧

(¬P(f (c)) ∨ ¬Q(x1, y1)

)∧(¬P(f (y2)) ∨ Q(y2, f (x2))

)).

Page 108: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

The logical meaning of sets of first-order clausesA set of clauses represents the conjunction of the (formulae representedby the) clauses contained in it.

Example: the set{{P(x)}, {¬P(f (c)),¬Q(x , y)}, {¬P(f (y)),Q(y , f (x))}

}represents the formula

∀xP(x) ∧ ∀x∀y(¬P(f (c)) ∨ ¬Q(x , y)

)∧ ∀x∀y

(¬P(f (y)) ∨ Q(y , f (x))

).

Hereafter we will assume that no two clauses in a clausal form sharecommon variables, which can always be achieved by means of renaming.Thus, the clausal form above can be re-written as:{{P(x)}, {¬P(f (c)),¬Q(x1, y1)}, {¬P(f (y2)),Q(y2, f (x2))}

}representing the formula

∀xP(x) ∧ ∀x1∀y1(¬P(f (c)) ∨ ¬Q(x1, y1)

)∧ ∀x2∀y2

(¬P(f (y2)) ∨ Q(y2, f (x2))

).

Because ∀ distributes over ∧, after the renaming the clausal form alsorepresent the universal closure of the conjunction of the disjunctionsrepresented by the clauses contained in it:

∀x∀x1∀y1∀x2∀y2(P(x) ∧

(¬P(f (c)) ∨ ¬Q(x1, y1)

)∧(¬P(f (y2)) ∨ Q(y2, f (x2))

)).

Page 109: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation of first-order formulae to clausal form

Theorem: Every set of first-order formulae {A1, . . . ,An} can betransformed to a set of clauses {C1, . . . ,Ck} where no two clauses sharecommon variables, such that {A1, . . . ,An} is equally satisfiable with theuniversal closure (C1 ∧ · · · ∧ Ck) of the conjunction of all clauses, eachtaken as disjunction of its literals.

The algorithm applies to each formula A ∈ {A1, . . . ,An} as follows:

1. Transform A to a prenex CNF.

2. Eliminate all existential quantifiers by introducing Skolem constantsor functions.

3. Remove all universal quantifiers.

4. Write the matrix (which is in CNF) as a set of clauses.

Finally, apply in the union of all sets of clauses produced as aboverenaming of variables occurring in more than one clause.

Page 110: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation of first-order formulae to clausal form

Theorem: Every set of first-order formulae {A1, . . . ,An} can betransformed to a set of clauses {C1, . . . ,Ck} where no two clauses sharecommon variables, such that {A1, . . . ,An} is equally satisfiable with theuniversal closure (C1 ∧ · · · ∧ Ck) of the conjunction of all clauses, eachtaken as disjunction of its literals.

The algorithm applies to each formula A ∈ {A1, . . . ,An} as follows:

1. Transform A to a prenex CNF.

2. Eliminate all existential quantifiers by introducing Skolem constantsor functions.

3. Remove all universal quantifiers.

4. Write the matrix (which is in CNF) as a set of clauses.

Finally, apply in the union of all sets of clauses produced as aboverenaming of variables occurring in more than one clause.

Page 111: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation of first-order formulae to clausal form

Theorem: Every set of first-order formulae {A1, . . . ,An} can betransformed to a set of clauses {C1, . . . ,Ck} where no two clauses sharecommon variables, such that {A1, . . . ,An} is equally satisfiable with theuniversal closure (C1 ∧ · · · ∧ Ck) of the conjunction of all clauses, eachtaken as disjunction of its literals.

The algorithm applies to each formula A ∈ {A1, . . . ,An} as follows:

1. Transform A to a prenex CNF.

2. Eliminate all existential quantifiers by introducing Skolem constantsor functions.

3. Remove all universal quantifiers.

4. Write the matrix (which is in CNF) as a set of clauses.

Finally, apply in the union of all sets of clauses produced as aboverenaming of variables occurring in more than one clause.

Page 112: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation of first-order formulae to clausal form

Theorem: Every set of first-order formulae {A1, . . . ,An} can betransformed to a set of clauses {C1, . . . ,Ck} where no two clauses sharecommon variables, such that {A1, . . . ,An} is equally satisfiable with theuniversal closure (C1 ∧ · · · ∧ Ck) of the conjunction of all clauses, eachtaken as disjunction of its literals.

The algorithm applies to each formula A ∈ {A1, . . . ,An} as follows:

1. Transform A to a prenex CNF.

2. Eliminate all existential quantifiers by introducing Skolem constantsor functions.

3. Remove all universal quantifiers.

4. Write the matrix (which is in CNF) as a set of clauses.

Finally, apply in the union of all sets of clauses produced as aboverenaming of variables occurring in more than one clause.

Page 113: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation of first-order formulae to clausal form

Theorem: Every set of first-order formulae {A1, . . . ,An} can betransformed to a set of clauses {C1, . . . ,Ck} where no two clauses sharecommon variables, such that {A1, . . . ,An} is equally satisfiable with theuniversal closure (C1 ∧ · · · ∧ Ck) of the conjunction of all clauses, eachtaken as disjunction of its literals.

The algorithm applies to each formula A ∈ {A1, . . . ,An} as follows:

1. Transform A to a prenex CNF.

2. Eliminate all existential quantifiers by introducing Skolem constantsor functions.

3. Remove all universal quantifiers.

4. Write the matrix (which is in CNF) as a set of clauses.

Finally, apply in the union of all sets of clauses produced as aboverenaming of variables occurring in more than one clause.

Page 114: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation of first-order formulae to clausal form

Theorem: Every set of first-order formulae {A1, . . . ,An} can betransformed to a set of clauses {C1, . . . ,Ck} where no two clauses sharecommon variables, such that {A1, . . . ,An} is equally satisfiable with theuniversal closure (C1 ∧ · · · ∧ Ck) of the conjunction of all clauses, eachtaken as disjunction of its literals.

The algorithm applies to each formula A ∈ {A1, . . . ,An} as follows:

1. Transform A to a prenex CNF.

2. Eliminate all existential quantifiers by introducing Skolem constantsor functions.

3. Remove all universal quantifiers.

4. Write the matrix (which is in CNF) as a set of clauses.

Finally, apply in the union of all sets of clauses produced as aboverenaming of variables occurring in more than one clause.

Page 115: Logic as a Tool 3mm Chapter 4: Deductive Reasoning in ......October 2016. Goranko Revision: CNF and DNF of propositional formulae Aliteralis a propositional variable or its negation.

Goranko

Transformation of first-order formulae to clausal form

Theorem: Every set of first-order formulae {A1, . . . ,An} can betransformed to a set of clauses {C1, . . . ,Ck} where no two clauses sharecommon variables, such that {A1, . . . ,An} is equally satisfiable with theuniversal closure (C1 ∧ · · · ∧ Ck) of the conjunction of all clauses, eachtaken as disjunction of its literals.

The algorithm applies to each formula A ∈ {A1, . . . ,An} as follows:

1. Transform A to a prenex CNF.

2. Eliminate all existential quantifiers by introducing Skolem constantsor functions.

3. Remove all universal quantifiers.

4. Write the matrix (which is in CNF) as a set of clauses.

Finally, apply in the union of all sets of clauses produced as aboverenaming of variables occurring in more than one clause.