Let $X_n, n \geq 1$ be a $(\mathcal{F}_n)$-martingale on $(\Omega, \mathcal{A},P)$. Suppose that $X_n \rightarrow X_{\infty}$ in $L^p$ for some $p > 1$ and that there is some $X \in L^p$ such that $X_n= E[X \mid \mathcal{F}_n]$ for all $n \geq 0$.
We can show that for $A \in \mathcal{F}_n$
$$E[X_{\infty} 1_A] = E[X_n 1_A] = E[E[X \mid \mathcal{F}_n] 1_A]=E[X1_A].$$
So we have $E[X_{\infty} 1_A] = E[X1_A]$ for all $A \in \bigcup_n \mathcal{F}_n$ ( a $\pi$-system).
Now the conclusion in the lecture notes is that by Dynkin's Lemma we have that $X_{\infty}= E[X \mid \mathcal{F}_{\infty}]$, where $\mathcal{F}_{\infty} = \sigma(\bigcup_n \mathcal{F}_n)$.
First of all I wonder what the corresponding Dynkin system is that we are considering. The set of all subsets of $\mathcal{A}$ such that the expectations from above agree? Or that the conditional expectation agree?
I do not get why $X_{\infty}$ is integrable and $\mathcal{F}_n$-measurable (probably it is not), so I do not see how to conclude here.
So could you give me a hint of which Dynkin system to consider?
You are correct in taking the Dynkin $\lambda$-system here to be those $A\in\mathcal A$ such that $E[X_\infty 1_A] =E[X 1_A]$. Notice that $X_\infty\in L^p$ (by Fatou); in particular $X_\infty$ is integrable.
$X_\infty$ need not be $\mathcal F_n$ measurable. Rather, if $m>n$ then $E[X_m|\mathcal F_n]=X_n$, so $E[X_m 1_A]=E[X_n 1_A]$ for all $A\in\mathcal F_n$. Now let $m\to\infty$ (using the $L^p$ convergence to justify the exchange of limit and expectation): $$ E[X_\infty 1_A]=E[\lim_m X_m 1_A]=\lim_mE[X_m 1_A]=E[X_n 1_A], $$ for all $A\in\mathcal F_n$.