I am self studying Munkres' Topology book, and I'm having a hard time writing down proofs that relate to set theory. I can see why certain arguments are true, but constructing a formal proof seems to be difficult. Here's a very simple example of a problem in the book.
Let $f:A \rightarrow B$
(a) Prove that $A_0 \subset f^{-1}(f(A_0))$, show that $A_0 = f^{-1}(f(A_0))$ if $f$ is injective.
(b) Prove that $f(f^{-1}(B_0)) \subset B_0 $, show that $B_0 = f(f^{-1}(B_0))$ if $f$ is surjective.
Conceptually, the ideas are simple. In (a), let $S$ be the image set of $A_0$ under $f$ (sorry if I use non-conventional notation, I'm still somewhat new to this). This means that $S= \{ b \mid f(a)=b \text{ for at least one } a \}$. This we take the inverse we may end up with some of the $a \in A^C_0$, where $A^C_0$ is the complement of $A_0$ in $A$. This happens because of the at least one in the definition of S. If we said exactly on instead, i.e. $f$ is injective, we can see that $f^{-1}(f(A_0))$ would give us $A_0$ back.
In (b) -- I'll scan through this one quickly -- let $P$ be the pre-image of $B_0$ under $f^{-1}$. Then $f^{-1}(B_0)$ gives us all points $a$ s.t. $f(a)=b \in B_0$ However we cannot guarantee that every $b \in B_0$ is the image of some a. Therefore $f(f^{-1}(B_0))$ only gives a subset of the original $B_0$. If we can guarantee that every $b \in B_0$ has a matching $a \in A$, that is $f$ is surjective, we get the entire $B_0$ back.
Now that I've shown that I understand how to prove both (a) and (b), can someone help me put these proofs in elegant mathematical form?