LECTURE 22: COUNTABLE AND UNCOUNTABLE SETS 1. Introduction To end the course we will investigate various notions of size associated to subsets of R. The simplest example is that of cardinality - a very general concept which can be used to compare the sizes of arbitrary sets (not just subsets of R). Here we won t develop this theory in full, but concentrate on specific definitions and theorems of interest. In particular, the most important idea for our purposes will be that of countable sets, introduced below. We wish to compare the size of two arbitrary sets A and B. To do this we ll attempt to define an ordering which tells us whether A is smaller than or equal to B. This ordering should be based on comparing the number of elements of the sets. There are a lot of words in inverted commas here to emphasise that we haven t a clear formalisation what these notions of size and number should be, but in certain situations it is easy to see how one can do this. In particular, we should have A B at least in the following situations: 1) A B; 2) A, B are finite sets and B has at least as many elements as A; 3) A is finite and B is infinite. But this hardly covers all possible cases: what happens when we have a pair of infinite sets with neither member of the pair containing the other? How do we compare the sizes of the rationals and irrationals, for instance? A simple solution is given by considering functions between the sets in questions. For this, we recall the following fundamental definition. Definition. Let f : A B be any function between sets. We say f is injective if f(x) = f(y) for some x, y A = x = y. With this it is easy to see what our notion of inequality between sets should be. Definition. For sets A, B we write A B if there exists some injective function f : A B. It should be clear that the cases enumerated above all satisfy A B with this definition. For 1), note that ι: A B given by ι(x) = x is an injection. For 2) and 3) the situation is essentially tautological (to give a proof of such an elementary fact one would have to have a more concrete idea of what it means for a set to have n elements which would be both dull and unelightening). The relation satisfies the key properties one would expect from an ordering and in particular: Lemma 1. If A B and B C, then A C. Proof. If f : A B and g : B C are injections, then g f : A C is an injection. 2. Countable sets We will be primarily interested in whether sets satisfy the following property. Definition. i) We say a set A is countable if A N; that is, there exists an injective function f : A N. 1
2 LECTURE 22: COUNTABLE AND UNCOUNTABLE SETS ii) We say A is countably infinite if it is countable and infinite. Remark. Unfortunately, there is a lack of consensus regarding the definition of countability in the literature and many authors use the term countable exclusively to mean countably infinite. For our purposes the notion of countability is the key definition, but it is good to have in mind that it is just one specific case of a more general theory of comparing sizes of sets. Example. 1) Any finite set is countable. Indeed, if A = {a 1, a 2..., a n }, then we can define an injection f : A N by f(a n ) := n. 2) Similarly, if the elements of A can be enumerated as a sequence A = {a 1, a 2,... }, then A is countable. In fact, the above examples characterise countable sets. Theorem 1. A set A is countable if and only if its elements can be enumerated as a (empty, finite or infinite) sequence. Proof. Given the above examples, it suffices to show any countable set is of the stated form. Let f : A N be an injection and suppose without loss of generality A. We define a (possibly finite) sequence {a 1, a 2,... } recursively as follows: Let B 0 := f(a) = {b N : f(a) = b for some a A } denote the image of A under f and b 1 := min B 0 N. Since f is injective there exists a unique a 1 A such that f(a 1 ) = b 1. Suppose that a 1,..., a n have already been defined for some n N. If B n := f(a) \ {f(a 1 ),..., f(a n )} is empty, then the process terminates. Otherwise, let b n+1 = min B n and define a n+1 A to be the unique element of A such that f(a n+1 ) = b n+1. It is clear that this process produces a sequence which includes all elements of A. The transitivity property described in Lemma 1 immediately implies the following. Corollary. If B is countable and A B, then A is countable. We ll now consider some more concrete examples. Example. 1) Clearly N itself is countable. So are subsets of N such as 2N = {2n : n N} the set of all positive even numbers and P the set of primes. 2) Slightly less trivial is the fact that Z is countable. Indeed, we can enumerate the elements of Z thus {0, 1, 1, 2, 2, 3, 3,... }. 3) The set of all integer pairs Z Z is countable. One can see this by enumerating the elements as a spiral: let a 1 := (0, 0), a 2 := (1, 0), a 3 := (1, 1), a 4 := (0, 1), a 5 := ( 1, 1), a 6 := ( 1, 0), a 7 := ( 1, 1), a 8 := (0, 1), a 9 := (1, 1), a 10 := (2, 1), and so on. (This example is immediately understood if one draws a picture.) 4) Q is countable. To see note that every x Q \ {0} can be written uniquely as p/q where q N, p Z and p, q have no common factors. Define f(x) = (p, q) for every such x and f(0) := (0, 0). Then f : Q Z Z is an injection and so the result follows from corollary and the previous example.
LECTURE 22: COUNTABLE AND UNCOUNTABLE SETS 3 Another way to approach the last two examples is via the following theorem. Theorem 2. Suppose A = {A 1, A 2,... } is a countable collection of countable sets. Then A = {a : a A for some A A} A A is countable. (Notice A is a set whose elements are sets.) Proof. To prove the theorem one uses a zig-zag argument to enumerate the elements of the union; this is best understood by drawing a picture (which I will do in class). Without loss of generality we may suppose A and the A q are all countably infinite. One may therefore write A q = {a q,1, a q,2, a q,3,... }. Now A = {b 1, b 2, b 3,... } where b 1 := a 1,1, b 2 := a 1,2, b 3 = a 2,1, b 4 := a 3,1, b 5 := a 2,2, b 6 := a 1,3, b 7 := a 1,4, b 8 := a 2,3, b 9 := a 3,2, b 10 := a 4,1, and so on. Example. 1) For q Z \ {0} let A q := { n q R : n N }. Then each A q is clearly countable as f : A q N given by f(n/q) = n is clearly an injection. Since Z is countable it follows that is countable and so A := {A q : q Z \ {0}} Q = A A is countable, by the theorem. 2) The set Z Z := {(p, q) : p, q Z} of all integer pairs is countable. Indeed, A Z Z = q Z{(p, q) : p Z} can be written as a countable union of countable sets. 3) The above result can be generalised significantly. If A 1,..., A n are countable sets, then the set of all n-tuples A 1 A n := {(a 1,..., a n ) : a 1 A 1,..., a n A n } is countable. In particular, Z d := Z Z (where the product is d-fold) is countable for any d N. 4) Let A R denote the set of all numbers which satisfy some (non-zero) polynomial equation with integer coefficients. That is, A is the set of all x R for which there exists some a 0, a 1,..., a d Z with a d 0 such that a d x d + a d 1 x d 1 + + a 1 x + a 0 = 0. Clearly Q A but A contains many other numbers such as 2. We claim A is countable. Indeed, if P denotes the set of non-zero polynomials with integer coefficients and for each p P we define then Z(p) := {x R : p(x) = 0}, A := p P Z(p). We proved in the last quarter than any non-zero polynomial has a finite number of roots (in fact, the number of roots is bounded by the degree) and so each of the Z(p) is finite (and hence countable). Thus, by the theorem it suffices to
4 LECTURE 22: COUNTABLE AND UNCOUNTABLE SETS show that P is countable. Let P d denote the subset consisting of all polynomials of degree d. Since P = d N P d, by a second application of the theorem it suffices to show each P d is countable. But one can define an injection f : P d Z d+1 by f : a d x d + a d 1 x d 1 + + a 1 x + a 0 (a 0, a 1,..., a d ) and so each P d is countable by the previous example. The last example is related to the transcendental numbers, which hopefully you ll remember from our discussion in the last lecture. In fact, the set of transcendental numbers is, by definition, R \ A. Since A is countable, one would suppose that it is a relatively small subset of R and so there should be many transcendentals. We ll make this precise in the following section. 3. Uncountable sets Definition. A set is uncountable if it is not countable. A very important theorem - with an ingenious proof - is the following. Theorem 3 (Cantor 1874). R is uncountable. In the proof we will use the fact that any x (0, 1) has a unique infinite decimal expansion which does not terminate with an infinite string of 0 s. The slight technicality here is to ensure the choice of decimal expansion is indeed unique: for instance, 1/2 = 0.5000... and 1/2 = 0.4999... In such situations we only choose the expansion terminating in a string of 9 s. Since we haven t covered convergence of series yet, don t worry too much about this. Proof. It suffices to show the interval (0, 1) is uncountable (since a subset of a countable set is countable). Suppose (0, 1) is countable so that it can be enumerated as a sequence (0, 1) = {a 1, a 2,... }. As mentioned above, we can write each a j in terms of its unique infinite decimal expansion which does not terminate in a string of 0 s so that a 1 = 0.a 11 a 12 a 13 a 14 a 15... a 2 = 0.a 21 a 22 a 23 a 24 a 25... a 3 = 0.a 31 a 32 a 33 a 34 a 35... a 4 = 0.a 41 a 42 a 43 a 44 a 45.... We are particularly interested in the diagonal terms, which have been highlighted. Using these terms we define a number b = 0.b 1 b 2 b 3 b 4 (0, 1) by taking the jth digit of the decimal expansion to be { 1 if ajj 1 b j := 2 if a jj = 1. Thus b j a jj for all j N and so b a j for any j N. But this is a contradiction, since the a j enumerate all the memebers of (0, 1). The uncountability of other important sets follows as a corollary to this theorem. Corollary. The set of irrationals R \ Q is uncountable. Proof. Suppose R \ Q were countable. Then R = R \ Q Q is countable, a contradiction.
LECTURE 22: COUNTABLE AND UNCOUNTABLE SETS 5 The same proof yields: Corollary. The set of transcendental numbers is uncountable. And in particular: Corollary. There exists a transcendental number (in fact, there are many!). The latter consequence is highlighted since prior to Cantor s work proofs of the mere existence of transcendental numbers 1 used arguments far more involved than those discussed above. For specific examples - such as e and π - proving transcendance tends to be fairly arduous, despite the fact it is so easy to show most numbers are transcendental. Jonathan Hickman, Department of mathematics, University of Chicago, 5734 S. University Avenue, Eckhart hall Room 414, Chicago, Illinois, 60637. E-mail address: jehickman@uchicago.edu 1 This was first established by Liouville in 1844 who later showed the specific example is transcendental. 10 k! k=1