Logic, Sets & the Language of Proof

contrapositive

The contrapositive of “if P, then Q” is “if not Q, then not P” — you negate both parts and swap them. The miracle is that the contrapositive is always logically equivalent to the original: they have identical truth tables, so one is true exactly when the other is. This gives you a free second front from which to attack any implication.

Equivalence here is not a coincidence but a theorem of propositional logic, provable directly from the truth table of implication. Intuitively, “whenever P then Q” says the same thing as “if Q ever fails, then P must have failed too”. The everyday version: “if it's a dog, then it's a mammal” carries exactly the content of “if it's not a mammal, then it's not a dog”.

This equivalence underlies proof by contraposition: to prove “if P then Q”, you may instead assume not Q and derive not P. This is often dramatically easier — the negated conclusion can be a concrete, usable hypothesis. (Proof by contraposition is closely related to but not identical with proof by contradiction, which assumes P and not Q together and seeks any absurdity.) Be careful: the contrapositive is equivalent, the converse is not.

To prove “if n^2 is even then n is even”, prove the contrapositive “if n is odd then n^2 is odd”: write n = 2k+1, then n^2 = 4k^2 + 4k + 1 = 2(2k^2 + 2k) + 1, which is odd. Done.

Proof by contraposition turns an awkward goal into an easy direct computation.