0% found this document useful (0 votes)
220 views35 pages

Discrete Mathematics: (COMP2121B)

This document contains lecture material on predicate logic from COMP2121B Discrete Mathematics at HKU. It includes examples and definitions of propositional logic, predicate logic, quantifiers, and the universal and existential quantifiers. Exercises are provided on propositional and predicate logic, including writing logical statements using variables and quantifiers.

Uploaded by

Brandon Tay
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)
220 views35 pages

Discrete Mathematics: (COMP2121B)

This document contains lecture material on predicate logic from COMP2121B Discrete Mathematics at HKU. It includes examples and definitions of propositional logic, predicate logic, quantifiers, and the universal and existential quantifiers. Exercises are provided on propositional and predicate logic, including writing logical statements using variables and quantifiers.

Uploaded by

Brandon Tay
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/ 35

DISCRETE MATHEMATICS (COMP2121B)

Lecturer: Ravi Ramanathan

TAs: Guo Ke and Xu Hao

Department of Computer Science, HKU

Lecture 3 - Predicate Logic. Exercises on Propositional and Predicate Logic.

https://moodle.hku.hk/ Email: ravi at cs dot hku dot hk


Propositional Logic Exercises

Q1. Suppose we have the propositions P : "There is going to be a quiz" and Q : "I will come to class".


Write down what the following mean in English: (i) The implication P → Q,

(ii) The converse of the implication P → Q, (iii) The contrapositive of the implication P → Q,

(iv) The inverse of the implication P → Q .

A1. (i) The implication P → Q says "If there is going to be a quiz, then I will come to class".

(ii) The converse Q → P says "If I come to class, then there is going to be a quiz".

(iii) The contrapositive ¬Q → ¬P says "If I don't come to class, then there won't be a quiz".

(iv) The inverse ¬P → ¬Q says "If there is not going to be a quiz, then I will not come to class".
Propositional Logic Exercises

Q2. Let p, q and r be the propositions: p : "Grizzly bears have been seen in the area".


q : "Hiking is safe on the trail". r : "Berries are ripe along the trail".
Write the following propositions using p, q and r and logical connectives including negations.

(a) Berries are ripe along the trail, but grizzly bears have not been seen in the area.

(b) Grizzly bears have not been seen in the area and hiking on the trail is safe,
but berries are ripe along the trail.

(c) If berries are ripe along the trail, hiking is safe if and only if grizzly bears have not been
seen in the area.

A2. (a) r ∧ ¬p . (b) ¬p ∧ q ∧ r . (c) r → (q ↔ ¬p) .


Propositional Logic Exercises

Q2.  Let p, q and r be the propositions: p : "Grizzly bears have been seen in the area".


q : "Hiking is safe on the trail". r : "Berries are ripe along the trail".
Write the following propositions using p, q and r and logical connectives including negations.

(d) It is not safe to hike on the trail, but grizzly bears have not been seen in the area
and the berries along the trail are ripe.

(e) For hiking on the trail to be safe, it is necessary but not sufficient that berries not be ripe
along the trail and for grizzly bears not to have been seen in the area.

(f) Hiking is not safe on the trail whenever grizzly bears have been seen in the area
and berries are ripe along the trail.

A2. (d) ¬q ∧ ¬p ∧ r (e) (q → ( ¬r ∧ ¬p)) ∧ ¬ (( ¬r ∧ ¬p) → q) . (f) (p ∧ r) → ¬q .


Propositional Logic Exercises

Q3. Construct a truth table for the following propositions (i) (p → q) ∧ ( ¬p → r),


(ii) ( ¬p ↔ ¬q) ↔ (q ↔ r)

A3. The truth table for the given propositions:

p q r p → q ¬p → r (p → q) ∧ ( ¬p → r) ¬p ↔ ¬q q ↔ r ( ¬p ↔ ¬q) ↔ (q ↔ r)
F F F T F F T T T

F F T T T T T F F
F T F T F F F F T
F T T T T T F T F

T F F F T F F T F

T F T F T F F F T

T T F T T T T F F

