I want to prove the following theorem,
Theorem. Let $f:X\to Y$ be a open injective map. Prove that if $Y$ is compact and $f(X)$ is closed in $Y$ then $X$ is compact.
My proof.
Let $X\subseteq \displaystyle\bigcup_{\alpha\in I} U_\alpha$ where $\{U_\alpha:\alpha\in I\}$ forms an open cover of $X$. Then since $f$ is an open map we have, \begin{align}f(X)\subseteq f\left(\displaystyle\bigcup_{\alpha\in I} U_\alpha\right)&\implies f(X)\subseteq \displaystyle\bigcup_{\alpha\in I} f(U_\alpha)\\&\implies f(X)\subseteq \displaystyle\bigcup_{i=1}^n f(U_{\alpha_i})\end{align}Since $f(X)$ is a closed subset of the compact space $Y$ hence it is also compact. Now, \begin{align} f(X)\subseteq \displaystyle\bigcup_{i=1}^n f(U_{\alpha_i})&\implies f^{-1}(f(X))\subseteq f^{-1}\left(f\left(\displaystyle\bigcup_{i=1}^n U_{\alpha_i}\right)\right)\\&\implies X\subseteq \displaystyle\bigcup_{i=1}^n U_{\alpha_i}\end{align} (the last line follows since $f$ is injective) and we are done.
Question
Is my proof correct?