TITLE: A sort of inverse question in topology
QUESTION [18 upvotes]: Given topological spaces $X$ and $Y$, we often consider the collection of continuous functions, $f: X \rightarrow Y$. My question is, given two sets $X$ and $Y$, and a sub-collection $\{g_{i}\}$ of the collection of all functions from $X$ to $Y$, do there exist topologies on $X$ and $Y$ so that the $g_{i}$ are precisely the continuous functions from $X$ to $Y$?
I have a few thoughts on this, if $\{g_{i}\}$ is the entire collection of functions from $X$ to $Y$, then we can give $X$ the discrete topology and give $Y$ any topology and the result follows. If $\{g_{i}\}$ is just the constant functions (which are always continuous) then we can give $Y$ the indiscrete topology and give $X$ any topology and the result follows. Aside from these two trivial cases, is there anything we can say about this question? Assume that $\{g_{i}\}$ contains the constant functions.

REPLY [3 votes]: Assume $Y$ only consists of two points $Y=\{a,b\}$. There are effectively three choices for a topology on $Y$. Let us assume we don't have the indiscrete and not the discrete topology, so wlog the open sets are precisely $Y$, $\emptyset$ and $\{a\}$. Now every $g_i$ must be continuous, in other words $g_i^{-1}(a)$ has to be open. So the collection $\{g_i\}$ is the same as a subbasis of $X$. Conversely every open set $O$ in the topology of $X$ gives you a continuous function $g:X\to Y$ with $g(O)=\{a\}$ and $g(X-O)=\{b\}$.
So in this case you are asking if any subbasis of a topology is already a topology.
I guess if $Y$ is bigger the situation will get worse.