You are on page 1of 130

Propositional Logic

• Logic is the basis of all mathematical reasoning and of all automated


reasoning.
• Propositions: A proposition is a declarative sentence (that is, a sentence
that declares a fact) that is either true or false, but not both. A proposition
ia a basic building blocks of logic.

• Eg:
• 1 + 1 = 2.
• Toronto is the capital of Canada.
• What time is it?
• x + 1 = 2.
• Propositional variables (or statement variables): Variables that
represent propositions. The conventional letters used for
propositional variables are p, q, r, s, . . . .
• If the proposition is true, it is denoted by T. If the proposition is false,
it is denoted by F.
• The area of logic that deals with propositions is called the
propositional calculus or propositional logic.

• Many mathematical statements are constructed by combining one or


more propositions. New propositions, called compound propositions,
are formed from existing propositions using logical operators.
1. Negation of p: Let p be a proposition. The negation of p, denoted by ¬𝑝
(also denoted by 𝑝) read as “not p”, is the statement “It is not the case
that p.”
• Eg: Find the negation of the proposition
Truth table
“Michael’s PC runs Linux”
𝑝 ¬𝑝
and express this in simple English.
T F
“It is not the case that Michael’s PC runs Linux.” F T
“Michael’s PC does not run Linux.”

Q. Find the negation of the proposition


“Vandana’s smartphone has at least 32GB of memory”
and express this in simple English.
“It is not the case that Vandana’s smartphone has at least 32GB of
memory.”
“Vandana’s smartphone does not have at least 32GB of memory”
“Vandana’s smartphone has less than 32GB of memory.”

2. Conjunction of p and q: Let p and q be propositions. The conjunction


of p and q, denoted by p ∧ q, is the proposition “p and q.” The
conjunction p ∧ q is true when both p and q are true and is false
otherwise.
Truth table
𝑝 𝒒 𝑝∧𝑞
T T T
T F F
F T F
F F F
3. Disjunction of p and q: Let p and q be propositions. The disjunction of p and q,
denoted by p ∨ q, is the proposition “p or q.” The disjunction p ∨ q is false when
both p and q are false and is true otherwise.
Truth table
𝑝 𝒒 𝑝∨𝑞 𝑝⊕𝑞

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

4. Exclusive or of p and q: Let p and q be propositions. The exclusive or of p and


q, denoted by p ⊕ q, is the proposition that is true when exactly one of p and q
is true and is false otherwise.
5. Conditional Statements: Let p and q be propositions. The conditional statement p →
q is the proposition “if p, then q.” The conditional statement p → q is false when p is true
and q is false, and true otherwise.
In the conditional statement p → q, p is called the hypothesis (or antecedent or premise) and
q is called the conclusion (or consequence). A conditional statement is also called an
implication.
• Note that the statement p → q is true when both p and q are true and when p is false (no
matter what truth value q has).
• “If you get 100% on the final, then you will get an A.”

Truth table Truth table


𝑝 𝒒 𝑝→𝑞 𝑝 𝒒 ¬𝒑 ¬𝒑 ∨ 𝒒 𝑝→𝑞
T T T T T F T T
T F F T F F F F
F T T F T T T T
F F T F F T T T
Expressing conditional statement:
1. “if p, then q” 2. “p implies q”
3. “if p, q” 4. “p only if q”
5. “p is sufficient for q” 6. “a sufficient condition for q is p”
7. “q if p” 8. “q whenever p”
9. “q when p” 10. “q is necessary for p”
11. “a necessary condition for p is q” 12. “q follows from p”
13. “q unless ¬p”
Q. Let p be the statement “Maria learns discrete mathematics” and q the
statement “Maria will find a good job.” Express the statement p → q as a
statement in English.
p: Maria learns discrete mathematics.
q: Maria will find a good job.
“if p, then q”
“If Maria learns discrete mathematics, then she will find a good job.”
“q when p”
“Maria will find a good job when she learns discrete mathematics.”
“q unless ¬p”
“Maria will find a good job unless she does not learn discrete mathematics.”
CONVERSE, CONTRAPOSITIVE, AND INVERSE
CONVERSE: The converse of p → 𝑞 is the proposition q → 𝑝.
CONTRAPOSITIVE: The contrapositive of p → 𝑞 is the proposition ¬𝑞 → ¬𝑝.
INVERSE: The inverse of p → 𝑞 is the proposition ¬p → ¬𝑞.
Q. Find the truth table for converse, contrapositive and inverse:
p q Converse: Contrapositive: Inverse:
q→𝑝 ¬𝑞 → ¬𝑝 ¬p → ¬𝑞
T T
T F
F T
F F

Only the contrapositive always has the same truth value as p → q. When two
compound propositions always have the same truth value we call them
equivalent. A conditional statement and its contrapositive are equivalent.
Q. What are the contrapositive, the converse, and the inverse of the
conditional statement
“The home team wins whenever it is raining?”
“q whenever p”
q: The home team wins
p: It is raining.
“The home team wins whenever it is raining?”
“q whenever p”
q: The home team wins
p: It is raining.

Contrapositive ¬𝑞 → ¬𝑝 : “If the home team does not win, then it is


not raining.”
Converse q → 𝑝 : “If the home team wins, then it is raining.”
Inverse ¬p → ¬𝑞: “If it is not raining, then the home team does not
win.”
BICONDITIONALS: Let p and q be propositions. The biconditional statement
p ↔ q is the proposition “p if and only if q.” Biconditional statements are also
called bi-implications.
p ↔ q has exactly the same truth value as (p → q) ∧ (q → p).
Q. Find the truth table for p ↔ q
p q p→𝒒 𝑞→𝑝 p⟷𝑞
T T
T F
F T
F F

Q. Let p be the statement “You can take the flight,” and let q be the statement
“You buy a ticket.”
Then p ↔ q is the statement?
Q. Construct the truth table of the compound proposition
(p ∨¬q) → (p ∧ q).

Precedence of Logical Operators


Operator Precedence
¬ 1
∧ 2
∨ 3
→ 4
↔ 5
Q. Let p, q, and r be the propositions
p :You have the flu.
q :You miss the final examination.
r :You pass the course.
Express each of these propositions as an English sentence.
a) p → q b) ¬q ↔ r
c) q →¬r d) p ∨ q ∨ r
e) (p →¬r) ∨ (q →¬r)
f ) (p ∧ q) ∨ (¬q ∧ r)
Sometimes in logic, the word “but” is used instead of “and”.

The sun is shining, but it is raining.

Expressing it using logical connective:


p: The sun is shining.
q: It’s raining

𝑝∧𝑞
Q. 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 these 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.
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 ) Hiking is not safe on the trail whenever grizzly bears have been seen in
the area and berries are ripe along the trail.
p : Grizzly bears have been seen in the area.
q : Hiking is safe on the trail.
r : Berries are ripe along the trail.
Write these 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.
𝑟 → (𝑞 ↔ ¬𝑝)

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 ) Hiking is not safe on the trail whenever grizzly bears have been seen in the area and berries are ripe along
the trail.
𝑝 ∧ 𝑟 → ¬𝑞
Q. Let p, q, and r be the propositions and:
but/nevertheless/however/even
p :You get an A on the final exam. so/inspite/yet/though/still/nonetheless/anyhow/an
q :You do every exercise in this book. yway

r :You get an A in this class.


