Characteristic Function of Set Difference

Theorem
Let $A, B \subseteq S$.

Then:


 * $\chi_{A \mathop \setminus B} = \chi_A - \chi_{A \cap B}$

where:
 * $A \setminus B$ denotes set difference
 * $\chi$ denotes characteristic function.

Proof
Suppose that $\chi_{A \mathop \setminus B} \left({s}\right) = 1$.

Then by definition of characteristic function:
 * $s \in A \setminus B$

That is, by definition of set difference, $s \in A$ and $s \notin B$; in particular, $s \notin A \cap B$.

Hence:
 * $\chi_A \left({s}\right) = 1$ and $\chi_{A \cap B} \left({s}\right) = 0$

Conclude that:


 * $\chi_{A \mathop \setminus B} \left({s}\right) = 1 \implies \chi_A \left({s}\right) - \chi_{A \cap B} \left({s}\right) = 1$

Now conversely suppose $\chi_A \left({s}\right) - \chi_{A \cap B} \left({s}\right) = 1$.

Considering that $\chi_{A \cap B} \left({s}\right) \ge 0$, it must be that $\chi_A \left({s}\right) = 1$ and $\chi_{A \cap B} \left({s}\right) = 0$.

Hence, $s \in A$, and $s \notin A \cap B$.

By definition of set intersection, this means $s \notin B$.

Hence $s \in A \setminus B$ by definition of set difference.

Thus:
 * $\chi_{A \mathop \setminus B} \left({s}\right) = 1$

Hence, it has been established that:


 * $\chi_{A \mathop \setminus B} \left({s}\right) = 1 \iff \chi_A \left({s}\right) - \chi_{A \cap B} \left({s}\right) = 1$

which, by application of Characteristic Function Determined by 1-Fiber, gives the result.