Changing limits when switching order of integration. 
Consider the following Lebesgue integral:
  $$ \int_{0}^{\infty} \int_{|f|>y} g(y) \: |f(x)| \: \mathrm{d}x \: \mathrm{d}y , $$
  where g is a non-negative measurable function defined on $ (0,\infty) $ and $ f $ is a measurable function defined on $ \mathbb{R}^n $. If I am correct, the Tonelli's version of the Fubini theorem allows us to switch the order of integration. Question: What will be the new limits of integration?

My attempt:
\begin{align}
\{(x,y) : |f(x)|>y, \: y \in (0,\infty)\} &= \{(x,y) : x \in \mathbb{R}^n, \: |f(x)|>y, \: y \in (0,\infty)\} \\
&= \{(x,y) : x \in \mathbb{R}^n, \: |f(x)|>y>0\} .
\end{align}
Hence, the above double integral equals
$$ \int_{\mathbb{R}^n} \int_{0}^{|f|} g(y) \: |f(x)| \: \mathrm{d}y \: \mathrm{d}x . $$
While I have no doubt that the the two integrals are indeed equal, I'm wondering whether the set-theoretic justification I gave is sufficient, or whether I missed some subtlety?
Many thanks in advance! :)
 A: Your general thoughts are right but you made some (minor) mistakes or should consider points you might not realized before:
1.) you missed to switch "dx" and "dy" at the end, so the correct term is $$\int_{\mathbb{R}^n} \int_{0}^{|f|} g(y) \: |f(x)| \: \mathrm{d}y \: \mathrm{d}x$$
2.) You should recognize that actually your domain of the outer integral should be $$\Bbb R^n\setminus\{|f| \not=0 \}$$.
Because the integrand contains $|f|$ as a factor and so equals $0$ if $|f|=0$ this doesn't matter in your case but if the integrand would be e.g. $$g(x)\left(|f(x)| + 1\right)$$ it could!
Just be aware of that....
A: If the set $E$ is defined as
$$ E = \{ (x, y) : |f(x)| > y \} $$
then the function $(x, y) \mapsto g(y)|f(x)| \mathbf{1}_E(x, y)$ is non-negative and measurable on $\mathbb{R}^n \times (0,\infty)$, and hence by the Tonelli's theorem
\begin{align*}
\int_{0}^{\infty} \int_{|f(x)|>y} g(y)|f(x)| \, dxdy
&= \int_{0}^{\infty} \int_{\mathbb{R}^n} g(y)|f(x)|\mathbf{1}_E(x, y) \, dxdy \\
&= \int_{\mathbb{R}^n} \int_{0}^{\infty} g(y)|f(x)|\mathbf{1}_E(x, y) \, dydx \\
&= \int_{\mathbb{R}^n} \int_{0}^{|f(x)|} g(y)|f(x)| \, dydx
\end{align*}
That being said, the only subtlety you have to deal with is the measurability of the set $E$, but this is rather obvious from the measurability of the function $(x, y) \mapsto f(x) - y$.
