Lecture 9

Advice on writing proofs

In this section I simply give a few thoughts on how to write a good proof.

Think of it as a literary form

Writing proofs which are easy to understand, enlightening, or fun to read is very difficult.

Like with other forms of literature, the best way to learn to write well is to read, and to think about what you read.

If you see a proof which you consider to be particularly well written, try to learn from it as an example of what’s good to do. Similarly, if you see a proof which you consider to be particularly badly written, maybe you can learn something from the experience about what to avoid!

Also, read it back to yourself (or better yet, get a colleague to read it). You’re writing it so others can read: it’s good to test it to make sure this is possible. This goes particularly for proofs containing large amounts of symbols: these can be very hard to read, and reading it back to yourself is probably the best way of detecting this.

Use words and symbols

A common mistake that beginners make is to use very few words at all. Words are fantastic for explaining what you’re doing.

In particular, too many people overuse the symbol “\therefore” (meaning “therefore”), and the symbol “\because” (meaning “because”). I won’t use them at all in my proofs in these notes. There are so many good phrases which do its job, and choosing one helps you write what you’re actually thinking. Also, it distracts the reader’s eye from the symbols which matter — the actual maths you’re doing — to things which don’t.

Here are some phrases which do the job of “\therefore”:

so, hence, therefore, thus, consequently, as a result, accordingly, for this reason, and so, and in particular, as a consequence, because of that, and then, and from that, …

Here are some which do the job of “\because”:

because, since, as a result of, as we have, as we know, as we have seen that, because we saw, …

On the other hand, if you do write words, don’t write them all in one paragraph. Try to write in a structured fashion, and if you are producing paragraph after paragraph after paragraph, ask yourself if you could use symbols to make your life easier in places.

The clearest pieces of mathematical writing I’ve read often make good use of words and symbols, working together.

When it’s really important, I like to use both to make sure the point is clear. I might write,

Let A=i=1na(i)A=\sum_{i=1}^na(i) be the sum of the first nn values of aa, and let p>Ap>A be a prime number greater than AA.

There are also ways of abusing symbols. Consider the following sentence:

The square of 5=255=25.

Many novices write this, wanting it to mean:

(The square of 5)=25(\text{The square of } 5)=25.

However, experienced readers will read it as

The square of (5=25)(5=25).

This is of course nonsense: equations don’t really have squares, and 5=255=25 is a false equation anyway.

Some of the worst notational abuses are possible with induction. When writing an induction proof, don’t explain what you need to prove as

Let P(n)=an=3n+1P(n)=a_n=3^n+1.

This has P(n)P(n) as a number, not a statement. Instead, if you want to name the statement, write:

Let P(n)P(n) be the statement that an=3n+1a_n=3^n+1.

Make the structure obvious

Every sentence (and equation) of a proof needs to be justified:

It is particularly important to avoid unstated assumptions.

For example, if a proof contains an assertion that some construction is a function, then the definition of a function gives you some things to check: that every element of the domain gives a unique element lying inside the codomain. Unless they’re obviously true, it could be that these checks are the hardest and most interesting part of the proof. They could even be lies.

Explain beforehand and afterwards

Here is a classic account of a public speaking strategy:

First I tell them what I’m going to tell them.
Then I tell them.
And then I tell them what I’ve told them.

This approach is even better in proofs than it is in public speaking.

Some explanation at the beginning is important. It may well be that your reader doesn’t know even what you’re aiming to do, and it’s even more likely that your reader doesn’t know how you’re planning to do it.

Also, some explanation at the end is important. When you reach a conclusion, why do you think that what you have written actually means you have finished the proof?

If the proof is long, then regard it as being made of several parts. Give each part an explanation when you start and when you finish it.

I quite like proofs with the following kind of framework:

We’ll prove this by induction on nn.

The base case, where n=0n=0, is the statement “blah blah blah”. But that’s true, because blah blah blah blah blah.

Now we need the induction step: we assume the statement true for n=kn=k, and prove it for n=k+1n=k+1. So we’re assuming that blah blah blah, and have to prove that blah blah blah.

But blah blah blah blah blah. Also, blah blah blah blah blah. So, in conclusion, blah blah blah, which is what we had to prove. That finishes off the induction step, and so completes the proof.

