6.6: Proving the contrapositive
Recall. Modus tollens : \(P \rightarrow Q \Leftrightarrow \neg Q \rightarrow \neg P\text{.}\)
To prove \(P \Rightarrow Q\text{,}\) you can instead prove \(\neg Q \Rightarrow \neg P\text{.}\)
In Worked Example 6.3.1 , we proved that the square of an even number is also even. Therefore, this also constitutes a proof of the contrapositive statement: if the square of a number is odd, then that number is also odd.
Prove that every prime number larger than \(2\) is odd.
Solution
We want to prove the following universally quantified conditional (“for all \(p\)” omitted, domain is positive integers).
| conditional | if (\(p\) is prime and \(p>2\)) then \(p\) is odd. |
| contrapositive | if \(p\) is not odd, then not (\(p\) is prime and \(p>2\)) |
| DeMorgan Subsitution | if \(p\) is not odd, then (\(p\) is not prime or \(p \le 2\)) |
These are all equivalent.
Let's prove the last statement: as in the procedure for proving conditionals with a disjunction, start by assuming that \(p\) is not odd and \(p \gt 2\text{.}\) We must then show that \(p\) is not prime. Since \(p\) is not odd, it is divisible by \(2\text{.}\) But since \(p \gt 2\text{,}\) \(p\) is divisible by a number other than \(1\) and \(p\) itself. Therefore, \(p\) is not prime.
Check your understanding. Attempt Exercise 6.12.8 .