Week_5_DS_nested_quantifiers
Week_5_DS_nested_quantifiers
(CUST) 1 / 18
Nested Quantifiers
∀x∃y (x + y = 0).
∀x∃y (x + y = 0)
is the same thing as ∀xQ(x), where Q(x) is ∃yP(x, y ), where P(x, y ) is
x + y = 0.
(CUST) 2 / 18
Understanding Statements Involving Nested Quantifiers
Assume that the domain for the variables for x and y consist of all the real
numbers. The statement
∀x∀y (x + y = y + x)
∀x∃y (x + y = 0)
says that for every real number x there is a real number y such that
x + y = 0. This states that every real number has an additive inverse.
Similarly, the statement
∀x∀y ∀z(x + (y + z) = (x + y ) + z)
is the associative law for addition of real numbers.
(CUST) 3 / 18
Understanding Statements Involving Nested Quantifiers
Example 2
Translate into English the statement
where the domain for both variables consists of all real numbers.
Solution: This statement says that for every real number x and for every
real number y , if x > 0 and y < 0, then xy < 0. That is, this statement
says that for real numbers x and y , if x is positive and y is negative, then
xy is negative. This can be stated more succinctly as ”The product of a
positive real number and a negative real number is always a negative real
number.”
(CUST) 4 / 18
The Order of Quantifiers
(CUST) 5 / 18
The Order of Quantifiers
Example 3
Let P(x, y ) be the statement ”x + y = y + x.” What are the truth values
of the quantifications ∀x∀yP(x, y ) and ∀y ∀xP(x, y ), where the domain
for all variables consists of all real numbers?
Solution: The quantification
∀x∀yP(x, y )
denotes the proposition
”For all real numbers x, for all real numbers y , x + y = y + x.”
Because P(x, y ) is true for all real numbers x and y , the proposition
∀x∀yP(x, y ) is true. Note that the statement ∀y ∀xP(x, y ) says ”For all
real numbers y , for all real numbers x, x + y = y + x.” This has the same
meaning as the statement ”For all real numbers x, for all real numbers y ,
x + y = y + x.” That is, ∀x∀yP(x, y ) and ∀y ∀xP(x, y ) have the same
meaning, and both are true.
(CUST) 6 / 18
The Order of Quantifiers
Example 4
Let Q(x, y ) denote x + y = 0. What are the truth values of the
quantifications ∃y ∀xQ(x, y ) and ∀x∃yQ(x, y ), where the domain for all
variables consists of all real numbers?
Solution: The quantification
∃y ∀xQ(x, y )
denotes the proposition
”There is a real number y such that for every real number x, Q(x, y ).”
No matter what value of y is chosen, there is only one value of x for
which x + y = 0. Because there is no real number y such that x + y = 0
for all real numbers x, the statement ∃y ∀xQ(x, y ) is false.
(CUST) 7 / 18
The Order of Quantifiers
Example 4 (continued)
The quantification
∀x∃yQ(x, y )
denotes the proposition
”For every real number x, there is a real number y such that Q(x, y ).”
This statement is true, because for every real number x, we can choose
y = −x, and then x + y = x + (−x) = 0.
(CUST) 8 / 18
The Order of Quantifiers
Example 5
Let Q(x, y , z) be the statement ”x + y = z.” What are the truth values of
the statements ∀x∀y ∃zQ(x, y , z) and ∃z∀x∀ yQ(x, y , z), where the
domain of all variables consists of all real numbers?
Solution: Suppose that x and y are assigned values. Then, there exists a
real number z such that x + y = z. Consequently, the quantification
∀x∀y ∃zQ(x, y , z) is true.
The quantification ∃z∀x∀yQ(x, y , z) denotes the proposition
”There is a real number z such that for all real numbers x and for all real
numbers y it is true that x + y = z.”
This statement is false, because there is no value of z that satisfies the
equation x + y = z for all values of x and y .
(CUST) 9 / 18
Translating Mathematical Statements into Statements
Involving Nested Quantifiers
Example 6
Translate the statement ”The sum of two positive integers is always
positive” into a logical expression.
Solution: It can be read as ”For every two integers, if these integers are
both positive, then the sum of these integers is positive.” Next,
Introducting x and y ”For all positive integers x and y , x + y is positive.”
Consequently, we can express this statement as
(CUST) 10 / 18
Translating Mathematical Statements into Statements
Involving Nested Quantifiers
Example 7
Translate the statement ”Every real number except zero has a
multiplicative inverse.”
Solution: We first rewrite this as ”For every real number x except zero, x
has a multiplicative inverse.” We can rewrite this as ”For every real
number x, if x ̸= 0, then there exists a real number y such that xy = 1.”
This can be rewritten as
(CUST) 11 / 18
Translating from Nested Quantifiers into English
Example 8
Translate the statement
(CUST) 12 / 18
Translating from Nested Quantifiers into English
Example 9
Translate the statement
Example 12
Express the negation of the statement ∀x∃y (xy = 1) so that no negation
precedes a quantifier.
Solution: By successively applying De Morgan’s laws for quantifiers, we
can move the negation in ¬∀x∃y (xy = 1) inside all the quantifiers. We
find that ¬∀x∃y (xy = 1) is equivalent to ∃x¬∃y (xy = 1), which is
equivalent to ∃x∀y ¬(xy = 1). Because ¬(xy = 1) can be expressed more
simply as xy ̸= 1, we conclude that our negated statement can be
expressed as ∃x∀y (xy ̸= 1).
(CUST) 16 / 18
Negating Nested Quantifiers
Example 13
Use quantifiers to express the statement ”There is a woman who has taken
a flight on every airline in the world.”
Solution: Let P(w , f ) be ”w has taken f ” and Q(f , a) be ”f is a flight
on a.” We can express the statement as
(CUST) 17 / 18
Negating Nested Quantifiers
Example 14
Use quantifiers to express the statement ”There does not exist a woman
who has taken a flight on every airline in the world.”
Solution: From the last example this statement can be expressed as
∃w ∀a∃f (P(w , f ) ∧ Q(f , a)), where P(w , f ) is ”w has taken f ” and
Q(f , a) is ”f is a flight on a.” By successively applying De Morgan’s laws ,
we find that our statement is equivalent to each of this sequence of
statements: