Suppose that $(X_n,F_n)$ is a martingale and suppose that $T \leq K$ is a bounded stopping time. Then $E(X_T)=E(X_0)$. I haven't been able to come across a complete proof for this fact, most authors just claim it's obvious and move on. My attempt:
We have $E(X_T)=\sum_{i=0}^K\int_{T=i}X_i =\sum_{i=0}^K \int_{\Omega} X_i I_{T=i }=\sum_{i=1}^N\int_{\Omega} E( Y_i I_{T=i } | F_1)=\sum _iE(Y_1 I_{T=i})=E(Y_1)$
Any help would be appreciated.
Your attempt has some unexplained steps, but if I just assume you have a few typos, then the problem is that we cannot say $E(X_iI_{T=i} | F_0) = X_0I_{T=i}$ since we may have $\{T=i\}\not\in F_0$. Instead, you should move $X_i$ forward in time, as in $E(X_iI_{T=i}) = E(X_KI_{T=i})$, which is a direct result of $E(X_K|F_i) = X_i$. With that in mind, the proof is
$$\begin{align*}E\left(X_T\right) &= E\left(\sum_{i=0}^K X_i I_{T=i}\right) \\ &= \sum_{i=0}^KE(X_iI_{T=i}) \\ &= \sum_{i=0}^KE(X_KI_{T=i}) \\ &= E\left(X_K\sum_{i=0}^KI_{T=i}\right) \\ &= E(X_K) \\ &= E(X_0)\end{align*}$$