0% found this document useful (0 votes)
2 views18 pages

Week_5_DS_nested_quantifiers

The document discusses nested quantifiers in logic, explaining their structure and providing examples of their use in mathematical statements. It covers the order of quantifiers, translating statements into logical expressions, and negating nested quantifiers. Various examples illustrate how to express and interpret these concepts in the context of real numbers and relationships.

Uploaded by

neelamshaheen660
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
2 views18 pages

Week_5_DS_nested_quantifiers

The document discusses nested quantifiers in logic, explaining their structure and providing examples of their use in mathematical statements. It covers the order of quantifiers, translating statements into logical expressions, and negating nested quantifiers. Various examples illustrate how to express and interpret these concepts in the context of real numbers and relationships.

Uploaded by

neelamshaheen660
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 18

Introduction to Logics

Week 5:Nested Qunatifiers

Dr. Abid Kamran

Capital University of Science and Technology, Islamabad

October 26, 2024

(CUST) 1 / 18
Nested Quantifiers

Consider the following propositional function

∀x∃y (x + y = 0).

Note that everything within the scope of a quantifier can be thought of as


a propositional function. For example,

∀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)

says that x + y = y + x for all real numbers x and y . This is the


commutative law for addition of real numbers. Likewise, the statement

∀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

∀x∀y ((x > 0) ∧ (y < 0) → (xy < 0)),

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

Statement When True? When False?


∀x∀yP(x, y ) For every pair x, y , There is a pair x, y for
P(x, y ) is true. which P(x, y ) is false.
∀y ∀xP(x, y ) For every pair x, y , There is a pair x, y for
P(x, y ) is true. which P(x, y ) is false.
∀x∃yP(x, y ) For every x there is a y There is an x such that
for which P(x, y ) is true. P(x, y ) is false for every
y.
∃x∀yP(x, y ) There is an x for which For every x there is a y
P(x, y ) is true for every for which P(x, y ) is false.
y.
∃x∃yP(x, y ) There is a pair x, y for P(x, y ) is false for every
which P(x, y ) is true. pair x, y .

(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

∀x∀y ((x > 0) ∧ (y > 0) → (x + y > 0)),

where the domain for both variables consists of all integers.

(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

∀x((x ̸= 0) → ∃y (xy = 1)).

(CUST) 11 / 18
Translating from Nested Quantifiers into English

Example 8
Translate the statement

∀x(C (x) ∨ ∃y (C (y ) ∧ F (x, y )))


into English, where C (x) is ”x has a computer,” F (x, y ) is ”x and y are
friends,” and the domain for both x and y consists of all students in your
school.
Solution: The statement says that for every student x in your school, x
has a computer or there is 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.

(CUST) 12 / 18
Translating from Nested Quantifiers into English

Example 9
Translate the statement

∃x∀y ∀z((F (x, y ) ∧ F (x, z) ∧ (y ̸= z)) → ¬F (y , z))


into English, where F (a, b) means ”a and b are friends” and the domain
for x, y , and z consists of all students in your school.
Solution: We first examine the expression
(F (x, y ) ∧ F (x, z) ∧ (y ̸= z)) → ¬F (y , z). This expression says that if
students x and y are friends, and students x and z are friends, and
furthermore, if y and z are not the same student, then y and z are not
friends. It follows that the original statement, which is triply quantified,
says that there is a student x such that for all students y and all students
z other than y , if x and y are friends and x and z are friends, then y and
z are not friends. In other words, there is a student none of whose friends
are also friends with each other.
(CUST) 13 / 18
Translating English Sentences into Logical Expressions
Example 10
Translate the statement ”If a person is female and is a parent, then this
person is someone’s mother” as a logical expression involving predicates,
quantifiers with a domain consisting of all people, and logical connectives.
Solution: The statement ”If a person is female and is a parent, then this
person is someone’s mother” can be expressed as ”For every person x, if
person x is female and person x is a parent, then there exists a person y
such that person x is the mother of person y .” We introduce the
propositional functions F (x) to represent ”x is female,” P(x) to represent
”x is a parent,” and M(x, y ) to represent ”x is the mother of y .” The
original statement can be represented as

∀x((F (x) ∧ P(x)) → ∃yM(x, y )).


Finally, we obtain the logically equivalent expression

∀x∃y ((F (x) ∧ P(x)) → M(x, y )).


(CUST) 14 / 18
Translating English Sentences into Logical Expressions
Example 11
Express the statement ”Everyone has exactly one best friend” as a logical
expression involving predicates, quantifiers with a domain consisting of
all people, and logical connectives.
Solution: The statement ”Everyone has exactly one best friend” can be
expressed as ”For every person x, person x has exactly one best friend.”
Introducing the universal quantifier, we see that this statement is the same
as ”∀x (person x has exactly one best friend),” where the domain consists
of all people.
As we introduce the predicate B(x, y ) to be the statement ”y is the best
friend of x,” the statement that x has exactly one best friend can be
represented as
∃y (B(x, y ) ∧ ∀z((z ̸= y ) → ¬B(x, z))).
Consequently, our original statement can be expressed as
∀x∃y (B(x, y ) ∧ ∀z((z ̸= y ) → ¬B(x, z))).
(CUST) 15 / 18
Negating Nested Quantifiers

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

∃w ∀a∃f (P(w , f ) ∧ Q(f , a)).

(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:

¬∃w ∀a∃f (P(w , f ) ∧ Q(f , a)) = ∀w ¬∀a∃f (P(w , f ) ∧ Q(f , a))


= ∀w ∃a¬∃f (P(w , f ) ∧ Q(f , a))
= ∀w ∃a∀f ¬(P(w , f ) ∧ Q(f , a))
= ∀w ∃a∀f (¬P(w , f ) ∨ ¬Q(f , a)).
This last statement states ”For every woman there is an airline such that
for all flights, this woman has not taken that flight or that flight is not on
this airline.”
(CUST) 18 / 18

You might also like