## Baire Sets

Looking over my notes from topology it seems I completely skipped over Baire sets. This was always one of those annoying topics that I never had much use for, partly because I didn’t do point-set topology or analysis. Also, even in my day the usual approach was a very classical and awkward one. Today I’m going to do a much more modern and streamlined one, and I can motivate it better from a measure-theoretic context to boot!

Basically, the idea of a Baire set is one that can’t be filled up by “negligible” sets. We’ve used that term in measure theory to denote a subset of a set of measure zero. But in topology we don’t have a “measure” to work with. Instead, we use the idea of a closed “nowhere dense” set — one for which there is no open set on which it is dense. The original motivation was a set like a boundary of a region; in the context of Jordan content we saw that such a set was negligible.

Clearly such a set has no interior — no open set completely contained inside — and any finite union of them is still nowhere dense. However, if we add up countably infinitely many we might have enough points to be dense on some open set. However, we don’t want to be able to actually *fill* such an open set. In the measure-theoretic context, this corresponds to the way any countable union of negligible sets is still negligible.

So, let’s be more specific: a “Baire set” is one for which the interior of every countable union of closed, nowhere dense sets is empty. Equivalently, we can characterize Baire sets in complementary terms: every countable intersection of dense open sets is dense. We can also use the contrapositive of the original definition: if a countable union of closed sets has an interior point, then one of the sets must itself have an interior point.

We’re interested in part of the famous “Baire category theorem” — the name is an artifact of the old, awkward approach and has nothing to do with category theory — which tells us that every complete metric space is a Baire space. Let be a countable collection of open dense subsets of . We will show that their intersection is dense by showing that any nonempty open set has some point — the *same* point — in common with all the .

Okay, Since is dense, then is nonempty, and it contains a point . As the intersection of two open sets, it’s open, and so it contains an open neighborhood of which set can take to be an open metric ball of radius . But then is an open set, which will intersect . This process will continue, and for every we will find a point and a radius so that . We can also at each step pick .

And so we come up with a sequence of points . At each step, the ball contains the whole tail of the sequence past , and so all of these points are within of each other. Since gets arbitrarily small, this shows that is Cauchy, and since is complete, the sequence must converge to a limit . This point will be in each set , since , and it’s obviously in , as desired.

The other part of the Baire category theorem says that any locally compact Hausdorff space is a Baire space. In this case the proof proceeds very similarly, but with the finite intersection property for compact spaces standing in for completeness.

## Multivariable Limits

As we’ve seen, when our target is a higher-dimensional real space continuity is the same as continuity in each component. But what about when the source is such a space? It turns out that it’s not quite so simple.

One thing, at least, is unchanged. We can still say that is continuous at a point if . That is, if we have a sequence of points in (we only need to consider sequences because metric spaces are sequential) that converges to , then the image of this sequence converges to .

The problem is that limits themselves in higher-dimensional real spaces become a little hairy. In there’s really only two directions along which a sequence can converge to a given point. If we have a sequence converging from the right and another sequence converging from the left, that basically is enough to establish what the limit of the function is (and if it has one). In higher-dimensional spaces — even just in — we have so many possible approaches to any given point that in order to avoid an infinite amount of work we have to use something like the formal definition of limits in terms of metric balls. That is

The function has limit at the point if for every there is a so that implies .

We just consider the case with target since higher-dimensional targets are just like multiple copies of this same definition, just as we saw for continuity.

Now, let’s look at a few examples of limits to get an idea for *why* it’s not so simple. In each case, we will be considering a function which is bounded near (since just blowing up to infinity would be too easy to be really pathological) and even with nice limits along certain specified approaches, but which *still* fail to have a limit at the origin.

First off, let’s consider . If we consider approaching along the -axis with the sequence or we find a limit of . However, if we approach along the -axis with the sequence or we instead find a limit of . Thus no limit exists for the function.

Next let’s try . Now the approaches along either axis above all give the limit , so the limit of the function is , right? Wrong! This time if we approach along the diagonal with the sequence we get the limit . So we have to consider directions other than the coordinate axes.

What about ? Approaching along the coordinate axes we get a limit of . Approaching along *any* diagonal with the sequence the calculations are a bit hairier but we still find a limit of . So approaching from any direction we get the same limit, making the limit of the function , right? Wrong again! Now if we approach along the parabola with the sequence we find a limit of , and so the limit *still* doesn’t exist. By this point it should be clear that if straight lines aren’t enough to simplify things then there are just far too many curves to consider, and we need some other method to establish a limit, which is where the metric ball definition comes in.

