1 Introduction

In 3+1 dimensions neither General Relativity [2] nor pure Yang–Mills theory [3, 4] has solitonic solutions. However, the coupled theory, the Einstein–Yang–Mills theory, with or without a cosmological constant has various solitons. See [5] for the first noted example in asymptotically flat spacetimes, and [6] for asymptotically anti-de Sitter spacetimes. See [7] for monopole type solutions in \(R^{2}\) gravity.

In this work we will work out the conserved charges of this coupled system and also find the constraints in the linearization instability of the first order perturbation theory. Conserved quantities in asymptotically flat spacetimes for pure gravity was famously given in [8, 9], which was generalized to asymptotically (anti) de Sitter spacetimes in [10] and generalized to higher derivative gravity theories in [11, 12]. On the other hand, conserved gauge invariant charges in pure Yang–Mills theory was constructed by Abbott and Deser [1].

Here in the first part of this work we follow the Abbott-Deser construction for a dynamical curved background with generically an asymptotically (A)dS behavior.

The second problem we study is the question of the validity of the perturbation theory in the Einstein–Yang–Mills system. It is well known [13,14,15,16,17,18,19,20,21,22,23] that not all perturbative solutions come from the linearization of a possible exact solution. If that happens, one speaks of linearization instability and the perturbation thus fails. To have a linearization stable theory the first order perturbative solution must satisfy an integral constraint. We shall find this for the Einstein–Yang–Mills theory.

Before we study the Einstein–Yang–Mills system in full detail, let us give our conventions [24] and recap the flat space construction [1]. We will work in \(D=3+1\) dimensions exclusively, but the discussion can be extended to other dimensions with the caveat that both pure Yang–Mills theory and pure General Relativity might have solitonic solutions for \(D>3+1\). We use the mostly plus signature \((-+++)\) and assume a compact Lie group \({\mathsf {G}}\) with the Lie algebra \({{\mathcal {G}}}\) given as

$$\begin{aligned} \left[ T_{a},T_{b}\right] =iC_{abc}T^{c}, \end{aligned}$$
(1)

with \(C_{abc}\) real. In the adjoint representation we write \((T_{a}^{Ad})^{b}\,_{c}:=-iC^{b}\,_{ca}\); and defining \((D_{\mu }\psi )_{n}:=\partial _{\mu }\psi _{n}-iA_{\mu }^{a}(T_{a})_{n}^{k}\psi _{k}\) in flat spacetime we have

$$\begin{aligned} {\mathscr {L}}=-\frac{1}{4}F_{\mu \nu }^{a}F_{a}^{\mu \nu }+{{\mathscr {L}}}_{matter}(\psi ,D_{\mu }\psi ), \end{aligned}$$
(2)

with the field equations

$$\begin{aligned} \partial _{\mu }F_{a}^{\mu \nu }=-J_{a}^{\nu }. \end{aligned}$$
(3)

The current

$$\begin{aligned} J_{a}^{\mu }=-F_{c}^{\mu \nu }C_{cab}A_{b\nu }-i\frac{\partial {{\mathscr {L}}}_{matter}}{\partial (D_{\mu }\psi )_{n}}(T_{a})_{n}^{k}\psi _{k}, \end{aligned}$$
(4)

is partially conserved

$$\begin{aligned} \partial _{\mu }J_{a}^{\mu }=0, \end{aligned}$$
(5)

and hence yields the conserved charges

$$\begin{aligned} Q_{a}:=\int J_{a}^{0}d^{3}x. \end{aligned}$$
(6)

But these charges are gauge-covariant, not gauge-invariant. To get gauge-invariant charges, one can employ the AD technique [10] which is based on the following observation. Assuming the Yang-Mills coupling \(g_{YM}=1\), without loss of generality, we can define the matrix valued gauge field and the field strength

$$\begin{aligned} {\hat{A}}_{\mu }:=T^{a}A_{\mu }^{a},\quad {\hat{F}}_{\mu \nu }:=T^{a}F_{\mu \nu }^{a}. \end{aligned}$$
(7)

Let the unitary matrix \({\hat{U}}\) be in the same representation as \(T^{a}\), then the gauge transformed gauge field reads

$$\begin{aligned} {\hat{A}}_{\mu }^{{\hat{U}}}={\hat{A}}_{\mu }+{\hat{U}}^{-1}D_{\mu }{\hat{U}}, \end{aligned}$$
(8)

with the gauge-covariant derivative defined as

$$\begin{aligned} D_{\mu }{\hat{U}}:=\nabla _{\mu }{\hat{U}}+[{\hat{A}}_{\mu },{\hat{U}}], \end{aligned}$$
(9)

and the field strength transforms as usual

$$\begin{aligned} {\hat{F}}_{\mu \nu }^{{\hat{U}}}={\hat{U}}^{-1}{\hat{F}}_{\mu \nu }{\hat{U}}. \end{aligned}$$
(10)

