In the first chapter of an introductory topology text, I got stuck at the following exercise.
Define $f:A \to B$. By $f^{-1}$ we denote the preimage operation.
$$\text{If for any $X\subset A$, we have $f^{-1}\big[f[X]\big] = X.$ Then $f$ is injective.} $$ Pick $y,y' \in f[X]$ such that $y = y'$.
By assumption we can find $x,x' \in X$ such that $y = f(x)$ and $y' = f(x')$.
To prove that $f$ is injective we show that $x = x'$.
By definition we have \begin{align*} x &= f^{-1}(y) \\ &= f^{-1}(y') \\ &= x' \ . \end{align*}
I do not seem to be using the arbitraryness of $X$. It looks like this argument would work even if we just have inclusion of $X$ in $f^{-1}\big[f[X]\big]$.