Cartesian Product is Anticommutative/Corollary

Corollary to Cartesian Product is Anticommutative
Let $S$ and $T$ be sets.

Then:
 * $S \times T = T \times S \iff S = T \lor S = \varnothing \lor T = \varnothing$

where $S \times T$ denotes the cartesian product of $S$ and $T$.

Proof
Suppose $S \times T = T \times S$.

Then either:
 * $(1): \quad S \ne \varnothing \land T \ne \varnothing$ and from Cartesian Product is Anticommutative, $S = T$

or:
 * $(2): \quad S = \varnothing \lor T = \varnothing$ and from Cartesian Product Empty iff Factors are Empty, $S \times T = T \times S = \varnothing$.

In either case, we see that:
 * $S \times T = T \times S \implies S = T \lor S = \varnothing \lor T = \varnothing$.

Now suppose $S = T \lor S = \varnothing \lor T = \varnothing$.

From Cartesian Product Empty iff Factors are Empty, we have that:
 * $S = \varnothing \lor T = \varnothing \implies S \times T = \varnothing = T \times S$.

Similarly:
 * $S = T \land \neg \left({S = \varnothing \lor T = \varnothing}\right) \implies S \times T = T \times S$

by definition of equality.