![Page 1: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/1.jpg)
1
Predicate (Relational) Logic
1
![Page 2: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/2.jpg)
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
![Page 3: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/3.jpg)
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.
![Page 4: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/4.jpg)
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 blueThe sky is blue
The cover of this book is blue
"B(x)"B(x) reads as "x is blue"
![Page 5: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/5.jpg)
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 MaryJim gives a bread to Tom
Jane gives a lecture to Mary
X gives Y to Z
![Page 6: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/6.jpg)
Predicate…Exercise• 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
![Page 7: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/7.jpg)
Predicate…Exercise• 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
![Page 8: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/8.jpg)
Quantification Forming Propositions from Predicates
universe
universal quantifier
existential quantifier
free variable
bound variable
scope of quantifier
order of quantifiers
8
![Page 9: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/9.jpg)
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.
There are two types of quantifiers: universal quantifier and existential quantifier.
9
![Page 10: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/10.jpg)
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
![Page 11: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/11.jpg)
Quantification
Universal quantifier: turns the statement x > 1 to
"for every object x in the universe, x > 1", which is expressed as
“x, x > 1”
x, P(x) "For all x, P(x) holds", "for each x, P(x) holds" , P(x) is true for every
object x in the universe.
Ex. "All cars have wheels" x, P(x), • P(x) is the predicate denoting: x has wheels• and the universe of discourse is only populated by cars.
11
![Page 12: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/12.jpg)
Quantification
12
![Page 13: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/13.jpg)
Examples
13
![Page 14: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/14.jpg)
Bound & Free variables
bound variable: if either a specific value is assigned to it or it is quantified
Free variable:. If an appearance of a variable is not bound
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
![Page 15: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/15.jpg)
Examples
15
t: The scope of the second existential quantifier.
![Page 16: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/16.jpg)
How to read quantified formulas
16
![Page 17: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/17.jpg)
Order of Application of Quantifiers
17
![Page 18: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/18.jpg)
Well-Formed Formula WFF
18
![Page 19: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/19.jpg)
Examples
19
![Page 20: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/20.jpg)
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.
![Page 21: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/21.jpg)
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
![Page 22: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/22.jpg)
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)
![Page 23: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/23.jpg)
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
![Page 24: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/24.jpg)
24
Universal generalization
If P(c) is true, then ( x) P(x) is inferred.
Exampleeats(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
![Page 25: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/25.jpg)
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
![Page 26: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/26.jpg)
26
Existential generalization
If P(c) is true, then (x) P(x) is inferred.
Exampleeats(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
![Page 27: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/27.jpg)
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)
![Page 28: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/28.jpg)
Homework 2
28
![Page 29: 1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions](https://reader035.vdocument.in/reader035/viewer/2022070401/56649f1c5503460f94c32ad2/html5/thumbnails/29.jpg)
29
Thank You!