Under an infinitesimal transformation \({\hat{U}}\cong 1+{\hat{\xi }}\), one gets

$$\begin{aligned} \delta {\hat{A}}_{\mu }=D_{\mu }{\hat{\xi }},\quad \delta {\hat{F}}_{\mu \nu }=[{\hat{F}}_{\mu \nu },{\hat{\xi }}]. \end{aligned}$$
(11)

So clearly, \(D_{\mu }{\hat{\xi }}=0\) defines the symmetries of a “background” field \({\hat{A}}_{\mu }\) which we shall denote as \(\bar{{\hat{A}}}_{\mu }\) from now on; clearly \([{\hat{F}}_{\mu \nu },{\hat{\xi }}]=0\). In the space of gauge fields, \({\hat{\xi }}\) acts like a Killing vector akin to the spacetime Killing vectors \(\delta g_{\mu \nu }=\nabla _{\mu }X_{\nu }+\nabla _{\nu }X_{\mu }=0\). As there can be more than one solution to \(D_{\mu }{\hat{\xi }}=0\), we shall put an index to denote the elements of the symmetry set and write as \({\hat{\xi }}^{s}\), which is exactly the correct matrix that will turn \(J_{a}^{\mu }\) to be a gauge invariant current since \(\text {Tr}({\hat{\xi }}{\hat{J}}_{\mu })\) is gauge-invariant for \({\hat{J}}_{\mu }=J_{\mu }^{a}T^{a}\). But this procedure requires a choice of background gauge-field and hence it must be done carefully. Instead of repeating the full details of the flat space construction, we now study the curved space version which also includes the flat space as a special case.

2 Construction of the conserved charges in the Einstein–Yang–Mills system

The following construction works for any gravity theory based on Riemannian geometry with a Lagrangian of the generic form, but for the sake of concreteness, we shall take the gravity sector to be given as the Einstein–Hilbert Lagrangian. The coupled action reads

$$\begin{aligned} S= & {} \intop _{{\mathcal {M}}}d^{4}x\sqrt{-g}\,\Bigg (\frac{R-2\Lambda }{2\kappa } -\frac{1}{4}F_{\mu \nu }^{a}F_{a}^{\mu \nu } +{{\mathscr {L}}}_{matter}\Bigg ). \end{aligned}$$
(12)

As long as the Yang–Mills and the matter fields decay sufficiently fast at spatial infinity, the conserved energy, momentum, angular momentum as constructed, say in [1, 11, 12] are intact, so we will not repeat these well-established discussions here, but work out the Yang–Mills part in some detail. Variation with respect to \({\hat{A}}_{\mu }\) yields

$$\begin{aligned} D_{\mu }{\hat{F}}^{\mu \nu }=\nabla _{\mu }{\hat{F}}^{\mu \nu }+[{\hat{A}}_{\mu },{\hat{F}}^{\mu \nu }]={\hat{J}}^{\nu }, \end{aligned}$$
(13)

where

$$\begin{aligned} {\hat{F}}^{\mu \nu }:=\nabla ^{\mu }{\hat{A}}^{\nu }-\nabla ^{\nu }{\hat{A}}^{\mu }+[{\hat{A}}^{\mu },{\hat{A}}^{\nu }]. \end{aligned}$$
(14)

The field strength satisfies the Bianchi identity

$$\begin{aligned} D_{\alpha }{\hat{F}}_{\mu \nu }+D_{\mu }{\hat{F}}_{\nu \alpha }+D_{\nu }{\hat{F}}_{\alpha \mu }=0, \end{aligned}$$
(15)

and with the normalization \(\text {Tr}(T^{a}T^{b})=\frac{1}{2}\delta ^{ab}\), one has in components

$$\begin{aligned} F_{\mu \nu }^{a}=\partial _{\mu }A_{\nu }^{a}-\partial _{\nu }A_{\mu }^{a}+C^{a}\,_{bc}A_{\mu }^{b}A_{\nu }^{c}. \end{aligned}$$
(16)

Using (13) we will construct the gauge-invariant electric field, while the magnetic charge will follow from the Bianchi identity. Assume now that for \({\hat{J}}^{\nu }=0\), the background matrix \(\bar{{\hat{A}}}_{\mu }\) solves the source-free equation \({\bar{D}}_{\mu }\bar{{\hat{F}}}^{\mu \nu }=0\); and we expand the field equations about this solution asFootnote 1

$$\begin{aligned} {\hat{A}}_{\mu }=\bar{{\hat{A}}}_{\mu }+\lambda {\hat{a}}_{\mu }+\frac{\lambda ^{2}}{2}{\hat{b}}_{\mu }+{\mathcal {O}}(\lambda ^{3}), \end{aligned}$$
(17)

