0% found this document useful (0 votes)
13 views

quantifiers_post_lecture oct 1.

The document discusses quantifiers in discrete mathematics, explaining universal and existential quantifications with examples and exercises. It provides logical forms of various statements, their meanings, and truth values, along with negation laws and exercises for practice. The content is structured to enhance understanding of logical reasoning and quantification in mathematical contexts.

Uploaded by

box.office1306
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

quantifiers_post_lecture oct 1.

The document discusses quantifiers in discrete mathematics, explaining universal and existential quantifications with examples and exercises. It provides logical forms of various statements, their meanings, and truth values, along with negation laws and exercises for practice. The content is structured to enhance understanding of logical reasoning and quantification in mathematical contexts.

Uploaded by

box.office1306
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 67

CSC/MAT A67 – Discrete Mathematics

M. Molloy and A. Tafliovich1

1
based on How To Prove It, by D. Velleman, and Discrete Mathematics, by
K. H. Rosen
Quantifiers
Suppose P(x) stands for “x is prime”.
• Is P(x) true for every x?
• Is P(x) true for some x?
• For what x does it even make sense to talk about whether
P(x) is true?

2
Quantifiers
Universe of discourse: all possible values for a variable.
∀x, P(x)
• read “for all x, P(x)”
• called a universally quantified statement
• true, if P(x) is true for every element in the universe of
discourse
• false, otherwise

∃x, P(x)
• read “there exists x, P(x)”
• called an existentially quantified statement
• true, if P(x) is true for some (at least one) element in the
universe of discourse
• false, otherwise
Quantifiers
Exercise. What do the following statements mean? Which are
true?
• ∀x, x 2 ≥ 0, with universe R (set of all real numbers).
• ∀x, x 2 ≥ 1, with universe R.
• ∃x, x 2 − 2x + 1 = 0, with universe R.
• ∃x, x 2 − 2x − 3 = 0, with universe R.
• ∃x, x 2 − 2x + 3 = 0, with universe R.
• ∃x, M(x) ∧ B(x), with universe set of all people, M(x) stands
for “x is a man”, B(x) stands for “x has brown hair”.
• ∀x, M(x) → B(x), with universe, M, and B as above.
• ∀x, M(x) ∧ B(x), with universe, M, and B as above.
• ∀x, L(x, y ), with universe set of all people, and L(x, y ) stands
for “x likes y ”.
Quantifiers
Solution.
• ∀x, x 2 ≥ 0, with universe R (set of all real numbers).
• A square of any real number is bigger than or equal to 0. True.
• ∀x, x 2 ≥ 1, with universe R.
• A square of any real number is bigger than or equal to 1. False
(for example, 02 ≱ 1).
• ∃x, x 2 − 2x + 1 = 0, with universe R.
• There is (at least one) real number x, such that
x 2 − 2x + 1 = 0. True (value 1).
• ∃x, x 2 − 2x − 3 = 0, with universe R.
• There is (at least one) real number x, such that
x 2 − 2x − 3 = 0. True (values -3, 1).
• ∃x, x 2 − 2x + 3 = 0, with universe R.
• There is (at least one) real number x, such that
x 2 − 2x + 3 = 0. False.
Quantifiers
Solution.
• ∃x, M(x) ∧ B(x), with universe set of all people, M(x) stands
for “x is a man”, B(x) stands for “x has brown hair”.
• There is (at least one) man with brown hair. True.
• ∀x, M(x) → B(x), with universe, M, and B as above.
• All men have brown hair. False.
• ∀x, M(x) ∧ B(x), with universe, M, and B as above.
• All people are men with brown hair. False.
• ∀x, L(x, y ), with universe set of all people, and L(x, y ) stands
for “x likes y ”.
• Everyone likes y . Note that y is a free variable here.
Quantifiers
Exercise. Analyse the logical forms of the following statements.
• Someone didn’t do the homework.
• Everything in the store is either overpriced or poorly made.
• Nobody’s perfect.
• Susan likes everyone who dislikes Joe.
• A ⊆ B.
• (A ∩ B) ⊆ (B \ C ).
Quantifiers
Solution.
• Someone didn’t do the homework.
• H(x) is “x did the homework”, universe is all people.
• ∃x, ¬H(x)
• Everything in the store is either overpriced or poorly made.
• S(x) is “x is sold at the store”, O(x) is “x is overpriced”,
P(x) is “x is poorly made”, universe is all products.
• ∀x, S(x) → (O(x) ∨ P(x))
• Nobody’s perfect.
• P(x) is “x is perfect”, universe is all people.
• ¬∃x, P(x)
• Susan likes everyone who dislikes Joe.
• L(x, y ) is “x likes y ”, universe is all people.
• ∀x, ¬L(x, Joe) → L(Susan, x)
• A ⊆ B.
• ∀x, x ∈ A → x ∈ B, universe U.
• (A ∩ B) ⊆ (B \ C ).
• ∀x, (x ∈ A ∧ x ∈ B) → (x ∈ B ∧ x ∈
/ C ), universe U.
Quantifiers
Exercise. Analyse the logical forms of these statements.
• Everyone in the dorm has a roommate that they don’t like.
• Nobody likes a sore loser.
• Anyone who has a friend who has the measles will have to be
quarantined.
• If anyone in the dorm has a friend who has the measles, then
everyone in the dorm will have to be quarantined.
• If A ⊆ B, then A and C \ B are disjoint.
Quantifiers
Solution. Let universe of discourse be all people.
• Everyone in the dorm has a roommate that they don’t like.
• D(x) is “x lives in the dorm”, R(x, y ) is “x is a roommate of
y ”, L(x, y ) is “x likes y ”.
• ∀x, D(x) → ∃y , R(x, y ) ∧ ¬L(x, y )
• Nobody likes a sore loser.
• S(x) is “x is a sore loser”, L(x, y ) is “x likes y ”.
• ∀x∀y , S(x) → ¬L(y , x)
• Anyone who has a friend who has the measles will have to be
quarantined.
• F (x, y ) is “x is a friend of y ”, M(x) is “x has measles”, Q(x)
is “x must be quarantined”.
• ∀x, (∃y , F (x, y ) ∧ M(y )) → Q(x)
Quantifiers
Solution. Let universe of discourse be all people.
• If anyone in the dorm has a friend who has the measles, then
everyone in the dorm will have to be quarantined.
• (∃x∃y , D(x) ∧ F (x, y ) ∧ M(y )) → (∀x, D(x) → Q(x))
• If A ⊆ B, then A and C \ B are disjoint.
• (∀x, x ∈ A → x ∈ B) → (¬∃x, x ∈ A ∧ x ∈ C ∧ x ∈
/ B)
Quantifiers
Exercise. Let the universe of discourse be N, the set of all natural
numbers. What do these statements mean? Are they true or false?

