> [!definition]
>
> Let $f \in \loci$ be a [[Locally Integrable|locally integrable]] function, then
> $
> L_f = \bracs{x: \lim_{r \to 0}\frac{1}{m(B(x, r))}\int_{B(x, r)}\abs{f(y) - f(x)}dy = 0}
> $
> is the **Lebesgue set** of $f$.
> [!theorem]
>
> Let $f \in \loci$, then $m((L_f)^c) = 0$.
>
> *Proof*. Let $c \in \complex$, define $g_c(x) = \abs{f(x) - c}$, then
> $
> \lim_{r \to 0}\frac{1}{m(B(x, r))}\int_{B(x, r)} \abs{f(y) - c}dy = \abs{f(x) - c} \quad (a.e.)
> $
> except on a Lebesgue null set $E_c$. Let $D$ be a countable dense subset of $\complex$, and let $E = \bigcup_{c \in D}E_c$, then $m(E) = 0$. If $x \not\in E$, then for any $\varepsilon > 0$, there exists $c \in D$ such that $\abs{f(x) - c} < \varepsilon$, and $\abs{f(y) - f(x)} < \abs{f(y) - c} + \varepsilon$, so
> $
> \lim_{r \to 0}\frac{1}{m(B(x, r))}\int_{B(x, r)}\abs{f(y) - f(x)}dy \le \abs{f(x) - c} + \varepsilon < 2\varepsilon
> $
> Since $\varepsilon$ is arbitrary, we get that the limit converges to $0$. As $E \supset (L_f)^c$ and $m(E) = 0$, $m((L_f)^c) = 0$.
The Lebesgue set of a [[Locally Integrable|locally integrable]] function has [[Null Set|null]] complement. If the function is also continuous, then the Lebesgue set is the whole space. In the case of [[Space of Continuously Differentiable Functions|continuously differentiable]] functions, there is a bound on the rate of convergence in terms of the derivative.
> [!theorem]
>
> Let $f \in C^1(\real^d)$ be a [[Space of Continuously Differentiable Functions|continuously differentiable]] function such that $f(0) = 0$, then there exists $C_d \ge 0$ such that
> $
> \frac{1}{m(B(0, r))}\int_{B(0, r)}\abs{f(x)}dx \le C_d\int_{B(0, r)}\frac{\abs{Df(x)}}{\abs{x}^{d - 1}}dx
> $
> for all $r > 0$. Over translation, this means that
> $
> \frac{1}{m(B(0, r))}\int_{B(0, r)}\abs{f(y) - f(x)}dy \le C_d\int_{B(x, r)}\frac{\abs{Df(y)}}{\abs{x - y}^{d - 1}}dx
> $
> for all $r > 0$ and $x \in \real^d$.
>
> *Proof*. By the [[Mean Value Theorem|mean value theorem]], for any $x \in \partial B(0, 1)$ and $s \le r$,
> $
> \abs{f(sx)} \le \int_0^s\abs{\frac{d}{dt}f(tx)}dt =\int_0^s \abs{Df(tx) \cdot x}dt \le \int_0^s \abs{Df(tx)}dt
> $
> Let $\sigma$ be the [[Polar Integration|surface measure]] of the unit sphere, then
> $
> \int_{\partial B(0, 1)} \abs{f(sx)} d\sigma(x) \le \int_{\partial B(0, 1)}\int_{[0, s]}\abs{Df(tx)}dtd\sigma(x)
> $
> Unraveling the polar integration yields that
> $
> \int_{\partial B(0, 1)}\int_{[0, s]}\abs{Df(tx)}dtd\sigma(x) = \int_{B(0, s)}\frac{\abs{Df(x)}}{\abs{x}^{d - 1}}dx
> $
> Doing the same to the overall integral yields
> $
> \begin{align*}
> \int_{B(0, r)}\abs{f(x)}dx &= \int_{[0, r]}s^{d - 1}\int_{\partial B(0, 1)}\abs{f(sx)}d\sigma(x)ds \\
> &\le \int_{[0, r]}s^{d - 1}\int_{B(0, s)}\frac{\abs{Df(x)}}{\abs{x}^{d - 1}}dx ds \\
> &\le \braks{\int_{B(0, r)}\frac{\abs{Df(x)}}{\abs{x}^{d - 1}}dx} \cdot \braks{\int_{[0, r]}s^{d - 1}ds} \\
> &= C_d r^{d}\int_{B(0, r)}\frac{\abs{Df(x)}}{\abs{x}^{d - 1}}dx
> \end{align*}
> $
> Moving the $r^d$ to the left yields the desired result.