Fractionalization and Anomalies in Symmetry-Enriched U(1) Gauge Theories

We classify symmetry fractionalization and anomalies in a (3+1)d U(1) gauge theory enriched by a global symmetry group $G$. We find that, in general, a symmetry-enrichment pattern is specified by 4 pieces of data: $\rho$, a map from $G$ to the duality symmetry group of this $\mathrm{U}(1)$ gauge theory which physically encodes how the symmetry permutes the fractional excitations, $\nu\in\mathcal{H}^2_{\rho}[G, \mathrm{U}_\mathsf{T}(1)]$, the symmetry actions on the electric charge, $p\in\mathcal{H}^1[G, \mathbb{Z}_\mathsf{T}]$, indication of certain domain wall decoration with bosonic integer quantum Hall (BIQH) states, and a torsor $n$ over $\mathcal{H}^3_{\rho}[G, \mathbb{Z}]$, the symmetry actions on the magnetic monopole. However, certain choices of $(\rho, \nu, p, n)$ are not physically realizable, i.e. they are anomalous. We find that there are two levels of anomalies. The first level of anomalies obstruct the fractional excitations being deconfined, thus are referred to as the deconfinement anomaly. States with these anomalies can be realized on the boundary of a (4+1)d long-range entangled state. If a state does not suffer from a deconfinement anomaly, there can still be the second level of anomaly, the more familiar 't Hooft anomaly, which forbids certain types of symmetry fractionalization patterns to be implemented in an on-site fashion. States with these anomalies can be realized on the boundary of a (4+1)d short-range entangled state. We apply these results to some interesting physical examples.

Microscopic realizations of a U(1) QSL often enjoy certain global symmetries. In order to understand the physical properties of a U(1) QSL, it is important to develop a systematic theory for the interplay between these global symmetries and its more intrinsic properties due to its long-range entanglement. As an example, the quantum spin ice has a time-reversal symmetry, and the monopoles are Kramers doublets under the time-reversal transformation, i.e., the symmetry is realized projectively.
This understanding also provides useful information regarding the global phase diagram of a U(1) QSL, especially its proximate phases and the phase transitions between them. For instance, condensation of electric or magnetic charges can drive the U(1) QSL to a shortrange entangled phase, whose nature (e.g., symmetrybreaking pattern) depends on the properties of the condensed charges [5]. Symmetry considerations are crucial in determining the properties of these proximate phases.
A given set of global symmetries can have qualitatively distinct realizations in a U(1) QSL, in the sense that U(1) QSLs with different symmetry realizations can have symmetry-protected distinctions (see Fig. 1). These different U(1) QSLs are referred to as symmetry-enriched U(1) QSLs under this symmetry.
FIG. 1. The notion of symmetry-protected distinction between two phases. These two phases can be smoothly connected if the system lacks certain symmetry, but they are necessarily separated by a phase transition in the presence of the symmetry.
Building on the preliminary work in Ref. [16], U(1) gauge theories enriched by time reversal symmetry were first classified in Ref. [17]. A systematic framework for the classification of generic symmetry-enriched U(1) gauge theories was then proposed in Ref. [18], and this framework was applied to obtain the classifications of some rather nontrivial examples. In this framework, the bulk properties of a symmetry-enriched U(1) gauge theory is characterized by statistics and the symmetry properties of the elementary electric charge and magnetic monopole of the theory, and its surface properties can be further enriched by weakly coupling it with a symmetryprotected topological (SPT) phase. In this paper, we will focus on the bulk properties of a symmetry-enriched U(1) gauge theory.
To completely specify the symmetry properties of a U(1) QSL, we need to know how symmetries act on the elementary electric charge and magnetic monopole, known as the symmetry fractionalization patterns. The symmetry actions on the elementary eletric charge and on the magnetic monopole are naively independent, but some of their combinations turn out to be anomalous, i.e., a U(1) gauge theory with certain symmetry fractionalization patterns cannot be realizable in any (3+1)d lattice spin system if the symmetry is implemented in an on-site manner, and it can only be realized as a boundary of a (4+1)d system. Ref. [18] proposed a general physicsbased method to detect such anomalies, and many nontrivial examples were demonstrated therein.
However, despite being general, systematic and physically intuitive, the method employed in Ref. [18] can be sometimes sophisticated to implement. It is thus desirable to have a mathematical classification of anomalies, and a formula that indicates whether a symmetry fractionalization pattern is anomalous or not, and if it is anomalous, what kind of (4+1)d system can adopt this anomalous U(1) gauge theory as its boundary. Furthermore, it is desirable if this anomaly formula can be formulated purely in terms of the physical symmetry quantum numbers of the elementary electric charge and magnetic monopole.
The main goal of this paper is to develop such a systematic understanding of anomalies in symmetry-enriched U(1) gauge theories. As we will see, there are in fact two layers of anomalies: the first of them, the deconfinement anomaly, obstructs the deconfinment of the fractional excitations, rendering the notion of symmetry fractionalization ill-defined. When the first anomaly is absent, the second anomaly indicates whether the system has to live on the boundary of a (4+1)d nontrivial SPT phase. This is the more familiar 't Hooft anomaly.
The rest of the paper is organized as follows. In Sec. II we will give a brief review of the physics of a U(1) gauge theory. In Sec. III, after sketching its derivation, we will present a classification of symmetry-enriched U(1) gauge theories and the structure of their anomalies. This analysis is based on the conjecture that all anomaly-free symmetry-enriched U(1) gauge theories can be viewed as partially gauged SPT phases. In this paper we will mostly consider U(1) gauge theories with bosonic electric charges. We will then apply the anomaly formula to some interesting examples in Sec. IV. Some of these examples were discussed in Ref. [18], and our anomaly formula can reproduce the corresponding results and verify some conjectures made in Ref. [18]. Besides these, we also discuss some other new intriguing examples. In particular, we discuss which U(1) QSLs can be realized if SO(3) spin rotational symmetry and (3+1)d translation symmetry are preserved. Namely, we find symmetry-enriched U(1) gauge theories that can satisfy the Lieb-Schultz-Mattis (LSM) constraint. We also discuss a symmetry-enriched U(1) gauge theory that is related to the intrinsically interacting fermionic SPT phase found in Ref. [19]. Fi-nally, we conclude in Sec. V. Various appendices contain some technical details.

