$(X, \tau_X), (Y, \tau_Y) $ be two topological spaces and $|\tau_Y |\ge 3$
Consider $\mathcal{F}=\{f\in Y^X : f^{-1}(A)\subset X \text{ compact}\space,\forall A\subset Y \text{ closed}\}$
Can we classify all topological spaces $(X,\tau_X)$ such that $\mathcal{F}=Y^X$ ?
If $\tau_X$ induced a Hausdorff topology on $X$ , then every $K\subset X$ compact implies $K\subset X$ is closed.
Then $ \mathcal{F}=C(X, Y) $ and given $|\tau_Y|\ge 3$ implies $(X, \tau_X) $ is the discrete space ( see the proof ) and $C(X,Y) \subset \mathcal{F} $ implies every closed subsets of $X$ is compact.Hence $X $ is a finite set.
There are non Hausdorff spaces $(X,\tau_X)$ where all compact subsets are closed. ( here are some examples).
Then $\mathcal{F}=C(X, Y) $
Now from here , we can conclude that $(X, \tau_X) $ is the discrete space.
$C(X, Y) \subset \mathcal{F}$ implies every closed subsets of $X$ are compact.
Does there exists any non Hausdorff spaces where each compact subsets are closed and closed subsets are compact ?
If such set exists then it creates a weird situation here ! This topological space doesn't satisfy $\mathcal{F}=Y^X$.
What are some examples of non Hausdorff spaces where $\mathcal{F}=Y^X$ ?
Here $Y^X$ denotes thr class of all functions from $X$ to $Y$.