Solution (source code)

= Solution

The <directed acyclic graph factorization> is
$$
p(x_1,u,x_2,x_3,x_4)
=p(x_1)p(u)p(x_2\mid x_1,u)
p(x_3\mid x_1,x_2)p(x_4\mid x_3,u).
$$
The graph gives $U\perp X_1$ and $U\perp X_3\mid(X_1,X_2)$. Therefore <Bayes theorem> gives
$$
p(u\mid x_1,x_2,x_3)
=p(u\mid x_1,x_2)
=\frac{p(u)p(x_2\mid x_1,u)}{p(x_2\mid x_1)}.
$$
Consequently
$$
\begin{aligned}
&\sum_{x_2}p(x_4\mid x_1,x_2,x_3)p(x_2\mid x_1)\\
&=\sum_{x_2,u}p(x_4\mid x_3,u)p(u)p(x_2\mid x_1,u)\\
&=\sum_up(x_4\mid x_3,u)p(u),
\end{aligned}
$$
which contains no $x_1$. This observed equality is a <Verma constraint>: it is implied by the latent-variable causal graph even though it is not a conditional independence.