Tutorials › Measure Theory › A Counting-Measure Example Where Continuous Functions Are Not Dense

Completeness and Density in L^p · Tutorial 551 of 798

A Counting-Measure Example Where Continuous Functions Are Not Dense

See why counting measure makes every nonzero continuous function too large for finite-p Lp, while point indicators remain integrable.

Advanced 9 min read

What You'll Learn

  • Define counting measure on the real line and identify its completeness and sigma-finiteness.
  • Express the Lebesgue integral with respect to counting measure as a sum over points.
  • Prove that finite-p integrability forces a function to have countable support.
  • Show that every nonzero continuous function has infinite finite-p norm.
  • Verify that a singleton indicator belongs to Lp and is a positive distance from every continuous Lp function.

Counting Measure Changes What “Small” Means

On the real line with Lebesgue measure, a bounded function supported on a bounded interval can have a finite \(L^p\) norm. With counting measure, the same interval contains infinitely many points, and each point contributes separately to the integral. This produces a sharp contrast: a singleton indicator belongs to \(L^p\), but no nonzero continuous function does.

Throughout, let \((\mathbb{R},\mathcal{B}_{\mathbb{R}},\mu)\) be the measure space where \(\mathcal{B}_{\mathbb{R}}\) is the Borel sigma-algebra and \(\mu(E)=\#E\) if \(E\) is finite, while \(\mu(E)=\infty\) if \(E\) is infinite. This is counting measure restricted to Borel sets. The space is complete, because its only null set is the empty set. It is not sigma-finite: a countable union of finite sets is countable and therefore cannot cover \(\mathbb{R}\).

Fix \(p\) with \(1\le p<\infty\). Functions in \(L^p(\mu)\) are understood up to equality \(\mu\)-almost everywhere; here, since the only null set is empty, equality almost everywhere is equality at every point. The \(L^p\) norm is \(\|f\|_p=(\int_{\mathbb{R}}|f|^p\,d\mu)^{1/p}\). The membership and non-density conclusions below also hold for \(0<p<1\), where this quantity is not a norm.

Definition: For a family of nonnegative numbers \((a_x)_{x\in\mathbb{R}}\), define \(\sum_{x\in\mathbb{R}}a_x\) to be the supremum of its finite subsums. The supremum is allowed to be \(+\infty\). For every nonnegative Borel function \(g\) on this measure space, $$ \int_{\mathbb{R}} g\,d\mu=\sum_{x\in\mathbb{R}}g(x). $$ Consequently, for a real- or complex-valued Borel function \(f\), \(\int |f|^p\,d\mu=\sum_{x\in\mathbb{R}}|f(x)|^p\).

Proof. In the definition of the nonnegative Lebesgue integral, one takes the supremum of the integrals of nonnegative simple functions below \(g\). If \(F\subset\mathbb{R}\) is finite, then \(\sum_{x\in F}g(x)\chi_{\{x\}}\le g\), and the integral of this simple function is exactly \(\sum_{x\in F}g(x)\). Taking the supremum over finite \(F\) shows that the integral is at least the stated sum. Conversely, let \(\varphi\le g\) be any nonnegative simple function. Its integral is the sum of its finitely many nonnegative values multiplied by the counting measures of their disjoint level sets. A level set that is infinite makes this integral infinite; in that case the point-sum of \(g\) is also infinite, since \(g\ge\varphi\) on that infinite set and the level value is positive. If all positive level sets are finite, the integral is a finite sum of pointwise values of \(\varphi\), and is at most the point-sum of \(g\). Thus every such simple-function integral is at most the point-sum of \(g\). Taking the supremum proves the formula. Applying it to \(g=|f|^p\) gives the final assertion. \(\square\)

Finite \(L^p\) Norm Forces Countable Support

Proposition: On \((\mathbb{R},\mathcal{B}_{\mathbb{R}},\mu)\), for \(p>0\) and a real- or complex-valued Borel function \(f\), \(\int |f|^p\,d\mu<\infty\) if and only if the point-sum \(\sum_{x\in\mathbb{R}}|f(x)|^p\) is finite. In that case, the set where \(f\ne0\) is countable.

Proof. The equivalence between finiteness of the integral and finiteness of the point-sum is the counting-integral formula just proved. Suppose the sum is finite, and for each integer \(k\ge1\) let \(E_k=\{x:|f(x)|^p\ge1/k\}\). If \(E_k\) were infinite, it would contain finite subsets of arbitrarily large size. A subset of \(N\) distinct points would contribute at least \(N/k\) to the point-sum. Since \(N/k\) is unbounded as \(N\) increases, this contradicts finiteness of the sum. Thus each \(E_k\) is finite. Every point with \(f(x)\ne0\) lies in some \(E_k\): choose \(k\) large enough that \(1/k\le |f(x)|^p\). Hence \(\{x:f(x)\ne0\}=\bigcup_{k\ge1}E_k\) is countable. Conversely, if the point-sum is finite, the integral is finite by the formula, whether or not the support was separately known to be countable. \(\square\)

Worked Example: A Singleton Indicator Has Norm One

Let \(f=\chi_{\{0\}}\), a Borel function on \(\mathbb{R}\). Its \(p\)-th power equals \(1\) at \(0\) and \(0\) elsewhere. Therefore, for every \(1\le p<\infty\),

$$ \int_{\mathbb{R}}|f|^p\,d\mu =|f(0)|^p+\sum_{x\ne0}|f(x)|^p =1^p+0 =1, \qquad \|f\|_p=1^{1/p}=1. $$

Check: directly, the only nonzero contribution is from the one-point set \(\{0\}\), whose counting measure is \(1\). Thus the integral is \(1\), as the point-sum calculation gives. The function is nonzero, but its support is countable—in fact, it has just one point.

Why a Nonzero Continuous Function Cannot Be in \(L^p\)

Theorem: On \((\mathbb{R},\mathcal{B}_{\mathbb{R}},\mu)\), if \(1\le p<\infty\) and \(f:\mathbb{R}\to\mathbb{R}\) or \(f:\mathbb{R}\to\mathbb{C}\) is continuous, then \(f\in L^p(\mu)\) if and only if \(f\) is identically zero. Equivalently, every nonzero continuous function has infinite \(L^p\) norm.

Proof. The zero function has integral \(\int |f|^p\,d\mu=0\), so it belongs to \(L^p(\mu)\). For the converse, suppose \(f\) is continuous and not identically zero. Choose \(x_0\in\mathbb{R}\) with \(a=|f(x_0)|>0\). The function \(|f|\) is continuous, so there is a \(\delta>0\) such that \(|x-x_0|<\delta\) implies \(\big||f(x)|-|f(x_0)|\big|<a/2\). The triangle inequality then gives \(|f(x)|>a/2\) throughout this interval. In particular, the infinitely many distinct points \(x_n=x_0+\delta/(n+1)\), \(n\ge1\), lie in the interval and satisfy \(|f(x_n)|^p\ge(a/2)^p\). For each positive integer \(N\), the point-sum is at least the contribution from its first \(N\) such points: $$ \int_{\mathbb{R}}|f|^p\,d\mu \ge\sum_{n=1}^{N}|f(x_n)|^p \ge N(a/2)^p. $$ Because \((a/2)^p>0\), these lower bounds grow without bound as \(N\to\infty\). Thus the integral is infinite, and \(f\notin L^p(\mu)\). \(\square\)

Worked Example: The Continuous Tent Function Has Infinite Counting-Measure Norm

Define \(f(x)=\max(1-|x|,0)\). This is continuous, Borel measurable, and nonzero. For every integer \(n\ge1\), set \(x_n=1/(n+2)\). These points are distinct and satisfy \(0<x_n\le1/3\), so $$ f(x_n)=1-\frac{1}{n+2}\ge\frac23. $$ For every \(N\ge1\), it follows that $$ \int_{\mathbb{R}}|f|^p\,d\mu \ge\sum_{n=1}^{N}|f(x_n)|^p \ge N\left(\frac23\right)^p. $$ The last expression tends to infinity with \(N\), so \(\|f\|_p=\infty\) for every \(1\le p<\infty\).

Check: at the selected points, the bound is uniform in \(n\): each contributes at least \((2/3)^p\), and the sum over the first \(N\) points is at least \(N(2/3)^p\). The infinite norm is therefore not inferred merely from the support being an interval; it follows from infinitely many distinct points each contributing a fixed positive amount.

Worked Example: A Countably Supported Function Has Finite Norm

Define \(g=\sum_{n=1}^{\infty}2^{-n}\chi_{\{n\}}\) on \(\mathbb{R}\). Its support is the Borel set of positive integers, and \(g(n)=2^{-n}\) for \(n\ge1\), while \(g(x)=0\) at every other point. For \(1\le p<\infty\), the counting-integral formula and the geometric-series formula give $$ \int_{\mathbb{R}}|g|^p\,d\mu =\sum_{n=1}^{\infty}2^{-np} =\frac{2^{-p}}{1-2^{-p}} =\frac{1}{2^p-1}. $$ Hence \(\|g\|_p=(2^p-1)^{-1/p}\).

Check: when \(p=2\), the integral is \(\sum_{n=1}^{\infty}4^{-n}=(1/4)/(1-1/4)=1/3\), so \(\|g\|_2=1/\sqrt{3}\). The finite partial sum is \(\sum_{n=1}^{N}4^{-n}=(1-4^{-N})/3\), which increases to \(1/3\), confirming the value by direct finite-sum computation.

The Density Consequence and a Common Mistake

When asking whether continuous functions are dense in \(L^p(\mu)\), the relevant approximating functions must themselves belong to \(L^p(\mu)\); otherwise their \(L^p\) distance from a target is not finite and the usual norm approximation is not defined. The theorem shows that the continuous functions in \(L^p(\mu)\) consist only of the zero function. The singleton indicator \(h=\chi_{\{0\}}\) belongs to \(L^p(\mu)\), but for every continuous \(q\in L^p(\mu)\), the theorem forces \(q=0\). Thus $$ \|h-q\|_p=\|\chi_{\{0\}}\|_p=1. $$ No sequence of continuous \(L^p\) functions can approach \(h\) in \(L^p\), so continuous functions are not dense in this space.

Common mistake. One might calculate the area under the tent function using Lebesgue measure and conclude that it is integrable here. In fact, \(\int_{\mathbb{R}}f(x)\,dx=1\) with respect to Lebesgue measure, since the graph is a triangle of base \(2\) and height \(1\). But that is an integral with respect to \(m\), not the counting measure \(\mu\). With counting measure, the points \(x_n=1/(n+2)\) alone give \(\int f\,d\mu\ge 2N/3\) for every \(N\), so the counting-measure integral is infinite. A bounded interval has finite Lebesgue measure, but it has infinite counting measure.

The mechanism is therefore not a failure of continuity or measurability. Counting measure treats each point as having measure \(1\). A continuous function that is nonzero at one point must remain bounded away from zero on an interval, and that interval contains infinitely many distinct points. By contrast, an indicator of a singleton has only one nonzero contribution. These facts explain precisely why point-supported functions can belong to \(L^p(\mu)\) even though nonzero continuous functions cannot.

Check Your Understanding

Use the point-sum formula and keep the measure fixed as counting measure on the Borel subsets of \(\mathbb{R}\).

  1. Compute \(\|\chi_{\{2,5\}}\|_p\) for \(1\le p<\infty\).
  2. Why does continuity at a point where \(f\ne0\) produce infinitely many terms in the counting-measure integral bounded below by the same positive number?
  3. For \(g=\sum_{n\ge1}3^{-n}\chi_{\{n\}}\), determine \(\int |g|^p\,d\mu\) for \(p\ge1\).
  4. Explain why an interval of finite Lebesgue measure can nevertheless have infinite counting measure.
  5. Show that the \(L^p\) distance from \(\chi_{\{0\}}\) to any continuous function that belongs to \(L^p(\mu)\) is exactly \(1\).