where \(\lambda \) is a small parameter. As we are in a dynamical background spacetime, the metric also receives perturbations which we shall write as

$$\begin{aligned} g_{\mu \nu }={\bar{g}}_{\mu \nu }+\tau h_{\mu \nu }+\frac{\tau ^{2}}{2}k_{\mu \nu }+{\mathcal {O}}(\tau ^{3}), \end{aligned}$$
(18)

with \(\tau \) being a different small parameter. Under these expansions, the full equation split as

$$\begin{aligned} D_{\mu }{\hat{F}}^{\mu \nu }={\bar{D}}_{\mu }\bar{{\hat{F}}}^{\mu \nu }+(D_{\mu }{\hat{F}}^{\mu \nu })^{(1)}+(D_{\mu }{\hat{F}}^{\mu \nu })^{(2)}+\cdots =J^{\nu },\nonumber \\ \end{aligned}$$
(19)

and by assumption the zeroth order term vanishes in the absence of a source

$$\begin{aligned} {\bar{D}}_{\mu }\bar{{\hat{F}}}^{\mu \nu }={\bar{\nabla }}_{\mu }\bar{{\hat{F}}}^{\mu \nu }+[\bar{{\hat{A}}}_{\mu },\bar{{\hat{F}}}^{\mu \nu }]=0. \end{aligned}$$
(20)

At the linear order one finds

$$\begin{aligned} (D_{\mu }{\hat{F}}^{\mu \nu })^{(1)}= & {} {\bar{D}}_{\mu }\left( \lambda ({\bar{D}}^{\mu }{\hat{a}}^{\nu }-{\bar{D}}^{\nu }{\hat{a}}^{\mu })+\tau (\bar{{\hat{F}}}^{\sigma \mu }h_{\sigma }^{\nu }\nonumber \right. \\&\left. -\bar{{\hat{F}}}^{\sigma \nu }h_{\sigma }^{\mu }+\frac{1}{2}\bar{{\hat{F}}}^{\mu \nu }h)\right) +\lambda [{\hat{a}}_{\mu },\bar{{\hat{F}}}^{\mu \nu }]. \end{aligned}$$
(21)

Similarly, the second order expansion, \((D_{\mu }{\hat{F}}^{\mu \nu })^{(2)}\), reads

$$\begin{aligned} (D_{\mu }{\hat{F}}^{\mu \nu })^{(2)}= & {} {\bar{D}}_{\mu }\left( ({\hat{F}}^{\mu \nu })^{(2)}+\frac{\tau }{2}({\hat{F}}^{\mu \nu })^{(1)}h\nonumber \right. \\&\left. +\frac{\tau ^{2}}{4}\bar{{\hat{F}}}^{\mu \nu }(k-h_{\rho \sigma }h^{\rho \sigma })\right) \nonumber \\&-\frac{\tau }{2}h{\bar{D}}_{\mu }({\hat{F}}^{\mu \nu })^{(1)}+\lambda [{\hat{a}}_{\mu },({\hat{F}}^{\mu \nu })^{(1)}]\nonumber \\&+\frac{\lambda ^{2}}{2}[{\hat{b}}_{\mu },\bar{{\hat{F}}}^{\mu \nu }]. \end{aligned}$$
(22)

Moving all the higher order terms to the right-hand side, we can recast (19) as

$$\begin{aligned} (D_{\mu }{\hat{F}}^{\mu \nu })^{(1)}=\hat{{\mathcal {J}}}^{\nu }, \end{aligned}$$
(23)

where the current

$$\begin{aligned} \hat{{\mathcal {J}}}^{\nu }:={\hat{J}}^{\nu }-(D_{\mu }{\hat{F}}^{\mu \nu })^{(2)}-\cdots \end{aligned}$$
(24)

is composed of the matter current as well as all the terms beyond the linear one coming from the expansion. The crucial point is that this current is covariantly conserved with respect to the background connection explicitly, \({\bar{D}}_{\nu }\hat{{\mathcal {J}}}^{\nu }=0\).Footnote 2

Finally, substituting (21) in (23), one finds

$$\begin{aligned}&{\bar{D}}_{\mu }\left( \lambda ({\bar{D}}^{\mu }{\hat{a}}^{\nu }-{\bar{D}}^{\nu }{\hat{a}}^{\mu })+\tau (\bar{{\hat{F}}}^{\sigma \mu }h_{\sigma }^{\nu }-\bar{{\hat{F}}}^{\sigma \nu }h_{\sigma }^{\mu }+\frac{1}{2}\bar{{\hat{F}}}^{\mu \nu }h)\right) \nonumber \\&\quad +\lambda [{\hat{a}}_{\mu },\bar{{\hat{F}}}^{\mu \nu }]=\hat{{\mathcal {J}}}^{\nu }. \end{aligned}$$
(25)

