Show that if $f$ is increasing on $[a, b]$ and satisfies the intermediate value property, then $f$ is continuous on $[a, b]$ I know this question has been asked before but I feel like my approach to solving the problem is "different" (EDIT: turned out to be different because it's wrong!)
Since $[a,b]$ is closed and bounded we may conclude that, by the Heini-Borel theorem, $[a, b]$ must be compact. By definition of compactness, every sequence in $[a,b]$ must contain a subsequence that converges to a limit that is also in $[a,b]$. Consider any arbitrary increasing subsequence $\{x_n\}$ inside $[a,b]$. By the definition of compactness, we know that there exist some $c \in [a,b]$ such that $\{x_n\} \rightarrow c$.
Since $f$ satisfies the intermediate value property, we know that $f(c)$ exists and is within the range of $f$. One of the "characterizations of continuity" states that:
"For all $\{x_n\} \rightarrow c$, it follows that $f(x_n) → f(c).$".
How do I show that $f(x_n)$ converges to $f(c)$?
Thing is, I know that $f(x_n)$ has to converge to something since the range of $f$ is a compact set ( $[f(a), f(b)]$)… I'm just trying to show that $f(x_n) \rightarrow f(c)$! Any idea of how I can go about this?

Often it is better just to go back to the $\epsilon$-$\delta$ definitions. I will show that $f$ is right continuous first. Left continuity should be easy enough for you to show yourself. Let $\epsilon > 0$. For a fixed $x \in [a,b)$, let $\epsilon' = \min\{\epsilon, f(b)-f(x)\}$, then
$$f(x) < f(x)+\epsilon' \leq f(b)$$
By the intermediate value theorem there exists a $y'\in (x, b]$ so that
$f(y')=f(x)+\epsilon'$, hence because $f$ is increasing, $f(x)<f(y)<f(y')=f(x)+\epsilon'$ for all $y\in (x,y')$.
In other words, take $\delta=y'-x$, then for all $y$ such that $y-x < \delta$,
$$f(y)-f(x) < f(y')-f(x) =\epsilon' \leq \epsilon$$
and we are done.
Alternative Proof
Another useful (and more general) characterization of continuity is that a function is continuous if and only if the preimage of any open interval is open. We may use this as follows:
Take any open interval $(y_1,y_2) \subsetneq [f(a),f(b)]$. Given that $f$ is monotone we know that it is one-to-one and therefore permits a unique inverse $f^{-1}$ on its range. Moreover the preimage must be a subset of the interval $\left(f^{-1}(y_1), f^{-1}(y_2)\right)$. By the intermediate value theorem every value in that interval is attained, so the preimage is the interval we just defined and is therefore open. Hence $f$ is continuous.
