Set Difference as Intersection with Relative Complement

From ProofWiki
Jump to navigation Jump to search

Theorem

Let $A, B \subseteq S$.


Then the set difference between $A$ and $B$ can be expressed as the intersection with the relative complement with respect to $S$:

$A \setminus B = A \cap \relcomp S B$


Proof

\(\ds A \setminus B\) \(=\) \(\ds \set {x: x \in A \land x \notin B}\) Definition of Set Difference
\(\ds \) \(=\) \(\ds \set {x: \paren {x \in A \land x \in X} \land x \notin B}\) Definition of Subset, Modus Ponens and Rule of Conjunction
\(\ds \) \(=\) \(\ds \set {x: x \in A \land \paren {x \in X \land x \notin B} }\) Conjunction is Associative
\(\ds \) \(=\) \(\ds \set {x: x \in A \land x \in \relcomp S B}\) Definition of Relative Complement
\(\ds \) \(=\) \(\ds A \cap \relcomp S B\) Definition of Set Intersection

$\blacksquare$


Sources