• ∀x∃y , x < y
• ∃y ∀x, x < y
• ∃x∀y , x < y
• ∀y ∃x, x < y
• ∃x∃y , x < y
• ∀x∀y , x < y
Quantifiers
Solution.
• ∀x∃y , x < y
• For every natural number x, there is a natural number bigger
than x. True.
• ∃y ∀x, x < y
• There is a natural number y , such that every natural number
is smaller than y . False.
• ∃x∀y , x < y
• There is a natural number x, such that every natural number
is bigger than x. False.
• Note that 0 doesn’t work: ∀y , 0 < y is false because 0 < y is
false when y is 0!
• How do we say “There is a natural number that is the smallest
one” then?
• ∃x∀y , x ≤ y or ∃x∀y , x ̸= y → x < y

13
Quantifiers
Solution.
• ∀y ∃x, x < y
• For every natural number y , there is a natural number smaller
than y . False.
• Not true for 0.
• ∃x∃y , x < y
• There is a natural number x that is smaller than some natural
number. True.
• ∀x∀y , x < y
• For every natural number x, all natural numbers are bigger
than x. False.

14
Quantifiers
Exercise. Let the universe of discourse be R, the set of all real
numbers. Analyse the logical forms of these statements. What
variables are free?
• Every number that is larger than x is larger than y .
• All solutions of the inequality x 3 − 3x < 3 are smaller than 10.
• If there is a number x such that x 2 + 5x = w , and there is a
number y such that 4 − y 2 = w , then w is strictly between
-10 and 10.
Quantifiers
Solution.
• Every number that is larger than x is larger than y .
• ∀z, z > x → z > y . Free variables: x, y .
• All solutions of the inequality x 3 − 3x < 3 are smaller than 10.
• ∀x, x 3 − 3x < 3 → x < 10. Free variables: none.
• If there is a number x such that x 2 + 5x = w , and there is a
number y such that 4 − y 2 = w , then w is strictly between
-10 and 10.
• (∃x, x 2 + 5x = w ∧ ∃y , 4 − y 2 = w ) → (−10 < w < 10). Free
variables: w .
Quantifiers
Exercise. Let the universe of discourse be N, the set of all natural
numbers. Translate into idiomatic mathematical English.
• ∀x, (P(x) ∧ ¬(x = 2)) → O(x), where P(x) is “x is prime”
and O(x) is “x is odd.
• ∃x, P(x) ∧ (∀y , P(y ) → y ≤ x), where P(x) is “x is a perfect
number”.

