Definition of Doob martingale

From Wikipedia

A Doob martingale is a generic construction that is always a martingale. Specifically, consider any set of random variables $$\vec{X}=X_1, X_2, ..., X_n$$ taking values in a set $A$ for which we are interested in the function $f:A^n \to \Bbb{R}$ and define: $$B_i=E_{X_{i+1},X_{i+2},...,X_{n}}[f(\vec{X})|X_{1},X_{2},...X_{i}]$$ It is possible to show that $B_i$ is always a martingale regardless of the properties of $X_i$. The sequence $\{B_i\}$ is the Doob martigale for $f$.

1. I wonder if the function $f:A^n \to \Bbb{R}$ is a given function, so Doob martingale is relative to both $\vec{X}$ and $f$?
2. What requirement is on $f$?
3. Can the set of random variables $\{X_1, X_2, ..., X_n\}$ be generalized from finite to infinite (countably or uncountably)?

Thanks!

-
Thanks, @TheBridge! – Tim Oct 16 '12 at 20:59
@ Tim : The notation $E_{(X_{i+1,...,X_n)}}$ is really misleading or confusing in my opinion (for example consider such notation in the context of a brownian motion it is really disturbing isn't it). The proof of the fact that $B_i$ is martingale with respect to $\mathcal{F}_i=\sigma(X_1,...,X_i)$ is clear from the proof of lemma 2 (which just the very well known tower property of iterated conditional expectations) in the document of Anupam Gupta given as reference on wiki's page. I shall try to answer your question later on . – TheBridge Oct 16 '12 at 21:02

About 1, yes $f$ is clearly part of the definition of $B_i$.
About 2, a requirement could be for $f(X_1,...,X_n)$ to be an integrable random variable with respect to the joint law of $(X_1,...,X_n)$, alternatively you can suppose that $f$ is either positive (or negative) or bounded, what is important is that the conditional expectation involved make sense at every steps.
About 3, well for countable extensions you need at least an infinite dimensional function $f$ of course (or a fonctional for the uncountable case), this is also motivated by my answer to point 1. At the moment I can't see a sufficient condition to give a real meaning to Doob's martingale in that context, but I feel that uniform integrability condition over the $X_i$ would probably be usefull to get limits more easily, but this by no way mandatory I think. If I can figure out an extension formally satisfactory I'll edit the answer accordingly.