Orthonormal basis for non-separable inner-product space

Suppose X is an inner product space, with Hilbert space completion H (actually, I'm interested in the real scalar case, but I doubt there's any difference). If H is separable, then so is X, and I can find a (countable or finite) orthonormal basis of H inside X. Indeed, start with some countable subset Y of X which is dense in H. Then, by induction, we can move to a linearly independent subset of Y, and then apply Gram–Schmidt, again by induction. The point (to me, anyway) is that at any stage, we never take limits, and so we never leave X.

Now, what happens if H is not assumed separable? I've tried to use a Zorn's Lemma argument, but I keep end up wanting to take limits (or, rather, infinite sums) which gives me an orthonormal basis (in the generalised, non-countable, sense) in H, but I cannot ensure that it's in X. Am I just missing something obvious, or is there a slight technicality here...?

-
Something here sounds fishy. If $X$ is an incomplete inner product space and $H$ is its completion then an orthonormal basis for $H$ which consists of elements of $X$ is in particular an orthonormal basis for $X$, but some incomplete inner product spaces (which are necessarily not separable) do not have an orthonormal basis. –  Mark Aug 26 '10 at 9:53
Ah, well that would give a counter-example for sure! Do you have a reference? –  Matthew Daws Aug 26 '10 at 9:57
Ah, Google comes to the rescue: secure.wikimedia.org/wikipedia/en/wiki/… –  Matthew Daws Aug 26 '10 at 10:03
Mark: if you write that up into an answer, I'll accept it (as it was news to me that non-separable (incomplete) inner-product spaces might fail to have an o.n. basis. –  Matthew Daws Aug 26 '10 at 10:07
Sorry, last commment. If you access, a better reference is jstor.org/stable/2318908 –  Matthew Daws Aug 26 '10 at 10:12
show 1 more comment

This is Problem 54 in Halmos' "A Hilbert Space Problem Book". However, I think this is a concrete counterexample. [Please let me know if not viewable.]

-
As Mark hasn't typed his comment into an answer, I'm accepting this. Thanks all. –  Matthew Daws Aug 28 '10 at 12:24

-

On the arXiv this (2010-09-09) morning:

Title: Inner product space with no ortho-normal basis without choice.
Authors: Saharon Shelah
Primary Subject: math.LO

We prove in ZF that there is an inner product space, in fact, nicely definable with no orthonormal basis.

-
Take X as a space of functions $f:R \to R$ such that $f^{-1}(0)$ is the complement of a countable set and $\sum_{f(x) \ne 0} f(x)^2$ is finite. X is pretty much like the space of square-summable sequences, but each sequence is indexed by a real number instead of a positive integer. We define standard basis vectors as functions that are 1 at only one point and 0 everywhere else. [I believe] these standard basis vectors form a complete orthogonal basis in your sense.