Lesson 2 Propositional Functions

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 69

Lesson 2.

1
Propositional
Functions
Objective

• At the end of the lesson you are expected to


• express the symbolic form of Propositional Functions into
statements and vice versa,
• determine the truth value of universal and existential
mathematical statements.
Consider the statements below
• Every math major enrolled in the university is studying.
• There is a math major enrolled in the university who is only playing
online games.
• A real number is equal to its square.
•𝑥>3
• 𝑥 = 𝑦+3
• 𝑥+𝑦 =𝑧
Can you identify the truth value of each statement?
Why not?
*Truth values of these kinds of statements can only be identified
when there are specific examples/values that belong to the domain
of discourse/domain.
Recall:
Mathematical Logic

Mathematical Logic

Propositional Logic/
Predicate Logic/
Propositional
Predicate Calculus
Calculus
Propositional Functions and Predicates
• Recall in your English Subject:
Consider the sentence below
𝐽𝑢𝑎𝑛 𝐷𝑒𝑙𝑎 𝐶𝑟𝑢𝑧 is enrolled in Logic and Set Theory.

Subject Predicate
Propositional Functions and Predicates

• Consider the statement,


𝑥 is greater than 3.

Subject Predicate
Propositional Functions and Predicates

• Consider the statement,


𝑥 is greater than 3.

Can be denoted as 𝑷(𝒙)


Predicate Variable
𝑷 𝒙
Propositional Functions and Predicates

• Consider the statement,


𝑥 is greater than 3.

Propositional
Function
Can be denoted as 𝑷(𝒙) 𝑷(𝒙)
Predicate Variable Becomes true/false when
x has a value. Hence,
𝑷 𝒙 becomes a proposition.
Definition:
Propositional Function
• A statement of the form 𝑃 𝑥1 , 𝑥2 , . . . , 𝑥𝑛 is the value of
the 𝑃𝑟𝑜𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛𝑎𝑙 𝐹𝑢𝑛𝑐𝑡𝑖𝑜𝑛 𝑷 at the variables
𝑥1 , 𝑥2 , . . . , 𝑥𝑛 .
• If specific values are assigned to the variables in the
propositional function 𝑃 𝑥1 , 𝑥2 , . . . , 𝑥𝑛 , it becomes a
proposition and a truth value exists.
Example:
The following are propositional functions
1. 𝑃 𝑥 : 𝑥 > 3
2. 𝑄 𝑥, 𝑦 : 𝑦 = 𝑥 + 3
3. 𝑅 𝑥, 𝑦, 𝑧 : 𝑥 2 + 𝑦 2 ≤ 𝑧 2
Propositional Functions Subject Predicate
𝑃 𝑥 :𝑥 > 3 𝑥 >3
𝑄 𝑥, 𝑦 : 𝑦 = 𝑥 + 3 𝑦 =𝑥+3
𝑅 𝑥, 𝑦, 𝑧 : 𝑥 2 + 𝑦 2 ≤ 𝑧 2 𝑥 2 + 𝑦2 ≤ 𝑧2
Example

1. Let P(x) denote the statement “x > 3.” What are the
truth values of P(4) and P(2)?
Solution:
•𝑃 4 :4 > 3
• True
•𝑃 2 :2 > 3
• False
Example
2. Let Q(x, y) denote the statement “x = y + 3.” What are the truth values
of the propositions Q(1, 2) and Q(3, 0)?
Solution:
• 𝑄 1, 2 : 1 = 2 + 3
⇒1=2+3
⇒1≠5
• False
• 𝑄 3, 0 : 3 = 0 + 3
⇒3=0+3
⇒3=3
• True
Example
3. Let 𝑅 𝑥, 𝑦, 𝑧 denote the statement “𝑥 2 + 𝑦 2 ≤ 𝑧 2 .” What are the truth
values of the propositions R(1, 2, 3) and R(0, 2, 1)?
Solution:
• 𝑅 1, 2, 3 : 12 + 22 ≤ 32
⇒ 12 + 22 ≤ 32
⇒5≤9
• True
• 𝑅 0, 2, 1 : 02 + 22 ≤ 12
⇒ 02 + 22 ≤ 12
⇒4≰1
• False
Some propositional functions are also stated
as shown below
• Every math major enrolled in the university is studying.
• There is a math major enrolled in the university who is only playing online
games.
• For all real number x, 2x is an even number.
• For some integer y, 𝑦 + 1 is an integer.

