When is the compact-open topology discrete?
I tried to find a necessary-and-sufficient condition for the function space $\mathcal{C}(X,Y)$ equipped with the compact-open topology to be discrete. Here's my effort so far:
Theorem 1. If $X$ is nonempty and $\mathcal{C}(X,Y)$ is discrete, then $Y$ is discrete. Proof by contrapositive:
Let $y$ be a limit point in $Y$. Let $\{y\}_n$ be a sequence converging to $y$ whose no entry is $y$. Let $c_b \in \mathcal{C}(X,Y)$ denote the constant function to $b \in Y$. Then $c_{y_n}$ converges to $c_y$, yet none of them equals to $c_y$.
Edit
I spotted a flaw in Theorem 2 (namely, I assumed all quasicomponents are clopen), and thus I edit it. View the revision to see the old version.
Let $\mathsf{Q}X$ denote the quotient space of $X$ that identifies each quasicomponent into one point.
Theorem 2. If $Y$ has at least two elements and $\mathcal{C}(X,Y)$ is discrete, then $\mathsf{Q}X$ is limit point compact. Proof:
We already know that $Y$ is discrete. As such, for each quasicomponent $A$ of $X$, and for every continuous function $f$ in $\mathcal{C}(X,Y)$, $f$ restricted to $A$ is a constant function. We conclude that $\mathcal{C}(X,Y)$ is homeomorphic to $\mathcal{C}(\mathsf{Q}X,Y)$.
Now we prove a contrapositive: "If $Y$ is a discrete space with least two elements and $\mathsf{Q}X$ is not limit point compact, $\mathcal{C}(\mathsf{Q}X,Y)$ has a limit point."
Let $G$ be a countably infinite closed subset of $\mathsf{Q}X$ which is discrete as a subspace. Enumerate $G$ as a sequence $\{g\}_n$. Pick a separation $U_1, V_1$ of $V_0 = \mathsf{Q}X$ so that $g_1 \in U_1$ and $g_2, g_3, \cdots \in V_1$. Then pick a separation $U_2, V_2$ of $V_1$ so that $g_2 \in U_2$ and $g_3, g_4, \cdots \in V_2$. Ad infinitum.
Now we have a sequence $\{U\}_n$ of clopen subsets of $\mathsf{Q}X$ whose entries are pairwise disjoint. Now pick two different points $a, b$ in $Y$ and give a sequence of continuous functions $\{f\}_n$ within $\mathcal{C}(\mathsf{Q}X,Y)$ like this: $$ f_n(x) = \begin{cases} a \quad \text{if} \quad x \in U_n \\ b \quad \text{o.w.} \end{cases} $$
This sequence converges to the constant function to $b$. We've just found a limit point of $\mathcal{C}(\mathsf{Q}X,Y)$.
Theorem 3. If $\mathsf{Q}X$ is compact and $Y$ is discrete, $\mathcal{C}(X,Y)$ is discrete. Proof:
Let $f$ be a continuous function in $\mathcal{C}(\mathsf{Q}X,Y)$. For each $y$ in $Y$, let $U_y = f^{-1}[\{y\}]$. Then each $U_y$ is a clopen subset of $\mathsf{Q}X$, and thus compact. Since they also form an open cover of $\mathsf{Q}X$, pick a finite subcover $U_{y_1}, U_{y_2}, \cdots, U_{y_n}$. Denoting a subbasis element of $\mathcal{C}(\mathsf{Q}X,Y)$ by $S(C,V)$ (where $C \subset \mathsf{Q}X$ is compact and $V \subset Y$ is open), the basis element $S(U_{y_1}, \{y_1\}) \cap S(U_{y_2}, \{y_2\}) \cap \cdots \cap S(U_{y_n}, \{y_n\})$ is the singleton set containing $f$.
Is my proof correct so far? How can I extend Theorem 3 for a limit point compact $\mathsf{Q}X$?
Edit 2
I spotted another flaw in Theorem 2. Namely, I assumed $\mathsf{Q}X$ is regular (counterexample: $X = \mathbb{R}_K \cap \mathbb{Q}$ and $G = K \cup \{0\}$).
Solution 1:
Theorem: If $X,Y$ are non-empty spaces then $C(X,Y)$ contains a subspace homeomorpic to $Y$, where $C(X,Y)$ is the set of continuous functions from $X$ to $Y$ in the compact-open topology which has a subbase all sets of the form $[K,U] := \{f \in C(X,Y)\mid f[K]\subseteq U\}$, where $K \subseteq X$ is compact and $U \subseteq Y$ is open.
Proof: define a map $c: Y \to C(X,Y)$ by $c(y)(x)=y$ for all $x \in X$ (so $c(y)$ is the constant map with value $y$ on $X$ which is always in $C(X,Y)$). Then it's clear that $c$ is injective. For any subbasic element $[K,U]$ it's clear by the definitions that
$$c^{-1}[[K,U]] = U$$ so open in $Y$ and so $c$ is continuous (it's sufficient that inverse images of subbase elements are open in the domain). Also if $U \subseteq Y$ is open, again by definitions (where $p$ is some fixed point in $X$ to witness non-emptyness of $X$):
$$c[U] \cap c[Y] = c\left[[\{p\},U]\right] \cap c[Y]$$
which essentially says that $c: Y \to c[Y]$ is an open map, and so this image-restricted $c$ is a homeomorphism between $Y$ and $c[Y] \subseteq C(X,Y)$ and we're done.
Corollary: if $C(X,Y)$ is discrete so is $Y$, as all subspaces of a discrete space are discrete too.
The first theorem is completely standard and in many books and IMO you should know it, so I think this route is the fastest way to your Theorem 1. Your proof attempt is somewhat sloppy IMO. E.g. There can be no sequence converging at all in a non-discrete space as well! So working with sequences in general spaces is not wise as a proof method.
Another corollary of the Theorem above
If $X$,$Y$ are spaces so that all continuous maps from $X$ to $Y$ are constant (this happens e.g. if $X$ is hyperconnected/irreducible and $Y$ is Hausdorff, or $X$ is ultraconnected and $Y$ is Urysohn, or $X$ is connected and $Y$ is discrete e.g. or more trivially if $|X|=1$ or $|Y|=1$), then $$C(X,Y)\text{ is discrete }\iff Y \text{ is discrete }$$
I'll call a pairs $(X,Y)$ as before a trivial pair, and the problem when $C(X,Y)$ is discrete only remains when we have non-trivial pair of spaces.
I'll look into the quasicomponent stuff later, time permitting. But I'll post these thoughts first..