II. REVIEW OF U(1) GAUGE THEORY
Generally a U(1) gauge theory (with bosonic electric charge) is described by the following Lagrangian at low energies: Here e is the gauge coupling strength and θ is the axion angle. Notice that, in the absence of other symmetries, θ is 4π-periodic if the charges are bosonic [20,21]. At low energies, the theory simply describes propagating photons. Above certain energy gap, there are fractional excitations carrying electric and magnetic charges. We denote the electric and magnetic charge of an excitation by q e and q m , respectively. Due to the Dirac quantization condition [22], the possible values of q e and q m form a charge-monopole lattice. Because of the θ-term, an excitation acquires a "polarization charge" θ 2π q m due to the Witten effect [23] (see Fig. 2). Therefore, the charge of a generic fractional excitation should be written as q e = n + θ 2π q m , where n is an integer counting the electric charge of this excitation at θ = 0. The selfstatistics of a fractional excitation with electric and magnetic charges (q e , q m ) is given by (−1) (qe− θqm 2π )qm . This formula indicates that the statistics of the excitations is invariant when θ is changed by 4π.
In the absence of any orientation-reversing symmetries (time reversal and/or spatial reflection), θ can be tuned continuously. Without loss of generality, in this case we can always tune θ to be 0 without encountering a phase transition. In the presence of an orientation-reversing symmetry, θ is quantized to be an integer multiple of 2π. In all these cases, there is a charge-neutral monopole with a unit magnetic charge, i.e., q m = 1. If θ = 2πN with N even (odd), the elementary charge-neutral monopole is bosonic (fermionic). We will denote by E the elementary electric charge with (q e , q m ) = (1, 0), denote by M the elementary charge-neutral monopole with (q e , q m ) = (0, 1). The charge-monopole lattice Z × Z is generated by E and M, and we call bound states of certain numbers of E and M a dyon.
For θ = 0 (mod 4π), the U(1) gauge theory has an emergent duality symmetry group of automorphisms, i.e., permutations of fractional excitations that preserve all universal properties, such as exchange statistics. In defining automorphisms we ignore energetics such as gaps of the particles. Permutation of charges can be specified by its action on the two generators: Clearly a, b, c, d ∈ Z. In order to preserve the chargemonopole lattice, we must demand ad − bc = ±1. One can further show that only ad − bc = 1 preserves the geometric Berry phase associated with braiding dyons, while ad−bc = −1 flips the Berry phase. All integer 2×2 matrices with unit determinant form the group SL(2, Z), generated by S and T: However, the T n transformation changes the statistics of particles for odd n (e.g., a bosonic charge (1, 0) turns into a fermionic dyon (n, 1)), so the group that preserves all Berry phases is actually generated by S and T 2 , and we will denote this group by D + . T n with odd n can only be realized in a U(1) gauge theories with fermionic charge, and we will not discuss them in this paper.
We can also consider the permutations reversing the sign of the Berry phase, which must correspond to orientation-reversing transformations. All these can be obtained from D + by multiplying the following matrix We will denote all such permutations by D − . Altogether, we have found the duality symmetry group Now we consider a U(1) gauge theory realized in a microscopic model with a global symmetry group G. We will analyze how global symmetry transformations are realized in the low-energy theory. For clarity, let us assume that G is internal, and we expect the results for spatial symmetries will be similar [24,25]. We will also consider the case where G includes lattice translation symmetry in some occasions. Notice that G may contain both unitary and anti-unitary transformations. To formally keep track of this, we define a Z 2 grading s : G → Z 2 = {1, −1} on G to indicate whether a group element g corresponds to a unitary (s(g) = 1) or anti-unitary (s(g) = −1) transformation.
First of all, we consider how gauge-invariant operators transform under the symmetries. In the low-energy limit of a U(1) gauge theory, all gauge-invariant local operators can be built up out of field strengths E and B. They may transform nontrivially under a symmetry operation. For example, a charge conjugation symmetry takes E → −E and B → −B. Equivalently, because E and B are sourced by electric and magnetic charges, we can also directly write down how the types of electric and magnetic charged excitations transform. In the example of charge conjugation, E → E † and M → M † . Clearly such a transformation is an element in D. Therefore, we have a group homomorphism ρ from G to D (preserving the grading s).
When ρ is given, we still do not have a complete description of the symmetry action. The missing information is how symmetry acts locally on an individual fractional excitation, which will be referred to as symmetry fractionalization. A major goal of this work is to obtain a complete classification of both ρ and symmetry fractionalization in physical U(1) gauge theories. The basic principle is the following conjecture, first formulated in Ref. [18]: All physical symmetry-enriched U(1) gauge theories can be realized as partially gauged SPT phases.
Let us elaborate on this statement. By physical, we mean that the U(1) gauge theory can be realized in a 3D microscopic model with an on-site symmetry group G. The above conjecture allows us to only consider SPT phases whose symmetry group contains U(1) as a normal subgroup, which after gauging becomes the U(1) gauge symmetry. G is the remaining global symmetry after gauging. We note that the above principle has also been applied to study symmetry-enriched SU(N ) gauge theories [26,27].
An immediate consequence of this conjecture is that one should be able to identify a certain dyonic excitation (and multiples of this dyon) as the matter of the SPT phase, coupled to a U(1) gauge field. In the charge-monopole lattice, all the matters of this SPT phase should correspond to a line of lattice points passing through the origin. The global symmetry must fix this line in order for the gauging to make sense. Denote a dyon on this line by (q e , q m ), and suppose the symmetry transformation on the charge type is given by where k is a nonzero integer. To have a non-zero solution to this equation, we must have Together with ad − bc = 1, we find a + d = k 2 +1 k . Since a + d ∈ Z, the only consistent choices are k = ±1, corresponding to a + d = ±2. In other words, such SL(2, Z) matrices have trace ±2. It is known that they are actually all conjugate to ±T n for n ∈ Z. Because all such transformations have an infinite order except for n = 0, when G is a compact group (including finite groups) we only need to consider n = 0, i.e., the charge-conjugation subgroup. When G contains an infinite-order element (e.g., lattice translation), the element can act as the T transformations. If the symmetry is realized with n = 0, we can take any of the dyons as the SPT matter. If the symmetry is realized with n = 0, we should take (q e , 0) as the SPT matter.
We can also consider anti-unitary transformations, which have ad − bc = −1. Following a similar argument, we find that if there is a fixed line in the charge-monopole lattice, the trace must be 0, i.e., a+d = 0. One can show that all such matrices are conjugate to either 1 0 0 −1 or 0 1 1 0 . The former case is just the usual convention that the electric (magnetic) fields are even (odd) under time reversal. In the later case, (1, ±1) is the fermionic dyon identified as the SPT matter. This case corresponds to a U(1) gauge theory with θ = π. We will not consider this case further in this work.
To conclude this discussion, if we only consider compact symmetry groups, we may restrict the image of ρ to the Z 2 charge-conjugation subgroup of D.
Next we analyze symmetry fractionalization.

A. Symmetry fractionalization
Based on the above discussion, in a U(1) gauge theory a general compact symmetry group G comes with a Z 2grading ρ : G → Z 2 = {1, −1}. ρ(g) = −1 means g acts as charge conjugation: Besides the charge-conjugation grading, there is also the Z 2 grading s to distinguish unitary and anti-unitary transformations. We will take the convention that the electric and magnetic fields transform as So the transformation belongs to D s(g) . Equivalently, the charges transform as Once we specify how charges are permuted by symmetries, we examine how symmetry locally transforms an individual charge. Consider the action of the global symmetry operator R g for g ∈ G on a physical state |Ψ with multiple fractional excitations a 1 , a 2 , · · · , a n which are spatially well-separated. The symmetry operator may transform the field lines induced by the charges, as given in Eq. (8). In addition, R g may also induce localized unitary transformations on each of the charges. We argue that Here we separate local unitary transformations U (aj ) g from the non-local transformationρ g that acts globally on gauge theory. This equation should be understood as an (approximate) operator identity when operators localized in the neighborhood of charge excitations are concerned.
Comparing the global symmetry action R g R h and R gh yields R −1 g has its nontrivial action localized within the vicinity of a j , and we have used the fact thatρ gρh =ρ gh and the fact that operators whose nontrivial actions are localized in different regions commute with each other.
Comparing this with R gh = j U (aj ) ghρ gh , we must have and n j=1 η aj (g, h) = 1.
In particular, η −a (g, h) = η a (g, h) −1 . Now we consider the associativity: So we have the associativity constraint There is some redundancy in η a (g, h) due to the freedom to redefine U (a) g by multiplying a phase ζ a (g) to it. In order to not affect R g , they need to satisfy j ζ aj (g) = 1. This redefinition of local operators changes the phases η a (g, h) in the following way: Now let us specialize to a = E and M. For a = E, η E defines a 2-cocycle in Z 2 ρ·s [G, U(1)], where the E subscript indicates that G acts on U(1) as identity/complex conjugation if ρ · s = 1 or −1. The redundancy in Eq. (15)  Notice that in the absence of any orientation-reversing symmetry, the properties of the monopole can be changed by smoothly varying θ. To understand the effect of the θ-term, let us start with θ = 0, where in our convention M is a boson with a certain projective quantum number [ω M ]. To get to the case with a nonzero θ, we can imagine continuously tuning the value of θ, so that the positions of the fractional excitations in the charge-monopole lattice are shifted due to the Witten effect (see Fig. 2). To have a charge-neutral elementary monopole, we need to tune the value of θ to be an integral multiple of 2π, say, 2πN with N an integer. Then the projective quantum number of the charge-neutral elementary monopole with this value of θ is determined by the excitation with (q e , q m ) = (−N, 1) at θ = 0, which is [ω M · ν −N ] (this is well-defined since for an orientation-preserving symmetry both ν and ω M are classified by H 2 ρ [G, U(1)]). In particular, when θ is varied by 4π, the statistics of the monopole is invariant, but its symmetry fractionalization pattern gets shifted by [ν −2 ]. So in this case [ω M ] is welldefined only up to [ν 2 ].
In the presence of an orientation-reserving symmetry, θ is quantized to be a multiple of 2π. In this case, we can still define the symmetry fractionalization class of charge-neutral monopoles (not just up to [ν 2 ]). Therefore, following general considerations, we have found that a symmetric U(1) gauge theory is equipped with 4 pieces of data: symmetries permuting charge types, given by ρ, and projective symmetry transformations, parametrized by ν ∈ H 2 ρ·s [G, U(1)], the value of θ, and ω M ∈ H 2 ρ [G, U(1)]. However, it is not clear that every (ρ, [ν], θ, [ω M ]) can be realized physically in (3+1)d as a partially gauged SPT phase. Below we address this issue.

