First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal...

71
First-order logic Normal forms and Herbrand theory Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1 / 23

Transcript of First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal...

Page 1: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

First-order logicNormal forms and Herbrand theory

Mario Alviano

University of Calabria, Italy

A.Y. 2017/2018

1 / 23

Page 2: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Outline

1 Normal formsPrenex Normal FormSkolemization

2 Herbrand theoryIntuitionMain statement

3 Exercises

2 / 23

Page 3: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Outline

1 Normal formsPrenex Normal FormSkolemization

2 Herbrand theoryIntuitionMain statement

3 Exercises

3 / 23

Page 4: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Outline

1 Normal formsPrenex Normal FormSkolemization

2 Herbrand theoryIntuitionMain statement

3 Exercises

4 / 23

Page 5: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Prenex Normal Form

Formulas of the following type are in Prenex Normal Form:

Q1x1 · · · Qn xn φ

whereQi ∈ {∀, ∃} for i = 1, . . . ,n

Q1x1 · · · Qnxn is called quantifier prefixφ is a quantifier-free formula

φ is called matrix

Theorem

For each wff φ there is an equivalent φPNF in prenex normalform.

Intuitively, move quantifiers outside, i.e., up on the treestructure

5 / 23

Page 6: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Prenex Normal Form

Formulas of the following type are in Prenex Normal Form:

Q1x1 · · · Qn xn φ

whereQi ∈ {∀, ∃} for i = 1, . . . ,n

Q1x1 · · · Qnxn is called quantifier prefixφ is a quantifier-free formula

φ is called matrix

Theorem

For each wff φ there is an equivalent φPNF in prenex normalform.

Intuitively, move quantifiers outside, i.e., up on the treestructure

5 / 23

Page 7: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Prenex Normal Form

Formulas of the following type are in Prenex Normal Form:

Q1x1 · · · Qn xn φ

whereQi ∈ {∀, ∃} for i = 1, . . . ,n

Q1x1 · · · Qnxn is called quantifier prefixφ is a quantifier-free formula

φ is called matrix

Theorem

For each wff φ there is an equivalent φPNF in prenex normalform.

Intuitively, move quantifiers outside, i.e., up on the treestructure

5 / 23

Page 8: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Negation, Conjunctive and Disjunctive Normal Form

Negation Normal Form

1 Compute the prenex normal form2 Compute the negation normal form of the matrix

Conjunctive Normal Form

1 Compute the prenex normal form2 Compute the conjunctive normal form of the matrix

Disjunctive Normal Form

1 Compute the prenex normal form2 Compute the disjunctive normal form of the matrix

6 / 23

Page 9: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Negation, Conjunctive and Disjunctive Normal Form

Negation Normal Form

1 Compute the prenex normal form2 Compute the negation normal form of the matrix

Conjunctive Normal Form

1 Compute the prenex normal form2 Compute the conjunctive normal form of the matrix

Disjunctive Normal Form

1 Compute the prenex normal form2 Compute the disjunctive normal form of the matrix

6 / 23

Page 10: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Negation, Conjunctive and Disjunctive Normal Form

Negation Normal Form

1 Compute the prenex normal form2 Compute the negation normal form of the matrix

Conjunctive Normal Form

1 Compute the prenex normal form2 Compute the conjunctive normal form of the matrix

Disjunctive Normal Form

1 Compute the prenex normal form2 Compute the disjunctive normal form of the matrix

6 / 23

Page 11: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Outline

1 Normal formsPrenex Normal FormSkolemization

2 Herbrand theoryIntuitionMain statement

3 Exercises

7 / 23

Page 12: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Skolemization (1)

Can we further simplify the structure of a wff?

Can we remove existential quantifiers?Yes, by introducing Skolem functions!However, equivalence will not hold anymoreStill we will preserve satisfiability!

Intuition

Consider ∃x A(x)

There is x such that A(x) is trueReplace x with a fresh constant cThe Skolem formula will be A(c)

Consider ∀x∃y B(x , y)

Can we replace y by a constant d?

A such that DA = N+ and BA = {(x , y) | x divides y}Is d a multiple of every natural number?

Let’s replace y by a function f (x)

8 / 23

Page 13: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Skolemization (1)

Can we further simplify the structure of a wff?Can we remove existential quantifiers?

Yes, by introducing Skolem functions!However, equivalence will not hold anymoreStill we will preserve satisfiability!

Intuition

Consider ∃x A(x)

There is x such that A(x) is trueReplace x with a fresh constant cThe Skolem formula will be A(c)

Consider ∀x∃y B(x , y)

Can we replace y by a constant d?

A such that DA = N+ and BA = {(x , y) | x divides y}Is d a multiple of every natural number?

Let’s replace y by a function f (x)

8 / 23

Page 14: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Skolemization (1)

Can we further simplify the structure of a wff?Can we remove existential quantifiers?Yes, by introducing Skolem functions!

However, equivalence will not hold anymoreStill we will preserve satisfiability!

Intuition

Consider ∃x A(x)

There is x such that A(x) is trueReplace x with a fresh constant cThe Skolem formula will be A(c)

Consider ∀x∃y B(x , y)

Can we replace y by a constant d?

A such that DA = N+ and BA = {(x , y) | x divides y}Is d a multiple of every natural number?

Let’s replace y by a function f (x)

8 / 23

Page 15: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Skolemization (1)