Covariantly conserved current does not immediately yield a conserved charge; to get a partially conserved current, we appeal to the symmetries of the background gauge field as discussed in the previous section. So we assume the existence of some (but at least one) background gauge covariant matrices \(\bar{{\hat{\xi }}}^{s}\) such that

$$\begin{aligned} {\bar{D}}_{\mu }\bar{{\hat{\xi }}}^{s}={\bar{\nabla }}_{\mu }\bar{{\hat{\xi }}}^{s}+[\bar{{\hat{A}}}_{\mu },\bar{{\hat{\xi }}}^{s}]=0, \end{aligned}$$
(26)

which yields \(\left[ {\bar{D}}_{\nu },{\bar{D}}_{\mu }\right] \bar{{\hat{\xi }}}^{s}=0=[\bar{{\hat{F}}}_{\nu \mu },\bar{{\hat{\xi }}}^{s}].\) Since \({\bar{D}}_{\nu }\hat{{\mathcal {J}}}^{\nu }=0\) and \({\bar{D}}_{\nu }\bar{{\hat{\xi }}}^{s}=0\), we can write

$$\begin{aligned} \sqrt{-{\bar{g}}}{\bar{D}}_{\nu }\text {Tr}(\bar{{\hat{\xi }}}^{s}\hat{{\mathcal {J}}}^{\nu })= & {} \sqrt{-{\bar{g}}}{\bar{\nabla }}_{\nu }\text {Tr}(\bar{{\hat{\xi }}}^{s}\hat{{\mathcal {J}}}^{\nu })\nonumber \\= & {} \partial _{\nu }\left( \sqrt{-{\bar{g}}}\text {Tr}(\bar{{\hat{\xi }}}^{s}\hat{{\mathcal {J}}}^{\nu })\right) =0, \end{aligned}$$
(27)

which can be used to express the conserved electric chargesFootnote 3 for each background gauge symmetry as:

$$\begin{aligned} Q_{\text {E}}^{s}:=\frac{1}{4\pi }\intop _{\Sigma }d^{3}x~\sqrt{{\bar{\gamma }}}\text {Tr}(\bar{{\hat{\xi }}}^{s}\hat{{\mathcal {J}}}^{0}), \end{aligned}$$
(28)

where we assumed that the four dimensional spacetime \({\mathcal {M}}\) is diffeomorphic to \(\Sigma \times {\mathbb {R}}\) and \({\bar{\gamma }}\) denotes the induced metric on the spatial hypersurface. Using the explicit form of the current and employing the Stokes’ theorem, one arrives at

$$\begin{aligned} Q_{\text {E}}^{s}= & {} \frac{1}{4\pi }\intop _{\partial \Sigma }d^{2}x~\sqrt{{\bar{\beta }}}\sigma _{i}\text {Tr}\left( \bar{{\hat{\xi }}}^{s} \left( \lambda ({\bar{D}}^{i}{\hat{a}}^{0}-{\bar{D}}^{0}{\hat{a}}^{i})\nonumber \right. \right. \\&\left. \left. +\tau \left( \bar{{\hat{F}}}^{0i}h_{0}^{0}+\bar{{\hat{F}}}^{ki}h_{k}^{0}+\bar{{\hat{F}}}^{0k}h_{k}^{i}+\frac{h}{2}\bar{{\hat{F}}}^{i0}\right) \right) \right) , \end{aligned}$$
(29)

where \({\bar{\beta }}\) is the two dimensional induced metric on the boundary of the hypersurface and \(\sigma _{i}\) is its unit one form. Observe that if the background gauge field is chosen to be pure gauge or zero, then the order \(\tau \) term in the charge expression vanishes and the gauge-invariant electric charges have the same form as their flat spacetime versions [1], while generically gravity contributes in a nontrivial way.

Magnetic charge discussion follows similarly but now one employs the Bianchi identity which can be written with the help of the dual of the field strength as

$$\begin{aligned} D_{\mu }\,^{\star }{\hat{F}}^{\mu \nu }=0, \end{aligned}$$
(30)

where \(^{\star }{\hat{F}}^{\mu \nu }:=\frac{1}{2\sqrt{-g}}\epsilon ^{\mu \nu \rho \sigma }{\hat{F}}_{\rho \sigma }\). More explicitly the identity can be written as

$$\begin{aligned} \frac{1}{2\sqrt{-g}}\epsilon ^{\mu \nu \rho \sigma }\left( \partial _{\mu }{\hat{F}}_{\rho \sigma }+[{\hat{A}}_{\mu },{\hat{F}}_{\rho \sigma }]\right) =0, \end{aligned}$$
(31)

which is the same as the expression in the flat spacetime case. So, expanding the gauge field about a background \(\bar{{\hat{A}}}_{\mu }\), and the metric tensor about \({\bar{g}}_{\mu \nu }\) one arrives at

