SigmaField
Mathematical Foundations for Quant Finance
0 of 256 lessons

Proof Gym PG2 Proof techniques Lesson 4 of 6

ProofLesson PG2.4 in the Proof Gym, stage PG2: Proof techniques. About 35 minutes.

The contrapositive, and proof by cases

Simulate

Check the claim with numbers

Take two claims about integers: if n2n^2 is even, then nn is even; and n2+nn^2 + n is even for every nn. The cell tests both on every integer from −1000-1000 to 10001000.

⌘/Ctrl + Enter runs the cell

All three searches come back empty, and the first two look for the same integers in different words. A counterexample to the claim is one to its contrapositive (lesson PG1.2), and the other way round. So the claim can be proved through its contrapositive.

Conjecture

For every integer nn:

  1. If n2n^2 is even, then nn is even.
  2. The number n2+nn^2 + n is even.

Two thousand and one integers agree. The integers never end, so each claim needs a proof that covers every nn.

Two more techniques

A direct proof of claim 1 starts from n2=2kn^2 = 2k. To learn about nn it would take a square root, n=2kn = \sqrt{2k}, which says nothing about whether nn is even. The contrapositive starts from the other end, where the algebra is easy.

Rule: Proof by contrapositive

to prove P⇒Q,prove ¬Q⇒¬P\begin{gathered} \text{to prove } P \Rightarrow Q, \\ \text{prove } \neg Q \Rightarrow \neg P \end{gathered}

Lesson PG1.2 proved that the two are equivalent, so proving one proves the other. Use it when "not QQ" gives you more to work with than PP does.

Here PP is "n2n^2 is even" and QQ is "nn is even". Every integer is even or odd and not both (lesson PG2.1), so "not even" means odd. The contrapositive reads: if nn is odd, then n2n^2 is odd.

Format 1

Reorder the steps

Here is the proof of claim 1 by its contrapositive, with its lines shuffled. Put them in order.

  1. We prove the contrapositive: if nn is odd, then n2n^2 is odd.
  2. Then n2=4k2+4k+1=2(2k2+2k)+1n^2 = 4k^2 + 4k + 1 = 2(2k^2 + 2k) + 1.
  3. The contrapositive holds, so the claim does too: if n2n^2 is even, then nn is even.
  4. Suppose nn is odd, so n=2k+1n = 2k + 1 for some integer kk.
  5. The number 2k2+2k2k^2 + 2k is an integer, so n2n^2 is odd.

Claim 2 has no hypothesis to work from, only "every integer nn". It does split into two pieces that cover every integer: nn even and nn odd.

Rule: Proof by cases

every case is A or BA⇒QB⇒Qso Q\begin{gathered} \text{every case is } A \text{ or } B \\ A \Rightarrow Q \qquad B \Rightarrow Q \\ \text{so } Q \end{gathered}

Split the possibilities into cases that together cover everything, and prove the claim in each case. The proof is only as good as the split: a case left out is a gap.

Format 2

Fill the gap

Here is the proof of claim 2 in two cases. Fill each gap as you would a quick answer, such as 2k^2+1, then check.

Every integer nn is even or odd (lesson PG2.1), so two cases cover them all.

Case 1: nn is even. Then n=2kn = 2k for some integer kk. So n2+n=4k2+2k=2mn^2 + n = 4k^2 + 2k = 2m, with m=m = .

Case 2: nn is odd. Then n=2k+1n = 2k + 1 for some integer kk. Multiplying out, n2+n=(2k+1)2+(2k+1)=n^2 + n = (2k + 1)^2 + (2k + 1) = . That is 2m2m with m=m = .

In each case mm is an integer, so n2+nn^2 + n is even. The two cases cover every integer, so the claim holds for all nn.

How to type answers
  • Powers with ^, brackets round a power that is a sum: r^k, r^(k+1).
  • Fractions with / and brackets: (1-r)/(1+r). Multiply with * or side by side: 2k+1.
  • Press Enter in any box to check them all.

Simulate

Check a claim about absolute values

A proof by cases fails if a case is missing. Here is a tempting claim: ∣x+y∣=∣x∣+∣y∣|x + y| = |x| + |y| for all real xx and yy. The cell tests it on every pair from a grid of halves from −5-5 to 55.

⌘/Ctrl + Enter runs the cell

The claim fails for 200 of the 441 pairs. Every failure has xx and yy of opposite signs, such as x=3x = 3 and y=−5y = -5: 2 against 8.

Format 3

Find the error

This proof by cases claims that ∣x+y∣=∣x∣+∣y∣|x + y| = |x| + |y| for all real xx and yy. The simulation says that is false. Select the faulty line, then say what is wrong with it.

Summary card

  • To prove P⇒QP \Rightarrow Q by contrapositive, prove ¬Q⇒¬P\neg Q \Rightarrow \neg P. Use it when "not QQ" is easier to work with than PP.
  • If n2n^2 is even, then nn is even: the contrapositive, "odd squared is odd", is a direct proof.
  • A proof by cases proves the claim in each case. The cases must cover every possibility.
  • n2+nn^2 + n is even for every integer nn, in the two cases nn even and nn odd.
  • ∣x+y∣=∣x∣+∣y∣|x + y| = |x| + |y| is false: it fails for pairs of opposite signs, such as 3 and −5-5.

Free further reading

Optional. This lesson covers what you need; these add more examples and practice. All are free to read.