Anomaly inflow and thermal equilibrium

Using the anomaly inflow mechanism, we compute the flavor/Lorentz non-invariant contribution to the partition function in a background with a U(1) isometry. This contribution is a local functional of the background fields. By identifying the U(1) isometry with Euclidean time we obtain a contribution of the anomaly to the thermodynamic partition function from which hydrostatic correlators can be efficiently computed. Our result is in line with, and an extension of, previous studies on the role of anomalies in a hydrodynamic setting. Along the way we find simplified expressions for Bardeen-Zumino polynomials and various transgression formulae


Introduction
Anomalies are a fascinating and unavoidable feature of quantum field theory. Their presence has been studied in great detail over the last forty-odd years leading to an improved understanding of the behavior of quantum field theories in general (via, e.g., the 't Hooft anomaly matching condition, or the Green-Schwarz mechanism) in addition to observable phenomena as predicted by the standard model (such as the pion decay rate). Quite surprisingly, little is known about the effect of anomalies in thermodynamic states or in configurations which are close to thermodynamic equilibrium. Indeed, the past several years have seen a small revolution in our understanding of the dynamics induced by anomalies. Much of this success has been in the context of anomalyinduced response, by which we mean the part of the thermodynamic response of symmetry currents and energy-momentum that owes its existence to the presence of anomalies . This effect has been studied in diverse arenas, from relativistic hydrodynamics to the physics of topologically non-trivial edge states (see, for instance, [30]). For instance, anomaly-induced transport leads to the manifestation of the chiral magnetic effect and chiral vortical effect in hydrodynamics [31].
At nonzero temperature, a generic field theory has a finite number of gapless degrees of freedom which correspond to the relaxation of conserved quantities. Hydrodynamics is the universal long-wavelength effective theory which describes the evolution of those gapless modes as well as their response to a (slowly varying) background gauge field and metric. We may take the fields of hydrodynamics to be the parameters which describe the equilibrium state: a temperature T , a local rest frame characterized by a timelike vector u µ satisfying u 2 = −1 which we refer to as the velocity field, and if the theory includes a conserved charge, a local chemical potential µ. These (classical) fields are referred to as the hydrodynamic variables.
In what follows, we will be interested in a certain subset of solutions to the hydrodynamic equations of motion (i.e., energy and charge conservation) which we will refer to as hydrostatic configurations. Roughly speaking, hydrostatic configurations may be thought of as timeindependent solutions to the hydrodynamic equations of motion in the presence of a slowly varying time independent background gauge field and metric. We refer the reader to Section 2 for a more precise definition of hydrostatic configurations and Section 5 for an extensive discussion. The virtue of hydrostatic configurations, in the present context, is that their physical content is captured by a generating functional W QF T which is local in the background sources [17,32]. In other words, the entire dependence of the stress tensor and charge current on the hydrodynamic fields and sources is captured by W QF T . All of the anomaly-induced response studied in the literature can be characterized by its effect on correlation functions in a hydrostatic configuration i.e., by its effect on variations of W QF T with respect to the background gauge field and metric. 1 For instance, one can argue that the zero frequency two point function of the covariant current and stress tensor of a 3 + 1 dimensional theory with a U (1) 3 anomaly characterized by a coefficient c A and a mixed gauge-gravitational anomaly characterized by a coefficient c m are given uniquely by [22,23,33] in the small momentum limit. 2 This statement can be rephrased more elegantly in terms of the helicity [26]. Given the momentum operator P and the angular momentum operator L, the thermal helicity L · P per unit volume of a 4d quantum field theory is given by −6T (8π 2 c m T 2 µ + c A µ 3 ). We emphasize that the relation (1.1) is valid only for normal fluids. The thermal helicity for fluids which have gapless degrees of freedom beyond the hydrodynamic modes (such as superfluids or zero-temperature Fermi liquids) takes a different form [9,15,21]. We refer the reader to Section 7 and [34] for further discussion.
In the presence of anomalies the variation of W QF T with respect to sources is not gauge invariant. Therefore, it is useful to decompose W QF T into a gauge-invariant term and a non-gauge-invariant term which we will refer to as an anomalous term, 3 W QF T = W gauge−invariant + W anom . (1.2) Since W anom is responsible for the non-gauge-invariance of W QF T it depends explicitly on the anomalies of the theory. Somewhat surprisingly, there are also contributions to W gauge−invariant which are uniquely fixed by the anomalies. For instance, in the 3 + 1 dimensional example described in Equation (1.1) the T 2 term is of the latter type while the µ 2 term is of the former type [23]. To make the distinction between the two types of contributions of anomalies to the generating function more explicit we split W gauge−invariant into a contribution which is completely fixed by the anomalous content of the theory which we refer to as W transcendental and a non-anomalous contribution, W gauge−invariant = W transcendental + W non−anomalous . All known contributions of the anomaly to hydrostatic configurations, to date, are completely determined by W anom and W transcendental . For theories in 1 + 1 and 3 + 1 dimensions both contributions to the generating function have been computed [5,8,17,19,23,25,35]. In this work we will obtain an explicit expression for W anom in arbitrary dimensions, and formulate it in such a way so that the evaluation of W transcendental can be simplified. We leave a study of W transcendental to a future publication.
To be more precise, in this work we will construct W anom for global anomalies by which we mean conservation laws which become anomalous only in the presence of external background fields. Thus, we exclude from our analysis anomalies associated with gauge symmetries such as the Axial-Vector-Vector anomaly of the standard model. For anomalies associated with gauge symmetries expressions of the form (1.1) generally receive quantum corrections [22,34,36].
In a general state it is impossible to write down a local Lorentz invariant expression for the anomalous contribution to the generating function since that would imply that with a judicious choice of counterterms one may get rid of the anomaly altogether. However, when the background sources have an isometry direction then it is possible to obtain an explicit local expression for W anom . In hydrostatic configurations we have such an isometry direction by definition, namely time. The local expression may be constructed as follows. Consider the anomaly polynomial P of a 2n-dimensional theory. (We fix our conventions for P in Appendix B, where we also provide a review of the anomaly inflow mechanism.) This polynomial is a formal 2n + 2 form which is a polynomial in the Riemann tensor two-form R µ ν = 1 2 R µ νρσ dx ρ ∧ dx σ , where R µ νρσ is the Riemann curvature tensor, and field strength F = 1 2 F µν dx µ ∧ dx ν . Both R µ ν and F are constructed from the Christoffel connection Γ µ ν = Γ µ νρ dx ρ and gauge connection A = A µ dx µ . We will adopt a notation where form fields are given by boldface characters. From the anomaly polynomial one may construct a Chern Simons form I CS via P = dI CS . This Chern-Simons form is a polynomial in the connections and field strengths. From the connections A and Γ we can construct the hatted connectionsÂ where we have now defined (µ R ) µ ν = T D ν u µ T and u = u µ dx µ , along with the covariant derivative D µ . These hatted connections give rise to hatted field strengthsR µ ν andF . From the hatted connections one can construct a hatted Chern-Simons formÎ CS defined viâ I CS = I CS (Â,Γ,F ,R). The physical reasoning behind the construction of these hatted connections which may seem somewhat mysterious at this point will be elaborated on in Section 5.
To construct W anom , consider the 2n + 2 form u ∧ I CS −Î CS . As we will argue in the main text this 2n + 2 form is a polynomial in the vorticity two-form ω = 1 2 ω µν dx µ ∧ dx ν (with ω µν = PµρPνσ 2 (D ρ u σ − D σ u ρ ) and P µν = g µν +u µ u ν a projection matrix) which vanishes when we set ω = 0. In equations, u ∧ I CS −Î CS = n k=0 c k ∧ (2ω) k+1 , where c k is a 2(n − k) form. Our claim is that W anom is given by the integral of the 2n form − n k=0 c k ∧ (2ω) k . More formally, we write With W anom at hand one may now compute the anomalous contribution to the consistent stress tensor and current T µν anom = 2 √ −g δW anom δg µν , J µ anom = 1 √ −g δW anom δA µ , (1.5) or any correlation function thereof. The non-gauge-invariance of W anom implies that the anomalous current and stress tensor also fail to be gauge-invariant. As argued by Bardeen and Zumino [37], one may always construct a covariant stress tensor and current by adding appropriate compensating currents T µν BZ and J µ BZ which are polynomials in the connections and field strengths, We derive explicit and succinct expressions for the BZ polynomials and anomalous Ward identities in terms of the Chern-Simons form I CS and anomaly polynomial P in Appendix B and C.
A second construction which we elaborate on in this paper allows us to obtain the covariant anomaly-induced stress tensor and current, T µν P and J µ P without carrying out the explicit variation of W anom . More explicitly we claim that given an anomaly polynomial P, one can construct the formal 2n + 1 form from which we take derivatives to obtain T µν P and J µ P as (1.8) In writing (1.8) we have represented the flavor current J µ P , heat current q µ P , and (L P ) ρµ ν in terms of their Hodge duals (we review our conventions for the Hodge star operator in Appendix I), and have defined the magnetic flavor field and magnetic curvatures where P µν ≡ g µν + u µ u ν is the transverse projector to the velocity vector. The anomalyinduced covariant stress tensor is given by where the curved and straight brackets indicate symmetrization or anti-symmetrization, (1.11) For pure U (1) anomalies, it was previously observed in [11] that one can generate the anomalyinduced currents using a functional V P in exactly the same way as in (1.8).
In order to make our work self-contained, we begin with a sequence of pedagogical sections (Sections 2-4). In Section 2 we bring the reader up to speed on hydrostatics. We then re-derive known results regarding abelian anomalies using a novel framework which we will later apply to more general anomalies. In Section 5 we give a more extensive and modern discussion of hydrostatics including its covariant formulation and the role of hatted connections. A proof of (1.4) and (1.8) for arbitrary anomalies, including gravitational ones, is presented in Section 6. We conclude by discussing our results as well as prospects for future work in Section 7. Many of the technical details have been relegated to the Appendices.

A minimalist's introduction to hydrostatics
Consider the hydrodynamic equations for a fluid placed in a slowly varying time-independent background. The background consists of a gauge field A µ and metric g µν which we refer to as external sources. A hydrostatic configuration is a time-independent solution of these equations which is a local functional of these sources. We take it as a fundamental postulate that such a configuration exists.
The simplest example of hydrostatic equilibrium is a fluid configuration in flat space where all hydrodynamical fields are constant, i.e., thermodynamic equilibrium. When a fluid is placed on a generic time-independent background, we expect it to relax to a hydrostatic configuration at late times. Note that in a generic background spatial gradients of the hydrodynamic fields will not vanish. For instance, a hydrostatic configuration in the presence of a time-independent electric field has charge density gradients.
The energy-momentum and charge distributions in hydrostatics are most efficiently summarised by a local generating functional W QF T [g µν , A µ ] of the time-independent sources . This 'hydrostatic' generating function is closely related to a Euclidean partition function W E [17,32].
Let K µ be the time-like Killing vector of the time independent background. We will choose a coordinate system where K µ ∂ µ = ∂ t (While our current formulation involves choosing a particular time direction, in Section 5 we will consider a covariant formulation of hydrostatics.) The Killing vector K µ can be used to define a Euclidean partition function Z E . This is done by Wick-rotating the time direction, compactifying it with coordinate periodicity β, and imposing thermal boundary conditions around the resulting thermal circle. The logarithm of Z E will give us the Euclidean generating functional W E for the connected correlation functions of the theory, For slowly varying backgrounds, we can "un-Wick rotate" W E to get the hydrostatic generating function W QF T , defined earlier.
The procedure outlined above then fixes the hydrostatic temperature, chemical potential and velocity profile in terms of the background sources to be up to a change of hydrodynamic frame. All other hydrodynamic quantities are constructed out of the hydrodynamic variables in (2.2) together with the sources A µ and g µν . The expansion, acceleration vector, vorticity tensor, shear tensor, and electric and magnetic fields are respectively given by where P µν = g µν + u µ u ν and d is the number of space-time dimensions. In form notation we can write The fact that the system is in equilibrium, i.e., Equations (2.2) together with the timeindependence of all fields, imposes various interrelations between the fields which imply that the field configuration is dissipationless [32]. We have These equations imply that the system is in thermal and chemical equilibrium and, moreover, that the shear and expansion vanish, σ µν = 0 and ϑ = 0. In this work we will often use hatted connections, e.g.,Â = A + µu (see Equation (1.3)) and the corresponding electric and magnetic field dÂ = u ∧Ê +B. The virtue ofF = dÂ is that in hydrostatic equilibrium, the field strengthF is transverse to the velocity field where we have used (2.5). We return our attention to the hydrostatic generating functional W QF T . In the absence of gauge and gravitational anomalies the generating function, W QF T will be constructed from the most general gauge invariant and coordinate reparametrization-invariant combination of the fields T , µ and u µ (as given in (2.2)) and the background fields g µν and A µ . It is often useful to organize the possible contributions to W QF T in a derivative expansion. We refer the reader to [17,23,32] for further details.
For a theory with anomalies, the Wess-Zumino consistency conditions demands that W QF T must exhibit a particular anomalous variation under gauge and coordinate transformations [38]. As a result W QF T takes the form of a gauge and diffeomorphism-invariant term plus an extra, additive, and local contribution which we denote by W anom . This additive term is not gauge and diffeomorphism-invariant and is constructed in such a way to correctly reproduce the anomalous variation of W QF T . An explicit construction of W anom for arbitrary anomalies in arbitrary dimensions is one of the main results of this paper.

Partition functions for theories with abelian anomalies
Consider the hydrostatic generating functional W QF T for a 2n-dimensional theory with a U (1) anomaly. We may decompose W QF T into a gauge-invariant contribution and an anomalous contribution, The separation in (3.1) is somewhat arbitrary since there is an equivalence class of expressions for W anom under the addition of local gauge-invariant terms. In this work we advocate for a particular representative for W anom given in (1.4) where I CS = c A A ∧ F n is the Chern-Simons term associated with the abelian anomaly, and I CS = c AÂ ∧F n is the Chern-Simons form evaluated for the hatted connectionÂ = A + µu.
The appearance of the hatted connection might seem a bit mysterious at this point. In section 5 we attempt to elucidate its origin. As we will now argue W anom correctly reproduces the anomalous gauge variation of the hydrostatic theory and therefore also reproduces existing results in the literature [17,19,39]. Consider the anomaly inflow mechanism of Callan and Harvey [40]; we place our 2n dimensional field theory on the boundary of a 2n + 1 dimensional space-time M. We denote the generating functional of the 2n-dimensional theory as W QF T . On M and its boundary ∂M we can define a covariant generating functional The generating function W cov is gauge invariant while the Chern-Simons term I CS is gauge invariant up to boundary terms. The charge associated with this gauge invariance is conserved in M but may be deposited on the boundary ∂M rendering W QF T anomalous. Alternately, the reader familiar with Hall insulators may regard the second term on the right hand side of (3.3) as the action of a 2n + 1-dimensional Hall insulator. In the presence of background electromagnetic fields, Hall insulators carry edge currents on their boundary. In this instance the edge current is the (covariant) charge current of the field theory on ∂M. Under a gauge variation δ Λ A = dΛ the Chern-Simons form varies as where in the last equality we have written the boundary term in a way that will be easier to generalize to more complicated non-abelian and gravitational anomalies. The gaugeinvariance of W cov in (3.3) then gives Meanwhile, the anomalous variation of W CS gives In going from the second line to the third we have used that and similarly for the derivative of the hatted Chern-Simons form. We also used the formal identity valid when acting on a polynomial of at least degree one in ω, which we will now prove. Consider du = 2ω − u ∧ a where a = a µ dx µ is the acceleration 1-form. Then, By (1.4), (3.6) becomes The second term in the integrand is In hydrostatic equilibriumF = B + 2ωµ is a purely spatial form (see (2.6)). It then follows that the 2n-formF n vanishes in 2n-dimensions since it has no leg along the time direction, so that the gauge variation of W anom is given by which is the desired result (3.5).
We have shown that the expression (1.4) from the Introduction reproduces the correct anomalous variation of the hydrostatic W QF T for abelian anomalies. The proof that W anom reproduces the correct anomalous variation of W QF T can be extended to gravitational and non-abelian anomalies. In Section 5 we introduce, among other things, the non-abelian and spin chemical potential (µ R ) which are the non-abelian and gravitational counterparts of the chemical potential µ used in this section. Using these chemical potentials one can define corresponding hatted connections,Â µ andΓ µ νρ , which allow us to construct W anom for general anomalies.

Abelian anomaly-induced transport
We turn our attention from the anomalous gauge variation of W QF T to the study of the anomaly induced energy-momentum and U (1) flavor currents. The consistent current and stress tensor can be computed by varying the generating function W QF T , In the previous section we found an explicit expression for W anom which reproduces the anomalous gauge variation of W QF T . We proceed to compute the anomaly-induced charge current and stress tensor, i.e., the current and stress tensor that follow from varying W anom , It is possible (and not too difficult) to compute the anomalous contribution to the consistent current and stress tensor, J µ anom and T µν anom , by explicitly varying W CS . We do this in Appendix E.
By construction, the consistent current J µ varies under gauge transformations [37]. 4 However, it is possible to add to the consistent current a polynomial in A µ and F µν , the Bardeen-Zumino (BZ) polynomial J µ BZ , such that J µ cov = J µ + J µ BZ , the covariant current, is invariant under gauge transformations. Rather than varying W CS and computing the Bardeen Zumino currents to obtain the covariant currents we elect to take a more straightforward approach; the covariant current can be computed by varying W cov defined in (3.3) directly, In what follows we carry out this variation. Before varying W cov , it is useful to decompose the bulk Chern-Simons form I CS in a specific way. Using d u 2ω = 1, we have The non gauge invariance of J µ follows from δΛδWQF T = δδΛWQF T implying that d 2n x √ −g δAµδΛJ µ = − Λ ∂I CS ∂A + (Boundary terms) where we have used (3.5). We refer the reader to Appendix B for a more careful derivation.
where we have used dI CS = P, P(F ) = c A F n+1 is the anomaly polynomial, andP = P(F ). To avoid cluttering (4.4) we have used P andP in place of P(F ) and P(F ). In the remainder of this Section we will continue to use these conventions, i.e., P = P(F ) andP = P(F ). Equation (4.4) can be rewritten in the form where we have defined From (4.6), V P is a gauge-invariant 2n+1-form constructed out of u, ω, F andF . Using (2.3) we may decompose the field strength F into an electric part and a magnetic part, allowing us to write V P in the form Thus we may regard V P as a functional of u, ω, B, and µ. Both of these representations of V P , (4.6) and (4.8), will prove useful. In the time-independent gauge which we are working in, bothÂ andF are spatial forms. Consequently the 2n + 1-formÎ CS = c AÂ ∧F n has no leg along the time-direction and therefore vanishes in 2n + 1 dimensions. RemovingÎ CS from (4.5) and using (3.1) and (3.3) we obtain The decomposition (4.5) thereby leads to a rewriting of W cov in terms of manifestly gaugeinvariant objects. Equation (4.9) implies that the covariant current and stress tensor will get contributions from both W gauge−invariant and V P . The variation of V P leads to bulk and boundary currents, viz., where we have denoted the contribution to the boundary stress tensor and current by T µν P and J µ P . Let us regard V P as a functional of u, ω, B, and µ as in (4.8). In varying V P we need to convert the variations of ω and B to variations of u and A via an integration by parts, (4.11) The boundary variation of V P arises entirely from this integration by parts. We find δV P = d δA ∧ ∂V P ∂B u,ω,µ + δu ∧ ∂V P ∂(2ω) u,B,µ + (bulk contributions) . From (4.12) we find the covariant anomaly-induced flavor current and heat current where ⋆ is the Hodge star operator on the boundary. Our conventions for the Hodge star operator may be found in Appendix I. Converting variations of u to variations of the metric using (2.2) gives from which we obtain Let us see how this machinery works in detail by recomputing the U (1) 3 anomaly-induced transport in four dimensions [5]. For a theory with anomaly polynomial P = c A F 3 , we have which leads to the currents Hodge dualizing the currents in (4.17) leads to (4.18) In (7.6) we have summarized the hydrodynamic constitutive relations to first order in derivatives. We relate these results to the existing literature in Section 7. Our general result (4.13) and (4.15) is valid for U (1) anomalies in even spacetime dimensions. It matches the anomaly-induced current and stress tensor computed using entropy arguments [10,11] or using the hydrostatic generating functional [39]. Further, in [11] it was observed that one can generate the anomaly induced currents using a generating function V P a' la (4.13). The current section allows one to interpret V P as the bulk contribution to the covariant generating function.
The main results of this section are equations (4.13) and (4.15), which describe the anomaly-induced flavor current and stress tensor. In the remainder of this work we will develop the technical machinery required to generalize (4.13) and (4.15) to non-abelian and gravitational anomalies. We begin with a somewhat detailed and covariant exposition of hydrostatics before discussing that generalization.

More on hydrostatics
In the hydrodynamic limit, states of the system are characterized by hydrodynamic fields whose kinematic behavior is determined via energy-momentum conservation and charge conservation. In what follows we will consider a specialized subset of configurations which we call hydrostatic configurations that will be defined below.

Generalities
Consider a field theory with a global symmetry group G and algebra g. Following our convention earlier in the text, we refer to this symmetry as a "flavor" symmetry and to the corresponding symmetry current as a "flavor" current. Hydrodynamics can be thought of as a long wavelength approximation of a state of this theory which is close to thermal equilibrium. The hydrodynamic variables describing the evolution of the fluid are a velocity field u µ , a local temperature T , and a local chemical potential µ for the flavor charge. We place our fluids in a non-trivial but slowly varying background, described by a metric g µν and an external gauge field A µ which couples to the flavor current. The chemical potential µ and external gauge field A µ may be regarded as matrices in flavor space. We use a '·' to denote a trace over flavor indices. In what follows we choose an anti-Hermitian basis for the generators T A of the adjoint representation of g, so that we notate e.g. the g-valued chemical potential µ as µ ≡ −iµ A (T A ). 5 From A µ we construct the background field strength where matrix multiplication is implicit. Under a gauge transformation parameterized by Λ, the fields µ, A µ and F µν transform according to In coupling the fluid to the metric, we must also specify the connection. For simplicity we study fluids coupled to the Christoffel connection We construct the Riemann curvature from the connection via In a background with nonzero chemical potential, the flavor symmetry is effectively broken to the subgroup which commutes with µ. As a result the hydrodynamic limit is encoded in the response of the stress-energy tensor and the symmetry currents of the unbroken subgroup. For a typical chemical potential the unbroken subgroup is the Cartan subgroup, and so it is common practice to write thermodynamics with a non-abelian flavor symmetry G in terms of thermodynamics with a number of U (1) symmetries (see e.g. [8]). However this cannot be consistently done in a hydrostatic or hydrodynamic state. In this work we will be interested in the full structure of the global symmetry and so we retain the (potentially) non-abelian nature of the flavor symmetry.
Using the Christoffel and gauge connections we extend the definition of D µ so that it denotes a flavor and spacetime covariant derivative. For instance, consider a tensor V µ ν which transforms in the adjoint representation of the flavor symmetry. Then D µ acts on V µ ν as and similarly when the tensor has more indices.
Consider an infinitesimal coordinate transformation ξ µ and gauge transformation Λ; we collectively notate the transformation as χ = {ξ µ , Λ} and the variation as δ χ . Under this transformation, a covariant tensor θ µ ν in the adjoint representation of g varies as For later use, we find it useful to rewrite (5.6) in terms of arbitrary connectionsÃ µ ,Γ µ νρ (not necessarily A µ or the Christoffel connection) and their associated covariant derivativẽ D µ . After some algebra one finds where we have defined the torsionT µ νρ =Γ µ ρν −Γ µ νρ . We can use this result to deduce the transformation properties of ξ µ and Λ under a gauge and coordinate transformation as follows. We demand that δ χ 1 θ µ ν , being a covariant tensor transforming in the adjoint representation of g, varies under a second transformation χ 2 as After some algebra one finds This motivates the definitions so that we can write the algebra obeyed by coordinate and flavor gauge transformations as [δ χ 1 , δ χ 2 ] = δ χ [12] .

A covariant formulation of hydrostatic equilibrium
Suppose our field theory is coupled to a background metric g µν and gauge field A µ , both of which are invariant under the action of a time-like Killing vector K µ and gauge transformation Λ K , Our main postulate, as phrased in section 2 is that there exists a solution to the conservation equations of our field theory which respect the symmetry generated by K and is a local function of the sources. We call such a configuration a hydrostatic state. In Section 2 we introduced hydrostatic equilibria in a particular gauge and coordinate choice where the background fields were explicitly time-independent (the "transverse gauge") i.e., K µ = (1, 0, . . . , 0). While it is convenient to carry out computations in the transverse gauge, it is often useful to use a covariant formation of hydrostatics, especially when dealing with gravitational anomalies. In analogy with (2.2) we define the temperature, T , velocity field u µ and chemical potential µ via where β is the parametric length of the time circle. Since T , u µ and µ are constructed from the background fields and symmetry generators, they are invariant under the action of the symmetry. In particular, the chemical potential transforms covariantly due to We also define the matrix-valued spin chemical potential (µ R ) µ ν which in terms of K µ becomes (5.14) The spin chemical potential is the equivalent of the flavor chemical potential when constructing gravitational anomalies. 6 We elaborate on this point later in this Section (for example see (5.21) and (5.23)) and in Appendix G.
A particular realization of the transverse gauge which we have worked with in Section 2 can be constructed as follows. Let us take the metric and gauge field to be of the form g = −e 2s (dt + a) 2 + p ij dx i dx j , where a ≡ a i dx i . All the metric and gauge-field components are functions of x i but are assumed to be independent of t. It is straightforward to verify that the metric and gauge field above satisfy the Killing conditions (5.11) with K µ ∂ µ = ∂ t and Λ K = 0. The particular gauge (5.15) was introduced in [17] and its significance in writing the hydrostatic generating functional and hydrodynamics was studied in detail there.
Using (5.12) the explicit expressions for the local temperature, fluid velocity, and chemical potential are We also note in passing that p ij is equivalent to the projection matrix P µν , The physical interpretation of A i will be described shortly.

The electric-magnetic decomposition
Motivated by the results in Section 4 we use the local fluid velocity u µ to decompose the various covariant tensors into "electric" and "magnetic" parts. For instance, we decompose the background flavor field strength F µν into an electric flavor field E µ ≡ F µν u ν and a flavor magnetic field which is transverse to u µ , It is easily checked that B µν u ν = 0 and hence the magnetic field can be thought of as the transverse part of the field strength. We refer to this as an "electro-magnetic" decomposition insofar as E µ and B µν describe the electric and magnetic fields in the local fluid rest frame. We decompose the exterior derivative of the fluid velocity ∂ µ u ν − ∂ ν u µ in a similar way: the acceleration a µ and vorticity ω µν are given by The definitions (5.18) definitions coincide with the usual ones (2.3) in the absence of torsion. We see that the acceleration and vorticity are the fluid analogues of a local electric and magnetic field respectively. Our next step is to mimic this construction in gravity. As it turns out, it is most convenient to regard the Riemann tensor as a matrix-valued antisymmetric two-tensor. That is, we treat the first two indices of the Riemann tensor as matrix indices and the last two indices as spacetime indices. We then decompose the last two indices into electric and magnetic parts just as we did for F µν : the electric and magnetic parts part of the Riemann tensor are This magnetic Riemann tensor is transverse in its last two indices (B R ) λ σµν u ν = 0. 7 As we mentioned in Section 2, the quantities in (5.12) and (5.14) obey certain differential interrelations. These may be obtained from the condition (5.11) that {K µ , Λ K } generates a symmetry of the background fields. To see this, write Assuming that K generates a symmetry, we then have which reproduces the conditions (2.5) described earlier together with in close analogy with the equation of chemical equilibrium (D µ + a µ )µ = E µ . Note that if we have covariant fields {T, u µ , µ} that satisfy these equations, then we can define symmetry data {K µ , Λ K } from them. As a result, solutions to (5.22) are in one-to-one correspondence with geometries possessing a timelike symmetry.

Hatted connections
Many of the quantities above can be more easily manipulated when written as differential forms. We follow the notation of Section 2 and notate form fields with a boldface font. We 7 Unfortunately, there are many other notions of electric-magnetic decomposition of gravitational tensors which are prevalent in this context. The first one, which often goes by the name of 'gravito-magnetism' involves a decomposition of the connection Γ while the second one, more familiar in general relativity , is the electric-magnetic decomposition of the Weyl tensor (a closely related decomposition is the so called Bel decomposition of the Riemann tensor). We will be using none of those notions in this paper and the reader interested in comparisons with other literature is warned to be mindful of these distinctions. As will become clear later on, the electric-magnetic decomposition we describe in this section is the one relevant to questions about transport -in particular, this is the most convenient decomposition to study gravitational anomalies at finite temperature.
begin by writing the velocity co-vector as a one-form, u = u µ dx µ . From its exterior derivative du we obtain the acceleration and vorticity as where in a slight abuse of notation we refer to ι u as the interior product along the vector u µ ∂ µ . The background gauge field may be written as a one-form A = A µ dx µ , from which the field strength is defined as where matrix multiplication is implied. The electric and magnetic flavor fields are To treat the gravitational quantities efficiently we write the Christoffel connection as a matrix-valued one-form whose non-abelian field strength is the Riemann curvature (regarded as a matrix-valued twoform) The electric and magnetic curvatures then take the same form as the electric and magnetic flavor fields, Finally, we can define the exterior covariant derivative D. In this work we require the action of D on p-forms V which transform in the adjoint representation of g, as well as on matrix valued p-forms V µ ν transforming in the adjoint of g, We are now in a position to introduce hatted connections (1.3), which play a critical role in this work. In terms of forms, the hatted connections arê The hatted connections, and the quantities constructed from them exhibit a number of useful properties. Consider the hatted field strengths, which may be decomposed into electric and magnetic parts. Following the previous subsection, we haveF = u ∧Ê +B , However, upon using (5.22) and (5.23) we see that the hatted electric fields vanish, so that the hatted field strengths are purely transverse, Physically, the hatted electric fields encode the violation of chemical and spin equilibrium. While the hatted field strengths are transverse to the velocity field the hatted connections are generally not transverse to the velocity. The transverse parts ofÂ µ andΓ µ νρ are given byÂ Nevertheless, one can always switch to a transverse gauge where the hatted connections are In the transverse gauge the hatted flavor connection iŝ In our covariant analysis we showed that the hatted field strengthF is a transverse form. We can easily recover that result in transverse gauge, sinceÂ is independent of time and has no leg along the time direction. Consequently, the hatted field strengthF also has no leg along the time direction, which is equivalent to the statement thatF is transverse. Similarly sincê Γ µ νρ is transverse and independent of time, the hatted curvatureR µ ν is also transverse.

The Euclidean partition function
Often, it is useful to Wick rotate a hydrostatic configuration to Euclidean signature. To this end we define Euclidean time via t = −it E and associate with every function of t a function of t E such that these two functions are restrictions of a single analytic function in the lower half of the complex t-plane. This is easily accomplished in the transverse gauge where all the components of the metric and gauge-fields are t-independent and hence their analytic continuation is trivial. For instance, so that the analytically continued metric and gauge field become Similalry, under Wick rotation, the Killing vector becomes K µ ∂ µ = i∂ t E ; the Killing vector along the Euclidean time is actually −iK µ in our notation. We have deliberately adopted a notation where the metric takes the same form before and after Wick rotating. The advantage of such a notation is that we can continue to use the Lorentzian expressions in the Euclidean theory except for the fact that the temporal components are taken to be imaginary. 8 In what follows, we will continue to think of the Euclidean theory in such a Lorentzian notation. almost all the expressions in the previous subsection then carry over to the corresponding Euclidean expressions. We now compactly the Euclidean time direction by making the periodic identification t E ∼ t E + β along the imaginary time. Put differently, we identify two points on the integral curves of the Killing vector K µ provided they are separated by affine distance β-two points along the curves satisfying are identified if they are separated by ∆λ = β. We refer to the integral orbits of the Killing vector as the thermal circles. It is interesting to note that in our new language, the geometry of the Euclidean spacetime is that of a fibre bundle, where the fibres are the thermal circles. The base manifold of the fibre bundle is the transverse space described by the x-coordinates. As before, we identify the temperature, fluid velocity, and flavor chemical potential as in (5.12), although in the transverse gauge we have Λ K = 0 and so the chemical potential becomes Similarly the spin chemical potential in transverse gauge is given by Note that the Euclidean metric here is not really Riemannian but is actually complex when the metric is not static (when a = 0 ). So, the adjective 'Euclidean', though commonly employed, is an abuse of terminology. We will however, following the common convention, continue to use the adjective 'Euclidean' ignoring this fact.
where we have used that the Christoffel connection is torsionless, Γ µ νρ = Γ µ ρν and that ∂ ν K µ = 0 in transverse gauge. The Euclidean partition function is related to the thermal partition function via Z E = tr exp(−βH) , (5.44) with an appropriate definition of the Hamiltonian. See Appendix H for further discussion.
We can now use the Euclidean partition function to compute hydrostatic expectation values of the stress tensor and current. The consistent flavor current and stress-energy tensor are defined by variation of the generating functional W QF T = −i ln Z E with respect to the gauge field and metric respectively. For theories with gravitational anomalies, we find it useful to carry out the variation with respect to the metric in two stages. We first consider the metric and connection as independent, keeping in mind that this separation is somewhat artificial. This gives where, as usual, we have notated a trace over flavor indices with a '·'. The tensor L ρν µ is the "spin current" which we have alluded to earlier. It will frequently be useful to regard it as a matrix-valued one-form, The variation of the connection n terms of the variation of the metric is given by Thus, integrating (5.45) by parts we find where the stress tensor T µν is given by In the last equation the round (square) brackets indicate (anti-)symmetrization This decomposition of the stress-energy tensor is naturally related to the Mathisson-Papapetrou-Dixon equations which treat point torques in a gravitational setting [41][42][43] which review in Appendix G.
When the background fields are slowly varying (over length scales longer than the static screening length), the equilibrium state is hydrostatic. As discussed in [17,32], since the hydrostatic configuration is slowly varying one can argue that all correlation functions of the theory may be expanded in a power series in derivatives of the sources. Thus, in the absence of anomalies the generating function for connected correlators of a hydrostatic configuration can be constructed as a local gauge and diffeomorphism invariant functional of the hydrostatic fields {T, u µ , µ}, the sources g µν and A µ , and covariant derivatives thereof. From the point of view of hydrodynamics, the fields {T, u µ , µ} comprise a time-independent solution of the hydrodynamic equations of motion in a particular choice of hydrodynamic frame, known as the thermodynamic frame [32]. In the presence of anomalies this generating functional needs to be appropriately modified. This is the content of the next section.

Non-abelian, gravitational and mixed anomalies
In the previous Section we have developed some technology which will allow us to put gravitational anomalies on a similar footing as U (1) anomalies in our analysis of Sections 3 and 4. We now go on to consider anomalies of all stripes. Our goal in this Section is to obtain a simple expression for the generating functional of equilibrium covariant currents W cov , which we then vary to obtain the anomaly-induced response. Some of the formal manipulations that will be carried out in this Section can be understood from the anomaly inflow mechanism and do not depend on the existence of a time-independent equilibrium. In order to avoid confusion we will often emphasize those equalities which are valid only in equilibrium.
Let W QF T be the generating functional of our quantum field theory. According to the anomaly inflow mechanism [40], the non gauge and reparametrization invariance of W QF T can be captured by thinking of the manifold on which our 2n dimensional quantum theory lives on as a boundary of a higher, 2n + 1, dimensional manifold M. The anomalies of the field theory are encoded in a Chern-Simons form I CS [A, Γ] which is the generating functional on M. Using I CS , we define the generating functional of the 2n + 1-dimensional theory to be (3.3), The generating functional W cov is gauge and diffeomorphism-invariant. As a result the total flavor charge and energy-momentum currents are conserved, but they may flow from the bulk into the boundary ∂M, which from the perspective of W QF T leads to an anomaly. Mimicking the construction in Sections 3 and 4, we use the hatted connections (5.32) to write where we have used d u 2ω = 1 (see (3.10)) along with dI CS = P and dÎ CS =P (for P = P[F , R] the anomaly polynomial of the theory). We remind the reader thatÎ CS and P are the Chern-Simons form and anomaly polynomial evaluated for the hatted connections.
Using (6.2) the covariant generating functional is then given by We now exploit the fact that, in hydrostatic equilibrium and in a transverse gauge, all of the hatted connections and curvatures are transverse to u. As a result, the 2n+1-dimensional formÎ CS does not have a leg along the time direction and so its integral over the 2n + 1dimensional manifold M vanishes. Thus, in equilibrium, In contrast to the 2n+1-form V P , W CS explicitly depends on the connections A and Γ µ ν and is neither gauge-invariant nor diffeomorphism-covariant. Separating W QF T into an anomalous and gauge invariant contribution Equation (6.6) proves the claim made in the Introduction regarding the existence and form of a local expression for W anom . With this choice of representative We have obtained (6.7) in the transverse gauge. However, since W cov is gauge and diffeomorphism invariant and since both terms on the right hand side of (6.7) are also gauge and diffeomorphism invariant, then the expression (6.7) is valid in any gauge and coordinate choice (provided the system is in equilibrium).
In the rest of this Section we will vary W cov to obtain the equilibrium anomaly-induced transport. When the equilibrium state is hydrostatic, this response is the part of the hydrodynamic constitutive relations due to the anomalies. The reader interested in obtaining the consistent currents generated by varying W anom is referred to Appendix E. According to (6.7), the covariant anomaly-induced currents follow from the variation of V P To obtain explicit expressions for J µ P , t µν P , and L µνρ P , it is helpful to rewrite V P in the form The second equality follows by arguing that only the transverse parts of P andP contribute to V P , and that the hatted curvatures are given by (5.37) to be the transverse formsB = B + 2ωµ andB R = B R + 2ωµ R . In rewriting V P in the form (6.10) it becomes transparent that V P may be considered as a function of B, µ, B R , µ R , u, and ω (moreover, it should also be clear that the expression inside the brackets vanishes at zero vorticity, so that we may consistently act on it with the operator u/(2ω).) Therefore, under a general variation, V P varies via the chain rule as We are interested in the contribution of the variation to boundary terms. To this end let us write the variations of ω, B, and B R in terms of derivatives of δu, δA, and δΓ, Since ∂V P /∂B, ∂V P /∂(2ω), and ∂V P /∂(B R ) ν µ each have a leg along u, we find Comparing (6.13) with (E.13), we find (6.14) In Appendix E we show explicitly that the bulk terms correctly reproduce the bulk flavor and spin currents that correspond to the Chern-Simons form I CS .
Up to this point, we have presented a functional form for W anom and have shown that it correctly reproduces the anomalous variation of W QF T . However, the curious reader may be somewhat puzzled as to the why a local W anom should exist and to the origin of the hatted connections that were so crucial in W anom 's construction. In the remainder of this Section we will discuss the physical origin of W anom and the hatted connections as well as the relation between our construction and transgression formulae.
On general grounds one does not expect to be able to capture the anomaly by a local term in the generating function. The key ingredient which allows for such a term in our setup is that in the transverse gauge, the generating functional for a hydrostatic state is a local functional on the 2n − 1-dimensional spatial slice [17,32]. This essentially follows from analytically continuing to the Euclidean theory and dimensionally reducing on the thermal circle. For a theory with a finite static screening length, such a dimensional reduction generates an effective 2n − 1-dimensional theory with a mass gap. Hydrostatic response may then be described by a local generating function on the spatial slice. When the 2n-dimensional theory has anomalies, the theory on the spatial slice will necessarily be anomalous under gauge and/or coordinate transformations. However, in odd dimensions any local gauge or coordinate variation of W QF T may be removed by the addition of a suitable local counterterm. Thus we are guaranteed that a local W anom exists in hydrostatic equilibrium.
We now turn to the relation between W anom , the hatted connections and transgression formulae. To understand this relation it is useful to back up a step and consider a general (non-equlibrated) configuration of background fields. That is, we no longer demand that the background fields are invariant under the action of a timelike symmetry K. Consider two sets of background fields {A 1 , g 1 } and {A 2 , g 2 }, from which we construct the corresponding field strengths {F 1 , R 1 } and {F 2 , R 2 } and so the anomaly polynomials and Chern-Simons forms evaluated on the "1" or "2" connections. To save space, we notate these as It is a classic result that one may construct a gauge and coordinate-invariant functional where V 12 may be given an integral expression in terms of a flow in the space of connections Similarly, the difference of Chern-Simons forms is given by where W 12 explicitly depends on both sets of connections and may be expressed in terms of a double integral in the space of connections. We reproduce the construction of V 12 and W 12 in Appendix D. These results are collectively known as "transgression formulae" of the first and second kind respectively and are useful when studying the relation between anomalies and algebraic topology. For instance, when the "1" and "2" connections differ by a gauge transformation, the integral of V 12 calculates the phase picked up by W cov , which must be 2πi times an integer so that the theory is invariant. In such an instance V 12 computes a topological invariant of the bundle in which the connections live. By (6.17), the difference of Chern-Simons terms I 1 −I 2 varies under a gauge or coordinate transformation by a boundary term given by the variation of W 12 . As a result, the integral of W 12 almost gives a 2n-dimensional functional which reproduces the anomalies of W QF T . Indeed, if we denote the variation of W QF T under a gauge/coordinate transformation δ λ as That is, the anomalous variation of − W 12 reproduces the variation of W QF T were it coupled to the "1" background, minus the variation it would exhibit if it were coupled to the "2" background.
Let us return to hydrostatic equilibrium. In our construction, we also introduced two sets of connections: the physical ones {A, Γ µ ν } which we coupled to our field theory, and the hatted connections. We relate our hatted and unhatted connections to transgression upon the identification and similarly for the gravitational connection. Crucially, in the transverse gauge the hatted connections are transverseÂ µ u µ = 0 andΓ µ νρ u ρ . Additionally, G λ is a 2n-form given by a sum of wedge products of the connections with themselves and the field strengths. As a result G λ = G λ [Â,Γ] vanishes in transverse gauge, in which case the anomalous variation of W QF T when coupled to the background {A, Γ} is reproduced by the local functional − W 12 , just like − W CS . Indeed, one can show that W CS is precisely W 12 under the identification (6.20). Similarly, we have V P = V 12 .
In summary, the mechanism behind our construction of W anom and V P is the transgression machinery of e.g. [44][45][46], applied to the physical connections {A, Γ} to which we coupled our field theory and the hatted connections (5.32) built from them. The hatted connections are special because, in hydrostatic equilibrium, one can go to a gauge where they are completely transverse. In that case the boundary term W 12 in the decomposition (6.17) provides a representative for W anom , which is, of course, the one given in (1.4).

The relation to hydrodynamics
Our results (6.6) and (6.14) describe anomaly-induced response in equilibrium. In this Section we make contact with recent developments in fluid mechanics and the macroscopic manifestation of anomalies in hydrodynamics. Among other things, the following section provides an example where the computational simplicity of the formalism established in this paper is made clear. It also sets the stage for a companion paper [47] which will summarize a much more subtle form of anomaly-induced response.
In Section 1 we briefly summarized hydrodynamic theory. When studying a many body system at distances which are much larger than the typical mean free path, the effective degrees of freedom are a local temperature T , a local rest frame characterized by the timelike vector u µ satisfying u 2 = −1, and a local chemical potential µ. Taking these fields as well as the background metric g µν and gauge field A µ to be slowly varying, one expands the energy-momentum tensor T µν cov and current J µ cov in a gradients of the hydrodynamic and background fields. The relation between the hydrodynamic fields and background sources and the conserved currents are called the constitutive relations.
The hydrodynamic variables are then determined by treating the Ward identities for T µν cov and J µ cov as equations of motion. To construct the Ward identities we must identify the anomalies of the theory. In four dimensions there are two types of anomalies, pure flavor anomalies, and mixed flavor-gravitational anomalies. For simplicity, consider a theory with a single U (1) flavor symmetry which has both types of anomalies. These are encoded in the anomaly polynomial where the coefficients c A and c m describe the strength of the flavor and mixed anomalies respectively. In a theory with a functional integral description with chiral fermions they are given by where χ i = ±1 indicates the fermion chirality (in our conventions right-handed fermions have χ i = 1) and q i denotes the fermion U (1) charge. In a four-dimensional theory with the anomaly polynomial (7.1), the anomalous Ward identities are The constitutive relations for the current and stress tensor have been worked out in detail (see e.g [23]). Let us decompose them into irreducible representations of the rotational invariance which fixes u µ , where P µν = g µν + u µ u ν , ν µ u µ = q µ u µ = τ µν u ν = τ µν g µν = 0 . To first order in derivatives, the constitutive relations are parameterized by where we have defined The quantity P is the pressure, η the shear viscosity, σ the conductivity, and ζ the bulk viscosity. Equation (7.6) is the most general one compatible with the symmetries of the system as well with the equations of motion of ideal hydrodynamics. However, further constraints arise when we demand the existence of an entropy current [9,48]. That is, we demand the existence of a current whose divergence is positive for fluid flows which solve the Ward identities (7.3) (and in a thermodynamic equilibrium in the absence of external sources it reduces to the entropy density times the velocity field). Solving this constraint leads to a set of relations between the parameters appearing in (7.6). 9 The equality type relations are given by wherec is a constant and we have dropped CPT-violating terms [8,17,18]. The inequalitytype constraints on the remaining parameters are Before proceeding, we note that the equality-type constraints for {ξ 1 , ξ 2 , ξ 3 } in (7.7) are unusual from the point of view of the entropy current. They are in stark contrast with equality-type relations as they usually appear in hydrodynamics, which allow for hydrostatic response parameterized by unspecified functions of state. As an example, consider (2 + 1)-dimensional parity-violating fluids at first order in derivatives [49]. Six new response coefficients are allowed in such a system, four of which may be measured in equilibrium (in the notation of [49] they are {χ E ,χ T ,χ B ,χ Ω }); those four response coefficients obey two equality-type relations, whose solution is given by two arbitrary functions of state. In this sense, the equality-type constraints for {ξ 1 , ξ 2 , ξ 3 } are qualitatively different from standard equality-type constraints as they ordinarily appear in hydrodynamics. Correspondingly, the constants c A andc appear in the hydrostatic generating functional in a unique way relative to other response coefficients. The special role played by c A shouldn't be a surprise: c A is an anomaly coefficient and so occupies a special role in both the conservation equations of hydrodynamics and in W anom . The role ofc is also special, as we now discuss.
The equality constraints (7.7) may also be determined by the properties of hydrostatic states. In hydrostatic equilibrium, the expansion and shear tensors vanish, D µ u µ = 0 and σ µν = 0 as does the Einstein term E µ − T P µν D ν µ T = 0. As a result the remaining terms in (7.6) are allowed in equilibrium, and so the corresponding response parameters χ E , χ T , ξ 1 , ξ 2 , and ξ 3 are computed by the hydrostatic generating functional W QF T . Writing down the most general CPT-preserving W QF T to one-derivative order, one finds [23] The current T 2 ω µ is conserved in equilibrium, and as a result the term proportional toc is gauge-invariant provided thatc is constant. In fact, in transverse gauge this term becomes a Chern-Simons term on the spatial slice (see [23] for details). In this way, the somewhat unusual presence of the constantc in the response (7.7) may be understood naturally from the point of view of W QF T :c is just a Chern-Simons coefficient on the spatial slice.
To obtain W anom we follow the prescription of Section 6. We first identify the Chern-Simons term associated with the anomaly polynomial (7.1). This can be done via transgression formula as described in Appendix D; As it turns out, there are various equivalent Chern-Simons forms that one may use to describe the U (1) 3 and mixed anomalies. One can choose the Chern-Simons form in such a way that W CS is diffeomorphism-invariant but not gauge-invariant, giving Defining a trace over matrix-valued forms to be we see that the corresponding forms V P and W CS are given by and Note the similarity between the flavor and mixed anomaly terms in W CS . From W CS we construct the anomalous contribution to the generating functional, W anom Our representatives for the anomalous contribution to the generating function specified by equations (7.14) agrees with results obtained previously in the literature. The contribution from the U (1) 3 anomaly is identical to the one found in [17,23] while the contribution of the mixed anomaly agrees with that found in [23] up to a gauge and coordinate-invariant expression. Denoting the representative for the anomalous part of W QF T in [23] as W A , we find Varying the generating functional (7.9) and adding appropriate Bardeen-Zumino terms, one obtains T µν cov and J µ cov in terms of P , T , µ,c 4d , and c A . As described in the text, a simpler way of obtaining the covariant currents is to vary V P as in (6.14), which leads directly to the covariant currents are given by the expressions The contribution of the U (1) 3 anomaly to the stress tensor and currents agree with those in the literature [5] while the mixed anomaly-induced currents differ from those computed in Appendix B of [23] by the variations of the right hand side of (7.15). Upon matching (7.18) to the hydrodynamic constitutive relations (7.6) , one finds precisely the equality-type conditions (7.7). In particular, the terms proportional to the U (1) 3 anomaly coefficient c A are computed by the corresponding terms in the anomaly-induced currents in (7.18). If we were to extend this analysis to include terms in W QF T with up to three derivatives, we would find a plethora of higher derivative contributions to T µν cov and J µ cov . These would include the mixed anomaly-induced currents proportional to c m in (7.18), which give rise to three-derivative terms in the covariant current and stress tensor.
Note that by constructionc is not encoded in our choice of representative for W anom or V P . In that sense it is not obviously related to the anomalies of the underlying theory. However, arguments that go beyond hydrodynamics [22,23] have verified a conjecture based on calculations at weak [35] and strong coupling [50] thatc is related to the mixed anomaly coefficient asc = −8π 2 c m . (7.19) We see that anomalies appear in W QF T in two very different ways: (i.) through our representative W anom encoding the anomalous variation of W QF T , and (ii.) through the Chern-Simons-like term in W QF T (7.9) proportional toc (and its analogues in other dimensions).
We elaborate on the case of four-dimensional theories because it serves as a template for the story in general dimension. Motivated by the four-dimensional results, we are led to decompose W QF T into three parts as where W trans is defined to be the sum of the Chern-Simons-like terms in W QF T . In four dimensions this is just the term proportional toc in (7.9). This uniquely specifies W trans up to boundary terms. In general, we also choose the representative W anom so that it and W gauge−invariant have vanishing Chern-Simons-like coefficients; one can check that our represenative (1.4) for W anom does just this. Upon variation of W anom and W trans , we obtain the anomaly-induced transport: the terms in the current and stress tensor which are fixed by anomalies. We further distinguish the response due to W anom and W trans by terming the former rational anomaly-induced transport, and the latter transcendental anomaly-induced transport. We call the latter trascendental due to the relative factor of π 2 betweenc and c m . One might worry that such a division is contrived, but from (7.7) we see that it is physically well-motivated: the rational anomaly-induced transport (proportional to c A ) is temperature-independent, while and the transcendental response (proportional toc) is proportional to powers of the temperature.
To summarize, the methods of this paper may be used to easily compute the anomalous part W anom of the hydrostatic generating functional W QF T . Varying W anom leads to the rational anomaly-induced transport. Transport associated with rational terms may also be determined by demanding the existence of an entropy current with positive divergence and extracting the terms in the consequent constitutive relations which are explicitly proportional to anomaly coefficients. 10 However, W trans and so the transcendental anomaly-induced transport is presently uncomputed. We calculate it in an upcoming paper [47]

A Ward identities in the absence of anomalies
In this Appendix, we will state some of the basic results regarding various currents and their associated conservation equations as derived from a generating functional. The results are standard and the reader is encouraged to skim through this subsection paying special attention to how we define spin currents, as it will be useful later.
Let e iW QF T [g,A] denote the partition function of a quantum field theory living in d spacetime dimensions coupled to a background metric g µν . We will take the metric to be in Lorentzian signature, though later on, we will Wick-rotate this metric in order to get the thermal partition function. In addition, we will assume that the background has profiles for various non-abelian flavor gauge fields (i.e., sources for flavor currents) jointly denoted by A µ .
The diffeomorphism and flavor gauge invariance of this generating functional leads to conservation equations for the stress tensor and the flavor current. Let us outline how this relation works in a non-anomalous theory and we will then carefully adopt it to anomalous theories in Appendix C.
By varying the connected generating function W QF T [g, A] with respect to the flavor gauge field and metric we obtain the current and stress tensor, Throughout the Appendices and in the main text we find it useful to carry out the variation of the metric in a two stage process. We first treat the connection and metric as separate entities, under which the generating functional varies as Then, to get T µν we rewrite δΓ µ νρ in terms of δg µν and integrate by parts, Here circular (square) brackets indicate (anti-)symmetrization, The conservation of the stress tensor and current follow from the diffeomorphism and gauge invariance of W QF T . Indeed, let us denote the variation under an infinitesimal gauge transformation Λ and coordinate transformation ξ µ by δ χ , i.e., Then, using (A.5) and integrating by parts, we find that Thus, The diffeomorphism/flavor gauge invariance of W , δ χ W = 0, directly implies the conservation equations for the flavor current J µ and stress tensor T µν , where in the last line we have added in the statement that T µν is symmetric (which is equivalent to the conservation of angular momentum). Thus, we conclude that the flavor currents and angular momentum are covariantly conserved and the energy-momentum is covariantly conserved except for the energy-momentum injected via Lorentz force. Further, substituting (A.9) into (A.6), we get the Noether identity This implies that whenever we place the quantum field theory on a symmetric background with δ χ A µ = 0 and δ χ g µν = 0, there is a Noether current N µ χ which is conserved. Note that the Ward identities in (A.9) are related to, but conceptually distinct from the Noether conservation law (A.10) that arises when the background sources are invariant under diffeomorphism/flavor transformations, i.e., when there exists a {ξ µ , Λ} such that {δ χ A µ = 0, δ χ g µν = 0}. As we will discuss later, this Noether conservation can hold sometimes even when the conservation laws above get modified by anomalies.

B Anomaly inflow
The anomaly inflow mechanism of Callan and Harvey [40] plays a pivotal role in our construction of functions W CS and V P described in detail in Section 6. In this Appendix, after reviewing the anomaly inflow mechanism we obtain various compact expressions for Hall and Bardeen-Zumino currents associated with anomalies. (For a nice discussion of anomaly inflow in the context of condensed matter physics, see e.g. [51].) As discussed in Section 6, the non gauge and reparametrization-invariance of the generating functional W QF T in 2n dimensions can be encoded in a 2n + 1 dimensional Chern-Simons form. Indeed, if we think of the 2n dimensional manifold on which the anomalous quantum field theory lives as the boundary of a 2n + 1 dimensional manifold M, then the non gaugeand (or) diffeomorphism-invariance of W QF T amounts to the statement that the covariant generating functional W cov defined via (3.3), is gauge and (or) diffeomorphism invariant. Thus, We remind the reader that bold-face characters label p-forms and refer her/him to Section 5 for the definitions of the connection one-forms A and Γ. In labeling the Chern-Simons action with a "Hall" subscript, we indicate that this bulk action is reminiscent of the action of a Hall insulator. The reader who is unfamiliar with Hall systems may safely ignore this association.
The currents J µ and T µν obtained by varying W QF T would have been conserved if it were not for the non-gauge and (or) diffeomorphism invariance of W QF T . Following the literature, we refer to these currents as consistent currents since W QF T satisfies the Wess-Zumino consistency condition [38].
We refer to the currents on M which are obtained by varying W Hall as Hall currents and denote them by T µν H and J µ H . Since W Hall is gauge invariant up to boundary terms the Hall currents are conserved. However, the currents obtained from the boundary variation of W Hall are neither conserved nor are they covariant. We will refer to these currents as Bardeen-Zumino currents (which we will also refer to as Bardeen-Zumino polynomials), T µν BZ and J µ BZ . More formally, we write the variation of W Hall as where we have extended the boundary metric g on ∂M to a metric G on M. Note that since W Hall only depends on the metric G through the connection Γ, there is only a flavor current J H and a spin current L H . In terms of forms we can rewrite the variation of W Hall as We also define covariant currents as boundary variations of W cov , J µ cov and T µν cov , From (3.3) we find that the covariant currents are the sum of the consistent currents and Bardeen Zumino currents, Because W cov is both gauge and diffeomorphism-invariant, J µ cov and T µν cov are indeed gauge and diffeomorphism-covariant as their name advertises. However, they are not conserved. See Figure 1.
where we have suppressed wedge products for brevity. Under a general variation of the connections δA and δΓ a b , the curvatures vary as from which we obtain In (B.9) we have defined the action of D on the non-covariant quantities ∂I CS /∂F and ∂I CS /∂R a b as if they were covariant forms, namely (B.10) Taking an exterior derivative of both sides and using dδI CS = δP we find that Since P does not depend explicitly on A or Γ we conclude that Combining these results leads to the useful identities Thus, follows. In (B.16) we have kep the variables which are kept fixed in the subscript for completeness. The identities (B.14) then amount to the fact that the Hall flavor and spin currents are covariantly conserved, where the last property follows from applying the first Bianchi identity. In order to go from the spin currents to the Hall and Bardeen-Zumino stress-energy tensors, we convert the variation of the Levi-Civita connections δΓ b a and δΓ ν µ to variations of the metric. This leads to a Hall stress tensor (B.18) Going back to the variation of W Hall and integrating the variations of Γ by parts, we can write which defines the Bardeen-Zumino (BZ) polynomials J µ BZ and T µν BZ . The BZ polynomial for the stress tensor is related to the L BZ and the Hall spin current as where the ⊥ direction is perpendicular to the boundary ∂M. The t µν BZ contribution to the Bardeen-Zumino stress tensor arises from integrating parts in the bulk. It is a covariant, purely extrinsic contribution, in the sense that it involves the curvature forms R a ⊥ and R ⊥ a on the hypersurface ∂M where our theory lives. Put differently, it provides information on how ∂M is embedded into M. In what follows we consistently set these extrinsic terms to zero. In field theory terms, the anomalies of our theory only depend on the intrinsic 2ndimensional sources which we couple to the theory. 11 As a result, the BZ polynomial for the stress tensor may be understood as coming from a BZ polynomial for the spin current.

C Ward identities in the presence of anomalies
In this Appendix we will obtain the anomalous Ward identities for a general theory with anomaly polynomial P. We will obtain the Ward identities obeyed by the consistent currents as well as by the covariant currents.
We begin with the most general variation of the generating functional W QF T for our theory given by equation (A.1) which we reproduce here for convenience.
To obtain the Ward identities, we perform an infinitesimal gauge transformation Λ and coordinate variation x µ → x µ + ξ µ , which we collectively notate as δ χ (see (A.5)) and we obtain as in (A.8). For non-anomalous theories we have δ χ W QF T = 0 and so (C.2) leads to the standard Ward identities for the current and stress tensor as in (A.9). When our theory has anomalies the nonzero variation of W QF T is related to the nonzero variation of the Chern-Simons form in one higher dimension via where W Hall = M I CS was studied in Appendix B.
To continue we must determine the explicit gauge and diffeomorphism variation of the Chern-Simons form. Since the Chern-Simons form is defined in one higher dimension we must extend the gauge and coordinate variations on the boundary to variations in the bulk. The gauge and coordinate variations of the connections and curvatures may be efficiently written in terms of forms as where £ ξ is a Lie derivative along ξ, Λ is the gauge transformation parameter and v a b is defined as the 0-form The operators £ ξ , and [·, Λ] (meaning the adjoint action of Λ on a tensor in some representation of the flavor symmetry group) all satisfy linearity and the Leibniz rule and so act like derivatives on objects constructed out of differential forms. As a result we have Since I CS is a flavor singlet it must satisfy [I CS , Λ] = 0. The Lie derivative £ ξ I CS is a total derivative since I CS is a top form, and so only contributes a boundary term which in fact vanishes. Putting together (B.7) (for a gauge and diffeomorphism variation), (C.4) and (C.6) we find (C.7) The Chern-Simons form is gauge and coordinate invariant up to a boundary term. It then follows that the bulk variations in the second line of (C.7) must vanish, We are now in a position to derive the Ward identities for the consistent currents. Using (C.7), and (C.3) the gauge and coordinate variation of W QF T is given by (C.10) Equation (C.8) implies that the 2n forms ⋆ J and ⋆ T µ ν are closed. Comparing (C.9) with (C.2) leads to the consistent Ward identities (C.11) where J and T ρ ν are given by (C.10). To compute the Ward identities obeyed by the covariant currents it is useful to first identify the Hall currents in (B.19) and then carry out the variation (C.4). obtaining where T ⊥µ H is a component of the Hall stress tensor and we have dropped extrinsic terms in the final expression. Equating (C.9) and (C.12) leads to the Bardeen-Zumino anomaly equations where are given by (B.16). Note that the covariant anomalies are given by transverse components of the Hall current and stress-energy tensor-this is essentially a consequence of the anomaly inflow mechanism, wherein the total current and stress-energy is conserved, but may flow from the bulk to the boundary.
Before closing this discussion, we point out that one may define a conserved covariant stress tensor which is conserved by virtue of the Ward identity (C.15). However this stress tensor is clearly non-symmetric. This result corresponds to the fact that a diffeomorphism anomaly, which is manifested in the non-conservation of stress-energy, may be exchanged for a Lorentz anomaly, whereby the stress tensor has an antisymmetric part in the presence of background fields.

D Transgression formulae
At the end of Section 6 we briefly mentioned the transgression technique and its relation to the anomaly polynomial and the Chern-Simons form. Historically, transgression was useful in completing the classification of anomalies in general dimension as well as for understanding their connection to topological invariants (see e.g. [44][45][46]). In this Appendix we will rederive the transgression formulae of the first and second kind as well as relate them to the functionals V P and W CS studied in this work. We begin by consider a flow of connections {A(τ ), Γ(τ )} which vary with a real flow parameter τ . The associated field strengths are closed under the covariant derivative D(τ ) constructed from these connections, The anomaly polynomial P(τ ) = P(F (τ ), R(τ )) evaluated for these connections then satisfies on account of the fact that P(τ ) is a polynomial of the field strengths F (τ ) and R µ ν (τ ). We also have

(D.4)
Note that ∂ τ A(τ ) and ∂ τ Γ µ ν (τ ) are given by differences of connections. As a result these derivatives are gauge and diffeomorphism-covariant and so it makes sense to define the action of D(τ ) on them. Collecting these results, by the chain rule, τ -derivatives of the anomaly polynomial P(τ ) are given by where in going from the first line to the second we have used (D.3). This immediately gives .

(D.6)
This provides an integral expression for the difference of the anomaly polynomial evaluated for the connections at the endpoints of integration τ 2 and τ 1 . Without loss of generality, we may consider a flow along the interval τ ∈ [0, 1] which interpolates between the connections Defining the shorthand expressions where we have defined P i to be the anomaly polynomial evaluated on the "i" connections. Equation (D.9) is the transgression formula of the first kind, giving the difference of P i 's in terms of an integral V 12 as we claimed in our discussion at the end of Section 6 near Equation (6.16). We can use this technology to construct a transgression formula for the Chern-Simons form P = dI CS . We simply take the "1" connections to be the ones of interest, A 1 = A, Γ 1 = Γ, and take the "2" connections to vanish. Then (D.9) gives which defines a "canonical" Chern-Simons form. However, unlike the anomaly polynomial, the Chern-Simons form I CS is better understood as a representative of an equivalence class in which we identify I CS ∼ I CS + dH. These total derivatives are sometimes important. For instance, when an anomaly is mixed between a gauge symmetry and a global symmetry as in the AV V anomalies of the Standard Model, just such a term dH may be used to define the Chern-Simons form (and so W QF T ) in a way that is invariant under the gauge symmetry, but anomalous under the global symmetry. In that context H is known as a Bardeen counterterm [37]. The net result is that while (D.10) provides a canonical expression for I CS , we find it to be more useful to consider more general Chern-Simons forms I CS .
Having dispensed with these comments about I CS , we proceed to derive the transgression formula of the second kind. .

(D.11)
To simplify these expressions we exploit the identities (B.13), which in the present context are .

(D.12)
Then (D.11) becomes . (D.13) Inspired by (D.8) we define . (D.14) We then integrate (D.11) with respect to τ to give Specializing to the flow (D.7) along τ ∈ [0, 1] between the "2" and "1" connections, the above difference of Chern-Simons forms becomes where we recognize the bulk term to be V 12 as earlier, and we define W 12 in the obvious way. This is the transgression formula of the second kind. In writing (D. 16), we have explicitly demonstrated our claim at the end of Section 6 that the difference of Chern-Simons forms I 1 − I 2 may be decomposed as in (6.17). Incidentally, if we used the canonical Chern-Simons form (D.10), then the integral for W 12 may be represented as a double integral over flows of connections. We conclude this Appendix by relating the transgression formulae above to our V P and W CS . To do so we relate our hatted and unhatted connections to those above by assigning so that the connections along the flow are given by (D.7) to be The corresponding field strengths may be decomposed into electric and magnetic parts as in Subsection 5.3 to give where D is the usual covariant derivative defined using the connections {A, Γ}. Since both ∆A and ∆Γ are longitudinal, the integral for V 12 in (D.9) becomes . (D. 19) This expression may be simplified even further by viewing P(τ ) as a functional of B(τ ) and B R (τ ) alone, i.e. P(τ ) = P(F = B(τ ), R = B R (τ )). With this identification, (D.19) then becomes Now note that, when acting on functionals of B(τ ) and B R (τ ), the chain rule gives us .

(D.21)
This allows us to simplify (D.19) enormously to become where we have used that u ∧ P(B, B R ) = u ∧ P(F , R) and similarly for the hatted connections. Of course this is the expression for V P we quoted in the Introduction in (1.7). We may simplify W 12 similarly. Under the identification (D.17), the integral for it in (D.16) becomes .

(D.25)
This allows us to enormously simplify the expression (D.23) for W 12 as where we have used that the terms involving derivatives with respect to A(τ ) and Γ(τ ) are proportional to u ∧ u = 0 and that u ∧ I(τ 1 ) = u ∧ I CS , u ∧ I(τ 2 ) = u ∧Î CS . This final expression is the one we quoted in Section 6 for W CS in (6.2).

E Computing the variation of V P and W CS
In the main text we have argued that the covariant currents may be obtained by varying the 2n + 1-form V P and the consistent currents by varying the 2n-form W CS , In this Appendix we give a detailed account of the variational procedure preserving many details which have been omitted from the main text. While straightforward, the computation is somewhat tedious. To assist the reader we begin by stating our final result upfront: we will show that under a general variation δ, the variations of V P and W CS are given by In writing (E.2) we have defined the 2n − 1-forms as in (1.8) which give the covariant anomaly-induced flavor, heat, and spin currents respectively. The currents with 'H' and 'BZ' subscripts denote the Hall and Bardeen-Zumino currents respectively, which we derived in (B.16). The Hall currents live in the 2n + 1-dimensional bulk M, hence their bulk Hodge-duals are 2n-forms; the boundary Bardeen-Zumino currents are valued on the boundary ∂M and so their boundary Hodge-duals are 2n − 1-forms. The hat denotes that the object is evaluated for the hatted connections (1.3). To start, consider the variation of a general p-form W which has a leg along the velocity field u. If it may be written as W = u ∧ Σ(2ω; µ, A, B; µ R , Γ, B R ) (and not in terms of say the derivatives of those variables), then by the chain rule its variation is (E.4a) Using (6.12) we exchange variations of {ω, B, B R } for variations of {u, A, Γ; a, E, E R } giving We can now use (E.4) to obtain an explicit expression for the variations of W CS and V P in terms of derivatives thereof. Before doing so, it is useful to note the identities: which can be easily proven using the definition of V P and W CS in (E.1), along with the expressions (B.16) for the Hall and BZ currents. For instance, the first identity follows from where in the last equality we have used (B.16). We also require the identities which we now turn to prove. We begin with the first identity of (E.7). Using (B.16), the difference between the hatted and unhatted BZ currents is given by The first term in the second line of (E.8) is just D(∂W CS /∂B), and using (E.1), (B.13) together with u ∧ D(. . .) = u ∧D(. . .) we may rewrite the rest to give which upon using ⋆ J P = ∂V P /∂B proves the first equality of (E.7) as desired. A similar manipulation with Christoffel connection gives the second identity via The difference between Hall currents in the third identity can also be tied to partial derivatives of W CS and V P , where in going from the second line to the third we have used (E.1), (B.14), as well as u ∧ D(. . .) = u ∧D(. . .). In a similar manner, we compute the last identity of (E.7) Note that all these partial derivatives treat {u, 2ω, µ, A, B, µ R , Γ, B R } as independent variables.
Using (E.4), (E.5), and (E.7), along with we can write the variation of V P as Similarly, the variation of W CS takes the form The expressions (E.13) and (E.14) match (E.2) except for the terms proportional to δu. These terms may be shown to vanish in the following way. Consider the variation of V P + dW CS = I CS −Î CS , which using (B.9) and (B.16) is given by However, this variation is also computed by (E.13) and (E.14) to be Comparing (E.15) against (E.16) we conclude that the coefficients of δu and dδu vanish, giving and Using (E.17) and (E.18) we can eliminate the terms proportional to δu in (E.13) and (E.14). This gives (E.2) which is the main result of this section.

F A consistency check involving the anomalous Ward identities in equilibrium
The main goal of this paper was to obtain a representative for the anomalous contribution to the covariant current and stress tensor, J µ P and T µν P which takes the form given by (1.7), (1.8) and (1.10). The anomaly-induced part of the hydrostatic currents which we have computed in this paper must satisfy the covariant anomalous Ward identities derived in Appendix C, where we emphasize that the equalities hold in equilibrium. In this section we will show explicitly that this is indeed the case serving as a consistency check of our computations. We begin with the covariant current, (F.1a). Using (E.7) we can write the divergence of the anomalous contribution to the covariant current as In equilibrium, the hatted Hall flavor current ⋆Ĵ H = ∂P/∂F is completely transverse to u which impliesĴ ⊥ H = 0. The divergence (F.2) then reduces to (F.1a). To show that the stress tensor satisfies (F.1b) requires some more work. We separate T µν P into heat and spin current parts as The divergence of T µν P,q is rather unilluminating when out of equilibrium, but in equilibrium it takes the simple form The divergence of the spin part of the stress tensor can be written in the form Using (E.7) once again we rewrite the divergence of the spin current as In equilibrium the hatted Hall spin current ⋆L H = ∂P/∂R is completely transverse to u so thatL ⊥ρµ H = 0. Combining (F.5), (F.6), and (F.7), we then have the equilibrium relation where we have decomposed the Riemann curvature into electric and magnetic parts as described in Section 5. If we decompose the the field strength in a similar manner, we find that in equilibrium (F.10) To prove (F.1b) it remains to show that the longitudinal and transverse expressions on the right hand side of (F.10) vanish. Using (E.18) we find that where we have used that there are transverse volume forms in 2n dimensions. Thus, the longitudinal part on the left hand side of (F.10) indeed vanishes. We proceed to study the transverse contribution to the right hand side of (F.10). Consider the interior product of V P with an arbitrary vector field ξ m transverse to u m which satisfies the property that ξ m is tangent to the boundary ∂M. Since the interior product is a derivation we have (F.12) We now recall that V P is a top-form in 2n + 1 dimensions and so it has a leg along the ⊥ direction. Since ξ ⊥ vanishes on the boundary ∂M, the pullback of ι ξ V P to ∂M vanishes, 13) In coordinates this means that The bracketed expression is precisely the transverse part of (F.10). Now since the bracketed expression in (F.14) is transverse, we find that the bracketed expression and therefore the transverse part of (F.10) vanishes as claimed.

