To progress further in our study of function spaces, we will need to develop the standard theory of metric spaces, and of the closely related theory of topological spaces (i.e. point-set topology). I will be assuming that students in my class will already have encountered these concepts in an undergraduate topology or real analysis course, but for sake of completeness I will briefly review the basics of both spaces here.
– Metric spaces –
In many spaces, one wants a notion of when two points in the space are “near” or “far”. A particularly quantitative and intuitive way to formalise this notion is via the concept of a metric space.
Definition 1. (Metric spaces) A metric space is a set X, together with a distance function which obeys the following properties:
- (Non-degeneracy) For any , we have , with equality if and only if x=y.
- (Symmetry) For any , we have .
- (Triangle inequality) For any , we have .
Example 1. Every normed vector space is a metric space, with distance function .
Example 2. Any subset Y of a metric space is also a metric space , where is the restriction of d to . We call the metric space a subspace of the metric space .
Example 3. Given two metric spaces and , we can define the product space to be the Cartesian product with the product metric
(One can also pick slightly different metrics here, such as , but this metric only differs from (1) by a factor of two, and so they are equivalent (see Example 5 below).
Example 4. Any set X can be turned into a metric space by using the discrete metric , defined by setting when and otherwise.
Given a metric space, one can then define various useful topological structures. There are two ways to do so. One is via the machinery of convergent sequences:
Definition 2. (Topology of a metric space) Let be a metric space.
- A sequence of points in X is said to converge to a limit if one has as . In this case, we say that in the metric d as , and that in the metric space X. (It is easy to see that any sequence of points in a metric space has at most one limit.)
- A point x is an adherent point of a set if it is the limit of some sequence in E. (This is slightly different from being a limit point of E, which is equivalent to being an adherent point of ; every adherent point is either a limit point or an isolated point of E.) The set of all adherent points of E is called the closure of X. A set E is closed if it contains all its adherent points, i.e. if . A set E is dense if every point in X is adherent to E, or equivalently if .
- Given any x in X and , define the open ball centred at x with radius r to be the set of all y in X such that . Given a set E, we say that x is an interior point of E if there is some open ball centred at x which is contained in E. The set of all interior points is called the interior of E. A set is open if every point is an interior point, i.e. if .
There is however an alternate approach to defining these concepts, which takes the concept of an open set as a primitive, rather than the distance function, and defines other terms in terms of open sets. For instance:
Exercise 1. Let be a metric space.
- Show that a sequence of points in X converges to a limit if and only if every open neighbourhood of x (i.e. an open set containing x) contains for all sufficiently large n.
- Show that a point x is an adherent point of a set E if and only if every open neighbourhood of x intersects E.
- Show that a set E is closed if and only if its complement is open.
- Show that the closure of a set E is the intersection of all the closed sets containing E.
- Show that a set E is dense if and only if every non-empty open set intersects E.
- Show that the interior of a set E is the union of all the open sets contained in E, and that x is an interior point of E if and only if some neighbourhood of x is contained in E.
In the next section we will adopt this “open sets first” perspective when defining topological spaces.
On the other hand, there are some other properties of subsets of a metric space which require the metric structure more fully, and cannot be defined purely in terms of open sets (see Example 14) below (although some of these concepts can still be defined using a structure intermediate to metric spaces and topological spaces, namely a uniform space). For instance:
Definition 3. Let (X,d) be a metric space.
- A sequence of points in X is a Cauchy sequence if as (i.e. for every there exists such that for all ).
- A space X is complete if every Cauchy sequence is convergent.
- A set E in X is bounded if it is contained inside a ball.
- A set E is totally bounded in X if for every , E can be covered by finitely many balls of radius .
Exercise 2. Show that any metric space can be identified with a dense subspace of a complete metric space , known as a metric completion or Cauchy completion of X. (For instance, is a metric completion of .) (Hint: one can define a real number to be an equivalence class of Cauchy sequences of rationals. Once the reals are defined, essentially the same construction works in arbitrary metric spaces.) Furthermore, if is another metric completion of , show that there exists an isometry between and which is the identity on X. Thus, up to isometry, there is a unique metric completion to any metric space.
Exercise 3. Show that a metric space X is complete if and only if it is closed in every superspace Y of X (i.e. in every metric space Y for which X is a subspace). Thus one can think of completeness as being the property of being “absolutely closed”.
Exercise 4. Show that every totally bounded set is also bounded. Conversely, in a Euclidean space with the usual metric, show that every bounded set is totally bounded. But give an example of a set in a metric space which is bounded but not totally bounded. (Hint: use Example 4.)
Now we come to an important concept.
Theorem 1. (Heine-Borel theorem for metric spaces) Let be a metric space. Then the following are equivalent:
- (Sequential compactness) Every sequence in X has a convergent subsequence.
- (Compactness) Every open cover of X (i.e. a collection of open sets whose union contains X) has a finite subcover.
- (Finite intersection property) If is a collection of closed subsets of X such that any finite subcollection of sets has non-empty intersection, then the entire collection has non-empty intersection.
- X is complete and totally bounded.
Proof. (2 1) If there was an infinite sequence with no convergent subsequence, then given any point x in X there must exist an open ball centred at x which contains for only finitely many n (since otherwise one could easily construct a subsequence of converging to x). By property 2, one can cover X with a finite number of such balls. But then the sequence would be finite, a contradiction.
(1 4) If X was not complete, then there would exist a Cauchy sequence which is not convergent; one easily shows that this sequence cannot have any convergent subsequences either, contradicting 1. If X was not totally bounded, then there exists such that X cannot be covered by any finite collection of balls of radius ; a standard greedy algorithm argument then gives a sequence such that for all distinct n, m. This sequence clearly has no convergent subsequence, again a contradiction.
(2 3) This follows from de Morgan’s laws and Exercise 1.3.
(4 3) Let be as in 3. Call a set E in X rich if it intersects all of the . Observe that if one could cover X by a finite number of non-rich sets, then (as each non-rich set is disjoint from at least one of the ), there would be a finite number of whose intersection is empty, a contradiction. Thus, whenever we cover X by finitely many sets, at least one of them must be rich.
As X is totally bounded, for each we can find a finite set such that the balls cover X. By the previous discussion, we can then find such that is rich.
Call a ball asymptotically rich if it contains infinitely many of the . As these balls cover X, we see that for each n, is asymptotically rich for at least one i. Furthermore, since each ball of radius can be covered by balls of radius , we see that if is asymptotically rich, then it must intersect an asymptotically rich ball . Iterating this, we can find a sequence of asymptotically rich balls, each one of which intersects the next one. This implies that is a Cauchy sequence and hence (as X is assumed complete) converges to a limit x. Observe that there exist arbitrarily small rich balls that are arbitrarily close to x, and thus x is adherent to every ; since the are closed, we see that x lies in every , and we are done.
Remark 1. The hard implication of the Heine-Borel theorem is noticeably more complicated than any of the others. This turns out to be unavoidable; the Heine-Borel theorem turns out to be logically equivalent to König’s lemma in the sense of reverse mathematics, and thus cannot be proven in sufficiently weak systems of logical reasoning.
Any space that obeys one of the four equivalent properties in Lemma 1 is called a compact space; a subset E of a metric space X is said to be compact if it is a compact space when viewed as a subspace of X. There are some variants of the notion of compactness which are also of importance for us:
- A space is -compact if it can be expressed as the countable union of compact sets. (For instance, the real line with the usual metric is -compact.)
- A space is locally compact if every point is contained in the interior of a compact set. (For instance, is locally compact.)
- A subset of a space is precompact or relatively compact if it is contained inside a compact set (or equivalently, if its closure is compact).
Another fundamental notion in the subject is that of a continuous map.
Exercise 5. Let be a map from one metric space to another . Then the following are equivalent:
- (Metric continuity) For every and there exists such that whenever .
- (Sequential continuity) For every sequence that converges to a limit , converges to f(x).
- (Topological continuity) The inverse image of every open set V in Y, is an open set in X.
- The inverse image of every closed set F in Y, is a closed set in X.
A function f obeying any one of the properties in Exercise 5 is known as a continuous map.
Exercise 6. Let be metric spaces, and let and be continuous maps. Show that the combined map defined by is continuous if and only if f and g are continuous. Show also that the projection maps , defined by , are continuous.
Exercise 7. Show that the image of a compact set under a continuous map is again compact.
– Topological spaces –
Metric spaces capture many of the notions of convergence and continuity that one commonly uses in real analysis, but there are several such notions (e.g. pointwise convergence, semi-continuity, or weak convergence) in the subject that turn out to not be modeled by metric spaces. A very useful framework to handle these more general modes of convergence and continuity is that of a topological space, which one can think of as an abstract generalisation of a metric space in which the metric and balls are forgotten, and the open sets become the central object. [There are even more abstract notions, such as pointless topological spaces, in which the collection of open sets has become an abstract lattice, in the spirit of Notes 4, but we will not need such notions in this course.]
Definition 4. (Topological space) A topological space is a set X, together with a collection of subsets of X, known as open sets, which obey the following axioms:
- and X are open.
- The intersection of any finite number of open sets is open.
- The union of any arbitrary number of open sets is open.
The collection is called a topology on X.
Given two topologies on a space X, we say that is a coarser (or weaker) topology than (or equivalently, that is a finer (or stronger) topology than ), if (informally, has more open sets than ).
Example 5. Every metric space generates a topology , namely the space of sets which are open with respect to the metric d. Observe that if two metrics d, d’ on X are equivalent in the sense that
for all x, y in X and some constants , then they generate an identical topology.
Example 6. The finest (or strongest) topology on any set X is the discrete topology , in which every set is open; this is the topology generated by the discrete metric (Example 4). The coarsest (or weakest) topology is the trivial topology , in which only the empty set and the full set are open.
Example 7. Given any collection of sets of X, we can define the topology generated by to be the intersection of all the topologies that contain ; this is easily seen to be the coarsest topology that makes all the sets in open. For instance, the topology generated by a metric space is the same as the topology generated by its open balls.
Example 8. If is a topological space, and Y is a subset of X, then we can define the relative topology to be the collection of all open sets in X, restricted to Y, this makes a topological space, known as a subspace of .
Any notion in metric space theory which can be defined purely in terms of open sets, can now be defined for topological spaces. Thus for instance:
Definition 5. Let be a topological space.
- A sequence of points in X converges to a limit if and only if every open neighbourhood of x (i.e. an open set containing x) contains for all sufficiently large n. In this case we write in the topological space , and (if x is unique) we write .
- A point is a sequentially adherent point of a set E if it is the limit of some sequence in E.
- A point x is an adherent point of a set E if and only if every open neighbourhood of x intersects E. The set of all adherent points of E is called the closure of E and is denoted .
- A set E is closed if and only if its complement is open, or equivalently if it contains all its adherent points.
- A set E is dense if and only if every non-empty open set intersects E, or equivalently if its closure is X.
- The interior of a set E is the union of all the open sets contained in E, and x is called an interior point of E if and only if some neighbourhood of x is contained in E.
- A space X is sequentially compact if every sequence has a convergent subsequence.
- A space X is compact if every open cover has a finite subcover.
- The concepts of being -compact, locally compact, and precompact can be defined as before. (One could also define sequential -compactness, etc., but these notions are rarely used.)
- A map between topological spaces is sequentially continuous if whenever converges to a limit x in X, converges to a limit f(x) in Y.
- A map between topological spaces is continuous if the inverse image of every open set is open.
Remark 2. The stronger a topology becomes, the more open and closed sets it will have, but fewer sequences will converge, there are fewer (sequentially) adherent points and (sequentially) compact sets, closures become smaller, and interiors become larger. There will be more (sequentially) continuous functions on this space, but fewer (sequentially) continuous functions into the space. Note also that the identity map from a space X with one topology to the same space X with a different topology is continuous precisely when is stronger than .
Example 9. In a metric space, these topological notions coincide with their metric counterparts, and sequential compactness and compactness are equivalent, as are sequential continuity and continuity.
Exercise 7′. (Urysohn’s subsequence principle) Let be a sequence in a topological space X, and let x be another point in X. Show that the following are equivalent:
- converges to x.
- Every subsequence of converges to x.
- Every subsequence of has a further subsequence that converges to x.
Exercise 8. Show that every sequentially adherent point is an adherent point, every continuous function is sequentially continuous.
Remark 3. The converses to Exercise 8 are unfortunately not always true in general topological spaces. For instance, if we endow an uncountable set X with the cocountable topology (so that a set is open if it is either empty, or its complement is at most countable) then we see that the only convergent sequences are those which are eventually constant. Thus, every subset of X contains its sequentially adherent points, and every function from X to another topological space is sequentially continuous, even though not every set in X is closed and not every function on X is continuous. An example of a set which is sequentially compact but not compact is the first uncountable ordinal with the order topology (Exercise 9). It is more tricky to give an example of a compact space which is not sequentially compact; this will have to wait for future notes, when we establish Tychonoff’s theorem. However one can “fix” this discrepancy between the sequential and non-sequential concepts by replacing sequences with the more general notion of nets, see the appendix below.
Remark 4. Metric space concepts such as boundedness, completeness, Cauchy sequences, and uniform continuity do not have counterparts for general topological spaces, because they cannot be defined purely in terms of open sets. (They can however be extended to some other types of spaces, such as uniform spaces or coarse spaces.)
Now we give some important topologies that capture certain modes of convergence or continuity that are difficult or impossible to capture using metric spaces alone.
Example 10. (Zariski topology) This topology is important in algebraic geometry, though it will not be used in this course. If F is an algebraically closed field, we define the Zariski topology on the vector space to be the topology generated by the complements of proper algebraic varieties in ; thus a set is Zariski open if it is either empty, or is the complement of a finite union of proper algebraic varieties. A set in is then Zariski dense if it is not contained in any proper subvariety, and the Zariski closure of a set is the smallest algebraic variety that contains that set.
Example 11. (Order topology) Any totally ordered set generates the order topology, defined as the topology generated by the sets and for all . In particular, the extended real line can be given the order topology, and the notion of convergence of sequences in this topology to either finite or infinite limits is identical to the notion one is accustomed to in undergraduate real analysis. (On the real line, of course, the order topology corresponds to the usual topology.) Also observe that a function from the extended natural numbers (with the order topology) into a topological space X is continuous if and only if as , so one can interpret convergence of sequences as a special case of continuity.
Exercise 9. Let be the first uncountable ordinal, endowed with the order topology. Show that is sequentially compact (Hint: every sequence has a lim sup), but not compact (Hint: every point has a countable neighbourhood).
Example 12. (Half-open topology) The right half-open topology on the real line is the topology generated by the right half-open intervals for ; this is a bit finer than the usual topology on . Observe that a sequence converges to a limit x in the right half-open topology if and only if it converges in the ordinary topology , and also if for all sufficiently large x. Observe that a map is right-continuous iff it is a continuous map from to . One can of course model left-continuity via a suitable left half-open topology in a similar fashion.
Example 13. (Upper topology) The upper topology on the real line is defined as the topology generated by the sets for all . Observe that (somewhat confusingly), a function is lower semi-continuous iff it is continuous from to . One can of course model upper semi-continuity via a suitable lower topology in a similar fashion.
Example 14. (Product topology) Let be the space of all functions from a set X to a topological space Y. We define the product topology on to be the topology generated by the sets for all and all open . Observe that a sequence of functions converges pointwise to a limit iff it converges in the product topology. We will study the product topology in more depth in future notes.
Example 15. (Product topology, again) If and are two topological spaces, we can define the product space to be the Cartesian product with the topology generated by the product sets , where U and V are open in X and Y respectively. Observe that two functions , from a topological space Z are continuous if and only if their direct sum is continuous in the product topology, and also that the projection maps and are continuous (cf. Exercise 6).
We mention that not every topological space can be generated from a metric (such topological spaces are called metrisable). One important obstruction to this arises from the Hausdorff property:
Definition 6. A topological space X is said to be a Hausdorff space if for any two distinct points x, y in X, there exist disjoint neighbourhoods of x and y respectively.
Example 16. Every metric space is Hausdorff (one can use the open balls and as the separating neighbourhoods. On the other hand, the trivial topology (Example 7) on two or more points is not Hausdorff, and neither is the cocountable topology (Remark 3) on an uncountable set, or the upper topology (Example 13) on the real line. Thus, these topologies do not arise from a metric.
Exercise 10. Show that the half-open topology (Example 12) is Hausdorff, but does not arise from a metric. [Hint: assume for contradiction that the half-open topology did arise from a metric; then show that for every real number x there exists a rational number q and a positive integer n such that the ball of radius 1/n centred at q has infimum x.] Thus there are more obstructions to metrisability than just the Hausdorff property; a more complete answer is provided by Urysohn’s metrisation theorem, which we will cover in later notes.
Exercise 11. Show that in a Hausdorff space, any sequence can have at most one limit. (For a more precise statement, see Exercise 15 below.)
A homeomorphism (or topological isomorphism) between two topological spaces is a continuous invertible map whose inverse is also continuous. Such a map identifies the topology on X with the topology on Y, and so any topological concept of X will be preserved by f to the corresponding topological concept of Y. For instance, X is compact if and only if Y is compact, X is Hausdorff if and only if Y is Hausdorff, x is adherent to E if and only if f(x) is adherent to f(E), and so forth. When there is a homeomorphism between two topological spaces, we say that X and Y are homeomorphic (or topologically isomorphic).
Example 14. The tangent function is a homeomorphism between and (with the usual topologies), and thus preserves all topological structures on these two spaces. Note however that the former space is bounded as a metric space while the latter is not, and the latter is complete while the former is not. Thus metric properties such as boundedness or completeness are not purely topological properties, since they are not preserved by homeomorphisms.
– Nets (optional) –
A sequence in a space X can be viewed as a function from the natural numbers to X. We can generalise this concept as follows.
Definition 7. A net in a space X is a tuple , where is a directed set (i.e. a pre-ordered set such that any two elements have at least one upper bound), and for each . We say that a statement holds for sufficiently large in a directed set A if there exists such that holds for all . [Note in particular that if and separately hold for sufficiently large , then their conjunction also holds for sufficiently large .]
A net in a topological space X is said to converge to a limit if for every neighbourhood V of x, we have for all sufficiently large .
A subnet of a net is a tuple of the form , where is another directed set, and is a monotone map (thus whenever ) which is also has cofinal image, which means that for any there exists with (in particular, if is true for sufficiently large , then is true for sufficiently large ).
Remark 5. Every sequence is a net, but one can create nets that do not arise from sequences (in particular, one can take A to be uncountable). Note a subtlety in the definition of a subnet – we do not require to be injective, so B can in fact be larger than A! Thus subnets differ a little bit from subsequences in that they “allow repetitions”.
Remark 6. Given a directed set A, one can endow with the topology generated by the singleton sets with , together with the sets for , with the convention that for all . The property of being directed is precisely saying that these sets form a base. A net converges to a limit if and only if the function is continuous on (cf. Example 11). Also, if is a subnet of , then is a continuous map from to , if we adopt the convention that . In particular, a subnet of a convergent net remains convergent to the same limit.
The point of working with nets instead of sequences is that one no longer needs to worry about the distinction between sequential and non-sequential concepts in topology, as the following exercises show:
Exercise 12. Let X be a topological space, let E be a subset of X, and let x be an element of X. Show that x is an adherent point of E if and only if there exists a net in E that converges to x. (Hint: take A to be the directed set of neighbourhoods of x, ordered by reverse set inclusion.)
Exercise 13. Let be a map between two topological spaces. Show that f is continuous if and only if for every net in X that converges to a limit x, the net converges in Y to f(x).
Exercise 14. Let X be a topological space. Show that X is compact if and only if every net has a convergent subnet. (Hint: equate both properties of X with the finite intersection property, and review the proof of Theorem 1. Similarly, show that a subset E of X is relatively compact if and only if every net in E has a subnet that converges in X. (Note that as not every compact space is sequentially compact, this exercise shows that we cannot enforce injectivity of in the definition of a subnet.)
Exercise 15. Show that a space is Hausdorff if and only if every net has at most one limit.
Exercise 16. In the product space in Example 14, show that a net converges in to if and only if for every , the net converges in Y to .
[Update, Jan 31: Definition of subnet corrected; Exercise 8 corrected; Exercise 9 added, subsequent exercises renumbered; hint for Exercise 2 altered; some remarks added.]