Products of Products are Homeomorphic to Collapsed Products

Theorem
Let $I$ be an index set, and for each $i \in I$ let $J_i$ be an index set.

Suppose that the sets $J_i$ are pairwise disjoint.

Let $\displaystyle J = \bigcup_{i \mathop\in I} J_i$

For each $j \in J$, let $X_j$ be a topological space.

Then $\displaystyle \prod_{j \mathop\in J} X_j$ is homeomorphic to $\displaystyle \prod_{i \mathop\in I} \prod_{j \mathop\in J_i} X_j$.