Solution (source code)

= Solution

The pair $(M_n,\mathcal F_n)_{n\geq0}$ is a <martingale> if $(\mathcal F_n)$ is a <filtration>, $(M_n)$ is an <adapted process>, every $M_n$ is <integrable random variable>[integrable], and
$$
\boxed{\mathbb E[M_n\mid\mathcal F_{n-1}]=M_{n-1}\quad\text{almost surely for every }n\geq1.}
$$