Solution (source code)

= Solution

On a finite sample space, all real-valued holdings over the finite interval $0,\ldots,T$ are bounded after null states are discarded. The gains identity is therefore a bounded <predictable> <martingale transform> of the vector <martingale> $P$, summed over its coordinates. It follows that $X$ is a <martingale>, so
$$
\boxed{x=\mathbb E X_T=\mathbb E\xi.}
$$
Here the replication cost is a prescribed deterministic initial capital, as in the definition of attainability. The stronger intermediate identity is $X_t=\mathbb E[\xi\mid\mathcal F_t]$. If initial capital is instead allowed to be $\mathcal F_0$-measurable and random, the corresponding statement is $X_0=\mathbb E[\xi\mid\mathcal F_0]$; its unconditional <expectation> still equals $\mathbb E\xi$.