Showing a stochastic process is a martingale 
Let $X$ be a square integrable martingale, then show that  $Y_n:= X_n^2 - \sum_{i=1}^n \mathbb E[(X_i - X_{i-1})^2\mid \mathcal F_{i-1}]$ is a martingale.
Hence I need to prove the following:

*

*$Y_n$ is $\mathcal F$ measurable

*$Y_n$ is integrable

*$E(Y_{t}|\mathcal{F}_s) = Y_s, s\le t$


*

*Since $X$ is a square integrable martingale, then it is $\mathcal{F}$-measurable. Since the summationis conditioned on $\mathcal{F}$, then it also must be $\mathcal{F}_n$-measurable. Therefore $Y_n$ is $\mathcal{F}-$measurable.


*$Y_n$ is bounded since $X$ is square integrable (i.e. $E(|X_n|^2)<\infty$) and the summation is a finite sum. Therefore it must be integrable.


*$E(X_n^2|\mathcal F_s) - \sum_{i=1}^n E[(E(X_i - X_{i-1})^2|\mathcal{F}_{i-1})\mid \mathcal F_s] = E(X_n^2|\mathcal F_s) - \sum E((X_i-X_{i-1})^2|F_s)$ by the tower property, then since $X$ is $\mathcal F$ measurable, we can write
$\Rightarrow X_s^2 -\sum_{i=1}^{n+1}E[(X_i-X_{i-1})^2|F_s] = Y_s$
Can i confirm if 2 is worded correct? I also don't think 3 is calculated right as well.
 A: Just to point out, we need to show that $Y_n$ is $\mathcal F_n$ measurable, not $\mathcal F$ measurable. Our space is $(\Omega,\mathcal F, \mathbb P)$ and $(\mathcal F_n)_{n \in \mathbb N}$ is filtration for which the process $X=(X_n)_{n \in \mathbb N}$ is adapted to.
1) Since $X = (X_n)_{n \in \mathbb N}$ is a martingale adapted to $(\mathcal F_n)_{n \in \mathbb N}$, then by definition $X_n$ is $\mathcal F_n$ measurable. Hence so is $X_n^2$, since $\sigma (X_n^2) \subset \sigma(X_n)$. Moreover, for any $i \in \{0,...,n\}$ random variable $\mathbb E[(X_i - X_{i-1})^2 | \mathcal F_{i-1}]$ is $\mathcal F_{i-1}$ measurable (from definition of conditional expectation). Since $(\mathcal F_n)_{n \in \mathbb N}$ is a filtration, then every $\mathbb E[(X_i - X_{i-1})^2 | \mathcal F_{i-1}]$ is $\mathcal F_n$ measurable, too. So the $Y_n$ as a finite sum of $\mathcal F_n$ measurable random variables, is $\mathcal F_n$ measurable.
2) Integrability is easy. $X_n^2$ is assumed to be integrable for any $n \in \mathbb N$. Moreover $\mathbb E[ \mathbb E[(X_{i} - X_{i-1})^2 | \mathcal F_{i-1}]] = \mathbb E[(X_i - X_{i-1})^2] < \infty$. So $Y_n$ as a finite sum of integrable random variables is integrable.
3) For the last part. Note that for discrete time martingale it is enough to check condition $\mathbb E[Y_n | \mathcal F_{n-1}] = Y_{n-1}$ almost surely. (The proof goes via induction). So take any $n \in \mathbb N$. We have:
$\mathbb E[Y_n | \mathcal F_{n-1}] = \mathbb E[X_n^2| \mathcal F_{n-1}] - \sum_{k=1}^n \mathbb E[(X_k - X_{k-1})^2 | \mathcal F_{k-1}] $ (by the tower property). Next:
$ X_{n-1}^2 + \mathbb E[X_n^2 | \mathcal F_{n-1}] - X_{n-1}^2 + \sum_{k=1}^{n-1} \mathbb E[(X_k - X_{k-1})^2 | \mathcal F_{k-1}] + \mathbb E[(X_n - X_{n-1})^2 | \mathcal F_{n-1}] = Y_{n-1} + \mathbb E[X_n^2 | \mathcal F_{n-1}] - X_{n-1}^2 + \mathbb E[(X_n - X_{n-1})^2 | \mathcal F_{n-1}]$. So it is enough to show $\mathbb E[X_n^2 | \mathcal F_{n-1}] - X_{n-1}^2 + \mathbb E[(X_n - X_{n-1}^2 | \mathcal F_{n-1}] = 0$ almost surely, but: $\mathbb E[(X_n - X_{n-1})^2 | \mathcal F_{n-1}] = \mathbb E[X_n^2 | \mathcal F_{n-1}] - 2X_{n-1}\mathbb E[X_n | \mathcal F_{n-1}] + X_{n-1}^2$, so the result follows by substracting.
