<<

Introductory Analysis I Fall 2014 Notes on Spaces

These notes are an alternative to the textbook, from and including ”Closed Sets and Open Sets” (page 58) to and excluding Cantor Sets (page 95)

1 The of metric spaces

Assume M is a with distance function d. I will depart a bit from the book’s notation; instead of using Mr(p), I will denote by B(p; r) the open of center p ∈ M and radius r > 0; i.e,

B(p; r) = {q ∈ M : d(q, p) < r}.

The reason is that once we get to concrete metric spaces like Rn, it may be silly n to write (R )p(r). More importantly, I like my notation better. Incidentally a notation such as ”r > 0” means: ”r is a positive real number.” The basic definition is Definition 1 A subset U of M is said to be open iff for every p ∈ U there is r > 0 such that B(p; r) ⊂ U. In other words, the set U is open if and only if for every p ∈ U there is r > 0 such that if q ∈ U and d(q, p) < r, then q ∈ U. Examples: 1. Let M be an arbitrary metric space. Then the empty set ∅ and M are open. 2. Let M be an arbitrary metric space. Let p ∈ M and r > 0. Then B(p; r) is open. 3. Let M be a discrete metric space; i.e., d(p, q) = 1 whenever p ≠ q. Then every subset of M is open. 4. Let M = Rm. The following sets are open:

m U1 = {x = (x1, . . . , xm) ∈ R : x1 > 0}, m U2 = {x = (x1, . . . , xm) ∈ R : x1 > x2}, m U3 = {x = (x1, . . . , xm) ∈ R : |x1| + ··· + |xm| < 1},

5. Let M = R. A subset U of R is open if and only if for each x ∈ R there exist a, b ∈ R such that x ∈ (a, b) ⊂ U. In particular, all open intervals are open. You should be able to prove that the sets declared open in these examples are indeed open. 1 THE TOPOLOGY OF METRIC SPACES 2

Theorem 1 Let M be a metric space and let T be the family of all open subsets of M. This family has the following properties:

1. ∅,M ∈ T . ∪ ∈ T ∈ ∈ T 2. If Uα for all α A; A some index set, then α∈A Uα . In words, T is closed under arbitrary unions. An equivalent way this property is sometimes formulated is: Assume U is a collection of∪ open subsets of M (finite, infinite, countable or non-countable). Then {U : U ∈ U} is open. 3. If U, V ∈ T , then U ∩ V ∈ T . The intersection of two open sets is open. By induction, it follows that the intersection of any finite number of open sets is open.

Proof. 1. That ∅,M are open was already mentioned. ∪ ∈ T ∈ ∈ T 2. Let Uα for all α A; A some index set, let U = α∈A Uα . Let p ∈ U. Then there exists α ∈ A such that p ∈ Uα. Since Uα is open, there is r > 0 such that B(p; r) ⊂ Uα. Since Uα ⊂ U, B(p; r) ⊂ U. 3. Let U, V be open. If p ∈ U ∩ V , then p ∈ U and p ∈ V . Since U is open, p ∈ U implies that there exists r1 > 0 such that B(p; r1) ⊂ U. Similarly, because V is open, there exists r2 > 0 such that B(p; r2) ⊂ V . Let r = min(r1, r2). Then r > 0 and clearly B(p; r) ⊂ B(p; r1) ∩ B(p; r2) ⊂ U ∩ V .

Exercise 1 Let M = R. 1. Prove that in R singleton sets are NOT open. ∈ N { ∈ R − } 2. For n let Un =∩ x : 1/n < x < 1/n . Prove that Un is open ∈ N ∞ for all n , but n=1 Un is not open. This shows that, in general, the intersection of an infinite family of open sets may not be open.

Note: If M is any set, a family of subsets of M satisfying properties 1, 2, and 3 of Theorem 1 is called a topology for M.

Definition 2 Let M be a metric space. A subset F of M is closed iff its complement M\F is open.

Examples: 1 THE TOPOLOGY OF METRIC SPACES 3

1. Let M be an arbitrary metric space. Then the empty set ∅ and M are closed. 2. Let M be an arbitrary metric space. Let p ∈ M and r ≥ 0. Then the closed ball of center p, radius r; that is, the set {q ∈ M : d(q, p) ≤ r} is closed. 3. A particular case of the previous result, the case r = 0, is that in every metric space singleton sets are closed. 4. Let M be a discrete metric space; i.e., d(p, q) = 1 whenever p ≠ q. Then every subset of M is closed. 5. Let M = Rm. The following sets are closed:

m U1 = {x = (x1, . . . , xm) ∈ R : x1 ≥ 0}, m U2 = {x = (x1, . . . , xm) ∈ R : x1 ≥ x2}, m U3 = {x = (x1, . . . , xm) ∈ R : |x1| + ··· + |xm| ≤ 11},

6. Let M = R. All closed intervals are closed. As mentioned in the examples, in R open intervals are open and closed intervals are closed. Intervals of the form (a, b], [a, b) with a, b ∈ R, a < b are neither open nor closed.

By taking complements, the following theorem is an immediate consequence of Theorem 1 Theorem 2 Let M be a metric space. 1. ∅,M ∈ T are closed. ∈ 2. If∩ Fα is a closed subset of M for all α A; A some index set, then α∈A Uα is closed. In words, arbitrary intersections of closed subsets are closed. Equivalently: Assume F is a collection of∩ closed subsets of M (finite, infinite, countable or non-countable). Then {F : F ∈ F} is closed. 3. If F,G, are closed then F ∪ G is closed. By induction, it follows that the Union of any finite number of closed sets is closed. Our next task will be to show that the basic metric properties can be de- scribed exclusively in terms of open sets. Another way of stating this is to say that one never has to mention the distance function again, except if one wants to. It will be convenient to first have another topological concept, that of neighborhood. Definition 3 Let M be a metric space. Let p ∈ M. A subset V of M is said to be a neighborhood of p in M (or just a neighborhood of p) iff there exists an U such that p ∈ U ⊂ V . 1 THE TOPOLOGY OF METRIC SPACES 4

Exercise 2 V is a neighborhood of p if and only if there exists r > 0 such that B(p; r) ⊂ V .

We also have the following simple lemma Lemma 3 A subset U of a metric space is open if and only if it is a neighbor- hood of each of its points. Proof. Assume first U is open and let p ∈ U. Then p ∈ U ⊂ U, showing U is a neighborhood of p. Conversely, assume U is a neighborhood of each∪ of its points. ∈ ∈ ⊂ Then for each p U, there is Wp open, p Wp U. Let W = p∈U Wp. By property 2 of Theorem 1, W is open. Since Wp ⊂ U for all p ∈ U, we have W ⊂ U. On the other hand, if p ∈ U, then p ∈ Wp ⊂ W , thus U ⊂ W . It follows that U = W is open.

Let us begin with sequences. We’ll state it in the form of a theorem, but it is fairly immediate.

Theorem 4 Let (pn) be a sequence in the metric space M; let p ∈ M. The following statements are equivalent:

1. For each ϵ > 0 there exists N ∈ N such that n ≥ N implies d(pn, p) < ϵ.

2. For each ϵ > 0 there exists N ∈ R such that n > N implies d(pn, p) < ϵ. 3. For each open set U in M such that p ∈ U, there exists N ∈ R such that n > N implies pn ∈ U. 4. For each neighborhood V of p, there exists N ∈ R such that n > N implies pn ∈ V .

5. If V is a neighborhood of p, then {n ∈ N : pn ∈/ V } is finite. As mentioned before, most of the equivalences are obvious. In lieu of a proof I’ll just make some comments about what could be the less obvious parts. Concerning the equivalence of 1 and 2, notice first that if the following statement ”For each there exists N ∈ N such that n ≥ N implies ” (fill the blanks any way you wish), is equivalent to ”For each there exists N ∈ N such that n > N implies ” In fact, if something holds for n ≥ N, it also holds for n > N. But the converse is also true; if we can find N ∈ N so that a property holds for n > N, we can also find N ′ so it holds for n ≥ N ′; namely N ′ = N + 1. Maybe in words: if there is an element of N so the property holds when n is strictly larger than that element of N, then there is an element of N (namely the previous element plus 1) such that the property holds for n greater than or equal this element. Concerning now the equivalence of 1 and 3, it is a consequence of N ⊂ R and the fact that if r ∈ R, there is n ∈ N, n > r. That 3 implies 1 is a consequence of the fact that B(p; r) is open; the converse is an easy consequence of the definition of open sets. A similar argument (sort of) 1 THE TOPOLOGY OF METRIC SPACES 5 shows the equivalence of 3 and 4. To see 5 is equivalent to any and all of the previous statements notice that if (pn) is a sequence and B is a set, to say there exists N ∈ N such that pn ∈ B for all n ≥ N is equivalent to saying that the set of indices for which pn ∈/ B is at most N − 1, so finite. Conversely, if the set of indices n for which pn ∈/ B is finite, let M be the largest index for which pn ∈/ B. Then pn ∈ B for all n ≥ M + 1.

Convergence can be defined exclusively using the concept of open sets. Be- fore we continue, it may be convenient to define a few more topological concepts.

Definition 4 Let S be a subset of the metric space M. A point p ∈ M is a limit point of S iff there is a sequence (pn) of points of S converging to p. It is an accumulation or cluster point of S iff there is a sequence (pn) of points of S such that pn ≠ p for all n, converging to p Note: I use limit point as in our textbook. A lot of other textbooks (maybe all other textbooks?), if they define limit point at all they mean accumulation point.

To see the difference between the two concepts notice first the obvious: A cluster point is a limit point. The second obvious thing is that every point of a set is a limit point of the set. If p ∈ S, let pn = p for all n ∈ N to get a sequence of points of S converging to p. Also fairly obvious is that if p is a limit point of S and p∈ / S, then p has to be a cluster point of S. Can this happen? Yes, it can. Here are a few examples. A convenient notation is the following: Let S be a set. We denote by S′ the set of all cluster points of S; p ∈ S′ if and only if there exists (pn), pn ∈ S, pn ≠ p for all n ∈ N such that limn→∞ pn = p. Examples. 1. Let M be a discrete metric space. Then S′ = ∅ for all S ⊂ M.

