# borel measurable functions and measurable functions

Say you are given the Lebesgue measure on the real line and a Lebesgue measurable function $f$. Here Lebesgue measure is a complete measure (defined for some non-Borel set). And note that in the case of real line, the borel sets are just the sets that are in the sigma-algebra generated by the open sets.

I remember seeing something like: we can change $f$ on a set of measure $0$, and turn $f$ into a Borel measurable function.

Now I don't quite know how I can prove it or if it is even true.

I think if it is indeed true, the same proof should work for any metric space and for any measure that satisfies:

1. $\mu(A)=\inf_{O\supset A} \mu(A)$ for all measurable $A$, where the infimum is taken over all such open sets $O$.
2. $\mu(A)=\sup_{K\subset A} \mu(A)$ for all measurable $A$, where the infimum is taken over all such compact sets $K$.

Can anybody give me any hint how one might prove this? Or if it's incorrect.

For every rational $r$ let $A_r = \{x: f(x) \le r\}$. There is a $G_\delta$ set $B_r$ such that $A_r \subseteq B_r$ and $m(B_r \backslash A_r) = 0$. Define $g(x) = \inf \{r \in \mathbb Q: x \in B_r\}$.