T T T T T T T T T
Propositional Logic Exercises

Q4.  You are eligible to be President of the U.S.A. only if you are at least 35 years old, 
were born in the U.S.A., or at the time of your birth both of your parents were citizens,
and you have lived at least 14 years in the country.

Express this statement in terms of e : "You are eligible to be President of the U.S.A.,
a : "You are at least 35 years old", b : "You were born in the U.S.A.",
c : "At the time of your birth, both of your parents were citizens",
d : "You have lived at least 14 years in the U.S.A.".

A4. e → (a ∧ (b ∨ c) ∧ d)
Logical Equivalences Exercises

Q5. Show that the following statements are Tautologies by applying a chain of logical identities

(do not use truth tables): (a) ¬p → (p → q), (b) (p ∧ q) → (p → q), (c) ¬(p → q) → ¬q .

A5. (a) ¬p → (p → q) ≡ ¬( ¬p) ∨ (p → q) by the Conditional-Disjunction Equivalence


≡ p ∨ (p → q) by the Double Negation rule

≡ p ∨ ( ¬p ∨ q) by the Conditional-Disjunction Equivalence

≡ (p ∨ ( ¬p)) ∨ q by the Associativity rule for Disjunction
≡ T ∨ q by the Negation Law

≡ T by the Domination Law

Since ¬p → (p → q) is always true irrespective of the truth values of the propositions p, q,
it is a Tautology. ◼
Logical Equivalences Exercises

Q5. Show that the following statements are Tautologies by applying a chain of logical identities

(do not use truth tables): (a) ¬p → (p → q), (b) (p ∧ q) → (p → q), (c) ¬(p → q) → ¬q .

A5.  (b) (p ∧ q) → (p → q) ≡ ¬(p ∧ q) ∨ (p → q) by the Conditional-Disjunction Equivalence


≡ ¬(p ∧ q) ∨ ( ¬p ∨ q) by the Conditional-Disjunction Equivalence

≡ ( ¬p ∨ ¬q) ∨ ( ¬p ∨ q) by De Morgan's Law

≡ ¬p ∨ ¬p ∨ ¬q ∨ q by the Associativity rule for Disjunction

≡ ¬p ∨ T by the Idempotent Law and the Negation Law

≡ T by the Domination Law

Since (p ∧ q) → (p → q) is always true irrespective of the truth values of the propositions p, q,
it is a Tautology. ◼
Logical Equivalences Exercises

Q5. Show that the following statements are Tautologies by applying a chain of logical identities

(do not use truth tables): (a) ¬p → (p → q), (b) (p ∧ q) → (p → q), (c) ¬(p → q) → ¬q .

A5.  (c) ¬(p → q) → ¬q ≡ ¬ ( ¬(p → q)) ∨ ¬q by the Conditional-Disjunction Equivalence


≡ (p → q) ∨ ¬q by the Double Negation Law
≡ ( ¬p ∨ q) ∨ ¬q by the Conditional-Disjunction Equivalence
≡ ¬p ∨ ( ¬q ∨ q) by the Associativity rule for Disjunction
≡ ¬p ∨ T by the Idempotent Law and the Negation Law

≡ T by the Domination Law

Since ¬(p → q) → ¬q is always true irrespective of the truth values of the propositions p, q,


it is a Tautology. ◼
Predicate Logic

Propositional Logic dealt with propositions. But statements such as "If x ≤ 15, then x := x + 1"


which we use in mathematics and computer science, are not handled within propositional logic.

Such statements involving variables are neither true nor false until values of variables are specified.

Example: In "x ≤ 15", x is the subject and " ≤ 15" is the predicate, a property the subject can have.


P(x) is the value of the propositional function P at x .
After we assign a value to x, the statement P(x) becomes a proposition, i.e., has a truth value.

Definition: A statement involving n variables of the form P(x1, x2, …, xn) is the value of the


propositional function, or n − ary predicate P at the n − tuple (x1, x2, …, xn) .
Predicate Logic

Example: Consider the statement "If x ≤ 15,then x := x + 1" in a computer program.

