Solution (source code)

= Solution

Write $\delta_n=2^{-n}$ and let $Q_n(U)$ denote the printed squared-increment sum for a process $U$, on grid times $k\delta_n$. We construct its limit first for bounded <martingales>, then use <localizing sequences> and the <finite variation> part of a <semimartingale>.

\b[Continuity and monotonicity of the bounded-<martingale> limit.] Let $U$ be a uniformly bounded <continuous martingale>. The given result supplies a limit $R^U$ in <uniform convergence on compacts in probability>. Each $Q_n(U)$ is continuous and adapted. A subsequence converges almost surely uniformly on each compact time interval, by choosing summable error probabilities and diagonalizing. Its limit therefore has a continuous version; in the usual completed filtration this version is adapted.

The sums $Q_n(U)$ themselves can decrease between grid points, because the last partial increment is being squared. To establish monotonicity, use instead the <quadratic variation from completed grid increments>
$$
S_n(U)_t=\sum_{k\delta_n\leq t}
(U_{k\delta_n}-U_{(k-1)\delta_n})^2.
$$
These step processes are nondecreasing, and pathwise uniform continuity gives
$$
\sup_{t\leq T}|Q_n(U)_t-S_n(U)_t|
\leq\omega_U(\delta_n;T)^2\longrightarrow0,
$$
where $\omega_U(\delta;T)=\sup\{|U_t-U_s|:s,t\leq T,\ |t-s|\leq\delta\}$. Thus the same almost surely uniform subsequence of $S_n$ converges to $R^U$, proving that $R^U$ is nondecreasing. Also $R^U_0=0$.

\b[Localization of a <continuous local martingale>.] Subtract the initial value, which does not affect increments, so that $M_0=0$. Set
$$
\tau_m=\inf\{t:|M_t|\geq m\}\wedge m.
$$
Continuity gives $\tau_m\uparrow\infty$ almost surely and makes $M^{\tau_m}$ bounded. The <bounded local martingale criterion> makes it a true <martingale>. Let $R^m$ be its continuous, adapted, nondecreasing limit.

The discrete sums commute exactly with stopping:
$$
Q_n(M^{\tau_m})_t=Q_n(M)_{t\wedge\tau_m}.
$$
For $\ell\leq m$, uniqueness of the probability limit and stability of <uniform convergence on compacts in probability> under stopping give
$$
R^m_{t\wedge\tau_\ell}=R^\ell_t
$$
up to indistinguishability. Taking a common null set for the countably many pairs, patch these processes into $R^M$ by setting $R^M_t=R^m_t$ when $t\leq\tau_m$. Compatibility makes this definition independent of $m$. It is continuous, adapted, and nondecreasing. For each $T,\varepsilon>0$,
$$
\mathbb P\left(\sup_{t\leq T}|Q_n(M)_t-R^M_t|>\varepsilon\right)
\leq\mathbb P(\tau_m<T)
+\mathbb P\left(\sup_{t\leq T}|Q_n(M^{\tau_m})_t-R^m_t|>\varepsilon\right).
$$
Let $n\to\infty$ and then $m\to\infty$. This proves the <localization and patching of quadratic variation>.

\b[Adding <finite variation>.] Decompose the continuous <semimartingale> as $X=X_0+M+A$, where $M$ is a <continuous local martingale> starting at zero and $A$ is continuous, adapted, and locally of <finite variation>. For every compact interval, the sum of the absolute increments of $A$ is at most its <total variation of a function>. Hence, pathwise,
$$
\sup_{t\leq T}Q_n(A)_t
\leq\omega_A(\delta_n;T)\operatorname{Var}_{[0,T]}(A)
\longrightarrow0.
$$
The <Cauchy-Schwarz inequality> bounds the mixed increment sum by
$$
\sup_{t\leq T}\left|\sum_k\Delta_kM(t)\Delta_kA(t)\right|
\leq
\left(\sup_{t\leq T}Q_n(M)_t\right)^{1/2}
\left(\sup_{t\leq T}Q_n(A)_t\right)^{1/2}.
$$
The first factor is bounded in probability, since $Q_n(M)\to R^M$ uniformly on compacts in probability; the second tends to zero almost surely. Thus the mixed term tends to zero in probability. Expanding the square proves
$$
\boxed{Q_n(X)\longrightarrow R^M
\quad\text{uniformly on compacts in probability}.}
$$
The constructed $R=R^M$ is continuous, nondecreasing, and adapted. This is the <quadratic variation> of $X$, and expresses the fact that <finite-variation terms do not change quadratic variation>.