Union of Cartesian products: $X \times (Y \cup Z)= (X \times Y) \cup(X\times Z)$

Basically, this is a simplification problem: find out which elements are in $\;(X \times Y) \cup (X \times Z)\;$ by expanding the definitions and simplifying, then work towards $\;X \times (Y \cup Z)\;$.

So for all $\;x\;$, \begin{align} & p \in (X \times Y) \cup (X \times Z) \\ \equiv & \qquad \text{"definition of $\;\cup\;$"} \\ & p \in X \times Y \;\lor\; p \in X \times Z \\ \equiv & \qquad \text{"definition of $\;\times\;$, twice, writing $\;p\;$ as $\;(x,y)\;$ for some $\;x,y\;$"} \\ & (x \in X \land y \in Y) \;\lor\; (x \in X \land y \in Z) \\ \equiv & \qquad \text{"logic: extract common conjunct $\;x \in X\;$ -- the key simplification"} \\ & x \in X \land (y \in Y \lor y \in Z) \\ \equiv & \qquad \text{"definition of $\;\cup\;$"} \\ & x \in X \land (y \in Y \cup Z) \\ \equiv & \qquad \text{"definition of $\;\times\;$, switching back to $\;p\;$"} \\ & p \in X \times (Y \cup Z) \\ \end{align} By set extensionality, this proves the statement.


Let's do the right side first: Take $a \in (X \times Y) \cup (X \times Z)$. Then what are the possibilities? $a \in (X \times Y)$ or $a \in (X \times Z)$.

Now there are two cases: suppose $a \in (X \times Y)$. If $a \in X \times Y$, then $a \in X \times (Y \cup Z)$, because the cartesian cross product is defined as $A \times B = \{(a,b) | a \in A \land b \in B\}$, and uniting $Y$ and $Z$ does not mean that we are losing elements of $Y$. The case for $a \in X \times Z$ is similar (you should do that one). Now we have proven that if $a \in (X \times Y) \cup (X \times Z)$, then $a \in X \times (Y \cup Z)$. This implies that $(X \times Y) \cup (X \times Z) \subseteq X \times (Y \cup Z)$.

To show that the sets are equal, we'll then want to show that $ X \times (Y \cup Z) \subseteq (X \times Y) \cup (X \times Z)$. The reasoning in this case (for the entire left side) is similar to the reasoning above. I'll leave it to you, as this vaguely looks like homework.