I had solved an exercise that assume continuity of a function. I solved without continuity, I think so. The problem is as follow: let $f:M\to N$ a continuous function, where $M$ and $N$ are metric spaces. Prove that the following two propositions are equivalent
I) If $(x_n)_n$ has no a convergent subsequence, then the same happens with the sequence $(f(x_n))_n$.
II) For every compact set $K\subseteq N$, $f^{-1}(K)$ is compact.
I solved as follows:
I) implies II). Suppose that $K$ is a compact set such that $f^{-1}(K)$ is not compact. Then there is a sequence $(x_n)_n\subset f^{-1}(K) $ that has no convergent subsequence, and by hypothesis $(f(x_n))_n\subset K$ has no convergent subsequence but this contradics the fact that $K$ is compact.
II) implies I). Let $(x_n)_n$ be a sequence that have no a convergent subsequence. Now suppose that $(f(x_n))_n$ have a convergent subsequence, $(f(x_{n_k}))_k$, and let $y$ be its limit. Is a result that the set $K=\{f(x_{n_1}), f(x_{n_2}),\dots,y\}$ is compact. Then $(x_{n_k})_k\subset f^{-1}(K)$, where $f^{-1}(K)$ is compact by hypothesis. Then $(x_{n_k})_k$ must have a convergent subsequence that is also a subsequence of $(x_n)_n$, contradiction.
I would like to know if there is something wrong on this proof.