0% found this document useful (0 votes)
77 views

Resolution Theorem Proving: First Order Logic Resolution With Variables

This document discusses resolution theorem proving in first-order logic. It covers resolving clauses with variables, converting formulas to clausal normal form using techniques like Skolemization, and using resolution refutation to prove validity. Examples are provided of resolving clauses with variables like P(x) v Q(x,y) and ¬P(A) v R(B,z) to get Q(x,y) v R(B,z) with substitution {x/A}. The full process of converting formulas, like "John owns a dog", to clausal form is also demonstrated.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views

Resolution Theorem Proving: First Order Logic Resolution With Variables

This document discusses resolution theorem proving in first-order logic. It covers resolving clauses with variables, converting formulas to clausal normal form using techniques like Skolemization, and using resolution refutation to prove validity. Examples are provided of resolving clauses with variables like P(x) v Q(x,y) and ¬P(A) v R(B,z) to get Q(x,y) v R(B,z) with substitution {x/A}. The full process of converting formulas, like "John owns a dog", to clausal form is also demonstrated.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

6.

825 Techniques in Artificial Intelligence

Resolution with Variables


v
[rename]

Resolution Theorem Proving: First Order Logic


Resolution with variables Clausal form

v [rename] ( v )

MGU(,) =

P(x) v Q(x,y) P(A) v R(B,z) (Q(x,y) v R(B,z)) Q(A,y) v R(B,z)

Lecture 8 1

= {x/A}

Lecture 8 2

Resolution with Variables


v
[rename]

Resolution with Variables


v
[rename]

xy. MGU(,) =

P(x) v Q(x,y)

xy. MGU(,) =

P(x) v Q(x,y)

v [rename] ( v )
All vars implicitly univ. quantified

x. P(A) v R(B,x)
Scope of var is local to a clause. Use renaming to keep vars distinct

v [rename] ( v )
All vars implicitly univ. quantified

x. P(A) v R(B,x)
Scope of var is local to a clause. Use renaming to keep vars distinct

xy. P(x) v Q(x,y) z. P(A) v R(B,z) (Q(x,y) v R(B,z)) Q(A,y) v R(B,z)

xy. P(x) v Q(x,y) z. P(A) v R(B,z) (Q(x,y) v R(B,z)) Q(A,y) v R(B,z)

x1y.

P(x1) v Q(x1,y)

x2. P(A) v R(B,x2)

= {x/A}

Lecture 8 3

= {x/A}

Lecture 8 4

Resolution with Variables


v
[rename]

Resolution
Input are sentences in conjunctive normal form with no apparent quantifiers (implicit universal quantifiers). How do we go from the full range of sentences in FOL, with the full range of quantifiers, to sentences that enable us to use resolution as our single inference rule? We will convert the input sentences into a new normal form called clausal form.

xy. MGU(,) =

P(x) v Q(x,y)

v [rename] ( v )
All vars implicitly univ. quantified

x. P(A) v R(B,x)
Scope of var is local to a clause. Use renaming to keep vars distinct

xy. P(x) v Q(x,y) z. P(A) v R(B,z) (Q(x,y) v R(B,z)) Q(A,y) v R(B,z)

x1y.

P(x1) v Q(x1,y)

x2. P(A) v R(B,x2) (Q(x1,y) v R(B,x2)) Q(A,y) v R(B,x2)

= {x/A}

= {x1/A}

Lecture 8 5

Lecture 8 6

Converting to Clausal Form


1. Eliminate , v 2. Drive in

Converting to Clausal Form, II


4. Skolemize
Substitute brand new name for each existentially quantified variable Substitute a new function of all universally quantified variables in enclosing scopes for each existentially quantified variable.
x. x. x. y. x. P(x) P(Fred) P(x,y) P(X11, Y13) P(x) Q(x) P(Blue) Q(Blue) x. Loves(x,y) x. Loves(x, Englebert) y. Loves(x,y) x. Loves(x, Beloved(x))

( v ) ( ) v x. P(x) x. P(x) x. P(x) x. P(x) 3. Rename variables apart x. y. (P(x) x. Q(x,y)) x1. y2. (P(x1) x3.Q(x3,y2))

5. Drop universal quantifiers 6. Convert to CNF 7. Rename the variables in each clause
x. P(x) Q(x) y. P(y) z. Q(z)

