Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions.

Similar presentations


Presentation on theme: "1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions."— Presentation transcript:

1 1 Predicate (Relational) Logic 1

2 Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions such as equivalence. Can not tell whether it is true or false unless you know the value of X powerful logic to deal with these problems. PREDICATE LOGIC 2 X is greater than 1

3 Introduction Usefulness of Predicate Logic for Natural Language Semantics While in propositional logic, we can only talk about sentences as a whole, predicate logic allows us to decompose simple sentences into smaller parts: predicates and individuals.  John is tall.  T(j) Predicate logic provides a tool to handle expressions of generalization: i.e., quantificational expressions.  Every cat is sleeping.  Some girl likes David.  No one is happy. Predicate logic allows us to talk about variables (pronouns). The value for the pronoun is some individual in the domain of universe that is contextually determined.  It is sleeping.  She likes David.  He is happy. 3

4 Predicate 4 A predicate is a verb phrase template that describes a property of objects, or a relationship among objects represented by the variables. "is blue“ or “B” is a predicate and it describes the property of being blue The car Tom is driving is blue The sky is blue The cover of this book is blue The car Tom is driving is blue The sky is blue The cover of this book is blue "B(x)" B(x) reads as "x is blue" "B(x)" B(x) reads as "x is blue"

5 Predicate…... gives... to... is a predicate describes a relationship among three objects Give( x, y, z ) or G( x, y, z ) “gives a book to" B( x, y ) 5 John gives the book to Mary Jim gives a bread to Tom Jane gives a lecture to Mary John gives the book to Mary Jim gives a bread to Tom Jane gives a lecture to Mary X gives Y to Z

6 Predicate… Exercise Let G(x,y) represent the predicate x > y Let G(x,y) represent the predicate x > y G(6,13) means 13 is greater than 6 NO G(2,0) is true Yes G(7,1) means 7 is greater than 1 Yes “4 is less than 5” can be represented by G(5,4) Yes 6

7 Predicate… Exercise Let E(x,y) represent “x sent an e-mail to y” Let E(x,y) represent “x sent an e-mail to y” ~E(A,B) means A didn’t sent e-mail to B Yes E(A,B) is equivalent to E(B,A) No “B sent an e-mail to A” is represented by E(B,A) Yes E(x,y) can also be represented by a 3 variable predicate Yes 7

8 Quantification Forming Propositions from Predicates universe universal quantifier existential quantifier free variable bound variable scope of quantifier order of quantifiers 8

9 Quantification A predicate with variables is not a proposition x > 1 It can be true or false depending on the value of x. A predicate with variables can be made a proposition by applying  assign a value to the variable  quantify the variable using a quantifier. If 3 is assigned to x becomes 3 > 1, and it becomes a true statement, hence a proposition. A quantification is performed on formulas of predicate logic ( wff ), such as x > 1 or P (x), by using quantifiers on variables. universal quantifier existential quantifier. There are two types of quantifiers: universal quantifier and existential quantifier. 9

10 Quantification Universe of Discourse (universe) “the set of objects of interest” “the domain of the (individual) variables” set of real numbers, the set of integers, the set of all cars on a parking lot, the set of all students in a classroom 10

11 Quantification 11

12 Quantification 12

13 Examples 13

14 Bound & Free variables bound variable: bound variable: if either a specific value is assigned to it or it is quantified Free variable:. Free variable:. If an appearance of a variable is not bound Scope of the quantifier: Scope of the quantifier: The scope of a quantifier is the portion of a formula where it binds its variables, is indicated by square brackets [ ] 14

15 Examples 15 t: The scope of the second existential quantifier.

16 How to read quantified formulas 16

17 Order of Application of Quantifiers 17

18 Well-Formed Formula WFF 18

19 Examples 19

20 Examples 20 One way to check whether or not an expression is a wff is to try to state it in English. If you can translate it into a correct English sentence, then it is a wff.

21 Reasoning with Predicate Logic Inference rules of predicate logic  Universal instantiation  Universal generalization  Existential instantiation  Existential generalization  Negation of quantified statement Predicate logic is more powerful than propositional logic. It allows one to reason about properties and relationships of individual objects. 21

22 22 Quantified inference rules Universal instantiation   x P(x)  P(A) Universal generalization  P(A)  P(B) …   x P(x) Existential instantiation   x P(x)  P(F)  skolem constant F Existential generalization  P(A)   x P(x)

23 23 Universal instantiation If (  x) P(x) is true, then P(C) is true, where C is any constant in the domain of x Example: (  x) eats(Ziggy, x)  eats(Ziggy, IceCream) The variable symbol can be replaced by any ground term, i.e., any constant symbol or function symbol applied to ground terms only

24 24 Universal generalization If P(c) is true, then (  x) P(x) is inferred. Example eats(Ziggy, IceCream)  (  x) eats(Ziggy, x) All instances of the given constant symbol are replaced by the new variable symbol Note that the variable symbol cannot already exist anywhere in the expression

25 25 Existential instantiation From (  x) P(x) infer P(c) Example:  (  x) eats(Ziggy, x)  eats(Ziggy, Stuff) Note that the variable is replaced by a brand-new constant not occurring in this or any other sentence in the KB Also known as skolemization; constant is a skolem constant In other words, we don’t want to accidentally draw other inferences about it by introducing the constant Convenient to use this to reason about the unknown object, rather than constantly manipulating the existential quantifier

26 26 Existential generalization If P(c) is true, then (  x) P(x) is inferred. Example eats(Ziggy, IceCream)  (  x) eats(Ziggy, x) All instances of the given constant symbol are replaced by the new variable symbol Note that the variable symbol cannot already exist anywhere in the expression

27 27 Connections between All and Exists We can relate sentences involving  and  using De Morgan’s laws: (  x)  P(x) ↔  (  x) P(x)  (  x) P(x) ↔ (  x)  P(x) (  x) P(x) ↔  (  x)  P(x) (  x) P(x) ↔  (  x)  P(x)

28 Homework 2 28

29 29 Thank You!


Download ppt "1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions."

Similar presentations


Ads by Google