Show $S = f^{-1}(f(S))$ for all subsets $S$ iff $f$ is injective Let $f: A \rightarrow B$ be a function. How can we show that for all subsets $S$ of $A$, $S \subseteq f^{-1}(f(S))$? I think this is a pretty simple problem but I'm new to this so I'm confused.
Also, how can we show that $S = f^{-1}(f(S))$ for all subsets $S$ iff $f$ is injective?

Formal proof (in DC Proof format) at http://dcproof.com/Image-Pre-Image.htm
A straightforward application of definitions except for two "sticking" points: 


*

*To prove $\neg x\in S \rightarrow \neg x\in f^{-1}(f(S))$ when $f$ is injective, you must
consider two cases: $x\in A$ and $\neg x\in A$.

*To prove $\neg\forall S\subseteq A(S=f^{-1}(f(S)))$ when $f$ is not injective, let $x\in A$ and $y\in A$ where $x\ne y$ and $f(x)=f(y)$. Then
construct counterexample $S=\{ x\}$.
