Solution (source code)

= Solution

A <pi-system> is a collection closed under finite intersections. The uniqueness theorem says that two <probability> measures agreeing on a generating <pi-system> agree on its generated sigma-field. For finite measures one also fixes the total <mass>; for a sigma-finite version one requires a covering sequence from the <pi-system> with finite common <masses>. Adding the whole space to a <pi-system> of events causes no change to its generated sigma-field and preserves the stated independence condition.

Fix $H\in\mathcal H$. On $\sigma(\mathcal G)$ the finite measures $A\mapsto P(A\cap H)$ and $A\mapsto P(A)P(H)$ agree on $\mathcal G$ and on the whole space. Uniqueness makes them agree for every $A\in\sigma(\mathcal G)$. Now fix such an $A$. On $\sigma(\mathcal H)$ the measures $B\mapsto P(A\cap B)$ and $B\mapsto P(A)P(B)$ agree on $\mathcal H$ and the whole space; a second application of uniqueness proves
$$
\boxed{P(A\cap B)=P(A)P(B)\quad(A\in\sigma(\mathcal G),\ B\in\sigma(\mathcal H)).}
$$
Thus the two generated sigma-fields are independent. The extension is done one argument at a time, not by assuming the required independence for arbitrary unions.

For the <independent random variables>, let $\mathcal G$ be the rectangles $\bigcap_{i=1}^m\{Y_i\in B_i\}$ and let $\mathcal H$ be the analogous rectangles in the $Z_j$. Both are <pi-systems>. Joint independence of the full list factors each combined rectangular <probability> into the product of the individual <probabilities>, hence into $P(G)P(H)$. Their generated sigma-fields are exactly $\sigma(Y_1,\ldots,Y_m)$ and $\sigma(Z_1,\ldots,Z_n)$. The proved result therefore gives \b[independence of the two vector-generated sigma-fields].