61 Proofwriting 1
61 Proofwriting 1
1 Introduction
A proof is an argument for why a mathematical statement is true. In some ways it is similar
to an argument that you would write in a philosophical essay, or an argument that a lawyer
might make in a courtroom, because its goal is to convince the reader (or listener). On the
other hand, the standards of evidence in mathematics are much higher than they are in a
courtroom. A well-written proof will not convince a reader that the claim is true “more
likely than not,” or that it is true “beyond a reasonable doubt”—rather, it should leave in
the reader’s mind no doubt at all that the reasoning is correct. This means that a proof must
rely only on (a) precise logical deductions and (b) mathematical theorems that the reader
already knows and accepts as true.
Nonetheless, a proof (of the kind we are discussing) is still an argument that is ultimately
intended to be read by a human. It is important to develop the skills not only of logical rigor
and precision but also of effective writing and exposition as you learn how to write proofs. In
particular, many beginning students tend to overuse logical symbols, and underuse natural-
language (for us, English) sentences. Mathematical proofs should generally be written as one
or more paragraphs, each composed of complete sentences. Of course, often these sentences
will involve mathematical expressions, equations, or inequalities, and you will develop a feel
for how these fit into sentences. For example, the “=” sign often plays the role of a verb.
Today we will cover basic logical terms and two general proof techniques: proof by
contradiction and proof by induction. For each topic we’ll present a proof of a simple result
and break down the purpose of each line, except in the section on induction, for which instead
there is an extended explanation and proof template.
The basic mathematical proposition format is “if P, then Q.” For example,
• If n is an integer, then 2n is an integer.
• If n is an integer, then n + 1 is an integer.
1
• If n is a positive integer, then n + 1 is a positive integer.
• If you were born in February and you live in California, then your birthday is in the
winter.
Sometimes these statements are written slightly differently, as “Q if P”, or even with the the
symbol =⇒ instead. For example:
n is an integer =⇒ 2n is an integer.
Even if a proposition “if P, then Q” is true, that does not mean that the converse “if Q,
then P” is true. For example, using the four true statements above and taking the converse:
• If your birthday is in the winter, then you were born in February and live in California.
[FALSE]
If both the proposition and the converse are true, then the statement “P if and only if Q”
(equivalently “Q if and only if P”) is true. This statement can also be written as “P iff Q”
or “P ⇐⇒ Q”. For example:
If you are proving an if and only if statement, or an equivalence, your proof will usually need
to have two parts: one for the if part and one for the only if part.
Examples:
2
Finally, we want to introduce two quantifiers, which you will see more of next week. These
are “for all” and “there exists”. Often choosing the right quantifier can make a statement
true or false, interesting or boring. Here are some examples:
There are also symbols for these two qualifiers. ∀ means for all and ∃ means there exists.
These are useful when writing informally because they are quicker to write in longhand than
“for all” and “there exists.” But they are not commonly used in formal proofs—you should
write out the English words.
are all examples of universal statements. Note that they don’t all reference the set explicitly:
“The cube of any odd integer is odd” is a short way of saying “For every element x in the
set of odd integers, x3 is odd.” If the set in question is finite, you can prove the statement
by checking each individual element (although you probably do not want to). However, if
the set in question is infinite, then you cannot prove the statement by checking any number
of individual elements. In this case, there are a number of approaches. One is to prove
universal statements using definitions. The best way to start such an approach is to write
down all definitions involved so you know what tools you have to work with. Here are some
very simple examples so you can see how this works.
3.1 Examples
Proposition. The square of an even integer is a multiple of 4.
Short Proof. Any even integer a can be written as a = 2b for some integer b, and then
a2 = 4b2 . Because b2 is an integer, a2 is a multiple of 4.
3
Longer Proof. Let a be an even integer. Then a = 2 · b for some integer b. We have
a2 = (2 · b) · (2 · b) = 4 · b2 . Because the product of two integers is an integer and b is an
integer, b2 is an integer. This means that a2 is the product of 4 and an integer, i.e. a2 is a
multiple of 4. Since a was an arbitrary even integer, we conclude that every even integer is
a multiple of four.
We will now break down the longer proof. Which type of proof should you be aiming
for? In general, when writing a proof, you should write every fact that is not completely
obvious to you (or, as you get more advanced, that you do not expect to be obvious to your
reader!). Thus your beginning proofs will be a bit longer than proofs that will appear in
class or in books. This tendency is completely fine and is in fact to be encouraged! Short
and clear proofs are a culmination of developed skill, not a starting point.
Computing 22 , 42 , 62 , and 82 and seeing that they are all multiples of 4 is not a proof,
even though by computing these examples you may see why the proposition should be
true. Our goal is to show that the square of every even integer is a multiple of four, and
to do this we need a “general” even number. Any specific even number will not suffice,
even if we check a million of them. We give our “general” even number the name “a” so
that we can refer to it in our argument.
We have a2 = (2 · b) · (2 · b) = 4 · b2 .
We are interested in what the square of a “general” even number is, so we square our
“general” even number a. The square turns out to be a nice expression, 4 · b2 .
Recall that our goal is to show that a2 is a multiple of 4, since a is our “general” even
integer. We have shown that a2 = 4 · b2 , so we’re done if b2 is an integer, because then a2
has the form of a “general” multiple of 4. You are free to use the fact that the product
of two integers is again an integer without explanation. Because b2 = b · b, b2 is thus an
integer.
4
This means that a2 is the product of 4 and an integer, i.e. a2 is a multiple of 4.
Putting together the two previous sentences, we see that a2 has the form of a “general”
multiple of 4. Compare and contrast this sentence with the second sentence of the proof.
There we unravel the definition of an even number, and here we “reravel” the definition
of being a multiple of 4.
Since a was an arbitrary even integer, we conclude that every even integer is a multiple
of four.
This line explains and justifies the inclusion of the first sentence of the proof, for we
really have proved that the result holds for any even number. It is also good practice in
to finish a proof by stating the result that you have just proved.
It is nice to include a symbol to indicate the end of a proof. Many books use this box.
Some people instead put Q.E.D., which stands for the Latin quod erat demonstrandum,
meaning “which was to be demonstrated/shown”. This is a translation of the Ancient
Greek phrase, óπρ ´δι δίξαι, originally used by Euclid at the end of his proofs.
Here is a second example of a universal statement and its proof, with a twist.
Proposition. Let n be an integer. If n2 is even, then n is even.
To prove this proposition, we will use a trick from the previous section and prove the con-
trapositive. Note that this is still an example of a proof of a universal statement using
definitions.
Proof. We will prove the contrapositive: if n is odd, then n2 is odd. If n is odd, then it can be
written as n = 2a+1 where a is an integer. Then n2 = (2a+1)2 = 4a2 +4a+1 = 2(2a2 +2a)+1.
Because 2a2 + 2a is an integer, n2 is an odd integer. Thus any odd number n has an odd
square, and so we conclude by the contrapositive that any even square n2 has an even root
n.
Proposition. The product of two rational numbers is rational.
Proof. Let ab , dc ∈ Q. We have
a c ac
· = .
b d bd
By definition, a, b, c, d ∈ Z and b, d 6= 0. Since the product of two integers is an integer,
ac, bd ∈ Z. Since neither b nor d is zero, bd 6= 0 as well. This implies that ab · dc = pq , where
5
p = ac and q = bd are integers and q 6= 0. That is, ab · dc is a rational number. Thus, since
a c
, ∈ Q were arbitrary rational numbers, we conclude that the product of two rational
b d
numbers is rational.
3.2 Exercises
Exercise 1. Prove that the sum of two odd integers is even.
Exercise 2. Prove that the product of two integers which are perfect squares is a perfect
square.
Exercise 3. Prove that the sum of two rational numbers is a rational number.
Exercise 4. If a, b ∈ Z, we say that a divides b if there exists a c ∈ Z such that b = ac. We
use the notation a | b to mean that a divides b. For example, 2 | 4, 3 | −6, and 13 | 143.
• Show that 1 divides any integer.
• Show that if a | b and b | c, then a | c. That is, the divisibility relation is transitive.
4 Proof by contradiction
Suppose we want to prove some mathematical statement. One strategy is to show that if
the statement weren’t true, then we’d be led to a conclusion that we know to be false. Thus,
statement must be true, for assuming that it is false leads to a contradiction.
4.1 Examples
We start with a simple example to understand this technique.
Proposition. If z ∈ R is irrational, then so is −z.
Proof. Let z ∈ R be irrational. Assume for the sake of contradiction that −z were rational.
Then there exist p, q ∈ Z with q 6= 0 such that −z = pq . But then z = − pq = −p
q
. This implies
that z is rational, which gives a contradiction since we assumed that z was irrational.
We will now break down the proof.
Let z ∈ R be irrational.
6
As in any proof of a universal statement, we take z to be an arbitrary irrational
number.
You should signal some way at the beginning of a proof by contradiction that this is
the technique that you are planning to use. After we inform the reader of our strategy,
we state the negation of the result that we are trying to prove. If z were not irrational,
then it would be rational by definition.
This is the definition of what it means for z to be rational. Since we’re trying to
derive a contradiction from z being rational, we should have to invoke the definition at
some point.
−p
But then z = − pq = q
.
There is nothing stopping −z from being rational when z ∈ R is arbitrary, but the
proposition we’re trying to prove has us assume that z is irrational. In fact, this is the
only thing we’re assuming, so we must use it some time in the proof. We want to connect
what we know about −z to what we know about z somehow. Since z is just −z times
(−1), z must be equal to − pq = −p
q
.
This implies that z is rational, which gives a contradiction since we assumed that z
was irrational.
The previous line told us that z can be written as the quotient of two integers −p
and q, q 6= 0. So by definition, z is rational. But by hypothesis z is irrational. Since a
number cannot be both rational and irrational, this is a contradiction.
7
Proposition. For every real number x ∈ [0, π/2], sin x + cos x ≥ 1.
Proof. Assume for the sake of contradiction that there exists such an x ∈ [0, π/2] so that
sin x + cos x < 1. By the choice of domain, sin x, cos x ≥ 0 so that sin x + cos x ≥ 0.
Then sin2 x + cos2 x + 2 sin x cos x < 1, and so 2 sin x cos x < 0. This means that either
(sin x) or (cos x) must be less than 0, but that is a contradiction of our choice of x, because
0 ≤ x ≤ π/2. Thus for any x ∈ [0, π/2], sin x + cos x ≥ 1.
4.3 Exercises
Exercise 5. Prove that there are no rational solutions to the equation x3 + x + 1 = 0.
Exercise 6. Prove that there are no common prime factors of n and n + 1.
√
Exercise 7. Prove that 5 is irrational.
Exercise 8. Let z > 0 be irrational.
√
• Show that z is irrational.
√
• Show that n z is irrational for all integers n ≥ 3 as well.
5 Proof by induction
The second strategy that we’ll cover today is that of proof by induction. If you are interested
in computer science, then this proof strategy will be very important to you in the future.
It is easiest to explain the method by presenting an example first. Let’s prove the equality
1 + 2 + · · · + 2n = 2n+1 − 1.
Checking it for the case n = 1 is easy: the left hand side is 1 + 2 = 3, and the right hand
side is 21+1 − 1 = 4 − 1 = 3 as well. Suppose that we have checked it by hand for n up to
8
10, and have gotten bored of all of the arithmetic. To prove it for the case n = 11, we just
have to note that the left hand side is
(1 + 2 + · · · + 210 ) + 211 ,
and we have proved the result for n = 11. We can generalize this argument. Suppose that
we have proved the claim for all integers n ≤ k. That is, we have shown that
1 + 2 + · · · + 2n = 2n+1 − 1
for all integers n ≤ k. Then we have all we need to prove the claim for n = k + 1, for
1 + 2 + · · · + 2k+1 = (1 + 2 + · · · + 2k ) + 2k+1 ,
and we know the result for n = k: 1 + 2 + · · · + 2k = 2k+1 − 1. Thus, we can plug it in the
equation above to get
The outline above gives the basic structure of any inductive proof, where you are proving
a statement P(n) with a parameter n. Such a proof needs both a base case, which here
is n = 1, and an inductive step, which proves the desired statement P(k + 1) by assuming
P(k). Often the statement for P(k) is called the inductive hypothesis. Using the inductive
hypothesis to prove P(k + 1) is usually the difficult part. Note that the base case does not
need to be at n = 1. Sometimes it is at n = 0, or n = 2, or n = 10. Whatever base case you
pick, P (n) is true for all n beyond the base case.
What are some examples of statements P(n) that can be proven by induction?
• 1 + 2 + · · · + 2n = 2n+1 − 1
Pn n(n+1)
• i=0 i = 2
.
9
Proposition. Every integer n ≥ 2 can be written as a product of prime numbers.
Proof. We prove this statement by induction. The number is 2, so the statement is true
for n = 2. If we assume that the statement is true for all n ≤ k, i.e. that all integers
2 ≤ n ≤ k have a prime factor, we will now prove the same for k + 1. If k + 1 is prime, then
it itself provides a factorization into primes. If k + 1 is not prime, then by definition it equals
k +1 = a×b where both a and b are integers smaller than k +1. By the inductive hypothesis,
both a and b have a factorization into prime numbers. Multiplying these factorizations gives
a factorization of k + 1 into prime numbers, as we wished to show. Thus every integer n ≥ 2
can be written as a product of prime numbers.
First, note that here the base case is n = 2. More importantly, note that our inductive
hypothesis was not P(k). Instead, it was P(2) and P(3) and P(4) and . . . and P(k).
Sometimes this is called strong induction or complete induction. It is logically equivalent to
the induction presented above, but sometimes it is much simpler to write!
To help you stay organized, here is a template for writing a proof by induction:
5.1 Examples
d n
Proposition. For x ∈ R and n ∈ Z>0 , dx
x = nxn−1 .
d n+1 d d
x = xn x + x xn = xn + x(nxn−1 ) = (n + 1)xn
dx dx dx
Thus the inductive step is completed, and the statement is proven.
Note that in the next example, the base case is n = 0, instead of n = 1 as above.
10
Proposition. Let r ∈ R with r 6= 1 and n ∈ Z, n ≥ 0. Then
n
X rn+1 − 1
ri = 1 + r + r2 + r3 + · · · + rn =
i=0
r−1
rn+1 −1
Pn
By the induction hypothesis, i=0 ri = r−1
, so
n+1 n
!
X X
ri = ri + rn+1
i=0 i=0
n+1
r −1
= + rn+1
r−1
rn+1 − 1 + (r − 1)rn+1
=
r−1
n+1
r − 1 + rn+2 − rn+1
=
r−1
n+2
r −1
= .
r−1
Thus, the result holds for n + 1. This completes the induction.
5.2 Exercises
Exercise 9. Prove by induction that
n
X n(n + 1)
i= .
i=0
2
11
6 General tips
These tips will hold in general when you are writing proofs. We’ll remind you of them next
week because they are important! The the purpose of a proof is to communicate an
argument. A common mistake with beginning proof writers is to write down a proof that
is less complete than one they would give verbally. But your writing alone must convey the
argument without you being there to explain what you meant to say. Here are some general
guidelines to follow which will make your proofs clearer and more readable:
• Signal to your reader what you are doing in your proof. Some suggestions:
– If you are proving a universal statement about elements in some set (for example,
a vector space), say that you are arguing with a general element of that set. For
example, don’t just start doing an argument by talking about “v” without saying
what v is.
– If you are doing a proof by contradiction, say at the beginning of the proof that
you are doing a proof by contradiction.
– If you are doing a proof by induction, say at the beginning of the proof that you
are doing a proof by induction and clearly label the base case and induction step.
– If at some point in the proof you want to break the argument up into cases, say
that you are breaking the proof up into cases and label the cases.
– If your proof has multiple parts (for example, an “ ⇐⇒ proof” or showing that
two sets are equal), then before each of these parts state what you are proving.
• When you are writing your homework, try to figure out most or all of the proof before
starting to write out your final copy. This technique will make it much easier to signal
effectively.
12