Generalisation of $(A_1\times B_1)\cup (A_1\times B_2)\cup (A_2\times B_1)\cup (A_2\times B_2) = (A_1\cup A_2)\times(B_1\cup B_2)$ What is the general case of this? (if any)  That is, with countably many products on the LHS.
$$(A_1\times B_1)\cup (A_1\times B_2)\cup
(A_2\times B_1)\cup (A_2\times B_2) = (A_1\cup A_2)\times(B_1\cup B_2)$$
(the $A$'s and $B$'s are sets). 
I've tried to generalise it, similarly to distributing addition to multiplication, but I don't get far. 
 A: For arbitrary index sets $I,J$ and families $\langle A_i : i \in I\rangle$ and $\langle B_j : j \in J\rangle$ of subsets of $X$ and $Y$ respectively, we have
$$\bigcup_{(i,j) \in I \times J} (A_i \times B_j) = \bigcup_{i \in I} \bigcup_{j \in J} (A_i \times B_j) = \Biggl(\bigcup_{i \in I} A_i\Biggr) \times \Biggl(\bigcup_{j \in J} B_j\Biggr).$$
A: You can use induction to generalize it.  To illustrate the induction, consider the case where $n=3$.  In other words,
$$
(A_1\cup A_2\cup A_3)\times (B_1\cup B_2\cup B_3)=(A_1\cup (A_2\cup A_3))\times (B_1\cup (B_2\cup B_3)).
$$
Then, applying the formula above, you have that this equals
$$
(A_1\times B_1)\cup (A_1\times (B_2\cup B_3))\cup ((A_2\cup A_3)\times B_1)\cup ((A_2\cup A_3)\times(B_2\cup B_3)).
$$
Now, break apart each term separately.  For example, 
$$
((A_2\cup A_3)\times(B_2\cup B_3))=(A_2\times B_2)\cup(A_2\times B_3)\cup (A_3\times B_2)\cup (A_3\times B_3).
$$
For the other terms, you could use a small lemma or observe that
$$
(A_1\times (B_2\cup B_3))=((A_1\cup\emptyset)\times (B_2\cup B_3))=(A_1\times B_2)\cup (A_1\times B_3)\cup (\emptyset\times B_2)\cup(\emptyset\times B_3).
$$
Since $(\emptyset\times B_2)=\emptyset$, this simplifies to
$$
(A_1\times B_2)\cup (A_1\times B_3).
$$
You could also extend the formula by considering $(A_1\cup A_2)\times (B_1\cup B_2)\times (C_1\cup C_3)$ and you can make something similar work by observing that there is a bijection between
$$
(A_1\cup A_2)\times (B_1\cup B_2)\times (C_1\cup C_3)
$$
and
$$
(A_1\cup A_2)\times ((B_1\cup B_2)\times (C_1\cup C_3)).
$$
The cases where you have countably many sets on either side then generalize as well (i.e., the limit is what you expect it to be).