❑Some of mathematical statements use the word every, for all, there exists,
for some, etc.
These words are used in quantification. Also called as quantifiers.
❑Quantification expresses the extent to which a predicate is true over a
range of elements.
Observe the statement below

For all real number x, 2x is an even number.

Quantifier Domain Propositional Function

Universal Quantifier
Observe the statement below
There exists a real number x, 2 𝑥 is an even number.

Quantifier Domain Propositional Function

Existential Quantifier
Definition:
Universal Quantification
• The universal quantification of 𝑃(𝑥) is the statement
“𝑃(𝑥) for all values of 𝑥 in the domain.”
• The notation ∀𝑥𝑃(𝑥) denotes the universal quantification
of 𝑃(𝑥). Here ∀ is called the universal quantifier.
• We read ∀𝑥𝑃(𝑥) as “for all 𝑥𝑃(𝑥)” or “for every 𝑥𝑃(𝑥).”
• An element for which 𝑃(𝑥) is false is called a
counterexample to ∀𝑥𝑃 𝑥 .
• Words used as Universal Quantifiers:
“For all”, “for each”, “for every"
Definition:
Existential Quantification
• The existential quantification of 𝑃(𝑥) is the proposition
“There exists an element 𝑥 in the domain such that 𝑃(𝑥).”
• We use the notation ∃𝑥𝑃 𝑥 for the existential
quantification of 𝑃(𝑥).
• Here ∃ is called the existential quantifier.
• Words used as Existential Quantifiers:
“There exists”, “there is”, “for some“, “there is at least”
Example
Determine whether the statement is an example of Universal
Quantification or Existential Quantification.
1. For all real number 𝑥, 𝑥 + 1 > 1.
Universal Quantification
2. There exists a real number 𝑥 such that 𝑥 = 𝑥 + 1.
Existential Quantification
3. 𝑥 2 + 1 > 0 for every natural number 𝑥.
Universal Quantification
4. 𝑥 2 ≤ 𝑥 for some nonzero integers.
Existential Quantification
Truth Value of a Quantification

How will you know that a quantification is true or false?

Statement When true? When false?


𝑃(𝑥) is true for every 𝑥 There is an 𝑥 for which
∀𝑥 𝑃(𝑥) P 𝑥 is false.
There is an 𝑥 for which
∃𝑥 𝑃(𝑥) 𝑃(𝑥) is false for every 𝑥.
P 𝑥 is true.

