Does Lebesgue Change of Variables only hold for Borel functions? In Bogachev, Measure Theorem, Theorem 3.7.1 states:
If $F : \mathbb{R}^n \supseteq U \to \mathbb{R}^n$ is $C^1$ and injective, then for any $A \subseteq U$ Lebesgue measurable and any Borel function $g \in L^1(\mathbb{R}^n)$, on has the equality:
$\int_A g(F(x)) |JF(x)|dx = \int_{F(A)} g(y) dy$, where $JF(x)$ is the Jacobian determinant of $F$ at $x$.
I am wondering about if/how this can be extended to Lebesgue functions $g$. Since if $g$ is Lebesgue, $g=h$ $\lambda$ a.e. for some $h$ Borel, where $\lambda$ is Lebesgue measure, we would like to be able to just put $h$ in for $g$ and show that the equality holds for all Lebesgue measurable functions.
This may not work though: $g=h$ $\lambda$ a.e. doesn't clearly imply $g \circ F = h \circ F$, in fact for $F$ a constant function one can easily find $g,h$ s.t. $g=h$ a.e. but $g\circ F(x) \neq h \circ F(x)$ for all $x$. But we have the condition that $F$ is injective and $C^1$. In this circumstance can we prove that $g \circ F = h \circ F$ a.e. (I'm assuming not, otherwise the theorem would have been stated to include Lebesgue measurable functions). If not, what is a counterexample? Does this provide a counterexample to the above theorem but for Lebesgue measurable functions?
Note that for $F$ a diffeomorphism onto its image, we have a well defined $F^{-1}$, which is $C^1$ by the inverse function theorem, hence locally Lipschitz. Locally Lipschitz functions preserve null sets, hence $F \circ g = F \circ h$ $\lambda$ a.e. provided $g=h$ $\lambda$ a.e. I am looking for a strengthening of this result.
 A: I'm not sure why this was giving me so much trouble, but looking at the theorem statement given by peek-a-boo motivated the following proof.
Note: In the following we use the notation $JF(x)$ to represent the Jacobian determinant of $F$ at $x$ (not the derivative) and use $|JF(x)|$ to be the absolute value of the Jacobian determinant.
Note, we are assuming the following:
Theorem: Suppose $F: \mathbb{R}^n \supseteq U \to \mathbb{R}^n$ is a $C^1$ diffeomorphism onto its image. Then for any $g$ Lebesgue measurable, $g(F(x)) |JF(x)| \in L^1(A) \iff g \in L^1(F(A))$ and $\int_A g(F(x)) |JF(x)|dx = \int_{F(A)} g(y) dy$ whenever $g \in L^+(F(A))$ or $g \in L^1(F(A))$.
For the above, a proof can be seen in Folland, Real Analysis, Theorem 2.47. Now we have the following result.
Theorem: Suppose $F: \mathbb{R}^n \supseteq U \to \mathbb{R}^n$ is $C^1$ and let $C := JF^{-1}(0)$. Suppose that $F|_{U-C}$ is injective. Then for any $g$ Lebesgue measurable, $g(F(x)) |JF(x)| \in L^1(A) \iff g \in L^1(F(A))$ and $\int_A g(F(x)) |JF(x)|dx = \int_{F(A)} g(y) dy$ whenever $g \in L^+(F(A))$ or $g \in L^1(F(A))$.
Proof: Sard's theorem gives that $F(C) = 0$. Note also $JF$ is continuous, hence $C$ is closed and $U- C$ is open. Therefore the inverse function theorem gives that since $F|_{U-C}$ is injective, it is a diffeomorphism onto its image.
Now consider the case $g \in L^+(F(A))$. Then $$\int_A g(F(x))|JF(x)| dx = \int_{A - C} g(F(x))|JF(x)| dx + \int_{A \cap C} g(F(x))|JF(x)| dx = \int_{A - C} g(F(x))|JF(x)| dx,$$ since $JF|_C = 0$. Then $A - C \subseteq U - C$ and is Lebesgue measurable. On $U - C$, $F$ is a diffeomorphism onto its image, thus we have that $\int_{A-C} g(F(x)) |JF(x)| dx = \int_{F(A - C)} g(y) dy$. Then $$\int_{F(A)} g(y) dy = \int_{F(A - C) \cup F(C)} g(y) dy \leq \int_{F(A-C)} g(y) dy + \int_{F(C)} g(y) dy = \int_{F(A-C)} g(y) dy,$$ since $m(F(C)) = 0$.  But also clearly, $\int_{F(A-C)} g(y) dy \leq \int_{F(A)} g(y) dy $, so we have equality. Thus $\int_A g(F(x)) |JF(x)| dx = \int_{F(A-C)} g(y) dy = \int_{F(A)} g(y) dy$. 
Then by taking absolute values, we see that $g \in L^1(F(A)) \iff g(F(x)) |JF(x)| \in L^1(A)$. In the case that $g \in L^1(F(A))$, the same argument as above works, since we then have $g(F(x)) |JF(x)| \in L^1(A)$ and all the integrals then make sense.
