Say we have a space $X$ and a collection of functions $\{f_i:X \to Y\}$, where $Y$ is endowed with some topology $\mathcal{T}_Y$, and $\mathcal{T}$ is the smallest topology making all $f_i$ continuous. Then $\mathcal{T}$ is generated by $S := \{f_i^{-1}(V) : V \in \mathcal{T}_Y \}$.
Then, if we have another map $g:Y\to X$, and we wanted to show that $g$ is continuous, i.e. that for every open in $X$, its preimage is open in $Y$. Would it be sufficient to only show this for the opens in $S$, i.e. that for all $U \in S$, $g^{-1}(U) \in \mathcal{T}_Y$?