COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University pursuant to Part VB of the Copyright Act 1968 (the Act). The material in this communication may be subject to copyright under the Act. Any further reproduction or communication of this material by you may be the subject of copyright protection under the Act. Do not remove this notice.
Predicate Logic CSE2303 Formal Methods I Lecture 19
Overview Terms Sentences Quantifiers Knowledge Representation
Example All men are mortal Socrates is a man. Therefore Socrates is mortal. Objects: Socrates, Set of people. Properties: Man, Mortal
Example There is a girl who is loved by every boy. Therefore every boy loves some girl. Objects: A set of people. Properties: Boy, Girl. Relation: Loves
Objects Constant symbols –Names which refer to exactly one object. –socrates, wumpus, 1, 2, … Function symbols –relates some objects to exactly one object. –motherOf, kingOf, plus, times, … –Complex name. Individual variables –a variable which can refer to any object. –X, Y, …
Term A term is a logical expression which refers to an object. E.g. –Constant symbols. –Individual variables. –Functions of constant symbols. –Functions of other terms.
Predicates Predicate symbols –man, mortal, boy, girl, loves, … –Properties (1 place) –Relations (2 or more places) Equality symbol (=) –Used to state that two objects are the same. rebecca = rebecca fatherOf(john) = henry X = kingOf(sweden)
Sentences Atomic sentences –A predicate symbol followed by a list of terms in brackets. –E.g. taller(motherOf(claire), mary) Complex sentences –Atomic sentences joined together by logical connectives –E.g. man(socrates) mortal(socrates)
Universal Quantification Used to make a statement about every object. “for all” All dogs are happy X (dog(X) happy(X)) No dog is happy All dogs are unhappy X (dog(X) ¬happy(X))
Existential Quantification Used to make a statement about some object. “there exists” Some dogs are happy X (dog(X) happy(X)) Some dogs are not happy X (dog(X) ¬happy(X))
Universe of Discourse The set of objects that are being referred to. Often it is unstated or assumed. Can affect the truth of a statement. Consider the predicate greaterThanZero. X greaterThanZero(X)
Socrates Example All men are mortal X (man(X) mortal(X)) Socrates is a man. man(socrates) Socrates is mortal. mortal(socrates)
Colonel West Example It is a crime for an American to sell weapons to a hostile nation. The country Nono, an enemy of America, has some missiles, and all its missiles were sold to it by Colonel West, who is an American. Constants: –nono, america, west Predicates: –criminal, american, weapon, hostile, nation, enemy, missile, owns, sells
Crime It is a crime for an American to sell weapons to a hostile nation. If any american X sells any weapon Y to any hostile nation Z, then that american X is a criminal. X,Y,Z (american(X) weapon(Y) nation(Z) hostile(Z) sells(X, Z, Y) criminal(X))
Nono’s missiles Nono has some missiles X (missile(X) owns(nono, X)) All of Nono’s missiles were sold to it by West. If X is a missile owned by Nono then West sold X to Nono. X ((missile(X) owns(nono, X)) sells(west, nono, X))
The other facts An enemy of America is hostile. X (enemy(X, america) hostile(X)) West is an American. american(west) Nono is an enemy of America. nation(nono) nation(america) enemy(nono, america)
Love Example There is a girl who is loved by every boy. There is a girl X and if Y is a boy then Y loves her. X (girl(X) Y(boy(Y) loves(Y,X))) Every boy loves some girl. For every boy Y there exists a girl X that he loves. Y(boy(Y) X (girl(X) loves(Y,X)))
Curiosity Example Jack owns a dog Every dog owner is an animal lover. No animal lover kills an animal. Either Jack or Curiosity killed the cat. The cat’s name is Tuna. Constants: jack, curiosity, tuna. Predicates: owns, dog, animalLover, kills, animal.
Dog owners Jack owns a dog Some dog is owed by Jack. X (dog(X) owns(jack, X)) Every dog owner is an animal lover. X (( Y (dog(Y) owns(X,Y))) animalLover(X))
Animal Lovers No animal lover kills an animal. An animal lover does not kill an animal. For any animal lover X and any animal Y, then Y is not killed by X. X, Y ((animalLover(X) animal(Y)) ¬kills(X,Y))
Cat Knowledge The cat’s name is Tuna cat(tuna) Either Jack or Curiosity killed the cat. kills(jack, tuna) kills(curiosity, tuna) All cats are animals. X cat(X) animal(X)
Revision Know the definitions of the following: –Terms –Sentences –Quantifiers Know how to convert sentences in English to sentences in Predicate Logic.