2. In R2, consider the set S = {(x, y) ∈ R2} such that x < y. Claim S′ = {(x, y) ∈ R2 : x ≤ y}. There are more elegant ways to prove this then how I am about to do it, but at this level brute force may be necessary. ′ 2 ′ Let us see first that S ⊂ {(x, y) ∈ R : x ≤ y}. Let (x0, y0) ∈ S . there is then a sequence ((xn, yn)) in S converging to (x0, y0). I’ll use a calculus result; if xn → x0, yn → y0 and xn < yn for all n, then x0 ≤ y0, to conclude ′ (x0, y0) ∈ S . Notice that we did not have to assume (xn, yn) ≠ (x0, y0) ∈ N ≤ − 1 for all n . Conversely, assume x0 y0. Then set xn = x0 n , yn = y0 for n ∈ N. Clearly (xn, yn) ∈ S,(xn, yn) ≠ (x0, y0) for all n ∈ N, and ′ (xn, yn) → (x0, y0). It follows that (x0, y0) ∈ S . 3. In R consider the set S = (0, 1]∪{2}. It is then easy to see that S′ = [0, 1]. The point 2 is a limit point of S, but not an accumulation point of S. R { 1 ∈ N} ′ { } 4. In consider the set n : n . Then S = 0 . 1 THE TOPOLOGY OF METRIC SPACES 6

5. In R consider the subset Z of all integers. Then Z′ = ∅.

The fact is that the useful concept is that of cluster point. Limit points are less interesting, except when they are cluster points. But . . . Here is a another quite simple result; let’s call it a proposition for variety’s sake.

Proposition 5 Let M be a metric space, let p ∈ M and let S ⊂ M.

1. The following statements are equivalent. (a) p is a limit point of S. (b) If V is a neighborhood of p, then V ∩ S ≠ ∅. (Each neighborhood of p has non-empty intersection with S.) (c) If r > 0, then B(p; r) ∩ S ≠ ∅ 2. The following statements are equivalent.

(a) p is a cluster point of S. (b) If V is a neighborhood of p, then V ∩(S\{p}) ≠ ∅. (Each neighborhood of p contains a point of S different from p.) (c) If r > 0, then B(p; r) ∩ (S\{p}) ≠ ∅. (d) If V is a neighborhood of p, then V ∩ S is an infinite set.

Proof. I’ll only prove the equivalence of the statements about being a cluster point; the proof of the equivalence of the statements about being a limit point is similar, a bit easier because one doesn’t have to worry about not being equal to p. And, of course, there is no fourth statement. a) ⇒ b). Assume p is a cluster point of S and let V be a neighborhood of p. By definition of cluster point, there is (pn), pn ∈ S, pn ≠ p for all n ∈ N, such that pn → p as n → ∞. Since V is a neighborhood of p, there is N ∈ N such that pn ∈ V for n ≥ N. Then (for example) pN ∈ V ∩ (S\{p}). b) ⇒ c). Since B(p; r) is a neighborhood of p for each r > 0, this is immediate. c) ⇒ d). Assume that for each r > 0, B(p; r) ∩ (S\{p}) is not empty. Let V be a neighborhood of p. There is then r0 > 0 such that B(p; r0) ⊂ V . Let ′ r1 = min(r0, 1); then r1 > 0, B(p; r1) ⊂ B(p r0) ⊂ V , and by assumption c), there is p1 ∈ B(p; r1)∩S such that p1 ≠ p. Then d(p1, p) > 0 (notice that this is the first time in quite a while that we actually mention the distance function), let r2 = min(d(p1, p), 1/2). Then r2 > 0 and there exists p2 ∈ B(p; r2) ∩ S such that p2 ≠ p. In addition, p2 ≠ p1 since d(p2, p) < d(p1, p). Assume now that for some n ≥ 1 we have found points p1, . . . , pn ∈ V ∩ S such that pi ≠ pj if i ≠ j and such that 0 < d(pi, p) < 1/i for i = 1, 2, . . . , n. We have done this already for n = 2. Let 1 r = min{d(p , p), . . . , d(p , p), }. n+1 1 n n + 1

Then rn=1 > 0, hence there exists pn+1 ∈ B(p; rn+1) ∩ S such that pn+1 ≠ p. 1 THE TOPOLOGY OF METRIC SPACES 7

What we have done here is to show inductively the existence of a sequence (pn) such that the set {pn : n ∈ N} is an infinite set contained in V ∩ S. So we are done. As a bonus we also have limn→∞ pn = p and pn ≠ p for all n. That is, as a bonus we proved in passing: If p is a cluster point of S, there exists a sequence (pn) of points of S such that pn ≠ pm if n ≠ m, pn ≠ p for all n,(pn) converging to p. d) ⇒ a). Let n ∈ N.The set B(p; 1/n) is a neighborhood of p, hence B(p; 1/n) is an infinite set, hence it must contain points other than p. Lots of them, an infinite number of them. Select one of these points, call it pn. Thus pn ∈ B(p; 1/n) ∩ S, pn ≠ p. The sequence (pn) clearly converges to p, pn ≠ p for all n ∈ N, thus p is a cluster point of S.

We can now give a convenient characterization of closed sets in terms of cluster or limit points. It is again a TFAE theorem. Theorem 6 Let S be a subset of the metric space M. The following statements are equivalent. 1. S is closed. 2. S contains all of its limit points. 3. S′ ⊂ S (S contains all of its cluster points). Proof. 1) ⇒ 2 Assume S is closed and let p ∈ M\S. Since M\S is open, a sequence of points converging to p must have all but a finite number of terms in M\S, thus it cannot be a sequence of points of S. It follows that p is not a limit point of S. Therefore, if p is a limit point of S, p ∈ S. 2) ⇒ 3) Since cluster points are limit points, this is obvious. 3) ⇒ 1) Assume S′ ⊂ S. Let U = M\S, we need to show U is open. Let p ∈ U. Then p∈ / S, hence p∈ / S′; p is not a cluster point of S. By Theorem 5, there exists a neighborhood V of p such that V ∩ (S\{p}) = ∅. Since p∈ / S, this is equivalent to V ∩ S = ∅. Thus V ⊂ U. It is (or should be) clear that supersets of neighborhoods are neighborhoods, thus U is a neighborhood of p. Since p is an arbitrary point of p, this proves U open.

Definition 5 Let S be a subset of the metric space S. The closure of S, denoted by S¯, is the intersection of all closed subsets of M containing S; in symbols, ∩ S¯ = {F : F is a closed subset of M and S ⊂ F }

Some comments are in order. First of all, because M itself is closed and con- tains (of course!0 all its subsets, the family {F : F is a closed subset of M and S ⊂ F } is never empty. The definition of S¯ makes sense. Second, since S¯ is the in- tersection of a family of sets all of which contain S, we have S ⊂ S¯. Third, since the intersection of closed sets is closed, S¯ is a closed set. It is also easy to see 1 THE TOPOLOGY OF METRIC SPACES 8 that S = S¯ if and only if S is closed. In fact, if S = S¯, then S is closed because, as mentioned, S¯ is closed. Conversely, if S is closed, then S is a member of the family of closed sets containing S, hence S¯ ⊂ S. The converse inclusion always holds, thus S = S¯. One problem with this definition, however, is that it is fairly useless to determine closures because to find S¯ we need to know the family of closed sets containing S and, unfortunately, barS is one of these sets. To find S¯ we need to know S¯. Fortunately, there are intrinsic definitions. We state them as a theorem.

Theorem 7 Let S be a subset of the metric space M. Then

S¯ = S ∪ S′ = {p ∈ M : p is a limit point of S}.

Proof. We see first that S ∪ S′ is closed. This is equivalent to proving that M\(S ∪ S′) is open. If p ∈ M\(S ∩ S′), then p∈ / S, p∈ / S′ and we are exactly in the situation of the proof of 3) → 1) of Theorem 6. The same proof shows M\(S ∪ S′) is open. Since S ∪ S′ is closed, we have S¯ ⊂ S ∪ S′. Conversely, let p ∈ S ∪ S′ and let F be a closed set containing S. Since it is obvious that S′ ⊂ F ′ and F ′ ⊂ F since F is closed, we see that S ∪ S′ ⊂ F for all closed sets F ⊃ S. Thus S ∪ S′ is in the intersection of all these closed sets, hence S ∪ S′ ⊂ S¯. Concerning the characterization in terms of limit points, notice that {p ∈ M : pis a limit point of S} = S ∪ S′. Since cluster points are limit points, the inclusion ⊃ is obvious. But so is the converse inclusion since a limit point not in S is a cluster point of S. As a simple but useful corollary we get: Corollary 8 Let S be a subset of the metric space M. Then p ∈ S¯ if and only if V ∩ S ≠ ∅ for all neighborhoods V of p. Equivalently, p ∈ S¯ if and only if V ∩ B(p; r) ≠ ∅ for all r > 0. It might be a moment to do some exercises. It is important to do simple exercises like those that follow to get a feeling for all these objects. Exercise 3 Let M = Rm and let r > 0, x ∈ Rm. Prove that B(x; r) = {y ∈ Rm : |y − x| ≤ r}.

Exercise 4 Let M = Rm. Prove that Qm = Rm. A subset of a metric space whose closure equals the whole space is said to be dense in the space. Thus Qm is dense in Rm. In particular Q is dense in R.

Exercise 5 In R2, let S = {(x, sin(1/x)) : x ∈ R, x ≠ 0}. Prove that S¯ = S ∪ {(0, y): −1 ≤ y ≤ 1}.

Exercise 6 It seems reasonable to assume that the result of Exercise 3 is valid in every metric space. But that would be wrong. Assume M is a metric space with the discrete metric, and assume that M has at least two points. Let p ∈ M. Determine B(p; 1) and show that B(p; 1) ≠ {q ∈ M : d(q, p) ≤ 1}. 1 THE TOPOLOGY OF METRIC SPACES 9

Exercise 7 Assume (pn) is a sequence in a metric space and let S be the range of the sequence, i.e., S = {on : n ∈ N}. Prove: If q is a cluster point of S, then there is a subsequence of )pn) converging to q. Is the converse true? That is, if q is the limit of a subsequence of (pn), is p a cluster point of S?

Here are a few other properties of the closure: Proposition 9 Let M be a metric space. 1. If S ⊂ T ⊂ M, then S¯ ⊂ T¯.

