This is Abbott's exercise $1.2.7.b$. and it is not a duplicate of the following questions.
Proof of $f^{-1}(A) \cap f^{-1}(B)= f^{-1}(A \cap B)$
how to prove $f^{-1}(B_1 \cap B_2) = f^{-1}(B_1) \cap f^{-1}(B_2)$
My proof that $f^{-1}(D_1 \cap D_2) = f^{-1}(D_1) \cap f^{-1}(D_2)$
Exercise $1.2.7.b.$
The good behavior of preimages is completely general. Show that for an arbitrary function $g:R\rightarrow R$, it is always true that $g^{-1}(A\cap B)\subseteq g^{-1}(A)\cap g^{-1}(B)$.
I had no problem when proving it and I also checked the solution manual which its proof was similar to mine:
Let $x\in g^{-1}(A\cap B)$, then $g(x)\in(A\cap B)$. But this means...
My problem is with "Let $x\in g^{-1}(A\cap B)$, then $g(x)\in(A\cap B)$." What if our function isn't one-to-one? We chose our function arbitrarily so a simple function like $g(x)=x^2$ should be OK but it seems not to be.
Let's choose $A=[0,2]$ then $g(A)=[0,4]$ and $g^{-1}=[-2,2]$. So we can simply see that $x\in g^{-1}(A)$ does not imply $g(x)\in(A)$.
What is my mistake here?
Thank you in advance
For a function $f:R\rightarrow S$, and $D \subseteq S$, the inverse image $f^{-1}(D)$ is defined as follows: $$f^{-1}(D) = \{x \in R: f(x) \in D\}$$
By definition then, if $x \in g^{-1}(A\cup B)$ then $g(x) \in A \cup B$.
In your example, $f:\mathbb{R}\rightarrow \mathbb{R}$ given by $f(x) = x^2$, and $A = [0,2] \subseteq \mathbb{R}$.
If $x \in g^{-1}(A) = [ -\sqrt{2},\sqrt{2}]$. Then $g(x) \in [0,2]$, so there's no issue.
The problem seems to be that you're computing $g^{-1}(g(A))$, which is $g^{-1}([0,4]) = [-2,2] \neq A$. You are instead noticing that $g^{-1}(g(A)) \neq A$ (in general).