# Proof involving a function and its inverse

Let $f : S \to T\$ be a function and let $A$, $B$ be subsets of $S$.

I can show that $f(A \cup B) = f(A) \cup f(B)$ with a simple proof.

Now consider the inverse of $f$ (call it $g$). Would the proof that $g(A \cup B) = g(A) \cup g(B)\$ be identical to the proof with $f$? If not, how would I go about showing it?

-
Recall, if you want to show two sets are equal, show that they include one another. Consider some $x \in g(A\cup B)$ and try to show that we have $x \in g(A) \cup g(B)$, then show the converse as well. – barf Sep 28 '11 at 17:51
@barf That's what I've done for f, but I need to prove the same thing for f's inverse. Something tells me there is more to proving the statement about the inverse. – user16794 Sep 28 '11 at 17:54
if it is inverse, then the set $A$ and $B$ in the second appearance differ from the first two, since they belong to different set. It'd be appreciated if being more careful of your description. – newbie Sep 28 '11 at 17:57
@newbie I asked it how it was asked of me... – user16794 Sep 28 '11 at 18:02

Do you mean that $f$ is invertible and $g$ is the inverse of $f$? In this case your proof for forward images obviously goes through.
But in fact, given a map $f:S\to T$, the map that assigns to every set $A\subseteq T$ the set $f^{-1}[A]$ is actually a Boolean homomorphism. I.e., it not only preserves unions (as taking forward images does) but also intersections and complements. The arguments for this are quite simple.
Let me give you the details for unions. Let $A,B\subseteq T$. If $a\in f^{-1}[A]\cup f^{-1}[B]$, then there is $b\in A$ or $b\in B$ such that $f(a)=b$. Hence $a\in f^{-1}[A\cup B]$. If $a\in f^{-1}[A\cup B]$ then there is $b\in A\cup B$ such that $f(a)=b$. So there is $b\in A$ with $f(a)=b$ or there is $b\in B$ such that $f(a)=b$. In other words, $a\in f^{-1}[A]\cup f^{-1}[B]$. This shows $f^{-1}[A\cup B]=f^{-1}[A]\cup f^{-1}[B]$.
Observe that if $f$ happens to be invertible and $g$ is the inverse of $f$, then for all $A\subseteq T$, $f^{-1}[A]=g[A]$. Oh, and don't be confused by my use of square brackets. I use these when I am taking images or preimages of sets rather than points, to avoid confusion. Also note that forward images in general don't preserve intersections.