Every infinite set met so far has turned out to be
countable: ,
, , finite products of
countable sets, countable unions of them (Theorem 3.3.3),
and even the algebraic numbers (Theorem 3.3.4).
Is every infinite set countable? This section shows that
the answer is no, by one argument used three times.
Given any list, it builds an object that the list
misses. The argument proves that the set of 0–1
sequences is uncountable, that no set can be mapped onto
the set of its subsets (Cantor’s theorem), and, with
decimals, that
is uncountable.
A sequence
that is not on the list
Recall from Section 1.4 that is the set
of all functions : the sequences of zeros and ones,
indexed from . It
is infinite, and it looks no bigger than , which is
countable. To show that it is not
countable we must show, by Definition 3.2.1,
that it is non-empty and that no
function is onto. So we take an arbitrary
list of sequences and look for a sequence that
is not on it.
Write the list as a table: row is the sequence , and the entry in
row and column
is the number
. Here is
the start of one such table, with the entries in places
boxed:
The boxed entries run down the
diagonal of the table. The bottom row
is the diagonal
with every entry flipped: . It
cannot be row ,
because it differs from in place ; it cannot be row , because it differs
from in place
; and so on down
the table. Nothing in this reasoning used the particular
entries.
Theorem
3.4.1 (The 0–1 Sequences Are
Uncountable)
The set of all sequences of zeros and ones is
uncountable.
Proof. Let be any function. Define
by its values lie in , since and . So . For
every ,
,
since no has . Hence : if , then , which is false; the two functions
differ at place
[,
;
Proposition 1.4.1].
So is not a value
of , and is not surjective.
Since was
arbitrary, no function is surjective. The set is
non-empty, since it contains the zero sequence. By Definition 3.2.1,
is
not countable.
This is the move of the section, and it has a
name.
The diagonal. Given any list,
build an object that differs from the -th entry at the -th place. The new
object is not on the list, because it disagrees with
every entry somewhere, and the place of disagreement is
chosen by the entry’s own position.
Quick check. Run the proof on the
list , the sequence with a in place and elsewhere. What is
? Is it on the
list?
Solution. Here for every , so for
every : is the zero sequence.
It is indeed not on the list, since every has a in place .
Warning. The diagonal
object depends on the list. “The diagonal
sequence” is not one sequence: each list has its own,
and a different list may well contain the built from this one
(the list does). And the conclusion “uncountable”
needs the list to be arbitrary. Running
the construction on one list, or on a few, shows only
that those lists miss something; concluding “so no list
works” from them is the error (N1) of Logic and Proof, Example (What is not allowed).
The proof above starts from “let be any
function”, and that is what makes its conclusion
universal.
Cantor’s
theorem
The table had a row for each and a column
for each place . Nothing about the diagonal needs the rows
and the columns to be indexed by : it needs only that
they are indexed by the same set. A
subset of a set
is a row with one
entry for each , “in” or “out”, the values of . So the argument
applies to any set and the set of its subsets.
Theorem
3.4.2 (Cantor’s Theorem)
Let be a set.
Then there is no surjection .
Try it first (ten minutes): given a function
, which subset of could be missed by
? Try with a
function of your own first.
Idea. The first attempts look for a
subset that is “too big” or “too small” to be a value,
such as itself or
, and
fail: may well
take both values. Size is the wrong idea. A set differs from as soon as the two
disagree about one element, and the
only element we know anything about in connection with
is itself. So we make
disagree with
at : put into exactly when . This is
the diagonal of the table, flipped.
Before reading on: where is surjectivity
used?
Proof. Let be a function, and let a subset of by Definition 1.1.3,
so (Definition 1.2.2).
Suppose is
surjective. Then there is with (Definition 1.4.4).
If , then
by
the definition of , that is, , a
contradiction. Hence . Then , and since , the definition
of gives , a contradiction
again. So is not
surjective. This proves the theorem.
Surjectivity was used once, to obtain ; everything else holds
for every function . Read without the
supposition, the proof shows that for
every : the two sets disagree about . Three consequences
follow.
(i) Russell’s
theorem is the same argument. In Theorem 1.1.4,
the set is the set built from the rule
:
each is
tested against itself. The proof that differs from every
becomes the
proof that
differs from every element of , that is, . (The rule
need
not map into , but the
argument never used that , only
the test “”.)
(ii) The
power set is strictly bigger. The map is an
injection , since gives . So has at least
as many elements as , in the sense that
is in bijection
with a subset of it, and by the theorem it is not
equinumerous with , since a bijection
would be a surjection. Section 3.5 names this relation:
is strictly
smaller than .
(iii) There
is no largest size. , , ,
…: each set in this sequence is strictly bigger than the
one before.
Corollary
3.4.3 (The Subsets of the Naturals)
The power set is
uncountable.
Proof. The set is
non-empty, since , and by Theorem 3.4.2
with there
is no surjection . By Definition 3.2.1,
is
not countable.
The two diagonal proofs are one. By the
correspondence of Section 1.4, is a
bijection , with inverse (Theorem 1.5.4).
Given , the sequence
of Theorem 3.4.1
is exactly when
, so
for the
set of Cantor’s
proof.
Decimal
expansions
The real numbers should be next. A real number in
is written
as a decimal , a sequence of digits, so the diagonal
suggests itself: list the numbers, write their decimals
as the rows of a table, and change the diagonal digits.
Two questions must be answered first. What does it
mean that a sequence of digits is the
decimal of ? And
what is ? School says
it equals , and a
diagonal that produces when is on the
list has produced a number that is on the list.
An infinite sum would answer the first question, but
this book has not yet defined one. Finite sums are
enough. The first
digits of should
pin down to
within .
A digit sequence is a decimal of when each of its finite
truncations is within one unit of its last place below
.
Definition
3.4.1 (Decimal Expansion)
A digit sequence is a function from to . For
let (Definition 2.3.1),
where (Definition 2.3.2).
The digit sequence is a decimal
expansion of if for every ,
In words: is
the number written with the first digits, , and the
condition says that lies in the closed
interval of length starting at , for every . The digits are indexed
from , so that
is the digit in
the -th place
after the point. No infinite sum appears: every is a finite sum.
Examples.
- Zero. The all-zero sequence has , and ; it
is an expansion of .
- One half, twice. The sequence has for every
, and . The sequence has , by Proposition 2.3.6,
so . Both are expansions of .
- One. The all-nine sequence has (Proposition 2.3.6),
so : it is an expansion of .
A non-example by minimal change.
Keep the sequence and move from to . The inequalities
still hold for () and for (), and they fail at : .
So
is not an expansion of ; the clause “for
every ” is
what fails.
Why this definition. Both
inequalities are non-strict. With a strict right
inequality, , the all-nine sequence would be an
expansion of no number at all: it would need together with
for every , and no
real number satisfies both, by the Archimedean property
(a school fact; Analysis on the Real Line,
Chapter 1 proves it). The non-strict form is what makes
true, and true by the definition: the
inequalities for are checked in Example 3, and no other number
satisfies them, since for every forces , again by the
Archimedean property (this is the uniqueness half of
(D2) below). Example 2 shows that the price is two
expansions for some numbers.
What this book does not prove are the facts that make
expansions behave as school says. We state them once and
use them in this section and the next, always by
name.
- (D1) Every has a
decimal expansion that does not end in
all s.
- (D2) Every digit
sequence is a decimal expansion of exactly
one .
- (D3) If two
different digit sequences are
expansions of the same , then one of them ends
in all s and the
other ends in all s.
Here a digit sequence ends in all s if there is
with for every , and likewise for
s. By the
uniqueness in (D2), we may write
for “ is the
number of which is an expansion”. So , as in (D3).
Neither (D1) nor (D2) follows from what we have so
far. (D3) does, by a finite computation at the first
place where the two sequences differ (Theorem 2.1.3,
Proposition 2.3.6);
we state it with the others to quote it by name. The
existence half of (D2), that some satisfies all the
inequalities at once, is where the completeness of hides, and
Analysis on the Real Line, Chapter 1 takes
completeness as an axiom. The
uniqueness half of (D2) and the “not
ending in all s”
of (D1) rest on the Archimedean property: two numbers
with
for every must be equal, which
Analysis on the Real Line, Chapter 1 also
proves. Until then we use them as school facts, and each
use names the fact it uses.
One consequence is used below. A digit sequence
with no digit and
no digit is the
only expansion of its number.
Indeed, by (D3) a second expansion of the same number
would force one of the two to end in all s and the other in all
s; the given
sequence ends in neither, since it has no s and no s at all.
The real
numbers are uncountable
With the facts in hand, the diagonal runs on digits.
Two precautions are built in. Each number on the list
gets its expansion by a rule, so that
no choosing is needed. And the new digits avoid and , so that the new number
has only one expansion.
Theorem
3.4.4 (The Reals Are Uncountable, by
Decimals)
The interval is uncountable. Hence is uncountable.
Idea. Take an arbitrary list of
numbers in ,
write each as its expansion with no tail of s, and change the -th digit of the -th number to or . The resulting digit
sequence is an expansion of some , by (D2). If were the -th number, it would
have two different expansions, one with no s or s, against (D3).
Proof. Let
be any function. For let , so that the list has
the same values as .
For each , has
an expansion not ending in all s, by (D1), and only
one: by (D3), two different such expansions would
include one ending in all s. Let be
this expansion. It is named by a rule, “the expansion of
not ending in
all s”, so no
choice is involved. Define a digit sequence by Then for every . By (D2), there is of which
is
an expansion. Its first truncation is , so , and in
particular .
Let , and
suppose .
Then and
are both
expansions of ,
and they are different, since they differ in place . But has no digit and no digit , so by the consequence
of (D3) stated above it is the only
expansion of , a
contradiction. So for every , and
is not a value of . Since was arbitrary, no
function is surjective; and is non-empty,
since it contains . By Definition 3.2.1,
is not
countable.
Finally, if
were countable, its subset would be countable
by Proposition 3.2.3.
So is
uncountable.
Why the digits and . The first
rule that comes to mind is , which also changes every diagonal
digit. Run it on the list , for (that is, and for ). The expansions
are
and , so
and
for
. The naive
rule produces and for : the sequence , which is an
expansion of by Example 2. The new digit sequence
differs from every row, and its number is on the list.
The rule with and
, on the same
list, gives , which is on no row. Avoiding
and is exactly what the
last paragraph of the proof uses.
Analysis on the Real Line, Chapter 1 proves
that is
uncountable again, with no decimals at all, directly
from its least upper bound axiom; that proof needs none
of (D1)–(D3).
Transcendental numbers
A real number that is not algebraic is called
transcendental. Section 3.3 showed that
the set of algebraic
numbers is countable (Theorem 3.3.4).
Corollary
3.4.5 (Transcendental Numbers Exist)
The set of transcendental numbers is
uncountable. In particular, there is a real number that
is not algebraic.
Proof. By excluded middle (Logic and Proof, Proposition 2.5.3),
every real number is in or not, so
. Suppose is countable. Since is countable
by Theorem 3.3.4,
is countable by
Proposition 3.2.5,
contradicting Theorem 3.4.4.
So is uncountable. In particular
, since is countable
(Definition 3.2.1).
So not every
satisfies : otherwise would be an empty set (Definition 1.1.4),
hence equal to (Proposition 1.1.3).
By the classical law Logic and Proof, Proposition 6.2.1
(a) and , some
lies in ; this is a real number that
is not algebraic. This last passage, from “not empty” to
“has an element”, is a classical step (Logic and
Proof, Section 8.7).
Exercises
A. Check your
understanding
Exercise
(A1)
These parts are about the proof of Theorem 3.4.2.
- (a) Where in the
proof is the surjectivity of used, and what does it
supply?
- (b) Run the proof on
and
,
,
.
What is ? Is a value of ?
- (c) State the idea
of the proof in two sentences.
- (d) Why does the
same argument not show that there is no surjection ?
Solution.
(a) It is used
once, right after
is defined: surjectivity supplies an element with . The two cases
and are then both
refuted. Everything before that line holds for every
function .
(b) Test each
against : , so ; , so ; , so . Hence . It is not a value of : the values are , , , and differs from about in each case (,
, ).
(c) Build the set
of those that are not in their
own image .
Then disagrees
with every
about the element , so it is not a value
of .
(d) The set is a
subset of , so it is a candidate
value only for a function into . For , the
argument (where the test makes sense at all) shows that is not a value of , but need not be an element
of , so nothing
contradicts surjectivity. Indeed is a surjection
; with the argument is
Russell’s, and shows only that is not an element
of (Theorem 1.1.4).
B. Practice
Exercise
(B1: A faded diagonal)
Let be
the set of all functions . Here is a proof that is uncountable,
with its last step left blank. Name the move, then
complete it.
Let be any function, and write , so
that is a list of elements of . Define by
. (Last step: ____________________.) Since
was arbitrary, no
function is surjective, and as is non-empty
(it contains the zero function), is not
countable.
Solution. The move is the
diagonal: is built to disagree
with the list’s -th entry in place . The last step: for
every ,
, so by Proposition 1.4.1
(two equal functions agree at ). Hence is not on the list:
is an element of
(its
values
are natural numbers) that is not a value of , and is not surjective.
Exercise
(B2)
Prove that the set of infinite
subsets of is
uncountable.
Exercise
(B3: Expansions of three numbers)
For each of , , , find
all decimal expansions of , checking the
inequalities of Definition 3.4.1
for each one you give, and say which of (D1)–(D3) each
case illustrates.
Solution. We use Proposition 2.3.6
with , after taking the constant factor
out of
the sum: .
. The
all-three sequence has , so . It is an expansion,
and it does not end in all s, as (D1) promises. It
ends in neither s
nor s, so by (D3)
no other expansion of exists. Answer:
only.
.
Example 2 after Definition 3.4.1
checks that and are
expansions. There are no others: if three different
expansions existed, two of them would both end in all
s or both not; but
by (D3), of two different expansions of one number, one
ends in all s and
the other in all s, and a sequence ending
in all s does not
end in all s (from
some place on, its digits would be both and ). Answer: exactly these
two, which illustrate (D3); the first is the one (D1)
promises.
. The
all-nine sequence is an expansion (Example 3).
Conversely, let be an expansion of
, and suppose
for some
. Since every
digit is at most ,
,
so , against the definition. So
every digit is .
Answer:
only. The all-nine sequence is an expansion of , an instance of the
existence half of (D2). Here (D3) has no second
expansion to compare. The case also shows why (D1) is
stated for
only: the one expansion of ends in all s.
C. Going deeper
Exercise
(C1: Exit check: Cantor)
Prove Theorem 3.4.2:
for every set ,
there is no surjection . Deduce that is
uncountable.
Solution. Let be a function, and let , a subset of , so .
Suppose is
surjective. Then for some . If , then by the definition of , a contradiction; so
. But
then
and , so
by the
definition of , a
contradiction. Hence is not surjective, and
since was
arbitrary, no surjection exists.
For : by
Definition 3.2.1,
is
countable only if it is empty or there is a surjection
. It is not empty, since , and the theorem excludes the
surjection. So is
uncountable.
Marking scheme. (10 points) - 2:
takes an arbitrary and either assumes it onto,
towards a contradiction, or sets out to show that it
misses a set. - 3: defines and notes that
it is a subset of . - 2: uses surjectivity
to obtain with
(or, in
the direct form, fixes an arbitrary ). - 2: refutes both
cases, and
(or
shows that and
disagree about
). - 1: the
deduction for , handling
both clauses of “countable”: non-empty, and no
surjection from . The direct form
(“ for
every , since they
disagree about ”)
earns the same points: 2 for the arbitrary , 3 for , 4 for the disagreement
at every , 1 for
the deduction. Fatal errors (0 for the step): (it may well be a value of ); checking the claim
for one particular and concluding for all,
as in (N1) of Logic and Proof, Example (What is not allowed)
(0 for the first step).
Exercise
(C2: Permutations of the naturals)
Prove that the set of all bijections is
uncountable.
Solution (Hint 1). Consider the
bijections that only swap and , for some of the
, and fix
every other number.
Solution (Hint 2). Such
bijections correspond to : the -th entry says whether
the pair
is swapped.
Solution. Every is for exactly one
pair with
and (Theorem 2.2.3
with divisor , the
quotient lying in as in the proof of Proposition 3.2.5).
For define
by so
swaps and when and fixes them
otherwise. It maps each pair to itself,
and applying it twice returns every number to its place,
so , and is a bijection by
Theorem 1.5.4.
Let be the set
of bijections ; it is non-empty, since . Let
be any function, and write .
Define by if , and
otherwise, and let . For every , : if
, then
and ; if
,
then and
. So
for
every (Proposition 1.4.1),
and is not
surjective. Since
was arbitrary and , is uncountable (Definition 3.2.1).
This is the diagonal again, with the -th entry tested at the
place .
Alternatively, is an injection ,
since is
or according to ; if were countable,
composing with an injection (Theorem 3.2.2)
would make countable, against Theorem 3.4.1.
Marking scheme. (10 points) - 3:
defines, for each (or each set of pairs), the bijection
that swaps and
exactly when
, and
proves it is a bijection. - 4: given an arbitrary list
of bijections, defines from the -th entry’s value at a
place belonging to the -th pair, and shows that
the resulting bijection differs from the -th entry; or shows that
is
injective. - 3: concludes, with the non-emptiness of the
set of bijections or through Theorem 3.4.1
and the closure properties of countable sets. Fatal
errors (0 for the step): the plain diagonal , which is not a bijection; a “bijection” that
moves numbers between different pairs without checking
that it stays one-to-one and onto.