Union equals Intersection iff Sets are Equal

Theorem
Let $S$ and $T$ be sets.

Then:
 * $S \cup T = S, S \cap T = S \iff S = T$

where:
 * $S \cup T$ denotes set union;
 * $S \cap T$ denotes set intersection.

Proof
From Intersection with Subset is Subset, we have:
 * $S \subseteq T \iff S \cap T = S$

From Union with Superset is Superset, we have:
 * $S \subseteq T \iff S \cup T = T$

That is:


 * $T \subseteq S \iff S \cup T = S$

Thus:
 * $S \cup T = S, S \cap T \iff S \subseteq T \subseteq S$

From Equality of Sets, we have:
 * $S = T \iff S \subseteq T \subseteq S$

Hence the result.