Prove a subspace is separable Given a Hilbert space $H$ and let $K$ be a compact set in $H$. Let $X$ be the smallest closed subspace containing $K$. Prove that $X$ is separable.
Compact implies that $K$ is totally bounded. But how to use this prove $X$ is separable? And how to make use of the smallest closed subspace?
 A: Once you have proven the hint in the comments, let $(x_1,x_2,\ldots)$ be a countable dense sequence of $K$. Let $Q$ denote the rationals (or if you are working over $\mathbb{C}$, the set of complex numbers of the form $p+qi$ for $p,q$ rational). Observe that the set $Qx_1 := \{qx_1: q\in Q\}$ is countable. As is $Qx_1+Qx_2 := \{u+v:u\in Qx_1, v\in Qx_2\}$, and more generally, the set $C:=$ finite $Q$-linear combinations of $\{x_i\}$ is countable (this follows because a countable union of countable sets is countable).
Side claim: $X = $ closure of set of all finite linear combinations of elements of $K$, i.e. $X=\overline{\{x \in H:  x=\sum_{i=1}^{N} \alpha_i k_i   \text{ for some }  N\in \mathbb{N},\alpha_i\in \mathbb{F},k_i\in K\}}$ (this is an easy proof).
Now what remains is to show that $C$ is dense in $X$. You can do this by showing that within $\varepsilon/2$ of any $v\in X$, there is some $u=$ a finite $\mathbb{F}$-linear combination of elements of $K$; and within $\varepsilon/2$ of $u$ there is an element $c$ of $C$.