Write these propositions using p, q, and r and logical connectives (including
negations).
a) You get an A in this class, but you do not do every exercise in this book.
b) You get an A on the final, you do every exercise in this book, and you get an A in this
class.
c) To get anA in this class, it is necessary for you to get an A on the final.
d) You get an A on the final, but you don’t do every exercise in this book; nevertheless,
you get an A in this class.
e) Getting an A on the final and doing every exercise in this book is sufficient for
getting an A in this class.
f ) You will get an A in this class if and only if you either do every exercise in this book
or you get an A on the final.
p :You get an A on the final exam.
q :You do every exercise in this book.
r :You get an A in this class.
Write these propositions using p, q, and r and logical connectives (including negations).
a) You get an A in this class, but you do not do every exercise in this book.
𝑝 ∧ ¬𝑞
b) You get an A on the final, you do every exercise in this book, and you get an A in this class.
𝑝∧𝑞∧𝑟
c) To get an A in this class, it is necessary for you to get an A on the final.
𝑟→𝑝
d) You get an A on the final, but you don’t do every exercise in this book; nevertheless, you get an A in this class.
𝑝 ∧ ¬𝑞 ∧ 𝑟
e) Getting an A on the final and doing every exercise in this book is sufficient for getting an A in this class.
𝑝∧𝑞 →𝑟
f ) You will get an A in this class if and only if you either do every exercise in this book or you get an A on the
final.
𝑟 ↔ (𝑞 ∨ 𝑟)
Q. Write each of these statements in the form “if p, then q”
a) It snows whenever the wind blows from the northeast.
b) The apple trees will bloom if it stays warm for a week.
c) That the Pistons win the championship implies that they beat the Lakers.
d) It is necessary to walk 8 miles to get to the top of Long’s Peak.
e) To get tenure as a professor, it is sufficient to be world famous.
f ) If you drive more than 400 miles, you will need to buy gasoline.
g) Your guarantee is good only if you bought your CD player less than 90 days
ago.
h) Jan will go swimming unless the water is too cold.
Write each of these statements in the form “if p, then q”
a) It snows whenever the wind blows from the northeast. 𝑞 𝑤ℎ𝑒𝑛𝑒𝑣𝑒𝑟 𝑝
If the wind blows from the northeast, then it snows
b) The apple trees will bloom if it stays warm for a week. 𝑞 𝑖𝑓 𝑝
If it stays warm for a week, then the apple trees will bloom
c) That the Pistons win the championship implies that they beat the Lakers. 𝑝 𝑖𝑚𝑝𝑙𝑖𝑒𝑠 𝑞
If the Pistons win the championship, then they beat the Lakers.
d) It is necessary to walk 8 miles to get to the top of Long’s Peak.
What is necessary to get to the top of Long’s Peak : to walk 8 miles (conclusion/consequence)
If you get to the top of Long’s Peak, then must have walked 8 miles.
e) To get tenure as a professor, it is sufficient to be world famous.
What is sufficient to get tenure as a professor: to be world famous (hypothesis/antecedent/premise)
If you are world famous, then you will get tenure as a professor.
f ) If you drive more than 400 miles, you will need to buy gasoline.
If you drive more than 400 miles, then you will need to buy gasoline.
g) Your guarantee is good only if you bought your CD player less than 90 days ago. 𝑝 𝑜𝑛𝑙𝑦 𝑖𝑓 𝑞
If your guarantee is good, then you have bought your CD player less than 90 days ago.
h) Jan will go swimming unless the water is too cold. 𝑞 𝑢𝑛𝑙𝑒𝑠𝑠 𝑛𝑜𝑡 𝑝
If the water is not too cold, then Jan will go swimming.
Translating English Sentences
• Translate the English sentences into expressions involving
propositional variables and logical connectives
• Once we have translated sentences from English into logical
expressions we can analyze these logical expressions to determine
their truth values, we can manipulate them, and we can use rules of
inference (will be taught later) to reason about them.
Q. Translated into a logical expression
“You can access the Internet from campus only if you are a computer
science major or you are not a freshman.”
• “You can access the Internet from campus”: a
• “You are a computer science major”: c
• “You are a freshman”: f
𝑎 → (𝑐 ∨ ¬𝑓)
Q. “You cannot ride the roller coaster if you are under 4 feet tall unless you are
older than 16 years old.”
r: You can ride the roller coaster.
u: you are under 4 feet tall.
o: you are older than 16 years old.
(𝑢 ∧ ¬𝑜) → ¬𝑟

Q. The automated reply cannot be sent when the file system is full
a: The automated reply can be sent.
f: The file system is full.
𝑓 → ¬𝑎
System specifications should be consistent, that is, they should not contain
conflicting requirements that could be used to derive a contradiction.
Q. Determine whether these system specifications are consistent:
“The diagnostic message is stored in the buffer or it is retransmitted.”
“The diagnostic message is not stored in the buffer.”
“If the diagnostic message is stored in the buffer, then it is retransmitted.”
p: The diagnostic message is stored in the buffer .
q: The diagnostic message is retransmitted.
𝑝∨𝑞
¬𝑝 p q 𝑝∨𝑞 ¬𝑝 𝑝→𝑞
𝑝→𝑞 T T T F T
T F T F F
F T T T T
F F F T T
Logic Puzzles: Puzzles that can be solved using logical reasoning are known as logic puzzles.
• An island that has two kinds of inhabitants, knights, who always tell the truth, and their opposites,
knaves, who always lie. You encounter two people A and B. What are A and B if A says “B is a
knight” and B says “The two of us are opposite types?”
• Let
• 𝑝 : A is a knight. and ¬𝑝: A is knave
• 𝑞: B is a knight. and¬𝑞: B is knave

Assume A is a knight.
If A is a knight, then he is telling the truth when he says that B is a knight.
However, if B is a knight, then B’s statement that A and B are of opposite types contradicts. We can
conclude that A is not a knight, that is, that p is false.

Assume A is a knave.
If A is a knave, then everything A says is false. A’s statement that B is a knight is a lie. Means that q is
false and B is also a knave. If B is a knave, then B’s statement that A and B are opposite types is a lie
which is consistent with both A and B being knaves.
• We can conclude that both A and B are knaves.
Logic Circuits

Q. Build a digital circuit that produces the output (p ∨¬r) ∧ (¬p ∨ (q


∨¬r)) when given input bits p, q, and r.
Propositional Equivalences
A compound proposition that is always true, no matter what the truth
values of the propositional variables that occur in it, is called a
tautology.
A compound proposition that is always false is called a contradiction.
A compound proposition that is neither a tautology nor a contradiction
is called a contingency.
• Logical Equivalences: Compound propositions that have the same
truth values in all possible cases are called logically equivalent. The
symbol ≡ or ⇔is used to denote logical equivalence.
• The compound propositions p and q are called logically equivalent if p
↔ q is a tautology.

• De Morgan laws:
1. ¬(p ∧ q) ≡ ¬p ∨¬q
2. ¬(p ∨ q) ≡ ¬p ∧¬q
Q. Show that ¬(p ∨ q) and ¬p ∧¬q are logically equivalent.
Q. Show that p ∨ (q ∧ r) and (p ∨ q) ∧ (p ∨ r) are logically equivalent.
Equivalence Name
p∧T≡p Identity laws
Logical Equivalences. p∨F≡p
p∨T≡T Domination laws
p∧F≡F
p∨p≡p Idempotent laws
p∧p≡p
¬(¬p) ≡ p Double negation law
p∨q≡q∨p Commutative laws
p∧q≡q∧p
(p ∨ q) ∨ r ≡ p ∨ (q ∨ r) Associative laws
(p ∧ q) ∧ r ≡ p ∧ (q ∧ r)
p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r) Distributive laws
p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)
¬(p ∧ q) ≡ ¬p ∨¬q De Morgan’s laws
¬(p ∨ q) ≡ ¬p ∧¬q
p ∨ (p ∧ q) ≡ p Absorption laws
p ∧ (p ∨ q) ≡ p
p ∨¬p ≡ T Negation laws
p ∧¬p ≡ F
Logical Equivalences
Involving Conditional Statements.
• p → q ≡ ¬p ∨ q
• p → q ≡ ¬q →¬p
• p ∨ q ≡ ¬p → q
• p ∧ q ≡ ¬(p →¬q)
• ¬(p → q) ≡ p ∧¬q
• (p → q) ∧ (p → r) ≡ p → (q ∧ r)
• (p → r) ∧ (q → r) ≡ (p ∨ q) → r
• (p → q) ∨ (p → r) ≡ p → (q ∨ r)
• (p → r) ∨ (q → r) ≡ (p ∧ q) → r
Logical Equivalences Involving
Biconditional Statements.

• p ↔ q ≡ (p → q) ∧ (q → p)
• p ↔ q ≡ ¬p ↔¬q
• p ↔ q ≡ (p ∧ q) ∨ (¬p ∧¬q)
• ¬(p ↔ q) ≡ p ↔¬q
Q. Show that ¬(p → q) and p ∧¬q are logically equivalent.

¬(p → q) ≡ ¬(¬p ∨ q) since p → q ≡ ¬p ∨ q


≡ ¬(¬p)∧¬q by the second De Morgan law
≡ p ∧¬q by the double negation law
Q. Show that ¬(p ∨ (¬p ∧ q)) and ¬p ∧¬q are logically equivalent by
developing a series of logical equivalences.
• Q. Show that ¬(p ∨ (¬p ∧ q)) and ¬p ∧¬q are logically equivalent by
developing a series of logical equivalences.

¬(p ∨ (¬p ∧ q)) ≡ ¬p ∧¬(¬p ∧ q) by the second De Morgan law


≡ ¬p ∧ [¬(¬p)∨¬q] by the first De Morgan law
≡ ¬p ∧ (p ∨¬q) by the double negation law
≡ (¬p ∧ p) ∨ (¬p ∧¬q) by the second distributive law
≡ F ∨ (¬p ∧¬q) because ¬p ∧ p ≡ F
≡ (¬p ∧¬q) ∨ F by the commutative law for disjunction
≡ ¬p ∧¬q by the identity law for F
• Consequently ¬(p ∨ (¬p ∧ q)) and ¬p ∧¬q are logically equivalent.
Q. “You cannot ride the roller coaster if you are under 4 feet tall unless you are older than 16 years old.”
r: You can ride the roller coaster.
u: you are under 4 feet tall.
o: you are older than 16 years old.
(𝑢 ∧ ¬𝑜) → ¬𝑟
• You cannot ride the roller coaster if you are under 4 feet tall unless you are older than 16 years old
p → q ≡ q unless ¬p ≡If p, q
≡¬r if u unless o
≡¬𝑜 →(¬r if u)
≡¬𝑜 →(u → ¬r)
≡ ¬𝑜 →(¬𝑢 ∨ ¬𝑟)
≡ ¬(¬𝑜) ∨ ¬𝑢 ∨ ¬𝑟
≡ 𝑜 ∨ ¬𝑢 ∨ ¬𝑟
≡(𝑜 ∨ ¬𝑢) ∨ ¬𝑟
≡ ¬(¬o ∧u) ∨ ¬𝑟
≡¬(u ∧ ¬o ) ∨ ¬𝑟
≡(u ∧ ¬o)→ ¬𝑟

If a then b unless c ≡ (𝑎 ∧ ¬𝑐) → 𝑏


Q. Show that (p ∧ q) → (p ∨ q) is a tautology.

