Let $f \colon M \to N$ a function. Show that the following affirmations are equivalent:
(a) $f$ is injective
(b) every two subsets $M_1$ and $M_2$ of $M$, $f(M_1 \cap M_2)=f(M_1) \cap f(M2)$
(a) $\implies$ (b):
Let $y \in f(M_1 \cap M_2)$
$\implies$ exists $x$ an element from $M_1 \cap M_2$ such that $f(x)=y$
$\implies$ exists $x \in M_1$ such that $f(x)=y$ and exists $x \in M_2$ such that $f(x)=y$
$\implies y \in f(M1) \cap f(M2)$.
So, $f(M_1 \cap M_2)$ is a subset of $f(M_1) \cap f(M_2)$.
Let $y \in f(M_1) \cap f(M_2)$. How can I prove, using the injectivity of the function $f$,that $y \in f(M_1 \cap M_2)$?
(b)$\implies$ (a)
$f(M_1 \cap M_2)=f(M_1) \cap f(M_2)$ means that every $y$ from $f(M_1 \cap M_2)$ belongs to $f(M_1) \cap f(M_2)$ and every $y$ from $f(M_1) \cap f(M_2)$ belongs to $f(M_1 \cap M_2)$.
How can I prove that $f$ is injective?