Predicate Logic: Rosen
Predicate Logic: Rosen
Rosen
1
Predicate Logic
2
Applications of Predicate Logic
• It is the formal notation for writing perfectly
clear, concise, and unambiguous
mathematical definitions, axioms, and
theorems for any branch of mathematics.
• Supported by some of the more sophisticated
database query engines.
• Basis for automatic theorem provers and
many other Artificial Intelligence systems.
3
Subjects and Predicates
• The proposition
“The dog is sleeping”
has two parts:
– “the dog” denotes the subject - the object or
entity that the sentence is about.
– “is sleeping” denotes the predicate- a property
that the subject can have.
4
Propositional Functions
• A predicate is modeled as a function P(·) from objects
to propositions.
– P(x) = “x is sleeping” (where x is any object).
• The result of applying a predicate P to an object x=a
is the proposition P(a).
– e.g. if P(x) = “x > 1”,
then P(3) is the proposition “3 is greater than 1.”
• Note: The predicate P itself (e.g. P=“is sleeping”) is
not a proposition (not a complete sentence).
5
Propositional Functions
• Predicate logic includes propositional
functions of any number of arguments.
e.g. let P(x,y,z) = “x gave y the grade z”,
x=“Mike”, y=“Mary”, z=“A”,
P(x,y,z) = “Mike gave Mary the grade A.”
6
Universe of Discourse
7
Quantifier Expressions
9
The Universal Quantifier
• To prove that a statement of the form
x P(x) is false, it suffices to find a
counterexample (i.e., one value of x in the
universe of discourse such that P(x) is false)
10
Existential Quantifier Example
11
Quantifier Equivalence Laws
• x y P(x,y) y x P(x,y)
x y P(x,y) y x P(x,y)
13