(p ∧ q) → (p ∨ q) ≡ ¬(p ∧ q) ∨ (p ∨ q)
≡ (¬p ∨¬q) ∨ (p ∨ q) by the first De Morgan law
≡ (¬p ∨ p) ∨ (¬q ∨ q) by the associative and commutative
laws for disjunction
≡T∨T
≡ T by the domination law
Propositional Satisfiability
A compound proposition is satisfiable if there is an assignment of truth
values to its variables that makes it true. When no such assignments exists,
that is, when the compound proposition is false for all assignments of truth
values to its variables, the compound proposition is unsatisfiable.
Q. Determine whether each of the compound propositions
i. (p ∨¬q) ∧ (q ∨¬r) ∧ (r ∨¬p)
ii. (p ∨ q ∨ r) ∧ (¬p ∨¬q ∨¬r), is satisfiable.
i, When p=T; q=T; r=T; (p ∨¬q) ∧ (q ∨¬r) ∧ (r ∨¬p) will be T, hence it
satisfiable
Q. Show that each of these conditional statements is a tautology
a) (p ∧ q) → p b) p → (p ∨ q)
c) ¬p → (p → q) d) (p ∧ q) → (p → q)
e) ¬(p → q) → p f ) ¬(p → q)→¬q

a) (p ∧ q) → p ≡ ¬ 𝑝 ∧ 𝑞 ∨ 𝑝 ≡ ¬𝑝 ∨ ¬𝑞 ∨ 𝑝 ≡ ¬𝑝 ∨ 𝑝 ∨ ¬𝑞 ≡ 𝑇 ∨ ¬𝑞 ≡ 𝑇
f) ¬(p → q)→¬q ≡ ¬(¬𝑝 ∨ 𝑞) → ¬𝑞 ≡ (𝑝 ∧ ¬𝑞) → ¬𝑞
≡ ¬(𝑝 ∧ ¬𝑞) ∨ ¬𝑞 ≡ ¬𝑝 ∨ 𝑞 ∨ ¬𝑞 ≡ ¬𝑝 ∨ 𝑇 ≡ 𝑇

Q. Determine whether (¬p ∧ (p → q))→¬q is a tautology.


Q. Show that p ↔ q and (p → q) ∧ (q → p) are logically equivalent.
Prove
i. p ∨ (p ∧ q) ≡ p
ii. p ∧ (p ∨ q) ≡ p
Q. Show that ¬(p ↔ q) and ¬p ↔q are logically equivalent.
To show: ¬(p ↔ q) ≡ ¬p ↔q

L.H.S
¬(p ↔ q) ≡ ¬ 𝑝 → 𝑞 ∧ 𝑞 → 𝑝
≡ ¬ ¬𝑝 ∨ 𝑞 ∧ ¬𝑞 ∨ 𝑝
≡ ¬ ¬𝑝 ∧ ¬𝑞 ∨ (¬𝑝 ∧ 𝑝) ∨ (𝑞 ∧ ¬𝑞) ∨ 𝑞 ∧ 𝑝
≡ ¬ ¬𝑝 ∧ ¬𝑞 ∨ 𝐹 ∨ 𝐹 ∨ 𝑞 ∧ 𝑝
≡ ¬ ¬𝑝 ∧ ¬𝑞 ∧ 𝑇 ∧ 𝑇 ∧ ¬ 𝑞 ∧ 𝑝
≡ 𝑝 ∨ 𝑞 ∧ ¬𝑞 ∨ ¬𝑝
≡ ¬𝑝 → 𝑞 ∧ 𝑞 → ¬𝑝
≡ ¬𝑝 ↔ 𝑞
Q. Show that ¬(p ↔ q) and p ↔ ¬ q are logically equivalent.

Q. Show that p → q and ¬q →¬p are logically equivalent.


To show: p → q ≡ ¬q →¬p

L.H.S.
p → q ≡ ¬𝑝 ∨ 𝑞
≡ 𝑞 ∨ ¬𝑝
≡ ¬(¬𝑞) ∨ ¬𝑝
≡ ¬q →¬p
Q. Show using truth table, ¬(p ⊕ q) and p ↔ q are logically
equivalent.
Q. Show that ¬(p ⊕ q) and p ↔ q are logically equivalent without
using truth table.
Hint: A ⊕ B=A𝐵+ത 𝐴ҧ B
Q. Determine whether [(p ∨ q) ∧ (¬p ∨ r)] → (q ∨ r) is a tautology or
not.
Q. Show that (p → q) → r and p → (q → r) are not logically equivalent.

When p, q and r are all F.


(p → q) → r is F
p → (q → r) is T

So, (p → q) → r and p → (q → r) are not logically equivalent.


Predicates and Quantifiers
Predicates:
Statements involving variables, “x > 3”, “x = y + 3”
These statements are neither true nor false when the values of the variables
are not specified.
The statement “x is greater than 3” has two parts. The first part, the variable x,
is the subject of the statement. The second part—the predicate, “is greater
than 3”—refers to a property that the subject of the statement can have.
• We can denote the statement “x is greater than 3” by P(x), where P denotes
the predicate “is greater than 3” and x is the variable.
• The statement P(x) is also said to be the value of the propositional function
P at x. Once a value has been assigned to the variable x, the statement P(x)
becomes a proposition and has a truth value.
Q. Let P(x) denote the statement “x > 3.” What are the truth values of
P(4) and P(2)?

Q. 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)?

Q. Let A(x) denote the statement “Computer x is under attack by an


intruder.” Suppose that of the computers on campus, only CS2 and
MATH1 are currently under attack by intruders. What are
truth values of A(CS1), A(CS2), and A(MATH1)?
Quantifiers

• Quantification expresses the extent to which a predicate is true over a


range of elements. In English, the words all, some, many, none, and few
are used in quantifications.
• We will focus on two types of quantification here: universal
quantification, which tells us that a predicate is true for every element
under consideration, and existential quantification, which tells us that
there is one or more element under consideration for which the
predicate is true. The area of logic that deals with predicates and
quantifiers is called the predicate calculus.
The universal quantification of P(x) is the statement
“P(x) for all values of x in the domain.”
The notation ∀xP(x) denotes the universal quantification of P(x). Here ∀ is called the
universal quantifier. We read ∀xP(x) as “for all x P(x)” or “for every x P(x).”
An element for which P(x) is false is called a counterexample of ∀xP(x).

Eg: Let P(x) be the statement “x + 1 > x.” What is the truth value of the quantification
∀xP(x), where the domain consists of all real numbers?
• Because P(x) is true for all real numbers x, the quantification ∀xP(x) is true.
Eg: Let Q(x) be the statement “x < 2.” What is the truth value of the quantification
∀xQ(x), where the domain consists of all real numbers?
• Q(x) is not true for every real number x, because, for instance, Q(3) is false. That is,
x = 3 is a counterexample for the statement ∀xQ(x). Thus ∀xQ(x) is false.
• The existential quantification of P(x) is the proposition
“There exists an element x in the domain such that P(x).”
We use the notation ∃xP(x) for the existential quantification of P(x).
Here ∃ is called the existential quantifier.
• Besides the phrase “there exists” we can also express existential
quantification in many other ways, such as by using the words “for
some,” “for at least one,” or “there is.”

• Eg: Let P(x) denote the statement “x > 3.” What is the truth value of
the quantification ∃xP(x), where the domain consists of all real
numbers?
• Because “x > 3” is sometimes true—for instance, when x = 4 the
existential quantification of P(x), which is ∃xP(x), is true.
Statement When True? When False?
∀xP(x) P(x) is true for every x. There is an x for which P(x) is false
∃xP(x) There is an x for which P(x) is true. P(x) is false for every x.

THE UNIQUENESS QUANTIFIER

The uniqueness quantifier, denoted by ∃! or ∃1.


The notation ∃!xP(x) [or ∃1xP(x)] 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.”)
Quantifiers with Restricted Domains
• An abbreviated notation is often used to restrict the domain of a quantifier. In
this notation, a condition a variable must satisfy is included after the quantifier.
• Eg: What do the statements ∀x < 0 (x2 > 0), ∀y ≠ 0 (y3 ≠ 0), and ∃z > 0 (z2 = 2)
mean, where the domain in each case consists of the real numbers?
• The statement ∀x < 0 (x2 > 0) states that for every real number x with x < 0, x2 > 0.
That is, it states “The square of a negative real number is positive.” This
statement is the same as ∀x(x < 0 → x2 > 0).
• The statement ∀y ≠ 0 (y3 ≠ 0) states that for every real number y with y ≠ 0, we
have y3 ≠ 0. That is, it states “The cube of every nonzero real number is nonzero.”
Note that this statement is equivalent to ∀y(y ≠ 0 → y3 ≠ 0).
• Finally, the statement ∃z > 0 (z2 = 2) states that there exists a real number z with z
> 0 such that z2 = 2. That is, it states “There is a positive square root of 2.” This
statement is equivalent to ∃z(z > 0 ∧ z2 = 2).
Precedence of Quantifiers
The quantifiers ∀ and ∃ have higher precedence than all logical
operators from propositional calculus.
For example, ∀xP(x) ∨ Q(x) is the disjunction of ∀xP(x) and Q(x).
In other words, it means (∀xP(x)) ∨ Q(x) rather than ∀x(P(x) ∨ Q(x)).
Logical Equivalences Involving 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 S ≡ T to indicate that two statements S and T involving
predicates and quantifiers are logically equivalent.
Negating Quantified Expressions
• “Every student in your class has taken a course in calculus.”
∀xP(x),
• Where,
• P(x) is the statement “x has taken a course in calculus”
and the domain consists of the students in your class.
• The negation of this statement is “It is not the case that every student in
your class has taken a course in calculus.”
• This is equivalent to “There is a student in your class who has not taken a
course in calculus.”
∃x ¬P(x).
The rules for negations for quantifiers are called De Morgan’s laws for quantifiers.