Can we further simplify the structure of a wff?Can we remove existential quantifiers?Yes, by introducing Skolem functions!However, equivalence will not hold anymore

Still we will preserve satisfiability!

Intuition

Consider ∃x A(x)

There is x such that A(x) is trueReplace x with a fresh constant cThe Skolem formula will be A(c)

Consider ∀x∃y B(x , y)

Can we replace y by a constant d?

A such that DA = N+ and BA = {(x , y) | x divides y}Is d a multiple of every natural number?

Let’s replace y by a function f (x)

8 / 23

Page 16: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Skolemization (1)

Can we further simplify the structure of a wff?Can we remove existential quantifiers?Yes, by introducing Skolem functions!However, equivalence will not hold anymoreStill we will preserve satisfiability!

Intuition

Consider ∃x A(x)

There is x such that A(x) is trueReplace x with a fresh constant cThe Skolem formula will be A(c)

Consider ∀x∃y B(x , y)

Can we replace y by a constant d?

A such that DA = N+ and BA = {(x , y) | x divides y}Is d a multiple of every natural number?

Let’s replace y by a function f (x)

8 / 23

Page 17: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Skolemization (1)

Can we further simplify the structure of a wff?Can we remove existential quantifiers?Yes, by introducing Skolem functions!However, equivalence will not hold anymoreStill we will preserve satisfiability!

Intuition

Consider ∃x A(x)

There is x such that A(x) is trueReplace x with a fresh constant cThe Skolem formula will be A(c)

Consider ∀x∃y B(x , y)

Can we replace y by a constant d?

A such that DA = N+ and BA = {(x , y) | x divides y}Is d a multiple of every natural number?

Let’s replace y by a function f (x)

8 / 23

Page 18: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Skolemization (1)

Can we further simplify the structure of a wff?Can we remove existential quantifiers?Yes, by introducing Skolem functions!However, equivalence will not hold anymoreStill we will preserve satisfiability!

Intuition

Consider ∃x A(x)

There is x such that A(x) is true

Replace x with a fresh constant cThe Skolem formula will be A(c)

Consider ∀x∃y B(x , y)

Can we replace y by a constant d?

A such that DA = N+ and BA = {(x , y) | x divides y}Is d a multiple of every natural number?

Let’s replace y by a function f (x)

8 / 23

Page 19: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Skolemization (1)

Can we further simplify the structure of a wff?Can we remove existential quantifiers?Yes, by introducing Skolem functions!However, equivalence will not hold anymoreStill we will preserve satisfiability!

Intuition

Consider ∃x A(x)

There is x such that A(x) is trueReplace x with a fresh constant c

The Skolem formula will be A(c)

Consider ∀x∃y B(x , y)

Can we replace y by a constant d?

A such that DA = N+ and BA = {(x , y) | x divides y}Is d a multiple of every natural number?

Let’s replace y by a function f (x)

8 / 23

Page 20: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Skolemization (1)

Can we further simplify the structure of a wff?Can we remove existential quantifiers?Yes, by introducing Skolem functions!However, equivalence will not hold anymoreStill we will preserve satisfiability!

Intuition

Consider ∃x A(x)

There is x such that A(x) is trueReplace x with a fresh constant cThe Skolem formula will be A(c)

Consider ∀x∃y B(x , y)

Can we replace y by a constant d?

A such that DA = N+ and BA = {(x , y) | x divides y}Is d a multiple of every natural number?

Let’s replace y by a function f (x)

8 / 23

Page 21: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Skolemization (1)

Can we further simplify the structure of a wff?Can we remove existential quantifiers?Yes, by introducing Skolem functions!However, equivalence will not hold anymoreStill we will preserve satisfiability!

Intuition

Consider ∃x A(x)

There is x such that A(x) is trueReplace x with a fresh constant cThe Skolem formula will be A(c)

Consider ∀x∃y B(x , y)

Can we replace y by a constant d?

A such that DA = N+ and BA = {(x , y) | x divides y}Is d a multiple of every natural number?

Let’s replace y by a function f (x)

8 / 23

Page 22: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Skolemization (1)

Can we further simplify the structure of a wff?Can we remove existential quantifiers?Yes, by introducing Skolem functions!However, equivalence will not hold anymoreStill we will preserve satisfiability!

Intuition

Consider ∃x A(x)

There is x such that A(x) is trueReplace x with a fresh constant cThe Skolem formula will be A(c)

Consider ∀x∃y B(x , y)

Can we replace y by a constant d?

A such that DA = N+ and BA = {(x , y) | x divides y}Is d a multiple of every natural number?

Let’s replace y by a function f (x)

8 / 23

Page 23: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Skolemization (1)

Can we further simplify the structure of a wff?Can we remove existential quantifiers?Yes, by introducing Skolem functions!However, equivalence will not hold anymoreStill we will preserve satisfiability!

Intuition

Consider ∃x A(x)

There is x such that A(x) is trueReplace x with a fresh constant cThe Skolem formula will be A(c)

Consider ∀x∃y B(x , y)

Can we replace y by a constant d?A such that DA = N+ and BA = {(x , y) | x divides y}

Is d a multiple of every natural number?

Let’s replace y by a function f (x)

8 / 23

Page 24: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Skolemization (1)

Can we further simplify the structure of a wff?Can we remove existential quantifiers?Yes, by introducing Skolem functions!However, equivalence will not hold anymoreStill we will preserve satisfiability!

