Post on 11-Jan-2020
First-order logicNormal forms and Herbrand theory
Mario Alviano
University of Calabria, Italy
A.Y. 2017/2018
1 / 23
Outline
1 Normal formsPrenex Normal FormSkolemization
2 Herbrand theoryIntuitionMain statement
3 Exercises
2 / 23
Outline
1 Normal formsPrenex Normal FormSkolemization
2 Herbrand theoryIntuitionMain statement
3 Exercises
3 / 23
Outline
1 Normal formsPrenex Normal FormSkolemization
2 Herbrand theoryIntuitionMain statement
3 Exercises
4 / 23
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
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
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
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
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
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
Outline
1 Normal formsPrenex Normal FormSkolemization
2 Herbrand theoryIntuitionMain statement
3 Exercises
7 / 23
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Outline
1 Normal formsPrenex Normal FormSkolemization
2 Herbrand theoryIntuitionMain statement
3 Exercises
11 / 23
Outline
1 Normal formsPrenex Normal FormSkolemization
2 Herbrand theoryIntuitionMain statement
3 Exercises
12 / 23
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Outline
1 Normal formsPrenex Normal FormSkolemization
2 Herbrand theoryIntuitionMain statement
3 Exercises
15 / 23
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Outline
1 Normal formsPrenex Normal FormSkolemization
2 Herbrand theoryIntuitionMain statement
3 Exercises
21 / 23
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
END OF THELECTURE
23 / 23