← mapLogic & Proof

Contrapositive & Iff Proofs

⚗ Dr. Möbius, from the lab

Sometimes the direct road to a proof is a swamp — you assume PP and the algebra just sits there, sneering at you. Today I hand you a perfectly legal detour: prove the contrapositive instead, and the swamp becomes a two-lane highway. Then we deal with "if and only if," the statement that is secretly two theorems wearing one coat and hoping you won't notice. Hand me half of an iff proof and I will hand it back. I will not grade it. I will stare at you.

THE BIG IDEA

Because P→Q is logically equivalent to its contrapositive ¬Q→¬P, you may prove either one; and an 'if and only if' is two separate implications that both require proof.

The contrapositive is a legal detour

Back in the Implication lesson we proved, with a truth table, that PQ  ¬Q¬P.P \to Q \ \equiv\ \neg Q \to \neg P. These are the same statement — identical in every row. That equivalence wasn't a curiosity; it's a proof strategy. Since proving ¬Q¬P\neg Q \to \neg P establishes the very same fact as PQP \to Q, you're allowed to prove whichever one is easier. That's proof by contrapositive.

The recipe: to prove "if PP then QQ," instead assume ¬Q\neg Q and derive ¬P\neg P. When you arrive at ¬P\neg P, you've proven ¬Q¬P\neg Q \to \neg P, which is PQP \to Q. Same theorem, different door.

When is the contrapositive door easier? Whenever the negated hypothesis is more concrete than the original. "n2n^2 is even" is awkward as hell to unwrap — it gives you n2=2kn^2 = 2k, and you can't easily extract nn. But its negation in the contrapositive, "nn is odd," hands you n=2k+1n = 2k+1 directly, a clean witness you can compute with. The contrapositive trades a hard handle for an easy one. Same fucking result, better door.

Classic: if n² is even then n is even

Claim. For every integer nn: if n2n^2 is even, then nn is even.

The direct attempt is mud. Assume n2n^2 is even, so n2=2kn^2 = 2k. Now what? To conclude nn is even you'd need n=2kn = \sqrt{2k} to be an even integer, and square roots are not something our integer definitions handle. Dead end.

The contrapositive is two lines. The contrapositive of "if n2n^2 even then nn even" is "if nn is not even then n2n^2 is not even" — i.e., "if nn is odd then n2n^2 is odd."

Proof (by contrapositive). Assume nn is odd. Then n=2k+1n = 2k + 1 for some integer kk. So n2=(2k+1)2=4k2+4k+1=2(2k2+2k)+1.n^2 = (2k+1)^2 = 4k^2 + 4k + 1 = 2(2k^2 + 2k) + 1. Since 2k2+2k2k^2 + 2k is an integer, n2n^2 has the form 2(integer)+12 \cdot (\text{integer}) + 1, so n2n^2 is odd. This proves the contrapositive, which is logically equivalent to the original. Therefore: if n2n^2 is even, then nn is even. \blacksquare

Two lines of clean algebra versus an impassable swamp. Remember this lemma — "n2n^2 even \Rightarrow nn even" — because it is the exact tool that detonates the √2 proof in the very next lesson like a small beautiful bomb. We're sharpening the knife now; next lesson we gut the proof with it.

Iff proofs are TWO proofs

Recall from Implication: PQP \leftrightarrow Q ("PP if and only if QQ") means both PQP \to Q and QPQ \to P hold. So to prove a biconditional you must prove two implications, full stop. No shortcuts, no "well the other direction is obvious," no implicit bullshit. Two proofs:

  • the forward direction (\Rightarrow): assume PP, prove QQ;
  • the backward direction (\Leftarrow): assume QQ, prove PP.

Each is its own little proof, with its own assumption and its own conclusion. Skipping one is not "mostly done" — it's half a theorem, which is worth exactly nothing. The forward direction can be true while the backward is false (that's just "converse \ne original" from the Implication lesson), so proving one tells you nothing about the other. You prove both, or you prove neither.

Claim. For every integer nn: nn is even if and only if n2n^2 is even.

Proof. (\Rightarrow) Assume nn is even, so n=2kn = 2k. Then n2=4k2=2(2k2)n^2 = 4k^2 = 2(2k^2), and 2k22k^2 is an integer, so n2n^2 is even.

(\Leftarrow) Assume n2n^2 is even. We want nn even. This is exactly the contrapositive result above — we proved that n2n^2 even forces nn even. So nn is even.

Both directions hold, so nn is even     \iff n2n^2 is even. \blacksquare

See how the backward direction reused our contrapositive lemma? That's the point of building tools: you sharpen them in one proof and spend them in the next. Nothing in this lab is wasted.

Choosing your weapon

You now own three direct-style techniques — straight direct proof, and contrapositive — and you'll add contradiction next lesson. Here are the heuristics for when contrapositive beats a head-on direct proof:

  • The conclusion QQ is a "non-existence" or "not" statement. Negating it (¬Q\neg Q) turns a slippery "there is no…" into a concrete "there is a…" you can grab a witness from.
  • The hypothesis PP is hard to unwrap but ¬Q\neg Q is easy. The n2n^2-even case is the poster child: "nn odd" is a far better starting handle than "n2n^2 even."
  • QQ is "x=yx = y" or "xyx \ne y". Often the negation gives you an inequality (or equality) you can manipulate directly.