B. Ungauging
We would like to construct a U(1) gauge theory from gauging a bosonic SPT phase. First, we must identify the matter particles, or "gauge charges". Suppose that the matter is generated by a particular dyon (q e , q m ). Without loss of generality, we may assume gcd(q e , q m ) = 1. We will further assume that (−1) qeqm = 1, so the dyon is bosonic. Then we perform a duality transformation so that this dyon becomes the E charge (1, 0). More explicitly, the duality transformation takes the following form: with xq e + yq m = 1. It is straightforward to check that U q e q m = 1 0 . The "monopole" (0, 1) is actually the image of (−y, x) under this duality transformation. Notice that since x, y are not uniquely determined, there are infinitely many choices of the "monopole", which are related to each other via T transformations. From now on, we will assume that such a duality transformation has been done, so that the matter is generated by the bosonic E charge, and there is a charge-neutral elemen-tary monopole M. In the absence of any orientationreversing symmetry, M will always be taken as a boson, because this can be achieved by smoothly tuning θ to be 0. On the other hand, in the presence of a orientationreversing symmetry, the value of θ cannot be smoothly varied and the statistics of M is a robust universal feature of this symmetry-enriched phase. We now determine the structure of the symmetry group of the matter. In the U(1) gauge theory, the E charge can transform projectively under G, with a factor set ν that specifies the corresponding projective representation. Correspondingly, in the SPT phase the fundamental charge-1 boson carries the same projective representation of G. Mathematically, it means that the actual symmetry group G of the SPT phase is an extension of G by U(1) (while the symmetry group of the U(1) gauge theory is of course just G). For notational convenience we use U(1) and its isomorphic group R/2πZ interchangeably, i.e., e iθ ∈ U(1) is identified as θ ∈ [0, 2π). Let us now define G. Denote the unitary transformation associated with g ∈ G by R g , and let R θ = e iQθ be a U(1) rotation. We have the following relation: Because charged bosons transform as projective representations of G, we have These two relations Eqs. (18) and (19) completely determine the group structure of G. In the following it will be more convenient to use additive notations for group multiplication, and label elements of G as a g where a ∈ R/2πZ and g ∈ G. The multiplication in G is then given by with g x = ρ(g)s(g)x.
It is now well-understood that the classification of bosonic SPT phases in d = 1, 2 and 3 spatial dimensions is given by group cohomology H d+2 [G, Z T ] [28], plus additional "beyond cohomology" phases when anti-unitary symmetries are present in 3D given by and describes SPT phases protected by G alone. Below we present an explicit description of H 4 [G, U T (1)].

Projective quantum numbers of monopoles
Before discussing the general classification, we first explain how the symmetry properties of the magnetic monopole is encoded in this formalism.
Let us start from the simplest case where G is unitary and ρ = 1, The last equality assumes a compact/finite G.
Here µ must be a 4-cocycle of G, and n is a 3-cocycle in We will show that the 3-cocycle n indeed encode the symmetry fractionalization pattern on the monopole, i.e., it is equivalent to ω M . To do so, let us first turn on the U(1) gauge field. In the group-cohomology models with a unitary symmetry group, a 4-cocycle in fact determines the space-time partition function on a general 4-manifold [31], equipped with background gauge fields 2 . Since the SPT phase is gapped and we are only interested in the topological part of the response theory, we can assume that the gauge fields are flat. Denote the partition function of the SPT phase on a closed space-time manifold M equipped with the background U(1) gauge field, represented by a R-valued 1-cochain A, and G gauge field g, by Z(M ; A, g) = exp (iS top [M ; A, g]). The expression of S top [M ; A, g] is determined by Eq. (22), and it is given explicitly in Eq. (24). If A is promoted to be a dynamical gauge field, then the partition function in the presence of a background G gauge field is where S[M ; A] includes both the Maxwell term and the θ-term S θ [A], which contains no coupling between A and g. All coupling between A and g is in the topological term: Here n(g) is the Z-valued 3-cocycle on M which is the pull-back of n ∈ H 3 [G, Z] by the map g : M → BG corresponding to the gauge field g. This is essentially equivalent to Eq. (22). Notice in writing the above action, we have dropped terms that only depend on g (and M ). These terms physically describe attaching a G-SPT to the U(1) gauge theory, and they will not be considered in this paper. Now using the correspondence between H 3 [G, Z] and

Using integration by parts we find
Here F = δA is the field strength. Formally this action is analogous to the well-known F ∧ F topological theta term, and it will potentially give the monopole nontrivial projective quantum number under G.
To fully unearth the physical consequence of S top [M ; A, g], we put the theory on M = S 2 × M 2 , with S 2 containing only spatial components and M 2 a general space-time 2-manifold, and put a 2π U(1) flux through S 2 (i.e., S 2 encloses a unit monopole). We then take a limit where the linear size of M 2 is much greater than that of the S 2 . Now this partition function describes the quantum amplitude of a process in which a monopole moves in the reduced spacetime M 2 . This quantum amplitude receives contributions from both S top [M ; A, g] and the θ-term. The contribution from the θ-term is analyzed above in Sec. III A: the θ-term can change the projective quantum number of the monopole by − θ 2π [ν]. The contribution from S top becomes 1 2π M F ∪ ω = M2 ω. This means that the worldline of the monopole is further associated with an additional contribution to the quantum amplitude, M2 ω, which is precisely the M 2 partition function of a (1+1)d G-SPT state whose boundary realizes the projective representation specified by the factor set [ω]. That is to say, the magnetic flux line is further decorated with this (1+1)d G-SPT state, and its end point, the magnetic monopole, gets one more piece of contribution to its projective representation of G, which is specified by the factor set [ω]. So when both the θ-term and the S coupling are taken into account, the projective quantum number of the charge-neutral monopole is given by Recall that G is an extension of G by U(1), with a 2cocycle [ν]. A cohomology class in H 4 [G, U T (1)] is specified by three layers of data: In other words, p ∈ Z satisfies p(g) + s(g)p(h) = p(gh). Importantly, [p] and [ν] need to satisfy an obstruction-vanishing condition: Define Here [x] 2π represents the fractional part of x with respect to 2π, i.e., Namely, γ needs to be a trivial cocycle in H 3 ρ [G, R/2πZ] for this obtruction to vanish. We will call [γ] the H 3 deconfinement obstruction (or symmetry localization obstruction) class, for reasons that will become clear later. We remark that this obstruction class is purely determined by ρ (how the symmetry permutes fractional excitations), [ν] (the symmetry actions on the electric charge E), and [p], whose meaning will be explained below. In contrast, the symmetry actions on the magnetic monopoles are not in charge of this obstruction, as will be clear later.

When the deconfinement obstruction vanishes, we
can solve δ ρ n = Γ, and different solutions of n are parametrized by a torsor over H 3 ρ [G, Z]. When ν = 0, the obstruction class is canonically zero, and we have shown that n describes projective representation carried by magnetic monopoles in Sec. III B 1. Based on the mathematical structure, we conjecture that the same interpretation holds more generally, namely, the H 3 ρ [G, Z] torsor classifies symmetry fractionalization on monopole excitations.

