cse 5731 lectures 13-14 first-order logic cse 573 artificial intelligence i henry kautz fall 2001
Post on 22-Dec-2015
217 views
TRANSCRIPT
![Page 1: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/1.jpg)
CSE 573 1
Lectures 13-14First-Order LogicLectures 13-14
First-Order Logic
CSE 573
Artificial Intelligence IHenry Kautz
Fall 2001
![Page 2: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/2.jpg)
CSE 573 2
Axiom SchemasAxiom Schemas
Useful to allow schemas that stand for sets of sentences.
• Blowup: (index range)nesting
for i, j in {1, 2, 3, 4} such that adjacent(i,j):
for c in {R, B, G}:
( Xc,i Xc,j)
12 4
3
![Page 3: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/3.jpg)
CSE 573 3
Representing Information about Different Objects
Representing Information about Different Objects
Suppose we want to talk about many different objects…
Where is truck #87? What about airplane #32?
Which vehicle carries package #806?
![Page 4: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/4.jpg)
CSE 573 4
Complex PropositionsComplex Propositions
At( TRUCK87, UW )
At( PLANE32, SEATAC )
In( PACKAGE806, PLANE32 )
Ingredients:
Example of a sentence:
![Page 5: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/5.jpg)
CSE 573 5
Complex TermsComplex Terms
plus(1,3)
4 = 1+3
teacher_of( CSE573, AU2001 )
Overworked(teacher_of(CSE573, AU2001 )) Underpaid(teacher_of(CSE573, AU2001 )))
teacher_of(CSE573, AU2001 ) = HENRY
What is the obvious conclusion?
![Page 6: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/6.jpg)
CSE 573 6
Models of Ground SentencesModels of Ground Sentences
What does entailment mean?
{ Overworked(teacher_of(CSE573, AU2001)),HENRY = teacher_of(CSE573, AU2001)) }
Overworked(HENRY)
![Page 7: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/7.jpg)
CSE 573 7
First Order InterpretationFirst Order Interpretation
1. Domain of objects
2. : Constants 3. : n-ary Function symbols (n )4. : Propositional symbols {true, false}
5. : n-ary Predicate symbols Subsets of n
6. ( “=”) = { (d, d) | d }
![Page 8: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/8.jpg)
CSE 573 8
Do Obvious Recursive Thing!Do Obvious Recursive Thing!
(P(a)) = true iff (a) (P) (Q(a,b)) = true iff ((a), (b)) (Q) (S T) = true iff (S) and (T) (S T) = true iff (S) or (T) (S) = true iff (S) = false
(f(a)) = (f)[(a) ] (f(a,b)) = (f)[(a), (b) ]
![Page 9: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/9.jpg)
CSE 573 9
ExampleExample
Overworked(teacher_of(CSE573, AU2001)) HENRY = teacher_of(CSE573, AU2001))
![Page 10: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/10.jpg)
CSE 573 10
Not Done Yet…Not Done Yet…
So far we’ve provided a way to break propositions down into meaningful bits
• Brings logic closer to the way we think about the world – objects, relationships…
• Doesn’t fundamentally change the expressive or computational properties of propositional logic
• “Naming convention” for propositions
• Inference: same algorithms: Davis-Putnam, GSAT, Resolution
![Page 11: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/11.jpg)
CSE 573 11
Universal StatementsUniversal Statements
Consider:• All men are mortal.
• A parent’s parent is a grandparent.
• No adjacent countries are colored the same color.
![Page 12: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/12.jpg)
CSE 573 12
Universal Statements vs Propositional Schemas
Universal Statements vs Propositional Schemas
1. Do not need to fully instantiate universal statements – more compact.
2. Can use universals in queries, because are real sentences.
3. Can use universals even if you do not have constants to uniquely identify all the objects in the domain.
4. Can use universals to talk about infinite sets
![Page 13: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/13.jpg)
CSE 573 13
SyntaxSyntax
x . = x . x . = x .
x . ( Man(x) Mortal(x) )
x . (Man(x) Mortal(x) )
![Page 14: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/14.jpg)
CSE 573 14
Some Syntactic SugarSome Syntactic Sugar
Vehicle = { TRUCK99, TRUCK33, PLANE66 }shorthand for
Vehicle(TRUCK99) Vehicle(TRUCK33) Vehicle(PLANE66 ) x . (Vehicle(x)
(x= TRUCK99 x= TRUCK33 x= PLANE66 ))
Predicate closure axiomsDomain closure axiom
x . (x= TRUCK99 x= TRUCK33 x= PLANE66 )
![Page 15: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/15.jpg)
CSE 573 15
SemanticsSemantics
A model also maps variables to domain objects: : Variables
x/d = the model that maps “x” to d, but is otherwise just like
( x . ) = true iff
for all d it is the case that x/d () is true
![Page 16: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/16.jpg)
CSE 573 16
Inference in First-Order LogicInference in First-Order Logic
Proof theory:
• Makes the leap from truth and modelsto symbol pushing
Consider a special case:
1. No function symbols
2. Closed domain, or quantify only over closed predicates
![Page 17: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/17.jpg)
CSE 573 17
Grounding Out a First-Order Theory (Special Case)
Grounding Out a First-Order Theory (Special Case)
Vehicle = { TRUCK99, TRUCK33, PLANE66 }
City = { SEATTLE, BOSTON }
x . ( Vehicle(x) ( y . City(y) Based(x, y) ) )
(Based(TRUCK99, SEATTLE) Based(TRUCK99, BOSTON )) (Based(TRUCK33, SEATTLE) Based(TRUCK33, BOSTON )) (Based(PLANE66 , SEATTLE) Based(PLANE66 , BOSTON ))
![Page 18: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/18.jpg)
CSE 573 18
Grounding RulesGrounding Rules
Foo = { F1, F2, … }
x . ( Foo(x) Bar(x))
( Bar(F1) Bar(F2) … )
x . ( Foo(x) Bar(x) )
( Bar(F1) Bar(F2) … )
![Page 19: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/19.jpg)
CSE 573 19
When Grounding is a Bad IdeaWhen Grounding is a Bad Idea
Everyone has friend, all of whose friends drink heavily.
![Page 20: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/20.jpg)
CSE 573 20
Hardness of Full First-Order Logic
Hardness of Full First-Order Logic
Can we always in principle propositionalize a theory?
![Page 21: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/21.jpg)
CSE 573 21
Lifted ResolutionLifted Resolution
• First-order clausal form
• Begin with universal quantifiers
• Rest is a clause
• No existentials, but may include function symbols
( Man(x)Mortal(x)) (Mortal(y)Fallible(y))
(Man(z)Fallible(z))
![Page 22: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/22.jpg)
CSE 573 22
UnificationUnification
Match two literals if:
• Same predicate, one positive, one negative
• Match variable(s) to other vars, constants, or complex terms (function symbols)
(Mortal(HENRY)) (Mortal(y)Fallible(y))
(Fallible(HENRY))
![Page 23: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/23.jpg)
CSE 573 23
Unification with Multiple Variables
Unification with Multiple Variables
You always hurt the ones you love.
Politicians love themselves.
Therefore, politicians hurt themselves.
![Page 24: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/24.jpg)
CSE 573 24
Unification with Function Symbols
Unification with Function Symbols
Say s(x) means the successor of x
s(1) = 2, s(2)=3, etc.
• A number is less than it’s successor.
• “Less than” is transitive.
• Therefore, a number is less than it’s successor’s successor.
![Page 25: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/25.jpg)
CSE 573 25
Unification with Function Symbols
Unification with Function Symbols
(Less(a,s(a))) (Less(b,c) Less(c,d) Less(b,d))
(Less(s(a),d) Less(a,d))
rename variables:
(Less(s(e),f) Less(e,f))
Less(e,s(s(e)))
![Page 26: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/26.jpg)
CSE 573 26
Converting to Clausal Form: Skolem Functions
Converting to Clausal Form: Skolem Functions
Everyone loves someone.x . y . ( Loves(x,y) )
x . ( Loves(x, f33(y)) )
There is somebody whom everyone loves.
y . x . ( Loves(x,y) )
x . ( Loves(x, F99) )
![Page 27: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/27.jpg)
CSE 573 27
Everyone Drinks?Everyone Drinks?
Everyone has friend, all of whose friends drink heavily.
x . y . x . (Friend(x,y) ( Friend(y,z) Drinks(z)))
( Friend(x,f(x) )
( Friend(f(w),z) Drinks(w) )
Conclusion: Everyone drinks heavily.x . ( Drinks(x) )
x . ( Drinks(x) )x . ( Drinks(x) )
Drinks(G)
![Page 28: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/28.jpg)
CSE 573 28
The Case of the Missing AxiomThe Case of the Missing Axiom
( Drinks(G)) ( Friend(f(w),z) Drinks(z) )
Friend(f(w),G)Friend(x,f(x))
Cannot unifiy f(x) and G !
![Page 29: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/29.jpg)
CSE 573 29
Friend is ReflexiveFriend is Reflexive
x ,y . ( Friend(x,y) Friend(y,x) )
![Page 30: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/30.jpg)
CSE 573 30
FOL Refutation ProofFOL Refutation Proof
Drinks(G)
( Friend(f(w),z) Drinks(z) )
Friend(f(w),G)
Friend(x,f(x))
( Friend(a,b) Friend(b,a) )
Friend(f(x),x)
()
![Page 31: CSE 5731 Lectures 13-14 First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001](https://reader031.vdocument.in/reader031/viewer/2022032310/56649d7f5503460f94a637c3/html5/thumbnails/31.jpg)
CSE 573 31
NextNext
Applications of Logic
• Ontologies
• Reasoning about Change
• Planning