2. If S is a subset of T , then S¯ = S¯. 3. If S, T are subsets of M, then S ∪ T = S¯ ∪ T¯. Proof. The first statement is obvious, any definition one wants to use. The second statement is also obvious; the closure of a closed set is the set, and S¯ is closed. For the third statement, notice first that A¯∪B¯ is a closed set containing A ∪ B, thus it contains A ∪ B. Conversely, A ∪ B is a closed set containing A ∪ B, since A ⊂ A ∪ B, A ⊂ A ∪ B, hence A¯ ⊂ A ∪ B. Similarly, B¯ ⊂ A ∪ B, ¯ ¯ thus A ∪ B ⊂ A ∪ B. ∪ ∈ m As∪ a corollary we get: If S1,...,Sm M (a metric space), then i=1 Si = m ¯ i=1 Si. Exercise 8 Provide an example of a metric space M and a countable family {Sn}n∈N of subsets of M such that ∪ ∪ Un ≠ S¯n. n∈N n∈N

Here are two final topological concepts (for now). Definition 6 Let S be a subset of the metric space M. The interior of S is the set S◦ of all points p of S such that there exists r > 0 with B(p; r) ⊂ S. That is: p ∈ S◦ if and only if there exists r > 0, B(p, r) ⊂ S. Equivalently: p ∈ S◦ if and only if S is a neighborhood of p. It is also easy to see that S◦ is the largest open subset of S; that is, if V is open and V ⊂ S, then V ⊂ S◦. Also equivalently ∪ S◦ = {V : V is open and V ⊂ S}.

If we compare this last equivalent way of defining the interior and compare with the definition of closure, we get at once thanks to our friend DeMorgan,

S◦ = M\(M\S).

We have talked of points very much inside a set, and points outside of it. We need also to talk of points that are halfway between being in and out. 2 SUBSPACES 10

Definition 7 Let M be a metric space, and S ⊂ M. The boundary of S is the set ∂S = S¯ ∩ (M\M). Several equivalent definition are: ∂S = S¯\S0; ∂S is the set of all points p such that each neighborhood of p has non-empty intersection with S and M\S. Equivalently, p ∈ ∂S if and only if for each r > 0, B(p; r) ∩ S ≠ ∅ ̸= B(p; r) ∩ (M\S).

2 Subspaces

As mentioned in class, if M is a metric space, if N ⊂ M, then N becomes a metric space by simply restricting the distance function of M to points of N. We then say N is a (metric) subspace of M. All the topological concepts make sense in N, of course, and we should know how they relate to the similar concept in M. So suppose S is a subset of N and it is closed in the metric space N. Is it closed in M? Conversely? Since we now have two spaces, I will write BM (p; r) for the open ball of center p, radius r > 0 in M, and BN (p; r) for the related object in N (which only makes sense if p ∈ N). A first trivial observation is that if p ∈ N, r > 0, then

BN (p, r) = BM (p, r) ∩ N. This has as consequence that a subset U of N is open in N if and only if U = W ∩ N for some W open in M. In fact, assume first W is open in M. Let p ∈ W ∩ N. Because p ∈ W , there is r > 0 such that BM (p; r) ⊂ W , implying that BN (p; r) = BM (p; r) ∩ N ⊂ W ∩ N. This proves W ∩ N is open ∈ in N. Conversely, let U be open∪ in N. For each p U there is rp > 0 such that ⊂ ∩ BN (p; rp) U. The set W = p∈U BM (p; rp) is open in M and W N = U.

A couple of immediate consequences are that if U ⊂ N and U is open in M, then it is open in N. If N is open in M, then being open in N is equivalent to being open in M for subsets of N. One gets similar/exoected results for closed sets. Suppose F ⊂ N. then F is closed in N (by definition) if and only if N\F is open in N, which happens if and only if there is W open in M such that N\F = W ∩ N. Observing that N\(W ∩ N) = (M\W ) ∩ N, we see that if F is closed in N, then F = G ∩ N, G closed in M. If F = G ∩ N, with G closed in M, then N\F = N\(G ∩ N), showing that N\F is open in N. Thus F is closed in N if and only if there is G closed in M such that F = G ∩ N. In particular, if N is closed in M then a subset F of N is closed in N if and only if it is closed in M.

Exercise 9Let M be a metric space and let N be a subspace of M. Let S ⊂ N.  closure   closure  Prove: The  interior  of S in N is the intersection of the  interior  boundary boundary 3 EQUIVALENCE OF METRICS 11 of S in M intersection N.

3 Equivalence of Metrics

We saw in a homework that two distance functions for the same set are equiv- alent iff convergence for one is equivalent to convergence for the other one. A nicer definition is:

Definition 8 Assume d1, d2 are distance functions for a set M. They are equivalent, and we write d1 ∼ d2, iff they generate the same tropology.

In other words, a set is open for d1 if and only if it is open for d2. Let us write for p ∈ M, r > 0,

B1(p; r) = {q ∈ M : d1(p, q) < r},B2(p; r) = {q ∈ M : d2(p, q) < r}.

Assume d1 ∼ d2. Let r > 0, p ∈ M. Since B1(p; r) is open with respect to d1 and p ∈ B1(p; r), the fact that it is also open with respect to d2 implies that ′ ′ there exists r > 0 such that B2(p, r ) ⊂ B1(p, r). The same must hold true if we switch the roles of d1, d2. We see thus that if d1 ∼ d2, for every r > 0, ′ ′ ′ p ∈ M, there exists r > 0 such that B2(p, r ) ⊂ B1(p, r), and for every r > 0 ′′ ′′ ′ there is r > 0 such that B1(p, r ) ⊂ B2(p, r ). Conversely, suppose this property holds. If U is open with respect to d1, let p ∈ U. Then there is r > 0 such that B1(p, r) ⊂ U; by the property there ′ ′ ′ exists r > 0 such that B2(p, r ) ⊂ B1(p, r), hence B2(p, r ) ⊂ U. Since p was arbitrary in U, we see that U is open with respect to d2. Since the property is symmetric in d1, d2; it also follows that being open with respect to d2 is the same as being open with respect to d1. Concerning sequences, if two metrics define the same open sets, since convergence can be defined exclusively in terms of open sets, convergence will be the same for both metrics. On the other hand, if two metrics have the same notion of convergence then given any subset of the space, the notion of limit point will be the same for both metrics. It follows that the concept of being a closed set is the same for both metrics, hence also the notion of being the complement of a closed set; i.e., being an open set. We thus have

Theorem 10 Let M be a set and let d1, d2 be distance functions in M. The following statements are equivalent.

1. A subset of M is open with respect to d1 if and only if it is open with respect to d2. ′ ′ 2. For each p ∈ M, r > 0 there exists r > 0 such that B2(p; r ) ⊂ B1(p; r), ′ ′ and for each p ∈ M, r > 0 there exists r > 0 such that B1(p; r ) ⊂ B2(p; r).

3. A sequence in M converges with resepct to d1 if and only if it converges with resepct to d2. 4 AN EXCURSION INTO SET THEORY 12

4 An Excursion into Set Theory

Let M,N be sets (not necessarily metric spaces) and let f : M → N. If A ⊂ M, the image of A under f is the set

f(A) = {y ∈ B : ∃ x ∈ M, y = f(x)}; briefly, f(A) = {f(x): x ∈ A}. The statement y ∈ f(A) is equivalent to y = f(x) for some x ∈ A. In particular, f(M) is the range of f. If B is a subset of N, one can define the pre-image of B under f. The author of our textbook denotes it by f pre(B) and gives some excellent reasons why this notation is preferable to the usual one, which is f −1(B), except that it isn’t really so much the usual notation as the universal notation, used everywhere I know of, except our textbook. So I will stick with the conventional notation. The pre-image of B under f is the set defined by

f −1(B) = {x ∈ M : f(x) ∈ B}.

