Suppose $(Y_n)_{n=0}^\infty$ is a martingale of discrete random variables.
Put $A:= \{(Y_0, \dots, Y_{n-1}) = (y_0, \dots, y_{n-1})\}$
In a proof I'm reading, it is claimed that
$$\mathbb{E}[Y_nY_{n-1}I_A] = y_{n-1} \mathbb{E}[Y_nI_A] = y_{n-1}^2 \mathbb{P}(A)$$
What property of martingales is used here?
$${E}[Y_nY_{n-1}I_A] = {E}[Y_nY_{n-1} | A]P(A) = {E}[Y_nY_{n-1}| Y_{n-1}= y_{n-1}]P(A)=\\ y_{n-1} E[Y_{n}|Y_{n-1}= y_{n-1}]P(A)=y_{n-1}^2P(A) $$
The first equality is from the definition of conditional expectation and the third from the basic martingale property.