Note that the truth value of ∀𝒙 𝑷(𝒙) and ∃𝒙 𝑷(𝒙) depends on the domain.
Example
Determine the truth value of the given quantification.
1. For all real number 𝑥, 𝑥 + 1 > 1.
False
2. There exists a real number 𝑥 such that 𝑥 = 𝑥 + 1.
False
3. 𝑥 2 + 1 > 0 for every natural number 𝑥.
True
4. 𝑥 2 ≤ 𝑥 for some nonzero integers.
True
Uniqueness Quantifier
• Denoted by ∃! or ∃1 .
• The notation ∃! 𝑥𝑃(𝑥) [or ∃1 𝑥𝑃(𝑥)] states “There exists a
unique x such that P(x) is true.”
• Other phrases for uniqueness quantification include “there is
exactly one” and “there is one and only one.”
Example:
1. ∃! 𝑥(𝑥 − 1 = 0), where the domain is the set of real
numbers.
True, since 𝒙 = 𝟏 is the only answer.
2. ∃1 𝑥(𝑥 2 = 0), where 𝑥 is an integer.
True, since 𝐱 = 𝟎 is the only answer.
Quantifiers over Finite Domains
• When the domain of a quantifier is finite, that is, when all
its elements can be listed, quantified statements can be
expressed using propositional logic.
• In particular, when the elements of the domain are
𝑥1 , 𝑥2 , … , 𝑥𝑛 , where n is a positive integer, the universal
quantification ∀𝑥𝑃(𝑥) is the same as the conjunction
𝑃 𝑥1 ∧ 𝑃 𝑥2 ∧ ⋯ ∧ 𝑃 𝑥𝑛 , because this conjunction is
true if and only if 𝑃 𝑥1 , 𝑃 𝑥2 , … , 𝑃 𝑥𝑛 are all true.
Quantifiers over Finite Domains
Example
1. What is the truth value of ∀𝑥𝑃(𝑥), where 𝑃(𝑥) is the
statement “𝑥 2 < 10” and the domain consists of the
positive integers not exceeding 4?
False
2. What is the truth value of ∃𝑥𝑃(𝑥), where 𝑃(𝑥) is the
statement “𝑥 2 > 10” and the universe of discourse
consists of the positive integers not exceeding 4?
True
Quantifiers with Restricted Domains
• An abbreviated notation is often used to restrict the domain of a quantifier.
• In this notation, a condition of a variable that must be satisfied is included
after the quantifier.
Example:
Suppose that the domain of the following variables is a set of real numbers.
1. ∀𝑥 < 0 (𝑥 2 < 0)
Read as “ For all real numbers x less than 0, 𝑥 2 is less than 0.”
2. ∀𝑦 ≠ 0 (𝑦 3 ≠ 0)
Read as “ For all real numbers y not equal to 0, 𝑦 3 is not equal to 0.”
3. ∃𝑧 > 0 (𝑧 2 = 2)
Read as “ There exists a real number 𝑧 greater than 0, 𝑧 2 is equal to 2.”
Quantifiers with Restricted Domains
• Note that
✓the restriction of a universal quantification is the same as
the universal quantification of a conditional statement.
✓the restriction of an existential quantification is the same as
the existential quantification of a conjunction.
Example:
1. ∀𝑥 < 0 (𝑥 2 > 0) can be expressed as ∀𝑥 𝑥 < 0 → 𝑥 2 > 0 .
2. ∃𝑧 > 0 (𝑧 2 = 2) can be expressed as ∃𝑧 𝑧 > 0 ∧ 𝑧 2 = 2 .
Precedence of Quantifiers

• The quantifiers ∀ and ∃ have higher precedence than all


