# A function that is continuous almost everywhere is Lebesgue measurable

If $$f: E \to \mathfrak{M}$$ (where $$\mathfrak{M}$$ is the Lebesgue measurable sets) is continuous a.e., is it true that $$f$$ is Lebesgue measurable?

I know that continuous functions on $$E \in \mathfrak{M}$$ are Lebesgue measurable, but I am wondering if this can be extended to functions that are continuous a.e.?

My intuition is that the answer is yes.

Let $$D = \{x \in E: f(x) \text{ discontinuous}\}$$ and $$\alpha \in \mathbb{R}$$. Then:

$$f^{-1}((-\infty, \alpha)) = ((\{x \in E: f(x) < \alpha\} \setminus D) \cup (\{x \in E: f(x) < \alpha\} \cap D))$$

The second set is a subset of $$D$$, which has measure 0, so it is measurable. But is the first set also measurable? Is there any easier way to prove (or disprove) the statement?

• The first set is of the form $\mathcal{O} \setminus (D \cap \mathcal{O})$ where $\mathcal{O}$ is open, and $D \cap \mathcal{O}$ is a subset of a set of measure zero. – user296602 Dec 13 '18 at 1:41
• @T.Bongers $\{x \in E : f(x) < \alpha\}$ is not open necessarily – mathworker21 Dec 13 '18 at 1:43
• @T.Bongers there’s no reason why the first one should necessarily be open. If $f$ is the 0 function on $[0,1]$ then it is continuous and for any positive $\alpha$, $\{x \in [0,1] : f(x) < \alpha\} = [0,1]$. – TuringTester69 Dec 13 '18 at 1:46

Edit: indeed, the first set is not open. However, let us denote $$S_1$$ the first set, $$S_2$$ the second one, $$S=S_1 \cup S_2$$. Then $$S_2$$ has null measure and $$S_1 \subset S’ \subset S=S_1 \cup S_2$$ where $$S’$$ is the interior of $$S$$. So $$S$$ has symmetric difference of null measure with its interior, thus is measurable.
Edit2: Let $$x \in S_1$$. Then $$f(x) < \alpha$$ and $$f$$ is continuous at $$x$$. Thus, there exists an open interval $$J$$ containing $$x$$ such that if $$y \in J$$, $$f(y) < \alpha$$, hence $$x \in J \subset S$$, and since $$J$$ is open, $$x \in S’$$.