17
Quantifiers
Solution.
• ∀x, (P(x) ∧ ¬(x = 2)) → O(x), where P(x) is “x is prime”
and O(x) is “x is odd.
• Every prime number that is not 2, is odd.
• ∃x, P(x) ∧ (∀y , P(y ) → y ≤ x), where P(x) is “x is a perfect
number”.
• There is the biggest perfect number.
Quantifiers
Exercise. Let the universe of discourse be the set of all people. Let
P(x, y ) mean “x is a parent of y “. What do these statements
mean? Which are true?
• ∃x∀y , P(x, y )
• ∀x∃y , P(x, y )
• ¬∃x∃y , P(x, y )
• ∃x¬∃y , P(x, y )
• ∃x∃y , ¬P(x, y )
Quantifiers
Solution.
• ∃x∀y , P(x, y )
• There exists a person who is everyone’s parent. False.
• ∀x∃y , P(x, y )
• Everyone has a child. False.
• ¬∃x∃y , P(x, y )
• There are no people x and y , such that x is a parent of y .
False.
• ∃x¬∃y , P(x, y )
• There is a person with no children. True.
• ∃x∃y , ¬P(x, y )
• There are people x and y , such that x is not a parent of y .
True.
Logical Equivalence
Consider the statement “Nobody is perfect”.

Let the universe of discourse be the set of all people. Let P(x)
stand for “x is perfect”.
• ¬∃x, P(x)
• ∀x, ¬P(x).

Are these the same statement? Different statements? Why?


Logical Equivalence (Laws)
Quantifier Negation Laws:

¬∀x, P(x) is equivalent to ∃x, ¬P(x).


¬∃x, P(x) is equivalent to ∀x, ¬P(x).

Examples:
• The negation of “Everyone loves Raymond” is:
• Someone does not love Raymond.
• ¬∀x, L(x) eqv ∃x, ¬L(x)

• The negation of “Something is funny” is:


• Everything is not funny.
• ¬∃x, F (x) eqv ∀x, ¬F (x)

22
Quantifier Negation
Exercise: Analyse the logical forms of the following statements,
then negate the results, and translate the resulting sentences to
English.
• Every CS major takes discrete mathematics.
• Some pets do not like walks.
• We assume this means “At least one pet does not like walks”.
• The square of every odd number is odd.
Quantifier Negation
Every CS major takes discrete mathematics.
Solution:
• Universe of discourse is students.
• Let C (x) stand for “x is a CS major”, M(x) stand for “x
takes discrete mathematics”.
• ∀x, C (x) → M(x)
• Negation:

¬∀x, C (x) → M(x)


eqv ∃x, ¬(C (x) → M(x)) quantifier negation
eqv ∃x, ¬(¬C (x) ∨ M(x)) conditional
eqv ∃x, ¬¬C (x) ∧ ¬M(x) de Morgan
eqv ∃x, C (x) ∧ ¬M(x) double negation
• There is a CS major who is not taking discrete mathematics.
24
Quantifier Negation
Some pets do not like walks. We assume this means “At least one
pet does not like walks”.
Solution:
• Universe of discourse is animals.
• Let P(x) stand for “x is a pet”, W (x) stand for “x likes
walks”.
• ∃x, P(x) ∧ ¬W (x)
• Negation:
¬∃x, P(x) ∧ ¬W (x)
eqv ∀x, ¬(P(x) ∧ ¬W (x)) quantifier negation
eqv ∀x, ¬P(x) ∨ ¬¬W (x) de Morgan
eqv ∀x, ¬P(x) ∨ W (x) double negation
eqv ∀x, P(x) → W (x) conditional
• All pets like walks.
25
Quantifier Negation
The square of every odd number is odd.
Solution:
• Universe of discourse is real numbers.
• Let O(x) stand for “x is odd”.
• ∀x, O(x) → O(x 2 )
• Negation:

¬∀x, O(x) → O(x 2 )


eqv ∃x, ¬(O(x) → O(x 2 )) quantifier negation
2
eqv ∃x, ¬(¬O(x) ∨ O(x )) conditional
eqv ∃x, ¬¬O(x) ∧ ¬O(x 2 ) de Morgan
2
eqv ∃x, O(x) ∧ ¬O(x ) double negation

• There is an odd number whose square is not odd.


26
Quantifiers and Uniqueness
Exercise. Let the universe of discourse be the set of all people. Let
L(x, y ) stand for “x likes y ”. Analyse the logical forms of:
• Everyone likes at least two people.
• John likes exactly one person.
Solution.
• Everyone likes at least two people.
• ∀x∃y ∃z, y ̸= z ∧ L(x, y ) ∧ L(x, z)
• John likes exactly one person.
• ∃x, L(John, x) ∧ ∀x∀y , (L(John, x) ∧ L(John, y )) → x = y
• ∃x, L(John, x) ∧ ¬∃y , y ̸= x ∧ L(John, y )

∃!x, P(x)
• “there is exactly one x such that P(x)”
• “there is a unique x such that P(x)”
Bounded Quantifiers
A useful shorthand notation: bounded quantifier.

∀x ∈ A, P(x) is short for ∀x, x ∈ A → P(x)


∃x ∈ A, P(x) is short for ∃x, x ∈ A ∧ P(x)

28
Bounded Quantifiers
Exercise. Show that Quantifier Negation Laws hold for bounded
quantifiers.

Solution.

¬∀x ∈ A, P(x)
eqv ¬∀x, x ∈ A → P(x) bounded quantifier
eqv ∃x, ¬(x ∈ A → P(x)) quantifier negation
eqv ∃x, ¬(¬x ∈ A ∨ P(x)) conditional
eqv ∃x, ¬¬x ∈ A ∧ ¬P(x) De Morgan’s
eqv ∃x, x ∈ A ∧ ¬P(x) double negation
eqv ∃x ∈ A, ¬P(x) bounded quantifier

29
Bounded Quantifiers
Exercise. Show that Quantifier Negation Laws hold for bounded
quantifiers.

Solution.

¬∃x ∈ A, P(x)
eqv ¬∃x, x ∈ A ∧ P(x) bounded quantifier
eqv ∀x, ¬(x ∈ A ∧ P(x)) quantifier negation
eqv ∀x, ¬x ∈ A ∨ ¬P(x) De Morgan’s
eqv ∀x, x ∈ A → ¬P(x) conditional
eqv ∀x ∈ A, ¬P(x) bounded quantifier
Quantifiers

∀x ∈ A, P(x) is short for ∀x, x ∈ A → P(x)


∃x ∈ A, P(x) is short for ∃x, x ∈ A ∧ P(x)

What if the set A has no elements?

• We say that ∀x ∈ A, P(x) is vacuously true.


• ∃x ∈ A, P(x) is false, of course.

We will address this in more detail later on.

31
Quantifiers
Exercise. Analyse the logical forms of these statements about
natural numbers.
• x is a perfect square.
• x is a multiple of y .
• x is a prime number. (Recall: a prime number is an integer
greater than 1, that is not a product of two smaller positive
integers).
• x is the smallest positive number that is a multiple of both y
and z.
Quantifiers
Solution.
The universe of discourse is N.
• x is a perfect square.
• ∃y , x = y 2
• x is a multiple of y .
• ∃z, x = yz
• x is a prime number (Recall: a prime number is an integer
greater than 1, that is not a product of two smaller positive
integers).
• (x > 1) ∧ ¬∃y ∃z, (0 < y < x) ∧ (0 < z < x) ∧ (x = yz)
• x is the smallest positive number that is a multiple of both y
and z.

x > 0 ∧ (∃a∃b, x = ay ∧ x = bz)


∧¬∃w , (0 < w < x) ∧ (∃a∃b, w = ay ∧ w = bz)

33
Quantifiers
Exercise. Analyse the logical forms of these statements about real
numbers.
• Identity element for addition is 0.
• Every real number has an additive inverse.
• Negative numbers do not have square roots.
• Every positive number has exactly two square roots.
Quantifiers
Solution.
The universe of discourse is R.
• Identity element for addition is 0.
• ∀x, x + 0 = 0 + x = x
• Every real number has an additive inverse.
• ∀x∃y , x + y = 0
• Negative numbers do not have square roots.
• ∀x, x < 0 → ¬∃y , y 2 = x
• Every positive number has exactly two square roots.