When the statement is executed, the value of variable x is inserted into P(x) : x ≤ 15.

If P(x) is true for this value of x, the statement x := x + 1 is executed and value of x is increased by 1.

On the other hand, if P(x) is false for the value of x, the statement x := x + 1 is not executed.

Definition. For a variable x the set of values that it can take is called the Domain of Discourse
or Universe of Discourse or simply just the Domain.

Preconditions are statements that define a valid input for the program. Example: x = 0.

Postconditions are statements that define conditions that the outputs should satisfy. Example: x > 15.


Quantifiers: The Universal Quantifier

Besides assigning particular values to variables in a propositional function, there is another way

to convert it into a proposition called Quantification.

The area of logic dealing with predicates and quantifiers is called Predicate Logic or Predicate Calculus.

Definition: The Universal Quantification of P(x) is the proposition "P(x) for all values of x


in the domain". The Universal Quantifier is denoted by ∀ .

∀x P(x) means that P(x) is true for every x in the Universe of Discourse.

∀x P(x) is logically equivalent to P(a1) ∧ P(a2) ∧ … ∧ P(an) if the Domain is {a1, a2, …, an} .

An element in the domain for which P(x) is false is then called a counterexample to ∀x P(x) .

Example: Let P(x) be "x 2 > x". ∀x ∈ ℤ∖{0,1} P(x) ≡ ∀x (x ∈ ℤ∖{0,1} → P(x))

In other words, P(x) is true for all integers excluding 0 and 1.


Quantifiers: The Existential Quantifier

Definition: The Existential Quantification of P(x) is the proposition "There exists an element

x in the domain such that P(x)". The Existential Quantifier is denoted by ∃ .

∃x P(x) means that P(x) is true for at least one x in the Universe of Discourse.

∃x P(x) is logically equivalent to P(a1) ∨ P(a2) ∨ … ∨ P(an) if the Domain is {a1, a2, …, an} .

To show that ∃x P(x) is false, we need to show that P(x) is false for every x in the domain.

Note: If the domain is empty, ∃x P(x) is false for any propositional function P(x) .

Note: If the domain is empty, ∀x P(x) is true for any propositional function P(x) .

Example: Let P(x) be "x 2 ≤ x". ∃x ∈ ℤ such that P(x) is true, namely x = 0.


Quantifiers: The Uniqueness Quantifier

Definition: The Uniqueness Quantification of P(x) is the proposition "There exists a unique

element x in the domain such that P(x)". The Uniqueness Quantifier is denoted by ∃! or ∃1 .

∃!x P(x) means that P(x) is true for exactly one x in the Universe of Discourse.

To show that ∃!x P(x) is false, we can show that P(x) is false for every x in the domain

or that there exist multiple x in the domain for which P(x) is true.

Example: Let P(x) be "x 2 = x". ∃!x ∈ ℤ+ such that P(x) is true, namely x = 1.

Example: Let P(x) be "x 3 = 2". ∃!x ∈ ℝ P(x) ≡ ∃!x (x ∈ ℝ ∧ x 3 = 2) .

Here, ℤ+ denotes the set of positive integers and ℝ denotes the set of real numbers.


Precedence of Quantifiers

The quantifiers ∀, ∃ have higher precedence than all the logical operators from propositional logic.

Example: ∀x P(x) ∨ Q(x) is the statement ( ∀x P(x)) ∨ Q(x) . Is this a proposition?

The part of the statement to which a quantifier is applied is the Scope of this quantifier.
When a quantifier is used on the variable, this occurrence of the variable is said to be bound.
Any occurrence of a variable that is not bound by a quantifier or assigned a value is said to be free.

Example: In ( ∀x P(x)) ∨ Q(x), the first occurrence of x is bound, while the second is free.

We could have written the statement as ( ∀x P(x)) ∨ Q(y) because the scope of the quantifier

∀ is limited to P(x) .
Methods of Predicate Logic

Statements involving predicates and quantifiers are logically equivalent (denoted ≡ ) if and only if
they have the same truth value irrespective of which predicates are substituted and
which domains are used.

