Measurable functions on trivial sigma-algebra must be constant? I'm self-studying measure theory through Axler's "Measure, Integration & Real Analysis" and have come across the following definition of measurable functions:
Suppose $(X,S)$ is a measurable space. A function $f:X\rightarrow \mathbf{R}$ is called S-measurable if $f^{-1}(B)\in S$ for every Borel set $B\subseteq \mathbf{R}$.
I'm reading this definition and basically interpreting it in English that every measurable image of the function $f$ must also have a measurable pre-image. That is, the Borel sets are measurable, and so for the function to be measurable, the sets that map to the Borel sets via $f$ must be $S$-measurable. So a measurable function is basically a function that transforms measurable sets into measurable sets in a different space (measurable sets of $X$ to Borel measurable sets of $\mathbf{R}$ in this case).
It then gives an example: If $S=\{\emptyset, X\}$, then the only $S$-measurable functions from $X$ to $\mathbf{R}$ are the constant functions.
And here I'm realizing I must be off. Consider $X=\mathbf{R}, S=\{\emptyset, \mathbf{R}\}$. Then $f:\mathbf{R}\rightarrow\mathbf{R}$ is measurable if $f^{-1}(B)\in S$ for all Borel sets $B\subseteq \mathbf{R}$. Consider $f(x)=x$. This is clearly a map $\mathbf{R}\rightarrow\mathbf{R}$. Consider the Borel set $(0,1)$. We then have that $f^{-1}((0,1))=(0,1)$. But $(0,1)\not\in S$. So wouldn't this mean that it isn't measurable?
Thanks for the help!
 A: Your understanding that

a measurable function is basically a function that transforms measurable sets into measurable sets in a different space

is not correct. It is simply as the definition says: the pre-image of a measurable set has to be measurable. This does not hold for the 'other direction' of the mapping in general. For example take any set $X$ and the power set $\mathcal P(X)$ as $\sigma$-algebra and let $\mathcal F$ be a further $\sigma$-algebra on $X$. Since $\mathcal P(X)$ is 'extremly big' every map $f:X\to X$ is $\mathcal P(X)$-$\mathcal F$-measurable. Now consider $\mathcal F=\{\emptyset, X\}$. There is no function which transforms all $\mathcal P(X)$-measurable sets into $\mathcal F$-measurable set if $X$ has more than one element.
The example you gave with the $\sigma$-algebra $S$ and the function $f=\operatorname{Id}_\mathbb{R}$ is correct. In this case $f$ is not $S$-$\mathcal B$-measurable. This is the reason why you actually always have to say $S$-$\mathcal B$-measurable and not only measurable, because beeing measurable depends on both $\sigma$-algebras.
It is similar to the topology and continuous maps. The definition of a continuous map is that the pre-image of an open set has to be open. The other direction, that the image of an open set has to be open, is called an open map. But a continuous map is not open in general. And if you change the topology (analogous to your example) a previous continuous map might not be continuous any more.