∀x, x > 0 → ∃y ∃z,y ̸= z ∧ y 2 = z 2 = x ∧


(¬∃w , w 2 = x ∧ w ̸= y ∧ w ̸= z)
Quantifiers
Exercise. What do these statements mean? Are they true or false?
The universe of discourse is N.
• ∀x, x < 7 → ∃a∃b∃c, a2 + b 2 + c 2 = x
• ∃!x, x 2 + 3 = 4x
• ∃!x, x 2 = 4x + 5
• ∃x∃y , x 2 = 4x + 5 ∧ y 2 = 4y + 5
Quantifiers
Solution:
• ∀x, x < 7 → ∃a∃b∃c, a2 + b 2 + c 2 = x True.
• 0 = 02 + 02 + 02 , 1 = 12 + 02 + 02 , 2 = 12 + 12 + 02 ,
3 = 12 + 12 + 12 , 4 = 22 + 02 + 02 , 5 = 22 + 12 + 02 ,
6 = 22 + 12 + 12 .
• ∃!x, x 2 + 3 = 4x
• False: x1 = 3, x2 = 1
• ∃!x, x 2 = 4x + 5
• True: x1 = 5, x2 = −1, only x1 ∈ N
• ∃x∃y , x 2 = 4x + 5 ∧ y 2 = 4y + 5
• True: x = y = 5

37
Quantifiers
Exercise. Show that the statements A ⊆ B and A ∪ B = B are
equivalent.
Solution:
To show: ∀x, x ∈ A → x ∈ B and ∀x, (x ∈ A ∨ x ∈ B) ↔ x ∈ B
are equivalent.

(x ∈ A ∨ x ∈ B) ↔ x ∈ B
eqv ((x ∈ A ∨ x ∈ B) → x ∈ B)∧
(x ∈ B → (x ∈ A ∨ x ∈ B)) biconditional
eqv (x ∈ A ∨ x ∈ B) → x ∈ B tautology
eqv (x ∈ A → x ∈ B) ∧ (x ∈ B → x ∈ B) **
eqv x ∈ A → x ∈ B tautology

38
Quantifiers
Solution:
** A useful equivalence:

(P ∨ Q) → R eqv (P → R) ∧ (Q → R)

(P ∨ Q) → R
eqv ¬(P ∨ Q) ∨ R implication
eqv (¬P ∧ ¬Q) ∨ R De Morgan
eqv (¬P ∨ R) ∧ (¬Q ∨ R) distributive
eqv (P → R) ∧ (Q → R) implication

39
Quantifiers and Sets
Let’s examine the statement “All CMS students are smart.”

Let P(x) stand for “x is a CMS student” and Q(x) stand for “x is
smart”, and the universe of discourse be all people. Then:
∀x, P(x) → Q(x).

If A is the truth set of P(x) and B is the truth set of Q(x), what
is the relationship between A and B?

A B

subset A ⊆ B

40
Deductive Reasoning with Quantifiers
(Famous) Example:

All men are mortal.


Socrates is a man.
Therefore, Socrates is mortal.

Is this a valid argument? Why? How can we prove it?

41
Rules of Inference with Quantifiers
Rule of Inference Name
∀x, P(x)
Universal instantiation2
∴ P(c)
P(c) for an arbitrary c
Universal generalisation
∴ ∀x, P(x)
∃x, P(x)
Existential instantiation
∴ P(c) for some element c
P(c) for some element c
Existential generalisation
∴ ∃x, P(x)

2
c must be an element in the universe of discourse.
42
Rules of Inference with Quantifiers
(Famous) Example:

All men are mortal.


Socrates is a man.
Therefore, Socrates is mortal.

Let M(x) stand for “x is a man”, R(x) stand for “x is mortal”.


Then:

∀x, M(x) → R(x) premise 1


M(Socrates) premise 2
∴ R(Socrates) conclusion

43
Rules of Inference with Quantifiers
(Famous) Example:

(1) ∀x, M(x) → R(x) premise 1


(2) M(Socrates) premise 2
(3) M(Socrates) → R(Socrates) 1, universal instantiation
(4) R(Socrates) 3, 2, Modus Ponens