Lecture 8 7

Lecture 8 8

Example: Converting to clausal form


a. John owns a dog x. D(x) O(J,x) D(Fido) O(J, Fido) b. Anyone who owns a dog is a lover-of-animals x. ( y. D(y) O(x,y)) L(x) x. ( y. (D(y) O(x,y)) v L(x) x. y. (D(y) O(x,y)) v L(x) x. y. D(y) v O(x,y) v L(x) D(y) v O(x,y) v L(x)
Lecture 8 9

More converting to clausal form


d. Either Jack killed Tuna or curiosity killed Tuna K(J,T) v K(C,T) e. Tuna is a cat C(T) f. All cats are animals C(x) v A(x)

c. Lovers-of-animals do not kill animals x. L(x) ( y. A(y) K(x,y)) x. L(x) v ( y. A(y) K(x,y)) x. L(x) v ( y. A(y) v K(x,y)) L(x) v A(y) v K(x,y)

Lecture 8 10

Curiosity Killed the Cat


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 D(Fido) O(J,Fido) D(y) v O(x,y) v L(x) L(x) v A(y) v K(x,y) K(J,T) v K(C,T) C(T) C(x) v A(x) K(C,T) K(J,T) A(T) L(J) v A(T) L(J) D(y) v O(J,y) D(Fido) a a b c d e f Neg 5,8 6,7 {x/T} 4,9 {x/J, y/T} 10,11 3,12 {x/J} 13,2 {x/Fido} 14,1
Lecture 8 11

Proving validity
How do we use resolution refutation to prove something is valid? Normally, we prove a sentence is entailed by the set of axioms Valid sentences are entailed by the empty set of sentences is valid { } [empty set of sentences entails ] { } [empty set of sentences proves ] To prove validity by refutation, negate the sentence and try to derive contradiction.

Lecture 8 12

Proving validity: example


Prove validity of:
x. (P(x) P(A)) (P(x) P(B)) x. (P(x) P(A)) (P(x) P(B)) x. (( P(x) v P(A)) ( P(x) v P(B)) x. (( P(x) v P(A)) ( P(x) v P(B)) x. ( P(x) v P(A)) v ( P(x) v P(B)) x. (P(x) P(A)) v (P(x) P(B)) (P(x) P(A)) v (P(x) P(B)) (P(x) v P(x)) (P(x) v P(B)) ( P(A) v P(x)) ( P(A) v P(B))
Lecture 8 13

Recitation Problems
In each group, derive the last sentence from the others using resolution refutation.
xy.F(x,y) xy.F(y,x) x.F(x) (G(x) H(x)) G(A) (H(A) G(A)) F(A) x.F(x) y.F(y)
1,4 {x/A} 1,5 {x/B}

1 2 3 4 5 6

P(x) P(x) v P(B) P(A) v P(x) P(A) v P(B) P(B)

x.F(x) G(x) x. G(x) x.H(x) F(x) x. H(x)

xyz.F(x,y) F(y,z) F(x,z) F(x,x) xy.F(x,y) F(y,x)

x. y.L(x,y) xy.L(x,y) H(x) x.H(x)

Lecture 8 14

A Silly Recitation Problem


Symbolize the following argument, and then derive the conclusion from the premises using resolution refutation. Nobody who really appreciates Beethoven fails to keep silence while the Moonlight sonata is being played. Guinea pigs are hopelessly ignorant of music. No one who is hopelessly ignorant of music ever keeps silence while the moonlight sonata is being played. Therefore, guinea pigs never really appreciate Beethoven. (Taken from a book by Lewis Carroll, logician and author of Alice in Wonderland.)
Lecture 8 15

Another, Sillier Problem


You dont have to do this one. Its just for fun. Same type as the previous one. Also from Lewis Carroll. The only animals in this house are cats Every animal that loves to gaze at the moon is suitable for a pet When I detest an animal, I avoid it No animals are carnivorous unless they prowl at night No cat fails to kill mice No animals ever like me, except those that are in this house Kangaroos are not suitable for pets None but carnivorous animals kill mice I detest animals that do not like me Animals that prowl at night always love to gaze at the moon Therefore, I always avoid a kangaroo
Lecture 8 16

You might also like