Show that $f :X \to Y$ is injective iff $f^{-1}f(A))=A$ for all subsets $A$ of $X$ (proof checking) Show that $f :X \to Y$ is injective iff $f^{-1}f(A))=A$ for all subsets $A$ of $X$. Now I wrote a proof for this theorem and my question is firstly, is it correct? Secondly, since this is my first experience in writing such proofs, is it clear and concise enough? It feels quite unclear to me. So any tips and help would be appreciated. Here is my proof:
First we assume that  $f$ is injective, i.e. $f(x_1)=f(x_2)$ implies that $x_1=x_2$. Now This means that $\forall y\in f(A) \exists\text{ a unique } x\in X | f(x)=y$. For each element in $x\in X$ we thus have $f^{-1} f(x) = x$. Thus we have for all subsets $A$ of $X$ that $f^{-1}f(A))=A$. We can see this results is not true when $f$ is not injective, or when each element $y$ in $f(A)$ may not have unique inverse. In this case $f^{-1}(y)$ is not defined.
To show the opposite direction we assume that $f^{-1}f(A))=A$ for all subsets of $X$. Then in particular for all singleton sets $A=\{x \}$ we have $f^{-1}f(x))=x$. Now when $f(x_1)=f(x_2)$ we may apply the inverse mapping to each side to obtain $f^{-1}f(x_1))=f^{-1}f(x_2))$. By the hypothesis this reduces to $x_1=x_2$ and we have shown that $f$ is injective. 
Once again, if anyone could help me identify any mistakes, inconsistencies or stylistic mistakes I would be happy to hear them! Thanks in advance.
 A: My notes:  


*

*The proof is generally good

*Avoid using |, $\forall$, etc in your proof

*This part "We can see this results is not true when ... is not defined." is irrelevant"


Finally, this is a very good start.
A: This proof looks quite good. There are two suggestions: 
(1) I generally try to use words instead of symbols whenever it makes the proof clearer. 
(2) When $f:X\rightarrow Y$ is any function, often $f^{-1}$ refers to the inverse image of the function $f$ which always exists) rather than the inverse of the function, which only exists if $f$ is invertible/injective. 
The inverse image takes in a subset of $Y$ and returns a subset of $X$. In particular, for any $B\subseteq Y$, $f^{-1}(B) \equiv \{x \in X : f(x) \in B\}$.
For this reason, in your proof, $f^{-1}f(x)$ should technically be a set (such as $\{x\}$) rather than a point (such as $x$). 

If I were writing the proof from scratch, here is how I would do it. (This is just to provide an example in case it's helpful to you. Your proof is already quite good as-is.)
$(\Leftarrow)$. Suppose $f$ is injective and let $A$ be a subset of $X$. We want to show that $f^{-1}f(A) = A$. We can write $f^{-1}f(A)$  as the union $$f^{-1}f(A) = \bigcup_{a\in A}f^{-1}f(a),$$ and because $f$ is injective, we know that for any $a\in A$, we have $f^{-1}f(\{a\}) = \{x \in X : f(x) = f(a)\} = \{a\}$. Hence this union is just 
$$\begin{align*}f^{-1}f(A) &= \bigcup_{a\in A}f^{-1}f(a)\\&= \bigcup_{a\in A}\{a\} \\&= A.\end{align*}$$
($\Rightarrow$). Suppose that for every set $A \subseteq X$, we have that $f^{-1}f(A) = A$. Then in particular for any point $a\in A$, we have that $f^{-1}f(\{a\}) = \{a\}$. Hence for any $a,b\in A$, if we ever have that $f(a)=f(b)$, we also have that $f^{-1}f(a) = f^{-1}f(b)$, so
$$\{a\} = f^{-1}f(a) = f^{-1}f(b) = \{b\}$$
Hence $a=b$. It follows that $f$ is injective.