De Morgan's Laws for Quantifiers:

The negation of ∀x P(x) is the proposition ∃x ¬P(x), i.e., ¬ ∀x P(x) ≡ ∃x ¬P(x) .

¬ ∀x P(x) is true if and only if there exists an element x in the domain for which P(x) is false.

The negation of ∃x P(x) is the proposition ∀x ¬P(x), i.e., ¬ ∃x P(x) ≡ ∀x ¬P(x) .

¬ ∃x P(x) is true if and only if there is no element x in the domain for which P(x) is true.


Methods of Predicate Logic

In a finite n − element domain {x1, x2, …, xn}, De Morgan's Laws for Quantifiers are given as:

¬ ∀x P(x) ≡ ¬ (P(x1) ∧ P(x2) ∧ … ∧ P(xn)) ≡ ¬P(x1) ∨ ¬P(x2) ∨ … ∨ ¬P(xn) ≡ ∃x ¬P(x)

¬ ∃x P(x) ≡ ¬ (P(x1) ∨ P(x2) ∨ … ∨ P(xn)) ≡ ¬P(x1) ∧ ¬P(x2) ∧ … ∧ ¬P(xn) ≡ ∀x ¬P(x)

Example: The negation of the proposition: "Everybody in the class loves logic" is

"There exists at least one person in the class who does not love logic".

∀x (P(x) ∧ Q(x)) ≡ ∀x P(x) ∧ ∀x Q(x) : Distribution of the Universal Quantifier over a Conjunction

∃x (P(x) ∨ Q(x)) ≡ ∃x P(x) ∨ ∃x Q(x) : Distribution of the Existential Quantifier over a Disjunction


Methods of Predicate Logic: Example

We can now construct logical equivalences in Predicate Logic.

Example: We can show that ¬ ∀x (P(x) → Q(x)) ≡ ∃x (P(x) ∧ ¬Q(x))

¬ ∀x (P(x) → Q(x)) ≡ ∃x ( ¬ (P(x) → Q(x))) by De Morgan's law for quantifiers

≡ ∃x ( ¬ ( ¬P(x) ∨ Q(x))) by the Conditional-Disjunction Equivalence

≡ ∃x (P(x) ∧ ¬Q(x)) by De Morgan's laws and the Double Negation rule.

Note: We cannot distribute a Universal Quantifier over a Disjunction. 

We cannot distribute an Existential Quantifier over a Conjunction. 

Example: Suppose P(x): "x is a rainy day". Q(x): "x is not a rainy day" with the domain being a year.

∀x (P(x) ∨ Q(x)) : "Every day of the year is either rainy or not rainy".

∀x (P(x)) ∨ ∀x (Q(x)) : "Either every day of the year is rainy, or every day of the year is not rainy".


Nested Quantifiers rules

When one Quantifier is within the scope of another, the order is very important.

Example: Suppose P(x, y) : "x opens y".

Let the Universe of Discourse for x be the set of keys.

Let the Universe of Discourse for y be the set of doors.

∀y ∃x P(x, y) : "For all doors, there exists a key that opens that door".

∃x ∀y P(x, y) : "There exists atleast one key that opens all the doors".

In general, ∃x ∀y P(x, y) is true if and only if there is an x that makes P(x, y) true for every y .

In general, ∀y ∃x P(x, y) is true if and only if for every y there is a value of x that makes P(x, y) true.

In the second case, x can depend on y, while in the first x is constant and independent of y .


Nested Quantifiers rules

∀x ∀y P(x, y) ≡ ∀y ∀x P(x, y) : P(x, y) is true for every pair x, y .

∃x ∃y P(x, y) ≡ ∃y ∃x P(x, y) : P(x, y) is true for at least one pair x, y .

When we have predicates with more than one variable, even more care is necessary.

Negating propositions with nested quantifiers can be done by successively applying de Morgan laws 

for negating statements with single quantifiers.

Example. ¬ ∀x ∃y (x + y = 0) ≡ ∃x ¬ ∃y (x + y = 0)

≡ ∃x ∀y ¬ (x + y = 0)

