# 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=\sum_{i=1}^na(i)$ be the sum of the first $n$ values of $a$, and let $p>A$ be a prime number greater than $A$.

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

The square of $5=25$.

Many novices write this, wanting it to mean:

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

However, experienced readers will read it as

The square of $(5=25)$.

This is of course nonsense: equations don’t really have squares, and $5=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)=a_n=3^n+1$.

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

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

## Make the structure obvious

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

Usually, most sentences simply follow on from the one before. It is helpful to say so (using the connection words above, for example).

Whenever a sentence doesn’t just follow on from the one before (but is a radical new idea, or draws on things said a while earlier), it’s even more important to say so. For example, you could:

use words which introduce a change of pace (“now we do this...”);

name or number something earlier, and refer back to it by name or number;

leave a paragraph break;

leave a space;

have a descriptive section heading.

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 $n$.

The base case, where $n=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=k$, and prove it for $n=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=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=11$ as follows: subtract $10$ from both sides to get $-1=1$, and then square both sides to get $1=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 $\frac{k(k+1)}{2} + k + 1 = \frac{(k+1)(k+2)}{2},$ and we might have written $\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:

If you’re trying to prove $P\wedge Q$, you’re likely to prove $P$ and then prove $Q$.

If you’re trying to prove $P\vee Q$, you’re likely to prove $P$ or prove $Q$ (after fiddling around to try to see which of those is easiest).

If you’re trying to prove something of the form $P\Rightarrow Q$, your proof is likely to start with “We’ll assume $P$” and to continue by deducing $Q$.

If you’re trying to prove something of the form $\forall x\in X,\quad P(x)$, your proof is likely to start “Let $x$ be an element of $X$” and then continue by proving $P(x)$.

If you’re trying to prove something of the form $\exists x\in X\quad\mathrm{s.t.}\quad P(x)$, your proof is likely to start by giving one particular (cleverly chosen) value of $x$, and then proving that $P(x)$ is true of it.

If you’re trying to prove something about a sequence with a recurrence relation, your proof may well be by an induction, where the induction step refers to the same previous cases as the recurrence relation.

## 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 $a$ and $b$ be integers. A *common divisor* of $a$ and $b$ is an integer $d$ such that $d\mid a$ and $d\mid b$. The *greatest common divisor* of $a$ and $b$, written $\gcd(a,b)$ (or sometimes as $\operatorname{hcf}(a,b)$ or sometimes even just $(a,b)$ for short) is the largest common divisor of $a$ and $b$.

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:

*There might be no common divisors at all (and hence no greatest common divisor):*This is not a problem: we have observed before that $1$ is a divisor of every integer, and so will certainly be a common divisor.*There may be lots of common divisors, but no largest one.*For nonzero integers $a$, it’s easy to see that if $d\mid a$ then $|d|\leq|a|$, which means we can’t get arbitrarily large divisors…but $\gcd(0,0)$ doesn’t exist.

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)$ we could just count down from $|a|$ and stop when we reach the first common divisor.

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

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