$$\begin{aligned} ^{{\bar{\star }}}\hat{\mathcal {J}}^{\nu }={\bar{D}}_{\mu }\,^{\star }({\hat{F}}^{\mu \nu })^{\left( 1\right) }+\lambda [{\hat{a}}_{\mu },{}^{{\bar{\star }}}\bar{{\hat{F}}}^{\mu \nu }], \end{aligned}$$
(32)

with the linear part of the dual field strength given as \(^{\star }({\hat{F}}^{\mu \nu })^{(1)}=\frac{1}{2\sqrt{-{\bar{g}}}}{\bar{\epsilon }}^{\mu \nu \rho \sigma }\lambda ({\bar{D}}_{\rho }{\hat{a}}_{\sigma }-{\bar{D}}_{\sigma }{\hat{a}}_{\rho })\) and the background dual field as \(^{{\bar{\star }}}\bar{{\hat{F}}}^{\mu \nu }=\frac{1}{2\sqrt{-{\bar{g}}}}{\bar{\epsilon }}^{\mu \nu \rho \sigma }({\bar{D}}_{\rho }\bar{{\hat{A}}}_{\sigma }-{\bar{D}}_{\sigma }\bar{{\hat{A}}}_{\rho })\). Then the conserved magnetic charges can be written as

$$\begin{aligned} Q_{M}^{s}=\frac{1}{4\pi }\intop _{\partial \Sigma }d^{2}x\,\sigma _{i}\,\text {Tr}\left( {\bar{\xi }}^{s}\,^{{\bar{\star }}}(F^{i0})^{\left( 1\right) }\right) , \end{aligned}$$
(33)

which has the same form as its flat space version [1]. The magnetic charges are topological: as can be seen from comparing equations (29) and (33) the metric \(\sqrt{{\bar{\beta }}}\) does not explicitly appear in (33). Instead the Hodge dual appears which just is used to define the magnetic field. Hence we can equivalently express (33) as follows

$$\begin{aligned} Q_{M}=\frac{1}{4\pi }\intop _{\partial \varSigma }d^{2}x\,\sigma _{i}\, B^{(s)i}, \end{aligned}$$

where

$$\begin{aligned} B^{(s)i}=Tr({\bar{\xi }}^{(s)}\,{}^{\bar{*}}(F^{i0})^{(1)}). \end{aligned}$$

3 Linearization instability

In nonlinear theories, there are some cases for which the first order perturbation theory is constrained at the second order. When this happens, one speaks of the theory having a linearization instability about the zeroth order (or the background solution). This topic is rather extensive: see [13,14,15,16,17, 19,20,21,22]; and for a relevant review of the literature we would like to refer the reader to the recent PhD thesis [23], where the issue is elaborated in sufficient detail. Here let us study the linearization instability issue in the Gravity-Yang–Mills system. [Einstein gravity can be taken as a concrete example, but generic gravity theories can exhibit nontrivial linearization instability behavior as discussed in [21, 22].] We first assume a spacetime with noncompact hypersurfaces and at the end concentrate on the case of compact hypersurfaces without a boundary. Let us go back to the Yang-Mills equation with \(J^{\nu }=0\), expand again up to second order in the gauge-field and the metric perturbation to get

$$\begin{aligned}&({\bar{D}}_{\mu }\bar{{\hat{F}}}^{\mu \nu })\cdot (\bar{{\hat{A}}},{\bar{g}})+\left( D_{\mu }F^{\mu \nu }\right) ^{(1)}\cdot ({\hat{a}},h)\nonumber \\&\quad +\left( D_{\mu }F^{\mu \nu }\right) ^{(1)}\cdot ({\hat{b}},k)+\left( D_{\mu }F^{\mu \nu }\right) ^{(2)}\cdot ({\hat{a}}^{2},h^{2},{\hat{a}}h)+\cdots =0,\nonumber \\ \end{aligned}$$
(34)

where the center dot notation means, for example, \(\left( D_{\mu }F^{\mu \nu }\right) ^{(1)}\) operator is evaluated at the first order expansion of the gauge field and the metric tensor \(({\hat{a}},h)\). By assumption, we have \(({\bar{D}}_{\mu }{\bar{F}}^{\mu \nu })\cdot (\bar{{\hat{A}}},{\bar{g}})=0\), which together with the gravity sector, determine the background solutions \(({\bar{A}}_{\mu },{\bar{g}}_{\mu \nu })\) up to gauge degrees of freedom, of course.

Similarly, by assumption, we have \(\left( D_{\mu }F^{\mu \nu }\right) ^{(1)}\cdot ({\hat{a}},h)=0\), which together with the linearized part of the gravity sector, determine the linearized solutions \(({\hat{a}}_{\mu },h_{\mu \nu })\), again up to gauge transformations. So the second order terms are determined from the equation

