[proofplan]
We reduce the Lebesgue point condition to countably many applications of the [Lebesgue Differentiation Theorem](/theorems/3031). For each rational $q \in \mathbb{Q}$, the function $y \mapsto |f(y) - q|$ is locally integrable, so the differentiation theorem provides a $\mathcal{L}^n$-null set $N_q$ outside which the ball averages of $|f(\cdot) - q|$ converge to $|f(x) - q|$. The countable union $N = \bigcup_{q \in \mathbb{Q}} N_q$ is still $\mathcal{L}^n$-null, and for $x \notin N$, a triangle inequality argument using a rational approximation to $f(x)$ converts the convergence of $|f(\cdot) - q|$-averages into the Lebesgue point condition for $|f(\cdot) - f(x)|$-averages.
[/proofplan]
[step:Apply the Lebesgue Differentiation Theorem to $|f(\cdot) - q|$ for each rational $q$]
For each $q \in \mathbb{Q}$, define the function $g_q : \mathbb{R}^n \to [0, \infty)$ by $g_q(y) = |f(y) - q|$. Since $f \in L^1_{\mathrm{loc}}(\mathbb{R}^n)$ and $q$ is a constant, the triangle inequality gives $|g_q(y)| \leq |f(y)| + |q|$, so $g_q \in L^1_{\mathrm{loc}}(\mathbb{R}^n)$.
By the [Lebesgue Differentiation Theorem](/theorems/3031) applied to $g_q$, there exists a $\mathcal{L}^n$-null set $N_q \subset \mathbb{R}^n$ such that for every $x \in \mathbb{R}^n \setminus N_q$,
\begin{align*}
\lim_{r \to 0^+} \frac{1}{\mathcal{L}^n(B(x,r))} \int_{B(x,r)} |f(y) - q| \, d\mathcal{L}^n(y) = |f(x) - q|.
\end{align*}
[guided]
The idea is to convert the Lebesgue point condition — which involves the non-constant quantity $|f(y) - f(x)|$ inside the integral — into a family of conditions involving the constant $q$ in place of $f(x)$. We cannot directly apply the Lebesgue Differentiation Theorem to $y \mapsto |f(y) - f(x)|$ and conclude the limit is $0$, because the function we are averaging depends on $x$: for each fixed $x$, the theorem would give convergence at $\mathcal{L}^n$-a.e. $y$, which has the wrong quantifier structure.
Instead, for each fixed rational $q \in \mathbb{Q}$, the function $g_q(y) = |f(y) - q|$ depends only on $y$, not on the point $x$ at which we are evaluating. Since $f \in L^1_{\mathrm{loc}}(\mathbb{R}^n)$ and $|g_q(y)| \leq |f(y)| + |q|$, we have $g_q \in L^1_{\mathrm{loc}}(\mathbb{R}^n)$. The [Lebesgue Differentiation Theorem](/theorems/3031) applies: for $\mathcal{L}^n$-a.e. $x$,
\begin{align*}
\lim_{r \to 0^+} \frac{1}{\mathcal{L}^n(B(x,r))} \int_{B(x,r)} |f(y) - q| \, d\mathcal{L}^n(y) = |f(x) - q|.
\end{align*}
Let $N_q$ denote the exceptional $\mathcal{L}^n$-null set where this convergence fails. The key point is that each $N_q$ is null, and $\mathbb{Q}$ is countable, so we can control all rationals simultaneously.
[/guided]
[/step]
[step:Form the countable union of exceptional sets]
Define
\begin{align*}
N := \bigcup_{q \in \mathbb{Q}} N_q.
\end{align*}
Since $\mathbb{Q}$ is countable and each $N_q$ has $\mathcal{L}^n(N_q) = 0$, the countable subadditivity of $\mathcal{L}^n$ gives $\mathcal{L}^n(N) = 0$. For every $x \in \mathbb{R}^n \setminus N$ and every $q \in \mathbb{Q}$, the convergence
\begin{align*}
\lim_{r \to 0^+} \frac{1}{\mathcal{L}^n(B(x,r))} \int_{B(x,r)} |f(y) - q| \, d\mathcal{L}^n(y) = |f(x) - q|
\end{align*}
holds simultaneously for all rationals $q$.
[/step]
[step:Use the triangle inequality and density of $\mathbb{Q}$ to establish the Lebesgue point condition]
Fix $x \in \mathbb{R}^n \setminus N$ and let $\varepsilon > 0$. Since $\mathbb{Q}$ is dense in $\mathbb{R}$, choose $q \in \mathbb{Q}$ with $|f(x) - q| < \varepsilon / 2$.
For every $y \in \mathbb{R}^n$, the triangle inequality gives
\begin{align*}
|f(y) - f(x)| \leq |f(y) - q| + |q - f(x)|.
\end{align*}
Averaging over $B(x, r)$:
\begin{align*}
\frac{1}{\mathcal{L}^n(B(x,r))} \int_{B(x,r)} |f(y) - f(x)| \, d\mathcal{L}^n(y) &\leq \frac{1}{\mathcal{L}^n(B(x,r))} \int_{B(x,r)} |f(y) - q| \, d\mathcal{L}^n(y) + |q - f(x)|.
\end{align*}
Since $x \notin N_q$, the first term on the right-hand side converges to $|f(x) - q|$ as $r \to 0^+$. Therefore
\begin{align*}
\limsup_{r \to 0^+} \frac{1}{\mathcal{L}^n(B(x,r))} \int_{B(x,r)} |f(y) - f(x)| \, d\mathcal{L}^n(y) &\leq |f(x) - q| + |q - f(x)| = 2|f(x) - q| < \varepsilon.
\end{align*}
Since $\varepsilon > 0$ was arbitrary, we conclude
\begin{align*}
\lim_{r \to 0^+} \frac{1}{\mathcal{L}^n(B(x,r))} \int_{B(x,r)} |f(y) - f(x)| \, d\mathcal{L}^n(y) = 0.
\end{align*}
This is exactly the condition for $x$ to be a Lebesgue point of $f$.
[guided]
We want to show that the average of $|f(y) - f(x)|$ over $B(x, r)$ tends to zero. The difficulty is that $f(x)$ is not a rational number in general, and we only know the differentiation theorem for the fixed functions $g_q$. The resolution is to approximate $f(x)$ by a nearby rational $q$ and use the triangle inequality to transfer the estimate.
Fix $x \in \mathbb{R}^n \setminus N$ and $\varepsilon > 0$. Choose $q \in \mathbb{Q}$ with $|f(x) - q| < \varepsilon/2$. The pointwise triangle inequality $|f(y) - f(x)| \leq |f(y) - q| + |q - f(x)|$ holds for every $y$. Integrating both sides over $B(x, r)$ and dividing by $\mathcal{L}^n(B(x, r))$, the linearity of the integral gives
\begin{align*}
\frac{1}{\mathcal{L}^n(B(x,r))} \int_{B(x,r)} |f(y) - f(x)| \, d\mathcal{L}^n(y) &\leq \frac{1}{\mathcal{L}^n(B(x,r))} \int_{B(x,r)} |f(y) - q| \, d\mathcal{L}^n(y) + |q - f(x)|.
\end{align*}
The second term is a constant equal to $|q - f(x)| < \varepsilon/2$. The first term converges to $|f(x) - q| < \varepsilon/2$ as $r \to 0^+$, because $x \notin N \supset N_q$. Therefore
\begin{align*}
\limsup_{r \to 0^+} \frac{1}{\mathcal{L}^n(B(x,r))} \int_{B(x,r)} |f(y) - f(x)| \, d\mathcal{L}^n(y) \leq \frac{\varepsilon}{2} + \frac{\varepsilon}{2} = \varepsilon.
\end{align*}
Since the limsup is non-negative (the integrand is non-negative) and bounded above by every $\varepsilon > 0$, the limit exists and equals $0$. This is the Lebesgue point condition at $x$.
Why is the density of $\mathbb{Q}$ essential here? Because the argument requires $|f(x) - q|$ to be arbitrarily small. If we only had finitely many test values, we could only make $|f(x) - q|$ small up to a fixed threshold, and the limsup bound would not tend to zero.
[/guided]
[/step]
[step:Conclude that $\mathcal{L}^n$-almost every point is a Lebesgue point]
We have shown that every $x \in \mathbb{R}^n \setminus N$ is a Lebesgue point of $f$, where $\mathcal{L}^n(N) = 0$. Equivalently, the set of points that are not Lebesgue points of $f$ is contained in the $\mathcal{L}^n$-null set $N$, so $\mathcal{L}^n$-almost every $x \in \mathbb{R}^n$ is a Lebesgue point of $f$.
[/step]