I've been trying to prove that the Hardy-Littlewood Maximal function is a Borel Function for a while now (and was hoping to get some help) and have been stuck on the final step for a while, which is to show that, fixing $r>0$ and letting $(X,d)$ be a metric space then
$$I(x) = \int_{B_r(x)} |f| d\mu$$ is a Borel function. Where $f\in L^1(\mu)$ and $\mu$ is a outer Borel measure (which means Borel sets are $\mu$ measurable) with the property that $\mu(B_r(x)) < \infty$ for all $r$ and $x$.
I've boiled the problem down to showing that the above holds if one can show that the function $\mu(B_r(x)\cap A)$ is a Borel function. Where $A$ is any arbitrary $\mu$-measurable set.
I have tried to come up with counter examples just in case but any weird measure that I come up with it tends to break one of the two conditions imposed on $\mu$.
$\underline{EDIT}$ Here are some definitions that may not be standard and hence have added them to clear things up. (Also in the course I am doing we call outer measures, measures so this might explain the weird naming I the following definitions)
A set $A \subset X$ is said to be $\mu$ measurable if $\forall E \subset X$ the $$\mu(E) = \mu(E\cap A) +\mu(E\setminus A)$$
$\mu$ is said to be Borel if every Borel set is $\mu$ measurable. e.g. $\delta _0$ is Borel when $X=\mathbb{R}$ but also the Vitali set is $\delta _0$ measuable but not a Borel set
A function $f:X \to \mathbb{R}$ is said to be $\mu$ Borel if for all $a \in \mathbb{R}, f^{-1}((a,\infty)$ is a Borel set.
Many thanks in advance.
If you mean that $\mu$ is the measure induced by an outer measure on the Borel sets, then we can take simple functions $s_n\uparrow |f|$ and apply the Monotone or Dominated Convergence Theorem: if we define $I_n$ by
$I_n(x):=\int_X s_n(x) \chi_{B_r}(x)d\mu$ then the $I_n$ are $\mu-$measurable and satisfy
$\lim I_n(x)=\int_X \lim s_n(x) \chi_{B_r}(x)d\mu=\int_X|f(x)|\chi_{B_r}(x)d\mu =\int _{B_r(x)}|f(x)|d\mu=I(x)$
so $I$ is measurable being the limit of $\mu-$ measurable functions.