Negation Equivalent Statement

¬∃xP(x) ∀x¬P(x)

¬∀xP(x) ∃x¬P(x)

Q. What are the negations of the statements “There is an honest politician” and “All Americans eat
cheeseburgers”?
Let H(x) denote “x is honest.”
“There is an honest politician” is represented by ∃xH(x), where the domain consists of all politicians.
The negation of this statement is ¬∃xH(x), which is equivalent to ∀x¬H(x).
“Every politician is dishonest.”
In English, the statement “All politicians are not honest” is ambiguous, this statement often means “Not all
politicians are honest.”
• “All Americans eat cheeseburgers”

Let C(x) denote “x eats cheeseburgers.”


“All Americans eat cheeseburgers”: ∀xC(x), where the domain consists of all
Americans.
¬∀xC(x) is given by ∃x¬C(x).
“Some American does not eat cheeseburgers”
“There is an American who does not eat cheeseburgers.”

Q. What are the negation of the statements ∀x(x2 > x).


¬∀x(x2 > x), which is equivalent to ∃x¬(x2 > x).
This can be rewritten as ∃x(x2 ≤ x).

Q. What are the negation of the statements ∃x(x2 = 2)


What are the negation of the statements ∃x(x2 = 2)

¬∃x(x2 = 2), which is equivalent to ∀x¬(x2 = 2). This can be rewritten


as ∀x(x2 ≠ 2).

Q. Show that ¬∀x(P(x) → Q(x)) and ∃x(P(x)∧¬Q(x)) are logically


equivalent.
¬∀x(P(x) → Q(x))≡ ∃x(¬(P (x) → Q(x)))
≡ ∃x(¬(¬P (x) ∨ Q(x)))
≡ ∃x(P (x) ∧ ¬Q(x))
Translating from English into Logical
Expressions
Q. Express the statement “Every student in this class has studied
calculus” using predicates and quantifiers.

Rewrite the statement by introduce a variable x so that we can clearly


identify the appropriate quantifiers to use.
“For every student x in this class, x has studied calculus.”
C(x): x has studied calculus.
∀xC(x), where the domain for x consists of the students in the class
Q. Express the statement “For every person x, if person x is a student in
this class then x has studied calculus.” using predicates and quantifiers

S(x): person x is in this class


C(x): x has studied calculus.
∀x(S(x) → C(x)), where the domain consist of all people.

The above 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
Q. Express the statement “Some student in this class has visited Mexico” using
predicates and quantifiers.

“Some student in this class has visited Mexico”


There exist some student x in this class such that x has visited Mexico
M(x): x has visited Mexico.
∃𝑥𝑀 𝑥 , where domain consist of student in the class.

“There is a person x having the properties that x is a student in this class and x
has visited Mexico.”
S(x): x is a student in this class.
M(x): x has visited Mexico.
∃𝑥(𝑆(𝑥) ∧ 𝑀 𝑥 ), where the domain consist of all people.
Q. “For every student x in this class, x has the property that x has visited Mexico or x has visited
Canada.”
M(x): x has visited Mexico.
C(x): x has visited Canada.
∀𝑥(𝐶(𝑥) ∨ 𝑀 𝑥 ), where domain consist of student in the class.

Q. “For every person x, if x is a student in this class, then x has visited Mexico or x has visited Canada.”
S(x): x is a student in this class.
M(x): x has visited Mexico.
C(x): x has visited Canada.

∀ 𝑥(𝑆(𝑥) → (𝐶(𝑥) ∨ 𝑀 𝑥 ) where the domain consist of all people.

V(x, Mexico): x has visited Mexico.


V(x, Canada): x has visited Canada.

∀ 𝑥(𝑆(𝑥) → (𝑉(𝑥, 𝑀𝑒𝑥𝑖𝑐𝑜) ∨ 𝑉 𝑥, 𝐶𝑎𝑛𝑎𝑑𝑎 )


Q. Use predicates and quantifiers to express the system specifications
“Every mail message larger than one megabyte will be compressed”
• S(m, 1): Mail message m is larger than 1 megabytes, where the variable m has
the domain of all mail messages.
C(m): Mail message m will be compressed.
∀m(S(m, 1) → C(m))
“If a user is active, at least one network link will be available.”
A(u): User u is active.
• S(n, available): Network link n is in available, where n has the domain of all
network links.
∃uA(u) → ∃nS(n, available)
Q. Consider these statements. The first two are called premises and the third is
called the conclusion. The entire set is called an argument.
“All lions are fierce.”
“Some lions do not drink coffee.”
“Some fierce creatures do not drink coffee.”
Assuming that the domain consists of all creatures.
P(x): x is a lion.
Q(x): x is fierce.
R(x): x drinks coffee.
∀x(P(x) → Q(x)).
∃x(P(x) ∧ ¬R(x)).
∃x(Q(x) ∧ ¬R(x)).
Q. Consider these statements, of which the first three are premises and the fourth is
a valid conclusion.
“All hummingbirds are richly colored.”
“No large birds live on honey.”
“Birds that do not live on honey are dull in color.”
“Hummingbirds are small.”
Assuming that the domain consists of all birds.
P(x): x is a hummingbird.
Q(x): x is large.
R(x): x lives on honey.
S(x): x is richly colored.
∀x(P(x) → S(x)). “small” is the same as “not large” and that
¬∃x(Q(x) ∧ R(x)). “dull in color” is the same as “not richly colored.”
∀x(¬R(x)→¬S(x)).
∀x(P(x)→¬Q(x)).
Q. Let P(x) be the statement “x spends more than five hours every weekday in class,” where the
domain for x consists of all students. Express each of these quantifications in English.
a) ∃xP(x) b) ∀xP(x)
c) ∃x ¬P(x) d) ∀x ¬P(x)
a) There is a student who spends more than five hours every weekday in class.
b) Every student spends more than five hours every weekday in class.
c) There is a student who does not spend more than five 5 hours every weekday in class.
¬ ∃x: There does not exist. (No) ≡ ∀x ¬
¬∀x: Not all
d) Every student don’t spends more than five hours every weekday in class. (ambiguous)
d) No student spends more than five hours every weekday in class.

Q. Let N(x) be the statement “x has visited North Dakota,” where the domain consists of the
students in your school. Express each of these quantifications in English.
a) ∃xN(x) b) ∀xN(x) c) ¬∃xN(x)
d) ∃x¬N(x) e) ¬∀xN(x) f ) ∀x¬N(x)
Q. Translate these statements into English, where C(x) is “x is a comedian” and F(x) is
“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))
a) For every person x, If x is a comedian then x is funny. Or Every comedian is funny.
b) For every person x, x is a comedian and x is funny. Or Every person is a funny
comedian.
c) There exists a person such that if she or he is a comedian, then she or he is funny.
d) There exists a person such that she or he is a comedian and she or he is funny. Or
Some comedians are funny.

Q. Translate these statements into English, where R(x) is “x is a rabbit” and H(x) is “x
hops” and the domain consists of all animals.
a) ∀x(R(x) → H(x)) b) ∀x(R(x) ∧ H(x))
c) ∃x(R(x) → H(x)) d) ∃x(R(x) ∧ H(x))
Q. Let P(x) be the statement “x can speak Russian” and let Q(x) be the statement
“x knows the computer language C++.” Express each of these sentences in terms
of P(x), Q(x), quantifiers, and logical connectives. The domain for quantifiers
consists of all students at your school.
a) There is a student at your school who can speak Russian and who knows C++.
∃x(P(x) ∧ Q(x))
b) There is a student at your school who can speak Russian but who doesn’t know
C++.
∃x(P(x) ∧ ¬Q(x))
c) Every student at your school either can speak Russian or knows C++.
∀x(P(x)∨Q(x))
d) No student at your school can speak Russian or knows C++.
∀x¬(P (x)∨Q(x)) or ¬∃x (P (x)∨Q(x))
Q. Let C(x) be the statement “x has a cat,” let D(x) be the statement “x has a
dog,” and let F(x) be the statement “x has a ferret.” Express each of these
statements in terms of C(x), D(x), F(x), quantifiers, and logical connectives. Let
the domain consist of all students in your class.
a) A student in your class has a cat, a dog, and a ferret.
b) All students in your class have a cat, a dog, or a ferret.
c) Some student in your class has a cat and a ferret, but not a dog.
d) No student in your class has a cat, a dog, and a ferret.
e) For each of the three animals, cats, dogs, and ferrets, there is a student in
your class who has this animal as a pet.
Q. Translate in two ways each of these statements into logical expressions using
predicates, quantifiers, and logical connectives. First, let the domain consist of the
students in your class and second, let it consist of all people.

a) Someone in your class can speak Hindi.


