Equality of Cartesian Products

Theorem
Let $A, B, C, D$ be nonempty sets.

Then:
 * $A \times B = C \times D \iff A = C \land B = D$

where $\times$ denotes cartesian product.

Proof
If $A = C$ and $B = D$, it is immediate that $A \times B = C \times D$.

Now suppose that $A \times B = C \times D$.

By definition of Cartesian product, have:

It follows that $x \in A$ iff $x \in C$, and so $A = C$.

Similarly, $y \in B$ iff $y \in D$, hence $B = D$.

The result follows.