G Spin current and torque: Mathisson-Papapetrou-Dixon equations
As we have seen, the conservation equations for flavor, energy-momentum and angular momentum get modified in a specific way for anomalous field theories. For example, a useful way of thinking about gravitational anomalies is to think of them as Lorentz anomalies leading to a non-conservation of angular momentum via anomalous torques.
In order to see how this works in practice, it is useful to first understand the dynamics of angular momentum when the anomalies are absent. We will consider the case where the system is coupled to an external medium which applies an external torque on the QFT so that we can understand how torque appears in the conservation laws. Thus in this Appendix, we will remark on some basic results regarding the dynamics of spin and torque that will clarify the physical content of various equations that appear in the paper.
Given a system with a conserved angular momentum, the split of that angular momentum into an orbital and a spin part is somewhat arbitrary. This is exactly analogous to the statement in electrodynamics of media that the division of a charge current into a 'free' charge current and a magnetization-induced 'bound' charge current is arbitrary per se. In both these cases, however, a particular split might be more natural and convenient in a given physical situation. Our aim in the rest of the Appendix is to describe how such splits in angular momentum can be achieved and how one handles the ambiguity inherent to such a split.
The discussion in the rest of this appendix is straightforward if somewhat long. So, for the convenience of the reader, we will summarize the main conclusions: first of all, we will show that different definitions of spin dynamics prevalent in literature can be reconciled into a single set of conservation equations that can directly be derived from the generating functional. We refer to these equations as Mathisson-Papapetrou-Dixon equations. They naturally incorporate the ambiguity mentioned above. We will also show that L µ[νλ] should be interpreted as half the spin current -a corollary that follows is that L To prove these statements, we begin by slightly modifying the procedure in the Appendix C. There, we studied the variation of the path-integral with respect to sources {A µ , g µν }. Instead, it is often convenient to treat {A µ , g µν , Γ µ νλ } as independent sources and write (A.1) in the form with t µν = t νµ . We will impose no further symmetry conditions on the other tensors. We will call L λµν the canonical spin current or just spin current in short. More precisely, it is half of what is usually termed the spin current -where the additional factor of half is included for convenience. The reason for this terminology will become clear as we proceed. While the division above is somewhat arbitrary, one can treat this as the penultimate step in computing δW , prior to the last integration by parts which brings δW to the form in (A.1). The energy-momentum tensor, obtained after integration by parts, can be written in the form We will call the contribution in brackets the spin energy momentum tensor Let us place our quantum field theory in an external medium which can apply an external force or torque. A convenient example is an 'flavor' electromagnetic medium with a magnetization-dielectric polarization tensor M µν . In practice, this means there exists an external sector of the quantum field theory such that with M µν = −M νµ . We will call M µν the magnetization tensor of the medium. This implies that under an infinitesimal gauge and coordinate transformation χ = {ξ µ , Λ}, W ext varies as where we have parametrized the contributions from the medium by an external force f α ext , an external point torque τ αβ ext and an external charge injection rate Q ext . The reason for these names would become clear shortly, once we derive the conservation equations. For a magnetized medium, we have where we recognize the Stern-Gerlach force (∇B) · M and the familiar M × B point torque in the antisymmetric part of τ αβ ext : For non-abelian flavor symmetries the magnestization injects flavor charge into the system at the rate given by 1 2 [M µν , F µν ]. We want to now rederive the conservation laws by demanding that the joint system W + W ext be diffeomorphism and flavor invariant. In what follows we will not specify a particular form for W ext , but instead parameterize it through external forces, torques, and charge injection rates as in (G.5). The conservation laws and Noether theorem for the field theory are derived as in Appendix A via an integration by parts. In what follows we split the energy-momentum tensor into t µν and the spin current L µνρ as in (5.45). Using the transformation of the sources under diffeomorphism and flavor transformations, we get Here, N µ χ,Canonical is the canonical Noether current and T µν orbital is the orbital energy-momentum tensor which enters into this Noether current. These differ from the Noether current and the energy momentum tensors we defined previously in (A.7) and through the variation of W QF T with respect to the metric. Thus, δ χ (W + W ext ) evaluates to which gives upon demanding δ χ (W + W ext ) = 0 ext , where the third relation follows from t [µν] = 0. The divergence of the canonical Noether current is The equations (G.11) are the basic equations that we will need to describe the dynamics of spin currents. Henceforth, we will refer to the conservation equations in (G.11) as Mathisson-Papapetrou-Dixon equations. 12 We can show that the Mathisson-Papapetrou-Dixon equations are equivalent to the usual conservation equations for the standard energy-momentum tensor T µν in (5.49). A direct integration by parts gives where T µν is as in (5.49). Using (A.5) and integrating the variations in δ χ W by parts, this in turn implies that J µ and T µν satisfy the Ward identities Note that in this way of describing the dynamics, the point torques just appear as a part of external forces acting on the system. An alternate way to derive the Mathisson-Papapetrou-Dixon equations is to think of the metric g µν and the connection Γ µ νλ as derived from frame fields and spin connection {Eā µ ,Γāb µ } (in what follows barred English indices are tangent space indices, which are raised and lowered with the Minkowski metric ηāb and its inverse ηāb). The metric is determined in terms of the frame fields g µν = ηābEā µ Eb ν , (G. 15) and the coframe fields e µā are defined such that Since we couple our field theory to the Christoffel connection, the spin connectionΓāb µ is determined in terms of the metric through the frame fields, but here as before we find it useful to treat {Eā µ ,Γāb µ } as independent sources. 13 At the end of the day, we convert variations of the spin connection into variations of the frame fields. One may verify that the holonomic (coordinate frame) connection Γ µ νρ is determined in terms of the spin connection as This is equivalent to the condition that the frame fields are covariantly constant under the spin covariant derivativeD = D +Γ, Solving (G.17) forΓāb µ and using that Γ µ νρ is the Christoffel connection and so is determined in terms of the metric (5.3), the spin connection is given bẙ (G. 18) Treating the variations of the frame fields and spin connection as independent for now, W varies as + (boundary terms) , which can be taken as an alternate way to define the tensors {T µν orbital , L λ[µν] }. Note that the antisymmetry ofΓāb µ means that the variation of W with respect toΓāb µ yields L λ[µν] : an antisymmetric tensor in its last two indices. Of course, the variation of the spin connection is given by derivatives of the frame fields as in (G.18), and so its variation is given by (G.20) This, after an integration of parts, gives with T µν N on−Sym given by This is the equivalent of (5.49) when we work with the frame fields and spin connection. We now wish to compute the conservation equations and Ward identities in this context. To do so we follow the same algorithm as above. We parameterize the variation of the external medium under a gauge and coordinate transformation as The derivation of conservation equations then proceeds as before. We have where the new Canonical Noether current is defined bỹ (G. 25) It follows that the Mathisson-Papapetrou-Dixon equations in (G.11) are reproduced by demanding that bulk terms in δ χ (W + W ext ) vanish. The corresponding Noether identity is As is characteristic of the formalism in terms of frame-fields and spin connection, Lorentz transformations are treated almost in par with the flavor transformations: L λ[µν] plays the role of the current associated with Lorentz symmetry and τ [µν] ext is the external injection rate of the 'Lorentz charge.' If we had started from (G.21), then the corresponding conservation laws would have been ext .
(G.27) To summarize, we have four different descriptions, depending on our choice of sources.
1. With {A µ , g µν , Γ µ νλ } as independent sources, we have a description in terms of the currents {J µ , t µν , L λµν }. With {A µ , Eā µ , Γāb λ } as independent sources, we have a description in terms of the currents (G. 28) In both these cases, the conservation equations are the Mathisson-Papapetrou-Dixon equations ext . (G.29) 2. With {A µ , Eā µ } as independent sources, we have a description in terms of the currents The conservation equations are ext , which are the Mathisson-Papapetrou-Dixon equations with zero spin currents.
3. With {A µ , g µν } as independent sources, we have a description in terms of the currents (G.32) The conservation equations are which are the Mathisson-Papapetrou-Dixon equations with zero spin currents and zero point torque.
Note that all these different descriptions -be it in terms of {T µν orbital , L σµν } obeying (G.11), or in terms of T µν N on−Sym obeying (G.27), or in terms of the symmetric energy momentum tensor T µν -all of them are equivalent descriptions of the same system related by various redefinitions. In fact, the Mathisson-Papapetrou-Dixon equations are invariant under a broader set of Belinfante-Rosenfeld transformations which shift the spin current L σµν and torques τ µν ext . These transformations may be regarded as an ambiguity involved in the definition of angular momentum and point torques, and under them we have where B λµν must satisfy B λµν = −B λνµ . This result follows by using the identity which holds for any tensor B λµν provided B λµν = −B λνµ . This shows that the Mathisson-Papapetrou-Dixon equations automatically incorporate the ambiguity involved in the definition of spin angular momentum and point torques. Further, it is easily checked that all the cases considered above are related to each other via a Belinfante-Rosenfeld shift. We will use these descriptions interchangeably in the rest of this article.
In the rest of this Appendix, we will remark on some important features of the Mathisson-Papapetrou-Dixon equations. As mentioned before, the external forces and torques {f µ ext , τ µν ext } appearing in (G.11) denote the external forces and torques per unit volume acting on the system, injecting canonical energy-momentum and spin into the system. Note that τ [µν] ext includes only the point torques (or the 'spin' part of torques) and excludes 'orbital' r × f torques that arise from f µ ext itself. For example, in an electrodynamic medium with magnetizationpolarization tensor M µν and a background field strength F αβ , our derivation gives (G.6).
Further, we note that the force corresponding to the canonical energy momentum tensor includes, in addition to f µ ext and the Lorentz force on the flavor current J ν , an additional term R µ νβα L ναβ which is sometimes called the Mathisson force. Mathisson force is crucial, for example, in explaining why free spinning particles do not follow geodesics in a curved spacetime (or more colloquially, why free fall of gyroscopes are affected by how fast they are spinning). In the solid state context, where disclinations in the solid can be modeled as a background curvature, Mathisson force is the force on a spin as it crosses a disclination.
The Mathisson-Papapetrou-Dixon equations exhibit various other properties which make them an appropriate description of spin dynamics.
• They reduce to the correct equations for describing spinning particles moving in curved spacetimes. If Q, P µ and S µν denote the flavor charge, canonical momentum and the spin of a particle, then the Mathisson-Papapetrou-Dixon equations become DQ Dτ = (charge injection rate) , ext , where x µ is the position of the particle, τ denotes its proper time and D Dτ denotes the covariant derivative take along the worldline. We have used {(force) µ ext , (torque) µν ext } respectively to denote the external forces and point torques acting on the particle and we have used the fact that L µνλ denotes half of the spin current. In the absence of flavor charges, we obtain the original form in which these equations were derived by Mathisson, Papapetrou and Dixon.
• In flat spacetime and in cartesian co-ordinates, they give rise to familiar energy-momentum and angular momentum conservation equations ext , where we note that 2L σ[µν] appears as the 'spin' part of angular momentum current as expected whereas the 'orbital' part of the angular momentum current is constructed from the 'orbital' part of the energy-momentum T µν orbital .
• In QFTs without spin-orbit interaction, the conservation of the total angular momentum breaks up into separate conservation equations for orbital and spin angular momentum, i.e., D λ L λ[µν] = T orbital appearing in the third Mathisson-Papapetrou-Dixon equation is half the 'spin-orbit torque' arising because of orbital angular momentum seeping into spin angular momentum.. Thus, we have concluded that irrespective of the starting point the conservation laws for angular momentum always take the Mathisson-Papapetrou-Dixon form (G.11) as claimed. This discussion of a non-anomalous QFT in contact with a medium which injects charge and angular momentum has many similarities with an anomalous QFT where charge or angular momentum is injected by the anomaly instead. These similarities are especially clear in the anomaly inflow picture where charge or angular momentum can be thought of as injected from a system with one dimension higher. To conclude this Appendix, we note that both the consistent (C.11) and covariant Ward identities (C.15) take the Mathisson-Papapetrou-Dixon form ext .
(G. 38) Written this way, the effects of the anomaly on the consistent Ward identities (C.11) can be accounted for by an external force, external torque, and charge injection rate where J and T µ ν were defined in (C.10). Similarly, the effects of the anomalies in the covariant Ward identities (C.15) can be accounted for by

