A standard statement in Hilbert space is given as follows: Let $\{e_i\}$ be an orthonormal sequence in a Hilbert space, and $M$ be the closure of the subspace generated by $\{e_i\}$. Then for all $x\in M$, we have the unique representation $x=\sum_{i=1}^\infty \alpha_i e_i$, where $\alpha_i=(x,e_i)$.
My question is, is it possible to relax the completeness condition? Namely, does the above statement hold true if the underlying space is a pre-Hilbert space? My intuition is that since $x$ already belong to the closure $M$, so the 'target' towards which the Cauchy sequence 'converges' is known, so the completeness condition may be relaxed. My approach is following the conventional wisdom to consider sequence $\{s_n\}$ with $s_n=\sum_{i=1}^n \alpha_i e_i$. But then I reach the point $\delta=\lim\Vert x-s_n\Vert$, and it seems that nothing stops $\delta$ to be bigger than $0$. Is my conjecture simply false, or how should I proceed? I know that I have not use the fact that there exists $\{x_n\}$ in the subspace generated by $\{e_i\}$ and $x_n\to x$, but have not found a way to use it.
I found Theorem 2.3.2 in A first course in harmonic analysis seems to answer my question. I describe the proof following the approach given in the book.
For any $x\in M$, we introduce the sequence $\{s_n\}\subset M$, where $s_n=\sum_{i=1}^n\alpha_i e_i$ with $\alpha_i=(x,e_i)$. Then we have that $$\Vert x-s_n\Vert^2 =\Vert x\Vert^2-\sum_{i=1}^n|\alpha_i|^2\implies \sum_{i=1}^n|\alpha_i|^2\leq \Vert x\Vert^2\implies \sum_{i=1}^\infty|\alpha_i|^2\leq \Vert x\Vert^2.$$ Therefore, for all $x\in M$, the sequence $\{\alpha_i\}$ defined above is in $l_2$. Denote the mapping from element $x$ to its sequence as $T:M\mapsto l_2$, i.e., $T(x)=\{\alpha_i\}$. From above discussion, we see that $\Vert T(x)\Vert_2 \leq \Vert x\Vert$, where $\Vert \cdot\Vert_2$ denote the norm in $l_2$. In addition, we have $\Vert T(x)\Vert_2=\Vert x\Vert$ for all $x$ in the space generated by $\{e_i\}$. Besides, since $T$ is linear, we have $x_n\to x$ implies $T(x_n)\to T(x)$. Thus, for all $x\in M$, $\Vert T(x)\Vert_2=\Vert x\Vert$ (isometry). As a result, we have $\Vert x-s_n\Vert\to0$. One can also show that the representation parameter set $\{\alpha_i\}$ is unique.
The result given in A first course in harmonic analysis is for a seperable pre-Hilbert space, where $\{e_i\}$ is its orthonormal basis. This is essentially the same as the setting here, if we treat $M$ as the whole pre-Hilbert space.