# A continuous function is proper. Show that $\{f(x_n)\}$ has no subsequence that converges in $(0,1)$.

(Exercise 7.5.7 Introduction to Real Analysis by Jiri Lebl): A continuous function $$f: X \to Y$$ for metric space $$(X, d_X)$$ and $$(Y, d_Y)$$ is said to be proper if for every compact set $$K \subset Y$$, the set $$f^{-1}(K)$$ is compact. Suppose a continuous $$f: (0,1) \to (0,1)$$ is proper and $$\{x_n\}$$ is a sequence in $$(0,1)$$ that converges to $$0$$. Show that $$\{f(x_n)\}$$ has no subsequence that converges in $$(0,1)$$.

I know that if $$f: X \to Y$$ is continuous and $$K \subset X$$ is compact, then $$f(K)$$ is compact. I think that $$x_n$$ converging to $$0$$ implies that this sequence is defined in an open interval, and this leads to $$\{f(x_n)\}$$ having no subsequence in some way (?), but I am not sure. I appreciate if you give some help.

If there is a convergent subsequence $$(f(x_{n_i}))$$ with limit $$l$$ in $$(0,1)$$ the $$K=\{l, f(x_{n_1}),f(x_{n_2})...\}$$ is a compact set in $$(0,1)$$. By hypothesis the sequence $$(x_{n_k})$$ in the compact set $$f^{-1}(K)$$ must have a subsequence which converges in $$(0,1)$$. This is false because $$x_n \to 0$$.
Suppose some $$p \in (0,1)$$ exists such that $$(f(x_{n_k}))_k \to p$$, so striving for a contradiction. Then $$K=\{f(x_{n_k}): k \in \Bbb N\} \cup \{p\}$$ is compact (standard argument) and so $$(x_{n_k})_k$$, which lies in the compact (!) set $$f^{-1}[K]$$, must have a convergent subsequence too. But that cannot happen as $$0 \notin f^{-1}[K]$$ and it's the only candidate for its limit by unicity of limits in $$\Bbb R$$.