How can we show a sequence convergence to almost surely in conditional expectation

Consider a sequence of i.i.d. random variables $\left\{Z_i\right\}$ where $\mathbb{P}\left(Z_i = 0\right) = \mathbb{P}\left(Z_i = 1\right) = \frac{1}{2}$. Using this sequence, define a new sequence of random variables $\left\{X_n\right\}$ as follows: $$X_0 = 0 \\ X_1 = 2Z_1 − 1\\ X_n =X_{n−1} +(1+Z_1 + \cdots +Z_{n−1})(2Z_n -1)\ \ \forall \ \ n \geq 2$$

Show that $\mathbb{E}\left[X_{n+1} \mid X_0, X_1, \cdots, X_n \right] = X_n$ almost surely for all $n$.

In this problem how can we show that the sequence convergence to almost surely to $X_n$ by applying iterated expectation? I have tried in this way through iterated expectation approach but not able to proceed can some body show me how to do this.


Facts:

  1. $X_n$ is $(X_0,...,X_n)-$measurable (trivial)
  2. $Z_n$ is $(X_0,...,X_n)-$measurable (induction)
  3. $Z_{n+1}$ is independent of $(X_0,...,X_n)$ (induction)

Using this:

$E[X_{n+1}|X_0,...,X_n]=E[X_n|X_0,...,X_n]+E[(1+...+Z_{n})(2Z_{n+1}-1)|X_0,...,X_n]$ (lineariy of conditional expectation) =

$=X_n+E[(1+...+Z_{n})(2Z_{n+1}-1)|X_0,...,X_n]$ (by fact 1) =

$=X_n+(1+...+Z_{n})E[(2Z_{n+1}-1)|X_0,...,X_n]$ (by fact 2)=

$=X_n+(1+...+Z_{n})E[(2Z_{n+1}-1)]$ (by fact 3)=

$=X_n$ (simple evaluation of unconditional expectation value)

This shows that $X_n$ is a martingale.