logical operators from propositional calculus.
• For example, ∀𝑥𝑃(𝑥) ∨ 𝑄(𝑥) is the disjunction of ∀𝑥𝑃(𝑥)
and 𝑄(𝑥).
• In other words, it means ∀𝑥𝑃 𝑥 ∨ 𝑄(𝑥) rather than
∀𝑥 𝑃 𝑥 ∨ 𝑄 𝑥 .
Binding Variables
• When a quantifier is used on the 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 propositional function must be bound
or set equal to a particular value to turn it into a proposition.
• This can be done using a combination of universal quantifiers,
existential quantifiers, and value assignments.
• The part of a logical expression to which a quantifier is applied is
called the scope of this quantifier.
• Consequently, a variable is free if it is outside the scope of all
quantifiers in the formula that specify this variable.
Binding Variables
Example
• In the statement ∃𝑥(𝑥 + 𝑦 = 1),
the variable 𝑥 is bound by the existential quantification
∃𝑥, but the variable 𝑦 is free because it is not bound by a
quantifier and no value is assigned to this variable.
• This illustrates that in the statement ∃𝑥(𝑥 + 𝑦 = 1), 𝒙 is
bound, but 𝒚 is free.
Binding Variables
Example
• In the statement ∃𝑥 𝑃 𝑥 ∧ 𝑄 𝑥 ∨ ∀𝑥 𝑅(𝑥),
all variables are bound.
• The scope of the first quantifier, ∃𝑥, is the expression 𝑃(𝑥) ∧ 𝑄(𝑥), because ∃𝑥 is
applied only to 𝑃(𝑥) ∧ 𝑄(𝑥) and not to the rest of the statement.
• Similarly, the scope of the second quantifier, ∀𝑥, is the expression 𝑅(𝑥).
• That is, the existential quantifier binds the variable 𝑥 in 𝑃(𝑥) ∧ 𝑄(𝑥) and the
universal quantifier ∀𝑥 binds the variable 𝑥 in 𝑅(𝑥).
• Observe that we could have written our statement using two different variables
𝑥 and 𝑦, as ∃𝑥 𝑃 𝑥 ∧ 𝑄 𝑥 ∨ ∀𝑦 𝑅(𝑦), because the scopes of the two
quantifiers do not overlap. But, the same letter is often used to represent
variables bound by different quantifiers with scopes that do not overlap.
Definition:
Logical Equivalences using Quantifiers
• Statements involving predicates and quantifiers are logically
equivalent if and only if they have the same truth value no
matter which predicates are substituted into these
statements and which domain of discourse is used for the
variables in these propositional functions.
• We use the notation 𝑆 ≡ 𝑇 to indicate that two statements 𝑆
and 𝑇 involving predicates and quantifiers are logically
equivalent.
Negating Quantified Expressions

• We will often want to consider the negation of a


quantified expression. For instance, consider the
negation of the statement
Given: [Universal Quantification]
“Every student in your class has taken a course in ∀𝒙𝑷(𝒙)
calculus.”
Negation:
It is not the case that every student in your class has ∼ ∀𝒙𝑷(𝒙)
taken a course in calculus.
The negation is equivalent to:
There is a student in your class who has not taken a ∃𝒙 ∼ 𝑷(𝒙)
course in calculus.
Negating Quantified Expressions

• It follows that

∼ ∀𝑥𝑃 𝑥 ≡ ∃𝑥 ∼ 𝑃(𝑥)

• This means that the negation of a universal quantification of


a proposition is equivalent to the existential quantification of
the negation of a proposition.
Negating Quantified Expressions

• What if we negate the existential quantification


Given: [Existential Quantification]
“There is a student in this class who has taken a ∃𝒙𝑷(𝒙)
course in calculus.”
Negation:
It is not the case that there is a student in this ∼ ∃𝒙𝑷(𝒙)
class who has taken a course in calculus.
The negation is equivalent to:
Every student in this class has not taken ∀𝒙 ∼ 𝑷(𝒙)
calculus.
Negating Quantified Expressions

• It follows that

∼ ∃𝑥𝑃 𝑥 ≡ ∀𝑥 ∼ 𝑃(𝑥)

• This means that the negation of a existential quantification


