Rule of subtraction (source code)

= Rule of subtraction
{title2=$|A\setminus B|=|A|-|A\cap B|$}

For <finite sets>, removing the elements of $B$ from $A$ leaves $|A|-|A\cap B|$ elements. Indeed $A$ is the <disjoint> union of $A\setminus B$ and $A\cap B$, so the <rule of sum> proves the formula. If $B\subseteq A$, it reduces to $|A\setminus B|=|A|-|B|$.