Let \(X\) and \(Y\) be topological spaces . If \(f\colon X\to Y\) is continuous then \(x_n\to x\) implies \(f(x_n)\to f(x)\) in \(Y\).
If additionally \(X\) is first countable the reverse implication is also true.
Let \(x_n\to x\) and \(U\) a neighbourhood of \(f(x)\). Since \(f\) is continuous \(f^{-1}(U)\) is open in \(X\) and there is a \(n_0\) such that \(x_n\in f^{-1}(U)\) for all \(n\ge n_0\). This implies \(f(x_n)\in U\) for \(n\ge n_0\) and shows that \(f(x_n)\to f(x)\).
On the other hand, let \(U\subseteq Y\) be open, \(x\in f^{-1}(U)\). Consider a sequence \((x_n)\) in \(X\) which converge to \(x\). Since \(f(x_n)\to f(x)\) the sequence \((f(x_n))\) is eventually in \(U\) and \(x_n\) is eventually in \(f^{-1}(U)\).
Due to (0x677c3163) \(f^{-1}(O)\) is open.