In the book of "continuous martingales and brownian motion" of Yor and Revuz (page 6 proposition 4.5) : Let $A,B$ two functions of finite variation. For all $t$ $$A_tB_t=A_0B_0+\int_0^t A_sdB_s+\int_0^t B_{s-}dA_s.$$
I don't understand the proof. It goes as follow : If $\mu$ (resp. $\nu$) is the measure associated with $A$ (resp. $B$), then both side are equal to $\mu\otimes \nu([0,t]^2)$. Indeed, $\int_0^t A_sdB_s$ is the measure of the upper triangle including the diagonal, and $\int_0^t B_{s-}dA_s$ is the measure of the lower triangle excluding the diagonal and $\mu\otimes \nu(\{0,0\})=A_0B_0$.
Questions : Why $\int_0^t A_sdB_s$ is the measure of the upper triangle and $\int_0^t B_{s-}dA_s$ of the lower diagonal ? Moreover, if we include the diagonal to the lower triangle, we should have $A_0B_0+\int_0^t B_{s-}dA_s=\int_0^t B_sdA_s$, so why excluding it ?
The thing I know is that if $A$ is right continuous with finite variation, then $A_t=\mu([0,t])$ for a radon measure. But here $A$ is just supposed of finite variations, so we can write $A_t=A_t^+-A_t^-$ where $A_t^{\pm}$ are increasing and thus right continuous. So I guess that $$A_t=\mu([0,t])=\mu^+([0,t])-\mu_-([0,t])=\mu_+\{0\}-\mu_-\{0\}+\mu_+((0,t])-\mu_-((0,t])$$ $$=A_0+\int_0^t dA_s.$$ I can do the same with $\nu$. So indeed I have $\mu\otimes \nu([0,t]^2)=A_tB_t$, but I don't get the thing with "measure of the triangle". And also I don't see why in one triangle we include the diagonal and not in the other one.
Assuming $A_0=B_0=0$ for simplicity (I'll leave you to modify this for $A_0,B_0$ nonzero). By Fubini, \begin{align} \int_{[0,t]} A_s\,\mathrm{d}B_s&=\int_{[0,t]}\int_{[0,s]}\,\mathrm{d}A_u\,\mathrm{d}B_s\\ &=\int_{[0,t]^2} \mathbf{1}_{x_1\leq x_2}(u,s)\,\mathrm{d}(\mu\otimes\nu)(u,s) \end{align} but $\mathbf{1}_{x_1\leq x_2}$ is precisely the indicator function of the closed upper triangle.
Similarly, from $$ \int_{[0,s)}\,\mathrm{d}B_u=\lim_{v\uparrow s}\int_{[0,v]}\,\mathrm{d}B_u=\lim_{v\uparrow s}B_v=B_{s-} $$ and Fubini you see $$ \int_{[0,t]} B_{s-}\,\mathrm{d}A_s=\int_{[0,t]^2} \mathbf{1}_{x_1>x_2}(u,s)\,\mathrm{d}(\mu\otimes\nu)(u,s) $$ is the $(\mu\otimes\nu)$ measure of the lower triangle excluding diagonal.