Propositional Logic Example
Example
Example
Consider the following sentences:
1
2
3
4
If it rains, the aquaphobes won’t vote
John will win only if the the aquaphobes and
vegetarians vote
Either John or Peter will win, but not both
If it rains, Peter will win.
How would these look in propositional logic?
NC State University
First-Order Logic
1 / 32
Propositional Logic Example
Example
Representation
• R (It rains); A (Aquaphobes Vote); J (John Wins); V
(Vegetarians Vote); P (Peter Wins)
1
2
3
4
If it rains, the aquaphobes won’t vote:
John will win only if the aquaphobes and vegetarians
vote:
Either John or Peter will win, but not both:
If it rains, Peter will win:
NC State University
First-Order Logic
2 / 32
Propositional Logic Example
Example
Representation
• R (It rains); A (Aquaphobes Vote); J (John Wins); V
(Vegetarians Vote); P (Peter Wins)
1
2
3
4
If it rains, the aquaphobes won’t vote: R → ¬A
John will win only if the aquaphobes and vegetarians
vote:
Either John or Peter will win, but not both:
If it rains, Peter will win:
NC State University
First-Order Logic
2 / 32
Propositional Logic Example
Example
Representation
• R (It rains); A (Aquaphobes Vote); J (John Wins); V
(Vegetarians Vote); P (Peter Wins)
1
2
3
4
If it rains, the aquaphobes won’t vote: R → ¬A
John will win only if the aquaphobes and vegetarians
vote: A ∧ V → J
Either John or Peter will win, but not both:
If it rains, Peter will win:
NC State University
First-Order Logic
2 / 32
Propositional Logic Example
Example
Representation
• R (It rains); A (Aquaphobes Vote); J (John Wins); V
(Vegetarians Vote); P (Peter Wins)
1
2
3
4
If it rains, the aquaphobes won’t vote: R → ¬A
John will win only if the aquaphobes and vegetarians
vote: A ∧ V → J
Either John or Peter will win, but not both:
(J ∨ P) ∧ ¬(J ∧ P)
If it rains, Peter will win:
NC State University
First-Order Logic
2 / 32
Propositional Logic Example
Example
Representation
• R (It rains); A (Aquaphobes Vote); J (John Wins); V
(Vegetarians Vote); P (Peter Wins)
1
2
3
4
If it rains, the aquaphobes won’t vote: R → ¬A
John will win only if the aquaphobes and vegetarians
vote: A ∧ V → J
Either John or Peter will win, but not both:
(J ∨ P) ∧ ¬(J ∧ P)
If it rains, Peter will win: R → P
NC State University
First-Order Logic
2 / 32
Propositional Logic Example
Example
More Examples
Consider the following sentences:
• Tweety has feathers.
• Donald has feathers.
• John is the son of Jack.
• If it rains, aquaphobes won’t vote.
• If it is cloudy, some aquaphobes will vote.
Convert them into propositional logic.
NC State University
First-Order Logic
3 / 32
FOL
Motivation
Problems with Propositional Logic
• Propositional logic does not allow us to formulate
general rules or represent relations and is declarative
• Meaning in propositional logic is
context-independent
• Propositional logic has very limited expressive power
• Reasons:
No “domain” variables
• No quantification
•
• Solution:
• Introduce domain variables and quantification
• FOL
NC State University
First-Order Logic
4 / 32
FOL
Motivation
First Order Logic and Propositional
Logic
Propositional logic assumes the world contains facts.
First-order logic assumes the world contains:
• Objects: people, houses, numbers, colors, baseball
games, wars, . . .
• Relations: red, round, siblingof, biggerthan, partof,
comesbetween, . . .
• Functions: onemorethan, plus, . . .
NC State University
First-Order Logic
5 / 32
FOL
Motivation
First Order Logic and Propositional
Logic . . .
Ontological commitment
what a representation assumes about existence.
Temporal logic assumes that facts hold at specific times.
Higher-order logic takes relations and functions of FOL to
be objects themselves.
NC State University
First-Order Logic
6 / 32
FOL
Motivation
First Order Logic and Propositional
Logic . . .
Ontological commitment
what a representation assumes about existence.
Temporal logic assumes that facts hold at specific times.
Higher-order logic takes relations and functions of FOL to
be objects themselves.
Epistemological commitment
what can be known about what exists.
In PL and FOL, sentences are believed to be true or false
(or to have an unknown value).
NC State University
6 / 32
First-Order Logic
FOL
WFFS
Parts of Formulas
Formulas have:
• Variables:
• x,y,z
• Can be instantiated
• Functions:
• f,g,h
• mappings
• Constants:
• 3, John
• Individuals
NC State University
• Predicates:
• P(x,y)
• functions whose range
is {True,False}
• Quantifiers:
• ∀ for all
• ∃ there exists
First-Order Logic
7 / 32
FOL
WFFS
FOL: WFFs
A term is
• A constant, or
• A variable, or
• f (t1 , t2 , . . . , tn ) where f is an n-ary function symbol,
and ti are terms
NC State University
First-Order Logic
8 / 32
FOL
WFFS
FOL: WFFs
Atom
If P is an n-place predicate symbol, and t1 , t2 , . . . , tn are
terms, then
P(t1 , . . . , tn )
is an atom. It is sometimes referred to as an atomic
formula.
Examples
• Reigns(Pope-Innocent-III, Europe, 1200)
• Reigns(You, World, 2013)
NC State University
First-Order Logic
9 / 32
FOL
WFFS
FOL: WFFs. . .
A sentence in FOL is either an atomic sentence or
complex sentence.
A complex sentence is defined as:
Complex sentence:
Sentence, or
¬ Sentence, or
Sentence ∧ Sentence, or
Sentence ∨ Sentence, or
Quantifier Variable Sentence
NC State University
First-Order Logic
10 / 32
FOL
WFFS
Quantification
Universal
∀hVariablesihSentencei
Everyone at NCSU is smart: ∀xAt(x, NCSU) → Smart(x)
∀xP is true in a model m iff P is true where x is each
possible object in the model.
NC State University
First-Order Logic
11 / 32
FOL
WFFS
Quantification
Universal
∀hVariablesihSentencei
Everyone at NCSU is smart: ∀xAt(x, NCSU) → Smart(x)
∀xP is true in a model m iff P is true where x is each
possible object in the model.
Existential
∃hVariablesihSentencei
Someone at NCSU is smart: ∃xAt(x, NCSU) ∧ Smart(x)
∃xP is true in a model m iff P is true where x is some
possible object in the model.
NC State University
11 / 32
First-Order Logic
FOL
WFFS
Quantification
Question: What do the following mean?
• ∀xAt(x, NCSU) ∧ Smart(x)
• ∃xAt(x, NCSU) → Smart(x)
NC State University
First-Order Logic
12 / 32
FOL
WFFS
Quantification . . .
∃x∃y is the same as ∃y∃x. ∀x∀y is the same as ∀y∀x.
But... ∀x∃y is not the same as ∃x∀y.
Consider:
∃x∀yLoves(x, y)
∀y∃xLoves(x, y)
∀x∃yLoves(x, y)
NC State University
First-Order Logic
13 / 32
FOL
WFFS
Quantification . . .
∃x∃y is the same as ∃y∃x. ∀x∀y is the same as ∀y∀x.
But... ∀x∃y is not the same as ∃x∀y.
Consider:
∃x∀yLoves(x, y)
“There is a person who loves everyone in the world”
∀y∃xLoves(x, y)
∀x∃yLoves(x, y)
NC State University
First-Order Logic
13 / 32
FOL
WFFS
Quantification . . .
∃x∃y is the same as ∃y∃x. ∀x∀y is the same as ∀y∀x.
But... ∀x∃y is not the same as ∃x∀y.
Consider:
∃x∀yLoves(x, y)
“There is a person who loves everyone in the world”
∀y∃xLoves(x, y)
“Everyone in the world is loved by at least one person”
∀x∃yLoves(x, y)
NC State University
First-Order Logic
13 / 32
FOL
WFFS
Quantification . . .
∃x∃y is the same as ∃y∃x. ∀x∀y is the same as ∀y∀x.
But... ∀x∃y is not the same as ∃x∀y.
Consider:
∃x∀yLoves(x, y)
“There is a person who loves everyone in the world”
∀y∃xLoves(x, y)
“Everyone in the world is loved by at least one person”
∀x∃yLoves(x, y)
“Everyone in the world loves at least one person”
NC State University
13 / 32
First-Order Logic
FOL
WFFS
Quantification . . .
Quantifier duality: each can be expressed using the other.
∀xLikes(x, IceCream)
¬∃x¬Likes(x, IceCream)
And...
∃xLikes(x, Broccoli)
¬∀x¬Likes(x, Broccoli)
NC State University
First-Order Logic
14 / 32
FOL
WFFS
Free vs Bound Variables
Definition
An occurrence of a variable in a formula is bound iff the
occurrence is in the scope of a quantifier employing the
variable; otherwise it is free.
Examples
• ∀x.P(x, y)
• x is bound
• y is free
Predicate calculus requires all variables to be bound.
NC State University
15 / 32
First-Order Logic
FOL
WFFS
More Examples
Consider the sample sentences again:
• Tweety has feathers.
• Donald has feathers.
• John is the son of Jack.
• If it rains, aquaphobes won’t vote
• If it is cloudy, some aquaphobes will vote
Convert them into Predicate Logic.
NC State University
First-Order Logic
16 / 32
Predicate Logic
A few conventions for FOL
It is important to standardize a few thing to start with:
• Variables will always be lower case letters
• Constants will always be upper case letters
• Try not to use the same name for a function and a
predicate
• predicateName/n represents a predicate that can
taken n arguments
• A predicate may never be nested within another!
NC State University
First-Order Logic
17 / 32
Predicate Logic
Example - Affine Spaces Theorem
Lexicon:
Constants: none
Variables: x, y
Functions: none
Predicates:
affine(x) – x is an affine space
perequiv(x,y) – spaces x and y are perceptually
equivalent
euclidean(x) – x is a Euclidean space
live(x) – we live in space x
trans(x,y) – space y is a transformation of space x
NC State University
18 / 32
First-Order Logic
Predicate Logic
Example - Affine Spaces Theorem
Consider the sentences:
1
2
3
4
5
All affine spaces are perceptually equivalent.
All Euclidean spaces are affine.
Not all affine spaces are Euclidean.
The space we live in is Euclidean.
Not all transformations produce affine spaces.
Prove that:
all affine transformations of the space we live in are
perceptually equivalent to it.
NC State University
First-Order Logic
19 / 32
Predicate Logic
Affine Spaces . . .
1
2
3
4
5
All affine spaces are perceptually equivalent.
All Euclidean spaces are affine.
Not all affine spaces are Euclidean.
The space we live in is Euclidean.
Not all transformations produce affine spaces.
NC State University
First-Order Logic
20 / 32
Predicate Logic
Affine Spaces . . .
1
2
3
4
5
All affine spaces are perceptually equivalent.
∀x(∀y(affine(x) ∧ affine(y) → perequiv(x, y)))
All Euclidean spaces are affine.
Not all affine spaces are Euclidean.
The space we live in is Euclidean.
Not all transformations produce affine spaces.
NC State University
First-Order Logic
20 / 32
Predicate Logic
Affine Spaces . . .
1
2
3
4
5
All affine spaces are perceptually equivalent.
∀x(∀y(affine(x) ∧ affine(y) → perequiv(x, y)))
All Euclidean spaces are affine.
∀x(euclidean(x) → affine(x))
Not all affine spaces are Euclidean.
The space we live in is Euclidean.
Not all transformations produce affine spaces.
NC State University
First-Order Logic
20 / 32
Predicate Logic
Affine Spaces . . .
1
2
3
4
5
All affine spaces are perceptually equivalent.
∀x(∀y(affine(x) ∧ affine(y) → perequiv(x, y)))
All Euclidean spaces are affine.
∀x(euclidean(x) → affine(x))
Not all affine spaces are Euclidean.
∃x(affine(x) ∧ ¬euclidean(x))
The space we live in is Euclidean.
Not all transformations produce affine spaces.
NC State University
First-Order Logic
20 / 32
Predicate Logic
Affine Spaces . . .
1
2
3
4
5
All affine spaces are perceptually equivalent.
∀x(∀y(affine(x) ∧ affine(y) → perequiv(x, y)))
All Euclidean spaces are affine.
∀x(euclidean(x) → affine(x))
Not all affine spaces are Euclidean.
∃x(affine(x) ∧ ¬euclidean(x))
The space we live in is Euclidean.
∀x(live(x) → euclidean(x))
Not all transformations produce affine spaces.
NC State University
First-Order Logic
20 / 32
Predicate Logic
Affine Spaces . . .
1
2
3
4
5
All affine spaces are perceptually equivalent.
∀x(∀y(affine(x) ∧ affine(y) → perequiv(x, y)))
All Euclidean spaces are affine.
∀x(euclidean(x) → affine(x))
Not all affine spaces are Euclidean.
∃x(affine(x) ∧ ¬euclidean(x))
The space we live in is Euclidean.
∀x(live(x) → euclidean(x))
Not all transformations produce affine spaces.
∃x(∃y(trans(x, y) ∧ ¬affine(y)))
NC State University
First-Order Logic
20 / 32
Predicate Logic
Affine Spaces . . .
Conclusion:all affine transformations of the space we live
in are perceptually equivalent to it.
NC State University
First-Order Logic
21 / 32
Predicate Logic
Affine Spaces . . .
Conclusion:all affine transformations of the space we live
in are perceptually equivalent to it.
∀x(∀y(live(x) ∧ trans(x, y) ∧ affine(y) → perequiv(x, y)))
NC State University
First-Order Logic
21 / 32
Theorem Proving with FOL
So, how do we prove a theorem?
In order to prove a theorem, we must:
NC State University
First-Order Logic
22 / 32
Theorem Proving with FOL
So, how do we prove a theorem?
In order to prove a theorem, we must:
• represent the given sentences in CNF
• negate the conclusion – since we are proving by
contradiction
• iteratively find a pair of clauses that can be resolved
till we reach a contradiction
NC State University
First-Order Logic
22 / 32
Theorem Proving with FOL
Conversion to CNF
CNF in predicate Logic
Consider the following clauses and identify which of
these are in CNF (textbook, p. 346):
• ∀x p(x) → q(x)
• ¬∀x P(x) ∨ Q(x)
• ∀x P(x)∨ ∃x Q(x)
• ∀x∃y P(x) ∨ Q(y)
NC State University
First-Order Logic
23 / 32
Theorem Proving with FOL
Conversion to CNF
CNF in predicate Logic
Consider the following clauses and identify which of
these are in CNF (textbook, p. 346):
• ∀x p(x) → q(x)
Remove ‘→’: ∀x ¬p(x) ∨ q(x)
• ¬∀x P(x) ∨ Q(x)
• ∀x P(x)∨ ∃x Q(x)
• ∀x∃y P(x) ∨ Q(y)
NC State University
First-Order Logic
23 / 32
Theorem Proving with FOL
Conversion to CNF
CNF in predicate Logic
Consider the following clauses and identify which of
these are in CNF (textbook, p. 346):
• ∀x p(x) → q(x)
Remove ‘→’: ∀x ¬p(x) ∨ q(x)
• ¬∀x P(x) ∨ Q(x)
Move the negation inwards: ∃x ¬P(x) ∧ ¬Q(x)
• ∀x P(x)∨ ∃x Q(x)
• ∀x∃y P(x) ∨ Q(y)
NC State University
First-Order Logic
23 / 32
Theorem Proving with FOL
Conversion to CNF
CNF in predicate Logic
Consider the following clauses and identify which of
these are in CNF (textbook, p. 346):
• ∀x p(x) → q(x)
Remove ‘→’: ∀x ¬p(x) ∨ q(x)
• ¬∀x P(x) ∨ Q(x)
Move the negation inwards: ∃x ¬P(x) ∧ ¬Q(x)
• ∀x P(x)∨ ∃x Q(x)
Standardize the variables: ∀x1 P(x1 )∨ ∃x2 Q(x2 )
• ∀x∃y P(x) ∨ Q(y)
NC State University
First-Order Logic
23 / 32
Theorem Proving with FOL
Conversion to CNF
CNF in predicate Logic
Consider the following clauses and identify which of
these are in CNF (textbook, p. 346):
• ∀x p(x) → q(x)
Remove ‘→’: ∀x ¬p(x) ∨ q(x)
• ¬∀x P(x) ∨ Q(x)
Move the negation inwards: ∃x ¬P(x) ∧ ¬Q(x)
• ∀x P(x)∨ ∃x Q(x)
Standardize the variables: ∀x1 P(x1 )∨ ∃x2 Q(x2 )
• ∀x∃y P(x) ∨ Q(y)
Interesting...
NC State University
First-Order Logic
23 / 32
Theorem Proving with FOL
Conversion to CNF
CNF in predicate Logic
Consider the following clauses and identify which of
these are in CNF (textbook, p. 346):
• ∀x p(x) → q(x)
Remove ‘→’: ∀x ¬p(x) ∨ q(x)
• ¬∀x P(x) ∨ Q(x)
Move the negation inwards: ∃x ¬P(x) ∧ ¬Q(x)
• ∀x P(x)∨ ∃x Q(x)
Standardize the variables: ∀x1 P(x1 )∨ ∃x2 Q(x2 )
• ∀x∃y P(x) ∨ Q(y)
Interesting...
By the way, none of these are in CNF yet!!
NC State University
23 / 32
First-Order Logic
Theorem Proving with FOL
Conversion to CNF
Dealing with Quantifiers
We can handle ‘∃’ as follows:
• We eliminate the ‘∃’ by a process called
Skolemization
• We will use special terms called Skolem Constants
and Skolem Functions
• Consider:
•
∀x∃y P(x) ∨ Q(y)
•
∃x∀y P(x) ∨ Q(y)
Once this is complete, we can drop the ‘∀’ quantifier
without any change to the corresponding variables.
NC State University
First-Order Logic
24 / 32
Theorem Proving with FOL
Conversion to CNF
Dealing with Quantifiers
We can handle ‘∃’ as follows:
• We eliminate the ‘∃’ by a process called
Skolemization
• We will use special terms called Skolem Constants
and Skolem Functions
• Consider:
•
∀x∃y P(x) ∨ Q(y)
Replace y with Skolem function ‘f (x)’: ∀x P(x) ∨ Q(f (x))
•
∃x∀y P(x) ∨ Q(y)
Once this is complete, we can drop the ‘∀’ quantifier
without any change to the corresponding variables.
NC State University
24 / 32
First-Order Logic
Theorem Proving with FOL
Conversion to CNF
Dealing with Quantifiers
We can handle ‘∃’ as follows:
• We eliminate the ‘∃’ by a process called
Skolemization
• We will use special terms called Skolem Constants
and Skolem Functions
• Consider:
•
∀x∃y P(x) ∨ Q(y)
Replace y with Skolem function ‘f (x)’: ∀x P(x) ∨ Q(f (x))
•
∃x∀y P(x) ∨ Q(y)
Replace x with Skolem constant ‘X1 ’: ∀y P(X1 ) ∨ Q(y)
Once this is complete, we can drop the ‘∀’ quantifier
without
change to the corresponding
variables.
NC
Stateany
University
24 / 32
First-Order Logic
Theorem Proving with FOL
Conversion to CNF
Example
• ∀x∃y(man(x) → woman(y) ∧ loves(x, y))
• ∃x∀y∀z∃u∀v∃w P(x, y, z, u, v, w)
NC State University
First-Order Logic
25 / 32
Theorem Proving with FOL
Conversion to CNF
Example
• ∀x∃y(man(x) → woman(y) ∧ loves(x, y))
∀x(man(x) → woman(f (x)) ∧ loves(x, f (x))
• ∃x∀y∀z∃u∀v∃w P(x, y, z, u, v, w)
NC State University
First-Order Logic
25 / 32
Theorem Proving with FOL
Conversion to CNF
Example
• ∀x∃y(man(x) → woman(y) ∧ loves(x, y))
∀x(man(x) → woman(f (x)) ∧ loves(x, f (x))
• ∃x∀y∀z∃u∀v∃w P(x, y, z, u, v, w)
•
∃x → A
NC State University
First-Order Logic
25 / 32
Theorem Proving with FOL
Conversion to CNF
Example
• ∀x∃y(man(x) → woman(y) ∧ loves(x, y))
∀x(man(x) → woman(f (x)) ∧ loves(x, f (x))
• ∃x∀y∀z∃u∀v∃w P(x, y, z, u, v, w)
•
•
∃x → A
∃u → f (y, z)
NC State University
First-Order Logic
25 / 32
Theorem Proving with FOL
Conversion to CNF
Example
• ∀x∃y(man(x) → woman(y) ∧ loves(x, y))
∀x(man(x) → woman(f (x)) ∧ loves(x, f (x))
• ∃x∀y∀z∃u∀v∃w P(x, y, z, u, v, w)
∃x → A
∃u → f (y, z)
• ∃w → g(y, z, v)
•
•
NC State University
First-Order Logic
25 / 32
Theorem Proving with FOL
Conversion to CNF
Example
• ∀x∃y(man(x) → woman(y) ∧ loves(x, y))
∀x(man(x) → woman(f (x)) ∧ loves(x, f (x))
• ∃x∀y∀z∃u∀v∃w P(x, y, z, u, v, w)
∃x → A
∃u → f (y, z)
• ∃w → g(y, z, v)
•
•
∀y∀z∀v P(A, y, z, f (y, z), v, g(y, z, v))
NC State University
First-Order Logic
25 / 32
Theorem Proving with FOL
Conversion to CNF
Back to Affine Spaces . . .
Convert the sentences into CNF:
1
2
3
All affine spaces are perceptually equivalent.
∀x(∀y(affine(x) ∧ affine(y) → perequiv(x, y)))
All Euclidean spaces are affine.
∀x(euclidean(x) → affine(x))
Not all affine spaces are Euclidean.
∃x(affine(x) ∧ ¬euclidean(x))
NC State University
First-Order Logic
26 / 32
Theorem Proving with FOL
Conversion to CNF
Back to Affine Spaces . . .
Convert the sentences into CNF:
1
2
3
All affine spaces are perceptually equivalent.
∀x(∀y(affine(x) ∧ affine(y) → perequiv(x, y)))
¬affine(x) ∨ ¬affine(y) ∨ perequiv(x, y)
All Euclidean spaces are affine.
∀x(euclidean(x) → affine(x))
Not all affine spaces are Euclidean.
∃x(affine(x) ∧ ¬euclidean(x))
NC State University
First-Order Logic
26 / 32
Theorem Proving with FOL
Conversion to CNF
Back to Affine Spaces . . .
Convert the sentences into CNF:
1
2
3
All affine spaces are perceptually equivalent.
∀x(∀y(affine(x) ∧ affine(y) → perequiv(x, y)))
¬affine(x) ∨ ¬affine(y) ∨ perequiv(x, y)
All Euclidean spaces are affine.
∀x(euclidean(x) → affine(x))
¬euclidean(x) ∨ affine(x)
Not all affine spaces are Euclidean.
∃x(affine(x) ∧ ¬euclidean(x))
NC State University
First-Order Logic
26 / 32
Theorem Proving with FOL
Conversion to CNF
Back to Affine Spaces . . .
Convert the sentences into CNF:
1
2
3
All affine spaces are perceptually equivalent.
∀x(∀y(affine(x) ∧ affine(y) → perequiv(x, y)))
¬affine(x) ∨ ¬affine(y) ∨ perequiv(x, y)
All Euclidean spaces are affine.
∀x(euclidean(x) → affine(x))
¬euclidean(x) ∨ affine(x)
Not all affine spaces are Euclidean.
∃x(affine(x) ∧ ¬euclidean(x))
affine(A) ∧ ¬euclidean(A)
NC State University
First-Order Logic
26 / 32
Theorem Proving with FOL
Conversion to CNF
Back to Affine Spaces . . .
Convert the sentences into CNF:
1
2
The space we live in is Euclidean.
∀x(live(x) → euclidean(x))
Not all transformations produce affine spaces.
∃x(∃y(trans(x, y) ∧ ¬affine(y)))
NC State University
First-Order Logic
27 / 32
Theorem Proving with FOL
Conversion to CNF
Back to Affine Spaces . . .
Convert the sentences into CNF:
1
2
The space we live in is Euclidean.
∀x(live(x) → euclidean(x))
¬live(x) ∨ euclidean(x)
Not all transformations produce affine spaces.
∃x(∃y(trans(x, y) ∧ ¬affine(y)))
NC State University
First-Order Logic
27 / 32
Theorem Proving with FOL
Conversion to CNF
Back to Affine Spaces . . .
Convert the sentences into CNF:
1
2
The space we live in is Euclidean.
∀x(live(x) → euclidean(x))
¬live(x) ∨ euclidean(x)
Not all transformations produce affine spaces.
∃x(∃y(trans(x, y) ∧ ¬affine(y)))
trans(B, C) ∧ ¬affine(C)
NC State University
First-Order Logic
27 / 32
Theorem Proving with FOL
Conversion to CNF
Negated Conclusion for Affine Spaces
Conclusion:
All affine transformations of the space we live in are
perceptually equivalent to it.
∀x(∀y(live(x) ∧ trans(x, y) ∧ affine(y) → perequiv(x, y)))
NC State University
First-Order Logic
28 / 32
Theorem Proving with FOL
Conversion to CNF
Negated Conclusion for Affine Spaces
Negated Conclusion:
NC State University
First-Order Logic
29 / 32
Theorem Proving with FOL
Conversion to CNF
Negated Conclusion for Affine Spaces
Negated Conclusion:
¬∀x(∀y(live(x) ∧ trans(x, y) ∧ affine(y) →
perequiv(x, y)))
NC State University
First-Order Logic
29 / 32
Theorem Proving with FOL
Conversion to CNF
Negated Conclusion for Affine Spaces
Negated Conclusion:
¬∀x(∀y(live(x) ∧ trans(x, y) ∧ affine(y) →
perequiv(x, y)))
⇒ ¬∀x(∀y(¬(live(x) ∧ trans(x, y) ∧ affine(y)) ∨
perequiv(x, y)))
NC State University
First-Order Logic
29 / 32
Theorem Proving with FOL
Conversion to CNF
Negated Conclusion for Affine Spaces
Negated Conclusion:
¬∀x(∀y(live(x) ∧ trans(x, y) ∧ affine(y) →
perequiv(x, y)))
⇒ ¬∀x(∀y(¬(live(x) ∧ trans(x, y) ∧ affine(y)) ∨
perequiv(x, y)))
⇒ ∃x(∃y(live(x) ∧ trans(x, y) ∧ affine(y) ∧
¬perequiv(x, y)))
NC State University
First-Order Logic
29 / 32
Theorem Proving with FOL
Conversion to CNF
Negated Conclusion for Affine Spaces
Negated Conclusion:
¬∀x(∀y(live(x) ∧ trans(x, y) ∧ affine(y) →
perequiv(x, y)))
⇒ ¬∀x(∀y(¬(live(x) ∧ trans(x, y) ∧ affine(y)) ∨
perequiv(x, y)))
⇒ ∃x(∃y(live(x) ∧ trans(x, y) ∧ affine(y) ∧
¬perequiv(x, y)))
⇒ live(D) ∧ trans(D, E) ∧ affine(E) ∧ ¬perequiv(D, E)
NC State University
First-Order Logic
29 / 32
Theorem Proving with FOL
Resolution
Resolution
Consider:
¬euclidean(x2 ) ∨ affine(x2 )
¬affine(c)
These have a pair of complementary predicates. But, can
we resolve them? If so, how?
Now assume:
¬euclidean(x2 ) ∨ affine(f (x2 ))
¬affine(c)
NC State University
First-Order Logic
30 / 32
Theorem Proving with FOL
Resolution
Substitutions
Definition
A substitution is a set of pairs {t1 /v1 , t2 /v2 , . . . , tn /vn },
where the ti are terms, the vi are variables, and no two vi
are the same.
Substitutions always replace variables with terms. Legal
substitutions are
• constant-for-var
• function-for-var
• var-for-var
The vars substituted for may occur in either literal.
Example:
NC
State University
First-Order Logic
31 / 32
Theorem Proving with FOL
Resolution
Substitutions
Definition
A substitution is a set of pairs {t1 /v1 , t2 /v2 , . . . , tn /vn },
where the ti are terms, the vi are variables, and no two vi
are the same.
Substitutions always replace variables with terms. Legal
substitutions are
• constant-for-var
• function-for-var
• var-for-var
The vars substituted for may occur in either literal.
Example:
NC
State University
First-Order Logic
31 / 32
Theorem Proving with FOL
Resolution
Unification
Definition
The process of finding a substitution that makes two
literals complementary is called unification.
Two literals for which a unifying substitution exists are
called unifiable.
Importance of Unification
• It is the basis for FOL resolution.
• It is the main way rule-based systems determine
which rules apply in a situation.
• It is the way variables are treated in logic
NC State
University
32 / 32
programming.
First-Order Logic
© Copyright 2026 Paperzz