Surjective Monotone Function is Continuous

Theorem
Let $X$ be an open subset of $\R$.

Let $Y$ be a real interval.

Let $f: X \to Y$ be a surjective monotone real function.

Then $f$ is continuous on $X$.

Proof
We do the proof in the case that $f$ is strictly increasing. We assume that it is known that monotone functions on open intervals have finite one sided limits at all points and that those limits are in the range of the function, in this example in the interval  $Y$. We also assume it is known that these one sided limits can be expressed as either least upper or greatest lower bounds as described in the next paragraph. As a consequence, if there are any discontinuities, they must be either removable or of the jump type. For each $ c \in X $ define \begin{align*} L^{-}_{c} & = \lim_{x \, \to \, c^-}f(x) = \sup \left\{ f\left( x\right) :x<c\right\} \\ L^{+}_{c} & = \lim_{x \, \to \, c^+}f(x) = \inf \left\{ f\left( x\right) :x \geq c \right\} \end{align*} Assume for contradiction that there were a jump discontinuity at $ c \in X $. Then it would be true that $L^{-}_{c} <L^{+}_{c}$ and by surjectivity there would exist some $a$ such that $L^{-}_{c} f(c)$. Then by choosing $\epsilon = L-f(c)$, which is positive, there is a deleted neighborhood $U$ of $c$ such that $| f(x) -L| < \epsilon $ implies $L-f(x) < L-f(c)$, or $f(c)<f(x)$. If $x$ is on the left side of that neighborhood, then $x<c$ but $f(c)<f(x)$ and this contradicts that $f$ was increasing. A similar contradiction exists if  $f(c)<L$. This completes the proof.