I was reading the Special Relativity chapter from Weinberg's Gravitation and Cosmology book and could use some help to prove that charge is a Lorentz scalar.
6 Currents and Densities
Suppose that we have a system of particles with position $\,\mathbf x_{n}(t)\,$ and charges $\,e_{n}$. The current and charge densities are usually defined by \begin{align} \mathbf J(\mathbf x,t) & \boldsymbol{\equiv} \sum\limits_{n} e_{n}\delta^3\left[\mathbf x\boldsymbol{-}\mathbf x_{n}(t)\right]\dfrac{\mathrm d \mathbf x_{n}(t)}{\mathrm d t} \tag{2.6.1}\label{2.6.1}\\ \boldsymbol{\varepsilon}(\mathbf x,t) & \boldsymbol{\equiv} \sum \limits_{n} e_{n}\delta^3\left[\mathbf x\boldsymbol{-}\mathbf x_{n}(t)\right] \tag{2.6.2}\label{2.6.2} \end{align} Here $\,\delta^3\,$ is the Dirac delta function, defined by the statement that for any smooth function $\,f(x)$, \begin{equation} \int\mathrm d^3 x f(\mathbf x)\delta^3\left(\mathbf x\boldsymbol{-}\mathbf y\right) \boldsymbol{=}f(\mathbf y) \nonumber \end{equation} We can unite $\,\mathbf J\,$ and $\,\boldsymbol{\varepsilon}\,$ into a four-vector $\,J^{\alpha}\,$ by setting \begin{equation} J^{0}\boldsymbol{\equiv}\boldsymbol{\varepsilon} \tag{2.6.3}\label{2.6.3} \end{equation} that is \begin{equation} J^{\alpha}(x) \boldsymbol{\equiv} \sum\limits_{n} e_{n}\delta^3\left[\mathbf x\boldsymbol{-}\mathbf x_{n}(t)\right]\dfrac{\mathrm d x^{\alpha}_{n}(t)}{\mathrm d t} \tag{2.6.4}\label{2.6.4} \end{equation}
........
........
We also note that in four-dimensional language \begin{equation} \dfrac{\partial}{\partial x^{\alpha}}J^{\alpha}(x)\boldsymbol{=}0 \tag{2.6.6}\label{2.6.6} \end{equation} The Lorentz invariance of this statement is evident.
Whenever any current $\,J^{\alpha}(x)\,$ satisfies the invariant conservation law \eqref{2.6.6}, we can form a total charge \begin{equation} Q\boldsymbol{\equiv} \int\mathrm d^3 x J^{0}(x) \tag{2.6.7}\label{2.6.7} \end{equation} This quantity is time-independent, because \eqref{2.6.6} and Gauss's theorem give \begin{equation} \dfrac{\mathrm d Q}{\mathrm d t}\boldsymbol{=} \int\mathrm d^3 x \dfrac{\partial}{\partial x^{0}} J^{0}(x)\boldsymbol{=}\boldsymbol{-} \int\mathrm d^3 x \boldsymbol{\nabla\cdot}\mathbf J(x) \boldsymbol{=} 0 \nonumber \end{equation} If $\,J^{\alpha}(x)\,$ is a four-vector, $\,Q\,$ is not only constant but a scalar. To see this, write $\,Q\,$ as \begin{equation} Q\boldsymbol{=}\int \mathrm d^4 x J^{\alpha}(x)\partial_{\alpha}\theta(n_{\beta}x^{\beta}) \tag{2.6.8}\label{2.6.8} \end{equation} where $\,\theta\,$ is the step function \begin{equation} \theta(s)\boldsymbol{=} \begin{cases} 1\quad s>0\\ 0\quad s<0 \end{cases} \nonumber \end{equation} and $\,n_{\lambda}\,$ is defined by \begin{equation} n_{1}\boldsymbol{\equiv}n_{2}\boldsymbol{\equiv}n_{3}\boldsymbol{\equiv}0,\quad n_{0}\boldsymbol{\equiv}\boldsymbol{+}1 \nonumber \end{equation} The effect of a Lorentz transformation on $\,Q\,$ is then evidently simply to change $\,n\,$: \begin{equation} Q'\boldsymbol{=}\int \mathrm d^4 x J^{\alpha}(x)\partial_{\alpha}\theta(n'_{\beta}x^{\beta}) \nonumber \end{equation} \begin{equation} n'_{\beta}\boldsymbol{\equiv}\Lambda^{\gamma}_{\hphantom{\gamma}\beta}n_{\gamma} \nonumber \end{equation} and using \eqref{2.6.6}, the change in $\,Q\,$ is then \begin{equation} Q'\boldsymbol{-}Q\boldsymbol{=}\int \mathrm d^4 x \partial_{\alpha} \left[J^{\alpha}(x)\{\theta(n'_{\beta}x^{\beta})\boldsymbol{-}\theta(n_{\beta}x^{\beta})\}\right] \nonumber \end{equation} The current $\,J^{\alpha}(x)\,$ can be presumed to vanish if $\,\vert\mathbf x\vert\longrightarrow \boldsymbol{+}\infty\,$ with $\,t\,$ fixed.Whereas the function $θ(n′_β x^β)−θ(n_β x^β)$ vanishes as |t|⟶+∞ with x fixed. Hence we can apply the four-dimensional Gauss theorem, and find $\,Q'\boldsymbol{-}Q\boldsymbol{=}0$; that is, $\,Q\,$ is a scalar.
(For the current density $\,J^{0}\,$ defined by \eqref{2.6.2} the charge \eqref{2.6.7} is \begin{equation} Q\boldsymbol{=}\sum\limits_{n}e_{n} \nonumber \end{equation} which of course is a constant scalar; however, in dealing with the charge and current distributions of extended particles it is important to realize that \eqref{2.6.7} defines a time-independent scalar for any conserved four-vector $\,J^{\alpha}$.)
$=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!$
I have trouble understanding the part where it says "the effect of a Lorentz transformation on Q is simply to change $n$." I know the dot product between a covariant and a contravariant vector is a Lorentz scalar. So the dot product of current density and partial derivative function is a Lorentz scalar. But why change $n$ to $n'$? The term inside the step function is also in the form of a dot product between a covariant and contravariant vector. so shouldn't it be a Lorentz scalar? If the volume element is also invariant can't we say right away that charge is a Lorentz scalar?
{And in the equation of $Q'-Q$, how did the current density vector go inside the partial derivative function?.}