of a proposition is equivalent to the universal quantification
of the negation of a proposition.
Negating Quantified Expressions
• De Morgan’s Laws for Quantifiers
Negation Equivalent When is negation When is FALSE?
Statement TRUE?
∼ ∃𝑥𝑃(𝑥) ∀𝑥 ∼ 𝑃(𝑥) For every x, P(x) There is an x for
is false. which P(x) is true.
∼ ∀𝑥𝑃(𝑥) ∃𝑥 ∼ 𝑃(𝑥) There is an x for P(x) is true for
which P(x) is every x.
true for every x.
P(x) is false.
Negating Quantified Expressions
Example:
What are the negations of the following statements and their
equivalent quantifications?
1. There is an honest politician.
Negation: It is not the case that there is an honest politician.
Equivalent of the negation: Every politician is dishonest.
2. All Americans eat cheeseburgers.
Negation: It is not the case that all Americans eat cheeseburgers.
Equivalent of the negation: Some Americans do not eat
cheeseburgers.
Negating Quantified Expressions
Example:
What are the negations of the following statements and their
equivalent quantifications?
3. ∀𝑥(𝑥 2 > 𝑥)
Negation: ∼ ∀𝑥(𝑥 2 > 𝑥)
Equivalent of the negation: ∃𝑥 ∼ (𝑥 2 > 𝑥)
4. ∃𝑥(𝑥 2 = 2)
Negation: ∼ ∃𝑥(𝑥 2 = 2)
Equivalent of the negation: ∀𝑥 ∼ (𝑥 2 = 2)
Translating from English into Logical
Expressions
Example 1:
• Express the statement “Every student in this class has studied
calculus” using predicates and quantifiers.
• Solution:
First, we rewrite the statement so that we can clearly identify the
appropriate quantifiers to use.
Doing so, we obtain:
• “For every student in this class, that student has studied calculus.”
Next, we introduce a variable x so that our statement becomes
• “For every student x in this class, x has studied calculus.”
Translating from English into Logical
Expressions
Example 1:
• Express the statement “Every student in this class has studied
calculus” using predicates and quantifiers.
• Solution:
First, we rewrite the statement so that we can clearly identify the
appropriate quantifiers to use.
Doing so, we obtain:
• “For every student in this class, that student has studied calculus.”
Next, we introduce a variable x so that our statement becomes
• “For every student x in this class, x has studied calculus.”
Continuing, we introduce C(x), which is the statement “x has studied
calculus.”
Consequently, if the domain for x consists of the students in the class, we
can translate our statement as ∀xC(x).
Translating from English into Logical
Expressions
Example 1:
• Express the statement “Every student in this class has studied
calculus” using predicates and quantifiers.
• Solution:
However, there are other correct approaches; different domains of
discourse and other predicates can be used.
The approach we select depends on the subsequent reasoning we want to
carry out.
For example, we may be interested in a wider group of people than only
those in this class.
If we change the domain to consist of all people, we will need to express
our statement as
“For every person x, if person x is a student in this class, then x has studied
calculus.”
Translating from English into Logical
Expressions
Example 1:
• Express the statement “Every student in this class has studied
calculus” using predicates and quantifiers.
• Solution:
“For every person x, if person x is a student in this class, then x has studied
calculus.”
If S(x) represents the statement that person x is in this class, we see that
our statement can be expressed as
∀x(S(x) → C(x)).
Caution! Our statement cannot be expressed as ∀x(S(x) ∧ C(x))
because this statement says that all people are students in this class and
have studied calculus.
Translating from English into Logical
Expressions
Example 1:
• Express the statement “Every student in this class has studied
calculus” using predicates and quantifiers.
• Solution:
Finally, when we are interested in the background of people in
subjects besides calculus, we may prefer to use the two-variable
quantifier Q(x, y) for the statement
“Student x has studied subject y.”
Then we would replace C(x) by Q(x, calculus) in both approaches to
obtain
∀xQ(x, calculus) or ∀x(S(x) → Q(x, calculus)).
Translating from English into Logical
Expressions
Example 1:
• Express the statement “Every student in this class has studied calculus”
using predicates and quantifiers.
• Solution: To sum up
“For every student x in this class, x has studied calculus.” ∀𝑥𝐶(𝑥)
“For every person x, if person x is a student in this class, ∀𝑥 𝑆 𝑥 → 𝐶 𝑥
then x has studied calculus.”
“For every person x, if person x is a student in this class,
then x has studied calculus.” ∀𝑥 𝑆 𝑥 → 𝑄 𝑥, 𝐶𝑎𝑙𝑐𝑢𝑙𝑢𝑠
Translating from English into Logical
Expressions
Example 2:
• Express the statements “Some student in this class has visited
Mexico” using predicates and quantifiers.
• Solution:
The statement “Some student in this class has visited Mexico” means that
“There is a student in this class with the property that the student has visited
Mexico.”
We can introduce a variable x, so that our statement becomes
“There is a student x in this class having the property that x has visited
Mexico.”
We introduce M(x), which is the statement “x has visited Mexico.” If the
domain for x consists of the students in this class, we can translate this first
statement as ∃xM(x).
Translating from English into Logical
Expressions
Example 2:
• Express the statements “Some student in this class has visited
Mexico” using predicates and quantifiers.
• Solution:
If we are interested in people other than those in this class, we look at
the statement a little differently. Our statement can be expressed as
“There is a person x having the properties that x is a student in this class
and x has visited Mexico.”
Translating from English into Logical
Expressions
Example 2:
• Express the statements “Some student in this class has visited
Mexico” using predicates and quantifiers.
• Solution:
In this case, the domain for the variable x consists of all people.
We introduce S(x) to represent “x is a student in this class.”
Our solution becomes ∃x(S(x) ∧ M(x)) because the statement is that there is a
person x who is a student in this class and who has visited Mexico.
[Caution! Our statement cannot be expressed as ∃x(S(x) → M(x)),
which is true when there is someone not in the class because, in that case, for
such a person x, S(x) → M(x) becomes either F → T or F → F, both of which
are true.]
Translating from English into Logical
Expressions
Example 3:
• Express the statements “Every student in this class has visited
either Canada or Mexico” using predicates and quantifiers.
• Solution:
Let 𝑥 be the students in the said class
Let 𝐶(𝑥) be “𝑥 has visited Canada”
Let 𝑀(𝑥) be “𝑥 has visited Mexico”
“For every x in this class, x has the property that x has visited Mexico or
x has visited Canada.”
∀𝑥 𝐶 𝑥 ∨ 𝑀 𝑥
Translating from English into Logical
Expressions
Example 3:
• Express the statements “Every student in this class has visited
either Canada or Mexico” using predicates and quantifiers.
• Solution:
Let 𝑥 be the students
Let 𝐶(𝑥) be “𝑥 has visited Canada”
Let 𝑀(𝑥) be “𝑥 has visited Mexico”
Let 𝑆(𝑥) be “𝑥 is a student in this class”
“For every person x, if x is a student in this class, then x has visited
Mexico or x has visited Canada.”
∀𝑥 𝑆 𝑥 → 𝐶 𝑥 ∨ 𝑀 𝑥
Translating from English into Logical
Expressions
Example 4:
• Express the statements “Every student in this class has visited
either Canada or Mexico” using predicates and quantifiers.
• Solution:
Let 𝑥 be the students
Let 𝐶(𝑥) be “𝑥 has visited Canada”
Let 𝑀(𝑥) be “𝑥 has visited Mexico”
Let 𝑆(𝑥) be “𝑥 is a student in this class”
“For every person x, if x is a student in this class, then x has visited
Mexico or x has visited Canada.”
∀𝑥 𝑆 𝑥 → 𝐶 𝑥 ∨ 𝑀 𝑥
Nested Quantifiers
Statement When TRUE? When FALSE?