Note: we assumed Socrates is an element of the universe of


discourse.

44
Rules of Inference with Quantifiers
Example: Prove the argument is valid.
Every UofT student has an email account. Anna does not have
an email account. Therefore, Anna is not a UofT student.
Solution.
Let U(x) stand for “x is a UofT student”, and E (x) stand for “x
has an email account”. Then
∀x, U(x) → E (x) premise 1
¬E (Anna) premise 2
∴ ¬U(Anna) conclusion

(1) ∀x, U(x) → E (x) premise 1


(2) ¬E (Anna) premise 2
(3) U(Anna) → E (Anna) 1, universal instantiation
(4) ¬U(Anna) 2, 3, Modus Tollens
45
Rules of Inference with Quantifiers
Important: When using the Existential Instantiation rule, we
must introduce a fresh (new) variable, i.e., a variable that did
not appear in our argument / proof.

Example: Consider the following argument.


Somebody in this class was born in July. Somebody in this class
was born on Sunday. Therefore, somebody in this class was born
on Sunday in July.

This argument is not valid. Intuition: We don’t know that it is the


same person who has a birthday in July and a birthday on Sunday.

46
Rules of Inference with Quantifiers
Somebody in this class was born in July. Somebody in this class
was born on Sunday. Therefore, somebody in this class was born
on Sunday in July.

Let J(x) stand for “x has a birthday in July”, and S(x) stand for
“x has a birthday on Sunday”, and universe of discourse be people
in this class.

∃x, J(x) premise 1


∃x, S(x) premise 2
∴ ∃x, J(x) ∧ S(x) conclusion

Consider a class where Alice has a birthday on a Wednesday in


July, Bob has a birthday on a Sunday in February, and nobody has
a birthday on a Sunday in July. The argument is not valid.
47
Rules of Inference with Quantifiers

(1) ∃x, J(x) premise 1


(2) ∃x, S(x) premise 2
∴ ∃x, J(x) ∧ S(x) conclusion

The following “proof” is incorrect!

(3) J(c) 1, existential instantiation


(4) S(c) 2, existential instantiation
(5) J(c) ∧ S(c) 3, 4, conjunction
(6) ∃x, J(x) ∧ S(x) existential generalisation

The problem is: on line 4, we are not allowed to use variable c


again!

48
Rules of Inference with Quantifiers
Exercise: Determine whether each of these arguments is valid. If
an argument is correct, what rule(s) of inference are being used? If
it is not, what logical error occurs?
1. All convertible cars are fun to drive. Isaac’s car is not a
convertible. Therefore, Isaac’s car is not fun to drive.
2. Somebody in this class enjoys whale watching. Everyone who
enjoys whale watching, cares about ocean pollution.
Therefore, there is a person in this class who cares about
ocean pollution.
3. Every CS major takes discrete math. Natasha is taking
discrete math. Therefore, Natasha is a CS major.
4. All parrots like fruit. My pet is not a parrot. Therefore, my
pet does not like fruit.
5. All parrots like fruit. At least one of my pets is a parrot.
Therefore, at least one of my pets likes fruit.
49
Rules of Inference with Quantifiers
All convertible cars are fun to drive. Isaac’s car is not a
convertible. Therefore, Isaac’s car is not fun to drive.
Solution:
Let C (x) stand for “x is a convertible”, F (x) stand for “x is fun to
drive”, and IC stand for “Isaac’s car”. Universe of discourse is
cars. Then:

∀x, C (x) → F (x) premise 1


¬C (IC ) premise 2
∴ ¬F (IC ) conclusion

Intuition tells us the argument is not valid. How can we


demonstrate it?

50
Rules of Inference with Quantifiers
Solution:

∀x, C (x) → F (x) premise 1


¬C (IC ) premise 2
∴ ¬F (IC ) conclusion

Consider a world (or “model”, or “universe” – different from


“universe of discourse”!) where all convertible cars are fun to drive
(∀x, C (x) → F (x) is true), Isaac’s car is not a convertible (C (IC )
is false), and Isaac’s car is fun to drive (F (IC ) is true).

Then premises 1 and 2 are true, but the conclusion is false. The
argument is not valid.

51
Rules of Inference with Quantifiers
Somebody in this class enjoys whale watching. Everyone who
enjoys whale watching, cares about ocean pollution. Therefore,
there is a person in this class who cares about ocean pollution.
Solution:
Let W (x) stand for “x likes whale watching”, C (x) stand for “x is
in this class”, and O(x) stand for “x cares about ocean pollution”.
Universe of discourse is people. Then:

