Discrete Structures
Introduction to Proofs
Dr. Muhammad Humayoun
Assistant Professor
COMSATS Institute of Computer Science, Lahore.
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.
Stating Theorems
• Theorem. If 𝑥 > 𝑦, where x and y are positive real numbers, then 𝑥2 > 𝑦2.
• Theorem. For all positive real numbers x and
Trivial Proofs
• Consider an implication: 𝑝 → 𝑞
• If it can be shown that p is true, then the implication is always true
– By definition of an implication
Trivial Proof Example
Consider the statement:
• If you are in CSC102 then you are a student.
Vacuous proofs
• Consider an implication: 𝑝 → 𝑞
• If it can be shown that 𝑝 is false, then the implication is always true.
– By definition of an implication
Example
Consider the statement:
• Every student snooze during class when he is tired.
• Rephrased: If a student is tired then he snoozes during class
Methods of Proving Theorems
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
Example Direct Proof
Theorem. Show that the square of an even number is an even number.
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.
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
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).
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.
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
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.
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.
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
Selecting a Proof method
Theorem. If 𝑛 is an integer and 𝑛3 + 5 is odd, then
𝑛 is even.
Proof. (Via direct proof). Assume that 𝑛3 + 5 is odd.
Then by the definition of odd numbers 𝑛3 + 5 =
2𝑘 + 1 for some integer k. Thus
𝑛3 = 2𝑘 − 4
Selecting a Proof method
Theorem. If 𝑛 is an integer and 𝑛3 + 5 is odd, then
𝑛 is even.
Proof. (Via direct proof). Assume that 𝑛3 + 5 is odd.
Then by the definition of odd numbers 𝑛3 + 5 =
2𝑘 + 1 for some integer k. Thus
𝑛3 = 2𝑘 − 4
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)
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)
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)
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)
Proof by contradiction
(another type of indirect proofs)•
Given a statement of the form
𝑝 → 𝑞
•
Assume
p is true
and
q is false
– Assume p and assume ¬𝑞
•
Then prove that
¬𝑞
cannot occur
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 ¬𝑞)
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.
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.
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)