A tale of two integrals, II. A subtle, skinnyfat set

In my last post I discussed the motivation for moving away from the Riemann integral toward the Lebesgue integral. Suppose you and I know how to set up Lebesgue measure. If you don’t know, you could go back to kindergarten. I hear they teach measure theory in an accessible fashion there, they even use… rulers. Once you return, armed with not-so-arcane knowledge, it’s time to play a game I quite enjoy. It’s called “what does the math say?” Ylvis even did a song about this one.

It’s a frequent occurrence in math that once you perform some technical procedure to set up a theory, it comes to life, and grateful to its creator, it starts talking back to you. This is eerily similar to having children. Indeed, this feedback loop is what propels math, and humanity, forward at such a rapid pace. This newborn theory, like a newborn child, soon finds out about your seedy past, and makes comments about it—to your face! The insolence. Sometimes, though, those comments give you extraordinary clarity about your confused youth. God bless children.

In our specific case, the setting up of Lebesgue theory produces a whole bunch of language, and theorems in that language, one of which gives great, simplifying clarity to the concept of Riemann integrability. Last time, I’d remarked that in the old language, we had no clean, immediate way to understand when a function should be Riemann integrable. Now we do, in Lebesgue language.

Definition: We say some property \(P\) is true almost everywhere, if the set on which \(P\) fails, call it the “bad set” \(E_P\), has Lebesgue measure zero.

What the hell is Lebesgue measure zero? Clearly you didn’t go back to kindergarten. It’s ok, we are all busy people. Not everyone has time to be a baby. So Lebesgue measure is a way of assigning “size” to subsets of the real line. Some of these assignments are intuitive: the Lebesgue measure of an interval \([a,b]\) is \(b - a\). Makes sense. Others are still believable: the Lebesgue measure of a single point is zero. It seems fair to say that speaking from the perspective of a one-dimensional object (the real line), zero-dimensional objects (points) have no size. (Physicists are notorious for abusing this notion in horrific ways).

But more generally, any finite set of points has Lebesgue measure zero, and importantly, any countably infinite set of points has Lebesgue measure zero. There are even some uncountably infinite sets of Lebesgue measure zero, such as the infamous Cantor set.

Lebesgue, and his twin brother Vitali, are shouting at us now: you never ignore a screaming baby. Fortunately they have a fantastic theorem. If only human babies screamed fantastic theorems—I would have dozens.

Theorem: Let \(f: [0,1] \rightarrow \mathbb{R}\) be a bounded function. \(f\) is Riemann integrable if and only if \(f\) is continuous almost everywhere.

This is one of the true pleasures in life: witnessing the future putting the past in a new, clear light. What a fantastic theorem! I’ll give you a personal story here. I learned about the Riemann integral many years before I learned about the Lebesgue integral. I could absolutely never remember the conditions for Riemann integrability in the old language. They’re so tedious I haven’t even told you what they are. But once I saw this theorem, I always knew when a function was Riemann integrable. This thing is literally life-changing. And this is just the first nice thing about this theorem.

This second is that this theorem links somewhat disparate concepts: the technical, heavily set-theoretic machine of measure theory with the intuitive, topological notion of continuity. There are certainly some topological ingredients in the recipe for Lebesgue measure, but measure theory generally can stand on its own feet. In the context of Lebesgue measure, there is some interaction between these different worlds. Let’s investigate this relationship between measure and continuity.

Our counterexample from last time, the Dirichlet function

\[f(x) = \begin{cases} 1 & x \in \mathbb{Q} \\ 0 & x \in \mathbb{Q}^c \end{cases}.\]

is continuous nowhere on \([0,1]\). It is clear why: every open set contains both rationals and irrationals, so continuity at any point is simply impossible. So \(f\) is certainly not continuous almost everywhere. So it is not Riemann integrable.

But now here is the subtlety. The constant function \(0\) is certainly continuous everywhere and Riemann integrable. I can modify this constant function on a set of measure zero: the rationals (which are countably infinite). Let me modify it by making it equal \(1\) on every rational. Now I have the Dirichlet function, which is continuous nowhere and not Riemann integrable! This concept of modification is quite natural, as is eventually expressed by the language of \(L^p\) spaces in the Lebesgue machine.

So it is possible to modify a continuous function on a set of measure zero, and lose Riemann integrability. Hold on, you might say—this is because we modified it on the rationals, which are dense in \([0,1]\). So perhaps the above statement is true only when the modified set is dense in \([0,1]\).

Intuition suggests this is false. There is a lot of “room” to make changes in this example, isn’t there? The Dirichlet function is continuous nowhere. Losing Riemann integrability does not require continuity to vanish everywhere, only on a set of positive measure. So rather than insisting on a dense measure-zero subset of a full measure set, we should get away with a dense measure-zero subset of a positive measure set.

Well, of course, I could modify my function only on the set of rationals inside \([0,1/2]\). Doing so will lose Riemann integrability. Duh. I should amend the original statement, now, to say the following. If I modify the constant function \(0\) on a set of measure zero and lose Riemann integrability, the modified set must be dense in some interval.

But wait, my argument earlier noted that the modification only needed to take place on a set of positive measure, not necessarily an interval. Can you have a set of positive measure that contains no intervals?

Yes. The infamous Cantor set mentioned earlier has many siblings (uncountably many, in fact). They are called, rudely, the fat Cantor sets.

At this point, it should be enough to modify the constant function \(0\) on the rationals inside a fat Cantor set, and be done.

But forget density, there might not be any rationals in a fat Cantor set! This is a real annoyance. I found this old paper of Boes, Darst and Erdos that gives a very nice discussion related to this topic.

So what to do now? Moshe at the Grad Center found a nice workaround, observing that the important property that makes rationals a subconscious choice is their countability (thus measure zero-ness), and density in intervals. Countability and density. So we need a countable dense subset of a fat Cantor set. Is there one?

Yes, of course. Fat Cantor sets are compact metric spaces. And there is this well-known fact—

Theorem: Compact metric spaces have countable dense subsets.

I’ll give a quick proof. Let \(n\) be a positive integer. Consider \(\{B(x,1/n)\}\) (the ball of radius \(1/n\) centered at \(x\)), indexed over \(x\). For each \(n\), this is an open cover of our space. By compactness, we have a finite subcover. Take the centres of each item of the subcover, for each \(n\), and make a nice countable set out of all of them. This will be dense.

Our little tour has ended in a nice result. It is possible to modify a continuous function on a nowhere dense set of measure zero, and lose Riemann integrability. In hindsight this seems quite straightforward, but the statement in isolation has some mild shock value. And shock value is in some sense the only value.

This discussion illustrates, for instance, that in the \(L^p\) world, continuity ceases to be a robust concept. There is a lot more that can be said about the strange relationship between measure, continuity, and integrability. But one needs to rest after dealing with screaming babies all day.

Written on September 22, 2021