H The relativistic Boltzmann weight
The description of equilibrium physics in the transverse gauge is intimately related to the traditional presentation of Euclidean thermal field theory. However there are a couple of subtle differences which we elicit in this Appendix. The essential observable in thermal field theory, in the absence of anomalies, is the thermal partition function where β is the parametric length of the thermal circle and H is the generator of time translations in the background (5.15). 14 As a result Z E is a functional of the background metric and gauge field. For theories with a functional integral description, this partition function is equal to the functional integral of the Euclidean weight exp(−S E ) on the Euclidean background (5.41) with appropriate boundary conditions around the thermal circle. The temperature and flavor chemical potential are usually defined through observables which is local in the spatial x-directions, but non-local in Euclidean time. The temperature is the inverse length of the thermal circle, as a function of space, and the flavor chemical potential is defined through the Wilson line of the gauge field around the thermal circle. The inverse length is which agrees with the local temperature defined in the covariant context in (5.12). In the same way, we could define the spin chemical potential through the Wilson line of the Christoffel connection. Denoting the thermal circle at a position x on the spatial slice as C x , the Wilson lines around C x in the transverse gauge are 15 so that the logarithms of the Wilson lines are iµ/T and i(µ R ) µ ν /T respectively. As an aside, we note that the Wilson lines of the hatted connections are trivial in transverse gauge are given by Actually, we should be careful. In writing down the Wilson lines above in the way they usually appear in certain textbook discussions of field theory, we have written down unphysical objects. The proper observables are the holonomies perceived by G and matrix-valued tensors when parallel transported around the thermal circle. That is, the physical quantities are the phases perceived by charged states when they go around the circle. These phases receive two contributions, one from the integrals above (H.3) and another from twisted boundary conditions that may be imposed around the circle. The latter are implemented by Λ K and ∂ ν K µ . Only the combination is physical, which at this stage should be unsurprising to the reader: in the main text, we defined the flavor and spin chemical potentials to be the covariant objects 14 In writing ZE as in (H.1), it is clear that the usual presentation of thermal field theory is non-covariant.
We have separated time and space from the outset, in exactly the same way as in the transverse gauge. 15 We remind the reader that, in anti-hermitian flavor basis, the usual Wilson lines are defined without an i in the exponential.
The terms involving the connection essentially give the integrals (H.3) of A and Γ µ ν around the thermal circle, while the terms {Λ K , ∂ ν K µ } provide the twisted boundary conditions.
It is tempting to think of the quantities {T, µ, (µ R ) µ ν } more generally in terms of these non-local quantities around the thermal circle. In fact, just this identification was made for T and µ in [32]. However this is a little misleading. We stress that the quantities {T, µ, (µ R ) µ ν } defined in our covariant analysis are local on spacetime, whereas the integrals around the thermal circle are only valued on the spatial slice. However, in a transverse gauge, all fields and background fields are independent of time, and so may be regarded as local fields on the spatial slice. This is why the traditional thermal field theory presentation is related to the transverse gauge.
For a non-anomalous theory, the thermal partition function Z E should be gauge and coordinate-reparametrization invariant. In order for this to be true, we must be a little careful by what we mean by the Hamiltonian H. There are several Noether-like currents that we may define and so several potential Hamiltonians. In the rest of this Appendix we revisit the canonical Noether current defined in (G.9) and its relation to Z E , relying heavily on results derived in the previous Appendix. In that context, we were interested in the Ward identities and Noether currents when coupling a field theory to a general external sector which dumped energy-momentum, angular momentum, and charge into the field theory. We related that formalism to anomalous field theories at the end of that Appendix, in particular showing that it describes the dynamics of the consistent currents obeying the Ward identities (C.11). The corresponding external force, torque, and charge injection rate were given in (G.39) to be f α ext = −A α · J − g αβ Γ µ βν T ν µ , τ αβ ext = 2T αβ , Q ext = J , where J and T µ ν were defined in (C.10).
Here and in what follows, we build Noether currents out of the consistent currents and specialize to the symmetry transformation {K µ , Λ K }. Redefining the Noether current in (G.9) by a minus sign (in which case, for the energymomentum tensor and flavor current of ideal hydrodynamics, it becomes the energy current), we define where T µν orbital was also defined in (G.9). Its divergence when δ K generates a symmetry is given by (G.12) to be Substituting the external force, torque, and charge injection rates (G.39) relevant for describing the consistent anomaly, we find D µ J µ K,canonical = −Λ K · J − ∂ ν K µ T ν µ , (H. 6) We see that in the absence of anomalies, J µ K,canonical is always conserved. Further, it remains conserved even in the presence of anomalies, provided that we are in transverse gauge.
As an aside, consider the related current From (H.6), we see that its divergence is which vanishes when Λ K is covariantly constant and ∂ ρ K ν vanishes. In the absence of anomalies, the common convention seems to be to choose the generator H appearing in the thermal partition function (H.1) to be conjugate to the currentJ µ K defined in (H.7). However,J µ K is not generally conserved; for a non-anomalous theory, its divergence (H.8) only vanishes when Λ K is covariantly constant. In that instance, one can go to a gauge and coordinate choice where Λ K is independent of time and space, in which case we may relabel it as the position-independent constant Λ K ≡ µ 0 . One can then define the Boltzmann weight exp −β H K − µ 0 · Q , (H.9) whereH K is the operator conjugate to the currentJ µ K , andQ is the flavor charge operator conjugate to the flavor current. Let us call the corresponding partition functionZ E . From Z E one can define thermodynamic energy, and flavor charge through derivatives with respect to β and µ 0 . The Boltzmann weight (H.9) is reminiscent of textbook statistical mechanics. It is also written in a way to remind us what the chemical potentials do: they twist the weighting of charged states in the sum over states. We note that one can go through a similar transformation of the Noether current involving the spin chemical potential and spin current. To do so, it is most convenient to work with the frame fields and spin connection, and reformulate the gravitational anomalies in terms of Lorentz anomalies. We do not do so here in a momentary attempt at brevity.
The Boltzmann weight (H.9) is written in an extremely non-covariant way. In order to write Z E in a manifestly gauge and coordinate-invariant way, we can choose the Boltzmann weight to instead be exp (−βH K ) , (H. 10) where H K is the operator conjugate to the current J µ K,canonical defined in (H.4). When Λ K is constant, this weight is equal to that defined before in (H.9). However, unlikeZ E , the partition function Z E = tr exp (−βH K ) is gauge-invariant as it ought to be.
So far we have discussed the Boltzmann weight for non-anomalous theories. Almost all of that discussion carries over when the underlying theory is anomalous. The only real change comes with the Boltzmann weights and the thermal partition function, which is no longer invariant under gauge and coordinate transformations. However, by (H.6), the current J µ K remains conserved even when there are anomalies provided that we are in transverse gauge.
As a result the thermal partition function may still be understood as a sum over states with Boltzmann weight exp(−βH K ) as before, but H K is akin to a Hamiltonian (in the sense that it generates a symmetry) only in transverse gauge.

