Symmetry-Enriched Quantum Spin Liquids in $(3+1)d$

We use higher-form global symmetry to classify the symmetry-enriched phases with ordinary global symmetry in bosonic (3+1)d field theory. Different symmetry-enriched phases correspond to different ways to couple the theory to the background gauge field of the ordinary (0-form) symmetry, which include different symmetry-protected topological (SPT) phases. A general (3+1)d theory has one-form and two-form global symmetries ${\cal A}$ and ${\cal B}$, generated by the symmetry surface and line operators. We assume the two-form symmetry is finite. The two-form symmetry implies the theory has the following symmetry defects: (1) surface defects classified by $H^2({\cal B},U(1))$, they generate a one-form symmetry that acts trivially on all lines. (2) volume defects classified by $H^3({\cal B},U(1))'$, they generate a 0-form symmetry that neither acts on local operators nor permutes the types of non-local operators. The couplings of a (3+1)d bosonic theory to the background of an ordinary unitary symmetry $G$ can be classified by $(\eta_2,\nu_3,\xi)\in H^2_\rho(BG,{\cal A})\times C^3(BG,{\cal B})\times H^1_\sigma(BG, H^3({\cal B},U(1))')$ where $\rho,\sigma$ are fixed $G$-actions induced by permuting the non-local operators. $\delta_\sigma\nu_3$ is subject to a constraint that depends on $\eta_2$ and $\xi$, and $\nu_3$ has an equivalence relation. We determine how the classification and the corresponding 't Hooft anomaly depend on $\xi$. The set of SPT phases of 0-form symmetry that remain inequivalent depends on the couplings $(\eta_2,\nu_3,\xi)$ of the symmetry-enriched phase and can be obtained from the anomaly of the higher-form symmetries. We illustrate our methods with several examples, including the gapless pure $U(1)$ gauge theory and the gapped Abelian finite group gauge theory. We apply the methods to 't Hooft anomaly matching in (3+1)d non-supersymmetric duality.


Contents
In this note we investigate the problem of classifying different ways of coupling a conformal field theory (in the broad sense including topological quantum field theory) in (3 + 1)d to the background gauge field of an ordinary global symmetry. Such theories are said to be enriched by the global symmetry. They can arise as the low energy effective descriptions of microscopic lattice models. Since such theories are fixed points of the renormalization group (RG) flow, no operators are confined or decoupled 1 , and thus any two theories with two different couplings to the background field cannot be continuously connected to each other without breaking the global symmetry. They belong to different symmetry-enriched phases of the theory. Symmetry-enriched phases generalize the notion of symmetry-protected topological (SPT) phases (see e.g. [1][2][3]) 2 . While an SPT phase has trivial dynamics and only depends on the background gauge field, a general symmetry-enriched phase can be described by a non-trivial coupling between a dynamical system and the background gauge field together with a decoupled SPT phase. When the theory is gapped, the symmetryenriched phases are known as symmetry-enriched topological (SET) phases (see e.g. [5][6][7][8][9]).
Symmetry-enriched phases can be anomalous. This means the symmetry has an 't Hooft anomaly i.e. obstruction to gauging it. Then the system with the background gauge field cannot be defined in (3 + 1)d, but it can live on the boundary of a (4 + 1)d bulk SPT phase that describes the anomaly. Different symmetry-enriched phases in general have different anomalies. Since the 't Hooft anomaly is an invariant of the renormalization group flow, a symmetry-enriched phase that does not have the same anomaly as the microscopic model cannot be the only physics at the low energy 3 . This has applications to the infrared dualities in field theory, and the physics on domain walls or interfaces (see e.g. [11][12][13][14]).
When the symmetry is continuous, the background gauge field can couple to a conserved current in the effective field theory. On the other hand, for theories that have non-local operators, there are additional ways to couple the system to the background gauge field. In fact, there may not even be a local conserved current, such as in a gapped SET phase. In this note we will focus on how the presence of non-local operators affects the possible symmetry-enriched phases, where the symmetry can be continuous or discrete.
The classification of symmetry-enriched phases in (2 + 1)d topological quantum field theory (TQFT) has been investigated in e.g. [15][16][17][18][19]. For the ordinary global symmetry G that permutes the types of line operators (anyons) in a fixed way, the classification is where A is the set of Abelian anyons, or the one-form global symmetry [20], and ρ is the action of the G symmetry on the Abelian anyons (see figure 1 with line operators). In this note we will propose a generalization of this classification to (3 + 1)d, given in (1.2).
In general, a theory in (3 + 1)d has line operators (particle excitations) and surface operators (string excitations) 4 . Any non-trivial operator has at least one non-trivial corre-2 Similar to SPT phases, symmetry-enriched phases can have non-trivial boundary states (see e.g. [4]). 3 An example is the "symmetry-enforced gaplessness" discussed in [10], where a theory in (2 + 1)d with a mixed anomaly between an SU (2) symmetry and the time-reversal symmetry cannot flow to a gapped low energy theory that preserves the symmetries in the UV. 4 In this note the dimension spanned by an operator or a defect refers to the dimension in spacetime as opposed to the dimension in space. We will work in Euclidean signature and use the terms operator and defect interchangeably. The non-local operators that are topological and invertible (obey group-law fusion rules) will play an important role in the discussion. Such operators generate higher-form global symmetries [20], and thus they are symmetry operators. The symmetry line operators generate a two-form symmetry B that transforms the surface operators. The two-form symmetry must transform at least a surface operator, otherwise the symmetry line operator would not have a non-trivial correlation function. The symmetry surface operators generate a one-form symmetry A that transform line operators. However, there are symmetry surface operators that generate a one-form symmetry that does not transform any line operator 6 . In condensed matter systems, higher-form global symmetry can emerge at low energy 7 . Different higher-form symmetries can also mix to form higher-groups, which means the backgrounds for the higher-form symmetries obey modified cocycle conditions that depend on the backgrounds of lower-form symmetries (see e.g. [28][29][30]). 8 The ordinary global symmetry (0-form symmetry) is generated by codimension-one symmetry volume defects [20]. Thus different ways of coupling the theory to the background gauge field of 0-form symmetry G correspond to different codimension-one symmetry G defects that can be defined in the theory. 5 In (3+1)d spacetime, two topological surface operators have contact interactions, while three topological surface operators can have non-trivial triple-linking ("three-loop braiding") correlation function [21][22][23][24]. 6 In section 3, we will describe an example of such a symmetry surface operator in an Abelian gauge theory: it has non-trivial triple-linking correlation function with two other surface operators and has trivial braiding with all line operators. Such surface operators are counterexamples to the claim in [25] that every non-trivial surface operator has braiding with some line operator. 7 For applications of higher-form symmetry to condensed matter physics, see e.g. [26,27]. 8 In this note we will assume the theory does not have a non-trivial three-form global symmetry, which would be generated by a non-trivial local operator [20] that has scaling dimension zero for the correlation functions to be topological.
If a single 0-form symmetry defect transforms all line and surface operators by phases 9 , then it reduces to symmetry line or surface defects that generate higher-form symmetries and thus is a trivial 0-form symmetry defect. Any two types of 0-form symmetry defect are equivalent if their difference (the composition defect with one of them inverted) is a trivial 0-form symmetry defect.
In the following we will summarize several mechanisms for constructing these 0-form symmetry defects (they will be discussed in detail in section 2).
(1) The first mechanism for defining 0-form symmetry defects is by an action on the local operators and by a permutation on the set of line and surface operators. This is the generalization of 0-form symmetry in (2 + 1)d that permutes the types of anyons. For instance, the charge conjugation symmetry in U (1) gauge theory permutes the Wilson line of charge Q to the line of charge −Q (see figure 1).
We use the higher-form symmetry defects to construct codimension-one symmetry defects, which roughly speaking correspond to "direct products" of higher-form symmetry defects. Some of these defects exhibit the following new features: 10 (2) There are 0-form symmetry defects that do not permute the types of non-local operators. Instead they dress the non-local operators that pass through them with redundant symmetry defects that modify only the contact correlation functions of the operators. In particular, they modify the junctions of open non-local operators (see figure 2 in section 2.2).
(3) There are Z 2 0-form symmetry defects that neither permute the types of non-local operators nor dress the non-local operators with redundant symmetry defects. Instead, they modify the line intersections between surface operators and the 0-form symmetry defects: when the orientation on the 0-form symmetry defect is reversed, there are additional symmetry line operators inserted at the line intersections (see figure 3 in section 2.2).
Finally, we have: (4) The last mechanism modifies the 0-form symmetry defects by inserting higher-form symmetry defects at the junctions where three or more 0-form symmetry defects meet (see figure 5 and figure 6 in section 2.3). This modification can be detected in correlation functions involving junctions of multiple 0-form symmetry defects, as opposed to the symmetry defects produced by the first two mechanisms which can be detected in correlation functions involving only a single 0-form symmetry defect. The 9 The one-dimensional representations are valued in phases. 10 There are no similar features in (2 + 1)d TQFT without deconfined topological point operators.
modifications on the junctions must satisfy certain consistency conditions that can be described by higher-form symmetries (in general, a three-group global symmetry).
In this note we will focus on the classification of symmetry-enriched phases with a fixed action of the 0-form symmetry on local operators and a fixed permutation on the species of non-local operators. Namely, we will focus on the above mechanisms except for the first one. The list is also not meant to be complete, but it reproduces and generalizes many results in the literature (see section 1.1 for a comparison).
If the theory does not have a non-trivial two-form symmetry, then we show the classification of symmetry-enriched phases is the same as in (2 + 1)d, by H 2 ρ (BG, A). If the theory has two-form symmetry B, then the classification is modified to be 11 where H 3 (B, U (1))) is the quotient of H 3 (B, U (1)) by the subgroup generated by its antisymmetric elements, and ρ, σ are the G-actions induced by permuting the generators of the higher-form symmetries. There is a constraint that specifies δ σ ν 3 in terms of η 2 , ξ, and the equivalence relation on η 2 ∈ H 2 ρ (BG, A) induces a equivalence relation on ν 3 by the constraint. We determine how the constraint on δ σ ν 3 depends on ξ. We discuss how to obtain the general constraint on δ σ ν 3 by correlation functions.
The different couplings in (1.2) correspond to 0-form symmetry G with different 't Hooft anomalies in general. The 't Hooft anomaly of 0-form symmetry in (3 + 1)d bosonic theory is classified by H 5 (BG, U (1)), and it is given by the phase difference that appears between different ways of fusing five 0-form symmetry defects. When changing the way of fusing 0-form symmetry defects, the higher-form symmetry defects inserted at the junctions can cross each other and induce additional 't Hooft anomalies of the 0-form symmetry from the 't Hooft anomalies of the higher-form symmetries. In section 2 we will discuss how the 't Hooft anomaly of 0-form symmetry depends on the couplings (1.2).
In addition to the couplings (1.2) to the background gauge field, the symmetry-enriched phases also include the SPT phases of 0-form symmetry. The SPT phases for 0-form symmetry G are classified in [1][2][3]. We will show that some of the SPT phases become trivial when the background gauge field couples to the dynamics. The existence of such SPT phases implies the system cannot be trivially gapped, even if the 0-form symmetry does not have an 't Hooft anomaly. We provide examples to show that such SPT phases of 0-form symmetry trivialized by the dynamics can be obtained from the 't Hooft anomaly of hidden anomalous higher-form symmetries. In these examples, the SPT phases that are trivialized by the dynamics are reduced to lower-dimensional SPT phases on non-local 11 The two-form symmetry B also contributes additional one-form symmetry H 2 (B, U (1)) ⊂ A, which yields additional couplings by H 2 ρ (G, A). See section 2 for details.
operators. For instance, in (1 + 1)d Z 2 gauge theory where the dynamical gauge field a couples to the backgrounds X, Y of Z 2 × Z 2 ordinary global symmetry as π 2d aY , the (1 + 1)d SPT phase π 2d XY can be removed by the Z 2 one-form symmetry a → a + X [31] that gives rise to the (0 + 1)d SPT phase π 1d X on the Wilson line π a.
In this note we will focus on unitary internal global symmetry. We will also assume the theory is bosonic. In particular, all local operators must be bosonic. This means the theory does not require a spin (or more generally pin ± ) structure.

Comparison with literature
In the following we would like to make some comparisons with two existing methods in the literature to study symmetry-enriched phases in (3 + 1)d.
One method begins with an SPT phase of an ordinary symmetry and then promotes the gauge field of a subgroup to be dynamical (see e.g. [32][33][34]). This construction relies on having a microscopic gauge theory description for the effective theory 12 , and there can be multiple microscopic descriptions for the same low energy theory. This is unlike our approach which does not require a microscopic model. In addition, any symmetry-enriched phase obtained from gauging an SPT phase with dynamical gauge field cannot have an 't Hooft anomaly for the remaining 0-form symmetry in the original SPT phase 13 . On the contrary, the symmetry-enriched phases discussed in our approach can have 't Hooft anomalies, which have additional applications such as 't Hooft anomaly matching. Furthermore, the approach of studying symmetry-enriched phases by gauging SPT phases does not distinguish how the global symmetry permutes the non-local operators. On the other hand, in our approach we study the classification for fixed permutation, and thus we can identify the different mechanisms involved in the symmetry-enriched phases. In section 2.7 we will make this comparison for the example of a finite group H gauge theory with unitary finite group G 0-form symmetry 14 , by comparing the symmetry-enriched phases classified in our approach and the symmetry-enriched phases obtained by gauging the symmetry H of the SPT phases with G × H symmetry.
Another method is to enumerate the anomalous quantum numbers of particle and string excitations under the 0-form symmetry. Different quantum numbers correspond to different ways the 0-form symmetry "acts" on the non-local operators (see e.g. [39,4,40]). This is 12 See [25] for an argument in favor of the existence of a gauge theory description for any bosonic (3 + 1)d TQFT. On the other hand, there are conformal field theories that do not have a Lagrangian description that preserves the global symmetry. 13 There is a generalization that starts with a certain almost trivial theory instead of an SPT phase and gauges a subgroup symmetry with dynamical gauge field. This construction can produce a subset of anomalous SET phases, see e.g. [35][36][37] and the review in section 2.6 of [38]. 14 The finite groups G, H can be non-Abelian.
incorporated and generalized in the last mechanism that we discussed above. If the higherform symmetry defects inserted at the junctions of the 0-form symmetry defects generate a faithful higher-form symmetry, such insertions can be detected by correlation functions with the corresponding charged objects. Such correlation functions can be interpreted as the line or surface operators carrying an 't Hooft anomaly of the 0-form symmetry on their worldvolumes. For instance, when the charged object that detects the insertions is a line operator (particles), this means that different insertions on the junction give the particle excitation different projective representations of the 0-form symmetry 15 . Similarly, the modification of junctions by inserting symmetry line operators changes the 't Hooft anomaly of 0-form symmetry on the worldvolume of surface operators that are charged under the two-form symmetry.
On the other hand, there can be symmetry surface operators inserted at the junctions that do not generate a faithful one-form symmetry i.e. they have trivial braiding with all line operators. These modifications cannot be detected by the anomalous quantum number on the particle excitations and string excitations 16 , but they nevertheless represent new 0-form symmetry defects.

