The previous section taught us to read statements:
what an implication claims, what the quantifiers demand,
and how to negate. Now we write proofs of them. A proof
is a chain of statements, each one justified by a
definition, a hypothesis or an earlier result, that ends
in the statement we want. This section collects the
handful of shapes that almost every proof in this book
takes, shows each on a small fact about integers, and
ends with the conventions that the book’s proofs
follow.
Throughout, a theorem will usually come with two
blocks. The Idea says how the argument
was found, often by working backwards from the goal. The
Proof then presents the argument
forwards, one justified step at a time. Read the Idea
first, then check the Proof line by line.
Direct
proof
Most statements have the form “for every , if then ”. The direct way to
prove this follows the shape of the statement:
- Let be arbitrary. By Definition 0.1.3, a
universal statement is a claim about each element, so we
must not pick a convenient one.
- Suppose . By Definition 0.1.2, the
implication can only fail when is true, so that is
the only case we need to handle.
- Unwind and into their
definitions. Then push forward from what we have towards
what we want, often working backwards from the goal on
scrap paper first.
Before we can prove anything about integers, we need
definitions to unwind.
Definition
0.2.1 (Even and odd)
An integer is
even if there exists
an integer with
. An integer
is
odd if there exists an
integer with
.
So
is even, is even, and is odd. Each definition is an
existential statement: to show a number is even, we must
produce the integer . We use the school fact
that every integer is even or odd, and not
both; an exercise at the end of this section
proves a more general fact about remainders.
Proposition
0.2.1 (Sum of even integers)
For all integers and , if and are even, then is even.
Idea. Givens: and for some integers
. Goal: for some
integer . So we
must find . Adding the givens
gives , and is the witness.
Proof. Let and be even integers. By Definition 0.2.1,
there exist integers and with and . Then Since is an integer, Definition 0.2.1 shows
that is even.
This proves the claim.
The pattern is worth naming. The hypothesis “ is even” is an
existence statement, so using it hands
us an integer to
work with. The goal “ is even” is also an existence statement, so
proving it means producing an integer,
here . The two
letters and must be different:
and are arbitrary, so their
halves have nothing to do with each other.
Warning. A proof of a “for
every” statement cannot start with a specific
example. Writing “, which is even” checks one case and
proves nothing about all even integers. Equally, writing
and with the
same silently assumes , so it only proves
that is
even.
Proof by
contrapositive
Sometimes the direct route stalls. Consider the
statement “if
is even, then is
even”. Going directly, we would suppose and try to say
something about .
But is not visibly of the form ,
and we are stuck.
By Theorem 0.1.1, “if
then ” is equivalent to “if
not then not
”. Here the
contrapositive is “if is not even, then is not even”, that
is, “if is odd,
then is odd”.
Now the hypothesis hands us a formula for , and squaring a formula
is easy.
Proposition
0.2.2 (Even squares)
For every integer , if is even, then is even.
Idea. The hypothesis even says little
about , but “ odd” gives explicitly. So
prove the contrapositive: from , expand and look for the form
.
Proof. Let be an integer. By Theorem 0.1.1, it
suffices to prove that if is not even, then is not even. Suppose
is not even.
Since every integer is even or odd, is odd, so by Definition 0.2.1 there
is an integer
with .
Then Since is an integer, is odd by Definition 0.2.1.
Since no integer is both even and odd, is not even. This
proves the contrapositive, and hence the statement.
A contrapositive proof is a direct proof of a
different, equivalent implication. Use it when the
negated conclusion gives more to work with than the
hypothesis does.
Proof by
contradiction
To prove a statement by
contradiction, suppose that is false and deduce
something impossible: a statement together with its
negation. Why does this work? We have shown that the
implication is true, for some
statement . Its
conclusion is false in every row, so by Definition 0.1.2 the
implication can only be true if its hypothesis is false. Hence
is true.
Contradiction is the natural tool for statements that
say something cannot happen, or that
there is no object of some kind. Such
statements give nothing to start from directly, while
their negation hands us an object to study.
Statements about fractions and primes need the
language of divisibility.
Definition
0.2.2 (Divisibility and primes)
Let and be integers. We say
divides , written , if there
exists an integer with . An integer is
prime if and the only positive
divisors of are
and .
For example, since , and . The first primes are . The
integer is
not prime, because the definition
requires ;
this convention is what makes factorizations into primes
unique. In this language, is even exactly when
.
A real number is rational if it
equals for some
integers and
with , and
irrational otherwise. We use the school
fact that every rational number can be written
in lowest terms: as with , where no integer
divides
both and . (We justify this fact
at the end of this section.)
Theorem
0.2.3 (Irrationality of )
There is no rational number whose square is . That is, is
irrational.
Idea. “There is no rational with ” gives nothing to
hold, so suppose there is one, and write it in lowest
terms . Clearing
denominators gives , an integer equation. Then Proposition 0.2.2
applies twice: first is even, then (after
substituting ) is
even. That contradicts lowest terms.
Proof. Suppose, for a
contradiction, that some rational number satisfies . Write in lowest terms,
so and no
integer
divides both and
. Then , and
multiplying by ,
which is non-zero, gives Therefore is even by Definition 0.2.1, and
hence is even by
Proposition 0.2.2.
Write with
an integer.
Substituting gives , so is even. By Proposition 0.2.2
again, is even.
Thus divides both
and , which contradicts the
choice of in
lowest terms. Hence no rational number has square .
The contradiction came from the lowest-terms
condition, which is the hypothesis we chose to impose.
That is typical: in a contradiction proof, look for the
assumption you have not yet used, because the
contradiction usually comes from there.
A second classic contradiction proof, that there are
infinitely many primes, needs one more tool and appears
at the end of this section.
Proof by
cases
When a hypothesis splits naturally into
possibilities, handle each one separately. If is true, and
both and are true, then is true: whichever of
holds, its
implication delivers . The cases must
cover every possibility. They are
allowed to overlap.
Proposition
0.2.4 ( is even)
For every integer , the integer is even.
Idea. Nothing about is given, but every
integer is even or odd, and each case gives a formula
for . Factoring
first, , makes each case a one-line computation.
Proof. Let be an integer. Then
.
Since every integer is even or odd, there are two
cases.
Case 1: is
even. By Definition 0.2.1,
for some
integer . Then
, and is an integer.
Case 2: is
odd. By Definition 0.2.1,
for some
integer . Then
,
so , and is an integer.
In both cases is even by Definition 0.2.1. This
shows the claim for every integer .
Proving “if
and only if”
By the definition of the biconditional in the
previous section, means . So a proof of an “iff” has
two directions, labeled and , and each is
proved by any method we like. Often one direction is
already known.
Proposition
0.2.5 (Parity of a square)
For every integer , is even if and only if
is even.
Proof. Let be an integer.
Suppose is even,
so for some
integer by Definition 0.2.1. Then
, and is an integer, so
is even.
This is Proposition 0.2.2.
Both directions hold, so is even if and only if
is even.
Warning. Reversing the
steps is not automatic. A common slip is to
“prove the converse” by rewriting the same argument
backwards without checking that every step reverses. For
instance, from we get ; but from we only get or . Each direction
needs its own justification.
Existence
and uniqueness
To prove “there exists with ”, the most direct
method is to produce a witness and
check it. For example, “there exists an integer with ” is proved by
: indeed .
To prove “there is at most one with ”, the standard move
is: suppose
and both
satisfy , and show
.
Notice that we do not assume ; we simply
take two objects with the property and prove they are
the same. “There exists a unique ” means both existence
and at most one, so it takes both arguments.
Here is an example that we will meet again when we
study fields and groups. A binary
operation on a collection
is a rule that
assigns to each ordered pair of elements of an element of . Addition and
multiplication of integers are binary operations on
. An
identity element for is an element of such that and for
every in .
Proposition
0.2.6 (Uniqueness of the identity)
Let be a
binary operation on . Then has at most one
identity element.
Idea. Suppose and are both
identities. The only thing we know about them is how
they behave in a product, so look at the one product
that involves both, , and evaluate it in two ways.
Proof. Suppose and are both identity
elements for .
Since is an
identity, , taking in its defining property. Since is an identity, ,
taking
in its defining property. Therefore . This shows that any two identity
elements are equal.
So is
the identity for addition on , and is the
identity for multiplication. The result says nothing
about existence. Subtraction on has no identity at
all: for
every forces
, but then
, which
is not when . Uniqueness proofs
of exactly this shape will recur for zero vectors,
negatives, inverse matrices and inverse functions.
Counterexamples
By Definition 0.1.4, the
negation of “” is “”. So to refute a
universal statement, one witness suffices: a single
where fails. Such an is a
counterexample. Conversely, no number
of examples can prove a universal statement over an
infinite range.
Example
(Refuting “every prime is odd”)
Decide whether every prime number is odd. Justify
your answer.
Solution. False. The statement is
prime :
is odd, so by Definition 0.1.4 one
prime that is not odd refutes it. Take . It is prime, since
and a
positive divisor of is at most , so it is or . It is even, since
, and
hence not odd. So
is a counterexample.
Warning. Many examples
prove nothing. The number is prime for
every integer
from to . Yet the statement
“ is
prime for every ” is false: at we get , which is not prime.
Mathematical induction
Some statements are really infinitely many
statements, one for each natural number: “for every
, ”. Checking cases one at a time never
finishes. Induction replaces the infinite list of checks
by two finite tasks, like knocking over a row of
dominoes: push the first one, and make sure each domino
knocks over the next.
We take this as a basic property of the integers, not
something to prove.
Theorem
0.2.7 (Principle of Mathematical
Induction)
Let be an
integer, and for each integer let be a statement.
Suppose
- (i) (base
case) is true, and
- (ii)
(inductive step) for
every integer , if is true then is true.
Then is
true for every integer .
In the inductive step, the assumption “ is true” is called
the induction hypothesis. It is not
circular: we do not assume the whole conclusion, only
that the statement holds at one arbitrary , and we prove that it
then holds at .
Proposition
0.2.8 (Sum of the first integers)
For every integer ,
Idea. Passing from to adds exactly one
term, , to the
left side. So the step reduces to the algebra identity
, which holds after taking
out the factor .
Proof. We prove this by induction
on , using Theorem 0.2.7 with
. Let be the statement
.
Base case. For the left side is and the right side is
.
So is
true.
Inductive step. Let and suppose is true. Then where the first equality uses the induction
hypothesis .
This is .
By Theorem 0.2.7, is true for every
integer , as
claimed.
The base case does not have to be , and the step does not
have to be an equation. In this book the natural
numbers are : they
include . (Some books start at
; the next section
fixes our convention formally.)
Proposition
0.2.9 ()
For every natural number , we have .
Proof. We prove this by induction
on , with . For , . Now let
and suppose
. Then
where the strict inequality uses the induction
hypothesis and the last step uses . Hence . By Theorem 0.2.7, for every
.
The inductive step must work for
every , including the smallest ones. The following
fake proof fails exactly there.
Warning. The “all horses
are the same color” fallacy. Claim: in
every group of horses, all horses have the same color.
“Proof”: for there is nothing to show. Suppose the claim
holds for groups of horses, and take a
group of
horses . The group is
single-colored by the induction hypothesis, and so is
. The two groups share a horse, so all
horses have
its color. The claim is plainly false, so this “proof”
has a gap. Before opening the check below, try to find
the exact value of where the step
breaks.
Quick check. Where does the
inductive step in the horse argument fail?
Solution. It fails when passing
from to . The two groups
are then
and , which
share no horse, so nothing links the
color of to
that of . The
sentence “the two groups share a horse” is true only
when . Since
the step is not proved, the chain of dominoes
breaks at the very first push, and the base case alone
gives nothing.
Strong
induction and well-ordering
In some arguments, knowing alone is not enough
to reach : we
need the statement at some earlier
value, and we do not know in advance which one. Strong
induction allows the hypothesis at all earlier values at
once.
Theorem
0.2.10 (Strong induction)
Let be an
integer, and for each integer let be a statement.
Suppose that for every integer , Then
is true for every integer .
Idea. Ordinary induction applies to
the stronger statement : “ holds for all from to ”. The hypothesis is
exactly what pushes to . At the condition
“for all with
”
is vacuous, so the hypothesis already contains the base
case.
Proof. For each integer , let be the statement
“ is true for
all integers with
”.
We prove for
all by Theorem 0.2.7.
Base case. There is no integer with , so
the condition “
is true for all such ” is vacuously true. By
the hypothesis with , is true. Hence
is true.
Inductive step. Let and suppose
is true, so
holds for all
with . By
the hypothesis applied to , is true. Together with , this gives .
By Theorem 0.2.7, holds for all . In particular
holds for all
, since
includes . This proves the
theorem.
The same property of the natural numbers can be
phrased without any statements at all: there is no
endless strictly decreasing sequence of natural numbers,
so every search for a smallest example ends.
Theorem
0.2.11 (Well-Ordering Principle)
Every non-empty collection of natural numbers has a
least element: an element of the collection with
for every
in the
collection.
We take this as a basic property too. It is
equivalent to the Principle of Mathematical Induction,
in the sense that each can be proved from the other, but
we will not need that. Well-ordering is the natural
language for “take a smallest counterexample” arguments,
which are contradiction proofs in disguise.
Here is a result that needs strong induction, because
the smaller number we reach is not .
Proposition
0.2.12 (Existence of a prime factor)
Every integer has a prime divisor.
Idea. If is prime, itself works. If not,
with , and a
prime dividing
also divides . The
factor can be any
size below , so we
need the statement for all smaller values, which is
strong induction.
Proof. We use Theorem 0.2.10 with
. Let , and suppose
every integer
with
has a prime divisor.
Case 1: is
prime. Then , so is
a prime divisor of .
Case 2: is
not prime. Since , Definition 0.2.2 gives
a positive divisor of with and . Write with an integer. Since and are positive, , and because ; so and . Thus
, and
by the hypothesis
has a prime divisor , say . Then , so .
In both cases
has a prime divisor. By Theorem 0.2.10, this
holds for every .
Now the promised contradiction proof.
Theorem
0.2.13 (Infinitely many primes)
There are infinitely many prime numbers.
Idea. Suppose the primes form a
finite list. Build a number that no prime on the list
can divide: multiply them all and add . Dividing by any leaves remainder
. But Proposition 0.2.12
says this number has some prime divisor, and that prime
must be on the list.
Proof. Suppose, for a
contradiction, that there are only finitely many primes,
and list them all as . Let The list is non-empty, since is prime, and each
; hence
. By Proposition 0.2.12,
has a prime
divisor . Since
the list contains every prime, for some . Then and , so there are integers with and .
Subtracting gives . Since is an integer and , this is
impossible: is
when , and has
absolute value at least otherwise. This
contradiction shows that there are infinitely many
primes.
Writing
proofs in this book
The proofs in this book follow a few conventions.
Knowing them makes proofs faster to read, and copying
them makes your own proofs easier to check.
- The first sentence does
mathematics. Proofs open with “Let …”, “Suppose
…”, “Since …” or “By …”. The motivation has already been
given in the Idea block.
- Every step names its reason. Each
line cites a hypothesis, a definition, or an earlier
result by name, as in “by Proposition 0.2.2”.
When a display hides a reason, a clause such as “where
the first equality uses the induction hypothesis” points
to it.
- Structure is marked. Two directions
of an iff are labeled and , cases are
labeled Case 1 and Case 2, and
inductions name their base case and inductive step.
- No hidden gaps. Words like
“obviously” and “clearly” never stand in for an
argument. If a step is short, it is written out; if it
is routine and has been done before, the proof says
so.
- The ending restates the result:
“This shows …”, “This proves …”, “as claimed”.
How to read a proof here. First read
the statement and identify the givens and the goal. Then
read the Idea, which says why the argument has the shape
it has. Then read the Proof with a pencil. At each line,
ask which earlier line or result justifies it; if you
cannot answer, that is the line to reread. Finally, ask
which hypothesis each step used. If a hypothesis was
never used, either it was not needed or you have missed
a step.
Exercises
A. Check your
understanding
Exercise
(A1)
For each statement, name the proof technique you
would use first (direct, contrapositive, contradiction,
cases, induction, or counterexample), and give a
one-sentence reason. Then carry out the proof or
refutation.
- (a) The sum of two
odd integers is even.
- (b) For every
integer , if is odd, then is odd.
- (c) For every
integer ,
.
- (d) For every
integer ,
.
- (e) There is no
largest integer.
Solution.
(a)
Direct. The hypothesis gives formulas to add.
Let and
with
integers, by
Definition 0.2.1. Then
, which is even.
(b)
Contrapositive. The conclusion’s negation
“ even” gives a
formula, while “ odd” does not. By Theorem 0.1.1 it
suffices to show: if is even then is even. If , then , which
is even, hence not odd.
(c)
Induction. It is a statement for every , and is built from
. For , . If
, then
. By Theorem 0.2.7 the
claim holds for all .
(d)
Counterexample. The statement is false, so a
single witness refutes it. At , .
(e)
Contradiction. It says an object does not
exist, so assume it does. Suppose is a largest integer.
Then is an
integer with , contradicting the choice of . Hence there is no
largest integer.
B. Practice
Exercise
(B1: Contrapositive)
Prove that for every integer , if is odd, then is odd.
Solution. Let be an integer. By Theorem 0.1.1, it
suffices to prove that if is not odd, then is not odd. Suppose
is not odd. Since
every integer is even or odd, is even, so for some integer
by Definition 0.2.1. Then
, so is even. Since no
integer is both even and odd, is not odd. This
proves the statement.
Exercise
(B2: Induction)
Prove that for every integer , the sum of the
first odd numbers
is :
Solution. We prove this by
induction on ,
using Theorem 0.2.7 with
. Let be the displayed
statement.
Base case. For the left side is and the right side is
, so is true.
Inductive step. Let and suppose is true. The -st odd number is
. Then where the first equality uses the induction
hypothesis. This is .
By Theorem 0.2.7, holds for every
.
Exercise
(B3: is
irrational)
You may use the school fact that every integer has
exactly one of the forms , , with an integer.
- (a) Prove that for
every integer , if
then
.
- (b) Hence prove that
there is no rational number whose square is .
Solution.
- (a) Let be an integer. By Theorem 0.1.1, it
suffices to show that if then . Suppose . Then or for some
integer .
Case 1: . Then .
Case 2: . Then .
In both cases has the form with an integer. Since an
integer has only one of the three forms, is not of the form
, so . This proves
(a).
- (b) Suppose, for a
contradiction, that a rational number satisfies . Write in lowest terms,
so and no
integer
divides both and
. Multiplying
by
gives
.
Therefore , and by (a), . Write . Then , so and . By (a) again, . Thus divides both and , contradicting lowest
terms. Hence no rational number has square .
C. Going deeper
Exercise
(C1: Stamps of 4 and 5)
- (a) Show that each
of
can be written as with .
- (b) Prove by strong
induction that every integer can be written
as with
.
- (c) Show that cannot be written in
this form, so the bound in (b) cannot be
lowered to .
Hint: for , look at .
Solution.
(a) , , , and .
(b) We use Theorem 0.2.10 with
. Let , and suppose
every integer
with can be written as with .
Case 1: . Then has the required form
by (a).
Case 2: . Then satisfies , so by the hypothesis with
. Hence
,
and .
In both cases
has the required form. By Theorem 0.2.10, every
integer
does.
- (c) Suppose with . Since , . If
then ; if then ; if then . None of is a multiple of
, so no such exists. Hence is not of the form
.
Exercise
(C2: Division with remainder)
Let and be integers with . Let be the collection of
all non-negative integers of the form
with an integer.
- (a) Show that is non-empty.
- (b) Let be the least element of
, which exists by
Theorem 0.2.11, and
write .
Prove that .
- (c) Prove that the
pair is
unique: if with and , then
and
.
Hint for (a): try .
Solution.
(a) Take .
Then . Since and , we have , so , where the last step uses .
Hence belongs to , and is non-empty.
(b) By (a) and Theorem 0.2.11, has a least element
with
. Since
belongs to , . Suppose, for a
contradiction, that . Then , and , so belongs to . But gives ,
contradicting the choice of as the least element of
. Hence .
(c) Suppose
with . Then , so . From
the bounds, . Suppose . Then , so , contradicting . Hence , and then
, so
. This
proves uniqueness.
Together, (a)–(c) show that for integers and there are unique
integers with
and
.
With , this is
the fact that every integer is even or odd, and not
both.