[proofplan]
We expand $X_t Y_t - X_0 Y_0$ as a telescoping sum over a dyadic partition, decompose each increment via the algebraic identity $ab - cd = c(b - d) + d(a - c) + (a - c)(b - d)$, and pass to the limit as the mesh tends to zero. The first two sums converge in probability to the stochastic integrals $\int_0^t X_s \, dY_s$ and $\int_0^t Y_s \, dX_s$ by the Riemann sum approximation theorem for semimartingales, and the cross-product sum converges to the quadratic covariation $\langle X, Y \rangle_t$ by the definition of covariation as the limit of discrete covariations. The identity first holds along dyadic times and extends to all $t \geq 0$ by continuity.
[/proofplan]
[step:Write the telescoping decomposition along a partition]
Fix $t > 0$. For each $m \geq 1$, consider the dyadic partition $t^{(m)}_i = \frac{i}{2^m} t$ for $i = 0, 1, \ldots, 2^m$. The product telescopes as
\begin{align*}
X_t Y_t - X_0 Y_0 = \sum_{i=1}^{2^m} \bigl(X_{t^{(m)}_i} Y_{t^{(m)}_i} - X_{t^{(m)}_{i-1}} Y_{t^{(m)}_{i-1}}\bigr).
\end{align*}
Apply the algebraic identity $ab - cd = c(b - d) + d(a - c) + (a - c)(b - d)$ with $a = X_{t^{(m)}_i}$, $b = Y_{t^{(m)}_i}$, $c = X_{t^{(m)}_{i-1}}$, $d = Y_{t^{(m)}_{i-1}}$ to decompose each summand:
\begin{align*}
X_{t^{(m)}_i} Y_{t^{(m)}_i} - X_{t^{(m)}_{i-1}} Y_{t^{(m)}_{i-1}} &= X_{t^{(m)}_{i-1}} \bigl(Y_{t^{(m)}_i} - Y_{t^{(m)}_{i-1}}\bigr) + Y_{t^{(m)}_{i-1}} \bigl(X_{t^{(m)}_i} - X_{t^{(m)}_{i-1}}\bigr) \\
&\quad + \bigl(X_{t^{(m)}_i} - X_{t^{(m)}_{i-1}}\bigr)\bigl(Y_{t^{(m)}_i} - Y_{t^{(m)}_{i-1}}\bigr).
\end{align*}
Summing over $i = 1, \ldots, 2^m$ gives
\begin{align*}
X_t Y_t - X_0 Y_0 = S^{(m)}_1 + S^{(m)}_2 + S^{(m)}_3,
\end{align*}
where
\begin{align*}
S^{(m)}_1 &= \sum_{i=1}^{2^m} X_{t^{(m)}_{i-1}} \bigl(Y_{t^{(m)}_i} - Y_{t^{(m)}_{i-1}}\bigr), \\
S^{(m)}_2 &= \sum_{i=1}^{2^m} Y_{t^{(m)}_{i-1}} \bigl(X_{t^{(m)}_i} - X_{t^{(m)}_{i-1}}\bigr), \\
S^{(m)}_3 &= \sum_{i=1}^{2^m} \bigl(X_{t^{(m)}_i} - X_{t^{(m)}_{i-1}}\bigr)\bigl(Y_{t^{(m)}_i} - Y_{t^{(m)}_{i-1}}\bigr).
\end{align*}
[guided]
The strategy is a discrete version of the product rule: writing $d(XY) = X \, dY + Y \, dX + dX \, dY$. In the discrete setting, the "cross term" $dX \, dY$ does not vanish — it converges to the quadratic covariation $\langle X, Y \rangle_t$, which is the Ito correction term absent from classical calculus.
We use the algebraic identity $ab - cd = c(b-d) + d(a-c) + (a-c)(b-d)$. Setting $a = X_{t^{(m)}_i}$, $b = Y_{t^{(m)}_i}$, $c = X_{t^{(m)}_{i-1}}$, $d = Y_{t^{(m)}_{i-1}}$:
\begin{align*}
X_{t^{(m)}_i} Y_{t^{(m)}_i} - X_{t^{(m)}_{i-1}} Y_{t^{(m)}_{i-1}} &= X_{t^{(m)}_{i-1}} \bigl(Y_{t^{(m)}_i} - Y_{t^{(m)}_{i-1}}\bigr) + Y_{t^{(m)}_{i-1}} \bigl(X_{t^{(m)}_i} - X_{t^{(m)}_{i-1}}\bigr) \\
&\quad + \bigl(X_{t^{(m)}_i} - X_{t^{(m)}_{i-1}}\bigr)\bigl(Y_{t^{(m)}_i} - Y_{t^{(m)}_{i-1}}\bigr).
\end{align*}
Summing over the partition and defining $S^{(m)}_1$, $S^{(m)}_2$, $S^{(m)}_3$ as the three resulting sums, we obtain the exact identity $X_t Y_t - X_0 Y_0 = S^{(m)}_1 + S^{(m)}_2 + S^{(m)}_3$ for every $m$. No limiting process is needed for this identity — it is purely algebraic.
[/guided]
[/step]
[step:Show $S^{(m)}_1 \to \int_0^t X_s \, dY_s$ and $S^{(m)}_2 \to \int_0^t Y_s \, dX_s$ in probability]
The process $s \mapsto X_s$ is continuous and adapted, hence left-continuous and adapted. Since $X$ is a continuous semimartingale, it is locally bounded: for each $\omega$, the path $s \mapsto X_s(\omega)$ is continuous on $[0, t]$, hence bounded on $[0, t]$ by the extreme value theorem. The sum $S^{(m)}_1$ is the Riemann sum for $\int_0^t X_s \, dY_s$ evaluated on the partition $\{t^{(m)}_i\}$.
By the [Riemann Sum Approximation](/theorems/2097) applied with $H_s = X_s$ (which is adapted, bounded on $[0, t]$, and left-continuous since $X$ is continuous) and with $Y$ as the continuous semimartingale,
\begin{align*}
S^{(m)}_1 = \sum_{i=1}^{2^m} X_{t^{(m)}_{i-1}} \bigl(Y_{t^{(m)}_i} - Y_{t^{(m)}_{i-1}}\bigr) \xrightarrow{\mathbb{P}} \int_0^t X_s \, dY_s.
\end{align*}
By the identical argument with the roles of $X$ and $Y$ exchanged,
\begin{align*}
S^{(m)}_2 = \sum_{i=1}^{2^m} Y_{t^{(m)}_{i-1}} \bigl(X_{t^{(m)}_i} - X_{t^{(m)}_{i-1}}\bigr) \xrightarrow{\mathbb{P}} \int_0^t Y_s \, dX_s.
\end{align*}
[guided]
To apply the [Riemann Sum Approximation](/theorems/2097), we need the integrand to be adapted, bounded, and left-continuous. The process $X$ is adapted by hypothesis and continuous (hence left-continuous). For boundedness: since $X$ is continuous, for each $\omega$ the map $s \mapsto X_s(\omega)$ is a continuous function on the compact interval $[0, t]$. By the extreme value theorem, $|X_s(\omega)| \leq K(\omega) := \sup_{0 \leq s \leq t} |X_s(\omega)| < \infty$ for each $\omega$.
Strictly speaking, the Riemann sum approximation theorem as stated requires a globally bounded process (i.e., $K$ deterministic). To handle the case where $K$ is random, we use a localization argument: define $T_n = \inf\{s \geq 0 : |X_s| \geq n\} \wedge t$. The stopped process $X^{T_n}$ satisfies $|X^{T_n}_s| \leq n$ for all $s$ and $\omega$, so the Riemann sum approximation holds for $X^{T_n}$. Since $X$ is continuous, $T_n \to \infty$ a.s., and the convergence in probability for the unstopped process follows.
The same argument applies with the roles of $X$ and $Y$ exchanged, giving the convergence of $S^{(m)}_2$.
[/guided]
[/step]
[step:Show $S^{(m)}_3 \to \langle X, Y \rangle_t$ in probability]
The sum $S^{(m)}_3 = \sum_{i=1}^{2^m} (X_{t^{(m)}_i} - X_{t^{(m)}_{i-1}})(Y_{t^{(m)}_i} - Y_{t^{(m)}_{i-1}})$ is the discrete covariation of $X$ and $Y$ along the partition $\{t^{(m)}_i\}$. By the definition of the quadratic covariation process for continuous semimartingales,
\begin{align*}
\langle X, Y \rangle_t = \lim_{m \to \infty} \sum_{i=1}^{2^m} \bigl(X_{t^{(m)}_i} - X_{t^{(m)}_{i-1}}\bigr)\bigl(Y_{t^{(m)}_i} - Y_{t^{(m)}_{i-1}}\bigr)
\end{align*}
with convergence in probability (and uniformly on compacts in probability). Therefore $S^{(m)}_3 \xrightarrow{\mathbb{P}} \langle X, Y \rangle_t$.
[guided]
The quadratic covariation $\langle X, Y \rangle_t$ is defined via polarization from the quadratic variation:
\begin{align*}
\langle X, Y \rangle_t = \frac{1}{2}\bigl(\langle X + Y \rangle_t - \langle X \rangle_t - \langle Y \rangle_t\bigr).
\end{align*}
Expanding $\langle X + Y \rangle_t$ as the limit of $\sum_i (X_{t^{(m)}_i} + Y_{t^{(m)}_i} - X_{t^{(m)}_{i-1}} - Y_{t^{(m)}_{i-1}})^2$ and subtracting $\langle X \rangle_t = \lim \sum_i (X_{t^{(m)}_i} - X_{t^{(m)}_{i-1}})^2$ and $\langle Y \rangle_t = \lim \sum_i (Y_{t^{(m)}_i} - Y_{t^{(m)}_{i-1}})^2$, the cross terms survive and give
\begin{align*}
\langle X, Y \rangle_t = \lim_{m \to \infty} \sum_{i=1}^{2^m} \bigl(X_{t^{(m)}_i} - X_{t^{(m)}_{i-1}}\bigr)\bigl(Y_{t^{(m)}_i} - Y_{t^{(m)}_{i-1}}\bigr)
\end{align*}
with convergence in probability. This is precisely the sum $S^{(m)}_3$, so $S^{(m)}_3 \xrightarrow{\mathbb{P}} \langle X, Y \rangle_t$.
[/guided]
[/step]
[step:Combine the three limits to obtain the integration by parts formula]
The algebraic identity $X_t Y_t - X_0 Y_0 = S^{(m)}_1 + S^{(m)}_2 + S^{(m)}_3$ holds for every $m$. The left-hand side is independent of $m$, so as $m \to \infty$:
\begin{align*}
X_t Y_t - X_0 Y_0 = \lim_{m \to \infty} S^{(m)}_1 + \lim_{m \to \infty} S^{(m)}_2 + \lim_{m \to \infty} S^{(m)}_3 = \int_0^t X_s \, dY_s + \int_0^t Y_s \, dX_s + \langle X, Y \rangle_t,
\end{align*}
where the limits are taken in probability. Since the left-hand side is deterministic (for each $\omega$), the convergence in probability implies the identity holds almost surely for each fixed $t$.
To extend from fixed $t$ to all $t \geq 0$ simultaneously, observe that both sides of the identity are continuous processes in $t$: the left-hand side $X_t Y_t$ is continuous since $X$ and $Y$ are, and the right-hand side is a sum of stochastic integrals (which are continuous semimartingales) and the covariation process $\langle X, Y \rangle_t$ (which is continuous for continuous semimartingales). Two continuous processes that agree almost surely at every rational $t$ agree almost surely for all $t \geq 0$.
[/step]