Finally, an obstruction 5-cocycle [O] ∈ H 5
s [G, U(1)] must vanish. Otherwise, the U(1) gauge theory that would arise from gauging this SPT phase must be realized on the boundary of a (4+1)d SPT phase defined by [O]. When [O] is trivial, we may modify the 4-cocycle by an element from H 4 s [G, U(1)], corresponding to stacking a G-SPT phase. Notice that this does not necessarily lead to a new symmetryenriched U(1) gauge theory [17,18]. The full expression for [O] is rather complicated and is given in Eq. (B31) of Appendix B.
To better understand the classification, we consider a few simplified cases. Case 1: If G is unitary and compact (finite), then H 1 [G, Z] = Z 1 , so we can set p = 0, which implies that the obstruction class Γ vanishes identically. In this case, the 4-cocycle has the following simple representation: As before, ω(g, h, k, l) is a 4-cocycle in H 4 s [G, U(1)], and n can be taken as a 3-cocycle in H 3 ρ [G, Z]. As before, the 3-cocycle n encodes the information of the symmetry fractionalization class on the monopole. Using [n] and [ν] ∈ H 2 ρ·s [G, U(1)], which characterizes the symmetry fractionalization class on the charge, we have the following expression for the obstruction 5-cocycle: We claim that a U(1) gauge theory with symmetry fractionalization pattern given by ρ, It is not difficult to show that p must take the following form: with k an integer. Even (odd) k represents the trivial (nontrivial) class of H 1 s [G, Z]. Let us further assume [ν] = 0 for simplicity, and consider the following 4-cocycle We note that [ω g ] ∈ H 3 [U(1), U(1)] describes a bosonic integer quantum Hall (BIQH) state of Hall conductance σ xy = 2p(g). The expression for ω k,l (a, b) can be found in Appendix B. Eq. (30) is not the most general form of 4-cocycle in this case, but the following explanation holds more generally. We claim that this 4-cocycle with p(g) given by Eq. (29) corresponds to θ = 2πk. To see it, consider the slant product of ω(a g , b h , c k , d l ) over g (see Appendix A for a brief introduction of slant products): It is well-known that the slant product corresponds to dimensional reduction of the system onto a domain wall [32]. Eq. (32) means that the quantum state on a domain wall labeled by g can be described by the data ω g (a, b, c). From Eq. (29), we see that when s(g) = 1, p(g) = 0, the slant product gives 1 and this domain wall is a trivial state. On the other hand, when s(g) = −1, p(g) = k, and the domain wall is a bosonic integer quantum hall state with σ xy = 2k (in units of e 2 /h). This exactly matches the properties of a state with θ = 2πk [20,33,34]. So, intuitively, the 4-cocycle can be interpreted as decorating (2+1)d BIQH states onto timereversal domain walls, classified by We should emphasize that this relation between p(g) and θ only holds for anti-unitary symmetry g. If g is unitary, in general there is no such relation between [p] and the θ-term. Also, notice that Eq. (29) only holds for compact/finite symmetry groups, and it does not hold for symmetries like lattice translations, which will be discussed next. Case 3: For lattice translation symmetry along the z direction, Z, we have H 1 [Z, Z] = Z, and p can take any integral value. We call z the element that translates the system by one lattice spacing along the z direction. Again consider the 4-cocycle given by Eq. (30), and now the meaning of the slant product Eq. (32) is that on each plane perpendicular to the z direction, we have a BIQH with σ xy = 2p(z) [35]. Therefore, p is a more general concept than the θ value, and it indicates certain domain wall decoration with BIQH states. In this case of translation symmetry, in the corresponding U(1) gauge theory the action of translation is T 2 [36].

D. H 3 obstruction class
Having discussed the meaning of n and p, we now further elaborate on the H 3 obstruction class.
First of all, if G is a finite group or a compact Lie group, the general form of p is given by Eq (29). When G is unitary, s(g) = 1 and p(g) = 0 for all g, so the H 3 obstruction class vanishes. Now consider a general s(g), i.e., the symmetry group may contain anti-unitary elements. It turns out that even for a general s(g), the H 3 obstruction also vanishes identically. To see it, define u(g, h) = −s(gh)[ν(g, h)] 2π . It is straightforward to show that δ ρ u = γ mod 2πZ, so Γ = δ ρ γ/(2π) vanishes.
Let us demonstrate why this is the case physically by considering an example with G = H × Z T 2 , where H is unitary and finite. We denote the group element of H as h, and Z T 2 = {1, T}. Let us also suppose that ν entirely comes from H. We choose p as in Eq. (29) with k > 0. We will also set ρ ≡ 1 in this example. Notice so far we have only specified the data responsible for the H 3 obstruction class, and our discussion is independent of the possible presence of the H 5 obstruction class.
A G-SPT phase can always be obtained by first breaking the U(1) symmetry and making the system a superfluid, and then proliferating the vortex lines of this superfluid. In order for such a gapped state to exist, a vortex line to be proliferated must be fully gapped without any degeneracy or gapless modes.
Since p(T) = k, a BIQH state is decorated onto a time-reversal domain wall. Suppose we thread a 2π flux through the domain wall. Due to the σ xy = 2k quantum Hall response, the flux threading creates a charge-2k excitation, which carries a G projective representation labeled by 2kν. In other words, on a 2π flux line a T domain wall binds a "zero mode" protected by the G symmetry (in this example, H) when 2kν is nontrivial. Naively, this poses an obstruction to proliferating vortex lines to yield a gapped symmetric state, as the proliferation seems to break the G symmetry.
However, we are allowed to decorate the vortex lines to be proliferated with gapped 1D states. In this example, we can just decorate the vortex lines with a 1D H-SPT phase with a factor set kν. Due the time-reversal symmetry domain wall, the two sides on the vortex lines have 1D SPT states labeled by kν and −kν, with a −2kν projective representation sitting on the domain wall and neutralizing the projective representation arising from the Hall response. Now everything is gapped, and it is possible to proliferate the vortex lines to get a symmetric gapped state, if the H 5 obstruction class further vanishes. In fact, (3+1)d U(1) gauge theories corresponding to such G-SPT phases can always be realized on the boundary of a (4+1)d invertible state [18] (see Appendix C therein), using a generalization of the layer construction in Ref. [16]. Now we give an example where the H 3 obstruction class is actually nontrivial. We choose the symmetry group to be G = H × Z. Notice this is not a compact/connected Lie/finite group. Denote the generator of Z by z. Consider an example with p(z) = k. To see whether the H 3 obstruction class is nontrivial in this case, we compute the slant product i z γ| H = 2kν. As long as 2kν is nontrivial, the H 3 obstruction class is nontrivial.
To have a concrete example, suppose H = PSU(N ) with N > 2 (or its finite subgroup Z N × Z N ). If we take ν to be the fundamental representation of SU(N ) (the generating element in H 2 [PSU(N ), U(1)] = Z N ), then in order for the H 3 obstruction class to vanish, we need We can interpret the Z as lattice translation. As explained in the previous section, such a G-SPT phase can be viewed as a stack of 2D BIQH phases with Hall conductance σ xy = 2k. However, since the matter boson carries the fundamental representation of SU(N ), the Hall conductance is constrained to be a multiple of N (2N ) when N is even (odd) (see Appendix C for derivation). This is exactly the condition that the H 3 obstruction class γ vanishes.
If k takes any other integer value, then the H 3 obstruction class is nontrivial, which means the state with those other values of k are not valid G-SPTs. Let us understand what is wrong with those states. Suppose such a state could be realized, then we can gauge the U(1) symmetry to obtain a U(1) gauge theory. After gauging, whenever a 2π magnetic flux line goes through a plane of such a BIQH state, charge-2k will be left on the plane due to the nonzero Hall conductance. This charge-2k object carries projective representation 2kν of the PSU(N ) symmetry, thus resulting in symmetry-protected degeneracy (gapless modes) on this magnetic flux line. Note that in this case we cannot cancel the degeneracy by attaching (1+1)d PSU(N ) SPT state on the 2π magnetic flux line.
In a U(1) gauge theory, the 2π magnetic flux lines need to be "condensed" for the monopoles to be deconfined. However, the presence of the gapless modes makes these flux lines visible, and, as a result, the monopoles cannot be viewed as deconfined excitations, which contradicts our assumption that this state can be gauged to yield a U(1) gauge theory. For this reason, we refer to the H 3 obstruction as the deconfinement obstruction. Because now the monopoles are not deconfined excitations, it does not make sense to talk about localizing symmetry actions on them, and such an obstruction can also be called a symmetry localization obstruction.
So what sort of (4+1)d bulk can support such an (3+1)d SPT phase on the boundary? To answer this, let us first ask what sort of (3+1)d bulk can support on its boundary a BIQH with σ xy violating the constraint given in Eq. (33). In Appendix C, we show that a (3+1)d bulk with the following θ-term in the response can produce the desired response on its (2+1)d surface: Strictly speaking, the U(1) gauge field A needs to satisfy additional conditions to reflect the fact that charges carry projective representations of PSU(N ), see Appendix C and Sec. III E for for details. This type of (2+1)d states are referred to as anomalous invertible states [37]. Namely, this invertible state can only exist on the boundary of a higher-dimensional trivial bulk. If we try to gauge the U(1) symmetry in the anomalous invertible state, the dynamical gauge field resulting from gauging also has to be extended into the bulk. Now we come back to the 3D stack of the 2D anomalous BIQH states, and ask on the boundary of what kind of (4+1)d bulk this (3+1)d stack can be realized. Apparently, the (4+1)d bulk that supports the anomalous (3+1)d invertible phase must also contain topological terms. Suppose the (4+1)d space-time manifold is M 5 . Formally, if we introduce a Z gauge field z ∈ H 1 [M 5 , Z], the bulk response is given by If we place the (4+1)d theory on S 2 × M 3 , and let S 2 F = 2π, the partition function then yields the following theory living on a "flux surface" (or the worldsheet of a "monopole" loop in four spatial dimensions): As we explain below, because electric charges carry projective representations, we need to identify F = 2π From this example, we see that a natural way to resolve a non-vanishing H 3 deconfinement obstruction is to require that both the background G gauge field and the dynamical U(1) gauge field be extended to the higher-dimensional bulk, and is therefore quite different from the usual 't Hooft anomaly. This is similar to the symmetry-localization obstruction found in (2+1)d symmetry-enriched topological phases [39][40][41][42].

