Increasing function is measurable 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
 A: $f^{-1}\left([a,+\infty)\right)$ really is an interval and discontinuities don't ruin that whatsoever.
Notice that, if you have $\overline{x}\in\mathbb{R}$ such that $f(\overline{x})\geq a$, then, for every $x\geq \overline{x}$, you have $f(x)\geq a$, so $x\in f^{-1}\left([a,+\infty)\right)$. So you have $[\overline{x},+\infty))\subset f^{-1}\left([a,+\infty)\right)$.
And then you basically diminish the $\overline{x}$ as much as you can, and you get the required preimage $f^{-1}\left([a,+\infty)\right)$ (you might need to consider the interval open at $\overline{x}$, but still).
Having done that, nothing below $\overline{x}$ will be in the preimage since, if you have $x'\in\mathbb{R}$ such that $f(x')< a$, then, for every $x<x'$, you have $f(x)< a$, so $x\notin f^{-1}\left([a,+\infty)\right)$.
So $f^{-1}\left([a,+\infty)\right)$ really is an interval.
A: $f^{-1}([x, +\infty])$ is always a ray for monotone $f$: if $y \in f^{-1}([x, +\infty])$ and $z > y$ then $z \in f^{-1}([x, +\infty])$: $y \in f^{-1}([x, +\infty])$ implies $f(y) \geqslant x$, and as $f$ is non-decreasing, $f(z) \geqslant x$ so $z \in f^{-1}([x, +\infty])$.
Let $x_0$ be a lower bound of points in ray. If $x_0$ is itself in ray, then the ray is set $\{x | x \geqslant x_0\}$: it includes no points left to $x_0$ as $x_0$ is lower bound, but includes all points right to it as it is a ray.
If $x_0$ is not in ray, then the ray is set $\{x | x > x_0\}$: it doesn't include any point left to $x_0$, and would it not include some point $y > x_0$, it wouldn't include any point from $(x_0, y)$ and thus lower bound would be at least $y$.
While it's true that any function continuous almost everywhere is measurable, I think it's a bit more difficult to prove than specific case of monotone function.
A: 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.
