Proof: Pivotal Quantity Can anyone give me a clue of how to address this theorem?

Suppose that $T$ is a real-valued statistic. Suppose that $Q(t,\theta)$ is a monotone function of $t$ for each value of $\theta\in \Theta$. Show that if the pdf of $T$, $f(t|\theta)$, can be expressed in the form:
\begin{equation}
f(t|\theta)=g(Q(t, \theta))\left|\frac{d}{dt}Q(t,\theta)\right|
\end{equation}
for some function $g$, then $Q(t,\theta)$ is a pivot.

I know it is also useful to use the change-of-variable theorem, but I do not see how.
 A: Here is a possible proof if the function $Q(t|\theta)$ is strictly monotone in $t$, i.e. if the function can be inverted. Let us agree that $Q$ is a function of $t$ only and consider $\theta$ as just a parameter. First, let us look at what the density of $Q(T,\theta)$ is:
\begin{align*}
 f_{Q}(q|\theta) dq &= \text{Prob}[ q\leqslant Q(T,\theta) < q + dq]\\
& = \text{Prob}[ Q^{-1}(q,\theta) \leqslant T < Q^{-1}(q,\theta) + \frac{dq}{|Q'(Q^{-1}(q,\theta),\theta)|}]
\end{align*}
The size of the differential follows from straightforward differential calculus. The question to ask is: for a change $dq$, how large is $dt$? If $Q$ is differentiable and invertible, then $q=Q(t,\theta)$ means both $\frac{dq}{dt}=Q'(t,\theta)$ and $t=Q^{-1}(q,\theta)$. Combining both gives $dt=\frac{dq}{Q'(Q^{-1}(q,\theta),\theta)}$. The absolute value is there because in the above probability notation, only the size of the differentials matter, not their sign. So we have
$$
f_{Q}(q|\theta) = f(Q^{-1}(q,\theta)|\theta) \frac{1}{|Q'(Q^{-1}(q,\theta),\theta)|}
$$
or, equivalently, with $t=Q^{-1}(q,\theta)$,
$$
f_{Q}(Q(t,\theta)|\theta) = f(t|\theta) \frac{1}{|Q'(t,\theta)|}
$$
Now, if $Q(T,\theta)$ is a pivot, that means its distribution does not depend on $\theta$. So its density $f_Q(\cdot |\theta)$ should really be $f_Q(\cdot)$, or in other notation, some function $f_Q(\cdot|\theta) = g(\cdot)$ independent of $\theta$. If we plug that in, we get
$$
g(Q(t,\theta)) |Q'(t,\theta)| = f(t|\theta)
$$