≡ ∃x ∀y (x + y ≠ 0)
Predicates and Quantifiers Exercises

Q6. Translate these statements into English, where C(x) is "x is a comedian" and

F(x) : "x is funny" and the domain consists of all people.

(a) ∀x (C(x) → F(x)), (b) ∀x (C(x) ∧ F(x)),

(c) ∃x (C(x) → F(x)), (d) ∃x (C(x) ∧ F(x))

A6. (a) ∀x (C(x) → F(x)) : "Every comedian is funny".

(b) ∀x (C(x) ∧ F(x)) : "Every person is a funny comedian".

(c) ∃x (C(x) → F(x)) : "There exists a person such that if she or he is a comedian,

then she or he is funny".

(d) ∃x (C(x) ∧ F(x)) : "There exists a person who is a comedian and is funny" or simply

"Some comedians are funny".
Predicates and Quantifiers Exercises

Q7. Let P(x) be the statement "x can speak Russian" and let

Q(x) be the statement "x knows C++" and the domain consists of all students at HKU.

Express the following statements in terms of P(x), Q(x) and logical connectives.

(a) There is a student at HKU who can speak Russian and who knows C++,

(b) There is a student at HKU who can speak Russian but who does not know C++,

(c) Every student at HKU can either speak Russian or knows C++,

(d) No student at HKU can speak Russian or knows C++.

A7.  (a) ∃x (P(x) ∧ Q(x)), (b) ∃x (P(x) ∧ ¬Q(x)),

(c) ∀x (P(x) ∨ Q(x)), (d) ∀x ¬ (P(x) ∨ Q(x)) .


Predicates and Quantifiers Exercises

Q8. Express the negation of each of these statements in terms of quantifiers without 

using the negation symbol

(a) ∀x (x > 1), (b) ∃x (x < 0)

(c) ∀x ((x < − 1) ∨ (x > 2))

(d) ∃x ((x < 4) ∨ (x > 7))

A8. (a) ¬ ∀x (x > 1) ≡ ∃x ¬(x > 1) ≡ ∃x (x ≤ 1) .

(b) ¬ ∃x (x < 0) ≡ ∀x ¬(x < 0) ≡ ∀x (x ≥ 0) .

(c) ¬ ∀x ((x < − 1) ∨ (x > 2)) ≡ ∃x ¬ ((x < − 1) ∨ (x > 2))


≡ ∃x ( ¬(x < − 1) ∧ ¬(x > 2)) ≡ ∃x ((x ≥ − 1) ∧ (x ≤ 2)) .

(d) ¬ ∃x ((x < 4) ∨ (x > 7)) ≡ ∀x ¬ ((x < 4) ∨ (x > 7))


≡ ∀x ( ¬(x < 4) ∧ ¬(x > 7)) ≡ ∀x ((x ≥ 4) ∧ (x ≤ 7)) .
Predicates and Quantifiers Exercises

Q9. Express the following statements using predicates and quantifiers:
(a) "A man qualifies for the marathon if his previous best time is less than 3 hours and a woman
qualifies if her best previous time was less than 3.5 hours".
(b) "A student must take at least 60 course hours, or atleast 45 course hours and write a thesis,
and obtain at least a B in all courses, to receive a master's degree".

A9. (a) Define the propositions M(x) : "x is a man",


Q(x) : "x qualifies for the marathon",

T(x, y) : "person x has a best previous time of less than y hours".

M(x) ∧ T(x, 3) : "x is a man who has run the marathon in less than 3 hours"


¬M(x) ∧ T(x, 3.5) : "x is a woman who has run the marathon in less than 3.5 hours"
Both of these are sufficient to qualify for the marathon.

∀x ((M(x) ∧ T(x, 3)) ∨ ( ¬M(x) ∧ T(x, 3.5))) → Q(x)


Predicates and Quantifiers Exercises

Q9. Express the following statements using predicates and quantifiers:
(a) "A man qualifies for the marathon if his previous best time is less than 3 hours and a woman
qualifies if her best previous time was less than 3.5 hours".
(b) "A student must take at least 60 course hours, or atleast 45 course hours and write a thesis,
and obtain at least a B in all courses, to receive a master's degree".

