# $<X,Y>$ is the unique process of the form $Z = A - B$ s.t. $XY - Z$ is a martingale

In the book of Karatzas and Shreve Brownian Motion and Stochastic Calculus on page 31, after Definition 5.5 (of the cross-variation-process $<X,Y>$)

They say: The uniqueness argument in the Doob-Meyer Decomposition also shows that $<X,Y>$ is, up to indistinguishability, the only process of the form $A = A^{(1)} - A^{(2)}$ with $A^{(j)}$ adapted and natural increasing, such that XY - A is a martingale.

I don't understand this. XY is not necessarily a submartingale, so we can't apply the theorem directly. Assuming there would be another such decomposition $A = B - C$, then we do not have necessarily that $X - A$ or $X - B$ is a martingale, so we cannot apply the uniqueness argument. What am I missing here?

They define the cross-variation as $<X,Y> = \frac{1}{4}[<X+Y> - <X-Y>]$ where is the unique process increasing, natural process, s.t. $Z^2 - <Z>$ is a martingale (we get $<Z>$ from the Doob-Meyer decomposition)

If $X$ and $Y$ are semimartingales you can use Ito's Lemma to write $$X_tY_t = X_0Y_0 + \int\limits_0^t X_{s-}dY_s + \int\limits_0^t Y_{s-}dX_s + \langle X,Y\rangle_t,$$ so you can write the covariance (or cross-variation) of these $X$ and $Y$ as $$\langle X,Y\rangle_t = X_tY_t - X_0Y_0 - \int\limits_0^t X_{s-}dY_s - \int\limits_0^t Y_{s-}dX_s.$$ Note that $(X,Y)\mapsto \langle X,Y\rangle$ is symmetric and bilinear, thus the polarization identity holds:
\begin{aligned} \langle X+Y\rangle = \langle X+Y,X+Y\rangle &= \langle X,X\rangle+\langle X,Y\rangle+\langle Y,X\rangle+\langle Y,Y\rangle\\ &= \langle X,X\rangle + 2\langle X,Y\rangle+ \langle Y,Y\rangle \\ &= \langle X\rangle + 2\langle X,Y\rangle + \langle Y\rangle. \end{aligned}
Having this form, lets check the claim. With $Z_t:=\langle X_t,Y_t\rangle$, $$X_tY_t - Z_t = -X_0Y_0 - \int\limits_0^t X_{s-}dY_s - \int\limits_0^t Y_{s-}dX_s,$$ is a local martingale. Now suppose that there is another such process $\tilde{Z}_t$ with finite variation. Then $Z_t - \tilde{Z}_t = X_tY_t - \tilde{Z}_t - (X_tY_t - Z_t)$ would be another local martingale with finite variation and $\triangle(Z_t-\tilde{Z}_t)=0$ almost surely, where $\triangle X_t:= X_t - X_{t-}$. $Z_t-\tilde{Z}_t$ is a continuous local martingale of finite variation, and thus $Z_t-\tilde{Z}_t = Z_0-\tilde{Z}_0=0$ almost surely. I.e. continuous local martingales of finite variation are almost surely constant.