Now I want to go off on a little bit of a rant here. It’s become fashionable to *not* teach the metric ball definition — — proofs, as they’re often called — at the first semester calculus level. It’s not even on the Calculus AB exam. I’m not sure when this happened because *I* was taught them first thing when I took calculus, and it wasn’t that long between then and my first experience teaching calculus. But it’d have to have been sometime in the mid-’90s. Anyway, they don’t even teach it in most college courses anymore. And for the purposes of calculus that’s okay, since as I mentioned above you can easily get away without them when dealing with single-variable functions. They can even survive the analogues of — proofs that come up when dealing with convergent sequences in second-semester calculus.

The problem comes when students get to third semester calculus and multivariable functions. Now, as we’ve just seen, there’s *no* sure way of establishing a limit. We can in some cases establish the continuity of simple functions (like coordinate projections) and then use limit laws to build up a larger class. But this approach fails for functions superficially similar to the pathological functions listed above, but which *do* have limits which can be established by an — proof. We can establish that certain limits do *not* exist by techniques similar to those above, but this requires some ingenuity in choosing two appropriate paths which give different results. There are one or two other methods that work in special cases, but *nothing* works like an — proof.

But now we can’t teach — proofs to these students! The method is rather more complicated when we’ve got more than one variable to work with, not least because of the more complicated distance formula to work with. What *used* to happen was that students would have developed some facility with — proofs back in first and second semester calculus, which could then be brought to bear on this new situation. But now they have no background and cannot, in general, absorb both the logical details of challenge-response — proofs and the complications of multiple variables at the same time. And so we show them a few jury-rigged tricks and assure them that within the rest of the course they won’t have to worry about it. I’d almost rather dispense with limits *entirely* than present this Frankenstein’s monstrosity.

And yet, I see no sign that the tide will ever turn back. The only hope is that the movement to make statistics the capstone high-school course will gain momentum. If we can finally wrest first-semester calculus from the hands of the public school system and put *all* calculus students at a given college through the same three-semester track, then the more intellectually rigorous institutions might have the integrity to put proper limits back into the hands of their first semester students and not have to worry about incoming freshmen with high AP scores covering for shoddy backgrounds.

## Multivariable Continuity

Now that we have the topology of higher-dimensional real spaces in hand, we can discuss continuous functions between them. Since these are metric spaces we have our usual definition with and and all that:

A function is continuous at if and only if for each there is a so that implies .

where the bars denote the norm in one or the other of the spaces or as depends on context. Again, the idea is that if we pick a metric ball around , we can find some metric ball around whose image is contained in the first ball.

The reason why this works, of course, is that metric balls provide a neighborhood base for our topology. But remember that last time we came up with an equivalent topology on using a very different subbase: preimages of neighborhoods in under projections. Intersections of these pre-images furnish an alternative neighborhood base. Let’s see what happens if we write down the definition of continuity in *these* terms:

A function is continuous at if and only if for each with all there is a so that implies for all .

That is, if we pick a small enough metric ball around its image will fit within the “box” which extends in the th direction a distance on each side from the point .

At first blush, this might be a different notion of continuity, but it really isn’t. From what we did last yesterday we know that both the boxes and the balls provide equivalent topologies on the space , and so they much give equivalent notions of continuity. In a standard multivariable calculus course, we essentially reconstruct this using handwaving about how if we can fit the image of a ball into any box we can choose a box that fits into a selected metric ball, and vice versa.

But why do we care about this equivalent statement? Because now I can define a bunch of functions so that is the th component of . For each of these real-valued functions, I have a definition of continuity:

A function is continuous at if and only if for each there is a so that implies .

So each is continuous if I can pick a that works with a given . And if *all* the are continuous, I can pick the smallest of the and use it as a that works for each component. But then I can wrap the up into a vector and use the I’ve picked to satisfy the box definition of continuity for itself! Conversely, if is continuous by the box definition, then I must be able to use that the for a given vector to verify the continuity of each for the given .

The upshot is that a function from a metric space (generalize this yourself to other metric spaces than ) to is continuous if and only if each of the component functions is continuous.

## The Topology of Higher-Dimensional Real Spaces

As we move towards multivariable calculus, we’re going to primarily be concerned with the topological spaces (for various values of ) just as in calculus we were primarily concerned with the topological space . As a topological space, is just like the vector space we’ve been discussing, but now we care a lot less about the algebraic structure than we do about the notion of which points are “close to” other points.

And it turns out that is a metric space, so all of the special things we know about metric spaces can come into play. Indeed, inner products define norms and norms on vector spaces define metrics. We can even write it down explicitly. If we write our vectors and , then the distance is

