# Countable basis representation in Hilbert space

I have a some fact which seems obvious, but I cannot fill the detail.

Let $\mathcal{H}$ be a Hilbert space which is not necessarily separable. If $A$ is compact set in $\mathcal{H}$, then for every $a$, there is a countable subset of $\{e_i\}$ where $\{e_i\}$ is a orthonormal basis for $\mathcal{H}$ such that $a=\sum_{i=1}^\infty \left<a,e_i\right>e_i$.

The question comes from proof of Lemma 2 of http://www.ams.org/journals/proc/1986-098-02/S0002-9939-1986-0854051-6/S0002-9939-1986-0854051-6.pdf.

My strategy is since $A$ is compact in metric space, it has countable local basis for $A$ (topological sense). Since we can represent $a\in A$ as a Fourier expansion, we can write $$a =\sum_{i} \left<a,e_i\right> e_i.$$ Since $e_i$ are orthonormal, the sum must be countable sum.

I'm not sure this is right proof. Thanks in advance.

It's easy to show that $A$ is separable. Let $S$ be a countable dense subset. Using the Gram-Schmidt process, construct a countable orthonormal set $E = \{e_i: i \in I\}$ such that each member of $S$ is in the linear span of a finite subset of $E$. Now the function
$$f(x) = \| x - \sum_i \langle x, e_i \rangle e_i \|$$
is continuous on $\mathcal H$ and $0$ on $S$, therefore $0$ on $A$.