Verifying Ito isometry for simple stochastic processes

It is known that stochastic integral must satisfy the isometry property which is $$ \mathbb{E}\left[ \left( \int_0^T X_t~dB_t\right)^2 \right] = \mathbb{E} \left[ \int_0^T X^2_t~dt \right] . $$ I am trying to prove this property for a simple stochastic process. What I said so far that is $$ \mathbb{E}\left[\sum_{i=0}^{n-1} X_i \left(B(t_{i+1})-B(t_i)\right)\right]^2, $$ then I am stuck. I know that we should to write the square sum as double sum to continue the proof but I couldn't do it. Any help please!


I take it that a simple process is a process of the form $$ Y_t=\sum_{i=0}^{n-1} X_i 1_{]t_i,t_{i+1}]}(t),\quad t\geq 0, $$ where $0\leq t_1<t_2<\cdots < t_n$ and $X_i$ is a bounded $\mathcal{F}_{t_i}$-measureable variable. Now we need the following result.

For every simple process $Y=(Y_t)_{t\geq 0}$ the process
$$ \left(\left(\int_0^t Y_s\;\mathrm{d}B_s\right)^2 -\int_0^t Y_s^2\;\mathrm{d}s\right)_{t\geq 0} $$ is a martingale which is $0$ at $0$.

By taking expectation this shows the desired property.

If you don't know the above result you can just prove it. Here it is useful to note that when $Y=(Y_t)_{t\geq 0}$ is a simple process, then $Y^2=(Y_t^2)_{t\geq 0}$ is also a simple process which satisfies $$ Y_t^2=\sum_{i=0}^{n-1} X_i^2 1_{]t_{i},t_{i+1}]},\quad t\geq 0. $$