I'm told that if $\theta_{ML}$ is the MLE of parameter $\theta\in \mathbb{R}^n$ and $g:\mathbb{R}^n\rightarrow\mathbb{R}^m$ is injective then $g(\theta_{ML})$ is the MLE of $g(\theta)$. This doesn't exactly make sense to me though. If we required that $g$ were strictly increasing or decreasing then I could understand, but if $g$ is discontinuous at $\theta_{ML}$ and increasing from the left, decreasing from the right, would it not be possible for $g(\theta_{ML})$ to fail to be an MLE of $g(\theta)$?
I'm thinking in terms of a maximizer of a function on the real line since I'm a little shaky on the idea of MLEs. But if you had a function like $1-x^2$ for instance, it of course has a max at $x=0$. If we take the injective function
$$g(x) = \begin{cases} x & \text{ if } \ \ x < 0\\ 1-x & \text{ if } \ \ 0\leq x \leq 1 \\ x+1 & \text{ if } \ \ x > 1 \end{cases}$$
then 0 is not a maximizer of $g(1-x^2)$, since for instance $g(1-x^2)$ evaluated at $x=0$ is $g(1)$ is 0, but when evaluated at 1 is $g(0)$ is 1.
I feel in some way I may be misunderstanding what it means to have an MLE of a parameter, but not having specified the distribution function to which it's associated. Is this supposed to be sort of assumed background to the problem?