TITLE: Real Analysis, Folland Theorem 3.18 Differentiation on Euclidean Space
QUESTION [5 upvotes]: Background Information:
A measurable function $f:\mathbb{R}^n\rightarrow \mathbb{C}$ is called locally integrable (w.r.t Lebesgue measure) if $\int_K |f(x)|dx < \infty$ for every bounded measurable $K\subset \mathbb{R}^n$. We denote the space of locally integrable functions by $L^1_{loc}$. If $f\in L^1_{loc}$, $x\in \mathbb{R}^n$, and $r > 0$, we define $A_r f(x)$ to be the average value of $f$ on $B(r,x)$ (ball of radius $r$ around $x$): $$A_r f(x) = \frac{1}{m(B(r,x))}\int_{B(r,x)} f(y) dy$$
Maximal Theorem  - There is a constant $C > 0$ such that for all $f\in L^1$ and all $\alpha > 0$, $$m(\{x:Hf(x) > \alpha\}) \leq \frac{C}{\alpha}\int |f(x)|dx$$
Question:

Theorem 3.18 - If $f\in L^1_{loc}$ then $\lim_{r\rightarrow 0} A_r f(x) = f(x)$ for a.e. $x\in\mathbb{R}^n$

I am trying to understand Folland's proof but I am having some trouble. He first begins by saying that it suffices to show that for $N\in\mathbb{N}$, $A_r f(x)\rightarrow f(x)$ for a.e. with $|x| < N$. Why does $|x| \leq N$? 
Then he states that but for $|x|\leq N$ an $r\leq 1$ the values $A_r f(x)$ depend on $f(y)$ for $|y|\leq N + 1$. Again why is $|y|\leq N+1$?
Then he says by Theorem 2.41 we can find a continuous integrable function $g$
such that $\int |g(y) - f(y)|dy < \epsilon$. Then the rest is not so bad to follow. 
If there is another way of proving this please let me know otherwise I just need to understand the beginning points and I think I should be able to understand the proof.
Second question: 
As mentioned Folland uses Theorem 2.41 to find a continuous integrable function $g$ such that $\int |g(y) - f(y)|dy < \epsilon$. By contunity of $g$ we have that for $x\in\mathbb{R}^n$ and $\delta > 0$ there exists an $r > 0$ such that $|g(y) - g(x)| < \delta$ whenever $|y - x| < r$, and hence $$|A_r g(x) - g(x)| = \frac{1}{m(B(r,x)}\left|int_{B(r,x)} [g(y) - g(x)] dy \right| < \delta$$ therefore $A_r g(x)\rightarrow g(x)$ as $r\rightarrow 0$ for all $x$, so 
\begin{align*}
\lim_{r\rightarrow 0}\sup|A_rf(x) - f(x)| &= \lim_{r\rightarrow 0}\sup |A_r(f-g)(x) + (A_r g - g)(x) + (g - f)(x)|\\
&\leq H (f-g)(x) + 0 + |f-g|(x)
\end{align*}
Let, $$E_{\alpha} = \{x:\lim_{r\rightarrow 0}\sup |A_r f(x) - f(x)| > \alpha\} \ \ \ F_{\alpha} = \{x: |f - g|(x) > \alpha\}$$
This is where I get confused again. Folland says note that $$E_{\alpha} \subset F_{\alpha/2}\cup \{x: H(f-g)(x) > \alpha/2\}$$ Why does he have $F_{\alpha/2}$ I understand why $E_{\alpha}$ is a subset of these but I don't understand the intuition. 
Then he says but $$(\alpha/2)m(F_{\alpha/2}) \leq \int_{F_{\alpha/2}} |f(x) - g(x)| dx < \epsilon$$
Is he using the Maximal Theorem there?

REPLY [2 votes]: Let us prove it step by step. I wrote a detailed proof following Folland's approach. 

Theorem 3.18 - If $f\in L^1_{loc}$ then $\lim_{r\rightarrow 0} A_r f(x) = f(x)$ for a.e. $x\in\mathbb{R}^n$

Proof: 
Step 1: The purpose of this step is to prove that, without loss of generality, we can assume $f$ to be in $L^1$. 
Let $\{X_j\}_j$ be any sequence of measurable sets such that $\mathbb{R}^n=\bigcup_j X_j$. 
IF, for all $j$, $\lim_{r\rightarrow 0} A_r f(x) = f(x)$ for a.e. $x\in X_j$, THEN we have that $\lim_{r\rightarrow 0} A_r f(x) = f(x)$ for a.e. $x\in\mathbb{R}^n$. 
In fact, let $F=\{x \in \mathbb{R}^n \: : \: \lim_{r\rightarrow 0} A_r f(x) \neq f(x) \}$. If, for all $j$, $\lim_{r\rightarrow 0} A_r f(x) = f(x)$ for a.e. $x\in X_j$, it means that, for all $j$, we have $m(F\cap X_j)=0$.  Since 
$$F=F \cap\mathbb{R}^n= F\cap \bigcup_j X_j = \bigcup_j (F\cap X_j)$$
we have 
$$m(F)\leq \sum_j m(F\cap X_j)=0$$
So we have that $\lim_{r\rightarrow 0} A_r f(x) = f(x)$ for a.e. $x\in\mathbb{R}^n$.
Now let us peek one specific sequence $\{X_j\}_j$ of measurable sets such that $\mathbb{R}^n=\bigcup_j X_j$. Take 
$$X_j=\{ x \in \mathbb{R}^n \: : \: |x|\leq j\}$$
By what we have shown above, we have 

1.a: to prove that $\lim_{r\rightarrow 0} A_r f(x) = f(x)$ for a.e. $x\in\mathbb{R}^n$, all we need is to prove that for all $j$, $\lim_{r\rightarrow 0} A_r f(x) = f(x)$ for a.e. $x\in X_j$ 

Since we want to prove that $\lim_{r\rightarrow 0} A_r f(x) = f(x)$ for a.e. $x\in\mathbb{R}^n$, we can, without loss of generality, restrict our attention to $r<1$. 
Given any $j$, and given any $x \in X_j$, we have that $B(1,x) \subset X_{j+1}$, and since, for $r<1$, $A_r f(x)$ depends only on the value of $f$ on $B(1,x)$, we have that, for all $r<1$ 
$$A_r f(x)= A_r (f\chi_{X_{j+1}})(x)$$
In particular, we have $\lim_{r \to 0} A_r f(x)= \lim_{r \to 0}A_r (f\chi_{X_{j+1}})(x)$. So we get that 
$\lim_{r\rightarrow 0} A_r f(x) = f(x)$ for a.e. $x\in X_j$ iff $\lim_{r \to 0}A_r (f\chi_{X_{j+1}})(x)= f(x)$ for a.e. $x\in X_j$.
Note that, since $X_{j+1}$ is bounded, we have that $f\chi_{X_{j+1}}\in L^1$.
So, we have

1.b: to prove that for all $f\in L_{loc}^1$,  for all $j$, $\lim_{r\rightarrow 0} A_r f(x) = f(x)$ for a.e. $x\in X_j$, all we need to prove is 
   that, for all $f\in L^1$,  for all $j$, $\lim_{r\rightarrow 0} A_r f(x) = f(x)$ for a.e. $x\in X_j$ then we have proved 

Combining 1.a and 1.b then, to prove the theorem we need only to prove that  for all $f\in L^1$,  for all $j$, $\lim_{r\rightarrow 0} A_r f(x) = f(x)$ for a.e. $x\in X_j$. 
In fact, in the next steps below, we will prove that: for all $f\in L^1$,  for all $j$, $\lim_{r\rightarrow 0} A_r f(x) = f(x)$ for a.e. $x\in \mathbb{R}^n$.
Step 2: 
Lemma: If $f \in L^1$ then, for all $\alpha>0$, $m(\{x:\lim_{r\rightarrow 0}\sup |A_r f(x) - f(x)| > \alpha\})=0$.
Given any $f \in L^1$ and any $\epsilon>0$, by Theorem 2.41 we can find a continuous integrable function $g$ such that $\int |g(y) - f(y)|dy < \epsilon$. By contunity of $g$ we have that for $x\in\mathbb{R}^n$ and $\delta > 0$ there exists an $r > 0$ such that $|g(y) - g(x)| < \delta$ whenever $|y - x| < r$, and hence 
$$|A_r g(x) - g(x)| = \frac{1}{m(B(r,x)}\left|\int_{B(r,x)} [g(y) - g(x)] dy \right| \leq \frac{1}{m(B(r,x)} \int_{B(r,x)} |g(y) - g(x)| dy \\ <\frac{1}{m(B(r,x)} \:\: \delta \:\: m(B(r,x)=  \delta$$ 
therefore $A_r g(x)\rightarrow g(x)$ as $r\rightarrow 0$ for all $x$, so 
\begin{align*}
\lim_{r\rightarrow 0}\sup|A_rf(x) - f(x)| &= \lim_{r\rightarrow 0}\sup |A_r(f-g)(x) + (A_r g - g)(x) + (g - f)(x)|\\
&\leq H (f-g)(x) + 0 + |f-g|(x) \tag{1}
\end{align*}
Now, given any $\alpha >0$, let,
 $$E_{\alpha} = \{x:\lim_{r\rightarrow 0}\sup |A_r f(x) - f(x)| > \alpha\}$$
For all $x\in E_{\alpha}$, from $(1)$, we that either $ H (f-g)(x) > \alpha/2$ or $|f - g|(x) \geq \alpha/2$. It means 
$$E_{\alpha} \subset \{x: |f - g|(x) \geq \alpha/2\} \cup \{x:  H (f-g)(x) > \alpha/2\} \tag{2}$$
Let $ F_{\alpha/2} = \{x: |f - g|(x) \geq \alpha/2\}$.
Since, for all $x\in F_{\alpha/2}$, $\alpha/2 \leq|f - g|(x)$, we have 
$$(\alpha/2)m(F_{\alpha/2}) \leq \int_{F_{\alpha/2}}|f(x)-g(x)|dx \leq \int |f(x)-g(x)|dx <\epsilon$$ 
So we have 
$$m(\{x: |f - g|(x) \geq \alpha/2\})=m(F_{\alpha/2})<\frac{2\epsilon}{\alpha}$$
On the other hand, by maximal theorem,
$$m(\{x:  H (f-g)(x) > \alpha/2\})\leq \frac{2(3^n)\epsilon}{\alpha}$$
Form $(2)$ we have: 
$$m(E_{\alpha}) \leq m( \{x: |f - g|(x) \geq \alpha/2\}) + m( \{x:  H (f-g)(x) > \alpha/2\} ) < \frac{2\epsilon}{\alpha} + \frac{2(3^n)\epsilon}{\alpha}$$
Since $\epsilon>0$ is arbitrary, we have that $m(E_{\alpha})=0$, for all $\alpha >0$. That means:  $m(\{x:\lim_{r\rightarrow 0}\sup |A_r f(x) - f(x)| > \alpha\})=0$, for all $\alpha>0$.
Step 3: 
Given any $f \in L^1$, let 
$$H=\{x : \lim_{r\rightarrow 0} A_r f(x) \textrm{ does not exist  or }  \lim_{r\rightarrow 0} A_r f(x) \neq f(x)\}$$
Note that 
$$H= \{x: \limsup_{r\rightarrow 0} |A_r f(x) - f(x)|>0\} =\bigcup_{k=1}^\infty\left \{x:\lim_{r\rightarrow 0}\sup |A_r f(x) - f(x)| > \frac{1}{k} \right\}$$
So, by the lemma in step 2, we have 
\begin{align*}
m(H) &= m(\{x: \limsup_{r\rightarrow 0} |A_r f(x) - f(x)|>0\}) \\
&\leq \sum_{k=1}^\infty m\left (\left \{x:\limsup_{r\rightarrow 0} |A_r f(x) - f(x)| > \frac{1}{k}\right\}\right ) = \sum_{k=1}^\infty 0 =0 
\end{align*}
So, 
$$m(H)=0$$
which means that 
$\lim_{r\rightarrow 0} A_r f(x) = f(x)$ for a.e. $x\in\mathbb{R}^n$.