Summary of models
We discuss several examples to illustrate the methods. A gapless example is the pure U (1) gauge theory in (3 + 1)d with time-reversal symmetry, where F is the U (1) field strength and the time-reversal symmetry requires θ ∈ πZ. The theory has line operators, labelled by the electric and magnetic charges (q e , q m ), and they transform under A = U (1) × U (1) one-form global symmetry. On the other hand, the theory has trivial two-form symmetry. We classify different ways to couple the theory to the background of the time-reversal symmetry (more precisely, the time-reversing Lorentz symmetry O(4)), where the time-reversal symmetry T permutes the line operators as 17 15 This is similar to the symmetry fractionalization classified by one-form symmetry in (2 + 1)d (see e.g. [15,17,30]). 16 As we will discuss in section 2 and 3, there are one-form symmetry defects that have non-trivial correlation functions only with at least two surface operators of another type. 17 Such time-reversal symmetry does not commute with the electric U (1) gauge rotation and is denoted by The classification (1.2) in this case reduces to H 2 T (BO(4), U (1) × U (1)), and it reproduces the classification of symmetry-enriched phases in [4].
A gapped example is the Abelian finite group gauge theory in (3 + 1)d with trivial Dijkgraaf-Witten action [41]. We discuss the Z 2 gauge theory with time-reversal symmetry, and we show only a subset of the couplings can be obtained by Higgsing the time-reversal symmetric U (1) theory. We also reproduce the results in [42] for Z 2 gauge theory.
As an application, we find the Z 2 gauge theory coupled to the background gauge fields of 0-form and one-form symmetries with the 't Hooft anomaly as required to be the candidate topological sector in the non-supersymmetric (3 + 1)d duality proposed in [43,44]. The duality conjectures that SU (2) gauge theory with one massless adjoint Dirac fermion flows at low energy to a free massless Dirac fermion with a decoupled Z 2 gauge theory. The theory in the UV has Z 8 0-form symmetry under which the fermions have charge one, and Z 2 oneform symmetry that transforms the SU (2) fundamental Wilson line. The symmetries have a mixed anomaly (see e.g. [45,43]). By scanning the different ways to couple the low energy theory to the background gauge field of 0-form symmetry we find that within the list of couplings we discussed, for the low energy theory to preserve the Z 8 0-form symmetry the Z 2 one-form symmetry in the UV would have to be spontaneously broken 18 . The Z 2 gauge field is the corresponding Goldstone boson. We also describe a general method to construct a TQFT of the Goldstone modes that matches any given 't Hooft anomaly of spontaneously broken finite group higher-form symmetries.
In another scenario [43], the Z 8 0-form symmetry is spontaneously broken to Z 4 and the theory has a domain wall interpolating between the two vacua. The low energy theory in the vacua is proposed in [43] to be a massless Dirac fermion with a decoupled Z 2 gauge theory. We propose a Z 2 gauge theory coupled to background fields that realizes the anomaly in the UV, and we discuss several possible theories on the domain wall that match the anomaly.
The note is organized as follows. In section 2 we discuss different couplings to backgrounds of the 0-form symmetry using the higher-form symmetries. In section 3 we discuss the example of Abelian finite group gauge theory. In section 4 we discuss the application to adjoint QCD 4 with two flavors. In section 5 we discuss U (1) gauge theory with time-reversal symmetry. In section 6 we discuss several other examples.
There are several appendices. In appendix A we summarize some mathematical facts about cochains and higher cup products. In appendix B we discuss the dimensional reduction to (2 + 1)d for different symmetry-enriched phases of Z n gauge theory. In appendix C we discuss how gauging higher-form symmetries in different symmetry-enriched phases can lead to different SPT phases. In appendix D we reproduce the classification in [40] for U (1) gauge theory with SO(3) and time-reversal symmetry.
2 Classification of symmetry-enriched phases from higherform symmetry

Symmetry defects from permuting non-local operators
In this section we will discuss codimension-one symmetry defects that permute the species of non-local operators. When a line (surface) operator pierces the codimension-one symmetry defect, it becomes another type of line (surface) operator (see figure 1). The local operators are also transformed when passing through the codimension-one defect. Such codimensionone symmetry defects are determined by the detailed dynamics of the theory, and we will not attempt to classify them here. The complete set of such codimension-one symmetry defects generates a 0-form symmetry S that we will call the intrinsic 0-form symmetry. Then the theory can couple to the G gauge field by a homomorphism f ∈ Hom(G, S) . (2.1) The coupling corresponds to depositing on g ∈ G symmetry defects the f (g) ∈ S symmetry defect that permutes the non-local operators.
The homomorphism f satisfies constraints that arise from the requirement that coupling the system to the background gauge field for the 0-form symmetry does not activate independent background gauge fields for the higher-form symmetries. This restricts the possible couplings to the background of 0-form symmetry to those that do not combine with the one-form symmetry to be a two-group symmetry and do not combine with the two-form symmetry to be a three-group symmetry (for a discussion about higher-group symmetry see e.g. [28][29][30]). Denote the backgrounds for the one-form and two-form symmetries by B 2 , B 3 , such higher-group structure is described by the constraint where Θ 3 ∈ H 3 ρ (BG, A) and Θ 4 ∈ H 4 σ (BG, B) arise from the permutation action f on the line and surface operators. The constraint on f means that Θ 3 and Θ 4 vanish in cohomology, i.e. Θ 3 = δ ρ η 2 and Θ 4 = δ σ ν 3 for η 2 ∈ C 2 (BG, A) and ν 3 ∈ C 3 (BG, B). Thus the theory can couple to only the background X, with fixed backgrounds of the higher-form symmetries B 2 = X * η 2 and B 3 = X * ν 3 .
The group cocycles Θ 3 and Θ 4 in the constraint (2.2) can be detected by correlation func-tions. Since the background field is Poincaré dual to the locus where the generating symmetry defects are inserted, the first equation in (2.2) says the intersection of four 0-form symmetry defect g 1 , g 2 , g 3 , g 1 g 2 g 3 emits the two-form symmetry surface defect Θ 3 (g 1 , g 2 , g 3 ) 19 . Namely, different ways of fusing g 1 , g 2 , g 3 defects differ by additional symmetry surface defect Θ 3 (g 1 , g 2 , g 3 ), and the latter can be detected by correlation functions. Similarly Θ 4 can be detected by the correlation functions for different ways of fusing four 0-form symmetry defects. Θ 3 , Θ 4 are the generalizations of the H 3 obstruction to symmetry fractionalization discussed in [15,17,47]. In particular, they do not represent an 't Hooft anomaly of the 0-form symmetry, as emphasized in [29,30].

Symmetry defects from higher-codimension symmetry defects
In this section we will construct symmetry defects from the generators of the higher-form symmetries. For instance, when two symmetry defects are mutually local (do not have a non-trivial braiding correlation function), then taking their products give new symmetry defects of lower codimensions. We will first give an example using Z n gauge theory, and then discuss the generalization.

Z n gauge theory
The bosonic Z n gauge theory in (3 + 1)d can be described by a Z n one-cochain u and a Z n two-cochain v 2 with the action 2π n uδv 2 . (2. 3) The equations of motion for u, v 2 impose that they are Z n cocycles.
The theory has invertible topological line and surface operators They generate a Z n two-form symmetry and a Z n one-form symmetry, respectively. The theory couples to the backgrounds B 2 , B 3 for the one-form and two-form symmetry by 2π n uB 3 and 2π n B 2 v 2 . A direct computation (see e.g. [24]) shows that the line U and the surface V have a Z n correlation function that depends on their linking number: for U, V supported on the line γ and surface Σ, it is This implies that the surface V is charged under the two-form symmetry generated by U . Likewise, the line U is charged under the one-form symmetry generated by V . This means that the one-form and two-form symmetries have a mixed 't Hooft anomaly.
In addition, the theory has the following codimension-one symmetry defect from the Z n one-form gauge field where the integrand equals uBock(u), with the Bockstein homomorphism for the short exact sequence 1 → Z n → Z n 2 → Z n → 1. The tilde denotes a lift of u to a Z n 2 cochain, and different lifts only changes the integrand by exact cocycle, while the integral is independent of the lift. Thus we will drop the tilde notation from now on. The worldvolume of the defect supports a non-trivial (2 + 1)d Dijkgraaf-Witten theory for Z n gauge group [41].
The theory also has the following codimension-one symmetry defect from the Z n twoform gauge field where the integrand equals Bock(v 2 ). This codimension-one defect is a "fractional surface operator" that depends on the three-dimensional bounding manifold. At the three-junctions of this codimension-one symmetry defect V q 1 , V q 2 , V −[q 1 +q 2 ]n where [q] n = q mod n, there is a symmetry defect V (q 1 +q 2 −[q 1 +q 2 ]n)/n for the one-form symmetry. Thus coupling the theory to background field using this codimension-one symmetry defect is the same as modifying the three-junction by generators of the one-form symmetry. This belongs to a special case in section 2.3 and we will not count it as an independent coupling.
In addition to the codimension-one defects discussed above, there are also codimensiontwo symmetry defects from the two-form symmetry, generated by W = exp 2πi n δu/n , W n = 1 . (2.8) Similar to V, this is a "fractional symmetry line defect" that is specified by the symmetry line operator appears at the three-junction of W. As demonstrated in section 3, such defects have only contact correlation functions i.e. they are redundant symmetry defects. Therefore we will not count them as non-trivial surface operators. Similar to the defect (2.7), they can form junctions that support non-trivial line operators.
If the gauge group is Z n 1 ×Z n 2 instead of Z n , with Z n 1 and Z n 2 cochains (u 1 , v 1 2 ), (u 2 , v 2 2 ), then there are additional codimension-one symmetry defects and u 1 v 2 2 , u 2 v 1 2 . These are valid because u 1 is mutually local with Bock(u 2 ), v 2 2 . Similarly, there is an additional symmetry surface defect (2.10) Unlike Bock(u 1 ) or Bock(u 2 ), the symmetry defect W 12 has non-trivial correlation functions. For instance, it can link with two other surface operators v 1 2 , v 2 2 , and we compute the correlation functions in section 3. Thus the symmetry surface defect W 12 is a non-trivial operator in the theory.

Generalization
Here we will generalize the above construction to any theory with finite two-form symmetry.
Our argument uses the property that the two-form symmetry in (3 + 1)d does not have an 't Hooft anomaly by itself (while there can be mixed anomalies with other symmetries 20 ). This follows from the fact that there are no non-trivial correlation functions that involve only the symmetry line operators. Another way to see this is that one cannot write down a corresponding 5d SPT phase. This property of two-form symmetry enables us to gauge the two-form symmetry and obtain a new theory without two-form symmetry.
Any finite Abelian group is isomorphic to a product of cyclic groups B = i Z n i . Let us first consider the case where the two-form symmetry is B = Z n .
We gauge the two-form symmetry in the theory by introducing a dynamical three-form gauge field b 3 . The resulting theory has an emergent Z n 0-form symmetry generated by exp 2πi n b 3 , which we could then gauge to recover the original theory. Denote the gauge field for this Z n 0-form gauge symmetry by u. It couples as a Lagrangian multiplier 2π n ub 3 . Thus we find the exact duality Theory A ←→ Theory B = Theory A × (Z n gauge theory) where the quotient denotes gauging the diagonal Z n two-form symmetry with dynamical gauge field b 3 , and the Wilson lines of the Z n gauge theory are generated by u. The duality (2.11) is nothing but a Z n discrete Fourier transform and its inverse.
The advantage of the duality (2.11) is that in the dual Theory B the two-form symmetry of the original theory is now generated by the Z n Wilson line U = exp 2πi n u , and we can use the Z n gauge field u to construct the symmetry defects U, W in (2.6), (2.8). 20 An example is the mixed anomaly between Z 2 two-form symmetry and the bosonic Lorentz symmetry, with the 5d SPT [48,49] π 5d Sq 2 (B 3 ) = π 5d (w 2 + w 2 1 )B 3 , where B 3 is the background for the two-form symmetry, and w 1 , w 2 are the first and second Stiefel-Whitney classes for the manifold.
The generalization to arbitrary discrete two-form symmetry B = Z n i is straightforward. The 0-form symmetry defects can be constructed using the Z n i gauge fields in the dual description. On their worldvolumes, the defects have (2 + 1)d Dijkgraaf-Witten theories [41] with gauge group B, and thus they are classified by H 3 (B, U (1)).
Similarly, there are symmetry surface operators of the form uu that arise from the two-form symmetry. These generate a subgroup H 2 (B, U (1)) ⊂ A of the one-form symmetry. Below we will argue that this subgroup one-form symmetry does not transform any line operators, but the surface operators (of the type uu ) that generate this one-form symmetry have non-trivial correlation functions with other surface operators. On the other hand, the surface operators Bock(u) are trivial in H 2 (B, U (1)) and thus they are excluded in this classification. This is consistent with the discussion below where we find that they have only contact correlation functions i.e. they are redundant symmetry defects.

Correlation functions
We can use the duality (2.11) to compute the correlation functions of the above symmetry defects built from the two-form symmetry.
First, we need to understand the operators in the dual theory B. The line operators are all possible tensor products of the lines in theory A and the Wilson lines in the Z n gauge theory, subject to the identification using the generators of the diagonal two-form gauge symmetry. On the other hand, the surface operators must be invariant under the diagonal gauge two-form symmetry. Since the surface operator V is charged under the two-form symmetry in the Z n gauge theory, it must be paired with another surface in theory A that has the opposite two-form charge to make the tensor product of the surface operators gauge invariant.
The above consideration implies that the symmetry defects built from the two-form symmetry (denote schematically by U of codimension-one and W of codimension-two) have trivial correlation functions with the operators from the theory A. Moreover, since the symmetry defects U, W also have trivial correlation functions with lines in the B gauge theory, as demonstrated in section 3.
surface · · · U · · · W · · · = · · · i (V i ) q i · · · U · · · W · · · B gauge theory , (2.12) where V i is the basic surface operator in the Z n i gauge theory charged under the two-form symmetry. This replacement is carried out for each operator in the correlation function. The correlation functions in the B gauge theory are discussed in section 3.3.
In particular, from (2.12) and the correlation functions in the B gauge theory we find that the symmetry surface defects Bock(u i ) have only contact correlation functions, and therefore they should not be included in the list of non-trivial operators.
It is also interesting to look at the correlation functions of the non-trivial symmetry surface operators constructed from symmetry line operators, classified by H 2 (B, U (1)) for two-form symmetry B. From the computation in section 3.3 we find this symmetry surface operator has non-trivial triple-linking correlation function with two other surface operators, and thus this operator is non-trivial. On the other hand, it has trivial correlation functions with any line operators. Therefore, any theory in (3 + 1)d with a finite two-form symmetry B with non-trivial H 2 (B, U (1)) has a subgroup one-form symmetry H 2 (B, U (1)) generated by non-trivial surface operators, but nevertheless this one-form symmetry does not act on any line operators. 22

