I have a question about following version of the spectral theorem:
Let $V,H$ be (infinite dimensonal) Hilbert spaces, where $V \subset H$ compact and let $(\cdot,\cdot)$ be the scalar product on $H$. Furthermore let $a(\cdot,\cdot): V \times V \to \mathbb R$ be coercive and continuous bilinear form.
Then there are countably many real eigenalues $\lambda_k$ and eigenvectors $w_k$ of the equation $$a(u,v) = \lambda (u,v) \forall v \in V$$ (i.e. $a(w_k,v) = \lambda_k(w_k,v) \forall v \in V$) such that
$0 < \lambda_1 \leq \lambda_2 \leq \ldots$ with $\lim_{k\to \infty} \lambda_k = \infty$ and
$\{w_k\}_k$ is an orthonormal basis of $H$ and
$\left\{ \frac{w_k}{\sqrt{\lambda_k}} \right\}_k$ is an orthonormal basis of $V$ with respect to $a(\cdot,\cdot)$.
Now point $3$ implies that $span \{w_k\} = V$, but that implies $V = H$.
Obviously this must be wrong, otherwise the separation of $H$ and $V$ in this theorem would not make any sense. But where is my mistake?
I think I found my mistake, I assumed to much from linear algebra was also true for inifinite dimensional vector spaces, and found an counterexample:
Assume we find $\lambda_k = k$.
Let $v = \sum \alpha_k \frac{w_k}{\sqrt{\lambda_k}}$ where $\alpha_k = 1/\sqrt{k}$
$$||v||_V^2 = \sum_{k,i=1}^\infty a\left( \alpha_k \frac{w_k}{\sqrt{\lambda_k}},\alpha_i\frac{w_i}{\sqrt{\lambda_ki}} \right) =\sum_{k=1}^\infty \alpha_k^2 = \sum \frac 1 k = \infty \implies v \not \in V$$
but
$$||v||_H^2 = \sum_{k,i=1}^\infty \left( \frac{\alpha_k}{\sqrt{\lambda_k}}w_k,\frac{\alpha_i}{\sqrt{\lambda_i}}w_i\right)=\sum_{k=1}^\infty \frac{\alpha_k^2}{\lambda_k} = \frac{1}{k^2} < \infty \implies v \in H$$
So indeed $V \subset H$ and $V \neq H$.