# Show that for any subset $C\subseteq Y$, one has $f^{-1}(Y\setminus C) = X \setminus f^{-1}(C)$ [duplicate]

Let $f: X\rightarrow Y$ be a map

Show that for any subset $C\subseteq Y$, one has

$f^{-1}(Y\setminus C) = X \setminus f^{-1}(C)$

In this case $f^{-1}$ refers to preimage

I started off with trying to show $f^{-1}(Y\setminus C) \subseteq X \setminus f^{-1}(C)$

Let $x\in f^{-1}(Y\setminus C) \Rightarrow x \in f^{-1}(Y), x\notin f^{-1}(C)\Rightarrow x\in X, x\notin f^{-1}(C) \Rightarrow x\in X \setminus f^{-1}(C) \Rightarrow f^{-1}(Y\setminus C) \subseteq X \setminus f^{-1}(C)$

Then I tried to show $f^{-1}(Y\setminus C) \supseteq X \setminus f^{-1}(C)$

Let $x \in X\setminus f^{-1}(C) \Rightarrow x \in X, x \notin f^{-1}(C)$ and since $C \subseteq Y$ ,if $x\notin f^{-1}(C)$ , $x$ must be in $f^{-1}(Y\setminus C)$ , so $f^{-1}(Y\setminus C) \supseteq X \setminus f^{-1}(C)$.

Could anyone tell me if this is the correct way to answer this question? It almost seems like I'm repeating the same argument and it looks too simple. Would appreciate if anyone could point out any mistakes or if i should be more vigorous in my working. Thank you!

## marked as duplicate by Martin Sleziak, Alex M., SchrodingersCat, Davide Giraudo, user91500Jan 30 '16 at 13:58

It's correct. I would only be careful with the "obvious" parts. For instance, when you say "$x$ must be in $f^{-1}(Y\setminus C)$". This is because $$x\in X \land x\notin f^{-1}(C)\implies f(x)\in Y\land f(x)\notin C \implies f(x)\in Y\setminus C\implies x\in f^{-1}(Y\setminus C)$$