Suppose $Y_n = \mathbb{E}[Y|X_1 \dots X_n]$ is a Doob's Martingale sequence . let $H_n$ be $\sigma$-algebra generate by $X_1 \dots X_n$,then if for any random variable $Z \in H_n$ we have :$\mathbb{E}[(Y_{n+1} - {Y_n})Z] =0.$ then we have $Y_n = \mathbb{E}[Y_{n+1}|H_n]$
how to see that ?
By the hypothesis, $$0 = E[(Y_{n+1} - Y_n) Z] = E[E[Y_{n+1} \mid H_n]Z] - E[Y_n Z].$$ Now recall the measure-theoretic definition of the conditional expectation $E[Y_{n+1} \mid H_n]$.