Continuity of an inverse function. Theorem. Let $f\colon I \to J$, where $I$ is an interval and $J$ is the image $f(I)$, be a function such that:


*

*$f$ is strictly increasing on $I$.

*$f$ is continuous on $I$.


Then $J$ is an interval, and $f$ has an inverse function $f^{-1}\colon J\to I$ such that:


*

*$f^{-1}$ is strictly increasing on $J$.

*$f^{-1}$ is continuous on $J$.


I need to prove only that $f^{-1}$ is continuous on $J$.
Proof. Let $y\in J$, and (for simplicity) assume that $y$ is not an end-point of $J$. Then $y=f(x)$, for some $x\in I$, and we want to prove that
$$y_n\to y\implies f^{-1}(y_n)\to f^{-1}(y)=x.$$
Thus we want to deduce that for each $\varepsilon>0$, there is some number $X$ such that $$x-\varepsilon<f^{-1}(y_n)<x+\varepsilon\qquad \forall n>X\qquad(1).$$
Since $f$ is strictly increasing, we know that $$f(x-\varepsilon)<f(x)<f(x+\varepsilon).$$ also, since $y_n\to y=f(x)$, there is some number $X$ such that $$f(x-\varepsilon)<y_n<f(x+\varepsilon), \qquad\forall n>X.$$ Then, applying the strictly increasing function $f^{-1}$ to these inequalities, we obtain (1).
Edit
I don't understand why, since $y_n\to y=f(x)$, there is some number $X$ such that  $$f(x-\varepsilon)<y_n<f(x+\varepsilon), \qquad\forall n>X.$$ I would have written the last line as follows:
$$f(x)-\varepsilon<y_n<f(x)+\varepsilon, \qquad\forall n>X.$$ Applying the $f^{-1}$ to my last line, which I think it's correct, I obtain $$f^{-1}[f(x)-\varepsilon]<f^{-1}[y_n]<f^{-1}[f(x)+\varepsilon], \qquad\forall n>X.$$ which is not (1).
What am I misunderstanding? Why the author of this proof wrote that last line and not my version?
Thank you.
 A: I've found DJH Garling, A Course in Mathematical Analysis (2013) the following corollary of the The intermediate value theorem [page 163] :

If $f$ is a strictly monotonic function on an interval $I$ then $f^{-1} : f(I) \rightarrow I$ is continuous.

Proof. Suppose without loss of generality that $f$ is strictly increasing. 
Suppose that $b \in f(I)$ and that $\epsilon > 0$. 
Suppose that $a = f^{-1}(b)$ is an interior point of $I$. 
There exist $c, d \in I$ with $a − \epsilon < c < a < d < a + \epsilon$. 
Then $f(c) < f(a) = b < f(d)$; let $δ = \min\{b − f(c), f(d) − b\}$. If $|y − b| < δ$, then
$f(c) < y < f(d)$, so that $c < f^{-1}(y) < d$, and $|f^{-1}(y) − f^{-1}(b)| < \epsilon$.
The case where a is an end-point of I is left to the reader. 
Note that we do not require $f$ to be continuous.
Comment. The strict monotonicity of $f$ is needed because otherwise we can have a saw-tooth function that is continuous but, being not-monotone, its inverse is not defined, because the mapping $f^{-1}$ is not injective.