E. 't Hooft anomaly formula
Before finishing this section, we will sketch an informal derivation of the 't Hooft anomaly formula in the special case where ρ(g) = s(g) = 1 for all g ∈ G, which also explains the physical meaning of the object given by Eq. (28). We will limit ourselves to the case p = 0.
Suggested by the explicit parametrization, we postulate that the topological response theory of the to-begauged SPT takes a form similar to Eq. (24): While we still use the notation A, g to represent the G background gauge field, we must keep in mind that G is generally not a direct product of U(1) and G. In particular it means that one has to modify the flat connection condition to δA = ν(g).
Here ν is the pull-back of the group 2-cocycle ν ∈ H 2 [G, R/2πZ] to the G bundle. The response has to be gauge-invariant. Under a G gauge transformation, ν(g) is shifted by δf 1 where f 1 is a 1-cochain, and n is shifted by δf 2 . We do not need to know the specific forms of f 1 and f 2 . In order to preserve the flatness of the gauge field, A must be shifted to A+f 1 . Therefore, the topological response theory changes by Here we used δ(A ∪ f 2 ) = δA ∪ f 2 − A ∪ δf 2 . Thus the theory is not gauge-invariant. But the variation is now seen to only depend on the G gauge field. This suggests that we fix the problem by including a 5D bulk M 5 whose boundary is M 4 , with the following action: Here g is an extension of the G gauge field to M 5 . Notice this (4+1)d response theory is essentially Eq. (28). Let us check that the variation of S 5 under a G gauge transformation does give Eq. (39): Thus this term exactly cancels Eq. (39).
Therefore the whole theory (5D bulk and 4D boundary) is gauge-invariant. Since the 5D bulk response only depends on the G gauge field, it describes a G-SPT phase. This result means that the U(1) gauge theory obtained by gauging the G-SPT described by the 4D action Eq. (37) can live on the boundary of a 5D G-SPT phase described by Eq. (40).

IV. APPLICATIONS
In this section we will apply the anomaly formula to various examples. In all these examples, the deconfinement obstruction class always vanishes.

A. G = Z2
Let us first consider U(1) gauge theories enriched by a unitary Z 2 symmetry. The extension of Z 2 by U(1) is given by Physically, ρ = −1 means that the Z 2 symmetry acts as a charge conjugation, and ρ = 1 means that it does not act as a charge conjugation. For the case with ρ = 1, because H 2 ρ [Z 2 , U(1)] = Z 1 , there is no nontrivial symmetry fractionalization pattern, and there is only one possible U(1) gauge theory with no fractionalization on E or M. This state is denoted by E b M b in Ref. [18].
Since all possible Z 2 -symmetry-enriched U(1) gauge theories have been exhausted here, we conclude that this "beyondcohomology" SPT phase cannot have a U(1) gauge theory as symmetry-preserving boundary termination. It may be interesting to work out a valid boundary state of this SPT.

