1 / 12

First-Order Logic

First-Order Logic. Limitations of propositional logic. Suppose you want to say “All humans are mortal” In propositional logic, you would need ~6.7 billion statements Suppose you want to say “Some people can run a marathon” You would need a disjunction of ~6.7 billion statements.

Télécharger la présentation

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. First-Order Logic

  2. Limitations of propositional logic • Suppose you want to say “All humans are mortal” • In propositional logic, you would need ~6.7 billion statements • Suppose you want to say “Some people can run a marathon” • You would need a disjunction of ~6.7 billion statements

  3. First-order logic • Propositional logic assumes the world consists of atomic facts • First-order logic assumes the world contains objects, relations, and functions

  4. Syntax of FOL • Constants:John, Sally, 2, ... • Variables:x, y, a, b,... • Predicates:Person(John), Siblings(John, Sally), IsOdd(2), ... • Functions:MotherOf(John), Sqrt(x), ... • Connectives:, , , ,  • Equality:= • Quantifiers:,  • Term: Constant or Variableor Function(Term1, ... , Termn) • Atomic sentence:Predicate(Term1, ... , Termn)or Term1 = Term2 • Complex sentence: made from atomic sentences using connectives and quantifiers

  5. Semantics of FOL • Sentences are true with respect to a model and an interpretation • Model contains objects (domainelements) and relations among them • Interpretation specifies referents for constantsymbols→objects predicatesymbols→relations functionsymbols→ functional relations • An atomic sentence Predicate(Term1, ... , Termn) is true iffthe objects referred to by Term1, ... , Termnare in the relation referred to by predicate

  6. Universal quantification • x P(x) • Example: “Everyone at UNC is smart” x At(x,UNC)  Smart(x) Why not x At(x,UNC)  Smart(x)? • Roughly speaking, equivalent to the conjunction of all possible instantiations of the variable: [At(John, UNC)  Smart(John)]  ... [At(Richard, UNC)  Smart(Richard)]  ... • x P(x)is true in a model m iffP(x)is true with x being each possible object in the model

  7. Existential quantification • x P(x) • Example: “Someone at UNC is smart” x At(x,UNC)  Smart(x) Why not x At(x,UNC)  Smart(x)? • Roughly speaking, equivalent to the disjunction of all possible instantiations: [At(John,UNC)  Smart(John)]  [At(Richard,UNC)  Smart(Richard)]  … • x P(x) is true in a model m iffP(x)is true with x being some possible object in the model

  8. Properties of quantifiers • x y is the same as yx • x yis the same as yx • x yis not the same as yx x y Loves(x,y) “There is a person who loves everyone” yx Loves(x,y) “Everyone is loved by at least one person” • Quantifier duality: each quantifier can be expressed using the other with the help of negation x Likes(x,IceCream) x Likes(x,IceCream) x Likes(x,Broccoli) xLikes(x,Broccoli)

  9. Equality • Term1= Term2is true under a given model if and only if Term1and Term2refer to the same object • E.g., definition of Sibling in terms of Parent: x,ySibling(x,y)  [(x = y)  m,f(m = f)  Parent(m,x)  Parent(f,x)  Parent(m,y)  Parent(f,y)]

  10. Using FOL: The Kinship Domain • Brothers are siblings x,y Brother(x,y) Sibling(x,y) • “Sibling” is symmetric x,y Sibling(x,y)  Sibling(y,x) • One's mother is one's female parent m,c(Mother(c) = m)  (Female(m)  Parent(m,c))

  11. Using FOL: The Set Domain • s Set(s)  (s = {})  (x,s2 Set(s2)  s = {x|s2}) • x,s {x|s} = {} • x,s x  s  s = {x|s} • x,s x  s  [ y,s2(s = {y|s2}  (x = y  x  s2))] • s1,s2 s1 s2 (x x s1 x  s2) • s1,s2 (s1 = s2)  (s1 s2 s2 s1) • x,s1,s2 x  (s1 s2)  (x  s1 x  s2) • x,s1,s2 x  (s1 s2)  (x  s1 x  s2)

  12. Why “First order”? • FOL permits quantification over variables • Higher order logics permit quantification over functions and predicates: P,x [P(x)  P(x)] x,y (x=y)  [P (P(x)P(y))]

More Related