A function with countable discontinuities is Borel measurable. Let $f:[a,b] \to \mathbb{R}$ be bounded with countable discontinuities. Show that $f$ is Borel-measurable.
One solution uses the fact that A function on a compact interval [a, b] is Riemann integrable if and only if it is bounded and continuous almost everywhere.
But is it possible to solve this problem similarly to finite discontinuity cases? In other words, $\{f>t\}$ can be decomposed something like $\bigcup_n \{f_n>t\}\cup\{\text{discontinuous points}\}$? If the discontinuites were finite, then just I can order them  so it was possible. But I don't know similar method is possible in countable cases. (It will be good then we don't need the condition $f$ is bounded.)
 A: Let $f:[a,b]\rightarrow\mathbb{R}$ be a function with countable discontinuities, and let $c\in\mathbb{R}$. We must prove that $f^{-1}(-\infty,c)$ is measurable.
Let $A=\text{int}f^{-1}(-\infty,c)$ (the interior is taken in $[a,b]$) and $D=f^{-1}(-\infty,c)\setminus A$. Since $A$ is open, it is measurable, and since $f^{-1}(-\infty,c)=D\cup A$, it's only left for us to prove that $D$ is measurable. But notice that if $x\in D$, then $x$ is not an interior point of $f^{-1}(-\infty,c)$, that is, for every $r>0$, there exists $y$ such that $|y-x|<r$ but $f(y)\geq c$. Since $f(x)<c$, that means that $x$ is a discontinuity point of $f$. Therefore, $D$ is at most countable, hence measurable.
That argument can be used for any $f:E\subseteq\mathbb{R}^n\rightarrow\mathbb{R}$ which is Lebesgue-measurable, where $E$ is a Lebesgue-measurable subset of $\mathbb{R}^n$, and for which the set of discontinuities of $f$ has zero Lebesgue-measure.
(I'm using the following definition: a function $f:E\rightarrow\mathbb{R}$ is (Borel-)measurable iff for every $a\in\mathbb{R}$, $f^{-1}(-\infty,a)$ is a (Borel-)measurable set. It can be easily shown that any function which satisfies that condition also satisfies the following: for any Borel-measurable subset $A$ of $\mathbb{R}$, $f^{-1}(A)$ is a (Borel-)measurable subset of $E$)