Intuition

Consider ∃x A(x)

There is x such that A(x) is trueReplace x with a fresh constant cThe Skolem formula will be A(c)

Consider ∀x∃y B(x , y)

Can we replace y by a constant d?A such that DA = N+ and BA = {(x , y) | x divides y}Is d a multiple of every natural number?

Let’s replace y by a function f (x)

8 / 23

Page 25: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Skolemization (1)

Can we further simplify the structure of a wff?Can we remove existential quantifiers?Yes, by introducing Skolem functions!However, equivalence will not hold anymoreStill we will preserve satisfiability!

Intuition

Consider ∃x A(x)

There is x such that A(x) is trueReplace x with a fresh constant cThe Skolem formula will be A(c)

Consider ∀x∃y B(x , y)

Can we replace y by a constant d?A such that DA = N+ and BA = {(x , y) | x divides y}Is d a multiple of every natural number?

Let’s replace y by a function f (x)8 / 23

Page 26: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Skolemization (2)

Skolem Normal Form

Let φ be a wff. φSNF is obtained as follows:1 Compute the prenex normal form of φ

γ := Q1x1 · · · Qn xn ψ

2 If γ has no existential quantifier then stop3 Let i ∈ {1, . . . ,n} be the first existential quantifier4 Modify γ:

Remove the quantifier QixiReplace xi by f (x1, . . . , xi−1)where f is a fresh function symbol of arity i − 1

5 Go to 2

Functions introduced by the Skolemization are calledSkolem functions

9 / 23

Page 27: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Skolemization (2)

Skolem Normal Form

Let φ be a wff. φSNF is obtained as follows:1 Compute the prenex normal form of φ

γ := Q1x1 · · · Qn xn ψ

2 If γ has no existential quantifier then stop3 Let i ∈ {1, . . . ,n} be the first existential quantifier4 Modify γ:

Remove the quantifier QixiReplace xi by f (x1, . . . , xi−1)where f is a fresh function symbol of arity i − 1

5 Go to 2

Functions introduced by the Skolemization are calledSkolem functions

9 / 23

Page 28: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Skolemization (3)

Theorem

Let φ be a wff.φ is satisfiable if and only if φSNF is satisfiable.

Corollary

Let φ be a wff.φ is satisfiable if and only if Ex(φ)SNF is satisfiable.

Let’s consider only closed formulas!

10 / 23

Page 29: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Skolemization (3)

Theorem

Let φ be a wff.φ is satisfiable if and only if φSNF is satisfiable.

Corollary

Let φ be a wff.φ is satisfiable if and only if Ex(φ)SNF is satisfiable.

Let’s consider only closed formulas!

10 / 23

Page 30: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Skolemization (3)

Theorem

Let φ be a wff.φ is satisfiable if and only if φSNF is satisfiable.

Corollary

Let φ be a wff.φ is satisfiable if and only if Ex(φ)SNF is satisfiable.

Let’s consider only closed formulas!

10 / 23

Page 31: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Outline

1 Normal formsPrenex Normal FormSkolemization

2 Herbrand theoryIntuitionMain statement

3 Exercises

11 / 23

Page 32: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Outline

1 Normal formsPrenex Normal FormSkolemization

2 Herbrand theoryIntuitionMain statement

3 Exercises

12 / 23

Page 33: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Herbrand intuition

So many models! Even for a simple formula like P(c) thereare infinitely many structures and models

A1 6|= P(c)

DA1 = {a}cA1 = aPA1(a) = 0

A2 |= P(c)

DA2 = {a}cA2 = aPA2(a) = 1

A3 6|= P(c)

DA3 = {b}cA3 = bPA3(b) = 0

A4 |= P(c)

DA4 = {b}cA4 = bPA4(b) = 1

A5 6|= P(c)

DA5 = {a, b}cA5 = bPA5(b) = 0PA5(a) = 0(or PA5(a) = 1)

A6 |= P(c)

DA6 = {a, b}cA6 = bPA6(b) = 1PA6(a) = 0(or PA6(a) = 1)

A7 6|= P(c)

DA7 = {a, b}cA7 = aPA7(a) = 0PA7(b) = 0(or PA7(b) = 1)

A8 |= P(c)

DA8 = {a, b}cA8 = aPA8(a) = 1PA8(b) = 0(or PA8(b) = 1)

All structures are quite similar!Changing domains does not seem to change muchThe interpretation of predicates appears crucialThe interpretation of functions appears to be isomorphicfor different domains

13 / 23

Page 34: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Herbrand intuition

So many models! Even for a simple formula like P(c) thereare infinitely many structures and models

A1 6|= P(c)

DA1 = {a}cA1 = aPA1(a) = 0

A2 |= P(c)

DA2 = {a}cA2 = aPA2(a) = 1

A3 6|= P(c)

DA3 = {b}cA3 = bPA3(b) = 0

A4 |= P(c)

DA4 = {b}cA4 = bPA4(b) = 1

A5 6|= P(c)

DA5 = {a, b}cA5 = bPA5(b) = 0PA5(a) = 0(or PA5(a) = 1)

A6 |= P(c)

DA6 = {a, b}cA6 = bPA6(b) = 1PA6(a) = 0(or PA6(a) = 1)

A7 6|= P(c)

DA7 = {a, b}cA7 = aPA7(a) = 0PA7(b) = 0(or PA7(b) = 1)

A8 |= P(c)

