Evidently, this fact (for real or complex valued functions) is usually taken "for-granted" in derivations of Fourier series/transform, taking $\{e^{inx}|n\in\mathbf Z\}$ as the set of basis vectors.
My hope is to find proof for this. (preferably "simple", but any valid proof will do :).
Thanks.
I think that the Hilbert space you are referring to is $L^2(\mathbb{T})$, the space of square integrable and $2\pi$-periodic functions. In this case the trigonometric system $$\left\{\frac{e^{i n x}}{\sqrt{2\pi}}\ :\ n\in \mathbb{Z}\right\}$$ forms an orthonormal basis. The proof of this comprises of two parts: the first is showing that the system is orthonormal, which is a straightforward check, and the second is showing that it is complete$^{[1]}$, which is more involved. As far as I know, there are at least three ways of proving this:
Either approach has its advantages and disadvantages.
$^{[1]}$ Definition: If $S$ is a subset of a Banach space $X$, then it is said to be complete if its linear span is dense in $X$. Warning: This terminology is not universally accepted.