Let $f: X \rightarrow Y$ be a map from $X$ to $Y$. Show that the statement $$f(C \cap D) = f(C) \cap f(D)$$ for all possible choices of $C, D, \subseteq X$ is equivalent to $f$ being injective.
So first I restated the statement by using if and only if instead of equivalent and tried to prove it from there. Should I approach this by letting there be some element $c \in C$ and $d \in D$ such that $f(c) = f(d)$ and use that to prove that the intersection $f(C) \cap f(D)$is nonempty? I'm having some trouble determining which approach to take on this problem, any tips would be appreciated thanks.
Hint :
Assume that $f$ is not injective (i.e. you can find $c\neq d$ in $X$ such that $f(c)=f(d)$) and then you just need to find some particular $C$ and $D$ that do not verify the equality above ($C$ and $D$ will be small).
Assume that $f$ is injective, take $C$ and $D$ two subsets and show that $f(C\cap D)\subseteq f(C)\cap f(D)$ (easy, works even when $f$ is not necessary injective) and $f(C)\cap f(D)\subseteq f(C\cap D)$ (here your need injectivity).