∃x, C (x) ∧ W (x) premise 1


∀x, W (x) → O(x) premise 2
∴ ∃x, C (x) ∧ O(x) conclusion
Rules of Inference with Quantifiers
Solution:

(1) ∃x, C (x) ∧ W (x) premise 1


(2) ∀x, W (x) → O(x) premise 2
(3) C (c) ∧ W (c) for some c 1, existential instantiation
(4) C (c) 3, simplification
(5) W (c) 3, simplification
(6) W (c) → O(c) 2, universal instantiation
(7) O(c) 5, 6, Modus Ponens
(8) C (c) ∧ O(c) conjunction
(9) ∃x, C (x) ∧ O(x) existential generalisation

The argument is valid.

53
Rules of Inference with Quantifiers
Note that the following reasoning is not valid:

(1) ∃x, C (x) ∧ W (x) premise 1


(2) ∀x, W (x) → O(x) premise 2
(3) W (c) → O(c) 2, universal instantiation
(4) C (c) ∧ W (c) 1, existential instantiation
(5) ...

First, we don’t know there is a c in the universe of discourse from


premise 2. We need other premises for this.

More importantly, once we use c on line 3, we cannot use it with


existential instantiation on line 4.
Rules of Inference with Quantifiers
Every CS major takes discrete math. Natasha is taking discrete
math. Therefore, Natasha is a CS major.
Solution:
Let C (x) stand for “x is a CS major”, and M(x) stand for “x takes
discrete math”. Universe of discourse is people. Then:
∀x, C (x) → M(x) premise 1
M(Natasha) premise 2
∴ C (Natasha) conclusion.
Consider a world (or “model”, or “universe” – different from
“universe of discourse”!) where every CS major takes discrete
math (∀x, C (x) → M(x) is true), Natasha takes discrete math
(M(Natasha) is true), and Natasha is not a CS major (C (Natasha)
is false). Then premises 1 and 2 are true, but the conclusion is
false. The argument is not valid.
55
Rules of Inference with Quantifiers
All parrots like fruit. My pet is not a parrot. Therefore, my pet
does not like fruit.
Solution:
Let P(x) stand for “x is a parrot”, and F (x) stand for “x likes
fruit”. Universe of discourse is animals. Then:

∀x, P(x) → F (x) premise 1


¬P(my pet) premise 2
∴ ¬F (my pet) conclusion

Consider a (or “model”, or “universe” – different from “universe of


discourse”!) where all parrots like fruit (∀x, P(x) → F (x) is true),
my pet is not a parrot (P(my pet) is false), and my pet likes fruit
(F (my pet) is true). Then premises 1 and 2 are true, but the
conclusion is false. The argument is not valid.
56
Rules of Inference with Quantifiers
All parrots like fruit. At least one of my pets is a parrot.
Therefore, at least one of my pets likes fruit.
Solution:
Let P(x) stand for “x is my pet”, R(x) stand for “x is a parrot”,
and F (x) stand for “x likes fruit”. Universe of discourse is animals.
Then:

∀x, R(x) → F (x) premise 1


∃x, P(x) ∧ R(x) premise 2
∴ ∃x, P(x) ∧ F (x) conclusion

57
Rules of Inference with Quantifiers
Solution:

(1) ∀x, R(x) → F (x) premise 1


(2) ∃x, P(x) ∧ R(x) premise 2
(3) P(c) ∧ R(c) 2, existential instantiation
(4) P(c) 3, simplification
(5) R(c) 3, simplification
(6) R(c) → F (c) 1, universal instantiation
(7) F (c) 5, 6, Modus Ponens
(8) P(c) ∧ F (c) 4, 7, conjunction
(9) ∃x, P(x) ∧ F (x) 8, existential instantiation

The argument is valid. Again, note that we need to use existential


instantiation with a fresh variable c on line 3 first, and then
universal instantiation using variable c on line 6.
58
Rules of Inference with Quantifiers
Exercise: Determine whether each of these arguments is valid. If
an argument is correct, what rule of inference is being used? If it is
not, what logical error occurs?
1. If a real number is bigger than 1, then its square is bigger
than 1. Suppose that n2 > 1. Then n > 1.
2. If a real number is bigger than 3, then its square is bigger
than 9. Suppose that n2 ≤ 9. Then n ≤ 3.
3. If a real number is bigger than 2, then its square is bigger
than 4. Suppose that n ≤ 2. Then n2 ≤ 4.

