Monotone Real Function with Everywhere Dense Image is Continuous/Lemma

Theorem
Let $I$ and $J$ be real intervals.

Let $f: I \to J$ be a monotone real function.

Let $f \sqbrk I$ denote the image of $I$ under $f$.

Let $f \sqbrk I$ be everywhere dense in $J$.

Let $c \in I$.

Then:
 * $\displaystyle \openint {\lim_{x \mathop \to c^-} \map f x} {\lim_{x \mathop \to c+ } \map f x} \cap f \sqbrk I \subseteq \set {\map f c}$

Proof
From Discontinuity of Monotonic Function is Jump Discontinuity, $\displaystyle \lim_{x \mathop \to c^-} \map f x$ and $\displaystyle \lim_{x \mathop \to c^+} \map f x$ are finite.

Since $f$ is increasing:
 * $\displaystyle \lim_{x \mathop \to c^-} \map f x < \lim_{x \mathop \to c^+} \map f x$

Suppose $z \in \displaystyle \openint {\lim_{x \mathop \to c^-} \map f x} {\lim_{x \mathop \to c^+} \map f x} \cap f \sqbrk I$.

Then:
 * $\displaystyle \exists t \in I : \map f t \in \openint {\lim_{x \mathop \to c^-} \map f x} {\lim_{x \mathop \to c^+} \map f x}$

Case 1 : $t < c$
Suppose that $t < c$.

So we may discard this case.

Case 2 : $t = c$
Suppose that $t = c$.

So the proposition holds in this case.

Case 3 : $c < t$
Suppose that $t > c$.

So we may discard this case.

So $\map f t = c$, by Proof by Cases.

Thus:

Thus:
 * $\displaystyle z \in \openint {\lim_{x \mathop \to c^-} \map f x} {\lim_{x \mathop \to c^+} \map f x} \cap f \sqbrk I \implies z \in \set {\map f c}$

Hence the result, by definition of subset.