Action on non-local operators
Consider the codimension-one symmetry defect given by the "direct product" L × L of a symmetry line defect and a symmetry surface defect that are mutually local with each other (i.e. they have trivial mutual braiding). This is the codimension-one symmetry defect with the feature that when it wraps Σ 2 × S 1 , the symmetry line and symmetry surface operators L, L can wrap S 1 and Σ 2 . When an operator that is charged under the one-form or two-form symmetries generated by the symmetry defects L, L pierces the codimension-one symmetry defect, the intersection is not well-defined. Therefore the operator is modified after passing through the symmetry defect (with an exception to be discussed later).
For any theory with two-form symmetry B, we can use the duality (2.11) to construct the following codimension-one symmetry defects using the B gauge field. They fall into the following three categories. As we will show below, the defects of the first two categories permute the non-local operators, while those of the third category does not.
The first category uses the subgroup two-form symmetry Z n 1 × Z n 2 × Z n 3 ⊂ B gives the following codimension-one symmetry defect of order = gcd(n 1 , n 2 , n 3 ): where u i is the Z n i gauge field. The theory can couple to background gauge field X of Z 0-form symmetry using this symmetry defect: 14) The equation of motion for v i 2 constrains u i to be a Z n i cocycle, while the equation of motion for u i gives δv 1 2 + n 1 u 2 u 3 X = 0 mod n 1 , (2.15) and two similar equations given by the cyclic permutations of 1,2,3. Under a background transformation and similarly it changes v 2 2 , v 3 2 as above with cyclic permutations. The 0-form global symmetry transformation corresponds to constant λ ∈ Z . This means that the codimensionone symmetry defect (2.13) permutes the surface operators by multiplying with additional codimension-two symmetry defects W built from the two-form symmetry: 23 It is easy to verify that the permutation is indeed a symmetry of the correlation functions. More generally, using the duality (2.11) the permutation symmetry acts the same way for all surface operators with the same two-form charge as V 1 .
The second category uses the subgroup one-form symmetry Z n 1 × Z n 2 to construct the following codimension-one defect of order gcd(n 1 , n 2 ) By a similar computation as above, we find this defect permutes the types of both the line and surface operators: under a Z gcd(n 1 ,n 2 ) global symmetry with parameter λ, The third category uses the subgroup two-form symmetry Z n ⊂ B or Z n 1 × Z n 2 ⊂ B. They correspond to the elements in H 3 (B, U (1)) that are not completely antisymmetric (roughly speaking, a Chern-Simons-like cocycle). As we will show below, they give rise to symmetry defects that only modify the surface operators by a redundant symmetry defect. From the subgroup of two-form symmetry Z n 1 × Z n 2 ⊂ B one can construct the following codimension-one symmetry defect of order = gcd(n 1 , n 2 ) 24 : where u i are Z n i gauge fields, and δu 2 /n 2 mod n 1 = Bock(u 2 ) uses the Bockstein homomorphism of the short exact sequence 1 → Z n 1 → Z n 1 n 2 → Z n 2 → 1. By a similar computation as before one finds that the codimension-one symmetry defect U implements the following transformation with constant λ ∈ Z : Therefore the surface operator is modified by multiplication with a codimension-two symmetry defect that is not a non-trivial operator. Since these codimension-one symmetry defects do not implement non-trivial permutations on the non-local operators, they give rise to new mechanisms of coupling the theory to the background field of the 0-form symmetry. The For general B = i Z n i two-form symmetry, the defect (2.20) can be parametrized as with integers α i ∈ Z n i , α ij ∈ Z n ij . The 0-form symmetry defect acts on the surface operators as follows: (λ i , λ ij are numbers valued in Z n i and Z n ij ) We remark that in general not every dressing that is compatible with the fusion rules is a symmetry of the theory. For instance, in Z n × Z n gauge theory, the transformation that changes the surface operator v 1 2 → v 1 2 + Bock(u 2 ) but leaves invariant v 2 2 does not preserve the correlation function between v 2 2 and the three-junction of surfaces v 1 2 . On the other hand, in Z n gauge theory any dressing of surface operators by redundant symmetry defects that is compatible with the fusion rules of surface operators corresponds to a 0-form symmetry defect. So far we have described the 0-form symmetry defects constructed as "direct products" that act on non-local operators by permuting the types of non-local operators or dressing them with redundant symmetry defects. The exception occurs for the following special case of (2.22) given by the Z 2 0-form symmetry defects constructed from every subgroup Z n ⊂ B two-form symmetry for even n: Inserting such a defect by turning on background X for the Z 2 0-form symmetry changes the equation of motion of u into Thus one finds that such defect does not permute the types of non-local operators, and it also does not dress the surface operators with redundant symmetry defects. From the equation of motion (2.25), under X → X + 2Y for integer one-cochain Y , the surface operator v 2 transforms as In particular, changing the orientation X → −X inserts an additional symmetry line defect u at the intersection of the surface operator with the 0-form symmetry defect 25 . Another way to see the effect of the Z 2 0-form symmetry defect is by intersecting the surface operator v 2 with the three-junction of the 0-form symmetry defects, which creates an additional symmetry line operator emitted from the intersection (see figure 3) 26 .
To summarize, the defects in the first two categories belong to the defects constructed by permutation. On the other hand, the defects from the third category and the exceptions are new 0-form symmetry defects. They are classified by the elements in where B is the two-form symmetry, H 3 (B, U (1)) A is the subgroup generated by the antisymmetric elements in The new defects in (2.27) give rise to additional ways to couple the theory to the background of 0-form symmetry G, as classified by where σ is the action induced by the permutation of G on the symmetry line operators u.
We can give an intuitive picture for the modification of the operators passing through 25 The defect U that intersects with a surface operator Σ v 2 is no longer Z 2 valued: U n = × ′ ′ Figure 4: The red operator pierces the codimension-one symmetry defect L × L where L supports the symmetry defect not local with respect to the red operator. Then by shrinking the circumference of the cylinder we find the red operator leaves the codimensionone symmetry defect with (a power of) additional symmetry defect L attached to it.
the codimension-one symmetry defect (excluding the exception (2.24) where the operators are not modified). Since the operator coming toward the codimension-one symmetry defect cannot intersect the defect, it deforms the nearby region on the codimension-one defect into a long cigar that encompasses the incoming operator. Then as the operator passes through the codimension-one symmetry defect, the cigar becomes an infinitely-long thin cylinder enclosing the incoming operator. The circumference of the cylinder wraps the operator with the constituent (L or L ) of the defect that is not local with the incoming operator, while the longitudinal direction of the cylinder has the other constituent symmetry defect that is local with respect to the incoming operator (see figure 4). Then by shrinking the circumference of the cylinder to be zero we find the "outgoing operator" that leaves the codimension-one symmetry defect is given by the incoming operator attached with the constituent symmetry defect which is local with respect to the incoming operator. (More precisely, due to the braiding between the constituent defect on the circumference and the incoming operator, the shrinking produces a power of the longitudinal defect that depends on the braiding.) This reproduces the computation earlier.

Coupling by modifying the defect junctions
After the action of the 0-form symmetry G on the operators is fixed, and we choose a coupling in (2.28), there are additional ways to couple the theory to the background G gauge field given by modifying the 0-form symmetry defect junctions with different insertions of symmetry operators that generate higher-form symmetries 27 .
exp(πi uPD(Σ)). 26 When the surface operator generates a one-form symmetry, this describes a three-group symmetry. 27 Since the 0-form symmetry defects are topological and invertible, the insertions must also be operators that are topological and invertible i.e. higher-form symmetry defects.
Since the insertion of a symmetry operator is equivalent to turning on the background gauge field for the corresponding symmetry (given by the Poincaré dual of the cycle where the operator is inserted), modifying the junctions of 0-form symmetry defects by insertions of symmetry operators that generate higher-form symmetries is equivalent turning on different backgrounds of higher-form symmetries that are specified by the 0-form symmetry background. In this language, we can derive the consequences of such modifications from the properties of higher-form symmetries as discussed in [20].
In section 2.3.2 we will demonstrate explicitly how the different fixed backgrounds of higher-form symmetries are related to different modifications on the junctions of 0-form symmetry defects. The discussion is similar to the classification of symmetry fractionalizations in (2 + 1)d discussed in [17].

Coupling by fixed higher-form symmetry backgrounds
The 0-form symmetry, one-form symmetry and two-form symmetry in general form a threegroup symmetry. This means that there are constraints between their background gauge fields X, B 2 , B 3 in the form of modified cocycle conditions 28 . Since in the end we would like to couple the theory only to the 0-form symmetry background X, we will restrict to the subgroups of A, B such that we can turn off B 2 = 0, B 3 = 0 with non-trivial X in the constraints. In particular, the background for the one-form symmetry must be a twisted cocycle δ ρ B 2 = 0, where ρ denotes the action of 0-form symmetry by permutation.
The constraints between B 2 , B 3 , X depends on the choice of couplings classified by ) . This will be discussed in section.
Once the constraints are determined, the theory can couple to the background X of the 0-form symmetry G in different ways by turning on fixed backgrounds B 2 , B 3 for each coupling 29 is a twisted group two-cocycle, and ν 3 ∈ C 3 (BG, B) satisfies constraints induced from the constraints on the backgrounds B 2 , B 3 , X. The coupling parameter η 2 is defined in the group cohomology, since an exact cocycle corresponds to a 28 An example where the higher-form symmetries are Z n is The case of interest here is Θ 3 = 0, Θ 4 = 0, thus it is consistent with setting B 2 = 0, B 3 = 0 with non-trivial X. 29 The theory can couple to the backgrounds B 2 , B 3 for the higher-form symmetries (not specified by X) in the following way: we replace B 2 , B 3 by B 2 + X * η 2 and B 3 + X * ν 3 instead of by X * η 2 , X * ν 3 as in (2.30). See appendix C for an application of this method of coupling the theory to both the 0-form and higher-form symmetry backgrounds.
background one-form gauge transformation and thus decouples from the theory. Similarly, the background gauge transformations of X, B 2 , B 3 also induce gauge transformations on ν 3 , making it into a torsor. The constraints and the gauge transformations will be discussed in more details in section 2.4.
In addition to the gauge transformations, the couplings (η 2 , ν 3 ) are subject to the identification from the remaining intrinsic 0-form symmetry after turning on the background gauge field of symmetry G: where f : G → S specifies how G symmetry permutes the non-local operator as in (2.1), and N (f (G), S) is the normalizer of f (G) in S. Every element in (2.31) generates an action on the higher-form symmetry backgrounds (modulo G actions) by permuting their symmetry generators and thus identifies the couplings (η 2 , ν 3 ) in (2.30) related by the action. In particular, if f is surjective then there is no non-trivial identification from (2.31).
As an example, consider the special case where the 3-group symmetry is a trivial product of the 0-form symmetry, one-form and two-form symmetries. We allow the 0-form symmetry to act on the higher-form symmetry by permutations ρ, σ as before. Then the backgrounds of the higher-form symmetries satisfy the twisted cocycle conditions This implies that the parameters (η 2 , ν 3 ) takes value in up to the identification by the intrinsic permutation 0-form symmetry (2.31).
Let us explore the consequences of different coupling parameters (η 2 , ν 3 ) in (2.30) using the properties of higher-form global symmetry.
In the presence of the backgrounds As an example, consider the 0-form symmetry G = Z 2 × Z 2 that does not act on the higher-form symmetries, and thus B 2 obeys the standard cocycle condition. For simplicity take the one-form symmetry to be Z 2 . Denote the backgrounds for the 0-form symmetry by the Z 2 gauge fields X, X . Then the fixed background B 2 = XX implies the line operators charged under the one-form symmetry have an anomaly for the Z 2 ×Z 2 0-form symmetry on the worldline, described by the SPT phase π XX . In other words, the particles on such line operators transform as the projective representation of the 0-form symmetry where the two Z 2 s do not commute on the Hilbert space for the (0 + 1)d quantum mechanics.
Another consequence for different coupling parameters (η 2 , ν 3 ) is that they give rise to different selection rules on amplitudes. Consider the path integral on a compact spacetime with a non-local operator charged under the higher-form symmetry and wrapping a nontrivial cycle. In the absence of backgrounds B 2 , B 3 , the path integral must vanish due to the higher-form global symmetry [20]. If we turn on backgrounds B 2 , B 3 , and if there is a non-trivial mixed anomaly between the one-form and two-form symmetries, then the higherform symmetry backgrounds modify the selection rules by inserting extra symmetry defects that themselves carry higher-form symmetry charges. Thus different couplings (η 2 , ν 3 ) that produce different backgrounds B 2 , B 3 as in (2.30) lead to different selection rules on the amplitude. We will give an explicit example using Z n gauge theory in section 3.4.

Modification on the defect junctions
Three G defects meet at a codimension-two junction (see figure 5) specified by g 1 , g 2 ∈ G.
A line x encircling the three-junction produces the phase η x (g 1 , g 2 ): where dashed lines denote the codimension-one 0-form symmetry G defects (see figure 5). The three 0-form symmetry defects meet at a codimension-two junction denoted by the red point (this is the red line in figure 5), which braids with the line operator.
The subgroup of the 0-form symmetry that does not permute the line operator x (namely, the stabilizer subgroup G x ⊂ G) is a 0-form symmetry in the (0 + 1)d wordline of x. The phase η x in (2.34) implies the Hilbert space on the worldline is in a projective representation of the global symmetry G x , and thus the phase η x describes the anomaly of the global symmetry G x on the (0 + 1)d worldline of x [30].
A consistency condition for the phase η is as follows. Consider the four-junction of 0-form symmetry defects in figure 6, and sliding a loop x from the bottom to the top Figure 5: A junction (in red) where three codimension-one 0-form symmetry defects of type g 1 , g 2 , g 1 g 2 ∈ G meet in codimension two, with one additional dimension suppressed in the figure. The junction can be modified by inserting codimension-two symmetry defects of one-form symmetry η(g 1 , g 2 ) ∈ A.
of the junction. Since the intersection of the four-junction has codimension-three, it has trivial braiding with the loop and thus the phases produced from the bottom and top three-junctions must agree: (2.35) In particular, for 0-form symmetry defects in the stabilizer subgroup G x , this is consistent with η x being the anomaly on the (0 + 1)d worldvolume of the line x, which takes values in H 2 (BG x , U (1)), and (2.35) coincides with the cocycle condition.
The three-junction can be modified by inserting a codimension-two symmetry defect of the one-form symmetry 30 η(g 1 , g 2 ) ∈ A, see figure 5. Since line operators braid with the defects of the one-form symmetry (the braiding gives the one-form charges of the line operators), the modification of the junction changes the phase η x as where M x,η(g 1 ,g 2 ) denotes the eigenvalue of x under the one-form symmetry element η(g 1 , g 2 ) by braiding. To satisfy the constraint (2.35), η has to be a group cocycle twisted by the action ρ (note M σg(x), ρg(y) = M x, y ). This makes η x ∈ H 2 (BG, U (1)) into a H 2 ρ (BG, A) torsor. Thus different couplings η x are classified by η ∈ H 2 ρ (BG, A). The modification of the junction is equivalent to changing the background of the one-form symmetry (2.30). The modification of the phase η x in (2.36) implies that the worldline of x has an anomaly of the global symmetry G x that depends on η. This is consistent with (2.30), since changing Figure 6: A junction where four codimension-one 0-form symmetry defects of type g 1 , g 2 , g 3 , g 1 g 2 g 3 ∈ G meet in codimension three, with one additional dimension suppressed in the figure. The junctions of three codimension-one defects are in red, and their intersection is the blue point. The codimension-three intersection can be modified by inserting codimensionthree symmetry defects of two-form symmetry ν(g 1 , g 2 , g 3 ) ∈ B. Note the four-junction considered here does not have additional defects emanating from the codimension-three intersection, in contrast to the four-junction that described two-group symmetry discussed in [30]. In particular, a line operator encircling the upper-half of the junction produces the same phase as the line encircling the lower-half, since a line has trivial braiding with the codimension-three intersection.
the background B 2 for the one-form symmetry attaches the line operator to additional surface ∆B 2 = X * η that describes the (1 + 1)d SPT phase for the global symmetry on its boundary worldline.
Similarly, consider the four-junction of G defects meeting at a codimension-three line (see figure 6), specified by g 1 , g 2 , g 3 ∈ G. A surface operator y encircling the four-junction produces the phase ν y (g 1 , g 2 , g 3 ): where dashed lines denote the codimension-one 0-form symmetry G defects (see figure 6).
The subgroup of the 0-form symmetry that does not permute the surface operator y (namely, the stablizer subgroup G y ⊂ G) is a 0-form symmetry in the (1 + 1)d wordvolume of y. Consider sliding a surface operator y from the bottom to the top of the four-junction (2.37). The phase in (2.37) implies that the F -move of 0-form symmetry defect on the worldvolume produces a phase ν y : (Surface worldvolume) : where the solid line denotes the G y symmetry defects. Thus the phase ν y describes the anomaly of the global symmetry G y on the (1 + 1)d worldvolume of y [30].
When there 0-form and higher-form symmetries do not mix into a three-group, one can derive an identity similar to (2.35) to show the phase ν is a cocycle.
The four-junction can be modified by inserting a codimension-three symmetry defect of the two-form symmetry ν(g 1 , g 2 , g 3 ) ∈ B, see figure 6. Since surface operators braid with the symmetry defects of the two-form symmetry (the braiding gives the two-form charge of the surface operators), the modification changes the phase ν y as (2.39) where M ν(g 1 ,g 2 ,g 3 ),y is the eigenvalue of y under the two-form symmetry element ν(g 1 , g 2 , g 3 ) by braiding. When the symmetries do not form a three-group, the constraint on ν implies ν ∈ H 3 σ (BG, B), and thus ν y ∈ H 3 (BG, U (1)) is a H 3 σ (BG, B) torsor. The modification of the phase ν y in (2.39) implies the worldvolume of y has an anomaly of the global symmetry G y that depends on ν. This is consistent with changing the background B 3 by X * ν in (2.30).