Notice that x ∈ f −1(B) does NOT imply x = f −1(y) for some y ∈ B; f −1 as a function on B might not even be defined. (Actually, if f −1 is defined, it does mean that, but that requires a proof.) x ∈ f −1(B) means precisely the same as f(x) ∈ B. Here are some examples. Examples. 1. Let f : R → R be defined by f(x) = 1 for all x ∈ R. Then f(A) = {1} if A ⊂ R and A ≠ ∅; { ∅, if 1 ∈/ B, f −1(B) = R, if 1 ∈ B.

2. Let f : R → R be given by f(x) = sin x for all x ∈ R. Then f(R) = [−1, 1]; f −1{0} = {kπ : k ∈ Z}. 3. If A ⊂ M and A ≠ ∅, then f(A) ≠ ∅. In fact, x ∈ A implies f(x) ∈ f(A). However, if B ⊂ N one can have f −1(B) = ∅ even if B is not empty. f −1(B) = ∅ if and only if B ∩ f(M) = ∅. Let us prove some basic facts about these operations. A bit of common sense helps. Proposition 11 Let f : M → N.

1. If Bλ ⊂ N for λ ∈ Λ (Λ an index set; finite or infinite), then ( ) ∪ ∪ −1 −1 f Bλ = ∈ Λf (Bλ) (1) (λ∈Λ ) λ ∩ ∩ −1 −1 f Bλ = ∈ Λf (Bλ) (2) λ∈Λ λ 4 AN EXCURSION INTO SET THEORY 13

2. If B,C are subsets of N, then

f −1(C\B) = f −1(C)\f −1(B). (3)

3. If B ⊂ N, then f −1(N\B) = M\f −1(B). (4)

Proof. These properties prove themselves; if one simply does the obvious(∪ (and) ∈ −1 uses the definitions as∪ provided). To prove (1) notice that x f λ∈Λ Bλ ∈ ∈ if and only if f(x) λ∈Λ Bλ, which happens if and only if there is λ Λ ∈ ∈ such that f(x) Bλ; this is equivalent to saying∪ that there is λ Λ such that ∈ −1 ∈ ∈ −1 x f (Bλ), which occurs if and only if x λ Λf (Bλ). The proof of (2) is almost identical; replace “there is” or “there exists” by “for all” (or “for each”): (∩ ) ∩ ∈ −1 ∈ x f λ∈Λ Bλ if and only if f(x) λ∈Λ Bλ, which happens if and ∈ ∈ only if for each λ Λ it holds that f(x) Bλ; this is equivalent∩ to saying that ∈ ∈ −1 ∈ ∈ −1 for each λ Λ, x f (Bλ), which occurs if and only if x λ Λf (Bλ). The proof of (3) is just as immediate:

x ∈ f −1(C\B) ⇔ f(x) ∈ C\B ⇔ f(x) ∈ C and f(x) ∈/ B ⇔ x ∈ f −1(C) and x∈ / f −1(B) ⇔ x ∈ f −1(C)\f −1(B).

Property (14) is a consequence of (3); take C = N and notice that f −1(N) = M.

Are similar properties true for images? That is, if Aλ ⊂ M for λ ∈ Λ, is it true that f applied to the union of the Aλ’s is the union of the f(Aλ); in other words, is the image of a union the union of the images? Is the image of an intersection the intersection of the images? The answer is yes for the union, no for the intersection. Proofs are easy. Concerning intersections, suppose A, B ⊂ M. If f is not one-to-one, there could be a ∈ A\B, b ∈ B\A, such that f(a) = f(b). Then y = f(a) is in f(A) ∩ f(B), but there is no reason to assume that it also is in f(A ∩ B). In general, f(A ∩ B) ⊂ f(A) ∩ f(B), but f(A ∩ B) ≠ f(A) ∩ f(B) in general. Equality holds if f is one-to-one. Here are a few more properties, as an exercise. If you understood the definitions, you should have no trouble with this exercise. If you have any trouble, review the definitions carefully.

Exercise 10 Assume M,N are sets and f : M → N. 1. Let A ⊂ M. Prove: A ⊂ f −1 (f(A)). Show, by a counterexample, that in general equality does not hold; that is, provide an example in which A ≠ f −1 (f(A)). After doing this, give a condition on f such that equality will hold whenever f satisfies that condition. ( ) 2. Let B ⊂ N. Prove: f f −1(B) ⊂ B. Show, by a counterexample, that in general equality does not hold, but give a condition on f such that equality will hold whenever f satisfies that condition. 5 CONTINUITY 14

Finally, assume f : M → N is one-to-one and onto so that f −1 : N → M exists. Then it would seem we have two interpretations of f −1(B) for B ⊂ N: As the pre-image of B under f or as the direct image of B under f −1. Fortunately both interpretations are the same in this case. Suppose x ∈ f −1(B). If we interpret f −1(B) as the pre-image of B,this means f(x) ∈ B. If we interpret f −1(B) as the image of B under f −1, this means there exists y ∈ B such that x = f −1(y), hence f(x) = y ∈ B. And, of curse, the only possible value of y is f(x) in this case.

5 Continuity

In this section we will assume M,N are metric spaces. I will use the symbol d for the distance function in M as well as for the distance function in N; this should not cause any confusion; one should know from the context which one is being referred to. Anyway, after a while, there probably won’t be any explicit mention of distance functions. I will however denote the open ball of radius r center q by BM (q, r) if we are in M, by BN (q, r) in N.

Definition 9 Let f : M → N and let p ∈ M. We say f is continuous at p iff for every ϵ > 0 there is δ > 0 such that d(f(q), f(p)) < ϵ whenever q ∈ M and d(q, p) < δ.

Definition 10 Let f : M → N. We say f is continuous (or, continuous on M)iff f is continuous at each p ∈ M.

We already went over a lot of this in class. A characterization of continuity in terms of sequences is given by the following result. Theorem 12 Let f : M → N and let p ∈ M. Then f is continuous at p if and only if the following property holds: Whenever (pn) is a sequence in M converging to p, the sequence (f(pn)) is a sequence in N converging to f(p).

Proof. Assume first f is continuous at p. Let (pn) be a sequence in M converging to p. To prove (f(pn)) converges to f(p), let ϵ > 0 be given. By the continuity of f at p, there exists δ > 0 such that d(f(q), f(p)) < ϵ whenever q ∈ M and d(q, p) < δ. Because δ > 0 and limn→∞ pn = p, there is N ∈ N such that n ≥ N implies d(pn, p) < δ, hence d(f(pn), f(p)) < ϵ. Conversely, assume the property holds. We proceed by contradiction. As- sume f is not continuous at p. There exists then ϵ > 0 for which no δ > 0 works, thus for every δ > 0 there exists pδ ∈ M, d(pδ, p) < δ and f(pδ), f(p)) ≥ ϵ. Then (p1/n)n∈N is a sequence in M converging to p; since d(f(p1/n, f(p)) ≥ ϵ for all n; f(p1/n) does not converge to f(p), contradicting our hypothesis. Moving a bit away from explicit mention of the distance functions, we have the following simple lemma. I prove it because perhaps we all need to become a bit more familiar with this way of proving things.

Lemma 13 Let f : M → N, let p ∈ M. The following are equivalent. 5 CONTINUITY 15

1. f is continuous at p. 2. For each neighborhood W of f(p), there exists a neighborhood V of p such that f(V ) ⊂ W . 3. If W is a neighborhood of f(p), then f −1(W ) is a neighborhood of p.

Proof. 1) ⇒ 2) Assume f is continuous at p and assume W is a neighborhood of f(p). There is then ϵ > 0 such that BN (f(p); ϵ) ⊂ W . By continuity, there is δ > 0 such that q ∈ M, d(q, p) < δ implies d(f(q), f(p)) < ϵ, thus f(q) ∈ BN (f(p); ϵ) ⊂ W . Take V = BM (p; δ); then W is a neighborhood of p in M and if z ∈ f(V ), then z = f(q), some q ∈ V = BM (p, δ), thus z = f(q), d(q, p) < δ, hence d(z, f(p)) < ϵ and z ∈ W . That is, f(V ) ⊂ W . 2) ⇒ 3) Assume 2) Let W be a neighborhood of f(p) in N. By 2), there exists a neighborhood V of p, with f(V ) ⊂ W . Applying f −1 and using (10), part 1, V ⊂ f −1(f(V )) ⊂ f −1(W ). Since supersets of neighborhoods are neighborhoods, we are done. 3) ⇒ 1) Assume 3) Let ϵ > 0 be given. Then BN (f(p); ϵ) is a neighborhood of −1 f(p), hence f (BN (f(p); ϵ) is a neighborhood of p, hence contains an open set containing p, which in turn contains an open ball centered at p. That is, there −1 is δ > 0 such that BM (p; δ) ⊂ f (BN (f(p); ϵ). It follows that if q ∈ M and d(q, p) < δ, then d(f(q), f(p)) < ϵ.

An important but simple result is the following. Theorem 14 Let M,N,P be metric spaces; let f : M → N, g : N → P . Let p ∈ M. If f is continuous at p and g is continuous at f(p), then the composition g ◦ f is continuous at p Proof. Let W be a neighborhood of g ◦ f(p) = g(f(p)) in P . Since g is con- − tinuous,( g 1()W ) is a neighborhood of f(p), thus( (because) f is continuous), f −1 g−1(W ) is a neighborhood of p. But f −1 g−1(W ) = (g ◦ f)−1(W ) and, since W was an arbitrary neighborhood of g◦f(p), we proved that the pre-image of every neighborhood of g ◦ f(p) under g ◦ f is a neighborhood of p. Continuity of g ◦ f at p follows.

An obvious corollary is Corollary 15 Let M,N,P be metric spaces; let f : M → N, g : N → P . If both f and g are contibuous, then g ◦ f is continuous.

Here are a few exercises, to keep practising. Exercise 11 Let M,N be metric spaces and let p ∈ M be an isolated point of M; that is p ∈ M but p∈ / M ′. Equivalently, there is r > 0 such that BM (p, r) = {p}. Prove: If f : M → N, then f is continuous at p. 6 ALGEBRA OF CONTINUOUS FUNCTIONS 16

Exercise 12 Let M,N be metric spaces, f : M → N, A ⊂ M. The restric- tion of f to A is the function fA : A → N defined by fA(p) = f(p) for p ∈ A. It makes sense to ask about the continuity of fA since A is a metric space with the metric of M. Prove: If p ∈ A and f is continuous at p,then fA is continu- ous at p. Show (by a counterexample) that the converse is false; one can have p ∈ A ⊂ M, fA continuous at p, but f is not continuous at p. Exercise 13 Let M,N be metric spaces, f : M → N, A ⊂ M. Let p ∈ A. Assume there exists U open in M such that p ∈ U ⊂ A. Prove: If fA is continuous at p, then f is continuous at p. Exercise 14 Let M,N be metric spaces, f : M → N. Let A, B ⊂ M be such that M = A ∪ B and assume p ∈ A ∩ B. Prove: f is continuous at p if and only if both fA, fB are continuous at p. We are already characterizing continuous functions in terms of topological concepts. For functions continuous at all points we have some nicer characteri- zations. The following theorem will be used with some frequency. Theorem 16 Let M,N be metric spaces and let f : M → N. The following statements are equivalent. 1. f is continuous. 2. f −1(U) is open in M whenever U is open in N; in words: The inverse image of open sets is open. 3. f −1(F ) is closed in M whenever F is closed in N; in words: The inverse image of closed sets is closed. Proof. 1) ⇒ 2) Assume f is continuous and let U be open in N. Let p ∈ f −1(U). Then f(p) ∈ U. Since U is open, U is a neighborhood of f(p) thus, by Lemma 13, f −1(U) is a neighborhood of p. Since p ∈ U was arbitrary, itfollows that f −1(U) is a neighborhood of each on of its points hence, by Lemma 3, it is open. 2) ⇒ 3) Assume the inverse image under f of all open sets is open and assume F is a closed subset of N. Then F = N\U where U is open; thus f −1(F ) = M\f −1(U), proving F is closed since f −1(U) is open. 3) ⇒ 2) TO prove that 3) implies 2) all one needs todo is to exchange the words “open” and “closed” in the proof that 2) implies 3). 2) ⇒ 1) Assume the inverse image of all open sets is open. Let p ∈ M. Let W be a neighborhood of f(p). There is then U open in N, f(p) ∈ U ⊂ W . Then p ∈ f −1(U) ⊂ f −1(W ). Since f −1(U) is open, f −1(W ) is a neighborhood of p. By Lemma 13, f is continuous at p.

