First post! I'm currently going through Grimmett & Stirzaker's Probability and Random Processes. Exercise 2.3.2 says:
Let $X$ be a random variable and let $g:\mathbb{R}\rightarrow \mathbb{R}$ be continuous and strictly increasing. Show that $y=g(X)$ is a random variable
If we take $(\Omega, \mathcal{F}, \mathbb{P})$ as our probability space, the definition of a random variable on this space says that $X: \Omega \rightarrow \mathbb{R}$ is a random variable if $\{\omega \in \Omega : X(\omega) \leq x\} \in \mathcal{F}$ for each $x\in \mathbb{R}$.
The answer to the exercise is:
For $y$ lying in the range of $g$, $\{Y\leq y\} = \{X\leq g^{-1}(y)\}\in \mathcal{F}$
I don't understand the necessity of the continuity of $g$. My understanding is that we have the requirement that $g$ is invertible, so that $g^{-1}(y)$ is defined for each $y\in g(\mathbb{R})$, and then since $X$ is a random variable for each $y \in \mathbb{R}-g(\mathbb{R})$ we already have $\{\omega \in \Omega : X(w) \leq y\} \in \mathcal{F}$.
And indeed, strictly monotone continuous functions are bijective (when defined as mapping domain to image). But $g$ is a strictly monotone total function defined on the whole of $\mathbb{R}$ -- doesn't it suffice that it's injective? I can't come up with a counterexample where this would not be the case.
So my question is, after all, if $g:\mathbb{R}\rightarrow \mathbb{R}$ is total and strictly monotone (not necessarily continuous), does it always have an inverse? My best guess is yes because $|\mathbb{R}|$ and $|g(\mathbb{R})|$ should be the same, and so such a function should be bijective. But that's not a very formal statement.
I'm self-studying this and analysis and a bunch of other stuff, so apologies for any flaws in my reasoning.