This is the original question:
Let $f: X\to Y$ be a map between metric spaces. Prove that if $(f(x_n))_{n=0}^\infty$ converges in $Y$ whenever $(x_n)_{n=0}^\infty$ converges in $X$ then $f$ is continuous. [Note: it is not given that $f(x_n) → f(x)$ whenever $x_n → x$.]
I have spent quite a bit of time on this problem. I finally looked it up and have been reading the solution in the link below:
for every convergent sequence $x_n$, $f(x_n)$ also converges. Does this imply continuity of f?
I am confused by the solution given. I understand that they proved that $f(x_n)$ does not converge to $f(x)$, but this doesn't prove that $f(x_n)$ does not converge at all. If we want to use the contrapositive, shouldn't be have to show that if $f$ is discontinuous, then there is some sequence $(x_n)$ that converges in $X$ but $f(x_n)$ does not converge in $Y$. That is, we have to show that for some convergent sequence, there is some $\varepsilon$ such that for all $n$ greater than some $N$, $f(x_n)>\varepsilon$.
Any clarification or hints would be greatly appreciated.