I Notation
It is often useful to shift to the language of differential forms (which we will denote by bold letters ) which is a more efficient way of dealing with fully antisymmetric tensors. In this Appendix, we will summarize our conventions for differential forms.
• We begin with our convention for the wedge product which is fixed by demanding that where {dx µ } are the basis 1-forms associate with co-ordinates x µ . Further, [µ 1 . . . µ p ] indicates a projection to the antisymmetric part and ⊗ is the ordinary tensor product. For example, Since we know how the wedge product acts on basis forms, we can linearly extend the definition to arbitrary forms.
• A p-form V is a fully antisymmetric p-tensor whose components are given by V µ 1 ..µp . As a tensor it is We will also encounter tensors with a number of fully antisymmetric covariant indices. These may be regarded as just another tensor, or as tensor-valued p-forms like V α β . In components, these has p fully antisymmetric covariant indices along with additional 'free' tensor indices (for V α β these would be α and β). For example, • Given a 1-form A and a p-form V , their wedge product is then defined by the wedge product of the basis 1-forms (I.1) and linearity, which gives ..µ p+1 µ 1 µ 2 + . . . + (−1) p 2 A µ p+1 V µ 1 ...µp dx µ 1 ∧ dx µ 2 ∧ . . . ∧ dx µp ∧ dx µ p+1 .