$$\begin{aligned} \left( D_{\mu }F^{\mu \nu }\right) ^{(1)}\cdot ({\hat{b}},k)+\left( D_{\mu }F^{\mu \nu }\right) ^{(2)}\cdot ({\hat{a}}^{2},h^{2},{\hat{a}}h)=0,\nonumber \\ \end{aligned}$$
(35)

which basically says that once \(({\hat{a}}_{\mu },h_{\mu \nu })\) are found from the linearized equations, \(-\left( D_{\mu }F^{\mu \nu }\right) ^{(2)}\cdot ({\hat{a}}^{2},h^{2},{\hat{a}}h)\) acts like a source term for the second order perturbations \(({\hat{b}}_{\mu },k_{\mu \nu })\). If this happens then the first order perturbation theory is intact and improvable and moreover, linearized solutions obtained from the linearized equations can come from the linearization of some exact solutions. Please see the diagram in [21] that depicts this commumativity.

So the necessary and sufficient condition for linearization stability is that (35) should not constrain the first order solutions \(({\hat{a}}_{\mu },h_{\mu \nu })\) and it should determine the second order solutions \(({\hat{b}}_{\mu },k_{\mu \nu })\) up to gauge transformations. But clearly this is very hard to check for all linear solutions of the theory, so in what follows let us find a weaker (necessary) condition. This condition will be in the form of an integral whose purely gravitational analog is called the Taub charge [25] and see the following recent discussion [26]. From (35), we have

$$\begin{aligned}&\intop _{\Sigma }d^{3}x~\sqrt{{\bar{\gamma }}}\,\text {Tr} \left( \bar{{\hat{\xi }}}^{s}(D_{\mu }{\hat{F}}^{\mu 0})^{(1)}\cdot ({\hat{b}},k)\nonumber \right. \\&\quad \left. +\bar{{\hat{\xi }}}^{s}(D_{\mu }{\hat{F}}^{\mu 0})^{(2)}\cdot ({\hat{a}}^{2},h^{2},{\hat{a}}h)\right) =0. \end{aligned}$$
(36)

The first term in the integrand is of the same form as the first order term \(\left( D_{\mu }F^{\mu 0}\right) ^{(1)}\cdot ({\hat{a}},h)\), albeit now evaluated at the second order fields instead of the first order ones. So, obviously this piece can be written as a boundary term as (29) with the substitution \(({\hat{a}},h)\rightarrow ({\hat{b}},k)\).

The second term in the integrand requires more work, it is not clear at all if it can be written as a boundary integral. Nevertheless, to write some parts of \((D_{\mu }{\hat{F}}^{\mu 0})^{(2)}\cdot ({\hat{a}}^{2},h^{2},{\hat{a}}h)\) as a boundary term, we use the explicit form of the second order expansion (22):

$$\begin{aligned}&(D_{\mu }{\hat{F}}^{\mu \nu })^{(2)}\cdot ({\hat{a}}^{2},h^{2},{\hat{a}}h) = {\bar{D}}_{\mu }\left( ({\hat{F}}^{\mu \nu })^{(2)}+\frac{\tau }{2}({\hat{F}}^{\mu \nu })^{(1)}h\right. \nonumber \\&\qquad \left. +\frac{\tau ^{2}}{4}\bar{{\hat{F}}}^{\mu \nu }(k-h_{\rho \sigma }h^{\rho \sigma })\right) -\frac{\tau }{2}h{\bar{D}}_{\mu }({\hat{F}}^{\mu \nu })^{(1)}\nonumber \\&\qquad +\lambda [{\hat{a}}_{\mu },({\hat{F}}^{\mu \nu })^{(1)}]+\frac{\lambda ^{2}}{2}[{\hat{b}}_{\mu },\bar{{\hat{F}}}^{\mu \nu }], \end{aligned}$$
(37)

where

$$\begin{aligned}&({\hat{F}}^{\mu \nu })^{(2)}=\frac{\lambda ^{2}}{2} \left( {\bar{D}}^{\mu }{\hat{b}}^{\nu }-{\bar{D}}^{\nu }{\hat{b}}^{\mu }+2\left[ {\hat{a}}^{\mu },{\hat{a}}^{\nu }\right] \right) \nonumber \\&\qquad +\tau \lambda \left( h^{\nu \sigma }({\bar{D}}_{\sigma }{\hat{a}}^{\mu }-{\bar{D}}^{\mu }{\hat{a}}_{\sigma })+h^{\mu \sigma }({\bar{D}}^{\nu }{\hat{a}}_{\sigma }-{\bar{D}}_{\sigma }{\hat{a}}^{\nu })\right) \nonumber \\&\qquad +\frac{\tau ^{2}}{2}\left( \bar{{\hat{F}}}^{\mu \sigma }(2h^{\nu \lambda }h_{\lambda \sigma }-k_{\sigma }^{\nu })\nonumber \right. \\&\qquad \left. -\bar{{\hat{F}}}^{\nu \sigma }(2h^{\mu \lambda }h_{\lambda \sigma }-k_{\sigma }^{\mu })+2\bar{{\hat{F}}}_{\sigma \rho }h^{\mu \sigma }h^{\nu \rho }\right) . \end{aligned}$$
(38)

