Let \(X\) and \(Y\) be topological spaces and \(\mathcal{B}\) a basis of \(Y\). A function \(f\colon X\to Y\) is continuous if and only if for every \(B\in \mathcal{B}\) the subset \(f^{-1}(B)\) is open in \(X\).