The exercise is from Yuh-Dauh Lyuu's Financial Engineering and Computation: Principles, Mathematics, Algorithms:
Exercise 13.2.1. Let $\bigr\{ X(t), t\geq 0\bigl\}$ be a stochastic process with independent increments. Show that $\bigr\{X(t), t\geq 0\bigl\}$ is a martingale if $\mathrm{E}\bigl[X(t)- X(s)\bigr] = 0$ for any $s, t \geq 0$ and $\mathrm{Prob}[X(0)=0] = 1$.
Official solution to 13.1.4: In fact, \begin{align}\mathrm{E}&\bigl[X(t_n) | X(t_{n-1}), X(t_{n-2}), \dots, X(t_1)\bigr]\\&= \mathrm{E}\bigl[X(t_n) -X(t_{n-1})|X(t_{n-1}), X(t_{n-2}), \dots, X(t_1)\bigr] + X(t_{n-1})\\& = X(t_{n-1})\end{align} where the last equality is true because \begin{align} \mathrm{E}&\bigl[X(t_n) - X(t_{n-1})| X(t_{n-1}, X(t_{n-1}), \dots, X(t_1)\bigr]\\ &= \mathrm{E}\bigl[X(t_n) - X(t_{n-1}) | X(t_{n-1}) - X(t_{n-2}), \dots, X(t_2) - X(t_1), X(t_1) - X(0)\bigr]\\ &= \mathrm{E}\bigl[X(t_n) - X(t_{n-1}) ] = 0\,. \end{align}
Now, the definition of a martingale is a stochastic process $\bigr\{X(t), t\geq 0\bigl\}$ with $\mathrm{E}\bigl[|X(t)|\bigr] < \infty$ and $$\mathrm{E}\bigl[X(t) | X(u), 0 \leq u \leq s\bigr] = X(s)\,.$$
I wonder if strictly speaking, we really proved the martingale property if we just proved it for any finite subset of $[0, s]$? Because this is something the official solution seems to presuppose.
It proves the assertion just for arbitrary $\{t_1, \dots, t_{n-1}\}$ and not for the whole $[0, t_{n-1}]$.
The equation $E(X(t)|X(u),0 \leq u \leq s)=X(s)$ is equivalent to the property $EX(t)I_A=EX(s)I_A$ for every $A \in \sigma \{X(u),0 \leq u \leq s\}$.
Now the property proved in the official solution shows that this holds for all $A \in \bigcup \sigma\{X(t_1),x(t_2),...,X(t_n)\}$ where the union is over all finite collections $t_1,t_2,...,t_n$. This union is an algebra which generates $\sigma \{X(u),0 \leq u \leq s\}$. The proof is now finished using a direct application of Dynkin's $\pi -\lambda$ Theorem.