DA8 = {a, b}cA8 = aPA8(a) = 1PA8(b) = 0(or PA8(b) = 1)

All structures are quite similar!Changing domains does not seem to change muchThe interpretation of predicates appears crucialThe interpretation of functions appears to be isomorphicfor different domains

13 / 23

Page 35: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Herbrand intuition

So many models! Even for a simple formula like P(c) thereare infinitely many structures and models

A1 6|= P(c)

DA1 = {a}cA1 = aPA1(a) = 0

A2 |= P(c)

DA2 = {a}cA2 = aPA2(a) = 1

A3 6|= P(c)

DA3 = {b}cA3 = bPA3(b) = 0

A4 |= P(c)

DA4 = {b}cA4 = bPA4(b) = 1

A5 6|= P(c)

DA5 = {a, b}cA5 = bPA5(b) = 0PA5(a) = 0(or PA5(a) = 1)

A6 |= P(c)

DA6 = {a, b}cA6 = bPA6(b) = 1PA6(a) = 0(or PA6(a) = 1)

A7 6|= P(c)

DA7 = {a, b}cA7 = aPA7(a) = 0PA7(b) = 0(or PA7(b) = 1)

A8 |= P(c)

DA8 = {a, b}cA8 = aPA8(a) = 1PA8(b) = 0(or PA8(b) = 1)

All structures are quite similar!Changing domains does not seem to change muchThe interpretation of predicates appears crucialThe interpretation of functions appears to be isomorphicfor different domains

13 / 23

Page 36: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Herbrand intuition

So many models! Even for a simple formula like P(c) thereare infinitely many structures and models

A1 6|= P(c)

DA1 = {a}cA1 = aPA1(a) = 0

A2 |= P(c)

DA2 = {a}cA2 = aPA2(a) = 1

A3 6|= P(c)

DA3 = {b}cA3 = bPA3(b) = 0

A4 |= P(c)

DA4 = {b}cA4 = bPA4(b) = 1

A5 6|= P(c)

DA5 = {a, b}cA5 = bPA5(b) = 0PA5(a) = 0(or PA5(a) = 1)

A6 |= P(c)

DA6 = {a, b}cA6 = bPA6(b) = 1PA6(a) = 0(or PA6(a) = 1)

A7 6|= P(c)

DA7 = {a, b}cA7 = aPA7(a) = 0PA7(b) = 0(or PA7(b) = 1)

A8 |= P(c)

DA8 = {a, b}cA8 = aPA8(a) = 1PA8(b) = 0(or PA8(b) = 1)

All structures are quite similar!Changing domains does not seem to change muchThe interpretation of predicates appears crucialThe interpretation of functions appears to be isomorphicfor different domains

13 / 23

Page 37: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Herbrand intuition

So many models! Even for a simple formula like P(c) thereare infinitely many structures and models

A1 6|= P(c)

DA1 = {a}cA1 = aPA1(a) = 0

A2 |= P(c)

DA2 = {a}cA2 = aPA2(a) = 1

A3 6|= P(c)

DA3 = {b}cA3 = bPA3(b) = 0

A4 |= P(c)

DA4 = {b}cA4 = bPA4(b) = 1

A5 6|= P(c)

DA5 = {a, b}cA5 = bPA5(b) = 0PA5(a) = 0(or PA5(a) = 1)

A6 |= P(c)

DA6 = {a, b}cA6 = bPA6(b) = 1PA6(a) = 0(or PA6(a) = 1)

A7 6|= P(c)

DA7 = {a, b}cA7 = aPA7(a) = 0PA7(b) = 0(or PA7(b) = 1)

A8 |= P(c)

DA8 = {a, b}cA8 = aPA8(a) = 1PA8(b) = 0(or PA8(b) = 1)

All structures are quite similar!Changing domains does not seem to change muchThe interpretation of predicates appears crucialThe interpretation of functions appears to be isomorphicfor different domains

13 / 23

Page 38: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Herbrand intuition

So many models! Even for a simple formula like P(c) thereare infinitely many structures and models

A1 6|= P(c)

DA1 = {a}cA1 = aPA1(a) = 0

A2 |= P(c)

DA2 = {a}cA2 = aPA2(a) = 1

A3 6|= P(c)

DA3 = {b}cA3 = bPA3(b) = 0

A4 |= P(c)

DA4 = {b}cA4 = bPA4(b) = 1

A5 6|= P(c)

DA5 = {a, b}cA5 = bPA5(b) = 0PA5(a) = 0(or PA5(a) = 1)

A6 |= P(c)

DA6 = {a, b}cA6 = bPA6(b) = 1PA6(a) = 0(or PA6(a) = 1)

A7 6|= P(c)

DA7 = {a, b}cA7 = aPA7(a) = 0PA7(b) = 0(or PA7(b) = 1)

A8 |= P(c)

DA8 = {a, b}cA8 = aPA8(a) = 1PA8(b) = 0(or PA8(b) = 1)

All structures are quite similar!Changing domains does not seem to change muchThe interpretation of predicates appears crucialThe interpretation of functions appears to be isomorphicfor different domains

13 / 23

Page 39: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Herbrand intuition

So many models! Even for a simple formula like P(c) thereare infinitely many structures and models

A1 6|= P(c)

DA1 = {a}cA1 = aPA1(a) = 0

A2 |= P(c)

DA2 = {a}cA2 = aPA2(a) = 1

