Image of Set Difference under Mapping

Theorem
The image of the set difference is a subset of the set difference of the images.

That is:

Let $$f: S \to T$$ be a mapping. Let $$S_1$$ and $$S_2$$ be subsets of $$S$$.

Then:
 * $$f \left({S_1}\right) \setminus f \left({S_2}\right) \subseteq f \left({S_1 \setminus S_2}\right)$$

where $$\setminus$$ denotes set difference.

Corollary
In addition to the other conditions above:

Let $$S_1 \subseteq S_2$$.

Then:
 * $$\complement_{f \left({S_2}\right)} \left({f \left({S_1}\right)}\right) \subseteq f \left({\complement_{S_2} \left({S_1}\right)}\right)$$

where $$\complement$$ (in this context) denotes relative complement.

Hence:
 * $$\complement_{\operatorname{Im} \left({f}\right)} \left({f \left({S_1}\right)}\right) \subseteq f \left({\complement_S \left({S_1}\right)}\right)$$

where $$\operatorname{Im} \left({f}\right)$$ denotes the image of $$f$$.

Proof
As $$f$$, being a mapping, is also a relation, we can apply Image of Set Difference:


 * $$\mathcal{R} \left({S_1}\right) \setminus \mathcal{R} \left({S_2}\right) \subseteq \mathcal{R} \left({S_1 \setminus S_2}\right)$$

Proof of Corollary
We have that $$S_1 \subseteq S_2$$.

Then by definition of relative complement:
 * $$\complement_{S_2} \left({S_1}\right) = S_2 \setminus S_1$$
 * $$\complement_{f \left({S_2}\right)} \left({f \left({S_1}\right)}\right) = f \left({S_2}\right) \setminus f \left({S_1}\right)$$

Hence, when $$S_1 \subseteq S_2$$:
 * $$\complement_{f \left({S_2}\right)} \left({f \left({S_1}\right)}\right) \subseteq f \left({\complement_{S_2} \left({S_1}\right)}\right)$$

means exactly the same thing as:
 * $$f \left({S_2}\right) \setminus f \left({S_1}\right) \subseteq f \left({S_2 \setminus S_1}\right)$$

Similarly, by definition of the image of $f$:
 * $$\operatorname{Im} \left({f}\right) = f \left({S}\right)$$

So, when $$S_2 = S$$:
 * $$\complement_{\operatorname{Im} \left({f}\right)} \left({f \left({S_1}\right)}\right) = \complement_{f \left({S}\right)} \left({f \left({S_1}\right)}\right)$$

Hence:
 * $$\complement_{\operatorname{Im} \left({f}\right)} \left({f \left({S_1}\right)}\right) \subseteq f \left({\complement_S \left({S_1}\right)}\right)$$

means exactly the same thing as:
 * $$\complement_{f \left({S}\right)} \left({f \left({S_1}\right)}\right) \subseteq f \left({\complement_{S} \left({S_1}\right)}\right)$$

that is:
 * $$f \left({S}\right) \setminus f \left({S_1}\right) \subseteq f \left({S \setminus S_1}\right)$$