Intersection with Set Difference is Set Difference with Intersection

From ProofWiki
Jump to navigation Jump to search

Theorem

Let $R, S, T$ be sets.


Then:

$\left({R \setminus S}\right) \cap T = \left({R \cap T}\right) \setminus S$

where:

$R \setminus S$ denotes set difference
$R \cap T$ denotes set intersection.


Proof 1

Consider $R, S, T \subseteq \mathbb U$, where $\mathbb U$ is considered as the universe.


Then:

\(\displaystyle \left({R \setminus S}\right) \cap T\) \(=\) \(\displaystyle \left({R \cap \complement \left({S}\right)}\right) \cap T\) Set Difference as Intersection with Complement
\(\displaystyle \) \(=\) \(\displaystyle \left({R \cap T}\right) \cap \complement \left({S}\right)\) Intersection is Commutative and Intersection is Associative
\(\displaystyle \) \(=\) \(\displaystyle \left({R \cap T}\right) \setminus S\) Set Difference as Intersection with Complement

$\blacksquare$


Proof 2

\(\displaystyle \) \(\) \(\displaystyle x \in \left({R \setminus S}\right) \cap T\)
\(\displaystyle \) \(\iff\) \(\displaystyle \left({x \in R \land x \notin S}\right) \land x \in T\) Definitions of Set Intersection and Set Difference
\(\displaystyle \) \(\iff\) \(\displaystyle \left({x \in R \land x \in T}\right) \land x \notin S\) Rules of Commutation and Association
\(\displaystyle \) \(\iff\) \(\displaystyle x \in \left({R \cap T}\right) \setminus S\) Definitions of Set Intersection and Set Difference

$\blacksquare$