H(x): x can speak Hindi
∃xH(x), where domain consist of all students in your class.
C(x): x is in your class.
∃x(C(x)∧H(x)), where domain consist of all people.
b) Everyone in your class is friendly.
c) There is a person in your class who was not born in California.
d) A student in your class has been in a movie.
e) No student in your class has taken a course in logic programming.
Q. Translate each of these statements into logical expression using predicates,
quantifiers, and logical connectives.
a) No one is perfect.
b) Not everyone is perfect.
c) All your friends are perfect.
d) At least one of your friends is perfect.
e) Everyone is your friend and is perfect.
f ) Not everybody is your friend or someone is not perfect.
Let P(x): x is perfect.
F(x): x is your friend; and let the domain be all people.
a) ∀x ¬P(x) b) ¬∀x P(x) c) ∀x(F(x) → P(x))
d) ∃x(F(x) ∧ P(x)) e) ∀x(F(x) ∧ P(x)) or (∀x F(x)) ∧ (∀x P(x))
f) (¬∀x F(x)) ∨ (∃x ¬P(x))
Q. Translate each of these statements into logical expressions using predicates,
quantifiers, and logical connectives.
a) Something is not in the correct place.
C(x): x is in correct place.
∃𝑥(¬𝐶 𝑥 )
b) All tools are in the correct place and are in excellent condition.
E(x): x is in excellent condition.
c) Everything is in the correct place and in excellent condition.
d) Nothing is in the correct place and is in excellent condition.
e) One of your tools is not in the correct place, but it is in excellent condition.
Q. Express each of these statements using quantifiers. Then form the negation of
the statement, so that no negation is to the left of a quantifier. Next, express the
negation in simple English. (Do not simply use the phrase “It is not the case that.”)
a) Some old dogs can learn new tricks.
b) No rabbit knows calculus.
c) Every bird can fly.
d) There is no dog that can talk.
e) There is no one in this class who knows French and Russian.
a) Let T (x) : x can learn new tricks, where domain be old dogs.
Some old dogs can learn new tricks: ∃x T (x)
Negation of ∃x T (x) is ∀x ¬T (x): “No old dogs can learn new tricks.”
b) Let C(x): x knows calculus, where domain be rabbits.
No rabbit knows calculus: ∀x ¬ C(x)
Negation of ∀x ¬ C(x) is ∃x C(x): “There is a rabbit that knows calculus.”
d) There is no dog that can talk. d) There is no dog that can talk.
Negation: There is a dog that can Negation: There is a dog that can talk.
talk.
Let T(x): x can talk. Let T(x): x can talk.
There is no dog that can talk: There is no dog that can talk:
¬ ∃x T(x) ∀x ¬T(x)
Negating: Negating:
¬ (¬ ∃x T(x))≡∃x T(x) ¬(∀x ¬T(x)): ∃x T(x).
There is a dog that can talk. There is a dog that can talk.
Nested Quantifiers
One quantifier is within the scope of another.
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.

∀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.
Translate into English the statement

∀x∀y((x > 0) ∧ (y < 0) → (xy < 0)), where the domain for both
variables consists of all real numbers.
For every real number x and for every real number y, if x > 0 and y < 0,
then xy < 0.
This can be stated more succinctly as “The product of positive real
number and a negative real number is always a negative real number.”
Quantifications of Two Variables.

Statement When True? When False?

∀x∀yP(x, y) P(x, y) is true for every pair x, y. There is a pair x, y for which P(x, y) is
∀y∀xP(x, y) false.
∀x∃yP(x, y) For every x there is a y for which There is an x such that P(x, y) is false for
P(x, y) is true. every y.
∃x∀yP(x, y) There is an x for which P(x, y) is For every x there is a y for which P(x, y)
true for every y. is false.
∃x∃yP(x, y) There is a pair x, y for which P(x, P(x, y) is false for every pair x, y.
∃y∃xP(x, y) y) is true.
The Order of Quantifiers
Q. 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?

∃y∀xQ(x, y): “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. The statement ∃y∀xQ(x, y) is false.
∀x∃yQ(x, y): “For every real number x there is a real number y such that Q(x,
y).”
• Given a real number x, there is a real number y such that x + y = 0; namely,
y = −x. Hence, the statement ∀x∃yQ(x, y) is true.
Q. 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?

• ∀x∀y∃zQ(x, y, z): “For all real numbers x and for all real numbers y there is a
real number z such that x + y = z,” is true.

• The order of the quantification here is important

• ∃z∀x∀yQ(x, y, z): “There is a real number z such that for all real numbers x
and for all real numbers y such that x + y = z,” is false.
Translating Mathematical Statements into
Statements Involving Nested Quantifiers
Q. Translate the statement “The sum of two positive integers is always
positive” into a logical expression.
• “For all positive integers x and y, x + y is positive.”
∀x∀y((x > 0) ∧ (y > 0) → (x +y > 0)), where the domain for both
variables consists of all integers.
∀x∀y(x +y > 0), where the domain for both variables consists of all
positive integers
Q. Translate the statement “Every real number except zero has a multiplicative
inverse.” (A multiplicative inverse of a real number x is a real number y such that
xy = 1.)

• “For every real number x, if x ≠ 0, then there exists a real number y such that
xy = 1.”
• ∀x((x ≠ 0) → ∃y(xy = 1)).
Translating from Nested Quantifiers into English
Q. Translate the statement ∀x(C(x) ∨ ∃y(C(y) ∧ F(x, y))) into English, where
C(x): “x has a computer,”
F(x, y): “x and y are friends,”
and the domain for both x and y consists of all students in your school.

• 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.
• Q. 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.

There is a student x such that for all students y and all students z, if x and y
are friends and x and z are friends and y not equal z, then y and z are not
friends.
Translating English Sentences into Logical
Expressions
Q. 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.

“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.”
• F(x): “x is female,”
• P(x): “x is a parent,” and
• M(x, y): “x is the mother of y.”
∀x((F (x) ∧ P(x)) → ∃yM(x, y)).
∀x∃y((F (x) ∧ P(x)) → M(x, y)).
Q. 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.

• “For every person x, person x has exactly one best friend.”

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.
• B(x, y): “y is the best friend of x,”
∃y(B(x, y) ∧ ∀z((z ≠ y)→¬B(x, z))).
∀x∃y(B(x, y) ∧ ∀z((z ≠ y)→¬B(x, z))).
∀x∃!yB(x, y),
Negating Nested Quantifiers
Q. Express the negation of the statement ∀x∃y(xy = 1) so that no
negation precedes a quantifier.

¬∀x∃y(xy = 1) ≡ ∃x¬∃y(xy = 1)
≡ ∃x∀y¬(xy = 1).
≡ ∃x∀y(xy ≠ 1).
Q. Let W(x, y) mean that student x has visited website y, where the domain for
x consists of all students in your school and the domain for y consists of all
websites. Express each of these statements by a simple English sentence.

• a) W(Sarah Smith, www.att.com)


• b) ∃xW(x, www.imdb.org)
• c) ∃yW(José Orez, y)
• d) ∃y(W(Ashok Puri, y) ∧W(CindyYoon, y))
• e) ∃y∀z(y = (David Belcher) ∧ (W(David Belcher, z)→ W(y,z)))
• f ) ∃x∃y∀z((x = y) ∧ (W(x, z) ↔ W(y, z)))
a) W(Sarah Smith, www.att.com): Sarah Smith has visited the website www.att.com.

b) ∃xW(x, www.imdb.org): There is a student in your school that has visited the website
www.imbd.org.

c) ∃yW(Roy, y): Roy has visited a website/some website y.

d) ∃y(W(Ashok, y) ∧W(Cindy, y)): There is a website that Ashok and Cindy have both visited.

e) ∃y∀z(y ≠ (David) ∧ (W(David , z)→ W(y, z))):


There is a student y in your school, besides David such that for every website z, If David has
visited z then y has also visited z.
There is a student in your school, beside David, that has visited all websites that David visited.

f ) ∃x∃y∀z((x ≠ y) ∧ (W(x, z) ↔ W(y, z))):


