[proofplan]
The forward implication is the definition of independence applied to sets in the generating classes. For the converse, fix all but one coordinate and use the pi-lambda theorem successively to extend the rectangle identity from the generators to the full sigma-algebras.
[/proofplan]
[step:Prove the forward implication]
If $X_1,\ldots,X_n$ are independent, then for any $A_i\in\mathcal A_i\subset\mathcal E_i$,
\begin{align*}
\mathbb P\left(\bigcap_{i=1}^n X_i^{-1}(A_i)\right)
=\prod_{i=1}^n\mathbb P(X_i^{-1}(A_i)).
\end{align*}
This is the displayed identity.
[/step]
[step:Extend one coordinate]
Assume the displayed identity holds for every $A_i\in\mathcal A_i$. More generally, suppose that for some $m\in\{1,\ldots,n\}$ the identity is already known whenever the first $m-1$ coordinates are chosen from $\mathcal E_1,\ldots,\mathcal E_{m-1}$ and the remaining coordinates are chosen from their generating classes. Fix $B_1\in\mathcal E_1,\ldots,B_{m-1}\in\mathcal E_{m-1}$ and fix $A_{m+1}\in\mathcal A_{m+1},\ldots,A_n\in\mathcal A_n$. Let $\mathcal D_m$ be the class of all $B\in\mathcal E_m$ for which
\begin{align*}
\mathbb P\left(\bigcap_{i=1}^{m-1}X_i^{-1}(B_i)\cap X_m^{-1}(B)\cap\bigcap_{i=m+1}^{n}X_i^{-1}(A_i)\right)
=\left(\prod_{i=1}^{m-1}\mathbb P(X_i^{-1}(B_i))\right)\mathbb P(X_m^{-1}(B))
\left(\prod_{i=m+1}^{n}\mathbb P(X_i^{-1}(A_i))\right).
\end{align*}
The class $\mathcal D_m$ contains $E_m$: this is exactly the induction hypothesis with the $m$th coordinate chosen as $E_m\in\mathcal A_m$. It contains $\mathcal A_m$ by the same induction hypothesis. It is a lambda-system: complements relative to $E_m$ follow by subtracting both sides from the identity for $E_m$, and countable disjoint unions follow by countable additivity on both sides. Since $\mathcal A_m$ is a pi-system that generates $\mathcal E_m$, the [Dynkin Pi System Lemma](/theorems/505) gives $\mathcal D_m=\mathcal E_m$.
[/step]
[step:Iterate over coordinates]
Start with $m=1$, where the induction hypothesis is just the assumed identity on $\mathcal A_1\times\cdots\times\mathcal A_n$. The previous step promotes the first coordinate from $\mathcal A_1$ to $\mathcal E_1$. Repeating the argument for $m=2,\ldots,n$ promotes one coordinate at a time while keeping the already-promoted coordinates in their full sigma-algebras. After the last step, the rectangle identity holds for every choice of sets $B_i\in\mathcal E_i$:
\begin{align*}
\mathbb P\left(\bigcap_{i=1}^n X_i^{-1}(B_i)\right)
=\prod_{i=1}^n\mathbb P(X_i^{-1}(B_i)).
\end{align*}
This is exactly the independence of $X_1,\ldots,X_n$.
[/step]