(I.9)
When V is a flavor singlet p-form, we have dV = DV by the torsionlessness of the Christoffel connection.
• Given a metric g we may define a volume form on spacetime, whose explicit expression is given by 16) where g denotes the determinant of the metric and Sign[g] is its signature. Thus, the components of the volume form are given by ε µ 1 µ 2 ...µ d = ± g Sign[g] .
For pseudo-Riemannian metrics describing spacetime, we have Sign[g] = −1. We think of all other metrics as being obtained from such a pseudo-Riemannian metric via analytic continuation a la Wick rotation. Unfortunately, the standard signature function Sign[g] • One of the main uses of the last formula is in translating expressions of the following form into components Here V is a d−p-form, A 1 is a q 1 -form, A 2 is a q 2 -form etc. such that q 1 +q 2 +. . .+q k = p.
We have (I.24) • Given two p-forms V 1 and V 2 , V 1 ∧ ⋆ V 2 is a top form given by We may then regard V 1 ∧ ⋆ V 2 as an inner product on the space of p-forms.
(I. 26) • Under this inner product, we can define the co-exterior derivative, which takes flavor singlet p-forms to singlet p − 1-forms. In components it acts as Note that the co-exterior derivative obeys ⋆ d † = d ⋆ . This, in particular means that for a p-form V we have 1 (p − 1)! D µp V µ 1 µ 2 ...µ p−1 µp ⋆ dx µ 1 dx µ 2 . . . dx µ p−1 ..µ p−1 µp ⋆ dx µ 1 dx µ 2 . . . dx µp . (I.29) • It is useful to write various currents in terms of forms using the Hodge star. To do it, let us begun by defining the hypersurface volume forms d d−1 S µ : the d − 1 forms in d dimensional spacetime which when pulled back and integrated over a hypersurface give the volume of that hypersurface. More precisely they are the Hodge-duals of the basis 1-forms dx µ . If g µν represents the metric on spacetime, we can define d d−1 S µ via the relations d d−1 S ν ≡ ⋆ dx ν , (I. 30) or Using these forms, we can define the Hodge-duals of the currents which are tensor valued (d − 1)-forms and the Hodge-dual of energy-momentum tensor which is a tensor valued d-form. We have