Reason forwards

It’s quite normal to find yourself solving problems, where you start by thinking about where you want to be, and end up working out how to get there from where you are.

For example, a while ago I visited my family back home in Guernsey, and wondered about the timings of my journey from Sheffield. My plane left Gatwick at 1600, so I worked out I had to check in by 1515. Hence I wanted to be at Gatwick rail station by 1500 at the latest, so…

This was a very efficient process for working out what time to do everything (much better than trial and error, where you repeatedly guess times to leave your house, working out when you arrive). But the paragraph above is a terrible set of instructions for someone else who wants to get from Sheffield to Guernsey: it’s backwards.

It’s the same with proofs: when you write them down, you’re supposed to finish with the result you’re trying to prove, and on the way things are supposed to follow from your assumptions and the things you said earlier.

Often that means you have to do your working on one piece of paper and then write it up again in the opposite order! This is normal. In proofs later in this course I’ll sometimes try to talk you through how you’d think about it.

A very common sign you’re going the wrong way is when you finish up with something obvious (like 1=11=1).

This is especially bad when you mix forwards and backwards reasoning, and what you’re writing is likely to be badly wrong in this situation. For example, we could prove 9=119=11 as follows: subtract 1010 from both sides to get 1=1-1=1, and then square both sides to get 1=11=1. This is true, so we’re done.

Here’s an example of weird backwards reasoning: earlier in the course we had to prove that k(k+1)2+k+1=(k+1)(k+2)2,\frac{k(k+1)}{2} + k + 1 = \frac{(k+1)(k+2)}{2}, and we might have written k(k+1)2+k+1=(k+1)(k+2)2k(k+1)+2k+2=(k+1)(k+2)k2+k+2k+2=k2+k+2k+2k2+3k+2=k2+3k+2,which is true!\begin{aligned} {}\frac{k(k+1)}{2} + k + 1 &= \frac{(k+1)(k+2)}{2}\\ {}k(k+1) + 2k + 2 &= (k+1)(k+2)\\ {}k^2 + k + 2k + 2 &= k^2 + k + 2k + 2\\ {}k^2 + 3k + 2 &= k^2 + 3k + 2,{}\qquad\text{which is true!}\end{aligned} How could we mend this? You could just write it backwards, but in fact there are more natural ways of explaining it.

Help your reader

It is often well worthwhile supplying an example or a diagram. If your proof depends critically on it, on the other hand, you are probably not supplying enough information. But it’s quite sensible to use an example or a diagram as an aid.

Let the proof fit the statement

This is perhaps my vaguest (but perhaps also my most helpful) piece of advice.

Often (but not always) it’s possible to guess what a proof will look like, at least roughly, based on the appearance of the thing you’re trying to prove. Don’t try to fight it.

Here are some examples:

Coprimality

Now we’re going to introduce some very useful concepts. Rather than (as we were doing before) looking at one number at a time, it’s going to turn out to be really useful to consider two numbers and compare their factors.


Definition: Let aa and bb be integers. A common divisor of aa and bb is an integer dd such that dad\mid a and dbd\mid b. The greatest common divisor of aa and bb, written gcd(a,b)\gcd(a,b) (or sometimes as hcf(a,b)\operatorname{hcf}(a,b) or sometimes even just (a,b)(a,b) for short) is the largest common divisor of aa and bb.

That definition probably just says that a greatest common divisor is what you’d expect it to be, given the name!

That definition is dangerous, because it does something I’ve warned you against doing several times: it defines something that looks like a function, but it doesn’t prove that it is a function.

There are two reasons why the gcd might not exist; we need to satisfy ourselves that neither is a problem:

As happens quite often, the remark above, which looks like a slightly pedantic point at first, really says something practically important. Indeed, it gives us a way of finding the greatest common divisor of two numbers: to find gcd(a,b)\gcd(a,b) we could just count down from a|a| and stop when we reach the first common divisor.

For example, gcd(9,15)=3\gcd(9,15) = {}3 and gcd(30,42)=6.\gcd(-30,42) = {}6.

This approach to finding greatest common divisors is pretty terrible: imagine being asked to find gcd(123456789,987654321)\gcd(123456789,987654321) by this approach!