B. G = SO(3)
Let us now consider an example of an anomalous U(1) QSL with SO(3) spin rotational symmetry. Ref. [18] shows that the state E b 1 2 M b 1 2 , where both E and M are bosons that carry spin-1/2, is anomalous. Now we apply our obstruction formula to re-derive this result. It suffices to show that this state is still anomalous when the SO(3) symmetry is broken down to its Z 2 × Z 2 subgroup, consisting of three π rotations around x, y and z axes. This is the minimal subgroup of SO(3) where the spin-1/2 projective representation still makes sense, since H 2 [Z 2 × Z 2 , U(1)] = Z 2 . In the anomalous theory, both E and M carry the nontrivial projective representation of Z 2 × Z 2 . Ref. [18] suggested that this state is still anomalous, and we indeed find that the obstruction class is nontrivial, thus verifying this statement. The details will be postponed to Sec. IV E.
Next we consider the symmetry group G = Z 2 × Z T 2 . This symmetry is relevant for experimental QSL candidates made of non-Kramers quantum spins. Ref. [18] found 75 symmetry fractionalization patterns for U(1) gauge theories with this symmetry, where 38 of them are anomaly-free and the other 37 are anomalous. We will apply our anomaly formula to rederive the anomalies of the 37 anomalous states, and we will also confirm a conjecture made in Ref. [18] about the anomaly classes.
Let us denote G = {1, Z, T, ZT} where Z is the generator of the Z 2 subgroup and T the generator of the Z T 2 subgroup. They satisfy Z 2 = T 2 = 1, ZT = TZ. The homomorphism ρ is determined by ρ(Z). We can then systematically classify fractionalization classes (see Appendix D for details).
Let us consider how to distinguish cohomology classes in H 5 [G, U(1)]. Applying Künneth formula, we find Given a 5-cocycle O, we can decompose the cohomology class in the following way: where r 1,2,3 ∈ {0, 1}, and O 1 is the generating . O 1 corresponds to (4+1)d SPT phases protected by Z 2 alone, which is precisely the state whose boundary can be (E bZ M bZ ) − (see Sec. IV A). Below we will focus on the remaining Z 2 2 part. We now discuss how to determine r i , i = 2, 3, from O. We consider r 3 first, which turns out to be simpler to define. We use a cohomology operation called slant product, which for each group element g defines a group homomorphism i g : To find r 2 , we need a generalization of slant product, 2-slant product, which are defined now for multiple group elements, see Appendix A 3. We define Using the definition of 2-slant product in Appendix A 3, one can check that both r 2 and r 3 are invariants for the cohomology class (i.e., invariant under coboundary transformations). We compute the obstruction classes when both ν and ω M are nontrivial (when either of them is trivial the obstruction class vanishes automatically). The result is tabulated in Table I. Ref. [18] indeed found that all the 6 states we consider here are anomalous. In fact, after exhausting all possible symmetry fractionalization patterns of this symmetry, Ref. [18] found in total 37 anomalous Z 2 × Z T 2 symmetric U(1) gauge theories. Furthermore, the arguments therein (see Sec. VII C of Ref. [18]) imply that, to show the anomalies of all these 37 states, it actually suffices to show that (E bZ M bZ ) − , (E bT M bT ) − and E bT T M b− are anomalous, which we have shown here. Therefore, we have reproduced the results in Ref. [18] on anomalous Z 2 × Z T 2 symmetric U(1) gauge theories. Ref. [18] also conjectured a classification of the anomaly classes of these 37 anomalous states, within each class the anomaly of the states are the same. Our results also confirm this conjecture. More precisely, there are 6 anomaly classes (see Ref. [18] for the properties of these states):
For concreteness, consider a translation-invariant lattice with spin-1/2 per unit cell, whose symmetry group is SO(3)×Z 3 . The LSMHO theorem states that such a system does not allow a nondegenerate ground state preserving all symmetries on a torus. Such a constraint can be understood as the manifestation of a particular 't Hooft anomaly, if we view this lattice system as the boundary of a (4+1)d crystalline SPT "bulk" that consists of a stack of Haldane chains in the 4th dimension [35,[47][48][49]. We will refer to this anomaly as the LSM anomaly. Our goal is to understand the implication of such an anomaly in a U(1) gauge theory.
Let us first explicitly write down the "bulk" theory for the LSM anomaly. While the protecting symmetry involves lattice translations, we will nevertheless treat them formally as an internal symmetry and imagine coupling the bulk to gauge fields of the translation symmetries Z 3 , denoted by x, y, z for translations in the three orthogonal directions. We also turn on a background SO(3) gauge field B. The bulk response theory takes the following form [49]: x ∪ y ∪ z ∪ w 2 (B). (48) Here Let us see how this anomaly can be resolved by a U(1) gauge theory. Notice that ρ(g) = 1 for g ∈ SO(3) because SO (3) is connected. For translations, let us for simplicity assume that T x,y,z act on the charges in the same way, denoted by ρ 1 : This is natural if the cubic rotation symmetry is preserved. As shown in Sec. III, there are three possibilities of how translation is associated with the duality transformation of a U(1) gauge theory: the translation acts as the identity, the charge conjugation, or the T transformation.
First we present an argument to rule out ρ 1 = 1. We calculate the fractionalization classes using the Künneth decomposition: The first factor of the above equation indicates that charges can transform as spin-1/2's under SO(3). The U(1) 3 factor represents magnetic translation algebra in xy, yz or zx planes. However, we should notice that each of these U(1) phase factors is a continuously tunable phase factor, and therefore should not form distinct fractionalization classes. This is similar to theta terms in topological response. 3 We conclude that when ρ 1 = 1 the fractionalization class of the translation symmetry is completely trivial, and thus can not happen in the presence of LSM anomaly, and, as a result, the translation must be mapped to a nontrivial element in the duality group. Next let us consider ρ 1 being the charge conjugation. In this case, we find So there is only one nontrivial translation symmetry fractionalization pattern. An invariant that characterizes the fractionalization class is To resolve the LSM anomaly, clearly one of E and M has to carry spin-1/2, because the "background matter fields" carry spin-1/2. Without loss of generality, let E carry spin-1/2. It is natural to expect that M needs to carry the nontrivial translation symmetry fractionalization. We show in Appendix E that this symmetry fractionalization pattern indeed realizes the LSM anomaly correctly. In contrast, the LSM anomaly cannot be realized if none of E and M carries spin-1/2, or none of them carries the nontrivial translation fractionalization pattern. The general condition for a U(1) QSL to satisfy the LSM constraint due to these symmetries is given by Eq. (E9).
Let us list the possible symmetry-enriched U(1) QSLs that can be realized in a lattice with spin-1/2 per unit cell. As before, we denote the one with spin-1/2 as E, the spinon. Then M must carry integer spin, otherwise the state suffers from the SO(3) anomaly. There are only two types of U(1) QSLs that satisfy the LSM constraint: means that the translation symmetry acts as charge conjugation, b 1 2 means a spin-1/2 boson, and btrn means a boson with nontrivial translation fractionalization. In Appendix F, we show that both of them can indeed be realized by explicit parton constructions.
On the other hand, if the lattice has an integer spin per unit cell, then the possible symmetric U(1) Lastly, we consider the possibility that ρ 1 is realized as T n for some nonzero integer n. Leaving a general classification of this case for future work, here we will briefly describe an example where one of the translations, say T z , is mapped to T 2 . To this end, we use a fermionic parton construction to write the spin operator in terms of Abrikosov fermions: S i = 1 2 f † i σf i , with the local gauge constraint f † i f i = 1 imposed. We then put the fermions into the a mean-field state described by a non-interacting Hamiltonian. The original spin system is recovered by coupling the fermions to U(1) gauge field. For our purpose, we choose the following mean-field band structure: for all fermions on a given xy plane, we make f ↑ and f ↓ both have the same Chern band with Chern number C = 1. Together they form a C = 2 band, which is the minimal required by the SU(2) spin symmetry (see Appendix C). In this case, the translations do not change the fermionic gauge charge. Now consider a magnetic monopole in the system. When the monopole is translated by one unit along z, say from below z = 0 to right above z = 0, the magnetic flux through the plane z = 0 changes by −2π. The quantum Hall response then creates charge-(−2) on the z = 0 plane. As a result, the under T z the monopole transforms as That is, this translation transformation is in fact T 2 . Notice that in this example E is fermionic. A similar state with bosonic electric charges was recently discussed in Ref. [36]. It is also possible to have a U(1) QSL where all three translations act as T 2 . To construct such a state, one just needs to take three copies of the above state and make them rotationally symmetric, and turn on hybridization between the charges in these three U(1) gauge theories. The resulting theory is an SO(3) and translation symmetric U(1) gauge theory with an odd number of spin-1/2's per unit cell, in which translations in all three directions act as T 2 .

E. Fermionic insulators
As the final application of our results, we study an example of interacting fermionic topological insulator protected by a unitary symmetry G [19,50]. For simplicity, we assume fermions transforming linearly under the symmetry group G, and ρ(g) = 1 for g ∈ G. After gauging the U(1) symmetry, one obtains a U(1) gauge theory with fermionic gauge charges. A topologically nontrivial insulator can have magnetic monopoles carrying projective representation under G, provided that there is no 't Hooft anomaly in the gauged theory.
To compute the anomaly, we first apply a T transformation so that the electric charge is bosonic. In other words, we may view the fermionic topological insulator as the result of "ungauging" the (1, 1) dyon in a U(1) gauge theory with bosonic electric charge. Since ρ is trivial, both ν and ω M are elements of H 2 [G, U(1)]. Because we assume that the fermion (1, 1) transforms linearly, it follows that ν = ω −1 M . In the following we specify to an example with G = Z N1 × Z N2 . Projective representations of G are classified according to H 2 [Z N1 × Z N2 , U(1)] = Z N12 , where N 12 is the greatest common divider of N 1 and N 2 . We have the following explicit expressions for the 2-cocycles: Now let us analyze the obstruction class. Kunneth formula gives . It is clear that we just need to consider the Z 2 N12 part. Ref. [19] found a complete set of invariants, e iΩ1 , e iΩ2 , e iΩ12 , e iΩ21 , for cohomology classes. We review the definitions in Appendix A. A straightforward calculation yields , Here N 12 is the greatest common divisor of N 1 and N 2 , and N 12 is the least common multiplier. The obstruction class is trivial if and only if e iΩ12 = e iΩ21 = 1.
For N 1 = N 2 = N , both of them reduce to πp 2 (N − 1). The obstruction class is e iΩ12 = (−1) p(N −1) , which is trivial for all odd N . For N = 2, p = 1 the obstruction class is nontrivial, which is the claim in Sec. IV B. We conclude that there exists topologically nontrivial fermionic insulators protected by Z N × Z N symmetry for odd N .
Consider another family of examples, with N 1 = 2 n1 , N 2 = 2 n2 . Without loss of generality we assume n 1 ≤ n 2 . The invariants are evaluated to Ω 12 = πp 2 2 2(n2−n1) (2 n2 − 1), As long as n 2 > n 1 , the obstruction class always vanishes. The simplest example is N 1 = 2, N 2 = 4. In this fermionic SPT phase, a magnetic monopole carries a projective representation of Z 2 × Z 4 . We notice that this state is the same as the intrinsically interacting fermionic SPT phase found in Ref. [19], which was obtained there essentially by using the group super-cohomology construction. It is worth mentioning that Ref. [19] only assumes the Z 2 fermion parity conservation, which means that the U(1) charge conservation is not essential for the existence of this phase.

