The Lebesgue differentiation theorem says that an integrable function is recovered almost everywhere from averages over shrinking neighborhoods.
Averages over balls
Differentiation asks whether local averages converge back to the pointwise value.
Definition. For \(f\in L^1_{\mathrm{loc}}(\mathbb R^d)\), define the ball average \[ A_rf(x)=\frac{1}{m(B(x,r))}\int_{B(x,r)}f(y)\,\mathrm{d}y. \]
Theorem. For \(f\in L^1_{\mathrm{loc}}(\mathbb R^d)\), \(A_rf(x)\to f(x)\) for Lebesgue-almost every \(x\) as \(r\downarrow0\).
Proof. It suffices to work on a fixed compact ball and replace \(f\) by an \(L^1(\mathbb R^d)\) truncation. Define \[ D f(x)=\limsup_{r\downarrow0}|A_rf(x)-f(x)|. \] For \(g\in C_c(\mathbb R^d)\), uniform continuity gives \(Dg=0\) everywhere. Since \[ Df\le Dg+\limsup_{r\downarrow0}A_r|f-g|+|f-g| \le M(f-g)+|f-g|, \] we have, for \(\lambda>0\), \[ \{Df>2\lambda\} \subset\{M(f-g)>\lambda\}\cup\{|f-g|>\lambda\}. \] The weak maximal inequality and Markov's inequality imply \[ m(Df>2\lambda) \le\frac{C_d+1}{\lambda}\|f-g\|_1. \] Continuous compactly supported functions are dense in \(L^1\), so the right side can be made arbitrarily small. Hence \(Df=0\) almost everywhere.
Hardy-Littlewood maximal function
The maximal function controls the worst local average.
Definition. The centered maximal function is \(Mf(x)=\sup_{r>0}m(B(x,r))^{-1}\int_{B(x,r)}|f(y)|\,\mathrm{d}y\).
Theorem. There is a constant \(C_d\) such that for \(f\in L^1(\mathbb R^d)\), \[ m(\{Mf>\lambda\})\le \frac{C_d}{\lambda}\|f\|_1. \]
Proof. First restrict to the bounded level set \(E_R=\{Mf>\lambda\}\cap B(0,R)\). For every \(x\in E_R\), choose a ball \(B_x\) centered at \(x\), of uniformly bounded radius after enlarging \(R\), such that \[ \lambda m(B_x)<\int_{B_x}|f|. \] The \(5r\)-covering lemma selects a countable pairwise disjoint subfamily \(B_i\) such that \(E_R\subset\bigcup_i5B_i\). Therefore \[ m(E_R) \le5^d\sum_i m(B_i) <\frac{5^d}{\lambda}\sum_i\int_{B_i}|f| \le\frac{5^d}{\lambda}\|f\|_1. \] Let \(R\to\infty\). Thus one may take \(C_d=5^d\); sharper constants are possible but irrelevant for differentiation.
Lemma (\(5r\)-covering). From any family of balls in \(\mathbb R^d\) with uniformly bounded radii, one can select a finite or countable pairwise disjoint subfamily \(\{B_i\}\) such that every original ball is contained in some \(5B_i\).
Proof. Select a ball whose radius is at least half the supremum of all current radii, delete every ball intersecting it, and repeat. The selected balls are disjoint. Any deleted ball \(B\) met a selected ball \(B_i\) with radius \(r_i\ge r(B)/2\); the distance between centers is less than \(r(B)+r_i\le3r_i\), so \(B\subset5B_i\). Separability of \(\mathbb R^d\) makes any disjoint family of positive-radius balls countable.
Lebesgue points
Almost every point is a point of local \(L^1\) continuity.
Definition. A point \(x\) is a Lebesgue point of \(f\) if \[ \frac{1}{m(B(x,r))}\int_{B(x,r)}|f(y)-f(x)|\,\mathrm{d}y\to0. \]
Corollary. Almost every point is a Lebesgue point of every \(f\in L^1_{\mathrm{loc}}(\mathbb R^d)\).
Proof. For \(g\in C_c\), \[ \lim_{r\downarrow0}\frac1{m(B(x,r))} \int_{B(x,r)}|g(y)-g(x)|\,\mathrm{d}y=0 \] at every \(x\). For general \(f\), choose \(g\in C_c\) close in \(L^1\). The local oscillation satisfies \[ \begin{aligned} \limsup_{r\downarrow0}A_r|f-f(x)| &\le M(f-g)(x)+|f(x)-g(x)|\\ &\quad+\limsup_{r\downarrow0}A_r|g-g(x)|. \end{aligned} \] The last term vanishes, and the first two exceed a fixed threshold only on a set controlled by the maximal inequality and Markov's inequality. Density of \(C_c\) in \(L^1\) makes this exceptional set null. Localization handles \(L^1_{\mathrm{loc}}\).
Density theorem
Sets have density one at almost all of their points.
Theorem. If \(E\subset\mathbb R^d\) is measurable, then for almost every \(x\in E\), \[ \frac{m(E\cap B(x,r))}{m(B(x,r))}\to1. \]
Proof. Apply the Lebesgue differentiation theorem to \(f=\mathbf 1_E\). At almost every point, the averages of \(\mathbf 1_E\) converge to \(\mathbf 1_E(x)\), which is \(1\) for almost every \(x\in E\).
Recovering Radon-Nikodym densities
Differentiation turns measure derivatives into local mass ratios.
Remark. If \(\nu=f\,m\), then \(\nu(B(x,r))/m(B(x,r))\to f(x)\) at almost every \(x\). This is why Radon-Nikodym derivatives deserve to be called densities.