Unit 2 Mathematical Logic
Unit 2 Mathematical Logic
1.2 Examples
The following are examples of propositions because they are declarative sen-
tences with a definite truth value:
1. 2 + 2 = 4
Explanation: This is a proposition with truth value ‘True (1)’.
2. The sky is blue.
Explanation: This is a declarative sentence that is true under normal
daylight conditions.
3. 5 > 10
Explanation: This is a proposition with truth value ‘False (0)’.
4. All birds can fly.
Explanation: This is a proposition with truth value ‘False (0)’.
The following are not propositions because they do not have a definite
truth value:
1. What time is it?
Explanation: This is a question, not a declarative sentence.
2. x + 1 = 5
Explanation: This is not a proposition because it contains a variable x,
and its truth value depends on the value of x.
3. Let’s go to the park!
Explanation: This is an imperative sentence, not a declarative sentence.
4. This statement is false.
Explanation: This is a paradox and cannot be classified as true or false.
Propositions are denoted by letters such as p, q, r.
1
1.3 Logical connectives 1 PROPOSITIONAL LOGIC: BASICS
1.4.1 Problems
1. Identify whether the following sentences are propositions. If they are,
determine their truth value.
(a) 12 + 3 = 4
(b) x − 27 = 13
(c) 13 × 5 = 65
(d) How beautiful the sunset is!
(e) This statement is false.
2. Construct the truth table for the following compound propositions and
determine whether they are tautologies, contradictions, or contingencies:
(a) p ∨ ¬p
Solution:
p ¬p p ∨ ¬p
0 1 1
1 0 1
∴ p ∨ ¬p is a tautology.
(b) ¬p ∨ q
Solution:
p q ¬p ¬p ∨ q
0 0 1 1
0 1 1 1
1 0 0 0
1 1 0 1
∴ ¬p ∨ q is a contingency.
(c) (p → q) ↔ (¬q → ¬p)
Solution:
p q p→q ¬q ¬p ¬q → ¬p (p → q) ↔ (¬q → ¬p)
0 0 1 1 1 1 1
0 1 1 0 1 1 1
1 0 0 1 0 0 1
1 1 1 0 0 1 1
∴ (p → q) ↔ (¬q → ¬p) is a tautology.
(d) p ∧ (q ∨ ¬r)
Solution:
p q r ¬r q ∨ ¬r p ∧ (q ∨ ¬r)
0 0 0 1 1 0
0 0 1 0 0 0
0 1 0 1 1 0
0 1 1 0 1 0
1 0 0 1 1 1
1 0 1 0 0 0
1 1 0 1 1 1
1 1 1 0 1 1
∴ p ∧ (q ∨ ¬r) is a contingency.
3. Exercise:
(a) Show that p ∧ ¬p is a contradiction.
(b) Check if (p → q) ∧ (q → r) → (p → r) is a tautology, contradiction,
or contingency.
2 Logical Equivalence
Two propositions p and q are logically equivalent (p ⇐⇒ q) if they
have the same truth values in all cases. Examples:
p → q ⇐⇒ ¬p ∨ q
p ↔ q ⇐⇒ (p → q) ∧ (q → p)
2.0.1 Problems
p q r p∨q∨r ¬(p ∨ q ∨ r) ¬p ¬q ¬r ¬p ∧ ¬q ∧ ¬r
0 0 0 0 1 1 1 1 1
0 0 1 1 0 1 1 0 0
0 1 0 1 0 1 0 1 0
0 1 1 1 0 1 0 0 0
1 0 0 1 0 0 1 1 0
1 0 1 1 0 0 1 0 0
1 1 0 1 0 0 0 1 0
1 1 1 1 0 0 0 0 0
Since the columns for ¬(p ∨ q ∨ r) and ¬p ∧ ¬q ∧ ¬r are identical, the
two expressions are logically equivalent.
2.1 Exercise
(a) Determine whether ¬(p ∧ q) is logically equivalent to ¬p ∨ ¬q (De
Morgan’s Law) using truth table.
• Distributive law: p ∧ (q ∨ r) ⇐⇒ (p ∧ q) ∨ (p ∧ r)
Dual Distributive law: p ∨ (q ∧ r) ⇐⇒ (p ∨ q) ∧ (p ∨ r)
• Original Identity: p ∧ 1 ⇐⇒ p
Dual Identity: p ∨ 0 ⇐⇒ p
3 Laws of Logic
The laws of logic are fundamental rules that help simplify and manipulate
logical expressions. These laws are used to prove logical equivalence and
to transform complex logical statements into simpler forms.
Solution:
p → q ⇐⇒ ¬p ∨ q (Conditional)
⇐⇒ q ∨ ¬p (Commutative Law)
⇐⇒ ¬(¬q) ∨ ¬p (Double Negation)
⇐⇒ ¬q → ¬p (Conditional)
Thus, p → q ⇐⇒ ¬q → ¬p.
Solution:
p ↔ q ⇐⇒ (p → q) ∧ (q → p) (Biconditional)
⇐⇒ (¬p ∨ q) ∧ (¬q ∨ p) (Conditional)
⇐⇒ (¬p ∧ ¬q) ∨ (¬p ∧ p) ∨ (q ∧ ¬q) ∨ (q ∧ p) (Distributive Law)
⇐⇒ (¬p ∧ ¬q) ∨ False ∨ False ∨ (q ∧ p) (Negation Law)
⇐⇒ (¬p ∧ ¬q) ∨ (p ∧ q) (Identity Law)
⇐⇒ (p ∧ q) ∨ (¬p ∧ ¬q) (Commutative Law)
Solution:
¬(p ∨ (q ∧ r)) ⇐⇒ ¬p ∧ ¬(q ∧ r) (De Morgan’s Law)
⇐⇒ ¬p ∧ (¬q ∨ ¬r) (De Morgan’s Law)
Solution:
(p → q) ∧ (q → r) ⇐⇒ (¬p ∨ q) ∧ (¬q ∨ r) (Conditional)
⇐⇒ (¬p ∧ ¬q) ∨ (¬p ∧ r) ∨ (q ∧ ¬q) ∨ (q ∧ r) (Distributive Law)
⇐⇒ (¬p ∧ ¬q) ∨ (¬p ∧ r) ∨ False ∨ (q ∧ r) (Negation Law)
⇐⇒ (¬p ∧ ¬q) ∨ (¬p ∧ r) ∨ (q ∧ r) (Identity Law)
⇐⇒ ¬p ∧ (¬q ∨ r) ∨ (q ∧ r) (Distributive Law)
⇐⇒ ¬p ∨ (q ∧ r) (Simplification)
⇐⇒ ¬p ∨ r (Absorption Law)
⇐⇒ p → r (Conditional)
Thus, (p → q) ∧ (q → r) ⇐⇒ p → r.
Solution:
¬(p ↔ q) ⇐⇒ ¬ (p → q) ∧ (q → p) (Biconditional)
⇐⇒ ¬(p → q) ∨ ¬(q → p) (De Morgan’s Law)
⇐⇒ ¬(¬p ∨ q) ∨ ¬(¬q ∨ p) (Conditional)
⇐⇒ (p ∧ ¬q) ∨ (q ∧ ¬p) (De Morgan’s Law)
⇐⇒ (p ∧ ¬q) ∨ (¬p ∧ q) (Commutative Law)
4.1.3 Exercise: If you study hard, then you will pass the exam.
5 Rules of Inference
Rules of inference are logical tools used to derive conclusions from premises,
in other words, to check the validity of an argument. They are funda-
mental in constructing valid arguments and proofs in mathematics and
computer science.
An argument is a sequence of statements where one or more statements,
called premises, are used to support another statement, called the con-
clusion. The goal is to determine whether the conclusion logically follows
from the premises.
p1
p2
.
.
pn
∴q
Equivalently, (p1 ∧ p2 ∧ .. ∧ pn ) =⇒ q
Solution:
Therefore, the ground is wet.
(b) Use Modus Tollens to derive the conclusion from the premises:
If the dog barks, then someone is at the door. No one is at the door.
Solution:
Therefore, the dog did not bark.
(c) Use Disjunctive Syllogism to derive the conclusion from the premises:
Either the light is on or the switch is broken. The light is not on.
Solution:
Therefore, the switch is broken.
(d) Use Hypothetical Syllogism to derive the conclusion from the premises:
If I study hard, I will pass the exam. If I pass the exam, I will get a job.
Solution:
(e) Use Constructive Dilemma to derive the conclusion from the premises:
If I go to the party, I will have fun. If I stay home, I will study.
Either I go to the party or I stay home.
Solution:
Solution:
5.5 Problems
(a) Prove that the following argument is valid using rules of inference:
1. p → q premise)
2. q → r (premise)
3. p (premise)
4. q (From 1 and 3 using Modus Ponens.)
5. r (From 2 and 4 using Modus Ponens.)
Therefore, the argument is valid.
(b) Prove the following argument using rules of inference:
1. p∨q (Premise 1)
2. ¬p (Premise 2)
3. q→r (Premise 3)
4. r → s (Premise 4)
5. q (From 1 and 2 using Disjunctive Syllogism)
6. r (From 3 and 5 using Modus Ponens)
7. s (From 4 and 6 using Modus Ponens)
Thus, the argument is valid.
(e) Prove the following argument using rules of inference:
Either I will go to the party or I will stay home. If I go to the party,
I will have fun. If I stay home, I will study. Therefore, either I will
have fun or I will study.
Solution:
The argument can be symbolized as follows:
p∨q
p→r
q→s
∴r∨s
Quantifiers:
The words which are associated with the proposition with an idea of quantity are called
quantifiers.
Types of quantifier:
1) Universal quantifier
2) Existential quantifier
Universal quantifier
The universal quantification of 𝑝(𝑥) is the statement “𝑝(𝑥) for all values of 𝑥 in the domain”
The notation is ∀𝑥 𝑝(𝑥) (read as ‘for all 𝑝(𝑥)’ or ‘for every 𝑥 𝑝(𝑥)’). Here ∀ is called universal
quantifier.
Ex:
1) 𝑝(𝑥): 𝑥 + 1 > 𝑥, domain consists of all real numbers. What is the truth value of ∀𝑥 𝑝(𝑥)?
Ans: True
2) 𝑝(𝑥): 𝑥 2 > 𝑥, domain consists of all integers. What is the truth value of ∀𝑥 𝑝(𝑥)?
Ans: False (∵ 12 ≯ 1)
Existential quantifier:
The existential quantification of 𝑝(𝑥) is the statement “There exists an element 𝑥 in the domain
such that 𝑝(𝑥)”. The notation is ∃𝑥 𝑝(𝑥). Here ∃ is called the existential quantifier.
Ex: 𝑝(𝑥): 𝑥 > 3, domain is set of all real numbers.
Truth value of ∃𝑥 𝑝(𝑥) is T.
Statement When True? When False?
∀𝑥 𝑝(𝑥) 𝑝(𝑥) is true for every 𝑥 There is an 𝑥 for which 𝑝(𝑥) is false
∃𝑥 𝑝(𝑥) There is an 𝑥 for which 𝑝(𝑥) is true 𝑝(𝑥) is false for every 𝑥
Exercise: Examine the truth value of the following statements where 𝑝(𝑥), 𝑞(𝑥), 𝑟(𝑥) and 𝑠(𝑥)
are as above example.
a) ∀𝑥 (𝑞(𝑥) → 𝑠(𝑥)) (Ans: F)
b) ∀𝑥 (𝑟(𝑥) ∨ 𝑠(𝑥)) (Ans: F)
c) ∀𝑥 (𝑟(𝑥) → 𝑝(𝑥)) (Ans: F)
Ex: ∀𝑥 < 0 (𝑥 2 > 0), 𝑈 = ℝ states that for every real number 𝑥 with 𝑥 < 0, 𝑥 2 > 0 i.e. “The
square of negative real number is positive”. The truth value of this statement is T. This
statement is same as ∀𝑥 (𝑥 < 0 → 𝑥 2 > 0).
Exercise:
Explain the meaning of the following statements where 𝑈 = ℝ:
a) ∀𝑦 ≠ 0 (𝑦 3 ≠ 0)
b) ∃𝑧 > 0 (𝑧 2 = 2)
Precedence of Quantifiers:
The quantities ∀ and ∃ have higher precedence than all logical operators. For example,
∀𝑥 𝑝(𝑥)˅𝑞(𝑥) is the disjunction of ∀𝑥 𝑝(𝑥) and 𝑞(𝑥).
Exercise:
1. Every student in this class has visited either Canada or Mexico.
(Ans: ∀𝑥 (𝐶(𝑥) ∨ 𝑀(𝑥)))
Universal quantifier:
Consider the statement ∀𝑥 𝑝(𝑥) where 𝑝(𝑥) states “𝑥 has taken a course in Python”. If
domain 𝑈 consists of all the students in this class, then ∀𝑥 𝑝(𝑥) states that “Every student
in this class has taken a course in Python”. The negation of ∀𝑥 𝑝(𝑥) is “It is not the case
that every student in this class has taken a course in Python” OR “There is a student in this
class who has not taken a course in Python”. Symbolically, ¬ ∀𝑥 𝑝(𝑥) is the negation of
∀𝑥 𝑝(𝑥) and it is logically equivalent to ∃𝑥 ¬ 𝑝(𝑥) i.e. ¬ ∀𝒙 𝒑(𝒙) ≡ ∃𝒙 ¬ 𝒑(𝒙).
Existential quantifier:
Consider the statement ∃𝑥 𝑞(𝑥) which states “Some student in this class has taken a course
in Python”. The negation of this statement is “It is not the case that there is a student in this
class who has taken a course in Python” OR “Every student in this class has not taken a
course in Python”. Symbolically, ¬ ∃𝒙 𝒒(𝒙) ≡ ∀𝒙 ¬ 𝒒(𝒙).
Definition: For open statements 𝑝(𝑥) and 𝑞(𝑥) defined for a prescribed universe and the
universally quantified statement ∀𝑥 (𝑝(𝑥) → 𝑞(𝑥)) we define:
1) The contrapositive of ∀𝑥 (𝑝(𝑥) → 𝑞(𝑥)) to be ∀𝑥(¬ 𝑞(𝑥) → ¬ 𝑝(𝑥)).
2) The converse of ∀𝑥 (𝑝(𝑥) → 𝑞(𝑥)) to be ∀𝑥 (𝑞(𝑥) → 𝑝(𝑥)).
3) The inverse of ∀𝑥 (𝑝(𝑥) → 𝑞(𝑥)) to be ∀𝑥(¬ 𝑝(𝑥) → ¬ 𝑞(𝑥)).
Example: For the universe of all quadrilaterals in the plane, let 𝑠(𝑥) and 𝑒(𝑥) denote the open
statements
𝑠(𝑥): 𝑥 is a square
𝑒(𝑥): 𝑥 is equilateral
Obtain the truth value of ∀𝑥(𝑠(𝑥) → 𝑒(𝑥)) and hence its contrapositive. Examine
their logical equivalence.
Solution: The statement ∀𝑥(𝑠(𝑥) → 𝑒(𝑥)) is true and logically equivalent to its contrapositive
∀𝑥 (¬ 𝑒(𝑥) → ¬ 𝑠(𝑥)) because (𝑠(𝑎) → 𝑒(𝑎)) ↔ (¬ 𝑒(𝑎) → ¬ 𝑠(𝑎)) for each
replacement 𝑎. Hence ∀𝑥(𝑠(𝑥) → 𝑒(𝑥)) ≡ ∀𝑥 (¬ 𝑒(𝑥) → ¬ 𝑠(𝑥)).
Exercise: For the universe of all quadrilaterals in the plane, let 𝑠(𝑥) and 𝑒(𝑥) denote the open
statements
𝑠(𝑥): 𝑥 is a square
𝑒(𝑥): 𝑥 is equilateral
Obtain the truth value of ∀𝑥(𝑠(𝑥) → 𝑒(𝑥)) and hence its converse, inverse.
Examine the logical equivalence of converse and inverse of the statement.
(Ans: Truth value of converse and inverse is 𝐹 and are logically equivalent)
Note: Logical equivalences and logical implications for quantified statements in one variable
1) ∃𝑥(𝑝(𝑥) ∧ 𝑞(𝑥)) → (∃𝑥 𝑝(𝑥) ∧ ∃𝑥 𝑞(𝑥))
2) ∃𝑥(𝑝(𝑥) ∨ 𝑞(𝑥)) ↔ (∃𝑥 𝑝(𝑥) ∨ ∃𝑥 𝑞(𝑥))
3) ∀𝑥(𝑝(𝑥) ∧ 𝑞(𝑥)) ↔ (∀𝑥 𝑝(𝑥) ∧ ∀𝑥 𝑞(𝑥))
4) (∀𝑥 𝑝(𝑥) ∨ ∀𝑥 𝑞(𝑥)) → ∀𝑥 (𝑝(𝑥) ∧ 𝑞(𝑥))
Example: Let 𝑝(𝑥), 𝑞(𝑥) and 𝑟(𝑥) denote the open statements for a given universe. Examine
if the following statements are logical equivalent.
Solution: For each 𝑎 in the universe consider the statements 𝑝(𝑎) ∧ (𝑞(𝑎) ∧ 𝑟(𝑎)) and
(𝑝(𝑎) ∧ 𝑞(𝑎)) ∧ 𝑟(𝑎). By the Associative law for ∧, we have
𝑝(𝑎) ∧ (𝑞(𝑎) ∧ 𝑟(𝑎)) ↔ (𝑝(𝑎) ∧ 𝑞(𝑎)) ∧ 𝑟(𝑎)
𝑝(𝑥): 𝑥 is odd
𝑞(𝑥): 𝑥 2 − 1 is even
Nested quantifiers
One way to make 𝑝(𝑥, 𝑦) (proposition function with two variables or in general more
than one) a proposition is by quantifying both the variables 𝑥 and 𝑦 where one variable
is quantified within the scope of the other.
Ex: 1. “Every real number has an additive inverse” is ∀𝑥 ∃𝑦(𝑥 + 𝑦 = 0) − −(1) where
the domains of 𝑥 and 𝑦 are real numbers.
Consider ∃𝑦 ∀𝑥(𝑥 + 𝑦 = 0) − −(2). Here (1) is not same as (2). (1) is true and (2) is
false.
Ex: 2. 𝑝(𝑥, 𝑦): 𝑥𝑦 = 0
a) ∀𝑥 ∀𝑦 𝑝(𝑥, 𝑦) − 𝐹𝑎𝑙𝑠𝑒
b) ∀𝑥 ∃𝑦 𝑝(𝑥, 𝑦) − 𝑇𝑟𝑢𝑒
c) ∃𝑥 ∀𝑦 𝑝(𝑥, 𝑦) − 𝑇𝑟𝑢𝑒
d) ∃𝑥 ∃𝑦 𝑝(𝑥, 𝑦) − 𝑇𝑟𝑢𝑒
Example:
1. Let 𝐶(𝑥): 𝑥 has a computer and 𝐹(𝑥, 𝑦): 𝑥 and 𝑦 are friends
The domains for 𝑥 and 𝑦 be all students in a school.
Solution: Every student in a school has a computer or has a friend who has a computer.
2. ∃𝑥 ∀𝑦 ∀𝑧 (𝐹(𝑥, 𝑦) ∧ 𝐹(𝑥, 𝑧) ∧ (𝑦 ≠ 𝑧)) → ¬ 𝐹(𝑦, 𝑧). Here 𝐹(𝑥, 𝑦): 𝑥 and 𝑦 are friends.
Domain for 𝑥, 𝑦 and 𝑧 consists of all students in a school.
Solution: There is a student 𝑥 who has two friends, 𝑦 and 𝑧 and those two are not friends with
each other OR There is a student 𝑥 in a school such that none of his friends are also friends with
each other.
Example: There is a woman who has taken a flight on every airline in the world. Convert to
logical expression.
Solution: Let 𝑝(𝑤, 𝑓): 𝑤 has taken 𝑓 and 𝑞(𝑓, 𝑎): 𝑓 is a flight on 𝑎
Domain for 𝑤 is all women, 𝑓 is all flights, 𝑎 is all airlines.
Logical expression is ∃𝑤 ∀𝑎 ∃𝑓 (𝑝(𝑤, 𝑓) ∧ 𝑞(𝑓, 𝑎)).
Example:
1. Show that the premises
“Everyone in this Discrete Math class has taken a course in C. S.”
“John is a student in this class” lead to the conclusion
∴ "John has taken a course in C. S."
Solution: 𝐷(𝑥): 𝑥 is in DM class
𝐶(𝑥): 𝑥 has taken a course in C. S.
Argument form:
∀𝑥 (𝐷(𝑥) → 𝐶(𝑥))
𝐷(𝐽𝑜ℎ𝑛)
∴ 𝐶 (𝐽𝑜ℎ𝑛)
Step Reason
1) ∀𝑥 (𝐷(𝑥) → 𝐶(𝑥)) Premise
2) 𝐷(𝐽𝑜ℎ𝑛) → 𝐶(𝐽𝑜ℎ𝑛) Step 1, Universal instantiation
3) 𝐷(𝐽𝑜ℎ𝑛) Premise
4) 𝐶(𝐽𝑜ℎ𝑛) Step 2 & 3, Modus ponens
Exercise:
1. For each of these arguments, explain which rules of inference are used for each step.
a) “Doug, a student in this class knows how to write programs in JAVA. Everyone who
knows how to write programs in JAVA can get a high-paying job. Therefore, someone
in this class can get a high-paying job”.
b) “Somebody in this class enjoys whale watching. Every person who enjoys whale
watching cares about ocean pollution. Therefore, there is a person in this class who cares
about ocean pollution”.
2. Use rules of inference to show that if ∀𝑥 (𝑝(𝑥) ∨ 𝑞(𝑥)) and
∀𝑥 ((¬ 𝑝(𝑥) ∧ 𝑞(𝑥)) → 𝑟(𝑥)) are true, then ∀𝑥 (¬ 𝑟(𝑥) → 𝑝(𝑥)) is also true, where the
Vacuous proof:
Consider the conditional statement 𝑝 → 𝑞. If we could show that 𝑝 is false, then we can say
that 𝑝 → 𝑞 is true.
Ex: Show that 𝑝(0) is true where 𝑝(𝑛): If 𝑛 > 1, then 𝑛2 > 𝑛.
Proof: Clearly, 𝑝(0) is true, ∵ 𝑛 > 1 is false when 𝑛 = 0.
Remark: The fact that the conclusion of this conditional statement, 02 > 0, is false is
irrelevant to the truth value of the conditional statement, because a conditional
statement with a false hypothesis is guaranteed to be true.
Trivial proof:
If we can show (quickly) that 𝑞 is true in the statement 𝑝 → 𝑞 then we can say that 𝑝 → 𝑞 is
true.
Ex: 𝑝(𝑛): If 𝑎 and 𝑏 are positive integers with 𝑎 ≥ 𝑏, then 𝑎𝑛 ≥ 𝑏 𝑛 , when 𝑛 is any non-
negative integer. Show that 𝑝(0) is true.
Proof: Since 𝑎0 ≥ 𝑏 0 for any 𝑎, 𝑏, we can conclude that 𝑝(0) is true.
b) Proof by contradiction:
To prove 𝑝 → 𝑞 by contradiction, assume that 𝑞 is false and 𝑝 is true, i. e. (𝑝 ∧ ¬ 𝑞) is
true. Show that ¬ 𝑝 is also true. But 𝑝 ∧ ¬ 𝑝 is a contradiction.
Ex: Show that if 3𝑛 + 2 is odd, then 𝑛 is odd.
Proof: Proof by contradiction
𝑝: 3𝑛 + 2 is odd, 𝑞: 𝑛 is odd
Assume that 𝑝 ∧ ¬ 𝑞 is true, that is 3𝑛 + 2 is odd and 𝑛 is even.
By definition 𝑛 = 2𝑘 for some 𝑘 ∈ ℤ
⇒ 3𝑛 + 2 = 6𝑘 + 2 = 2(3𝑘 + 1) = 2𝑘 ′ , 𝑘 ′ = 3𝑘 + 1
This implies that 3𝑛 + 2 is even. This contradicts our assumption that 3𝑛 + 2 is odd.
∴ 𝑛 is odd. This completes the proof.
Exercise:
1. Prove that √2 is irrational by giving a proof by contradiction.
Proof by equivalence:
Let us consider a biconditional statement 𝑝 ↔ 𝑞. We know that 𝑝 ↔ 𝑞 ≡ (𝑝 → 𝑞) ∧ (𝑞 → 𝑝)
Ex: Show that these statements about the integer 𝑛 are equivalent
𝑝1 : 𝑛 is even, 𝑝2 : 𝑛 − 1 is odd, 𝑝3 : 𝑛2 is even.
Proof: We will show that these three statements are equivalent by showing that the
conditional statements 𝑝1 → 𝑝2 , 𝑝2 → 𝑝3 and 𝑝3 → 𝑝1 are true.
To prove 𝑝1 → 𝑝2 :
Suppose 𝑛 is even. Then 𝑛 = 2𝑘, for some 𝑘 ∈ ℤ
⇒ 𝑛 − 1 = 2𝑘 − 1 = 2(𝑘 − 1) + 1 = 2𝑚 + 1, 𝑚 = 𝑘 − 1
∴ 𝑛 − 1 is odd
To prove 𝑝2 → 𝑝3 :
Suppose 𝑛 − 1 is odd. Then 𝑛 − 1 = 2𝑘 + 1, for 𝑘 ∈ ℤ
⇒ 𝑛 = 2𝑘 + 2
⇒ 𝑛 = (2𝑘 + 2) = 4𝑘 2 + 4 + 8𝑘 = 2(2𝑘 2 + 4𝑘 + 2) = 2𝑘′
2 2
∴ 𝑛2 is even
To prove 𝑝3 → 𝑝1 :
Let 𝑛2 is even and 𝑛 is odd.
𝑛 = 2𝑘 + 1
⇒ 𝑛2 = (2𝑘 + 1)2 = 4𝑘 2 + 4𝑘 + 1 = 2(2𝑘 2 + 2𝑘) + 1 = 2𝑦 + 1, 𝑦 = 2𝑘 2 + 2𝑘
⇒ 𝑛2 is odd. This contradicts our assumption that 𝑛2 is even.
∴ 𝑛 is even. This completes the proof.
Exercise:
1. Prove that “If 𝑛 is an integer then 𝑛 is odd iff 𝑛2 is odd”.
Counterexample: To show that ∀𝑥 𝑝(𝑥) is incorrect, it is enough to show that 𝑝(𝑥) is false
for some element in the Universe.
Ex: Show that “Every positive integer is the sum of the squares of two integers” is false.
Proof: 7 is a positive integer which cannot be written as sum of squares of two integers.