Give an example of a measurable space $(X, S)$ and a function $f:X \to \mathbb{R}$ such that $|f|$ is $S$-measurable but $f$ is not $S$-measurable.
I have considered a function on $(\mathbb{R},\mathcal B)$ where $\mathcal B$ is the collection of Borel sets. If you define a new set $A\subseteq X$ such that $A$ is not measurable, then I think you can arbitrarily define a function that maps
- $f(x) = 1$ for $x\in A$
- $f(x) = -1$ for $x \notin A$
Then $|f|$ maps everything to $1$, and $f$ inverse$(a, \infty)$ maps back to the measurable space, right? Or, does this then become NOT a function, because the elemtens of $A$ and not $A$ map to $1$?