A9. (b) Define the propositions C(x, y) : "x has taken at least y course hours",


T(x) : "x has written a thesis".
G(x, y, z) : "x has obtained at least grade y in course z".
M(x) : "x will receive a master's degree".

C(x, 45) ∧ T(x) : "x has taken at least 45 course hours and written a master's thesis"


∀z G(x, B, z) : "x has obtained at least grade B in all courses".

(( )
M(x) → C(x, 60) ∨ (C(x, 45) ∧ T(x))) ∧ ∀z G(x, B, z) .
Predicates and Quantifiers Exercises

Q10. Let P(x), Q(x), R(x) and S(x) be the statements "x is a baby", "x is logical",
"x is able to manage a crocodile", and "x is despised", respectively. 

Suppose the domain consists of all people. Express the following using logical quantifiers, connectives.

(a) "Babies are illogical", (b) "Nobody is despised who can manage a crocodile",

(c) "Illogical persons are despised", (d) "Babies cannot manage crocodiles".

Does (d) follow from (a), (b) and (c)?

A10. (a)  ∀x (P(x) → ¬Q(x)), (b) ∀x (R(x) → ¬S(x)),

(c)  ∀x ( ¬Q(x) → S(x)), (d) ∀x (P(x) → ¬R(x)),

From (a) and (c), we obtain that P(x) → ¬Q(x) → S(x) . From the contrapositive of (b), S(x) → ¬R(x) .

Therefore, (d) does follow from (a), (b) and (c).
Nested Quantifiers Exercises

Q11. Let T(x, y) mean that student x likes cuisine y, where domain for x is all students at a school,

and domain for y is all cuisines. Express the following by a simple English sentence.

(a) ∃x T(x, Korean) ∧ ∀x T(x, Mexican)

(b)  ∀x ∀z ∃y ((x ≠ z) → ¬ (T(x, y) ∧ T(z, y)))

(c)  ∃x ∃z ∀y (T(x, y) ↔ T(z, y))

(d)  ∀x ∀z ∃y (T(x, y) ↔ T(z, y))

A11. (a)  ∃xT(x, Korean) ∧ ∀xT(x, Mexican) : "Some student at the school likes Korean cuisine, and


everyone at the school likes Mexican cuisine".

(b)  ∀x ∀z ∃y ((x ≠ z) → ¬ (T(x, y) ∧ T(z, y))) : "For every pair of distinct students at the school,

there is some cuisine that at least one of them does not like".
Nested Quantifiers Exercises

Q11. Let T(x, y) mean that student x likes cuisine y, where domain for x is all students at a school,


and domain for y is all cuisines. Express the following by a simple English sentence.

(a) ∃x T(x, Korean) ∧ ∀x T(x, Mexican)

(b)  ∀x ∀z ∃y ((x ≠ z) → ¬ (T(x, y) ∧ T(z, y)))

(c)  ∃x ∃z ∀y (T(x, y) ↔ T(z, y))

(d)  ∀x ∀z ∃y (T(x, y) ↔ T(z, y))

A11.  (c)  ∃x ∃z ∀y (T(x, y) ↔ T(z, y)) : "There is a pair of students at the school who like exactly


the same set of cuisines".

(d)  ∀x ∀z ∃y (T(x, y) ↔ T(z, y)) : "For every pair of students at the school, there is some cuisine

about which they have the same opinion (either they both like it or they both do not like it)".
Nested Quantifiers Exercises

Q12. Express the following using mathematical and logical operators, predicates and quantifiers, 
where the domain consists of all integers.

(a) "The sum of two negative integers is negative".

(b) "The difference of two positive integers is not necessarily positive".

(c) "The sum of squares of two integers is greater than or equal to the square of their sum".

(d) "The absolute value of the product of two integers is the product of their absolute values".

A12.  (a) "The sum of two negative integers is negative": ∀x ∀y (((x < 0) ∧ (y < 0)) → (x + y < 0)) .

