proof that a stopped martingale is a martingale? Definition.
$\mathcal{F}_{\tau}=\{F\subset \Omega:\; \forall n \in N \cup \{\infty\},\; F\cap(\tau\leq n)\in \mathcal{F}_{n}$} is a sigma-algebra.
Definition.
$\forall \omega \in \Omega:\; M_{n}^{\tau}(\omega) \;=\; M_{\min(\tau(\omega), n)}(\omega).$
Question.
Prove that this collection of functions is also a martingale with respect to the given filtration.
(First try to prove that the following is true: $\,M_{n}^{\tau} \;=\; M_{n-1}^{\tau}+1_{\tau \le n}(M_{n}-M_{n-1}).\,$)
My Attempt.
First of all, I am not able to prove that $M_{n}^{\tau}=M_{n-1}^{\tau}+1_{\tau \le n}(M_{n}-M_{n-1})$. It would be great if someone could help me with that!
Secondly, if I assume that the hinted expression for $M_{n}^{\tau}$ is correct, I continued as follows:
We want to show that $E(M_{n}^{\tau}\mid \mathcal{F}_{n-1})=M_{n-1}^{\tau}$.
By assumption (now)
$$E(M_{n}^{\tau}\mid \mathcal{F}_{n-1}) \\=\, E\left(M_{n-1}^{\tau}+1_{\tau \leq n}(M_{n}-M_{n-1})\mid \mathcal{F}_{n-1}\right) \\=\, M_{n-1}^{\tau}+E\big(1_{\tau \leq n}(M_{n}-M_{n-1})\mid \mathcal{F}_{n-1}\big) \\=^{?}\, M_{n-1}^{\tau}.$$
Can someone help me to continue and complete this proof?
 A: The hint is to prove the identity $M_{n}^{\tau}=M_{n-1}^{\tau}+1_{\tau \geqslant n}(M_{n}-M_{n-1})$ (check this when $\tau\geqslant n$ and when $\tau\leqslant n-1$), not that $M_{n}^{\tau}=M_{n-1}^{\tau}+1_{\tau \leqslant n}(M_{n}-M_{n-1})$. 
Then, following your path, one is left with showing that $E(1_{\tau \geqslant n}(M_{n}-M_{n-1})|\mathcal F_{n-1})=0$. But this is clear because $1_{\tau \geqslant n}=1-1_{\tau \leqslant n-1}$ and $M_{n-1}$ are $\mathcal F_{n-1}$-measurable while $E(M_{n}|\mathcal F_{n-1})=M_{n-1}$.
A: A bit late to the party, but for completeness's sake, in order to show that $M^{\tau}_n = M^{\tau}_{n-1} + 1_{\tau \geq n} (M_n - M_{n-1})$, just note that, for any $k$,
$$ M^{\tau}_k = \sum_{j=0}^{k-1} M_j 1_{\tau = j} + M_k 1_{\tau \geq k}. $$
Thus,
$$ M^{\tau}_n = \sum_{j=0}^{n-1} M_j 1_{\tau = j} + M_n 1_{\tau \geq n} = \sum_{j=0}^{n-1} M_j 1_{\tau = j} + M_n 1_{\tau \geq n} + M_{n-1} 1_{\tau \geq n} - M_{n-1} 1_{\tau \geq n}$$
and since $M_{n-1} 1_{\tau \geq n} + M_{n-1} 1_{\tau = n-1} = M_{n-1} 1_{\tau \geq n-1}$ we get
$$  M^{\tau}_n = \sum_{j=0}^{n-2} M_j 1_{\tau = j} + M_{n-1} 1_{\tau \geq n-1} + (M_n - M_{n-1}) 1_{\tau \geq n} = M^{\tau}_{n-1} + 1_{\tau \geq n} (M_n - M_{n-1}). $$
