I know the proof of one kind Optional Sampling Theorem: Let $X=\left\{ X_{n}\right\} _{n\in\mathbb{N}}$ be a $\left\{ \mathscr{F}_{n}\right\} _{n\in\mathbb{N}}$-submartingale with a last element $X_{\infty}$,(i.e. $X_{n}\rightarrow X_{\infty}$ a.e. and $\left\{ X_{n}:n=1,2,\cdots,\infty\right\}$ is $\left\{ \mathscr{F}_{n}:n=1,2,\cdots,\infty\right\}$ -submartingale). Then, for any stopping time $S,T$ with $S\le T$ (not necessarily finite) , we have $E\left(X_{T}|\mathscr{F}_{S}\right)\geq X_{S}$ a.e.
What if I replace the condition of "existence of a last element" with "there exists an integrable random variable $Y$, such that $X_{n}\le E\left(Y|\mathscr{F}_{n}\right)$ a.s., for every $n\in\mathbb{N}$"?
I think the Optional Sampling Theorem still holds but I do not know how to prove it. Can anyone give me a hint or show me the book where I can find the proof of this statement? Many thanks in advance.
In fact, this problem is closely related to problem 1.3.23 in Karatzas and Steven E. Shreve, Brownian Motion and Stochastic Calculus. This is Theorem 1.3.22:
and this is problem 1.3.23:
I think the question I ask is a crucial part of the solution.
Suppose that $(X_n,\mathcal{F}_n)_{n \in \mathbb{N}_0}$ is a submartingale such that there exists $Y \in L^1$ with $$\forall n \in \mathbb{N}_0\::\: X_n \leq \mathbb{E}(Y \mid \mathcal{F}_n). \tag{1}$$
Fix $R>0$. Because of $(1)$, we have $$\int_{\{X_n \geq R\}} X_n \, d\mathbb{P} \leq \int_{\{X_n \geq R\}} Y \, d\mathbb{P} = \int_{\{X_n \geq R, |Y| \geq K\}} Y \, d\mathbb{P} + \int_{\{X_n \geq R, |Y| \leq K\}} Y \, d\mathbb{P}.$$ Hence,$$\int_{\{X_n \geq R\}} X_n \, d\mathbb{P} \leq \int_{\{|Y| \geq K\}} |Y| \, d\mathbb{P} + K \mathbb{P}(X_n \geq R).$$ By Markov's inequality and $(1)$,
$$\mathbb{P}(X_n \geq R) \leq \mathbb{P}(\mathbb{E}(Y \mid \mathcal{F}_n) \geq R) \leq \frac{1}{R} \mathbb{E}(|\mathbb{E}(Y \mid \mathcal{F}_n)|) \leq \frac{\mathbb{E}(|Y|)}{R},$$ and so
$$\int_{\{X_n \geq R\}} X_n \, d\mathbb{P} \leq \int_{\{|Y| \geq K\}} |Y| \, d\mathbb{P} + \frac{K}{R} \mathbb{E}(|Y|).$$ Taking the supremum over $n$ and letting first $R \to \infty$ and then $K \to \infty$, we get $$\lim_{R \to \infty} \sup_{n \in \mathbb{N}} \int_{\{X_n \geq R\}} X_n \, d\mathbb{P}=0. \tag{2}$$
Since $(X_n^+)_{n \in \mathbb{N}_0}$ is uniformly integrable, it follows from the submartingale property that $(X_n)_{n \in \mathbb{N}}$ is bounded in $L^1$. In particular, there exists $X_{\infty} \in L^1$ such that $X_n \to X_{\infty}$ almost surely. On the other hand, the uniform integrability of the submartingale $(X_n^+)_{n \in \mathbb{N}}$ yields, by the (sub)martingale convergence theorem, that $X_n^+ \to X_{\infty}^+$ in $L^1$ and almost surely. For fixed $m \leq n$ we have
$$X_m \leq \mathbb{E}(X_n \mid \mathcal{F}_m) = \mathbb{E}(X_n^+ \mid \mathcal{F}_m) - \mathbb{E}(X_n^- \mid \mathcal{F}_m),$$
and therefore it follows from the previous considerations and Fatou's lemma that
$$X_m \leq \underbrace{\lim_{n \to \infty} \mathbb{E}(X_n^+ \mid \mathcal{F}_m)}_{=\mathbb{E}(X_{\infty}^+ \mid \mathcal{F}_m)} - \underbrace{\liminf_{n \to \infty} \mathbb{E}(X_n^- \mid \mathcal{F}_m)}_{\geq \mathbb{E}(X_{\infty}^- \mid \mathcal{F}_m)} = \mathbb{E}(X_{\infty} \mid \mathcal{F}_m).$$ This shows that $(X_n,\mathcal{F}_n)_{n \in \mathbb{N}_0 \cup \{\infty\}}$ is a submartingale. Now you can apply the known optional stopping theorem (which you stated in your question) ...