First of all, I want you to know that I've checked all the questions related to mine and they seem not to be complete, in my opinion. Let me tell you why. Here's the problem:
Let $f:\mathbb{R}\to\mathbb{R}$ be an increasing function (for $a,b\in \mathbb{R}$ such that $a<b$, $f(a)\leq f(b)$). Prove $f$ is a measurable function.
So the proof seems to be easy. If $f$ is increasing, there exists $\overline{x}$ such that $f(x)\geq \overline{x}$. That is, $x\in\{x\in\mathbb{R}|f(x)\geq \overline{x}\} \iff x\in f^{-1}([\overline{x},+\infty])$.
The proofs I've seen so far assume that $f^{-1}([\overline{x},+\infty])$ is an interval, and thus $f^{-1}([\overline{x},+\infty])\in B(\mathbb{R})$ which results in $f$ being measurable since $\overline{x}$ is arbitrary. Here's the doubt: why can I say that, for a not-necessarily-continuous increasing function $f$, $f^{-1}([\overline{x},+\infty])$ is an interval? The only answer I could find about this specific doubt is that the set of discontinuity points in $[a,b]$ of the function $f$ is at most countable. Then, $f$ is continuous almost everywhere (I haven't seen this concept in class yet) and thus $f$ is measurable (??).
Sorry if this question is too basic, but I'd appreciate a hint
Let $S = f^{-1}([c, \infty))$. By definition, $S=\{x|f(x)\ge c\}$. Note that whenever $a\in S$ and $b>a$, then $f(b)\ge f(a) \ge c$, so $b \in S$. That is, for every number in $S$, all larger numbers are also in $S$. This means $S$ can only be $\emptyset$, $\mathbb{R}$, $[\inf S, \infty)$, or $(\inf S, \infty)$, all of which are measurable sets.