Show that $f^{-1}(f(E))=E$ Also yesterday I had a question on proving: If takes $f [-1,1]$ to $[-1,1]$ then $f^{-1}(f(0))= 0$. Where $0$ is in brackets and is a set.
one-one and onto proofs
It was proved by showing that $f(f^{-1}(0)) = 0$ so is it logically equivalent to showing $f^{-1}(f(0))= 0$. I think that in my book it does confirm that but it can be easy to misinterpret things, want verification
Prove:
$f^{-1}(f(E))=E$ for all subsets $E$ of $X$ 
Proof: 
$f(E) = y \in Y : y=f(x)$ for some $x \in E$
$f^{-1}(E) = x \in X : f(x) = y$ for some $y \in Y$
$f^{-1}(f(E))= f^{-1}(y \in Y : y=f(x)$ for some $x \in X$
= $x \in X :$ $f(x)=y$ for some $y \in Y$ = 
$E$
What I am trying to say is that the output values from $f(E)$ when plugged into $f^{-1}(E)$ should lead to the corresponding x-values of E which means it should equal E?
 A: Take $f(x)=x^2$ and $E=[0,1]$. Then $f^{-1}f(E)=[-1,1]\neq E$ so the claim is false in general. If $f$ is injective, the claim is true: 
if $x\in f^{-1}(f(E))$ then $f(x)\in f(E)\Rightarrow \exists x_1\in E$ such that $f(x)=f(x_1)$  and since $f$ is injective, $x=x_1$ which means that $x\in E$. 
On the other hand, if $x\in E$ then $f(x)\in f(E)$ so by definition, $x\in f^{-1}(f(E)).$
A: Let $X$ and $Y$ non-empty sets, and $f: X \to Y$ be a function. If $S \subseteq X$ and $U \subseteq Y$, we define 
$$\begin{align} 
f(S) & = \{ y \in Y : \, \exists x \in S \, \big( f(x)=y \big) \} \\
& = \{ y \in Y : \, y=f(x) \textrm{ for some } x \in S \} \\
& = \{ f(x) : \, x \in S \}
\end{align}$$
and
$$\begin{align}
f^{-1} (U) & = \{ x \in X : \, \exists y \in U \big( f(x)=y \big) \} \\ & = \{ x \in X : \, f(x)=y \textrm{ for some } y \in U \} \\
& = \{ x \in X : \, f(x) \in U \}
\end{align}$$
Note : The symbol $f^{-1}(U)$ it doesn't guarantee that $ f $ has an inverse, it's just a matter of notation.
So, if $f : X \to Y$ and $E$ a subset of $X$, in general we have $f^{-1}(f(E)) \supseteq E$ but the other containment is not always true. 
For example, consider $f: \{ 0,1 \} \to \{ 0,1 \}$ given by $f(0)=f(1)=1$ and take $E= \{0\} \subseteq \{ 0,1 \}$. Then
$$f(E) = f( \{0\} ) = \{ 1 \}$$
and then
$$f^{-1}(f(E))=f^{-1}( \{1\} ) = \{ 0,1 \} \neq E$$
