Understanding proof of discrete optimal sampling theorem Let $X = \{X_n\}_{n=0}^{\infty}$ be a closable submartingale. Then, for any
stopping time $τ, X_τ$ is integrable and, for another stopping time $σ$,
$E[X_\tau |\mathcal{F}_\sigma ]\ge X_{\sigma\wedge \tau}$ , P-a.s.
The proof start by showing $E\left[X_{\infty}|\mathcal{F}_{\sigma}\right]\ge X_{\sigma}$ where $X_{\infty}$ is the closing element, and then says it suffices to show that the stopped process $X^{\tau}=\{X_{n\wedge\tau}\}_{n=0}^{\infty}$ is closable. But how does this help us to conclude?
 A: After you've shown $X^\tau$ is closable, applying the fact that $E[X_{\infty}|\mathcal F_{\sigma}] \ge X_{\sigma}$ for any closed submartingale $X$ to $X^\tau$ we have
\begin{align*}
E[X_{\tau}|\mathcal F_{\sigma}] &= E[X_{\infty}^{\tau}|\mathcal F_{\sigma}] \\
&\ge X_{\sigma}^\tau \\
&= X_{\sigma \wedge \tau}.
\end{align*}
To show $X_\tau = X_\infty^\tau$, note that on the event $\{\tau < \infty \}$, we have $$X_{\infty}^\tau = \lim_{n \rightarrow \infty} X_n^\tau = \lim_{n \rightarrow \infty} X_{n \wedge \tau} = X_\tau$$ because $n \wedge \tau = \tau$ for all $n$ sufficiently large (how large is "sufficiently large" depends on $\omega$, but we're sending $n \rightarrow \infty$ so that doesn't matter here).  On the event $\{\tau = \infty\}$, $X_\tau = X_\infty$ by definition, and $$X_{\infty}^\tau = \lim_{n \rightarrow \infty} X_n^\tau = \lim_{n \rightarrow \infty} X_{n \wedge \tau} = \lim_{n \rightarrow \infty} X_{n} = X_\infty = X_\tau.$$
Lemma: Let $X_n$ be a closable submartingale with closing element $Z$, i.e. $X_n \le \mathbb{E}[Z|\mathcal F_n]$ for all $n$.  Then there exists an integrable $X_\infty$ with $(X_n) \rightarrow X_\infty$ a.s. and $X_n \le \mathbb{E}[X_\infty|\mathcal F_n]$.
Proof: By monotonicity of $x \mapsto x^+$ and the conditional Jensen inequality, we have $(X_n)^+ \le (\mathbb{E}[Z|\mathcal F_n])^+ \le \mathbb{E}[Z^+|\mathcal F_n]$ so $$\sup_n \mathbb{E}[(X_n)^+] \le \sup_n \mathbb{E}[\mathbb{E}[Z^+|\mathcal F_n]] = \mathbb{E}[Z^+] < \infty.$$
Therefore by Doob's submartingale convergence theorem, there exists an integrable random variable $X_\infty$ with $(X_n) \rightarrow X_\infty$ a.s.
Now to show $X_m \le \mathbb{E}[X_\infty|\mathcal F_m]$, first note that $0 \le \mathbb{E}[Z|\mathcal F_n] - X_n$, so by the conditional Fatou lemma we have
\begin{align*}
\mathbb{E}\left[\left.\liminf_{n \rightarrow \infty}(\mathbb{E}[Z|\mathcal F_n] - X_n)\right| \mathcal F_m\right] &\le \liminf_{n \rightarrow \infty} \mathbb{E}[\mathbb{E}[Z|\mathcal F_n]-X_n|\mathcal F_m] \\
&= \liminf_{n \rightarrow \infty} \mathbb{E}[Z|\mathcal F_m] - \liminf_{n \rightarrow \infty} \mathbb{E}[X_n | \mathcal F_m].
\end{align*}
There is a theorem saying that since $Z$ is $\mathcal F_{\infty}$ measurable, $\lim_{n \rightarrow \infty}\mathbb{E}[Z|\mathcal F_n] = Z$ (see Williams Probability with martingales).  Since $(X_n) \rightarrow X_\infty$, the left side of the inequality is therefore $\mathbb{E}[Z-X_\infty|\mathcal F_m]$.  Rewriting, we've shown
\begin{align*}
\liminf_{n \rightarrow \infty} \mathbb{E}[X_n | \mathcal F_m] &\le \mathbb{E}[X_\infty|\mathcal F_m].
\end{align*}
Since $X_m \le \mathbb{E}[X_n|\mathcal F_m]$ for all $n \ge m$, we therefore conclude $X_m \le \liminf_{n \rightarrow \infty} \mathbb{E}[X_n | \mathcal F_m] \le \mathbb{E}[X_\infty|\mathcal F_m]$ as desired.