There exist a student x and y such that x not equal to y and for every website z, x has visited z
iff y visited z.
There are two different students in your class that have visited the same websites.
Q. Let T (x, y) mean that student x likes cuisine y, where the domain for
x consists of all students at your school and the domain for y consists of
all cuisines. Express each of these statements by a simple English
sentence.
a) ¬T (Abdallah Hussein, Japanese)
b) ∃xT (x, Korean) ∧ ∀xT (x, Mexican)
c) ∃y(T (Monique Arsenault, y) ∨T (Jay Johnson, y))
d) ∀x∀z∃y((x = z)→¬(T (x, y) ∧ T (z, y)))
e) ∃x∃z∀y(T (x, y) ↔ T (z,y))
f ) ∀x∀z∃y(T (x, y) ↔ T (z,y))
Q. Let L(x, y) be the statement “x loves y,” where the domain for both x and y
consists of all people in the world. Use quantifiers to express each of these
statements.
• a) Everybody loves Jerry. ∀xL(x, Jerry)
• b) Everybody loves somebody. ∀x∃yL(x,y)
• c) There is somebody whom everybody loves. ∃y ∀x L(x,y)
• d) Nobody loves everybody. ¬ ∃x∀yL(x,y) OR ∀x∃y ¬ L(x,y)
• e) There is somebody whom Lydia does not love. ∃x ¬ L(Lydia, x)
• f ) There is somebody whom no one loves. ∃x∀y¬ L(x,y)
• g) There is exactly one person whom everybody loves.
∃x(∀yL(y,x) ∧ ∀z((∀wL(w,z)) → z=x))
• h) There are exactly two people whom Lynn loves.
∃x ∃y(x≠ 𝑦 ∧L(Lynn,x) ∧L(Lynn,y) ∧ ∀z(L(Lynn,z)→(z=x ∨z=y)))
• i) Everyone loves himself or herself. ∀x L(x,x)
• j) There is someone who loves no one besides himself or herself.
∃x ∃y(L(x,y)↔ x = y)
Q. Let F(x, y) be the statement “x can fool y,” where the domain consists of all
people in the world. Use quantifiers to express each of these statements.
a) Everybody can fool Fred.
b) Evelyn can fool everybody.
c) Everybody can fool somebody.
d) There is no one who can fool everybody.
e) Everyone can be fooled by somebody.
f ) No one can fool both Fred and Jerry.
g) Nancy can fool exactly two people.
h) There is exactly one personwhomeverybody can fool.
i) No one can fool himself or herself.
j) There is someone who can fool exactly one person besides himself or herself.
F(x, y) be the statement “x can fool y,”
a) Everybody can fool Fred. ∀x F(x, Fred)
b) Evelyn can fool everybody. ∀x F(Evelyn, x)
c) Everybody can fool somebody. ∀x ∃y F(x, y)
d) There is no one who can fool everybody. ¬∃𝑥∀y F(x, y)
e) Everyone can be fooled by somebody. ∀x ∃y F(y, x)
f ) No one can fool both Fred and Jerry. ¬∃𝑥 (F(x, Fred)∧ F(x,𝐽𝑒𝑟𝑟𝑦))
g) Nancy can fool exactly two people.
∃𝑥∃𝑦∀𝑧(𝐹 𝑁𝑎𝑛𝑐𝑦, 𝑥 ∧ 𝑦 ∧ 𝑥 ≠ 𝑦 ∧ 𝐹 𝑁𝑎𝑛𝑐𝑦, 𝑧 → ( 𝑧 = 𝑥 ∨ 𝑧 = 𝑦 ) )
h) There is exactly one person whom everybody can fool.
∀x ∃!y F(x, y)
∃𝑥∀𝑦 (𝐹(𝑦, 𝑥) ∧ ∀𝑧(∀𝑤𝐹(𝑤, 𝑧) → 𝑧 = 𝑦)
i) No one can fool himself or herself. ¬∃𝑥 (F(x,x))
j) There is someone who can fool exactly one person besides himself or herself.
∃𝑥∃𝑦(𝐹(𝑥, 𝑦) ∧ 𝐹(𝑥, 𝑥) ∧ ∀𝑧(F(x, z) → (z = y) ∨ (𝑧 = 𝑥))
Q. Express each of these system specifications using predicates,
quantifiers, and logical connectives, if necessary.
a) Every user has access to exactly one mailbox.
b) There is a process that continues to run during all error conditions
only if the kernel is working correctly.
c) All users on the campus network can access all websites whose url
has a .edu extension.
d) There are exactly two systems that monitor every remote server.
Q. Translate each of these nested quantifications into an English statement
that expresses a mathematical fact. The domain in each case consists of all real
numbers.
a) ∃x∀y(xy = y)
b) ∀x∀y(((x < 0) ∧ (y < 0)) → (xy > 0))
c) ∃x∃y((x2 > y) ∧ (x < y))
d) ∀x∀y∃z(x + y = z)
Q. Let Q(x, y) be the statement “x + y = x − y.” If the domain for both
variables consists of all integers, what are the truth values?

• a) Q(1, 1) b) Q(2, 0)
• c) ∀yQ(1, y) d) ∃xQ(x, 2)
• e) ∃x∃yQ(x, y) f ) ∀x∃yQ(x, y)
• g) ∃y∀xQ(x, y) h) ∀y∃xQ(x, y)
• i) ∀x∀yQ(x, y)
Q. Express the negations of each of these statements so that all negation symbols
immediately precede predicates.
a) ∀x∃y∀zT (x, y, z)
b) ∀x∃yP(x, y) ∨ ∀x∃yQ(x, y)
c) ∀x∃y(P(x, y) ∧ ∃zR(x, y, z))
d) ∀x∃y(P(x, y) → Q(x, y))

Q. Express the negations of these propositions using quantifiers, and in English.


a) Every student in this class likes mathematics.
b) There is a student in this class who has never seen a computer.
c) There is a student in this class who has taken every mathematics course offered
at this school.
d) There is a student in this class who has been in at least one room of every
building on campus.
Q. Find a counterexample, if possible, to these universally quantified
statements, where the domain for all variables consists of all integers.
a) ∀x∀y(x2 = y2 → x = y)
b) ∀x∃y(y2 = x)
c) ∀x∀y(xy ≥ x)

Q. Determine the truth value of the statement ∀x∃y(xy = 1) if the


domain for the variables consists of
• a) the nonzero real numbers.
• b) the nonzero integers.
• c) the positive real numbers.
Rules of Inference
An argument in propositional logic is a sequence of propositions. All
but the final proposition in the argument are called premises and the
final proposition is called the conclusion. An argument is valid if the
truth of all its premises implies that the conclusion is true.

Fallacies: Some common forms of incorrect reasoning, which lead to


invalid arguments.
Rule of Inference Tautology Name
p (p ∧ (p → q)) → q Modus ponens
p→q ∴q
¬q (¬q ∧ (p → q))→¬p Modus tollens
p→q ∴ ¬p

p→q ((p → q) ∧ (q → r)) → (p → r) Hypothetical syllogism


q→r ∴p→r
p∨q ((p ∨ q)∧¬p) → q Disjunctive syllogism
¬p ∴q
p p → (p ∨ q) Addition
∴p∨q
p∧q (p ∧ q) → p Simplification
∴p
p ((p) ∧ (q)) → (p ∧ q) Conjunction
Q ∴p∧q
p∨q ((p ∨ q) ∧ (¬p ∨ r)) → (q ∨ r) Resolution
¬p ∨ r ∴q∨r
Q. State which rule of inference is the basis of the following argument:
“It is below freezing now. Therefore, it is either below freezing or
raining now.”
Let,
p: It is below freezing now.
q: It is raining now.
Then, the argument has the form
p
∴p∨q
This is an argument that uses the addition rule.
Q. State which rule of inference is the basis of the following argument:
“It is below freezing and raining now. Therefore, it is below freezing
now.”
Let,
p: It is below freezing now.
q: It is raining now.
Then, the argument has the form
p∧q
∴p
This argument uses the simplification rule.
Q. State which rule of inference is used in the argument:

• If it rains today, then we will not have a barbecue today.


• If we do not have a barbecue today, then we will have a barbecue tomorrow.
• Therefore, if it rains today, then we will have a barbecue tomorrow.
Let,
p: It rains today.
q: We will have a barbecue today
r: We will have a barbecue tomorrow
Then, the argument has the form
p → ¬q
¬q →r
∴ p →r
Hence, this argument is a hypothetical syllogism.
Using Rules of Inference to Build Arguments
Q. Show that the premises “It is not sunny this afternoon and it is colder than yesterday,” “We will go swimming only if it is sunny,” “If we do
not go swimming, then we will take a canoe trip,” and “If we take a canoe trip, then we will be home by sunset” lead to the conclusion “We
will be home by sunset.”
Let
p: It is sunny this afternoon; q: It is colder than yesterday; r: We will go swimming;
s: We will take a canoe trip; t: We will be home by sunset.
The premises are:
¬p ∧ q: It is not sunny this afternoon and it is colder than yesterday. r → p: We will go swimming only if it is sunny.
¬r → s: If we do not go swimming, then we will take a canoe trip. s → t: If we take a canoe trip, then we will be home by sunset.
Conclusion: t: We will be home by sunset
We construct an argument to show that our premises lead to the desired conclusion as follows.
Step Reason
1. ¬p ∧ q Premise
2. ¬p Simplification using (1)
3. r → p Premise
4. ¬r Modus tollens using (2) and (3)
5. ¬r → s Premise
6. s Modus ponens using (4) and (5)
7. s → t Premise
8. T Modus ponens using (6) and (7)
Q. Show that the premises “If you send me an e-mail message, then I will finish
writing the program,” “If you do not send me an e-mail message, then I will go to
sleep early,” and “If I go to sleep early, then I will wake up feeling refreshed” lead
to the conclusion “If I do not finish writing the program, then I will wake up
feeling refreshed.”

Q. Use resolution to show that the hypotheses “Jasmine is skiing or it is not


snowing” and “It is snowing or Bart is playing hockey” imply that “Jasmine is
skiing or Bart is playing hockey.”

Q. Show that the premises (p ∧ q) ∨ r and r → s imply the conclusion p ∨ s.


Q5. Show that the premises “If you send me an e-mail message, then I will finish
writing the program,” “If you do not send me an e-mail message, then I will go to
sleep early,” and “If I go to sleep early, then I will wake up feeling refreshed” lead
to the conclusion “If I do not finish writing the program, then I will wake up
feeling refreshed.”
p: You send me an e-mail message.
q: I will finish writing the program.
r: I will go to sleep early.
s: I will wake up feeling refreshed. Sl. No. Steps Reason
1 p -> q Premise
The premises are:
2 ¬p -> r Premise
p -> q 3 r -> s Premise
¬p -> r 4 ¬p -> s H.S (2) (3)
r -> s 5 ¬q -> ¬p C.P. (1)
6 ¬q -> s H.S (4) (5)
∴ ¬q -> s
Q6. Show that the hypotheses “Jasmine is skiing or it is not snowing” and “It is
snowing or Bart is playing hockey” imply that “Jasmine is skiing or Bart is playing
hockey.”
p: Jasmine is skiing.
q: It is snowing.
r: Bart is playing hockey.
The premises are:
Sl. No. Steps Reason
p V ¬q
1 p V ¬q Premise
qVr 2 qVr Premise
∴pVr 3 pVr Resolution (1) (2)
Q7. Show that the premises (p ∧ q) ∨ r and r → s imply the conclusion p ∨ s.

