SigmaField
Mathematical Foundations for Quant Finance
0 of 256 lessons

Proof Gym PG2 Proof techniques Lesson 1 of 6

ProofLesson PG2.1 in the Proof Gym, stage PG2: Proof techniques. About 30 minutes.

Direct proof: even and odd numbers

Simulate

Check the claim with numbers

Add two odd numbers and the answer seems to be even every time: 3+5=83 + 5 = 8, and 7+11=187 + 11 = 18. Multiply them and the answer seems to be odd: 3⋅5=153 \cdot 5 = 15 and 7⋅11=777 \cdot 11 = 77. The cell tests both claims on every pair of odd numbers from −49-49 to 4949.

⌘/Ctrl + Enter runs the cell

There are 50 odd numbers in the range and 2,500 pairs. Not one pair has an odd sum, and not one has an even product. Here is a bolder guess: the sum of two odd numbers is always 2 more than a multiple of 4, as in 3+3=63 + 3 = 6.

⌘/Ctrl + Enter runs the cell

The bolder guess fails for 1,250 pairs, such as 1 and 3, whose sum is 4. It never fails when the two numbers are equal. Keep that in mind: one of the proofs below "proves" this false guess.

Conjecture

For all odd integers mm and nn, the sum m+nm + n is even and the product mnmn is odd.

Every one of 2,500 pairs agrees. That is evidence, not a proof: there are infinitely many odd numbers, and the claim is about all of them.

Definitions, then a direct proof

A proof about even and odd numbers cannot rest on examples. It needs definitions, so that "even" becomes something algebra can work with. Here Z\mathbb{Z} is the set of integers, as in lesson 0.2.1.

Rule: Even and odd

n is even if n=2kn is odd if n=2k+1for some k∈Z\begin{gathered} n \text{ is even if } n = 2k \\ n \text{ is odd if } n = 2k + 1 \\ \text{for some } k \in \mathbb{Z} \end{gathered}

So 14=2⋅714 = 2 \cdot 7 is even and −3=2⋅(−2)+1-3 = 2 \cdot (-2) + 1 is odd. Every integer is even or odd, because dividing by 2 leaves a remainder of 0 or 1.

No integer is both. If 2a=2b+12a = 2b + 1 for integers aa and bb, then a−b=12a - b = \tfrac{1}{2}, which is not an integer.

Try it

Python's divmod(n, 2) gives the kk and the remainder at once. The remainder is 0 for an even nn and 1 for an odd one.

Negative numbers work too: −3=2⋅(−2)+1-3 = 2 \cdot (-2) + 1.

⌘/Ctrl + Enter runs the cell

A direct proof of "if PP, then QQ" assumes PP and works forwards to QQ. With definitions it has three moves: unpack the hypothesis into algebra, rearrange, then pack the result into the form the conclusion's definition asks for.

Format 1

Reorder the steps

Here is a direct proof that the sum of two odd integers is even, with its lines shuffled. Put them in order.

  1. The number a+b+1a + b + 1 is an integer, because sums of integers are integers.
  2. Take out the factor 2: m+n=2(a+b+1)m + n = 2(a + b + 1).
  3. So m+nm + n is 2 times an integer, which is the definition of even.
  4. Let mm and nn be odd integers.
  5. By the definition of odd, m=2a+1m = 2a + 1 and n=2b+1n = 2b + 1 for some integers aa and bb.
  6. Add them: m+n=2a+2b+2m + n = 2a + 2b + 2.

Format 2

Fill the gap

Now the product. Fill each gap as you would a quick answer, such as 2a+b, then check.

Let mm and nn be odd, so m=2a+1m = 2a + 1 and n=2b+1n = 2b + 1 for some integers aa and bb. Multiplying out the brackets, mn=mn = .

The first three terms share a factor 2, so mn=2k+1mn = 2k + 1 with k=k = . Sums and products of integers are integers, so kk is an integer, and mnmn is odd by definition.

For example, m=3m = 3 and n=5n = 5 have a=1a = 1 and b=2b = 2, so k=k = . Indeed 3⋅5=15=2⋅7+13 \cdot 5 = 15 = 2 \cdot 7 + 1.

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.

Format 3

Find the error

This proof claims that the sum of two odd numbers is always 2 more than a multiple of 4. The simulation found that false for 1 and 3. Select the faulty line, then say what is wrong with it.

Simulate

A claim of your own to prove

Square some odd numbers and subtract 1, then divide by 4. Each row prints nn, n2n^2, the quotient and the remainder.

⌘/Ctrl + Enter runs the cell

Every remainder is 0, so each odd square is 1 more than a multiple of 4: 9=4⋅2+19 = 4 \cdot 2 + 1 and 49=4⋅12+149 = 4 \cdot 12 + 1. All 1,000 odd numbers from −999-999 to 999999 agree. The converse fails, though: 5, 13 and 17 are 1 more than a multiple of 4 but are not squares.

Conjecture

For every odd integer nn, there is an integer mm with n2=4m+1n^2 = 4m + 1.

A thousand cases agree. Prove it for every odd integer with the three moves of a direct proof.

Format 4

Write it

Prove that the square of every odd integer is 1 more than a multiple of 4. That is, for every odd nn there is an integer mm with n2=4m+1n^2 = 4m + 1.

Saved in this browser as you type.

Write your own first: a proof you have tried to write teaches far more than one you only read.

Summary card

  • nn is even if n=2kn = 2k, and odd if n=2k+1n = 2k + 1, for some integer kk. Every integer is one or the other, never both.
  • A direct proof of "if PP, then QQ": assume PP, unpack it with the definitions, do the algebra, and repack the result into the form of QQ.
  • The sum of two odd integers is even, and their product is odd. The square of an odd integer is 4m+14m + 1.
  • Give each number its own letter. One kk for two odd numbers proves a claim only for equal numbers.

Free further reading

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