PREDICATES
AND
QUANTIFIERS
PROPOSITIONAL FUNCTION
Consider P(x) = x > 3
P(x) has no truth values (x is not given a value)
P(11) is true
The proposition 11>3 is true
P(1) is false
The proposition 1>3 is false
Thus, P(x) will create a proposition when given a value
PREDICATES
PREDICATES
PREDICATES
PREDICATES
The statement “x is less than 10” has two parts.
The first part, the variable x, is the subject of the statement.
The second part—the predicate, “is less than 10”—refers to a property that the subject of the
statement can have.
We can denote the statement “x is less than 10” by P(x), where P denotes the predicate “is less
than 10” and x is the variable.
Once a value has been assigned to the variable x, the statement P(x) becomes a proposition
and has a truth value.
Example: P(7) and P(19)?
PREDICATE LOGIC
EXAMPLE 1
Let P(x) denote the statement “x > 7.”
What are the truth values of P(4) and P(8)?
Answer: We obtain the statement P(4) by setting x = 4 in the statement “x > 7.” Hence, P(4),
which is the statement “4 > 7,” is false. However, P(8), which is the statement “8 > 7,” is true.
How about ¬P(5)?
Answer: P(5) is false, so ¬(P(5)) is true
EXAMPLE 2
Let A(x) denote the statement “Computer x is under attack by an intruder.” Suppose that of the
computers on campus, only LAB2 and NETLAB are currently under attack by intruders. What
are the truth values of A(LAB1), A(LAB2), and A(NETLAB)?
Answer: We obtain the statement A(LAB1) by setting x = LAB1 in the statement “Computer x
is under attack by an intruder.” Because LAB1 is not on the list of computers currently under
attack, we conclude that A(LAB1) is false. Similarly, because LAB2 and NETLAB are on the
list of computers under attack, we know that A(LAB2) and A(NETLAB) are true.
MORE THAN ONE VARIABLE
We can also have statements that involve more than one variable.
For instance, consider the statement “x = y - 2.”
We can denote this statement by Q(x, y), where x and y are variables and Q is the predicate.
When values are assigned to the variables x and y, the statement Q(x, y) has a truth value.
EXAMPLE 3
Let Q(x, y) denote the statement “x = y + 5.” What are the truth values of the propositions
Q(1, 2) and Q(5, 0)?
Answer: To obtain Q(1, 2), set x = 1 and y = 2 in the statement Q(x, y).
Hence, Q(1, 2) is the statement “1 = 2 + 5,” which is false.
The statement Q(5, 0) is the proposition “5 = 0 + 5,” which is true.
EXERCISES
Let P(x) = “x is a multiple of 5”. What are the truth values of P(12) and P(15)?
Let P(x) = x+1 > x. What are the truth values of P(7) and P(2)?
Let P(x) denote the statement “x ≤ 4.” What are the truth values of P(0), P(4) and P(6)
Let P(x) be the statement “The word x contains the letter e.” What are the truth values of
P(orange), P(lemon), P(true) and P(false)
QUANTIFIERS
Quantification expresses the extent to which a predicate is true over a range of elements. In
English, the words all, some, many, none, and few are used in quantifications
Quantifiers provide a notation that allows us to quantify (count) how many objects in the
universe of discourse satisfy the given predicate.
Types of quantification
universal quantification, which tells us that a predicate is true for every element under consideration
(For all elements).
existential quantification, which tells us that there is one or more element under consideration for which
the predicate is true (There exists an element).
The area of logic that deals with predicates and quantifiers is called the predicate calculus
UNIVERSAL QUANTIFIERS
The universal quantification of P(x) for a particular domain is the proposition that
asserts that P(x) is true for all values of x in this domain
Represented by an upside-down A:
It means “for all”
Let P(x) = x+1 > x
We can state the following:
x P(x)
English translation: “for all values of x, P(x) is true”
English translation: “for all values of x, x+1>x is true”
UNIVERSAL QUANTIFIERS
For all …
For every …
For each …
All of …
When true? P(x) is true for every x in the domain
When false? P(x) is not always true when x is in the domain (find a value of x that P(x) is
false)- counterexample
EXAMPLE 4
Let P(x) be the statement “x - 1 < x.” What is the truth value of the quantification ∀xP(x),
where the domain consists of all real numbers?
Answer: Because P(x) is true for all real numbers x, the quantification ∀xP(x) is true
EXAMPLE 5
Let Q(x) be the statement “x < 7.” What is the truth value of the quantification ∀xQ(x), where
the domain consists of all real numbers?
Answer: Q(x) is not true for every real number x, because, for instance, Q(8) is false. That is,
x =8 is a counterexample for the statement ∀xQ(x). Thus, ∀xQ(x) is false
EXERCISES
Find a counterexample, if possible, to these universally quantified statements, where the
domain for all variables consists of all integers.
∀x(x = 1)
∀x(x > 0 ∨ x < 0)
∀x(x 2 ≥ x)
EXISTENTIAL QUANTIFIER
With existential quantification, we form a proposition that is true if and only if P(x) is true for
at least one value of x in the domain.
Represented by an bacward E:
It means “there exists”
Let P(x) = x+1 > x
We can state the following:
x P(x)
English translation: “there exists (a value of) x such that P(x) is true”
English translation: “for at least one value of x, x+1>x is true”
EXISTENTIAL QUANTIFIERS
There exists …
There is …
For some …
For at least one …
When true? There is an x for which P(x) is true. (find a value of x that P(x) is true.)
When false? P(x) is false for every x.
EXAMPLE 6
Let P(x) denote the statement “x > 7.” What is the truth value of the quantification ∃xP(x),
where the domain consists of all real numbers?
Answer: Because “x > 7” is sometimes true—for instance, when x = 8—the existential
quantification of P(x), which is ∃xP(x), is true.
EXAMPLE 7
Let Q(x) denote the statement “x = x + 1.” What is the truth value of the quantification
∃xQ(x), where the domain consists of all real numbers?
Answer: Because Q(x) is false for every real number x, the existential quantification of Q(x),
which is ∃xQ(x), is false.
QUANTIFIERS
EXERCISES
Let P(x) be the statement “x = x2.” If the domain consists of the integers, what are these truth
values?
P(0)
P(1)
P(2)
P(−1)
∃xP(x)
∀xP(x)
EXERCISES
Let Q(x) be the statement “x + 1 > 2x.” If the domain consists of all integers, what are these
truth values?
Q(0)
Q(−1)
Q(1)
∃xQ(x)
∀xQ(x)
EXPRESSING
QUANTIFICATIONS IN
ENGLISH
Let N(x) be the statement "x has visited North Dakota," where the universe of
discourse(domain) consists of the students in your school. Express each of
these quantifications in English.
a)xN(x): There exists a student in your school who has visited North Dakota)
b) xN(x): All students in your school have visited North Dakota
c) ~xN(x): There does not exist a student in your school who has visited North
Dakota
d) x~N(x): There exists a student in your school who has not visited north Dakota)
e) ~xN(x): It is not true that every student in your school has visited North Dakota
(= Not all students in your school have visited North Dakota)
f) x~N(x): All students in your school have not visited North Dakota
EXPRESSING
QUANTIFICATIONS IN
ENGLISH.
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.
∃xP(x) - There exists a student who spends more than five hours every weekday in class
∀xP(x) - Every student spends more than five hours every weekday in class.
∃x¬P(x) - There exists a student who does not spend more than five hours every weekday in class.
¬ ∃xP(x) – There does not exist a student who spends more than five hours every weekday in class.
¬ ∀x P(x) – It is not true that every student spends more than five hours every weekday in class.
∀x ¬ P(x) – All students spend not more than five hours every weekday in class.
EXPRESSING
QUANTIFICATIONS IN
ENGLISH
Let P(x) =x is effective, where the domain for x are the computers in the NET
lab. Express the following quantification in English.
∀xP(x)
∀x ¬P(x)
¬ ∀x P(x)
∃xP(x)
∃x¬P(x)
¬ ∃xP(x)
EXPRESSING
QUANTIFICATIONS IN
ENGLISH
Let P(x) be the statement "x likes reading". The domain for x are lecturers in
UB. Express each of the following quantification in English.
∀xP(x)
∀x ¬P(x)
¬ ∀x P(x)
∃xP(x)
∃x¬P(x)
¬ ∃xP(x)
IMPORTANT NOTES
Recall that P(x) is a propositional function
Let P(x) be “x == 0”
Recall that a proposition is a statement that is either true or false
P(x) is not a proposition
There are two ways to make a propositional function into a proposition:
Supply it with a value
For example, P(5) is false, P(0) is true
Provide a quantification
For example, x P(x) is false and x P(x) is true
Let the universe of discourse be the real numbers