Incidentally, this is the exact same formula we’d get if we started with the metric space and built up as the product of copies.

One thing I didn’t mention back when I put together products of metric spaces is that we get the same topology as if we’d forgotten the metric and taken the product of topological spaces. This will actually be useful to us, in a way, so I’d like to explain it here.

We define the topology on a metric space by using balls of radius around each point to provide a subbase for the topology. On the other hand, when we have a product space we use preimages of open sets under the canonical projections to provide a subbase. To show that these generate the same topology, what we’ll do is show that the identity map from as a product space to as a metric space is a homeomorphism. Since it’s obviously invertible, we just need to show that it’s continuous in both directions. And we can use our subbases to do just that.

What we have to show is that each set in one subbase is open in terms of the other subbase. That is, for each point in the set we should be able to come up with a finite intersection of sets in the other subbase that contains the point, and yet fits inside the set we started with.

Okay, so consider the preimage of an open set under the projection . That is, the collection of all with . Clearly since is open in the metric space we can pick a radius so that the open interval is contained in . But then the ball of radius in around the point contains the point, and is itself contained in , for if for some other point , then cannot possibly be within the ball of radius around .

On the other hand, let’s take a ball of radius about a point . We set and consider the open intervals . I say that the intersection of the preimages is contained in the ball. Indeed, if is in the intersection, the furthest any coordinate can be from the center is . Thus we can calculate the total distance

and so the whole intersection must be within the ball.

This approach is pretty straightforward to generalize to the case of any product of metric spaces, but I’ll leave that as an exercise.

## Products of Metric Spaces

Shortly we’re going to need a construction that’s sort of interesting in its own right.

We know about products of topological spaces. We can take products of metric spaces, too, and one method comes down to us all the way from Pythagoras.

The famous Pythagorean theorem tells us that in a right triangle the length of the side opposite the right angle stands in a certain relation to the lengths and of the other two sides: . So let’s say we’ve got metric spaces and . For the moment we’ll think of them as being perpendicular and define a distance function on by

The quantity inside the radical here must be nonnegative, since it’s the sum of two nonnegative numbers. Since the result needs to be nonnegative, we take the unique nonnegative square root.

Oops, I don’t think I mentioned this before. Since the function has as its derivative, it’s always increasing where is positive. And since we can eventually a square above any real number we choose, its values run from zero all the way up to infinity. Now the same sort of argument as we used to construct the exponential function gives us an inverse sending any nonnegative number to a unique nonnegative square root.

Okay, that taken care of, we’ve got a distance function. It’s clearly nonnegative and symmetric. The only way for it to be zero is for the quantity in the radical to be zero, and this only happens if each of the terms and are zero. But since these are distance functions, that means and , so .

The last property we need is the triangle inequality. That is, for any three pairs , , we have the inequality

Substituting from the definition of we get the statement

The triangle inequalities for and tell us that and . So if we make these substitutions on the left, it increases the left side of the inequality we want. Thus if we can prove the stronger inequality

we’ll get the one we really want. Now since squaring preserves the order on the nonnegative reals, we can find this equivalent to

Some cancellations later:

We square and cancel some more:

Moving these terms around we find

So at the end of the day, our triangle inequality is equivalent to asking if a certain quantity squared is nonnegative, which it clearly is!

Now here’s the important thing at the end of all that calculation: this is just one way to get a metric on the product of two metric spaces. There are many other ones which give rise to different distance functions, but the same topology and the same uniform structure. And often it’s the topology that we’ll be most interested in.

In particular, this will give us a topology on any finite-dimensional vector space over the real numbers, but we *don’t* want to automatically equip that vector space with this norm unless we say so very explicitly. In fact, we don’t even want to make that same assumption about the two spaces being perpendicular to each other. The details of exactly why this is so I’ll leave until we get back to linear algebra, but I want to be clear right now that topology comes for free, but we may have good reason to use different “distances”.

## Metric Spaces are Categories!

A guest post by Tom Leinster over at *The n-Category Café* reminded me of an interesting fact I haven’t mentioned yet: a metric space is actually an example of an enriched category!

First we’ll need to pick out our base category , in which we’ll find our hom-objects. Consider the set of nonnegative real numbers with their real-number order, and add in a point called that’s above all the other points. This is a totally ordered set, and orders are categories. Let’s take the opposite of this category. That is, the objects of our category are the points in the “interval” , and we have an arrow exactly when .

