$(X, \tau_X) $ and $(Y, \tau_Y) $ be two topological spaces.
$\forall f\in Y^X$ with $\text{Gr}(f) $ is closed implies $f\in C(X, Y) $.
Question : Does this implies $(Y, \tau_Y) $ is compact?
Notation:
$Y^X$: Set of all functions from $X$ to $Y$.
$C(X, Y) =\{f\in Y^X: f \text{ is continuous }\}$
$\text{Gr}(f) =\{(x,f(x)):x\in X\}\subset X×Y$
I want to show if $Y$ is not compact, then $\exists f\in Y^X$ with $\text{Gr}(f) $ is closed but $f\notin C(X, Y) $
If we choose $X=Y=\Bbb{R}$ and endowed with euclidean topology, then
$f(x)= \begin{cases}\frac{1}{x} & x\neq 0 \\ 0 & elsewhere \end{cases}$
is one such example of required functions.
But how to prove for any two topological spaces $X$ and $Y$ ?
A variant of this interesting question is on my MO post.
If $X$ has discrete topology then every function: $f:X \to Y$ is continuous. In particular, any function with closed graph is continuous. But $Y$ can be any topological space, not necessarily compact.