Constraint and equivalence relation
Consider the theory coupled to the backgrounds B 2 , B 3 , X with the constraint (2.40) We want to study how the cocycle Ξ depends on the coupling ξ ∈ H 1 σ (BG, H 3 (B, U (1)) ) in (2.28), which corresponds to codimension-one symmetry defects constructed from the two-form symmetry that have trivial permutation action.
First, we need to identify the one-form symmetry that can be described by the B gauge theory in the duality (2.11). The full one-form symmetry A is the group extension of an Abelian group A by H 2 (B, U (1)), where the subgroup H 2 (B, U (1)) is generated by the symmetry surface operators of the type uu in the B gauge theory as discussed in section 2.2. Let r A : (1)) be the quotient map. The background B 2 of the one-form symmetry A can be expressed in terms of the two-form background r A (B 2 ) valued in A and the background r A (B 2 ) 31 for the subgroup one-form symmetry H 2 (B, U (1)) with the constraint δr A (B 2 ) = Bock(r A (B 2 )), where Bock is the Bockstein homomorphism for the short exact sequence 1 → H 2 (B, U (1)) → A → A → 1.
The B gauge theory also has one-form symmetry generated by the symmetry surfaces v 2 . However, due to the two-form gauge symmetry in the duality (2.11), every surface v 2 must pair with another surface operator which may not be a symmetry surface, thus the surface operators v 2 do not correspond to a subgroup of the one-form symmetry.
Denote by A B the subgroup of the one-form symmetry that consists of symmetry surface operators that are not charged under the two-form symmetry. Namely, they are the symmetry surface operators that have trivial braiding with all symmetry line operators. Then denote the quotient map We will also need the property that the one-form symmetry and two-form symmetry have a bilinear function ·, · : A × B → U (1) given by the braiding between the symmetry surface operators and symmetry line operators. From the bilinear function one can define a linear map In the following, we will use the same symbol π for M AB • π as a short hand notation. For simplicity, we will take a basis in Using the duality (2.11), the theory can couple to the backgrounds B 2 , B 3 , X using the B gauge theory with (3.18) In particular, the theory depends on B 3 , r A (B 2 ) and ξ only by the coupling (2.44), while the B gauge theory couples to r A (B 2 ) only through the projection π(r A (B 2 )) = π(B 2 ). Thus without loss of generality, we can replace B 2 in (2.40) by r A (B 2 ), and in the following we will discuss the consequence of turning on the couplings in (2.44) with non-trivial ξ and r A (B 2 ).
The original three-group symmetry (2.40) and (3.19) together imply the following bulk dependence on the B gauge field u i in the presence of non-trivial ξ and r A (B 2 ): where we used the isomorphism Hom(B, U (1)) = B ∼ = B on Ξ(r A (B 2 ), X) ∈ B. Therefore, to cancel the bulk dependence of u i , the two-form symmetry background B 3 satisfies the 32 If A = H 2 (B, U (1)) × A , then δC ij 2 = Bock(r A (B 2 )) = 0 and the B gauge field has a bulk dependence that depends on r A (B 2 ) (see (3.19)), which must cancel the bulk dependence from the other sector in the theory B description in (2.11) for the coupling to the background r A (B 2 ) to be consistent.
following constraint: For a fixed G symmetry action, if the three-group symmetry constraint between B 2 , B 3 , X for some coupling ξ is known, then this gives Ξ and thus the constraint for general couplings ξ is given by (2.46).
In particular, in the absence of the background B 2 of one-form symmetry, the one-form global symmetry transformation parametrized by cocycles λ 1 = ρ 1 with δ ρ ρ 1 = 0 transforms the background B 3 as Ξ is a twisted cocycle whose structure can be classified in principle, but we will not do it here. The different structures in Ξ can be detected by correlation functions. As an example, if A = B = Z 2 , then the structure Ξ(r A (B 2 ), X) = r A (B 2 )X * ζ 2 with ζ ∈ H 2 (BG, Z 2 ) describes a junction where three codimension-one 0-form symmetry defects meet at a codimension-two surface and the surface intersects the symmetry surface defect for A at a point, which emits a symmetry line defect 34 . The symmetry line defect can then be detected by correlation functions. 33 r A (λ 1 ) is defined similarly to r A (B 2 ). 34 This uses the fact that the Poincaré dual of δB 3 describes the boundary of the Poincaré dual of B 3 .
The different couplings to the background X of 0-form symmetry G are then specified by ξ, and the couplings (η 2 , ν 3 ) ∈ H 2 ρ (BG, A) × C 3 (BG, B) by the fixed higher-form symmetry backgrounds with (η 2 , ν 3 ) satisfy additional constraints depending on ξ as induced by (2.46) . The couplings (η 2 , ν 3 ) have equivalence relations that depend on ξ, given by the background gauge transformations (2.47) with λ 1 = X * s 1 , λ 2 = X * s 2 for s 1 ∈ C 1 (BG, A) and If at some coupling ξ = 0 the constraint on δ σ B 3 is known, then Ξ (and thus Ξ G ) can be determined and the couplings to background of 0-form symmetry G are classified by subject to the constraint (2.50) and the identification from the corresponding gauge transformation.
We will give examples with trivial and non-trivial Ξ. An example of trivial Ξ is the Abelian gauge theory with zero Dijkgraaf-Witten action [41] to be discussed in section 3. An example of non-trivial Ξ is the O(2) gauge theory to be discussed in section 6.1.3.
When the 0-form symmetry G does not permute the non-local operators or act on local operators, Ξ(B 2 , X) = Ξ(B 2 ) only depends on the background for the one-form symmetry 35 . Then (2.40) becomes where q is a bilinear function on A × A that takes values in B. This constraint describes the following junction: two symmetry surface defects meet at a point that emits a symmetry line defect. The symmetry line defect can then be detected by correlation functions. The constraint (2.53) implies that it is inconsistent to gauge only the one-form symmetry but not the two-form symmetry. This is analogous to the H 3 obstruction discussed in [15,17].

Anomalies for different couplings
First we need to understand how the 't Hooft anomaly for B 2 , B 3 , X depends on B 3 . If we gauge the two-form symmetry with dynamical gauge field, and then gauge the dual 0-form symmetry with B gauge field u i , then the background B 3 only couples through u i . This is just a restatement of the duality (2.11). Thus the 't Hooft anomaly involving B 3 only comes from the modification on δu i , which equals π(B 2 ) i .
On the other hand, after gauging the two-form symmetry with dynamical field there can be an 't Hooft anomaly that depends on r A (B 2 ) and X, which we will denote by S 0 (r A (B 2 ), X). Together with the 't Hooft anomaly (3.20) in the B gauge theory, we find the anomaly is given by where the part that depends on ξ shows that the coupling ξ produces an additional 't Hooft anomaly.
The 't Hooft anomaly for different couplings from modification of the 0-form symmetry defect junction is given by substituting the fixed backgrounds of the higher-form symmetries (2.30) into the 't Hooft anomaly of the higher-form and 0-form symmetries [30]. The 't Hooft anomaly of 0-form symmetry G for different (η 2 , ν 3 ) depends on the coupling

SPT phases trivialized by coupling to the dynamics
A general symmetry-enriched phase consists of a coupling to the background gauge field and a decoupled SPT phase of the 0-form symmetry. Different SPT phases correspond to different local counterterms of the 0-form symmetry background gauge field.
As we will discuss, some of the SPT phases become equivalent when there is a non-trivial coupling between the G gauge field and the dynamics. Thus the set of distinct SPT phases depends on the coupling to the dynamics.
These trivialized SPT phases are equivalent to depositing SPT phases on the worldvolume where some non-local operators are supported. To preserve the correlation functions, this means that the worldvolume SPT phases correspond to a global symmetry that transform the non-local operators. Thus the SPT phases that can be absorbed in this way are related to higher-form global symmetries in the theory.
To produce an SPT phase from the higher-form symmetry, there must be insertion of non-local operators that are charged under the higher-form symmetry with locus specified by the background of the 0-form symmetry. When the operators are invertible, they are symmetry defects, and the insertion corresponds to activating the backgrounds for higherform symmetries as in (2.30). Since the operator inserted is charged under the higher-form symmetry, this means that there is an 't Hooft anomaly for the higher-form symmetry. Thus the 't Hooft anomaly of the higher-form symmetry can absorb some of the SPT phases into lower-dimensional SPT phases on the worldvolumes as the phase induced by a higher-form symmetry transformation.
In a theory that is trivially gapped i.e. gapped and has a unique vacuum, every SPT phase must be distinct. The trivialization of SPT phases relies on the dynamics. If there exists a single SPT phase that is non-trivial on its own, but can be absorbed by the dynamics as above, then the theory cannot be trivially gapped. If there exists such an SPT phase in the UV, then it must persist in the IR, since otherwise the same UV theory with or without such SPT phase would flow to distinct symmetry-enriched phases in the IR and thus it leads to a contradiction. This is consistent with the fact that an 't Hooft anomaly for the higher-form symmetry implies that the theory is not trivially gapped.
We remark that an analogous, but distinct phenomenon that occurs in the 4d SU (N ) Yang-Mills theory coupled to the background gauge field for the Z N one-form symmetry. The theory has a continuous θ parameter, and by changing θ in a multiple of 2π some of the SPT phases of the Z N one-form symmetry can be cancelled [11] 36 . This implies that at some value of θ the system cannot be trivially gapped [11]. This is different from the previous discussion, where there are no continuous parameters for tuning.
Although we focus on (3+1)d, the same discussion can be generalized to other spacetime dimensions. In the following we will discuss some concrete examples.

Examples
The (2 + 1)d Chern-Simons theory U (1) 4 is a non-trivial TQFT. It has Z 4 one-form symmetry, and it can couple to the background gauge field of Z 2 ordinary global symmetry that does not permute the anyons as follows where a is the dynamical U (1) gauge field, X is the Z 2 gauge field expressed as a classical U (1) gauge field with holonomy X ∈ πZ. The coupling to X uses the Z 4 one-form symmetry background B 2 = 1 4 dX . Now, the field redefinition a → a + X for the dynamical field a gives where the last term on the left hand side is trivial due to the holonomy of the background X only lives in πZ. Thus the field redefinition produces the SPT 1 2π XdX, which is the non-trivial Dijkgraaf-Witten theory in (2 + 1)d for Z 2 gauge field [41]. This SPT phase is non-trivial on its own, but when the background gauge field couples to U (1) 4 as above it can be removed by the field redefinition as above, which introduces a worldline SPT phase: for Wilson line of charge Q, the (0 + 1)d SPT phase can be obtained from a → a + X as exp iQ a → exp iQ a (−1) Q X/π . (2.58) Since X is a Z 2 gauge field, the redefinition of a is equivalent to a Z 2 one-form global symmetry. The one-form symmetry deposits the worldline SPT phase Q X for to the Wilson line of U (1) charge Q. This Z 2 subgroup one-form symmetry has a mixed anomaly with the full Z 4 one-form symmetry, as their generating line operators have non-trivial mutual braiding [14]. The anomaly is Z 2 valued, and it can absorb the Z 2 valued Dijkgraaf-Witten SPT.
Another example is QED 3 with one Dirac fermion of charge four 37 coupled to the background gauge field X of Z 4 0-form symmetry. The theory has Z 4 one-form symmetry, which has an anomaly given by the SPT phase 8 4π 4d B 2 B 2 with background two-form Z 4 gauge field B 2 . The anomaly implies that under a background one-form gauge transformation B 2 → B 2 + dλ, the theory changes by 8 4π λdλ + 8 2π B 2 λ. The theory can couple to Z 4 gauge field X by B 2 = 1 4 dX. Then the global one-form symmetry transformation λ = X produces 2 2π XdX (X is a Z 4 gauge field, so this is not a one-form gauge transformation). This means that adding this counterterm of X does not change the theory.
An example with continuous 0-form symmetry is Z n gauge theory in (3 + 1)d coupled to a background U (1) gauge field A by activating the Z n one-form symmetry background gauge field B 2 = 1 n dA. The theory also has Z n two-form symmetry, which has a mixed anomaly with the one-form symmetry. Due to the mixed anomaly, performing a Z n twoform global symmetry transformation with parameter Z n two-cocycle λ 2 = q dA 2π mod n for some integer q shifts the theory by the action n 2π B 2 q n dA = q/n 2π dAdA . (2.59) Thus the counterterm of the U (1) background gauge field A with θ = 4πq/n can be absorbed by the worldvolume SPT phase q m (q/n)dA on the surface operator of charge q m under the two-form symmetry.
In the absence of time-reversal symmetry, the SPT phase (2.59) can be continuously tuned to zero since the theta parameter can be any real number. On the other hand, if the 0-form symmetry is U (1) × Z T 2 then θ = π is a non-trivial SPT phase on its own. For n = 4m a multiple of 4, taking q = n/4 we conclude the θ = π SPT phase for the U (1) × Z T 2 symmetry becomes trivial due to the dynamics of the system.
The above examples have SPT phases living on the lines or surface operators. An example with SPT living on the domain wall is the TQFT where φ ∼ φ + 2π is a periodic scalar field, b d−1 is a (d − 1)-form U (1) gauge field. The theory has 0-form Z 2 symmetry generated by the operator exp(i b d−1 ), and (d−1)-form Z 2 symmetry generated by the point operator exp(iφ). Denote their backgrounds by B 1 , B d . The two symmetries have the mixed 't Hooft anomaly described by 2 2π B 1 B d . The theory can couple to the background gauge field X for a 0-form Z 2 symmetry by B 1 = X i.e. insert the symmetry generator, a domain wall, at the Poincare dual of X. Then the (d − 1)form global symmetry transformation by the parameter λ d−1 = π(X/π) d−1 deposits on the domain wall the SPT phase λ d−1 = π (X/π) d−1 and produces the SPT phase π(X/π) d . Thus this SPT phase in d-dimensional spacetime is equivalent to an SPT phase on the (d − 1)-dimensional domain wall.

Comparison with gauging SPT phases
We would like to make some comparisons with the method of obtaining symmetry-enriched topological phases by gauging a subgroup symmetry in an SPT phase. We will focus on finite group H gauge theory with unitary finite group 0-form symmetry G.

Finite group H gauge theory
We begin by reviewing some properties of the H gauge theory. The theory has another class of surface operators, labelled by H 2 (H, U (1)). They can be obtained by starting with (1+1)d SPT phases with H symmetry and gauging the symmetry with a dynamical gauge field. They also corresponds to the projective representations of H. Such surface operators are topological and invertible, and thus they generate a one-form symmetry. They are mutually local with the Wilson lines of H (the H bundle is well-defined inside and outside such surface operators), unlike the surfaces that generate the one-form symmetry Z(H). Thus for trivial Dijkgraaf-Witten action of the H gauge group the theory has one-form symmetry 39 A The presence of a Dijkgraaf-Witten action breaks the one-form symmetry Z(H) to a subgroup but does not affect the one-form symmetry H 2 (H, U (1)).
Since the symmetry surface defects in H 2 (H, U (1)) have trivial braiding with the Wilson lines of one-dimensional representations that generate the two-form symmetry, there is no mixed anomaly between the two-form symmetry and the one-form symmetry H 2 (H, U (1)).
Gauging the one-form symmetry H 2 (H, U (1)) restricts the set of H bundles that is summed over in the path integral. This leads to an extension of the gauge group. To see this, denote the group cocycle by ω 2 ∈ H 2 (H, U (1)) = i Z m i , and the H gauge field by u. The two-form gauge field for the one-form symmetry H 2 (H, U (1)) can be described by the pairs of Z m i two-cochain b i 2 and one-cochain a i that couple to the theory as The equation of motion for b i 2 then implies Namely, the path integral only includes the H gauge field u such that the cohomology class of u * ω 2 is trivial. The gauge fields (a i , u) in (2.64) describe the gauge field of a new gauge group, given by the group extension of H by H 2 (H, U (1)) specified by ω 2 . 40 For more 38 An example is Z 4 2 gauge theory with dynamical Z 2 gauge fields a i . Without a Dijkgraaf-Witten action there is Z(Z 4 2 ) = Z 4 2 one-form symmetry that transforms the line operators by a i → a i + x i with classical Z 2 cocycles x i as exp(πi a i ) → exp(πi a i )(−1) x i . If there is Dijkgraaf-Witten action π a 1 a 2 a 3 a 4 , the theory is not invariant under the one-form symmetry a i → a i + x i , as the change cannot be absorbed by a non-trivial background field. 39 Since the one-form symmetry must be Abelian [20], the elements in Z(H), H 2 (H, U (1)) ⊂ A commute with one another. Furthermore, the non-trivial elements in the subgroups Z(H), H 2 (H, U (1)) are distinct, and thus the one-form symmetry factorizes. 40 An example is H = Z 2 × Z 2 , which has the one-form symmetry H 2 (H, U (1)) = Z 2 . Then gauging this one-form symmetry extends the gauge group to be the Dihedral group of order 8. general continuous gauge group, the corresponding one-form symmetry is H 2 (BH, U (1)), and it is the magnetic one-form symmetry 41 .
We remark that since the one-form symmetry H 2 (H, U (1)) can be gauged as above without activating a background for the two-form symmetry, the two symmetries do not combine into a three-group symmetry i.e. the cocycle Ξ vanishes in (2.53), and the background B 3 for the two-form symmetry obeys the usual cocycle condition. Moreover, since this one-form symmetry can be gauged, it does not have an anomaly on its own.
The theory has intrinsic 0-form symmetry Out(H) that permutes the non-local operators. We will focus on the case that the 0-form symmetry has trivial permutation action.

