# Lecture 8

Part of the reason this is such good news is that there are other well-ordered sets, besides the natural numbers. Whenever you find a well-ordering, you get a notion of induction for free.

For example, consider the set of pairs $(m,n)$ of naturals, where we say that $(m,n)<(m',n')$ if $m, or if $m=m'$ and $n. (This is called the lexicographic ordering, because it’s inspired by the way that words in dictionaries are ordered).

It is not too hard to prove that that is well-ordered: any set of pairs of natural numbers has a “least” element with respect to this ordering. Hence we can do (strong) induction on pairs of naturals!

# 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.

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.

# Elementary number theory

Now we have language to do so, the rest of this course will be concerned with beginning a study of the sets of numbers we have discussed earlier: $\mathbb{N}$, $\mathbb{Z}$, $\mathbb{Q}$ and $\mathbb{R}$.

We’re going to spend two-thirds of that time (or thereabouts) laying the foundations for elementary number theory: the study of $\mathbb{N}$ and $\mathbb{Z}$.

This used to be a beautiful, isolated and useless subject, until the 20th century came along. Now it is beautiful, well-connected and vitally important.

In the sense that mathematicians use the word, “elementary” doesn’t mean “easy”: it means “using no deep theory” (we’re only four weeks into your first semester, so haven’t had time to develop any deep theory). It can still be difficult, and in fact it can still be deep.

## Divisibility and primes

The most obvious way to start investigating properties of $\mathbb{N}$ and $\mathbb{Z}$ is to ask about division. We remarked a while ago that it’s not always possible to do division inside $\mathbb{Z}$ or $\mathbb{N}$: that suggests there’s something interesting going on!

Here’s the basic definition:
Definition: Let $a$ and $b$ be integers. We say that $a$ divides $b$ if there exists an integer $n$ such that $an=b$.

We also might say that $b$ is a multiple of $a$, or that $a$ is a divisor of $b$, or that $a$ is a factor of $b$, or that $a$ goes into $b$.

In symbols, we write $a\mid b$ to say that $a$ divides $b$, and write $a\nmid b$ to say that $a$ does not divide $b$.

For example, $91 = 7\times13$, so we have $7\mid 91$. Also, $91=(-7)\times(-13)$, so we have $-7\mid91$. Also, $-91 = 7\times(-13)$, so we have $7\mid -91$.

However, $7$ cannot be written as an integer multiple of $91$, so we have $91\nmid 7$.

What does it mean to say that $a$ does not divide $b$? Well, it means:

there does not exist any integer $n$, such that $an=b$,

or (equivalently)

for all $n\in\mathbb{Z}$, we have $an\neq b$.

It’s worth sorting out the trivial cases:

• When do we have $a\mid 0$?

Always (since $a0=0$ for all $a$).

• When do we have $0\mid b$?

When $b=0$.

• When do we have $a\mid 1$?

When $a=\pm 1$.

• When do we have $1\mid b$?

Always (since $1b=b$ for all $b$).

For the next few lectures, we’ll be studying the integers from the point of view of divisibility.