Union equals Intersection iff Sets are Equal

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

Then:
 * $\paren {S \cup T = S} \land \paren {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:
 * $S \subseteq T \iff S \cap T = S$

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

That is:


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

Thus:
 * $\paren {S \cup T = S} \land \paren {S \cap T = S} \iff S \subseteq T \subseteq S$

By definition of set equality:
 * $S = T \iff S \subseteq T \subseteq S$

Hence the result.