A3 6|= P(c)

DA3 = {b}cA3 = bPA3(b) = 0

A4 |= P(c)

DA4 = {b}cA4 = bPA4(b) = 1

A5 6|= P(c)

DA5 = {a, b}cA5 = bPA5(b) = 0PA5(a) = 0(or PA5(a) = 1)

A6 |= P(c)

DA6 = {a, b}cA6 = bPA6(b) = 1PA6(a) = 0(or PA6(a) = 1)

A7 6|= P(c)

DA7 = {a, b}cA7 = aPA7(a) = 0PA7(b) = 0(or PA7(b) = 1)

A8 |= P(c)

DA8 = {a, b}cA8 = aPA8(a) = 1PA8(b) = 0(or PA8(b) = 1)

All structures are quite similar!Changing domains does not seem to change muchThe interpretation of predicates appears crucialThe interpretation of functions appears to be isomorphicfor different domains

13 / 23

Page 40: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Herbrand intuition

So many models! Even for a simple formula like P(c) thereare infinitely many structures and models

A1 6|= P(c)

DA1 = {a}cA1 = aPA1(a) = 0

A2 |= P(c)

DA2 = {a}cA2 = aPA2(a) = 1

A3 6|= P(c)

DA3 = {b}cA3 = bPA3(b) = 0

A4 |= P(c)

DA4 = {b}cA4 = bPA4(b) = 1

A5 6|= P(c)

DA5 = {a, b}cA5 = bPA5(b) = 0PA5(a) = 0(or PA5(a) = 1)

A6 |= P(c)

DA6 = {a, b}cA6 = bPA6(b) = 1PA6(a) = 0(or PA6(a) = 1)

A7 6|= P(c)

DA7 = {a, b}cA7 = aPA7(a) = 0PA7(b) = 0(or PA7(b) = 1)

A8 |= P(c)

DA8 = {a, b}cA8 = aPA8(a) = 1PA8(b) = 0(or PA8(b) = 1)

All structures are quite similar!Changing domains does not seem to change muchThe interpretation of predicates appears crucialThe interpretation of functions appears to be isomorphicfor different domains

13 / 23

Page 41: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Herbrand intuition

So many models! Even for a simple formula like P(c) thereare infinitely many structures and models

A1 6|= P(c)

DA1 = {a}cA1 = aPA1(a) = 0

A2 |= P(c)

DA2 = {a}cA2 = aPA2(a) = 1

A3 6|= P(c)

DA3 = {b}cA3 = bPA3(b) = 0

A4 |= P(c)

DA4 = {b}cA4 = bPA4(b) = 1

A5 6|= P(c)

DA5 = {a, b}cA5 = bPA5(b) = 0PA5(a) = 0(or PA5(a) = 1)

A6 |= P(c)

DA6 = {a, b}cA6 = bPA6(b) = 1PA6(a) = 0(or PA6(a) = 1)

A7 6|= P(c)

DA7 = {a, b}cA7 = aPA7(a) = 0PA7(b) = 0(or PA7(b) = 1)

A8 |= P(c)

DA8 = {a, b}cA8 = aPA8(a) = 1PA8(b) = 0(or PA8(b) = 1)

All structures are quite similar!Changing domains does not seem to change muchThe interpretation of predicates appears crucialThe interpretation of functions appears to be isomorphicfor different domains

13 / 23

Page 42: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Herbrand intuition

So many models! Even for a simple formula like P(c) thereare infinitely many structures and models

A1 6|= P(c)

DA1 = {a}cA1 = aPA1(a) = 0

A2 |= P(c)

DA2 = {a}cA2 = aPA2(a) = 1

A3 6|= P(c)

DA3 = {b}cA3 = bPA3(b) = 0

A4 |= P(c)

DA4 = {b}cA4 = bPA4(b) = 1

A5 6|= P(c)

DA5 = {a, b}cA5 = bPA5(b) = 0PA5(a) = 0(or PA5(a) = 1)

A6 |= P(c)

DA6 = {a, b}cA6 = bPA6(b) = 1PA6(a) = 0(or PA6(a) = 1)

A7 6|= P(c)

DA7 = {a, b}cA7 = aPA7(a) = 0PA7(b) = 0(or PA7(b) = 1)

A8 |= P(c)

DA8 = {a, b}cA8 = aPA8(a) = 1PA8(b) = 0(or PA8(b) = 1)

All structures are quite similar!

Changing domains does not seem to change muchThe interpretation of predicates appears crucialThe interpretation of functions appears to be isomorphicfor different domains

13 / 23

Page 43: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Herbrand intuition

So many models! Even for a simple formula like P(c) thereare infinitely many structures and models

A1 6|= P(c)

DA1 = {a}cA1 = aPA1(a) = 0

A2 |= P(c)

DA2 = {a}cA2 = aPA2(a) = 1

A3 6|= P(c)

DA3 = {b}cA3 = bPA3(b) = 0

A4 |= P(c)

DA4 = {b}cA4 = bPA4(b) = 1

A5 6|= P(c)

DA5 = {a, b}cA5 = bPA5(b) = 0PA5(a) = 0(or PA5(a) = 1)

A6 |= P(c)

DA6 = {a, b}cA6 = bPA6(b) = 1PA6(a) = 0(or PA6(a) = 1)

A7 6|= P(c)

DA7 = {a, b}cA7 = aPA7(a) = 0PA7(b) = 0(or PA7(b) = 1)