Inserting this expression into (37) obtains

$$\begin{aligned}&\left( D_{\mu }F^{\mu \nu }\right) ^{(2)}\cdot ({\hat{a}}^{2},h^{2},{\hat{a}}h)={\bar{D}}_{\mu }\hat{\mathcal {X}}^{\mu \nu }\nonumber \\&\quad -\frac{\tau }{2}h{\bar{D}}_{\mu }({\hat{F}}^{\mu \nu })^{(1)}+\lambda [{\hat{a}}_{\mu },({\hat{F}}^{\mu \nu })^{(1)}], \end{aligned}$$
(39)

where we have introduced an antisymmetric field, \(\hat{\mathcal {X}}^{\mu \nu }\), to express the result in a more compact form. Direct calculation yields

$$\begin{aligned} \hat{\mathcal {X}}^{\mu \nu }&=\frac{\tau }{2}({\hat{F}}^{\mu \nu })^{(1)}h+\lambda ^{2}\left[ {\hat{a}}^{\mu },{\hat{a}}^{\nu }\right] -\frac{\tau ^{2}}{4}\bar{{\hat{F}}}^{\mu \nu }h_{\rho \sigma }h^{\rho \sigma }\nonumber \\&\quad +\tau ^{2} \left( \bar{{\hat{F}}}^{\mu \sigma }h^{\nu \lambda }h_{\lambda \sigma }-\bar{{\hat{F}}}^{\nu \sigma }h^{\mu \lambda }h_{\lambda \sigma }+\bar{{\hat{F}}}_{\sigma \rho }h^{\mu \sigma }h^{\nu \rho }\right) \nonumber \\&\quad +\tau \lambda \left( h^{\nu \sigma }({\bar{D}}_{\sigma }{\hat{a}}^{\mu }-{\bar{D}}^{\mu }{\hat{a}}_{\sigma })+h^{\mu \sigma }({\bar{D}}^{\nu }{\hat{a}}_{\sigma }-{\bar{D}}_{\sigma }{\hat{a}}^{\nu })\right) . \end{aligned}$$
(40)

Then from (39), one finds

$$\begin{aligned}&\text {Tr}\left( \bar{{\hat{\xi }}}^{s}(D_{\mu }{\hat{F}}^{\mu 0})^{(2)}\cdot ({\hat{a}}^{2},h^{2},{\hat{a}}h)\right) ={\bar{\nabla }}_{i}\text {Tr}\left( {\bar{\xi }}^{s}\hat{\mathcal {X}}^{i0}\right) \nonumber \\&\quad -\frac{\tau }{2}\text {Tr}\left( \bar{{\hat{\xi }}}^{s}h{\bar{D}}_{i}({\hat{F}}^{i0})^{(1)}\right) +\lambda \text {Tr}\left( \bar{{\hat{\xi }}}^{s}[{\hat{a}}_{i},({\hat{F}}^{i0})^{(1)}]\right) . \end{aligned}$$
(41)

Since \(\text {Tr}\bigl (\bar{{\hat{\xi }}}^{s}[{\hat{a}}_{i},({\hat{F}}^{i0})^{(1)}]\bigr )=\text {Tr}\bigl ([({\hat{F}}^{i0})^{(1)},\bar{{\hat{\xi }}}^{s}]{\hat{a}}_{i}\bigr )\), we have

$$\begin{aligned}&\intop _{\Sigma }d^{3}x~\sqrt{{\bar{\gamma }}}\text {Tr}\left( \bar{{\hat{\xi }}}^{s}(D_{\mu }{\hat{F}}^{\mu 0})^{(2)}\cdot ({\hat{a}}^{2},h^{2},{\hat{a}}h)\right) \nonumber \\&\quad =\intop _{\Sigma }d^{3}x~\partial _{i}\left( \sqrt{{\bar{\gamma }}}\text {Tr}\bigl (\bar{{\hat{\xi }}}^{s}\hat{\mathcal {X}}^{i0}\bigr )\right) \nonumber \\&\qquad +\lambda \intop _{\Sigma }d^{3}x~\sqrt{{\bar{\gamma }}}\text {Tr}\left( [({\hat{F}}^{i0})^{(1)},\bar{{\hat{\xi }}}^{s}]{\hat{a}}_{i}\right) \nonumber \\&\qquad -\frac{\tau }{2}\intop _{\Sigma }d^{3}x~\sqrt{{\bar{\gamma }}}\text {Tr}\left( \bar{{\hat{\xi }}}^{s}h{\bar{D}}_{i}({\hat{F}}^{i0})^{(1)}\right) . \end{aligned}$$
(42)

