Complement of Preimage equals Preimage of Complement

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

Let $T_1$ be a subset of $T$.

Then:


 * $\complement_S \left({f^{-1} \left({T_1}\right)}\right) = f^{-1} \left({\complement_T \left({T_1}\right)}\right)$

where:
 * $\complement$ (in this context) denotes relative complement
 * $f^{-1}$ denotes preimage.

Proof
From One-to-Many Image of Set Difference: Corollary 2 we have:
 * $\complement_{\operatorname{Im} \left({\mathcal R}\right)} \left({\mathcal R \left({S_1}\right)}\right) = \mathcal R \left({\complement_S \left({S_1}\right)}\right)$

where:
 * $S_1 \subseteq S$
 * $\mathcal R \subseteq T \times S$ is a one-to-many relation on $T \times S$.

Hence as $f^{-1}: T \to S$ is a one-to-many relation:
 * $\complement_{\operatorname{Im}^{-1} \left({f}\right)} \left({f^{-1} \left({T_1}\right)}\right) = f^{-1} \left({\complement_T \left({T_1}\right)}\right)$

But from Preimage of Mapping equals Domain, we have that:
 * $\operatorname{Im}^{-1} \left({f}\right) = S$

Hence:
 * $\complement_S \left({f^{-1} \left({T_1}\right)}\right) = f^{-1} \left({\complement_T \left({T_1}\right)}\right)$