A8 |= P(c)

DA8 = {a, b}cA8 = aPA8(a) = 1PA8(b) = 0(or PA8(b) = 1)

All structures are quite similar!Changing domains does not seem to change much

The interpretation of predicates appears crucialThe interpretation of functions appears to be isomorphicfor different domains

13 / 23

Page 44: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Herbrand intuition

So many models! Even for a simple formula like P(c) thereare infinitely many structures and models

A1 6|= P(c)

DA1 = {a}cA1 = aPA1(a) = 0

A2 |= P(c)

DA2 = {a}cA2 = aPA2(a) = 1

A3 6|= P(c)

DA3 = {b}cA3 = bPA3(b) = 0

A4 |= P(c)

DA4 = {b}cA4 = bPA4(b) = 1

A5 6|= P(c)

DA5 = {a, b}cA5 = bPA5(b) = 0PA5(a) = 0(or PA5(a) = 1)

A6 |= P(c)

DA6 = {a, b}cA6 = bPA6(b) = 1PA6(a) = 0(or PA6(a) = 1)

A7 6|= P(c)

DA7 = {a, b}cA7 = aPA7(a) = 0PA7(b) = 0(or PA7(b) = 1)

A8 |= P(c)

DA8 = {a, b}cA8 = aPA8(a) = 1PA8(b) = 0(or PA8(b) = 1)

All structures are quite similar!Changing domains does not seem to change muchThe interpretation of predicates appears crucial

The interpretation of functions appears to be isomorphicfor different domains

13 / 23

Page 45: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Herbrand intuition

So many models! Even for a simple formula like P(c) thereare infinitely many structures and models

A1 6|= P(c)

DA1 = {a}cA1 = aPA1(a) = 0

A2 |= P(c)

DA2 = {a}cA2 = aPA2(a) = 1

A3 6|= P(c)

DA3 = {b}cA3 = bPA3(b) = 0

A4 |= P(c)

DA4 = {b}cA4 = bPA4(b) = 1

A5 6|= P(c)

DA5 = {a, b}cA5 = bPA5(b) = 0PA5(a) = 0(or PA5(a) = 1)

A6 |= P(c)

DA6 = {a, b}cA6 = bPA6(b) = 1PA6(a) = 0(or PA6(a) = 1)

A7 6|= P(c)

DA7 = {a, b}cA7 = aPA7(a) = 0PA7(b) = 0(or PA7(b) = 1)

A8 |= P(c)

DA8 = {a, b}cA8 = aPA8(a) = 1PA8(b) = 0(or PA8(b) = 1)

All structures are quite similar!Changing domains does not seem to change muchThe interpretation of predicates appears crucialThe interpretation of functions appears to be isomorphicfor different domains 13 / 23

Page 46: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Cardinality of domain

Changing domains does not seem to change much

But...

P(c) ∧ ¬P(d)

A |= P(c) ∧ ¬P(d)

DA = {a,b}cA = adA = bPA(a) = 1PA(b) = 0

Is there a model whose domain has cardinality 1?No, there isn’t!Cardinality of the domain is important

14 / 23

Page 47: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Cardinality of domain

Changing domains does not seem to change muchBut...

P(c) ∧ ¬P(d)

A |= P(c) ∧ ¬P(d)

DA = {a,b}cA = adA = bPA(a) = 1PA(b) = 0

Is there a model whose domain has cardinality 1?No, there isn’t!Cardinality of the domain is important

14 / 23

Page 48: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Cardinality of domain

Changing domains does not seem to change muchBut...

P(c) ∧ ¬P(d)

A |= P(c) ∧ ¬P(d)

DA = {a,b}cA = adA = bPA(a) = 1PA(b) = 0

Is there a model whose domain has cardinality 1?No, there isn’t!Cardinality of the domain is important

14 / 23

Page 49: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Cardinality of domain

Changing domains does not seem to change muchBut...

P(c) ∧ ¬P(d)

A |= P(c) ∧ ¬P(d)

DA = {a,b}cA = adA = bPA(a) = 1PA(b) = 0

Is there a model whose domain has cardinality 1?

No, there isn’t!Cardinality of the domain is important

14 / 23

Page 50: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Cardinality of domain

Changing domains does not seem to change muchBut...

P(c) ∧ ¬P(d)

A |= P(c) ∧ ¬P(d)

DA = {a,b}cA = adA = bPA(a) = 1PA(b) = 0

Is there a model whose domain has cardinality 1?No, there isn’t!

Cardinality of the domain is important

14 / 23

Page 51: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Cardinality of domain

Changing domains does not seem to change muchBut...

P(c) ∧ ¬P(d)

A |= P(c) ∧ ¬P(d)

DA = {a,b}cA = adA = bPA(a) = 1PA(b) = 0

Is there a model whose domain has cardinality 1?No, there isn’t!Cardinality of the domain is important

14 / 23

Page 52: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Outline

1 Normal formsPrenex Normal FormSkolemization

2 Herbrand theoryIntuitionMain statement

3 Exercises

15 / 23

Page 53: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Herbrand models (1)

Herbrand interpretation — H

Use the set of ground terms of the formula as domain!This domain is called Herbrand universeNote: If the language contains no constant, add anarbitrary constant

Interpret function symbols as themselvescH = c for constantsfH(t1, . . . , tn) = f (tH1 , . . . , t

Hn )