59
Rules of Inference with Quantifiers
If a real number is bigger than 1, then its square is bigger than 1.
Suppose that n2 > 1. Then n > 1.
Solution: Universe of discourse is R.

∀m, m > 1 → m2 > 1 premise 1


2
n >1 premise 2
∴n>1 conclusion

Consider n = −2, n ∈ R. Then premises are true and conclusion is


false. The argument is not valid.

60
Rules of Inference with Quantifiers
If a real number is bigger than 3, then its square is bigger than 9.
Suppose that n2 ≤ 9. Then n ≤ 3.
Solution: Universe of discourse is R.

(1) ∀m, m > 3 → m2 > 9 premise 1


2
(2) n ≤9 premise 2
∴n≤3 conclusion

Proof:

(3) n > 3 → n2 > 9 1, universal instantiation


(4) ¬(n2 > 9) 2, def. of ≤
(5) ¬(n > 3) 3, 4, Modus Tollens
(6) n≤3 5, def. of ≤

61
Rules of Inference with Quantifiers
If a real number is bigger than 2, then its square is bigger than 4.
Suppose that n ≤ 2. Then n2 ≤ 4.
Solution: Universe of discourse is R.

∀m, m > 2 → m2 > 4 premise 1


n≤2 premise 2
2
∴n ≤4 conclusion

Consider n = −3, n ∈ R. Then premises are true and conclusion is


false. The argument is not valid.

62
Rules of Inference with Quantifiers
• How do we apply universal generalisation to conclude
∀x, P(x)?
• We begin by looking at some arbitrary element c of the
universe of discourse.
• We conclude that P(c) is true.
• We conclude that ∀x, P(x) is true.

Take arbitrary c.
...
∴ P(c)
∴ ∀x, P(x) universal generalisation
Rules of Inference with Quantifiers
Example: Prove the argument below is valid.
Everyone likes mathematics. Everyone who likes mathematics
will do well in this course. Therefore, everyone will do well in
this course.
Let M(x) be “x likes mathematics”, W (x) be “x will do well in
this course”, universe of discourse is students. Then:
(1) ∀x, M(x) premise 1
(2) ∀x, M(x) → W (x) premise 2
(3) Take arbitrary student s
(4) M(s) 1, universal instantiation
(5) M(s) → W (s) 2, universal instantiation
(6) W (s) 4, 5, Modus Ponens
(7) ∀x, W (x) 3, 6, universal generalisation
64
Rules of Inference with Quantifiers
Important: When using the Universal Generalisation rule, we
must introduce a fresh (new) variable, i.e., a variable that did
not appear in our argument / proof.

Example: Consider the following argument.


Everyone likes mathematics. There is at least one person, such
that if they like mathematics, they will do well in this course.
Therefore, everyone will do well in this course.

This argument is not valid. Intuition: We only know that someone


who likes math will do well, not that everyone who likes math will
do well.

65
Rules of Inference with Quantifiers

(1) ∀x, M(x) premise 1


(2) ∃x, M(x) → W (x) premise 2
∴ ∀x, W (x) conclusion

The following “proof” is incorrect!

(3) M(s) → W (s) 2, existential instantiation


(4) Take arbitrary student s
(5) M(s) 1, universal instantiation
(6) W (s) 4, 6, Modus Ponens
(7) ∀x, W (x) 5, 7, universal generalisation

The problem is: on line 4, we are not allowed to use variable s


again!
66
Rules of Inference with Quantifiers
Example: Prove the argument below is valid.
Everybody loves Raymond. If you love someone, you should tell
them. Therefore, everyone should tell Raymond they love him.

Let L(x, y ) be “x loves y ”, T (x, y ) be “x should tell y they love


them”, universe of discourse is people. Then:

(1) ∀x, L(x, Raymond) premise 1


(2) ∀x∀y , L(x, y ) → T (x, y ) premise 2
(3) Take arbitrary person p
(4) L(p, Raymond) 1, universal inst.
(5) L(p, Raymond) → T (p, Raymond) 2, universal inst.
(6) T (p, Raymond) 4, 5, Modus Ponens
(7) ∀x, T (x, Raymond) 3, 6, universal generalisation

67

You might also like