Let $X$ be an (infinite-dimensional) inner product space with an (countable) orthogonal system $\lbrace e_i \rbrace_{i \in \mathbb{N}}$. The field is $\mathbb{R}$ or $\mathbb{C}$. Here X may not be a Banach space. Suppose further that $Span(\lbrace e_i \rbrace_{i \in \mathbb{N}})$ is dense in $X$, do we still have infinite series representation of each element? i.e., I'm wondering if $\forall x \in X$, $\exists \lbrace a_n \rbrace \subseteq \mathbb{R}$ (or $\mathbb{C}$) such that $$x = \sum_{n=1}^{\infty} a_ne_n, \forall x \in X$$
If $X$ is a Hilbert space, then above is just a trivial application of Hilbert basis. I'm quite interested in the situation where $X$ is not complete. Any help or idea is appreciated.
If $\ x\in X\ $ let $$ x_n\stackrel{\text{def}}{=}\sum_{i=1}^n\frac{\langle x,e_i\rangle}{\|e_i\|^2}e_i\ . $$ for $\ n\in\mathbb{N}\ .$ Then $\ \big\langle x-x_n, e_i\big\rangle=0\ $ for all $\ i\le n\ .$ Since $\ Span\big(\big\{e_i\big\}_{i\in\mathbb{N}}\big)\ $ is dense in $\ X\ ,$ then for any $\ \epsilon>0\ $ there exists $\ y=\sum_\limits{i=1}^m\xi_ie_i\in Span\big(\big\{e_i\big\}_{i\in\mathbb{N}}\big)\ $ such that $\ \|x-y\|<\epsilon\ .$ Then for any $\ r\ge m\ $ \begin{align} \epsilon^2&>\|x-y\|^2\\ &=\big\|x-x_r+x_r-y\big\|^2\\ &=\big\|x-x_r\|^2+2\mathfrak{Re}\big\langle x-x_r, x_r-y\big\rangle+\big\|x_r-y\big\|^2\\ &=\big\|x-x_r\|^2+\big\|x_r-y\big\|^2\ , \end{align} because $\ x_r-y\ $ is a linear combination of $\ \big\{e_i\big\}_{i=1}^r\ ,$ all of which are orthogonal to $\ x-x_r\ .$ It follows from this that, for all $\ r\ge m\ ,$$\ \big\|x-x_r\big\|<\epsilon\ ,$ and hence, from the arbitrariness of $\ \epsilon\ ,$ that $$ x=\lim_{n\rightarrow\infty}x_n=\sum_{i=1}^\infty\frac{\langle x,e_i\rangle}{\|e_i\|^2}e_i\ . $$