If we use the first order equation

$$\begin{aligned}&{\bar{D}}_{i}({\hat{F}}^{i0})^{(1)}=\frac{\tau }{2}{\bar{D}}_{i}\bigl (h\bar{{\hat{F}}}^{i0}\bigr ) +\lambda [{\hat{a}}_{i},\bar{{\hat{F}}}^{i0}], \end{aligned}$$
(43)

Equation (42) reduces to

$$\begin{aligned}&\intop _{\Sigma }d^{3}x~\sqrt{{\bar{\gamma }}}\text {Tr}\left( \bar{{\hat{\xi }}}^{s}(D_{\mu }{\hat{F}}^{\mu 0})^{(2)}\cdot ({\hat{a}}^{2},h^{2},{\hat{a}}h)\right) \nonumber \\&\quad =\intop _{\Sigma }d^{3}x~\partial _{i}\left( \sqrt{{\bar{\gamma }}}\text {Tr}\bigl (\bar{{\hat{\xi }}}^{s}\hat{\mathcal {X}}^{i0}\bigr )\right) \nonumber \\&\qquad +\lambda \intop _{\Sigma }d^{3}x~\sqrt{{\bar{\gamma }}}\text {Tr}\left( [({\hat{F}}^{i0})^{(1)},\bar{{\hat{\xi }}}^{s}]a_{i}\right) \nonumber \\&\qquad -\frac{\tau ^{2}}{8}\intop _{\Sigma }d^{3}x~\partial _{i}\left( \sqrt{{\hat{\gamma }}}\text {Tr}\bigl (\bar{{\hat{\xi }}}^{s}h^{2}\bar{{\hat{F}}}^{i0}\bigr )\right) . \end{aligned}$$
(44)

So from (36) we arrive at

$$\begin{aligned}&\lambda \intop _{\Sigma }d^{3}x~\sqrt{{\bar{\gamma }}}\text {Tr}\left( [({\hat{F}}^{i0})^{(1)},\bar{{\hat{\xi }}}^{s}]a_{i}\right) =\int _{\partial \Sigma }d^{2}x~\sqrt{{\bar{\beta }}}{\mathcal {I}}, \end{aligned}$$
(45)

where we know \({\mathcal {I}}\) from (36) and (44) explicitly so we need not depict it again. Consider now the case for which all the fields decay sufficiently fast, such that the boundary term on the right-hand side vanishes, or the case when the hyperspace is compact without a boundary (\(\partial \Sigma =0\)), then we get an integral constraint in the bulk for the linearized solutions:

$$\begin{aligned} \intop _{\Sigma }d^{3}x~\sqrt{{\bar{\gamma }}}\text {Tr}\left( [({\hat{F}}^{i0})^{(1)},\bar{{\hat{\xi }}}^{s}]{\hat{a}}_{i}\right) =0, \end{aligned}$$
(46)

which reads explicitly as

$$\begin{aligned} \intop _{\Sigma }d^{3}x~\sqrt{{\bar{\gamma }}}\text {Tr}\left( [{\bar{D}}^{i}{\hat{a}}^{0}-{\bar{D}}^{0}{\hat{a}}^{i},\bar{{\hat{\xi }}}^{s}]{\hat{a}}_{i}\right) =0. \end{aligned}$$
(47)

This is not satisfied for generic solutions. Hence in a spacetime for closed hypersurfaces, the theory is generically linearization unstable.

4 Conclusions

We have constructed the gauge-invariant conserved electric and magnetic charges in Yang–Mills theory in a dynamical curved background generalizing the flat spacetime construction of Abbott–Deser [1]. Electric charges arise from the field equations, while the magnetic charges arise from the Bianchi identity. The crucial ingredient is the symmetry of the background gauge field that solves the curved space Yang–Mills equation. For the gravity part one can take any geometric theory of gravity based on the Riemannian geometry, but to be concrete we chose the cosmological General Relativity. To be able to define the electric and magnetic charges, besides the mentioned symmetry of the background gauge field, as defined by \(\delta _{\xi }A_{\mu }={\bar{D}}_{\mu }\xi =0\), one also needs a time-like Killing vector for the spacetime which we assumed. Our results in curved spacetime reduces to the flat spacetime expressions in the correct limit.

We have also studied the linearization instability issue in the Gravity-Yang–Mills theory and established a second order integral constraint that must be satisfied by any solution of linearized Yang–Mills theory in a spacetime with closed (compact without boundary) spatial hypersurfaces. We have not discussed the linearization instability in the gravity sector as it was recently done in [21] and described in great detail in the thesis [23].