Each result cited is universally quantified over the data in its own statement. For nβN let [n] be the initial segment determined by n, let e(n) be the n-tuple with components e1β,β¦,enβ, and let Dnβ be the set of those zβH for which there is qβQn with z=βk=1nβqkβekβ, so that D is the union of the sets Dnβ over nβN. The tuple e(n) is orthonormal, since its components are components of the orthonormal sequence (ekβ)kβNβ and distinct indices in [n] are distinct in N.
Claim 1, countability. Fix nβN. By claim 3 of The Integers and the Rational Numbers are Countable the set Qn is countable, and Dnβ is the set of values of the map QnβH sending q to βk=1nβqkβekβ, so Dnβ is countable by claim 4 of Basic Properties of Countable Sets. Hence D, the union of the countable sets Dnβ over nβN, is countable by A Countable Union of Countable Sets is Countable.
Claim 1, density. Let xβH and let Ξ΅ be a positive real number, and put ckβ=β¨x,ekββ© for kβN. By Orthonormal Expansions in a Real Hilbert Space Β§expansion the series βk=1ββckβekβ converges in H with sum x, so there is nβN such that the point w=βk=1nβckβekβ satisfies β£xβwβ£<2Ξ΅β.
For kβ[n] the real number (21β)k4Ξ΅2β is positive, so by Existence and Uniqueness of the Nonnegative Square Root there is a nonnegative real Ξ·kβ with Ξ·k2β=(21β)k4Ξ΅2β; and Ξ·kβ is positive, since Ξ·kβ=0 would give Ξ·k2β=0 by claim 4 of Properties of Natural Number Powers in a Field, contrary to the positivity of that number. By claim 2 of The Rational Numbers are Dense in the Real Numbers the set of rational q with β£ckββqβ£<Ξ·kβ is nonempty for each kβ[n], so, these being finitely many nonempty sets, there is qβQn with β£ckββqkββ£<Ξ·kβ for every kβ[n]. Put v=βk=1nβqkβekβ, a point of Dnβ and hence of D.
For kβ[n], claim 1 of Properties of the Absolute Value in an Ordered Field gives β£ckββqkββ£β{ckββqkβ,qkββckβ} and 0β€β£ckββqkββ£, so in either case β£ckββqkββ£2=(ckββqkβ)2; by claim 1 of Monotonicity of Squaring on the Nonnegative Elements of an Ordered Field applied to 0β€β£ckββqkββ£<Ξ·kβ,
(ckββqkβ)2<Ξ·k2β=(21β)k4Ξ΅2β.
Write Ξ²kβ=(21β)k4Ξ΅2ββ(ckββqkβ)2, which is nonnegative for kβ[n] by the last display. By claim 2 of Properties of Finite Sums,
k=1βnβ(21β)k4Ξ΅2β=k=1βnβ(ckββqkβ)2+k=1βnβΞ²kβ,
and the second sum on the right is nonnegative by claim 5 of that lemma, so claim 3 of Elementary Arithmetic in an Ordered Field gives
k=1βnβ(ckββqkβ)2β€k=1βnβ(21β)k4Ξ΅2β=4Ξ΅2βk=1βnβ(21β)k,
the last step by claim 3 of Properties of Finite Sums. The terms (21β)k are nonnegative and, by Series of Nonnegative Real Numbers, Comparison, and the Geometric Series Β§geometric with r=21β, the series βk=1ββ(21β)k converges with sum 1; so Series of Nonnegative Real Numbers, Comparison, and the Geometric Series Β§dominates gives βk=1nβ(21β)kβ€1, and multiplying by the nonnegative number 4Ξ΅2β with claim 5 of Elementary Arithmetic in an Ordered Field,
k=1βnβ(ckββqkβ)2β€4Ξ΅2β=(2Ξ΅β)2.
Now, by claim 2 of Properties of Finite Sums of Vectors applied to the maps kβ¦(ckββqkβ)ekβ and kβ¦qkβekβ on [n], together with the distributive law of the vector space H,
w=k=1βnβckβekβ=k=1βnβ((ckββqkβ)ekβ+qkβekβ)=k=1βnβ(ckββqkβ)ekβ+v,
so wβv=βk=1nβ(ckββqkβ)ekβ, and Inner Products Against Finite Sums, and Orthonormal Families, in a Real Inner Product Space Β§norm, applied to the orthonormal tuple e(n) and the coefficients ckββqkβ, gives
β£wβvβ£2=k=1βnβ(ckββqkβ)2β€(2Ξ΅β)2.
Both β£wβvβ£ and 2Ξ΅β are nonnegative, so β£wβvβ£β€2Ξ΅β: otherwise 2Ξ΅β<β£wβvβ£ and claim 1 of Monotonicity of Squaring on the Nonnegative Elements of an Ordered Field would give (2Ξ΅β)2<β£wβvβ£2, contradicting the last display by trichotomy.
Since d is a metric by The Norm Metric of a Real Inner Product Space: Triangle Inequalities, Limits and Continuity Β§metric and d(y,z)=β£yβzβ£ for y,zβH, the triangle inequality and claim 3 of Elementary Order Arithmetic in an Ordered Field give
d(x,v)β€d(x,w)+d(w,v)=β£xβwβ£+β£wβvβ£<2Ξ΅β+2Ξ΅β=Ξ΅.
Thus every open ball about x meets D, so x lies in the closure of D by Characterization of the Closure in a Metric Space by Open Balls. As xβH was arbitrary, the closure of D is H, that is, D is dense in H.
Claim 2. By claim 1 the set D is a countable dense subset of H, which is exactly the condition for (H,d) to be separable in the sense of Separable Metric Space.