Let $R$ be a binary relation and $A$ and $B$ sets . Show that
$$R[A\setminus B] \subseteq R[A] \setminus R[B] $$
the follwing is my proof.
$y\in R[A\setminus B] \implies\exists x(x\in A\setminus B) \text s.t\ xRy \iff \exists x(x\in A \wedge x\notin B) \text s.t\ xRy \implies \exists x(x\in A )\text s.t\ xRy \wedge \exists x( x\notin B) \text s.t\ xRy \implies y\in R[A]\setminus R[B]$
I feel like this problem is a false statement in the first place.
but my proof says it is not.
can you please correct it?? and can you prove the other direction as well?
The fact that there is an $x \notin B$ such that $(x,y) \in R$ does not mean that there is no other $x' \in B$ such that $(x',y) \in R$, so we cannot conclude that $y \notin R[B]$.
Let $A = \mathbb{R}$, $B= [0,\infty)$ and $R = \{(x,y) \in \mathbb{R}^2: y =x^2 \}$ (so even a function, which is a special relation):
Then $R[A \setminus B] = R[(-\infty, 0)] = (0,\infty)$ while $R[A] \setminus R[B] = [0,\infty)\setminus [0,\infty) = \emptyset$.