Relative complement

https://arbital.com/p/set_relative_complement

by M Yass Aug 6 2016 updated Oct 4 2016


The relative complement of two sets $~$A$~$ and $~$B$~$, denoted $~$A \setminus B$~$, is the set of elements that are in $~$A$~$ while not in $~$B$~$.

illustration of the output of a relative complement

Formally stated, where $~$C = A \setminus B$~$

$$~$x \in C \leftrightarrow (x \in A \land x \notin B)$~$$

That is, Iff $~$x$~$ is in the relative complement $~$C$~$, then $~$x$~$ is in $~$A$~$ and x is not in $~$B$~$.

For example,

If we name the set $~$U$~$ as the set of all things, then we can define the Absolute complement of the set $~$A$~$, $~$A^\complement$~$, as $~$U \setminus A$~$