Lecture 3
Predicates and Quantifiers
Statements involving variables, such as “x > 3”, “x = y + 3” and “x + y = z”, are often found in
mathematical assertions and in computer programs. These statements are neither true nor false when
the values of the variables are not specified. Here we will discuss the ways that propositions can be
produced from such statements. The statement “x is greater than 3” has two parts. The first part, the
variable x, is the subject of the statement. The second part – the predicate (propositional function),
“is greater than 3” – refers to a property that the subject of the statement can have. We can denote the
statement “x is greater than 3” by P(x), where P denotes the predicate “is greater than 3” and x is the
variable. The statement P(x) is also said to be the value of the predicate P at x. Once a value has been
assigned to the variable x, the statement P(x) becomes a proposition and has a truth value.
Example. Let P(x) denote the statement “x > 3”. What are the truth values of P(4) and P(2)?
Solution: The statement P(4) is obtained by setting x = 4 in the statement “x > 3”. Hence, P(4), which
is the statement “4 > 3”, is true. However, P(2), which is the statement “2 > 3”, is false.
In general, a statement involving the n variables x1, x2, …, xn can be denoted by P(x1, x2, …, xn). A
statement of the form P(x1, x2, …, xn) is the value of the predicate P at the n-tuple (x1, x2, …, xn).
Quantifiers
When all the variables in a predicate are assigned values, the resulting statement has a truth value.
However, there is another important way, called quantification, to create a proposition from a
predicate. Many mathematical statements assert that a property is true for all values of a variable in a
particular domain, called the universe of discourse. Such a statement is expressed using a universal
quantification. The universal quantification of a predicate is the proposition that asserts that P(x) is
true for all values of x in the universe of discourse. The universe of discourse specifies the possible
values of the variable x.
The universal quantification of P(x) is the proposition “P(x) is true for all values of x in the universe
of discourse”. The notation denotes the universal quantification of P(x). Here is called
the universal quantifier. The proposition is also expressed as “for all x P(x)” or “for every
x P(x)”.
Example. Express the statement “Every student in this class has studied calculus” as a universal
quantification.
Solution: Let P(x) denote the statement “x has studied calculus”. Then the statement “Every student
in this class has studied calculus” can be written as , when the universe of discourse
consists of the students in this class.
Many mathematical statements assert that there is an element with a certain property. Such
statements are expressed using existential quantification.
The existential quantification of P(x) is the proposition “There exists an element x in the universe of
discourse such that P(x) is true”. We use the notation for the existential quantification of
P(x). Here is called the existential quantifier. The existential quantification is also
expressed as “There is an x such that P(x)”, “There is at least one x such that P(x)”or “For some x
P(x)”.
Example. Let P(x) denote the statement “x > 3”. What is the truth value of the quantification
, where the universe of discourse is the set of real numbers?
Solution: Since “x > 3” is true – for instance, when x = 4 – the existential quantification of P(x),
which is , is true.
Example. Let Q(x) denote the statement “x = x + 1”. What is the truth value of the quantification
, where the universe of discourse is the set of real numbers?
Solution: Since Q(x) is false for every real number x, the existential quantification of Q(x), which is
, is false.
The following table summarizes the meaning of the universal and the existential quantifiers:
Statement When True? When False?
P(x) is true for every x. There is an x for which P(x) is false.
There is an x for which P(x) is true. P(x) is false for every x.
Sometimes expressions involving quantifiers can be quite complicated. Translating a complicated
expression into English helps understanding of its meaning.
Example. Translate the statement into English, where C(x) is “x
has a computer”, F(x, y) is “x and y are friends”, and the universe of discourse for both x and y is the
set of all students in your school.
Solution: The statement says that for every student x in your school x has a computer or there a
student y such that y has a computer and x and y are friends. In other words, every student in your
school has a computer or has a friend who has a computer.
The following examples show how to use logical operators and quantifiers to express English
sentences.
Example. Express the statements “Some student in this class has visited Mexico” and “Every student
in this class has visited either Canada or Mexico” using quantifiers.
Solution: Let the universe of discourse for the variable x be the set of students in your class. Let M(x)
be the statement “x has visited Mexico” and C(x) the statement “x has visited Canada”. The
statement “Some student in this class has visited Mexico” can be written as , The
statement “Every student in this class has visited either Canada or Mexico” can be written as
Example. Express the statement “If somebody is female and is a parent, then this person is
someone’s mother” as a logical expression.
Solution: Let F(x) be the statement “x is female”, let P(x) be the statement “x is a parent”, and let
M(x, y) be the statement “x is the mother of y”. Since the statement in the example pertains to all
people, we can write it symbolically as .
Binding variables
When a quantifier is used on the variable x or when we assign a value to this variable, we say that
this occurrence of the variable is bound. An occurrence of a variable that is not bound by a quantifier
or set equal to a particular value is said to be free. All the variables that occur in a predicate must be
bound to turn it into a proposition. This can be done using a combination of universal quantifiers,
existential quantifiers, and value assignments.
In each of the following examples the universe of discourse for each variable is the set of real
numbers.
Example. Let P(x, y) be the statement “x + y = y + x”. What is the truth value of the quantification
?
Solution: The quantification denotes the proposition “For all real numbers x and
for all real numbers y, it is true that x + y = y + x”. Since P(x, y) is true for all real numbers x and y,
the proposition is true.
Example. Let Q(x, y) denote “x + y = 0”. What are the truth values of the quantification
and ?
Solution: The quantification denotes the proposition “There is a real number y such
that for every real number x, Q(x, y) is true”. No matter what value of y is chosen, there is only one
value of x for which x + y = 0. Since there is no real number y such that x + y = 0 for all real
numbers x, the statement is false.
The quantification denotes the proposition “For every real number x there is a real
number y such that Q(x, y) is true”. Given a real number x, there is a real number y such that x + y =
0; namely, y = – x. Hence, the statement is true.
The following table summarizes the meanings of the different possible quantifications involving two
variables.
Statement When True? When False?
P(x, y) is true for every pair x, y. There is a pair x, y for which P(x, y) is
false.
For every x there is a y for which P(x, y) is There is an x such that P(x, y) is false
true. for every y.
There is an x for which P(x, y) is true for For every x there is a y for which P(x,
every y. y) is false.
There is a pair x, y for which P(x, y) is true. P(x, y) is false for every pair x, y.
Negations
We will often want to consider the negation of a quantified expression. For instance, consider the
negation of the statement “Every student in the class has taken a course in calculus”. This statement
is a universal quantification, namely, , where P(x) is the statement “x has taken a course in
calculus”. The negation of this statement is “It is not the case that every student in the class has taken
a course in calculus”. This is equivalent to “There is a student in the class who has not taken a course
in calculus”. And this is simply the existential quantification of the negation of the original
propositional function, namely, . This example illustrates the following equivalence:
. Similarly, we can show that .
Negation Equivalent When is negation true? When false?
statement
P(x) is false for every x. There is an x for which P(x) is true.
There is an x for which P(x) is false. P(x) is true for every x.
Glossary
universe of discourse – универсум (пространство) рассуждений
universal quantifier – квантор всеобщности; existential quantifier – квантор существования
to pertain – иметь отношение, подходить; bound – связанный; free – свободный
to enroll – вносить в список; contestant – участник
Exercises for Seminar 3
3.1. Let P(x) be the statement “x spends more than five hours every weekday in class”, where the
universe of discourse for x is the set of students. Express each of the following quantifications in
English: a) ; b) ; c) ; d) .
3.2. Let P(x, y) be the statement “x has taken y”, where the universe of discourse for x (for the first
place) is the set of all students in your class and for y (for the second place) is the set of all computer
courses at your school. Express each of the following quantifications in English. a) ;
b) ; c) ; d) ; e) ; f)
.
3.3. Let W(x, y) mean that x has visited y, where the universe of discourse for x is the set of all
students in your school and the universe of discourse for y is the set of all Web sites. Express each of
the following statements by a simple English sentence: a) W(Sarah Smith, [Link]);
b) x W(x, [Link]); c) y W(Jose Orez, y); d) y (W(Ashok Puri, y) W(Cindy Yoon, y));
e) y z (y (David Belcher) W(David Belcher, z) → W(y, z)));
f) .
3.4. Let P(x) be the statement “x can speak Russian” and let Q(x) be the statement “x knows the
computer language C++”. Express each of the following sentences in terms of P(x), Q(x), quantifiers,
and logical connectives where the universe of discourse for x is the set of all students at your school.
a) There is a student at your school who can speak Russian and who knows C++; b) There is a
student at your school who can speak Russian but who doesn’t know C++; c) Every student at your
school either can speak Russian or knows C++; d) No student at your school can speak Russian or
knows C++.
3.5. Let Q(x, y) be the statement “x + y = x – y”. If the universe of discourse for both variables is the
set of integers, what are the truth values of the following? a) Q(1, 1); b) Q(2, 0); c) ; d)
; e) ; f) ; g) ; h) ; i)
.
3.6. Rewrite each of the following statements so that negations appear only within predicates (that is,
so that no negation is outside a quantifier or an expression involving logical connectives).
a) ; b) ; c) ; d)
;
e) .
3.7. Determine the truth value of each of the following statements if the universe of discourse for all
variables is the set of all integers.
a) ; b) ; c) ; d) ; e) .
3.8. Let be the statement “ is a computer science student”, be “ can speak Hindi”,
be “ can drive a car”, be “ has visited Alaska”, be “ has visited
Hawaii”, and be “ has learned ” where the universe of discourse for is the set of
all people in the world and the universe of discourse for is the set of all programming languages.
Use quantifiers to express each of the following statements: a) There is a computer science student
who can speak Hindi; b) Every computer science student knows how to drive a car; c) Some
computer science student has visited Alaska but has not visited Hawaii; d) All computer science
students have learned at least one programming language; e) There are two computer science
students who can speak Hindi.
3.9. The notation denotes the proposition “There exists a unique x such that is
true”. If the universe of discourse is the set of integers, what are the truth values of the following?
a) ; b) ; c) ; d) .
3.10. What are the truth values of the following statements?
a) ; b) ; c) .
3.11. Express the quantification using universal quantifications, existential
quantifications, and logical operators.
Exercise for Homework 3
3.12. Let C(x, y) mean that x is enrolled in y, where the universe of discourse for x is the set of all
students in your school and the universe of discourse for y is the set of all classes being given at your
school. Express each of the following statements by a simple English sentence.
a) C(Randy Goldberg, CS 252); b) x C(x, Math 695); c) y C(Carol Sitea, y);
d) x (C(x, Math 222) C(x, CS 252)); e) ;
f) .
3.13. Let Q(x, y) be the statement “x has been a contestant on y”. Express each of the following
sentences in terms of Q(x, y), quantifiers, and logical connectives, where the universe of discourse
for x is the set of all students at your school and for y is the set of all quiz shows on television.
a) There is a student at your school who has been a contestant on a television quiz show; b) No
student at your school has ever been a contestant on a television quiz show; c) There is a student at
your school who has been a contestant on Jeopardy and on Wheel of Fortune; d) At least two
students from your school have been contestants on Jeopardy.
3.14. Let P(x) be the statement “x = x2”. If the universe of discourse is the set of integers, what are
the truth values of the following? a) P(0); b) P(1); c) P(2); d) P(–1); e) ; f) .
3.15. Determine the truth value of each of the following statements if the universe of discourse of
each variable is the set of real numbers. a) ; b) ; c) ; d)
; e) ; f) ; g) ; h)
.
3.16. Rewrite each of the following statements so that negations appear only within predicates (that
is, so that no negation is outside a quantifier or an expression involving logical connectives).
a) ; b) ; c) ;
d) ; e) .
3.17. Let be the statement “ is a computer science student”, be “ needs a
course in discrete mathematics”, be “ owns a personal computer”, and be “
has taken ” where the universe of discourse for is the set of all people in the world and the
universe of discourse for is the set of all courses in computer science. Use quantifiers to express
the following statements: a) Every computer science student needs a course in discrete mathematics;
b) There is a computer science student who owns a personal computer; c) Every computer science
student has taken at least one computer science course; d) There is a computer science student who
has taken at least one course in computer science; e) There is a computer science student who has
taken at least two courses in computer science.