Understanding Mathematical Proof
Understanding Mathematical Proof
Features
• Presents a rigorous yet accessible introduction to one of the defining
concepts of mathematics
• Explores the structure of mathematical proof
• Classifies different types of proof
• Develops all the standard techniques for proving mathematical
theorems
• Provides hints and guidance on finding the appropriate proof
• Includes many elementary examples and, in addition, develops
proofs in linear algebra, group theory, and real analysis that will be of
Taylor • Garnier John Taylor
particular interest to undergraduate mathematicians
Rowan Garnier
K15018
John Taylor
Rowan Garnier
This book contains information obtained from authentic and highly regarded sources. Reasonable
efforts have been made to publish reliable data and information, but the author and publisher cannot
assume responsibility for the validity of all materials or the consequences of their use. The authors and
publishers have attempted to trace the copyright holders of all material reproduced in this publication
and apologize to copyright holders if permission to publish in this form has not been obtained. If any
copyright material has not been acknowledged please write and let us know so we may rectify in any
future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced,
transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or
hereafter invented, including photocopying, microfilming, and recording, or in any information stor-
age or retrieval system, without written permission from the publishers.
For permission to photocopy or use material electronically from this work, please access www.copy-
right.com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222
Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that pro-
vides licenses and registration for a variety of users. For organizations that have been granted a pho-
tocopy license by the CCC, a separate system of payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are
used only for identification and explanation without intent to infringe.
Visit the Taylor & Francis Web site at
http://www.taylorandfrancis.com
and the CRC Press Web site at
http://www.crcpress.com
Contents
Preface ix
List of Figures xi
List of Tables xv
1 Introduction 1
1.1 The need for proof . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 The language of mathematics . . . . . . . . . . . . . . . . . . 3
1.3 Reasoning . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4 Deductive reasoning and truth . . . . . . . . . . . . . . . . . 8
1.5 Example proofs . . . . . . . . . . . . . . . . . . . . . . . . . 11
v
vi
Bibliography 385
Index 387
Preface
ix
x
is not, by itself, enough. So we also provide some hints and guidance on some
of the approaches the proof writer may adopt to find an appropriate proof.
The book is structured as follows. Chapter 1 introduces the kind of reasoning
that mathematicians use when writing their proofs and gives some example
proofs to set the scene. In chapter 2, we introduce some basic logic in order
to understand the structure both of individual mathematical statements and
whole mathematical proofs. Much of the language of mathematics is based on
the notions of sets and functions, which we introduce in chapter 3. In chapter 4,
we dissect some proofs with a view to exposing some of the underlying features
common to most mathematical proofs. In the last four chapters of the book, we
explore in more detail different types of proof; to continue the analogy above,
we explore in more detail each of the enclosures in the zoo of mathematical
proofs.
RG and JT
September 2013
List of Figures
xi
xii
1
5.1 Possible starting points in the proof of x + ≥ 2 (x ∈ R+ ) . 177
x
1
5.2 Working backwards from x + ≥ 2 (x ∈ R+ ) . . . . . . . . 178
x
5.3 The Smarandache function . . . . . . . . . . . . . . . . . . . 185
5.4 Injective and surjective functions with finite domain and
codomain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
5.5 Symmetries of a rectangle . . . . . . . . . . . . . . . . . . . . 203
5.6 Composing symmetries of a rectangle . . . . . . . . . . . . . . 204
5.7 Symmetries of an equilateral triangle . . . . . . . . . . . . . . 205
5.8 Vector in R . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
210
5.9 Addition and scalar multiplication of vectors in R2 . . . . . . 210
5.10 A plane in R3 . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
5.11 Eigenspaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
5.12 Possible behaviour of sequences . . . . . . . . . . . . . . . . . 228
5.13 Convergent sequence . . . . . . . . . . . . . . . . . . . . . . . 229
xiii
xv
List of Symbols
Logic
P ⇔Q Biconditional connective: P if and only if Q 23
P ⇒Q Conditional connective: if P then Q 21
P ∧Q Conjunction: P and Q 18
Γ T Deduction in an axiom system:
T can be deduced from the statements in Γ 168
P1 , . . . , Pn ⊢ Q Deducible from: Q is deducible from P1 , . . . , Pn 69
P YQ Exclusive disjunction: P or Q but not both 20
P ∨Q Inclusive disjunction: P or Q 19
∃x • P (x) Existential quantifier: there exists x such that P (x) 49
P1 ≡ P2 Logical equivalence: P1 is logically equivalent to P2 35
P1 P2 Logical implication: P1 logically implies P2 42
¬P Negation of a proposition P : not P 17
∀x • P (x) Universal quantifier: for all x, P (x) 49
xvii
xviii
Group Theory
x∗y Binary operation: the result of combining x and y 201
(G, ∗) Group: G is a group with binary operation ∗ 201
e Identity element of a group 201
x−1 Inverse of an element x in a group 201
ker θ Kernel of a morphism θ 262
xix
Linear Algebra
det X Determinant of a matrix X 297
S⊕T Direct sum of subspaces 251
E(λ) Eigenspace of an eigenvalue λ 221
In Identity n × n matrix 225
im T Image of a linear transformation 226
ker T Kernel of a linear transformation 226
T :U →V Linear transformation between vector spaces 226
∥a∥ Magnitude of a vector a 209
−v Negative of a vector v in a vector space 211
N (A) Null space of a matrix A 226
S+T Sum of two subspaces S and T or a vector space 225
XT Transpose of a matrix X 294
0 Zero matrix 246
0 Zero vector in a vector space 211
Analysis
inf X Infimum of a set X or real numbers 264
lim f (x) = ℓ Limit of a function f as x tends towards a 233
x→a
lim an = ℓ Limit of a sequence: (an ) converges to limit ℓ 228
n→∞
(an ) Sequence a1 , a2 , a3 , a4 , . . . of real numbers 227
sup X Supremum of a set X or real numbers 264
Chapter 1
Introduction
1
2
bols. Thus, for example, the representation of fractions as a/b and the rule
a/b + c/d = (ad + bc)/bd belong to this world. The formal world is one where
formally expressed properties are used to specify mathematical structures.
For example, some readers may be familiar with the mathematical notions of
‘group’, ‘vector space’, ‘field’, and so on; these belong to the formal world.
Properties of these mathematical objects are deduced by formal proof rather
than from direct experience. In this book, we will be operating (mostly) in the
formal world, for it is here that the concept of mathematical proof belongs.
For mathematicians, Tall’s formal world, where proof plays a central role, is
the world of ‘their’ mathematics. In 1929, the eminent English mathematician
G. H. Hardy articulated the special role that proof plays in mathematics when
he wrote, ‘It is generally held that mathematicians differ from other people
in proving things, and that their proofs are in some sense grounds for their
beliefs’ [8]. Hardy is discussing the formal world of mathematics and he makes
a critical observation that mathematicians differ from others in two crucial
respects: in what they do (they prove things) and, more deeply, in their criteria
for belief (the existence of proofs). In this way, the notion of proof is central
to the formal world of mathematics.
If the notion of a mathematical proof is one of the defining features of mathe-
matics, for those learning the subject, it is also one of its greatest challenges.
In fact, there are (at least) three challenges for students of mathematics asso-
ciated with the notion of proof. The first is to understand why mathematicians
are ‘obsessed’ with their proofs. For instance, why is it that (pure) mathemat-
ics textbooks are peppered with proofs? A second challenge is to understand
what constitutes a proof and, just as important, to understand when an argu-
ment does not constitute a proof. The final — and most difficult — challenge
is to develop an ability to construct one’s own proofs. In this book we aim to
address each of these challenges.
A simple, if incomplete, description of a mathematical proof is ‘a precise logi-
cal argument of a certain type that establishes a conclusion’. One of our aims
is to explore this further to provide a fuller and more detailed understanding
of what constitutes a proof. Of course, proofs are written by human beings,
so there are many different styles and approaches adopted. Proofs are written
for a variety of different audiences in various cultures and in many languages.
A proof that may be appropriate for an audience at one level of mathematical
development may not be appropriate for an audience with a deeper under-
standing of the subject. Nevertheless, we believe that there is something that
is shared by (almost) all mathematical proofs. We shall attempt to delve be-
neath surface features such as style and language to examine the structure of
the argument that lies beneath. This aspect of the book could be summarised
as ‘proofs dissected, examined, and their structure revealed.’
Our second goal is probably more difficult to achieve. Put simply, it is to show
how to construct proofs. On one level, such a goal is unattainable. There is
3
Like any specialised area of human activity, mathematics has its own language
and commonly used terms that make it less accessible to the outsider. For
example, two mathematicians in discussion may be heard uttering phrases
similar to the following.
‘I have a counter-example to your recent conjecture published in the
Journal of Esoteric and Obscure Pure Mathematics.’
‘Ah, but your proof relies on Zorn’s Lemma. Can you find a proof
that is independent of the Axiom of Choice? ’
‘If you factor out the nilpotent elements, your group is torsion-free.’
Whereas these statements might make perfect sense to a professional mathe-
matician, to an outsider they are almost certainly completely opaque. In this
section, we introduce informally some of the language that is frequently used
in mathematics texts. Many of the terms we introduce here will be considered
in more depth later in the book.
quently found. Wiles and a colleague, Richard Taylor, were able to ‘plug the gap’ and
complete the proof in 1994.
6
1.3 Reasoning
• I know it takes me an hour to prepare, cook, and eat this evening’s meal.
I need to leave home at 8.30 pm to go out with my friends. So I need to
start preparing my evening meal by 7.30 pm at the latest.
• The car approaching in that direction is signaling to turn off the road.
The car approaching from the other direction is going slowly. Therefore
it is safe for me to cross the road.
• When people catch a cold they cough and sneeze. If I am in close prox-
imity to someone with a cold, I am likely to catch it. Mike is coughing
and sneezing. So I should stay away from him.
• I know that whenever I drop an object, it will fall to the ground. If a glass
falls to the ground, it will smash. So I must be very careful carrying this
tray of glasses.
Most human reasoning is based on experience, either our own direct experience
or some shared, collective experience. For example, consider the following
statement, related to the last example above.
If I drop this glass, then it will hit the floor and smash.
At some time or other, most of us will either have dropped a glass and seen it
smash or observed someone else do so. Our reasoning here is therefore based
on direct experience. Experience tells us that when we drop glasses they (a)
7
fall to the floor and (b) when they hit the floor, they smash. Hence we deduce
that if I drop this glass, then it will hit the floor and smash.
The kind of reasoning based on experience and experimentation is called in-
ductive reasoning. Individual or collective experience tells us that a certain
action (for example, dropping a glass) results in a particular consequence (the
glass hits the floor and smashes) because:
• we have observed ‘many’ times that the certain action results in the
particular consequence; and
• we have never — or almost never — observed the certain action not to
result in the particular consequence.
This ‘reasoning from experience’ will not always be from direct, personal ex-
perience but may be based on collective experience of a group (or indeed, the
collective experience of human kind). For example, neither of the authors of
this book has ever sky-dived although we know people who have. Nevertheless,
we believe that the action of sky-diving results in the sky-diver experiencing
an adrenalin rush. This belief is based on the collective experience of those
who have engaged in the activity of sky-diving. Similarly, imagine a scenario
where a young child is playing with a pair of scissors. The child’s mother might
say:
Don’t cut the lamp flex! If you cut the flex, then you will
get electrocuted and it will hurt you.
In this case, we hope that the statement is not based on the direct experi-
ence of the mother or child. However, the mother still ‘knows’ that cutting
a live electric flex causes electrocution and that hurts! This is part of our
shared collective experience; some people have experienced this directly and
this experience is then shared more widely.
Inductive reasoning — reasoning based on (direct or indirect) experience and
observation — is probably the basis for most human knowledge and belief. But
it does not provide absolute certainty. (The next time I drop a glass it might
not break.) This is why, for example, in criminal law, the test of guilt is ‘proof
beyond reasonable doubt’ rather than proof beyond all doubt. In assembling
a web of evidence — forensic, eye-witness, expert opinion, circumstantial, etc.
— the criminal prosecutor can rarely, if ever, achieve absolute certainty of
guilt.
Inductive reasoning is also the basis for acceptance of scientific theories. A
scientific theory can be thought of as an intellectual framework (which is
frequently mathematical in nature) that explains existing observations and
predicts new ones. The more experiments that produce data consistent with
the theory, the stronger our belief in the theory becomes, but no amount
of experimental data will prove a theory to be correct. A single experiment
(conforming to the established scientific criteria of reliability and repeatabil-
ity) that conflicts with the theoretical framework can invalidate it. Indeed,
8
in a bit more detail what it means to say that one statement follows inevitably
from others.
Example 1.1
Consider the following piece of reasoning.
In this case the first two statements are true as before but the final statement
is false. An obvious requirement of any piece of valid reasoning must be that,
if the initial (above the line) statements are true, then the (below the line)
conclusion must also be true. Hence this second reasoning fragment is clearly
invalid. Each of the two reasoning fragments has the following form.
If any integer has property P , then its square also has property P .
A particular integer n does not have property P .
Therefore n2 does not have property P .
The second instance of this form of reasoning shows that it is not valid. The
purported conclusion does not ‘follow inevitably’ from the given initial state-
ments. The important point to note here is that whether a piece of reasoning
is valid (or not) depends on the form of the reasoning fragment, not on the
truth of the individual statements. In some cases, it will not be immediately
10
If any integer has property P , then its square also has property P .
For a particular integer n, its square n2 does not have property P .
Therefore n does not have property P .
Example 1.2
Now consider the following piece of reasoning.
Does this mean that the reasoning itself is invalid? In fact, the real reason
why the conclusion is false is because one of the ‘initial’ statements is false.
The statement
This is, indeed, a valid piece of reasoning. Again, this example emphasises that
whether a piece of reasoning is valid depends on the structure of the fragment
and not the truth of the individual statements.
11
We conclude this chapter by giving proofs of two simple results about the
integers or whole numbers. In each case, readers will be able convince them-
selves of the truth of the result ‘beyond reasonable doubt’ by considering a
selection of example integers and checking the result in each case. Our proofs
will be short deductive proofs that, we hope, establish the results ‘beyond all
doubt’.
We shall examine the structure of mathematical proofs in more detail later but,
in broad terms, a proof of a theorem must show that, given the truth of certain
‘precursor’ statements that will be assumed as part of the reader’s ‘background
knowledge’, the truth of the theorem inevitably follows. Normally, such a proof
takes the form of a sequence of statements whose truth is guaranteed either
because it is assumed background knowledge or because it follows from earlier
statements in the proof itself. In other words, the truth of each statement
in the proof is established using valid deductive reasoning from the truth of
other statements whose truth is known or assumed.
Example 1.3
Consider the following theorem. In this example, we will give a proof of the
theorem (which is why it is legitimate to call it a theorem). Although we will
try not to labour this too much, we will examine the statement of the theorem
and its proof in rather more detail than is normal in a mathematics text.
Theorem 1.1
For all integers n, if n is odd, then n2 is odd.
12
We will explore the structure of individual statements such as this more fully
in chapter 2. For now, it is sufficient to note that this is a conditional statement
of the form
if (statement 1), then (statement 2).
Example 1.4
In this example, we will give alternate proofs of the following theorem.
Theorem 1.2
For all integers n, n2 + n is even.
As in the previous example, we need the following property that defines what
it means for an integer to be even.
Our first proof considers separately the two possibilities for n: either it is even
or it is odd. Then it uses the evenness or oddness properties for n, together
with a little algebra, to deduce the evenness property for n2 + n.
Proof 1.
There are two cases to consider: n is even or n is odd.
Case 1: n is even.
Then n = 2m for some integer m. Therefore
n2 + n = (2m)2 + 2m
= 4m2 + 2m
= 2(2m2 + m), where 2m2 + m is an integer.
Case 2: n is odd.
Then n = 2m + 1 for some integer m. Therefore
n2 + n = (2m + 1)2 + 2m + 1
= 4m2 + 4m + 1 + 2m + 1
= 4m2 + 6m + 2
= 2(2m2 + 3m + 1), where 2m2 + 3m + 1 is an integer.
This proof is probably the most obvious way of establishing the given result,
especially given our proof in the previous example. It is not unusual to break
a proof down into separate cases and consider each separately. The only pre-
requisite knowledge for the proof is the evenness and oddness properties and
some basic algebra. Compare this with the following, much shorter proof.
Proof 2.
Let n be an integer. Then n2 + n = n(n + 1).
Now n and n + 1 are consecutive integers, so one of them is even and the
other is odd (but we don’t know which is which). Hence their product is the
product of an even and an odd integer, which is even.
Hence n2 + n = n(n + 1) is even.
This second proof is clearly much shorter, avoids the need for separate cases
and requires much less algebra. However, it does require the clever observation
that factorising n2 + n provides a helpful first step. This proof also assumes
an additional piece of background knowledge that the product of an even and
an odd integer is even. If we accept this as fact, then surely the second proof
is simpler and, arguably, more elegant. Some readers might reasonably object
that the proof is not complete as it has not established the ‘missing’ piece of
background information. To overcome these objections, we could replace the
penultimate sentence with the following.
Exactly how much background information may be assumed and how much
must be included explicitly in a proof will always be a matter of judgement
by the person constructing the proof.
No doubt some readers will prefer our first proof and some will think the
second one is better. That is as it should be — there is no ‘right answer’ to
the question, which is the better proof?
Chapter 2
Logic and Reasoning
2.1 Introduction
15
16
Note that in some cases we will know the truth value of a proposition, but in
others we may not. For example, in the first two statements above, we need to
know some geography (of North America and the British Isles respectively) in
order to know their truth values. The truth value of proposition 4, ‘today is my
birthday’, depends on who utters the statement and when. If the statement is
true when I utter it, then it will be false if I utter the statement 24 hours later.
The two sentences involving the decimal expansion of π are propositions since
they are definitely true or false. We can identify that proposition 5 is true using
a calculator, spreadsheet, or other software to evaluate π = 3.14159265 . . ..
Proposition 6 is a little more tricky. Although the 200 millionth decimal digit
of π is known,1 we (the authors) do not know its value. So, although we know
that statement 6 is definitely true or false, we don’t actually know which it is.
Statement 7 is a famous unsolved problem in mathematics. It is known as the
Goldbach Conjecture and was first stated in 1742 by the German mathemati-
cian Christian Goldbach in correspondence with Leonhard Euler. Although
it has been verified that every even integer up some vast number (at least
1 In fact, π has been evaluated to several trillion digits.
17
1017 ) is indeed expressible as the sum of two primes, it is still currently un-
known whether every even integer greater than 2 can be so expressed. Hence,
although statement 7 is definitely either true or false, as yet no one knows
which.2
Sentences that cannot be viewed as true or false are not propositions. These in-
clude instructions, questions, exclamations, exhortations, demands, opinions,
and so forth. Hence the following are not propositions.
Negation
Given a proposition P , adding the prefix ‘It is not the case that . . . ’ or inserting
‘not’ in an appropriate place in the sentence results in another proposition with
the reverse truth value. The resulting proposition is called the negation of
P , which we will denote ¬P . This is usually read as ‘not P ’. Other notations
for negation are P̄ and ∼ P .
Example 2.1
Let P be the proposition ‘Today is my birthday.’ Then the negation of P is
the proposition ‘It is not the case that today is my birthday.’ This is a rather
unnatural sentence and a more natural way of expressing ¬P is ‘Today is not
my birthday.’
In example 2.1, we noted that there is more than one way to express negation.
Whilst adding the prefix ‘It is not the case that . . . ’ to P will always produce
the negation ¬P , there is usually a more natural-sounding sentence for the
negation. From the point of view of logic, what is important is that ¬P is
true when P is false and ¬P is false when P is true. We summarise this in
the following table, called the truth table for negation.
2 In 2013, a related conjecture called Goldbach’s Ternary Conjecture was proved by
Harald Helfgott, a Peruvian mathematician working in Paris. This states that every odd
integer greater than 5 is the sum of three primes. It is a weaker conjecture than Goldbach’s
original conjecture: if every even integer greater than 2 can be expressed as the sum of two
primes, then adding 3 to each sum of two primes proves Goldbach’s ternary conjecture. Even
the weaker ternary conjecture was extraordinarily difficult to prove. Not only did it involve
some highly sophisticated number theory, but it also required approximately 150,000 hours
(17 years) of computer processing. In fact, this was part of a larger calculation that took
approximately 440,000 hours (50 years) of computer processing. The experts still believe
that a proof of the original Goldbach conjecture is a long way off.
18
P ¬P
T F
F T
Conjunction
P Q P ∧Q
T T T
T F F
F T F
F F F
19
Note that there are four rows to the truth table because there are four possible
combinations of truth values of P and Q. It is important to realise that the
truth table defines what we mean by conjunction. Thus the conjunction P ∧ Q
has truth value T only when both the component propositions P and Q,
sometimes called the conjuncts, have truth value T; in all other cases P ∧ Q
has truth value F. There are other ways of expressing conjunction in English
other than using the word ‘and’. Consider the following propositions.
In each case, the proposition is true only when both of its component simple
propositions are true; hence, each proposition is the conjunction of its two
components. The English sentences each have slightly different nuances com-
pared with the corresponding sentences using ‘and’ to form the conjunction.
For example, the third proposition hints at a little surprise that Jim played
football while suffering from a cold. Any natural language, such as English,
can express a vast range of subtlety, emotion, and nuance that we are unable
to capture in logical expressions. However natural languages are also prone
to ambiguity. It is for this reason that legal documents, for example, which
seek to eliminate ambiguity, are written in a rather formulaic manner that
does not follow the way most people speak. Although logical expressions are
unable to capture subtlety, provided they are properly formulated, they can
express statements precisely and unambiguously.
Disjunction
P Q P ∨Q
T T T
T F T
F T T
F F F
Again, we regard the truth table as defining the meaning of disjunction. Thus
P ∨ Q is false only when both component propositions (called the disjuncts)
20
are false; if either or both of the disjuncts are true, then the disjunction is
true. In particular, note that P ∨ Q is true when both P and Q are true. For
example, the disjunction
Today is my birthday or I am having a party
should surely be regarded as true when I am enjoying my birthday party. This
is the so-called inclusive use of disjunction and it is the default interpretation
in logic.
There is an alternative form of disjunction, called exclusive disjunction,
that is denoted P Y Q. In this case, the (exclusive) disjunction of P and Q is
false when both P and Q are true. The truth values of P Y Q are defined by
the following truth table.
P Q P YQ
T T F
T F T
F T T
F F F
This often leads to sentences which are somewhat unnatural in English. For
example, you will receive a fine or you have diplomatic immunity but not both.
However, since disjunctive statements can often be interpreted inclusively, we
will add ‘but not both’ whenever the exclusive interpretation is the intended
one.
Conditional
1. If the backspace key is pressed, then the cursor moves one place to the
left.
2. If I leave my umbrella at home, then it will rain.
3. If you break the speed limit, you will receive a fine.
4. If n is a prime number, then n is not a perfect square.
Note that the word ‘then’ is sometimes omitted from the phrase ‘if . . . then
. . . ’. This is illustrated in the third proposition above.
If P and Q are propositions, then the conditional ‘if P then Q’ is denoted
P ⇒ Q. Here the proposition P is called the antecedent and the proposition
Q is called the consequent of the conditional proposition. Note that P ⇒ Q
may also be expressed as ‘P implies Q’. The truth table for P ⇒ Q is given
below.
P Q P ⇒Q
T T T
T F F
F T T
F F T
Similar reasoning can be applied to the other examples listed above. Consider,
for example, the situation where I carry my umbrella with me when I leave
home. Regardless of whether or not it then rains, the statement
would sound a little curious in everyday conversation. It is for this reason that
P ⇒ Q is often read as ‘if P , then Q’ instead of ‘P implies Q’. In mathematics,
if P ⇒ Q we also say that P is a sufficient condition for Q and that Q is a
necessary condition for P .
is an alternative way of expressing ‘If you break the speed limit, then you will
receive a fine.’
If you break the speed limit, then you will receive a fine
and
If you receive a fine, then you will break the speed limit
We can illustrate this generally by comparing the truth tables for P ⇒ Q and
Q ⇒ P as shown below.
23
P Q P ⇒Q Q⇒P
T T T T
T F F T
F T T F
F F T T
This illustrates that P ⇒ Q and Q ⇒ P only have the same truth value
when P and Q are either both true or both false. The conditional proposition
Q ⇒ P is called the converse of P ⇒ Q.
Biconditional
P Q P ⇔Q
T T T
T F F
F T F
F F T
As we have seen with other connectives, there are other ways of expressing a
biconditional proposition. An alternative to ‘P if and only if Q’ is to use the
phrase ‘If and only if P , then Q’ as in the following example.
If and only if the backspace key is pressed, then the cursor moves
one place to the left.
However, since the truth values of P ⇔ Q are symmetric in P and Q, we
usually prefer the more symmetric way of expressing P ⇔ Q as ‘P if and only
if Q’. In the case where P ⇔ Q we also say that P is a necessary and sufficient
condition for Q (and also that Q is a necessary and sufficient condition for
P ). The biconditional is not frequently used in everyday discourse, which is
one reason why the linguistic constructions for it appear a little odd.
24
Truth tables
Using negation and the five connectives defined above, we can build more
complicated compound propositions such as
In order to obtain the truth values for these more complicated propositions,
we may build their truth tables column by column as we now illustrate.
Examples 2.2
Solution
Firstly, note that there are two simple propositions, P and Q, involved
in the compound proposition so, to account for the possible truth values,
we will require four rows to the truth table. For the sake of consistency,
we will always list the truth values in the following order.
P Q ...
T T ...
T F ...
F T ...
F F ...
P Q ¬Q P ∨ ¬Q P ∧ Q
T T F T T
T F T T F
F T F F F
F F T T F
Finally, we can complete the table using the truth values in the last two
columns to evaluate the truth values of (P ∨ ¬Q) ⇒ (P ∧ Q). We can
do this in two ways.
Firstly, referring to the truth table of the conditional P ⇒ Q on page 21,
note that a conditional proposition is true in all cases where the an-
tecedent is false. In our example, that situation only occurs in row 3
25
P Q ¬Q P ∨ ¬Q P ∧ Q (P ∨ ¬Q) ⇒ (P ∧ Q)
T T F T T T
T F T T F F
F T F F F T
F F T T F F
Solution
Since there are three simple propositions P , Q, and R involved in the
compound proposition, we will need eight rows in the truth table to
capture all the possible combinations of truth values. Again, for the
sake of consistency and to ensure that we always list all eight different
possibilities, we will always list the truth values in the order shown
below.
P Q R ...
T T T ...
T T F ...
T F T ...
T F F ...
F T T ...
F T F ...
F F T ...
F F F ...
P Q R P ∨Q Q∧R (P ∨ Q) ⇒ (Q ∧ R)
T T T T T T
T T F T F F
T F T T F F
T F F T F F
F T T T T T
F T F T F F
F F T F F T
F F F F F T
Solution
Building up the truth table column by column, we obtain the truth table
shown below. Note that, so that the table does not become unwieldy, we
have labelled P ∧ ¬R as A (column 5) and Q ∧ ¬(P ∨ R) as B (column
7). This allows us to express the compound proposition (P ∧ ¬R) ⇔
(Q ∧ (P ∨ R)) simply as A ⇔ B.
Observing the truth table for the biconditional proposition P ⇔ Q on
page 23, we may note that a biconditional is true when its component
simple propositions have the same truth value and is false when its
component simple propositions have the opposite truth values. This ob-
servation allows us to complete the final column of the truth table.
A B
P Q R ¬R P ∧ ¬R P ∨R Q ∧ (P ∨ R) A⇔B
T T T F F T T F
T T F T T T T T
T F T F F T F T
T F F T T T F F
F T T F F T T F
F T F T F F F T
F F T F F T F T
F F F T F F F T
27
Examples 2.3
1. Let P : The sun is shining.
Q: It is raining.
R: There is a rainbow.
Translate each of the following propositions into symbolic form.
(i) If the sun is shining and it is raining, then there is a rainbow.
(ii) It is not raining and the sun is shining.
(iii) If there is no rainbow, then the sun is not shining.
3 This was taken by Lynne Truss as the title for her best-selling book on the importance
of correct punctuation.
28
(iv) Either it is not raining or, if the sun is shining, then there is a
rainbow.
(v) There is not a rainbow and it is raining if and only if the sun is
not shining.
Solution
(i) There are two connectives in the sentence: a conditional ‘if . . . then
. . . ’ and a conjunction ‘. . . and . . . ’. However the ‘top-level’ struc-
ture of the sentence is a conditional and the conjunction only ap-
pears in the antecedent of the conditional proposition:
If (the sun is shining and it is raining), then (there
is a rainbow ).
Therefore we may symbolise the proposition as
(P ∧ Q) ⇒ R.
(¬Q) ∧ P.
¬R ⇒ ¬P.
¬Q Y (P ⇒ R).
¬Q ∨ (P ⇒ R).
¬R ∧ (Q ⇔ ¬P ) and (¬R ∧ Q) ⇔ ¬P
2. Let P : Jo is on holiday.
Q: Jo goes swimming.
R: Jo studies logic.
Translate each of the following propositions into naturally sounding En-
glish sentences.
(i) P Y Q
(ii) Q ⇒ ¬R
(iii) R ∨ (P ⇒ Q)
(iv) (R ∧ ¬Q) ⇒ ¬P
(v) (P ∧ Q) ∨ R
30
Solution
P Q P ∧Q P ∨Q (P ∧ Q) ⇒ (P ∨ Q)
T T T T T
T F F T T
F T F T T
F F F F T
Notice that, no matter what the truth values of the component simple propo-
sitions P and Q, the compound proposition (P ∧ Q) ⇒ (P ∨ Q) is always true.
This means that the compound proposition is true by virtue of the structure
of the proposition itself and not its content. We can see this by substituting
particular propositions for P and Q. For example, suppose
P : Today is my birthday
Q: I am happy.
Clearly, the negation of a tautology will always have truth value F. Any com-
pound proposition with this property is called a ‘contradiction’. An example
of a contradiction is the proposition (¬P ∧ Q) ∧ (P ∨ ¬Q). This is shown in
the following truth table.
32
P Q ¬P ¬Q ¬P ∧ Q P ∨ ¬Q (¬P ∧ Q) ∧ (P ∨ ¬Q)
T T F F F T F
T F F T F T F
F T T F T F F
F F T T F T F
Definition 2.1
A compound proposition is a tautology if it is true for all combinations of
truth values of its component (simple) propositions.
A compound proposition is a contradiction if it is false for all combinations
of truth values of its component (simple) propositions.
Exercises 2.1
(i) W ⇒ (¬S ∨ R)
33
(ii) (W ∧ R) ⇔ ¬S
(iii) (W ∨ R) ∧ ¬T
(iv) ¬(S ∧ W (⇒ (R ∨ ¬T )
(v) (¬R Y T ) ⇒ (S ∧ ¬W )
3. With the four propositions S, W , R, and T defined as in question 1
above, symbolise each of the following propositions.
(i) The wind blows but the rain doesn’t fall.
(ii) If the sun shines and the wind doesn’t blow, then the temperature
rises.
(iii) The temperature rises if and only if the sun shines and the rain
doesn’t fall.
(iv) Either the sun shines and the temperature rises or the wind blows
and the rain falls.
(v) If the sun doesn’t shine or the wind blows with rain falling, then
the temperature doesn’t rise.
4. Determine whether each of the following propositions is a tautology, a
contradiction, or neither.
(i) P ∧ ¬P
(ii) ¬P ∨ P
(iii) P ⇒ (P ∨ Q)
(iv) (P ∧ Q) ∧ ¬(P ∨ Q)
(v) (P ⇒ Q) ∨ (Q ⇒ R)
(vi) (P ⇒ Q) ∧ (Q ⇒ R)
(vii) (P ∧ ¬P ) ⇒ (Q ∨ R)
(viii) (P ⇒ ¬Q) ∧ (¬R ⇒ P )
5. A compound proposition A is called a substitution instance of a com-
pound proposition B if A may be obtained from B by replacing each
occurrence of one or more of its simple constituent propositions by an-
other proposition; in making the substitution, every occurrence of a
given simple proposition must be replaced by the same proposition.
For example, each of the following is a substitution instance of the propo-
sition (P ∧ R) ⇒ (Q ∨ R):
Substitution instance Substitution
(P ∧ S) ⇒ (Q ∨ S) R −→ S
(P ∧ ¬R) ⇒ (Q ∨ ¬R) R −→ ¬R
(P ∧ (S ∨ T )) ⇒ (Q ∨ (S ∨ T )) R −→ S ∨ T
(¬P ∧ R) ⇒ ((P ∧ Q) ∨ R) P −→ ¬P, Q −→ (P ∧ Q)
34
P Q ... (P ∨ ¬Q) ⇒ (P ∧ Q)
T T ... T
T F ... F
F T ... T
F F ... F
Looking at the table, we notice a curious fact: the truth values for (P ∨
¬Q) ⇒ (P ∧Q) are the same as those for Q. So, although the two propositions
((P ∨ ¬Q) ⇒ (P ∧ Q) and Q) are structurally quite different, they have the
same logical outcome in terms of their truth values. In this case we say that
the two propositions are ‘logically equivalent’.
35
Definition 2.2
Two propositions P1 and P2 are logically equivalent, written P1 ≡ P2 , if
they have the same truth values for all combinations of truth values of their
component simple propositions.
Examples 2.4
1. Show that P ⇒ Q is logically equivalent to ¬P ∨ Q.
Solution
We first construct a truth table giving the truth values for both P ⇒ Q
and ¬P ∨ Q.
P Q ¬P ¬P ∨ Q P ⇒Q
T T F T T
T F F F F
F T T T T
F F T T T
The fourth and fifth columns of the table show that ¬P ∨ Q and P ⇒ Q
have the same truth values for all combinations of truth values of P and
Q. Therefore
(¬P ∨ Q) ≡ (P ⇒ Q).
There is a danger that expressions like this stating a logical equivalence
can become complicated through the use of brackets. From now on we
will generally omit the brackets around P1 and P2 in the expression
P1 ≡ P2 .
36
(P ⇒ Q)
P Q R Q∧R P ⇒ (Q ∧ R) P ⇒Q P ⇒R
∧(P ⇒ R)
T T T T T T T T
T T F F F T F F
T F T F F F T F
T F F F F F F F
F T T T T T T T
F T F F T T T T
F F T F T T T T
F F F F T T T T
Theorem 2.1
Let P1 and P2 be two (compound) propositions. Then P1 ≡ P2 if and only if
P1 ⇔ P2 is a tautology.
Example 2.5
Show that the proposition ¬(P ∧ Q) ⇔ (¬P ∨ ¬Q) is a tautology. Deduce that
¬(P ∧ Q) is logically equivalent to ¬P ∨ ¬Q.
37
Solution
As always we begin by constructing the appropriate truth table.
A B
P Q ¬P ¬Q P ∧Q ¬(P ∧ Q) ¬P ∨ ¬Q A⇔B
T T F F T F F T
T F F T F T T T
F T T F F T T T
F F T T F T T T
The last column, containing the truth values of ¬(P ∧ Q) ⇔ (¬P ∨ ¬Q), only
has truth values T. Hence ¬(P ∧ Q) ⇔ (¬P ∨ ¬Q) is a tautology. It therefore
follows from theorem 2.1 that
¬(P ∧ Q) ≡ ¬P ∨ ¬Q.
In ordinary algebra (or arithmetic), we are familiar with rules that allow us
to simplify expressions. Here are some simple examples:
There are similar logical equivalences that will allow us to manipulate logical
expressions much as we might manipulate algebraic ones. Some of the logical
rules are comparable to their algebraic counterparts and some are unique to
logic, as the following examples demonstrate.
Examples 2.6
Solution
Consider the following truth table.
(P ∧ Q)
P Q R Q∨R P ∧ (Q ∨ R) P ∧Q P ∧R
∨(P ∧ R)
T T T T T T T T
T T F T T T F T
T F T T T F T T
T F F F F F F F
F T T T F F F F
F T F T F F F F
F F T T F F F F
F F F F F F F F
P ∧ (Q ∨ R) ≡ (P ∧ Q) ∨ (P ∧ R).
Solution
The truth values for P ∧ (P ∨ Q) are given in the following truth table.
P Q P ∨Q P ∧ (P ∨ Q)
T T T T
T F T T
F T T F
F F F F
The truth values for P ∧ (P ∨ Q) in column 4 are the same as those for
P in column 1 so P ∧ (P ∨ Q) ≡ P .
Idempotent Laws P ∧P ≡P
P ∨P ≡P
Associative Laws (P ∧ Q) ∧ R ≡ P ∧ (Q ∧ R)
(P ∨ Q) ∨ R ≡ P ∨ (Q ∨ R)
Absorption Laws P ∧ (P ∨ Q) ≡ P
P ∨ (P ∧ Q) ≡ P
Distributive Laws P ∧ (Q ∨ R) ≡ (P ∧ Q) ∨ (P ∧ R)
P ∨ (Q ∧ R) ≡ (P ∨ Q) ∧ (P ∨ R)
Example 2.7
Show that P ∧ [(Q ∨ (P ∧ R)] ≡ P ∧ (Q ∨ R).
Solution 1
For our first solution, we manipulate the expression on the left-hand side using
the standard logical equivalences.
P ∧ [(Q ∨ (P ∧ R)] ≡ P ∧ [(Q ∨ P ) ∧ (Q ∨ R)] Distributive law
≡ [P ∧ (Q ∨ P )] ∧ (Q ∨ R) Associative law
≡ [P ∧ (P ∨ Q)] ∧ (Q ∨ R) Commutative law
≡ P ∧ (Q ∨ R) Absorption law
Solution 2
As an alternative, we could draw up the following truth table.
P Q R P ∧ R Q ∨ (P ∧ R) P ∧ [Q ∨ (P ∧ R)] Q ∨ R P ∧ (Q ∨ R)
T T T T T T T T
T T F F T T T T
T F T T T T T T
T F F F F F F F
F T T F T F T F
F T F F T F T F
F F T F F F T F
F F F F F F F F
The standard logical equivalence laws listed in the table above describe what
we might call the ‘algebra’ of propositions. In addition to these laws, we now
introduce three more logical equivalence laws that will be used when we come
to consider mathematical proofs.
Contrapositive Law P ⇒ Q ≡ ¬Q ⇒ ¬P .
The following truth table establishes the logical equivalence since the truth
values in columns 5 and 6 are identical. The proposition ¬Q ⇒ ¬P is called
41
P Q ¬P ¬Q P ⇒ Q ¬Q ⇒ ¬P
T T F F T T
T F F T F F
F T T F T T
F F T T T T
Recall that false denotes any contradiction; that is, any compound proposi-
tion that only has truth value F. The truth table that establishes the logical
equivalence only requires two rows, as follows.
P ¬P false ¬P ⇒ false
T F F T
F T F F
The truth values in the last column are the same as those for P in the first
column so (¬P ⇒ false) ≡ P .
Biconditional Law P ⇔ Q ≡ (P ⇒ Q) ∧ (Q ⇒ P ).
P Q P ⇔Q P ⇒Q Q⇒P (P ⇒ Q) ∧ (Q ⇒ P )
T T T T T T
T F F F T F
F T F T F F
F F T T T T
42
Logical implication
When constructing mathematical proofs, we will want to know that each state-
ment in a proof ‘follows logically’ from previous statements. In other words,
we will wish to ensure that the truth of a statement in a proof is guaranteed
by the truth of the statements that come before it in the proof. When dealing
with propositions, this notion is called ‘logical implication’.
Let P1 and P2 be two (possibly compound) propositions such that P2 is
true in all cases where P1 is true. Then we say that P1 logically im-
plies P2 , written P1 P2 . This notion may be extended to several proposi-
tions. Let P1 , P2 , . . . , Pn and Q be propositions. We say that the propositions
P1 , P2 , . . . , Pn logically imply the proposition Q, written P1 , P2 , . . . , Pn
Q, provided Q is true in all those cases where each of the propositions
P1 , P2 , . . . , Pn is true. For the sake of clarity of notation, we will also write
{P1 , P2 , . . . , Pn } Q in this case. Since the conjunction P1 ∧ P2 ∧ . . . ∧
Pn is true precisely when each of the propositions P1 , P2 , . . . , Pn is true,
{P1 , P2 , . . . , Pn } Q is equivalent to saying P1 ∧ P2 ∧ . . . ∧ Pn Q.
Examples 2.8
1. Show that (P ⇒ Q) ∧ (Q ⇒ R) (P ⇒ R).
Solution
A truth table giving the truth values of both (P ⇒ Q) ∧ (Q ⇒ R) and
P ⇒ R is given below.
P Q R P ⇒Q Q⇒R (P ⇒ Q) ∧ (Q ⇒ R) P ⇒R
T T T T T T T
T T F T F F F
T F T F T F T
T F F F T F F
F T T T T T T
F T F T F F T
F F T T T T T
F F F T T T T
P Q R P ∨Q P ⇒R Q⇒R
T T T T T T
T T F T F F
T F T T T T
T F F T F T
F T T T T T
F T F T T F
F F T F T T
F F F F T T
Exercises 2.2
1. Using truth tables, establish each of the following logical equivalences.
(i) ¬(P ∨ Q) ≡ ¬P ∧ ¬Q
(ii) P ∨ (P ∧ Q) ≡ P
(iii) P ⇒ ¬Q ≡ ¬(P ∧ Q)
(iv) (P ∧ Q) ∨ R ≡ (P ∨ R) ∧ (Q ∨ R)
(v) (P ∨ Q) ⇒ R ≡ (P ⇒ R) ∧ (Q ⇒ R)
(vi) P ⇒ (Q ⇒ R) ≡ (P ∧ Q) ⇒ R
(vii) ((P ⇒ Q) ⇒ R) ≡ ((¬P ⇒ R) ∧ (Q ⇒ R)) .
44
(i) (P ∧ Q) (P ∨ Q)
(ii) (P ⇔ Q) ∧ Q P
(iii) {P ⇒ Q, P ∨ ¬Q} ¬(P ∨ Q)
(iv) {P ⇒ (Q ∨ R), P ∧ R} (P ∨ R)
(v) {P ∨ (Q ∧ R), R ⇒ P } (¬Q ⇒ R)
(vi) {P ⇒ Q, (P ∧ Q) ⇒ R} (P ⇒ R)
(vii) {P ⇒ R, Q ⇒ R, ¬P ⇒ Q} (¬P ∨ R)
(i) ¬P ∨ (P ∧ Q) ≡ ¬P ∨ Q
(ii) ¬(P ∨ Q) ∨ (¬P ∧ Q) ≡ ¬P
(iii) ¬(¬P ∧ Q) ∧ (P ∨ ¬Q) ≡ (P ∨ ¬Q)
(iv) P ∨ (Q ∧ (P ∨ ¬Q)) ≡ P
(v) P ∧ [(P ∧ Q) ∨ ¬P ] ≡ (P ∧ Q)
(vi) (P ∧ Q) ∨ (¬P ∨ R) ≡ (¬P ∨ Q) ∨ R
(vii) ¬(P ∧ ¬(Q ∧ R)) ≡ (¬P ∨ Q) ∧ ¬(P ∧ ¬R)
(viii) [(P ∧ Q) ∨ (R ∧ S)] ≡ [(P ∨ R) ∧ (P ∨ S) ∧ (Q ∨ R) ∧ (Q ∨ S)]
(i) ¬Q ∧ (P ⇒ Q) ≡ ¬(P ∧ Q)
(ii) P ⇒ (P ∧ Q) ≡ (P ⇒ Q)
(iii) (P ∧ Q) ⇒ R ≡ P ⇒ (Q ⇒ R)
(iv) (P ∨ Q) ⇒ R ≡ (P ⇒ R) ∧ (Q ⇒ R)
(v) P ⇒ (Q ∨ R) ≡ (P ⇒ Q) ∨ (P ⇒ R)
45
Sarah is an athlete
Sarah is physically fit
All athletes are physically fit
using different letters (P , Q, R say), and then the fact that they are making
statements about the same individuals or properties of individuals would be
lost.
A proposition of the form ‘Sarah is an athlete’ may be regarded as having two
components. One is the object or individual — ‘Sarah’ in this case. The other
is the property which the object or individual is said to possess — being an
athlete, in this example. If we wish to be able to capture the fact that two
propositions refer to the same object or refer to the same property, then we
will need a notation for propositions that refer specifically to the objects and
their properties.
A predicate describes a property of one or more objects or individuals. We
will use uppercase letters to denote predicates. The following are examples of
predicates.
R : . . . is red.
A : . . . is an athlete.
F : . . . is physically fit.
T : . . . cannot be tolerated under any circumstances.
The general notation for representing propositions using objects and predi-
cates should be clear from these examples. If P is a predicate and a is an
46
object or individual, then we use P (a) to represent the proposition ‘The ob-
ject or individual a has the property P ’. More compactly,
We may negate propositions denoted in this way and build them into more
complex propositions using connectives as we have done previously. Using the
notation above, here are some examples.
R(x) : x is red.
A(x) : x is an athlete.
F (y) : y is physically fit.
These expressions are not propositions since they cannot be declared true or
false. They are called ‘propositional functions’ by analogy with ‘numerical’
functions. Readers familiar with functions (see chapter 3) will recognise an
expression such as f (x) = x2 + 2 as (partly) defining a function. Here, x is a
numerical variable. Substituting a value for x gives a value for the expression;
for example, when x = 3 we have f (3) = 32 + 2 = 11. It is similar with
propositional functions. For the propositional function A(x) : x is an athlete,
substituting an object such as ‘Sarah’ for the variable x gives a proposition
A(Sarah): Sarah is an athlete.
More formally, a propositional function is a logical expression which de-
pends on the value of one or more variables. Let P be some predicate which
we may read as ‘. . . has property P ’. Then P (x) is the propositional function
‘x has property P ’.
As we have seen, one way to convert a propositional function P (x) into a
proposition is to substitute (the name of) a particular object or individual
for the variable x. If a is a particular object or individual, then P (a) is a
proposition. Thus the propositional function P (x) represents a whole family
of possible propositions, one for each possible object or individual which may
47
Predicate: M : . . . is my friend.
Propositional function: M (x) : x is my friend.
Propositions: M (Elaine) : Elaine is my friend.
M (Jack) : Jack is my friend.
Example 2.9
The following predicates are defined.
M : . . . is my friend.
R : . . . is rich.
F : . . . is famous.
B : . . . is boring.
Symbolise each of the following propositions.
Solution
(i) Recall that ‘but’ signifies a conjunction (see page 19). Hence the propo-
sition is symbolised as
M (Jimmy) ∧ ¬R(Jimmy).
Note that we only use connectives between propositions (or proposi-
tional functions) and not between predicates themselves. Thus ‘(M ∧
¬R)(Jimmy)’ is not a well-formed proposition.
48
(ii) This is a conjunction of the propositions Sue is rich and Mark is rich
and so is:
R(Sue) ∧ R(Mark).
In the same way that we do not use connectives between predicates,
so it is also incorrect to use connectives between objects. Hence the
expression ‘R(Sue ∧ Mark)’ is also not a well-formed proposition.
(iii) This is a conditional where both the antecedent and the consequent refer
to Peter:
M (Peter) ⇒ ¬B(Peter).
R(Mark) Y F (Mark).
Quantifiers
Examples 2.10
1. The following predicates are defined.
M : . . . is my friend.
P : . . . is Peter’s friend.
U : . . . is prone to unruly behaviour.
S: . . . should be shunned.
Symbolise each of the following propositions.
(i) All of Peter’s friends are prone to unruly behaviour.
(ii) Some of my friends are also friends of Peter’s.
(iii) If all of Peter’s friends are prone to unruly behaviour, then some
of them should be shunned.
(iv) Some of Peter’s and my friends are prone to unruly behaviour.
(v) All of my friends are prone to unruly behaviour and some of them
should be shunned.
(vi) None of Peter’s friends are my friends.
Solution
∀x • P (x) ⇒ U (x).
∃x • M (x) ∧ P (x).
Antecedent
Half-way house: For all x, if x is Peter’s friend, then
x is prone to unruly behaviour.
Symbolic expression: ∀x • P (x) ⇒ U (x)
Consequent
Half-way house: For some x, x is Peter’s friend and x
should be shunned.
Symbolic expression: ∃x • P (x) ∧ S(x)
Now we can symbolise the whole sentence as
(iv) This is similar to (ii) above in the sense that the sentence may be
paraphrased as saying some objects with the first property also have
the second property. In this case, the first property is a conjunction
so that the half-way house ‘pseudo-English’ statement is:
For some x, (x is my friend and x is Peter’s friend)
and x is prone to unruly behaviour.
Hence the symbolic version is
(v) This is similar to (iii) above in the sense that the proposition
contains two ‘sub-propositions’, one universally quantified and the
other existentially quantified. However, in this case the two com-
ponent quantified propositions are conjoined. If we separately sym-
bolise ‘all of my friends are prone to unruly behaviour’ and ‘some
of my friends should be shunned’ and then form their conjunction,
we obtain the following.
Note that the previous examples all build on the following two general patterns
for symbolising universally and existentially quantified propositions.
Universe of Discourse
When symbolising this, we noted that it appeared that the proposition was
most likely about some specific group of people. Furthermore, we needed a
predicate that referred to membership of the particular group. There is an al-
ternative approach in cases like this where the proposition is referencing some
known collection of objects or individuals. Instead of defining the predicate
we could specify that the variable(s) will only range over the people in the
specific group. To do this we define the ‘universe of discourse’ to be the col-
lection of people in the specific group. Then any variable x will refer only
54
to people in the group. This gives a more natural and more efficient way of
representing the proposition, as follows.
The saving, in both space and mental effort, comes from defining the particular
group of people once (as the universe) rather than having to refer to it (via a
predicate) every time we wish to refer to elements of the group.
In general, for a given propositional function P (x), the universe of discourse
is the set from which we may select an object or individual to substitute for x.
As we have seen, defining a universe of discourse can simplify the symbolisation
of quantified propositional functions. If a universe of discourse is not defined,
then we must assume that any object or individual may be substituted for x.
In principle, we may define separate universes for each propositional variable.
In practice, however, we will usually have a single universe for all the propo-
sitional variables under consideration. However, when there are two different
kinds of objects under consideration, it may make sense to define two separate
universes.
Example 2.11
Defining suitable universes as appropriate, symbolise each of the following
propositions.
Solution
Two-place predicates
There are predicates which are relational in nature and require two objects to
convert them to propositions. Consider, for example, the predicate ‘belongs
to’. This describes the relationship of ‘belonging’ and requires two objects to
become a proposition: ‘this cat belongs to me’, for example. Predicates like this
that require two objects to convert them to propositions are called two-place
predicates or, sometimes, relational predicates.
When denoting two-place predicates, we will follow a similar notation to one-
place predicates and place the objects after the predicate symbol. However,
this time there will be a pair of objects. Thus if we define
B: ‘. . . belongs to . . . ’
There are two key points to note in relation to the objects required for a
two-place predicate. Firstly, their order is important. For example, the two
propositions
have quite different meanings. Similarly, changing the order of the objects can
change the truth value of the resulting proposition. For example, ‘17 is greater
than 3’ is a true proposition, whereas ‘3 is greater than 17’ is false.
The second point to note is that the two objects may be drawn from different
universes. For example, consider the predicate
are all properly defined propositions (of which two are true and one is false).
However
this banana is the capital city of the Eiffel tower, and
a herring is the capital city of Sarah
B(x, y) : x belongs to y
P (a, b)
∀x • P (x, b)
∃x • P (x, b)
∀y • P (a, y)
∃y • P (a, y)
∀x ∀y • P (x, y) ∀y ∀x • P (x, y)
∃x ∀y • P (x, y) ∀y ∃x • P (x, y)
∀x ∃y • P (x, y) ∃y ∀x • P (x, y)
∃x ∃y • P (x, y) ∃y ∃x • P (x, y)
Note that, when different quantifiers are used, their order is significant. For
example, consider the following propositions where the universe for both vari-
ables is the set of positive integers Z+ .
∀m ∃n • m < n ∃n ∀m • m < n
The first of these, ∀m ∃n • m < n, asserts that, for every positive integer
m, there is a positive integer n that is greater than it. This is clearly a true
58
Examples 2.12
Solution
2. Let the universe of discourse (for both variables) be ‘people’ and define
the following two-variable propositional functions.
K(x, y) : x knows y
T (x, y) : x is taller than y
Y (x, y) : x is younger than y
Solution
(i) We may rewrite the sentence as, ‘for all y, Jess knows y’. Hence we
may symbolise it as: ∀y • K(Jess, y).
Note that the name of the variable is not important; we chose y as
it appeared in the second place in the propositional function, but
any variable name would be acceptable. Thus each of the following
are also acceptable, even if the third is not one we would normally
choose!
∀x • K(Jess, x), ∀t • K(Jess, t), ∀ wallaby • K(Jess, wallaby).
(ii) This proposition is similar to the previous one except that we are
now asserting the existence of someone who knows everyone rather
than stating that this ‘all knowing’ person is Jess. This means that
we simply need to take the previous proposition and replace ‘Jess’
with an existentially quantified variable.
In pseudo-English we have: there exists x such that for all y, x
knows y. Hence in symbols the proposition is: ∃x ∀y • K(x, y).
Note that this example is much easier to symbolise once we have
already attempted part (i). This provides a useful tool in symbolis-
ing propositions involving two quantifiers: first replace one quanti-
fier with a named object or individual and symbolise the resulting
proposition that now only has a single quantifier. Secondly, replace
the named individual with an appropriately quantified variable.
(iii) This is similar to the first proposition except that the named indi-
vidual is the person ‘known’ rather than the person ‘knowing’. We
may symbolise as ∀x • K(x, Ahmed).
(iv) Following on from example (iii), we simply need to replace ‘Ahmed’
with an existentially quantified variable ∃y. Thus we may symbolise
the proposition as ∀x ∃y•K(x, y). In the original sentence, ‘everyone
knows someone’, the universal quantification precedes the existen-
tial quantification and this is mirrored in the symbolic version.
There is, however, an important point to make in relation to the
proposition in part (iii). In that case, the proposition asserts that
everyone knows the same specific individual, namely Ahmed. For
the proposition ‘everyone knows someone’ to be true, it is not neces-
sarily the case that everyone knows the same person. For example,
although I might know Ahmed, you may not, but you might know
Julie instead. So long as everyone in the universe has someone that
they know, the proposition is true.
(v) This proposition is an extension of that in part (iv). We simply
need to add that the person y, who is known by x, is taller than x.
Hence we may symbolise as:
∀x ∃y • K(x, y) ∧ T (y, x).
61
(vi) In our half-way house language we may write this as: ‘for all x,
if Misha knows x, then x is taller than Misha’. Hence the fully
symbolised version is: ∀x • K(Misha, x) ⇒ T (x, Misha).
(vii) Firstly, we may write in literal form as ‘for all x, if x is younger
than Sam, then Sam is taller than x’. Therefore we may symbolise
the proposition as: ∀x • Y (x, Sam) ⇒ T (Sam, x).
(viii) Comparing this with the previous proposition, we just need to re-
place ‘Sam’ with a universally quantified variable. Hence the propo-
sition is: ∀y ∀x • Y (x, y) ⇒ T (y, x).
(i) ∀x ∀y • L(x, y)
(ii) ∀x ∃y • L(x, y)
(iii) ∃y ∀x • L(x, y)
(iv) ∃x ∀y • L(x, y)
(v) ∀y ∃x • L(x, y)
(vi) ∃x ∃y • L(x, y)
Solution
Note that (ii) and (iii) are logically different propositions and they differ
only in the ordering of the quantifiers. The same is true of are proposi-
tions (iv) and (v). This illustrates the fact we have noted previously —
when we have different quantifiers, the order in which they are written
is significant.
At first glance, the proposition ‘no athletes are physically fit’ might suggest the
negation of the proposition ‘all athletes are physically fit’. However, recall that
the negation of a proposition is false when the proposition is true and is true
when the proposition is false. Therefore ‘no athletes are physically fit’ is not
the negation of ‘all athletes are physically fit’ because, in the case where some
athletes are fit and some are not, both propositions are false. The proposition
‘all athletes are physically fit’ is false when there is at least one athlete who
is not physically fit. Hence the negation of ‘all athletes are physically fit’ is
‘some athletes are not physically fit’. If we define the universe to be ‘athletes’
and we let P (x) denote ‘x is physically fit’, then, in symbols, the negation of
∀x • P (x) is ∃x • ¬P (x),
Note that, in each case, to negate the quantified proposition, the quantifier
changes (from ∀ to ∃ or vice versa) and the propositional function itself is
negated. Thus, each of the two logical equivalences above conform to the
general description (or ‘meta-rule’) that says,
There is nothing special about the context — that is, athletes and their fitness
— of the previous examples. So the two logical equivalences above, or the
meta-rule, give the following general rule for negating quantified propositions.
63
This rule is particularly helpful for negating quantified statements where more
than one quantifier is involved. Consider, for example, the proposition ‘some-
one knows everyone’. In exercise 2.12.2 (ii), we symbolised this as
∃x ∀y • K(x, y)
Turning this back into English, we can first write is as; ‘for all x there exists
y such that x does not know y’. In idiomatic form, we may write ‘everyone
has someone they don’t know ’.
On page 53, we introduced the following two general forms of quantified propo-
sitions.
All P s are Qs : ∀x • P (x) ⇒ Q(x)
Some P s are Qs : ∃x • P (x) ∧ Q(x)
We conclude this chapter by considering the negation of each of these propo-
sitions. Consider first, the negation of ‘all P s are Qs’: ¬∀x • P (x) ⇒ Q(x).
Applying the rule for negating quantified propositions, we have:
P ⇒ Q ≡ ¬P ∨ Q.
Now we may paraphrase ∃x • P (x) ∧ ¬Q(x) as ‘some P s are not Qs’. Hence
the negation of ‘all P s are Qs’ is ‘some P s are not Qs’.
Now consider the negation of ‘some P s are Qs’: ¬∃x • P (x) ∧ Q(x). Again
applying the rule for negating quantified propositions, we have:
Applying De Morgan’s law and the law of material implication given in exer-
cise 2.2.4, we have
¬(P ∧ Q) ≡ ¬P ∨ ¬Q ≡ P ⇒ ¬Q.
Now we may paraphrase ∀x • P (x) ⇒ ¬Q(x) as ‘all P s are not Qs’. Hence the
negation of ‘some P s are Qs’ is ‘all P s are not Qs’ or ‘every P is not a Q’.
Exercises 2.3
(xi) No one who went to the races was cold but some of them lost money.
(xii) If all politicians are honest, then none of them would receive illegal
payments.
(vii) There are some courses that are passed by all students who take
them.
(viii) If all students take courses that they don’t enjoy, then no student
passes every course they take.
1. P premise
2. P ⇒Q premise
3. Q from 1,2 using first deduction rule above
4. Q∨R from 3 using second deduction rule above
A deduction rule will be written in two lines, with the premises of the rule on
the first line and the conclusion on the second. Thus the two rules used in the
deduction above are written as follows.
P, P ⇒ Q and P
Q P ∨Q
Note that the second of these is written in terms of P and Q rather than Q and
R, which were actually used in the deduction above. In applying a deduction
rule we may substitute any propositions for those in the rule provided, of
course, that the same proposition is substituted throughout for a particular
proposition that appears in the rule. For example, given propositions P ∧ Q
and (P ∧ Q) ⇒ (R ∨ S), we may apply the first deduction rule above to deduce
R ∨ S.
We now list a set of rules that will allow us to make the deductions that we
need. In each case the premise propositions logically imply the conclusion. As
an illustration, in example 2.8.1, we showed that {P ⇒ Q, Q ⇒ R} (P ⇒
R), and this is the basis for the deduction rule called hypothetical syllogism.
This means that, as we apply the rules in making deductions, the conclusion
of a sequence of deductions will always be logically implied by the premises.
68
Simplification P ∧Q
P
Addition P
P ∨Q
Conjunction P, Q
P ∧Q
Disjunctive syllogism P ∨ Q, ¬P
Q
Modus ponens P, P ⇒ Q
Q
Modus tollens P ⇒ Q, ¬Q
¬P
Hypothetical syllogism P ⇒ Q, Q ⇒ R
P ⇒R
Resolution (Res) P ∨ Q, ¬P ∨ R
Q∨R
Constructive dilemma P ⇒ Q, R ⇒ S, P ∨ R
Q∨S
Definition 2.3
Let P1 , P2 , . . . , Pn , Q be propositions. We say that Q is deducible from
69
The fact that, in each of our deduction rules the premises logically imply
the conclusion, means that we will only be able to derive propositions that
are logically implied by the premises. In other words, if Q is deducible from
P1 , P2 , . . . , Pn , then P1 , P2 , . . . , Pn logically imply Q:
if {P1 , P2 , . . . , Pn } ⊢ Q then {P1 , P2 , . . . , Pn } Q.
Logicians refer to this property as soundness and we can say that our deduc-
tion rules are sound. In addition, our rules are sufficient to be able to deduce
any logical implication. In other words, if P1 , P2 , . . . , Pn logically imply Q,
then Q is deducible from P1 , P2 , . . . , Pn using our deductions rules:
if {P1 , P2 , . . . , Pn } Q then {P1 , P2 , . . . , Pn } ⊢ Q.
Logicians refer to this property as completeness, and we can say that our
deduction rules are complete. Completeness is, in fact, rather rare in logic
and it is only for simple systems such as propositional logic that we can find
a complete set of deduction rules.
Examples 2.13
1. Show that {(P ⇒ Q) ∧ (R ⇒ S), R} Q ∨ S.
Solution
By the soundness property, it is sufficient to show that Q ∨ S can be
deduced from the propositions P ⇒ Q, R ⇒ S, and R; symbolically,
{(P ⇒ Q) ∧ (R ⇒ S), R} ⊢ Q ∨ S.
Here is one way of completing the deduction.
1. (P ⇒ Q) ∧ (R ⇒ S) premise
2. R premise
3. (R ⇒ S) ∧ (P ⇒ Q) 1. Equivalence: commutative law
4. R ⇒ S 3. Simplification
5. S 2, 4. Modus ponens
6. S ∨ Q 5. Addition
7. Q ∨ S 6. Equivalence: commutative law
70
Note that the inclusion of each proposition in the deduction has been
justified either by noting that it is a premise or by explaining how it
follows from previous propositions using the deduction rules. In the case
where we introduce a proposition that is logically equivalent to an ex-
isting proposition in the deduction, we indicate this by ‘equivalence’
followed by a reason for the logical equivalence.
In each case in this deduction, the logical equivalence was the commu-
tative law (for ∧ or ∨) — see page 39. The reason we need this is that
our deduction laws are quite precise. For example, from P ∧ Q the Sim-
plification deduction rule allows us to deduce P but not Q so, if we wish
to deduce Q, we first need to deduce the logically equivalent proposi-
tion Q ∧ P . An alternative approach would have been to introduce two
versions of the simplification rule, one where we may deduce P and one
where we may deduce Q.
Is is frequently the case that there are several different ways of deducing
a conclusion from a collection of premises. The following is an alterna-
tive deduction to the one given above. In this case we have given the
abbreviated form of the rules used at each step.
1. (P ⇒ Q) ∧ (R ⇒ S) premise
2. R premise
3. (R ⇒ S) ∧ (P ⇒ Q) 1. Equivalence: commutative law
4. P ⇒ Q 1. Simplification
5. R ⇒ S 3. Simplification
6. R ∨ P 2. Addition
7. P ∨ R 3. Equivalence: commutative law
8. Q ∨ S 4, 5, 7. Constructive Dilemma
1. (P ∨ Q) ∧ (Q ∨ R) premise
2. ¬Q premise
3. P ∨ Q 1. Simplification
4. Q ∨ P 3. Equivalence: commutative law
5. P 2, 4. Disjunctive syllogism
6. (Q ∨ R) ∧ (P ∨ Q) 1. Equivalence: commutative law
7. Q ∨ R 6. Simplification
8. R 2, 7. Disjunctive syllogism
9. P ∧ R 5, 8. Conjunction
71
{P1 , P2 , . . . , Pn } Q.
Examples 2.14
1. Consider the validity of the following argument.
Solution
Before we can test the validity of the argument, we need to understand
the structure of the argument. We first symbolise the propositions in-
volved.
Let M: Mark is correct
U: Unemployment will rise
A: Ann is correct
H: There will be a hard winter.
There are two premises of the argument: (M ⇒ U ) ∧ (A ⇒ H) and
A.4 The conclusion is signalled by the word ‘therefore’; in symbols, the
conclusion is U ∨ H.
To show that the argument is correct, we need to establish that
{(M ⇒ U ) ∧ (A ⇒ H), A} U ∨ H.
{(P ⇒ Q) ∧ (R ⇒ S), R} Q ∨ S
4 It may be worth noting that, had the first sentence been split in two, If Mark is correct,
then unemployment will rise. If Ann is correct, then there will be a hard winter, then we
would regard the argument as having three premises M ⇒ U , A ⇒ H, and A. This does
not affect the validity or otherwise of the argument because from P ∧ Q we may deduce
both P and Q and, conversely, from both P and Q we may deduce P ∧ Q.
72
1. (M ⇒ U ) ∧ (A ⇒ H) premise
2. A premise
3. (A ⇒ H) ∧ (M ⇒ U ) 1. Equivalence: commutative law
4. A ⇒ H 3. Simplification
5. H 2, 4. Modus ponens
6. H ∨ U 5. Addition
7. U ∨ H 6. Equivalence: commutative law
If Sam had taken my advice or he’d had his wits about him, then he
would have sold his house and moved to the country. If Sam had sold
his house, Jenny would have bought it. Jenny did not buy Sam’s house.
Therefore Sam did not take my advice.
Solution
We first symbolise the propositions as follows.
Let A: Sam took my advice
W: Sam had his wits about him
H: Sam sold his house
C: Sam moved to the country
J: Jenny bought Sam’s house.
Then the argument has premises: (A ∨ W ) ⇒ (H ∧ C), H ⇒ J and ¬J.
The conclusion is ¬A.
When attempting to discover a deduction, it often helps both to work
forwards from the premises and also to work backwards from the con-
clusion. In other words, we may ask ‘in order to be able to deduce the
conclusion, what do we first need to deduce?’
In this example, we may deduce ¬A if we can first deduce ¬A ∧ ¬W ≡
¬(A ∨ W ). Now we may deduce ¬(A ∨ W ) from the first premise using
modus tollens, provided that we can deduce ¬(H ∧ C) ≡ ¬H ∨ ¬C.
The full deduction is the following where the first few steps establish
¬H ∨ ¬C.
73
1. (A ∨ W ) ⇒ (H ∧ C) premise
2. H ⇒ J premise
3. ¬J premise
4. ¬H 2, 3. Modus tollens
5. ¬H ∨ ¬C 4. Addition
6. ¬(H ∧ C) 5. Equivalence: De Morgan’s law
7. ¬(A ∨ W ) 1, 6. Modus tollens
8. ¬A ∧ ¬W 7. Equivalence: De Morgan’s law
9. ¬A 8. Simplification
Solution
This is almost the same argument as the one given in Example 1 above.
The only difference is that the conclusion has been strengthened to be
a conjunction. In other words, this argument concludes that unemploy-
ment will rise and there will be a hard winter, whereas the argument in
example 1 claimed that only one of these events would occur.
With the symbolism used in example 1, the premises are (M ⇒ U ) ∧
(A ⇒ H) and A (as before) and the conclusion is U ∧ H. If we look
more closely at the derivation in example 1, we can see that the reason
why we were able to conclude U ∨ H was that we earlier deduced H.
However this will not allow us to conclude U ∧ H.
At this point we may start thinking that the argument is not valid; in
other words, that the premises do not logically imply the conclusion. In
general, to show that P does not logically imply Q, P ̸ Q, we need to
show that Q is not true in all cases where P is true. This means we need
to find a situation where P is true and Q is false.
Returning to the argument, to show that it is not valid, we need to
find a situation where all of the premises are true but the conclusion
is false. Now A must be true since it is a premise and H must be true
since the deduction in Example 1 shows that H may be deduced from
the premises. In order to make the conclusion false, we need to suppose
that U is false. Consider the premise (M ⇒ U ) ∧ (A ⇒ H). The second
conjunct A ⇒ H is true since both A and H are true. If U is false, the
first conjunct will be true only if M is also false.
So, suppose that:
74
If Rory didn’t get the job, then he didn’t become a lawyer. Rory didn’t
get the job and he took up golf. Rory became a lawyer or he didn’t take
up golf. Therefore Rory won the Open Championship.
Solution
We first symbolise the propositions as follows.
Let J: Rory got the job
L: Rory become a lawyer
G: Rory took up golf
C: Rory won the Open Championship.
Then the argument has premises: ¬J ⇒ ¬L, ¬J ∧ G, and L ∨ ¬G. The
conclusion is C.
At this stage we may think that there is something strange about the ar-
gument as the conclusion C does not feature at all in the premises. Thus,
were we able to provide a deduction of the argument, we would also be
able to provide a deduction for any argument with these premises and
any conclusion whatsoever. In fact, it is possible to provide a deduction
as follows.
1. ¬J ⇒ ¬L premise
2. ¬J ∧ G premise
3. L ∨ ¬G premise
4. ¬J 2. Simplification
5. ¬L 1, 4. Modus ponens
6. ¬G 3, 5. Disjunctive syllogism
7. G ∧ ¬J 2. Equivalence: commutative law
8. G 7. Simplification
9. G∨C 8. Addition
10. C 6, 9. Disjunctive syllogism
This deduction gives further grounds for concern since we have deduced
both G (line 8) and its negation ¬G (line 6). The reason for this is that
the premises are inconsistent in the sense that it is not possible for them
all to be true simultaneously. This could be verified by drawing up a
truth table for the premises and showing that there is no combination
75
of truth values of J, L, and G for which the premises are all true — see
exercise 2.4.5.
Whenever we have a situation like this, we may deduce any proposition
in the manner shown using addition (line 9 above) followed by disjunc-
tive syllogism (line 10 above). Beginning with inconsistent premises, it
is possible to deduce any proposition from them.
With these rules, in addition to the deduction rules for propositional logic, we
can give formal deductions of arguments in predicate logic. The basic strategy
is to apply quantifier elimination rules at the beginning of the deduction to ob-
tain non-quantified propositions; then apply appropriate deduction rules from
propositional logic; finally, apply appropriate quantifier introduction rules,
where necessary. In the last step, we will need to be careful to note whether
we have deduced Q(a), say, for an arbitrary or a particular element a of the
universe. In the former case, we may deduce ∀x • Q(x) and in the latter case
we may deduce ∃x • Q(x).
Examples 2.15
Solution
We first define the universe to be ‘people’ and symbolise the predicates
as follows.
Let A: . . . is an athlete
F : . . . is physically fit.
Then the argument has premises: ∀x • A(x) ⇒ F (x) and A(Sarah). The
conclusion is F (Sarah).
Solution
We first define the universe to be ‘living beings’ and symbolise the pred-
icates as follows.
Let E: . . . is an elephant
M : . . . is a mammal
P : . . . is playful.
77
Solution
We first define the universe to be ‘people’ and symbolise the predicates
as follows.
Let F : . . . supports a football team
H: . . . plays hockey
E: . . . enjoys exercise
Then the argument has premises: ∀x • F (x) ∨ H(x), ∀x • E(x) ∨ ¬H(x).
The conclusion is ∀x • ¬F (x) ⇒ E(x).
78
Exercises 2.4
(i) {P ⇒ Q, P ∧ R} ⊢ Q
(ii) {P ⇒ ¬Q, Q ∨ R} ⊢ P ⇒ R
(iii) {P ⇔ Q, ¬(P ∧ Q)} ⊢ ¬P ∧ ¬Q
(iv) (P ∧ Q) ⇒ (S ∧ T ), Q ∧ P } ⊢ S
(v) {(Q ∨ S) ⇒ R, Q ∨ P, ¬R} ⊢ P
(vi) {Q, ¬S, (P ∧ R) ⇒ S} ⊢ Q ∨ ¬R
(vii) {(P ∨ Q) ⇒ (R ∧ S), P } ⊢ R
(viii) {P ∨ Q, R ⇒ ¬Q, ¬P, (¬R ∧ Q) ⇒ S} ⊢ S
(ix) {P ⇒ ¬Q, Q ∨ (R ∧ S)} ⊢ P ⇒ (R ∧ S)
(x) {(P ⇒ Q) ∧ (R ⇒ Q), S ⇒ (P ∨ R), S} ⊢ Q
2. Show that each of the following deductions can be made from the deduc-
tion rules given on page 67. In each case the premises of the deduction
are the propositions above the line and the conclusion of the deduction
is the proposition below the line.
Note that this means that each of these rules could also be considered
a deduction rule and could therefore be added to our list of rules.
79
(i) If Mary drinks wine or eats cheese, then she gets a headache. She
is drinking wine and eating chocolate. Therefore Mary will get a
headache.
(ii) If you get a degree or you get a good job, then you will be successful
and happy. You get a good job. Therefore you will be happy.
(iii) If the battery is flat or the car is out of petrol, then it won’t start
and I’ll be late for work. The car is out of petrol or the battery is
flat. Therefore I’ll be late for work.
(iv) Either the project wasn’t a success or Sally did not invest her inher-
itance. If she were sensible, then Sally would invest her inheritance.
The project was a success. If Sally wasn’t sensible and didn’t invest
her inheritance, then she is broke. Therefore Sally is broke.
(v) The murder was committed either by A or by both B and C. If
A committed the murder, then the victim was poisoned. Therefore
either C committed the murder or the victim was poisoned.
(vi) Peter is either brave or brainy and he is either brainy or bald. Peter
is not brainy. Therefore he is brave and bald.
(vii) If it is useful, then I’ll keep it, and if it is valuable, then I’ll keep
it. If it belonged to Ben, then it is useful or valuable. It belonged
to Ben. So I’ll keep it.
(viii) If it doesn’t rain, then I’ll go shopping. If I go shopping, then if I
don’t take an umbrella, it will rain. If I go by car, then I won’t take
an umbrella. So it will rain or I won’t go by car.
(ix) If ghosts are a reality, then there are spirits roaming the Earth, and
if ghosts are not a reality, then we do not fear the dark. Either we
80
(i) If Mary drinks wine and eats cheese, then she gets a headache.
She is drinking wine or eating chocolate. Therefore Mary will get
a headache.
(ii) Either the project wasn’t a success or Sally invested her inheritance.
If she were sensible, then Sally would invest her inheritance. The
project was a success. If Sally wasn’t sensible and didn’t invest her
inheritance, then she is broke. Therefore Sally is broke.
(iii) If it doesn’t rain, then I’ll go shopping. If I go shopping, then if I
don’t take an umbrella, it will rain. If I go by car, then I won’t take
an umbrella. So it will rain and I won’t go by car.
(iv) If ghosts are a reality, then there are spirits roaming the Earth or if
ghosts are not a reality, then we do not fear the dark. Either we fear
the dark or we have no imagination. We do have an imagination or
ghosts are a reality. Therefore there are spirits roaming the Earth.
(v) If Tim committed the crime, then he’ll flee the country and we’ll
never see him again. If we see Tim again, then he is not Tom’s
friend. Hence if he’s Tom’s friend, then we’ll never see Tim again.
(i) Some people are good-looking and rich. Everyone who is rich is
dishonest. Therefore there are people who are good-looking and
dishonest.
(ii) Some people are good-looking and rich. Everyone who is rich is
dishonest. Therefore not everyone who is good-looking is honest.
(iii) All even numbers are rational and divisible by two. Some even
numbers are divisible by four. Hence some numbers are divisible
by two and four.
81
(iv) All numbers which are integers are even or odd. All numbers
which are integers are even or non-zero. Some numbers are inte-
gers. Therefore there are numbers that are either even or they are
odd and non-zero.
(v) All animals with feathers are not aquatic. There are aquatic animals
that live in the sea. So there are animals that live in the sea and
don’t have feathers.
(vi) Some functions are continuous and differentiable. All functions
which are continuous are defined for all values of x. Therefore some
functions which are defined for all values of x are differentiable.
(vii) Everything which is enjoyable and cheap is harmful to one’s health.
All holidays are enjoyable. There are holidays which are not harmful
to one’s health. Therefore some things are not cheap.
(viii) There are no polynomials which are not differentiable functions. All
differentiable functions are continuous. Therefore all polynomials
are continuous.
Chapter 3
Sets and Functions
3.1 Introduction
In the previous chapter, we discussed the elements of logic which we may re-
gard as providing a framework for constructing and understanding mathemat-
ical statements. Much of the language of mathematics, however, is described
in terms of sets and functions, which we introduce in this chapter. If logic
provides the ‘backbone’ of mathematics, then sets and functions put flesh on
the bone.
We imagine that many of our readers will have met sets and functions previ-
ously, but possibly will not have covered all the material that we will introduce
here or maybe not as formally as our approach. The material of this chapter
will be assumed as background knowledge in the rest of the book. Some read-
ers who have met sets and functions may choose to ignore this chapter on first
reading, referring back to it as and when necessary.
In the next three sections, we first introduce sets, how they may be defined
and their properties. We then look at operations on sets and building new sets
from old. Finally, we introduce an important construction called the Cartesian
product. In the last two sections of the chapter, we consider functions and some
of their properties.
83
84
Notation
We shall generally use uppercase letters to denote sets and lowercase letters
to denote elements. It is not always possible to adhere to this convention
however; for example, when the elements of a particular set are themselves
sets. The symbol ∈ denotes ‘belongs to’ or ‘is an element of’. Thus
Defining Sets
Sets can be defined in various ways. The simplest is by listing the elements
enclosed between curly brackets or ‘braces’ { }.
Examples 3.1
1. A = {Mona Lisa, London Bridge, e}.
This is the rather odd set containing three elements described above.
2. B = {2, 4, 6, 8, . . .}
This is the infinite set described above. We clearly cannot list all the
elements. Instead we list enough elements to establish a pattern and use
‘. . . ’ to indicate that the list continues indefinitely.
3. C = {1, {1, 2}}
This set has two elements, the number 1 and the set {1, 2}. This illus-
trates that sets can themselves be elements of other sets.
85
4. D = {1, 2, . . . , 100}
This set contains the first 100 positive integers. Again we use ‘. . . ’ to
indicate that there are elements in the list which we have omitted, al-
though in this case only finitely many are missing.
5. E = { }
This set contains no elements. It is called the empty set or null set.
The empty set is usually denoted ∅.
When listing elements, the order in which elements are listed is not important.
Thus, for example {1, 2, 3, 4} and {4, 3, 2, 1} define the same set. Also, any
repeats in the listing are ignored so that {1, 2, 2, 3, 3, 3, 4, 4, 4, 4} also describes
the same set. To be precise, two sets are equal if and only if they contain the
same elements; that is, A = B if ∀x • x ∈ A ⇔ x ∈ B is a true proposition,
and conversely.
Listing the elements of a set is impractical except for small sets or sets where
there is a pattern to the elements such as B and D in examples 3.1 above. An
alternative is to define the elements of a set by a property or predicate (see
section 2.4). More precisely, if P (x) is a single-variable propositional function,
we can form the set whose elements are all those objects a (and only those)
for which P (a) is a true proposition. A set defined in this way is denoted
A = {x : P (x)}.
This is read: the set of all x such that P (x) (is true).
Note that ‘within A’ — that is, if we temporarily regard A as the universe of
discourse — the quantified propositional function ∀x•P (x) is a true statement.
Examples 3.2
1. The set B in example 3.1 above could be defined as
B = {n : n is an even, positive integer}, or
B = {n : n = 2m, where m > 0 and m is an integer},
or, with a slight change of notation,
B = {2m : m > 0 and m is an integer}.
Note that although the propositional functions used are different, the
same elements are generated in each case.
2. The set D in example 3.1 above could be defined as
D = {k : k is an integer and 1 ≤ k ≤ 100}.
3. The set {1, 2} could alternatively be defined as {x : x2 − 3x + 2 = 0}.
We sometimes refer to the set {1, 2} as the solution set of the equation
x2 − 3x + 2 = 0.
86
4. The empty set ∅ can be defined in this way using any propositional
function P (x) which is true for no objects x. Thus, for example,
∅ = {x : x ̸= x}.
Note that, if P (x) and Q(x) are propositional functions which are true for
precisely the same objects x, then the sets they define are equal, {x : P (x)} =
{x : Q(x)}. For example, the two solution sets {x : (x − 1)2 = 4} and {x :
(x + 1)(x − 3) = 0} are equal, since the two propositional functions P (x) :
(x − 1)2 = 4 and Q(x) : (x + 1)(x − 3) = 0 are true for precisely the same
values of x, namely −1 and 3.
Universal set
Sometimes we wish to ‘build’ our sets only from some larger ‘context set’
called the universal set, denoted U . The universal set is simply the set of
all objects being considered at the current time. The universal set plays much
the same role as the universe of discourse does in logic. In chapter 2, we noted
that we could define the universe of discourse to be what was convenient for
the particular context. So it is with sets. For example, if we are interested
in studying the properties of soccer players in a particular league, we might
define
U = {soccer players in the particular league}.
Then the set
A = {x : x has scored at least three goals}
denotes only those players in the particular league who have scored at least
three goals.
Sometimes the role of the universe is made explicit when defining sets using
predicates with the notation
{x ∈ U : P (x)},
which may be read as ‘the set of all x in U such that P (x)’.
Cardinality
If A is a finite set, its cardinality, |A|, is the number of (distinct) elements
which it contains. If A has an infinite number of elements, we say it has
infinite cardinality, and write |A| = ∞.1
Other notations commonly used for the cardinality of A are n(A), #(A), and
.
1 There is a more sophisticated approach to cardinality of infinite sets which allows
different infinite sets to have different cardinality. Thus ‘different sizes’ of infinite sets can
be distinguished. In this theory the set of integers has different cardinality from the set of
numbers, for example. For further details, see Garnier and Taylor [6], for example.
87
Examples 3.3
1. Let A = {0, 1, 2, 3, 4}. Then |A| = 5.
2. Let A = {1, 2, 2, 3, 3, 3, 4, 4, 4, 4}. Then |A| = 4. This is because we ignore
repeats when listing the elements of sets, so A = {1, 2, 3, 4}.
3. |∅| = 0 since the empty set ∅ contains no elements.
4. Generalising from Example 1, if A = {0, 1, . . . , n}, then |A| = n + 1.
5. Let A be the set of positive even integers, A = {2, 4, 6, 8, . . .}. Then
|A| = ∞.
6. Let A = {1, 2, {1, 2}}. Then |A| = 3 because A contains three elements:
the number 1, the number 2, and the set {1, 2}.
Determining the cardinality of sets, some of whose elements are also sets,
can be tricky. In this context, it may help to think of sets as some kind
of abstract paper bag. In this example, the set A is a paper bag that,
when we look inside, contains two numbers and another paper bag; that
is, three elements in total.
7. Let A = {{1, 2, 3, 4}}. Then |A| = 1 because A contains a single element,
namely the set {1, 2, 3, 4}.
Using the paper bag analogy, the set A is a paper bag that contains, as
its single element, another paper bag.
8. Let A = {{1, 2}, {3, 4}, {1, 2}}. In this case, we have |A| = 2.
Initially, we might think that |A| = 3 since A contains three sets (paper
bags). However two of these are the same set, {1, 2}, so we must ignore
the repeated element. Hence A = {{1, 2}, {3, 4}}, which clearly contains
two elements, so |A| = 2.
Subset
The set B is a subset of the set A, denoted B ⊆ A, if every element of B is
also an element of A. Symbolically, B ⊆ A if ∀x • x ∈ B ⇒ x ∈ A is true, and
conversely. If B is a subset of A, we say that A is a superset of B, and write
A ⊇ B.
Note that every set A is a subset of itself, A ⊆ A. Any other subset of A is
called a proper subset of A. The notation B ⊂ A is used to denote ‘B is a
proper subset of A’. Thus B ⊂ A if and only if B ⊆ A and B ̸= A.
It should also be noted that ∅ ⊆ A for every set A. This is because the
definition above is satisfied in a trivial way: the empty set has no elements,
so certainly each of them belongs to A. Alternatively, for any object x, the
proposition x ∈ ∅ is false, which means that the conditional (x ∈ ∅) ⇒ (x ∈
A) is true.
88
Examples 3.4
3. Let X = {1, 2, {3, 4}}. Then {1, 2} ⊆ X because each element in {1, 2}
is also an element of X. However {3, 4} is not a subset of X, which
we can denote by {3, 4} * X, because the elements of {3, 4} — 3 and
4 — are not themselves elements of X. Using the paper bag analogy
introduced in example 3.3.6, the set X is a paper bag containing two
numbers, 1 and 2, and the paper bag {3, 4}. Thus {3, 4} is an element
of X, {3, 4} ∈ X, but not a subset of X, {3, 4} ̸⊆ X. However, since
{3, 4} is an element of X, the set containing {3, 4} as its only element
is a subset of X, {{3, 4}} ⊆ X.
Care clearly needs to be taken to distinguish between set membership
and subset, particularly when a set has elements which are themselves
sets. In particular, note that a ∈ A is true if and only if {a} ⊆ A is true.
Recall that two sets are equal, A = B, if and only if they contain the same
elements: for all x, x ∈ A if and only if x ∈ B. In section 2.3 (page 41), we
introduced the following logical equivalence, which we called the Biconditional
Law:
P ⇔ Q ≡ (P ⇒ Q) ∧ (Q ⇒ P ).
Thus, the statements
x ∈ A ⇔ x ∈ B and (x ∈ A ⇒ x ∈ B) ∧ (x ∈ B ⇒ x ∈ A)
are true for precisely the same objects x. Saying that the first of these is true
for all x means A = B. Saying that the second of these is true for all x means
both A ⊆ B (from x ∈ A ⇒ x ∈ B) and B ⊆ A (from x ∈ B ⇒ x ∈ A).
Therefore A = B means the same thing as A ⊆ B and B ⊆ A. We summarise
this as a theorem.
Theorem 3.1
Two sets A and B are equal if and only if both A ⊆ B and B ⊆ A.
Examples 3.5
Solution
Let A = {x : 2x2 + 5x − 3 = 0} and B = {x : 2x2 + 7x + 2 = 3/x}.
We need to show that every element of A is an element of B. The
} 2x + 5x − 3 = 0 has solutions x = 2 and x = −3, so A =
2 1
equation
{
2 , −3 .
1
When x = 21 , 2x2 + 7x + 2 = 1
2 + 7
2 + 2 = 6 = 3/x, so 1
2 ∈ B.
When x = −3, 2x2 + 7x + 2 = 18 − 21 + 2 = −1 = 3/x, so −3 ∈ B.
Therefore every element of A is an element of B, so A ⊆ B.
2. Let A = {{1}, {2}, {1, 2}} and let B be the set of all non-empty subsets
of {1, 2}. Show that A = B.
Solution
A ⊆ B since each of the three elements of A is a non-empty subset of
{1, 2} and therefore an element of B.
B ⊆ A since every non-empty subset of {1, 2} (i.e., every element of B)
is contained in A.
Using theorem 3.1, we conclude that A = B.
3. Suppose that A ⊆ B and let C be the set defined by
C = {x : x ∈ A ∨ x ∈ B}.
Show that C = B.
Solution
To show that C and B are equal, we will show that B ⊆ C and C ⊆ B.
Consider x ∈ B. Then x ∈ A ∨ x ∈ B is true, so x ∈ C. Thus every
element of B also belongs to C, so B ⊆ C.
Now consider x ∈ C. Then, by the definition of C, either x ∈ A or x ∈ B
(or both). However, if x ∈ A, then it follows that x ∈ B also, because
A ⊆ B. Therefore, in either case we can conclude x ∈ B. This shows
that every element of C also belongs to B, so C ⊆ B.
We have now shown B ⊆ C and C ⊆ B, so theorem 3.1 allows us to
conclude that B = C.
N ⊆ Z ⊆ Q ⊆ R ⊆ C.
Also frequently used are Z+ , Q+ , and R+ , the sets of positive integers, rational
numbers, and real numbers, respectively. Note that N is not equal to Z+ since
0 belongs to the former but not the latter. In addition, we shall sometimes
use E and O to denote the sets of even and odd integers, respectively:
Finally, we will need a notation for intervals. Let a and b be real numbers
such that a < b. The open interval (a, b) is (a, b) = {x ∈ R : a < x < b}.
The closed interval [a, b] is [a, b] = {x ∈ R : a ≤ x ≤ b}. The notation also
extends to ‘half-open’ intervals [a, b) = {x ∈ R : a ≤ x < b} and (a, b] = {x ∈
R : a < x ≤ b}.
Exercises 3.1
1. List the elements of each of the following sets, using the ‘. . . ’ notation
where necessary:
2. Define each of the following sets using a predicate; that is, write each
set in the form {x : P (x)} for some suitable predicate P .
91
6. Given that X = {a, b, c, d}, list the elements of each of the following
sets:
nineteenth-century English mathematician. In fact, diagrams such as figure 3.2 are more
properly called ‘Euler diagrams’ after Leonhard Euler who first introduced them in 1761.
Although both Venn and Euler had precise rules for constructing their diagrams, today
the term ‘Venn diagram’ is used informally to denote any diagram that represents sets by
regions in the plane.
93
set U . If an element belongs to more than one set in the diagram, the two
regions representing the sets concerned must overlap and the element is placed
in the overlapping region.
Example 3.6
Let U = {1, 2, 3, . . . , 12},
A = {n : n is even} = {2, 4, 6, 8, 10, 12},
B = {n : n is prime} = {2, 3, 5, 7, 11}.
Figure 3.1 is a Venn-Euler diagram representing these sets and their elements.
U
A 3 B
4
6 8 5
2
7
10
12 11
1 9
B
U
A ∩ B = {x : x ∈ A and x ∈ B}.
94
A B
U
A ∪ B = {x : x ∈ A or x ∈ B}.
Figure 3.4 is a Venn-Euler diagram representing the union; the shaded region
of the diagram represents A ∪ B.
A B
U
Then
The definitions of intersection and union extend to more than two sets. Let
A1 , A2 , . . . , An be sets.
95
Two sets A and B are said to be disjoint if they have no elements in common;
that is, if their intersection is the empty set, A ∩ B = ∅. In a Venn-Euler
diagram, we represent disjoint sets by drawing the regions representing them
to be separated and non-overlapping. This is illustrated in figure 3.5.
A B
U
A − B = {x : x ∈ A and x ̸∈ B}.
A B
U
U
A
Examples 3.7
Solution
It is helpful to have the elements of A, B, and C listed first:
A = {3, 6, 9, 12}
B = {1, 2, 3, 4, 6, 12}
C = {4, 8, 12}.
Note that, in this example, the sets are equal in pairs. For these sets,
we have
A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C),
A − (B ∩ C) = (A − B) ∪ (A − C),
and A ∪ C = Ā ∩ C̄
It is natural to ask whether these are properties of these particular sets
or whether they are true for all sets. We will explore this for one of the
pairs of sets in the next example.
A B U A B U
C C
A BÈC AÇ B AÇC
A Ç (B È C ) ( A Ç B) È ( A Ç C )
Associative Laws (A ∩ B) ∩ C = A ∩ (B ∩ C)
(A ∪ B) ∪ C = A ∪ (B ∪ C)
Absorption Laws A ∩ (A ∪ B) = A
A ∪ (A ∩ B) = A
Distributive Laws A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)
De Morgan’s Laws A ∪ B = Ā ∩ B̄
A ∩ B = Ā ∪ B̄
Complement Laws A ∪ Ā = U
A ∩ Ā = ∅
∅
¯ =U
U¯ = ∅
Power set
Let A be any set. Then we can define a set comprising all the subsets of A.
This is called the power set of A, denoted P(A).
100
Examples 3.8
1. The following is a list of sets A and their power sets P(A) for some small
sets.
A=∅ P(A) = {∅}
A = {a} P(A) = {∅, {a}}
A = {a, b} P(A) = {∅, {a}, {b}, {a, b}}
A = {a, b, c} P(A) = {∅, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}
A = {a, b, c, d} P(A) = {∅, {a}, {b}, {c}, {d}, {a, b}, {a, c}, {a, d},
{b, c}, {b, d}, {c, d}, {a, b, c}, {a, b, d},
{a, c, d}, {b, c, d}, {a, b, c, d}}
Note that, for every set A, the empty set ∅ and the set A itself both
belong to the power set P(A).
Also note that the power set of the empty set is not empty; P(∅) = {∅}
which is a set containing a single element, namely the empty set. Using
the analogy introduced in example 3.3.6, P(∅) = {∅} is a paper bag
that contains another paper bag (albeit an empty one); this is different,
of course, from an empty paper bag.
2. Let A = {a, b, c} and B = {a, b}. Determine whether each of the follow-
ing is true or false and give a brief justification.
(i) B ∈ P(A)
(ii) A ∈ P(A)
(iii) A ⊆ P(A)
(iv) {{a, c}, B} ⊆ P(A)
(v) {a, c} ∈ P(A) ∩ P(B)
(vi) ∅ ⊆ P(A)
Solution
(v) This is false. The set {a, c} is not a subset of B = {a, b}, and so
does not belong to P(B). Hence {a, c} ̸∈ P(A) ∩ P(B).
(vi) The statement ∅ ⊆ P(A) is true because the empty set is a subset
of every set.
Exercises 3.2
1. For each of the following, draw a single Venn-Euler diagram and shade
the region representing the given set.
(i) (A − B) ∪ (B − A)
(ii) (A ∪ B) − (A ∩ B)
(iii) (A ∩ B) ∪ C
(iv) A ∩ (B ∪ C)
(v) (A − B) ∪ C
2. Let U = {n : n ∈ Z and 1 ≤ n ≤ 10}, A = {n : n is even}, B = {n :
n is prime}, and C = {1, 4, 9}.
Define each of the following sets by listing their elements.
(i) A∩B
(ii) A∪B
(iii) A−B
(iv) B∩C
(v) Ā ∩ B
(vi) A ∩ (B ∪ C)
(vii) A∪C
(viii) (A − C) − B
3. Consider the sets A, B, C, D, and E represented by the following Venn-
Euler diagram. (The sets C and E are represented by shaded regions.)
For each of the following pairs of sets X and Y , state whether X ⊆ Y ,
Y ⊆ X, X ∩ Y = ∅ (that is, X and Y are disjoint) or none of these.
102
(i) X = A ∪ B, Y =C
(ii) X = A ∩ B, Y =D
(iii) X = A ∩ B, Y =C
(iv) X = E, Y =A∩D
(v) X = B ∩ C, Y =C ∪D
(vi) X = A ∩ E, Y =D∪E
(vii) X = C ∪ E, Y =A∪D
(viii) X = C − B, Y =D∪E
(ix) X = A ∪ D, Y =B∩E
(x) X = A − E, Y =A−D
A ∗ B = (A − B) ∪ (B − A).
(i) Let A = {2, 4, 6, 8, 10}, B = {4, 8, 12, 16}, and C = {1, 4, 16, 64}.
List the elements of each of the following sets.
(a) A∗B
(b) A∗C
(c) A ∗ (B ∩ C)
(d) A ∗ (B ∪ C)
(e) (A ∗ B) ∩ (A ∗ C)
(f) (A ∗ B) ∪ (A ∗ C)
(ii) For each of the following, draw a single Venn-Euler diagram and
shade the region representing the given set.
(a) A ∗ (B ∩ C)
(b) A ∗ (B ∪ C)
(c) (A ∗ B) ∩ (A ∗ C)
(d) (A ∗ B) ∪ (A ∗ C)
(i) A = {1, 2, 3}
(ii) A = {1, {2, 3}}
103
The order in which the elements of a finite set are listed is immaterial; in par-
ticular, {x, y} = {y, x}. In some circumstances, however, order is significant.
For instance, in coordinate geometry the points with coordinates (1, 2) and
(2, 1), respectively, are distinct. We therefore wish to define, in the context of
sets, something akin to the coordinates of points used in analytical geometry.
An ordered pair (x, y) of elements satisfies:
With this definition it is clear that (x, y) and (y, x) are different (unless x = y),
so the order is significant. It could be argued, with justification, that we have
not really defined the ordered pair, but merely listed a property which we
desire of it. In fact, (x, y) can be defined in terms of (unordered) sets, but this
is not particularly instructive. What is important about ordered pairs is the
property above.
Let A and B be sets. Their Cartesian product 3 denoted A × B is the set
of all ordered pairs where the first element is drawn from the set A and the
second element is drawn from the set B:
When A = B we write A2 for the Cartesian product A×A. Thus, for example,
the Cartesian plane is R2 = R × R = {(x, y) : x ∈ R and y ∈ R}.
3 Named after the French mathematician and philosopher René Descartes (1596–1650),
B A´ B
(a,b)
b
a A
Examples 3.9
A × B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c),
(3, a), (3, b), (3, c), (4, a), (4, b), (4, c)}.
A × X = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c), (3, a), (3, b), (3, c)}
and
B × X = {(2, a), (2, b), (2, c), (3, a), (3, b), (3, c), (4, a), (4, b), (4, c)},
(A × X) ∩ (B × X) = {(2, a), (2, b), (2, c), (3, a), (3, b), (3, c)}.
105
(A ∩ B) × X = {(2, a), (2, b), (2, c), (3, a), (3, b), (3, c)}.
(A × X) ∩ (B × X) = (A ∩ B) × X.
A´ X B´ X
A
AÇ B B
A´ X B´ X
(x1 , x2 , . . . , xn ) = (a1 , a2 , . . . , an ) ⇔ x1 = a1 , x2 = a2 , . . . , xn = an
⇔ xr = ar , for r = 1, 2 . . . , n.
n-tuples where the first element lies in the first set A1 , the second element lies
in the second set A2 , and so on:
A1 × A2 × . . . × An = {(a1 , a2 , . . . , an ) : a1 ∈ A1 , a2 ∈ A2 , . . . , an ∈ An }.
Example 3.10
Let A = {1, 2, 3}, B = {a, b, c} and C = {α, β}. Then
A × B × C = {(1, a, α), (1, a, β), (1, b, α), (1, b, β), (1, c, α), (1, c, β),
(2, a, α), (2, a, β), (2, b, α), (2, b, β), (2, c, α), (2, c, β),
(3, a, α), (3, a, β), (3, b, α), (3, b, β), (3, c, α), (3, c, β)}.
Exercises 3.3
1. Let A = {1, 2, 3}, B = {2, 3, 4}, X = {a, b, c}, and Y = {c, d, e}. Evalu-
ate each of the following sets by listing their elements.
(i) A × (X ∩ Y )
(ii) (A ∩ B) × (X ∩ Y )
(iii) (A × X) ∩ (B × Y )
(iv) (A × Y ) ∩ (B × X)
(v) (A − B) × X
(vi) (A × X) − (B × X)
(vii) (A ∪ B) × (X ∩ Y )
(viii) (A ∩ X) × Y
2. This question explores how the Cartesian product interacts with the
subset relation.
(A ∩ B) × (X ∩ Y ) = (A × X) ∩ (B × Y ).
107
(i) Verify this identity for the sets A = {1, 2, 3, 4}, B = {2, 4, 6}, X =
{x, y}, and Y = {y, z}.
(ii) Draw two diagrams similar to that in figure 3.10, one showing
(A ∩ B) × (X ∩ Y )
(A ∪ B) × (X ∪ Y ) ̸= (A × X) ∪ (B × Y ).
Note that you only need to show the two sets are different; it should
not be necessary to list all the elements of both sets.
(ii) By drawing similar diagrams to those in question 3 (ii), conjecture
a general expression for
(A ∪ B) × (X ∪ Y )
This is a very general definition — A and B are any sets and f is any rule with
the appropriate property. It is quite common to visualise the function rule as
being encapsulated in a ‘function machine’. This is a ‘black box’, illustrated
in figure 3.11, which has the property that if an element a ∈ A is fed into the
machine, it produces as output the associated element f (a) ∈ B.
a f f(a)
f
A B
a f(a)
Examples 3.11
1. Let A = {a, b, c, d, e} and B = {1, 2, 3, 4, 5, 6}. A function f : A → B is
defined by
a 7→ 2, b 7→ 4, c 7→ 2, d 7→ 5, e 7→ 1.
f
A B
a
f(a) im f
f
A B
a 1
b 2
c 3
d 4
e 5
6
The domain R − {0} is the set of non-zero real numbers which is fre-
quently denoted
R∗ = {x ∈ R : x ̸= 0}.
(i) f : R → R, f (x) = x2 .
2x
(ii) g : R → R, g(x) = 2 .
x +1
Solution
im f = {y ∈ R : y ≥ 0}.
y
y = x2
im f
2x
(ii) Finding the image of g : R → R, g(x) = is more difficult
+1 x2
since we cannot immediately ‘see’ what the image is.
Now y ∈ im g if and only if
2x
y= for some x ∈ R.
x2 + 1
Now this is equivalent to
yx2 + y = 2x
or
yx2 − 2x + y = 0.
111
4 − 4y 2 ≥ 0.
Hence
y 2 ≤ 1 (and y ̸= 0),
which means
−1 ≤ y ≤ 1 (and y ̸= 0).
Therefore, provided −1 ≤ y ≤ 1 and y ̸= 0, there exists a real
number x such that y = g(x). The value y = 0 is a special case,
but clearly g(0) = 0, so 0 ∈ im g.
Therefore im g is the interval
im g = [−1, 1] = {y ∈ R : −1 ≤ y ≤ 1}.
y
2x
1 y= 2
im f x +1
-1
2x
FIGURE 3.16: The image of the function g : R → R, g(x) = .
x2 + 1
(a, 2), (b, 4), (c, 2), (d, 5), (e, 1).
112
Examples 3.12
2. Similarly, the two functions in example 3.11.2 are defined by the sets
{( ) }
f = x, (x + 1)2 : x ∈ R ⊆ R2
{( ) }
sin x
and g = x, : x ∈ R − {0} ⊆ R − {0} × R.
x
f = {(x, y) ∈ R2 : y = x2 }.
R≥0 = {x ∈ R : x ≥ 0}.
or formally as
√
g = {(x, y) ∈ R≥0 × R≥0 : x = y 2 } = {(x, y) ∈ R≥0 × R≥0 : y = x}.
√
Note that x means ‘the non-negative square root of x’.
Composition of functions
f g
A B C
x y z
gof
f (a)
a f g ( g o f )(a )
gof
Examples 3.13
1. Let f : R → R, f (x) = 4x − 1 and g : R → R, g(x) = x2 + 1 be two
functions. Evaluate:
(i) g ◦ f (2)
(ii) f ◦ g(2)
(iii) g ◦ f (x)
(iv) f ◦ g(x)
Solution
(i) Since g ◦ f (2) = g(f (2)), we first need to evaluate f (2) and then
‘apply’ g to the result. We have f (2) = 4 × 2 − 1 = 7, so
Solution
We have
f [2] (x) = f ◦ f (x) = f (2x + 1) = 2(2x + 1) + 1 = 4x + 3,
f [3] (x) = f ◦ f [2] (x) = f (4x + 3) = 2(4x + 3) + 1 = 8x + 7,
f [4] (x) = f ◦ f [3] (x) = f (8x + 7) = 2(8x + 7) + 1 = 16x + 15,
f [5] (x) = f ◦ f [4] (x) = f (16x + 15) = 2(16x + 15) + 1 = 32x + 31.
Exercises 3.4
For each of the following, either evaluate the expression or explain why
it is not defined.
( )
(i) f 12 (v) (g ◦ g)(3)
(1)
(ii) g 2 (vi) (h ◦ h)(x)
(1)
(iii) (g ◦ h) 2 (vii) (f ◦ h)(x)
(iv) (f ◦ f )(−2) (viii) (f ◦ g)(x)
116
(i) f : R → R, x 7→ x2 + 2
(ii) f : R → R, x 7→ (x + 2)2
(iii) f : R → R, x 7→ 1/(x2 + 2)
(iv) f : R → R, x 7→ 4x/(x2 + 5)
√
(v) f : R → R, x 7→ x2 + 1
f
A B
a1
b
a2
FIGURE 3.20: Different elements of the domain with the same image.
Definition 3.3
Let f : A → B be a function. Then f is injective (or one-one) if:
for all a1 , a2 ∈ A, f (a1 ) = f (a2 ) ⇒ a1 = a2 .
f
A B
im f = B
Definition 3.4
Let f : A → B be a function. Then f is surjective (or onto) if:
Examples 3.14
a 7→ 2, b 7→ 4, c 7→ 2, d 7→ 5, e 7→ 1.
3. In the previous example, we saw that f was neither injective nor sur-
jective and g was both injective and surjective. To emphasise that the
properties of injectivity and surjectivity are independent of one another,
define functions that are:
Solution
Simple solutions are provided using small finite sets for the domain and
codomain which we do first in each case. A little more challenging is to
find examples A → B where A and B are both subsets of R and we do
this secondly in each case.
A and also that (at least) a pair of elements of A have the same
image.
Let A = {a, b, c, d} and B = {1, 2, 3} and define f : A → B by
g : R → R≥0 , g(x) = x2 .
b¢
y = f ( x)
B
b
A a1 a2
situation never occurs. In other words, a horizontal line through any point
b ∈ B on the y-axis will meet the graph in at least one point.
These considerations are summarised in the following theorem.
Definition 3.5
A function f : A → B is bijective, or is a bijection, if it is both injective
and surjective.
The arrow diagram for f was given in figure 3.14. Reversing the arrows gives
the diagram shown in figure 3.23. This diagram is not that of a function
B → A for two reasons. Firstly, the elements 3 and 6 are not associated with
element of A. Secondly, the element 2 in B is associated with two elements,
a and c in A. Thus the arrow diagram in figure 3.23 fails both aspects of the
definition of a function given in definition 3.1.
One of the reasons why bijective functions are important is that if f : A → B is
a bijection, then neither of these problems occurs when reversing the arrows.
Hence, if f : A → B is a bijection, then ‘reversing the arrows’ does define
a function B → A. The resulting function B → A is called the inverse
function of f and is denoted f −1 . By reversing the arrows we mean that if f
gives an arrow from a to b, then f −1 gives an arrow from b to a. Symbolically, if
f (a) = b, then f −1 (b) = a. We summarise these considerations in the following
definition.
122
A B
a 1
b 2
c 3
d 4
e 5
6
Definition 3.6
Let f : A → B be a bijective function. The function f −1 : B → A defined by
f
A B
f -1
a = f -1(b) b = f(a)
Examples 3.15
f −1 : R → R, f −1 (y) = 13 (y + 1).
y
y = 3x - 1
x
1
3
-1
f
A B A B
f
A B A B
function B → A because there are elements of B that are not associated with
any element of A.
This problem is more easily fixed than a failure of injectivity. If we ‘throw
away’ the elements of B that are not hit by arrows, then reversing the arrows
does define a function. Throwing away the elements not hit by arrows just
leaves the image of the function im f. So, if f : A → B is injective but not
surjective, then changing the codomain to im f gives a bijective function f :
A → im f. This bijective function does have an inverse f −1 : im f → A defined
by
f −1 (b) = a if and only if f (a) = b for all b ∈ im f.
This inverse function is illustrated in figure 3.28.
Exercises 3.5
1. For each of the following functions, determine whether or not the func-
tion is: (a) injective; (b) surjective.
125
f f -1
A B A im f
im f
(i) f : R → R, f (x) = 12 x − 7.
(ii) E = {2n : n ∈ Z} = {even integers}
f : Z → E, f (n) = 2n + 4.
(iii) R≥0 = {x ∈ R : x ≥ 0}
f : R≥0 → R≥0 , f (x) = |x − 1|.
(iv) A = {countries of the world}, B = {cities of the world}
f : A → B, f (X) = capital city of X.
(v) A = {countries of the world }, B = {cities of the world}
f : B → A, f (X) = country containing X.
n
if n is even
2
(vi) f : Z → Z, f (n) =
n − 1 if n is odd.
2
{
n + 1 if n ≥ 0
(vii) f : Z → Z, f (n) =
n if n < 0.
y y
B B
A
x x
A
(i) (ii)
y y
B B
A
x x
A
(iii) (iv)
y y
B x x
A A
(v) (vi)
3. Show that each of the following functions is a bijection and find its
inverse.
5x + 3
(i) f : R → R, f (x) = .
8
3x
(ii) f : R − {−1} → R − {3}, f (x) = .
x+1
(iii) f : [1, 3] → [−2, 2], f (x) = 2x − 4.
4
(iv) f : R+ → (0, 2), f (x) = .
x+2
(v) f : R2 → R2 , f (x, y) = (y, x).
(vi) f : R2 → R2 , f (x, y) = (2x − 1, 5y + 3).
127
n
if n is even
2
(vii) f : Z+ → Z, f (n) =
1 − n
if n is odd.
2
4. Let f : A → B be a function that is neither injective nor surjective.
4.1 Introduction
129
130
in section 2.5. Any mathematical proof will have a context and an intended
audience, which our formal framework will need to take into account.
Theorem 4.1
The sum and difference of two odd integers are even.
Commentary
The original statement of the result, ‘the sum and difference of two odd inte-
gers are even’, did not obviously give the logical structure of the proposition.
We first needed to rewrite it so that the universal quantification became evi-
dent, ‘for all integers m and n, if m and n are odd, then both m + n and m − n
are even’. If we define the following predicates over the universe of integers
O : . . . is odd
E : . . . is even,
In the proof, we assumed that m and n are odd, O(m) ∧ O(n), and from this
deduced that m + n is even and m − n is even, E(m + n) ∧ E(m − n).
In fact, we proved m + n is even separately from the proof that m − n is
even. Essentially, we gave two separate proofs: one for (O(m) ∧ O(n)) ⇒
E(m+n) and one for (O(m)∧O(n)) ⇒ E(m−n). However, from example 2.4.2
(page 36), we know that
Theorem 4.2
For all integers m and n, if m and n are odd, then m2 − n2 is divisible by 4.
Perhaps the most obvious proof of this statement would be to follow a similar
strategy to that used in the previous example. This would produce the follow-
ing proof (which starts in exactly the same way as the proof in the previous
example).
Hence m2 − n2 is divisible by 4.
132
This proof is perfectly correct and, we hope, easy to follow. There is an al-
ternative proof, however, that builds on the result of example 4.1 above. We
give this alternative proof below.
Hence m2 − n2 is divisible by 4.
Commentary
There are several observations to make regarding these proofs. Perhaps the
most obvious is that this example indicates that proofs are not unique. There
will frequently be several essentially different ways of proving a result; that
is, proofs which differ in approach or substance, and not just in the style of
presentation. Which of several proofs is to be preferred will be a matter of
judgement and will depend on various factors. For example, some people will
prefer shorter, more sophisticated proofs that may be harder to understand;
others may prefer proofs that are perhaps longer but do not rely on so much
knowledge on the part of the reader.
The two proofs given above illustrate this. The first proof is more elementary
in the sense that it assumes nothing other than the meaning of even and odd
and some algebraic manipulation. The second proof is shorter and, one might
argue, more elegant but relies on the results proved in the previous example
and so is assuming greater ‘background knowledge’ on behalf of the reader.
In fact, this occurs all the time — the proofs of some results rely on other
propositions that need to have been proved earlier. We shall explore this idea
— that proofs build on proofs that in turn build on other proofs etc. — in
more detail in section 4.5 below.
The prime factorisation theorem says that every integer greater than 1 can
be factored into prime numbers, and is part of the so-called ‘Fundamental
Theorem of Arithmetic’. The full Fundamental Theorem goes on to state that
the factorisation for a given integer is unique apart from the ordering of the
prime factors. However, the proof of the uniqueness part is more sophisticated
and can wait until later (see chapter 7).
24 = 2 × 12
=2×3×4
= 2 × 3 × 2 × 2.
In this case, the last step is the hardest: factorising 13 717 421 = 3607 × 3803
and knowing that these factors are prime so that no further factorisation is
possible. The theorem says that we can obtain such an expression for any
integer bigger than 1.
Now that we have some intuitive ‘feel’ for the theorem, we can begin the search
for a proof. In fact, the basis of the proof is already contained in the examples
above. There, for example, we found the prime factors of 24 by first finding
two factors (2 and 12) and then finding factors of these where possible, and
so on. Since this process can be applied to any integer greater than 1, we can
construct a proof of the general result. (A shorter, more sophisticated proof of
this result will be given later — see chapter 8.) We can now give an informal
proof of the Prime Factorisation Theorem.
134
Proof. Let n be any integer greater than 1. If n is prime then there is nothing
to prove as n itself is already expressed as a ‘product’ of primes, albeit in a
rather trivial way.
If n is not prime, then there exist factors n1 and n2 , each greater than 1, such
that n = n1 × n2 .
Now consider n1 and n2 in turn. If n1 is composite (that is, not prime),
then it can be expressed as a product of two integers each greater than 1, say
n1 = m1 ×m2 . Similarly, either n2 is prime or it can be expressed as a product
n2 = m3 × m4 where m3 and m4 are greater than 1. At this stage we have
expressed n in one of the following four ways:
Next consider each mi in turn and continue the process. At every step in
the process, each factor is either prime or is split into two smaller factors.
Therefore, this ‘subdivision’ process must eventually stop. When the process
stops, the result is an expression of the form
n = p1 × p2 × . . . × pk
Commentary
Our treatment of this theorem and its proof is more detailed than is usual for
a mathematics text. There are several reasons for this. One is our desire to
give some indication at least of how the proof might be discovered, rather than
just presenting the proof itself. If we are to learn how to construct proofs, it is
clearly desirable to gain some insight into how a proof evolves from underlying
ideas. It will not be sufficient just to study completed proofs. Another reason is
to indicate the importance of precisely defined terms, such as ‘prime number’.
Perhaps the most important lesson to learn from this example is that any
mathematical proof is an exercise in communication. A correct but incompre-
hensible proof is of little use to anyone (and we hope our proof does not fall
into that category). In writing proofs, clarity and comprehensibility, as well
as correctness, are important goals.
135
Exercises 4.1
1. Prove each of the following.
(i) The sum of any two consecutive integers is odd.
(ii) For all integers n, if n is prime, then n2 + 5 is not prime.
(iii) For all integers n, if n − 2 is divisible by 4, then n2 − 4 is divisible
by 16.
2. (i) Prove that the sum of any three consecutive positive integers is
divisible by 3.
(ii) Prove that the sum of any five consecutive positive integers is di-
visible by 5.
3. (i) Prove that the product of any three consecutive positive integers
is divisible by 6.
(ii) Prove that the product of any five consecutive positive integers is
divisible by 24.
4. (i) Prove that the sum of the squares of any two consecutive positive
integers is odd.
(ii) Prove that the sum of the squares of any three consecutive positive
integers is one less than a multiple of 3.
Theorem 4.1
The sum of two odd integers is even.
Theorem 4.1
For all integers m and n, if m and n are odd, then m + n is
even.
These two features of our proof are examples of general principles which we
now describe.
over the universe for m and n of positive integers less than 6. We could do
this as follows.
This verifies the result for each pair (m, n) where m and m are odd positive
integers less than 6, so the result follows.
When the universe is infinite, this approach is clearly impossible and the
Principle of Universal Generalisation is required. The crucial point to note
about the arbitrary element k of the universe is not whether it is labelled n
or k, but rather that it is not assumed to possess any attribute that is not
possessed by every element of the universe. In other words, it is a ‘general’
element of the universe.
138
The second feature of our proof that is a general principle is that we began with
an initial proposition P and then made a sequence of deductions culminating
in a final proposition Q. We call this the ‘deductive method’. Essentially,
this says that mathematical proofs use deductive reasoning as described in
section 1.4 rather than inductive reasoning, described in section 1.3, which is
the basis of most human knowledge and belief.
Deductive Method
A proof starts with some initial statement or statements and proceeds by
making a sequence of deductions that follow logically until a final statement
is obtained.
As we shall see, different types of proof have different initial and final state-
ments. The important aspect of the deductive method is that a proof comprises
a sequence of statements that follow logically from earlier statements in the
proof. Later in this chapter, we will examine in more detail what we mean by
‘follows logically’; see section 4.5.
There is one further important observation that we wish to make regarding our
proof of theorem 4.1. Although the proof itself is straightforward, it assumes
a certain familiarity with the integers and their properties. In particular, the
following properties are among those assumed, either explicitly or implicitly.
Background knowledge
In any proof, the properties of the system under consideration that are as-
sumed implicitly but not referred to explicitly, will be referred to as our back-
ground knowledge of the system.
By its very nature, this background knowledge is somewhat vague and ill-
defined and it will vary from context to context. For example, two specialists
in a particular branch of mathematics will have a very extensive background
knowledge of their field that will not be shared by a layperson or novice in
the field. Although it is ill-defined, it is nevertheless important. A proof will
only be understandable by a reader if they share the background knowledge
that the proof writer assumed when writing the proof.
Anyone writing a proof will need to consider how much background knowl-
edge they may assume or wish to assume. This will depend on who is the
intended audience for the proof as well as the preferences of the proof writer.
In section 4.2, we gave two different proofs of theorem 4.2.
The first proof assumed less prior knowledge than the second proof, but was
longer and, perhaps, less elegant. This example illustrates in a small way
that there is often a trade-off between ‘elementary’ proofs, those that assume
less background knowledge, and more ‘sophisticated’ proofs. Since elementary
proofs have less to draw on, they can sometimes be longer and more complex
in their reasoning. Set against this, there is a potential danger with more
sophisticated proofs in that the reader may not possess all the knowledge that
is assumed of them.
We conclude this section with a brief consideration of how the previous dis-
cussion relates to the following proof in set theory. In this example, we first
prove the following result about sets.
Theorem 4.4
For all sets A and B, A ∩ B ⊆ A ∪ B.
How does this example relate to our previous discussion? The first point to
note is the use of the Principle of Universal Generalisation. The statement to
be proved is universally quantified (‘for all sets A and B . . . ’) and the proof
starts by letting A and B be arbitrary sets. In other words, although it is
not mentioned explicitly, the proof implicitly used the Principle of Universal
Generalisation.
Secondly, the background knowledge used in the proof draws on section 3.3.
In particular, it explicitly uses the meaning of
Thirdly, the proof follows the deductive method. The initial statements are
‘A is a set’, ‘B is a set’, and ‘x ∈ A ∩ B’. Deductions are then made firstly to
obtain the statement x ∈ A ∪ B and then, using the background knowledge
of the meaning of subset, the final statement A ∩ B ⊆ A ∪ B is deduced.
In summary, the framework for proofs that we have developed has the following
components and each of our proofs has exhibited these.
141
Exercises 4.2
(a) identify how the proof uses the Principle of Universal Generalisa-
tion;
(b) identify explicitly some of the background knowledge that is used
in the proof;
(c) describe how the proof uses the deductive method — what are the
initial statements and what is the final statements?
We begin by looking again at theorem 4.1, the first theorem and proof in
section 4.3. The following summarises the overall structure of the proof but
omits the details of the actual deductions made.
142
Theorem 4.1
For all integers m and n, if m and n are odd, then m + n is
even.
The structure of the proof is to assume that m and n are arbitrary odd integers
— these are the initial statements — and to deduce that m+n is even — this is
the final statement. With the universe being the integers and with predicates
O for ‘odd’ and E for ‘even’, the statement being proved is the conditional
The structure of the proof was to assume the antecedent O(m) ∧ O(n) and
deduce the consequent E(m + n). This general structure is called the ‘method
of direct proof’, which we now define.
It is easy to see why this method works. Recall the truth table for the condi-
tional P ⇒ Q, given on page 21 and repeated below.
P Q P ⇒Q
T T T
T F F
F T T
F F T
Theorem 4.2
For all integers m and n, if m and n are odd, then m2 − n2 is divisible by 4.
Each proof assumed P and from this deduced Q; in other words, each proof
was a direct proof. The two proofs differed in the sequence of deductions used
to obtain Q from P , but not in their overall structure.
We have also seen two other proofs, in theorems 4.3 and 4.4, where the state-
ments being proved are not naturally expressed as a conditional, P ⇒ Q.
Example 4.1
In this example, we consider the interaction between composition of functions,
described in section 3.5, with the properties of injectivity and surjectivity,
defined in section 3.6. Two obvious questions to ask are:
Is the composite of two injective functions an injective function?
Is the composite of two surjective functions a surjective function?
Let f and g be two functions such that the composite g ◦ f is defined —
figure 3.18 on page 114 illustrates the setup. Recall that, informally, a function
is injective if different elements always have different images. Suppose this is
true for both f and g and consider the composite g ◦ f , which has rule ‘apply
f then apply g’. Starting with different elements, applying f gives different
elements since f is injective; then applying g still gives different elements
since g is injective. This suggests that the composite of two injections is also
an injection.
Now suppose that f and g are surjective. Then each element of their respec-
tive codomain is the image of some element in the domain; informally, every
element of the codomain is ‘hit by an arrow’ coming from some element of
the domain. Again consider g ◦ f . The codomain of g ◦ f is the same as the
codomain of g. Since g is surjective, every element of this codomain is hit by
a ‘g-arrow’. But the starting point of this g-arrow lies in the codomain of f ,
so it is hit by an ‘f -arrow’ as f is surjective. Putting the two arrows together,
we see that every element of the codomain of g ◦ f is hit by a composite ‘f
followed by g arrow’. This suggests that the composite of two surjections is
also an surjection.
The following theorem summarises the preceding discussion.
145
Theorem 4.5
Let f : A → B and g : B → C be two functions with composite function
g ◦ f : A → C.
Proof.
(i) Suppose that f : A → B and g : B → C are both injective functions.
Let a1 , a2 ∈ A and let b1 = f (a1 ) and b2 = f (a2 ). To show that g ◦ f is
injective, we need to show that, if (g ◦ f )(a1 ) = (g ◦ f )(a2 ), then a1 = a2 .
Now
(g ◦ f )(a1 ) = (g ◦ f )(a2 )
⇒ g(f (a1 )) = g(f (a2 ))
⇒ g(b1 ) = g(b2 ) (since f (a1 ) = b1 , f (a2 ) = b2 )
⇒ b1 = b2 (since g is injective)
⇒ f (a1 ) = f (a2 ) (since f (a1 ) = b1 , f (a2 ) = b2 )
⇒ a1 = a2 (since f is injective).
Hence g ◦ f is injective.
Hence g ◦ f is surjective.
Commentary
Each of the two parts of the proof is a direct proof of a conditional P ⇒ Q.
We started each proof by assuming P : f and g are both injective or both
surjective functions. Then each proof made a number of deductions to obtain
Q: g ◦ f is injective or surjective.
Note also that each proof uses implicitly the Principal of Universal Generalisa-
tion: each part proves the result for arbitrary injective or surjective functions,
146
Finally, the principal background knowledge used in each case is the meaning
of the terms ‘injective’ and ‘surjective’, both in terms of what we may assume
about f and g and also the property that must be established for g ◦ f .
f ( x)
f ( x) = x
1. The first property we will prove is the following inequality, known as the
triangle inequality for the modulus function.
Theorem 4.6
For all x, y ∈ R, |x + y| ≤ |x| + |y|.
Since the values of |x| and |y| depend on whether x and y are positive
or negative, we will split the proof into four cases:
Case 1: 0 ≤ x ≤ y
Case 2: x < 0 ≤ y and x + y ≥ 0
Case 3: x < 0 ≤ y and x + y < 0
Case 4: x ≤ y < 0
|x + y| = x + y = |x| + |y|,
Case 2. In this case |x| = −x, which means that x < 0 < −x. Also
|y| = y and |x + y| = x + y. Therefore
Case 3. Again we have |x| = −x. Also |y| = y, which means that
−y < 0 < y. Since x + y is negative, we have |x + y| = −(x + y).
Therefore
Case 4. In this case we have |x| = −x and |y| = −y. Since x + y < 0
also, we have |x + y| = −(x + y). Therefore
Commentary
The opening phrase, ‘without loss of generality we may assume that . . . ’,
is quite common in proofs. What this means is that there are several
cases — two in our example — where the reasoning for each case is
essentially the same. Therefore we will present the reasoning in only one
of the cases. In our example, the two cases are x ≤ y and y ≤ x. Since
the statement we are proving, |x + y| ≤ |x| + |y|, is symmetric in x and
148
y, we could obtain the proof in the case y ≤ x from the proof when
x ≤ y simply by swapping the roles of x and y. Hence there is no loss of
generality by making the additional assumption x ≤ y.
Since the definition of the modulus function involves two cases (x ≥ 0
and x < 0), the proof naturally splits into four cases. These comprise
three ‘main’ cases, one of which has two ‘sub-cases’, as illustrated in
figure 4.2. To complete the proof, we need to show that the required
result holds in each of the four cases. The argument in each case is
straightforward and just requires careful consideration of which terms
are positive and which are negative.
0£ x£ y x<0£ y x£ y<0
x+ y ³0 x+ y <0
x+ y £ x + y
FIGURE 4.2: Illustrating the four cases in the proof of |x + y| ≤ |x| + |y|.
The first point to note here is that, although the existential quan-
tification is explicit, there is a hidden universal
quantification:
it is
implicit that the implication |x + 1| < δ ⇒ 3x2 − x − 4 < 1 holds
for all real numbers x.
We can think of the proposition
as asserting that we may control
the size of 3x2 − x − 4, in the sense of ensuring it is less than 1,
provided we are permitted to control the size of |x + 1|, in the sense
of ensuring that it is less than some specified δ. So, we begin by
considering the expression that we are trying to control,
2
3x − x − 4 = |(x + 1)(3x − 4)| = |x + 1| |3x − 4|.
Here we have first factorised the expression and then used the prop-
erty, |ab| = |a||b|, whose proof we leave as an exercise; see exer-
cise 4.3.1. Of these two terms, we have control over |x + 1| as we
can ensure that it is less than some δ > 0, but we need to consider
|3x − 4| more carefully. The ‘trick’ is to rewrite 3x − 4 in terms of
x + 1 and then apply the triangle inequality proved in the previous
example, as follows:
|3x − 4| = |3(x + 1) − 7|
≤ |3(x + 1)| + | − 7| (by the triangle inequality)
= 3|x + 1| + 7. (simplifying)
Proof. Let δ = 1
10 . For all x satisfying |x + 1| < δ, we have
2
3x − x − 4 = |(x + 1)(3x − 4)|
= |x + 1| |3x − 4|
= |x + 1| |3(x + 1) − 7|
≤ |x + 1|(3|x + 1| + 7) (triangle inequality)
< 10|x + 1| (since |x + 1| < δ < 1)
≤ 10 × 1
10 =1 (since |x + 1| < δ = 1
10 ).
Hence
2 we have shown that, when δ = 1
10 , |x + 1| < δ ⇒
3x − x − 4 < 1.
Commentary
The structure of the statement being proved is an existentially
quantified proposition: ∃δ • P (δ). (We also note that P (δ) involved
a universal quantification over x, but that does not alter the over-
all form of the statement as an existentially quantified proposi-
tion.) We proved the proposition by finding an explicit value for δ
(δ = 1/10) which ‘worked’. The bulk of the proof is concerned with
showing that the chosen value of δ has the required property. Later,
in chapter 7, we will see occasions where existence of an object is
established without an explicit value being found.
This example also illustrates that the process of finding a proof
is sometimes quite different from how the proof is eventually pre-
sented. In this case, the realisation that δ = 1/10 is sufficient comes
at the end of what we might call the ‘discovery process’. However,
in the proof itself, the choice of δ = 1/10 comes right at the begin-
ning.
It is also worth noting that the choice of δ = 1/10 is not unique.
Recall that we established
2
3x − x − 4 ≤ |x + 1|(3|x + 1| + 7).
ensure both inequalities hold, we require δ < 1/3 and δ < 1/8.
Therefore, an alternative choice for δ which makes the proof work
is δ = 1/8.
(ii) In this example we consider the following result.
151
For all ε > 0, there exists δ > 0 such that
|x + 2| < δ ⇒ x2 − 4 < ε.
This is similar to the previous example, but with another level of
quantification.
In the previous example we were required to show
that 3x2 − x − 4 was less than some specific value,
namely
1, by
choosing |x + 1| < δ. Now we have to show that x2 − 4 is less than
any arbitrary ε > 0 again by choosing |x + 2| < δ.
{ ε}
Proof. Given ε > 0, let δ = min 1, .
5
Then δ > 0 and |x + 2| < δ implies both that |x + 2| < 1 and that
ε
|x + 2| < . Now
5
2
x − 4 = |(x + 2)(x − 2)|
= |x + 2| |(x + 2) − 4|
≤ |x + 2|(|x + 2| + 4) (triangle inequality)
< 5|x + 2| (since |x + 2| < 1)
ε ε
≤ 5× =ε (since |x + 2| < ).
5 5
Hence
2 have shown that, for the given choice of δ, |x + 2| < δ ⇒
we
x − 4 < ε.
Commentary
This time we did not show the discovery process. Hence the choice
of δ = min {1, ε/5} at the start of the proof seems to come out of
nowhere.
What we actually did was to work through the first part of the
reasoning:
2
x − 4 = |(x + 2)(x − 2)|
= |x + 2| |(x + 2) − 4|
≤ |x + 2|(|x + 2| + 4) (triangle inequality).
In the next few pages, we introduce a topic that, we suspect, will be unfamiliar
to many readers. Our aim here is to show how a new piece of abstract math-
ematics is built from a few basic assumptions together with what we might
call a ‘standard toolkit of mathematics’. The basic assumptions will usually
be chosen to capture key properties that are common to many examples, pos-
sibly in diverse areas, that will provide a common framework worthy of study.
We do not wish to specify precisely what is contained in the ‘standard toolkit
of mathematics’, but it will include elements of propositional and predicate
logic, some set theory, the simple properties of integers, rational numbers and
real numbers, the properties of ‘equals’ and inequalities, and the idea of func-
tions and their basic properties. For the purposes of this discussion, we will
assume the material covered in chapters 2 and 3. Those readers who wish to,
may omit this discussion and go straight to section 4.5.
We aim to define a ‘metric space’ that will capture different circumstances in
which we have some space where we can measure distance. In other words,
we may think of a metric space as providing a general framework for ‘space
where we can measure distances’. An important observation is that the notion
of ‘distance’ — or ‘metric’ — is not universal but will vary according to context
as the following examples illustrate.
Examples 4.3
1. As a familiar example, the straight line distance between points P (x1 , y1 )
and Q(x2 , y2 ) in the plane is given by
√
d(P, Q) = (x1 − x2 )2 + (y1 − y2 )2 .
d ( P, Q ) = ( x1 - x2 ) 2 + ( y1 - y2 ) 2
Q
y1
y2 P
x2 x1
2. Residents of Manhattan in New York, for example, would not find the
‘crow flies’ distance very useful simply because this is not way they are
able to travel around the city. They may refer instead to the distance
between locations in the city as being ‘three blocks west and two blocks
north’, for example. The mathematical version of this is what we shall
call the Manhattan distance or Manhattan metric dM between
points P (x1 , y1 ) and Q(x2 , y2 ) in the plane defined by
Q
y1
| y1 - y2 |
P
y2
| x1 - x2 |
x2 x1
3. It is well known that the paths aeroplanes take when flying between cities
are arcs of great circles. (A great circle on a sphere is the intersection of
the sphere with a plane that passes through the centre of the sphere.)
Aeroplanes take these paths because they are the shortest distances
between points on the sphere. We call this great circle distance the
sphere distance or sphere metric dS between the points P and Q —
see figure 4.5.
154
Q
d S ( P, Q )
P
• The distance function d should take a pair of points (x, y) as ‘input’ and
return a result d(x, y) that is a real number.
• The last property is a little less obvious but arises from thinking about
the lengths of sides of triangles. If we have three points x, y, and z,
then the (direct) distance from x to z should be no greater than the
distance that goes via y: d(x, z) ≤ d(x, y) + d(y, z). This is illustrated in
figure 4.6.
155
It turns out that these properties are just those needed to define a sensible
distance function for which (a) we can build a useful theory and (b) there are
many examples in different contexts. The formal definition is the following.
Definition 4.1
Let X be a non-empty set. A metric on X is a function d : X × X → R
satisfying the following three conditions.
The condition (M3) is called the triangle inequality for the metric d.
d ( x, z ) z
x
d ( y, z )
d ( x, y )
y
Theorem 4.7
The function
(M3) To establish (M3), we will need the corresponding property for the mod-
ulus function,
|a − c| ≤ |a − b| + |b − c|. (**)
This follows from the triangle inequality for the modulus function, ex-
ample 4.2.4.6, page 146, by letting x = a − b and y = b − c.
Let (x1 , y1 ), (x2 , y2 ), (x3 , y3 ) ∈ R2 .
Then d((x1 , y1 ), (x2 , y2 )) + d((x2 , y2 ), (x3 , y3 ))
= (|x1 − x2 | + |y1 − y2 |) + (|x2 − x3 | + |y2 − y3 |)
= (|x1 − x2 | + |x2 − x3 |) + (|y1 − y2 | + |y2 − y3 |)
≥ |x1 − x3 | + |y1 − y3 | (using (**))
= d((x1 , y1 ), (x3 , y3 )).
Hence d satisfies (M3).
Since d satisfies the three conditions (M1), (M2), and (M3), it is a metric on
R2 .
whose distance from the centre is less than or equal to the radius. We denote
the disc with centre a and radius r as
D(a, r) = {x ∈ R2 : d(x, a) ≤ r}.
In three-dimensional space, the corresponding concept is the sphere S(a, r)
with a ∈ R3 and radius r ∈ R+ given by
S(a, r) = {x ∈ R3 : d(x, a) ≤ r}.
Clearly these definitions rely only on the notion of distance and therefore they
generalise to any metric space. The corresponding concept in a metric space
is that of a ‘closed ball’, which we now define.
Definition 4.2
Let X be metric space with metric d. Let a ∈ X and r ≥ 0 be a real number.
The (closed) ball, centre a and radius r in X is
B(a, r) = {x ∈ X : d(x, a) ≤ r}.
Example 4.4
Using the Manhattan metric for R2 , closed balls are diamond-shaped rather
than disc-shaped as in the Euclidean metric. For example, consider the unit
ball (that is, unit radius) centred at the origin 0 = (0, 0),
B(0, 1) = {x ∈ R2 : d(x, 0) ≤ 1} = {(x1 , x2 ) ∈ R2 : |x1 | + |x2 | ≤ 1}.
The ball, shown in figure 4.7, is bounded by four lines:
Examples 4.5
In these examples, we see how we can use what is familiar — discs in R2
coming from the Euclidean metric — to motivate results in the general context.
However, we also sound a note of caution. Although the familiar context can
motivate the more general case, we also need to be aware that any proofs must
only rely on the general context and must not assume anything that may be
true in the familiar context but not true more generally.
1. We first use our intuition about when discs in R2 are disjoint or subsets of
one another to state and prove corresponding results for general metric
spaces. Motivated by figure 4.8, it should be clear that, for two discs
D(a, r) and D(b, s) in R2 ,
158
1
B(0,1)
-1 1
-1
(i) if d(a, b) > r + s, then the discs are disjoint, D(a, r) ∩ D(b, s) = ∅;
(ii) if d(a, b) + r < s, then D(a, r) ⊆ D(b, s).
D (a, r )
D (a, r ) r
D (b, s )
r s d (a,b ) a
a d (a,b ) b s b
D (b, s )
(i)
(ii)
Theorem 4.8
Let X be a metric space with metric d, and let B(a, r), B(b, s) be two
closed balls in X.
(i) If d(a, b) > r + s, then the balls are disjoint, B(a, r) ∩ B(b, s) = ∅.
(ii) If d(a, b) + r ≤ s, then B(a, r) ⊆ B(b, s).
Proof.
(i) Let B(a, r), B(b, s) be two closed balls in X and suppose d(a, b) >
r + s.
To prove that the balls are disjoint, we will show that if an element
159
so x ̸∈ B(b, s).
Hence the balls are disjoint, B(a, r) ∩ B(b, s) = ∅.
(ii) Let B(a, r) and B(b, s) be two closed balls in X and suppose that
d(a, b) + r ≤ s.
To prove that B(a, r) is a subset of B(b, s) we need to show that,
if x ∈ B(a, r), then x ∈ B(b, s).
So suppose x ∈ B(a, r). Then d(x, a) ≤ r.
Note that, since d(a, b) + r ≤ s we have d(a, b) ≤ s − r.
Again, the triangle inequality (M3) gives d(x, b) + d(b, a) ≤ d(x, a).
Therefore
since d(a, b) ≤ s − r.
Therefore x ∈ B(b, s). We have proved that:
Exercises 4.3
3. Verify that the binary word metric, defined in example 4.3.4, does indeed
define a metric on the set of all binary words of some fixed length.
practice, it does not develop in quite such a precise and orderly manner as we
have just indicated. In the remaining chapters of this book, we shall consider in
more detail how mathematicians really go about exploring their mathematical
landscapes.
We begin by considering the Prime Factorisation Theorem 4.3: every integer
greater than 1 can be expressed as a product of prime numbers. To compre-
hend the statement, we needed precise meanings for the terms ‘divisible’,
‘prime number’, and so on. This shows that any mathematical theory will
need precisely stated definitions. However, it is not possible to define all the
terms used in a given mathematical theory. A little thought should indicate
why this is so. Consider the definition of a prime number given in section 4.2:
‘a prime number is an integer greater than 1 which is not divisible by any
positive integer except 1 and itself’. This relates the term ‘prime number’ to
more basic concepts such as ‘integer’, ‘positive’, the number ‘1’ and ‘divisible’.
Any definition is like this — it relates the term being defined to other terms.
Some or all of these other terms may then be defined using yet more terms,
and so on. Clearly, this process of definition must stop somewhere or we would
spend all our time defining yet more and more terms and never get round to
doing any mathematics proper. Therefore, some terms must be left undefined.
This discussion indicates what should be the first ingredients in any axiomatic
mathematical theory. They are the undefined or primitive terms.
In the same way that we cannot define every term, so we cannot prove every
result. For example, in our proof of the Prime Factorisation Theorem, we used
(implicitly as well as explicitly) various properties of the integers and prime
numbers. For the most part, we assumed that these properties were familiar
and did not need referring to explicitly. If we were required to prove these
properties, the proofs would need to be based on some other statements about
the integers, and so on. Again, to avoid an infinite regression, we are forced
to have some statements which will not be proved.1 These are the axioms of
the theory.
In the example of a metric space given in definition 4.1, the axioms are the
properties listed as (M1), (M2), and (M3). In this case, the undefined terms are
harder to identify since the notion of a metric space builds on other concepts
such as ‘set’, ‘function’, and ‘real number’.
As we have mentioned, Euclid is generally recognised as the first person to
state axioms explicitly in around 300 BC. Just five axioms were the basis
for his famous development of geometry. To Euclid, however, axioms did not
require proof because they were basic statements about the real physical world
1 The Greek philosopher Aristotle (384–322 BC) was well aware of this. In his Meta-
physics, Aristotle wrote, ‘Now it is impossible that there should be demonstration of abso-
lutely everything, for there would be an infinite regress, so that even then there would be
no proof.’ Indeed, he went on to say of those who took the contrary view, ‘Such a man, as
such, is no better than a vegetable.’ See [3] for further details.
163
P
m
this discovery. Although he published relatively little, Gauss was the foremost mathemati-
cian of his time — many would say the greatest ever — and he was acutely aware of the
controversy which would inevitably result from the discovery of non-Euclidean geometry.
164
Bolyai and Lobachevsky found a geometry in which the parallel axiom was
contradicted, it follows that it is not possible to deduce the axiom from the
other Euclidean axioms. This geometry of Bolyai and Lobachevsky is usually
referred to simply as ‘non-Euclidean geometry’ even though there are many
geometries — for example, the geometry of a sphere — that are different from
Euclid’s geometry.
The existence of two geometries, one in which the parallel axiom is true and
one in which it is false, has certain implications. In particular, it is not pos-
sible for both the parallel axiom and its negation to be true, self-evidently or
otherwise. Mathematicians were therefore forced to re-think their views of the
nature of axioms.
Today, we no longer regard axioms as self-evident truths, but simply as state-
ments about the undefined terms which are taken as assumptions to serve as
the basic building blocks of the theory. It is not necessary for axioms to reflect
any perceived property of the ‘real world’, such as the geometry of points and
lines in a plane. In principle, we are free to choose any consistent set of axioms
as the starting point for a mathematical theory. The requirement of consis-
tency, though, is vitally important. A set of axioms is consistent if it is not
possible to deduce from the axioms some proposition P as well as its negation
¬P . If it were possible to infer both P and ¬P , then the axioms contain a hid-
den self-contradiction which make the system useless. Recall from section 2.5
that if an argument has inconsistent premises, then it is automatically valid no
matter what the conclusion — see example 2.14.4 on page 74. When applied
to axiom systems, this means that it is possible to deduce any proposition
whatsoever from an inconsistent set of axioms. The modern perspective has
replaced self-evidence by consistency as the paramount criterion for an axiom
system.3
We have said that, in principle, any consistent set of axioms can serve as the
framework for a mathematical theory. In practice, though, mathematicians do
not choose their axiom systems arbitrarily. Some sets of axioms are tailor-made
for a particular purpose and others are studied because they have interesting
and far-reaching applications. The reasons for studying a particular axiom
system lie outside the system itself and relate to possible interpretations of
the system. For example, the reason why metric spaces are studied in the
abstract (that is, via the axioms given in definition 4.1) is that there are
many examples of systems where the axioms are satisfied. Any result we may
prove about abstract metric spaces will then apply to every example. For
instance, the results in theorem 4.8 apply to closed balls in all metric spaces.
3 Although crucially important, consistency is somewhat elusive. In 1931, the Austrian
logician Kurt Gödel showed that any set of axioms for the arithmetic of the positive integers
could not formally be proved to be consistent. Since elementary arithmetic is fundamental
to just about all of mathematics, this is a rather depressing state of affairs. Although we
know that axiom systems must be consistent, we will frequently be unable to prove them
to be so.
165
Definition 4.3
An axiom system comprises a collection of undefined terms, which may be
words, phrases or symbols, and a collection of statements, called axioms,
involving the undefined terms (as well as ‘standard’ mathematical symbols
and terminology).
Definition 4.4
An interpretation of an axiom system is a situation where the undefined
terms of the system are given a meaning. An interpretation is called a model
of the axiom system if the axioms, when interpreted according to the given
meanings, are true propositions.
on page 201 below) it is not too difficult to prove that inverses are unique.
(This proof is given in chapter 7; see theorem 7.15 on page 298.) From this
we know that, in every example of a group, inverses are unique and we do not
need to prove this fact for each and every group.
The second category of axiom systems commonly studied comprise those
which have essentially only one model. In other words, all models are for all
practical purposes the same. (The notion of two models being ‘essentially the
same’ is one which can be made completely precise. The word mathematicians
use for this notion is isomorphic, which is derived from Greek and means
literally ‘having the same shape or form.’ The details of how ‘being essentially
the same’ is given a precise meaning need not concern us here.) Usually in
these cases, the model is a familiar structure such as the set of integers or the
set of real numbers or the Euclidean geometry of two- or three-dimensional
space. Here, the purpose of using axiom systems is rather different. The ax-
ioms represent a few basic properties of the given structure from which it is
possible to deduce many other properties of the structure (the theorems of
the system). For example, there is an axiom system with thirteen axioms, de-
scribing an algebraic object called a ‘complete ordered field’. It can be shown
that there is essentially only one example of a complete ordered field in the
sense that all models of the axiom system are equivalent in a very precise way.
‘The’ example is the set R of real numbers together with the operations of
addition and multiplication as well as the usual less-than-or-equal-to ordering,
≤, of real numbers. What this means is that all the usual properties of the
real numbers can be deduced from just thirteen axioms. The advantage of the
axiomatic approach is that we need assume only a limited number of prop-
erties, as the remainder can be rigorously deduced from these. It also means
that, in a sense, the thirteen axioms define what we mean by the system of
real numbers, i.e., the axioms characterise the real number system.
We now turn to a consideration of how a mathematical theory based on an
axiom system develops by proving theorems using the rules of logic. We need
first to define precisely what we mean by a theorem. Consider, for example,
the theorem known to anyone who has studied elementary geometry: the sum
of the angles of any triangle is 180◦ . In fact, this is a theorem of Euclidean
geometry, but is not a theorem of the non-Euclidean geometry described by
Bolyai and Lobachevsky. Non-Euclidean geometry has a different set of axioms
from Euclidean geometry; Euclid’s parallel axiom is replaced in non-Euclidean
geometry by a different axiom concerning parallel lines. Hence the two axiom
systems have different sets of theorems. In fact, the corresponding theorem
in the non-Euclidean geometry described by Bolyai and Lobachevsky states:
all triangles have angle sum less than 180◦ . The important point here is that
what is or is not a theorem depends on the particular axiom system.
Informally, a theorem in an axiom system is a result that ‘can be deduced
from’ the axioms and any background knowledge that is assumed. We now
wish to consider this informal notion in a little more detail. In some systems,
168
such as propositional logic, the deduction rules can be made very precise.
Indeed, we have given a description of this in section 2.5. Below we describe,
much less formally than for propositional logic, some of the deduction rules
that we may apply when reasoning in an axiom system.
We will use K to denote our background knowledge. We do not wish to make
precise exactly what is included in K as this will depend on the context.
However, it will usually include things like the properties of equality (such as,
if a = b and b = c, then a = c), simple properties of sets (such as, if A ⊆ B and
B ⊆ A, then A = B), simple properties of the integers (such as a + b = b + a)
and so forth.
In section 2.5, we used the notation {P1 , P2 , . . . , Pn } ⊢ Q to denote that the
proposition Q can be deduced from the propositions P1 , P2 , . . . , Pn using the
deduction rules for propositional logic. We now describe something akin to
this for axiom systems. Let Γ be a set of statements and let T be another
statement within the current axiom system. We use Γ T to denote that
T ‘can be deduced from’ the background knowledge K and the statements in
Γ. This is not standard mathematical notation. We will read this ‘squiggly’
arrow as ‘can be deduced from’ or simply ‘follows from’. Shortly we will
outline some of the deduction rules that will apply in axiom systems. First
we wish to introduce the notions of theorem and proof. A theorem is simply a
proposition that can be deduced in the axiom system and a proof is a sequence
of deductions that shows this.
Definition 4.5
Let A = {A1 , A2 , . . . , Ak } be a collection of axioms that comprises an axiom
system and let K be the assumed background knowledge within which the
axiom system sits.
Pr ∈ A or A, {P1 , . . . , Pr−1 } Pr .
Note that, according to this definition, the first step in a proof will always be
an axiom because there are no prior statements from which it may be deduced.
This is analogous to our formal deductions in proposition logic where the first
propositions to appear in the deductions were always premises. Later, we will
modify this notion slightly, to allow theorems that we have previously proved
to appear as statements in the proof rather than having always to begin right
back with the axioms.
169
In section 2.5 (page 67), we introduced deduction rules for propositional logic
that allow us to establish logical implication of propositions. We now consider
a similar collection of deduction rules for axiom systems. We may regard these
rules as describing some of the properties of the ‘follows from’ relation . The
rules are described in an analogous way to the deduction rules for propositional
logic. Each rule has two lines; on the first line we have a collection of ‘follows
from’ statements and on the second line is a single ‘follows from’ statement.
The rule is intended to capture the fact that, if we can establish each of the
‘follows from’ statements in the first line, then we may deduce the ‘follows
from’ statement of the second line. As we shall see, these rules underpin some
of the methods of proof that are considered elsewhere in this text.
Conjunction Rule
This rule says that if we can separately deduce both P and Q from the same
set of statements Γ, then we may deduce their conjunction P ∧ Q.
Γ P; Γ Q
Γ P ∧Q
We used this rule in our proof in theorem 4.1 where, to prove
the sum and difference of two odd integers is even,
we first separated this out into two separate statements
the sum of two odd integers is even
and the difference of two odd integers is even.
We then proved each of these statements individually.
Conditional Rule
This rule says that if we can deduce Q from Γ and P , then we can deduce the
conditional P ⇒ Q from Γ.
Γ, P Q
Γ (P ⇒ Q)
This rule underpins the method of direct proof of a conditional P ⇒ Q. It
says that, to deduce P ⇒ Q from a collection of statements Γ, we can instead
add P to our assumptions and from this deduce Q. This was precisely the
method of direct proof of P ⇒ Q: assume P and deduce Q.
Γ P ; Γ, P Q
Γ Q
We have called this the Modus Ponens rule although it does not quite mirror
Modus Ponens for propositional logic.
P; P ⇒ Q
Q
However, using the Conditional rule, from Γ, P Q we may deduce Γ
(P ⇒ Q). Were we to replace Γ, P Q with Γ (P ⇒ Q) in the statement
of the rule, then it would look like the corresponding rule in propositional
logic.
Γ P; Γ (P ⇒ Q)
Γ Q
In exercise 4.4.1 we show that the ‘converse’ of the Conditional rule also holds.
In other words, if we can deduce P ⇒ Q from Γ, then we can deduce Q from
Γ and P . Hence these two deductions are essentially equivalent.
Equivalence Rule
This rule says that if P and Q are logically equivalent, and if we can deduce
P from Γ, then we can deduce Q from Γ.
Γ P, P ≡ Q
Γ Q
This rule is intuitively obvious because, if P ≡ Q, then P and Q are true under
exactly the same circumstances. In fact, this rule underpins several methods
of proof that will be considered in later chapters.
Cases Rule
This rule says that if we can deduce T separately from Γ and P and also from
Γ and Q, then we can deduce T from Γ, and P ∨ Q.
Γ, P T ; Γ, Q T
Γ, P ∨ Q T
We may think of P and Q in the rule as covering two separate cases; for
171
example, x ≥ 0 and x ≤ 0 in the case of real numbers. The rule then says that
if we can deduce a theorem T in each of the two cases, then we can deduce T
in the ‘combined’ case P ∨ Q.
We used this (with four cases rather than two) in example 4.2.1, in the proof
of the triangle inequality for the modulus function |x + y| ≤ |x| + |y|. We
actually gave separate mini-proofs for each of four separate cases (each of
which also assumed x ≤ y). Letting T stand for |x+y| ≤ |x|+|y|, we separately
established
1. (0 ≤ x ≤ y) T
2. (x < 0 ≤ y ∧ x + y ≥ 0) T
3. (x < 0 ≤ y ∧ x + y < 0) T
4. (x ≤ y < 0) T.
Note that some of the rules above mirror precisely deduction rules for propo-
sitional logic. For example, compare the Conjunction rules in propositional
logic and axiom systems.
P, Q Γ P; Γ Q
P ∧Q Γ P ∧Q
Similarly, compare the Cases rule above with the Rule of case analysis 2 given
in exercise 2.4.2 (iv).
P ⇒ R, Q ⇒ R Γ, P T ; Γ, Q T
(P ∨ Q) ⇒ R Γ, P ∨ Q T
Rather than giving an ‘axiom system version’ for each of the rules of deduction
in propositional logic individually, instead we give a generic rule that allows
any of the propositional logic deduction rules to be mirrored in an axiom
system.
Pr . However, a glance at any of the proofs in this chapter, will reveal that
mathematical proofs are not set out as a sequence of numbered steps in the
way we did for deductions in propositional logic. Similarly, they do not always
start with axioms; indeed, rarely do proofs begin with axioms. Instead, proofs
are written much less formally and the starting point is usually some piece
of background knowledge or some theorem that has already been proved.
We have allowed for this in our description of the deduction rules above by
allowing a non-specified collection of statements Γ (together with background
knowledge) in each of the deduction rules.
Given a collection of axioms A, the first theorems proved will, of necessity,
depend directly on the axioms. In other words, for the first theorem(s) proved
we will have Γ = A. However, thereafter, any theorems that we have already
proved can be added to Γ. In this way we may regard Γ as being (selected
from) the axioms A and all of the previously proved theorems.
We conclude this chapter with a brief consideration of how our deduction rules
shape the structure of some proofs. Consider the Modus Ponens rule:
Γ P ; Γ, P Q
Γ Q
This really says that we may continue to make deductions that build on earlier
parts of the proof. If we have deduced P in the first half of the proof, we may
use it in any deductions we may make in the second half of the proof.
As we have noted, the Conditional rule underpins the method of direct proof of
P ⇒ Q. Suppose that there is a sequence of deductions that shows Γ, P Q.
Then the Conditional rule gives Γ (P ⇒ Q). Table 4.1 illustrates the
Conditional rule alongside how a direct proof of P ⇒ Q might be structured.
TABLE 4.2: Comparing formal structure and real proof using cases.
Exercises 4.4
175
176
to develop the equivalent of our own ‘sat nav skills’ but in the world of logical
deductions rather than that of a road network. We might call this developing
our ‘proof navigation’ skills, or ‘proof nav’, skills. There is no algorithm or
process that will always find a route of deductions from P to Q. Instead, we
will need to develop strategies and techniques that we can deploy in different
situations and, crucially, we will need to develop a lot of experience of finding
proofs in different circumstances.
In the situation where we are trying to find a direct proof of a proposition Q (as
opposed to a conditional proposition P ⇒ Q), there is a further complication:
we know the destination Q but we are not given the starting point of the
journey of deductions. For a direct proof of Q, described on page 144, we
must start with any appropriate background knowledge and then proceed to
deduce Q. So, in addition to finding a route that ends at Q, we must also select
a suitable starting point for the journey. Often this can be difficult, especially
when there is no obvious piece of background knowledge that will enable us
to start the chain of deductions.
Example 5.1
Consider the following statement.
1
For all positive real numbers x, x + ≥ 2.
x
The obvious questions to ask are: Is the statement true? If so, how do we
prove it? To get a feel for the first question, we try some examples:
1
x = 1: x+ =1+1=2≥2
x
1
x = 2: x+ =2+ 1
2 ≥2
x
1 1
x = 32 : x + = 2
3 + 2 = 2
3 + 3
2 ≥2
x 3
1 1
x = π: x+ = π + > π ≥ 2.
x π
In each of these (few) examples, the result is true. Since there does not seem to
be anything special about the examples, we may start to have some confidence
that the result is true and turn our attention to the second question.
As we described earlier, we need to find a route, comprising statements that
follow logically from one another, from the starting point ‘x is a positive real
number’ to the desired conclusion ‘x + 1/x ≥ 2’. The problem here is the
generality of the starting point. Some of the initial
√ deductions we could make
from x > 0 are, for example, 1/x > 0, 2x > 0 or x > 0. These are illustrated
177
in figure 5.1. However, it is not very clear that any of these is a useful starting
point.
x Î R, x > 0
0< x£ 1 1 <x<2
2 2 x³2
1
x+ ³2
x
If we do this, we must always be careful to check that the reasoning ‘goes the
other’ way as well. In our case, this works. The implication x + 1/x ≥ 2 ⇒
x2 + 1 ≥ 2x follows because we can multiply the inequality by the positive
quantity x. The reverse implication x2 + 1 ≥ 2x ⇒ x + 1/x ≥ 2 follows
similarly: we can multiply the inequality by the positive quantity 1/x.
x Î R, x > 0
x2 + 1 ³ 2 x
1
x+ ³2
x
x2 + 1 ≥ 2x ⇒ x2 − 2x + 1 ≥ 0
and this implication also reverses. Now the left-hand side x2 −2x+1 = (x−1)2
and we know that the square of any real number is greater than or equal to
zero. In other words, we have found our starting deduction, the first step in
the proof, (x − 1)2 ≥ 0. By working backwards, we have obtained a statement
that we know to be true. We can now work forwards to construct the proof
itself as follows.
(x − 1)2 ≥ 0 ⇒ x2 − 2x + 1 ≥ 0
⇒ x2 + 1 ≥ 2x
1
⇒ x+ ≥2 (dividing by x > 0)
x
The actual proof itself is straightforward. It just uses a little algebra and the
179
facts that (a) the square of a real number is non-negative and (b) multiply-
ing or dividing an inequality by a positive quantity maintains the inequality.
However, what is not at all obvious is that the first step in the proof should be
the observation that (x − 1)2 ≥ 0. We can only really see that this is a helpful
first step using the process of working backwards from the desired conclusion.
Example 5.2
Investigate the truth or otherwise of the statement:
If the statement is true, give a proof. If the statement is not true, describe the
most general situation where it is true and provide a proof in this case.
Solution
We begin investigating this situation by considering some examples.
At this stage, we know that the result is not true for all positive integers k
and we may believe that, when k is odd, the sum of any k consecutive positive
integers is divisible by k. However, we need to be a little careful: the examples
above suggest that the result holds for the odd prime numbers k = 3 and 5 but
not for the even composite (non-prime) numbers k = 4 and 6. So perhaps the
result depends on whether or not k is a prime rather than just any odd integer.
To test this, we consider further examples: the only even prime number, 2,
and a non-prime odd number 9.
180
These examples are consistent with our conjecture that the result holds for
odd positive integers only. We can now state our conjecture:
17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25
S = (n − m) + · · · + (n − 1) + n + (n + 1) + · · · + (n + m).
n gives
S = (n − m) + · · · + (n − 1) + n + (n + 1) + · · · + (n + m)
= [(n − m) + (n + m)] + · · · + [(n − 1) + (n + 1)] + n
= 2n + · · · + 2n + n
= 2mn + n (since there are m ‘paired’ terms)
= (2m + 1)n
= kn.
Therefore S = kn is divisible by k.
Proof 2. First note that any sum of k consecutive integers can be written as
follows, where n is the first (that is, smallest) integer in the sum:
n + (n + 1) + · · · + (n + k − 1).
S = n + (n + 1) · · · + (n + 2m)
= (n + n + · · · + n) + (1 + 2 + · · · + 2m) (rearranging)
= kn + × 2m × (2m + 1)
1
2 (using (∗) above)
= kn + m(2m + 1) (simplifying)
= k(n + m) (since k = 2m + 1).
Definition 5.1
Euler’s phi function, also known as Euler’s totient function, ϕ : Z+ → Z+
is defined by
ϕ(n) = number of integers 1 ≤ a ≤ n coprime with n
= |{a ∈ Z+ : 1 ≤ a ≤ n and gcd(a, n) = 1}|.
Theorem 5.1
If p is prime, then ϕ(p) = p − 1.
Before embarking on the proof, let us consider some examples. In the examples
above, there was only one prime: ϕ(7) = 6 because the integers 1, 2, 3, 4, 5 and
6 are all coprime with 7. Similarly, all the integers 1, 2, 3, . . . , 10 are coprime
with 11, so ϕ(11) = 10. The general pattern is probably clear now: if p is
prime, then all of the integers 1, 2, . . . , p − 1 are coprime with p. Hence we are
ready to write the proof.
Proof. Let p be prime. Then the only (positive) factors of p are 1 and p.
Therefore, in the range, 1 ≤ a ≤ p, all of the integers 1, 2, . . . p − 1 are coprime
with p. There are p − 1 integers in this list so ϕ(p) = p − 1.
183
Theorem 5.2
If p and q are distinct primes, then ϕ(pq) = (p − 1)(q − 1) = ϕ(p)ϕ(q).
The proof of theorem 5.1 became clear from considering one or two examples,
so let’s begin again by considering examples.
These examples hold the clue to the proof — it is difficult to see a pattern
in the integers that are coprime with 35, but it is easier to see which integers
are not coprime with 35. In other words, instead of counting the integers that
are coprime with pq, a better strategy will be to count the number of integers
that are not coprime with pq. It is this strategy that allows us to complete
the proof.
Proof. Let p and q be distinct primes and consider the list of integers
1, 2, 3, . . . , pq.
In the list, there are q integers that are multiples of p, namely p, 2p, 3p, . . . , qp.
Any pair of these has a common factor p, so that kp and pq are not coprime for
k = 1, 2, . . . , q. Similarly, there are p integers that are multiples of q, namely
q, 2q, 3q, . . . , pq. Again, any pair of these has a common factor q so that ℓq
and pq are not coprime for ℓ = 1, 2, . . . , p. These two lists combined contain a
total of p + q − 1 integers since pq appears in both lists and is the only integer
belonging to both.
Since p and q are prime, all of the remaining integers are coprime with pq.
Therefore, the total number of integers coprime with pq is
pq − (p + q − 1) = pq − p − q + 1 = (p − 1)(q − 1).
The last part of the inequality, (p − 1)(q − 1) = ϕ(p)ϕ(q), follows from theo-
rem 5.1, which gives ϕ(p) = p − 1 and ϕ(q) = q − 1.
184
Definition 5.2
The Smarandache function S : Z+ → Z+ is defined by
To help get a feel for the function, let’s consider some examples.
n=3 3 does not divide 1! = 1 or 2! = 2 but 3 does divide 3! = 6.
Hence S(3) = 3.
n=4 4 does not divide 1! = 1, 2! = 2 or 3! = 6 but 4 does divide 4! = 24.
Hence S(4) = 4.
n=5 5 does not divide 1! = 1, 2! = 2, 3! = 6 or 4! = 24. However 5 does
divide 5! = 120.
Hence S(5) = 5.
n=6 6 does not divide 1! = 1 or 2! = 2, but 6 does divide 3! = 6.
Hence S(6) = 3.
When considering the first few examples above, we might have begun to sus-
pect that the function just gives S(n) = n, but this is not the case as the
example S(6) = 3 shows. Were we to have continued, we would have found
S(7) = 7, S(8) = 4, S(9) = 6, S(10) = 5 and so on.
Our aim is to explore the function and prove some of its simple properties.
The sequence of values S(1), S(2), S(3), . . . , S(n), . . . is available as sequence
number A002034 of the On-Line Encyclopedia of Integer Sequences.1 A plot
of the first 100 terms of the sequence is given in figure 5.3. From this it is
clear both that the values of S(n) exhibit some complex behaviour but also
that there are some identifiable patterns.
In figure 5.3 it is clear that all the values lie on or below the line y = x and
there are a number of values that appear on the line y = x. In other words,
S(n) ≤ n for all n and S(n) = n for some values of n. From the limited number
of examples above, we may guess that the values of n for which S(n) = n are
the prime numbers. This is our first result about the Smarandache function.
Theorem 5.3
For all n ∈ Z+ , S(n) ≤ n and S(n) = n if n is prime.
1 Available at http://oeis.org/A002034.
185
100
90
80
70
60
50
40
30
20
10
0
0 10 20 30 40 50 60 70 80 90 100
This is really two theorems, or at least two separate statements about S(n):
for all n, S(n) ≤ n and for all n, if n is prime, then S(n) = n. Let us try to
understand both parts by considering S(11). We are seeking the first term in
the sequence 1!, 2!, 3!, 4!, . . . that is divisible by 11:
11 does not divide 1! = 1
11 does not divide 2! = 1 × 2
11 does not divide 3! = 1 × 2 × 3
11 does not divide 4! = 1 × 2 × 3 × 4
..
.
11 does not divide 10! = 1 × 2 × 3 × 4 × . . . × 9 × 10
11 does divide 11! = 1 × 2 × 3 × 4 × . . . × 9 × 10 × 11.
This example is probably sufficiently general to indicate how the proof of each
part of the theorem can be constructed.
For our second theorem about S, we mirror theorem 5.2 and evaluate S(pq)
where p and q are distinct primes. Again we begin by considering some exam-
ples.
p = 3, q = 5 Then pq = 15, so we need to find the smallest factorial that
is divisible by 15.
Consider a factorial expression for n ≥ 5:
1 × 2 × 3 × 4 × 5 × . . . × n.
1 × 2 × 3 × 4 × 5 × 6 × . . . × 10 × 11 × . . . × n.
Theorem 5.4
If p and q are distinct primes, then S(pq) = max{p, q}, the maximum of p and
q.
Proof. Without loss of generality 2 we may suppose that p < q. Consider q!:
q! = 1 × 2 × 3 × . . . × p × . . . × q.
2 We discussed the use of the phrase ‘without loss of generality . . . ’ in proofs in the
commentary to the proof, in example 4.2.1, of the triangle inequality for the modulus
function on page 147.
187
It is clear that both p and q are factors of q! so that pq divides q!. By theo-
rem 5.3, q will not be a factor of any factorial less than q!. Hence pq does not
divide any factorial less than q!.
Therefore q! is the smallest factorial that has pq as a factor, so S(pq) = q =
max{p, q}.
Exercises 5.1
1. (i) Let a be a real number. Prove that for all non-zero real numbers x,
a2 2a
1+ ≥ .
x2 x
n! + 2, n! + 3, n! + 4, . . . , n! + n
1 2 3 ... m
m+1 m+2 m+3 ... 2m
.. .. .. ..
. . . ... .
(n − 1)m + 1 (n − 1)m + 2 (n − 1)m + 3 . . . nm
Then count which columns contain (some) integers that are coprime
with mn and, finally, for each such column, count how many entries
are coprime with mn.
αk
(iv) If n = pα 1 α2
1 p2 . . . pk is the factorisation of n, where p1 , p2 , . . . , pk
are distinct primes and α1 , α2 , . . . , αn are positive integers, then
( )( ) ( )
1 1 1
ϕ(n) = n 1 − 1− ... 1 − .
p1 p2 pk
In your proof, you may use any of the results above. Note that
αk
the existence of the expression n = pα 1 α2
1 p2 . . . pk follows from the
Prime Factorisation Theorem, page 132.
Let A be a finite set. Recall from chapter 3, page 86, that the cardinality of
A, denoted |A|, is the number of elements in A. We may also consider the
power set of A, denoted P(A), which is the set of all the subsets of A — see
page 99. In this section we explore the interaction between these concepts and
the notions of subset, intersection, etc.
In example 3.8.1, we gave the following list of sets and their power sets.
A=∅ P(A) = {∅}
A = {a} P(A) = {∅, {a}}
A = {a, b} P(A) = {∅, {a}, {b}, {a, b}}
A = {a, b, c} P(A) = {∅, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}
A = {a, b, c, d} P(A) = {∅, {a}, {b}, {c}, {d}, {a, b}, {a, c}, {a, d},
{b, c}, {b, d}, {c, d}, {a, b, c}, {a, b, d},
{a, c, d}, {b, c, d}, {a, b, c, d}}
If we now list only the cardinalities of the sets rather than their elements, we
obtain the following table.
|A| |P(A)|
0 1
1 2
2 4
3 8
4 16
From this table, the obvious conjecture to make is the following:
if |A| = n then |P(A)| = 2n .
How might we prove this conjecture? A good starting point would be to con-
sider in more detail one of the examples above. It is usually sensible to consider
190
an example that is not too simple, so that it is not sufficiently general, and
not too complicated, so that it becomes unmanageable. In this case we will
consider the set with 4 elements, A = {a, b, c, d}.
We aim to count the elements of its power set P(A) in such a way that we
can ‘see’ a general argument that will work for all sets. An obvious strategy
is to split the power set into smaller pieces, according to the cardinality of its
elements as follows.
Size of subset Subsets Count
empty set ∅ 1
1-element sets {a}, {b}, {c}, {d} 4
2-element sets {a, b}, {a, c}, {a, d}, {b, c}, {b, d}, {c, d} 6
3-element sets {a, b, c}, {a, b, d}, {a, c, d}, {b, c, d} 4
4-element sets {a, b, c, d} 1
16
The next step is to consider how easy this will be to generalise to a set with n
elements (for an arbitrary n). Suppose |A| = n. Then its power set obviously
contains one empty set and one set with n elements, namely A itself. It is
also easy to realise that there are n subsets of A containing a single element
— there is a single element subset {a} for each a ∈ A. However, now the
reasoning gets a little more tricky. We need to be able to calculate the number
of two-element subsets, the number of three-element subsets, and so on, for our
set with n elements. This can be done but requires background knowledge of
permutations and combinations. In particular, to form a subset of A containing
r elements, say, we need to choose exactly r of its elements to go into the
subset. Thus to complete the proof along these lines we would need to know,
in general, how many ways there are of choosing r objects from n (distinct)
objects. Some readers will no doubt know that this is the binomial coefficient
( )
n n n!
Cr = = .
r (n − r)!r!
To complete the proof, we also need to be able to add the numbers of subsets
with r elements for each r = 0, 1, . . . , n. This requires another piece of back-
ground knowledge, the Binomial Theorem. We leave this as an exercise — see
exercise 5.2.2 — and instead pursue a different line of reasoning here.
Returning to the example A = {a, b, c, d}, instead of splitting the subsets
into collections of equal cardinality, we consider which elements belong to the
subsets. For example, the element a belongs to the following eight subsets:
{a}, {a, b}, {a, c}, {a, d}, {a, b, c}, {a, b, d}, {a, c, d}, {a, b, c, d}.
In other words, a belongs to exactly half of the subsets of A. The same is true
191
of each element. For example, the element c belongs to the following eight
subsets
{c}, {a, c}, {b, c}, {c, d}, {a, b, c}, {a, c, d}, {b, c, d}, {a, b, c, d}.
Why is this? If we think about an element of A and a subset of A, there
are only two options: either the element belongs to the subset or it does not.
Thus, to form a subset of A, we may consider each element in turn and make
a choice: either include it in the subset or don’t. Each set of choices gives
a different subset. For example, the set of choices ‘include, exclude, include,
include’ gives rise to the subset {a, c, d}. Counting the number of different sets
of choices therefore counts the number of subsets and this, finally, gives us an
elementary way of proving our conjecture. By ‘elementary’, we mean a way of
proving the conjecture relying on minimal background knowledge.
Theorem 5.5
Let A be a finite set. If A has cardinality n, then its power set has cardinality
2n .
We have noted that there is an alternative proof that involves counting the
number of r-element sets for each r and adding these using the binomial theo-
rem. For those readers who possess the appropriate background knowledge, we
leave this as an exercise. It is interesting to note that our two different ways
of analysing the example where A = {a, b, c, d} lead to these two different
methods of proving the result. In fact, there is another approach to proving
the theorem, based on the Principle of Mathematical Induction, which we will
consider in chapter 8.
We now turn attention to how the relation of subset interacts with the con-
cept of power set. As is common, to get a feel for the situation, we consider
examples. In fact, the examples given in example 3.8.1 and repeated above
will be sufficient to make a conjecture. Considering the list of sets and their
power sets on page 189 above, it is clear that if A is a subset of B, then P(A)
is also a subset of P(B). For example, taking A = {a, b} and B = {a, b, c, d},
so that A ⊆ B, we have
192
and clearly P(A) ⊆ P(B). Thus we may make the following conjecture where
A and B are sets:
if A ⊆ B then P(A) ⊆ P(B).
In order to see how we might prove this, we need to understand why the
conjecture is true. Recall that, for any sets X and Y , X is a subset of Y
precisely when every element of X is also an element of Y — see page 87.
Symbolically,
In the case of power sets, X ∈ P(A) means X ⊆ A. (This is just the definition
of power set of A: it is the set that contains all the subsets of A.) Thus, to
prove that P(A) ⊆ P(B), we need to show that X ⊆ A implies X ⊆ B. For
this, we will use a direct proof.
Theorem 5.6
For all sets A and B, if A ⊆ B, then P(A) ⊆ P(B).
Overall we have now shown that, for all sets X, X ∈ P(A) ⇒ X ∈ P(B).
Hence P(A) ⊆ P(B) as required.
This proof is not long and none of the individual reasoning steps are hard.
Nevertheless many readers will find this proof quite difficult both to under-
stand and, more especially, to construct. The reason for this is that the proof
is ‘multi-layered’. We may illustrate the layers in the proof as follows.
193
Assume A ⊆ B
Need to deduce P(A) ⊆ P(B))
P(A) ⊆ P(B) means X ∈ P(A) ⇒ X ∈ P(B)
Assume X ∈ P(A)
Need to deduce X ∈ P(B)
X ∈ P(A) means X ⊆ A
X ∈ P(B) means X ⊆ B so need to deduce X ⊆ B
X ⊆ B means x ∈ X ⇒ x ∈ B
Assume x ∈ X
..
.
Deduce x ∈ B
Hence X ⊆ B
Hence X ∈ P(B)
Hence P(A) ⊆ P(B)
For our next collection of example proofs, we consider injective and surjective
functions and what the injectivity and surjectivity properties tell us about
the cardinalities of the domain and codomain. The injective and surjective
properties are given in definitions 3.3 and 3.4, respectively. Informally, recall
that an injective function is one where different elements of the domain have
different images, and a surjective function is one where every element of the
codomain is the image of something in the domain.
Example 5.3
We begin by considering the function with rule
3x + 5
f (x) =
x+4
where x is a real number. Note that f (x) is not defined when x = −4, so we
195
3(x + 5/3)
f (x) = ;
x+4
Claim
The function
3x + 5
f : R − {−4} → R − {3} defined by f (x) =
x+4
is both injective and surjective.
There are two things to prove here, so we give separate proofs that f is injective
and f is surjective. Recalling the definitions, for injective we need to prove
3x + 5 4y − 5
= y ⇒ 3x + 5 = y(x + 4) ⇒ 3x − xy = 4y − 5 ⇒ x = .
x+4 3−y
4y − 5
It is this value of x, x = , that we will use in the proof itself.
3−y
We have shown that f (x) = f (y) ⇒ x = y for all x and y in the domain of f .
Therefore f is injective.
It is worth reflecting further on the nature and proof of the surjectivity con-
dition. There are two phases to finding a proof: the discovery phase and the
197
We will see this two-phase process in operation in section 5.4 where we prove
properties of limits which also involve doubly quantified propositional func-
tions of the form ∀a ∃b • P (a, b).
We conclude this section with a consideration of the relationship between the
properties of injectivity and surjectivity and the cardinalities of the domain
and codomain (where these are finite sets). Figure 5.4 shows the arrow map-
pings for a typical injective and a typical surjective function, each with a small
finite domain and codomain.
For the injective function, there needs to be at least as many elements in the
codomain as the domain in order that different elements of the domain can
have different images in the codomain. For the surjective function, there needs
to be at least as many elements in the domain as the codomain in order that
each element in the codomain can be ‘hit’ by an arrow; more formally, so
that each element in the codomain can be the image of some element in the
domain. The following theorem expresses these observations more formally.
Each of the two parts of the proof is a conditional proposition and we use the
method direct proof in each case.
198
f f
A B A B
FIGURE 5.4: Injective and surjective functions with finite domain and
codomain.
Theorem 5.7
Let f : A → B be a function, where A and B are finite sets.
(i) If f is injective, then |A| ≤ |B|.
(ii) If f is surjective, then |A| ≥ |B|.
Proof. Let A and B be finite sets, say |A| = n and |B| = m. Then we may write
A = {a1 , a2 , . . . , an } and B = {b1 , b2 , . . . , bm } where there are no repeated
elements listed in each case.
(i) Suppose that f is injective. Then different elements of A have different
images so that the elements f (a1 ), f (a2 ), . . . , f (an ) of B are all distinct.
Hence B contains at least n elements, so |B| ≥ n = |A|, as required.
(ii) Suppose that f is surjective. Then the images of the elements of A,
f (a1 ), f (a2 ), . . . , f (an ), must contain all the elements of B. However,
this list may contain repeats, so B contains at most n elements. Hence
|B| ≤ n = |A|, as required.
There are some results that follow ‘almost immediately’ from a particular
theorem. It is common to refer to such a result as a corollary of the particular
theorem. In the case of theorem 5.7 there is an obvious corollary concerning
bijective functions obtained by putting the two parts of the theorem together.
The proof is a simple direct proof.
Corollary
Let f : A → B be a bijective function, where A and B are finite sets. Then A
and B have the same cardinality, |A| = |B|.
199
Exercises 5.2
1. Prove that, for all finite sets A and B, if A ⊆ B then |A| ≤ |B|.
2. Give an alternative proof of theorem 5.5 by counting the number of
subsets of A with no elements, one element, two elements, and so on
and then using the Binomial Theorem.
3. Describe the ‘layers’ in the proof of lemma 1 and the alternative proof
of theorem 5.6 in a similar way to the description of the original proof
of theorem 5.6 given on page 192.
4. Prove that for all sets A and B, P(A ∩ B) = P(A) ∩ P(B).
5. Prove that, for all sets A and B, P(A ∪ B) ⊆ P(A) ∪ P(B).
Are there any circumstances where P(A ∪ B) = P(A) ∪ P(B)? If so, can
you prove it?
6. This question explores how the Cartesian product of sets interacts with
the subset relation and with intersections and unions of sets.
A ∗ B = (A − B) ∪ (B − A).
Using the Set Theory Laws, page 99, prove each of the following identi-
ties.
(i) For all sets A, A ∗ ∅ = A and A ∗ A = ∅.
(ii) For all sets A and B, A ∗ B = (A ∪ B) − (A ∩ B).
(iii) For all sets A, B, and C, A ∩ (B ∗ C) = (A ∩ B) ∗ (A ∩ C).
200
mathematician Évariste Galois (1811–1832) first coined the term ‘groupe’ and he used the
permutation group of the roots of polynomial equations to show that polynomials of degree
at least 5 are not solvable with radicals.
201
Definition 5.3
Let S be a set. A binary operation on S is a mapping, or function, µ :
S × S → S. For x, y ∈ S, we will write µ(x, y) as x ∗ y.
Definition 5.4
A group is a pair (G, ∗), where G is a set and ∗ is a binary operation on G
that satisfies the following three properties.
The properties (G1) – (G3) are often referred to as the ‘group axioms’ as they
are the basic properties that define what we mean by a group. Whenever we
refer to ‘a group (G, ∗)’ we may assume that these properties are satisfied.
Interested readers may refer to section 4.5 for a more extensive discussion of
the nature of axioms. Some authors include a fourth property or axiom called
the ‘closure property’ of the binary operation: this says that, if x and y belong
to G, then so, too, does x ∗ y. However, we have included this in the definition
of a binary operation on G as a mapping whose codomain is the set G.
Note that we do not assume the commutative property:
Examples 5.4
m + (n + p) = (m + n) + p for all m, n, p ∈ Z,
group theory.
203
denote the set of non-zero rational numbers. Since the product of non-
zero rational numbers is again a non-zero rational number, multiplica-
tion is also a binary operation on the set Q∗ . Since every element of Q∗
has an inverse,
( )−1
p 1 q
= = ,
q p/q p
it follows that (Q∗ , ×) is a group.
In a similar way, the set of non-zero real numbers
R∗ = {x ∈ R : x ̸= 0}
r
h
B A D C C D
r v
C D A B B A
More generally, figure 5.6 also illustrates that composing two symme-
tries of the rectangle produces another symmetry of the rectangle. Thus
if we let S(@A) = {e, r, v, h} denote the set of symmetries of the rectan-
gle, then composition defines a binary operation on S(@A). In order to
determine whether or not S(@A) forms a group under composition, we
first show all of the possible composites of symmetries in the following
Cayley table.5 The rows represent the first element and the columns
represent the second element of the composite. Hence the h in the row
labelled r and column labelled v represents rv = h as illustrated in
figure 5.6.
e r v h
e e r v h
r r e h v
v v h e r
h h v r e
We can now see that S(@A) is a group under the operation of compo-
sition of symmetries. As mentioned above, composition is associative.
5 Named after the English mathematician Arthur Cayley (1821–1879) who was the first
Clearly the identity symmetry e is the identity element for the binary
operation. Also each element is self-inverse because ss = e for every sym-
metry s ∈ S(@A). Note also that the operation is commutative — the
Cayley table is symmetric about the top-left to bottom-right diagonal
— so this is an Abelian group. This group is called the Klein 4-group
after the German mathematician Felix Klein (1849–1925).
l3
t s
l1 l2
u
e r1 r2 s t u
e e r1 r2 s t u
r1 r1 r2 e t u s
r2 r2 e r1 u s t
s s u t e r2 r1
t t s u r1 e r2
u u t s r2 r1 e
206
Having defined a group and given some examples, it is now time to turn our
attention to proving some elementary results about groups.
ax = ay ⇒ x = y.
In fact, this property is a group theory property. It holds for the non-zero real
numbers R∗ because (R∗ , ×) is a group; see example 5.4.2. In a group, we do
not assume the binary operation is commutative, so there are two cancellation
properties, which are called left cancellation and right cancellation.
Proof.
g∗x=g∗y ⇒ g −1 ∗ (g ∗ x) = g −1 ∗ (g ∗ y)
⇒ (g −1 ∗ g) ∗ x = (g −1 ∗ g) ∗ y (by (G1))
⇒ e∗x=e∗y (by (G3))
⇒ x=y (by (G2)).
(x ∗ y)−1 = y −1 ∗ x−1 .
Before considering the proof of the theorem, we first reflect on its name.
When putting on a pair of shoes and socks, one first puts on the socks and
then the shoes. When reversing this process, the order is reversed: the shoes
are removed before the socks. So it is when taking the inverse of x ∗ y: the
inverses of x and y are combined in the opposite order.
Turning to the proof, we first need to understand what we mean by the inverse
(x ∗ y)−1 . The inverse of an element, as defined in (G3) in definition 5.4, is
208
the element that combines with it (each way around) to produce the identity
e. Thus the inverse of x ∗ y is whatever element g ∈ G satisfies the property
(x ∗ y) ∗ g = e and g ∗ (x ∗ y) = e. So the proof of the theorem just involves
checking that g = y −1 ∗ x−1 satisfies this property.
(x ∗ y)−1 = y −1 ∗ x−1 .
Our last result about groups in this chapter concerns groups where each ele-
ment x satisfies x ∗ x = e. An example of such a group is the Klein 4-group
given in example 5.4.3.
Before we consider the theorem, we wish to simplify our notation for groups.
In the previous two examples, it has been a little cumbersome to write the
binary operation as x ∗ y. It is very common to omit the binary operation
symbol and write x ∗ y = xy. This is sometimes referred to as writing the
group operation ‘multiplicatively’. We may extend this idea and use a power
notation as follows:
x2 = x ∗ x, x3 = x ∗ x2 = x ∗ (x ∗ x), . . . .
We will also simplify the way we refer to a group and use the phrase ‘a group
G’ as shorthand for ‘a group (G, ∗)’.
Theorem 5.10
Let G be a group such that x2 = e for every element x ∈ G. Then G is
Abelian.
Recall that an Abelian group is one that satisfies the commutative property:
xy = yx for all x, y ∈ G. To obtain a direct proof of the theorem, we need to
assume
x2 = e for every element x ∈ G
209
x2 = e, y 2 = e and (xy)2 = e
The area of mathematics known as linear algebra studies objects called vec-
tor spaces which generalise the notion of vectors in two dimensions. Linear
algebra is closely related to the theory of matrices. A vector in two dimensions
is a quantity that has magnitude and direction; it can be represented as an
ordered pair of real numbers or as a column vector,
( )
a1
a = (a1 , a2 ) =
a2
a2
a1
b a+b
2a
a a
Definition 5.5
A vector space comprises:
• a set V whose elements are called vectors;
• a rule of addition of vectors: if u, v ∈ V , then u + v ∈ V ;
• a rule for multiplying vectors by real numbers (called scalars): if v ∈ S
and λ ∈ R, then λv ∈ V
such that the following properties are satisfied.
Addition properties
(A1) For all u, v ∈ V , u + v = v + u.
(A2) For all u, v, w ∈ V , (u + v) + w = u + (v + w).
(A3) There is a zero vector 0 ∈ V such that, for all v ∈ V ,
0 + v = v = v + 0.
(A4) For every v ∈ V there is a vector −v ∈ V , called the negative of x,
such that v + (−v) = 0.
Scalar multiplication properties
(M1) For all v ∈ V , λ, µ ∈ R, λ(µv) = (λµ)v.
(M2) For all u, v ∈ V , λ ∈ R, λ(u + v) = λu + λv.
(M3) For all v ∈ V , λ, µ ∈ R, (λ + µ)v = (λv) + (µv).
(M4) For all v ∈ V , 1v = v.
The properties (A1) – (A4) and (M1) – (M4) are often referred to as the vector
space axioms. Readers who are familiar with group theory, or who have read
the previous section, may have noticed that addition of vectors is a binary
operation on V and that the conditions (A1) to (A4) define an Abelian group
— see definition 5.4. In other words, forgetting about scalar multiplication, the
pair (V, +) is an Abelian group. This means that anything we can prove about
groups will apply to V under the operation of addition. Scalar multiplication
is not a binary operation as it combines two different kinds of things: real
numbers (scalars) and elements of V (vectors). In fact, scalar multiplication
defines a mapping,
R × V → V, (λ, x) 7→ λx.
We now consider some examples of vector spaces and then prove some fairly
straightforward properties of vector spaces.
Examples 5.5
1. The set {( ) }
x1
R =
2
: x1 , x2 ∈ R
x2
is a vector space with addition and scalar multiplication defined above.
212
2. Let {( ) }
a b
M2×2 (R) = : a, b, c, d ∈ R
c d
be the set of all 2 × 2 real matrices (matrices with real number entries).
Matrices in M2×2 (R) may be added and multiplied by scalars:
( ) ( ) ( )
a11 a12 b b a11 + b11 a12 + b12
+ 11 12 =
a21 a22 b21 b22 a21 + b21 a22 + b22
213
and ( ) ( )
a a12 λa11 λa12
λ 11 = .
a21 a22 λa21 λa22
With these definitions, M2×2 (R) forms a vector space. (We may also
multiply matrices in M2×2 (R), but this is not relevant so far as forming
a vector space is concerned.)
For example, if f and g are defined by f (x) = x2 and g(x) = sin x, then
(f + g)(x) = f (x) + g(x) = x2 + sin x, (3f )(x) = 3f (x) = 3x2 , and so
on.
With these definitions F is a vector space. The ‘vectors’ are the func-
tions in F . The zero function, satisfying axiom (A3) in definition 5.5, is
zero ∈ F defined by
zero : R → R, zero(x) = 0.
(i) 0v = 0
(ii) λ0 = 0
(iii) (−1)v = −v
(iv) λv = 0 ⇒ λ = 0 or v = 0 or both.
Consider property (i). This says that taking the scalar multiple of 0 ∈ R with
214
any vector v ∈ V gives the zero vector 0 ∈ V . This might seem very obvious,
especially if we are thinking of R2 where
( ) ( )
x 0
0 1 = = 0.
x2 0
This is not a proof, of course, because it refers to a specific vector space. So,
how do we prove property (i)?
By axiom (A3) of the definition of a vector space, the zero vector satisfies
0 + v = v.
Now, if we knew that the zero vector was unique, then the proof is just about
complete. In other words, if we knew that the zero vector was the only vector
satisfying 0 + v = v, then we could deduce 0v = 0. In fact, the zero vector is
unique, but unfortunately we have not proved it. We will consider uniqueness
proofs in section 7.5. This means we need to work a little harder to complete
the proof. The idea is to add −v to both sides of the equation 0v + v = v
established above, as this will give the zero vector on the right-hand side. We
have:
(0v + v) − v = v − v
⇒ 0v + (v − v) = v − v (by axiom (A2))
⇒ 0v + 0 = 0 (by axiom (A4))
⇒ 0v = 0 (by axiom (A3)).
We have now found a chain of reasoning that establishes the result in part (i)
above. We can now present it as a coherent proof as follows.
(0v + v) − v = v − v
⇒ 0v + (v − v) = v − v (by axiom (A2))
⇒ 0v + 0 = 0 (by axiom (A4))
⇒ 0v = 0 (by axiom (A3)).
Therefore 0v = 0, as required.
We will leave the proof of parts (ii) and (iii) as exercises and consider, instead,
part (iv).
To prove λv = 0 ⇒ λ = 0 or v = 0 by the method of direct proof, we assume
λv = 0 and, from this, deduce λ = 0 or v = 0. To establish the conclusion
we show that if λ ̸= 0, then we must have v = 0. In other words, what we
actually prove is
(λv = 0 and λ ̸= 0) ⇒ v = 0.
Essentially we are using the logical equivalence
P ⇒ (Q ∨ R) ≡ (P ∧ Q) ⇒ R,
which is easily established using truth tables.
So suppose λv = 0 and λ ̸= 0. Since λ is non-zero, it has a reciprocal 1/λ.
The idea is to multiply both sides of λv = 0 by 1/λ to obtain v = 0. Having
found the overall structure of the proof, we can fill in the precise details as
follows.
Proof of (iv). Let V be a vector space and let v ∈ V and λ ∈ R be such that
λv = 0.
1
Suppose λ ̸= 0. Then ∈ R, so:
λ
1 1
λv = 0 ⇒ (λv) = 0
λ λ
( )
1 1
⇒ λ v = 0 (by axiom (M1))
λ λ
1
⇒ 1v = 0 (property of R)
λ
1
⇒ v = 0 (by axiom (M4))
λ
⇒ v = 0 (by property (ii)).
Definition 5.6
Let V be a vector space and let S be a subset of V , S ⊆ V . Then S is
a subspace of V if S is itself a vector space with the same operations of
addition and scalar multiplication that are defined in V .
Example 5.6
Show that
s−t
S = −s − t : s, t ∈ R
2t
is a subspace of R3 . The set S comprises the points lying on a plane in R3
passing through the origin, illustrated in figure 5.10.
x3
x2
x1
definition 5.5, we must verify that addition and scalar multiplication are valid
operations in S. For addition, this means that adding two vectors in S gives
a vector that also lies in S.
Let v, w ∈ S. Then, for some real numbers p, q, s, t we have
p−q s−t
v = −p − q and w = −s − t .
2q 2t
Then
p−q s−t
v + w = −p − q + −s − t
2q 2t
p−q+s−t (p + s) − (q + t)
= −p − q − s − t = −(p + s) − (q + t) .
2p + 2t 2(q + t)
Hence v + w belongs to S because is can be expressed as
a−b
v + w = −a − b ,
2b
where a = p + s ∈ R and b = q + t ∈ R. Hence addition is defined as an
operation on the set S.
Next we verify that scalar multiplication is a well-defined operation on S; in
other words, if v ∈ S and λ ∈ R, then λv ∈ S. With v defined as above, we
have
p−q λp − λq
λv = λ −p − q = −λp − λq ,
2q 2λq
which is an element of S since λp, λq ∈ R.
Having shown that addition and scalar multiplication are bona fide operations
on S, we now need to verify that the axioms (A1)–(A4) and (M1)–M4) in
definition 5.5 are satisfied.
Since addition and scalar multiplication are defined in S and all the axioms
in definition 5.5 are satisfied, S is a vector space. Therefore S is a subspace
of R3 .
(i) non-empty: S ̸= ∅,
(ii) closed under addition: v, w ∈ S ⇒ v + w ∈ S,
(iii) closed under scalar multiplication: v ∈ S and λ ∈ R ⇒ λv ∈ S,
then S is a subspace of V .
The second and third properties are usually summarised by stating that S is
closed under addition and scalar multiplication. We will now use theorem 5.12
to explore the properties of subspaces.
219
Example 5.7
Let A be an n × n square matrix and let λ ∈ R. Consider the equation
Ax = λx,
where x ∈ Rn . For most values of λ, the equation will only have the zero
solution, x = 0.
( )
3 −1
For example, let A = and let λ = 5. Then
4 −2
( )( ) ( ) {
3 −1 x1 x 3x1 − x2 = 5x1
Ax = =5 1 ⇒
4 −2 x2 x2 4x1 − 2x2 = 5x2
{
2x1 − x2 = 0 (i)
⇒
4x1 − 7x2 = 0 (ii)
⇒ 5x2 = 0 (2 × (i) − (ii))
⇒ x2 = 0
⇒ x1 = 0 (from (i)).
220
E(–1)
E(2)
Recall that the plane passing through the origin given in example 5.6 was a
subspace of R3 . It is straightforward to use theorem 5.12 to show that each
of the sets E(2) and E(−1) is a subspace of R2 ; this is left as an exercise.
Instead, we consider the corresponding result for any eigenvalue of any square
matrix.
E(λ) = {x ∈ Rn : Ax = λx},
is a subspace of Rn .
x, y ∈ E(λ) ⇒ ···
⇒ x + y ∈ E(λ).
The first step in the deduction is to understand what it means to say x and y
belong to E(λ). It is often the case that the first step in the deduction amounts
to an ‘unpacking’ of the initial assumption. By the definition of E(λ), this
means that Ax = λx and Ay = λy. To prove that the sum x + y ∈ E(λ),
we need to show that x + y also satisfies the same equation defining E(λ):
222
A(x + y) = λ(x + y). This follows by adding the two equations for x and y
and using the following properties of matrices and vectors:
Ax + Ay = A(x + y) and λx + λy = λ(x + y).
These considerations allow us to construct a simple chain of deductions from
x, y ∈ E(λ) to x + y ∈ E(λ), which we include in the proof below.
The proof that E(λ) is closed under scalar multiplication is similar to that
for addition, so we include it directly in the proof without the preamble given
here.
Note that, in showing E(λ) is closed under addition and scalar multiplica-
tion, we are using the properties of a vector space for Rn . For addition, the
equation λx + λy = λ(x + y) is just condition (M2) of definition 5.5. For
scalar multiplication, our proof left out the details of establishing the equa-
tion α(λx) = λ(αx). It would be quite common to leave out the details but,
for completeness, here is the full deduction:
α(λx) = (αλ)x (property (M1) of a vector space)
= (λα)x (commutativity of multiplication in R)
= λ(αx) (property (M1) of a vector space).
We conclude this section by proving one further result about eigenvalues and
eigenvectors.
223
For the first part of the theorem, we need to find a chain of deductions from ‘λ
is an eigenvalue of A’ to ‘λ2 is an eigenvalue of the matrix A2 ’. Now ‘λ is an
eigenvalue of A’ means that Ax = λx for some non-zero vector x. Similarly,
‘λ2 is an eigenvalue of A2 ’ means that A2 y = λ2 y for some non-zero vector
y. We have used different letters for the vectors x and y as we cannot assume
that the same vector satisfies both equations. Thus a partial proof has the
following structure:
λ is an eigenvalue of A
⇒ Ax = λx for some non-zero vector x
⇒ ···
⇒ A2 y = λ2 y for some non-zero vector y
⇒ λ2 is an eigenvalue of A2 .
Provided we can justify each of these equations, this completes the deduction
chain.
We now consider the second part of the theorem. The eigenspaces are
EA (λ) = {x ∈ Rn : Ax = λx},
EA2 (λ2 ) = {x ∈ Rn : A2 x = λ2 x}.
From the previous theorem, theorem 5.14, we know that each of these is a
subspace of Rn . Hence, to show that EA (λ) is a subspace of EA2 (λ2 ), we only
need to show that EA (λ) is a subset of EA2 (λ2 ), EA (λ) ⊆ EA2 (λ2 ).
Recall that, for two sets A and B, A ⊆ B means that, for all x, x ∈ A ⇒ x ∈ B.
224
Taking into account the definitions of the eigenspaces, this gives the following
structure to the proof:
x ∈ EA (λ) ⇒ Ax = λx
⇒ ···
⇒ A2 x = λ2 x
⇒ x ∈ EA2 (λ2 ).
However, the missing part of the reasoning is captured by the equations (*)
above. We can now piece together the different parts of the reasoning and give
a proof of the theorem.
A2 x = A(Ax)
= A(λx) (since Ax = λx)
= λ(Ax) (properties of matrix multiplication)
= λ(λx) (since Ax = λx)
2
= λ x.
Ax = λx ⇒ A2 x = λ2 x,
so EA (λ) ⊆ EA2 (λ2 ). Since each of these sets is a subspace of Rn (by theo-
rem 5.14), it follows that EA (λ) is a subspace of EA2 (λ2 ), which is the second
part of the theorem.
Exercises 5.3
1. Prove theorem 5.8 (ii), the Right Cancellation Property for groups.
2. Prove the identity missing from the proof of theorem 5.9: for elements
x and y of a group (G, ∗), (y −1 ∗ x−1 ) ∗ (x ∗ y) = e.
225
S + T = {x + y : x ∈ S and y ∈ T }.
(ii) Let EA (λ) denote the eigenspace of λ for the matrix A and let
EA+In (λ + 1) denote the eigenspace of λ + 1 for the matrix A + In .
Show that EA (λ) = EA+In (λ + 1).
(iii) Let k be a positive integer. Generalise the result of part (i) for the
eigenvalue λ + k. Prove your generalisation.
T : Rn → Rn by T (x) = Ax.
In this section we will consider two important topics in real analysis: conver-
gence of sequences and limits of functions. The key notion of a limit is similar
in each of the two contexts. The definition of a limit involves a statement with
two quantifiers which is of the form
∀x ∃y • P (x, y).
It is probably the interaction between the two quantifiers that makes proofs
involving limits somewhat tricky. As we discussed in section 5.2, when consid-
ering the proof of surjectivity of a function, proofs of statements of this form
with a universally and existentially quantified variable, often require some
6 Any mapping between arbitrary vector spaces that satisfies the properties (LT1) and
preliminary ‘discovery work’ before the proof itself can commence. As this
discovery work is not part of the proof itself, it is sometimes omitted in an
explanation of the proof and, when this occurs, some of the details of the proof
itself look somewhat arbitrary or even mysterious.
5.4.1 Sequences
Definition 5.7
A sequence (of real numbers) is a function a : Z+ → R. The image of n ∈ Z+ ,
a(n), is frequently denoted an . The whole sequence is often abbreviated as
(an ).
• Sequences 2 and 4 converge: the values get closer and closer to some
limiting value, 1 in the case of Sequence 2 and 21 in the case of Sequence 4.
1 1
0.5 0.5
0 0
0 5 10 15 20 25 30 0 5 10 15 20 25 30
Sequence 1 Sequence 2
1 1
0.5 0.5
0 0
0 5 10 15 20 25 30 0 5 10 15 20 25 30
Sequence 3 Sequence 4
Definition 5.8
The sequence (an ) converges to limit ℓ if, given any ε > 0, there exists
N ∈ Z+ such that
n > N ⇒ |an − ℓ| < ε.
In this case we write either an → ℓ as n → ∞ or lim an = ℓ.
n→∞
Definition 5.8 is illustrated in figure 5.13. The inequality |an −ℓ| < ε is satisfied
provided ℓ − ε < an < ℓ + ε; in other words, when an lies in a ‘band’ of width ε
either side of ℓ. The figure is intended to represent the fact that we can ensure
that the terms of the sequence lie in the given the ‘ε-band’ about the limit ℓ
provided we take n greater than the specified value N .
Example 5.8
3n2 − 4n
A sequence (an ) is defined by an = for n ∈ Z+ . Show that
(n + 1)(n + 2)
lim an = 3.
n→∞
Solution
Here the limit is ℓ = 3. Let ε > 0 be an arbitrary positive real number. We
229
does look strange. Without the algebraic manipulation before the proof, the
choice of N = ⌊19/ε⌋ looks curious in the extreme. This is often the case in
proofs of this type. If we do not show the ‘discovery phase’, which is not part
of the proof itself, then the choices made in the proof can seem somewhat
arbitrary.
Notice that the overall structure of the proof is simply to verify that the con-
ditions of definition 5.8 for a convergent sequence are satisfied by the given
sequence. As we have noted, the definition of convergence involved two quan-
tifiers and is of the form
∀ε ∃N • P (ε, N )
where P (ε, N ) is a propositional function and the universes for ε and N are
R+ and Z+ , respectively. The structure of the proof starts with an arbitrary
ε (in its universe) and then selects a particular N (in its universe) which
may depend on ε. To complete the proof we show that the propositional
function P (ε, N ), which is itself a conditional, is satisfied for the arbitrary
ε and particular N . The principal difficulty in the proof is in selecting an
appropriate N , depending on ε, but this occurs outside the proof itself in the
preliminary discovery phase of the work.
We now prove a general theorem about limits of sequences. This theorem says,
roughly, that limits ‘behave well’ with respect to addition of sequences. Given
two sequences (an ) and (bn ), we may form their sum (an + bn ), which is also
a sequence. More precisely, the theorem says that if (an ) and (bn ) are both
convergent, then their sum is also convergent and, furthermore, the limit of
(an + bn ) is the sum of the limits of (an ) and (bn ).
As in the previous example, we will need to carry out some preliminary work
to understand how the proof will proceed. According to definition 5.8, we need
to ensure that, given any ε > 0,
provided we take n greater than some positive integer N . The triangle in-
equality for the modulus function (theorem 4.6, page 146) gives
Proof. Suppose that (an ) and (bn ) are two convergent sequences with
lim an = ℓ and lim bn = m.
n→∞ n→∞
Let ε > 0.
Then ε/2 > 0, so there exist N1 , N2 ∈ Z+ such that
ε ε
n > N1 ⇒ |an − ℓ| < and n > N2 ⇒ |bn − m| < .
2 2
Let N = max{N1 , N2 }. Then
contains open intervals on either side of a: (p, a) ∪ (a, q) ⊆ A for some p < a and q > a.
233
Definition 5.9
Let f : A → B be a function where A ⊆ R and B ⊆ R. Let a ∈ A. Then f (x)
tends towards a limit ℓ as x tends towards a if, given any ε > 0, there exists
δ > 0 such that
0 < |x − a| < δ ⇒ |f (x) − ℓ| < ε.
In this case, we either write f (x) → ℓ as x → a or we write lim f (x) = ℓ.
x→a
The values of x satisfying 0 < |x − a| < δ lie in the union of open intervals
either side of a:
(a − δ, a) ∪ (a, a + δ).
This set is often referred to as a punctured neighbourhood of a. Defini-
tion 5.9 is illustrated in figure 5.14. In order to ensure that the values of f (x)
lie in the horizontal band of width ε either side of the limit ℓ, we need to take
x to lie in the punctured neighbourhood of width δ either side of a.
Example 5.9
Show that lim 2x2 − 5x = −2.
x→2
Solution
In this example, we need to show that definition 5.9 is satisfied for f (x) =
234
|f (x) − ℓ| = |2x2 − 5x + 2|
is less than any specified positive ε by taking x such that 0 < |x − 2| < δ.
Hence we begin by considering |2x2 − 5x + 2|:
We will be able to control the size of the term |x − 2| since we can choose δ
such that |x − 2| < δ. The term |2x − 1| causes a little more difficulty, but we
can also control its size if we re-write it in terms of |x − 2| using the triangle
inequality (theorem 4.6, page 146) as follows.
|2x − 1| = |2(x − 2) + 3|
≤ |2(x − 2)| + |3| (by the triangle inequality)
= 2|x − 2| + 3.
Therefore
0 < |x − 2| < δ
ε
⇒ |x − 2| < 1 and |x − 2| <
5
⇒ |2x2 − 5x + 2| = |x − 2||2x − 1|
≤ |x − 2|(2|x − 2| + 3) (triangle inequality)
< 5|x − 2| (since |x − 2| < 1)
( ε)
< ε since |x − 2| < .
5
Just as with example 5.8, the first line of the proof would look mysterious
without having seen the pre-proof ‘discovery’ process to find a suitable choice
for δ. In fact, because there are two requirements for δ, there are other choices
that will work. For example, suppose that, at the stage where we had the
inequality |2x2 − 5x + 2| = |x − 2||2x − 1| ≤ |x − 2|(2|x − 2| + 3), we had taken
|x−2| < 12 (instead of |x−2| < 1). Then the term 2|x−2|+3 < 2× 12 +3 = 4, so
we have |2x2 − 5x + 2| < 4|x − 2|, which means we also require
{ |x
} − 2| < ε/4.
This means that an alternative choice for δ is δ = min 21 , ε/4 . With this
choice, the last part of the proof becomes
|2x2 − 5x + 2| = |x − 2||2x − 1|
≤ |x − 2|(2|x − 2| + 3) (triangle inequality)
( )
< 4|x − 2| since |x − 2| < 12
( ε)
< ε since |x − 2| < .
4
In Theorem 5.17 we proved that the limit of sequences behaves well with re-
spect to addition; more specifically, the limit of the sum of sequences is the
sum of their limits. There is a similar result for limits of functions and the
proof follows a similar pattern. We leave this as an exercise. Instead we prove
that the limit of a function behaves well with respect to taking multiples.
Again we will carry out some preliminary work. In the proof we will need to
show that |αf (x) − αℓ| < ε and, because limx→a f (x) = ℓ, we can control the
size of |f (x) − ℓ|. Now |αf (x) − αℓ| = |α||f (x) − ℓ|, which will be less than ε
provided |f (x) − ℓ| < ε/|α|. Since ε/|α| is only defined when α ̸= 0, we will
consider α = 0 as a special case.
We are now ready to embark on the proof.
Now suppose α ̸= 0.
236
ε
Let ε > 0. Then > 0.
|α|
Since lim f (x) = ℓ it follows that there exists δ > 0 such that
x→a
ε
0 < |x − a| < δ ⇒ |f (x) − ℓ| < .
|α|
ε
Hence 0 < |x − a| < δ ⇒ |f (x) − ℓ| <
|α|
ε
⇒ |αf (x) − αℓ| = |α||f (x) − ℓ| < |α| × = ε.
|α|
Therefore lim αf (x) = αℓ in this case too.
x→a
In fact, there is a slightly different proof that does not require separate con-
sideration of the case where α = 0. Note that |α| + 1 > 0 for all α. Thus, if
we replace ε/|α| by ε/(|α| + 1) in the second part of the proof, we can avoid
the special case. This leads to the following alternative proof.
ε
0 < |x − a| < δ ⇒ |f (x) − ℓ| < .
|α| + 1
Exercises 5.4
4. Prove that the limit of functions behaves well with respect to addition.
More precisely, suppose that f and g are two functions such that
5. In this question we will prove that, if f and g are two functions such
that
lim f (x) = ℓ and lim g(x) = m,
x→a xaraa
(iii) Show that, given ε > 0, there exists δ2 > 0 such that
ε
0 < |x − a| < δ2 ⇒ |f (x) − ℓ| < .
2(1 + |m|)
(iv) Suppose ℓ ̸= 0. Show that, given ε > 0, there exists δ3 > 0 such
that
ε
0 < |x − a| < δ3 ⇒ |g(x) − m| < .
2|ℓ|
238
(v) Use parts (i) to (iv) to prove lim f (x)g(x) = ℓm in the case where
x→a
ℓ ̸= 0.
(vi) Modify your proof in part (v) for the case where ℓ = 0.
Chapter 6
Direct Proof: Variations
6.1 Introduction
How might we prove this? A direct proof would start by assuming ‘n2 is odd’
for an arbitrary positive integer n and, from this, attempt to deduce ‘n is
odd’. Thus a direct proof would have the following structure.
The problem here is that it is not at all clear what might be a sensible de-
duction from the statement ‘n2 = 2k + 1’. Knowing that we need to make
a conclusion about n itself (namely n is odd), we might be tempted to take
square roots and write
√
n = 2k + 1 for some integer k ≥ 0.
√
We have now hit a dead end: there is no obvious way of showing that 2k + 1
is an odd positive integer. The problem here is not so much in our ability to
make appropriate deductions as the overall structure of the attempted proof.
239
240
Recall that two propositions are logically equivalent if they are true under the
same conditions. Thus is it perfectly reasonable to prove a logically equivalent
statement if this is easier to achieve.
Recall the Contrapositive Law from section 2.3, page 40, that states that a
conditional proposition P ⇒ Q is logically equivalent to its contrapositive
¬Q ⇒ ¬P :
P ⇒ Q ≡ ¬Q ⇒ ¬P.
This means that, to prove a conditional proposition P ⇒ Q, we may instead
prove its contrapositive ¬Q ⇒ ¬P if this is easier. The proof of the contra-
positive itself will be a direct proof:
assume ¬Q and, from this, deduce ¬P .
The following examples illustrate the method. The first of these proves the
result that we discussed in the previous section.
Examples 6.1
Theorem 6.1
For all integers n, if n2 is odd, then n is odd.
241
Commentary
There are a few things worth noting about this proof. Firstly, it is good
practice to signal at the beginning that the proof is using the contrapos-
itive. Without this first sentence, the reader may not see why the main
body of the proof starts by assuming that n is even. Secondly, we have
not explicitly mentioned that the negation of ‘n is odd’ is ‘n is even’ as
this was felt to be sufficiently obvious. Sometimes, when the negation of
one or both of the component propositions of the conditional statements
is less obvious, then it would be sensible to explain the negation in the
proof itself.
Finally, note that the proposition being proved is a universally quantified
propositional function
∀n • O(n2 ) ⇒ O(n)
where O is the predicate ‘is odd’ and where the universe is Z+ . We have
used the Principle of Universal Generalisation given in section 4.3 to
reduce the proof requirement to O(n2 ) ⇒ O(n) for an arbitrary positive
integer and then applied the Contrapositive Law, to change the proof
requirement to ¬O(n) ⇒ ¬O(n2 ) for the arbitrary integer n. In other
words, we have used both the Principle of Universal Generalisation and
the Contrapositive Law but it is only the Contrapositive Law that is
explicitly referred to in the proof itself.
Theorem 6.2
For all integers n and m, if mn is even, then m is even or n is even.
Theorem 6.3
For all positive integers n, if 2n − 1 is prime, then n is prime.
which is not very helpful. But this is for an arbitrary integer n and we
are assuming that n is composite. In this case n = rs so we have
2n − 1 = 2rs − 1 = (2r )s − 1
As is always the case with mathematical proof, we are unable to give precise
and foolproof rules concerning when a particular method of proof will be ap-
plicable. However, considering the structure of the propositions P ⇒ Q that
we proved in the three previous examples, we might informally characterise
P as containing ‘compound information’ but Q as containing ‘simple infor-
mation’ of a similar type. In example 6.1.1, P contained information about
the parity (evenness/oddness) of a square of an integer, whereas Q contained
244
information about the parity of the integer itself. example 6.1.2 was similar:
P was a statement about the parity of a product whereas Q was a statement
about the parity of the component integers. Finally, in example 6.1.3, P was
a statement about the primality of 2n − 1 whereas Q was simply a statement
about the primality of n itself. In each case, the statement P has given ‘com-
pound’ information (about a square, a product of an expression involving a
power) whilst Q has provided the corresponding information about an integer
or integers.
It is often simpler to ‘build up’ to more complex, or ‘compound’, information
by combining simpler pieces of information than it is to go in the opposite
direction by ‘splitting down’ compound information into constituent parts. It
is in situations such as these that a proof using the contrapositive might be
considered because the ‘direction’ of the implication is reversed.
To illustrate this, consider the following theorem. Each part is a conditional
statement P ⇒ Q where P refers to a composite function, and so represents
‘compound’ information, and Q refers to similar information but about just
one of the functions. Given our previous discussion, this suggests that a proof
using the contrapositive may be fruitful. For example, in part (i), to prove the
contrapositive we assume that f is not injective and then deduce that the
composite g ◦ f is not injective.
Theorem 6.4
Let f : A → B and g : B → C be functions.
(i) If the composite g ◦ f is injective, then so, too, is the function f .
(ii) If the composite g ◦ f is surjective, then so, too, is the function g.
We will prove part (i) and leave part (ii) as an exercise (see exercise 6.1.5).
We first need to define what it means for a function to be injective. Recall from
section 3.6 that a function is injective if different elements (of the domain)
have different images. This was formalised in definition 3.3 which says that a
function f is injective if, for all elements of its domain,
f (a1 ) = f (a2 ) ⇒ a1 = a2 .
Thus, saying that f is not injective means that there exist elements a1 and
a2 in its domain such that f (a1 ) = f (a2 ) but a1 ̸= a2 . Thus, if we assume
245
that f is not injective, it follows that there are distinct (that is, not equal)
elements a1 , a2 ∈ A such that f (a1 ) = f (a2 ). It then follows immediately that
g(f (a1 )) = g(f (a2 )) for these distinct elements, so the composite function g ◦f
is also not injective. We can now organise these thoughts into a quite a short
and straightforward proof.
Proof of (i). We will prove the contrapositive: f is not injective ⇒ g ◦ f is not
injective. So suppose that f : A → B and g : B → C are functions and that f
is not injective.
Then there exist elements a1 , a2 ∈ A such that a1 ̸= a2 but f (a1 ) = f (a2 ).
It follows immediately that g(f (a1 )) = g(f (a2 )), which means (g ◦ f )(a1 ) =
(g ◦ f )(a2 ).
Hence g◦f is not injective, which completes the proof of the contrapositive.
Exercises 6.1
1. Prove each of the following using the contrapositive. Is it possible to
prove any of these results (easily) without using the contrapositive?
6. Prove that, if x is a real number such that 0 < x < 1, then x > x2 .
7. Prove each of the following using the contrapositive. Are any of the
following statements easily proved directly?
P ⇔ Q ≡ (P ⇒ Q) ∧ (Q ⇒ P ).
P ⇔ P1 ⇔ P2 ⇔ · · · ⇔ Q.
Examples 6.2
1. For our first proof, we will combine two proofs that we have given pre-
viously. In example 1.3, we gave what we can now recognise as a direct
proof of the proposition ‘for all integers n, if n is odd, then n2 is odd’.
In example 6.1.1 we used the contrapositive to prove ‘for all integers n,
if n2 is odd, then n is odd’. We now combine those proofs to give a proof
of the following theorem.
Theorem 6.5
For all integers n, n is odd if and only if n2 is odd.
Proof.
(⇒) Let n be an odd integer. Then n = 2m + 1 for some integer m. Now
n2 = (2m + 1)2
= 4m2 + 4m + 1
= 2(2m2 + 2m) + 1
= 2M + 1 where M = 2m2 + 2m is an integer.
Therefore n2 is odd.
(⇐) We will prove the contrapositive of the converse. Since the converse
is ‘if n2 is odd, then n is odd’, its contrapositive is ‘if n is even,
then n2 is even’.
Let n be an even integer. Then n = 2m for some integer m. Now
248
n2 = (2m)2
= 4m2
= 2(2m2 )
= 2M where M = 2m2 is an integer.
Therefore n2 is even.
This completes the proof of the contrapositive. Hence, for all inte-
gers n, if n2 is odd, then n is odd.
Commentary
Compared with the previous proofs, we have modified slightly how we
have written the two parts of the proof to be consistent with one another.
However, we have not changed the structure of the previous proofs. Note
that the proof is laid out clearly in two parts with each part signalled
either by (⇒) or by (⇐). Although it is not necessary to lay out the
proof in this way, it is good policy to identify clearly each of the two
halves of the proof.
2. Our second example comes from set theory. For the proof we will need
to recall from section 3.2 the meaning of the subset relation: X ⊆ Y if
and only if, for all x, x ∈ X ⇒ x ∈ Y . The following theorem is easily
visualised by drawing a Venn-Euler diagram.
Theorem 6.6
For all sets A, B, and C, A ⊆ (B − C) if and only if both A ⊆ B and
A ∩ C = ∅.
Proof. Firstly, suppose that A, B, and C are sets such that A ⊆ (B −C).
We need to establish both A ⊆ B and A ∩ C = ∅.
Let x ∈ A. Then x ∈ B − C since A ⊆ (B − C). This implies both
that x ∈ B and that x ̸∈ C. We have shown x ∈ A ⇒ x ∈ B; therefore
A ⊆ B. But we have also shown x ∈ A ⇒ x ̸∈ C so that A and C have
no elements in common, A ∩ C = ∅.
Conversely, suppose that A, B, and C are sets such that A ⊆ B and
A ∩ C = ∅.
We need to show that A ⊆ (B − C), so let x ∈ A. Since A ⊆ B it
follows that x ∈ B. We also know that A and C have no elements in
common, so x ̸∈ C. Therefore x ∈ B − C (since we have shown x ∈ B
and x ̸∈ C). We have proved that x ∈ A ⇒ x ∈ B − C; it follows that
A ⊆ (B − C).
249
Commentary
In this proof, we have not used the feature in the previous example
of labelling each half of the proof with (⇒) or (⇐). Instead we have
signalled the two halves of the proof using ‘Firstly, suppose . . . ’ and
‘Conversely, suppose . . . ’.
As with many proofs about sets, we need to ‘drill down’ to considering
elements. The overall structure of the statement to be proved is P ⇔
(Q∧R). However the propositions P and Q identify subset relations and
hence each is equivalent to a conditional statement involving elements.
For example, the statement P is A ⊆ (B − C), which is equivalent to
x ∈ A ⇒ x ∈ B − C (for an arbitrary element x).
3. In this example, we illustrate that it is sometimes more natural (or more
efficient) not to separate the proof of a biconditional into two parts.
Consider the second of our initial examples.
Theorem 6.7
The line y = mx − 2 intersects the parabola y = 3x2 + 1 if and only
|m| ≥ 6.
Commentary
Rather than proving two separate conditional propositions, in this case
we have linked the two statements ‘the line y = mx − 2 intersects the
parabola y = 3x2 + 1’ and ‘|m| ≥ 6’ directly via a sequence of interme-
diate statements. We have been careful to ensure that each statement in
the chain is connected to those before and after it by the biconditional ‘if
and only if’ connective. Thus the structure of the proof can be described
as follows.
The line y = mx − 2 intersects the parabola y = 3x2 + 1
⇔ ...
⇔ . . . [a sequence of intermediate statements]
⇔ ...
⇔ |m| ≥ 6.
However, in this case, the two sub-proofs would essentially be the same
argument in reverse. It is therefore both more efficient to write and easier
to understand if the two sub-proofs are combined as we have done.
Exercises 6.2
(i) For all positive integers m and n, m|n and n|m if and only if m = n.
(ii) For all positive integers a, m, and n, m|n if and only if am|an.
3. Prove that, for all integers m and n and all primes p, p is a factor of the
product mn if and only if p is a factor of m or p is a factor of n.
251
(i) f is injective if and only if, for all subsets C1 and C2 of A, f (C1 ∩
C2 ) = f (C1 ) ∩ f (C2 ).
(ii) f is injective if and only if, for all subsets C of A, C = f −1 (f (C)).
(iii) f is surjective if and only if, for all subsets D of B, f (f −1 (D)) = D.
6. Prove that, for all positive integers n, n has exactly 5 factors (including
1 and n itself) if and only if n = p4 for some prime p.
We begin this section with the simple observation that, to prove a conjunction
P ∧ Q, it is sufficient to prove P and Q separately. This is intuitively obvious
but may be formalised using the conjunction deduction rule from propositional
252
logic given in section 2.5. This states that if we know P and we know Q, then
we may deduce P ∧ Q.
Suppose we now combine this observation with the logical equivalence
P ⇒ (Q ∧ R) ≡ (P ⇒ Q) ∧ (P ⇒ R)
that we established in example 2.4.2 (page 36). We may then observe that, to
prove a proposition of the form P ⇒ (Q∧R), it is sufficient to prove separately
the two conditional propositions P ⇒ Q and P ⇒ R.
Examples 6.3
Theorem 6.8
For all real numbers x, |x| ≥ x and x + |x| ≥ 0.
Commentary
We could regard this theorem as two separate theorems: ‘for all real
numbers x, |x| ≥ x’ and ‘for all real numbers x, x + |x| ≥ 0’. In the
interests of efficiency, it is often sensible to combine simple related the-
orems (and their proofs). In this example, each of the separate proofs
would still require two cases, x ≥ 0 and x < 0, so it is more efficient to
combine the two proofs.
Theorem 6.9
For all sets A and B, if A and B are disjoint, then A ⊆ B̄ and B ⊆ Ā.
Proof. Suppose that A and B are disjoint sets. By definition, this means
their intersection is empty, A ∩ B = ∅.
253
Commentary
The two sub-proofs here are:
A ∩ B = ∅ ⇒ A ⊆ B̄
and
A ∩ B = ∅ ⇒ B ⊆ Ā.
Since A∩B = B ∩A, the second statement can be obtained from the first
by interchanging A and B. Hence the proof of the second statement can
be obtained by repeating the proof of the first and also interchanging A
and B. Of course, there is little to be gained by actually carrying out
this re-writing, which is why we have simply indicated how the proof
may be constructed.
Set equality
To prove A = B:
Examples 6.4
1. For our first example, we prove one of De Morgan’s Laws for sets. This
was one of the Set Theory Laws introduced in section 3.3; see page 99.
Theorem 6.10
For all sets A and B, A ∪ B = Ā ∩ B̄.
254
We will give three proofs of this theorem to illustrate the different pos-
sible styles of proof. As always, anyone writing a proof has to decide the
style they wish to adopt, how much detail to give, how much background
knowledge to assume, and so forth.
Our first proof is quite descriptive and ‘wordy’. The second proof is very
symbolic but follows the same overall structure as the first. We expect
that some readers will prefer the style of the first proof and some the
second. Our third proof combines the two parts of the symbolic second
proof into a single short proof.
Next we need to establish the subset relation the other way around, so
let x ∈ Ā ∩ B̄. Then x ∈ Ā and x ∈ B̄, so x ̸∈ A and x ̸∈ B. Since x
belongs neither to A nor to B, we have x ̸∈ A ∪ B, so x ∈ A ∪ B. We
have shown that x ∈ Ā ∩ B̄ ⇒ x ∈ A ∪ B. Therefore Ā ∩ B̄ ⊆ A ∪ B.
Our second proof follows the same structure as the first proof, but the
reasoning is expressed symbolically. Perhaps the drawback of this proof
is that it does not explain in detail why each of the statements ‘x ̸∈ A∪B’
and ‘x ̸∈ A and x ̸∈ B’ imply each other.
Proof 2. Firstly, x ∈ A ∪ B ⇒ x ̸∈ A ∪ B
⇒ x ̸∈ A and x ̸∈ B
⇒ x ∈ Ā and x ∈ B̄
⇒ x ∈ Ā ∩ B̄.
Therefore A ∪ B ⊆ Ā ∩ B̄.
Also, x ∈ Ā ∩ B̄ ⇒ x ∈ Ā and x ∈ B̄
⇒ x ̸∈ A and x ̸∈ B
⇒ x ̸∈ A ∪ B
⇒ x ∈ A ∪ B.
Therefore Ā ∩ B̄ ⊆ A ∪ B.
Having written the proof symbolically, it is clear that the steps in the
reasoning in the second half of the proof are just the reverse of the steps
in the first half. In other words, each of the implications in the first half
of the proof reverses. We may therefore combine the two halves of the
proof using the ‘if and only if’ connective. This gives our third proof.
Therefore A ∪ B = Ā ∩ B̄.
Theorem 6.11
For all sets A and B, (A − B) ∪ (B − A) = (A ∪ B) − (A ∩ B).
Next we need to establish the subset relation the other way around, so
let x ∈ (A∪B)−(A∩B). Then x ∈ A∪B and x ̸∈ A∩B. Since x ∈ A∪B
we know that x ∈ A or x ∈ B. If x ∈ A then, since x ̸∈ A ∩ B, we know
that x ̸∈ B. Hence x ∈ A − B. If x ∈ B then, again since x ̸∈ A ∩ B,
we know that x ̸∈ A. Hence x ∈ B − A. We have shown that either
x ∈ A − B or x ∈ B − A. Therefore x ∈ (A − B) ∪ (B − A).
We have proved that x ∈ (A ∪ B) − (A ∩ B) ⇒ x ∈ (A − B) ∪ (B − A),
so (A ∪ B) − (A ∩ B) ⊆ (A − B) ∪ (B − A).
Exercises 6.3
1. Prove each of the following.
(i) If x and y are positive real numbers such that x + y = 1, then
( )2 ( )2
1 1
xy ≤ 14 and x + + y+ ≥ 25
2 .
x y
(ii) If the roots of the quadratic equation x2 + ax + b = 0 are odd
integers, then a is an even integer and b is an odd integer.
(iii) If x ∈ R is such that −1 ≤ x ≤ 4, then −9 ≤ x2 − 6x ≤ 7 and
−5 ≤ x2 + 6x ≤ 40.
2. Prove each of the following set identities. In each case, the results are
true for all sets.
(i) A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)
(ii) Ā ∪ B̄ = A ∩ B
(iii) (A ∪ B) − C = (A − C) ∪ (B − C)
(iv) (A ∩ B) × (X ∩ Y ) = (A × X) ∩ (B × Y )
(v) (A ∪ B) × C = (A × C) ∪ (B ∪ C)
3. Prove each of the following identities involving the symmetric difference
of two sets. From theorem 6.11, the symmetric difference A ∗ B may be
taken to be either (A − B) ∪ (B − A) or (A ∪ B) − (A ∩ B), whichever
is most convenient. In each case the result is true for all sets.
(i) (A ∗ B) ∩ C = (A ∩ C) ∗ (B ∩ C)
(ii) (A ∪ C) ∗ (B ∪ C) = (A ∗ B) − C
(iii) (A ∗ B) × C = (A × C) ∗ (A × B)
4. In each of the following cases, prove that the sets X and Y are equal.
(i) X = {× ∈ R : 2x2 + 3x − 1 = x2 + 8x − 5}, Y = {1, 4}
{ }
x
(ii) X = : x ∈ R and x ̸= −1 , Y = {x ∈ R : x > −1}
x+1
{ }
x { }
(iii) X = 2
: x ∈ R and x ≥ 1 , Y = x ∈ R : 0 < x ≤ 12
x +1
5. Let n be a positive integer. The sets A1 , A2 , . . . , An are closed intervals
defined by Ar = [r, r + n] for r = 1, 2, . . . , n.
Prove that A1 ∩ A2 ∩ . . . ∩ An = [n, n + 1].
6. Two elements x and y of a group G are said to commute if xy = yx.
Prove that if x and y commute, then so do both x−1 and y −1 and g −1 xg
and g −1 yg for all elements g ∈ G.
257
(¬P ⇒ false) ≡ P
where ‘false’ denotes any contradiction. This means that to prove a statement
P , it is sufficient to prove the conditional ¬P ⇒ false instead. The condi-
tional is proved using direct proof: assume ¬P and, from this, deduce false.
In other words, to prove P we may start by assuming that P is false (that is,
assume ¬P ) and then deduce a contradiction.1 This is the method of proof
by contradiction, which is also known by the Latin reductio ad absurdum
(‘reduction to absurdity’). Initially it appears a slightly odd method of proof:
to prove P we start by assuming that P is false! However, we only assume the
falsity of P in order to obtain a contradiction. The contradiction obtained is
usually of the form Q ∧ ¬Q for some proposition Q; in other words, we deduce
both Q and its negation ¬Q.
Before discussing
√ the method further, we first give one of the classic proofs by
contradiction: 2 is irrational. Recall from section 3.2 that a rational number
is one that can be expressed as a fraction; that is, a rational number is a ratio
of integers m/n, where n ̸= 0. Therefore, to say that a number is irrational
means that it cannot be expressed as the ratio of two integers.
Theorem
√ 6.12
2 is irrational.
where m and n have no common factors. Squaring both sides of the equation
gives 2 = m2 /n2 so m2 = 2n2 which means that m2 is even. It follows from
1 In [9], the great mathematician G.H. Hardy described proof by contradiction as ‘one
of a mathematician’s greatest weapons’. He went on to say: ‘It is a far finer gambit than
any chess gambit: a chess player may offer the sacrifice of a pawn or even a piece, but the
mathematician offers the game.’
258
theorem 6.5 that m itself is even.2 Thus m = 2r for some integer r. Substi-
tuting m = 2r into m2 = 2n2 gives 4r2 = 2n2 so n2 = 2r2 . This shows that
r2 is even, so again, by theorem 6.5, it follows that n itself is even.
We have established that both m and n are even, so they have 2 as a common
factor. This contradicts the equation√(*) in which m and n had no common
factors. Hence, the assumption that 2 is rational is false.
√
Therefore 2 is irrational.
Commentary
As always, there are different styles of expressing this proof. For example,
we
√ could have expressed some of the reasoning more symbolically such as
‘ 2 = m/n ⇒ 2 = m2 /n2 ⇒ m2 = 2n2 ⇒ m2 is even’. One aspect of
this proof that is important, however, is to signal at the beginning that the
proof uses the √
method of contradiction. Without this, the initial assumption
‘suppose that 2 is rational’ would look odd indeed.
We may think of theorem 6.12 as being a ‘non-existence
√ theorem’: it asserts
that there do not exist integers m and n such that 2 = m/n. We will consider
‘existence theorems’ in the next chapter; here we reflect on the difficulty of
proving a ‘non-existence theorem’, at least in the case where the universe is
infinite. There √are, of course, infinitely many rational numbers. To prove the
irrationality of 2, we need to rule out the√possibility that any of the infinitely
many rational numbers could be equal to 2 and this seems a daunting task.
Indeed, it is hard to imagine how we might go about constructing a direct
proof of theorem 6.12 (although such direct proofs do exist).
The method of proof by contradiction will be a useful tool to have when
proving non-existence where the universe is infinite. We illustrate this with
our next theorem which asserts that there exist infinitely many prime numbers.
This is not obviously a ‘non-existence theorem’ until we reflect that it is
equivalent to asserting that there does not exist a largest prime number. The
proof of theorem 6.13 is also regarded as a classic proof by contradiction. The
proof is commonly attributed to Euclid, over 2000 years ago.
Theorem 6.13
There exist infinitely many prime numbers.
Before embarking on the proof itself, we begin by exploring the key idea
using some small examples. Consider the list of the first few prime numbers:
2, 3, 5, 7, 11, 13, 17, 19, . . .. If we take the product of all of the primes up to
some point and add 1, what happens?
2 Theorem 6.5 says that ‘n2 is odd, if and only if n is odd’ but this is clearly equivalent
2+1=3 prime
2×3+1=7 prime
2 × 3 × 5 + 1 = 31 prime
2 × 3 × 5 × 7 + 1 = 211 prime
2 × 3 × 5 × 7 × 11 + 1 = 2311 prime
In each case, the resulting number is a prime which is obviously greater than
each of the primes used in its construction. This simple idea lies behind the
proof which we can now give.
N = p1 p2 p3 . . . pn + 1.
Since N is not equal to any of the primes in the list p1 , p2 , . . . , pn , and since
we have assumed the list contains all primes, it follows that N is not prime.
Therefore, by the Prime Factorisation Theorem 4.3, N has a prime factor. In
other words, for at least one of the primes pk in the list, pk is a factor of N .
However, p1 p2 p3 . . . pn = pk (p1 . . . pk−1 pk+1 . . . pn )
= pk S where S = p1 . . . pk−1 pk+1 . . . pn
⇒ N = pk S + 1 where S ∈ Z.
Exercises 6.4
1. Let x and y be real numbers such that x is rational and y is irrational,
x ∈ Q and y ̸∈ Q. Prove that:
(i) x + y is irrational;
(ii) xy is irrational.
2. Prove by contradiction that the set of positive integers Z+ is infinite.
3. Let ax2 + bx + c = 0 be a quadratic equation where a, b, and c are
odd integers. Prove by contradiction that the equation has no rational
solutions.
260
√
4. Using the proof of theorem 6.12 as a guide, prove that 3 is irrational.
√
5. ̸ 0, m + 2n is
(i) Prove that, for all integers m and n where n =
irrational.
(ii) More generally, prove that if α is an irrational number then, for all
integers m and n where n ̸= 0, m + αn is irrational.
6. Prove that there is no rational number r such that 2r = 3.
7. Prove that there is no smallest real number that is strictly greater than
1
2.
1v + 1w = v + w ∈ S
Theorem 6.15
Let S and T be subspaces of a vector space V . Then S + T = T if and only
if S is a subspace of T .
Definition 6.1
Let (G, ∗) and (H, ◦) be two groups. A mapping θ : G → H is a morphism,
or homomorphism, if, for all x, y ∈ G,
θ(x ∗ y) = θ(x) ◦ θ((y).
263
The kernel of θ, ker θ, is the set of all elements of G that map to the identity
element of H,
ker θ = {g ∈ F G : θ(g) = e}.
Theorem 6.16
Let (G, ∗) and (H, ◦) be groups and let θ : G → H be a morphism.
Then θ is injective if and only if ker θ = {e}.
We will apply some of the techniques from this chapter to some proofs in
analysis. First, however, we introduce two further concepts: the ‘infimum’ and
‘supremum’ of a non-empty set of real numbers. Let X be a non-empty subset
of R. An upper bound for X is a real number M such that x ≤ M for all
x ∈ X. If a set has an upper bound it is said to be bounded above.
For example, let X = {x ∈ R : 0 < x < 1} be the interval comprising all real
numbers strictly between 0 and 1; this set is frequently denoted X = (0, 1).
An upper bound for X is 2 since x ≤ 2 for all x ∈ X. There are clearly many
264
√
other upper bounds, including 2, π, 27.25, and so on. Note that saying that
2 is an upper bound for (any set) X tells us more about the set than saying
that 27.25 is an upper bound. (If you had to guess a number to win a prize,
say, would you prefer to be told that the number was less than 2 or less than
27.25? Clearly the former is preferable as it would save you ‘wasting’ any
guesses between 2 and 27.25.) For our set X = {x ∈ R : 0 < x < 1}, the upper
bound that gives most information about X is 1. This is its smallest upper
bound or ‘least upper bound’; it is also called the ‘supremum’ of X, which we
now define formally.
Definition 6.2
Let X be a non-empty subset of R. A real number M satisfying:
Examples 6.5
1. For our first example, we will prove that 1 is, as expected, the supremum
of the interval X = (0, 1) = {x ∈ R : 0 < x < 1},
A more precise expression of this condition would be: for all a ∈ R, if a < M , then a is not
an upper bound for X.
265
of a and 1, (a+1)/2, which will lie strictly between a and 1 and therefore
appears to belong to the set X. We need to be a little careful, however.
The only restriction on a is that is must be a real number less that
1. Suppose a = −3, say, then the average of a and 1 is (a + 1)/2 =
(−3 + 1)/2 = −1 does not belong to X. (Recall that we are seeking
x ∈ X that is greater than a.) In this case, of course, every element of X
is greater than a = −3. To cover all eventualities, we could take x to be
the larger of 0.5, say, and (a + 1)/2. However, it is probably simpler to
consider the cases a > 0 and a ≤ 0 separately, and this is the approach
we will adopt. We are now in a position to commence the proof.
0 a x 1
n2
≤ 500 ⇒ n2 ≤ 500n + 500
n+1
⇒ n2 − 500n ≤ 500
⇒ n(n − 500) ≤ 500.
Clearly this last inequality is not true for all n ∈ Z+ ; take n = 501,
for example. This reasoning is sufficiently generic that we can attempt a
proof by contradiction. However, we just need to be a little careful not
to assume that the supposed supremum is an integer (as we have done
in this example).
{ }
n2
Proof. Let X = : n ∈ Z+ and suppose that sup X exists; call
n+1
it M .
Then M is an upper bound for X so that, for all n ∈ Z+ ,
n2
≤M ⇒ n2 ≤ M n + M
n+1
⇒ n2 − M n ≤ M
⇒ n(n − M ) ≤ M.
Note that we have actually proved that X does not have an upper bound
and this is the reason why it does not have a supremum.
3. Each of the two previous examples have been about particular sets.
For our last example, we prove a result about infima and suprema for
arbitrary (non-empty, bounded) sets.
Theorem 6.17
Let A and B be non-empty bounded 4 subsets of R such that A ⊆ B.
Then inf A ≥ inf B and sup A ≤ sup B.
x ∈ A ⇒ x ≤ sup B,
Exercises 6.5
6. For each of the following sets of real numbers, prove that the supremum
is as stated.
{ }
x−1
(i) X = : x ∈ R+ , sup X = 1.
x
{ }
1
(ii) X = x ∈ R : > 2 , sup X = 12 .
x
{ }
1 1
(iii) X = x ∈ R : 2 > 2 , sup X = √ .
x 2
{ }
n { }
(iv) X = : n ∈ Z+ = 12 , 23 , 34 , 45 , . . . , sup X = 1.
n+1
{m }
(v) X = : m, n ∈ Z+ and m < 2n , sup X = 2.
n
7. (i) Complete the proof of theorem 6.17; that is, prove that if A and
B are non-empty bounded subsets of R such that A ⊆ B, then
inf A ≥ inf B.
(ii) Prove the result in the footnote to theorem 6.17: if A and B are
non-empty subsets of R such that B is bounded and A ⊆ B, then
A is bounded.
8. Let f : R → R be a function and let a ∈ R. Note that, if (an ) is a
sequence, then ‘applying’ the function f gives another sequence (f (an )).
Prove that lim f (x) = ℓ if and only if, for every sequence (an ) such that
x→a
an ̸= ℓ for all n ∈ Z+ and lim an = a, the sequence (f (an )) converges
x→∞
to ℓ, lim f (an ) = ℓ.
x→∞
Hint: for the converse, suppose that for every sequence (an ) such that
an ̸= ℓ for all n ∈ Z+ and lim an = a, the sequence (f (an )) converges
x→∞
to ℓ, lim f (an ) = ℓ. Then, to establish lim f (x) = ℓ use a proof by
x→∞ x→a
contradiction: suppose lim f (x) = ℓ and obtain a contradiction.
x→a
Chapter 7
Existence and Uniqueness
7.1 Introduction
So far in this book we have concerned ourselves with the proof of theorems
which are propositions P or universally quantified propositional functions such
as ∀x • P (x). For much of the current chapter we shall turn our attention to
proofs of existence theorems; that is, theorems which assert the existence
within the universe of an object or objects with a certain property, P . We can
symbolise such a theorem by ∃x • P (x).
Some examples of theorems of this form are the following.
(i) Some prime numbers are of the form 32n + 1, where n is an integer.
(ii) Some quadratic equations do not have real roots.
(iii) Not all real numbers are rational.
(iv) There exist sets which have the same cardinality as some of their proper
subsets.
(v) There exist non-Abelian simple groups.
Typically, existence theorems are stated using the phraseology ‘Some ...’ or
‘There exist ...’. Notice, however, that example (iii) above is expressed rather
differently, as the negation of a universally quantified propositional function
¬∀x • P (x). The rule for negating quantified propositions from section 2.4,
page 63, tells us that this is logically equivalent to ∃x • ¬P (x), which is an ex-
istence theorem. In our example, the equivalent existentially quantified state-
ment may be expressed as: ‘some real numbers are irrational’ or ‘there exist
irrational real numbers’. The manner in which these theorems are expressed
seems to suggest that they are asserting the existence of several objects of
the required type. However, this is merely convention and each of the theo-
rems could be expressed in the form ‘There exists at least one object with the
required property.’ To prove a theorem of this type it is sufficient to demon-
strate the existence of a single object of the appropriate type whether or not
there actually exist many such objects. In section 7.5, we shall consider how
we might prove that there is only one object with the required property if this
is the case.
269
270
Examples 7.1
1. We begin by considering the first of the examples given in the introduc-
tion.
Theorem 7.1
Some prime numbers are of the form 32n + 1, where n is an integer.
only need to show that none of the prime numbers 2, 3, 5, and 7 is a factor
of 97. Therefore we have found an object with the desired properties and
we can now proceed to the proof itself.
The proof itself is, of course, very straightforward. It is often the case
with constructive proofs that the proofs themselves are relatively sim-
ple. The hard work frequently lies in finding the required object a, but
this does not show in the final proof. In our example, we have merely
exhibited an object a = 97 with the desired properties.
2. For our second example, we prove the third example introduced in the
previous section.
Theorem 7.2
Not all real numbers are rational.
3. When dealing with multiplication (of real numbers for example), we tend
to take the commutative law for granted. This says that, for all x and
y in R, xy = yx. It is used in establishing familiar identities such as
(xy)2 = x2 y 2 and (x + y)2 = x2 + 2xy + y 2 . However, just because it is a
familiar property for multiplication of real numbers does not mean that
it is necessarily satisfied in other contexts. For example, with matrix
multiplication we have the following theorem.
272
Theorem 7.3
Matrix multiplication is not commutative. To be more precise, for any
integer n ≥ 2, multiplication of n × n matrices is not commutative.
The statement of the theorem means that it is not always the case that
AB = BA for n×n matrices A and B. Of course, there may be examples
of some matrices where AB = BA but, to prove the theorem, we must
find two matrices A and B with the property that AB ̸= BA. Two such
matrices are easily found using a little trial and error.
For simplicity, we consider 2 × 2 matrices. Suppose we try
( ) ( )
1 2 −1 1
A= and B = .
3 4 3 2
( )( ) ( )
1 2 −1 1 5 5
Then AB = =
3 4 3 2 9 11
( )( ) ( )
−1 1 1 2 2 2
and BA = = ,
3 2 3 4 9 14
so AB ̸= BA. Since we have found a suitable example, we can proceed
directly to a proof.
( ) ) (
1 2 −1 1
Proof. Let A = and B = .
3 4 3 2
( )( ) ( )
1 2 −1 1 5 5
Then AB = =
3 4 3 2 9 11
( )( ) ( )
−1 1 1 2 2 2
and BA = = ,
3 2 3 4 9 14
so AB ̸= BA.
In this example, trial and error easily produces elements of the universe
with the required property. Indeed, a random choice of matrices is quite
likely to give the desired result. However, this will not always be the
case and sometimes we really do need to be careful when constructing
a suitable example. Staying with 2 × 2 matrices for simplicity, we could
do this here by first considering products of arbitrary matrices and then
making simple choices for the entries as follows.
First note that
( )( ) ( )
a b u v au + bw av + bx
=
c d w x cu + dw cv + dx
and ( )( ) ( )
u v a b ua + vc ub + vd
= .
w x c d wa + xc wb + xd
273
We wish to choose the entries of the two matrices so that the two prod-
ucts are different. Recall that two matrices are not equal if they differ in
at least one entry. Now, since au = ua, we can ensure that the top-left
entry of the products are different if bw ̸= vc. A simple choice would
be b = w = 0, v = c = 1. With these choices and any choice of a, d,
u and x, we can construct matrices with the required property. Taking
a = d = u = x = 1, for example, gives matrices
( ) ( )
1 0 1 1
A= and B = ,
1 1 0 1
Now let √
q = 1.42. Then
√ q is rational, since q = 142/100, and it clearly
satisfies 2 < q < 2.1.
Now let’s set a slightly harder task: find a rational number between
Commentary
Although the proof is constructive in nature, it does not provide an ac-
tual rational number. Of course, the proof could not provide a specific
rational number q because the selection of q must depend on the real
numbers x and y. The proof actually gives a general method of con-
struction of the rational number q depending on the reals x and y. We
can think of the construction given in the proof as an algorithm for
producing q ∈ Q given an ‘input’ of real numbers x and y satisfying
x < y.
Exercises 7.1
1. Prove each of the following existence theorems.
(ix) There exist positive integers n which can be expressed as the sum
of two cubes (of positive integers) in two distinct ways: that is,
n = a3 + b3 = c3 + d3 where a, b, c, d ∈ Z+ and {a, b} =
̸ {c, d}.
(x) Let a and b be rational numbers such that a < b. There exists a
rational number q such that a < q < b.
(xi) Let n be an odd positive integer. Then there exists a natural num-
ber m such that n2 = 8m + 1.
(xii) Let x, y ∈ R where x ̸= 0. Prove that there exists n ∈ Z+ such that
n|x| > y.
(i) There exists a matrix A not equal to the n × n zero matrix, 0n×n ,
for any n such that A2 = 0n×n .
(ii) There exists an n × n matrix A not equal to In such that A2 = In .
(iii) There exists a matrix A not equal either to 0n×n or to In for any
n such that A2 = A.
(iv) There exist matrices A, B such that AB = In but BA ̸= Im for
any m.
( )
2 1
(v) Let A = .
1 2
( )
6 0
There exists a 2 × 2 matrix B such that BAB = .
0 2
Examples 7.2
Theorem 7.5
There exists a prime number greater than 10100 .
2. For our second example, we consider the following theorem which is not
expressed as a ‘pure’ existence theorem in the sense that it is not simply
asserting the existence of a particular object with a particular property.
The statement of the theorem involves both universal and existential
quantification and may be symbolised as ∀n ∃θ • P (n, θ) for suitably
defined P and universes for n and θ.
1 In fact, there is an Internet community called GIMPS — the Great Internet Mersenne
Theorem 7.6
In any n-sided polygon there is an interior angle θ such that
( )
n−2
θ≤ π.
n
The statement of the theorem has two quantifiers: ‘for all n-sided poly-
gons, there exists an interior angle . . . ’. Of course our standard first step
to prove a universally quantified proposition is to consider an arbitrary
object of the appropriate type. In our case, we will start by assuming
P is an arbitrary n-sided polygon. Then the result is a simple existence
theorem about P , namely P has an interior angle of the appropriate
type.
In the proof, we will need the following result:
the sum of the interior angles in any n-sided polygon is (n − 2)π.
This result may be proved using the method of mathematical induction,
which is the subject of the next chapter; see example 8.3.2. For the
current proof, we regard this as part of our background knowledge.
3. The proof of our next example does not rely on the method of proof by
contradiction. It is a quite ingenious proof of the existence of an irra-
tional number ab , where a and b are irrational. The proof considers two
numbers of the form ab and proves that one of them is the appropriate
irrational number but without showing which one it is.
We have included the proof for two reasons. Firstly it shows that not
every non-constructive existence proof follows the method of proof by
contradiction or the use of counting arguments described below. As we
have previously indicated, we will never be able to specify precise rules
for how to prove results of a particular type. The second reason is to
indicate that, however many techniques we introduce and guidelines we
give, sometimes there is no substitute for a flash of insight or brilliance.
Theorem 7.7
There exist irrational numbers a and b such that ab is rational.
√
√ 2 √ √2
Proof. Consider 2 . Either 2 is rational or irrational.
√ √2 √
If 2 is rational, then we have proved the theorem: take a = b = 2
which we know to be irrational by theorem 6.12.
√ √2 √ √2 √
However, if 2 is irrational, then let a = 2 and b = 2. Then
√
( √ ) 2 (√ )(√2√2) (√ )2
b
√ 2
a = 2 = 2 = 2 = 2,
Examples 7.3
1. For our first application of the Subset Counting Theorem we prove that
any group with an even number of elements must have an element that
is its own inverse.
Theorem 7.9
Let (G, ∗) be a finite group with an even number of elements. Then there
exists an element g ∈ G such that g ̸= e and g is self-inverse, g −1 = g.
The idea for the proof is to compare the set G with its subset comprising
the identity e together with those elements that are not self-inverse,
g −1 ̸= g: X = {x ∈ G : x = e or x−1 ̸= x}. Providing we can show
that the subset X has a different number of elements, it will follow from
the Subset Counting Theorem that there exists an element of G that is
not in X. Any such element satisfies the required conditions: g ̸= e and
g −1 = g.
281
X = {x ∈ G : x = e or x−1 ̸= x}.
Commentary
It is worth remarking that the proof assumes that each element of the
group has a unique inverse. This allows the elements to be paired off
with their inverses, g and g −1 . We will consider uniqueness proofs in
section 7.5, where we will also prove that the inverse of each element of
a group is unique; see theorem 7.15.
There is a second ‘counting theorem’ that we will use to provide the basis
for non-constructive existence proofs. This is commonly referred to as the
‘Pigeonhole Principle’ as this provides an easy context to visualise the theo-
rem. From a more mathematical point of view, the theorem is more naturally
expressed as a property of functions. We have chosen to state the theorem
using the more colloquial language of pigeonholes, but use functions to give
the proof.
Recall theorem 5.7 (i) which says that if f : A → B is injective, then |A| ≤ |B|.
The contrapositive of this asserts that if |A| > |B|, then f : A → B is not
injective. Since k > n we may deduce that the function f defined above is not
injective. This means that there exists objects a1 , a2 ∈ A such that a1 ̸= a2 ,
but f (a1 ) = f (a2 ). In other words, there are distinct objects a1 and a2 that
are placed in the same pigeonhole, proving the theorem.
Examples 7.4
1. For our first application of the Pigeonhole Principle, we prove the fol-
lowing simple theorem.
Theorem 7.11
Let A be a set of 6 distinct positive integers. Then there exists a pair of
elements in A whose difference is a multiple of 5.
Commentary
Note that we appealed to the Pigeonhole Principle without explicitly
referring to ‘objects’ and ‘pigeonholes’. It is quite common to do this,
assuming that the reader can, if necessary, relate the argument to the-
orem 7.10. If we wanted to refer explicitly to the Pigeonhole Princi-
ple, we would have five pigeonholes labelled by the possible remainders
0, 1, 2, 3, 4. Then each integer ak would be placed in the pigeonhole la-
belled m if its remainder rk = m.
Alternatively, we could have proved the theorem without any reference
to theorem 7.10. Instead we could have modelled the argument in terms
of functions given in the proof of the Pigeonhole Principle. Thus we
would first define a function f : A → {0, 1, 2, 3, 4} by defining f (ak ) to
be the remainder when ak is divided by 5. Then use the cardinalities of
the sets to deduce that f is not injective and so on.
Theorem 7.12
Let S be a network of bus stations and bus routes where each bus route
connects exactly two bus stations. Suppose that there are n bus stations
and m bus routes where m > 12 n(n − 1). Then there exists a pair of bus
stations connected by at least two distinct bus routes.
Proof. Since each bus route connects exactly two stations, we need to
compare the number of bus routes with the number of pairs of bus
stations.
Given that there are n bus stations, the number of pairs is 12 n(n − 1).
However the number of bus routes m is greater than this. Therefore, by
the Pigeonhole Principle, there exists a pair of bus stations connected
by more than one bus route.
284
Commentary
As in the previous example, we have referred to the Pigeonhole Prin-
ciple without explicitly saying what are the objects (bus routes) and
pigeonholes (pairs of bus stations).
We have assumed, as background knowledge, that the number of pairs of
objects that can be formed from n distinct objects is 12 n(n − 1). Readers
may be familiar with the result that says the number of ways of selecting
a subset of r objects from a set of n objects is the so-called binomial
coefficient ( )
n n n!
Cr = = .
r (n − r)!r!
The particular result we need then follows by setting r = 2. For readers
not familiar with the general result, we may reason as follows. To select
a pair of objects from a set of n distinct objects, there are n choices for
the first selected object and then there are n − 1 choices for the second
selected object, giving n(n−1) selections in total. However, each possible
pair is counted twice: the pair {a, b} is counted once when selecting a
first and b second and once when selecting b first and a second. Hence
the total number of pairs is 12 n(n − 1) as claimed.
Exercises 7.2
1. A polygon is convex if every interior angle θ is such that θ < π.
Prove that, in any n-sided non-convex polynomial there is an interior
angle θ such that ( )
n−1
θ< π.
n−3
This theorem appears to assert that every non-convex triangle has a
negative internal angle. Explain this apparent contradiction.
∑
n
2. (i) Let {a1 , a2 , . . . , an } be a set of non-zero integers such that ak <
k=1
n.
Prove that at least one of the integers in the set is negative.
∑
n
(ii) Let {b1 , b2 , . . . , bn } be a set of integers such that b2k < n.
k=1
Prove that at least one of the integers in the set is zero.
3. A tennis club has 2n + 1 members, where n is a positive integer. During
one week, n + 1 matches were played between members.
Prove that some member played more than once during the week.
285
6. Prove that, in any collection of 12 distinct integers selected from the set
{1, 2, 3, . . . , 30}, there exists a pair with common factor greater than 1.
7. (i) Prove that, for any set of five points located in a rectangle of di-
mensions 6 units by 8 units, there exists a pair which are no more
than 5 units apart.
(ii) Prove that, for any set of n2 + 1 points located√in a square of side
n, there exists a pair which are no more than 2 units apart.
(iii) Prove that, for any set of n2 + 1 points located in an equilateral
triangle of side n, there exists a pair in which the points are no
more than 1 unit apart.
10. Use the Generalised Pigeonhole Principle (given in the previous exercise)
to prove each of the following.
(i) In any set of 750 people, there exist three people with the same
birthday (day and month but not necessarily year of birth).
(ii) If a pair of dice is rolled 45 times, there is a score that occurs at
least 5 times.
(iii) In a certain lottery, six distinct numbers are drawn randomly each
week from the set {1, 2, 3, . . . , 49}. Prove that, in a year of lottery
draws, some number was drawn on at least seven occasions.
12. The Intermediate Value Theorem itself (given in the previous exercise)
can be used as the basis for many non-constructive existence proofs.
Prove each of the following using the Intermediate Value Theorem.
7.4 Counter-examples
Our principal concern in this book has been with finding and understanding
proofs of theorems. Of course, given a particular proposition, we will not know
whether it really is a theorem until a proof has been found. Suppose we are
presented with a proposition of the form ∀x • P (x), which may or may not be
a theorem. If it turns out that the proposition is not a theorem, then all our
techniques and strategies for finding a proof are bound to fail for the glaringly
obvious reason that no proof exists! Unfortunately, there is no way of showing
that a proposition is a theorem in advance of finding a proof — finding a proof
is precisely how a proposition is shown to be a theorem.
287
In 1640, Pierre de Fermat asserted his belief that this proposition was a theo-
rem, although he was unable to supply a proof. These numbers are now called
Fermat numbers in his honour. Was Fermat correct in his belief? The first
stage in investigating the question is to look at some of the smaller examples.
0
F0 = 22 + 1 = 21 + 1 = 3,
1
F1 = 22 + 1 = 22 + 1 = 5,
2
F2 = 22 + 1 = 24 + 1 = 17,
3
F3 = 22 + 1 = 28 + 1 = 257,
4
F4 = 22 + 1 = 216 + 1 = 65 537,
5
F5 = 22 + 1 = 232 + 1 = 4294 967 297,
6
F6 = 22 + 1 = 264 + 1 = 18 446 744 073 709 551 617.
It is clear that F0 , F1 , and F2 are prime and we can fairly quickly verify that
F3 is prime. With rather more work, F4 can be shown to be prime but even
with a standard scientific calculator, this would be a lengthy and tedious task.
Beyond F4 the Fermat numbers grow very rapidly indeed. In exercise 6.4.9, we
gave a method for testing the primality of a √ positive integer n: test whether
n has a prime factor p in the range 2 ≤ p ≤ n. We cannot imagine anyone
wishing to use this method to test whether or not F5 is prime aided only by a
pocket calculator. Indeed, it was not until 1732, nearly one hundred years after
Fermat proposed the conjecture, that Euler established that F5 is composite
by showing that
munity nearly 100 years to achieve now takes a modest desktop computer no
more than a few seconds. There are various computer algebra packages which will
obtain these factors in a fraction of a second. Indeed, the factorisation of the
next three Fermat numbers, F6 , F7 , and F8 , can be obtained in at most a few
minutes. This is quite impressive since, for example, F8 = 1238926361552897 ×
93461639715357977769163558199606896584051237541638188580280321.
288
Examples 7.5
1. In example 7.2.1 we introduced the Mersenne prime numbers; that is,
prime numbers of the form 2p − 1 where p is prime. In example 6.1.3,
we proved theorem 6.3, which asserts that ‘p is prime’ is a necessary
condition for ‘2p − 1 is prime’. We now consider whether it is a sufficient
condition; in other words, is the statement ‘for all p, if p is prime, then
2p − 1 is prime’ a theorem?
We begin by testing some small examples:
p=2: 2p − 1 = 2 2 − 1 = 3
p=3: 2p − 1 = 2 3 − 1 = 7
p=5: 2p − 1 = 25 − 1 = 31
p=7: 2p − 1 = 27 − 1 = 127
p = 11 : 2p − 1 = 211 − 1 = 2047
Of these, the first three are clearly prime. It is easy to check that 27 −1 =
127 is prime using the method given in exercise 6.4.9: test whether n
289
√
has a prime factor p in the range 2 ≤ p ≤ n. Using this method to test
211 −1 = 2047 takes a little longer, but we soon find that 211 −1 = 2047 =
23 × 89, so that we have found a counter-example to the proposition ‘for
all primes p, the integer 2p − 1 is prime’.
Solution
We need to find specific real numbers x and y such that the conditional
‘x ≤ y ⇒ |x| ≤ |y|’ is false; in other words. we need to find x and y where
x ≤ y ie true but |x| ≤ |y| is false. If a is non-negative then |a| = a; hence
any counter-example must have at least one of x and y being negative.
Taking both to be negative gives simple counter-examples. For example,
if x = −2 and y = −1, then x < y. However, |x| = 2 > 1 = |y|, so
|x| ≤ |y| is false. We have found our counter-example.
Solution
In this case, we do not initially know whether we should be seeking a
proof or a counter-example. We could start by considering some specific
examples of sets A, B, and C and calculate both A ∪ (B − C) and
(A ∪ B) − C. However, for sets, we have a powerful visualisation in
the form of Venn-Euler diagrams. Although one or more Venn-Euler
diagrams will not constitute a proof of a theorem,3 they can be extremely
useful in pointing the way towards a proof or counter-example. Figure 7.2
represents the sets A ∪ (B − C) and (A ∪ B) − C in two separate Venn-
Euler diagrams.
From the diagrams in figure 7.2, we can see that the ‘difference’ between
the two sets is that A ∪ (B − C) contains A ∩ C as a subset whereas
(A ∪ B) − C does not. This indicates that a counter-example will require
the set A ∩ C to be non-empty.
Counter-example
Let A = {1, 2, 3, 4, 5}, B = {2, 4, 6}, and C = {2, 3, 5}.
3 In fact, this is not strictly true. In her seminal 1994 book [10], Sun-Joo Shin devel-
ops two logical systems related to Venn diagrams where rigorous proofs can be carried out
entirely diagrammatically. Since then, other diagrammatic logics have been developed, in-
cluding those for Venn-Euler diagrams, where proofs are purely diagrammatic. However,
our informal use of Venn-Euler diagrams only points the way towards proofs and they do
not, in themselves, constitute a proof.
290
A B A B
C C
A È (B – C) (A È B) – C
Commentary
In terms of proving a particular proposition to be false, any counter-
example is as good as any other. However, simpler counter-examples are
to be preferred to more complicated ones. A complicated example may
be difficult to understand and can obscure the underlying reason why
the particular proposition is false. A simpler example is more likely to
come close to the heart of why the proposition is false and thus provide
greater insight.
For instance, another counter-example to the proposition given above
is provided by the sets A = R+ = {positive real numbers}, B = Z =
{integers}, and C = R − Q = {irrational real numbers}. (We leave it
as an exercise to verify that these sets do, indeed, provide a counter-
example; see exercise 7.3.3.) However, it is more difficult to evaluate the
various sets involved here and we may wonder whether the reason that
A ∪ (B − C) ̸= (A ∪ B) − C has something to do with the fact that the
sets are infinite or involve irrational numbers.
Solution
291
In part (i), the converse is: if |A| ≤ |B|, then f is injective. For a counter-
example, we need to find a function f : A → B where |A| ≤ |B| but
where f is not injective. Recall that a function is not injective if there
exist different elements of the domain A with the same image in the
codomain B; figure 3.20 (page 117) gives a diagrammatic representation
of this situation.
In part (ii), the converse is: if |A| ≥ |B|, then f is surjective. For a
counter-example, we need to find a function f : A → B where |A| ≥ |B|
but where f is not surjective. For a function to fail to be surjective,
there must exist elements of the codomain B that do not belong to the
image of f , im f; figure 3.13, page 109, illustrates this situation.
We can achieve these properties with functions like those shown in fig-
ure 7.3. The function in figure 7.3 (i) is not injective but has |A| ≤ |B|,
and the function in figure 7.3 (ii) is not surjective but has |A| ≥ |B| In
fact, the figure essentially defines the counter-examples we are seeking.
f f
A B A B
(i)
(ii)
Counter-examples
Commentary
These counter-examples certainly satisfy the ‘simplicity test’ that we
292
Exercises 7.3
1. Let f (n) = n2 + n + 41. Then f (0) = 41, f (1) = 43, f (2) = 47, f (3) =
53, f (4) = 61, . . . are all prime.
Find a counter-example to the proposition: for all non-negative integers
n, f (n) is prime.
This formula, which does produce a long sequence of primes, was dis-
covered by Euler. In fact, amongst all expressions of the form n2 +an+b
where a and b are non-negative integers less than 10, 000, there is none
which produces a longer sequence of primes.
2. Find a counter-example to each of the following propositions.
(i) For all real numbers a, b, c, and d, if a > b and c > d, then (a − c) >
(b − d).
(ii) For all positive integers a, b, and c, if c is a factor of a + b, then c
is a factor of a or c is a factor of b.
(iii) f (n) = n2 − n + 17 is prime for all positive integers n.
(iv) 6n + 4n4 is divisible by 5 for all positive integers n.
(v) 3n < 4n4 for all even positive integers n.
(vi) n4 + 1 is prime for all even positive integers n.
3. Verify that the sets A = R+ = {positive real numbers}, B = Z =
{integers}, and C = R − Q = {irrational real numbers} provide a
counter-example to the proposition: A ∪ (B − C) = (A ∪ B) − C for
all sets A, B, C, as claimed in example 7.5.3.
4. Prove or disprove each of the following propositions.
293
11. (For readers who know about the elementary properties of continuous
and differentiable functions.)
Find a counter-example to each of the following propositions.
section 6.6, this means that there exist real numbers m and M such
that m ≤ f (x) ≤ M for all x in the domain of the function.
Note: there is a theorem which states that every continuous func-
tion f : [a, b] → R is bounded, where [a, b] is a closed interval. Your
counter-example shows that this theorem does not extend to open
intervals.
(iii) If f : R → R is twice differentiable and f has a local maximum at
x = a, then f ′′ (a) < 0.
Similarly, if g : R → R is twice differentiable and g has a local
minimum at x = a, then g ′′ (a) > 0.
Note: your counter-examples indicate the limitations of what is
frequently called the second derivative test for local maxima and
minima.
Examples 7.6
1. For our first example we will prove the uniqueness part of the following
theorem.
296
Theorem 7.13
For every real number a, the equation x3 = a has a unique real solution.
The existence part of the proof is both subtle and difficult√and amounts
to proving that every real number a has a cube root √3 a. Consider,
for example, how we might prove that the real number 3 2 exists? The
answer to this question goes to the heart of what we mean by the real
numbers. There are two approaches to describing the real numbers R. We
may start with a simpler system, usually the natural numbers N, and
from this ‘build up’ to the real numbers by constructing the integers
Z, the rational numbers Q, and then the real numbers R. The natural
numbers themselves are generally described axiomatically by a system of
five axioms called the Peano axioms; we shall consider one of the Peano
axioms, called the Axiom of Induction, in section 8. The last step in
this process, constructing the real numbers from the rational numbers,
is subtle and there is more than one way of achieving this.
Alternatively, as we mentioned in chapter 4.5, the real numbers may
be described axiomatically as a complete ordered field; thirteen
√ axioms
are required for this. The existence of real numbers such as 3 2 follows
from the Completeness Axiom for the real numbers, which says that
every non-empty subset of R that is bounded above has a supremum.
See definition 6.2 for the definition of the supremum of a non-empty
subset of R.
For the current theorem, we √will not concern ourselves with how the ex-
istence of the real number 3 a is established — either through construc-
tion or via axioms. Instead, we will regard this as part of our background
knowledge of the real numbers and concentrate only on the uniqueness
part of the theorem.
Proof of uniqueness. Suppose that x and y are real numbers such that
x3 = a and y 3 = a. Then x3 = y 3 , so we may reason as follows:
x3 = y 3 ⇒ x3 − y 3 = 0
⇒ (x − y)(x2 + xy + y 2 ) = 0 (factorising)
⇒ x−y =0 2 2
or x + xy + y = 0
⇒ x=y or x2 + xy + y 2 = 0.
(x − y)(x2 + xy + y 2 ) = 0 ⇒ x=y or x2 + xy + y 2 = 0
⇒ x = y.
Commentary
The proof follows the structure that we outlined above. That is, we
assumed that x and y are both solutions to the equation and then we
deduced that x = y. The proof itself is elementary in the sense that it
uses little more than factorisation. However, there is a little complication
in the middle where we need to show that ‘if x2 +xy +y 2 = 0, then x = 0
and y = 0’, which requires us to be careful with the logical structure
as we need to understand both the contrapositive and the negation of a
disjunction using De Morgan’s rule.
Theorem 7.14
Let A be a 2 × 2 matrix. If det A ̸= 0, then A has a unique inverse.
This time we shall prove both the existence and uniqueness part of the
theorem. The existence part is proved by construction, that is, given A
we find a matrix B such that AB = BA = I2 . We shall simply define
the matrix B and show that it is the inverse of A. (For an explanation
of where the matrix B comes from, a textbook covering basic matrix
theory may be consulted.)
( )
a b
Proof. Let A = and suppose that det A = ad − bc ̸= 0. Define
c d
B to be the 2 × 2 matrix
( ) ( )
1 d −b d/(ad − bc) −b/(ad − bc)
B= = .
ad − bc −c a −c/(ad − bc) a/(ad − bc)
298
Then ( ) ( )
a b 1 d −b
AB = ×
c d ad − bc −c a
( )( )
1 a b d −b
=
ad − bc c d −c a
( )
1 ad − bc −ab + ab
=
ad − bc cd − cd ad − bc
( )
1 ad − bc 0
=
ad − bc 0 ad − bc
( )
1 0
= = I2 .
0 1
B = BI2 (property of I2 )
= B(AC) (since AC = I2 )
= (BA)C (associative property of matrix multiplication)
= I2 C (since BA = I2 )
= C (property of I2 ).
The proof of uniqueness clearly relies on the associative law for matrix
multiplication. In fact, the uniqueness proof is valid for any associative
binary operation with an identity element. In particular, the proof can
be used to show that in any group the inverse of each element is unique,
which we now do.
Theorem 7.15
The inverse of any element g of a group (G, ∗) is unique.
Note that the proof of theorem 7.15 is essentially identical to the unique-
ness part of the proof of theorem 7.14. In fact, the set of all 2 × 2 invert-
ible matrices — that is, matrices that have inverses — forms a group
under the operation of matrix multiplication. Once we have established
this, then theorem 7.14 is just a special case of theorem 7.15. This is
an example of the economy of labour that we mentioned in section 4.5
as one advantage of using axiom systems. Having proved that inverses
are unique in an (abstract) group, we may deduce this for any structure
that is a group.
3. For our next example, we prove the uniqueness part of the Fundamental
Theorem of Arithmetic. The proof of the existence part was outlined in
section 4.2 and will be dealt with more rigorously in chapter 8.
p1 p2 . . . pk = q1 , (**)
m = n and p1 = q1 , p2 = q2 , . . . , pm = qn .
4. For our final example, we show that, for a non-empty subset of R that is
bounded above, its supremum is unique. The definition of the supremum
is given in definition 6.2.
Exercises 7.4
1. (i) Prove that the equation ax = b, where a and b are fixed real num-
bers and a ̸= 0, has a unique solution.
(ii) Prove that, if a is a positive real number, then the equation x2 = a
has a unique positive solution.
√
As in the example 7.6.1, you may assume the existence of a for
any a > 0.
√
(iii) Assuming the existence of a fifth root 5 a of any a ∈ R, prove that,
for every real number a, the equation x5 = a has a unique solution.
5. Prove the following theorem. The theorem makes precise the idea that
dividing a positive integer n by a positive integer m gives a ‘quotient’ q
and ‘remainder’ r. For example, dividing 131 by 9 gives quotient 14 and
remainder 5, which we can express as 131 = 14 × 9 + 5.
9. (i) Prove that x = 0 is the only real number that satisfies |x| < ε for
all ε ∈ R+ .
(ii) Let (an ) be a convergent sequence. Prove that its limit is unique.
8.1 Introduction
In this chapter we consider in some detail one particular method of proof,
called proof by mathematical induction, which may be used to prove state-
ments about the natural numbers or positive integers. In other words, the
method will apply to the proofs of propositions of the form ∀n • P (n) where
the universe for n is the set of natural numbers N or the set of positive inte-
gers Z+ . The following are examples of the kinds of results that we may prove
using the method of mathematical induction.
The first of these is clearly of the form ∀n ∈ Z+ • P (n) and the second is
of the form ∀n ∈ N • P (n). However, the third statement is not obviously of
one of these two forms. Note that, to say that a set A is finite means it has
cardinality |A| = n where n is some natural number. This means we could
rephrase the third statement as ‘for all n ∈ N, if A is a set with cardinality
|A| = n, then its power set has cardinality |P(A)| = 2n ’ and this is of the form
∀n ∈ N • P (n). This is not unusual. Sometimes a statement is not obviously
one about N or Z+ , but is more naturally about some other mathematical
object such as a set, function, group, graph or whatever. But, by rethinking
the statement, it may be rephrased to be one about say the positive integers;
the advantage of this is that it brings into play the possibility of using the
powerful method of mathematical induction.
Despite its name, any proof by mathematical induction uses deductive rea-
soning, which is the basis of all mathematical proofs; it does not rely on the
kind of inductive reasoning described in section 1.3.
303
304
To motivate the idea behind the method, suppose we are given the following
instruction.
• If you write down an integer k, then you must also write down the integer
k + 1.
Axiom of Induction
Let S be a subset of N such that:
(i) 0 ∈ S, and
(ii) for all k, k ∈ S ⇒ (k + 1) ∈ S.
The Axiom of Induction gives a way of establishing that some property P (n)
holds for all natural numbers. Given a property P (n), define S = {n ∈ N :
P (n)} to be the set containing all those natural numbers for which P (n)
is true. Thus n ∈ S if and only if P (n) is true. Hence the two conditions
in the Axiom of Induction become (i) P (0) is true and (ii) if P (k) is true,
then P (k + 1) is true. This formulation is frequently called the Principle of
Mathematical Induction.
Examples 8.1
1. One of the common contexts in which proof by induction is first encoun-
tered is to prove results that involve the summation of a finite number
of terms. We illustrate the approach by proving that the sum of the first
n positive integers is 12 n(n + 1).
Theorem 8.1
For all n ∈ Z+ , 1 + 2 + 3 + · · · + n = 21 n(n + 1).
1 + 2 + 3 + · · · + k = 12 k(k + 1).
1 + 2 + 3 + · · · + k + (k + 1) = 12 (k + 1)(k + 2).
The left-hand side of this second equation is the same as the left-hand
side of the previous equation, but with the addition of a single extra
term (k + 1). Hence, to deduce the result for n = k + 1 we will take the
equation for n = k, add (k + 1) to both sides and then reorganise the
new right-hand side. This right-hand side is 21 k(k + 1) + (k + 1), which
307
This final expression is what we are seeking for the right-hand side of
the equation for k + 1. We are now in a position to organise these con-
siderations into a proof.
1 + 2 + 3 + · · · + k + (k + 1) = 1
2 k(k + 1) + (k + 1)
= 1
2 k(k + 1) + 2 × 12 (k + 1)
1
= 2 (k + 1) (k + 2)
1
= 2 (k + 1) ((k + 1)k + 1) .
This is the result for n = k + 1 and hence completes the inductive step.
Therefore, for all n ∈ Z+ , 1+2+3+· · ·+n = 12 n(n+1), by induction.
Commentary
There are a number of points to make about the organisation and struc-
ture of the proof. Firstly, as with some other methods of proof such as
proof by contradiction, it is usually a good idea to signal at the begin-
ning that the proof uses the method of mathematical induction. The
reader then knows to expect a particular structure to the proof.
To establish the base case, we just need to check that the equation
is satisfied when n = 1. To verify an equation, it is good practice to
evaluate separately the left- and right-hand sides. In this way, it will be
clear what is being evaluated. Less clear would be to write ‘1 = 12 ×1×2’
because it does not explicitly link this (trivial) equation with the result
under consideration.
Finally, at the end of the proof, it is also good practice to conclude with
the result that has been established and the reason that the conclusion
is justified; the phrase ‘by induction’ signals this.
It is quite common to use the letter n, rather than k, within the body of
the inductive step. Of course, the letter used is not important. We have
chosen to use k rather than n to keep the reasoning within the inductive
308
step slightly separate from the conclusion. Using n makes the inductive
hypothesis look identical to the result that we are trying to establish.
However, the choice of letter is a matter of personal taste on behalf of
the proof writer.
2. In this example, we prove the following result which was the second
example mentioned in the previous section. Here the universe is the
natural numbers, so the base case will be n = 0.
Theorem 8.2
For every n ∈ N, the expression 5n + 3 is divisible by 4.
Theorem 5.5
For all finite sets A, if A has cardinality n, then its power set P(A) has
cardinality 2n .
Commentary
The two previous proofs of theorem 5.5 involved counting arguments
of one sort or another. The proof we gave on page 191 was based on
counting the number of ways a subset of A could be ‘built’ by choosing
whether to include or exclude each element of A from the subset. The
proof outlined in exercise 5.2.2 proceeds by counting the number of r-
element subsets for r = 0, 1, 2, . . . , n. The proof we have given here is
also based on a counting argument: counting the number of subsets that
include a particular element a∗ and also counting the number of subsets
that exclude a∗ .
There is one aspect of the proof that was implicit, which we now wish
to make explicit. In concluding that there are 2k subsets C that contain
the element a∗ , we are implicitly assuming that there is a bijective cor-
respondence between the sets C = B ∪ {a∗ } and the subsets B ⊆ A that
do not contain a∗ . The bijection is, of course, defined by B ∪ {a∗ } 7→ B,
but we have not explicitly proved that this defines a bijection. We have
also used implicitly the corollary to theorem 5.7 (page 198) to deduce
that there are the same number of subsets C = B ∪ {a∗ } containing a∗
as there are subsets B ⊆ A − {a∗ } that do not contain a∗ .
310
Theorem 8.3
For all real numbers a ̸= 1 and n ∈ Z+ ,
an − 1
1 + a + a2 + . . . + an−1 = .
a−1
ak − 1
1 + a + a2 + . . . + ak−1 + ak = + ak
a−1
ak − 1 ak (a − 1)
= +
a−1 a−1
a −1+a
k k+1
− ak
=
a−1
ak+1 − 1
= .
a−1
This is the result for k + 1 and hence completes the inductive step.
an − 1
Therefore, for all n ∈ N, 1+a+a2 +. . .+an−1 = , by induction.
a−1
5. Consider the following ‘theorem’ and ‘proof’. Since the claim in the
‘theorem’ is patently false, there must be an error in the proof. The
question is: What is wrong with the proof?
311
‘Theorem’
All rectangles have the same area.
‘Proof.’ Let P (n) be the statement: in any set of n rectangles, all the
rectangles have the same area.
We shall prove that P (n) is true for all positive integers n by induction.
This will prove the theorem.1
Base case. The result P (1) is obviously true since in any set containing
only one rectangle, all the rectangles in the set have the same area.
Inductive step. Suppose that, P (k) is true; in other words, in any set of
k rectangles, all the rectangles have the same area.
Let {R1 , R2 , . . . , Rk+1 } be an arbitrary set of k + 1 rectangles.
Since {R1 , R2 , . . . , Rk } is a set of k rectangles, all these have the same
area. Similarly, since {R2 , R3 , . . . , Rk+1 } is also a set of k rectangles, all
these have the same area.
Hence, taking the union of these two sets, all the rectangles in
{R1 , R2 , . . . , Rk+1 } have the same area.
Hence P (k + 1) is true and completes the inductive step.
Therefore, for all positive integers n, in any set of n rectangles, all the
rectangles have the same area, by induction.
Solution
The base case is uncontroversial. For any rectangle R, all rectangles
in the set {R} have the same area. The problem must lie in the in-
ductive step. Let’s examine one particular case of the inductive step,
say, when k = 4. The inductive hypothesis in this case is that every
set of four rectangles comprises rectangles with the same area. Now
let {R1 , R2 , R3 , R4 , R5 } be any set of five rectangles. By the induc-
tive hypothesis, both the sets of four rectangles, {R1 , R2 , R3 , R4 } and
{R2 , R3 , R4 , R5 }, contain rectangles that all have the same area; hence
all the rectangles in {R1 , R2 , R3 , R4 , R5 } also all have the same area.
This reasoning appears to be perfectly sound and indeed it is! The im-
plication considered here, P (4) ⇒ P (5), is a true proposition.
So what has gone wrong? Thinking about the truth of the result it-
self gives the clue. As we have indicated, the result is true for n = 1
(the base case) but clearly it is not true when n = 2. There are sets
1 To see why this is equivalent to the stated theorem, suppose we have established that
every finite set of rectangles contains rectangles which are all of the same area. The stated
theorem then follows by contradiction, as follows. Assume that not all rectangles have the
same area. Then there exist two rectangles, R and R′ , say, with different areas. Then any set
of rectangles containing both R and R′ contradicts the result that says all sets of rectangles
contain only rectangles with the same area.
312
Exercises 8.1
1 + 3 + 5 · · · + (2n − 1) = n2 .
1
(ii) The sum of the squares of the first n positive integers is 6 n(n +
1)(2n + 1):
1
12 + 22 + 32 · · · + n2 = n(n + 1)(2n + 1).
6
(iv) The sum of the cubes of the first n positive integers is 14 n2 (n + 1)2 :
1 2
13 + 23 + 33 · · · + n2 = n (n + 1)2 .
4
(1 + x)n ≥ 1 + nx.
(1 + x1 )(1 + x2 ) . . . (1 + xn ) ≥ 1 + (x1 + x2 + · · · + xn ).
11. (i) Prove that, for all n ∈ Z+ , a 2n × 2n grid with a single corner
square removed may be covered with L-shaped tiles like this one.
(ii) From part (i), prove that 22n − 1 is divisible by 3 for all n ∈ Z+ .
(iii) Prove the result in part (ii) by induction without reference to the
result in part (i).
(iv) Using a similar approach to part (i), prove that for all n ∈ Z+ , a
2n × 2n × 2n cube with a single small cube (with side length 1)
removed from one corner may be constructed using pieces like this
one.
Example 8.2
Since this modification is straightforward, we illustrate it with a single exam-
ple.
Theorem 8.4
For all integers n ≥ 5, n4 < 4n .
The following table compares the values of n4 and 4n for small positive integers
n. Although the initial values give no clear pattern, the table suggests that,
for n ≥ 5, the values of 4n increase more rapidly than do the values of n4 .
n n4 4n
1 1 4
2 16 16
3 81 64
4 256 256
5 625 1024
6 1296 4096
Thinking about the proof, the table takes care of the base case which is, of
course, n = 5. For the inductive step, we need to show that, for all k ≥ 5,
if k 4 < 4k , then (k + 1)4 < 4k+1 . So, let’s consider (k + 1)4 . Expanding the
expression, we have
(k + 1)4 = k 4 + 4k 3 + 6k 2 + 4k + 1.
Suppose we could show that the terms on the right-hand side were no greater
than k 4 + k 4 + k 4 + k 4 = 4 × k 4 . Then the inductive step would allow us to
reason: 4 × k 4 < 4 × 4k = 4k+1 . Now, considering the terms in the expression
k 4 + 4k 3 + 6k 2 + 4k + 1, we have:
This shows that (k + 1)4 < 4k+1 , which is the result for k + 1 and hence
completes the inductive step.
The inductive hypothesis only gives us information about k and not a1 and a2 .
In our previous, somewhat informal proof (page 134), we essentially applied
the same reasoning to a1 and a2 : each is either prime or it factorises. What
is needed is a ‘mathematical induction’ version of this. Suppose that we had
an inductive hypothesis that allowed us to assume P (a1 ) and P (a2 ) as well
as P (k). Then we may express each of a1 and a2 as a product of primes and
hence we can also express k + 1 = a1 a2 as a product of primes. An inductive
hypothesis that allows us to assume P (r) for all r ≤ k (rather than just P (k)
itself) is what is needed in this case.
Returning to our informal introduction to the Principle of Mathematical In-
duction expressed in terms of writing down integers, suppose we are given the
following two instructions.
The effect is the same as following the original two instructions. Firstly, to obey
the first instruction, we need to write down ‘1’. Then the second instruction
‘kicks in’: because we have now written down ‘1’, we have (trivially) written
down all the integers from 1 to 1; then need to write down ‘2’. But now we
have written down both ‘1’ and ‘2’, so to follow the second instruction, we also
need to write down ‘3’. Then we have written ‘1’, ‘2’, and ‘3’ so, to follow the
second instruction, we need to write ‘4’ and so on. In other words, to follow
both instructions, we again would need to write down all the positive integers.
This is an informal justification for the following variation of the method of
proof by induction.
We have stated this for the case where the universe is N to match our original
statement of proof by induction but, of course, we may vary the base case
appropriately to cover cases where the universe is Z+ or Z≥m . The method
is called the ‘strong form’ of mathematical induction because it allows us to
make a stronger inductive hypothesis. In other words, we assume more than
in the standard version of mathematical induction: instead of assuming the
result for a single values k, we assume it for all values up to and including k.
However, despite this stronger inductive hypothesis, the strong form is actually
equivalent to the original method of proof by induction given in the previous
section in the sense that anything that can be proved using the strong form can
also be proved using the original version. Suppose that P (n) is a propositional
function with universe N. Let Q(n) be the propositional function
So Q(n) asserts that P (r) is true for all 0 ≤ r ≤ n. Then two things are
apparent:
This demonstrates that any statement that can be proved using the strong
form can actually be proved using the original form. Thus the strong form
is a ‘methodological convenience’: it makes writing proofs easier, but is no
stronger, logically, than the original form.
Examples 8.3
1. For our first example, we give an inductive proof of the Prime Factori-
sation Theorem.
k + 1 = a1 a2 where 2 ≤ a1 , a2 ≤ k.
a1 = p1 p2 . . . ps and a2 = q1 q2 . . . qt
k + 1 = p1 p2 . . . ps q1 q2 . . . qt .
A B
Theorem 8.5
The sum of the interior angles in any n-sided convex polygon is (n−2)π.
various non-Euclidean geometries. For the current proof, we will accept this result as part
of our background knowledge. For a proof, see exercise 8.2.10.
323
q sides k + 1 – q sides
P Q R
Consider the angle sum for P . Apart from each interior angle where the
cut is made, each angle of P belongs either to Q or to R. For each of
the two angles split by the cut, the sum of the angles of the two ‘pieces’
in Q and R equals the original angle in P . Hence
It is often the case that the state of the system at a particular time depends
only on its state at the time point or points immediately beforehand. For
example, a species whose growth is not constrained by environmental factors
may be such that its population at time n depends only on its population at
time n − 1. If an denotes the population at time n, then in this scenario, an
is a function of an−1 , an = f (an−1 ).
Another example is the famous Fibonacci sequence, which was introduced
to Western mathematics in 1202 by Leonardo of Pica, known as Fibonacci,
although this was known to Indian mathematics for centuries before this.
In attempting to understand the growth of a rabbit population, Fibonacci
proposed a model where the population at time n is the sum of the population
at times n − 1 and n − 2. In this case, if an denotes the rabbit population,
then Fibonacci’s model is expressed as an = an−1 + an−2 .
These are examples of a recursively defined sequence which is one where
each term in the sequence is defined in terms of the previous terms. We may
express this more formally by saying that the n th term is a function of (some
or all of) the terms a1 , a2 , . . . , an−1 ,
an = f (a1 , a2 , . . . , an−1 ) .
This expression is called the recursive relationship. The first term or the
first few terms will also need to be defined explicitly, and this will depend on
which terms appear in the recursive relationship.
Examples 8.4
1. If the recursive relationship defined an only in terms of an−1 , then it is
only the initial term a1 that also needs to be defined explicitly.
A sequence (an ) is defined by
an = 3an−1 + 2 for n ≥ 2,
a1 = 5.
a1 = 5 (by definition)
a2 = 3a1 + 2 = 3 × 5 + 2 = 17
a3 = 3a2 + 2 = 3 × 17 + 2 = 53
a4 = 3a3 + 2 = 3 × 53 + 2 = 158
..
.
These are both taken as having the value 1, so the Fibonacci sequence
(an ) is defined by
a1 = 1 (by definition)
a2 = 1 (by definition)
a3 = a2 + a1 = 1 + 1 = 2
a4 = a3 + a2 = 2 + 1 = 3
a5 = a4 + a3 = 3 + 2 = 5
a6 = a5 + a4 = 5 + 3 = 8
a7 = a6 + a5 = 8 + 5 = 13
..
.
an = a1 + a2 + · · · a + an−1 for n ≥ 2,
a1 = 1.
In this case, the n th term is the sum of all of the previous terms, so the
first few terms of the sequence are:
a1 = 1 (by definition)
a2 = a1 = 1
a3 = a1 + a2 = 1 + 1 = 2
a4 = a1 + a2 + a3 = 1 + 1 + 2 = 4
a5 = a1 + a2 + a3 + a4 = 1 + 1 + 2 + 4 = 8
a6 = a1 + a2 + a3 + a4 + a5 = 1 + 1 + 2 + 4 + 8 = 16
..
.
term of each of the sequences defined in examples 8.4. In some cases it might
be quite easy to conjecture a general formula; we suspect readers may ‘spot’ a
formula for an in example 3 above. In other cases, this might be considerably
more difficult; for the Fibonacci sequence, it would be almost impossible to
‘guess’ the following general formula
( √ )n ( √ )n
1 1+ 5 1 1− 5
an = √ −√ .
5 2 5 2
However a conjecture is obtained, mathematical induction will be an appro-
priate method of proof. For those cases where several initial terms are defined
explicitly, the result will need to be verified individually for these initial terms.
Thus there may be several ‘base cases’ that need verifying and the inductive
step will only apply where the recursive relationship is used. The general
method, based on the strong form of induction, is described as follows.
Examples 8.5
1. Let (an ) be the sequence in example 8.4.1 defined by
an = 3an−1 + 2 for n ≥ 2,
a1 = 5.
327
Hence ak+1 satisfies the given formula. This completes the inductive
step.
Commentary
Alert readers will have noticed that, in this example, we have not ac-
tually used the strong form of the inductive hypothesis. The only place
where the inductive hypothesis is used is to replace ak with 2 × 3k − 1.
In this example, a proof using the ‘standard’ version of mathematical
induction would be perfectly valid. Of course, the reason for this is that
the recursive relationship is of the form an = f (an−1 ); in other words,
an is defined only in terms of its immediate predecessor an−1 .
Hence ak+1 satisfies the given formula. This completes the inductive
step.
Therefore, an = 2n−1 − 1 for all n ≥ 2, by induction.
Commentary
In contrast to the previous example, the strong form of the inductive
hypothesis is used in this proof. In the step labelled ‘inductive hypothe-
sis’ we have replaced ak−1 with 2k−1 − 1 and we have replaced ak−2 with
2k−2 − 1. In other words, we used the inductive hypothesis for r = k − 1
and r = k − 2. This means that a simple inductive hypothesis would not
have been sufficient in this case.
Exercises 8.2
1. Prove each of the following.
(i) For all integers n ≥ 4, n! > 2n .
(ii) For all integers n ≥ 7, n! > 3n .
(iii) For all integers n ≥ 5, n2 < 2n .
(iv) For all integers n ≥ 4, n3 < 3n .
(v) For all integers n ≥ 10, n3 < 2n .
2. Prove by induction that, for all integers n ≥ 2,
3 8 15 n2 − 1 n+1
× × × ··· × = .
4 9 16 n2 2n
329
3. Using the strong form of mathematical induction, prove that every in-
teger n ≥ 6 can be written as n = 3a + 4b for some a, b ∈ N.
Proceed as follows.
3 + (−1)n
Then an = for all n ∈ Z+ .
2
(iii) Let (an ) be the sequence defined by
an = 5an−1 − 6an−2 for n ≥ 3,
a1 = 0, a2 = 6.
6. It is well known that positive integers can be written using binary nu-
merals. For example, 13 = 11012 because 13 = 23 + 22 + 20 . That every
n ∈ Z+ has a binary numeral representation is equivalent to the state-
ment: every n ∈ Z+ can be expressed as a sum of distinct non-negative
powers of 2.
Use the strong form of induction to prove this statement.
(i) Prove that A is closed under multiplication; that is, the product of
any two elements of A is always an element of A.
331
10. Prove the base case in the proof of theorem 8.5: the angle sum in any
triangle is π.
The following diagram provides the idea behind the proof.
A C B
A B
11. In the proof of theorem 8.5, where is the requirement that the polygon
be convex used?
Is the theorem still true without the requirement that the polygon be
convex? If so, how might the proof given in example 8.3.2 be modified
to prove the more general theorem?
(I) P (1);
(II) for all n ∈ Z+ , P (n) ⇒ P (2n);
(III) for all n ∈ Z+ , P (n + 1) ⇒ P (n).
Chapter 2
Exercises 2.1
2. (i) If the wind blows then, the sun doesn’t shine or the rain falls (or
both).
(ii) The wind blows and the rain falls if and only if the sun doesn’t
shine.
(v) If the rain doesn’t fall or the temperature rises (but not both), then
the sun shines and the wind doesn’t blow.
3. (ii) (S ∧ ¬W ) ⇒ T
(iv) (S ∧ T ) ∨ (W ∧ R)
333
334 Understanding Mathematical Proof
(v) P Q R P ⇒Q Q⇒R (P ⇒ Q) ∨ (Q ⇒ R)
T T T T T T
T T F T F T
T F T F T T
T F F F T T
F T T T T T
F T F T F T
F F T T T T
F F F T T T
5. (i) (a), (b), (d), and (f) are the substitution instances.
For example, the substitution that gives the proposition in (f) is
P −→ (R ⇒ S) and Q −→ S.
Exercises 2.2
1. (iii) P Q ¬Q P ⇒ ¬Q P ∧Q ¬(P ∧ Q)
T T F F T F
T F T T F T
F T F T F T
F F T T F T
Since the truth values in the fourth and sixth columns are equal,
P ⇒ ¬Q ≡ ¬(P ∧ Q).
Hints and Solutions to Selected Exercises 335
(iv) A B
P Q R P ∧Q (P ∧ Q) ∨ R P ∨R Q∨R A∧B
T T T T T T T T
T T F T T T T T
T F T F T T T T
T F F F F T F F
F T T F T T T T
F T F F F F T F
F F T F T T T T
F F F F F F F F
Since the truth values in the fifth and eighth columns are equal,
(P ∧ Q) ∨ R ≡ (P ∨ R) ∧ (Q ∨ R).
(vi) P Q R Q⇒R (P ⇒ (Q ⇒ R) P ∧ Q (P ∧ Q) ⇒ R
T T T T T T T
T T F F F T F
T F T T T F T
T F F T T F T
F T T T T F T
F T F F T F T
F F T T T F T
F F F T T F T
Since the truth values in the fifth and seventh columns are equal,
P ⇒ (Q ⇒ R) ≡ (P ∧ Q) ⇒ R.
2. (ii) P Q P ⇔Q (P ⇔ Q) ∧ Q
T T T T
T F F F
F T F F
F F T F
Hence (P ⇔ Q) ∧ Q P .
336 Understanding Mathematical Proof
(iv) P Q R Q∨R P ⇒ (Q ∨ R) P ∧ R P ∨R
T T T T T T T
T T F T T F T
T F T T T T T
T F F F F F T
F T T T T F T
F T F T T F F
F F T T T F T
F F F F T F F
The propositions P ⇒ (Q ∨ R) and P ∧ R are both true only in
rows 1 and 3. In each of these rows, P ∨ R is also true.
Therefore {P ⇒ (Q ∨ R), P ∧ R} (P ∨ R).
(vii) P Q R ¬P P ⇒R Q⇒R ¬P ⇒ Q ¬P ∨ R
T T T F T T T T
T T F F F F T F
T F T F T T T T
T F F F F T T F
F T T T T T T T
F T F T T F T T
F F T T T T F T
F F F T T T F T
The propositions P ⇒ R, Q ⇒ R and ¬P ⇒ Q are all true only in
rows 1, 3, and 5. In each of these rows, ¬P ∨ R is also true.
Therefore {P ⇒ R, Q ⇒ R, ¬P ⇒ Q} (¬P ∨ R).
(iv) P ∨ (Q ∧ (P ∨ ¬Q))
≡ P ∨ ((Q ∧ P ) ∨ (Q ∧ ¬Q)) Distributive law
≡ P ∨ ((Q ∧ P ) ∨ false) Complement law
≡ P ∨ (Q ∧ P ) Identity law
≡ P ∨ (P ∧ Q) Commutative law
≡ P Absorption law
(vi) (P ∧ Q) ∨ (¬P ∨ R)
Hints and Solutions to Selected Exercises 337
Exercises 2.3
1. (ii) Universe: Footballers
Predicates: O : . . . is overpaid
T : . . . is talented.
Then symbolise as: ∃x • O(x) ∧ ¬T (x).
(vii) We interpret this as: no-one likes all people who are rude.
Universe: People
Predicates: L : . . . likes . . .
R : . . . is rude.
Then symbolise as: ¬∃x ∀y • R(y) ⇒ L(x, y).
Exercises 2.4
1. (ii) 1. P ⇒ ¬Q premise
2. Q∨R premise
3. ¬¬Q ∨ R 2. Equivalence: involution law
4. ¬Q ⇒ R 3. Equivalence: material implication law
5. P ⇒R 1,5. Hypothetical syllogism
Hints and Solutions to Selected Exercises 339
(iv) 1. (P ∧ Q) ⇒ (S ∧ T ) premise
2. Q∧P premise
3. P ∧Q 2. Equivalence: commutative law
4. S∧T 1,3. Modus ponens
5. S 4. Simplification
(vi) 1. Q premise
2. ¬S premise
3. (P ∧ R) ⇒ S premise
4. ¬(P ∧ R) 2,3. Modus tollens
5. ¬P ∨ ¬R 4. Equivalence: commutative law
6. Q∨P 1. Addition
7. P ∨Q 6. Equivalence: De Morgan’s law
8. Q ∨ ¬R 5,7. Resolution
(viii) 1. P ∨Q premise
2. R ⇒ ¬Q premise
3. ¬P premise
4. (¬R ∧ Q) ⇒ S premise
5. Q 1,3. Disjunctive syllogism
6. ¬(¬Q) 5. Equivalence: involution law
7. ¬R 2,6. Modus tollens
8. ¬R ∧ Q 5,7. Conjunction
9. S 4,8. Modus ponens
(x) 1. (P ⇒ Q) ∧ (R ⇒ Q) premise
2. S ⇒ (P ∨ R) premise
3. S premise
4. P ∨R 2,3. Modus ponens
5. P ⇒Q 1. Simplification
6. (R ⇒ Q) ∧ (P ⇒ Q) 1. Equivalence: commutative law
7. R⇒Q 6. Simplification
8. Q∨Q 4,5,7. Constructive dilemma
9. Q 8. Equivalence: idempotent law
2. (i) 1. P ⇒ Q premise
2. Q ⇒ P premise
3. (P ⇒ Q) ∧ (Q ⇒ P ) 1,2. Conjunction
4. P ⇔ Q 3. Equivalence: biconditional law
340 Understanding Mathematical Proof
(iii) 1. P ∨Q premise
2. P ⇒R premise
3. Q⇒R premise
4. R∨R 1,2,3. Constructive dilemma
5. R 3. Equivalence: idempotent law
1. (G ⇒ S) ∧ (¬G ⇒ ¬F ) premise
2. F ∨ ¬I premise
3. I ∧G premise
4. I 3. Simplification
5. ¬(¬I) 4. Equivalence: involution law
6. ¬I ∨ F 2. Equivalence: commutative law
7. F 5,6. Disjunctive syllogism
8. (¬G ⇒ ¬F ) ∧ (G ⇒ S) 1. Equivalence: commutative law
9. ¬G ⇒ ¬F 8. Simplification
10. ¬(¬F ) 7. Equivalence: involution law
11. ¬(¬G) 9,10. modus tollens
12. G 7. Equivalence: involution law
13. G⇒S 1. Simplification
14. S 12,13. Modus ponens
Chapter 3
Exercises 3.1
(vi) {−2}
{ }
(viii) 12 , 1, 32 , 2, 52 , 3, . . .
4. (ii) |{x : x is an integer and 2/3 < x < 17/3}| = |{1, 2, 3, 4, 5}| = 5
(v) |{x ∈ R : x2 ≤ 2}| = ∞
(vii) |{2, 4, {{6, 8}, 10}}| = 3
(ix) |{1, {1}, {{1}}, {{{1}}}}| = 4
6. (ii) {{a, b}, {a, c}, {a, d}, {b, c}, {b, d}, {c, d}}
(iv) {{b}, {a, b}, {b, c}, {b, d}, {a, b, c}, {a, b, d}, {b, c, d}, {a, b, c, d}}
Exercises 3.2
A B U A B U
1. (iii) (v)
C C
3. (iii) None.
(vi) X ⊆ Y
(ix) Y ⊆ X and X ∩ Y = ∅ (since Y = ∅).
C C C
A* B A*C ( A * B) Ç ( A * C )
Exercises 3.3
X ÇY
Y Y B ´Y
A AÇ B A
B B
Exercises 3.4
(1) 2× 1
1 4
11 = − 11 .
2
1. (ii) g = ( )2 =
2 1
−3 −4
2
(iv) (f ◦ f )(−2) = f (f (−2)) = f (| − 3|) = f (3) = 2.
(vi) (h ◦ h)(x) = h(h(x)) = h(2x + 1) = 2(2x + 1) + 1 = 4x + 3.
( )
2x 2x 2x − x2 + 3
(viii) (f ◦ g)(x) = f (g(x)) = f 2
= 2
− 1 = .
x −3 x −3 x2 − 3
( )
1
2. (i) (f ◦ g)(x) = f (g(x)) = f 2
x +1
2 2 + (x2 + 1) x2 + 3
= + 1 = = .
x2 + 1 x2 + 1 x2 + 1
346 Understanding Mathematical Proof
(√ ) 1 1
(iii) (g ◦ h)(x) = g(h(x)) = g x2 + 1 = (√ )2 = 2 .
2
x +1 +1 x +2
x2 + 3
(v) From part (i), (f ◦ g)(x) = .
x2 + 1
Hence ((f ◦ g) ◦ h)(x) = (f ◦ g)(h(x))
(√ )
= (f ◦ g) x2 + 1
(√ )2
x2 + 1 + 3
= (√ )2
x2 + 1 + 1
x2 + 4
= .
x2 + 2
4. (i) im f = {0, 1, 2, 3, 4}.
(ii) im f = {n2 : n ∈ Z} = {0, 1, 4, 9, 16, 25, 36, 49, . . .}.
(iii) im f = {capital cities of the world}.
(iv) im f = {∅, {a}}.
{ }
5. (iii) By definition, im f = {f (x) : x ∈ R} = 1/(x2 + 2) : x ∈ R .
1 1
For all x ∈ R, x2 + 2 ≥ 2, so 2 ≤ 12 . Also 2 > 0.
( 1] { x + 2 } x +2
Therefore im f ⊆ 0, 2 = x ∈ R : 0 < x ≤ 21 .
Conversely, if 0 < x ≤ 12 , then x1 ≥ 2, so x1 − 2 ≥ 0, in which case
√
x − 2 ∈ R.
1
(√ ) 1 1 1
Now f 1
− 2 = (√ )2 = (1 ) = = x,
x −2 +2
x 1/x
1
x − 2 + 2
so x ∈ im f.
{ }
Hence x ∈ R : 0 < x ≤ 12 ⊆ im f.
( ] { }
Therefore im f = 0, 12 = x ∈ R : 0 < x ≤ 21 .
{√ }
(v) By definition, im f = {f (x) : x ∈ R} = x2 + 1 : x ∈ R .
√
For all x ∈ R, x2 + 1 ≥ 1, so x2 + 1 ≥ 1; hence
im f ⊆ {x ∈ R : x ≥ 1}.
√
Conversely, if x ≥ 1, then x2 − 1 ≥ 0, so x2 − 1 ∈ R and
(√ ) √(√ )2 √ √
f x2 − 1 = x2 − 1 + 1 = (x2 − 1) + 1 = x2 = x,
Exercises 3.5
f (x) = f (y) ⇒ 1
2x − 7 = 12 y − 7 ⇒ 1
2x = 21 y ⇒ x = y,
so f is injective.
(b) Let y ∈ R. Let x = 2y + 14 ∈ R. Then
so f is surjective.
(iii) (a) f (0) = |0−1| = |−1| = 1 and f (2) = |2−1| = 1, so f (0) = f (2);
hence f is not injective.
(b) Let y ∈ R≥0 . Let x = y + 1. Then x ∈ R≥0 and
Hence f is surjective.
(vi) (a) f is not injective. For example, f (2) = 1 = f (3) but 2 ̸= 3.
(b) Let m ∈ Z. Then n = 2m ∈ Z is even so
2m
f (n) = f (2m) = = m.
2
Therefore f is surjective.
(ix) (a) f ({1, 2, 3}) = {1, 2, 3} ∩ {1, 2} = {1, 2} and
f ({1, 2, 4}) = {1, 2, 4} ∩ {1, 2} = {1, 2}.
Therefore f ({1, 2, 3}) = f ({1, 2, 4}) but {1, 2, 3} =
̸ {1, 2, 4}, so
f is not injective.
(b) For all X ∈ A, we have f (X) = X ∩ {1, 2} ⊆ {1, 2}.
Hence there is no X ∈ A such that f (X) = {2, 3}, for example.
Therefore f is not surjective.
2. (i) Surjective but not injective.
(iii) Neither injective nor surjective.
(v) Injective and surjective.
3. (ii) (a) For all x, y ∈ R − {−1},
3x 3y
f (x) = f (y) ⇒ =
x+1 y+1
⇒ 3xy + 3x = 3xy + 3y
⇒ 3x = 3y
⇒ x = y.
Therefore f is injective.
348 Understanding Mathematical Proof
Therefore f is surjective.
(c) The inverse function is
y
f −1 : R − {3} → R − {−1}, f −1 (y) = − .
y−3
Therefore f is injective.
(b) Let (a, b) ∈ R2 .
Define x = 21 (a + 1) and y = 15 (b − 3). Then (x, y) ∈ R2 and
( )
f (x, y) = f 12 (a + 1), 15 (b − 3)
( )
= 2 × 21 (a + 1) − 1, 5 × 15 (b − 3) + 3
= ((a + 1) − 1, (b − 3) + 3)
= (a, b).
Therefore f is surjective.
(c) The
( 1 inverse function
) is f −1 : R2 → R2 , f −1 (a, b) =
2 (a + 1), 5 (b − 3) .
1
Chapter 4
Exercises 4.1
Exercises 4.2
Exercises 4.3
1. (iii) Proof. Let x and y be real numbers. There are two cases to consider:
|x| ≥ |y| and |x| < |y|.
From the triangle inequality for the modulus function, we have
|x| = |(x − y) + y| ≤ |x − y| + |y|.
Hence |x| − |y| ≤ |x − y|. (1)
Swapping the roles of x and y in (1) gives
|y| − |x| ≤ |y − x| = |x − y|. (2)
We can now consider the two cases.
Case A: |x| ≥ |y|.
In this case, ||x| − |y|| = |x| − |y| ≤ |x − y| from (1).
Case B: |x| < |y|.
In this case, ||x| − |y|| = − (|x| − |y|) = |y| − |x| ≤ |x − y| from (2).
Hence, in both cases, ||x| − |y|| ≤ |x − y|.
2. (iii) Proof. Let ε > 0.
{ ε}
Let δ = min 1, .
14
Then 0 < |x + 2| < δ
ε
⇒ |x + 2| < 1 and |x + 2| <
14
Hints and Solutions to Selected Exercises 351
4. (i) Proof. We need to show that d satisfies the conditions (M1), (M2),
and (M3) of definition 4.1.
(M1) Let x, y ∈ X. By definition, d(x, y) ≥ 0 and d(x, y) = 0 ⇔
x = y.
Hence d satisfies (M1).
(M2) Let x, y ∈ X.
If x = y, then d(x, y) = 0 = d(y, x).
If x ̸= y, then d(x, y) = 1 = d(y, x).
Hence d satisfies (M2).
(M3) Let x, y, z ∈ X. We consider five cases.
Case A: x = y = z.
Then d(x, z) = 0 = 0 + 0 = d(x, y) + d(y, z).
Case B: x = y ̸= z.
Then d(x, z) = 1 = 0 + 1 = d(x, y) + d(y, z).
Case C: x ̸= y = z.
Then d(x, z) = 1 = 1 + 0 = d(x, y) + d(y, z).
Case D: x ̸= y, y ̸= z but x = z.
Then d(x, z) = 0 < 1 + 1 = d(x, y) + d(y, z).
Case E: x ̸= y, y ̸= z and x ̸= z.
Then d(x, z) = 1 < 1 + 1 = d(x, y) + d(y, z).
In each case d(x, y) + d(y, z) ≥ d(x, z), so d satisfies (M3).
Since d satisfies the three conditions (M1), (M2), and (M3), it is a
metric on X.
{
{a} if 0 ≤ r < 1
(ii) B(a, r) =
X if r ≥ 1.
Exercises 4.4
1. Γ (P ⇒ Q) assumption
2. Γ assumption
3. P assumption
4. P ⇒Q from 1 and 2.
5. Q from 3, 4: Modus ponens in propositional logic
6. Γ, P Q 2, 3, 5: Q has been deduced from Γ, P
1. Γ ¬Q assumption
2. Γ, P Q assumption
3. Γ assumption
4. Γ (P ⇒ Q) from 2 by Conditional rule
5. P ⇒Q from 3 and 4.
6. ¬Q ⇒ ¬P from 5 by Equivalence rule
7. ¬Q from 1 and 3.
8. ¬P from 6, 7: Modus ponens in propositional logic
9. Γ ¬P 3, 8: ¬P has been deduced from Γ
Chapter 5
Exercises 5.1
1, 2, . . . , p, p + 1, p + 2, . . . , 2p, 2p + 2, . . . , 3p, . . . p2
354 Understanding Mathematical Proof
which are divisible by p are p, 2p, 3p, . . . , p2 . There are p such inte-
gers.
Hence ϕ(p2 ) = p2 − p = p(p − 1).
αk
(iv) Proof. Let n = pα 1 α2
1 p2 . . . pk be the prime factorisation of n.
αk
Any pair of the terms p1 , pα
α1
2 , . . . , pk are coprime. By the gen-
2
( ) ( ) ( )
1 1 1
= p1 1 −
α1
p2 1 −
α1
. . . pk 1 −
αk
p1 p2 pk
( )( ) ( )
1 1 1
= pα
1
1 α1
p2 . . . p αk
k (1 − (1 − . . . 1 −
p1 p2 pk
( )( ) ( )
1 1 1
= n 1− 1− ... 1 − .
p1 p2 pk
As noted in the proof of theorem 5.3, the first term that p divides
is p!.
In a similar way, p2 does not divide any of the terms (p + 1)!, (p +
2)!, . . . , (2p − 1)!. However, p2 does divide
(2p)! = 1 × 2 . . . × p × (p + 1) × . . . × (2p).
(iii) k 1 2 3 4 5 6 7 8 9 10
k
2 2 4 8 16 32 64 128 256 512 1024
S(2k ) 2 4 4 6 8 8 8 10 10 12
Exercises 5.2
Therefore f is injective.
Now let y ∈ R − {3}.
y
Define x = − . Then x ∈ R − {−1} and
y−3
( )
y 3 × −y/(y − 3) −3y −3y
f (x) = f − = = = = y.
y−3 −y/(y − 3) + 1 −y + (y − 3) −3
Therefore f is surjective.
Hence f is a bijection.
(v) Proof. For all (x, y), (a, b) ∈ R2 ,
Therefore f is injective.
Let (a, b) ∈ R2 .
Define x = 21 (a + 1) and y = 15 (b − 3). Then (x, y) ∈ R2 and
( )
f (x, y) = f 21 (a + 1), 15 (b − 3)
( )
= 2 × 12 (a + 1) − 1, 5 × 15 (b − 3) + 3
= ((a + 1) − 1, (b − 3) + 3)
= (a, b).
Therefore f is surjective.
Hence f is a bijection.
9. (iii) Proof. Let x ∈ C. Then f (x) ∈ f (C) by the definition of f (C).
Hence x ∈ f −1 (f (C)) by the definition of f −1 (D) with D = f (C).
We have shown that x ∈ C ⇒ x ∈ f −1 (f (C)). Therefore C ⊆
f −1 (f (C)).
(iv) Proof. Suppose that f is injective.
By part (iii), we only need to prove that f −1 (f (C)) ⊆ C.
Let x ∈ f −1 (f (C)). Then f (x) ∈ f (C) by the definition of f −1 (D)
with D = f (C).
By the definition of f (C), this means that f (x) = f (x′ ) for some
x′ ∈ C. But f is injective, so x = x′ , which means that x ∈ C.
We have shown that x ∈ f −1 (f (C)) ⇒ x ∈ C. Therefore
f −1 (f (C)) ⊆ C.
10. (ii) The required functions are defined by g(x) = 12 (f (x) + f (−x)) and
h(x) = 12 (f (x) − f (−x)).
Exercises 5.3
11. For each part, use the Subspace Test, theorem 5.12.
Exercises 5.4
⌊ ⌋
19
1. (ii) Proof. Given ε > 0, let N = .
16ε
Then
19
n>N ⇒ n>
16ε
3
n + 3n 1 4(n3 + 3n) − (4n3 + 7n2 )
⇒ 3 − =
4n + 7n2 4 4(4n3 + 7n2 )
−7n2 + 12n
=
16n3 + 28n2
7n2 + 12n
≤
16n3 + 28n2
7n2 + 12n2 19
≤ 3
= < ε.
16n 16n
n3 + 3n 1
Hence lim = as claimed.
n→∞ 4n3 + 7n2 4
2. Proof. Let (an ) be a convergent sequence with lim an = ℓ and let
n→∞
λ ∈ R.
If λ = 0, then (λan ) is the constant sequence with values 0. Hence (λan )
converges to limit 0 = λℓ.
360 Understanding Mathematical Proof
So suppose λ ̸= 0.
Let ε > 0.
ε
Then > 0 and, since lim an = ℓ, there exists N ∈ Z+ such that
|λ| n→∞
ε
n > N ⇒ |an − ℓ| < .
|λ|
Chapter 6
Exercises 6.1
Exercises 6.2
Conversely, suppose that f (C1 ∩C2 ) = f (C1 )∩f (C2 ) for all subsets
C1 and C2 of A. We need to show that f is injective.
Let x1 , x2 ∈ A. Then
364 Understanding Mathematical Proof
f (x1 ) = f (x2 )
⇒ f (x1 ) ∈ f ({x1 }) and f (x1 ) ∈ f ({x2 })
⇒ f (x1 ) ∈ f ({x1 }) ∩ f ({x2 })
⇒ f (x1 ) ∈ f ({x1 } ∩ f {x2 })
since f ({x1 }) ∩ f ({x2 }) = f ({x1 } ∩ f {x2 })
⇒ {x1 } ∩ f {x2 } ̸= ∅
⇒ x1 = x2 .
Hence f is injective.
5. (ii) Proof.
(⇒) Suppose that f : A → B is an increasing function and α ∈ R+ .
Let x, y ∈ A be such that x < y. Then
f (x) ≤ f (y) (since f is increasing)
⇒ αf (x) ≤ αf (y) (since α > 0).
Therefore αf is increasing.
(⇐) Suppose that αf : A → B is an increasing function where
α ∈ R+ .
Let x, y ∈ A be such that x < y. Then
αf (x) ≤ αf (y) (since αf is increasing)
⇒ f (x) ≤ f (y) (since α > 0).
Therefore f is increasing.
Exercises 6.3
1. (ii) Proof. If α and β are the roots of x2 + ax + b = 0, then
x2 + ax + b = (x − α)(x − β) = x2 − (α + β)x + αβ.
If α and β are odd integers, then their sum α + β = a is even and
their product αβ = b is odd.
(iii) Proof. Firstly,
−1 ≤ x ≤ 4 ⇒ −4 ≤ x − 3 ≤ 1
⇒ 0 ≤ (x − 3)2 ≤ 16
⇒ 0 ≤ x2 − 6x + 9 ≤ 16
⇒ −9 ≤ x2 − 6x ≤ 7.
Exercises 6.4
1. (i) Proof. Let x be rational and y be irrational.
Suppose that x + y is rational. Then y = (x + y) − x is the dif-
ference of two rational numbers, which is therefore rational. This
contradicts the fact that y is irrational.
Therefore x + y is irrational.
Hints and Solutions to Selected Exercises 367
m m−1 m2 − (m + 1)(m − 1)
− =
m+1 m m(m + 1)
m2 − (m2 − 1) 1
= = > 0.
m(m + 1) m(m + 1)
m m−1
Hence > .
m+1 m
m m−1
In other words, is an element of A that is greater than ,
m+1 m
which is therefore not the largest element of A.
Hence A has no largest element.
368 Understanding Mathematical Proof
Exercises 6.5
2. Proof.
(⇒) Suppose that G is Abelian.
Let g, h ∈ G. Then
Therefore G is Abelian.
(ii) if b > m, then b is not a lower bound for X; if b > m then, there
exists x ∈ X such that x < b
is called a infimum or greatest lower bound for X; it is denoted
m = inf X.
x−1
6. (i) Proof. First note that, for all x ∈ R+ , x − 1 < x, so < 1.
x
Hence 1 is an upper bound for X.
1
Now let a < 1. Then > 0.
1−a
Since there is no smallest positive real number (compare with ex-
a
ercise 6.4.7), there exists x ∈ R+ such that x < . Hence
1−a
a
x< ⇒ x(1 − a) < 1 (since a − 1 > 0)
1−a
⇒ x − ax < 1
⇒ x − 1 < ax
x−1
⇒ <a (since x > 0).
x
In other words, there exists an element (x − 1)/x ∈ X that is less
than a. Hence a is not an upper bound for X.
Therefore sup X = 1.
(v) Proof. Let x ∈ X. Then x = m/n for some m, n ∈ Z+ such that
m < 2n. Hence x < 2. Therefore 2 is an upper bound for X
1
Now let a < 2. Then 2−a > 1. Choose n ∈ Z+ such that n > .
2−a
Then
1 1 1 2n − 1
n> ⇒ 2−a> ⇒ a<2− =
2−a n n n
2n − 1
where ∈ X.
n
Therefore a is not an upper bound for X.
Hence sup X = 2.
Chapter 7
Exercises 7.1
1. (iii) 73 = 32 + 82 and 74 = 52 + 72 .
370 Understanding Mathematical Proof
√ √ √
(vi) Both 1 + 2 and (1 + 2)2 = 3 + 2 2 are irrational.
(ix) 1729 = 13 + 123 = 93 + 103 .
(xi) Proof. Let n be an odd positive integer.
Then n = 2k + 1 for some k ∈ N. Hence n2 = (2k + 1)2 = 4k 2 +
4k + 1 = 4k(k + 1) + 1.
Now k(k + 1) is even — see theorem 1.2. Hence k(k + 1) = 2m for
some m ∈ N.
Therefore n2 = 4k(k + 1) + 1 = 8m + 1 for some m ∈ N.
2. Try to construct examples where A, B, and C are small finite sets (at
most three elements) and the functions f and g are defined by specifying
explicitly the image of each element.
( )
−1 0
3. (ii) For example, A = .
0 1
( ) 1 1
1 0 −1
(iv) For example, A = and B = 1 0.
2 −2 −1
0 1
Then AB = I2 but BA ̸= I3 .
5. The group S(△), defined in example 5.4.4, is a suitable example to
establish parts (i), (ii), and (vi).
Exercises 7.2
Since there are n2 + 1 points placed in the (large) square and there
are only n2 small squares, there must be a small square that
√ con-
tains two points. These two points are no more than 2 units
apart.
10. (ii) If a pair of dice is rolled, there are 11 possible scores: 2, 3, . . . , 12.
Since 45 > 4 × 11, if a pair of dice is rolled 45 times, there must be
one score that occurs at least 5 times by the Generalised Pigeonhole
Principle.
12. (iii) Proof. Let f and g be two functions, each continuous on [a, b], with
the property that f (a) < g(a) and f (b) > g(b).
Let h be the function h = f − g defined on [a, b]; in other words
h(x) = f (x) − g(x) for all x ∈ [a, b].
Then h is continuous on [a, b], h(a) = f (a) − g(a) < 0 and h(b) =
f (b) − g(b) > 0. Therefore, by the Intermediate Value Theorem,
there exists c ∈ (a, b) such that h(c) = 0. Hence f (c) = g(c).
Exercises 7.3
Exercises 7.4
√ √
1. (ii) Proof. Assuming the existence of a as a real number, then x = a
is a solution of x2 = a.
Suppose that x and y are both positive real numbers such that
x2 = a and y 2 = a. Then
x2 = y 2 ⇒ x2 − y 2 = 0 ⇒ (x + y)(x − y) = 0.
Now x + y > 0, so x − y = 0 so x = y.
Hence x2 = a has a unique positive solution.
ds − bt at − cs
2. Proof. First let x = and y = .
ad − bc ad − bc
a(ds − bt) + b(at − cs) ads − bcs
Then ax + by = = =s
ad − bc ad − bc
c(ds − bt) + d(at − cs) −bct + adt
and cx + dy = = = t.
ad − bc ad − bc
Hints and Solutions to Selected Exercises 373
( )
ds − bt at − cs
Hence (x, y) = , is a solution to the simultaneous
ad − bc ad − bc
equations.
For the uniqueness part, suppose that (x, y) and (x′ , y ′ ) are solutions to
the simultaneous equations. In other words,
ax + by = s (1) ax′ + by ′ = s (3)
and
cx + dy = t (2) cx′ + dy ′ = t (4).
Subtracting equation (3) from equation (1) and subtracting equation (4)
from equation (2) gives:
9. (i) Proof. Clearly x = 0 is such that |x| < ε for all ε > 0, ε ∈ R.
|x|
Suppose x ̸= 0. Then |x| > 0. Let ε = . Then ε > 0 and |x| > ε.
2
Hence x = 0 is the only real number that satisfies |x| < ε for all
ε ∈ R+ .
(ii) Proof. Let (an ) be a convergent sequence and suppose that
lim an = ℓ and lim an = ℓ′ .
n→∞ n→∞
Let ε > 0, ε ∈ R.
Then ε/2 > 0, so as lim an = ℓ, there exists N1 ∈ Z+ such that
n→∞
374 Understanding Mathematical Proof
Chapter 8
Exercises 8.1
1 2 k−1 k 1 k
+ + ··· + + = 1− +
2! 3! k! (k + 1)! k! (k + 1)!
k+1 k
= 1− +
(k + 1)! (k + 1)!
1
= 1−
(k + 1)!
1 × 3 × 5 × · · · × (2k − 1) × (2k + 1)
(2k)!
= × (2k + 1)
2k k!
(2k)! × (2k + 1) × (2k + 2)
=
2k k! × (2k + 2)
(2k + 2)!
= k
2 k! × 2(k + 1)
(2(k + 1))!
= k+1 .
2 (k + 1)!
1 × 3 × 5 × · · · × (2n − 1)
1 × 2 × 3 × 4 × 5 × · · · × (2n − 1) × (2n)
=
2 × 4 × 6 × · · · × (2n)
(2n)!
= n
2 (1 × 2 × 3 × · · · × n)
(2n)!
= n .
2 n!
(k + 1)3 − (k + 1) = (k 3 + 3k 2 + 3k + 1) − (k + 1)
= k 3 − k + 3(k 2 + k)
= 6a + 3k(k + 1) (by inductive assumption).
8. For the inductive step, note that adding the (k + 1) st row at the bottom
of the large triangle adds 2k + 1 additional small triangles. Then use the
inductive hypothesis and (k + 1)2 = k 2 + (2k + 1).
22(k+1) − 1 = 22 × 22k − 1
= 4(3a + 1) − 1 (by inductive assumption)
= 3 × 4a + 3
= 3(4a + 1) where 4a + 1 ∈ Z.
Then
Ak+1 = AAk
( )( )
1 0 1 0
= (by inductive assumption)
−1 2 1 − 2k 2k
( )
1 0
=
−1 + 2(1 − 2k ) 2 × 2k
( )
1 0
= .
1 − 2k+1 2k+1
Exercises 8.2
3 8 15 k2 − 1 k+1
× × × ··· × = ,
4 9 16 k2 2k
where k ≥ 2; this is the inductive hypothesis.
(k + 1)2 − 1
The next term on the left-hand side is . Multiplying both
(k + 1)2
380 Understanding Mathematical Proof
3 8 k 2 − 1 (k + 1)2 − 1 k + 1 (k + 1)2 − 1
× × ··· × × = ×
4 9 k2 (k + 1)2 2k (k + 1)2
2
k+1 k + 2k
= ×
2k (k + 1)2
k + 1 k(k + 2)
= ×
2k (k + 1)2
k+2
= .
2(k + 1)
This is the result for n = k + 1 and hence completes the inductive step.
n2 − 1 n+1
Therefore, for all n ∈ Z+ , 3
4 × 8
9 × 15
16 × ··· × = , by
n2 2n
induction.
(inductive assumption)
= 10 × 3k − 15 × 2k − 4 × 2k + 9 × 2k
= 6 × 3k − 6 × 2k
= 2 × 3k+1 − 3 × 2k+1 .
Hence ak+1 satisfies the given formula. This completes the inductive
step.
Therefore, an = 2 × 3n − 3 × 2n for all n ≥ 2, by induction.
a1 = p1 p2 . . . ps and a2 = q1 q2 . . . qt
a = a1 a2 = p1 p2 . . . ps q1 q2 . . . qt .
|A| = 1 and B ⊂ A it follows that B = ∅, so |B| = 0 < 1 = |A| and the result holds for
n = 1.
Hints and Solutions to Selected Exercises 383
Inductive step. Suppose that, for all sets A with |A| = k, if B ⊂ A, then
|B| < |A|.
Let A be a set with cardinality |A| = k + 1 and let B ⊂ A.
If B = ∅, then |B| = 0 < k + 1 = |A|.
Otherwise choose an element b ∈ B. Then B ′ = B−{b} is a proper subset
of A′ = A − {b}, B ′ ⊂ A′ . But |A′ | = |A| − 1 = k so, by the inductive
hypothesis, |B ′ | < |A′ |. Therefore |B| = |B ′ | + 1 < |A′ | + 1 = |A|. This
completes the inductive step.
Therefore, for all finite sets A and B, if B ⊂ A, then |B| < |A|, by
induction.
Bibliography
[1] A. Cupillari. The Nuts and Bolts of Proof, 4 th edition. Elsevier Academic
Press, 2013.
[2] P.J. Eccles. An Introduction to Mathematical Reasoning: Numbers, Sets
and Functions. Cambridge University Press, 1997.
[3] J. Fauvell and J. Gray. The History of Mathematics: A Reader. Palgrave
Macmillan, 1987.
[4] J. Franklin and A. Daoud. Proof in Mathematics: An Introduction. Key
Books, 2010.
[5] R. Garnier and J. Taylor. 100% Mathematical Proof. John Wiley & Sons,
1996.
[6] R. Garnier and J. Taylor. Discrete Mathematics: Proofs, Structures and
Applications, 3 rd edition. Taylor and Francis, 2010.
[7] G.H. Hammack. Book of Proof, 2 nd edition. Creative Commons, 2013.
[8] G.H. Hardy. Mathematical proof. Mind, pages 1–25, 1929.
[9] G.H. Hardy. A Mathematician’s Apology (reprinted edition). Cambridge
University Press, 2012.
[10] S.-J. Shin. The Logical Status of Diagrams. Cambridge University Press,
1994.
[11] A.B. Slomson. Mathematical proof and its role in the classroom. Math-
ematics Teaching, 155:10–13, 1996.
[12] D. Solow. How to Read and Do Proofs: An Introduction to Mathematical
Thought Processes, 5 th edition. John Wiley & Sons, 2010.
[13] D. Tall. Thinking through three worlds of mathematics. Proceedings
of the 28th Conference of the International Group for the Psychology of
Mathematics Education, Bergen, Norway, pages 281–288, 2004.
[14] D.J. Vellerman. How to Prove It: A Structures Approach, 2 nd edition.
Cambridge University Press, 2006.
385
Index
387
388
intersection, 9 3 , 94 Tautology, 32
power set, 99, 1 8 9 , 1 0 2 T h e o r e m , 5 , 166-168
solution set, 8 5 denseness of rational n u m b e r s ,
subset, 8 1 , 2 2 3 273
superset, 8 1 Euclid's theorem on primes, 258
symmetric difference, 102, 199, existence of irrationals, 281
255, 256 in an axiom system, 167, 168
union, M , 95 Intermediate value, 286
universe, 86 prime factorisation, 132, 162,
Shoes and socks theorem 318, 32Q
for groups, 207 Shoes and Socks, 207
Simple proposition, 1 8 Totient function, see Euler's phi func
Simplification deduction rule, OR tion
S m a r a n d a c h e function, 184 Transitive property of subset, 193
Smarandache, Florentin, 184 Transpose, of a m a t r i x , 294
Soundness, of propositional logic, 6£ Triangle inequality
Sphere, 157 metric space, 155
Sphere metric, 153 m o d u l u s function, 146, 231, 234
Statement, 3 T r u t h table, 1 7 - 2 1 , 23-26
Subgroup, 225, 276, 294 biconditional, 2 3
intersection, 225 conditional, 2 1
Subset, 87, 223 conjunction, 18
counting theorem, 280 disjunction, 1£), 2Q
transitive property, 193 negation, IS.
Subspace(s) of a vector space, 215, T r u t h value, lfi
260 Two-place predicate, 56
direct sum, 251
intersection, 219 Undefined t e r m , 162
sum, 225, 261 Union, of sets, 94, 95
test for, 218, 2m Universal generalisation
Substitution instance, 3 2 principle, 137, 141^ 145, 241
Sufficient condition, 2 2 , 2 3 , 247 Universal quantifier, 49
Superset, 87 Universal set, 86
S u p r e m u m , 264^ 300 Universe of discourse, 54
Surjection, see surjective function Upper b o u n d , 263
Surjective function, 117, 144, 194,
197, 244, 275, 290 Valid argument
horizontal line test, 121 in predicate logic, 1 5
Symmetric difference, of sets, 102, in propositional logic, 7 1
255^256 Vector space(s), 2 1 1 , 215, 218, 219,
Symmetric m a t r i x , 294 225, 251, 260, 261, 2 9 1
Symmetries, 203 subspace, 215, 260, 294
composition, 203 direct sum, 251
of a rectangle, 203 intersection, 219
of an equilateral triangle, 205 sum, 2 2 5 , 261
394
Features
• Presents a rigorous yet accessible introduction to one of the defining
concepts of mathematics
• Explores the structure of mathematical proof
• Classifies different types of proof
• Develops all the standard techniques for proving mathematical
theorems
• Provides hints and guidance on finding the appropriate proof
• Includes many elementary examples and, in addition, develops
proofs in linear algebra, group theory, and real analysis that will be of
Taylor • Garnier John Taylor
particular interest to undergraduate mathematicians
Rowan Garnier
K15018