# How to prove that if $f$ is continuous a.e., then it is measurable.

Definition of simple function

1. $f$ is said to be a simple function if $f$ can be written as $$f(\mathbf{x}) = \sum_{k=1}^{N} a_{_k} \chi_{_{E_k}}(\mathbf{x})$$ where $\{a_{_k}\}$ are distinct values for $k=1, 2, \cdots, N$ and $\chi_{_{E_k}}(\mathbf{x})=\cases{1&if$\mathbf{x}\in E_k$\\0&if$\mathbf{x}\notin E_k$}$.

Theorem $(4.12)$

1. If $\{f_k\}$, is a sequence of measurable functions, then $\displaystyle\limsup_{k\to\infty}f_k$ and $\displaystyle\liminf_{k\to\infty}f_k$ are measurable. In particular if $\displaystyle\lim_{k\to\infty}f_k$ exists a.e., it is measurable.

Theorem $(4.13)$

1. Every function $f$ can be written as the limit of a sequence $\{f_k\}$ of simple functions.

## Problem

If $f(x)$, $x\in\mathbb{R}^1$, is continuous at almost every point of an interval $[a, b]$, show that $f$ is measurable on $[a, b]$. Generalize this to functions defined in $\mathbb{R}^n$.

[For a constructive proof, use the subintervals of a sequence of partitions to define a sequence of simple measurable functions converging to $f$ a.e. in $[a, b]$. Use $(4.12)$.]

1. By the theorem $(4.13)$, we can choose $\{f_k\}$, which are simple functions defined on $[a, b]$ and approaching to $f$. That is, choose $\{f_k\}$ such that, for $k=1, 2, \cdots$, $$f_k=\sum_{i=1}^{N} a_{_i}^{(k)} \chi^{(k)}_{_{E_i}} \quad \text{and} \quad \displaystyle\lim_{k\to\infty}f_k=f$$
2. Since $f$ is continuous a.e., $f_k$ are measurable for all $k\in\mathbb{N}$.
3. Then, by the theorem $(4.12)$, $f$ is measurable.

Q1) Why are $f_1, f_2, \cdots, f_N$ all measurable?

Q2) Morever, if $f_k$ are all measurable, then how can I ensure that $\displaystyle \lim_{k\to\infty}f_k$ exists? Is it ensured by theorem $(4.13)$?

If there is any advice or other proofs, please let me know them. Thank you.

Suppose $f: [a,b]\to \mathbb R$ is continuous at a.e. point of $[a,b].$ Let $D$ be the set of points of discontinuity of $f$ in $[a,b].$ Then $m(D)=0.$ We therefore have $E = [a,b]\setminus D$ measurable, and $f$ is continuous on $E.$
Let $c\in \mathbb R.$ Then
$$\tag 1 f^{-1}((c,\infty)) = [f^{-1}((c,\infty))\cap E] \cup [f^{-1}((c,\infty))\cap D].$$
Because $f$ is continuous on $E,$ the first set on the right of $(1)$ is open in $E.$ Thus it equals $E \cap U$ for some $U$ open in $\mathbb R.$ Because $E,U$ are both measurable, so is $f^{-1}((c,\infty))\cap E.$ And because $m(D) = 0,$ any subset of $D$ is measurable. It follows that $(1)$ is the union of two measurable sets, hence is measurable, and we're done.
• Before asking more questions, I really want to say "thank you for your intelligible proof". Now, is it fine if I ignore the case when $f=+\infty$? In my textbook, the function is defined by $f:\mathbb{R}^n\longrightarrow\mathbb{R}^1\cup\{\pm\infty\}$ – Danny_Kim May 11 '16 at 10:19
• Moreover, I think that I can extend the theorem from $[a, b]$ to $\mathbb{R}^1$ if I push $a$ to $-\infty$ and $b$ to $+\infty$. However, it is not easy to extend the theorem from $\mathbb{R}^1$ to $\mathbb{R}^n$. Even though I thank you enough, can you give me a hint, or can you let me know the way to extend this? – Danny_Kim May 11 '16 at 10:23
• Is it okay if I change the equation (1) like the following? $$\{f\big|_{[a, b]}\ge{}c\} = \left[\{f\big|_{[a, b]}\gt{}c\}\cap{}E\right] \cup \left[\{f\big|_{[a, b]}\gt{}c\}\cap{}D\right].$$ since my textbook defined $f: \mathbb{R}^1\longrightarrow\overline{\mathbb{R}^1}$ and is continuous a.e in $[a, b]$. – Danny_Kim May 12 '16 at 5:41
• @Danny_Kim why would the extension of the Theorem from $\Bbb R$ to $\Bbb R^n$ be not easy? I don't think zhw. used any peculiar properties of $\Bbb R$ – Luigi M Sep 16 '17 at 17:53