Definition, theorem, intuition, proof in practice [019B]
- September 21, 2026
- Marcelo Fiore, Jon Sterling
We start with an example to illustrate the process of working through definitions and theorems and proofs:
Definition Odd and even integers [019D]
- September 21, 2026
- Marcelo Fiore, Jon Sterling
An integer is said to be odd whenever it is of the form 2\cdot i + 1 for some (necessarily unique) integer i. It is even when it is not odd, or (equivalently) when it is of the form 2\cdot i for some (necessarily unique) integer i.
Proposition Closure of oddness under multiplication [019C]
- September 21, 2026
- Marcelo Fiore, Jon Sterling
For all integers m and n, if m and n are odd, then so is m\cdot n.
Intuition.
- September 21, 2026
- Marcelo Fiore, Jon Sterling
Before attempting a proof, we might first try and get some intuition for why it might be true (or, indeed, false: we don’t always know in advance if what we want to prove is really true). Do this on a separate piece of working paper.
Everybody’s intuitions are different, so it is hopeless to convey “the” intuition. But one possible intuition for this proposition is geometrical, where we visualise the multiplication of two numbers as the area of a square.
We let m and n be two odd numbers; this means that we have some i and j such that m=2\cdot i + 1 and n = 2\cdot j + 1. We can therefore draw a grid where m is the height and n is the width; then we compute the area of the entire grid by computing the areas of the cells in the grids and adding them up.
| j | j | 1 | |
| 1 | j | j | 1 |
| i | i\cdot j | i\cdot j | i |
| i | i\cdot j | i\cdot j | i |
We therefore have m\cdot n = 4\cdot i\cdot j + 2 \cdot i + 2\cdot j + 1, which is odd because the part before +1 divides by 2.
Now that we have got some intuition, we can go ahead with a proper proof. Proofs are written in a kind of specialised language that has developed over time to be easily and unambiguously interpreted by mathematicians: some turns of phrase may feel formulaic at times (cf. Homer’s ῥοδοδάκτυλος Ἠώς). It is part of the tradition and makes us feel at home. Here we go:
Proof.
- September 21, 2026
- Marcelo Fiore, Jon Sterling
Let m and n be two odd integers, so that we have m = 2\cdot i + 1 and n = 2\cdot j + 1 for some integers i and j. Hence we have:
\begin {aligned} m\cdot n &= (2\cdot i + 1) \cdot (2\cdot j + 1) \\ &= 4\cdot i \cdot j + 2\cdot i + 2\cdot j + 1 \\ &= 2\cdot (2\cdot i \cdot j + i + j) + 1 \end {aligned}Hence, if we define k \coloneqq 2\cdot i \cdot j + i + j, we have m\cdot n = 2\cdot k + 1. Therefore, m\cdot n is odd.
Remark on scratch-work: If you had included only the equational calculation of m\cdot n, that would not have been a proof. That is what we in the business call scratch work. Proofs are written in words; your scratch work is useful as you work your way to a solution, but it is meaningless on the page unless incorporated within the (prose!) structure of a real mathematical proof; we will not accept it! A real proof explains what the calculations are for, where variables come from and how they are used. Professional mathematicians usually omit their calculations entirely, and just give the reasoning. (But we want you to give more detail than that for now.)
Writing good proofs [019E]
- September 21, 2026
- Marcelo Fiore, Jon Sterling
Some advice from Section 1.9 of Mathematics for Computer Science by Lehman, Leighton, and Meyer:
- State your game plan.
- Keep a linear flow.
- A proof is an essay, not a calculation.
- Avoid excessive symbolism.
- Revise and simplify.
- Introduce notation thoughtfully.
- Structure long proofs.
- Be wary of the “obvious”.
- Finish.
Scaffold your proofs!
- September 21, 2026
- Marcelo Fiore, Jon Sterling
At all points in a proof, it should be easy for the reader to keep track of what the present assumptions are (statements that may be used for deduction) and what the present goals are (statements that remain to be proved). In a non-trivial proof, you ought to be writing things like “It remains to show that…” and “Because we have assumed (…), to establish (…) it suffices to check (…).” This kind of language is called scaffolding: use it liberally. If I can’t follow your proof, it is not a proof!
Dr Sterling’s advice
- September 21, 2026
- Marcelo Fiore, Jon Sterling
You may have got to Cambridge on the wings of magnificent Olympiad-style tours de force of proof by intimidation. That skill will take you no further, I will personally guarantee it. Proof is empathetic communication between two mathematicians in good faith.
What proofs are for in computer science [019F]
- September 21, 2026
- Marcelo Fiore, Jon Sterling
Mathematical proofs play a growing role in computer science (e.g. they are used to certify that software and hardware will always behave correctly under well-defined tolerances, something that no amount of testing can do.)
For a computer scientist, some of the most important things to prove are the correctness of programs and systems—whether (or under what conditions) a program or system does what it‘s supposed to do. Developing mathematical methods to verify programs and systems remains an active research area; the hard part is often finding a precise enough way to specify the intended behaviour. (Related: definitions in mathematics are more important than theorems.)