# Let $f:X\to Y$, and $A\subseteq X$, $B\subseteq Y$. Show that $f[A]\cap B\subseteq f[A\cap f^{-1}[B]]$

Let $f:X\to Y$, and $A\subseteq X$, $B\subseteq Y$. Show that $f[A]\cap B\subseteq f[A\cap f^{-1}[B]]$

I've tried to introduce some elements as the preimage for $B$ but I can't seem to make sense of it.

The sets are even the same.

$$y\in f[A]\cap B\iff\exists x\in A\; [y=f(x)\wedge y\in B]\iff\exists x\in A\; [y=f(x)\wedge f(x)\in B]\tag1$$ $$y\in f[A\cap f^{-1}(B)]\iff\exists x\in A\; [y=f(x)\wedge x\in f^{-1}(B)]\tag2$$

and here: $$f(x)\in B\iff x\in f^{-1}(B)$$ so that $y\in f[A]\cap B$ and $y\in f[A\cap f^{-1}(B)]$ are equivalent.

Let $y \in f(A)\cap B$. Then $y =f(a)$ for some $a \in A$. Now $a \in A \cap f^{-1} (B)$ because $a \in A$ and $f(a)=y \in B$. Hence $y =f(a) \in f(A\cap f^{-1}(B))$.

Let $y \in f(A) \cap B$,

Then $y \in f(A)$ and $y \in B$, i.e there is a

$a \in A$ such that $y=f(a)=b \in B$,

then $a \in f^{-1}(b) \subset f^{-1}(B)$;

Since $a \in A$ and $a \in f^{-1}(B)$, we have

$a \in A\cap f^{-1}B$, and finally

$y=f(a) \in f(A\cap f^{-1}(B))$.