Note: Interpretations of predicates is not fixedHerbrand base: {P(t1, . . . , tn) | P is a predicate of arity n,

t1, . . . , tn are ground terms }Each predicate is a subset of the Herbrand base

An Herbrand model of a set Γ of wffs is anHerbrand interpretation satisfying Γ

16 / 23

Page 54: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Herbrand models (1)

Herbrand interpretation — H

Use the set of ground terms of the formula as domain!This domain is called Herbrand universeNote: If the language contains no constant, add anarbitrary constant

Interpret function symbols as themselvescH = c for constantsfH(t1, . . . , tn) = f (tH1 , . . . , t

Hn )

Note: Interpretations of predicates is not fixedHerbrand base: {P(t1, . . . , tn) | P is a predicate of arity n,

t1, . . . , tn are ground terms }Each predicate is a subset of the Herbrand base

An Herbrand model of a set Γ of wffs is anHerbrand interpretation satisfying Γ

16 / 23

Page 55: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Herbrand models (1)

Herbrand interpretation — H

Use the set of ground terms of the formula as domain!This domain is called Herbrand universeNote: If the language contains no constant, add anarbitrary constant

Interpret function symbols as themselvescH = c for constantsfH(t1, . . . , tn) = f (tH1 , . . . , t

Hn )

Note: Interpretations of predicates is not fixed

Herbrand base: {P(t1, . . . , tn) | P is a predicate of arity n,t1, . . . , tn are ground terms }

Each predicate is a subset of the Herbrand base

An Herbrand model of a set Γ of wffs is anHerbrand interpretation satisfying Γ

16 / 23

Page 56: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Herbrand models (1)

Herbrand interpretation — H

Use the set of ground terms of the formula as domain!This domain is called Herbrand universeNote: If the language contains no constant, add anarbitrary constant

Interpret function symbols as themselvescH = c for constantsfH(t1, . . . , tn) = f (tH1 , . . . , t

Hn )

Note: Interpretations of predicates is not fixedHerbrand base: {P(t1, . . . , tn) | P is a predicate of arity n,

t1, . . . , tn are ground terms }

Each predicate is a subset of the Herbrand base

An Herbrand model of a set Γ of wffs is anHerbrand interpretation satisfying Γ

16 / 23

Page 57: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Herbrand models (1)

Herbrand interpretation — H

Use the set of ground terms of the formula as domain!This domain is called Herbrand universeNote: If the language contains no constant, add anarbitrary constant

Interpret function symbols as themselvescH = c for constantsfH(t1, . . . , tn) = f (tH1 , . . . , t

Hn )

Note: Interpretations of predicates is not fixedHerbrand base: {P(t1, . . . , tn) | P is a predicate of arity n,

t1, . . . , tn are ground terms }Each predicate is a subset of the Herbrand base

An Herbrand model of a set Γ of wffs is anHerbrand interpretation satisfying Γ

16 / 23

Page 58: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Herbrand models (1)

Herbrand interpretation — H

Use the set of ground terms of the formula as domain!This domain is called Herbrand universeNote: If the language contains no constant, add anarbitrary constant

Interpret function symbols as themselvescH = c for constantsfH(t1, . . . , tn) = f (tH1 , . . . , t

Hn )

Note: Interpretations of predicates is not fixedHerbrand base: {P(t1, . . . , tn) | P is a predicate of arity n,

t1, . . . , tn are ground terms }Each predicate is a subset of the Herbrand base

An Herbrand model of a set Γ of wffs is anHerbrand interpretation satisfying Γ

16 / 23

Page 59: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Herbrand models (2)

Example

1 N(o)

2 ∀x (N(x)→ N(s(x)))

3 ∀x ∀y (¬E(x , y)→ ¬E(s(x), s(y)))

4 ∀x ¬E(s(x),o)

