Pasting supermartingales with downward jumps (source code)

= Pasting supermartingales with downward jumps
{title2=$Y_n=X_n^1\mathbf1_{\{N>n\}}+X_n^2\mathbf1_{\{N\leq n\}}$}

If two <supermartingales> satisfy $X_N^1\geq X_N^2$ on the event that the <stopping time> $N$ is finite, the displayed pasted <adapted process> is a <supermartingale>. On $\{N>n\}$ its next value is at most $X_{n+1}^1$, because a possible switch at $n+1$ only decreases it. On $\{N\leq n\}$ it follows the second <supermartingale>. Conditioning these inequalities proves the assertion. Finite repeated pastings inherit the same property, allowing a multiplicative trading construction for <upcrossings>.