Preimage of product of chraccteristic function compared to preimage of function

76 Views Asked by At

Let $g:X \to \mathbb{R}$ be a function and $A$ be a subset of $X$. Let $(g\chi_A)(x) = \begin{cases} g(x) \mkern3mu &x\in A \\ 0 \mkern3mu &x \notin A \end{cases} $. I want to write $(g\chi_A)^{-1}(B)$ in terms of $g^{-1}(B)$, where $B$ is a subset of $\mathbb{R}$.

I know that $g^{-1}(B)=\{x \in X : g(x) \in B\}$. And $(g\chi_A)^{-1}(B)=\{x \in X :(g\chi_A)(x) \in B\}$. But we can write \begin{align*} (g\chi_A)^{-1}(B)&=\{x \in A :(g\chi_A)(x) \in B\} \cup \{x \in A^c :(g\chi_A)(x) \in B\} \\ &=\{x \in A :g(x) \in B\} \cup \{x \in A^c :0 \in B\} \end{align*}

So to me this implies that $(g\chi_A)^{-1}(B) = \begin{cases} (g^{-1}(B) \cap A) \cup A^c \mkern1mu &0 \in B \\ g^{-1}(B) \cap A \mkern3mu &0 \notin B \end{cases}$.

Is this logic correct?