# Is the family of all continuous functions from a compact metric space to a separable complete metric space separable?

Let $$(X,d)$$ be a separable complete metric space. Let $$K$$ be a compact metric space.

I denote by $$C(K,X)$$ the set of continuous functions $$f:K\rightarrow X$$ with the metric $$\rho:C(K,X)\times C(K,X)\rightarrow\mathbb{R}$$

$$\rho(f,g) = \sup_{k\in K} d(f(k),g(k))$$

*This is the counterpart of the infinity norm $$\|f-g\|_\infty$$.

It is not hard to show that $$\rho$$ is indeed a metric and that the sup always exists.

I ask whether it's true that $$(C(K,X),\rho)$$ a separable metric space? (My guess is yes, note that when $$X=\mathbb{R}$$ it's not hard to prove)

It is true. It is a well-known fact that if $$K$$ is a compact space and $$(X,d)$$ a metric space, then the metric topology on $$C(K,X)$$ (supremum-metric!) coincides with the compact-open topology on $$C(K,X)$$. See any textbook on topology treating function spaces. Note that the compact-open topology has as a subbase all sets $$M(C, W) = \{ f \in C(K,X) \mid C \subset K \text{ compact }, W \subset X \text{ open } \}.$$ Now let $$K$$ be compact metrizable and $$(X,d)$$ separable. Then $$K$$ and $$X$$ have countable bases $$\mathcal{K}$$ and $$\mathcal{X}$$, respectively. We may assume that $$\mathcal{K}$$ and $$\mathcal{X}$$ contain all finite unions of their members. Then the set $$\mathcal{B} = \{ M(\overline{V}, W) \mid V \in \mathcal{K}, W \in \mathcal{K} \}$$ is countable. We shall show that it is a subbase for the compact-open topology. So let $$C \subset K$$ compact, $$U \subset X$$ open and $$f \in M(C,U)$$. Since $$C$$ is compact, there exist finitely many $$V_i \in \mathcal{K}$$ such that $$\overline{V_i} \subset f^{-1}(U)$$ and $$C \subset V = \bigcup V_i$$. We have $$V \in \mathcal{K}$$ and $$f(\overline{V}) \subset U$$. Since $$\overline{V}$$ is compact, we can find finitely many $$W_i \in \mathcal{X}$$ such that $$f(\overline{V}) \subset W = \bigcup W_i \subset U$$. We have $$W \in \mathcal{X}$$, hence $$M(\overline{V},W) \in \mathcal{B}$$ and $$f \in M(\overline{V},W) \subset M(C,U)$$.