Inverse function $f^{-1}:f(\mathbb{R})\to\mathbb{R}$ of a strictly increasing function $f:\mathbb{R}\to\mathbb{R}$ is continuous

I have proved the following statement and I would like to know if my proof is correct and/or/if/how it can be improved.

"Suppose $$f:\mathbb{R}\to\mathbb{R}$$ is a strictly increasing function.

Prove that the inverse function $$f^{-1}:f(\mathbb{R})\to\mathbb{R}$$ is a continuous function."

My proof:

Let $$f:\mathbb{R}\to\mathbb{R}$$ be a strictly increasing function: then it is injective and as a function $$f:\mathbb{R}\to f(\mathbb{R})$$ it must be surjective so it has an inverse $$f^{-1}:f(\mathbb{R})\to\mathbb{R}$$ which must be strictly increasing too$$^{(1)}$$.

Suppose now that $$f^{-1}$$ were discontinuous at a point $$y_d\in f(\mathbb{R})$$: then, being an increasing function, $$y_d$$ must be a jump discontinuity so the interval $$I_{y_d}:=(\lim\limits_{y \to y_d^-,\ y\in f(\mathbb{R})\\}f^{-1}(y),\lim\limits_{y \to y_d^+,\ y\in f(\mathbb{R})}f^{-1}(y))=(\sup_{yy_d,\ y\in f(\mathbb{R})} f^{-1}(y))$$ must be nonempty and we can pick an element $$\bar{x}\neq x_d=f^{-1}(y_d)$$ in it so $$f(\bar{x})=y_d$$, but being $$f$$ strictly increasing by hypothesis it is also either $$f(\bar{x})>y_d$$ or $$f(\bar{x}), a contradiction.

So, $$f^{-1}(\mathbb{R})\to\mathbb{R}$$ cannot be discontinuous at any point ie it must be continuous on $$f(\mathbb{R})$$. $$\square$$

$$^{(1)}$$ let $$y_1,y_2\in f(\mathbb{R})$$ and suppose wlog $$y_1: then $$f^{-1}(y_1)=f^{-1}(f(x_1))=x_1$$ and $$f^{-1}(y_2)=f^{-1}(f(x_2))=x_2$$ and if $$x_1\geq x_2$$ then $$f(x_1)=y_1\geq y_2=f(x_2)$$ contradiction, so it must be $$x_1=f^{-1}(y_1)

• Is the function f continuous? – Eduardo Maza Jun 15 at 9:21
• @EduardoMaza no, it is not continuous – lorenzo Jun 15 at 9:22
• – Martin R Jun 15 at 9:28
• @MartinR thank you for you interest in my question and for these links, I have learned a new proof of this statement by reading the second one. It seems to me however that my proof is a bit different from these two: would you mind checking it out and telling me if you think it is correct? – lorenzo Jun 15 at 9:51
• Note that the left-sided and/or the right-sided limit may not exist, e.g. if $y_d$ is an isolated point of $f(\Bbb R)$. Similarly, the sets $\{ y< y_d \mid y \in f(\Bbb R) \}$ and/or $\{ y> y_d \mid y \in f(\Bbb R) \}$ may be empty, so that their supremum resp. infimum is not defined. – Martin R Jun 15 at 18:42