[proofplan]
We construct $\widetilde{X}$ as the right [limit](/page/Limit) along rationals. First, [Doob's Upcrossing Inequality](/theorems/1156) and [Doob's Maximal Inequality](/theorems/1158) guarantee that on a full-measure [set](/page/Set) $\Omega_0$, the sample paths $t \mapsto X_t(\omega)$ restricted to $\mathbb{Q}_+$ have finite upcrossings and are bounded on compact intervals, so the right limits $\widetilde{X}_t := \lim_{s \downarrow t, s \in \mathbb{Q}_+} X_s$ exist everywhere on $\Omega_0$. Second, the [Backwards Martingale Convergence Theorem](/theorems/1165) identifies $\widetilde{X}_t$ as the $L^1$ limit of $X_{t_n}$ along rationals $t_n \downarrow t$, which via the [Tower Property](/theorems/1150) gives $X_t = \mathbb{E}[\widetilde{X}_t \mid \mathcal{F}_t]$. Third, the martingale and cadlag properties of $\widetilde{X}$ follow from backwards convergence applied at each time.
[/proofplan]
[step:Construct a full-measure set $\Omega_0$ on which rational-time paths have finite oscillation]
For each $M \in \mathbb{N}$, let $I_M := \mathbb{Q}_+ \cap [0, M]$. We apply [Doob's Maximal Inequality](/theorems/1158) to the submartingale $(|X_t|)_{t \in J}$ for each finite subset $J \subset I_M$: for $p = 1$,
\begin{align*}
\mathbb{P}\!\left(\max_{t \in J} |X_t| \geq \lambda\right) \leq \frac{\mathbb{E}[|X_{\max J}|]}{\lambda} \leq \frac{\sup_{t \in I_M} \mathbb{E}[|X_t|]}{\lambda}.
\end{align*}
Taking the supremum over all finite $J \subset I_M$ and applying the [Monotone Convergence Theorem](/theorems/509) to the increasing limit, $\sup_{t \in I_M} |X_t| < \infty$ a.s.
We apply [Doob's Upcrossing Inequality](/theorems/1156) to the martingale $(X_t)_{t \in J}$ for each finite $J \subset I_M$: for all rationals $a < b$,
\begin{align*}
\mathbb{E}[N([a,b], J, X)] \leq \frac{\mathbb{E}[(X_{\max J} - a)^-]}{b - a} \leq \frac{\sup_{t \in I_M} \mathbb{E}[|X_t|] + |a|}{b - a} < \infty.
\end{align*}
Again by monotone convergence as $J \nearrow I_M$, $\mathbb{E}[N([a,b], I_M, X)] < \infty$, so $N([a,b], I_M, X) < \infty$ a.s.
Define
\begin{align*}
\Omega_0 := \bigcap_{M \in \mathbb{N}} \bigcap_{a < b, \, a,b \in \mathbb{Q}} \left\{N([a,b], I_M, X) < \infty\right\} \cap \left\{\sup_{t \in I_M} |X_t| < \infty\right\}.
\end{align*}
This is a countable intersection of full-measure events, so $\mathbb{P}(\Omega_0) = 1$.
[guided]
The goal of this step is to find a single event $\Omega_0$ of full probability on which the sample paths $t \mapsto X_t(\omega)$, restricted to rational times, are well-behaved enough to have right limits everywhere.
Two pathologies must be excluded: (i) the path could be unbounded on a compact rational-time interval, and (ii) the path could oscillate infinitely often between two values. We rule out each using a different Doob inequality.
**Bounding the supremum.** For any finite subset $J \subset I_M$, the process $(|X_t|)_{t \in J}$ is a submartingale (by [Jensen's inequality](/theorems/9) applied to the convex [function](/page/Function) $|\cdot|$). [Doob's Maximal Inequality](/theorems/1158) gives $\mathbb{P}(\max_{t \in J} |X_t| \geq \lambda) \leq \mathbb{E}[|X_{\max J}|] / \lambda$. The right-hand side is bounded uniformly in $J$ by $\sup_{t \in I_M} \mathbb{E}[|X_t|] / \lambda$, which is finite since the $L^1$ norms of a martingale are uniformly bounded on compact time intervals (by the martingale property and Jensen). Taking $J \nearrow I_M$ through an increasing [sequence](/page/Sequence) of finite sets and applying the [Monotone Convergence Theorem](/theorems/509) yields $\sup_{t \in I_M} |X_t| < \infty$ a.s.
**Bounding upcrossings.** For the same finite $J$, [Doob's Upcrossing Inequality](/theorems/1156) bounds the expected number of upcrossings of any interval $[a,b]$. The bound is uniform in $J$, so monotone convergence gives $N([a,b], I_M, X) < \infty$ a.s.
The set $\Omega_0$ is then the intersection over all $M \in \mathbb{N}$ and all rational pairs $a < b$ of the events $\{N([a,b], I_M, X) < \infty\} \cap \{\sup_{t \in I_M} |X_t| < \infty\}$. This is a countable intersection (since $\mathbb{N} \times \mathbb{Q}^2$ is countable), and each event has full probability, so $\mathbb{P}(\Omega_0) = 1$.
[/guided]
[/step]
[step:Define $\widetilde{X}_t$ as the right limit along rationals and verify existence on $\Omega_0$]
On $\Omega_0$, for each $\omega$ and each $M \in \mathbb{N}$, the function $s \mapsto X_s(\omega)$ restricted to $I_M = \mathbb{Q}_+ \cap [0,M]$ is bounded and has finitely many upcrossings of every rational interval $[a,b]$. By the [Convergence Criterion via Upcrossings](/theorems/1155), such a function has well-defined right and left limits at every point of $[0, M]$.
Define
\begin{align*}
\widetilde{X}_t(\omega) := \begin{cases} \lim_{s \downarrow t, \, s \in \mathbb{Q}_+} X_s(\omega) & \text{if } \omega \in \Omega_0, \\ 0 & \text{if } \omega \notin \Omega_0. \end{cases}
\end{align*}
The limit exists for all $t \geq 0$ and all $\omega \in \Omega_0$ by the preceding analysis.
[guided]
Why does the right limit exist? On $\Omega_0$, for fixed $\omega$ and $t \geq 0$, choose $M > t$. The path $s \mapsto X_s(\omega)$ restricted to $I_M$ is bounded (since $\sup_{s \in I_M} |X_s(\omega)| < \infty$) and has $N([a,b], I_M, X)(\omega) < \infty$ for every rational interval $[a,b]$.
The [Convergence Criterion via Upcrossings](/theorems/1155) states: a bounded function on a [dense subset](/page/Dense%20Subset) of $\mathbb{R}$ with finitely many upcrossings of every interval $[a,b]$ has well-defined one-sided limits at every point. We apply this to the restriction of $s \mapsto X_s(\omega)$ to $\mathbb{Q}_+ \cap [0,M]$, which is dense in $[0,M]$, to conclude that the right limit $\lim_{s \downarrow t, s \in \mathbb{Q}_+} X_s(\omega)$ exists for every $t \in [0, M)$. Since $M$ was arbitrary, the limit exists for all $t \geq 0$.
On the null set $\Omega \setminus \Omega_0$, we set $\widetilde{X}_t = 0$ to obtain a well-defined process on all of $\Omega$.
[/guided]
[/step]
[step:Show $X_t = \mathbb{E}[\widetilde{X}_t \mid \mathcal{F}_t]$ a.s. via backwards martingale convergence]
Fix $t \geq 0$ and choose rationals $t_n \downarrow t$ with $t_1 > t_2 > \cdots > t$ and $t_n \to t$. The sequence $(X_{t_n}, \mathcal{F}_{t_n})_{n \geq 1}$ is a backwards martingale: for $m > n$, $t_m < t_n$, and the martingale property gives $\mathbb{E}[X_{t_n} \mid \mathcal{F}_{t_m}] = X_{t_m}$.
By the [Backwards Martingale Convergence Theorem](/theorems/1165), $X_{t_n} \to \widetilde{X}_t$ a.s. (by definition of $\widetilde{X}_t$) and $X_{t_n} \to \mathbb{E}[X_{t_1} \mid \mathcal{F}_{t+}]$ in $L^1$, where $\mathcal{F}_{t+} := \bigcap_{n \geq 1} \mathcal{F}_{t_n}$. In particular, $X_{t_n} \to \widetilde{X}_t$ in $L^1$.
By the [Tower Property](/theorems/1150), for each $n$,
\begin{align*}
\mathbb{E}[X_{t_n} \mid \mathcal{F}_t] = X_t \quad \text{a.s.}
\end{align*}
Since $X_{t_n} \to \widetilde{X}_t$ in $L^1$ and conditional expectation is a contraction on $L^1$,
\begin{align*}
\mathbb{E}[\widetilde{X}_t \mid \mathcal{F}_t] = \lim_{n \to \infty} \mathbb{E}[X_{t_n} \mid \mathcal{F}_t] = X_t \quad \text{a.s.}
\end{align*}
[guided]
The key idea is to view the sequence $(X_{t_n})$ as a backwards martingale and apply the [Backwards Martingale Convergence Theorem](/theorems/1165).
Why is $(X_{t_n}, \mathcal{F}_{t_n})$ a backwards martingale? The indices decrease: $t_1 > t_2 > \cdots$. For $m > n$ (so $t_m < t_n$), the original forward martingale property gives $\mathbb{E}[X_{t_n} \mid \mathcal{F}_{t_m}] = X_{t_m}$, which is precisely the backwards martingale condition.
The [Backwards Martingale Convergence Theorem](/theorems/1165) guarantees that $X_{t_n}$ converges a.s. and in $L^1$ to $\mathbb{E}[X_{t_1} \mid \mathcal{F}_{t+}]$, where $\mathcal{F}_{t+} = \bigcap_n \mathcal{F}_{t_n}$. By definition of $\widetilde{X}_t$, the a.s. limit is $\widetilde{X}_t$ (on $\Omega_0$). The $L^1$ convergence is essential for the next step.
To connect $\widetilde{X}_t$ back to $X_t$: for each $n$, the original martingale property and $t < t_n$ give $\mathbb{E}[X_{t_n} \mid \mathcal{F}_t] = X_t$ by the [Tower Property](/theorems/1150). Taking the $L^1$ limit (conditional expectation onto $\mathcal{F}_t$ is an $L^1$-contraction, so the limit passes through):
\begin{align*}
X_t = \lim_{n \to \infty} \mathbb{E}[X_{t_n} \mid \mathcal{F}_t] = \mathbb{E}\!\left[\lim_{n \to \infty} X_{t_n} \;\middle|\; \mathcal{F}_t\right] = \mathbb{E}[\widetilde{X}_t \mid \mathcal{F}_t] \quad \text{a.s.}
\end{align*}
[/guided]
[/step]
[step:Verify that $\widetilde{X}$ is a martingale with respect to the augmented filtration]
For $s < t$, choose rationals $s_n \downarrow s$ with $s_n < t$ for all $n$. By the martingale property of $X$,
\begin{align*}
\mathbb{E}[X_t \mid \mathcal{F}_{s_n}] = X_{s_n} \quad \text{a.s.}
\end{align*}
As $n \to \infty$: the left-hand side converges to $\mathbb{E}[X_t \mid \mathcal{F}_{s+}]$ a.s. by the [Backwards Martingale Convergence Theorem](/theorems/1165) applied to the backwards martingale $(\mathbb{E}[X_t \mid \mathcal{F}_{s_n}])_n$; the right-hand side converges to $\widetilde{X}_s$ a.s. by definition of $\widetilde{X}$. Therefore
\begin{align*}
\widetilde{X}_s = \mathbb{E}[X_t \mid \mathcal{F}_{s+}] \quad \text{a.s.}
\end{align*}
The augmented filtration $\widetilde{\mathcal{F}}_s$ is generated by $\mathcal{F}_{s+}$ and the $\mathbb{P}$-null sets. Since null sets do not affect conditional expectations, $\mathbb{E}[X_t \mid \widetilde{\mathcal{F}}_s] = \mathbb{E}[X_t \mid \mathcal{F}_{s+}] = \widetilde{X}_s$ a.s. Using $X_t = \mathbb{E}[\widetilde{X}_t \mid \mathcal{F}_t]$ from the previous step and the tower property,
\begin{align*}
\mathbb{E}[\widetilde{X}_t \mid \widetilde{\mathcal{F}}_s] = \widetilde{X}_s \quad \text{a.s.},
\end{align*}
confirming the martingale property.
[/step]
[step:Verify that $\widetilde{X}$ has cadlag paths on $\Omega_0$]
**Right-[continuity](/page/Continuity).** Suppose for contradiction that $\widetilde{X}$ is not right-continuous at some $t_0$ for some $\omega \in \Omega_0$: there exist $\varepsilon > 0$ and a sequence $u_n \downarrow t_0$ with $|\widetilde{X}_{u_n}(\omega) - \widetilde{X}_{t_0}(\omega)| > \varepsilon$ for all $n$. By definition of $\widetilde{X}$, for each $n$ there exists a rational $r_n > u_n$ with $|X_{r_n}(\omega) - \widetilde{X}_{u_n}(\omega)| < \varepsilon/3$, and we may choose $r_n \downarrow t_0$. Then
\begin{align*}
|X_{r_n}(\omega) - \widetilde{X}_{t_0}(\omega)| \geq |\widetilde{X}_{u_n}(\omega) - \widetilde{X}_{t_0}(\omega)| - |X_{r_n}(\omega) - \widetilde{X}_{u_n}(\omega)| > \varepsilon - \varepsilon/3 = 2\varepsilon/3.
\end{align*}
But $r_n \in \mathbb{Q}_+$ with $r_n \downarrow t_0$, so $X_{r_n}(\omega) \to \widetilde{X}_{t_0}(\omega)$ by definition. This contradicts $|X_{r_n}(\omega) - \widetilde{X}_{t_0}(\omega)| > 2\varepsilon/3$.
**Left limits.** On $\Omega_0$, the function $s \mapsto X_s(\omega)$ restricted to $\mathbb{Q}_+$ has left limits everywhere (from the upcrossing bound). By the same argument used for right limits, $\widetilde{X}_{t^-}(\omega) := \lim_{s \uparrow t} \widetilde{X}_s(\omega)$ exists for all $t > 0$.
[guided]
Right-continuity of $\widetilde{X}$ is a consequence of $\widetilde{X}$ being defined as a right limit along rationals, but the argument requires care because the right limit along rationals of $X$ does not automatically make $\widetilde{X}$ right-continuous — we are taking the right limit of $\widetilde{X}$ itself, not of $X$.
The key observation is: $\widetilde{X}_{u_n}$ is defined as $\lim_{s \downarrow u_n, s \in \mathbb{Q}_+} X_s(\omega)$. So for any $\delta > 0$, there exists a rational $r$ with $u_n < r < u_n + \delta$ and $|X_r(\omega) - \widetilde{X}_{u_n}(\omega)| < \delta$. By choosing $\delta$ small relative to $\varepsilon$, we can find rationals $r_n$ close to each $u_n$ (and hence converging to $t_0$ from above) that track $\widetilde{X}_{u_n}(\omega)$ closely. But $X_{r_n}(\omega) \to \widetilde{X}_{t_0}(\omega)$ by definition of $\widetilde{X}_{t_0}$, producing the contradiction.
For left limits, the same upcrossing bound that guarantees right limits along $\mathbb{Q}_+$ also guarantees left limits. The process $\widetilde{X}$ inherits this: if $s_n \uparrow t$ and each $\widetilde{X}_{s_n}$ is a right limit along rationals, the double-limit argument (choosing rationals between consecutive $s_n$) shows that $\widetilde{X}_{s_n}$ converges.
[/guided]
[/step]
[step:Under the usual conditions, $\widetilde{X}_t = X_t$ a.s. for all $t$]
If $(\mathcal{F}_t)$ satisfies the usual conditions (right-continuity: $\mathcal{F}_t = \mathcal{F}_{t+}$, and completeness: every $\mathbb{P}$-null set is in $\mathcal{F}_0$), then from the identity $X_t = \mathbb{E}[\widetilde{X}_t \mid \mathcal{F}_t]$ and the fact that $\widetilde{X}_t$ is $\mathcal{F}_{t+}$-measurable (it is a limit of $\mathcal{F}_{s}$-measurable random variables for $s > t$), right-continuity of the filtration gives $\widetilde{X}_t$ is $\mathcal{F}_t$-measurable. Therefore $\mathbb{E}[\widetilde{X}_t \mid \mathcal{F}_t] = \widetilde{X}_t$ a.s., and so $X_t = \widetilde{X}_t$ a.s.
[/step]