Let $(X, A)$ be a measurable space and let $f : X \to \mathbb R$ be a measurable function.
Let $g(x) = 0$ if $f(x)$ is rational
and $g(x) = 1$ if $f(x)$ is irrational.
Am I correct in saying $g$ is measurable ?
Let $(X, A)$ be a measurable space and let $f : X \to \mathbb R$ be a measurable function.
Let $g(x) = 0$ if $f(x)$ is rational
and $g(x) = 1$ if $f(x)$ is irrational.
Am I correct in saying $g$ is measurable ?
The inverse image of any Borel set under $g$ is $\emptyset$, $X$, $f^{-1}(\mathbb Q)$ or $f^{-1}(\mathbb Q^{c})$ and each of these sets is measurable.