∀𝑥∀𝑦𝑃(𝑥, 𝑦) P(x, y) is true for every There is a pair x, y for


∀𝑦∀𝑥𝑃(𝑥, 𝑦) pair x, y. which P(x, y) is false.

∀𝑥∃𝑦𝑃(𝑥, 𝑦) For every x there is a y for There is an x such that


which P(x, y) is true. P(x, y) is false for every y.
There is an x for which P(x, y) For every x there is a y for
∃𝑥∀𝑦𝑃(𝑥, 𝑦)
for is true for every y. which P(x, y) is false.
∃𝑥∃𝑦𝑃(𝑥, 𝑦) There is a pair x, y for P(x, y) is false for every
∃𝑦∃𝑥𝑃(𝑥, 𝑦) which P(x, y) is true. pair x, y.
Nested Quantifiers
Example 1:
Assume that the domain for the variables x and y consists of all 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.
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:
• For every real number x and for every real number y, if x > 0 and y < 0, then
xy < 0.
• For real numbers x and y, if x is positive and y is negative, then xy is
negative.
• The product of a positive real number and a negative real number is always
a negative real number.
Nested 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.”
-True
• The quantification ∀y∀xP(x, y) says
“For all real numbers y, for all real numbers x, x + y = y + x.”
-True
Nested 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,
x + y = 0.”
-False
• The quantification ∀x∃yQ(x, y) denotes
“For every real number x, there is a real number y such that
x + y = 0.”
-True
Nested 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), which is
the statement
“For all real numbers x and for all real numbers y there is a
real number z such that x + y = z,”
is TRUE.
Nested 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:
• The order of the quantification here is important, because
the quantification ∃z∀x∀yQ(x, y, z),
which is the statement
“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,”
is false,
because there is no value of z that satisfies the equation
x + y = z for all values of x and y.
Nested Quantifiers
Example 6:
Translate the statement “The sum of two positive integers is always
positive” into a logical expression.
Solution:
• To translate this statement into a logical expression, we first
rewrite it so that the implied quantifiers and a domain are shown:
“For every two integers, if these integers are both positive, then
the sum of these integers is positive.”
• Next, we introduce the variables x and y to obtain
“For all positive integers x and y, x + y is positive.”
Consequently, we can express this statement as
∀𝑥∀𝑦 𝑥 > 0 ∧ 𝑦 > 0 → 𝑥 + 𝑦 > 0
where the domain for both variables consists of all integers.
Nested Quantifiers
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.”
Nested Quantifiers
Example 9:
Translate the statement
∃𝑥∀𝑦∀𝑧 𝐹 𝑥, 𝑦 ∧ 𝐹 𝑥, 𝑧 ∧ 𝑦 ≠ 𝑧 → ∼ 𝐹 𝑦, 𝑧
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.”
Nested Quantifiers
Example 10:
Express 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
∀𝑥 𝐹 𝑥 ∧ 𝑃 𝑥 → ∃𝑦𝑀 𝑥, 𝑦
Nested Quantifiers
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.
To say that x has exactly one best friend means that there is a person y who is the best
friend of x, and furthermore, that for every person z, if person z is not person y, then z is not
the best friend of x.
When 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
∃𝑦 𝐵 𝑥, 𝑦 ∧ ∀𝑧 𝑧 ≠ 𝑦 → ¬𝐵 𝑥, 𝑧 .
Nested Quantifiers
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.
To say that x has exactly one best friend means that there is a person y who is the best
friend of x, and furthermore, that for every person z, if person z is not person y, then z is not
the best friend of x.
When 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
∃𝑦 𝐵 𝑥, 𝑦 ∧ ∀𝑧 𝑧 ≠ 𝑦 → ¬𝐵 𝑥, 𝑧 .
Nested Quantifiers
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:
Consequently, our original statement can be expressed as
∀𝑥∃𝑦 𝐵 𝑥, 𝑦 ∧ ∀𝑧 𝑧 ≠ 𝑦 → ¬𝐵 𝑥, 𝑧 .
Some Proofs
Logical Equivalences using Quantifiers
Example
• Show that ∀𝑥 𝑃 𝑥 ∧ 𝑄 𝑥 and ∀𝑥𝑃(𝑥) ∧ ∀𝑥𝑄(𝑥) are logically
equivalent (where the same domain is used throughout).
Note:
• This logical equivalence shows that we can distribute a universal
quantifier over a conjunction.
• Furthermore, we can also distribute an existential quantifier over
a disjunction.
• However, we cannot distribute a universal quantifier over a
disjunction, nor can we distribute an existential quantifier over a
conjunction.
Logical Equivalences using Quantifiers
Example
• Show that ∀𝑥 𝑃 𝑥 ∧ 𝑄 𝑥 and ∀𝑥𝑃(𝑥) ∧ ∀𝑥𝑄(𝑥) are logically equivalent.
Proof:
▪ To show that these statements are logically equivalent, we must show that
they always take the same truth value, no matter what the predicates 𝑃
and 𝑄 are, and no matter which domain of discourse is used.
▪ Suppose we have particular predicates 𝑃 and 𝑄, with a common domain.
We can show that ∀𝑥 𝑃 𝑥 ∧ 𝑄 𝑥 and ∀𝑥𝑃(𝑥) ∧ ∀𝑥𝑄(𝑥) are logically
equivalent by doing two things.
▪ First, we show that if ∀𝑥 𝑃 𝑥 ∧ 𝑄 𝑥 is true, then ∀𝑥𝑃(𝑥) ∧ ∀𝑥𝑄(𝑥) is
true. (Case 1)
▪ Second, we show that if ∀𝑥𝑃(𝑥) ∧ ∀𝑥𝑄(𝑥) is true, then ∀𝑥 𝑃 𝑥 ∧ 𝑄 𝑥 is
true. (Case 2)
Logical Equivalences using Quantifiers
Example
• Show that ∀𝑥 𝑃 𝑥 ∧ 𝑄 𝑥 and ∀𝑥𝑃(𝑥) ∧ ∀𝑥𝑄(𝑥) are logically
equivalent.
Proof:
Case 1: Show that if ∀𝑥 𝑃 𝑥 ∧ 𝑄 𝑥 is true, then ∀𝑥𝑃(𝑥) ∧ ∀𝑥𝑄(𝑥)
is true.
▪ So, suppose that ∀𝑥 𝑃 𝑥 ∧ 𝑄 𝑥 is true. This means that if 𝑎 is in
the domain, then 𝑃(𝑎) ∧ 𝑄(𝑎) is true.
▪ Hence, 𝑃(𝑎) is true and 𝑄(𝑎) is true.
▪ Because 𝑃(𝑎) is true and 𝑄(𝑎) is true for every element 𝑎 in the
domain, we can conclude that ∀𝑥𝑃(𝑥) and ∀𝑥𝑄(𝑥) are both true.
▪ This means that ∀𝑥𝑃(𝑥) ∧ ∀𝑥𝑄(𝑥) is true.
Logical Equivalences using Quantifiers
Example
• Show that ∀𝑥 𝑃 𝑥 ∧ 𝑄 𝑥 and ∀𝑥𝑃(𝑥) ∧ ∀𝑥𝑄(𝑥) are logically equivalent.
Proof:
Case 2: Show that if ∀𝑥𝑃(𝑥) ∧ ∀𝑥𝑄(𝑥) is true, then ∀𝑥 𝑃 𝑥 ∧ 𝑄 𝑥 is true.
▪ Suppose that ∀𝑥𝑃(𝑥) ∧ ∀𝑥𝑄(𝑥) is true.
▪ It follows that ∀𝑥𝑃(𝑥) is true and ∀𝑥𝑄(𝑥) is true.
▪ Hence, if 𝑎 is in the domain, then 𝑃(𝑎) is true and 𝑄(𝑎) is true
▪ because 𝑃(𝑥) and 𝑄(𝑥) are both true for all elements in the domain, there is no
conflict using the same value of 𝑎 here.
▪ It follows that for all 𝑎, 𝑃(𝑎) ∧ 𝑄(𝑎) is true.
▪ It follows that ∀𝑥 𝑃 𝑥 ∧ 𝑄 𝑥 is true.
▪ We can now conclude that ∀𝑥 𝑃 𝑥 ∧ 𝑄 𝑥 ≡ ∀𝑥𝑃(𝑥) ∧ ∀𝑥𝑄(𝑥).

You might also like