Lec 3 - Predicates&quantifiers1
Lec 3 - Predicates&quantifiers1
Lec 3 - Predicates&quantifiers1
quantifiers
PREDICATES
Consider these statement having variable:
x > 3
X= statement
Is greater than 3 = predicate
Property
Domain
EXAMPLE 2:
if x > 0 then x := x + 1.
Preconditions &
Postconditions
QUANTIFICATION
Universal Quantifier
Table 1 - Quantifiers
Statement
When True?
xP(x)
xP(x)
When False?
Example 1 :
Let
Solution:
Example 2:
Solution:
Q(x) is not true for every real number x,
because, for instance, Q(3) is false. That is,
x = 3 is a counterexample for the statement
xQ(x). Thus xQ(x) is false.
Existential Quantifier
Existential Quantifier
xP(x) - is read as
There is an x such that P(x),
There is at least one x such that P(x),
or
For some xP(x).
Example 1:
Example 2:
Solution:
Uniqueness Quantifier
Example 1:
Precedence of Quantifiers
Statements
involving
predicates
and
quantifiers are logically equivalent if and
only if they have the same truth value no
matter which predicates are substituted into
these statements and which domain of
discourse is used for the variables in these
propositional functions. We use the notation
S T to indicate that two statements S and
T involving predicates and quantifiers are
logically equivalent.
Negating Quantified
Expressions
Example 1 : Every student in your class
has taken a course in calculus.
This statement is a universal quantification,
namely,
xP(x),
xP(x) x P(x).
Example 2:
Equivalent
Statement
When Is
Negation
True?
xP(x)
x P(x)
For every x,
P(x) is false.
xP(x)
x P(x)
There is an x for
which
P(x) is true.
Example 1:
Every student in this class has studied
calculus
xC(x)
where C(x), which is the statement x has
studied calculus.
Example 1:
Assume:
F(x): x is a fox.
S(x): x is sly.
Exercises:
1. Let P(x) denote the statement x 4.
What are these truth values?
a) P(0)
b) P(4)
c) P(6)
Answers:
a) x(P(x) Q(x))
b) x(P(x) Q(x))
c) x(P(x)Q(x))
d) x (P (x)Q(x))
Assignment:
A. Let P(x) be the statement x spends more
than five hours every weekday in class,
where the domain for x consists of all
students.
Express
each
of
these
quantifications in English.
a) xP(x)
b) xP(x)
c) x P(x)
d) x P(x)
Assignment: (Cont)
B. Translate these statements into English,
where C(x) is x is a comedian and F(x) is
x is funny and the domain consists of all
people.
a) x(C(x) F(x))
b) x(C(x) F(x))
c) x(C(x) F(x))
d) x(C(x) F(x))