Let $f \in L^1_{\text{loc}}(\Bbb{R}^d)$. For $x \in \Bbb{R}^d$ and $r > 0$ define the average of $f$ over the ball $B(x,r)$ as $$(A_rf)(x) := \frac1{\lambda(B(x,r))} \int_{B(x,r)} f(y)\,dy.$$
I need to prove that for fixed $r> 0$ the map $x \mapsto A_r f$ is measurable.
The proof given to me is the following:
Fix $r > 0$ and denote $\lambda(B(0,1)) = \omega_d$. Then $\lambda(B(x,r)) = \omega_d r^d$ so
$$(A_rf)(x) := \frac1{\lambda(B(x,r))} \int_{B(x,r)} f(y)\,dy = \frac{1}{\omega_d r^d} \int_{\Bbb{R}^d} \chi_{\{(x,y) : \|x-y\| < r\}}(x,y)f(y)\,dy$$
and measurability follows from Fubini's theorem.
My attempt to understand this:
The idea seems to be to show that $\frac{1}{\omega_d r^d}\chi_{\{(x,y) : \|x-y\| < r\}}(x,y)f(y) \in L^1(\Bbb{R}^d \times \Bbb{R}^d)$ and then by Fubini the iterated integral $$\int_{x \in \Bbb{R}^d} \left(\frac{1}{\omega_d r^d} \int_{\Bbb{R}^d} \chi_{\{(x,y) : \|x-y\| < r\}}(x,y)f(y)\,dy\right)\,dx $$ is well-defined and the integrand is measurable.
Using Tonelli's theorem, it suffices to show that the iterated integral exists: \begin{align} \int_{y \in \Bbb{R}^d} \left(\frac{1}{\omega_d r^d} \int_{\Bbb{R}^d} \chi_{\{(x,y) : \|x-y\| < r\}}(x,y)|f(y)|\,dx\right)\,dy &= \frac1{\omega_d r^d} \int_{y \in \Bbb{R}^d} \left(\int_{x \in \Bbb{R}^d} \chi_{\{(x,y) : \|x-y\| < r\}}(x,y)\,dx\right)|f(y)|\,dy\\ &= \frac1{\omega_d r^d} \int_{y \in \Bbb{R}^d} \left(\int_{x \in \Bbb{R}^d} \chi_{B(y,r)}(x)\,dx\right)|f(y)|\,dy\\ &= \frac1{\omega_d r^d} \int_{y \in \Bbb{R}^d} \lambda(B(y,r))|f(y)|\,dy\\ &= \frac1{\omega_d r^d} \int_{y \in \Bbb{R}^d} \omega_dr^d|f(y)|\,dy\\ &= \int_{y \in \Bbb{R}^d} |f(y)|\,dy \end{align} However, this doesn't have to be finite since $f \in L^1_{\text{loc}}(\Bbb{R}^d)$, not in $L^1(\Bbb{R}^d)$. What am I missing here?
It should be easier than that. Sketch: For fixed $r$ in fact, $A_r(f)(x)$ is continuous. To see why, fix $x$ and for $y$ close to $x,$ note
$$\int_{B(y,r)}f - \int_{B(x,r)}f = \int_{B(y,r)\setminus B(x,r)}f - \int_{B(x,r)\setminus B(y,r)}f.$$
In absolute value, this is bounded above by
$$\int_{B(y,r)\setminus B(x,r)}|f|+ \int_{B(x,r)\setminus B(y,r)}|f|.$$
Now $f$ is in $L^1(x,2r)$ and the measure of both domains of integration $\to 0.$ This should give it.