Discrete Structures: Introduction To Proofs
Discrete Structures: Introduction To Proofs
Introduction to Proofs
Prof. Mohsin Riaz
1
Terminology
• Theorem: a statement that can be shown true.
Sometimes called facts.
• Proof: Demonstration that a theorem is true.
• Axiom: A statement that is assumed to be true.
• Lemma: a less important theorem that is useful
to prove a theorem.
• Corollary: a theorem that can be proven directly
from a theorem that has been proved.
• Conjecture: a statement that is being proposed to
be a true statement.
2
Stating Theorems
3
Methods of Proving Theorems
4
Trivial Proofs
• Consider an implication: 𝑝 → 𝑞
5
Trivial Proof Example
Consider the statement:
• If you are in CSC102 then you are a student.
6
Vacuous proofs
• Consider an implication: 𝑝 → 𝑞
7
Example
8
Methods of Proving Theorems
Important ones
9
Methods of Proving Theorems
Direct Proofs
• Consider an implication: 𝑝 → 𝑞
– If p is false, then the implication is always true
– Thus, show that if p is true, then q is true
11
Example Direct Proof
Theorem. Show that the square of an even number
is an even number.
For every number 𝑛, if 𝑛 is even, then 𝑛2 is even.
∀𝒏[even 𝒏 → even 𝒏𝟐 ]
12
Example Direct Proof
Theorem. Show that the square of an even number
is an even number.
For every number 𝑛, if 𝑛 is even, then 𝑛2 is even.
∀𝒏[even 𝒏 → even 𝒏𝟐 ]
Proof.
Usual convention: Universal instantiation is not
explicitly used and it is directly showed that
even(𝑛) implies even(𝑛2 ).
13
Example Direct Proof
Theorem. Show that the square of an even number is
an even number.
For every number 𝑛, if 𝑛 is even, then 𝑛2 is even.
∀𝒏[even 𝒏 → even 𝒏𝟐 ]
Proof.
Usual convention: Universal instantiation is not explicitly used and it
is directly showed that even(𝑛) implies even(𝑛2 ).
Assume 𝑛 is even.
Thus, 𝑛 = 2𝑘, for some 𝑘 (definition of even
numbers).
𝑛2 = 2𝑘 2 = 4𝑘 2 = 2(2𝑘 2 )
As 𝑛2 is 2 times an integer, 𝑛2 is thus even. 14
Example Direct Proof
Theorem. Show that the square of an even number is
an even number.
For every number 𝑛, if 𝑛 is even, then 𝑛2 is even.
∀𝒏[even 𝒏 → even 𝒏𝟐 ]
Proof.
Usual convention: Universal instantiation is not explicitly used and it
is directly showed that even(𝑛) implies even(𝑛2 ).
Assume 𝑛 is even.
Thus, 𝑛 = 2𝑘, for some 𝑘 (definition of even
numbers).
𝑛2 = 2𝑘 2 = 4𝑘 2 = 2(2𝑘 2 )
As 𝑛2 is 2 times an integer, 𝑛2 is thus even. 15
Proof by Contraposition
(or Indirect proofs)
• 𝑝 → 𝑞 ≡ ¬𝑞 → ¬𝑝
– If the antecedent (¬𝑞) is false, then the
contrapositive is always true
– Thus, show that if ¬𝑞 is true, then ¬𝑝 is true
16
Indirect proof example
Theorem. If 𝑛2 is an odd integer then 𝑛 is an odd integer
Proof (by contrapositive).
We show that the contrapositive of the theorem statement
holds, therefore the theorem statement hold.
Contrapositive: If 𝑛 is an even integer, then 𝑛2 is an even
integer.
𝑝 → 𝑞 ≡ ¬𝑞 → ¬𝑝
17
Indirect proof example
Theorem. If 𝑛2 is an odd integer then 𝑛 is an odd integer
Proof (by contrapositive).
We show that the contrapositive of the theorem statement
holds, therefore the theorem statement hold.
Contrapositive: If 𝑛 is an even integer, then 𝑛2 is an even
integer.
Assume that 𝑛 is even. Then by the definition of even
numbers: 𝑛 = 2𝑘 for some integer 𝑘.
18
Indirect proof example
Theorem. If 𝑛2 is an odd integer then 𝑛 is an odd integer
Proof (by contrapositive).
We show that the contrapositive of the theorem statement
holds, therefore the theorem statement hold.
Contrapositive: If 𝑛 is an even integer, then 𝑛2 is an even
integer.
Assume that 𝑛 is even. Then by the definition of even
numbers: 𝑛 = 2𝑘 for some integer 𝑘. Thus
𝑛2 = 2𝑘 2 = 4𝑘 2 = 2(2𝑘 2 )
Since 𝑛2 is 2 times an integer, it is even. Hence our proof by
contraposition succeeds.
19
Selecting a Proof method
20
Selecting a Proof method
21
Selecting a Proof method
Theorem. If 𝑛 is an integer and 𝑛3 + 5 is odd, then 𝑛 is even.
Indirect proof.
Contrapositive: If 𝑛 is odd, then 𝑛3 + 5 is even.
Assume 𝑛 is odd, and show that 𝑛3 + 5 is even.
By the definition of odd numbers 𝑛 = 2𝑘 + 1 for some
integer 𝑘.
𝑛3 + 5 = 2𝑘 + 1 3 + 5 = 8𝑘 3 + 12𝑘 2 + 6𝑘 + 6
= 2(4𝑘 3 + 6𝑘 2 + 3𝑘 + 3)
As 2(4𝑘 3 + 6𝑘 2 + 3𝑘 + 3) is 2 times an integer, it is
even
22
Selecting a Proof method
Theorem. If 𝑛 is an integer and 𝑛3 + 5 is odd, then 𝑛 is even.
Indirect proof.
Contrapositive: If 𝑛 is odd, then 𝑛3 + 5 is even.
Assume 𝑛 is odd, and show that 𝑛3 + 5 is even.
By the definition of odd numbers 𝑛 = 2𝑘 + 1 for some
integer 𝑘.
𝑛3 + 5 = 2𝑘 + 1 3 + 5 = 8𝑘 3 + 12𝑘 2 + 6𝑘 + 6
= 2(4𝑘 3 + 6𝑘 2 + 3𝑘 + 3)
As 2(4𝑘 3 + 6𝑘 2 + 3𝑘 + 3) is 2 times an integer, it is
even
23
Selecting a Proof method
Theorem. If 𝑛 is an integer and 𝑛3 + 5 is odd, then 𝑛 is even.
Indirect proof.
Contrapositive: If 𝑛 is odd, then 𝑛3 + 5 is even.
Assume 𝑛 is odd, and show that 𝑛3 + 5 is even.
By the definition of odd numbers 𝑛 = 2𝑘 + 1 for some
integer 𝑘.
𝑛3 + 5 = 2𝑘 + 1 3 + 5 = 8𝑘 3 + 12𝑘 2 + 6𝑘 + 6
= 2(4𝑘 3 + 6𝑘 2 + 3𝑘 + 3)
As 2(4𝑘 3 + 6𝑘 2 + 3𝑘 + 3) is 2 times an integer, it is
even
24
Selecting a Proof method
Theorem. If 𝑛 is an integer and 𝑛3 + 5 is odd, then 𝑛 is even.
Indirect proof.
Contrapositive: If 𝑛 is odd, then 𝑛3 + 5 is even.
Assume 𝑛 is odd, and show that 𝑛3 + 5 is even.
By the definition of odd numbers 𝑛 = 2𝑘 + 1 for some
integer 𝑘.
𝑛3 + 5 = 2𝑘 + 1 3 + 5 = 8𝑘 3 + 12𝑘 2 + 6𝑘 + 6
= 2(4𝑘 3 + 6𝑘 2 + 3𝑘 + 3)
As 2(4𝑘 3 + 6𝑘 2 + 3𝑘 + 3) is 2 times an integer, it is
even
25
Proof by contradiction
(another type of indirect proofs)
• Given a statement of the form 𝑝 → 𝑞
26
Proof by contradiction example
Theorem. If 𝑛 is an integer and 𝑛3 + 5 is odd, then 𝑛 is even.
Rephrased: If 𝑛3 + 5 is odd, then 𝑛 is even
Proof. Assume p is true and q is false (Assume 𝑝. Assume ¬𝑞)
Assume that 𝑛3 + 5 is odd, and 𝑛 is odd.
27
Proof by contradiction example
Theorem. If 𝑛 is an integer and 𝑛3 + 5 is odd, then 𝑛 is even.
Rephrased: If 𝑛3 + 5 is odd, then 𝑛 is even
Proof. Assume p is true and q is false (Assume 𝑝. Assume ¬𝑞)
Assume that 𝑛3 + 5 is odd, and 𝑛 is odd.
By the definition of odd numbers 𝑛 = 2𝑘 + 1 for some
integer k.
28
Proof by contradiction example
Theorem. If 𝑛 is an integer and 𝑛3 + 5 is odd, then 𝑛 is even.
Rephrased: If 𝑛3 + 5 is odd, then 𝑛 is even
Proof. Assume p is true and q is false (Assume 𝑝. Assume ¬𝑞)
Assume that 𝑛3 + 5 is odd, and 𝑛 is odd.
By the definition of odd numbers 𝑛 = 2𝑘 + 1 for some
integer k.
𝑛3 + 5 = 2𝑘 + 1 3 + 5 = 8𝑘 3 + 12𝑘 2 + 6𝑘 + 6
= 2(4𝑘 3 + 6𝑘 2 + 3𝑘 + 3)
29
Proof by contradiction example
Theorem. If 𝑛 is an integer and 𝑛3 + 5 is odd, then 𝑛 is even.
Rephrased: If 𝑛3 + 5 is odd, then 𝑛 is even
Proof. Assume p is true and q is false (Assume 𝑝. Assume ¬𝑞)
Assume that 𝑛3 + 5 is odd, and 𝑛 is odd.
By the definition of odd numbers 𝑛 = 2𝑘 + 1 for some integer
k.
𝑛3 + 5 = 2𝑘 + 1 3 + 5 = 8𝑘 3 + 12𝑘 2 + 6𝑘 + 6
= 2(4𝑘 3 + 6𝑘 2 + 3𝑘 + 3)
31