> [!theorem]
>
> Let $f \in \loci(\real^d)$ be a [[Locally Integrable|locally integrable]] function, then
> $
> Hf = \sup_{r > 0}A_r\abs{f}(x) = \sup_{r > 0}\frac{1}{m(B(x, r))}\int_{B(x, r)}\abs{f(y)}dy
> $
> is a lower-semicontinuous function, known as the **Hardy-Littlewood maximal function** of $f$. In particular, $Hf$ is [[Borel Measurable Function|Borel measurable]].
>
> *Proof*. For each $a \in \real$, $Hf(x) > a$ if and only if there exists $r > 0$ such that $A_r\abs{f}(x) > a$. Thus
> $
> (Hf)^{-1}((a, \infty)) = \bigcup_{r > 0}(A_r\abs{f})^{-1}((a, \infty))
> $
> Since $A_r\abs{f}$ is continuous, $(A_r\abs{f})^{-1}((a, \infty))$ is open. Therefore $Hf$ is lower-semicontinuous.
> [!theorem] The Maximal Theorem
>
> Let $f \in L^1(\real^d)$ and $\alpha > 0$, then
> $
> m(\bracs{x \in \real^d: Hf(x) > a}) \le \frac{3^d}{\alpha}\norm{f}_{L^1(\real^d)}
> $
>
> *Proof*. For each $x \in \real^d$ such that $Hf(x) > a$, there exists $r_x > 0$ such that $A_r\abs{f}(x) > \alpha$. Thus
> $
> \bracs{x \in \real^d: Hf(x) > \alpha} \subset \bigcup_{Hf(x) > \alpha}B(x, r_x)
> $
> By the [[Vitali Covering Lemma]], there exists $\seqf{x_j} \subset \real^d$ such that
> $
> m(\bracs{x \in \real^d: Hf(x) > \alpha}) \le 3^{d}\sum_{j = 1}^n m(B(x_j, r_{x_j}))
> $
> and $\bracsn{B(x_j, r_{x_j}): 1 \le j \le n}$ are pairwise disjoint. Since $A\abs{f}_{r_{x_j}}\abs{f}(x_j) > \alpha$,
> $
> \begin{align*}
> \alpha &< \frac{1}{m(B(x_j, r_{x_j}))}\int_{B(x_j, r_{x_j})}\abs{f(y)}dy \\
> m(B(x_j, r_{x_j})) &< \frac{1}{\alpha}\int_{B(x_j, r_{x_j})}\abs{f(y)}dy
> \end{align*}
> $
> As the balls are pairwise disjoint,
> $
> m(\bracs{x \in \real^d: Hf(x) > \alpha}) \le \frac{3^d}{\alpha}\sum_{j = 1}^n\int_{B(x_j, r_{x_j})}\abs{f(y)}dy \le \frac{3^d}{\alpha}\norm{f}_{L^1(\real^d)}
> $