Comparison with gauging SPT phase
Consider finite groups G, H, the bosonic SPT phases for G × H are classified by H 4 (G × H, U (1)), which can be decomposed using the Künneth formula 42 into the product Gauging the symmetry H with dynamical gauge field in such an SPT yields an SET, a G-enriched H gauge theory. We would like to compare (2.65) to our classification data In the comparison with (2.65) we will take G to have trivial actions ρ, σ on the one-form and two-form symmetries.
When we gauge the SPT phases with G × H symmetry, the theory has the standard G × H gauge fields. This means that there is no background for the one-form symmetry Z(H) (or a subgroup of it). This means we will only obtain couplings for which η 2 receives contributions from the one-form symmetry H 2 (H, U (1)) ⊂ A: η 2 ∈ H 2 (G, H 2 (H, U (1)). 43 This matches the H 2 term in the SPT gauging classification scheme (2.65). Such special couplings have δη 3 = 0, i.e. modulo the appropriate equivalence, η 3 ∈ H 3 (BG, B). In an H gauge theory, the two-form symmetry group is B = H 1 (H, U (1)). Therefore, the H 3 terms in the two classification schemes also match.
The remaining terms in the classification are not quite the same, and there are several sources to the disagreement. Gauging an SPT phase can give an SET where the G symmetry 41 An example is SO(3) gauge theory, where gauging the Z 2 magnetic one-form symmetry generated by the surface operator w 2 (SO(3)) (the second Stiefel-Whitney class of the SO(3) bundle) extends the gauge group to be its double covering SU (2). 42 See [33] for a discussion of this form of the Künneth formula. 43 A non-trivial η 2 ∈ H 2 (G, Z(H)) corresponds to a non-trivial group extension of G by H.
permutes the non-local operators of the H gauge theory. This comes from the last term in (2.65), where H 3 (H, U (1)) represents the 0-form symmetry domain wall defects that support H gauge theories in (2 + 1)d [41]. Some of these 0-form symmetry defects permute the types of the surface operators that correspond to non-trivial conjugacy classes of H 44 . Consider such a surface operator piercing the wall at a line intersection. There is a nontrivial holonomy of the H connection around the line intersection on the wall that equals the holonomy around the surface operator, and thus the intersection represents a magnetic line in the H gauge theory on the wall. If it is a genuine line operator 45 , the type of the surface operator that passes through the wall is not changed. On the other hand, if it is not a genuine line operator on the wall, then the wall changes the type of the surface operator. This can be shown explicitly for Abelian H. As an example, consider H = Z 3 2 gauge theory as discussed in section 2.2.4. The wall corresponding to the non-trivial element in H 3 (H, U (1)) A = Z 2 ⊂ H 3 (H, U (1)) permutes the surface operators that have non-trivial conjugacy classes of H. The corresponding H gauge theory on the wall is with Z 2 one-cochains u i , v i . The equation of motion for u 1 gives δv 1 = u 2 u 3 , which implies that the pure magnetic line v 1 is not a genuine line operator as it depends on the surface that bounds the line as δv 1 = u 2 u 3 (the line can be made gauge invariant by dressing with a projective representation of H instead of a linear representation, see also footnote 45). Indeed, as shown in section 2.2.4, such domain wall permutes the set of surface operators as v 1 2 → (v 1 2 + u 2 u 3 ) (see (2.16)). This is one origin of the overcounting in (2.65) versus (2.66) 46 , where our classification (2.66) is for a fixed permutation action 47 . It 44 In general, the symmetry G can permute non-local operators even when the symmetry group is a product G global × H gauge 45 The set of line operators in finite group H gauge theory in (2 + 1)d depends on the topological action classified by H 3 (H, U (1)) [41] (see e.g. [54][55][56]). For ω ∈ H 3 (H, U (1)), define (where we use the addition notation for U (1)) [54][55][56] 1)) . 47 As another example of this type of overcounting, consider the continuous gauge group H = U (1).
will be interesting to investigate the walls in H 3 (H, U (1)) that do not permute the types of the non-local operators and do not correspond to the walls in H 3 (B, U (1)) (see footnote 45), which requires non-Abelian H. We will leave it to the future work.
Another way in which gauging SPT phases gives a redundant counting is that distinct classical actions can become equivalent under a field redefinition of the dynamical gauge field. For example, the SPT phase with Z 2 × Z 2 symmetry described by the Z 2 × Z 2 gauge fields X, Y as π (X 3 Y + XY 3 ), becomes equivalent to π X 3 Y when X is promoted to be a dynamical gauge field, by the field redefinition X → X + Y . In our approach there is no such redundancy by the equivalence relation on the coupling ν 3 in (2.51) (see section 3.1.1 for a discussion on this case).
Finally, as demonstrated in section 2.6, it is also possible that some SPT phases with G symmetry classified by H 4 (G, U (1)) in the expansion (2.65) become trivial in the presence of the SET phase. The classification (2.66) does not include the SPT phases for G symmetry.
As a remark, we can also compare the 't Hooft anomaly obtained from the two approaches. The symmetry-enriched phases obtained from gauging a subgroup symmetry in the SPT phases are non-anomalous. In our method, the 't Hooft anomaly is given by (2.55), which indeed vanishes for trivial permutation and η 2 that receives contribution from the one-form symmetry H 2 (H, U (1)) (using the fact that the one-form symmetry H 2 (H, U (1)) is non-anomalous as shown in section 2.7.1).

Abelian finite group gauge theory with unitary symmetry
In this section we will discuss the bosonic gauge theory in (3 + 1)d for Abelian gauge group B = i Z n i , with the trivial Dijkgraaf-Witten action [41]. We will first consider the example B = Z n , and later discuss the general case.

Z n gauge theory
As discussed earlier, the Z n gauge theory (2.3) has Z n one-form and two-form symmetries. Denote their backgrounds by B 2 , B 3 . The Z n gauge theory has 0-form symmetry that Then H 3 (H, U (1)) = Z, which represents domain walls with bosonic Chern-Simons actions of the U (1) gauge field (see e.g. [57]) i.e. the walls across which the θ angle of the U (1) gauge theory changes by multiples of 4π. The Witten effect [58] implies that these domain walls permute the set of line operators: magnetic 't Hooft lines that pass through the walls become dyonic lines. Thus they belong to the 0-form symmetry defects constructed by the first mechanism. In this case the two-form symmetry B is trivial (the U (1) gauge field is not flat and thus the lines are invertible but not topological) and thus H 3 (B, U (1)) is trivial.
permutes the operators given by the automorphism group of Z n .
We will couple the theory to background X of a unitary 0-form symmetry G. If the 0-form symmetry acts on the higher-form symmetry, we replace the ordinary coboundary operation δ with the twisted coboundary operation δ X . In the following we will focus on the case that the 0-form symmetry does not act on the higher-form symmetry, while the same discussion also applies with the above replacement when the 0-form symmetry acts by an automorphism of Z n .
We will first investigate the constraints on the backgrounds B 2 , B 3 , X for different couplings ξ ∈ H 1 (BG, H 3 (Z n , U (1))) = H 1 (BG, Z n ). The non-trivial codimension-one symmetry defect from the two-form symmetry is exp 2πi n uBock(u) for Z n gauge field u. The background B 2 modifies the Z n gauge field u to be the cochain δu = B 2 mod n . (3.1) The backgrounds X, B 3 couples as where tilde denotes a lift of u to a Z n 2 one-cochain, and the remaining terms I are to be determined such that the couplings are well-defined in the presence of backgrounds B 2 , B 3 . In particular, the theory must not depend on the lift of u. Changing the lift u → u + nc with Z n 2 one-cochain c changes the first two terms by where we used (A.4) and δu = B 2 mod n. To cancel the change, we can take I = 2π n 2 (−2 uB 2 + B 2 ∪ 1 δ u) X * ξ, and the theory is Since the theory does not depend on the lift of u, we will drop the tilde notation.
In addition to changing the lift, we need to impose Z n gauge symmetry of the dynamical field u. One way to study the gauge invariance is to look for the bulk dependence. The theory depends on the (4 + 1)d bulk by where that last equality used δu = B (n) 2 mod n, (A.4), and completing the square with (δu − B 2 ) 2 = 0 mod n 2 . The last term S anom depends only on the background fields, which equals the Pontryagin square (see e.g. [59]) of B 2 when n is even. Thus in order for the dynamical field u to live in 4d, the backgrounds must satisfy the relation The background fields satisfy (3.7) describe a three-group symmetry that combines the G 0-form, Z n one-form and Z n two-form symmetries. Under a background one-form gauge transformation B 2 → B 2 + δλ 1 , the background B 3 transforms as From the constraint (3.7) we obtain the coupling parameters (η 2 , ν 3 ) ∈ H 2 (BG, Z 2 ) × C 3 (BG, Z n ) by B 2 = X * η 2 , B 3 = X * ν 3 with the constraint δν 3 = 2Bock(η 2 )ξ + η 2 Bock(ξ) mod n (3.9) subject to the background gauge transformation of three-group symmetry where we use the transformation λ 1 = X * s 1 , λ 2 = X * s 2 with s 1 ∈ C 1 (BG, Z n ) and s 2 ∈ C 2 (BG, Z n ).
The 't Hooft anomaly of the couplings (η 2 , ν 3 , ξ) is given by the 't Hooft anomaly of the three-group symmetry, which is described by the bulk 5d SPT phase (3.6).
Thus we find four non-anomalous symmetry-enriched phases and one anomalous symmetryenriched phase. This agrees with [42].
Another example is the 0-form symmetry G = Z 4 . The coupling ξ is classified by H 1 (Z 4 , Z 2 ) = Z 2 . In particular, Bock(ξ) is trivial. Thus the three-group symmetry (3.7) reduces to the trivial product of 0-form, one-form and two-form symmetries, with the 't Hooft anomaly (3.6): where the backgrounds are ordinary cocycles. In section 4 when we discuss the example G = Z 8 , we use the above result with X being a special Z 4 gauge field that can be lifted to a Z 8 gauge field.

