Solution (source code)

= Solution
{c}

A <basis of a topology> is a collection $\mathcal B$ of open sets such that every open set is a union of members of $\mathcal B$. Equivalently, for every open $U$ and $y\in U$ there is $B\in\mathcal B$ with $y\in B\subseteq U$.

A map $f:X\to Y$ is continuous exactly when $f^{-1}(B)$ is open in $X$ for every basic set $B$ of $Y$. Necessity follows from the definition of a <continuous map>. For sufficiency, express an arbitrary open set as a union of basic sets and use preservation of unions by inverse images.