Is the median preserved for any strictly monotonic mapping? Problem
Let $X\sim f_X$, where $f_X$ is the probability density function of $X$. Let $g: \mathbb{R} \to \mathbb{R}$ a strictly monotonic (decreasing or increasing) mapping. I aim to prove or disprove:
$$
g[\mathrm{median} (X)] = \mathrm{median}[g(X)]
$$

Try
Let $x_0 = \mathrm{median} (X)$, $Y=g(X)$, $y_0 = g(x_0)$. Then, we want to show:
$$
0.5 = \int_{-\infty}^{y_0} f_Y (y) dy
$$
WLOG, assume $g$: increasing. By change of variables, $f_Y(y) = f_X(x)/g'(x)$ and $dy=dx g'(x)$. Thus,
$$
\begin{align}
\int_{-\infty}^{y_0} f_Y (y) dy &= \int_{-\infty}^{y_0} f_X(x) dx \\
&\neq \int_{-\infty}^{x_0} f_X(x) dx = 0.5
\end{align}
$$
So, if $f_X>0$ a.s., then the above statement holds only if $g(x_0) = x_0$. However, take an example of log-normal distribution, where $X\sim N(\mu, \sigma^2)$ and $g(x)=\exp(x)$. There is no real solution to $g(x_0) = x_0$, and $f_X >0$ a.s. But it is still true that $\mathrm{median}[g(X)] = g(\mu)$.
So my disproof is invalid? Any suggestions are welcome.

Here is a generalization.  It is intended to reveal which properties of probability are involved in the result.  It turns out that density functions are irrelevant.

Any number $\mu$ determines two events relative to the random variable $X$: $\mathscr E^-_\mu(X): X \le \mu$ and $\mathscr E^+_\mu: X \ge \mu.$
Any (strictly) monotonic transformation $g$ either preserves these events or reverses them, in the sense that the two sets $g(E^{\pm}_\mu(X))$ are the two sets $E^{\pm}_{g(\mu)}(g(X)).$  This follows immediately from the definition of (strict) monotonicity as preserving equality and either preserving or reversing strict inequality.
When $0\lt q \lt 1$ is a probability, it defines a nonempty set of numbers -- any one of which can be called the $q^{\text{th}}$ quantile of $X$ -- consisting of all $\mu_q$ for which $\Pr(E^-_{\mu_q}(X)) \ge q$ and $\Pr(E^+_{\mu_q}(X)) \ge 1-q.$
(Proof: start with a very large number $\alpha$ and decrease it as long as $\Pr(E^-_{\alpha}(X)) \ge q$.  Start with a very small number $\beta$ and increase it as long as $\Pr(E^+_{\beta}(X))\ge 1-q.$ If $\alpha \gt \beta,$ there exists $\gamma$ strictly between $\alpha$ and $\beta$ that, by construction, satisfies $\Pr(E^-_{\gamma}(X)) \lt q$ (because $\gamma \lt \alpha$) and $\Pr(E^+_{\gamma}(X)) \lt 1-q$ (because $\gamma \gt \beta$).  But then
$$1 = \Pr(\mathbb R) = \Pr(E^-_{\gamma}(X)\cup E^+_{\gamma}(X)) \lt \Pr(E^-_{\gamma}(X)) + \Pr(E^+_{\gamma}(X)) \lt q + 1-q = 1,$$
a contradiction.  Notice how this constructive demonstration relies only on two simple probability axioms and a basic property of real numbers.)
The $q$ quantiles of $X$ are defined to be the interval $[\alpha,\beta],$ which we have seen is nonempty.  As a matter of temporary notation, denote such a set by $X[q].$
Putting these two observations together, we conclude that

any strictly monotonically increasing transformation $g$ maps quantiles to quantiles (that is, $g(X[q]) \subseteq g(X)[q]$ for all $q\in(0,1)$) while a strictly monotonically decreasing transformation maps the $q$ quantiles into the $1-q$ quantiles (that is, $g(X[q])\subseteq g(X)[1-q]$).

(As @Ilmari Karonen kindly points out in comments, $g$ is guaranteed to preserve quantiles when it is continuous, for then it will have an inverse that maps quantiles back into quantiles.)
Applying this to the case $q=1/2=1-q$ shows that $g$ preserves medians as sets.  When the median is unique (a singleton set), the median of $g(X)$ therefore is $g$ applied to the median of $X.$
You may wish to show that when $X$ has a density function defined in a neighborhood of its $q$ quantile and is not identically zero in any such neighborhood, it has a unique $q$ quantile: that is, $X[q]$ is a singleton.
