1 / 31

Lectures 13-14 First-Order Logic

Lectures 13-14 First-Order Logic. CSE 573 Artificial Intelligence I Henry Kautz Fall 2001. Axiom 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).

Télécharger la présentation

Lectures 13-14 First-Order Logic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lectures 13-14First-Order Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001 CSE 573

  2. Axiom 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) 3 4 2 1 CSE 573

  3. 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? CSE 573

  4. Complex Propositions • At( TRUCK87, UW ) • At( PLANE32, SEATAC ) • In( PACKAGE806, PLANE32 ) • Ingredients: • Example of a sentence: CSE 573

  5. Complex 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? CSE 573

  6. Models of Ground Sentences • What does entailment mean? • { Overworked(teacher_of(CSE573, AU2001)),HENRY = teacher_of(CSE573, AU2001)) } • Overworked(HENRY) CSE 573

  7. First Order Interpretation • Domain  of objects • : Constants   • : n-ary Function symbols  (n  ) • : Propositional symbols  {true, false} • : n-ary Predicate symbols  Subsets of n • ( “=”) = { (d, d) | d} CSE 573

  8. 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) ] CSE 573

  9. Example • Overworked(teacher_of(CSE573, AU2001))  HENRY = teacher_of(CSE573, AU2001)) CSE 573

  10. 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 CSE 573

  11. Universal Statements • Consider: • All men are mortal. • A parent’s parent is a grandparent. • No adjacent countries are colored the same color. CSE 573

  12. Universal Statements vs Propositional Schemas • Do not need to fully instantiate universal statements – more compact. • Can use universals in queries, because are real sentences. • Can use universals even if you do not have constants to uniquely identify all the objects in the domain. • Can use universals to talk about infinite sets CSE 573

  13. Syntax  x .  =  x .   x .  =  x .  • x . ( Man(x)  Mortal(x) ) •   x . (Man(x)  Mortal(x) ) CSE 573

  14. Some 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 axioms Domain closure axiom • x . (x= TRUCK99  x= TRUCK33  x= PLANE66 ) CSE 573

  15. Semantics • 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 CSE 573

  16. Inference in First-Order Logic • Proof theory: • Makes the leap from truth and modelsto symbol pushing • Consider a special case: • No function symbols • Closed domain, or quantify only over closed predicates CSE 573

  17. 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 )) CSE 573

  18. Grounding Rules • Foo = { F1, F2, … } • x . ( Foo(x)  Bar(x)) ( Bar(F1)  Bar(F2)  … ) • x . ( Foo(x)  Bar(x) ) ( Bar(F1)  Bar(F2)  … ) CSE 573

  19. When Grounding is a Bad Idea • Everyone has friend, all of whose friends drink heavily. CSE 573

  20. Hardness of Full First-Order Logic • Can we always in principle propositionalize a theory? CSE 573

  21. Lifted 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)) CSE 573

  22. Unification • Match two literals if: • Same predicate, one positive, one negative • Match variable(s) to other vars, constants, or complex terms (function symbols) (Mortal(y)Fallible(y)) (Mortal(HENRY)) (Fallible(HENRY)) CSE 573

  23. Unification with Multiple Variables • You always hurt the ones you love. • Politicians love themselves. • Therefore, politicians hurt themselves. CSE 573

  24. 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. CSE 573

  25. 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))) CSE 573

  26. 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) ) CSE 573

  27. 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) CSE 573

  28. The 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 ! CSE 573

  29. Friend is Reflexive •  x ,y . ( Friend(x,y)  Friend(y,x) ) CSE 573

  30. FOL Refutation Proof ( Friend(a,b)  Friend(b,a) ) ( Friend(f(w),z)  Drinks(z) ) Friend(x,f(x))  Drinks(G)  Friend(f(x),x)  Friend(f(w),G) () CSE 573

  31. Next • Applications of Logic • Ontologies • Reasoning about Change • Planning CSE 573

More Related