We use Span of a Finite Family of Vectors, The Span of a Finite Family is the Smallest Subspace Containing It, the finite-sum rules of Properties of Finite Sums of Vectors, and write S for the successor map of Natural Numbers. For a tuple uβEp and xβE, xβspan(u) means x=βk=1pβckβukβ for some c:[p]βR.
Two preliminary facts. (i) For pβN, uβES(p) and uβ² the restriction of u to [p]: by the recursion and restriction rules, βk=1S(p)βckβukβ=βk=1pβckβukβ²β+cS(p)βuS(p)β for every c:[S(p)]βR. Hence span(u)={w+tuS(p)β:wβspan(uβ²),Β tβR}; in particular span(uβ²)βspan(u) (take t=0). (ii) For uβE1, span(u)={cu1β:cβR} by the recursion rule; this is {0Eβ} if u1β=0Eβ (claim 4 of Elementary Identities in a Vector Space), while if u1βξ =0Eβ then e1β=β£u1ββ£β1u1β satisfies β£e1ββ£=β£u1ββ£β1β£u1ββ£=1 by Elementary Identities in a Real Inner Product Space Β§homogeneity (as β£u1ββ£>0 by Elementary Identities in a Real Inner Product Space Β§vanishing, so that β£u1ββ£β1>0 equals its absolute value by claim 1 of Properties of the Absolute Value in an Ordered Field) and span(e)={ce1β:cβR}={cu1β:cβR}=span(u) for the 1-tuple e with component e1β, since cu1β=(cβ£u1ββ£)e1β and ce1β=(cβ£u1ββ£β1)u1β; a 1-tuple e with β£e1ββ£=1 is orthonormal by Orthogonality, Orthogonal Complement and Orthonormal Families in a Real Inner Product Space Β§orthonormal.
Claim 1. Let A be the set of nβN such that for every vβEn, either span(v)={0Eβ} or there are mβN with mβ€n and an orthonormal eβEm with span(e)=span(v). By (ii), 1βA. Let nβA and vβES(n); let vβ² be the restriction of v to [n], Mβ²=span(vβ²), M=span(v) and y=vS(n)β, so that M={w+ty:wβMβ²,tβR} by (i).
Case Mβ²={0Eβ}. Then M={ty:tβR}, which is {0Eβ} if y=0Eβ; otherwise the 1-tuple with component β£yβ£β1y is orthonormal with span M by (ii), and 1β€S(n) (claim 4 of Properties of the Order on the Natural Numbers).
Case Mβ²ξ ={0Eβ}. Since nβA there are mβ²β€n and an orthonormal eβ²βEmβ² with span(eβ²)=Mβ². Let P be the map of Projection onto the Span of an Orthonormal Tuple, and Coordinates on a Finite-Dimensional Subspace for eβ², and put w=yβPy; by Projection onto the Span of an Orthonormal Tuple, and Coordinates on a Finite-Dimensional Subspace Β§projection, PyβMβ² and w lies in the orthogonal complement of Mβ². If w=0Eβ, then y=PyβMβ², so MβMβ² (as Mβ² is a linear subspace) and Mβ²βM by (i); thus M=Mβ²=span(eβ²) and mβ²β€nβ€S(n) by claims 5 and 1 of Properties of the Order on the Natural Numbers. If wξ =0Eβ, define eβES(mβ²) by ekβ=ekβ²β for kβ[mβ²] and eS(mβ²)β=β£wβ£β1w. Then e is orthonormal: for kβ[mβ²], β¨ekβ²β,eS(mβ²)ββ©=β£wβ£β1β¨ekβ²β,wβ©=0 because ekβ²ββMβ² (claim 1 of The Span of a Finite Family is the Smallest Subspace Containing It) and wβMβ²β₯, using symmetry; β£eS(mβ²)ββ£=1 as in (ii); and the remaining conditions are those of eβ². Its span is M: each ekβ lies in M (for kβ€mβ², ekβ²ββMβ²βM; and w=yβPyβM since yβM by claim 1 of The Span of a Finite Family is the Smallest Subspace Containing It and PyβMβ²βM), so span(e)βM by claim 3 of The Span of a Finite Family is the Smallest Subspace Containing It; conversely Mβ²=span(eβ²)βspan(e) by (i), and y=Py+w=Py+β£wβ£eS(mβ²)ββspan(e), so every wβ²+ty with wβ²βMβ² lies in the linear subspace span(e), that is, Mβspan(e). Finally S(mβ²)β€S(n) since mβ²β€n, by claim 6 of Properties of the Order on the Natural Numbers. Hence S(n)βA, and A=N by Principle of Induction for the Natural Numbers.
For the basis assertion, let eβEm be orthonormal with span(e)=M. By claim 2 of The Span of a Finite Family is the Smallest Subspace Containing It, the tuple eββMm with the same components spans the vector space M. It is linearly independent in M: a relation βk=1mβckβekββ=0Eβ formed in M is the same relation formed in E by claim 2 of A Linear Subspace is a Vector Space and Inherits an Inner Product, so c=0 by Inner Products Against Finite Sums, and Orthonormal Families, in a Real Inner Product Space Β§independent. Hence eβ is a basis of M.
Claim 2. Since Lξ ={0Eβ} is finite-dimensional, Finite-Dimensional Vector Space provides pβN and a basis bβLp of L. Let bβ²βEp have the same components. Then span(bβ²)=L: every element of L is a combination βckβbkβ formed in L, which equals the same combination formed in E (claim 2 of A Linear Subspace is a Vector Space and Inherits an Inner Product), so Lβspan(bβ²); and span(bβ²)βL by claim 3 of The Span of a Finite Family is the Smallest Subspace Containing It as each bkββL. Apply claim 1 to bβ²: since span(bβ²)=Lξ ={0Eβ}, there are m and an orthonormal eβEm with span(e)=L, and eβ is a basis of L by the basis assertion of claim 1.