Lemma 18.3.3. Let $f: \real \to \real$ be a non-decreasing or non-increasing function, then $f$ is Borel measurable.
Proof. By taking $-f$, assume without loss of generality that $f$ is non-decreasing. In which case, for any $a \in \real$, $x \in f^{-1}((-\infty, a])$, and $y \le x$, $f(y) \le f(x) \le a$, so $y \in f^{-1}((-\infty, a])$. Thus $f^{-1}((-\infty, a))$ is an interval and hence measurable. Since the open rays generate $\cb_{\real}$ (Proposition 14.2.3), $f$ is Borel measurable.$\square$