Lecture 03
Lecture 03
(CSC 0611101)
Chapter 1
1.3 Predicates and Quantifiers
1
Agenda
• Predicate Logic
• Predicates
• Quantifiers
• Existential Quantifier,
• Universal Quantifier,
2
3
Predicates
• Predicate: A property that the subject of the statement can
have.
Example: “ x > 3 ”
x: variable
>3: predicate
• We can denote the statement “x is greater than 3” by P(x),
where P denotes the predicate “is greater than” and x is the
variable. The statement P(x) is also said to be the value of the
propositional function P at x.
• P(x): x>3
– The value of the propositional function P at x
• Note: Once a value has been assigned to the variable x, the statement P(x)
becomes a proposition and has a truth value (either TRUE or FALSE)
4
Predicates
• A predicate is a sentence that contains a finite number of variables
and becomes a proposition when specific values are substituted for
the variables.
• A predicate, or propositional function, is a function that takes
some variable(s) as arguments and returns True or False.
• A PREDICATE is symbolized by a CAPITAL LETTER and the variable(s)
by small letter(s).
• The sentence “x is a bachelor” is symbolized as P(x),
where x is a variable. When concrete values are substituted
in place of x, a proposition results(with a truth value, either True or
False). P(x) is also called a propositional function , because each
choice of x produces a proposition P(x) that is either true or false.
5
Example 1 (page 31)
• Let P(x) denote the statement “x>3”.
What are the truth values of P(4) and P(2)?
6
Example 2(Modified) @ page 31
• Let, A(x) : “Computer x is under attack by an intruder”.
Suppose that of the computers on campus, only C1 and C7
are currently under attack by intruders.
What are the truth values of A (C1), A(C3), A(C7)?
Solution:
• A(C1): “Computer C1 is under attack by an intruder” is true
• A(C7): “Computer C7 is under attack by an intruder” is true
• A(C3): “Computer C3 is under attack by an intruder” is false
• Why ?
– Because C3 is not in the list of computers that are attacked by
intruders.
7
Multivariable Predicates
• Multivariable Predicates ==> Predicates that have
more than one variable.
• For example, Q(x, y): “x = y + 3” ,
where x and y are variables and Q is the predicate.
8
Example 3(page 31)
9
Quantifiers
• Quantification:
– Universal quantification: A predicate is true for
every element
– Existential quantification: There is one or more
elements for which a predicate is true
10
Quantifiers
There are two quantifiers:
1. Existential Quantifier
“” reads “there exists”
2. Universal Quantifier
“” reads “for all”
11
The Universal Quantifier
• Definition: The universal quantification of P(x) is the
statement “P(x) for all values of x in the domain”.
• The notation x P(x) denotes the universal
quantification of P(x).
• is called the universal quantifier
• We read x P(x) as “for all x P(x)” or “for every x
P(x)”
• An element for which P(x) is false is called a
counterexample of x P(x)
12
The Universal Quantifier
13
The Universal Quantifier
• Example 8 (page 34): Let P(x) be the statement “x+1>1”
What is the truth value of the quantification x P(x ),
where the domain consists of all real numbers?
14
The Universal Quantifier
• Example 9(page 35): Let Q(x) be the statement “x<2”.
What is the truth value of the quantification x Q(x ),
where the domain consists of all real numbers?
• 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 x Q(x ).
Thus, x Q(x ), is false
15
The Universal Quantifier
• (Modified) Example 10 (page 35): Let P(x) be the
statement “x2>0”. What is the truth value of the
quantification x P(x ), where the universe of
discourse consists of all integers?
• Solution: P(x) is not true for all integers.
We can give a counter example. We see that x=0 is a
counterexample, because x2 = 0 when x = 0,
so that x2 is not greater than 0 when x = 0.
Therefore, x P(x ) is false.
16
The Universal Quantifier
• Example 11 (page 35): What is the truth value of x P(x ),
where P(x) is the statement “x2<10” and the domain consists of
the positive integers not exceeding 4?
17
The Universal Quantifier
• Quiz: What is the truth value of x P(x ), where P(x) is the
statement “x2<10” and the domain consists of the positive
integers less than 4?
• Solution: The statement x P(x ) is the same as the
conjunction P(1) P(2) P(3) , because the domain consists of
the integers 1, 2, 3.
So, x P(x ) is true.
How?----------See Below------------------------------------------------
P(1): “12<10”, is true
P(2): “22<10” is true
P(3): “32<10” is true
18
The Existential Quantifier
• Definition: The existential quantification of P(x) is the
proposition “There exists an element x in the domain such
that P(x)”.
• We denote the existential quantification of P(x) by x P(x)
• is called the existential quantifier.
19
The Existential Quantifier
• “x P (x)” is true when an instance can be found
which when plugged in for x, makes P (x) true.
20
The Existential Quantifier
• Example 14 (page 36):Let P(x) denote the statement “x>3”.
What is the truth value of the quantification x P (x)” , where
the domain consists of all real numbers?
21
Class Work
1. Let P(x) denote the statement “x>0”. What is the truth value
of the quantification x P (x)” , where the domain consists of
integers?
2. Let P(x) denote the statement “x>0”. What is the truth value
of the quantification x P (x)” , where the domain consists of
positive integers?
3. Let P(x) denote the statement “x>0”. What is the truth value
of the quantification x P (x)” , where the domain consists of
negative integers?
4. Let P(x) denote the statement “x<2”. What is the truth value
of the quantification x P (x)” , where the domain consists of
all prime numbers?
22
The Existential Quantifier
• Example 15(page 36):Let Q(x) denote the statement
“x=x+1”. What is the truth value of the quantification
x Q(x), where the domain consists of all real
numbers?
• Solution: Because Q(x) is false for every real number
x, the existential quantification of Q(x), which is
x Q(x), is false.
23
The Existential Quantifier
• Example 16(page 37): What is the truth value of
x P(x), where P(x) is the statement “x2>10” and the universe
of discourse consists of the positive integers not exceeding 4?
24
Universal & Existential Quantifiers:
When True? When False?
25