Sl.No. Steps Reason


1 (p ∧ q) ∨ r Premise
2 r→s Premise
3 ¬r V s r -> s ≡ ¬𝑟 𝑉 𝑠
4 (p V r) ^ (q V r) Distribution (1)
5 (p V r) Simplification (4)
6 p∨s Resolution (3) (5)
Q. Show that the premises (p ∧ q) ∨ r and r → s imply the conclusion p ∨ s.
Q. Is the following argument valid?
If you do every problem in this book, then you will learn discrete mathematics.
You learned discrete mathematics. Therefore, you did every problem in this
book.
p: You did every problem in this book.
q: You learned discrete mathematics.
Then this argument is of the form: if p → q and q, then p.
p→q
q
∴p
The proposition ((p → q)∧q)→p is not a tautology, ((p → q)∧q)→p is F when p is
F.
This type of incorrect reasoning is called the fallacy of affirming the conclusion.
Rules of Inference for Quantified Statements
Rule of Inference Name
∀xP(x) Universal instantiation
∴ P(c)
P(c) for an arbitrary c Universal generalization
∴ ∀xP(x)
∃xP(x) Existential instantiation
∴ P(c) for some element c
P(c) for some element c Existential generalization
∴ ∃xP(x)

Universal instantiation is the rule of inference used to conclude that P(c) is true, where c is a particular
member of the domain, given the premise ∀xP(x).
Eg: “All women are wise”. “Lisa is wise,” where Lisa is a member of the domain of all women.
Universal generalization is the rule of inference that states that ∀xP(x) is true, given the premise that P(c) is true for all
elements c in the domain.
Q1. Is the following argument valid?
If you do every problem in this book, then you will learn discrete mathematics.
You learned discrete mathematics. Therefore, you did every problem in this
book.

Let,
p: you do every problem in this book.
q: you will learn discrete mathematics.
The argument
p -> q
q
∴p
It is neither MT nor MP. The argument is invalid.
Q. Every student at your school either can speak Russian or knows C++.
∀x(P(x)∨Q(x))
∀x(P(x) ⊕ Q(x))
https://math.stackexchange.com/questions/3598348/problem-from-kenneth-rosens-
discrete-mathematics-and-its-applications-section

You go to one of your friend’s house and you are asked: “Tea or Coffee”. Here this or is an
exclusive or.

Q. For each of these sentences, determine whether an inclusive or, or an exclusive or, is
intended.
a) Experience with C++ or Java is required. "Inclusive or"
b) Lunch includes soup or salad. “Exclusive or”
c) To enter the country you need a passport or a voter registration card. "Inclusive or"
d) Publish or perish. “Exclusive or”
Distribution of Quantifiers
over Conjunction and Disjunction
a. ∀x[P(x) ∧ Q(x)] ≡ (∀xP(x) ∧ ∀xQ(x))
b. ∀x[P(x) ∨ Q(x)] ≢ (∀xP(x) ∨ ∀xQ(x))
c. ∃x[P(x) ∧ Q(x)] ≢ (∃xP(x) ∧ ∃xQ(x))
d. ∃x[P(x) ∨ Q(x)] ≡ (∃xP(x) ∨ ∃xQ(x))

Counter eg. For b and c


Let P(x) = x is even
Let Q(x) = x is odd
Domain: All integers.
∀x[P(x) ∨ Q(x)] is T but (∀xP(x) ∨ ∀xQ(x)) is F
∃x[P(x) ∧ Q(x)] is F but (∃xP(x) ∧ ∃xQ(x)) is T
Q1. Let Q(x, y) be the statement “x + y = x − y.” If the domain for both
variables consists of all integers, what are the truth values?

a) Q(1, 1) b) Q(2, 0)
c) ∀yQ(1, y) d) ∃xQ(x, 2)
e) ∃x∃yQ(x, y) f ) ∀x∃yQ(x, y)
g) ∃y∀xQ(x, y) h) ∀y∃xQ(x, y)
i) ∀x∀yQ(x, y)
Q. Express the negations of each of these statements so that all negation
symbols immediately precede predicates.
a) ∀x∃y∀zT (x, y, z) ∃x ∀y ∃z ¬T (x, y, z)
b) ∀x∃yP(x, y) ∨ ∀x∃yQ(x, y) ∃x ∀y ¬P(x, y) ∧ ∃x ∀y ¬Q(x, y)
c) ∀x∃y(P(x, y) ∧ ∃zR(x, y, z)) ∃x ∀y (¬P(x, y) ∨ ∀z ¬R(x, y, z))
d) ∀x∃y(P(x, y) → Q(x, y)) ∃x∀y(P(x, y)∧¬Q(x, y))

Q2. Express the negations of these propositions using quantifiers, and in


English.
a) Every student in this class likes mathematics.
b) There is a student in this class who has never seen a computer.
c) There is a student in this class who has taken every mathematics course
offered at this school.
c. There is a student in this class who has taken every mathematics course offered at this school
M(x,y): x has taken mathematics course y,
Where, domain x: every student in this class
domain y: every mathematics course offered at this school
∃x∀yM(x, y)
Negating we get: ∀x ∃y ¬ M(x, y)
Q3. Find a counterexample, if possible, to these universally quantified statements, where the
domain for all variables consists of all integers.
a) ∀x∀y(x2 = y2 → x = y)
b) ∀x∃y(y2 = x)
c) ∀x∀y(xy ≥ x)

Q4. Determine the truth value of the statement ∀x∃y(xy = 1) if the domain for the variables consists
of
a) the nonzero real numbers.
b) the nonzero integers.
c) the positive real numbers.
Q. “If you have a current password, then you can log onto the network.”
“You have a current password.”
Therefore,
“You can log onto the network.”
Determine whether this is a valid argument.
Let, p: You have a current password.
q: You can log onto the network.
Then, the argument has the form
p→q
p
∴q
We know that when p and q are propositional variables, the statement ((p → q) ∧
p) → q is a tautology (Modus ponens)
Hence, the conclusion is valid.
Q. Show that the premises “It is not sunny this afternoon and it is colder than yesterday,” “We will go swimming only if it is sunny,” “If
we do not go swimming, then we will take a canoe trip,” and “If we take a canoe trip, then we will be home by sunset” lead to the
conclusion “We will be home by sunset.”
Let, p: It is sunny this afternoon; q: It is colder than yesterday; r: We will go swimming;
s: We will take a canoe trip; t: We will be home by sunset.
The premises are:
¬p ∧ q: It is not sunny this afternoon and it is colder than yesterday. r → p: We will go swimming only if it is sunny.
¬r → s: If we do not go swimming, then we will take a canoe trip. s → t: If we take a canoe trip, then we will be
home by sunset.
Conclusion: t: We will be home by sunset
We construct an argument to show that our premises lead to the desired conclusion as follows.
Step Reason
1. ¬p ∧ q Premise
2. ¬p Simplification using (1)
3. r → p Premise
4. ¬r Modus tollens using (2) and (3)
5. ¬r → s Premise
6. s Modus ponens using (4) and (5)
7. s → t Premise
8. t Modus ponens using (6) and (7)
Q5. Show that the premises “If you send me an e-mail message, then I will finish
writing the program,” “If you do not send me an e-mail message, then I will go to
sleep early,” and “If I go to sleep early, then I will wake up feeling refreshed” lead
to the conclusion “If I do not finish writing the program, then I will wake up
feeling refreshed.”

Q6. Show that the hypotheses “Jasmine is skiing or it is not snowing” and “It is
snowing or Bart is playing hockey” imply that “Jasmine is skiing or Bart is playing
hockey.”

Q7. Show that the premises (p ∧ q) ∨ r and r → s imply the conclusion p ∨ s.


Q. Show that the premises (p ∧ q) ∨ r and r → s imply the conclusion p ∨ s.

Sl. No. Step Rule


1 (p ∧ q) ∨ r Premise
2 r→s Premise
3 (p∨r) ∧ (q∨r) Distribution (1)
4 (p∨r) Simplifcation (3)
5 ¬r∨s r → s ≡¬r∨s (2)
6 r∨p Commutative (4)
7 p∨s Resolution (5) and (6)
Q. Is the following argument valid?
If you do every problem in this book, then you will learn discrete mathematics.
You learned discrete mathematics. Therefore, you did every problem in this
book.
p: You did every problem in this book.
q: You learned discrete mathematics.
Then this argument is of the form: if p → q and q, then p.
p→q
q
∴p
The proposition ((p → q)∧q)→p is not a tautology, ((p → q)∧q)→p is F when p is
F.
This type of incorrect reasoning is called the fallacy of affirming the conclusion.
Q2. Use rules of inference to show that the hypotheses “Randy works hard,” “If
Randy works hard, then he is a dull boy,” and “If Randy is a dull boy, then he will
not get the job” imply the conclusion “Randy will not get the job.”
p: Randy works hard.
Sl. No. Steps Reason
q: Randy is a dull boy.
1 p Premise
r: Randy will get the job. 2 p ->q Premise
Premises: 3 q M.P (1) (2)
Randy works hard: p. 4 q -> ¬r Premise
5 ¬r M.P. (3) (4)
If Randy works hard, then he is a dull boy: p ->q
If Randy is a dull boy, then he will not get the job: q -> ¬r
Conclusion:
Randy will not get the job : ¬r
Q3. What rules of inference are used in this famous argument?
“All men are mortal. Socrates is a man. Therefore, Socrates is mortal.”
P(x): x is a man
Q(x): x is mortal