This turns out to be a monoidal category, and the monoidal structure is just addition. Clearly this gives a monoid on the set of objects, but we need to check it on morphisms to see it’s functorial. But if and then , and so we can see addition as a functor.

So we’ve got a monoidal category, and we can now use it to form enriched categories. Let’s keep out lives simple by considering a small -category . Here’s how the definition looks.

We have a set of objects that we’ll call “points” in a set . Between any two points and we need a hom-object . That is, we have a function .

For a triple of objects we need an arrow . In more quotidian terms, this means that .

Also, for each point there is an arrow from the identity object of to the hom-object . That is, , so .

These conditions are the first, fourth, and half of the second conditions in the definition of a metric space! In fact, there’s a weaker notion of a “pseudometric” space, wherein the second condition is simply that , and so we’re almost exactly giving the definition of a pseudometric space.

The only thing we’re missing is the requirement that . The case can be made (and has been, by Lawvere) that this requirement is actually extraneous, and that it’s in some sense more natural to work with “asymmetric” (pseudo)metric spaces that are exactly those given by this enriched categorical framework.

## Some theorems about metric spaces

We need to get down a few facts about metric spaces before we can continue on our course. Firstly, as I alluded in an earlier comment, compact metric spaces are sequentially compact — every sequence has a convergent subsequence.

To see this fact, we’ll use the fact that compact spaces are the next best thing to finite. Specifically, in a finite set any infinite sequence would have to hit one point infinitely often. Here instead, we’ll have an accumulation point in our compact metric space so that for any and point in our sequence there is some with . That is, though the sequence may move away from , it always comes back within of it again. Once we have an accumulation point , we can find a subsequence converging to just as we found a subnet converging to any accumulation point of a net.

Let’s take our sequence and define — the closure of the sequence from onwards. Then these closed sets are nested , and the intersection of any finite number of them is the smallest one, which is clearly nonempty since it contains a tail of the sequence. Then by the compactness of we see that the intersection of *all* the is again nonempty. Since the points in this intersection are in the closure of any tail of the sequence, they must be accumulation points.

Okay, that doesn’t *quite* work. See the comments for more details. Michael asks where I use the fact that we’re in a metric space, which was very astute. It turns out on reflection that I *did* use it, but it was hidden.

We can still say we’re looking for an accumulation point first and foremost, because if the sequence has an accumulation point there must be some subsequence converging to that point. Why not a subnet in general? Because metric spaces must be normal Hausdorff (using metric neighborhoods to separate

closed sets) and first-countable! And as long as we’re first-countable (or, weaker, “sequential”) we can find a sequence converging to any limit point of a net.

What I didn’t say before is that once we find an accumulation point there will be a subsequence converging to that point. My counterexample is compact, and any sequence in it has accumulation points, but we will only be able to find sub*nets* of our sequence converging to them, not sub*sequences*. Unless we add something to assure that our space is sequential, and metric spaces do that.

We should note in passing that the special case where is a compact subspace of is referred to as the Bolzano-Weierstrass Theorem.

Next is the Heine-Cantor theorem, which says that any continuous function from a compact metric space to any metric space is uniformly continuous. In particular, we can use the interval as our compact metric space and the real numbers as our metric space to see that any continuous function on a closed interval is uniformly continuous.

So let’s assume that is continuous but not uniformly continuous. Then there is some so that for any there are points and in with but . In particular, we can pick as our and get two sequences and with but . By the above theorem we can find subsequences converging to and converging to .

Now , which converges to , and so . Therefore we must have also converging to by the continuity of . But this can’t happen, since each of these distances must be at least ! Thus must have been uniformly continuous to begin with.

## The Heine-Borel Theorem

We’ve talked about compact subspaces, particularly of compact spaces and Hausdorff spaces (and, of course, compact Hausdorff spaces). So how can we use this to understand the space of real numbers, or higher-dimensional versions like ?

First off, is Hausdorff, which should be straightforward to prove. Unfortunately, it’s *not* compact. To see this, consider the open sets of the form for all positive real numbers . Given any real number we can find an with , so . Therefore the collection of these open intervals covers . But if we take any finite number of them, one will be the biggest, and so we must miss some real numbers. This open cover does not have a finite subcover, and is not compact. We can similarly show that is Hausdorff, but not compact.

So, since is Hausdorff, any compact subset of must be closed. But not every closed subset is compact. What else does compactness imply? Well, we can take the proof that isn’t compact and adapt it to any subset . We take the collection of all open “cubes” consisting of -tuples of real numbers, each of which is between and , and we form open subsets of by the intersections . Now the only way for there to be a finite subcover of this open cover of is for there to be *some* so that . That is, every component of every point of has absolute value less than , and so we say that is “bounded”.

