Martingale of function of RV's Let $\phi_n:\mathbb{R}^n\to\mathbb{R}$ for all $n\in\mathbb{N}$ be a measurable function, and $X_1,...,X_m$ independendent rv's and $\Sigma_m=\sigma(X_1,...,X_m)$.
Further suppose $E(\phi_{m+1}(x_1,...,x_m,X_{m+1}))=\phi_{m}(x_1,...,x_m)$.

How do show that $M_m=\phi_m(X_1,..,X_m)$ is martingale?

My attempts:
We have $E(M_m|\Sigma_{m-1})=E(\phi_m(X_1,..,X_m)|\Sigma_{m-1})$ and want to show that this equals $M_{m-1}$.
I know that $\phi_{m-1}(X_1,...,X_{m-1})$ is $\Sigma_{m-1}$-measurable, so $M_{m-1}=E(\phi_{m-1}(X_1,..,X_{m-1})|\Sigma_{m-1})$
How do I use $E(\phi_{m+1}(x_1,...,x_m,X_{m+1}))=\phi_{m}(x_1,...,x_m)$?
 A: $\newcommand{\R}{{\mathbb R}}$
Let ${\cal F}_m=\sigma(X_1,\dots,X_m)$. Note that 
$${\cal F}_m =\left\{ \{(X_1,\dots,X_m) \in A\}:A \mbox{ Borel in }\R^m\right\}.$$ 
Now use independence. For a Borel set $A$,  
\begin{align*} 
E [{\bf 1}_A (X_1,\dots,X_m) M_{m+1}] 
 &=  E[ {\bf 1}_A(X_1,\dots,X_m)  \phi(X_1,\dots,X_m,X_{m+1}) ] \\
&=  \iint_{A\times \R} \phi(x_1,\dots,x_m,x_{m+1}) dP(x_1) d P(x_2)\dots d P(x_{m+1})\\
&\overset{\tiny\mbox{Fubini}} = \int_{A} \int_{\R} \phi(x_1,\dots,x_m,x_{m+1}) d P(x_{m+1}) \prod_{j=1}^m d P(x_j).\\
& =\int_{A} E[\phi(x_1,\dots,x_m,X_{m+1})] \prod_{j=1}^m d P(x_j)\\
& = \int_A  \phi(x_1,\dots,x_m) \prod_{j=1}^m d P(x_j)\\
& \overset{\tiny\mbox{assumption}}{=} E [ {\bf 1}_A(X_1,\dots,X_m) \phi(X_1,\dots,X_m)]\\
& = E [  {\bf 1}_A(X_1,\dots,X_m) M_m].
\end{align*} 
The result follows. 
A: To evaluate $E[\phi_{m+1}(X_1, \ldots, X_m, X_{m+1})\mid \Sigma_m]$ keep in mind that $X_1,X_2,\ldots,X_m$ is measurable with respect to $\Sigma_m$ and $X_{m+1}$ is independent of it. So then you can treat $X_1,X_2,\ldots,X_m$ as if they were constants and integrate $X_{m+1}$ out, i.e.
$$E[\phi_{m+1}(X_1, \ldots, X_m, X_{m+1})\mid \Sigma_m] = f(X_1, \ldots, X_m)$$
with
for some measurable function $f$ with $$E[\phi_{m+1}(x_1, \ldots, x_m, X_{m+1})] = f(x_1, \ldots, x_m)$$
By hypothesis $f(X_1, \ldots, X_m) = \phi_m(X_1, \ldots, X_m)$ almost surely. This proves the martingale property. Integrability of $M$ should be mentioned somewhere in the question as otherwise we would not be able to talk about its conditional expectation.