6 Algebra of continuous functions

Assume f : M → Rm. Then f(p) is an m-vector for each p ∈ M and we can define functions f1, f2, . . . , fm : M → R by fk(p) is the k=th component of p. In other words, f(p) = (f1(p), . . . , fm(p)). We write f = (f1, . . . , fm). We have 6 ALGEBRA OF CONTINUOUS FUNCTIONS 17

m Proposition 17 Let M be a metric space and let f = (f1, . . . , fm): M → R . Then f is continuous at p ∈ M if and only if each fk is continuous at p; k = 1, . . . , m. It follows that f is continuous if and only if each fk is continuous. Proof. For once, the proof might be easier using the distance functions. Assume first f is continuous at p. Let k ∈ {1, . . . , m}; we want to prove fk is continuous at p. Let ϵ > 0 be given. Because f is continuous, there exists δ > 0 such that if √∑ ∈ | − | | | ≤ | | n | |2 q M and d(q, p) < δ, then f(q) f(p) < ϵ. Since xk x = j=1 xj m for all x = (x1, . . . , xm) ∈ R , q ∈ M, d(q, p) < δ implies |fk(q) − fk(p)| ≤ |f(q) − f(p)| < ϵ. Conversely, assume each fk is continuous√ at p. To prove f is continuous at p, let ϵ > 0 be given. Since then ϵ/ n > 0, there exist√ δ1, . . . , δm > 0 such that q ∈ M; d(q, p) < δk implies |fk(q) − fk)(p)| < ϵ/ m. Let δ = min1≤k≤m δk. Then δ > 0 and d(q, p) < δ implies d(q, p) < δk for k = 1, . . . , n, hence v v u u u∑m u∑m ϵ2 |f(q) − f(p)| = t (f (q) − f (p))2 < t = ϵ. k k m k=1 k=1

Generally speaking, a function from a metric space (or any set, actually) to Rm is just a convenient way to deal with m functions at once. Once again generally speaking (there could be exceptions), if you have f : M → Rm (M not necessarily a metric space, just a set) you can write f = (f1, . . . , fm) where fk : M → R for k = 1, . . . , m. Chances are that given a property such an f can have it is either defined by, or a theorem states it, that f : M → Rm has that property if and only if each fk : M → R has the property. We just saw it is so for continuity.

I will now define a number of functions. The symbols I use will probably be reused later on with different interpretations. What I mean is that these symbols are just one-use symbols. Here are the functions: • µ : Rm × Rm → Rm, defined by µ(x, y) = x + y if x, y ∈ Rm. • ν : R × Rm → Rm, defined by µ(c, x) = cx if c ∈ R and x ∈ Rm. ∑ • Rm × Rm R · m λ : to , defined by λ(x, y) = x y = i=1 xiyi if x = m (x1, . . . , xm), y = (y1, . . . , ym) ∈ R . √ • Rm → R 2 ··· 2 ∈ abs : , defined by abs(x) = x1 + + xm if x = (x1, . . . , xm) Rm. All of these functions are continuous. For a proof we need to know a bit about product of metric spaces. If (M, d1), (N, d2) are metric spaces, then M × N can be made into a metric space in several equivalent ways. One can de- ′ ′ ′ ′ fine the metric d for M × N by√d((p, q), (p , q )) = d(p, p ) + d(q, q ). Or one ′ ′ ′ 2 ′ 2 ′ ′ could define d((p, q), (p , q )) = d1(p, p ) + d2(q, q ) . Or d((p, q), (p , q )) = 6 ALGEBRA OF CONTINUOUS FUNCTIONS 18

′ ′ max(d1(p, p ), d2(q, q )). We should all have enough experience by now to re- alize a) All three of these are metrics, and b)they are equivalent. So use the one you like most; the main thing is that if we denote the ball of center p radius r > 0 in M by BM (p; r), the one in N by BN (q, r). then U is open in M × N if and only if for every p, q) ∈ U, there exist r1 > 0, r2 > 0 such that BM (p, r1) × BN (q; r2) ⊂ U. One can always assume r1 = r2, if neces- sary. Or if one wants to. Notice that BM (p, r) × BN (q; r) is not the same as BM×N ((p, q), r) if we use the first two metrics we defined above for M × N, but m is equal to BM×N ((p, q), r) for the third of these metrics. When M = R and N = Rn, then one sees that if we identify Rm × Rn with Rm+n by

((x1, . . . , xm), (y1, . . . , yn)) 7→ (x1, . . . , xm, y1, . . . , yn), then they also get identified as metric spaces. In fact,√ if we use as product ′ ′ ′ 2 ′ 2 metric the second definition, namely d((p, q), (p , q )) = d1(p, p ) + d2(q, q ) , m n and d1, d2 are the Euclidean metrics for R , R , respectively, then d is the Euclidean metric for Rn+m. One more thing. The standard way to prove by the definition f : M ×N → P is continuous, where (M, d1), (N, d2), and (P, d) are metric spaces is as fllows. One begins with Let (p0, q0) ∈ M × N. Let ϵ > 0 be given. (or similar). Now one somehow has to find δ > 0; so one will have a statement such as Let δ = . The right hand side of this equality will most likely be a function of ϵ, p0, q0. If it isn’t 100% obvious that this d is positive, one has to verify that it is; one should be able to say δ > 0. Next one assumes p ∈ M, q ∈ N satisfy d1(p, p0) < δ and d2(q, q0) < δ. One hasto show that this implies d(f(p, q), f(p0, q0)) < ϵ.

With all this said, the continuity of the functions mentioned above becomes quite easy to prove. I will use the Euclidean√∑ distance(s) throughout. So |x| is ∈ R | | m 2 ∈ Rm | | √the∑ absolute∑ value of x if x ; x = i=1 xi if x , and ( x, y) = m 2 m 2 ∈ R×Rm ∼ R2m i=1 xi + i=1 yi if (x, y) = .

m m Continuity of µ Let (x0, y0) ∈ R × R . We have to prove µ is continuous at (x0, y0). Let ϵ > 0. Let δ = ϵ/2. Then δ > 0 and |x − x0| < δ, |y − y0| < δ implies

|µ(x, y)−µ(x0, y0)| = |(x+y)−(x0+y0)| = |(x−x0)+(y−y0)| ≤ |x−x0|+|y−y0| < 2δ = ϵ. Continuity follows.

m Continuity of ν Let (c0, x0) ∈ R × R . We have to prove ν is continuous at (c0, x0). Let ϵ > 0. Let ( ) ϵ ϵ δ = min 1, , . 2(|c0| + 1) 2(|x0| + 1)

Then δ > 0. If |c−c0| < δ, |x−x0| < δ then because δ ≤ 1, we have |c−c0| < 1, |x − x0| < 1, hence

|c| = |c−c0+c0| ≤ |c−c0|+|c0| < 1+|c0|, |x| = |x−x0+x0| ≤ |x−x0|+|x0| < 1+|x0|. 6 ALGEBRA OF CONTINUOUS FUNCTIONS 19

Thus

|cx − c0x0| = |c(x − x0) + (c − c0)x0| ≤ |c||x − x0| + |c − c0||x0| ϵ ϵ ≤ (1 + |c |)|x − x | + (1 + |x |)|x − x | < (1 + |c |)δ + (|x |)δ < + = ϵ. 0 0 0 0 0 0 2 2

m m Continuity of λ Let (x0, y0) ∈ R × R . We have to prove λ is continuous at (x0, y0). The proof uses the same idea as the proof of the continuity of ν, plus the Cauchy-Schwarz inequality |x · y| ≤ |x||y|. Let ϵ > 0. Let ( ) ϵ ϵ δ = min 1, , . 2(|x0| + 1) 2(|y0| + 1)

Then |x − x0| < δ implies |x| = |x − x0 + x0| < 1 + |x0|. If now |x − x0| < δ, |y − y0| < δ, then

|λ(x, y) − λ(x0, y0)| = |x · y − x0 · y0| = |x · (y − y0) + (x − x0) · y0| ≤ |x||x − x0| + |x − x0||y0| ϵ ϵ < |x|δ + |y |δ < (|x | + 1)δ + |y |δ ≤ + = ϵ. 0 0 0 2 2 Notice that if m = 1, then λ is just the usual product.

Continuity of abs Absolutely trivial.

As a corollary we obtain the following theorem. Theorem 18 Let M be a metric space. 1. Let f, g : M → Rm be continuous. Then the functions f + g, f − g from M to Rm are continuous. (f ± g : M → Rm is defined by f ± g(x) = f(x) ± g(x).) 2. Let f, g : M → Rm be continuous. Then f · g : Rm]toR is continuous, where f · g(x) = f(x) · g(x). 3. Let f : M → Rm be continuous. Then |f| : Rm]toR is continuous, where |f|(x) = |f(x)|. 4. Let f : M → Rm be continuous and let ϕ : Rm → R. Then ϕf : Rm → Rm is continuous, where ϕf(x) = ϕ(x)f(x). Proof. If f, g : M → Rm are continuous, the map p 7→ (f(p), g(p): M → Rm × Rm is continuous (Proposition 17). Now f + g is just this map followed by µ. If we follow it by λ, we get that f · g is continuous. If f : M → Rm, ϕ : M → R are continuous, then p 7→ (ϕ(p)mf(p)) : M → R×Rm is continuous; following by ν we get the continuity of ϕf. Specializing to ϕ(p) = −1 for all p ∈ M we get −g is continuous if g is continuous, hence we get f − g = f + (−g) is continuous. Following a continuous f with abs proves |f| continuous. 7 COMPLETENESS AND SOME REALITY CHECKS 20

7 Completeness and Some Reality Checks

An important property that a metric space may or may not have is completeness. To discuss what is meant by completeness, we need to introduce the notion of a Cauchy sequence

Definition 11 Lat M be a metric space. A sequence (pn) in M is said to be ]extbfCauchy sequence iff for each ϵ > 0 there exists N ∈ N such that d(pn, pk) < ϵ whenever n, k ≥ N. In a way, the following theorem presents the main example of a Cauchy sequence.

Theorem 19 Assume (pn) is a sequence of points in the metric space M. If (pn) converges, it is Cauchy.

