Let $f:A\rightarrow B$ be a function, $C\subseteq A$, $D\subseteq B$ then prove:
- $C = f^{-1}(f(C)) \iff f$ is injective
- $f(f^{-1}(D) = D \iff f$ is surjective
For both equivalences, I have difficulties proving the right implications (proving that $f$ is injective for the first equivalence and proving that $f$ is surjective for the second).
I found a proof of the second right implication (proving that $f$ is surjective) that I can't understand. The proof is as follows:
"Let $y\in D$, consider the set $D=\{y\}$. Then $f(f^{-1}(\{y\}))=\{y\}$ wich implies $y\in f(f^{-1}(\{y\}))$, this is, $y=f(x)$ for an element $x\in f^{-1}(\{y\})\subseteq A$. This proves that $f$ is surjective."
Would appreciate an explanation of this last proof, helpful hints or proofs of these implications. Thank you beforehand.
For the left implications I proved the equalitiess by proving that $P\subseteq Q$ and $Q\subseteq P$ (then $P=Q$). There are 2 inclusions that do not need $f$ to be injective or surjective where I have no difficulties proving:
- $C \subseteq f^{-1}(f(C))$
- $f(f^{-1}(D) \subseteq D$
This means the other 2 inclusions must use the premise of $f$ being injective or surjective. I have proved successfully that $f(f^{-1}(D) \supseteq D$ using the that $f$ is surjective. But when proving $C \supseteq f^{-1}(f(C))$ I didn't use the $f$ is injective so something must be wrong. Proof is as follows:
Let $a\in f^{-1}(f(C))$
$\implies f(a) \in f(C)$
$\implies \exists a\in C: f(a)=b$
Where must I use the premise of $f$ being injective?