The premises
All men are mortal: ∀x (P(x)→Q(x))
Socrates is a man: Q(Socrates)
Sl. No. Steps Reason
Conclusions:
1 ∀x (P(x)→Q(x)) Premise
Socrates is mortal: P(Socrates) 2 ∀x (P(Socrates)→Q(Socrates)) U.I. (1)
3 Q(Socrates) Premise
4 P(Socrates) M.P. (2) (3)
Q4. Use rules of inference to show that the hypotheses “If it does not rain or if it is not foggy, then the
sailing race will be held and the lifesaving demonstration will go on,” “If the sailing race is held, then
the trophy will be awarded,” and “The trophy was not awarded” imply the conclusion “It rained.”
p: It rains. q: It is foggy. r: The sailing race will be held.
s: The lifesaving demonstration will go on. t: The trophy will be awarded.
The premise are: Sl. No. Steps Reason
If it does not rain or if it is not foggy, then 1 (¬p v ¬q) -> (r ^ s) Premise
the sailing race will be held and the lifesaving 2 r -> t Premise

demonstration will go on: (¬p v ¬q) -> (r^s) 3 ¬t Premise


4 ¬r M.T. (2) (3)
If the sailing race is held, then the trophy
5 ¬(r ^ s) -> ¬ (¬p v ¬q) C.P. (1)
will be awarded: r -> t
6 ¬(r ^ s) -> (p ^ q) De Morgan’s law (5)
The trophy was not awarded: ¬t 7 ¬r v ¬s Addition (4)
Conclusion: It rained: p 8 ¬(r ^ s) De Morgan’s law (7)
9 (p ^ q) M.P. (6) (8)
10 p Simplification (9)
OR.
p: It rains. q: It is foggy. r: The sailing race will be held.
s: The lifesaving demonstration will go on. t: The trophy will be awarded.
The premise are:
Sl. No. Steps Reason
If it does not rain or if it is not foggy, then 1 (¬p v ¬q) -> (r ^ s) Premise
the sailing race will be held and the lifesaving 2 r -> t Premise
demonstration will go on: (¬p v ¬q) -> (r^s) 3 ¬t Premise
4 ¬r M.T. (2) (3)
If the sailing race is held, then the trophy
5 ¬(p ^ q) -> (r ^ s) De Morgan’s law
will be awarded: r -> t
6 (p ^ q) V (r ^ s) Implication
The trophy was not awarded: ¬t 7 pVr Simplification
Conclusion: It rained: p 8 p D.S. (4)(7)
Q5. What rule of inference is used in each of these arguments?
a) Alice is a mathematics major. Therefore, Alice is either a mathematics major or a
computer science major.
Addition
b) Jerry is a mathematics major and a computer science major. Therefore, Jerry is a
mathematics major.
Simplification
c) If it is rainy, then the pool will be closed. It is rainy. Therefore, the pool is closed.
Modus Ponens
d) If it snows today, the university will close. The university is not closed today.
Therefore, it did not snow today.
Modus Tollens
e) If I go swimming, then I will stay in the sun too long. If I stay in the sun too long,
then I will sunburn. Therefore, if I go swimming, then I will sunburn.
Hypothetical Syllogism
Q6. Use rules of inference to show that if ∀x(P(x) → (Q(x) ∧ S(x))) and
∀x(P(x) ∧ R(x)) are true, then ∀x(R(x) ∧ S(x)) is true.

Sl. No. Steps Reason


1 ∀x(P(x) → (Q(x) ∧ S(x))) Premise
2 (P(c) → (Q(c) ∧ S(c)) U.I (1)
3 ∀x(P(x) ∧ R(x)) Premise
4 P(c) ∧ R(c) U.I (3)
5 P(c) Simplification (4)
6 Q(c) ∧ S(c) M.P. (2) (5)
7 S(c) Simplification (6)
8 R(c) Simplification (4)
9 R(c) ^ S(c) Conjuction (7) (8)
10 ∀x(R(x) ∧ S(x)) U.G. (9)
Q7. Use rules of inference to show that if ∀x(P(x) ∨ Q(x)) and ∀x((¬P(x)
∧ Q(x)) → R(x)) are true, then ∀x(¬R(x) → P(x)) is also true.

Sl. No. Steps Reason


1 ∀x(P(x) ∨ Q(x)) Premise
2 P(c) ∨ Q(c) U.I. (1)
3 ∀x((¬P(x) ∧ Q(x)) → R(x)) Premise
4 (¬P(c) ∧ Q(c)) → R(c) U.I. (3)
5 P(c) V ¬Q(c) V R(c) p -> q ≡ ¬p V q
6 P(c) V R(c) Resolution (2) (5)
7 R(c) V P(c) Commutative (6)
8 ¬(¬R(c)) V P(c) Double negation (7)
9 ¬R(c) → P(c) p -> q ≡ ¬p V q
10 ∀x(¬R(x) → P(x)) U.G. (9)
Q8. For each of these sets of premises, what relevant conclusion or conclusions can be
drawn? Explain the rules of inference used to obtain each conclusion from the premises.
a ) “I am either dreaming or hallucinating.” “I am not dreaming.” “If I am hallucinating, I
see elephants running down the road.”
b) “If I play hockey, then I am sore the next day.” “I use the whirlpool if I am sore.” “I did
not use the whirlpool.”
c) “All insects have six legs.” “Dragonflies are insects.” “Spiders do not have six legs.”
“Spiders eat dragonflies.”
d) “Every student has an Internet account.” “Homer does not have an Internet account.”
“Maggie has an Internet account.”
e) “All foods that are healthy to eat do not taste good.” “Tofu is healthy to eat.” “You
only eat what tastes good.” “You do not eat tofu.” “Cheeseburgers are not healthy to
eat.”
f) “I am either clever or lucky.” “I am not lucky.” “If I am lucky, then I will win the
lottery.”
b) “If I play hockey, then I am sore the next day.” “I use the whirlpool if I am
sore.” “I did not use the whirlpool.”
p: I play hockey.
q: I am sore the next day.
r: I use the whirlpool.
The premise:
If I play hockey, then I am sore the next day: p -> q
I use the whirlpool if I am sore: q -> r
Sl. No. Steps Reason
I did not use the whirlpool: ¬r 1 p -> q Premise
2 q -> r Premise
3 p -> r H.S (1) (2)
Conclusion(s): 4 ¬r Premise
1. I didn’t play hockey. 5 ¬p M.T. (3) (4)
6 ¬q M.T. (2) (4)
2. I didn’t sore the next day.
c) “All insects have six legs.” “Dragonflies are insects.” “Spiders do not have six legs.” “Spiders
eat dragonflies.”
P(x): x is an insect.
Q(x): x have six legs. Sl.No. Steps Reason
1 ∀x(P(x) -> Q(x)) Premise
R(x, y): x eat y.
2 P(Dragonflies) -> Q(Dragonflies) U.I (1)
The Premises: 3 P(Dragonflies) Premise
All insects have six legs: 4 Q(Dragonflies) M.P. (2) (3)
∀x(P(x) -> Q(x)) 5 ¬Q(Spiders) Premise
6 P(Spiders) -> Q(Spiders) U.I. (1)
Dragonflies are insects:
7 ¬P(Spiders) M.T. (5) (6)
P(Dragonflies)
Spiders do not have six legs: Conclusion(s)
¬Q(Spiders) 1. Dragonflies have six legs
Spiders eat dragonflies: 2. Spiders is not an insect
R(Spiders, Dragonflies)
d) “Every student has an Internet account.” “Homer does not have an Internet account.”
“Maggie has an Internet account.”
P(x): x is a student.
Q(x): x has an Internet account.
The Premises:
Every student has an Internet account: ∀x(P(x) -> Q(x))
Homer does not have an Internet account: ¬Q(Homer)
Maggie has an Internet account: Q(Maggie)
Conclusion(s): Homer is not a student

Sl.No. Steps Reason


1 ∀x(P(x) -> Q(x)) Premise
2 P(Homer) -> Q(Homer) U.I (1)
3 ¬Q(Homer) Premise
4 ¬P(Homer) M.T. (2) (3)
e) “All foods that are healthy to eat do not taste good.” “Tofu is healthy to eat.”
“You only eat what tastes good.” “You do not eat tofu.” “Cheeseburgers are not
healthy to eat.”
P(x): x is healthy to eat.
Q(x): x taste good.
R(x): You eat x.
All foods that are healthy to eat do not taste good: ∀x(P(x) -> ¬Q(x))
Tofu is healthy to eat: P(Tofu)
You only eat what tastes good: ∀x(R(x) -> Q(x))
Sl. No. Steps Reason
You do not eat tofu: ¬R(Tofu)
1 ∀x(P(x) -> ¬Q(x)) Premise
Cheeseburgers are not healthy to eat: ¬ P(Cheeseburgers)
2 P(Tofu) Premise
3 P(Tofu) -> ¬Q(Tofu) U.I (1)
Conclusion(s): 4 ¬Q(Tofu) M.P (2) (3)

Tofu does not taste good

You might also like