I know that there is a lemma which tells me that if $V$ is a closed subspace of a Hilbert space $H$, if $y \in H$, and $y \notin V$, then if $$V^* = \text{Linear span}\ (V, y)$$we have $V^*$ is a closed subspace of $H$.
Now i have a confusion that in the proof of above lemma nowhere we talk about the dimension of $V$, so it might holds for infinite dimension also.
Let $H = L^2([0,1])$ and let $P$ be the set of polynomials in $H$. Since i know the basis of $P$ which are $\{1, x, x^2, \ldots\}$. By above lemma if we take $V = \{0\}$, then by continuously applying lemma we have $P$ must be closed in $H$ which is not in actual. So where i am wrong in approaching this?
You can apply the lemma $n$ times to prove that $\{1,x,x^2,...,x^{n-1}\}$ is closed, but it doesn't hold at infinity. It would be like saying that the union of infinitely many closed sets is closed. In fact $P$ is the union wity $n$ from $0$ to infinity of $\{1,...,x^{n}\}$