Hilbert space has countable basis

Let $(e_i)_{i\in\Bbb N}$ and $(v_\alpha)_{\alpha\in X}$ be orthonormal bases of $H$ with an arbitrary index set $X$.

First observe that $\{\alpha\in X:\,\forall i\in\Bbb N\,(e_i\perp v_\alpha)\}=\emptyset$ since $e_i$ is an orthonormal basis.

Then, for each $i,n\in\Bbb N$, consider $A_{i,n}:=\{\alpha\in X: |\langle e_i,v_\alpha\rangle|\ge \frac1n\}$.
Since for any $\alpha_1,\dots,\alpha_k\in X$, we have $$1=\|e_i\|^2\ \ge\ \left\|\sum_{j=1}^k\langle e_i,v_{\alpha_j}\rangle\cdot v_{\alpha_j}\right\|^2 \ =\ \sum_{j=1}^k|\langle e_i,v_{\alpha_j}\rangle|^2\,, $$ we obtain that each $A_{i,n}$ must be finite.

Consequently, $X\ =\ X\,\setminus\,\{\alpha:\,\forall i\in\Bbb N\,(e_i\perp v_\alpha)\}\ =\ \displaystyle\bigcup_{i,n\in\Bbb N}A_{i,n}$ is countable.


Hint:

I found this statement in wikipedia:
(the 'if' part isn't too difficult but is a good first step before tackling the 'only if' part)

A Hilbert space is separable if and only if it admits a countable orthonormal basis.

and the statement can be proven without using the axiom of choice.


$\newcommand{gae}[1]{\newcommand{#1}{\operatorname{#1}}}\gae{span}$I assume you mean Hilbert basis. Consider this lemma:

Let $(X,d)$ be a metric space, and let $A\subseteq X$ be a dense subset. Then, every dense subset $B$ of $X$ has a dense subset of cardinality at most $\lvert A\rvert$.

Proof: If $X$ is finite, then $X$ is discrete and $A=B=X$. If $X$ is infinite, then $A$ and $B$ must be infinite. Moreover, the set $S=\{B(a,q)\,:\, a\in A\land q\in\Bbb Q_+\}$ is a basis of $X$. Since $A$ is infinite, $\lvert S\rvert\le \lvert A\times \Bbb Q\rvert=\lvert A\rvert$. For all $D\in S$, select some $b_D\in B$, given by density of $B$, such that $b_D\in D$. The set $\{b_D\,:\, D\in S\}$ intersects all the elements of a basis, and therefore it is dense. Moreover its cardinality is at most $\lvert S\rvert\le\lvert A\rvert$.


Now, let $\mathcal B_1,\mathcal B_2\subseteq H$ be two subsets of orthonormal vectors each of which generates a dense subspace. Also, let $\kappa_i=\lvert\mathcal B_i\rvert$ and $\kappa_1\le\kappa_2$. If $\kappa_1<\aleph_0$, then proving $\kappa_2=\kappa_1$ is elementary linear algebra. If $\kappa_1\ge\aleph_0$, then call $\span_{\Bbb Q}(\mathcal B_1)$ the $\Bbb Q$-linear subspace generated by $\mathcal B_1$. It is clear that $\overline{\span_{\Bbb Q}(\mathcal B_1)}=\overline{\span_{\Bbb R}(\mathcal B_1)}= H$ and that $\kappa_1=\lvert \span_{\Bbb Q}(\mathcal B_1)\rvert$. By the above lemma, $ \span_{\Bbb R}(\mathcal B_2)$ must have a dense subset $G$ of cardinality at most $\kappa_1$. However, since every vector in $\span_{\Bbb R}(\mathcal B_2)$ is linear combination of finitely many elements of $\mathcal B_2$, there is a subset $G'\subseteq\mathcal B_2$ of cardinality at most $\lvert G\rvert$ such that $\span_{\Bbb R}(G')\supseteq G$. However, $$\mathcal B_2\setminus G'\subseteq (\span_{\Bbb R}(G'))^\perp=\left(\overline{\span_{\Bbb R}(G')}\right)^\perp\subseteq\left(\overline G\right)^\perp=H^\perp=\{0\}$$

which means that $\mathcal B_2=G'$ and therefore $\kappa_2=\lvert G'\rvert\le\lvert G\rvert\le \kappa_1$.