V. SUMMARY AND DISCUSSION
In this work we have classified symmetry fractionalization and anomalies in a symmetry-enriched (3+1)d U(1) gauge theory with bosonic electric charges and a global symmetry group G, based on the conjecture that a G-symmetric U(1) gauge theory can be viewed as a partially gauged SPT. We find that, in general, a symmetryenrichment pattern is specified by 4 pieces of data: ρ, a map from G to the SL(2, Z) duality group which physically encodes how the symmetry permutes the fractional excitations, ν ∈ H 2 ρ·s [G, U(1)], the symmetry actions on the electric charge, p ∈ H 1 s [G, Z], indication of certain domain wall decoration with bosonic integer quantum Hall states, and a torsor n over H 3 ρ [G, Z], the symmetry actions on the magnetic monopole.
However, certain choices of (ρ, ν, p, n) are not physically realizable, i.e., they are anomalous. We find that there are two levels of anomalies. The first level of anomalies obstruct the fractional excitations being deconfined, thus are referred to as the deconfinement anomaly. States with these anomalies can be realized on the boundary of a (4+1)d long-range entangled state. The deconfinement anomalies are classified by H 3 ρ [G, U(1)]. If a state does not suffer from a deconfinement anomaly, there can be still the second level of anomaly, the more familiar 't Hooft anomaly, which forbids certain types of symmetry fractionalization patterns. States with these anomalies can be realized on the boundary of a (4+1)d short-range entangled state. These 't Hooft anomalies are classified by H 5 s [G, U (1)].
We have applied these results to some interesting physical examples. Besides being able to reproduce and extend the previous results in Ref. [18], we also utilized our anomaly formula to study the LSM-type constraints on a U(1) QSL, and some interesting interacting fermionic topological insulators.
Below we briefly discuss some future directions. One class of U(1) QSLs left out from our classification are those with θ = π in the presence of anti-unitary symmetries, and more generally U(1) gauge theories with fermionic electric charge. To extend our approach to these cases, it is necessary to have a complete understanding of interacting fermionic insulators.
We have briefly mentioned the possibility that certain unitary infinite-order symmetries, such as translations, can be realized as modular transformations, corresponding to a nonzero [p] ∈ H 1 [G, Z]. We have demonstrated the possible H 3 deconfinement obstruction class in these states. A more complete study of such phases, as well as their potential relation with the fractonic phases, will be left for future work.
Our classification principle only allows global unitary symmetries to act as the identity, charge conjugation or modular transformations in the duality group. An interesting open question is: to what extent a global symmetry acting as the S-duality transformation, for example, is anomalous, and what is the nature of the anomaly if there is any? We note that there have been a few works on U(1) gauge theories with a global symmetry realized as the S-duality [51][52][53]. In some cases the U(1) gauge theory is actually the "all-fermion" one, which is the boundary of a (4+1)d invertible topological phase [31,54]. We will leave this for future investigations.
Many of our results can be generalized to a Z N gauge theory in a straightforward manner. In particular, the parametrization of 4-cocycles can be applied to the Z N case without much modifications. Physically, however, the magnetic excitations are now extended loop-like objects. It will be important to develop a physical understanding of symmetry fractionalization on loop-like excitations, which will be addressed in future publications. Note added: while the manuscript was being finalized, a preprint on closely related topic appeared on arXiv [55]. We are also aware of a related work by Xu Yang and Ying Ran [56].
If we shift ν by a coboundary δµ where µ ∈ C n [G, Z], it simply amounts to shiftingω →ω + 2πµ, which does not affect the value of ω.

Slant products
A k-slant product maps a n-cochain ω n to a (n − k)-cochain ω n−k . If ω n is a n-cocycle, generally ω n−k is not a cocycle except for k = 1. However, if i g ω n is a (n − 1)-coboundary, then i g,h ω n is a (n − 2)-cocycle. For more details, see Ref. [57]. Notice that 1-slant product is often just called slant product.
Now we give the general definition of 1-slant product, often just known as the slant product. Let us consider M being a G-module with trivial action, and g ∈ G be an arbitrary element. We define the 1-slant product i g : It can be shown that δ(i g ω) = i g (δω). Therefore, i g is in fact a group homomorphism: For example, for a 5-cochain ω 5 , the 1-slant product is defined as The 2-slant product is given by And, for i = j, Ref. [19] showed that these are a complete set of invariants for cohomology classes in H 5 [Z N1 × Z N2 , U(1)].

Appendix B: Parametrization of 4-cocycles and classification of anomalies
In this appendix, we present the detailed derivation of the structure of the cohomology group H 4 [G, U(1)] given in Sec. III C.
To be self-contained, we first repeat the reasoning leading to the results here. The bulk properties of a symmetryenriched U(1) gauge theory is specified by the symmetry fractionalization patterns of the global symmetry G on the electric and magnetic charges. However, not all symmetry fractionalization patterns can be physically realized, and our goal is to obtain a set of sufficient and necessary conditions under which a symmetry fractionalization pattern is anomaly-free.
To do so, we will utilize that the symmetry-enriched U(1) gauge theory with global symmetry G can be viewed as a gauged bosonic SPT phase protected by a symmetry G, a U(1) extension of G. Such an group extension G is specified by a 2-cocycle in [ν] ∈ H 2 ρ·s [G, U(1)], and it physically encodes the symmetry fractionalization pattern of the electric charge of this symmetry-enriched U(1) gauge theory. As shown in Sec. III B, the relevant bosonic SPT phases can all be obtained from group cohomology, and each of them is specified by a 4-cocycle in H 4 ρ,s [G, U (1)]. Below, from this 4-cocycle, we will extract the data of the projective representation of the dual magnetic charge under G. We will also formulate a set of sufficient and necessary conditions for the symmetry fractionalization patterns to be anomaly-free.
A 4-cocycle in H 4 ρ,s [G, U(1)] can be represented by a U(1)-valued function of 4 elements in group G. Using a, b, c, d, · · · ∈ R/2πZ to denote elements in U(1), and g, h, k, l, · · · ∈ G to denote elements in G. An element in G can be denoted by a g , which means this element can be viewed as a composite of a and g. A 4-cocycle can be written as ω(a g , b h , c k , d l ) ∈ U(1), which satisfies the following 4-cocycle equation: where the group multiplication law is , and the two Z 2 gradings are defined as and ν(g, h) ∈ H 2 ρ,s [G, R/2πZ]. A 4-cocycle has a gauge freedom, which states that ω(a g , b h , c k , d l ) is physically equivalent to where u(a g , b h , c k ) is U(1)-valued. Below we will first derive a general parametrization of the 4-cocycles ω(a g , b h , c k , d l ), and find the anomaly-free conditions.

