Why Density Requires More Than Pointwise Approximation
Simple functions are the basic building blocks in the definition of the Lebesgue integral. For \(1\le p<\infty\), their importance goes further: every \(L^p\) function can be approximated arbitrarily closely in \(L^p\) norm by a measurable simple function. The measure space need not be finite or sigma-finite. On an infinite-measure space, however, a uniform pointwise error alone does not control the integral of the error. The proof must first restrict attention to a finite-measure set.
Throughout, \((X,\mathcal{M},\mu)\) is an arbitrary measure space; no finiteness, sigma-finiteness, or completeness assumption is imposed. Fix \(p\) with \(1\le p<\infty\). Functions may be real-valued or complex-valued, and equalities between elements of \(L^p(\mu)\) are understood up to equality \(\mu\)-a.e. A measurable simple function means a measurable function with finite range. It belongs to \(L^p(\mu)\) when its \(p\)-th power is integrable; in our construction its support will have finite measure.
We use the Monotone Convergence Theorem and Minkowski’s inequality in their standard forms. In particular, if measurable sets \(E_k\) increase to \(E\) and \(h\ge0\) is measurable, then \(\int_{E_k}h\,d\mu\) increases to \(\int_Eh\,d\mu\). Minkowski’s inequality gives \(\|u+v\|_p\le\|u\|_p+\|v\|_p\) for \(u,v\in L^p(\mu)\). These statements apply on arbitrary measure spaces.
Finite-Measure Quantization
First, consider the final approximation step. Suppose \(g\) is measurable, vanishes outside a measurable set \(A\) with \(\mu(A)<\infty\), and satisfies \(|g|\le M<\infty\) everywhere. For \(\delta>0\), quantize the real and imaginary parts separately. For real \(t\), set \(Q_\delta(t)=\delta\lfloor t/\delta\rfloor\), where \(\lfloor r\rfloor\) is the greatest integer not exceeding \(r\). This map has finitely many values on the bounded interval \([-M,M]\), and \(0\le t-Q_\delta(t)<\delta\). For real-valued \(g\), set \(q=Q_\delta(g)\) on \(A\) and \(q=0\) off \(A\). For complex-valued \(g\), set \(q=Q_\delta(\operatorname{Re}g)+iQ_\delta(\operatorname{Im}g)\) on \(A\), and \(q=0\) off \(A\). In either case \(q\) is measurable and has finite range.
Indeed, the pointwise bound implies \(|g-q|^p\le(c\delta)^p\chi_A\); integration and taking the \(p\)-th root give the estimate. Since \(A\) has finite measure and \(q\) is bounded with support in \(A\), \(q\in L^p(\mu)\). If \(\mu(A)=0\), the estimate says \(\|g-q\|_p=0\), so this case requires no choice of a positive error bound.
The Density Theorem
Proof. Choose a measurable representative of \(f\) that is finite everywhere. This is possible because \(\int_X|f|^p\,d\mu<\infty\) implies that the set where \(|f|=\infty\) is null; redefining \(f\) to be zero on that measurable set does not change its \(L^p\) class. Write \(H=|f|^p\), so \(H\) is nonnegative and integrable.
We first localize to a finite-measure set. For each positive integer \(k\), let \(B_k=\{x\in X:|f(x)|>1/k\}\). On \(B_k\), \(H>k^{-p}\), and therefore $$ k^{-p}\mu(B_k)\le\int_{B_k}H\,d\mu\le\int_XH\,d\mu<\infty. $$ Thus \(\mu(B_k)<\infty\). The sets \(B_k\) increase, and their union is \(\{|f|>0\}\), because \(f\) is finite. By the Monotone Convergence Theorem, $$ \int_{B_k}H\,d\mu\longrightarrow\int_{\{|f|>0\}}H\,d\mu=\int_XH\,d\mu. $$ The last equality holds because \(H=0\) on \(\{f=0\}\). Hence \(\|f-f\chi_{B_k}\|_p^p=\int_{B_k^c}H\,d\mu\longrightarrow0\). Choose \(k\) large enough that \(\|f-f\chi_{B_k}\|_p<\varepsilon/3\).
Next truncate the amplitude on \(B_k\). For \(M>0\), define \(A_M=B_k\cap\{|f|\le M\}\) and \(g=f\chi_{A_M}\). As \(M\) increases, the sets \(A_M\) increase to \(B_k\), since \(f\) is finite everywhere. The Monotone Convergence Theorem gives \(\int_{A_M}H\,d\mu\to\int_{B_k}H\,d\mu\). Subtracting from the finite integral over \(B_k\) shows that \(\int_{B_k\setminus A_M}H\,d\mu\to0\). Therefore \(\|f\chi_{B_k}-g\|_p^p=\int_{B_k\setminus A_M}H\,d\mu\to0\). Choose \(M\) so that \(\|f\chi_{B_k}-g\|_p<\varepsilon/3\). The set \(A_M\) has finite measure because \(A_M\subseteq B_k\), and \(g\) is bounded by \(M\) and vanishes off \(A_M\).
If \(\mu(A_M)=0\), then \(g=0\) \(\mu\)-a.e.; take \(q=0\). Otherwise, apply the finite-measure quantization estimate with \(A=A_M\). Choose \(\delta>0\) small enough that \(c\delta\mu(A_M)^{1/p}<\varepsilon/3\), where \(c=1\) in the real case and \(c=\sqrt{2}\) in the complex case. The resulting measurable simple function \(q\) satisfies \(\|g-q\|_p<\varepsilon/3\). In the zero-measure case the same strict bound holds since \(\|g-q\|_p=0\). Minkowski’s inequality now gives $$ \|f-q\|_p\le\|f-f\chi_{B_k}\|_p+\|f\chi_{B_k}-g\|_p+\|g-q\|_p<\varepsilon. $$ The function \(q\) is simple and belongs to \(L^p(\mu)\), because it is bounded and vanishes off the finite-measure set \(A_M\). This proves the theorem. \(\square\)
Three Examples of the Construction
Worked Example: Finite-Support Approximation on Counting Measure
Let \(X=\mathbb{N}=\{1,2,\ldots\}\) with counting measure, let \(p=2\), and define \(f(n)=2^{-n}\). For \(N\ge1\), set \(s_N(n)=2^{-n}\) when \(n\le N\), and \(s_N(n)=0\) when \(n>N\). This is a finite-valued simple function with finite support. The exact error is $$ \|f-s_N\|_2^2=\sum_{n=N+1}^\infty 4^{-n} =\frac{4^{-(N+1)}}{1-1/4} =\frac{4^{-N}}{3}, \qquad \|f-s_N\|_2=\frac{2^{-N}}{\sqrt{3}}. $$ For \(N=2\), the squared error is \(4^{-3}+4^{-4}+\cdots=(1/64)/(1-1/4)=1/48\), agreeing with \(4^{-2}/3=1/48\). Also \(\|f\|_2^2=\sum_{n=1}^\infty4^{-n}=(1/4)/(1-1/4)=1/3\), so the tail errors tend to zero while \(f\) itself has finite, nonzero norm.
Worked Example: Truncating an Unbounded \(L^2\) Function
On \(\mathbb{R}\) with Lebesgue measure, let \(f(x)=x^{-1/4}\) for \(0<x<1\) and \(f(x)=0\) otherwise. This function is unbounded near zero, but $$ \|f\|_2^2=\int_0^1x^{-1/2}\,dx=2, $$ so \(f\in L^2(m)\). For \(M\ge1\), define \(g_M(x)=\min(f(x),M)\) on \((0,1)\), and zero elsewhere. The inequality \(x^{-1/4}>M\) holds exactly when \(0<x<M^{-4}\). Thus $$ \|f-g_M\|_2^2 =\int_0^{M^{-4}}(x^{-1/4}-M)^2\,dx =\left[2x^{1/2}-\frac{8M}{3}x^{3/4}+M^2x\right]_0^{M^{-4}} =\frac{1}{3M^2}. $$ At \(M=2\), direct substitution gives \(2(1/4)-(16/3)(1/8)+4(1/16)=1/2-2/3+1/4=1/12\), which agrees with \(1/(3\cdot2^2)=1/12\). Hence \(\|f-g_2\|_2=1/(2\sqrt{3})\), and the error tends to zero as \(M\) increases.
Each \(g_M\) is bounded and supported on \((0,1)\), which has measure \(1\). Quantizing its real values with step \(\delta\) gives a simple \(q\) with \(\|g_M-q\|_2\le\delta\). For example, taking \(M=2\) and \(\delta=1/10\) gives \(\|g_2-q\|_2\le1/10\). Minkowski’s inequality then yields \(\|f-q\|_2\le1/(2\sqrt{3})+1/10\). The displayed tail integral verifies the truncation error independently of the quantization estimate.
Worked Example: Quantizing \(x\) on a Finite-Measure Set
On \([0,1]\) with Lebesgue measure, let \(p=2\) and define \(q_n(x)=2^{-n}\lfloor2^nx\rfloor\). This function has the values \(k2^{-n}\), for \(k=0,\ldots,2^n\), and is measurable and simple. For \(k=0,\ldots,2^n-1\), on \([k2^{-n},(k+1)2^{-n})\) the error is \(x-k2^{-n}\). The endpoint \(x=1\) has measure zero and error zero. Writing \(h=2^{-n}\), each interval contributes \(\int_0^h t^2\,dt=h^3/3\), so $$ \|x-q_n\|_2^2=2^n\frac{(2^{-n})^3}{3}=\frac{1}{3\cdot4^n}, \qquad \|x-q_n\|_2=\frac{1}{\sqrt{3}\,2^n}. $$ For \(n=1\), direct integration over the two intervals gives \(\int_0^{1/2}x^2\,dx+\int_{1/2}^1(x-1/2)^2\,dx=1/24+1/24=1/12\). The formula gives \(1/(3\cdot4)=1/12\) as well.
A Common Pitfall: Uniform Error on Infinite Measure
On a finite-measure set, a pointwise error bound becomes an \(L^p\) bound because \(\int_A(c\delta)^p\,d\mu=(c\delta)^p\mu(A)\). On a set of infinite measure, this estimate gives no finite bound. For a concrete example, take \(f(x)=e^{-x}\) on \([0,\infty)\) with Lebesgue measure and \(p=2\). Then \(\|f\|_2^2=\int_0^\infty e^{-2x}\,dx=1/2\). With \(\delta=1/4\), the finite-valued quantization \(q(x)=\delta\lceil f(x)/\delta\rceil\) satisfies \(0\le q(x)-f(x)<\delta\), but \(q(x)\ge\delta\) for every \(x\). Consequently \(\int_0^\infty|q|^2\,dx\ge\int_0^\infty\delta^2\,dx=\infty\); this \(q\) is not in \(L^2(m)\).
The incorrect calculation would be to infer from \(|q-f|\le\delta\) that \(\|q-f\|_2\le\delta\). Integrating the pointwise estimate instead gives only \(\int_0^\infty|q-f|^2\,dx\le\int_0^\infty\delta^2\,dx=\infty\), which does not establish a finite error. The correction is to localize first to a finite-measure set, control the discarded \(L^2\) tail, and quantize only on that set. This is why density holds without a global finite-measure assumption, but the proof cannot omit localization.
Check Your Understanding
In each question, identify which stage of the density argument controls the relevant error.
- For \(f\in L^p(\mu)\), why must \(B_k=\{|f|>1/k\}\) have finite measure?
- Explain why \(\int_{B_k^c}|f|^p\,d\mu\to0\) as \(k\to\infty\), even if \(\mu(X)=\infty\).
- If \(g\) is bounded by \(M\) and supported on a set \(A\) of finite measure, give an \(L^p\) error bound for real-valued quantization with step \(\delta\).
- For the function \(f(x)=x^{-1/4}\) on \((0,1)\), what is \(\|f-\min(f,M)\|_2^2\) when \(M\ge1\)?
- Why does a uniform pointwise error bound by \(\delta\) not, by itself, imply a finite \(L^p\) error on an infinite-measure space?