We see now that every compact subset of is closed and bounded. It turns out that being closed and bounded is not only necessary for compactness, but they’re also sufficient! To see this, we’ll show that the closed cube is compact. Then a bounded set is contained in some such cube, and a closed subset of a compact space is compact. This is the Heine-Borel theorem.

In the case, we just need to see that the interval is compact. Take an open cover of this interval, and define the set to consist of all so that a finite collection of the cover . Then define to be the least upper bound of . Basically, is as far along the interval as we can get with a finite number of sets, and we’re hoping to show that . Clearly it can’t go past , since . But can it be less than ?

In fact it can’t, because if it were, then we can find some open set from the cover that contains . As an open neighborhood of , the set contains some interval . Then must be in , and so there is some finite collection of the which covers . But then we can just add in to get a finite collection of the which covers , and this contradicts the fact that is the supremum of . Thus and there is a finite subcover of , making this closed interval compact!

Now Tychonoff’s Theorem tells us that products of closed intervals are *also* compact. In particular, the closed cube is compact. And since any closed and bounded set is contained in some such cube, it will be compact as a closed subspace of a compact space. Incidentally, since is finite, we don’t need to wave the Zorn talisman to get this invocation of the Tychonoff magic to work.

As a special case, we can look back at the one-dimensional case to see that a compact, connected space must be a closed interval . Then we know that the image of a connected space is connected, and that the image of a compact space is compact, so the image of a closed interval under a continuous function is another closed interval.

The fact that this image is an interval gave us the intermediate value theorem. The fact that it’s closed now gives us the extreme value theorem: a continuous, real-valued function on a closed interval attains a maximum and a minimum. That is, there is some so that for all , and similarly there is some so that for all .

## Tychonoff’s Theorem

One of the biggest results in point-set topology is Tychonoff’s Theorem: the fact that the product of *any* family of compact spaces is again compact. Unsurprisingly, the really tough bit comes in when we look at an infinite product. Our approach will use the dual definition of compactness.

Let’s say that a collection of closed sets has the finite intersection hypothesis if all finite intersections of members of the collection are nonempty, so compactness says that any collection satisfying the finite intersection hypothesis has nonempty intersection. We can then form the collection of all collections of sets satisfying the finite intersection hypothesis. This can be partially ordered by containment — if every set in is also in .

Given any particular collection we can find a maximal collection containing it by finding the longest increasing chain in starting at . Then we simply take the union of all these collections to find the collection at its top. This is almost exactly the same thing as we did back when we showed that every vector space is a free module! And just like then, we need Zorn’s lemma to tell us that we can manage the trick in general, but if we look closely at how we’re going to use it we’ll see that we can get away without Zorn’s lemma for finite products.

Anyhow, this maximal collection has two nice properties: it contains all of its own finite intersections, and it contains any set which intersects each set in . These are both true because if didn’t contain one of these sets we could throw it in, make strictly larger, and still satisfy the finite intersection hypothesis.

Now let’s assume that is a collection of closed subsets of satisfying the finite intersection hypothesis. We can then get a maximal collection containing . Then given an index we can consider the collection of closed subsets of and see that it, too, satisfies the finite intersection hypothesis. Thus by compactness of the intersection of this collection is nonempty. Letting be a closed set containing one of these intersection points , we see that the preimage meets every , and so must itself be *in* .

Okay, so let’s take the point for each index and consider the point in with -th coordinate . Then pick some set containing from the base for the product topology. For all but a finite number of the , . For those finite number where it’s smaller, the closure of contains the point , and so is in . So their finite intersection must be nonempty, and so is itself!

Now, since is in , it must intersect each of the closed sets in the original collection . Since the only constraint on is that it contain , this point must be a limit point of each of the sets in . And because they’re closed, they must contain all of their limit points. Thus the intersection of all the sets in is nonempty, and the product space is compact!

## The Image of a Compact Space

One of the nice things about connectedness is that it’s preserved under continuous maps. It turns out that compactness is the same way — the image of a compact space under a continuous map is compact.

Let’s take an open cover of the image . Since is continuous, we can take the preimage of each of these open sets to get a bunch of open sets in . Clearly every point of is the preimage of *some* point of , so the form an open cover of . Then we can take a finite subcover by compactness of , picking out some finite collection of indices. Then looking back at the corresponding to these indices (instead of their preimages) we get a finite subcover of . Thus any open cover of the image has a finite subcover, and the image is compact.