Suppose $X$ is an incomplete real inner product space. Does there exist a sequence $(y_n)_n \in X$ such that $Y = \operatorname{span}\{y_n\}_n$ is closed?
This question cropped up as part of my research. It cannot be the case, by the Baire category theorem, that $Y$ is complete, hence admitting such a closed subspace would imply $X$ is incomplete, but is the converse true?
My instinct is to take $(y_n)_n$ to be a non-convergent Cauchy sequence, and apply Gram-Schmidt (removing $0$ vectors as they come) to form orthonormal $(z_n)_n$. This would produce a new basis for $Y$ whose coordinate maps are all continuous. So, if $(x_n)_n \in Y$ converges to $x \in X$, then the coordinates $\langle x_n, z_i \rangle$ converge to $\langle x, z_i\rangle$ as $n \to \infty$. If all but finitely many of these coordinates are $0$, then $x \in Y$. If not, then I'd like to find a way to parlay this into constructing a limit for $(y_n)_n$, but I'm not sure how to do it.
Does anyone have an idea? I don't even know if this result is true.
It's not possible in general. Let $X \subset \ell^n(\Bbb N)$ consist of those sequences $x$ for which $\sum_n 2^n |x_n|^2<\infty$, this is indeed a vector subspace since $|x_n+y_n|^2 ≤ 2(|x_n|^2+|y_n|^2)$. It is obviously not complete.
However $X$ is complete wrt the inner product $\langle x,y\rangle_* = \sum_n 2^n x_n\overline{y_n}$. Note that any limit of $\langle ,\rangle_*$ is also a limit of the original scalar product (but not the other way around). So any subspace of $X$ that is closed with the original scalar product is closed under $\langle,\rangle_*$.
But since $\langle,\rangle_*$ makes $X$ into a Hilbert space there cannot be any $\langle,\rangle_*$-closed subspace of countable algebraic dimension.
This kind of argument goes through whenever you have a continuous linear map $\iota: X\to Z$ between Hilbert spaces for which the image is not closed. Then $\iota(X)\subset Z$ does not have any countable-dimension closed subspaces (since their pre-image would be a countable-dimension closed subspace of the Hilbert space $X$).