Suppose that $\{e_n\}$ is a othonormal basis for $L^2[0,T]$ and $\langle \cdot,\cdot \rangle$ be the standard $L^2[0,T]$ inner product. Denote $1_A(x)$ as the indicator function on the set $A$. Prove that $$ \sum_{n=0}^N \langle1_{[0,t]},e_n\rangle\langle1_{[0,s]},e_n\rangle \to \langle 1_{[0,t]}, 1_{[0,s]} \rangle $$ and $N \to \infty$.
I am having trouble seeing why this is true. First suppose $s<t$, I then rewrote the sum as $$ \sum_{n=0}^N \left(\langle1_{[0,s]},e_n\rangle + \langle1_{[s,t]},e_n\rangle\right)\langle1_{[0,s]},e_n\rangle = \sum_{n=0}^N \langle1_{[0,s]},e_n\rangle\langle1_{[0,s]},e_n\rangle + \sum_{n=0}^N \langle1_{[s,t]},e_n\rangle\langle1_{[0,s]},e_n\rangle $$ and by Parsevals Indentity the first sum converges to $$\langle1_{[0,s]},1_{[0,s]}\rangle$$ and because $s<t$, this is the same thing as $$ \langle 1_{[0,t]}, 1_{[0,s]} \rangle $$ But then this would mean that we would need the second sum to converge to $0$ but I do not see why that is that case.
If you want to understand why for $f,g\in L^2$ it follows $$ \langle f, g \rangle = \sum_{n=1}^\infty \langle f, e_n \rangle \langle g, e_n \rangle. $$
As $\{e_n\}$ is a orthonormal basis, we have $$ f = \sum_{n=1}^\infty \langle f, e_n \rangle e_n. $$ The same for $g$. Now, by the continuity of the inner product, we have $$ \langle f, g \rangle = \lim_{N\to \infty} \bigl\langle \sum_{n=1}^N \langle f, e_n \rangle e_n, \sum_{n=1}^N \langle g, e_n \rangle e_n \bigr\rangle = \lim_{N\to \infty} \sum_{n=1}^N \langle f, e_n \rangle \langle g, e_n \rangle, $$ as $\{e_n\}$ are orthogonal.