Presentation is loading. Please wait.

Presentation is loading. Please wait.

Propositional & Predicate Calculus _I

Similar presentations


Presentation on theme: "Propositional & Predicate Calculus _I"— Presentation transcript:

1 Propositional & Predicate Calculus _I

2 Propositional Logic vs. Predicate Calculus
The world consists of propositions (sentences) which can be true or false. Predicate Calculus (First Order Logic) The world consists of objects, functions and relations between the objects.

3 Propositional calculus:
The proposition calculus and the predicate calculus are first of all language using their word , phrase and sentences which we can represent and reason about properties and relation ship in the world.

4 Proposition symbol P,Q,R….. Proposition calculus symbol:
the symbol about the proposition calculus are : Proposition symbol P,Q,R….. Truth Symbol : True , false and Connective =, , , , …..

5 example The wumpus world
Hunt the Wumpus is an early computer game, based on a simple hide and seek format . We might use W1,2 stand for proposition that the wumpus is in [1,2]. Symbole such W1,2 is atomic as shown in the next slide.

6

7 Syntax of FOL: Basic elements
Constants KingJohn, 2, NUS,... Predicates Brother, >,... Functions Sqrt, LeftLegOf,... Variables x, y, a, b,... Connectives , , , ,  Equality = Quantifiers , 

8 with examples Syntax Term: Atomic Sentence Complex Sentence
constant|variable|function(term, …, term) War-and-Peace author-of(War-and-Peace) father-of(author-of(War-and-Peace)) Atomic Sentence predicate(term, …, term) Complex Sentence

9 Every propositional symbol and truth symbol is a sentence.
Examples: true, P, Q, R. The negation of a sentence is a sentence. Examples: P,  false. The conjunction, or and, of two sentences is a sentence. Example: P  P

10 The disjunction, or or, of two sentences is a sentence.
Example: P  P The implication of one sentence from another is a sentence. Example: P  Q The equivalence of two sentences is a sentence. Example: P  Q  R Legal sentences are also called well-formed formulas or WFFs.

11 “If it is hot and humid, then it is raining” Q  P
example P means “It is hot.” Q means “It is humid.” R means “It is raining.” (P  Q)  R “If it is hot and humid, then it is raining” Q  P “If it is humid, then it is hot”

12 Truth tables for connectives

13 Universal Quantifier Brothers are siblings
Mother: a female parent of a plant or animal

14 Existential Quantifier
A red object is on top of a green one An author is a person who writes documents A grandparent is the parent of one’s parent

15 Quantifier allow statements about many objects apply to sentence containing variable universal : true for all substitutions for the variable existential : true for at least one substitution for the variable.

16 Properties of Quantifiers

17 The cost of an omelette at the Red Lion is £5”
Normally: cost_of(omelette,red_lion,five_pou nds)

18 Examples on predicate calculus

19 If it doesn’t rain tomorrow, Tom will go to the mountains
Examples of representing English sentence If it doesn’t rain tomorrow, Tom will go to the mountains Øweather(rain, tomorrow) Þ go(tom, mountains) Bisang is a Jindogae and a good dog gooddog(bisang) Ù isa(bisang, jindogae) All basketball players are tall " X (basketball_player(X) Þ tall(X)) If wishes were horses, beggars would ride. equal(wishes, horses) Þ ride(beggars). Nobody likes taxes Ø$ X likes(X, taxes)

20 Given statements converted to formulae in predicate logic:
Marcus was a man. man(Marcus). 2. Marcus was a Pompein. Pompein(Marcus). 3. All Pompeins were Romans. "x Pompein(x) → Roman(x).

21 4. Caesaer was a ruler. ruler(Caeser). 5. All Romans were either loyal to Caeser or (EOR) hated him "x Roman(x) → loyalto(x, Caeser) \/ hate(x,Caeser) OR "x Roman(x) → ((loyalto(x, Caeser) \/ hate(x,Caeser) /\ ~(loyalto(x, Caeser) /\ hate(x,Caeser))) . EOR


Download ppt "Propositional & Predicate Calculus _I"

Similar presentations


Ads by Google