If the direct proof flows, use it — don't reach for the contrapositive out of goddamn habit; it's a detour, and detours are only smart when the main road is blocked. The skill isn't memorizing which to use; it's trying the direct road, noticing the swamp, and calmly switching doors. Now go pick some locks.

🔬 SPECIMENS (worked examples)

Worked example 1 — contrapositive on a divisibility claim

Prove: for every integer nn, if n2n^2 is odd then nn is odd.

Trying this directly is the same swamp as the even case — "n2=2k+1n^2 = 2k+1" gives no clean handle on nn. So take the contrapositive.

The contrapositive of "if n2n^2 odd then nn odd" is "if nn is not odd then n2n^2 is not odd" — i.e., "if nn is even then n2n^2 is even."

Proof (by contrapositive). Assume nn is even, so n=2kn = 2k for some integer kk. Then n2=(2k)2=4k2=2(2k2),n^2 = (2k)^2 = 4k^2 = 2(2k^2), and 2k22k^2 is an integer, so n2n^2 is even. This establishes the contrapositive, which is equivalent to the claim. Therefore if n2n^2 is odd, nn is odd. \blacksquare

The negation of "odd" is "even," giving the clean witness n=2kn = 2k. That's the whole trick.

Worked example 2 — a full iff proof

Prove: for every integer nn, nn is odd if and only if n+1n + 1 is even.

A biconditional means two proofs. Label them.

(\Rightarrow) Assume nn is odd. Then n=2k+1n = 2k + 1 for some integer kk. So n+1=(2k+1)+1=2k+2=2(k+1).n + 1 = (2k + 1) + 1 = 2k + 2 = 2(k + 1). Since k+1k + 1 is an integer, n+1n + 1 is even.

(\Leftarrow) Assume n+1n + 1 is even. Then n+1=2mn + 1 = 2m for some integer mm. So n=2m1=2(m1)+1.n = 2m - 1 = 2(m - 1) + 1. Since m1m - 1 is an integer, nn has the form 2(integer)+12 \cdot (\text{integer}) + 1, so nn is odd.

Both directions hold, so nn is odd     \iff n+1n + 1 is even. \blacksquare

Note each direction has its own assumption and its own target. Neither half could be skipped; together they pin down the equivalence.

Worked example 3 — the trap: skipping the direction that's false

A student claims to prove "nn is divisible by 66 if and only if nn is divisible by 22." They show the \Rightarrow direction correctly. Is the biconditional true? Decide, and prove or disprove the \Leftarrow direction.

First check what the student did. (\Rightarrow) If 6n6 \mid n then n=6k=2(3k)n = 6k = 2(3k), so 2n2 \mid n. Correct — divisibility by 66 does force divisibility by 22.

But a biconditional needs both directions, and the student stopped halfway. Test (\Leftarrow): "if 2n2 \mid n then 6n6 \mid n." Take n=4n = 4: it's divisible by 22 but 4/64 / 6 is not an integer, so 646 \nmid 4. Counterexample. The backward direction is false.

Therefore the biconditional is false — the student "proved" a theorem that isn't true by quietly skipping the direction that fails. This is exactly why half an iff is worthless: the missing half was the false half. One honest counterexample (n=4n = 4) demolishes the whole claim. The correct statement is only the one-way implication 6n2n6 \mid n \to 2 \mid n.

☠ KNOWN HAZARDS

  • Confusing contrapositive with converse. The contrapositive of PQP \to Q is ¬Q¬P\neg Q \to \neg P (negate both, flip order) — equivalent. The converse QPQ \to P (flip only) is NOT, and assuming it is wrecks your proof.

  • Proving only one direction of an iff. PQP \leftrightarrow Q needs both PQP \to Q and QPQ \to P. Half a biconditional earns zero credit — the missing direction might be outright false, as in the "divisible by 6 iff divisible by 2" trap below. Do both or do nothing.

  • Forgetting to actually negate QQ correctly. The contrapositive of "if n2n^2 even then nn even" assumes "nn is odd" (the negation of "even"), not "n2n^2 is odd". Negate the conclusion to get your new hypothesis, the hypothesis to get your new conclusion.

  • Reaching for the contrapositive reflexively. It's a detour for when the direct road is blocked. If assuming PP leads straight to QQ, just do that — don't negate everything for no reason.

TL;DR

  • To prove PQP \to Q by contrapositive, assume ¬Q\neg Q and derive ¬P\neg P; this is legal because PQ¬Q¬PP \to Q \equiv \neg Q \to \neg P.

  • The contrapositive wins when ¬Q\neg Q is a cleaner handle than PP — e.g. "n2n^2 even \Rightarrow nn even" is mud directly, two lines via "nn odd \Rightarrow n2n^2 odd".

  • That lemma ("n2n^2 even \Rightarrow nn even") is the knife that detonates the √2 proof in proof-by-contradiction.

  • An iff (PQP \leftrightarrow Q) is two proofs: forward (PQP \to Q) and backward (QPQ \to P). Proving one says nothing about the other.

  • Choose contrapositive when the conclusion is a "not"/"non-existence" statement or when ¬Q\neg Q is easier to start from than PP; otherwise prefer the direct road.

unlocks