Proof (Parseval's theorem)

Let $e_n(\theta) = e^{2\pi i n\theta/L}$. Define the inner product of two functions as in the motivation.

Then $$ \begin{align*} \langle f,g\rangle &= \left\langle \sum_n \hat f_n e_n , \sum_m \hat g_m e_m\right\rangle \\ &= \sum_{n,m} \hat f_n \overline{\hat g_n} \langle e_n, e_m\rangle \tag{*}\\ &= \sum_{n,m} \hat f_n \overline{\hat g_n} L \delta_{nm} \\ &= L \sum_n \hat f_n \overline{\hat g_n}. \end{align*} $$ Therefore $$ \begin{align*} \frac{1}{L} \int_{0}^{L} f(\theta) \,\overline{g(\theta)} \d \theta = \sum_n \hat f_n \, \overline{\hat g_n}. \end{align*} $$

(*) involves interchanging summation and integral signs, which is legal by uniform convergence.