Proof. Assume (pn) converges and let p be the limit. Let ϵ > 0 be given. Then ϵ/2 > 0 and there exists N such that n ≥ N implies d)pn, p) < ϵ/2. If now n, k ≥ N, then ϵ ϵ d(p , p ) ≤ d(p , p) + d(p, p ) < + = ϵ. n k n k 2 2

Is the converse true? The answer is: sometimes. Not in general. For example, consider the following sequence (xn) of rational numbers, defined defined by

∑n 1 x = , n = 1, 2, 3 ... n k2 k=1

If we consider Q as a metric space with the metric inherited from R,(xn) is a Cauchy sequence. To prove this without introducing gadgets like the integral test, I will prove first that n+p ∑ 1 1 ≤ (5) k2 n − 1 k=n for all n ∈ N, n ≥ 2, p ∈ N ∪ {0}. The proof is simple, it relies on the inequality and equality 1 1 1 1 = = − . k2 (k − 1)k k − 1 k The proof of (5) can now be done as follows. Notice, we assume n ≥ 2 to be sure that k ≥ 2 and 1/k − 1 is defined.

n+p n+p ∑ 1 ∑ 1 1 1 1 1 1 1 ≤ = − + − + ··· + − . k2 (k − 1)k n − 1 n n n + 1 n + p − 1 n + p k=n k=n The last sum “telescopes,” all terms but the first and last cancel so that we have n∑+p 1 ≤ 1 − 1 ≤ 1 k2 n − 1 n + p n − 1 k=n 7 COMPLETENESS AND SOME REALITY CHECKS 21 which is (5). To prove now it is a Cauchy sequence, let ϵ > 0 be given. Let 1 ≥ N = ϵ +1. If n, m N, without loss of generality we may assume m > n, write m = n + 1 + p for some p ≥ 0. Then

n+1+p ∑ 1 1 1 |x − x | = ≤ ≤ < ϵ m n k2 n N k=n+1 by (5) with n replaced by n + 1. (We can always assume m > n ≥ N instead of m, n ≥ N when dealing with Cauchy sequences because if m = n then d(pm, pn) = 0 and there is nothing to prove; if m < n, we can switch the roles of m, n.) We see that (xn) is a Cauchy sequence in Q. In 1644, the Italian mathe- matician Pietro Mengoli wondered about the limit of this sequence. He could not figure it out. It was only almost a century later, in 1735, that Euler proved 2 2 limn→∞ xn = π /6. In 1798, Legendre proved π irrational. It follows that the sequence (xn) does not converge in the metric space Q.

Definition 12 A metric space is said to be complete iff all of its Cauchy sequences converge.

The example we just did shows that the metric space Q is not complete.

Exercise 15 Prove that if M is a discrete metric space, M is complete.

lack of completeness is not a terribly bad sin. One can show that every metric space can be embedded into a complete space; essentially, all one does is to add a limit for each Cauchy sequence. Doing for Q is another way of producing R. But let us see that R is complete. There are many proofs; here is one way of doing it. We will use the concepts of lim sup and lim inf (which always exist for every sequence of real numbers) and the fact that a sequence of real numbers converges if and only if it is bounded and its liminf equals its limsup. First we will see that Cauchy sequences are always bounded; in fact, let’s have it as an exercise.

Exercise 16 Let M be a metric space, let (pn) be a Cauchy sequence in M. Then (pn) is bounded in the following sense: There is q ∈ M and a non-negative real number M such that d(pn, q) ≤ M for all n ∈ N.

Some comments may be in order. In the first place, if one q ∈ M works, every ′ other q in M works. In fact, if q, q ∈ M and d(q, pn) ≤ M for all n, then ′ ′ d(q , pn) ≤ M + d(q, q ) for all n ∈ N. A good choice for q, M for the case of the exercise is q = pN , where N is such that d(pn, pm) ≤ 1 if n, m ≥ N, and M = max(d(p1, pN ), . . . , d(pN−1, pN ), 1). It is now easy to prove: Theorem 20 The metric space R is complete. 7 COMPLETENESS AND SOME REALITY CHECKS 22

Proof. Let (pn) be a Cauchy sequence in R. To prove it converges, we will prove that lim infn→∞ pn equals lim supn→∞ pn. Let L = lim infn→∞ pn, L = ≤ ≥ lim supn→∞ pn. Since L L, to prove L = L it suffices to prove L L. In the first place, by Exercise 16, L, L ∈ R; neither is ∞ or −∞. Let ϵ > 0 be given. Because the sequence is Cauchy, there is N such that n, m ≥ N imply |xn − xm| < ϵ/2. Recall the definitions of lim sup and lim inf. First lim sup: lim sup x = lim sup x . n →∞ k n→∞ n n≤k | − | ≥ It follows that there is N2 such that L supn≤k xk < ϵ/2 for n N1. All we’ll ≥ ≥ use from this is that n N1 implies that L < supk≥n xk + (ϵ/2) for n N1. ≥ ≥ − ϵ Let N2 = max)N,N1). Then n N implies n N1, thus L 2 < supk≥n xk, ≥ − ϵ ≥ ≥ ≥ hence there exists k n such that L 2 < xk. But now k n N2 N, thus |xn − xk| < ϵ/2, hence ϵ x > x − > L − ϵ. n k 2

That is, we proved that if n ≥ N2, then xn > L − ϵ. Assume n ≥ N2. Then k ≥ N2 if k ≥ n so that xk ≥ L − ϵ. It follows that infk≥n xk ≥ L − ϵ for all n ≥ N2, thus L = lim inf xk ≥ L − ϵ. n→∞ k≥n Since ϵ > 0 is arbitrary, this implies L ≤ L.

Thew next set of exercises are important results from real analysis; they provide an alternative proof of the completeness of R. Thus, do not use com- pleteness to prove any of them.

Exercise 17 Let (xn) be a sequence of real numbers and assume it is increasing; xn ≤ xn+1 for all n ∈ N. Prove: If the sequence is bounded above, it converges to a finite value. Otherwise it diverges to infinity. In fact, in either case

lim xn = sup{xn : n ∈ N}. n→∞

Similarly, if (xn) is a decreasing sequence of real numbers, then

lim xn = inf{xn : n ∈ N}; n→∞ it follows that such a sequence converges if and only if it is bunded below; oth- erwise it diverges to −∞.

The proof is quite easy; letting σ = sup{xn : n ∈ N}, assume σ < ∞. Given ϵ > 0 there is some N ∈ N with xN > σ − ϵ; since the sequence increases xn > σ − ϵ if n ≥ N. If σ = ∞ one argues similarly,but differently. This result, together with is one of the best ways of proving convergence of sequences of real numbers. Here are is a classical example. 7 COMPLETENESS AND SOME REALITY CHECKS 23

Example 1. Let (fn) be the Fibonacci sequence; the sequence defined induc- tively by f1 = 1, f2 = 1, fn = fn−1 + fn−2 if n ≥ 3. We will prove that f 1 √ lim n+1 = (1 + 5). →∞ n fn 2

Let us set gn = fn+1/fn. Then, of course, gn = (fn + fn−1)/fn = 1 + (1/gn−1) and taking limits here we conclude that IF there√ is a limit ℓ it must satisfy ℓ = 1 + 1/ℓ, hence√ ℓ2 − ℓ − 1 = 0, thus ℓ = (1 ± 5)/2 and, since it can’t be ≤ 0, ℓ = (1 + 5)/2. But why does a limit exist? Here are the first few terms of the sequence (gn) (up to three decimal places). 1, 2, 1.5, 1.667, 1.6, 1.625, 1.615 Writing out terms, one sees that the odd terms increase, the even terms de- creases. Can we prove this? It might be a good idea to have a formula giving gn interms of gn−2 rather than gn−1. That, of course, is quite easy: 1 1 2gn−2 + 1 − 1 gn = 1 + = 1 + 1 = = 2 . gn−1 1 + gn−2 + 1 gn−2 + 1 gn−2 √ 1 Let us write, as is customary, φ = 2 (1 + 5). Notice that 2φ + 1 = φ. φ + 1

With this we can prove: If gn−2 < φ, then gn < φ, and conversely, gn−2 > φ, implies gn < φ. In fact, assume gn−2 < φ. Then gn−2 +1 < φ+1, 1/(gn−2 +1) > 1/(φ + 1), and 1 1 2φ + 1 gn = 2 − < 2 − = = φ. gn−2 + 1 φ + 1 φ = 1

The proof that gn−2 > φ implies gn > φ is identical. Consider now the difference gn − gn−2. We have 2 − − 2gn−2 + 1 gn−2 gn−2 1 gn − gn−2 = − gn−2 = − . gn−2 + 1 gn−2 + 1 √ 2 Suppose√ gn−2 < φ. Since f(x) = x − x − 1 < 0 for (1 − 5)/2 < x < (1 + 5)/2 = φ, in this case gn − gn−2 > 0 and gn < φ. Notice that g1 = 1 < φ, thus the sequence of odd terms is increasing. In case that’s not clear, we have by induction: g2k−1 < φ for all k, and because g2k−1 < φ we also have that g2k+1 −g2k−1 > 0. The sequence (g2k−1) is increasing and bounded above by φ. Thus it converges. Set α = limk→∞ g2k−1. Similarly one sees that the sequence (g2k) decreases and is bounded below by φ. Let β = limk→∞ g2k. Finally, we need to see that α = β = φ. That is easy. From

2g2(k−1) + 1 g2k = g2(k−1) + 1 we get taking limits α = (2α + 1)/(α + 1), hence α2 − α − 1 = 0 and, since α must be ≥ 0, α = φ. Similarly β = φ. It now follows that limn→∞ gn = φ. 7 COMPLETENESS AND SOME REALITY CHECKS 24

Exercise 18 Let (pn) be a Cauchy sequence in a metric space M. Prove: If (pn) has a convergent subsequence, then (pn) itself converges.

This is also quite easy because once some terms with a large index of a Cauchy sequence are near something, all terms with large indices will be near that something. An alternative proof of completeness can now be obtained as a consequence of the next exercise, which is interesting but not too frequently used.

Exercise 19 Let (xn) be a sequence of real numbers. Prove: It contains an increasing or a decreasing subsequence.

