Generalising a Dirac Delta function formula in General Relativity I'm currently stuck on a problem where I have to integrate on a particular set defined through a dirac delta function. If I understood correctly it all boils down to using the curved analogous of 
$$
 \int_{\mathbb{R}^n} f(\vec{x}) \delta(\phi(\vec{x}))|\nabla\phi|d^nx \tag{1}
$$
my guess is that in GR  this expression becomes either
$$
\int_\Omega f(x) \delta(\phi(x))\sqrt{g^{\mu\nu}\frac{\partial \phi(x)}{\partial x^\mu}\frac{\partial \phi(x)}{\partial x^\nu}} \sqrt{ -g}\,d^4 x
\tag{2}$$
or
$$
\int_\Omega f(x) \delta(\phi(x))\sqrt{g^{\mu\nu}\frac{\partial \phi(x)}{\partial x^\mu}\frac{\partial \phi(x)}{\partial x^\nu}}\,d^4 x
\tag{3}$$
given that in GR $$\delta^4 (\xi) =\frac{\delta^4(x)}{\sqrt{-g}}\tag{4}$$ where the $\xi$ are flat coordinates, but here I have a $\delta^{1}$, not a $  \delta^{4}! $ So I'm thinking the first formula is the correct one. Am I right?
Which one is correct?
PS. It would be awesome if someone had any sort of useful reference on the topic!
 A: Dirac delta function by definition is not a scalar, but a weighted tensor. That is,
$$ \int d^4x \delta(x,y) f(x) $$
is diffeomorphism-invariant and equal to $f(y)$.
Sometimes a true scalar function
$$ \tilde{\delta}(x,y) = \delta(x,y) / \sqrt{-g} $$
is used.
A: *

*Yes, OP's expression (2) is correct. The first square root factor $\sqrt{g^{\mu\nu}\frac{\partial \phi(x)}{\partial x^\mu}\frac{\partial \phi(x)}{\partial x^\nu}}$ in expression (2) is inserted to make the integral invariant under reparametrization of the constraint $\phi\to \phi^{\prime}$, while the second square root factor $\sqrt{|g|}$ is inserted to make the integral invariant under general coordinate transformations $x^{\mu}\to x^{\prime \nu}$. 

*The Dirac delta distribution $\delta(\phi(x))$ in expression (2) is the usual 1-dimensional Dirac delta distribution over $\mathbb{R}$, where $\phi:M\to \mathbb{R}$ is a constraint. If $h:\mathbb{R} \to T^{\ast}\mathbb{R}\odot T^{\ast}\mathbb{R}$ denotes a metric tensor on $\mathbb{R}$, one could in principle trade the first square root factor $\sqrt{g^{\mu\nu}\frac{\partial \phi(x)}{\partial x^\mu}\frac{\partial \phi(x)}{\partial x^\nu}}$ in expression (2) with a factor $1/\sqrt{h(\phi(x))}$.
A: The definition of the Dirac delta function on a manifold depends on how you define things, exactly. 
On an orientable manifold, you can define either test tensor fields as either tensors or weighed tensor of weight $-1$. In the first case, the "delta function" will be $\delta(x)$. In the second case, it will be $\delta(x) /  \sqrt {-g}$. The same is true for all tensor distributions.
