# Showing $X_n$ defines a martingale

I'm a little bewildered on how to get the following proved...

Suppose we make the following assumptions:

Let $f_n$ be a measurable function on $\mathbb{R}^n$. Let $Z_1,Z_2,\cdots$ be independant random variables and $\mathcal{F}_n = \sigma(Z_1,\cdots, Z_n)$. Let $X_n = f_n(Z_1,\cdots, Z_n)$ and assume that $\mathbb{E}|X_n|<\infty$ and $\mathbb{E}f_n(z_1,\cdots, z_{n-1}, Z_n) = f_{n-1}(z_1,\cdots, z_{n-1})$ for all $n$.

Apparantly then $X_n$ defines a martingale...I just feel like i'm missing some basic understanding about martingales to see why $\mathbb{E}[X_{n+1}|\mathcal{F}_n] = X_n$

holds in this case. Would someone be so nice to enlighten m

-
It follows from the assumption on $\Bbb Ef_{n+1}(z_1,..,z_n,Z_{n+1})$. – Berci Oct 23 '12 at 15:42

$\mathbb{E}f_n(z_1,\cdots, z_{n-1}, Z_n) = f_{n-1}(z_1,\cdots, z_{n-1})$ holds for all $(z_1,\cdots, z_{n-1}) \in \mathbb{R}^{n-1}$，so for all $\omega \in \Omega$,
$\mathbb{E}[X_n|\mathcal{F}_{n-1}](\omega) = \mathbb{E}f_n(Z_1(\omega),\cdots, Z_{n-1}(\omega), Z_n) = f_{n-1}(Z_1(\omega),\cdots, Z_{n-1}(\omega)) = X_{n-1}(\omega)$
which means $\mathbb{E}[X_n|\mathcal{F}_n] = X_{n-1}$ a.s.