Hint: To prove a statement of the form “p or q” one usually assumes that one of p or q is false, and proves the other one has to hold. So assume, for example, that the sequence contains no decreasing subsequences. To start the increasing subsequence it might be good to find the smallest term of the sequence and start there. Why will there be such a term? There would be also a smallest term among the terms following the smallest term of the sequence. And so forth.

Using these exercises, here is how one proves completeness: Assume (xn) is a Cauchy sequence of real numbers. By Exercise 16 it is bounded. By Exercise 19, it has an increasing or decreasing subsequence; such a subsequence, being bounded, converges. Thus (xn) has a convergent subsequence hence, by Exercise 18, it converges.

Exercise 20 Prove Rm is complete.

The proof is quite straightforward. Show that a sequence (xn) = ((xn1, . . . , xnm)) m is Cauchy in R if and only if the m sequences (xnk), k = 1, . . . , m are Cauchy in R. A similar proof shows that if M,N are complete metric spaces, so is M × N. The following result is also quite useful. Theorem 21 Assume M is a . A subspace N of Mis complete if and only if N is a closed subset of M.

Proof. Assume first N is a closed subset of M and let (xn) be a Cauchy sequence in N. Then is is also a Cauchy sequence in M,hence converges in M. But since N is closed, the limit must be in N. Thus a Cauchy sequence in N converges in N,hence N is complete. Conversely, assume Nis complete. Let (xn) be a sequence in N converging to a point x ∈ M. As a convergent sequence it is Cauchy, thus it must converge in N, hence x ∈ N. Thus x contains all of its limit points, hence it is closed. 8 COMPACTNESS 25

8 Compactness

Here I really differ with the author of the textbook. His definition of a compact set is absolutely not standard, and I think it is better if you get the standard one.

Definition 13 Let M be a metric space, let C ⊂ M. An open covering of C is a non-empty∪ family U of open subsets of M such that their union includes C: ⊂ C U∈U U. Here are some comments. Frequently the open cover of a set C is indexed; { } an open∪ covering can be described as a family Uλ λ∈Λ of open sets such that ⊂ { } C λ∈Λ Uλ. An open covering∪ of the whole space M is a family Uλ λ∈Λ of open sets such that M = λ∈Λ Uλ. A typical way open coverings are defined is as follows: Suppose C is a subset of a metric space. For each x ∈ C select rx > 0 (usually, satisfying some specific property). Then {B(x; rx)}x∈C is an open covering of C. For example, if M = R, the following families are open coverings of R:

1. U1 = {(−n, n): n ∈ R}.

2. U2 = {(x, x + 1) : x ∈ R}.

3. U3 = {R}.

4. U4 = {(−1, 1)} ∪ {(1/n, ∞): n ∈ N} ∪ {(−∞, −1/n): n ∈ N}.

Definition 14 Let M be a metric space, C ⊂ M and U and open covering of C.A subcovering (of U) is a family V ⊂ U that is still a covering of C.

For example, consider the covering U1 of the first example above. The family V = {(−p, p): p ∈ N, p prime} is a subcovering of U1. Of course, every covering is a subcovering of itself. Here is the main definition of this section. Definition 15 A subset C of a metric space M is compact iff every open covering of C has a finite subcovering. Before wondering what compact spaces are good for, let us see some examples.

The proof that a set C is compact, by the definition (not a very desirable thing to do, as it turns out), goes somewhat like this. Let U be an open covering of C. Nothing else can be assumed∪ of U. ∈ U ⊂ n Next somehow one produces sets U1,...,Un and proves C i=1 Ui. One can also assume the initial covering is indexed, so one might start by saying let { } ∈ Uλ λ∈Λ be anopen∪ covering of C. Then one has to produce λ1, . . . , λn Λ ⊂ n such that C j=1 Uλj . Here is a very simple example. If C is a finite subset of a metric space, then C is compact. 8 COMPACTNESS 26

Proof. Assume U is an open covering of C. If C = ∅, select any U ∈ U; then {U} is an open subcovering of U. If C ≠ ∅, write C = {p1, . . . , pn}. Since U covers C, for each i = 1, . . . , n there is U1 ∈ U such that pi ∈ Ui. Then {U1,...,Un} is a finite subcovering of U.

On the other hand, to prove a set not compact it suffices to exhibit a single covering without a finite subcovering. For example, R is not compact. In fact, consider the covering {(−n, n): n ∈ N} it is not hard to show it has no finite subcovering. In fact, a finite subcovering would be of the form Ui = (−ni, ni), ∈ N ∈ R i =∪ 1,...,N, where n1, . . . , nN . If x , x > max(n1, . . . , nN ), then ∈ N x / i=1 Ui.