Parameterize the 4-cocycles
For generality of the calculations, throughout this section we use A = U(1) to denote the gauge group. The 4-cocycles contain much redundant information due to gauge freedom. To have a useful form of the 4-cocycles, we can use the gauge freedom to fix some of them. In particular, we will fix all of the following 4-cocycles to be 1: Notice that ω(a, b, c, d) = 1 can always be done because H 4 [A, U(1)] = Z 1 , which is true for A = Z N as well. For a general Abelian gauge theory, this condition means that it is untwisted. We will then express a general 4-cocycle ω(a g , b h , c k , d l ) in terms of the following objects: After a rather tedious calculation, by applying the 4-cocycle equations Eq. (B1) for various group elements, one can show that after the above gauge fixing the 4-cocycle can be written as h,k,l ( g a)ω s(gh) k,l An explicit choice for y g (a, b) is given by Also, note that, because H 2 [A, U(1)] = Z 1 , we can write the slant product of ω as a coboundary: Explicitly, we have Solving Eq. (B10) yields We proceed to solve Eq. (B12). Definẽ ω g,h,k (a) = ω g,h,k (a)µ(a, ν(g, h)) −s(gh)p(k) y gh (a, ν(g, h)) y gh (ν(g, h), a) Eq. (B12) can be written asω which means we can writeω where n(g, h, k) ∈ Z. Then Eq. (B13) becomes e ia(δρn)(g,h,k,l) = µ a (ν(gh, k))µ a (ν(g, h)) µ a (ν(g, hk))µ a ( g ν(h, k)) . (B24) Using the explicit expressions for y and µ given above, we obtain the following condition: Note that this equality must hold exactly as both sides are integers. To obtain this result we have used the fact that g acting on A is either the identity or the conjugation, which applies to all cases studied in this paper. Define γ(g, h, k) = 2s(gh)[ν(g, h)]p(k), the above equation takes the form This means γ must be a trivial 3-cocycle in H 3 [G, R/2πZ], otherwise there is no way to construct a 4-cocycle out of the corresponding [ν] and [p]. We will refer to [γ] as a H 3 obstruction class. Suppose the H 3 obstruction class vanishes, then one can find solutions for n from Eq. (B26). Two solutions n and n must satisfy δ ρ (n − n ) = 0, i.e., they differ by an integer-valued 3-cocycle of G. Therefore, in this case n is classified by a torsor over H 3 [G, Z]. As argued in the main text, this n encodes the symmetry actions on the magnetic monopole, and it is related to ω M by n = 1 2π δω M +n 0 , with ω M = e iω M and n 0 an integral 3-cochain satisfying δ ρ n 0 = Γ, which is used as a "reference" solution. In other words, starting from a particular solution n 0 , we can construct a new one n 0 + 1 2π δω M , in which the projective representation of the monopole is modified by ω M compared to the reference state.
Notice as long as G is unitary, or G contains time reversal with θ = 0, α(a g , b h , c k , d l ) = 1 and the 4-cocycle has a simple form Also, notice that when ν = 0, these conditions significantly simplify.
Eq. (B12) says that, for fixed g, h, k, ω g,h,k (a) forms a character over A, and Eq. (B13) means that ω g,h,k (a) is a 3-cocycle of G for a fixed a. In this case we recover the result of the Künneth formula.
Let O = e iÔ . We split the obstruction class into two parts: HereÔ 1 (g, h, k, l, m) = s(gh) gh ν(g, h)n(k, l, m), So this shows that when p = 0, δ sÔ ≡ 0. This concludes the proof for case (1). Notice that so far we have not made any further assumptions about ρ and s. Next we compute δ sÔ2 , now under the assumption that (ρ · s)(g) = 1. Explicitly we have: Therefore, δ s O = δ s (Ô 1 +Ô 2 ) = 0. This concludes the proof for case (2). So O is a 5-cocycle if p = 0 or if G commutes with U(1). In summary, in order for a given symmetry fractionalization pattern characterized by the triple (ρ, ν, n) to be anomaly-free, both Eq. (B26) and Eq. (B30) must hold. We believe these two equations also form a sufficient condition for the the triple (ρ, ν, n) to be anomaly-free. In this appendix we discuss the constraint from the U(N ) symmetry on the Hall conductivity of a (2+1)d bosonic invertible states (at the end we also briefly discuss the similar constraint on fermionic invertible states). We will see that if the boson is in the (bi-)fundamental represention of U(N ) (i.e., all charge-1 bosons also carry the fundamental representation of SU(N )), then the minimal nonzero Hall conductivity of an invertible state is N (2N ) in units of e 2 /h, if N is even (odd). The simplest way to see this is to consider gauging the U(1) symmetry and examine the 2π instanton operator. This instanton operator should be (1) bosonic and (2) carry a linear representation of PSU(N ). Condition (1) means that σ xy is even, and condition (2) means that σ xy is an integer multiple of N . Therefore, the minimal nonzero σ xy is N (2N ), if N is even (odd). This result of course agrees with Refs. [33,58], where the special cases with N = 1, 2 have been discussed.
To show this result more formally, we generalize the argument in Ref. [59], which was applied to the special cases with N = 1, 2 therein. The Hall conductivity can be determined by the response theory of this bosonic invertible state to an external U(N ) gauge field, a = a +ã1 with a an SU(N ) gauge field andã the U(1) gauge field. The generic (topological) response can be captured by the Chern-Simons Lagrangian: Notice σ xy = k 1 in units of e 2 /h. Below we determine the possible values of k 1 .
In order for this Lagrangian to describe a valid response of a bosonic invertible state, we can consider the case where a = diag(a 11 , 0, 0, · · · , 0). Then the above Lagrangian becomes L = k 1 + N (N − 1)k 2 4πN 2 a 11 da 11 .
For this to be a valid bosonic response, there must exist an integer m, such that Clearly k 1 is a multiple of N , so we can write it as k 1 = N · n, with n an integer. Now our goal becomes to find the possible values of n, which satisfies n + (N − 1)k 2 = 2mN (C4) The right hand side is even, so must be the left hand side. If N is odd, then n must be even for the left hand side to be even. The smallest nonzero even number is 2, and n = 2 can be achieved by having k 2 = 2 and m = 1. So if N is odd, the minimal nonzero Hall conductivity is σ xy = 2N . If N is even, then it is possible to achieve n = 1 by having k 2 = N + 1 and m = N/2. So the minimal nonzero Hall conductivity is σ xy = N if N is even.
Suppose one wants to have a bosonic system with a nonzero σ xy smaller than N (2N ) for even (odd) N , besides making the bosons form a fractional quantum Hall state, one can also consider making the bosons living on the boundary of a (3+1)d system with a bulk θ-term for the U(1) gauge field: with θ = 2πσ xy andF the U(1) gauge field strength that is extended into the (3+1)d bulk. In the absence of any other global symmetries, this (3+1)d bulk is a generic invertible state (i.e., it can be smoothly connected to a product state without encountering a phase transition). Nevertheless, its boundary is an invertible state that cannot be realized in purely (2+1)d. Such a boundary state is also referred to as an anomalous invertible state [37]. For completeness, we also discuss the minimal Hall conductivity for a U(N ) symmetric fermionic invertible state. In this case, the constraint equation Eq. (C3) is replaced by Here k 1 = N can always be achieved by having k 2 = m = 1. That is to say, the minimal nonzero Hall conductivity for a U(N ) symmetric fermionic invertible state is σ xy = N for any N . Physically, this state can be realized by a U(N ) symmetric version of the Haldane model (i.e., in the field-theoretic terminology, a pair of gapped Dirac fermions in the (bi-)fundamental representation of U(N ) symmetry) [60]. Just as the bosonic case, at the expense of putting it on the surface of a (3+1)d bulk with a θ-term, here one can also have anomalous fermionic invertible states where σ xy is smaller than N .
Parallel to the discussion in Sec. IV D, we will only consider the case where translation acts as charge conjugation. In this case, H 2 ρ [Z 3 , U(1)] = Z 2 , which means there is only one nontrivial translation fractionalization pattern. The 2-cocycle of this nontrivial translation fractionalization pattern can be written as η(a, b) = (−1) bx(ay+az)+by(ax+ay) (E1) where a = T ax x T ay y T az z , with T x,y,z the generator of translation along the x, y, z directions, and a x,y,z ∈ Z (similar for b). It is straightforward to check that this is indeed a 2-cocycle, and the invariant is nontrivial Below we analyze whether a symmetry-enriched U(1) QSL satisfies the LSM constriant, i.e., we will check what projective representation of H each unit cell carries. To do so, we can calculate where O is the obstruction 5-cocycle of this symmetric U(1) gauge theory. Then ν xyz | H , the restriction of ν xyz to H, represents the representation of H in each unit cell.
The following observation will simplify the calculation of ν xyz | H . With the symmetry G, a generic U(1) gauge theory can be written as (E b(ν1,ν2) M b(µ1,µ2) ) − , where the − outside the bracket reminds us that the translations act as charge conjugation, and the subscript b(ν 1 , ν 2 ) means that this excitation is a boson with symmetry fractionalization pattern ν = (ν 1 , ν 2 ). The anomaly of (E b(ν1,ν2) M b(µ1,µ2) ) − can be decomposed into the anomalies of some other states: where A ⊕ B means adding the anomalies of A and B, or more physically, stacking A and B and switching on the hybridization of their certain excitations. The above decomposition means that, in order to obtain ν xyz | H for (E b(ν1,ν2) M b(µ1,µ2) ) − , we just need to obtain the ν xyz | H 's of the four simpler states and then add them together.