Prove the inverse of any function holds these set theory properties I am teaching my self Real analysis. I picked up a book called Understanding Analysis and there is this question in it I don't understand how to solve.
The question is, Show that for an arbitrary function g: $R\rightarrow R$ it is always true that $g^{-1}(A\cup B)= g^{-1}(A)\cup g^{-1}(B)$.
Thank you for the help.
 A: A standard way to prove set equalities is to take an element in one set, and show that it is in the other (and then vice-versa). So, take $x\in g^{-1}(A\cup B)$, then $$g(x)\in A\cup B$$ $$\iff g(x)\in A \text{ or } g(x)\in B$$
if $g(x)\in A$ then $x\in g^{-1}(A)$, and otherwise, if $g(x)\in B$ then $x\in g^{-1}(B)$. So we have shown $$x \in g^{-1}(A)\text{ or } x\in g^{-1}(B)$$
$$\iff x \in g^{-1}(A)\cup g^{-1}(B)$$
Can you do the other direction yourself? Show that $x\in g^{-1}(A)\cup g^{-1}(B)$ implies that $x\in g^{-1}(A\cup B)$, analogously to the above.
A: That is not the inverse of $g$. It is the preimage of sets in the codomain under $g$. Yes, the notation is a bit unfortunate, but we can see clearly that it is the preimage and not the inverse because $g$ isn't assumed to be a bijection (so the inverse may not exist) and, even if $g^{-1}$ did exist, it would act on numbers - not sets.
Anyhow, if $f:X\to Y$ is a function and $B$ is a subset of $Y$, then the preimage of $B$ under $f$ is defined by
$$
f^{-1}(B):=\{x\in X \mid f(x)\in B\}.
$$
Using this definition, you will want to show that $g^{-1}(A\cup B)\subseteq g^{-1}(A)\cup g^{-1}(B)$ and also $g^{-1}(A)\cup g^{-1}(B)\subseteq g^{-1}(A\cup B)$. I'll let you try to figure things out from here.
