Lemma: Let $(X,d)$ be compact. Let $f: (X,d) \to (Y, \rho)$ be a continuous bijection. Then $f$ maps closed sets to closed sets.
Pf: Let $V$ be a closed set in $(X,d)$. We have to show that $f(V)$ is closed, i.e., $f(V) = \overline{f(V)}$. Let $y \in \overline{f(V)}$. Then $\{y_n\} \subset f(V)$ such that $y_n \to y$. So $\forall n \in \mathbb{N}, \exists x_n \in V$ such that $y_n = f(x_n)$. Then $\forall n \in \mathbb{N}, x_n \in f^{-1}(y_n) = x_n$. Now since $f^{-1}$ is continuous and $y_n \to y$, $f^{-1}(y_n) \to f^{-1}(y)$. $\Rightarrow f^{-1}(y) \in V$ since $V$ is closed. $\Rightarrow y \in f(V)$.
I have not used the fact that X is compact so I realised that my proof might be wrong. But I fail to see where the proof might break, logically speaking. Can someone help me out?