DH = {o, s(o), s(s(o)), s(s(s(o))), . . .}oA = osA(o) = s(o); sA(s(o)) = s(s(o));sA(s(s(o))) = s(s(s(o)); ...NA(o) = 1; NA(s(o)) = 1; NA(s(s(o))) = 1; ...EA(o,o) = 1; EA(o, s(o)) = 0; EA(s(o),o) = 0;EA(s(o), s(o)) = 1; EA(s(o), s(s(o))) = 0; ...

17 / 23

Page 60: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Herbrand models (3)

Theorem

Let Γ be a set of closed wffs in Skolem normal form.Γ is satisfiable if and only if Γ has a Herbrand model.

Sketch. (⇐) Immediate.(⇒) Use structural induction. For the universal quantifier usethe following lemma:

Translation Lemma

For any wff φ we have

ν(A,ξA)(φ[t/x ]) = ν(A,ξ

A[ν(A,ξA)(t)/x ])(φ)

Read as follows: The evaluation of φ[t/x ] wrt (A, ξA) is equal tothe evaluation of φ wrt (A, ξA[ν(A,ξ

A)(t)/x ])

18 / 23

Page 61: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

An application of the Compactness Theorem (1)

We cannot check all Herbrand interpretations!

We were actually interested in modeling unsatisfiability

Definition

Let φ = ∀x1 · · · ∀xn ψ be a formula in Skolem normal form.The Herbrand expansion of φ, denoted ε(φ), is the following setof ground formulas:

ε(φ) = {ψ[t1/x1, . . . , tn/xn] | t1, . . . , tn ∈ DH}

ε(φ) is a set of propositional wffsφ is satisfiable if and only if ε(φ) is satisfiableBy the Compactness Theorem, ε(φ) is unsatisfiable if andonly if there is a finite subset of ε(φ) that is unsatisfiable

19 / 23

Page 62: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

An application of the Compactness Theorem (1)

We cannot check all Herbrand interpretations!We were actually interested in modeling unsatisfiability

Definition

Let φ = ∀x1 · · · ∀xn ψ be a formula in Skolem normal form.The Herbrand expansion of φ, denoted ε(φ), is the following setof ground formulas:

ε(φ) = {ψ[t1/x1, . . . , tn/xn] | t1, . . . , tn ∈ DH}

ε(φ) is a set of propositional wffsφ is satisfiable if and only if ε(φ) is satisfiableBy the Compactness Theorem, ε(φ) is unsatisfiable if andonly if there is a finite subset of ε(φ) that is unsatisfiable

19 / 23

Page 63: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

An application of the Compactness Theorem (1)

We cannot check all Herbrand interpretations!We were actually interested in modeling unsatisfiability

Definition

Let φ = ∀x1 · · · ∀xn ψ be a formula in Skolem normal form.The Herbrand expansion of φ, denoted ε(φ), is the following setof ground formulas:

ε(φ) = {ψ[t1/x1, . . . , tn/xn] | t1, . . . , tn ∈ DH}

ε(φ) is a set of propositional wffsφ is satisfiable if and only if ε(φ) is satisfiableBy the Compactness Theorem, ε(φ) is unsatisfiable if andonly if there is a finite subset of ε(φ) that is unsatisfiable

19 / 23

Page 64: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

An application of the Compactness Theorem (1)

We cannot check all Herbrand interpretations!We were actually interested in modeling unsatisfiability

Definition

Let φ = ∀x1 · · · ∀xn ψ be a formula in Skolem normal form.The Herbrand expansion of φ, denoted ε(φ), is the following setof ground formulas:

ε(φ) = {ψ[t1/x1, . . . , tn/xn] | t1, . . . , tn ∈ DH}

ε(φ) is a set of propositional wffs

φ is satisfiable if and only if ε(φ) is satisfiableBy the Compactness Theorem, ε(φ) is unsatisfiable if andonly if there is a finite subset of ε(φ) that is unsatisfiable

19 / 23

Page 65: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

An application of the Compactness Theorem (1)

We cannot check all Herbrand interpretations!We were actually interested in modeling unsatisfiability

Definition

Let φ = ∀x1 · · · ∀xn ψ be a formula in Skolem normal form.The Herbrand expansion of φ, denoted ε(φ), is the following setof ground formulas:

ε(φ) = {ψ[t1/x1, . . . , tn/xn] | t1, . . . , tn ∈ DH}

ε(φ) is a set of propositional wffsφ is satisfiable if and only if ε(φ) is satisfiable

By the Compactness Theorem, ε(φ) is unsatisfiable if andonly if there is a finite subset of ε(φ) that is unsatisfiable

19 / 23

Page 66: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

An application of the Compactness Theorem (1)

We cannot check all Herbrand interpretations!We were actually interested in modeling unsatisfiability

Definition

Let φ = ∀x1 · · · ∀xn ψ be a formula in Skolem normal form.The Herbrand expansion of φ, denoted ε(φ), is the following setof ground formulas:

ε(φ) = {ψ[t1/x1, . . . , tn/xn] | t1, . . . , tn ∈ DH}

ε(φ) is a set of propositional wffsφ is satisfiable if and only if ε(φ) is satisfiableBy the Compactness Theorem, ε(φ) is unsatisfiable if andonly if there is a finite subset of ε(φ) that is unsatisfiable

19 / 23

Page 67: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

An application of the Compactness Theorem (2)

Let φ be a formula in Skolem normal formFix an enumeration for the elements of ε(φ)

Algorithm

1 n := 02 n := n + 13 If φ1 ∧ · · · ∧ φn is unsatisfiable then output φ is unsatisfiable4 Go to 2

How to check unsatisfiability of a set Γ of wffs?

20 / 23

Page 68: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

An application of the Compactness Theorem (2)

Let φ be a formula in Skolem normal formFix an enumeration for the elements of ε(φ)

Algorithm

1 n := 02 n := n + 13 If φ1 ∧ · · · ∧ φn is unsatisfiable then output φ is unsatisfiable4 Go to 2

How to check unsatisfiability of a set Γ of wffs?

20 / 23

Page 69: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Outline

1 Normal formsPrenex Normal FormSkolemization

2 Herbrand theoryIntuitionMain statement

3 Exercises

21 / 23

Page 70: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

Exercises (1)

1 Transform the formula

¬∃u ((∀x P(x ,u))→ (∀y∃z (∀v Q(u, v , y , z)∧∀w Q(w ,u, z, y))))

into Skolem Normal Form2 Solve Exercise 3.8, 3.9, 3.10 and 3.15 in the booklet of

Ghidini and Serafini (not using the solution!)3 Exercises from 3.16 to the end of the chapter ask to model

a scenario. Have a look at them!

22 / 23

Page 71: First-order logic Normal forms and Herbrand theoryalviano/archives/teaching/krr-2017...Prenex Normal Form Formulas of the following type are in Prenex Normal Form: Q1x1 Q n xn ˚ where

END OF THELECTURE

23 / 23