General case
Denote the Z n i dynamical gauge field by u i , and n ij ≡ gcd(n i , n j ), n ijk ≡ gcd(n i , n j , n k ). The 0-form symmetry defects are classified by H 3 (B, U (1)) = i≥j Z n ij × i>j>k Z n ijk . We will couple the theory to ordinary Z n ij background gauge fields X ij and ordinary Z n ijk background gauge fields X ijk as follows We will denote X ii = X i . Then the theory can couple to the background X of 0-form symmetry G by (X ij , X ijk ) = X * ξ with ξ ∈ H 1 (BG, H 3 (B, U (1))).
We will also turn on the backgrounds for the one-form and two-form symmetries and study the constraints between the backgrounds of different higher-form symmetries. From the constraint one can then derive the set of couplings (2.30).
The theory has two-form symmetry B = Z n i generated by the Wilson lines u i , with backgrounds B i 3 . The theory has one-form symmetry A = Z n i that acts on the line operators, with backgrounds B i 2 that modify the cocycle conditions for u i into δu i = B i 2 mod n i . The theory also has codimension-two symmetry defects, labelled by H 2 (B, U (1)) = i>j Z n ij , and we couple them to the backgrounds C ij 2 . The second coupling in (3.16) permutes the types of surface operators as discussed in section 2.2.4, while the first coupling does not. In the following we will focus on the first coupling in (3.16).
The theory couples to the backgrounds as: (terms with two is and js are summed over i ≥ j, while terms with two is are summed over i) where u i is a lift of u i to an integral one-cochain, and we first set B i 2 = 0. In the absence of backgrounds B i 2 the theory is well-defined, with the backgrounds obeying the standard cocycle conditions. It is easy to check the dynamical fields are independent of the lift, so we can omit the tilde notation.
If we turn on non-trivial B i 2 , we need to couple B i 2 to additional terms to make the dynamical fields u i independent of the lifts. Changing the lift u i → u i + n i c i with integral one-cochain c i shifts the action by where we used δu i = B i 2 mod n i , δX ij = 0 mod n ij and (A.4). To cancel the dependence on the lift, we add additional couplings to B i 2 , Since the theory (3.18) does not depend on the lift of u i , we will drop the tilde notation from now on. We still need to make sure the theory is invariant under the Z n i gauge symmetry of u i , which requires the dynamical fields to be independent of the bulk. The theory (3.18) depends on the bulk by which can be simplified using (A.4), δu i = B i 2 mod n i , δX ij = 0 mod n ij , and completing the square with ( where S anom only depends on the background fields Thus for the dynamical fields u i to live only in (3 + 1)d, the background fields must satisfy the following constraints: Such backgrounds describe a three-group symmetry. Consider the background gauge transformation The backgrounds B i 3 transform as The 't Hooft anomaly of the three-group symmetry is given by S anom in (3.20).

Correlation functions
In this section we will compute the correlation functions in B = i Z n i gauge theory with trivial Dijkgraaf-Witten action [41]. In particular, we will compute the correlation functions of the symmetry surface defects and the codimension-one symmetry defects in H 3 (B, U (1)) . It is sufficient to discuss the case B = Z n ×Z n . The theory can be written in the continuous notation as: [60,61,31] n 2π adb 2 + n 2π a db 2 , (3.26) where a, a are U (1) one-form gauge fields and b 2 , b 2 are U (1) two-form gauge fields. The equation of motions constrain a, b 2 to have Z n holonomy, and similarly a , b 2 to have Z n holonomy. There are symmetry surface defects aa , da/n, da /n , b 2 , and b 2 . The codimension-one symmetry defects in H 3 (B, U (1)) = Z n × Z n × Z gcd(n,n ) are generated by ada, a da and ada .
First, we show there is Z n braiding between γ a and Σ b 2 . Since Σ b 2 = δ(Σ ⊥ )b, where δ(Σ ⊥ ) is the two-form Poincaré dual to Σ, the equation of motion for b 2 is modified by the insertion to be da = −(2π/n)δ(Σ ⊥ ). Substituting this to γ a gives the correlation function Thus the lines a, a and surfaces b, b are non-trivial operators.
Consider the correlation functions with insertion of the "fractional symmetry line op-erator" exp(i Σ da/n). A similar computation shows that the only correlation function is the contact correlation function with the surface operator Σ b: where #(Σ, Σ ) is the intersection number of the two surfaces 49 . Thus the surface da/n is a redundant operator and should not be included in the list of non-trivial operators.
Next, consider the correlation functions of the surface defect where lcm(n, n ) is the least common multiple of n, n . The operator is gauge invariant since a, a have Z n and Z n holonomies, respectively. This surface operator has trivial correlation function with all line operators. We will compute the correlation function with two surface operators b, b at Σ, Σ and W aa at Σ . The equations of motion for b, b give da = −(2π/n)δ(Σ ⊥ ) and da = −(2π/n )δ(Σ ⊥ ). On S 4 spacetime the equations can be solved by (modulo gauge transformations) where Σ = ∂V, Σ = V , and we used dδ(V ⊥ ) = δ((∂V) ⊥ ) for three-volume V from integration by parts 50 . Thus the correlation function is (where Σ = ∂V, and similarly for where Tlk is the triple linking number of three oriented surfaces [21]. The triple linking number is an integer invariant of the surface-links, with the integral representation , where Σ i are closed oriented surfaces and 49 For γ = ∂Σ the intersection number can be written as Link(γ, Σ ). However, since da/n is not a genuine line operator but is a surface operator, the correlation function is a contact term. 50 We use the convention that the integration of n-form ω n over n-dimensional locus Γ n gives the spacetime integral Γn ω n = δ(Γ ⊥ n )ω n . Then using Stokes theorem and integration by parts one can show that δ((∂Γ n ) ⊥ ) = (−1) D−n+1 dδ(Γ ⊥ n ) in D-dimensional spacetime.  Figure 7: An example of a non-trivial triple linking number between surfaces K 1 , K 2 , K 3 . The figure is taken from [21] ∂V i = Σ i . An example of a surface-link that has non-trivial triple linking number is given in figure 7.
Therefore the surface operator W aa is a non-trivial operator, but nevertheless it has trivial braiding with every line operator.
As an exercise, one can use the correlation function (3.31) to check that the permutation 0-form symmetry (2.17) preserves the correlation functions in Z n 1 × Z n 2 × Z n 3 gauge theory with zero Dijkgraaf-Witten action [41]. The Z n i gauge field can be expressed as a pair of one-form and two-form gauge fields a i , b i 2 as in (3.26). Consider a different correlation function, between b 1 2 , b 2 2 , b 3 2 , which is trivial: Under the permutation 0-form symmetry (2.17), 33) and similarly for b 2 2 , b 3 2 . The correlation function (3.32) where the last equality used the following identity for the triple linking number: [21] Tlk(Σ 1 , which can be derived from the integral representation of the triple linking number. Thus the correlation function (3.32) is indeed preserved by the permutation 0-form symmetry (2.17).
We remark that the non-trivial surface operator W aa is a counterexample to the claim in [25] which states that in any bosonic (3 + 1)d TQFT there is no non-trivial surface operator that has trivial braiding with all line operators. The argument there relies on condensing all particle excitations without changing the surface operators that have trivial braiding with all line operators. On the other hand, the surface operator W aa is defined by line operators (particles) wrapping one-cycles on the surface in spacetime, and thus condensing all particles makes such surface operators trivial (another way to see this is that such a surface operator no longer has a non-trivial correlation function (3.31) after the condensation and thus it is no longer a non-trivial operator). 51 We would like to make some comparisons with a different triple-linking process that is discussed in [22][23][24]. The theory discussed there is a Z n 1 × Z n 2 × Z n 2 gauge theory with a non-trivial Dijkgraaf Witten action [24]. In contrary, the gauge theories discussed here have zero Dijkgraaf-Witten action. In addition, the triple-linking process discussed in [22][23][24] is between three surface operators where each of them has non-trivial braiding with some line operator. In contrary, in the triple-linking process (3.31) one of the surface operator aa has trivial braiding with all line operators.
Consider now the correlation functions of codimension-one symmetry defects. They have only contact correlation functions with non-local operators.
First, consider the codimension-one symmetry defects A similar computation as above shows that it has the following correlation function with two surface operator b, b : (where ∂V = Σ) (3.37) 51 A similar example is the pure U (1) gauge theory, which has symmetry surface operator F with F the U (1) field strength. It has trivial braiding with the electric Wilson lines (while non-trivial braiding with the magnetic 't Hooft lines). On the other hand, condensing the basic electric particle changes the theory to be trivial at low energy, and it changes this non-trivial surface operator to be trivial, even though the surface operator has trivial braiding with the condensing particle.
Similarly, one can compute the correlation function that involve U a = exp i 2π ada with two surface operators of the same type, Σ b and Σ b. The result is the square of (3.37) with n = n .

Selection rules depend on the couplings
Here we will use Z n gauge theory to demonstrate how higher-form symmetries lead to selection rules for the observables [20]. For simplicity, we will consider the trivial coupling ξ = 0 so (η 2 , ν 3 ) are ordinary cocycles.
The Z n gauge theory (2.3) has A = Z n one-form symmetry and B = Z n two-form symmetry, generated by the surface operator V = exp( 2πi n v 2 ) and the line operator U = exp( 2πi n u), respectively. From their braiding correlation functions (3.27) we find that U carries one-form charge (−1), and V carries two-form charge (−1). The one-form and two-form symmetry transformations can be expressed as u A line (or surface) operator with unit higher-form charge and supported on a cycle γ (or Σ) transforms under the one-form (two-form) symmetry by the phase exp( 2πi n γ λ) (or exp( 2πi n Σ λ 2 )). Thus if the cycle γ or Σ has a non-trivial homological class, the correlation functions of these non-local operators vanish unless the total one-form and total two-form charges both vanish.
Consider the spacetime S 1 × M 3 with S 1 being the time direction. We wrap k line operators of one-form charges q (i) A ∈ Z n on S 1 . This is equivalent to inserting k point defects (particle excitations) in space that extend over time, which modifies the Hilbert space on M 3 . The Hilbert space is empty unless these point defects can fuse to the trivial defect. In particular, the Hilbert space is necessarily empty unless (3.38) which is consistent with the discussion above.
If there is a mixed 't Hooft anomaly between the one-form and two-form symmetries i.e. the symmetry line operators that generate the two-form symmetry are charged under the one-form symmetry, then inserting such symmetry line operators on S 1 contributes to the selection rule (3.38) by their one-form charges. In the example of Z n gauge theory, the symmetry line operator Q B u that generates the two-form symmetry element Q B ∈ B also carries the one-form charge q A = −Q B ∈ Z n . Thus an insertion of such symmetry line defect on S 1 modifies the selection rule (3.38) On the other hand, inserting a symmetry line operator at γ that corresponds to Q B ∈ B is equivalent to activating a background for the (subgroup) two-form symmetry generated by the symmetry line operator. The background is given by Poincaré duality as Therefore the couplings to the 0-form symmetry background X by the fixed background Similarly, consider the case M 3 = M 2 × S 1 (with a prime to distinguish it from the temporal circle). Wrapping k surface operators of two-form charges q

Application to adjoint QCD with two flavors
In [43,44] it is proposed as a possibility that the UV theory of SU (2) gauge theory with one massless adjoint Dirac fermion (i.e. two Weyl fermions) flows to the IR theory of a single free massless Dirac fermion with decoupled Z 2 gauge theory. Here we will discuss how the backgrounds of global symmetries couple to the UV and the IR theories. We will use the result in section 3.1.1 for the Z 2 gauge theory, and the method of coupling the IR theory to backgrounds of the UV symmetry [30]. For other proposals of the possible low energy behavior of adjoint QCD, see [43] and the references therein.
The SU (2) gauge theory has Z 2 one-form symmetry that transforms the Wilson lines of half-integer SU (2) isospins, and Z 8 0-form symmetry that transforms the adjoint fermion (it is the remnant of the classical U (1) symmetry broken by a gauge-global Adler-Bell-Jackiw anomaly [62,63], under which the fermions have charge one) 52 . The theory can be defined on a non-spin manifold [43]. In the SU (2) gauge theory, the symmetries have the 't Hooft anomaly: [43] π 5d X 2 w 3 + π 2 5d P(X 2 )X , where X 2 is the background for Z 2 one-form symmetry, and X is the background for Z 8 0-form symmetry, and w 3 is the third Stiefel-Whitney class of the spacetime manifold. Since the free Dirac fermion does not have a one-form symmetry, such an anomaly can only be matched by the low energy Z 2 gauge theory.
In the proposal of [43], the Z 8 0-form symmetry is spontaneously broken to Z 4 at low energies [45] (which is based on the known physics of adjoint QCD on small S 1 [64,65] as reviewed in [66]). Thus the theory has two vacua, exchanged by a Z 8 transformation that is not in Z 4 . The theory admits a domain wall interpolating between the two vacua. The anomaly for the Z 8 elements that are not in Z 4 induces an anomaly on the (2 + 1)d domain wall as described by the SPT phase The anomaly on the domain wall (4.2) corresponds to Z 2 one-form symmetry generated by a deconfined line operator of spin 1 4 mod 1 on the wall [14]. For instance, such an anomaly on the wall can be realized by U (1) 2 or the bosonic (2 + 1)d Z 2 gauge theory with non-trivial Dijkgraaf-Witten action [41] i.e. the semion-antisemion theory. The two vacua have Z 4 0-form symmetry, and thus we need to match the anomaly for the Z 4 subgroup symmetry. Moreover, in this theory the SU (2) fundamental Wilson line is believed to be confined (see e.g. [46] and the references therein), and thus the UV one-form symmetry does not act on the deconfined Wilson line in the low energy Z 2 gauge theory i.e. the UV one-form symmetry is unbroken. This implies that the background B 2 of the Z 2 one-form symmetry in the Z 2 gauge theory (that transforms the deconfined Z 2 Wilson line) cannot depend on the background X 2 of the UV one-form symmetry. Then the constraint that the low energy theory reproduces the anomaly in the UV leaves the only one coupling of the Z 2 gauge theory to the backgrounds: B 3 = Bock(X 2 ) + X 2 X 1 , B 2 = w 2 and ξ = 0, where 52 The Z 8 symmetry is called an axial rotation on the fermions in [44]. X 1 is the background for Z 4 0-form symmetry. The Z 2 gauge theory is with dynamical Z 2 gauge field u that satisfies δu = w 2 . This means that the Z 2 Wilson line corresponds to a fermion particle. It has the 't Hooft anomaly 53 where we used π 5d w 2 Bock(X 2 ) = π 5d Bock(w 2 )X 2 = π 5d w 3 X 2 on closed orientable five-manifolds, and the relations for Steenrod squares 54 . Thus the theory has the anomaly that matches the anomaly (4.1) in the SU (2) gauge theory with the 0-form symmetry background X = 2 X 1 where tilde denotes a lift from Z 4 to Z 8 (it is independent of the lift).
Another proposal in [44] suggests that the low energy theory preserves the full Z 8 0-form symmetry. From (3.15) we find that to match the anomaly in the SU (2) gauge theory, the Z 2 gauge theory should couple to the Z 8 0-form symmetry background X using non-trivial ξ ∈ H 1 (Z 8 , Z 2 ) = Z 2 , and B 2 = X 2 , B 3 = w 3 . Substitution into (3.15) (with X → −X) matches the anomaly (4.1) in the SU (2) gauge theory. B 3 = w 3 implies the theory has fermionic strings [67]. The Z 2 gauge theory coupled to the backgrounds with the anomaly (4.1) is given by (3.4) with X → −X: where we used π (uδu + X 2 ∪ 1 δu)X = π uX 2 X and X 2 ∪ 1 X 2 = Bock(X 2 ). In particular, B 2 = X 2 implies the following: the one-form symmetry in the SU (2) gauge theory that transforms the fundamental Wilson line corresponds to a one-form symmetry that acts on the deconfined Z 2 Wilson line. Thus if the low energy theory preserves the Z 8 0form symmetry, the SU (2) fundamental Wilson line must be deconfined i.e. the one-form symmetry is spontanesouly broken (as opposed to the proposals in [45,43]), or the low energy theory must couple to the backgrounds by couplings besides those we have discussed. 53 The mixed anomaly (4.4) implies that after gauging the Z 2 one-form symmetry to obtain an SO(3) gauge theory, the theory has two-group symmetry with background Y 2 for the dual magnetic one-form symmetry generated by exp(πi X 2 ) (with dynamical X 2 ) that satisfies δY 2 = w 3 + w 2 X 1 . The two-group symmetry has different "subgroup" 0-form symmetries, which means that the theory can couple to only the 0-form symmetry background (e.g. w 2 = 0, w 3 = 0 and X 1 restricted to be a Z 2 ⊂ Z 4 background). 54 On orientable closed five-manifolds, π w 2 (X 2 X 1 ) = π Sq 2 (X 2 X 1 ). Using the identity Sq 2 (X 2 X 1 ) = Sq 2 (X 2 )X 1 + Sq 1 (X 2 )Sq 1 (X 1 ) and Sq 1 (X 1 ) = 0 for Z 4 gauge field X 1 gives the anomaly (4.4).

Goldstone mode of broken one-form symmetry
In the scenario where the Z 2 one-form symmetry is broken, the one-form symmetry transforms the Wilson line in the low energy Z 2 gauge theory. Thus the low energy Z 2 gauge theory (4.5) describes the Goldstone mode of the broken one-form symmetry. The action of the one-form symmetry on the line operators arises from the condition δu = B 2 , which implies that under a one-form gauge transformation B 2 → B 2 + δλ 1 , u transforms by u → u → u + λ 1 . Therefore the one-form global symmetry (with λ 1 being a Z 2 cocycle) transforms the deconfined Z 2 Wilson line as exp πi u −→ exp πi u (−1) λ 1 . (4.6) In this section we will show that by assuming the UV one-form symmetry is spontaneously broken and the Z 8 0-form symmetry is unbroken (as we argued above), one can derive the Z 2 gauge theory (4.5) for the corresponding Goldstone modes that matches the UV anomaly (4.1). We stress that the discussion here does not provide an argument that the one-form symmetry is broken if the Z 8 0-form symmetry is to be preserved.
We will discuss a more general setting with unbroken unitary 0-form symmetry and a collection of spontaneously broken higher-form symmetries with their background fields collectively denoted by B. For simplicity, we will assume the higher-form symmetries do not participate in any higher-groups, and we will also assume they are finite groups 55 . The 't Hooft anomaly corresponds to an SPT phase in the bulk, denoted by the partition function Z SP T M [B] on the bulk manifold M . For this argument we need to assume that the SPT phase with a trivial background for the broken higher-form symmetries is trivial, Z SPT M [0] = 1. This is satisfied by the anomaly (4.1).
On a manifold M without a boundary, the SPT phase Z SP T M [B] is invariant under a background gauge transformation of the higher-form symmetries B → B − δλ with cochains λ. On the other hand, if the manifold M has a boundary, the background gauge transformation gives a boundary variation by anomaly inflow: Equation (4.7) is valid for any λ.
Next, we set λ = u in (4.7) with the constraint δu = B, and sum over u on the boundary. This means that u is a dynamical field living on the boundary, which is consistent since Z SPT M [0] has trivial bulk dependence. We find that the following bulk-boundary system is well-defined: (4.8) Namely, the boundary theory has the anomaly as described by the bulk SPT phase Z SP T M [B]. In the absence of the background B, the constraint δu = B implies that u is a (higherform) finite group Abelian gauge field that obeys the cocycle condition, and the higher-form symmetries transform the "Wilson" operator by u → u− λ with cocycles λ as in (4.6). Since the theory is deconfined, this implies that the higher-form symmetries are broken and u corresponds to the Goldstone mode. The boundary variation (4.8) thus gives an Abelian (higher-form) gauge theory on the boundary ∂M for the Goldstone mode u that realizes the anomaly Z SP T M [B] 56 . It is a TQFT that describes the spontaneously broken higher-form symmetries. The construction is similar to the Wess-Zumino term that matches the 't Hooft anomaly of spontaneously broken continuous 0-form symmetries (see e.g. [68,69]).
Let us return to the SU (2) gauge theory with a massless adjoint Dirac fermion. If the Z 8 0-form symmetry is not broken, and the UV Z 2 one-form symmetry is broken, then the UV anomaly (4.1) gives the action for the Goldstone mode by anomaly inflow as 57 (4.9) where M 4 = ∂M 5 is the spacetime manifold. This reproduces the Z 2 gauge theory (4.5).

U (1) gauge theory with time-reversal symmetry
In this section we first review the U (1) × U (1) one-form global symmetry in the pure U (1) gauge theory [20]. Then we discuss different ways to couple the theory to the background of time-reversal symmetry (1.4) (more precisely, the time-reversing Lorentz symmetry O(4)) 58 .
Since the two-form symmetry is trivial, the different couplings are classified by The results are summarized in table 1 for θ = 0 mod 2π and table 2 for θ = π mod 2π, and they reproduce the classification in [4].
The symmetry-enriched phases are combinations of the couplings and the SPT phases. 56 See [31] for a similar discussion in (3 + 1)d bulk where B is replaced by a dynamical bulk gauge field. See also [37] for an alternative argument. 57 We used the identity P(X 2 − δu) − P(X 2 ) = δuδu − 2δuX 2 + δ(X 2 ∪ 1 δu). 58 We thank Anton Kapustin for suggesting this problem.
We find in total 22 non-anomalous symemtry-enriched phases for the time-reversal symmetric U (1) gauge theory, in agreement with [4].
In appendix D we will discuss the symmetry-enriched phases with additional unitary SO(3) symmetry, reproducing the classification in [40].

One-form symmetry
The U (1) gauge theory in 4d has U (1) × U (1) one-form global symmetry [20], with currents The charged objects are the line operators, with electric and magnetic charges given by where S 2 surrounds the codimension-three line operators. They are the surface operators that generate the one-form symmetries [20] 59 . If we turn on background gauge field B E for the electric one-form symmetry, the quantization of the U (1) gauge field strength F is modified, This can also be imposed on-shell by adding to the action B E j E , but we will simply impose the modified quantization condition (5.4).
If we turn on a background gauge field B M for the magnetic one-form symmetry, the action has the additional coupling Since the line operators are charged under the one-form symmetries, in the presence of the backgrounds B E , B M , the line operators are attached to additional surfaces. For the line operator with electric and magnetic charges (q e , q m ) the additional surface is where ∂Σ is the locus of the line operator. Due to the angular momentum of the elec- 59 For a discussion of surface operators in gauge theories with continuous gauge groups, see [70][71][72].
tromagnetic field, the dyon (q e , q m ) is a fermion for odd q e q m if both (q e , 0) and (0, q m ) are bosons [73], and thus in the absence of the background B E , B M the dyon (q e , q m ) is attached to the intrinsic surface q e q m π Σ w 2 .
This means that the multiplication of projective representations of the Lorentz symmetry on the particles is not compatible with the fusion rules, which is analogous to the (2 + 1)d symmetry-enriched phases with non-trivial κ discussed in [17].
Thus the total surface is the sum of (5.6) and (5.7).
Moreover, the one-form symmetry has a mixed anomaly. If we turn on both backgrounds B E and B M , then the coupling (5.5) is not well-defined but has an anomaly described by the 5d SPT where we used dB M ∈ 2πZ.
The time-reversal symmetry (1.4) does not commute with the electric one-form symmetry but commutes with the magnetic one-form symmetry. Thus it transforms the backgrounds by Note since time-reversal is an anti-unitary symmetry, there is a sign change comparing to the transformation of the charges.

Non-zero θ
When we turn on a non-zero θ angle, the electric and magnetic charges are shifted due to the Witten effect [58]: (q e , q m ) = (n + θ 2π m, m), n, m ∈ Z . (5.10) On the other hand, the surfaces that attach to the lines are not affected by tuning θ. We work in the basis where the U (1) × U (1) one-form symmetry couples to the quantized quantum number (n, m) ∈ Z × Z.
Thus in the presence of the background B E , B M the line (q e , q m ) with q e = n + θ 2π m, q m = m for integers (n, m) is attached with the surface where the last term is from the angular momentum of the electromagnetism [74,75].
For example, in the absence of the backgrounds B E , B M = 0, a monopole (q e , q m ) = (0, 1) is attached to the trivial surface at θ = 0, the surface π w 2 at θ = 2π, and again the trivial surface at θ = 4π. This is consistent with the statistics of the monopole with different θ angles [76].

Coupling by one-form symmetry
The different phases can be described by different ways for the U (1) gauge theory to couple to the background field of the Lorentz symmetry (or to define on a spacetime manifold). This can be described by activating different backgrounds for the U (1) × U (1) one-form symmetry.
First, since shifting θ → θ + 2π is equivalent to adding a magnetic background, it is thus sufficient to consider only the case θ = 0 or θ = π. If we turn on backgrounds for the electric and magnetic one-form symmetries B E , B M , one can show the θ = 2π term is equivalent to θ = 0 with ∆B M = B E + πw 2 (5.13) up to classical actions. The first term in the change of B M can be explained as from the shift in the spectrum of the line operators, while the second term comes from the angular momentum of the electromagnetic field.

θ = 0
The time-reversal symmetry acts on the one-form symmetry by (5.9), which in Euclidean signature is τ : Different couplings to the Lorentz symmetry correspond to different backgrounds for the A = U (1) E × U (1) M electric and magnetic one-form symmetries, and they are classified by When the surface is π w 2 , the particle is in projective representation of the Lorentz symmetry and thus it is a fermion. It also satisfies R 2 = 1 for the Euclidean reflection R, and thus T 2 = −1 by Wick rotation. Namely, the particle is a Kramer doublet. When the surface is π w 2 1 , the particle is in the projective representation T 2 = −1 of the time-reversal symmetry. When the surface is π (w 2 + w 2 1 ), the particle is a fermion and satisfies T 2 = 1. Note B M = πw 2 1 does not represent a non-trivial cocycle in H 2 τ (BO(4), U (1) E × U (1) M ). One way to see this is that the time-reversal symmetry is not a symmetry of the wordline for particles with magnetic charges (1.4), and thus we cannot interpret a surface π w 2 1 attached to the line with magnetic charges as the particle being in the projective representation of the time-reversal symmetry. Thus we only need to consider B M = 0, πw 2 . Since the basic magnetic line operator is attached to the surface B M = 0, π w 2 , this means that the monopole particle is a boson or fermion, depending on the choice. This is consistent with [4].
Another way to show B M = πw 2 1 does not represent a non-trivial coupling is that for U (1) gauge Z T 2 the following coupling is a decoupled classical term To see this, note that for B E = 0 the coupling π F 2π w 2 1 is trivial (see e.g. [77]). Now, different gauge bundles that satisfy (5.4) for B E = πw 2 , πw 2 1 , π(w 2 , w 2 1 ) differ by twisted complex line bundles. Denote the integral lift of B E /π to be F c /(2π), which is a classical field and by definition satisfies (5.4). Then F − F c is the field strength of a twisted complex line bundle (i.e. satisfies (5.4) with B E = 0), and thus F 2π which is a classical term that depends only on the background fields.
The possible electric background B E needs to be such that there is no anomaly (5.8). This leaves six choices as in table 1: Due to the modification of the quantization (5.4), the backgrounds B E = πw 2 , π(w 2 +w 2 1 ) modify the symmetry respectively into It might be puzzling that while we start with a general unorientable four-manifold, the different couplings seem to require additional structures on the spacetime manifold 60 . The resolution is that these structures in general do not extend to the worldvolume of operator insertions. For instance, the background B E = πw 2 inserts the generator F at the Poincaré dual of w 2 [78], and if w 2 cannot be lifted to an integral class, the pin c+ structure from the modification of quantization (5.4) does not extend to the worldvolume of the operator insertion. The theory also does not depend on the choice of this structure, since different choices can be absorbed into the dynamical gauge field that is summed over in the path integral.
So far we have only discussed non-anomalous couplings. The anomalous couplings are B E = πw 2 , π(w 2 + w 2 1 ), B M = πw 2 , and they have the anomaly π w 2 w 3 from (5.8). The theories with these couplings is known to be anomalous [79,67,80], and they are called all-fermion electrodynamics, since the basic electric and magnetic particles are fermions. We will focus on the non-anomalous couplings.

θ = π
Consider the time-reversal symmetry θ = π, (q e , q m ) −→ θ = π, (q e , −q m ) . It is easy to check that the symmetry has order two. The possible couplings to the Lorentz symmetry are classified by where the two elements correspond to B M = 0, πw 2 . On the other hand, the background B E is the same for all couplings. In the following we will determine its value.
The possible candidates for B E are B E = 0, πw 2 1 , πw 2 , π(w 2 + w 2 1 ). The relevant symmetries for these couplings are P in c+ (4), P in c− (4) and (omitting the SO(4) Lorentz group) U (1) Z T 2 , P in − (2). We are looking for the SPT phase that has time-reversal symmetric θ = π term for the U (1) gauge field when reduced on an orientable manifold, and it requires the U (1) gauge field to be a spin c connection [82] 61 . This rules out the last two cases. From the classification of SPT phases of P in c± symmetry (see e.g. [10,3,34]) we find that the θ = π term for the U (1) gauge field can be lifted to an unorientable manifold only for More precisely, the θ = π term is given by (−1) N 0 where N 0 is the mod 2 index of the Dirac operator with U (1) charge one (see e.g. [81]). The background (5.27) implies that the spacetime manifold in the Euclidean signature has a pin c+ structure. Namely, the gauge and global symmetries combine into where (−1) F is identified with the Z 2 center of U (1), and the Euclidean reflection does not commute with U (1).
Another way to see the result is that the transformation (5.22) on the surface (5.11) implies that the transformation of backgrounds (5.24) has the gravitational correction B M = B M − B E + πw 2 from the extra term nmπ w 2 = n m π w 2 + m π w 2 due to the angular momentum of the electromagnetic field. This is consistent with B E = πw 2 61 To see this, note θ = π for an ordinary U (1) gauge field on an orientable manifold changes by θ = 2π under time-reversal, which can be expressed as where F is the field strength for ordinary U (1) gauge field. The time-reversal symmetry is violated by the mixed term F w 2 /2. This mixed term can be removed (up to a gravitational term) by completing the square using F 2π = F 2π + 1 2 w 2 where w 2 is the lift of w 2 to an integral cocycle (this is possible for every orientable four-manifold). Thus F is the field strength of a spin c connection. One can further show the extra gravitational term in the transformaton can be cancelled by adding π A(R) [81,82].

Magnetic
Backgrounds boson, Table 1: Six non-anomalous couplings of U (1) gauge theory at θ = 0 mod 2π to the backgrounds of time-reversing Lorentz symmetry. The electric particle has electric and magnetic charges (1, 0), while the magnetic particle has charges (0, 1). The statistics and Kramer degeneracy of the particles are according to [4]. In this note we show the different couplings, or symmetry-enriched phases, correspond to different backgrounds for the electric and magnetic one-form symmetry as explained in section 5.2.
Electric Magnetic Backgrounds fermion, T 2 = −1 fermion B E = πw 2 , B M = 0 Table 2: One non-anomalous coupling of U (1) gauge theory at θ = π mod 2π to the background of time-reversing Lorentz symmetry. The electric particle has charge (1, 0) (that corresponds to (1, 0) at θ = 0), while the magnetic particle has charge (0, 2) (that corresponds to the dyon (−1, 2) at θ = 0). We pick the basis of the one-form symmetry such that the backgrounds B E , B M are properly quantized and couple to integer quantum numbers. The statistics and Kramer degeneracy of the particles are according to [4]. In this note we show that the different symmetry-enriched phases correspond to different backgrounds for the electric and magnetic one-form symmetries. enforced by time-reversal. (Note however, it cannot distinguish between B E = πw 2 and B E = π(w 2 + w 2 1 ) since a dyon is not time-reversal invariant). Among the two couplings B M = 0 and B M = πw 2 , only the coupling B M = 0 has no anomaly (5.8). In this non-anomalous phase the dyons (q e , q m ) = ( 1 2 , ±1) exchanged by time-reversal are attached to the trivial surface according to (5.11), where we used B E = πw 2 . Thus the two dyons are bosons. If B M = πw 2 , then the dyon would be a fermion, but this would result in an anomaly from the mixed anomaly (5.8) of the one-form symmetry. This is consistent with the conclusion in [4].
The pure monopoles with q e = 0 = n + θ 2π m have even magnetic charge q m = m. The basic magnetic monopole (q e , q m ) = (0, 2) is attached to the following surface from (5.11), And thus the minimal magnetic monopole is a fermion. This is consistent with [4].
Similarly, the basic electric particle (q e , q m ) = (1, 0) is attached to the surface Thus the minimal electric particle -which is invariant under time-reversal symmetry-is a fermion and a Kramer doublet. (Note this means it satisfies R 2 = 1 for Euclidean reflection R). This again agrees with [4].

Combined with SPT phases
Consider adding additional classical counterterm to the theory. Such counterterms correspond to the symmetry-protected topological phases for the time-reversal symmetry. There are 4 candidate SPT phases [2], generated by π w 2 2 , π w 4 1 .

(5.32)
In the symmetry-enriched phases with the couplings that activate the backgrounds B E = πw 2 1 , π(w 2 + w 2 1 ) , (5.33) the following generator for the SPT phases (5.32) becomes trivial where we used (5.4) and that 2F is a properly quantized U (1) gauge field (since (5.33) takes value in the Z 2 ⊂ U (1) subgroup). Thus there are only two SPT phases from the remaining non-trivial generator π w 2 2 . This is consistent with [4], and the classification of the SPT phases for P in c± symmetry (see e.g. [3,34]).
Another way to understand the trivialization of the SPT phases due the coupling (5.33) is from the mixed anomaly for the U (1) × U (1) one-form symmetry. In the presence of the background B E = π(w 2 + w 2 1 ), πw 2 1 , the U (1) magnetic one-form symmetry with parameter π w 1 (where tilde denotes a lift to integral one-cochain) produces the anomalous shift 1 2π B E πδ w 1 = π (w 2 + w 2 1 )w 2 1 = π w 2 1 w 2 1 = π w 4 1 mod 2πZ . (5.35) Thus this SPT can be absorbed by a magnetic one-form global symmetry transformation. Concretely, the SPT phase is equivalent to depositing the worldline SPT phase π w 1 on the line operators charged under the Z 2 ⊂ U (1) magnetic one-form symmetry. This is an example of the trivialization of SPT phases by the dynamics discussed in section 2.6.
We remark that for θ = π the theory necessarily has a gravitational term, no matter how different SPT phases (5.32) are added. To see this, note that (−1) N 0 reduces to the following term when the manifold is orientable [83] Tr R ∧ R , (5.36) where R is the curvature 2-form, and the last term cannot be cancelled by the SPT phases (5.32).
6 More Examples 6.1 U (1) gauge theory with Z 2 unitary symmetry In this example we will discuss U (1) gauge theory couples to the background of unitary Z 2 0-form symmetry. Without the restriction of time-reversal symmetry, the θ parameter can be continuously tuned to zero, and thus we only need to consider the case θ = 0.
If the Z 2 0-form symmetry does not permute the line operators, then there is only one coupling, corresponding to B E = B M = 0: Thus we will focus on the 0-form symmetry that permutes the line operators.
The gauge coupling can be continuously tuned to the self-dual point with θ = 0, where the electromagnetic duality (e.g. [84,85]) becomes a Z 4 unitary 0-form symmetry 3) The theory at θ = 0 also has the time-reversal symmetry T in (1.4). The symmetries satisfy the following algebraic relations: 62 In this section we will focus on the unitary Z 2 0-form symmetry that acts by charge conjugation.

The charge conjugation symmetry
The charge conjugation symmetry (6.2) acts on the background gauge field of the one-form symmetry by We will focus on the Z 2 × Z 2 ⊂ U (1) × U (1) subgroup one-form symmetry, with backgrounds B e , B m . They correspond to the special case B E = πB e , B M = πB m , where we normalize B e , B m = 0, 1 mod 2. If we make B m dynamical, it forces the U (1) ∼ = SO(2) gauge bundle to have even first Chern numbers, and the gauge group becomes its double cover, which is still isomorphic to SO (2). The π-rotation in the center of the original gauge group corresponds to a π/2-rotation in its double covering, and thus the order of this element changes from 2 to 4 in the covering. On the other hand, the π/2-rotation does not commute with the charge conjugation, as it differs from a (−π/2)-rotation by a nontrivial π-rotation. These observations imply the following mixed anomaly in the presence of background B C of the charge conjugation symmetry (normalized as B C = 0, 1 mod 2): In particular, if we promote B m to be dynamical, then we can introduce new background B 2 for the emergent one-form symmetry with the coupling π B m B 2 . To cancel the anomaly (6.6), B 2 needs to satisfy 63 δB 2 = Bock(B e ) + B e B C . (6.7) 62 The electromagnetic duality also maps T to CT at θ = π [81], and thus the set of symmetry-enriched phases of U (1) gauge theory with symmetry CT is equivalent to the set of symmetry-enriched phases with symmetry T discussed in section 5 (see also [4]). 63 For a general discussion about gauging a subgroup of an anomalous symmetry, see [38].
If B C = 0, this implies the one-form symmetry is extended from Z 2 to Z 4 . This is consistent with the Z 2 element in the center of the original gauge group turning into a Z 4 element. The background for the Z 4 one-form symmetry can be constructed from (B 2 , B e ) as B 2 = 2B 2 − B e , where B e is a lift of B e to Z 4 cochain. Using (6.7) one can verify B 2 is independent of the lift, and it is closed in Z 4 . In the presence of non-trivial B C , due to the action of charge conjugation on the Z 4 one-form symmetry, the background for the one-form symmetry should be modified to be a twisted cocycle, in agreement with (6.7).

Couplings
Next we will discuss different ways to couple the theory to the background gauge field of Z 2 0-form symmetry that acts as the charge conjugation symmetry. There are 4 couplings from H 2 C (BZ 2 , U (1) × U (1)) = Z 2 2 , corresponding to the background gauge fields for the one-form symmetry These cocycles are non-trivial under the inclusion map Z 2 → U (1), since the charge conjugation symmetry acts on the one-form symmetry (6.5). Further imposing the identification (2.31) from the Z 4 0-form symmetry (6.3) at the self-dual point, we find that among (6.8) there are three distinct couplings. The coupling with B e = B m = (B C ) 2 is anomalous by (6.6), in agreement with [40]. The anomaly only receives a contribution from the last term in (6.6) since Bock((B C ) 2 ) is trivial, and the anomaly is given by which is the unique non-trivial (4 + 1)d bosonic SPT phase for unitary Z 2 symmetry, as classified by H 5 (Z 2 , U (1)) = Z 2 [41,1].
It is straightforward to generalize the discussion to a general unitary 0-form symmetry G that acts as the charge conjugation symmetry by σ 1 ∈ Hom(G, Z 2 ). The SPT phases that are trivialized by the dynamics can be obtained from the anomaly (6.6). For instance, consider θ = 0 and the Z 2 ×Z T 2 0-form symmetry, where the time-reversal acts as before, and the unitary Z 2 symmetry acts as charge conjugation. The coupling with B e = w 2 1 trivializes the SPT phase π w 4 1 + w 3 1 B C by the magnetic one-form global symmetry transformation with the parameter λ 1 = π w 1 .

O(2) gauge theory
We briefly discuss a gapless example with intrinsic three-group symmetry. We start with U (1) gauge theory and turn on the background gauge field B C for the charge conjugation Z 2 0-form symmetry as in section 6.1. Then we promote the gauge field to be dynamical, changing the theory into an O(2) gauge theory. The theory is still a free theory. The gauge bundle becomes an O(2) bundle, with first Stiefel-Whtiney class w 1 (O(2)) = B C .
Since charge conjugation symmetry identifies the lines (q e , q m ) ∼ (−q e , −q m ), the oneform symmetry becomes Z 2 ×Z 2 , corresponding to the Z 2 center of O(2) and the Z 2 magnetic one-form symmetry generated by w 2 (O(2)). The charged objects are the Wilson lines and the 't Hooft lines.
The theory has B = Z 2 two-form symmetry generated by the line w 1 (O(2)). The charged objects are the Alice strings (see e.g. [86][87][88]), which end on the codimensionone operator that implements the Z 2 charge conjugation transformation. Since the charge conjugation symmetry is gauged, such codimension-one operators are trivial operators, and the Alice strings can move freely. When a particle with charge (q e , q m ) goes around the Alice string, it becomes the particle with charge C(q e , q m ) = (−q e , −q m ).
Denote the background three-form gauge field for the Z 2 two-form symmetry by B 3 , which couples to the theory as π w 1 (O(2))B 3 . In order to cancel the mixed anomaly (6.6), where B C = w 1 (O(2)), the background B 3 must satisfy (6.10) Thus the theory has 3-group symmetry that combines the B = Z 2 two-form symmetry and the A = Z 2 × Z 2 one-form symmetry, described by the backgrounds B 3 and B e , B m . A similar discussion that obtains 2-group symmetry by gauging a subgroup can be found in [38,30].
We remark that since the line w 1 (O(2)) does not transform under the electric or magnetic one-form symmetry, this is an example with non-trivial Ξ in (2.46).
6.2 Z 2 gauge theory with time-reversal symmetry In this example we discuss Z 2 gauge theory with time-reversal symmetry (more precisely, the time-reversing O(4) Lorentz symmetry). Denote the basic line and surface operators by U, V , then consider the time-reversal symmetry acting on the line operator U qe and surface operator V qm as T (q e , q m ) = (q e , −q m ) = (q e , q m ) mod 2 . (6.14) Thus the time-reversal symmetry does not act on the one-and two-form symmetries. Similarly it does not act on the Z 2 background gauge fields of the one-and two-form symmetries.
We will focus on the couplings with trivial ξ. Since the one-form and two-form symmetries are isomorphic to Z 2 , the couplings to time-reversal symmetry are classified by for the Z 2 one-form and two-form symmetries: (they are normalized as B where the integers p, q, p , q = 0, 1 mod 2. Thus the couplings have a Z 4 2 classification. Some of the couplings are anomalous due to the mixed anomaly between the one-form and two-form symmetries which comes from the braiding between the generators of the two higher-form symmetries.
There are 12 couplings that are non-anomalous, corresponding to the Z 2 valued backgrounds B In particular, the coupling with the backgrounds B (2) 2 = w 2 , B (2) 3 = w 3 has the gravitational anomaly π w 2 w 3 from (5.8). In this case the basic line operator is attached to the surface π B (2) 2 = π w 2 , and thus it is the worldline of a fermion. The basic surface operator is attached to the surface π B (2) 3 = π w 3 , and so it describes a fermionic string excitation. The gravitaional anomaly for this coupling is also explained in [67].
In the presence of a surface operator V Σ = π Σ v 2 supported at Σ, the equation of motion for v 2 enforces B (2) 2 = δu+δ ⊥ (Σ) i.e. w 2 1 is trivial away from the surface Σ. In particular, the background B 3 = w 3 1 is non-trivial and it can be detected by an insertion of surface operator. As another example, the background B = w 3 has a gravitational anomaly, thus the two couplings cannot be continuously connected to each other.

Combined with SPT phases
We can further combine the couplings with SPT phases for the global symmetry. This amounts to adding a topological action for the background gauge field. As discussed in section 2.6, this either produces a new phase, or merely redefines the observables by worldvolume SPT phases and does not lead to distinct phases similar to section 5.3.
In the case of Z 2 gauge theory with time-reversal symmetry, the one-form and two-form symmetry has the mixed anomaly described by the 5d bulk term π 5d B (2) 2 B (2) 3 . By anomaly inflow to 4d this means that under the Z 2 higher-form global symmetries with parameters given by the Z 2 cocycles λ 1 , λ 2 , the theory changes by π B (2) The anomalous shift gives rise to an SPT phase that can be absorbed by a higher-form global symmetry transformation. We will use the parameters λ 1 = w 1 or λ 2 = w 2 , w 2 + w 2 1 , w 2 1 . For example, with B (2) 2 = w 2 and λ 2 = w 2 , this implies the SPT phase π w 2 2 (6.20) can be absorbed by depositing the worldvolume SPT phase π λ 2 = π w 2 one the surface charged under the Z 2 two-form symmetry. The possible couplings are summarized as follows: • When B (2) 2 = w 2 1 , the transformation (λ 1 , λ 2 ) = (0, w 2 1 ) trivializes the SPT w 4 1 . The SPT phase is equivalent to depositing the worldvolume SPT phase π w 2 1 on the surface operator.
• When B 3 . The SPT phases for time-reversal symmetry can be generated by π w 2 2 and π w 4 1 , but some of them can be trivialized by the coupling, and we list the non-trivial generators for each coupling. The entries above the line in the middle are non-anomalous, while those below the line have the gravitational anomaly π w 2 w 3 . In total there are 25 non-anomalous symmetry-enriched phases.

Z 2 gauge theory from Higgsing the U (1) theory
The U (1) gauge theory can be Higgsed to Z 2 gauge theory by condensing a scalar of charge 2. We add to (1.3) the scalar field Φ with Lagrangian where the potential makes Φ condense with |Φ| 2 = ρ 2 . Writing Φ = ρe iϕ with periodic scalar ϕ ∼ ϕ + 2π, this amounts to adding In particular, this means the Z 2 cocycle u = a/π can be lifted to an integral cocycle dϕ/(2π) when Φ condenses.
The condition on a can also be realized by adding to (1.3) a Lagrangian multiplier where b 2 is a U (1) two-form gauge field. This action can be identified with (2.3) for n = 2, a = πu, b 2 = πv 2 . The theory has electric Z 2 one-form symmetry and magnetic two-form Z 2 symmetry, where the charged objects are the Wilson line W = e i a and the vortex string V = e i b 2 associated with Higgsing the U (1) gauge field. Note at low energies the vortex string squares to a trivial operator V 2 = e 2i b 2 = 1. Denote the corresponding background gauge fields for the higher-form symmetry by B 2 = πB 3 ; they are normalized as B 2 , B 3 ∈ πZ.
The gauge field B 2 couples to the theory as Note the constraint (6.26) means the Higgs field is also charged under a background field related to B E , so the condition (6.23) is modified by a background field to satisfy (6.26).
The background B 3 couples to the theory as 2 2π aB 3 . For instance, if B M = πw 2 1 , then B 3 = 0, in agreement with the fact that it is a classical action (5.19) in the UV. Similarly, if B M = πw 2 , then the coupling is trivial only on a pin + manifold, and thus it corresponds to B 3 = πw 3 = πBock(w 2 ).
It is associative but not commutative. In this note we will omit writing the cup products.
We have the following relations for a p cochain f and q cochain g: Similarly, if there is G action on A given by ρ : G → Aut(A), one can define a twisted coboundary operation that is nilpotent. Similarly the cup products ∪, ∪ 1 can be modified. The rules (A.4) are still true (with δ meaning the twisted coboundary operation).
When the coefficient group is A = Z 2 , there are additional operations in the cohomology called the Steenrod squares. For the purpose of this note we only need the operations Sq 1 and Sq 2 . Sq i maps a Z 2 p-cocycle to a Z 2 (p + i)-cocycle. The definitions of Sq 1 and Sq 2 acting on Z 2 one-cocycle x 1 and two-cycle x 2 are Sq 1 (x 1 ) = x 1 ∪ x 1 , Sq 1 (x 2 ) = x 2 ∪ 1 x 2 , Sq 2 (x 1 ) = 0, Sq 2 (x 2 ) = x 2 ∪ x 2 . (A.5) In particular, Sq 1 acts on the cohomology the same way as the Bockstein homomorphism for the short exact sequence 1 → Z 2 → Z 4 → Z 2 → 1.
B Dimensional reduction of Z n gauge theory with coupling ξ In this appendix we consider Z n gauge theories coupled to the background X of a unitary 0-form symmetry G by a non-trivial ξ ∈ H 1 (BG, H 3 (B, U (1)) ) = H 1 (BG, Z n ). We will study the consequence of the coupling ξ by dimensionally reduce the theory to (2 + 1)d.
In the continuous notation, the Z n gauge theory coupled to X by ξ is described by 4d n 2π b 2 da + n (2π) 2 adaX * ξ . (B.1) where a, X * ξ are one-form gauge fields and b 2 is a two-form gauge fields. The continuous fields a, b 2 are related to the discrete fields roughly by e i a = e 2πi n u and e i b 2 = e 2πi n v 2 , and similarly for X * ξ.
We place the theory on S 1 × M 3 with small radius β = 1/T for the circle, and study the implication of the coupling for the effective (2 + 1)d theory. We turn on a non-trivial chemical potential for the 0-form symmetry background field: and trivial holonomy of X for every cycle on M 3 . The coupling adaX * ξ in (B.1) reduces to the Chern-Simons term k 2π 3d ada . (B. 3) The effective theory on M 3 has one-form symmetry: part of it is from the original one-form symmetry in (3 + 1)d, while the other part is from the two-form symmetry 66 . The (2 + 1)d theory is where b is the U (1) gauge field arising from the b 2 two-form gauge field in (3 + 1)d. As a consistency check, this theory does not require a spin structure, just as the (3 + 1)d theory.
The equations of motion for a, b implies the line operators U = e i a , V = e i b obey the relations U 2k V n = 1, U n = 1 .
Next, we will show the one-form symmetry in (2 + 1)d can be reproduced from the three-group symmetry (3.7) in (3 + 1)d. The three-group symmetry (3.7) reduces to where B 2 is the two-form background field that comes from the reduction of B 3 , and the coefficient k comes from the holonomy of X in (B.2) on the reduced circle. This describes the two-form backgrounds of the group extension of Z n by Z n specified by the group cocycle ω(s 1 , s 2 ) = 2k n (s 1 + s 2 − (s 1 + s 2 mod n)) where s 1 , s 2 = 0, 1, · · · n−1. The group extension 66 The reduction of the Z n gauge field also gives a decoupled Z n 0-form in (2 + 1)d that can be described by a periodic scalar φ ∼ φ + 2π and the U (1) two-form b 2 with the action n 2π b 2 dφ. This sector is bosonic, and it does not have an intrinsic one-form symmetry. It is decoupled form the Chern-Simons theory (B.4), since we take the background X to have trivial holonomy on cycles in M 3 , and thus we will omit it in the following discussion.
is Z n 2 / × Z . The backgrounds B 2 , B 2 with the constraint (B.6) are equivalent to the following Z n 2 / × Z two-cocycles: where α, β are integers satisfying α(2k/ ) + β(n/ ) = 1, and tilde denotes a lift to integral cochains. The constraint (B.6) implies that δB Therefore different couplings ξ can be distinguished from the statistics of the line operators in the (2 + 1)d theory obtained by dimensional reduction.

C SPT phases from gauging higher-form symmetries
We can couple the theory to both the 0-form symmetry background X and the two-form symmetry background B 3 by the shift If we turn off B 3 = 0 after the shift, then this is equivalent to coupling the theory to the background X by a fixed two-form symmetry background (2.30).
Since the two-form symmetry does not have an anomaly on its own, we can gauge the two-form symmetry with a dynamical gauge field b 3 . In this appendix we will study how the theory obtained from gauging the two-form symmetry depends on the coupling ν 3 .
For simplicity, we consider the example of Z 2 two-form symmetry. We will also assume there is no three-group symmetry, δB 3 = 0. Thus ν 3 ∈ H 3 (BG, Z 2 ).
There are two cases depending on whether the two-form symmetry has a mixed anomaly with other symmetry, which by is 5d B 2 B 3 with B 2 = X * η 2 .
If the two-form symmetry does not have a mixed anomaly with the 0-form symmetry (trivial η 2 ), then X * ν 3 can be absorbed into the dynamical gauge field b 3 that is summed over in the path integral. Thus the resulting theory does not depend on ν 3 .
If the two-form symmetry has a mixed anomaly with the 0-form symmetry (non-trivial η 2 ), then the theory has the following bulk dependence π 5d (b 3 + X * ν 3 )X * η 2 . (C.2) To cancel the dependence of the dynamical field b 3 in the bulk, the background Y of the dual Z 2 0-form symmetry that couples as π b 3 Y must satisfy This implies that after gauging the two-form symmetry, the 0-form symmetry is extended by the dual Z 2 0-form symmetry to be a group extension determined by the cocycle η 2 .
The constraint (C.3) also implies that the 't Hooft anomaly of the 0-form symmetry for different ν 3 is trivialized. This gives rise to different SPT phases of the 0-form symmetry. The different SPT phases are described by ν 4 ∈ C 4 (BG, R/Z) that cancels the anomaly of 0-form symmetry in (C.2) 2π 5d X * δν 4 = π 5d X * ν 3 η 2 . (C.4) For instance, consider the Z 2 gauge theory coupled to the background X of the bosonic Lorentz symmetry (without time-reversal symmetry) and unitary 0-form symmetry G by the coupling ξ = 0, η 2 = w 2 and ν 3 = ρ 3 ∈ H 3 (BG, Z 2 ). Then after gauging the Z 2 twoform symmetry, (C.3) implies that the Lorentz symmetry is extended to be Spin(4), and the dual Z 2 0-form symmetry is identified with the Z 2 fermion parity. Thus gauging the Z 2 two-form symmetry gives a fermionic SPT phase with internal G symmetry that depends on ρ 3 by ν 4 ∈ C 4 (BG, RZ) in (C.4) and satisfies where we used π 5d X * ρ 3 w 2 = π 5d X * Sq 2 (ρ 3 ) on orientable manifolds. This example is discussed in [91], and it reproduces the fermionic SPT phases studied by Gu and Wen in [92] using supercohomology.
Among the couplings some of them cannot be realized in a (3+1)d system but must be on the surface of a (4 + 1)d SPT phase specified by the anomaly (5.8). There are 14 non-anomalous couplings listed in table 4, in agreement with [40].
(D. 6) In particular, π w 2 (SO(3)) 2 = π w 2 (SO(3))(w 2 + w 2 1 ) is not an independent SPT phase. In the presence of non-trivial coupling by the one-form symmetry, some of the SPT phases can be absorbed by a global magnetic one-form symmetry transformation with parameter λ = π w 1 that produces 1 2π B E δ(π w 1 ). When B E = 0, πw 2 , this gives an SPT phase that is non-trivial on its own but is trivialized by coupling to the dynamics. In these cases there are only 3 independent generators for the SPT phases. Therefore in total there are 9 × 2 3 + 6 × 2 4 = 168 non-anomalous phases, in agreement with [40].