(b) "The difference of two positive integers is not necessarily positive":

¬ ∀x ∀y (((x > 0) ∧ (y > 0)) → (x − y > 0)) .


Nested Quantifiers Exercises

Q12. Express the following using mathematical and logical operators, predicates and quantifiers, 
where the domain consists of all integers.

(a) "The sum of two negative integers is negative".

(b) "The difference of two positive integers is not necessarily positive".

(c) "The sum of squares of two non-negative integers is less than or equal to the square of their sum".

(d) "The absolute value of the product of two integers is the product of their absolute values".

A12. (c) ∀x ∀y (((x ≥ 0) ∧ (y ≥ 0)) → x 2 + y 2 ≤ (x + y)2) .

(d) ∀x ∀y ( | xy | = | x | | y | ) .
Nested Quantifiers Exercises

Q13. Rewrite the following statements so that the negations only appear within the predicates.

(a) ¬ ∀y ∀x (P(x, y) ∨ Q(x, y))

(b) ¬ ( ∃x ∃y ¬P(x, y) ∧ ∀x ∀yQ(x, y))

(c) ¬ ∀x ( ∃y ∀zP(x, y, z) ∧ ∃z ∀yP(x, y, z))

A13. (a) ∃y ∃x ¬ (P(x, y) ∨ Q(x, y)) ≡ ∃y ∃x ( ¬P(x, y) ∧ ¬Q(x, y))

(b) ( ¬ ( ∃x ∃y ¬P(x, y)) ∨ ¬ ( ∀x ∀yQ(x, y))) ≡ ( ∀x ∀yP(x, y)) ∨ ( ∃x ∃y ¬Q(x, y))

(c) ∃x ¬ ( ∃y ∀zP(x, y, z) ∧ ∃z ∀yP(x, y, z)) ≡ ∃x ( ¬ ( ∃y ∀zP(x, y, z)) ∨ ¬ ( ∃z ∀yP(x, y, z)))

≡ ∃x (( ∀y ∃z ¬P(x, y, z)) ∨ ( ∀z ∃y ¬P(x, y, z)))


Nested Quantifiers Exercises

Q14. Use quantifiers and logical connectives to express the fact that every linear polynomial with

real coefficients and where the coefficient of x is nonzero, has exactly one real root.

A14. ∀m ∀c ((c ∈ ℝ ∧ m ∈ ℝ ∧ m ≠ 0) → ∃!x (x ∈ ℝ ∧ m x + c = 0))

Q15. Determine the truth value of ∀x ∃y (xy = 1) if the domain for x, y consists of

(a) nonzero real numbers, (b) nonzero integers, (c) positive real numbers.

A15. (a) True. (b) False. (c) True.
Practice Exercises

1. Show that (p → q) ∧ (q → r) → (p → r) is a tautology.

2. Find a counterexample, if possible, to these universally quantified statements,
where the domain for all variables consists of all integers
(a) ∀x (x 2 ≥ x), (b) ∀x ((x > 0) ∨ (x < 0))

3 * (Optional). Steve would like to determine the relative salaries of three people using two facts.

First, he knows that if Fred is not the highest paid of the three, then Janice is.

Second, he knows that if Janice is not the lowest paid, then Maggie is paid the most.

Can you help Steve list the three people in order of decreasing salary? Explain your reasoning.
Practice Exercises

4. Translate these statements into English where the domain consists of all real numbers
(a) ∀x ∀y (((x ≥ 0) ∧ (y ≥ 0)) → (xy ≥ 0))
(b) ∀x ∀y ∃z (xy = z)

5. Use quantifiers and predicates with more than one variable to express these statements

(a) "Every student in this class has taken at least one math course".

(b) "There is a student in this class who has been in every room of at least one building on campus".
Summary

We have learnt the ideas of Predicate Logic.

1. Be familiar with definitions and precedence of quantifiers.

2. Learn to become proficient in the methods of Predicate Logic and in showing

logical equivalences.

3. Learn to translate statements given in plain English into the language of Predicate logic

and vice versa.

Next: Proofs.

You might also like