# Image of Set Difference under Injection

## Theorem

Let $f: S \to T$ be a mapping.

Let $S_1$ and $S_2$ be subsets of $S$.

Let $S_1 \setminus S_2$ denote the set difference between $S_1$ and $S_2$.

Then:

$\forall S_1, S_2 \subseteq S: f \left[{S_1}\right] \setminus f \left[{S_2}\right] = f \left[{S_1 \setminus S_2}\right]$

if and only if $f$ is an injection.

## Proof

An injection is a type of one-to-one relation, and therefore also a one-to-many relation.

Therefore One-to-Many Image of Set Difference applies:

$\mathcal R \left[{S_1}\right] \setminus \mathcal R \left[{S_2}\right] = \mathcal R \left[{S_1 \setminus S_2}\right]$

if and only if $\mathcal R$ is one-to-many.

We have that $f$ is a mapping and therefore a many-to-one relation.

So $f$ is a one-to-many relation if and only if $f$ is also an injection.

It follows that:

$\forall S_1, S_2 \subseteq S: f \left[{S_1}\right] \setminus f \left[{S_2}\right] = f \left[{S_1 \setminus S_2}\right]$

if and only if $f$ is an injection.

$\blacksquare$