I really am not sure how to get a rigorous answer to the following, any help would be greatly appreciated.
Let $(X_n)_{n\geq0}$ be an integrable process, taking values in a countable set $E ⊆ \mathbb{R}$. Show that $(X_n)_{n\geq0}$ is a martingale in its natural filtration if and only if, for all $n$ and for all $x_0, \ldots , x_n \in E$, whenever the conditioning event has positive probability, we have $$E(X_{n+1}|X_0 = x_0, . . . , X_n = x_n) = x_n.$$
My idea was to show perhaps that the $\sigma$-algebra generated by the conditioning event is equivalent to $\mathcal{F}^X_n$, but not sure how to go about this, nor guarantee that this would maintain memory that $X_n = x_n$. Thanks!