Asking how many real numbers there are invites the answer "infinitely many", and that answer says nothing until "how many" has a meaning that works for infinite sets.
The previous lesson ranked the elements of a set by order, ended on Zorn's lemma, a principle about infinite sets, and left a prior question: how large is an infinite set, and how many reals are there? This lesson answers it with functions alone, assuming from the lesson on functions injective, surjective and bijective maps, inverses, and the facts that a composite of injections is an injection and a composite of bijections is a bijection. It also uses the well-ordering principle: every non-empty set of natural numbers has a least element. As throughout the course, starts at , and is the power set of .
Same size without counting
Someone who cannot count can still tell whether there are as many cups as saucers: put one cup on each saucer and see whether anything is left over. That pairing is a bijection, and it is the definition. Sets and are equinumerous, or have the same size, written , when there is a bijection . And means there is an injection , which seats every element of in its own place in , perhaps with places to spare. Finally means that and not : an injection exists and a bijection does not.
Proposition. For all sets , and : (i) ; (ii) if then ; (iii) if and then ; (iv) , and if and then ; (v) if then .
Proof. (i) The identity is a bijection. (ii) A bijection has an inverse, which is a bijection . (iii) If and are bijections, so is . (iv) The identity is an injection, and a composite of injections is an injection. (v) The inclusion map from to is an injection.
The notation is suggestive, and it is worth being clear about what it does not yet say. No object called has been defined; "" is a statement about the two sets, and so is "". In particular, nothing so far says that and together give . For numbers that is antisymmetry, and it is free. For sets it says that injections both ways produce a bijection, which is a real theorem, proved later in this lesson. In the language of the lesson on order, "" is a preorder on sets, and the theorem says its ties are exactly the equinumerous pairs.
Nor is "smaller" the same as "subset". The natural numbers are a proper subset of the integers, and the next sections show . For finite sets a proper subset is always smaller, and that is the first thing to prove.
Finite sets and the pigeonhole principle
For write , and let . A set is finite, with elements, when for some ; a bijection is a way of counting , naming its elements first, second, and so on up to th. A set that is not finite is infinite.
For the definition to make sense, a set must not have both and elements for different and . That is the pigeonhole principle, from the lesson on contradiction, in its sharpest form.
Lemma (pigeonhole). If , there is no injection .
Proof. By induction on . For : is not empty, since , and there is no function at all from a non-empty set to .
Suppose the claim holds for , and suppose for a contradiction that is an injection with . We build an injection . If no element of is sent to , then restricted to is already an injection into . Otherwise for some , and by injectivity is the only such element, so . Define on by and for . The values of are values of at the distinct points of , so they are distinct and none is ; is an injection . Either way, since , this contradicts the claim for .
Corollary. (a) If then , so the number of elements of a finite set is well defined. (b) is infinite. (c) A finite set is not equinumerous with any proper subset of itself.
Proof. (a) A bijection is an injection, so by the lemma; its inverse gives .
(b) Suppose were a bijection. Restricted to it is an injection , which the lemma forbids.
(c) Let have elements, with a bijection, and suppose is a bijection onto a proper subset of . Then is an injection whose image misses some , namely for any . So . The map that fixes numbers below and lowers numbers above by one is injective, and is an injection , which the lemma forbids.
Part (c) is what fails for infinite sets. Richard Dedekind turned it round in 1888 and defined a set to be infinite when it is equinumerous with a proper subset of itself, a definition the next section shows meets. The same lemma, restated, is the everyday pigeonhole principle: if more than objects are put into boxes, some box receives two, because the assignment of boxes cannot be an injection.
Hilbert's hotel and countable sets
David Hilbert gave the infinite case its best known picture in a Göttingen lecture of 1924, and George Gamow made it famous in his 1947 book One Two Three... Infinity. A hotel has a room for every natural number, all taken, when a new guest arrives. The manager asks the guest in room to move to room . Everyone still has a room, nobody shares, and room is free.
The move is , , and it is a bijection. It is injective, since gives . It is surjective, since each in has , so and . So , and is infinite in Dedekind's sense. When a coach brings a guest for every natural number, moving each guest from room to room frees the odd rooms for them, so is the same size as two copies of itself. "The whole is greater than the part" is Euclid's fifth common notion, true for finite collections by part (c) of the corollary and false for infinite ones.
A set is countably infinite when it is equinumerous with , countable when it is finite or countably infinite, and uncountable otherwise. A bijection is a list of , first, second, in which every element appears exactly once and is reached after finitely many steps. Cantor wrote (aleph null) for the size of . Starting at instead changes nothing, since the hotel's shift is a bijection from to .
The integers run off in both directions, so listing them in their usual order has no first term. Alternating works:
Example. Prove that , given by for even and for odd , is a bijection, so that is countable.
The values are integers ( is even when is odd), beginning , , , . Injective: for even , , while for odd , because . So if , then and have the same parity, and either or ; both give . Surjective: let . If , put , an even natural number, and . If , put , which is odd and at least , so , and . Hence is a bijection and .
The surjectivity step also found the inverse: for and for . So sits at position in the list.
Now you. Prove that , given by for even and for odd , is a bijection.
Answer
For even , , and for odd , , a non-zero integer. Injective: forces equal parity, since only even inputs give positive values, and then or gives . Surjective: let . If , then is even and . If , then is odd and at least , and . So is a bijection, listing
Finding an explicit bijection can be fiddly, and the next theorem often removes the need: to show a set is countable, it is enough to inject it into .
Theorem. Every subset of is countable. Consequently, a set is countable if and only if there is an injection , and a non-empty set is countable if and only if there is a surjection .
Proof. Let be infinite; we list it in increasing order. Let , and for let . The set on the right is never empty, since otherwise would be finite, so by well-ordering each is defined. The sequence is strictly increasing: lies in , whose least element is , and . So is injective, and, by induction, for every . It is also surjective. Let , and suppose is not among . Then , so its least element satisfies ; with this gives , a contradiction. So is a bijection .
For the first consequence: a countable set injects into , through a bijection with or with some . Conversely, an injection is a bijection from onto its image , which is countable, so is countable.
For the second: if is countable and non-empty, a bijection is a surjection, and if has elements, the bijection extended by sending every to the image of is a surjection. Conversely, given a surjection , send each to the least element of , which exists by well-ordering. This map is injective, since different elements have disjoint sets of such , so is countable by the first consequence.
So subsets and surjective images of countable sets are countable. A countable set is the smallest kind of infinite set, in a sense made precise in the following question.
Does every infinite set contain a copy of ?
Yes, if one is allowed to choose. Let be infinite. Then is not empty, so choose . The set is not empty, since otherwise would have one element, so choose in it. In general is never empty, since is not finite, and can be chosen from it. The map is an injection , since each differs from all earlier terms. So for every infinite set : no infinite size is smaller than .
The proof makes infinitely many choices, one after another, with no rule saying which element to take. When is a set of natural numbers, "take the least" is a rule, and the proof of the theorem above did exactly that. For an arbitrary set there may be no rule, and the argument needs a weak form of the axiom of choice, met in the lesson on functions, called countable choice or, more precisely for a sequence of choices each depending on the last, dependent choice.
With it, the two definitions of infinite agree. Given an injection from into , the hotel's shift moves to and fixes every other element, a bijection from onto . So every infinite set is infinite in Dedekind's sense. Without any form of choice this can fail: set theorists have built models of the other axioms containing infinite sets with no countably infinite subset, sets that are infinite and yet equinumerous with none of their proper subsets.
Pairs and the rationals
The set is an infinite grid, with in row and column . Listing row first never reaches row . The way out is to list by diagonals. There are exactly pairs with , from to , so list the diagonal with sum , then sum , and so on, each by increasing first coordinate:
The position of in this list is a formula. Write , with . With , the earlier diagonals hold pairs, and is in place on its own, so its position is
This is the Cantor pairing function, shifted so that starts at . It gives , , and .
Theorem. The function is a bijection . In particular is countable.
Proof. Fix . The pairs with are those with , and sends them to . So maps diagonal injectively onto the block .
The blocks are disjoint and cover . They are disjoint because is increasing, so the ranges do not overlap. They cover because, given , the set of with is not empty (), so it has a least element ; then , and , either because and or by the minimality of . So .
Now is injective: two pairs on the same diagonal have different images, and two pairs on different diagonals land in different blocks. And is surjective: each lies in some block , which is the image of diagonal .
As a check, the pairs with (diagonals to , holding pairs) are sent to exactly to , since the last block ends at . A second, shorter bijection, , is Problem 5.
Since is countable, so is for any countable sets and : injections and give the injection from to . By induction on , then, is countable for every .
Between two rationals lies their average, so cannot be listed in increasing order. It can be listed in another.
Example. Prove that is countable.
Every rational has exactly one form in lowest terms with and . With the bijection above, define by , using that form; its uniqueness is what makes a function. If , then , so on applying , and ; so the rationals are equal, and is injective. Then is a composite of injections, hence an injection, and by the theorem of the previous section is countable. It is infinite, since it contains , so .
For instance goes to and then to . Position is not used, since would stand for , which is not in lowest terms. The injection is not a bijection, and the theorem on subsets of closes the gap: listing the image of in increasing order and sending each rational to the rank of its code in that list is an explicit bijection . Problem 12 gives a more elegant list of the positive rationals, in which each appears exactly once and no gaps need closing.
Now you. Prove that is a bijection , and compute .
Answer
Let from to , and . Since and undo each other in each coordinate, and are identities, so has an inverse and is a bijection. Then is a composite of bijections, hence a bijection, and is countable. With and , .
Countable unions
A countable set of countable sets has a countable union. This is the most used closure property of countable sets, and it follows from the pairing function.
Theorem. Let be countable sets. Then is countable. The same holds for finitely many countable sets.
Proof. Let be the union. If every is empty, so is . Otherwise, discard the empty sets; what remains is a finite or infinite sequence of non-empty countable sets with the same union, and repeating one of them if necessary makes it an infinite sequence of non-empty countable sets. By the theorem on countable sets, for each there is a surjection ; choose one for each . Define by . It is surjective: an element of lies in some , and is for some . Then is a surjection, and is countable.
For example, is the union over of the sets , each countable as the image of , which gives a second proof that is countable.
Where does the proof "choose one for each ", and does it matter?
It chose a surjection for every at once. Each is countable, so for each surjections exist, often many of them, but the hypothesis supplies no rule for picking one. Making infinitely many such choices simultaneously is an application of the axiom of choice, met in the lesson on functions, in its countable form.
Usually the sets come with lists already attached, and then nothing is chosen: in the second proof for , the list of is , one formula for every . The same is true in the Example below and in almost every application. When the lists are given, the theorem holds in set theory without choice.
When they are not, choice cannot be avoided. Solomon Feferman and Azriel Lévy showed in 1963 that it is consistent with the axioms of set theory other than choice that is a countable union of countable sets. Since is uncountable (proved below without any choice), in such a world the theorem fails. This does not make the theorem doubtful in ordinary mathematics, which accepts choice; it shows exactly which assumption carries the weight.
Example. Prove that the set of polynomials with integer coefficients is countable.
For , let be the set of polynomials with every , that is, the polynomials of degree at most (together with the zero polynomial). Such a polynomial is determined by its list of coefficients, and every list gives a polynomial, so is a bijection . Since is countable, so is , and this bijection is an explicit list of it (composed with a list of ), so no choice is involved. Every polynomial has some degree , so , a countable union of countable sets, and is countable.
Now you. Prove that the set of all finite subsets of is countable.
Answer
For , let be the set of subsets of . It is finite, with elements, so countable, and it can be listed explicitly, for instance by the rule below. Every finite subset of is a subset of for some (take if is empty, and otherwise), so the set of finite subsets of is , a countable union of countable sets, and is countable.
An explicit bijection also exists. Send a finite set to , with . Every non-negative integer has exactly one binary expansion, and the binary expansion of has a in exactly the places for . So is a bijection from the finite subsets of onto ; for instance , which is in binary.
The same pattern shows that the set of all finite sequences of natural numbers is countable (the union over of the countable sets ), and so is the set of all finite strings over a finite or countable alphabet. Every book, proof or computer program is such a string, so there are only countably many of each.
Intervals and the real line
Before asking whether is countable, it helps to see that its size does not depend on which piece of the line is taken. The lesson on functions proved that is a bijection , and is a bijection , with inverse . Composing, : the whole line has as many points as a short open piece of it. The same stretching shows that any two open intervals and with and are equinumerous, through .
Endpoints look harder, since no continuous bijection turns into . But bijections need not be continuous, and the hotel's trick absorbs a point.
Example. Give an explicit bijection .
The point needs a room in . Pick a sequence of distinct points inside , say , and shift along it, as the hotel shifts its guests: send to , each with to , and every other point to itself.
Let . Then maps into , and into itself by the identity, so its values lie in . Injective: two points in the third case have different images since is the identity there, and their images are not in , while images in the first two cases are in ; within , the images (of ) and (of ) are all different, since is injective and . Surjective: let . If , then . If , then . If with , then , as . So is a bijection.
Now you. Give an explicit bijection .
Answer
Now two points need rooms. Use the same sequence and shift by two: send to , to , each with to , and every other point to itself.
With , the map sends into and fixes everything else in , so all values lie in . Injective: points outside are fixed and their images are outside ; inside the images , and for are all different. Surjective: is its own image; is the image of ; is the image of ; and with is the image of , where .
So every interval with more than one point, open, closed or half open, bounded or not, has the same size as . The Schröder and Bernstein theorem, later in the lesson, will make results like this one line long, at the price of not exhibiting the bijection.
Cantor's diagonal argument
Georg Cantor proved in 1874 that the reals are not countable, and in 1891 gave the proof now called the diagonal argument. It uses decimal expansions of numbers in , and has one trap.
This lesson takes two facts about decimals from school, and the lesson on the real numbers proves them from its definitions: every real number in has a decimal expansion , and every such expansion names a real number in . Some numbers have two expansions: , since the tail is a geometric series with sum . This is the only way it happens. Two different expansions first disagree at some place , and the later digits can make up at most one unit in place , which they do only when one tail is all s and the other all s. So an expansion with no and no is the only expansion of its number. For numbers with two, use the one that does not end in s.
Here is the start of a list of numbers in , with the th digit of the th number in bold:
| expansion | th digit | new digit | ||
|---|---|---|---|---|
| 1 | 0.1415926... | 1 | 5 | |
| 2 | 0.7182818... | 1 | 5 | |
| 3 | 0.4142135... | 4 | 5 | |
| 4 | 0.5000000... | 0 | 5 | |
| 5 | 0.7320508... | 5 | 4 | |
| 6 | 0.6931471... | 7 | 5 |
The new digit is , unless the diagonal digit is , when it is . The number built from them differs from every in place .
Example. Prove that there is no surjection .
Let be any function, and let be the th digit of , using the expansion chosen above. Put if and otherwise, and let . Every digit of is or , so , and . Suppose for some . The expansion of has no or , so it is the only one has, and the chosen expansion of must be it. Then , contradicting the choice of . So is not a value of , and is not surjective.
So is uncountable: it is not empty, and no surjection from reaches all of it. Hence is uncountable too, since , and so is every interval with more than one point. The care over s and s is needed. With the rule "replace each diagonal digit by ", a list that starts with and has every later diagonal digit produces , which is the first number again.
Two consequences follow at once. The irrational numbers are uncountable, since otherwise would be a union of two countable sets. And : the inclusion is an injection, and no bijection exists. So there are at least two infinite sizes.
Now you. Let be the set of infinite sequences with every term or . Prove that there is no surjection .
Answer
Let be any function, with . Define by , so each is or and . For every , , so and differ in term and . Hence is not a value of , and is not surjective. No trap arises here, because two sequences are equal only when every term agrees.
Why doesn't the same argument prove that is uncountable?
Run it on a list of the rationals in , which exists because is countable. The construction produces a number with digits and that differs from every rational on the list. There is no contradiction, because nothing says is rational. It is not: a real number is rational exactly when its decimal expansion is eventually periodic (Problem 13 of the lesson on the real numbers proves this), and if were rational it would be on the list, which the construction has just shown it is not. So the argument, applied to a complete list of the rationals, proves that a certain explicit real number is irrational, and nothing more.
The general lesson is that the diagonal argument needs the new object to belong to the set being listed. For binary sequences and for real numbers in that is automatic, since any sequence of digits and names such a number. For the rationals, or for the algebraic numbers of the next section, or for any countable set of reals, the diagonal number escapes the set.
The same point sinks a tempting "proof" that is uncountable, written out in Problem 7. There the diagonal construction produces an infinite string of non-zero digits, which is not a natural number at all, so it escapes the list without contradicting anything.
A second view shows what really separates from . Cantor's first proof, of 1874, avoided decimals: given any sequence of reals, it built nested closed intervals avoiding one more term at each stage, and a point common to all the intervals was missed by the sequence. For a list of the rationals the intervals still shrink, but the point they close in on is irrational, so inside they have nothing in common. What the reals have and the rationals lack is the existence of that common point, the completeness that the next lesson makes into an axiom.
Algebraic and transcendental numbers
A real number is algebraic when it is a root of some non-zero polynomial with integer coefficients, and transcendental otherwise. Every rational is algebraic, as a root of . So is , a root of , and so is : if then , so , and is a root of . Sums and products of algebraic numbers are again algebraic (a theorem of algebra, not needed here), and for a long time nobody knew whether any real number is not.
Theorem (Cantor, 1874). The set of real algebraic numbers is countable. Consequently transcendental numbers exist, and the set of them is uncountable.
Proof. A non-zero polynomial of degree has at most real roots, as Mathematical Foundations shows (each root contributes a linear factor). So for each non-zero , the set of its real roots is finite. The algebraic numbers are the union of the sets over all non-zero , and is countable by the Example of the previous section, so this is a countable union of finite sets, which is countable by the theorem on countable unions. No choice is involved: each is listed in increasing order, and has the explicit list built above.
If the transcendental numbers formed a countable set, then , the union of the algebraic and the transcendental numbers, would be a union of two countable sets, and countable. It is not, so the transcendental numbers are uncountable, and in particular there is at least one.
The proof is a strange one. It shows that almost every real number is transcendental, in the sense that the transcendental ones are uncountable and the algebraic ones only countable, without identifying a single one. Joseph Liouville had exhibited the first explicit transcendental numbers in 1844, by a quite different argument about how closely algebraic numbers can be approximated by rationals. Charles Hermite proved that is transcendental in 1873, and Ferdinand von Lindemann did the same for in 1882, which settled the ancient problem of squaring the circle with ruler and compasses: it cannot be done. Cantor's argument, published in 1874, gave existence with no example at all, a non-constructive proof in the sense of the lesson on direct proof.
The count also puts a limit on description. Every number that can be defined by a finite text, in any fixed language, corresponds to at least one finite string of symbols, and there are only countably many such strings. So only countably many real numbers can be defined at all, and almost all real numbers can never be individually named.
Cantor's theorem
The diagonal idea, build an object that disagrees with the th item at the th place, is not about decimals. It works for any set and its power set.
Theorem (Cantor). For every set , .
Proof. The map is an injection , since forces . So . It remains to show that no is surjective, and then in particular none is a bijection. Each is a subset of , which may or may not contain . Collect the elements not in their own image:
This is a subset of . Suppose for some . If , the definition of gives . If , then , which is exactly the condition for . Either way there is a contradiction, so is not a value of , and is not surjective.
For a finite set with elements this is . For the diagonal is visible: with as row of a table whose columns are and whose entries say whether each number is in , the question "is ?" reads down the diagonal, and answers each one the other way. The subsets of correspond exactly to the and sequences of the last Now you (a set corresponds to the sequence with in the places belonging to ), and the two proofs are the same proof.
Applied repeatedly, the theorem gives an unending ladder, so there is no largest infinity:
The set should look familiar. Russell's paradox, from the lesson on sets, concerns the set of all sets that are not members of themselves, and Russell reached it in 1901 by studying this proof: run it on a supposed set of all sets with , and becomes . Inside a genuine set , the same self-reference yields a theorem rather than a paradox.
Is there a largest set, the set of all sets?
No, and Cantor's theorem is one proof. Suppose were a set containing every set. Every subset of is a set, so it is an element of , and . Then the inclusion is an injection , so , while Cantor's theorem gives . Together these would make by the theorem of the next section, contradicting Cantor's theorem. (Without that theorem, the contradiction can be reached directly: an injection yields a surjection , by sending each image back where it came from and everything else to , and Cantor's proof shows no such surjection exists.)
Cantor noticed this in the late 1890s, and it is sometimes called Cantor's paradox. It is a cousin of Russell's paradox and of the Burali-Forti paradox about the set of all ordinals, and all three were read the same way: some collections are too big to be sets. Zermelo's axioms of 1908, from which the modern system ZF grew, avoid them by never allowing a set to be formed from an unrestricted property, only by carving a subset out of a set already known, by pairing, union and power set, and by a few other operations. None of these builds a set of all sets. The collection of all sets still makes sense as something mathematicians talk about, but it is called a class, and classes are not members of anything.
The ladder above also answers a quieter question. Is there some set that is at least as big as every set? If were one, then , and the same argument gives a contradiction. So every set is outranked by another, and there are infinitely many infinite sizes.
The Schröder and Bernstein theorem
For finite sets, injections both ways give equal numbers of elements by the pigeonhole lemma. For infinite sets the corresponding statement is a genuine theorem, and the most useful tool for proving that two sets have the same size.
Theorem (Cantor, Schröder, Bernstein). If there are injections and , then there is a bijection .
The difficulty is that neither nor need be surjective, and no simple combination of them obviously is. The idea is to use on part of and the inverse of on the rest, and to find the right split. Elements of outside the image cannot be handled by , so they must use . Then so must anything of the form for such , because otherwise would send it to , which already hits. Following this requirement round and round gives the set on which is used.
Proof. Define subsets of by
and let . If , then , so , and since is injective there is exactly one with ; write it . Define by
is injective. Let with . If both are in , then , contradicting injectivity of . If neither is, then , and applying gives . If and , then , so . Now for some , so , a contradiction. The remaining case is the same with and exchanged.
is surjective. Let . If , then . If , then for some , and because . So , that is, for some . Since is injective, , and since , .
Cantor stated the theorem without a proof he was satisfied with. Richard Dedekind proved it in 1887 but did not publish; Felix Bernstein, a nineteen-year-old in Cantor's seminar, proved it in 1897; and Ernst Schröder published a proof at about the same time that was later found to contain a gap. The proof uses no choice at all: every step is determined by and . Problem 13 of the lesson on order gives a second proof, from a fixed point theorem for power sets.
With the theorem, a bijection no longer has to be built. For the Now you of the section on intervals, the inclusion and the map , which sends into , are injections both ways, so in one line.
Example. Prove that .
An injection . Send a set to the number with if and if . Different sets give digit strings that differ in some place, and neither string contains a . Two different expansions of the same number must have one ending in s, so these strings name different numbers, and the map is injective.
An injection . Send to the set . If , there is a rational with (the rationals are dense, as the lesson on the real numbers proves), and while . So is an injection . Let be a bijection. Then is a bijection , with inverse . Composing gives an injection .
By the Schröder and Bernstein theorem, . So the size of the real line is the second rung of Cantor's ladder, and has the same size as the set of and sequences. This size is called the continuum. Since by Cantor's theorem, this gives a proof that is uncountable which uses decimals only for the injection , where no digit ever appears.
Now you. Prove that : the plane has no more points than the line.
Answer
An injection is .
An injection . Since , there is a bijection , and is a bijection . So it is enough to inject into . Write and using the expansions that do not end in s, and send to the number with the interleaved expansion . The interleaved string does not end in s, since that would force both and to end in s. Different pairs give different strings, since the pair can be read back from the odd and even places, and two different strings neither of which ends in s name different numbers. So the map is injective.
By the Schröder and Bernstein theorem, . By induction, for every . Cantor found this in 1877 and wrote to Dedekind that he saw it but did not believe it. It shows that dimension is not a matter of how many points a space has; what distinguishes the line from the plane is how the points are arranged, and a continuous bijection between them is impossible.
The continuum hypothesis
Two infinite sizes are now in hand: that of , shared by , , and the algebraic numbers, and the strictly larger size of , shared by every interval, by the plane and by . Every infinite set of reals met so far has one of these two sizes. In 1878 Cantor asked whether that is always so.
The continuum hypothesis. Every infinite subset of is either countable or equinumerous with .
Equivalently, assuming the axiom of choice, there is no set with . Cantor believed the hypothesis and spent years trying to prove it. It was the first of the twenty-three problems David Hilbert set out in Paris in 1900 as the challenges for the new century.
What does it mean that the continuum hypothesis cannot be settled?
Kurt Gödel showed in 1940 that the continuum hypothesis cannot be disproved from the usual axioms of set theory, ZF together with the axiom of choice, provided those axioms are consistent. He built, inside any model of the axioms, a smaller model, the constructible universe, in which every set is built in a precisely controlled way, and in which the hypothesis is true. Paul Cohen showed in 1963 that it cannot be proved from them either, by inventing forcing, a method of enlarging a model by adding new sets, and using it to add many new subsets of , so that the continuum becomes much larger than the first size beyond . Cohen received the Fields Medal in 1966 for this work.
So the hypothesis is independent of the axioms: both it and its negation are consistent with them. This is not a statement that the question is meaningless or that the answer is unknown for lack of effort. It is a theorem about what the axioms that ground the rest of mathematics can prove, in the same way that Euclid's parallel postulate was eventually shown to be independent of his other axioms.
What remains is a question of which further axioms to adopt. The hypothesis does hold for the well-behaved sets that analysis usually meets: Cantor and Ivar Bendixson showed in the 1880s that every closed set of reals is countable or has the size of , and later work extended this to much larger families of sets. Whether set theory should be extended by axioms that decide the hypothesis for all sets, and which way, is an open debate among set theorists.
The count settles a difference between two number systems that look alike. The rationals and the reals are both ordered and closed under the four operations, and between any two rationals lies another. Yet the rationals can be listed and the reals cannot, so something about the reals is missing from the rationals. Nothing so far has said what: counting shows the difference exists without locating it. The next lesson names it, as a property of least upper bounds called completeness.
Problems
Work each problem on paper before opening anything; for Core and Challenge problems, try the hint before the solution.
Warm-up
1. Give an explicit bijection from to each set, and prove that it is one: (a) the even natural numbers; (b) ; (c) .
Solution
(a) Let and . Its values are even natural numbers. It is injective, since gives , and surjective, since an even natural number is with , and .
(b) Let . For , , so the values lie in the set. It is injective, since gives . It is surjective: given an integer , the number is at least , and . So lists the set as .
(c) Let , so that odd goes to and even goes to . Its inverse is and : composing either way gives the identity, since every natural number is exactly one of or for a unique (by the division algorithm). A function with an inverse is a bijection.
2. Using with , and the bijection from the lesson: (a) compute ; (b) find the pair with ; (c) find and .
Solution
(a) .
(b) The blocks are . Since , the number lies in , so and , giving . Check: .
(c) For , , so . For even , , so .
3. Say whether each set is countable or uncountable, with a reason: (a) the set of all finite words in the letters to ; (b) ; (c) the set of infinite and sequences with only finitely many s; (d) the set of all infinite and sequences; (e) the set of irrational numbers in ; (f) the set of circles in the plane whose centre has rational coordinates and whose radius is rational.
Solution
(a) Countable. For each there are words of length , a finite set, and the set of all words is the union of these countably many finite sets.
(b) Countable, as a product of two countable sets.
(c) Countable. Sending such a sequence to the set of places where it has a is a bijection onto the finite subsets of , which are countable by the Now you of the section on countable unions.
(d) Uncountable, by the Now you of the section on the diagonal argument.
(e) Uncountable. If it were countable, then would be the union of the countable set and a countable set, hence countable, which the diagonal argument forbids.
(f) Countable. A circle is determined by its centre and radius , so sending the circle to is an injection into , which is countable.
4. Prove: (a) if is countable and is an injection, then is countable; (b) if is countable and is a surjection, then is countable.
Solution
(a) Since is countable, there is an injection , by the theorem on countable sets. Then is a composite of injections, hence an injection, and by the same theorem is countable.
(b) If is empty, it is finite and so countable. Otherwise is non-empty too, since is onto , so there is a surjection by the theorem. Then is a surjection (every is for some , and for some ), and by the theorem is countable.
Core
5. Prove that is a bijection .
Hint
Show that every natural number can be written as with and odd in exactly one way.
Solution
Every is with and odd. Let . It contains , and it is bounded, since gives , so . So has a greatest element , and for some . If were even, would divide , contradicting the choice of . So is odd.
The form is unique. Suppose with , odd, and suppose . Then is even, a contradiction. So by symmetry, and then .
is a bijection. has and odd. Injective: if , uniqueness of the form gives and , so . Surjective: given , write with odd; then and satisfy . For instance , and is .
6. Let be a set with a countably infinite subset, and let be countable. Prove that . Deduce that the set of irrational numbers has the same size as .
Hint
Replace by . Then use the hotel: a countably infinite part of can absorb a countable set of extra guests.
Solution
Let , a subset of a countable set and so countable, with and . Let be countably infinite. Then is countable, as a union of two countable sets, and infinite, since it contains , so it is countably infinite. Two countably infinite sets are equinumerous, both being equinumerous with , so there is a bijection .
Define by for , and for . The domain splits into the disjoint pieces and (disjoint because ), and the codomain into the disjoint pieces and . On the first piece is the bijection onto , and on the second it is the identity onto . So is injective (images from different pieces lie in different pieces) and surjective, and .
For the irrationals, let and . The set is a countably infinite subset of , since rational would make rational. So : there are exactly as many irrational numbers as real numbers.
7. Find the flaw in this argument.
Claim. is uncountable.
Proof. Let be any function. Write each in decimal as an infinite string of digits running leftwards, , padded with s, so that is the th digit from the right. Let if and otherwise, and let be the number . Then differs from in the th digit from the right, so for every , and is not surjective.
Hint
Is a natural number?
Solution
Every digit is or , so the string has infinitely many non-zero digits. A natural number has only finitely many non-zero digits: if , every digit beyond the th from the right is . So the string names no natural number, and . The argument shows only that a certain infinite string is not among the values of , which is true and harmless, and it does not show that some natural number is missed.
This is the requirement from the discussion of after the diagonal argument: the diagonal object must belong to the set being listed. For it does, since an infinite string of digits after a decimal point names a real number; for it does not. Indeed the claim is false, since the identity is a bijection .
8. Prove or disprove each claim. (a) The set of infinite subsets of is countable. (b) The set of sequences of non-negative integers with only finitely many non-zero terms is countable. (c) If is uncountable and is countable, then is uncountable. (d) Every uncountable subset of contains an interval with .
Hint
For (a) and (c), write a known uncountable set as a union. For (d), think of a set that meets no interval completely.
Solution
(a) False. is the union of the set of finite subsets of , which is countable, and the set of infinite subsets. If the latter were countable, would be a union of two countable sets and countable, contradicting Cantor's theorem.
(b) True. For let be the set of such sequences with for all . The map is a bijection from to the set of -tuples of non-negative integers, which is countable as a finite product of countable sets ( has one element). Every such sequence lies in for its last non-zero place, or , so the set is , a countable union of countable sets with explicit lists, hence countable.
(c) True. . If were countable, would be a union of two countable sets, hence countable.
(d) False. The irrationals are uncountable (as shown after the diagonal argument), but contain no interval with , since every such interval contains a rational number.
9. Consider a family of open intervals , each with , no two of which overlap. Prove that the family is countable.
Hint
Every interval of positive length contains a rational number. Fix a list of the rationals, and use it to name one rational in each interval without choosing.
Solution
Fix a bijection from to . Every interval with contains a rational number (by density of , proved in the lesson on the real numbers), so the set is not empty, and by well-ordering it has a least element . This defines a function on the family, with no choice involved.
The function is injective. If , then lies in both and , so they overlap, and since no two different intervals of the family overlap, . So the family injects into and is countable.
The same argument shows that a function that is increasing can have only countably many jumps: at each jump there is a gap between the left and right limits, and the gaps at different jumps are disjoint open intervals.
10. Let be the set of all sequences of natural numbers. Prove that , and hence .
Hint
Use the Schröder and Bernstein theorem. For one injection, encode a set by a sequence of s and s. For the other, send a sequence to its graph, a subset of .
Solution
An injection . Send to the sequence with if and otherwise. Different sets differ at some , where the sequences differ, so the map is injective.
An injection . Send a sequence to its graph . If , they differ at some , and then but , since the only pair in with first coordinate is . So is an injection . The pairing bijection gives a bijection from to , and the composite is an injection .
By the Schröder and Bernstein theorem , and by the Example in that section, so .
11. Prove that no power set is countably infinite: there is no set with .
Hint
If is countable, what does that say about ? Treat finite and infinite separately.
Solution
Suppose . The map is an injection , and is countable, so is countable by Problem 4(a).
If is finite with elements, then has elements, as the lesson on sets proved by induction, so is finite and not equinumerous with (part (b) of the corollary on finite sets, together with the fact that equinumerosity is symmetric and transitive).
If is countably infinite, let be a bijection. Then is a bijection , with inverse . So , contradicting Cantor's theorem.
Either way there is a contradiction. So a power set is finite (of size ) or uncountable, and never of size .
Challenge
12. Build a tree of fractions: the root is , and each node has a left child and a right child . Prove that every positive rational number appears in the tree exactly once, and in lowest terms. Deduce an explicit list of the positive rationals in which each appears exactly once.
Hint
Left children are less than and right children greater than . For existence and uniqueness, use strong induction on for in lowest terms, and ask which node could be the parent of .
Solution
Write every node as the pair of positive integers that the construction produces, so the root is and the children of are and .
Every node is in lowest terms. The root is. If , then a common divisor of and divides , so divides both and , and ; the same holds for and . By induction on the depth of a node, every node has .
Left, right and root. A left child has value , a right child has value greater than , and the root has value .
Existence. We prove by strong induction on that every pair of positive integers with is a node. If , then , and is the root. If , then is a pair of positive integers with (a common divisor of and divides their sum ), and , so by hypothesis is a node, and its left child is . If , then in the same way is a node, and its right child is .
Uniqueness. We prove by strong induction on that is at most one node. If , a node equal to is in lowest terms, so , and every node other than the root is a left or right child, with value different from , so only the root is . If : a node equal to is not the root and not a right child, so it is the left child of some node with , which forces . By hypothesis, is a single node, and it has a single left child. So occurs once. The case is the same with right children.
Since every positive rational has exactly one representation with and , every positive rational occurs at exactly one node.
The list. Level of the tree (the nodes at distance from the root) has nodes. Listing level , then level from left to right, then level , and so on, reaches every node after finitely many steps, and each once. So it is a bijection from to the nodes, and hence, by what was proved, to the positive rationals:
This is the Calkin and Wilf enumeration, published by Neil Calkin and Herbert Wilf in 2000. Unlike the injection in the lesson, it skips nothing.
13. Prove that the set of all bijections has the same size as .
Hint
For an injection from the and sequences, let a sequence decide which of the pairs , , , and so on are swapped. For the other direction, use Problem 10.
Solution
Let be the set of bijections , and the set of infinite and sequences. Recall : a set corresponds to the sequence with s exactly at its members, and the Example of the section on Schröder and Bernstein gives .
An injection . For , let swap and when and fix both when , for each . Every natural number is or for exactly one , so is defined on all of , and is the identity, so is its own inverse and a bijection. If , they differ at some , and then one of , is and the other is , so .
An injection . Every bijection is in particular a sequence of natural numbers, , so the inclusion is an injection. By Problem 10, , so there is an injection .
By the Schröder and Bernstein theorem, . In particular the set of permutations of is uncountable, while the set of permutations of that move only finitely many numbers is countable (each is determined by a finite list of values), which shows how much the infinite permutations add.
14. Let be a countable totally ordered set. Prove that there is an injection with implying : every countable total order is a suborder of the rationals.
Hint
List as and define one step at a time. At step , the earlier values split into those that must lie below and those that must lie above it; the rationals always have room in between, and beyond either end.
Solution
If is empty there is nothing to do. Otherwise list without repetitions as , finite or infinite. We define by recursion on so that, at every stage, is strictly increasing on .
Let . Suppose are defined with strictly increasing on , where . Let and ; since the order is total and the are distinct, every lies in exactly one of them. Every element indexed by is below every element indexed by , since ; so, as is increasing on the earlier elements, for all and . Put and when these sets are non-empty, and define
(At least one of and is non-empty, since .) In each case is rational, greater than every with , and less than every with , because when . So is strictly increasing on .
Now let in , say and . At stage , both values are defined and is strictly increasing on the elements defined so far, so . Values are never changed after they are defined, so this holds for itself. Finally is injective: if , then or by totality, and .
The construction used only that has no greatest or least element and that between two rationals lies a third. Cantor proved in 1895 that these properties characterise the rationals: any two countable totally ordered sets that are dense in this sense and have no greatest or least element are order-isomorphic. The standard proof runs the construction above alternately from each side, and is known as the back and forth method.