# Does a bijection preserves set difference?

Suppose that $$\phi: Y \to Y$$ be a bijection. Suppose that $$B\subseteq A\subseteq Y$$ and $$\phi(A)\subseteq A$$ and $$\phi(B)\subseteq B$$. Is it true that $$\phi(A\setminus B)\subseteq A\setminus B$$? I took $$x\in A\setminus B$$. So $$x\in A$$ but $$x\notin B$$. So $$\phi(x)\in A$$. But I coulnt conclude that $$\phi(x) \notin B$$. when does $$\phi$$ preserves set difference? What more assumption do we need?

• You can also use math.stackexchange.com/questions/359693/… as a starting point for searching for the "more assumptions". Aug 24 at 9:47
• @AsafKaragila - I don't think this question is a duplicate of that one. Note that here the question is about proving that $\phi(A \smallsetminus B) \subseteq A \smallsetminus B$ (which does not hold), there the question is about proving $\phi(A \smallsetminus B) \subseteq \phi(A) \smallsetminus \phi(B)$ (which holds). Aug 24 at 10:04

Clearly the inclusion

$$\phi(A\setminus B)\subseteq A\setminus B$$

doesn’t hold. Just consider the counterexample

$$Y=A=\mathbb N$$, $$B=2 \mathbb N$$ with $$\begin{cases} \phi(n)=n +2 & \text{ if } n \in 2\mathbb N\\ \phi(n)=n-2 & \text{ if } n \in \mathbb N \setminus \left(\{1\} \cup 2\mathbb N\right)\\ \phi(1)=2 \end{cases}$$

• It seems to me that your counterexample works fine if you set $\phi(0) = 0$. Otherwise, $\phi(0) = 2 = \phi(1)$ and so $\phi$ would not be injective. Aug 24 at 9:59
• Here $\mathbb N=\{1,2,3,\dots\}$. Aug 24 at 10:00
• So if $\phi|B$ is surjective then the inclusion will work right? ie $\phi(B)=B$
– budi
Aug 24 at 10:02
• @budi - For $B = 2\mathbb{N} = \{2,4,6,\dots\}$, you have $\phi(B) = B \smallsetminus \{2\} \subseteq B$. The fact that $2 \notin \phi(B)$ is crucial for the counterexample. Aug 24 at 10:12
• Yes. This is coherent with your requirement $\phi(B) \subseteq B$. Aug 24 at 10:13