What are compact sets good for? One important thing for which they are good for is to make local properties global. To be a bit more precise, they are sets in which local properties are global. For example, a typical compactness result is that if M is a compact metric space, f : M → N continuous (where N is another metric space), then it is uniformly continuous. Continuity implies that given ϵ > 0, for every p ∈ M there is a δ > 0, possibly depending on p, such that if q ∈ B(p, δ) then something happens. In the case of continuity what happens is d(f(q), f(p)) < ϵ. If we emphasize the dependence of δ on p and call it δp, the family of open balls {B(p, δp)}p∈M is an open covering of M. Compactness allows us to extract from this possibly humongous family of balls a finite number, and from there we can get a δ > 0 that works for all points. We’ll see a complete proof later on. First some basic stuff about compactness. We have to begin taking care of a certain ambiguity. Suppose C is a subset of a metric space M. If it is a compact subset of M, is it also compact as a metric space? If it is compact as a metric space (with the metric inherited from M, is it also compact as a subset of M? The answer to both questions is yes. It really is a trivial matter, but it needs to be done. Going through it might provide further practice in dealing with compactness. Suppose C is compact as a metric space. To prove it is also compact as a subset of M, we assume U is an open covering∪ of C in M; that is a family∪ of open ⊂ ∩ subsets of M whose union includes C: C U∈U U. Then C = U∈U (U C) so that {U ∩ C : U ∈ U} is an open covering of the compact metric space C, hence there is a finite subcovering {U1 ∩ C,...,Un ∩ C}. Then {U1,...,Un} is a finite subcovering of U. For the converse we assume C is compact as a subset of M and assume that U is an open covering of the∪ metric space C; thus U is a family of subsets of C, open in C, such that C = U∈U U. Each U in U isopen in C, thus it is of the form U = WU ∩ C, where WU is open in M. This is sort of nasty notation so I’ll start the proof of the converse again, using an indexed family as covering. To prove C is a compact metric space, assume { } Uλ λ∈Λ is an open∪ covering of the metric space C; that is Uλ is open in C for ∈ each λıΛ and C = λ∈Λ Uλ. For each λ Λ, because Uλ∪is open in C, there ∩ ⊂ exists Wλ open in M such that Uλ = Wλ C. Then C λ∈Λ Wλ and, since it is a compact subset of M, we see that there exist λ1, . . . , λm ∈ Λ such that 8 COMPACTNESS 27

∪ ∪ ⊂ m m { }n C i=1 Wλi . Intersecting wit C we get C = i=1 Uλi , proving Uλi i=1is a finite subcovering of {Uλ}λ∈Λ. Since {Uλ}λ∈Λ was an arbitrary covering of C, compactness follows.

One consequence is that when dealing with compactness we can always as- sume that the compact set is the whole metric space. Another thing to notice is that since the definition of compactness is given exclusively in terms of open sets, if a set is compact for one metric, it is compact for all equivalent metrics. Proposition 22 If C is compact, C is bounded. Note: A subset S of a metric space M is bounded iff there exists a ball B(p; r) in M such that S ⊂ B(p; r). A simple application of the triangle inequality shows that if there is p ∈ M, r > 0 with S ⊂ B(p, r), then for every q ∈ M there is r′ > 0 such that S ⊂ B(q; r′). Boundedness is not a big deal, as the exercise following this proposition shows. But boundedness with respect to a whole class of equivalent metrics is a big deal. Proof. Assume C is not bounded. Let p ∈ M. Then for every r > 0 it holds that C ̸⊂ B(p, r). It follows that the family {B(p; n): n ∈ N} is an open covering of C without a finite subcovering. It follows that if C is not bounded, it is not compact.

As mentioned before, being bounded in a metric space is not a big deal. Given any metric, one cam always find an equivalent one that is bounded. We leave the proof as an exercise. Exercise 21 Let (M, d) be a metric space. For p, q ∈ M define

d1(p, q) = min(d(p, q), 1).

Prove that d1 is a metric for M, d1 is equivalent to d, and d1 is bounded. What is a bigger deal is that a compact set is bounded no matter what equivalent metric one uses.

Proposition 23 Assume C is a compact subset of the metric space M. Then C is a closed subset of M. Proof. Again we proceed by the contrapositive, proving that if C is not closed it is not compact. So assume C is not closed. That means that there is at least one cluster point of C not in C. So assume p ∈ C′\C. For r > 0 let Ur = {q ∈ M : d(q, p) > r}. It is clear that each Ur is open and ∪ Ur = M\{p} ⊃ C. r>0 { } Thus Ur r>0 is an open covering of C. Suppose it admits∪ a finite subcov- ⊂ m ering; say there exist r1, . . . , rn all positive such that C i=1 Uri . If r = 8 COMPACTNESS 28

∪ m ⊂ ∩ min(r1, . . . , rn), then r > 0 and i=1 Uri = Ur, so C Ur. But then B(p; r/2) C = ∅; by part 2(c) of Proposition 5 this contradicts that p is a cluster point of C. This contradiction proves C is not compact.

Another not too hard result is.

Proposition 24 Assume M is a compact metric space and C is a closed subset. Then C is compact.

Proof. We have to show that every open covering of C admits a finite subcover. So assume U is an open covering of C. We know that M is compact, suggesting extending the covering of C to one of M. That is easily done, just throw in M\C. Since C is closed, M\C is open and U ∪ {M\C} is an open covering of M. Thus there exists a finite number of sets in that covering which also cover M; there is no harm in assuming∪ M\C is one of them;∪ that is, there exist ∈ U m ∪ \ ⊂ m ∪ \ U1,...,Um such that M∪= i=1 Ui M C. Thus C i=1 Ui M C and, ∩ \ ∅ ⊂ m since C (M C) = , C i=1 Ui.

The following is an important property of compactness:

Theorem 25 Let M be a compact metric space and let (Fn) be a decreasing ∩∞ ̸ ∅ sequence of closed non-empty subsets of M. Then n=1Fn = . ∩∞ ∅ Proof. We proceed by contradiction; assume n=1Fn = . In this case, let Un = M\Fn is open for each n ∈ N and ∪∞ \ ∩∞ \ Un = M n=1 Fn = M set = M; n=1 { } ∈ N i.e., ∪Un n∈N is an open covering of M. There exist thus n1, . . . , nN such that N ∞U = M. Without loss of generality we may assume n < ··· < k=1 nk ∪ 1 N ∞ nN ; since the Fn’s decrease the Un’s increase. Thus M = k=1 Unk = UnN . ∅ But then FnN = , a contradiction that proves the theorem.

Exercise 22 This exercise generalizes considerably the result of Theorem 25. It can be used as another definition of compactness. First a definition. A metric space M is said to satisfy the finite intersection property (FIP) iff the following holds. Whenever {Fλ}λ∈Λ is a family of closed sets such that the intersection of any finite subfamily is not empty, then the intersection of all the sets in the family is not empty. In symbols (mostly): If {Fλ}λ∈Λ is a family of closed sets then ∩ ∩ Fλ ≠ ∅ ∀Γ ⊂ Λ, Γ finite ⇒ Fλ ≠ ∅. λ∈Γ λ∈Λ Prove: A metric space satisfies FIP if and only if it is compact. 8 COMPACTNESS 29

Hint: De Morgan laws and contradiction. Or contradiction and De Morgan laws. Let’s summarize what we know of compact sets. They are bounded and closed. Suppose C is a compact subset of a metric space and A is a subset of C. As we know from the section of subsets, because C is closed in M, the set A is closed in C if and only if it is closed in M. Because C is also compact as a subspace of M, Proposition 24 applies and we can say that A is compact. A closed subset of a compact set is compact. The property that every open covering has a finite subcovering is very important. Iy is very useful to know one has it, but frequently very difficult to verify directly. To compensate for this difficulty there are several other equivalent (or mostly equivalent) definitions of compactness, one of the most common being in terms of sequences. It is the definition in our text; this definition is equivalent to compactness in metric spaces, but not in general topological spaces. That is why it may be useful to give it a slightly different name. Definition 16 Let M be a metric space. We say M is sequentially compact iff each sequence in M has a convergent subsequence. Sequentially compact metric spaces are compact, and we’ll prove the equiva- lence. But for the time being, you may amuse yourself proving that Propositions 22, 23, and 24 are valid if one replaces “compact” by “sequentially compact.” Obviously you should do this using only the definition of sequential compactness. Exercise 23 1. If C is sequentially compact, C is bounded. 2. Assume C is a sequentially compact subset of the metric space M. Then C is a closed subset of M. 3. Assume M is a compact metric space and C is a closed subset. Then C is sequentially compact. Sequential compactness is usually easy to verify; compactness is not so easy. We will prove the equivalence of the two concepts for metric spaces. That compactness implies sequential compactness is easy; the converse is hard. I prove it in several steps; each step will be a property shared by sequentially compact (hence also compact) sets; these properties are important in their own right. Theorem 26 Let M be a metric space. It is compact if and only if it is se- quentially compact. Proof. To avoid getting stuck in trivial nonsense, assume M ≠ ∅. The result is trivial if M = ∅. Let us do the hard part first, so assume M is sequentially compact. Step 1. For every ϵ > 0, there exists a finite number of points p1, . . . , pk ∈ M such that ∪k M = B(pν ; ϵ). ν=1 8 COMPACTNESS 30

In fact, let ϵ > 0 and assume there is no such finite set. By induction we construct a sequence (pn) with the property that d(pn, pm) ≥ ϵ for all n, m ∈ N, n ≠ m. To start, let p1 be any element of M (here is where the assumption M ≠ ∅ is convenient). By our assumption (no finite set of balls of radius ϵ covers M) M ≠ B(p1; r). Thus there is p2 ∈ M, p2 ∈/ B(p1, r); i.e., d(p2, p1) ≥ ϵ. ∈ ≥ ≥ Assume now found p1, . . . , pn M for some n∪ 2 such that d(pk, pℓ) ϵ ≤ ̸ ≤ ̸ n for 1 k =∪ℓ n. By our assumption, M = i=1 B(pi; ϵ), hence there is ∈ \ n ≥ pn+1 M ( i=1 B(pi; ϵ)). Then d(pn+1, pi) ϵ for i = 1, . . . , n. By induction, we proved such a sequence exists. But this sequence can- not have any convergent subsequence; convergent subsequences are Cauchy se- quences implying that there have to be terms (lots of them!) at distance< ϵ (also at distance < ϵ/2, < ϵ/4; etc), but any two terms of the sequence (hence of any subsequence) are at distance ≥ ϵ from each other. Step 1 is done. Step 2. M has a countable dense subset. That is, there exists a subset D of M such that D is countable (its elements can be listed as a sequence) and such that D¯ = M; every point of M is a limit point of D. One says M is separable. ∪ kn For n ∈ N let Dn = {pn,1, . . . , pn,k } such that M = B(pn,ν ; 1/n). Let ∪∞ n ν=1 D = n=1 Dn. As a countable union of finite sets, D is countable. Let p ∈ M; we need to see p is a limit point of D. For this it suffices to see that B(p; r) ∩ D ≠ ∅ for all r > 0; so let r > 0. Let n ∈ N be such that 1/n < r. There is ν ∈ {1, . . . , kn} such that p ∈ B(pn,ν ; 1/n) thus d(pn,ν , p) < 1/n < r. Since pn,ν ∈ D, we are done. Step 3. This is an intermediate step, of little importance once the theorem is proved. Every open covering of U has a countable subcovering. Assume U is an open covering of M. Let D be a countable dense subset of M. Here is a tempting argument, but it would be wrong. Let p ∈ D. Them by definition of covering, p ∈ U for some U ∈ U; select one such member of U and denote it by Up. That is, for p ∈ D, p ∈ Up ∈ U. Then {Up : p ∈ D} is a family of open sets; it seems almost obvious that it covers M. Think of it in terms of the real line, where D could be the rationals. For each rational you take a set containing a whole interval around the rational; how much of the reals can the union of such sets miss? The obvious answer is nothing, and it remains obvious until one tries to prove it, and one sees one can’t. Because the correct answer is “a lot.” I will get back to this question after the theorem is proved; I mention this here to ex[lain a bit why the arguent is a bit convoluted. So let’s return to the beginning; we have U and D. We need to get not just any set Up ∈ U but large ones, so for p ∈ D we let

rp = sup{r > 0 : ∃ U ∈ U,B(p, r) ⊂ U}.

Since U is a covering, it is clear that rp > 0 for all p ∈ D. Moreover, for each p ∈ D there exists Up ∈ U such that B(p; 3rp/4) ⊂ Up. We claim {Up}p∈D is a covering of M. It suffices to prove that {B(p; rp/2)}p∈D covers M. Let q ∈ M. Now (please, try to follow this argument, it is mildly tricky), there is U ∈ U such that q ∈ U. SInce U is open, there is r > 0 such that B(q, r) ⊂ U. Because 8 COMPACTNESS 31

D is dense, there is p ∈ D such that p ∈ B(q, r/4). This implies B(p, 3r/4) ⊂ U. In fact, we have for x ∈ B(p, r/s), d(x, q) ≤ d(x, p) + d(p, q) < 3r/4 + r/4 = r, thus x ∈ B(q, r) ⊂ U. There is no reason to assume this U is Up but, because U(p, 3r/4) ⊂ U ∈ U, we conclude that 3r/4 ≤ rp. Since p ∈ B(q; r/4), we have q ∈ B(p; r/4) ⊂ B(p; rp/3) ⊂ B(p; 3rp/4). This part of the proof can be rewritten in a nicer way. Step 4. M is compact. Assume U is an open covering of M. By Step 3, we may assume that U is countable, and write U = {U1,U2,U3,...}. We now basically repeat the argument of Step 1. If no finite subcovering exists we can construct ∈ ∈ ∪ ∈ ∪ ∪ a sequence (pn) in∪M such that p1 / U1, p2 / U1 U2, p3 / U1 U2 U3, dots; ∈ n−1 in general pn / j=1 Uj. By sequential compactness, there is a convergent ∈ ∈ N subsequence (pnk ); say limk→∞ pnk = p. Then p Uℓ for some ℓ . It follows ∈ ≥ that there is K such that pnk Uℓ for k K. However, the construction of the sequence implies that pn ∈/ Uℓ for n > ℓ; only a finite number of terms of the sequence (at most) can be in Uℓ so the assumption that there is no finite subcover has led to a contradiction. The hard part of the theorem is proved.

Conversely assume M is compact and assume (pn) is a sequence in M. As- sume it has no convergent subsequence. It is then easy to see that the sets Fn = {pk : k ≥ n} are all closed, for the simple reason that they have no cluster points. Since thery are all not empty, we conclude by Theorem 25 that ∩∞ ̸ ∅ ∩∞ ∅ n=1Fn = . But clearly n=1Fn = , so our assumption of the existence of a sequence with no convergent subsequences has lead us to a contradiction.

Here is a strange set that will probably appear again in the measure theory part of this course. Write out the rationals( as a sequence; Q = {r1), r2, r3,...}. − ϵ ϵ ∈ N Let ϵ > 0. Consider the open intervals In = rn n+1 , rn + n+1 for n . ∪∞ 2 2 Let U = n=1. Now the set U contains an interval around each rational number; the rationals are dense in R. How can U not be all of R? Think about it. Try to imagine how U looks.

Here is a simple fact. If you take a number of intervals of a given length, their combined length will be at most the sum of their lengths; it will be the sum of their length only if there are no overlaps. So the total length of the set covered by say the first N of these intervals satisfies (writing ℓ(A) for the length of the set A)

∪N ∑n 1 ∑N 1 ℓ( I ≤ 2 = ϵ = (1 − 2−N−1)ϵ < ϵ. n ϵ2n+1 2n n=1 i=1 n=1 So as we keep on adding intervals we never get past ϵ in length. The set U has a total length of < ϵ. Try again to picture how U looks.