On 2-group global symmetries and their anomalies

In general quantum field theories (QFTs), ordinary (0-form) global symmetries and 1-form symmetries can combine into 2-group global symmetries. We describe this phenomenon in detail using the language of symmetry defects. We exhibit a simple procedure to determine the (possible) 2-group global symmetry of a given QFT, and provide a classification of the related ’t Hooft anomalies (for symmetries not acting on spacetime). We also describe how QFTs can be coupled to extrinsic backgrounds for symmetry groups that differ from the intrinsic symmetry acting faithfully on the theory. Finally, we provide a variety of examples, ranging from TQFTs (gapped systems) to gapless QFTs. Along the way, we stress that the “obstruction to symmetry fractionalization” discussed in some condensed matter literature is really an instance of 2-group global symmetry.


Introduction
Symmetry is one of the most enduring and fruitful tools in the analysis of Quantum Field Theory (QFT). The most elementary consequence of symmetry is to organize observables into representations and to enforce selection rules on correlation functions. A more subtle aspect of symmetry is that there may be obstructions ('t Hooft anomalies) to gauging a symmetry, i.e. to coupling the system to dynamical gauge fields. These obstructions are properties of the theory that are inert under renormalization group (RG) flow and are therefore powerful constraints on dynamics.
The most familiar kind of global symmetry (ordinary or 0-form) acts naturally on local operators. If the symmetry is continuous its implications are encoded in the Ward identities of the associated conserved current. More generally, it is useful to organize symmetries according to the dimension of the charged objects [1]. For instance, 1-form global symmetries act on line operators. Unlike the case of 0-form symmetries which can be Abelian or non-Abelian, higher-form symmetries are necessarily Abelian. In the case of continuous higher-form global symmetry, the associated Ward identities are again encoded in the correlation functions of conserved currents, which are differential forms of general degree.
To analyze discrete global symmetries one requires a presentation that does not rely on conserved currents. This is achieved through the notion of symmetry defects, which are extended operators representing the symmetry transformations. An ordinary global symmetry labelled by an element g in the 0-form symmetry group G gives rise to a codimension-1 non-local operator U g , with the property that as a local operator is dragged through the defect it is acted on by the symmetry transformation associated to g. The fact that this operator is a global symmetry is encoded through a remarkable property of U g : it is topological. Hence its correlation functions do not change under small deformations of the manifold supporting the operator. Similarly, n-form global symmetries are realized by codimension-(n+1) operators with topological correlation functions. The fact that symmetries are implemented through a topological subsector of correlation functions also explains why they are so robust and why they can be analyzed at any energy scale along the RG flow of a field theory.

JHEP03(2019)118
g h gh Figure 1. A junction (in red) where three 0-form symmetry defects of type g, h, gh meet in codimension 2. This configuration is generic in spacetime dimension 2 and above. These junctions encode the group law of the 0-form symmetry.
All aspects of the global symmetry of a given QFT can be understood from the properties of the associated topological symmetry defects. Recent investigations include [2,3]. For instance, the most basic property of the 0-form symmetry is that it forms a group G. At the level of defects this is specified by the existence of junctions where three defects meet obeying the multiplication law (as in figure 1). More generally, as we describe below, in the presence of higher-form symmetries there are additional types of junctions (of higher codimension), where 0-form symmetry defects and higher-form symmetry defects meet, and this gives rise to the generalized concepts of symmetry that we explore.

2-group global symmetry
In this paper we focus on the particular case of 0-form and 1-form global symmetries, and we address the question: What is the most general possible symmetry structure including a 0-form group G and a 1-form group A? We show that one general possibility is that G and A are combined into a higher-categorical structure known as a 2-group (see e.g. [4][5][6][7] and references therein). Including even higher-form global symmetries naturally leads to more general n-groups. Concretely, this means that the symmetries of the theory do not factorize, but rather are fused in a way encoded by the existence of a junction of both 0-form and 1-form symmetry defects discussed below and illustrated in figure 4. When this fusion occurs, we say that a QFT has 2-group global symmetry.
The interplay between 2-groups and QFT has been explored in several contexts in the literature. In [8], symmetry protected phases with discrete 2-group global symmetry were constructed following earlier related work [9,10]. These topological actions for 2group gauge fields were subsequently generalized in [11,12] and play an essential role in our discussion of 2-group 't Hooft anomalies in section 3. Other recent discussions of discrete 2-group symmetry appear in [13][14][15]. QFTs with continuous 2-group symmetry have recently been studied in [16] and are briefly reviewed below. 1 JHEP03(2019)118 g ρ g a a Figure 2. When a symmetry operator of type a ∈ A crosses a codimension-1 symmetry operator of type g ∈ G, it emerges transformed by an automorphism ρ g of A.
One aspect of 2-group global symmetry is simple to describe. The 0-form symmetry can act on the 1-form charges. A simple example of this is familiar from three-dimensional Abelian Chern-Simons theory. In this case the 1-form symmetry group is generated by Wilson lines of various electric charges q. There is also a 0-form symmetry group that includes charge conjugation. Charge conjugation acts on the Wilson lines by exchanging q ↔ −q.
More abstractly, the action of the 0-form symmetry on the 1-form symmetry is encoded by the properties of the symmetry defects described above. When an operator a ∈ A pierces a codimension-1 symmetry operator for g ∈ G, it emerges as a new 1-form charge denoted ρ g a (see figure 2). This transformation must preserve the group structure of the 1-form symmetries and therefore defines a map (a group homomorphism) Concretely, this means that β is a function: which obeys certain identities, and is subject to certain equivalence relations so that only its equivalence class [β] is meaningful (see appendix A for a review of group cohomology). The physical meaning of the H 3 -class [β] is most clearly illustrated using the topological symmetry defects introduced above. When a configuration of four 0-form symmetry defects is deformed, a 1-form symmetry defect controlled by β appears (see figure 3). The precise representative function β of the cohomology class [β] can be changed by adding local counterterms to the action. Hence only the cohomology class is physically meaningful. The description above presents the class [β] from a transformation of 0-form symmetry defects. However, to parallel our discussion above of the group law for 0-form symmetry defects, it is more instructive to view this as arising from a junction of symmetry defects. In spacetime dimension three and above, there are generic intersections of 0-form symmetry defects which occur in codimension-3 in spacetime. The signature of 2-group global symmetry is that at these codimension-3 junctions, a 1-form symmetry defect controlled  . A junction where 0-form symmetry defects of type g, h, k, ghk ∈ G meet in codimension 3. This configuration is generic in spacetime dimension 3 and above. The junctions of three codimension-1 defects are in red, and their intersection is the black point. At the codimension-3 intersection, a 1-form symmetry defect β(g, h, k) emanates, signaling the 2-group symmetry. In d dimensions, all objects span the remaining d − 3 dimensions. by β is also present. See figure 4. Notice that the pattern of rearrangement of the 0-form symmetry defects in that diagram is related to the associativity of the 0-form symmetry defects. Thus, when the Postnikov class [β] is non-trivial the 0-form symmetry defects are non-associative in their action on lines.
Taking all this data together, we say that a QFT has 2-group global symmetry (1.4)

JHEP03(2019)118
We stress that this data is intrinsic to the QFT. If both the 0-form symmetry and the 1-form symmetry are continuous, then 2-group symmetry leads to modified Ward identities that are visible at the level of current correlation functions as discussed in [16]. In section 2, on the other hand, we discuss the case of general 0-form and 1-form symmetry groups (including in particular discrete groups) and explain how to extract the defining data (1.4) from correlation functions of symmetry defects. Many of the general phenomena that are possible with standard global symmetries can also occur for 2-group symmetry. For instance 2-group global symmetry can be spontaneously broken, or alternatively, 2-group global symmetry can be emergent and appear after an RG flow. Examples in the case of continuous 2-group symmetry are discussed in [16]. Here we describe various examples illustrating aspects of these phenomena in section 6 below. As we also discuss, discrete 2-group global symmetries can have non-trivial 't Hooft anomalies.

2-group background fields
A basic way to probe global symmetry in quantum field theory is to couple to background gauge fields. A 0-form symmetry can be coupled to standard 1-form gauge fields. A 1-form symmetry can be coupled to 2-form gauge fields -also called Abelian gerbes. (When the 1-form symmetry is U(1), they are also called Deligne-Beilinson 2-cocycles, see e.g. [18,19].) This concept is familiar in supergravity and string theory, in the U(1) case: a 2-form potential (such as the NS 2-form) is a U(1) gerbe.
The behavior of the theory in the presence of background fields encodes the correlation functions of the symmetry defects discussed above. Indeed, a codimension-1 0-form symmetry defect can be viewed as a transition function connecting two locally trivial patches in a principal G-bundle. Similarly, codimension-2 1-form symmetry defects define transition functions for an A-gerbe.
For theories with 2-group global symmetry the appropriate background fields are connections forming a 2-group gauge theory [6,8]. These are a 1-form gauge field for G, a 2-form gauge field for A, as well as a rule for gauge transformations controlled by ρ and [β]. The defect junction illustrated in figure 4 has a sharp meaning in this language: at codimension-3 intersections of 0-form symmetry defects, there is a flux for A described by the Postnikov class [β]. In particular, this means that when the theory is coupled to G gauge fields, a non-trivial 1-form background for A is sourced.
Although 2-group symmetry and background gauge fields may sound exotic, there is an important special case where they are familiar from supergravity and string theory. Suppose that both G and A are U(1) and ρ is trivial (i.e. there is no action of G on A). In this case a Green-Schwarz mechanism [20] for the associated background fields can naturally be interpreted as saying that the two symmetries are combined into a non-trivial 2-group. This relationship between 2-group global symmetry and the Green-Schwarz mechanism was first observed in [8], and this continuous example has been studied in detail from the point of view of 2-group global symmetry in [16].
In more detail, if G and A are U(1) there are 1-form and 2-form conserved currents j (1) and j (2) , and at the linearized level these couple to a 1-form gauge field A (1) and 2-form JHEP03(2019)118 gauge field B (2) via terms in the action of the form (2) . (1.5) The action is invariant under gauge transformations controlled by a local function λ (0) and 1-form Λ (1) as well as an integer κ: When κ vanishes these gauge transformations are standard, while if κ = 0 this theory has continuous 2-group global symmetry. In particular in this case the cohomology group controlling the Postnikov class is H 3 BU(1), U(1) ∼ = Z and the integer κ can be identified with the class [β]. As is standard with the Green-Schwarz mechanism, the modified gauge transformations for B (2) implies that the gauge invariant field strength 3-form and moreover implies a modified Bianchi identity for H (3) . As described in [16], gapless QFTs with continuous 2-group global symmetry are typically IR free. (For instance, the 2-form current * j (2) could be the field strength of an Abelian gauge field [1].) In this paper we instead focus on the case where the 1-form global symmetry is a finite group. As we illustrate in the examples below, in this case 2-group global symmetry is compatible with a variety of dynamics ranging from topological theories to gapless interacting systems.
When the global symmetry is discrete the natural background fields are flat connections, and the associated bundles are described by nets of symmetry defects. In this case, the analog of (1.7) is obtained by setting the field strength H (3) to zero and viewing all gauge fields as discrete: In this equation, A (1) is the (possibly non-Abelian) background field for the 0-form symmetry G. If G is finite, A (1) defines a standard flat connection on a principal G-bundle. By contrast, B (2) , the background gauge field for the 1-form symmetry is not flat, but rather has a fixed differential related to the Postnikov class [β]. More precisely, we view A (1) as a homotopy class of maps from spacetime to BG -the classifying (or Eilenberg-Mac Lane [21]) space of G -and d A (1) is a twisted differential. The right-hand side is the pullback of a representative β of the class [β] ∈ H 3 ρ (BG, A), and hence gives an appropriate 3-cochain on spacetime with values in A. We elaborate on this formalism in section 2, and also describe how the Postnikov class [β] affects the gauge transformations of B (2) .

2-group global symmetry vs. "operator-valued anomalies"
Although aspects of 2-group global symmetry have been described previously, it is sometimes conflated with an anomaly (e.g. it is referred to as an "obstruction to symmetry fractionalization" in the condensed matter literature [22]). The origin of this confusion JHEP03(2019)118 can be understood from figure 3. There, a junction of 0-form G-defects is deformed, and this process may be understood as describing a gauge transformation for a background flat G-bundle. When the H 3 class [β] is non-trivial, this process creates a 1-form symmetry defect. 2 Thus, a gauge transformation of the 0-form background fields modifies the partition function by the insertion of a 1-form symmetry defect, which is a non-trivial operator in the theory. This gauge non-invariance of the partition function is superficially similar to phenomena usually referred to as 't Hooft anomalies, where gauge transformations of background fields modify the partition function by c-number phases. However there are important differences. For instance, a standard c-number 't Hooft anomaly can be cancelled by inflow from a non-dynamical bulk, while in the case of the "operator-valued anomaly" described above such a bulk would necessarily be dynamical.
This can also be seen directly in the example of continuous 2-group symmetry (with G ∼ = A ∼ = U(1)) discussed in [16]. Invariance of the partition function under the 2-group gauge transformations in (1.6) implies that the 1-form current obeys When the background A (1) vanishes the current is conserved, but when the background is activated the right-hand side is a non-trivial operator.
In fact, it is incorrect to view the phenomena described in figure 3 or its continuous analog (1.9) as an anomaly. Instead, the appearance of the 1-form symmetry defect encodes the non-anomalous Ward identity for 2-group global symmetry. In particular, the correlation functions are in fact invariant under 2-group gauge transformations. More generally in QFT, there are no "operator-valued anomalies" as we can always add to the partition function a background source for the operator in question and adjust the transformation rules of the source to cancel the hypothetical anomaly by a generalization of the Green-Schwarz mechanism.
Although 2-group global symmetry does not in and of itself constitute an anomaly, examples of theories with 2-group global symmetry can be produced by starting with theories with certain mixed anomalies and gauging global symmetries. For instance, the non-conservation equation (1.9) can occur in Abelian gauge theories where * j (2) is the field strength of a dynamical gauge field [16]. A discrete analog of this construction was recently described in [14]: starting from theories with only 0-form symmetries and appropriate mixed 't Hooft anomalies, one can construct theories with 2-group global symmetry by gauging. We briefly review this construction in section 6 where we use it to construct concrete examples of interacting theories with 2-group global symmetry.

2-group 't Hooft anomalies
One reason why it is essential to distinguish 2-group global symmetry from an anomaly is that 2-group Ward identities may themselves be violated by standard c-number 't Hooft anomalies. Such anomalies are most simply formulated by studying the theory in the JHEP03(2019)118 presence of background 2-group gauge fields. An 't Hooft anomaly then means that the partition function is not exactly invariant under gauge transformations of the background fields, but rather transforms by a local functional of the background fields. As usual, we are only interested in anomalies that cannot be removed by adjusting local counterterms, and thus classifying anomalies reduces to a cohomological problem.
A useful way to characterize the possible anomalies is via inflow [23]. In d dimensions the anomaly is determined by a local bulk action in d+1 dimensions, which is both gauge invariant and topological. This means in particular that as the d-dimensional system undergoes RG flow, the bulk remains inert and hence illustrates that the anomaly is scale invariant. 3 These 't Hooft anomalies are therefore robust observables of a QFT that can be used to constrain dynamics.
In the case of 2-group global symmetry, the anomaly is thus characterized in terms of topological 2-group gauge theories. For the case of continuous 2-groups, the anomalies have been studied in [16]. In the general case of discrete 2-groups, the appropriate topological actions have been described in [8] generalizing the analysis of anomalies for discrete 0form symmetries discussed in [19,25]. In section 3 we apply these results and give a concrete description of 2-group 't Hooft anomalies for QFTs in 1,2,3 and 4 spacetime dimensions. Throughout, we focus on anomalies that do not involve intricacies of the spacetime manifold. Thus, we neglect possible gravitational or mixed 2-group-gravitational anomalies and consider only bosonic theories. 4 Intuitively speaking, an 't Hooft anomaly for a 2-group consists of an anomaly for the 0-form symmetry G, an anomaly for the 1-form symmetry A together with possible mixed G-A anomalies. However, the 2-group gauge transformations mix the background fields and hence both the possible anomalous variations of the action, and the possible local counterterms must be reclassified.
One simple consequence of this is that the anomaly involving only G background fields is truncated. In d spacetime dimensions, one generally expects an anomaly for 0-form symmetry to be specified by a group cohomology class ω ∈ H d+1 (BG, R/Z). However, the 2-group gauge transformations permit the existence of new counterterms, which reduce the possible values of the 0-form anomaly to the quotient group JHEP03(2019)118

Summary of applications and explicit examples
In sections 5 and 6, we study a variety of examples of theories with 2-group global symmetry. We mainly focus on theories in three spacetime dimensions.
We first describe how the correlation functions of a general 3d TQFT can be used to fix the data of a 2-group, the global symmetry of the TQFT, and an associated 2-group 't Hooft anomaly. The relationship between 2-groups and 3d TQFTs has been previously noted in [11,14] and our work provides a complete and explicit dictionary. In particular the phenomenon sometimes referred to as an "obstruction to symmetry fractionalization" (see e.g. [22]) is really an instance of 2-group global symmetry.
We use the formalism of [22] (see also [29,30] for other treatments and [31] for examples) to describe the appropriate G-graded modular tensor category characterizing a TQFT with global symmetry. This framework generalizes the axioms of [32] to include global symmetries and parallels the results for two-dimensional TQFTs in [33]. We mainly focus on the case of bosonic TQFTs that do not require a spin structure.
Finally, we explore a variety of explicit Chern-Simons-matter theories, and show that simple elementary examples often have 2-group global symmetry. For instance, one concrete example is U(1) q Chern-Simons theory coupled to N f scalars of charge q (recently discussed in [34]). This theory has the global symmetry groups The permutation ρ is trivial, and where in the above w ( ) 2 is a Stiefel-Whitney class (characterizing an obstruction to lifting the G-bundle to a U(N f ) bundle), and Bock is a Bockstein homomorphism (see appendix B). This symmetry and its anomaly are preserved under renormalization group flow.
While most of our examples involve unitary symmetries, much of the formalism can be generalized to include 2-groups where the 0-form symmetry is time-reversal. We give several explicit examples of such theories in section 6.5. Along the way, we also present new examples of Chern-Simons theories with time-reversal symmetry.
We discuss some aspects of RG flows of theories with 2-group global symmetry in section 4. In particular, it often happens that a theory with global symmetry G flows at long distances to a theory with global symmetry K. The 2-group K can be larger or smaller (both in its 0-form and 1-form global symmetry) than G because some symmetry in the IR can be accidental and some UV symmetry can decouple if all charged objects are massive. In addition, the 2-groups G and K can have different Postnikov class. However, since the UV theory can couple to G background fields, the IR theory can also couple to such fields. We describe a general method for this coupling using homomorphisms of 2-groups, 5 and discuss some general implications for emergent symmetry. We apply this technique to some explicit relevant deformations of QFTs in section 6.

JHEP03(2019)118
In the context of three-dimensional TQFTs with global symmetry, our results imply that much of the formalism of [22], or its mathematical counterparts [29,30] describing Ggraded modular tensor categories can be more simply understood in terms of the intrinsic symmetry of the TQFT. 6 This is the 2-group whose 0-form part is the automorphism group of the category and whose 1-form part is the subset of Abelian anyons. Coupling to more general symmetry groups then proceeds by activating these intrinsic symmetries using the formalism of section 4.

Symmetry defects
It is convenient to organize the symmetries of a QFT into n-form symmetries [1]. Let us review this classification in Euclidean signature in d dimensions. Throughout, we assume that spacetime is orientable.
A 0-form symmetry with group G (that can be discrete or continuous, Abelian or non-Abelian) is realized by unitary operators U g , with g ∈ G, supported along codimension-1 submanifolds X d−1 . We refer to such operators as symmetry defects. If G is continuous, the component of G connected to the identity is realized by where the 1-forms J c are the conserved currents, Q c are the conserved charges, c is an index in the Lie algebra g and α ∈ g * is a parameter. For discrete groups there are no currents, and the symmetry is defined through the operators U g . The operators U g are topological, in the sense that correlation functions that include them are invariant as we deform X d−1 in a continuous way, as long as we do not cross other operators. In the case of continuous symmetry this is a consequence of charge conservation, but for more general symmetry groups the topological nature of the U g is part of what we mean when we say that they define a symmetry of a field theory. The objects that are charged under 0-form symmetries are the local operators O(x). 7 Specifically, if X d−1 surrounds O(x) (and nothing else) then it acts on O(x) via a representation We can turn on a background for G, i.e. we can couple the theory to a G-bundle. We will mainly focus on the case of finite G, then G-bundles are necessarily flat. To describe flat bundles on an Euclidean spacetime manifold M d , we cover M d with open contractible patches V i in such a way that all possible multiple intersections are either empty 6 We thank Nathan Seiberg for illuminating conversations regarding this issue. 7 Here we consider operators that are genuinely local [1,35]. In general there also exist operators that live at the end of lines. The correlators of such operators may pick up a phase when the attached line crosses Ug. As a result, the charges of such "quasi-local" operators are ambiguous and not well-defined in terms of the quasi-local operators only.

JHEP03(2019)118
or contractible. We choose an arbitrary ordering of the patches, and indicate intersections as and so on, always using ordered indices. Then we specify transition functions A ij ∈ G on V ij satisfying for ordered {ijk}. It is convenient to represent the patches and their intersections in terms of simplices (see also appendix A). We choose a triangulation of M d , which is dual to the open cover. Thus, the vertices, or 0-simplices, of the triangulation correspond to the open patches V i . The edges, or 1-simplices, correspond to the intersections V ij . The edges can be given an orientation, from the vertex with lower label to the one with higher label. Simplices of higher dimension correspond to multiple intersections. The operators U g can be constructed by turning on suitable G-bundles in which the transition functions are equal to g across the submanifold X d−1 and to 1 otherwise. More precisely, in the simplicial formulation the surface X d−1 cuts a number of edges {ij} and we assign A ij = g if the edge crosses the surface with positive orientation, or A ij = g −1 if with negative orientation. Since in each triangle (2-simplex) either none or two edges cross X d−1 , the cocycle condition (2.3) is satisfied. 8 It is easy to see that this bundle realizes the operator U g . Suppose that X d−1 is a surface wrapping a local operator O, which we can imagine be located at one of the vertices of the triangulation. Then we can remove U g by performing a gauge transformation The operator O is mapped to g O, therefore correlation functions satisfy (2.2). Conversely, any flat G-bundle can be described by a net of operators U g . The partition function could be invariant under deformations of the net that describe the same G-bundle, or might change by a phase. In the latter case the theory has an 't Hooft anomaly. A 1-form symmetry with group A is realized by unitary operators W a , with a ∈ A, supported along codimension-2 submanifolds Y d−2 . As there is no covariant ordering of these submanifolds, A is necessarily Abelian. As above, the operators W a are topological. The objects that are charged under 1-form symmetries are the line operators L( ), supported along lines : if Y d−2 links once with L( ) then W a L( ) . . . = e 2πiθ(a) L( ) . . . (2.5) where θ ∈ A is the charge of L and A = Hom(A, R/Z) is the Pontryagin dual to A. We can turn on a background for A, namely an Abelian gerbe with fiber A. We assign elements B ijk ∈ A to triple intersections U ijk , such that they satisfy the cocycle condition Precisely, we can assume that either none or two edges are crossed after suitably refining the open cover.

JHEP03(2019)118
for ordered {ijkl}. Thus B is a cocycle in Z 2 (M d , A). Since A is Abelian, we have used the additive notation for it (as opposed to the multiplicative notation for G).
We can use backgrounds for A to construct the operators W a : we take the transition functions to be equal to a on triple intersections along Y d−2 and equal to 0 otherwise. In the simplicial formulation, Y d−2 pierces a number of triangles (2-simplices) {ijk}, and we assign B ijk = a if the defect pierces the triangle with positive orientation or B ijk = −a if with negative orientation. Since for each tetrahedron (3-simplex) the defect must enter across one face and exit across another, the cocycle condition (2.6) is satisfied. (See footnote 8.) Now suppose that the operator W a is supported on a surface Y d−2 winding around a line operator L( ) with charge θ, that lies along some edges of the triangulation. We can remove W a by performing a 1-form gauge transformation B ijk → B ijk + γ jk − γ ik + γ ij on V ijk for ordered vertices, in other words (2.7) To define γ, we first draw a codimension-1 surface Σ whose boundary is W a , then we set γ ij = a if the edge {ij} crosses Σ with positive orientation or γ ij = −a if with negative orientation. Since Σ also cuts an edge along L( ), correlation functions pick up a phase e 2πiθ(a) corresponding to the one-dimensional representation under A. This is precisely the action of W a .

Elements of 2-group symmetry
The previous discussion describes the notion of symmetry defects and background fields appropriate for a theory with global symmetry which is a standard product between a 0-form symmetry group G and a 1-form symmetry group A. In this section we describe how these ideas must be modified if G and A are fused into a non-trivial 2-group. The first generalization away from a product symmetry is as follows. When we have both a 0-form symmetry G and a 1-form symmetry A, G can act on A. This is described by a group homomorphism ρ : G → Aut(A) . (2.8) In particular, the action of G can permute the one-dimensional representations of A. When a symmetry operator of type a ∈ A crosses U g , on the other side it appears as an operator of type ρ g a (figure 2), while when a line operator L( ) with charge θ crosses U g , on the other side it appears as a line operator with charge ρ g θ ≡ θ • ρ −1 g . This guarantees that θ, a ≡ θ(a) is invariant.
If the permutation ρ is the only modification of the global symmetry, then the appropriate background fields are a flat G-bundle and A-gerbe, where the latter now satisfies a twisted cocycle condition involving ρ: a group homomorphismρ from G to the permutation group S n , and the unitary irreducible representations of A form a (possibly reducible) representation ofρ(G) ⊆ S n . In addition to the permutation ρ, there is another way in which a 0-form symmetry and a 1-form symmetry can mix. This is via a Postnikov class [β]. The meaning of [β] is simply stated in the language of symmetry generators. Consider a flat G-bundle described by a net of operators U g that includes, in some region, a junction between U g , U h , U k into U ghk , as in figure 3 left. We consider a local transformation of the net, to the configuration in figure 3 right, that represents the same bundle and corresponds to a gauge transformation. Then the correlation functions are invariant only if we include the codimension-2 symmetry operator of type β(g, h, k), parallel to the junction.
In d ≥ 3 dimensions, we can construct a background configuration that is a bordism between the left and right configurations in figure 3: the result is represented in figure 4 (in the case d = 3, while in higher dimensions all objects span the remaining d−3 dimensions). The codimension-3 locus where four operators of type g, h, k, ghk meet, acts as a source for a symmetry operator of type β(g, h, k) ∈ A. Here β is "normalized" such that β(g, h, k) = 0 if at least one of the entries is 1 and β satisfies a twisted cocycle condition, which for finite G reads This condition follows from the equality in figure 6, where the configuration of symmetry defects on the left is continuously deformed into the one on the right (this is a bordism implementation of the pentagon identity of [36]): since the fusion of 1-form symmetry defects must be the same on the two sides, the cocycle condition for β follows. Moreover, as we will see below, the theory depends only on the function β up to the equivalence relation β ∼ β + d ρ α with α : G × G → A. Thus the invariant data is the equivalence class [β], an element of the third group-cohomology group of G with values in A, twisted by ρ: where BG is the classifying space of G. This cohomological characterization of [β] also applies to continuous G and A provided we use the sheaf cohomology of the classifying space [37,38] (see appendix A.1). The Postnikov class modifies the appropriate notion of background fields as follows. The theory may still be coupled to a standard G-connection. However the appropriate background field B for A is no longer closed but rather has its coboundary fixed by β as (d A B) ijkl = β(A ij , A jk , A kl ). We can also write this concisely by viewing the connection A as a map from spacetime to the classifying space BG. Then expressing that the G-bundle acts as a source for B. Note that the left-hand side above is necessarily closed. Thus we see that the fact that β is closed ensures that this equation is consistent.

JHEP03(2019)118
As we explain in more detail in the following section, the Postnikov class [β] also affects the gauge transformations in such a way as to make B transform under A gauge transformations. As discussed in [8] this is a discrete analog of the Green-Schwarz mechanism. In total, the global symmetry of the theory is described by the quadruplet This data is intrinsic to the QFT: it describes its global symmetry and the action on gauge-invariant operators, and constitutes the definition of a 2-group. It is instructive to compare the implications of a non-trivial Postnikov class described above to phenomena that are typically described as anomalies. One point of view on the above discussion is that [β] represents an obstruction to coupling the QFT simultaneously to a G-bundle and an A-gerbe. Indeed, we see from figure 3 that the partition function with flat G-bundle is ambiguous up to operators that generate A. For this reason, this phenomenon has sometimes be termed the "H 3 anomaly" or "obstruction to symmetry fractionalization" in the literature (see e.g. [22,30,31,39]).
Ambiguity up to a phase is a standard 't Hooft anomaly. It can be parameterized using anomaly inflow in terms of a non-dynamical (d+1)-dimensional theory (also called an invertible theory), which depends on the background fields. By contrast, the phenomena described by the Postnikov class cannot be described in terms of a non-dynamical (d + 1)-dimensional theory. Instead, the bulk would necessarily be dynamical to account for the fact that β(g, h, k) is a non-trivial operator in the theory. This is a radical and undesirable modification of our theory which began as d-dimensional. Instead, the correct interpretation is to modify the background fields to a 2-connection where β is simply a parameter defining the symmetry on par with, say, the structure constants in a non-Abelian Lie algebra.

2-group bundles and F -moves
Let us describe 2-group bundles in the simplicial formulation, following [8]. The transition functions A ij form a G-bundle: for each 2-simplex with ordered vertices i < j < k we have 14) The background field B ∈ C 2 (M d , A) is an A-valued 2-cochain on M d satisfying the twisted cocycle constraint (2.16) The modified cocycle condition (2.16) depends on the representative β of the class [β]. If we change the representative β → β = β + d ρ α for some 2-cochain α, we can simultaneously redefine B → B = B + A * α. Then (2.16) is satisfied by the redefined quantities. This follows from the fact that d A A * = A * d ρ (as long as the cocycle condition (2.14) is satisfied). A field redefinition of background fields implies a modification of the theory by local counterterms. Therefore, only the equivalence class [β] is meaningful.
There are two types of gauge transformations. The first is given by a 0-cochain f in G. This means that to each vertex (0-simplex) we associate for each 1-simplex {ij} with i < j. The cocycle condition (2.14) remains invariant. These are the standard gauge transformations for a G-connection. The above is also accompanied by a transformation of the 2-cochain B: and that vanishes when the transformation is trivial (f = 1). This definition guarantees that B f satisfies the transformed version of the modified cocycle condition (2.16). (To show this, one uses the identity The second type of gauge transformations are those that are standard given a background B field. They are defined by an A-valued 1-cochain γ. The 1-cocycle A remains invariant, while B transforms as (2.20) The cocycle condition (2.16) remains invariant. Let us comment on the gauge transformations above.
• Notice that equation (  • The definition of the gauge transformation (2.19) requires us to pick a ζ. This choice is ambiguous. However the ambiguity can be absorbed by a gauge transformation of the form (2.20).
• Observe that ζ is related by descent to the Postnikov class β. Therefore, as remarked in [8], (2.19) should be viewed as a discrete version of the Green-Schwarz mechanism.
We conclude our discussion of 2-group background fields by demonstrating that the modified cocycle condition (2.16) is equivalent to the statement that the junction point of four codimension-1 symmetry defects g, h, k, ghk is the source of a codimension-2 symmetry defect β(g, h, k) as depicted in figure 4. To that purpose, consider the local triangulation in figure 5 with ordered vertices {i, j, k, l, m, n} (in d dimensions, the remaining d − 3 dimensions are implicit). The bundle that describes the configuration of codimension-1 defects in figure 4 is which satisfies the cocycle condition (2.14). There are four 3-simplices in the triangulation, {ijkl}, {jklm}, {klmn}, {ikln}, and (2.16) gives one equation for each of them. Imposing (with some arbitrariness) that the only external face (2-simplex) on which B could possibly be non-zero is {iln}, we obtain the following equations:

JHEP03(2019)118
Combining them and using that β is a (twisted) cocycle, we determine We see that B cannot vanish on all external faces: rather the codimension-2 symmetry defect β(g, h, k), which pierces the face {iln} is sourced. Since the configuration in figure 4 is a bordism between the two configurations in figure 3, essentially the same computation shows that the modified gauge transformation (2.18)-(2.19) is equivalent to the F -move in figure 3.

't Hooft anomalies
In this section we discuss the classification of 't Hooft anomalies in theories with 2-group global symmetry. In the special case of continuous 2-group global symmetry anomalies have been analyzed in [16]. Here, we consider the general case. As we have described above, a theory with 2-group global symmetry can couple to background fields A and B that describe a connection on a 2-group bundle. These gauge fields are redundant and can be changed by the gauge transformations (2.17), (2.18), (2.20). Naively, all correlation functions, thought of as functions of A and B, must be invariant under these background gauge transformations. An 't Hooft anomaly for a theory with 2-group global symmetry is a mild violation of this invariance. Specifically, we allow the (unnormalized) correlators to change by a phase when we change gauge. This phase is universal in that all correlation functions are modified by the same phase. If a theory exhibits gauge non-invariance, it is natural to attempt to modify the definition of the theory by adjusting gauge non-invariant counterterms (i.e. local functions of the background fields) to restore gauge invariance. The 't Hooft anomalies of interest are those that cannot be removed by adjusting such local terms, and hence they admit a cohomological classification.
A useful way to classify anomalies is via inflow. In this paradigm the 't Hooft anomalies of a d-dimensional QFT are described by a (d+1)-dimensional topological action depending on the background fields. (In the condensed matter literature these are referred to as SPTs, while in the mathematics literature they are invertible field theories.) When formulated on a closed (d + 1)-manifold X the action is gauge invariant, but on a manifold with boundary its variation is precisely the 't Hooft anomaly of the boundary d-dimensional field theory of interest.
For our problem we are thus led to study topological actions for connections on a 2group G, A, ρ, [β] . Throughout, we restrict our discussion to anomalies of bosonic theories (i.e. we do not require a spin structure), and we further ignore any gravitational anomalies. Hence our actions depend only on the 2-group background fields, and not say, on Stiefel-Whitney classes of the manifold. This class of topological actions has been investigated in detail in [8] and our analysis below closely follows their treatment. We consider the case of one, two, three and four-dimensional QFTs separately, and describe in explicit terms how the anomaly manifests itself both in the inflow presentation, and via rearrangement rules for symmetry defects.

JHEP03(2019)118
Topological actions take the generic form S anom = 2π X χ and appear in the pathintegral as e iSanom , where X is a closed (d + 1)-manifold and χ is a (d + 1)-cochain with values in R/Z constructed out of the background fields A and B. On a closed (d + 1)manifold X, χ is automatically closed, χ ∈ Z d+1 (X, R/Z), and its integral depends only on the cohomology class [χ] ∈ H d+1 (X, R/Z).
To ensure that χ defines a satisfactory action, we must impose a further constraint: we view χ as a (d + 1)-cochain on a (d + 2)-manifold, and demand that the non-trivial equation dχ = 0 is satisfied. This serves two purposes: • It ensures that the action does not depend on the choice of triangulation used to present the 2-connection. Indeed, one can modify the triangulation either by changing the simplicial structure at fixed vertices, or by adding or removing a vertex in the middle of a simplex of maximal dimension. These "moves" can be combined, and any two triangulations can be connected by a series of moves. 9 A change of triangulation can be made into a cobordism. This is a (d + 2)-dimensional triangulated manifold with boundary two copies of X with different triangulations. Thus, demanding that dχ vanishes on (d + 2)-manifolds means that X χ does not depend on the triangulation.
• It ensures that the action is gauge invariant under the appropriate 2-group gauge transformations. To see this, observe that gauge transformations can be performed locally on a finite number of vertices. By modifying the triangulation we can remove those vertices where the gauge transformation is non-trivial. Since we have concluded that the action is independent of the triangulation, it follows that it is also gauge invariant.
When the topological action is a sum, S anom = 2π X χ with χ = χ 1 +χ 2 +. . . , we must demand that the sum satisfies dχ = 0, while each term in the sum may not be closed. This generalizes the discussion in [8] and gives a slightly different classification of topological actions. We give explicit examples of anomalies of various theories in section 6.
We now turn to an explicit construction of these actions.

Anomalies in 1d
To set our notation, we start with the simple case of a one-dimensional theory. This means that we are studying the partition function of a quantum mechanics model on a circle. We can insert unitary operators g ∈ G, that correspond to gauge transformations for the background gauge field. By inserting a sequence g, h, k, . . . we section the circle into segments, each one in a different gauge, and the ordered product of elements determines the holonomy around the circle. These transition functions define a non-trivial (necessarily flat) background G-bundle.

JHEP03(2019)118
The 't Hooft anomaly shows up as the fact that correlators pick up a phase when we fuse two symmetry generators g, h into one: Graphically this is represented as Here ω ∈ C 2 (BG, R/Z) is a normalized 2-cochain, and we indicate U(1) as R/Z in order to adhere to the additive notation. Associativity implies in R/Z, therefore ω is closed. The presence of the phases e 2πiω implies a lack of gauge invariance of the partition function under gauge transformations of the background. We can modify the anomaly by adding the local counterterm which is not gauge invariant unless dν = 0. Its effect is to assign an extra phase e 2πiν(g) to each insertion of g, which shifts ω → ω + dν by an exact term. Therefore the anomaly is parameterized by the cohomology class [ω] ∈ H 2 (BG, R/Z). When [ω] = 0, we can add a local counterterm to the action to make it gauge invariant. 10 Notice that H 2 (BG, R/Z) parameterizes projective representations of G. In fact we can interpret the anomaly ω as the fact that the Hilbert space is in a projective, as opposed to regular, representation of G as is manifest from (3.1).
2d actions and anomaly inflow. The 't Hooft anomaly discussed above is described by the following two-dimensional topological action for G gauge fields: It is easy to check that the action (3.5) reproduces the anomaly when X is a twodimensional surface with one-dimensional boundary. Take a triangle {ijk} whose clockwise ordered vertices lie on the boundary. To realize insertions g, h on the boundary, we take In 1d there cannot be a 1-form symmetry since its generators should have codimension two, and therefore there cannot be a 2-group symmetry either. However, if the 1d system is JHEP03(2019)118 a defect into a higher-dimensional theory and the latter has a 2-group global symmetry, this can affect the anomalies on the 1d defect worldline. (An example is discussed in section 5.) In fact, we can write the following action for a two-dimensional 2-group gauge theory: The first two conditions say that η is a G-invariant homomorphism from A to R/Z, 11 Notice that when η = 0, the 0-form anomaly ω is no longer closed and the fusion of symmetry generators in 1d is no longer associative. 12 In this case the anomaly forms an H 2 (BG, R/Z) torsor (that we also call an affine cohomology class): the differential of ω is not zero but it is fixed, and ω's that differ by a coboundary represent the same anomaly.
One difference with standard cohomology classes is that there is no natural zero. We will see a concrete example of this in section 3.3.

Anomalies in 2d
In two dimensions the symmetry defects of the 0-form symmetry are unitary line operators of type g ∈ G while the defects of the 1-form symmetry are unitary local operators of type a ∈ A. Here, the 0-form symmetry action on local operators restricts to give the action ρ on the 1-form symmetry generators. Thus, when a local operator of type a is moved across a line g (in the direction fixed by the orientation), it gets transformed to ρ −1 g a ∈ A. The F -move is a continuous transformation of the junction of four line operators g, h, k, ghk (figure 3) and the 2-group structure is encoded in the appearance of a local operator of type β(g, h, k). Note that in two dimensions the 2-group condition d A B = A * β is trivial since there are no 3-simplices. Nevertheless one can still detect the Postnikov class using a gauge transformation as in figure 3.
There are two types of anomalies. First, when a local operator of type a is moved across a line of type g, it also acquires a phase exp 2πiλ a (g) . We can interpret λ as an element of C 1 (BG, A). If we consider a junction as in figure 1 of g, h and gh, we can move a through the 0-form defects in two ways. Demanding equality gives λ a (g)+λ

JHEP03(2019)118
Second, the F -move involves a phase exp 2πi ω(g, h, k) ∈ C 3 (BG, R/Z): . (3.10) If we consider the junction of five generators g, h, k, l, ghkl, according to the pentagon identity [32] we can deform by applying (3.10) either two or three times and reach the same configuration. Associativity gives two relations: (3.11) The first equation above comes from matching the local operator that is generated, while the second constraint arises from matching the phases. These are the cocycle conditions We recognize the constraint d ρ β = 0 as one of the defining characteristics of a 2-group. Meanwhile, the second condition implies that ω is not closed, but has fixed differential. We can modify the anomaly by adding the following non-gauge-invariant local counterterms: where η ∈ C 0 (BG, A) ∼ = A while ν ∈ C 2 (BG, R/Z). They correspond to assigning extra phases e −2πiη(a) to the local operators and e −2πiν(g,h) to the junctions of line operators. The result is 14) The resulting cohomological content of the anomaly is specified below.
3d actions and anomaly inflow. To encode the 2d anomaly via inflow, we consider the following 3d action: The last condition implies that λ, ∪ β = 0 in H 4 (BG, R/Z). The integrand is closed because

JHEP03(2019)118
We have discussed the local counterterms in (3.13) and their effect on the 3d anomaly action in (3.14). Since we can shift λ by an exact term, the 1-form anomaly is parameterized by After fixing the representative λ, we can still shift ω by an exact term as well as by a term η(β) ≡ η, β for a G-invariant character η of A, i.e. for η ∈ Z 0 ρ (BG, A). Therefore the 0-form anomaly is a torsor over Once again, the 0-form anomaly has no natural zero in general. Moreover, the effect of the Postnikov class [β] is to trivialize part of the 0-form anomaly in H 3 (BG, R/Z). This is because one can reabsorb part of the anomalous phases in (3.10) into a phase redefinition of the local operators β(g, h, k).

Anomalies in 3d
In three dimensions the generators of the 0-form symmetry are codimension-1 surface operators of type g ∈ G while the generators of the 1-form symmetry are line operators of type a ∈ A. In the language of TQFT, the latter are Abelian anyons. When a line operator of type a pierces a surface of type g (in the direction fixed by the orientation), on the other side it emerges as a line of type ρ −1 g a (figure 2). The Postnikov class [β] can be seen in gauge transformations, when the junction of four surfaces g, h, k, ghk is continuously deformed (F -move) and a line of type β(g, h, k) appears as in figure 3. More directly, it can be extracted from fixed configurations: the constraint d A B = A * β means that when four surfaces g, h, k, ghk meet at a single point, a line β(g, h, k) emanates from there as in figure 4. This configuration is a bordism between the two configurations on the left and right of figure 3.
There are three types of 't Hooft anomalies. First, when two line of type a, b are crossed, a phase M ab is generated because of the 1-form anomaly [1,40] Such a phase defines a symmetric bilinear form , q : Since both configurations in (3.19) can be continuously moved across a surface g without producing any extra phase, the bilinear form must be G-invariant. As reviewed in detail in appendix C, the bilinear form follows from a quadratic function q : A → R/Z such that q(a) = q(−a) and

JHEP03(2019)118
Such a function is called a quadratic refinement of , q , and it can be interpreted as the "spin" of the lines, in the sense that a loop of a line a rotating by 360 • produces a phase θ a = e 2πiq(a) : By manipulating a junction of a, b and a + b one obtains indeed M ab = θ a+b /θ a θ b [41], and in particular 13 M aa = θ 2 a . Another equivalent formulation is in terms of a G-invariant group homomorphismq : Second, when a line of type a ∈ A crosses the junction line of three surfaces 14 g, h, gh, a phase exp 2πiλ a (g, h) is generated because of the mixed 1-form/0-form anomaly: This is the constraint d ρ λ = β, q , where the right-hand-side is a function on A whose argument is . Interestingly, we could interpret the line a as the worldline of a massive particle. If we restrict to the subgroup G a ⊂ G that stabilizes a, we can think of G a as the 0-form symmetry of the quantum mechanics of a. Then λ a ∈ C 2 (BG a , R/Z) is its 0-form anomaly. However, as apparent in (3.24), λ a is in general not closed. This is an example where a "bulk" 2-group symmetry induces a quantum mechanical anomaly which is not closed. (See this discussion at the end of section 3.1.) Third, mimicking the pentagon identity, a junction of five surfaces g, h, k, l, ghkl can be modified with the application of either two or three F -moves, leading to the same final configuration. Interpreting those as two different fixed configurations that realize the two cobordisms, the two fixed configurations differ by a phase ω(g, h, k, l) because of the 0-form anomaly. This is depicted in figure 6. Notice that the two emanated lines on the left are equivalent to the three emanated lines on the right because of d ρ β = 0.
One can consider the junction of six surfaces g, h, k, l, m, ghklm, and deform the configuration with successive applications of the anomalous transformation in figure 6. There exists a "hexagon relation" such that the same final configuration can be reached in two different ways, each consisting of three anomalous transformations and some braiding of the emanated lines. Equality of the produced phases gives the equation Here R ∈ R/Z is the phase coming from braiding, constrained to satisfy Steenrod's cup product ∪ 1 is reviewed in appendix A. In general this equation does not fix R completely: in the language of TQFT, this is the freedom in the choice of braiding matrices for fixed monodromy.
We can try to cure the anomaly by adding non-gauge-invariant local counterterms to the action. We will discuss these counterterms below. One corresponds to assigning

JHEP03(2019)118
an extra phase exp 2πiη a (g) to the point where a line a pierces a surface g, with η ∈ C 1 (BG, A). Another one corresponds to assigning an extra phase exp − 2πiν(g, h, k) to the junction point of four surfaces g, h, k, ghk in figure 4, with ν ∈ C 3 (BG, R/Z).
4d actions and anomaly inflow. The 3d anomaly is described by the following 4d topological action: Let us explain the various terms above. As usual, Then PB is the Pontryagin square of B [42] (see appendix C), namely an element of C 4 X, Γ(A) defined modulo coboundaries (with a residual dependence on a choice of "lift" for β), andq ∈ Hom Γ(A), R/Z . This homomorphism is constrained to be G-invariant (in terms of the induced action of G on Γ(A)), which can be phrased as (3.28) Here P 1 β is a higher Pontryagin square: it is an element of C 5 BG, Γ(A) defined modulo coboundaries and satisfying dq( The ambiguity in the addition of exact terms is precisely the residual dependence of PB on the choice of lift of β and, as we will see, can be reabsorbed in ω. Finally λ ∈ C 2 (BG, A) and ω ∈ C 4 (BG, R/Z), with the two further constraints In the first equation, β, q is the element of C 3 (BG, A) obtained by evaluating on A inserted at . The two equations guarantee that the integrand in (3.15) is closed and thus that the action is independent of the triangulation and gauge invariant. The second equation in (3.30) corresponds exactly to (3.25)-(3.26) and R can be identified withq(P 1 β): the ambiguity by coboundaries ofq(P 1 β) is the freedom in R -coming from braidingthat we noticed there.
To the 3d action we can add the following non-gauge-invariant local counterterms: with η ∈ C 1 (BG, A) and ν ∈ C 3 (BG, R/Z). Their effect is to shift Therefore, the 1-form anomaly is directly represented by the bilinear form , q and its quadratic refinement q. The mixed anomaly is a torsor over H 2 ρ (BG, A). After fixing the

JHEP03(2019)118
representative λ, we can still shift ω by an exact term and a term η, ∪β for a closed η.
Hence the 0-form anomaly is a torsor over Again, the Postnikov class [β] partially trivializes the 0-form anomaly.

Anomalies in 4d
In four dimensions the generators of the 0-form symmetry are codimension-1 wall operators of type g ∈ G while the generators of the 1-form symmetry are surface operators of type a ∈ A.
There are three types of 't Hooft anomalies. When a wall g is pulled through the intersection point 15 of two surfaces a, b, a phase exp 2πiθ(a, b; g) is generated. When a surface a is pulled through the intersection line 16 of four walls g, h, k, ghk, a phase exp 2πiλ a (g, h, k) is generated. Finally, there are two configurations in which six walls g 1 , . . . , g 5 , g 1 · · · g 5 meet, and the transformation from one to the other introduces a phase exp 2πiω(g 1 , . . . , g 5 ) . One can try to cure the anomaly by adding local counterterms: an extra phase e 2πi a,b q assigned to the intersection point of two surfaces a, b, a phase e 2πiηa(g,h) assigned to the point where a surface a intersects the intersection surface of three walls g, h, gh, and a phase e 2πiν(g 1 ,...,g 4 ) assigned to the intersection point of five walls g 1 , . . . , g 4 , g 1 · · · g 4 . We will refrain from giving a graphical description of 't Hooft anomalies in 4d, as this is difficult, and use instead the language of anomaly inflow.
The 2-group anomalies are controlled by the following action: Here (3.34) We have used the symmetric bilinear pairing reviewed in appendix C, which is used in the construction of the Pontryagin square. The constraints above guarantee that the integrand in (3.33) is closed. We can add non-gauge-invariant local counterterms:

JHEP03(2019)118
Hereq ∈ Hom Γ(A), R/Z ∼ = C 0 BG, Γ(A) and the first term could be written A * q , PB . Then η ∈ C 2 (BG, A) and ν ∈ C 4 (BG, R/Z). The effect of these terms is to shift (3.37) Notice that , q is no longer a G-invariant pairing, unless d ρq = 0. This is clearer if we write , q = q, , γ . Therefore the anomaly parameterized by θ can be viewed as a cohomology class [θ] ∈ H 1 ρ BG, Γ(A) . The anomaly parameterized by λ is a torsor over and the anomaly parameterized by ω is a torsor over The two quotients above represent the fact that the Postnikov class [β] partially trivializes the mixed 1-form/0-form anomaly described by λ and the 0-form anomaly described by ω.

Coupling to general symmetry groups
In previous sections we have discussed the meaning of 2-group global symmetry, background fields, and 't Hooft anomalies. As we have stressed, 2-group global symmetry is intrinsic to a QFT. An important caveat in this discussion is that the symmetry that we are interested in acts faithfully on the operators of the theory. By this we mean that all non-trivial elements of the intrinsic 0-form symmetry K act on or permute some local or extended operator, and similarly all non-trivial elements of the intrinsic 1-form symmetry A act on some line operators by non-trivial phases. (The specific case of 3d TQFTs described by modular tensor categories is discussed in section 5.) It is often the case that, even if a given QFT has some intrinsic 2-group symmetry , we may be interested in coupling to background fields for a different "extrinsic" 2-group G = G, B, τ, [Θ] . One situation where this arises is in the study of renormalization group flows. For instance, suppose that a UV QFT has 2-group global symmetry G. We assume it to be intrinsic so that it acts faithfully on operators in the UV theory. It is then natural to couple the theory to background G gauge fields. In the IR we may then arrive at a theory with a different intrinsic symmetry K. This symmetry could be larger than G, because some of the symmetry is accidental in the IR, or it could be smaller because all of the charged objects are massive and have decoupled from the IR field theory (or the flow breaks part of the symmetry). However, the entire RG flow -and in particular the IR theory -can be coupled to G gauge fields. This is achieved through a homomorphism G → K. In other words, the most general situation in the IR is governed by the coupling to K gauge fields, but we can also couple to G by using G-backgrounds to activate intrinsic K-backgrounds (in the case

JHEP03(2019)118
of the toric code theory, this idea was explored in [13]). In this section we describe this process in detail. In particular, this discussion is essential to understand 't Hooft anomaly matching. Specifically, if the UV theory has some 't Hooft anomaly for G, in general it is reproduced in the IR by activating K-anomalies.
In the simplest case where the 1-form symmetries A and B are trivial, the process that we describe below is simply a homomorphism of groups f 1 : G → K that can be used to turn G gauge fields A into K gauge fields f 1 (A). It becomes more interesting when the 1-form symmetries are non-trivial. In that situation we can, for instance, use ordinary G background fields to activate A background fields. A continuous example is illuminating. Suppose that both A and G are U(1). Then A can couple to a background 2-form field B, and G to a 1-form connection A. We can therefore couple a theory with A symmetry to a G-background by setting where α ∈ R/Z is a coupling constant, and B has the standard 1-form gauge transformation B → B + dλ with U(1) gauge field λ (integer shifts of α are gauge transformations of B). The formalism discussed in this section generalizes this idea both by allowing the symmetries to form a non-trivial 2-group, and by considering the case of discrete symmetries as well. 17 As above, we consider a theory with intrinsic 2-group symmetry K = K, A, ρ, [β] , where K is the 0-form symmetry, A is the total 1-form symmetry, ρ : K → Aut(A) is a group action of K on A, and [β] ∈ H 3 ρ (BK, A) is the Postnikov class. We denote the background fields for (K, A) by a pair (B 1 , B 2 ). We wish to couple the theory to background fields (X 1 , X 2 ) for an extrinsic 2-group G = G, B, τ, The first step is to choose group homomorphism from G, B to K, A We will use these homomorphisms, together with other data specified below, to construct background fields.
A special case. Before tackling the most general situation, let us assume that f 1 is the trivial map while f 2 is an (injective) inclusion. We describe a mechanism to couple to a 2-group bundle for G using only the intrinsic 1-form symmetry A. Since f 2 is an inclusion, is a short exact sequence. Here p is the projection map mod B. We have also indicated a lift of A , i.e. an arbitrarily chosen map π : A → A such that p • π = id A . In general, A is an extension of A by B.

JHEP03(2019)118
We can use the short exact sequence (4.3) to construct 2-cocycles for A, that we use as background fields for the 1-form symmetry, in terms of cochains for B and A that satisfy certain conditions. First we need a 2-cocycle for A , namely B 2 ∈ Z 2 (M, A ), such that Here Bock : is the Bockstein homomorphism (appendix B) for the exact sequence (4.3). Second we need a 2-cochain for B, namely X 2 ∈ C 2 (M, B), such that This equation depends on the particular choice of π we made. Notice that f −1 2 • d • π, when acting on cocycles, produces a representative of the Bockstein cohomology class, and thus (4.5) implies the second eq. in (4.4). Then one constructs the 2-cocycle for A as where B 2 ∈ Z 2 (M, A). Note also that this describes the most general B 2 , as we can extract the two components via B 2 = −p(B 2 ) and . On the other hand, we can construct 2-cocycles B 2 out of G-backgrounds. We first choose a class [q] ∈ H 2 (BG, A ) and construct As we show below, these are allowed Postnikov classes for 2-groups G = G, B, 1, [Θ] the QFT can couple to. We choose a representative q ∈ Z 2 (BG, A ) for [q] and construct a representative Θ = f −1 2 dπ(q) for [Θ]. Then, given a G-bundle with connection X 1 , that we can think of as a homotopy class of maps X 1 : M → BG, we simply set In other words, from a background (X 1 , X 2 ) for G that -combining (4.5) and (4.8)satisfies we construct the valid 1-form A-background  (BG, A ) . We will present a concrete example of this type in section 6.4. 18

JHEP03(2019)118
Notice that since f 1 is trivial, G maps to the identity in K and so it does not permute the anyons. If the QFT in question is a 3d TQFT, it has been conjectured in [22] that when the 0-form symmetry does not permute the anyons, the Postnikov class should vanish (in appendix D we prove this statement in a special case). This seems in contradiction with the 2-groups G we constructed above. However recall that the full 1-form symmetry of the theory is A, not B. If we map the Postnikov class [Θ] ∈ H 3 (BG, B) to H 3 (BG, A) we find i.e. the class is trivialized in the larger coefficient group A. In fact, by the extension of (4.3) to a long exact sequence in cohomology, Bock H 2 (BG, A ) ⊂ H 3 (BG, B) is precisely the kernel of f 2 and hence it is the largest possible set of Postnikov classes when G does not permute the anyons (assuming the conjecture of [22] is correct).
By substituting (4.10) in the anomaly inflow action of the QFT for the intrinsic 1-form symmetry A, one can find the implied 't Hooft anomaly for the 2-group G. Of course, this anomaly only makes sense up to local counterterms that can be written in terms of G gauge fields (we will expand on this point below). The 't Hooft anomaly for G will include a 1-form part, a mixed 1-form/0-form part, and a 0-form part. In particular, a QFT with only 1-form symmetry and no 0-form symmetry can still reproduce anomalous variations for a 0-form G-background X 1 .
The general case. Let us now consider the general problem of coupling a QFT to backgrounds (X 1 , X 2 ) for G = G, B, τ, [Θ] . We aim to construct backgrounds (B 1 , B 2 ) for the intrinsic 2-group symmetry K = K, A, ρ, [β] in terms of (X 1 , X 2 ). We set for some ζ ∈ C 2 (BG, A).
The 2-group structure of K requires A). For the sake of clarity, in this section we explicitly indicate the group action involved in the twisted differential. Substituting (4.12) into (4.13) we get the equation We should determine which τ and Θ in the 2-group equation

JHEP03(2019)118
with τ : G → Aut(B) and [Θ] ∈ H 3 τ (BG, B), ensure that (4.13) is satisfied. The first condition is that, for every g ∈ G, the following square diagram commutes: (Dashed lines are only included to clarify the origin of the square diagram.) The latter is a constraint on the group action τ , in Hom(B, A), guaranteeing that the action of G on B is compatible with the action of K on A. Using the constraint, we can simplify Hence (4.14) becomes the pull-back by X * 1 of the equation If we want (4.14) to be satisfied for all backgrounds X 1 , then (4.18) should be satisfied. This is a cohomological constraint on the possible Postnikov classes [Θ] for G: When this is satisfied and we have chosen representatives Θ, β, then there exist ζ's that solve (4.18). In fact, (4.18) leaves us some freedom in the choice of ζ: we can shift . Those are called "fractionalization classes" in the literature (see e.g. [22,30,39,43,44]) and form an Once again, the 't Hooft anomaly of the 2-group symmetry G can be obtained by substituting the background (4.12) into the 't Hooft anomaly of the intrinsic 2-group symmetry K. One should be careful that the resulting anomaly for G is defined up to local counterterms that can be written in terms of G gauge fields.
An example about possible induced anomalies. To clarify the meaning of the last paragraph, let us present a simple example. Consider the 3D Chern-Simons TQFT U(1) 2 , which has a Z 2 1-form symmetry with anomaly

JHEP03(2019)118
where B 2 ∈ Z 2 (X 4 , Z 2 ) is the background field. We can couple the theory to an extrinsic U(1) 0-form symmetry, with gauge field A, by setting B 2 = dA/2π. Substituting into (4.21) and noticing that the Pontryagin square P reduces to a standard square, we obtain the action 1 8π F ∧ F . This term is gauge invariant and well-defined on a 4-manifold with boundary, therefore it is an allowed local counterterm 19 that can be removed. The resulting theory has manifestly well-defined 3D Lagrangian On the other hand, we can couple the theory to an extrinsic SO(3) 0-form symmetry, with gauge field A, by setting in terms of the second Stiefel-Whitney class of SO (3). In this case the anomaly is non-trivial and cannot be removed.

Comments on accidental symmetries
The condition (4.19) constrains possible RG flows. Suppose that G is the UV 2-group symmetry and K is the IR 2-group symmetry. If we assume that f 1 , f 2 are (injective) inclusion maps, then we can use the construction above to prove that, in certain cases, these maps cannot be isomorphisms and hence that there must be accidental symmetry in the IR.
As an example, suppose that the Postnikov class [Θ] for the UV 2-group symmetry G is non-trivial, while the Postnikov class [β] for the IR 2-group symmetry K vanishes. Then it follows from (4.19) that f 2 cannot be an isomorphism, i.e. the 1-form symmetry must be enhanced in the IR: B A. Since this is true for any f 1 , not necessarily an inclusion, the conclusion remains true even if some local operators decouple during the flow, such as in flows that end up in infrared gapped TQFTs. A general class of flows where this applies is in 3d QFTs where the UV 0-form symmetry acts on the local operators but does not permute anyons. When such theories flow to gapped TQFTs at long distances, the 0-form symmetry still does not permute the anyons and hence, (according to a conjecture of [22]; see also appendix D) the IR Postnikov class is trivial. Thus the IR TQFT must have emergent 1-form global symmetry. See the examples in sections 6.2 and 6.4.
Similarly, if the Postnikov class for the intrinsic 2-group symmetry in the UV is trivial, but in the IR is non-trivial, then f 1 cannot be an isomorphism, i.e. there must be an accidental 0-form symmetry in the IR. which are a common end of RG flows. 20 As we discuss below, for these systems the phenomenon known in the literature (e.g. [22,30,31,39]) as "obstruction to symmetry fractionalization" or "H 3 anomaly" is in fact the signature of a 2-group global symmetry. This relationship was also noted in [11,14], and here we provide a detailed dictionary.

Example: 3d TQFTs with a global symmetry
Let us first review some aspects of the axiomatic construction of 3d TQFTs. Before introducing global symmetry, these theories are described by a unitary modular tensor category C (e.g. [32,41,45]). A class of observables is given by line operators. There is a finite set of such lines {a, b, c, . . . } ∈ C and they obey a commutative fusion algebra In the above, the N c ab = N c ba are non-negative integers, that are equal to the dimensions of vector spaces V ab c associated to trivalent vertices (or to the sphere S 2 with three punctures, in radial quantization). The algebra has an identity 0, which is the trivial and completely transparent line. We indicate asā the line conjugate to a, which has opposite orientation, such that a×ā = 0. Associativity requires e N e ab N d ec = f N d af N f bc . One can choose bases of vectors |a, b; c, µ in these vector spaces, and diagrammatically represent these states as (5. 2) The normalization constants d a are called quantum dimensions, and will be fixed momentarily. There exist orthogonality and completeness relations for lines:

JHEP03(2019)118
produces a single line on the right-hand-side of (5.1), with multiplicity 1. In particular A is an Abelian group.
The fusion category is completed by the F -matrices that relate the configurations of lines on the two sides of figure 3 and satisfy pentagon equations. We will not use these identities below and refer to [32,36] for details.
The line operators also satisfy a variety of braiding relations. The braiding matrices [R ab c ] µν are defined by 5) where above we used (5.3). The R-matrices satisfy hexagon relations [32,36] that correspond to Yang-Baxter equations, and moreover there are hexagon relations between Fand R-matrices.
Imposing that the S-matrix (defined below) is unitary, one finally defines a unitary modular tensor category (UMTC).
The topological spin of an anyon a was defined in (3.22). It can be expressed in terms of the R-matrices as and it is a root of unity [41,46]. One can show that the R-matrices satisfy the ribbon property λ [R ab c ] µλ [R ba c ] λν = θc θa θ b δ µν . The S-matrix is defined as (the two expressions agree because of the ribbon property) where D = S −1 00 = a d 2 a is the total quantum dimension. The S-matrix is unitary and satisfies S ab = S ba = S * ab and S 0a = d a /D. It can be used to remove anyons that loop around other anyons: One can also define the so-called monodromy scalar component for some Abelian anyon e.

TQFTs with a global symmetry
We now describe some aspects of 3d TQFTs with global symmetry following [22] (see also [41,47]). Our first task is to identify the intrinsic global symmetry of such a theory as discussed in section 4. We begin with the 0-form symmetry. First, we define a set of topological symmetries -or auto-equivalences -of a unitary modular tensor category as the set of invertible maps 21 ϕ : C → C that preserve all topological properties, e.g. N c ab , d a , θ a , S ab [22]. They can involve a permutation of the anyons, ϕ(a) = a , and act unitarily on the vector spaces, while preserving the F -and R-matrices. Among such transformations, there is a subset, called natural isomorphisms defined as follows: for phases γ a . These transformations automatically leave all TQFT data invariant and we do not regard them as symmetries. Notice in particular that such natural isomorphisms do not permute the anyons. More generally, it is conjectured in [22] that topological symmetries that do not permute anyons are necessarily natural isomorphisms. 22 (See appendix D for a proof in a special case.) We thus define the automorphism group of the category, Aut(C), as the group of topological symmetries modulo natural isomorphisms. In particular, group multiplication in Aut(C) is composition up to natural isomorphisms. If we assume the conjecture above that all non-identity elements of Aut(C) must permute the anyons, we conclude that Aut(C) is a subgroup of the permutation group of the anyons (in particular, it is finite). We identify this automorphism group with the 0-form symmetry of the theory: Intrinsic 0-form symmetry = Aut(C) . (5.14) 21 We restrict here to unitary and parity-preserving maps. 22 This statement is false in non-topological TQFTs. See section 6 for examples.

JHEP03(2019)118
Since the group of automorphisms Aut(C) acts to permute all the lines, by restriction it also acts to permute only the Abelian anyons A. This defines the action of the 0-form symmetry on the 1-form symmetry that is part of the defining data of a 2-group. Finally, we must explain how to extract the Postnikov class β ∈ H 3 BAut(C), A from the intrinsic data of the TQFT. This is done in section 5.2 below. Although the intrinsic symmetry of the TQFT is the 2-group defined above, it is common in the literature (e.g. [22]) to also discuss coupling a TQFT to more general symmetries. This can be carried out using the formalism of section 4. In particular, we will consider coupling the theory to an extrinsic 2-group with 0-form group G and 1-form group A.
To begin the discussion, we consider in general a group homomorphism The special case that G = Aut(C) (so that we are considering the intrinsic 0-form symmetry of the TQFT) corresponds to [ρ] = id. We represent the classes [ρ g ] by elements of the topological symmetry (and from now on we suppress the index µ): where U g are unitary matrices. They only have to represent G up to natural isomorphisms: where κ g,h (a, b; c) are natural isomorphisms: for phases η a (g, h). One easily finds κ g,h (a, b; c) = U g (a, b; c) −1 U h (ḡa,ḡb;ḡc) −1 U gh (a, b; c). Clearly (5.18) does not uniquely fix the phases η a (g, h), and we will discuss below how they can be unambiguously extracted from the TQFT data. On the other hand, G permutes the anyons and this induces an action of G on the 1-form symmetry group A, that we indicate with the same symbol ρ : G → Aut(A).
Decomposing ρ ghk with (5.17) and using associativity, one obtains From the phases η a (g, h) one can define the phases where ρ −1 g (a) =ḡa. They satisfy the relations Ω ρ −1 g (a) (h, k, l) Ω a (g, hk, l) Ω a (g, h, k) Ω a (gh, k, l) Ω a (g, h, kl) = 1 . for some β(g, h, k) ∈ A. One can prove that β is a cocycle in Z 3 ρ (BG, A), and that different solutions to (5.18) for η a lead to β's that differ by an exact cocycle. We conclude that the action of the 0-form symmetry G defines a class [β] ∈ H 3 ρ (BG, A). In the literature this is called an "obstruction to symmetry fractionalization" or "H 3 anomaly". As we explain in section 5.2 this is in fact the Postnikov class of the 2-group global symmetry. Notice that if G does not permute the anyons, then according to a conjecture of [22] (see also appendix D) its action on the TQFT can be completely trivialized by a natural isomorphism and thus [β] = 0.
G-crossed braided tensor category. The 0-form symmetry G is generated by (twodimensional) surface operators Σ g , one for each element g ∈ G. These are observables of the theory, and we should extend the set of topological correlation functions by including them as well. More generally, we should also include open surfaces ending on defect lines a g . Such defect lines could be considered as new line operators [22], even though they are not genuine line operators [1]. There must be a background for G with holonomy g around the defect lines that bound Σ g -a sort of branch-cut discontinuity along Σ g -and correlation functions depend on the topology of the surfaces bounded by the defect lines.
One can then define a G-graded tensor category called a G-crossed braided tensor category. Each sector C g contains those lines a g that can bound Σ g , and the original tensor category is C ≡ C 1 . One could generate all the different lines a g ∈ C g by starting with one element in C g and then fusing with the elements a ∈ C, in other words the action of C on C g by fusion is transitive. 23 Fusion is compatible with grading, a g × b h = c N c gh agb h c gh . Note that, because of the presence of the surfaces, fusion can be non-commutative.
The surfaces are oriented, and when a line a h crosses Σ g , it is mapped to This generalizes figure 2 to all genuine and non-genuine lines. Besides, one needs to extend One also needs to extend fusion and braiding to the full C × G , including F -and R-matrices. In order to implement the presence of surface operators in the diagrammatics, we implicitly place a surface Σ g perpendicular to the page below its respective line a g . Additionally, by a dashed line we represent a 1d section of a surface operator, which may or may JHEP03(2019)118 not have a boundary defect line. Compatibility between fusion and braiding is expressed by [22] and x khḡ x khḡ where η a (g, h) are phases, one for each anyon a ∈ C. Hence, the phases η a (g, h) generalize the phases e 2πiλa(g,h) that we defined in (3.23) to all line operators in the TQFT. By considering two trivalent junctions that slide one on top of the other in two different ways and requiring that the two operations give the same result, one obtains the JHEP03(2019)118 relation (5.18) between κ g,h (a, b; c) µν and η a (g, h) (see figure 8 of [22] and the related discussion). Therefore from the correlators (5.28) we can unambiguously extract the phases η a (g, h).

Diagrammatics of the Postnikov class
To understand the relation between the "obstruction to fractionalization" and the Postnikov class of 2-group symmetry, both of which we have indicated as [β] ∈ H 3 ρ (BG, A), take the two configurations on the left and right of figure 3 (recalling that solid lines in that figure are codimension-1 symmetry defects, which we represent in this section by dashed lines) and wrap an anyon a around both. Performing a contour deformation and implementing (5.28) we find The standard F -move of 3d TQFTs that transforms the configuration of lines on the left of figure 3 to the one on the right, does not involve the creation of any other line β. If we insist that this remains true for the non-genuine lines a g , and thus also for the surface symmetry defects Σ g , we obtain the relation ηḡ a (h, k) η a (g, hk) = η a (g, h) η a (gh, k). This is the statement that the class [β] = 0 in H 3 ρ (BG, A). In other words, if the class [β] defined in (5.22) does not vanish, we cannot consistently couple the TQFT to global 0form symmetry G and 1-form symmetry A as independent symmetries. This is why the class [β] is sometimes termed an "anomaly" in the literature.
On the other hand, including the Abelian line β(g, h, k) in the F -move of surface symmetry defects (and accordingly in the F -move of non-genuine lines), we obtain the equation which is precisely the desired relation. We conclude that it is consistent to couple such a TQFT to a 2-group G-bundle -up to the 't Hooft anomalies discussed in section 3.

Abelian TQFTs
To illustrate some of the methods, consider the special case of an Abelian TQFT where all anyons are Abelian, i.e. any two anyons a, a fuse into a unique anyon aa (equivalently, all anyons have quantum dimension one). Take two anyons a, a to encircle the same defect junction as in (5.28). Using (5.28) subsequently for the anyons a, a gives the product of phases η a (g, h) η a (g, h), while using (5.28) for the anyon aa gives the phase η aa (g, h). This corresponds to the equation 24 Namely, η (g, h) is a homomorphism from the intrinsic 1-form symmetry A to U(1). Since this is true for all anyons in the Abelian TQFT, the phase η a (g, h) can be expressed as (5.10) for some Abelian anyon e = e(g, h). Substituting the expression for η a (g, h) into (5.20), using the fact that the monodromy matrix M ab is G-invariant and (in the case of an Abelian TQFT) multiplicatively linear in the two entries, and comparing with (5.22), we find that β is a coboundary. We conclude that in Abelian unitary TQFTs, the 2-group symmetry has trivial Postnikov class:

More examples
In this section we discuss many more examples of theories with 2-group global symmetry, or that can be coupled to 2-group backgrounds. We also illustrate the procedure of section 4.
In the first example we discuss how to couple the Abelian Z N Chern-Simons theory to 2-group backgrounds using its 1-form symmetry. The second example is U(1) K Abelian Chern-Simons-matter theory with matter fields of charge q > 1, that can have 2-group global symmetry. In the third example we show how a certain mixed anomaly for discrete global symmetries can give rise to 2-group global symmetry after gauging. The fourth example is Spin(N ) K and O(N ) K non-Abelian Chern-Simons-matter theory with matter in the vector representation, that can have 2-group global symmetry. The fifth example is the Chern-Simons theory Spin(k) 2 which, for certain values of k, can have Z T 2 time-reversal symmetry forming a 2-group with the Z 2 1-form symmetry. We also present an infinite list of U(1) k and SU(k) 1 Chern-Simons theories with time-reversal symmetry. The last example illustrates the method of section 4, by coupling the simplest Z N gauge theory in general spacetime dimension to various global symmetries using its intrinsic higherform symmetries.

Abelian Z N Chern-Simons theory
Let us first present the example, discussed in [11,19,25], of a TQFT coupled to 2-group bundles through its 1-form symmetry.
Consider the Abelian Z N Chern-Simons theory, that can be described by two U(1) gauge fields u, w [35,48,49]: where w constrains u to be a Z N gauge field. Denote r ≡ gcd (N, K). The theory has 1-form symmetry Z N 2 /r × Z r generated by the lines w and K r u + N r w, respectively. We will focus on the part Z N 2 /r ≡ A, which can be written as an extension of Z N/r ≡ A by Z N ≡ B. We will restrict to the case r = N . Using (4.10) and for any group G, the theory can be coupled to the background (X 1 , X 2 ) for a 2-group global symmetry For a related discussion of this theory coupled to 2-group bundles on the lattice, see [19] (where the Postnikov class is interpreted as an obstruction for ordinary symmetries). The 't Hooft anomaly for the 2-group background can be computed from the anomaly of the Z N 2 /r 1-form symmetry generated by w of spin − K 2N 2 mod 1. Using the short-hand notation π(q) = ς, the anomaly is mod 2πZ, where B 2 is as in (4.10) and X is a closed spin 4-manifold. The anomaly agrees with the general structure in (3.27)- (3.30) where the Z N ⊂ Z N 2 /r subgroup 1-form symmetry is generated by the line N r w of spin − K 2r 2 mod 1, the permutation ρ is trivial, 2 P(ς) + ς ∪ 1 dς and β = r N dς. The case N = 3, K = 2 formulated on the lattice was discussed in [11]. In this case r = 1, and the theory can couple to the 2-group background as above with [q] ∈ H 2 (BG, Z 3 ). The 't Hooft anomaly for the 2-group background can be computed from the anomaly of the Z 9 1-form symmetry generated by w of spin − 1 9 mod 1 as in (6.2): which agrees with the anomaly computed in [11]. 25

U(1) K with matter of general charges
Consider U(1) K Chern-Simons theory coupled to N f scalars of charge q. We study the case that K = q is a multiple of q. The gauge-invariant unit monopole operator is dressed 25 Here, however, we interpret X2 as the classical background for the 1-form global symmetry A, as opposed to what is called G * gauge in [11].

JHEP03(2019)118
with scalar fields, and thus the theory appears to have ordinary global symmetry 26 G = U(N f )/Z (we neglect charge conjugation symmetry in the following discussion). The theory also has A = Z q 1-form symmetry generated by the element e 2πi/q in the center of the gauge group, which assigns the phase e 2πiQ/q to the Wilson line of charge Q. As we show, the two symmetries combine into a 2-group.
Denote the matter fields by φ I with flavor index I = 1, . . . , N f . The Z quotient on U(N f ) is generated by φ I → e 2πi/ φ I . To see this, note it acts trivially on the perturbative local operators formed by gauge invariant polynomials of φ I since it can be absorbed by a U(1) gauge rotation e 2πi/(q ) (recall φ I has charge q). It also acts trivially on the local operators with magnetic charge since the basic monopole is dressed with matter-field zero-modes. Since the Z transformation is identified with a e 2πi/(q ) gauge rotation on the matter fields, if we activate a G = U(N f )/Z background field that is not a U(N f ) gauge field, we find the dynamical U(1) gauge field is modified by a Z q quotient. The Z q quotient changes the quantization of the dynamical U(1) gauge field from integral periods to Z q fractional periods, specified by a Z q 2-cocycle that depends on the background fields of the global symmetry. Since the -th power of the gauge rotation e 2πi/(q ) acts trivially on the matter fields but non-trivially on the Wilson lines that are charged under the 1-form symmetry, such background field for the 0-form symmetry also activates the background for the Z q 1-form symmetry. 27 The Z q 2-cocycle can be expressed as a background Z q 2-cochain X 2 for the Z q 1-form symmetry, and the Z 2-cocycle where X 1 is the background G gauge field, and w ( ) 2 is the obstruction to lifting the U(N f )/Z bundle to a U(N f ) bundle. More precisely, the Z q 2-cocycle is described by X 2 , B 2 with the constraint in terms of the Bockstein homomorphism for the exact sequence 1 → Z q → Z q → Z → 1 that describes Z q as the extension of Z by Z q . Namely, the G = U(N f )/Z ordinary global symmetry and the Z q 1-form symmetry combine into a 2-group , (6.6) 26 The group U(N f )/Z can be described as the elements (x, y) of SU(N f ) × U(1) with the identifications (x, y) ∼ e −2πi/N f x , e 2πi/N f y ∼ x , e 2πi/ y . 27 More precisely, denote r = gcd(q, ): since (q/r) −1 can be defined in Z , the Z transformation on the charge-q matter fields can be identified with the gauge rotation e 2πi(q/r) −1 /r (with a lift of (q/r) −1 in Z r ) which generates a Z r quotient instead of Z q . Consequently, the background for the 0-form symmetry only activates the background for the Zr ⊂ Zq subgroup 1-form symmetry. However, since we will couple the theory to the background for the entire Zq 1-form symmetry, this extends the Z r quotient to a Z q quotient. The special case with only 0-form global symmetry is discussed in [50].

JHEP03(2019)118
with Postnikov class Bock w ( ) 2 ∈ H 3 (BG, Z q ). 28 The permutation ρ in the 2-group symmetry is trivial, since the 0-form flavor symmetry G acts on the matter fields without changing their gauge charges. 29 The class w ( ) 2 ∈ H 2 (BG, Z ) for G = U(N f )/Z can be described in more detail as follows. The G-bundle can be described by a U(1) × PSU(N f ) bundle with the following correlation [50]: where F/(2π) is the first Chern class of the U(1) bundle, d = gcd(N f , ) and w is the obstruction to lifting the PSU(N f ) bundle to an SU(N f ) bundle. In the special case N f = 1 the condition (6.7) implies w ( ) 2 can be lifted to an integral cocycle, and in particular a Z q cocycle, therefore the Postnikov class Bock w ( ) 2 vanishes. In this case G is the U(1) magnetic symmetry, and the vanishing Postnikov class reproduces the fact that the theory can couple to the magnetic symmetry without activating any background for the 1-form symmetry. We will consider the case N f ≥ 2.
We can also give the matter field a mass term singlet under the global symmetry, and integrate out the matter fields to find U(1) K Chern-Simons theory coupled to the background fields. Since the symmetry acts on the matter fields without changing the gauge charge, the symmetry does not permute the anyons in the resulting Chern-Simons theory, and it couples to the theory by the 1-form symmetry. Note that in the IR the 1-form symmetry is enhanced from Z q to Z q . As a consistency condition for the flow, we can couple the theory to background fields using the formalism of section 4 with f 1 the trivial homomorphism and f 2 : Z q → Z q the inclusion given by multiplication by . This reproduces (6.5). Equivalently, the backgrounds X 1 , X 2 activate the 2-form background for the Z q total 1-form symmetry 2 as in (6.4), where tilde denotes the lift to Z q cochains while preserving (6.5), and thus B 2 is a Z q cocycle independent of the lift. This is the same Z q 2-cocycle that describes the Z q quotient on the dynamical U(1) gauge field in the UV. The 't Hooft anomaly of the 2-group symmetry can then be computed from the 't Hooft anomaly of the Z q 1-form symmetry: where B 2 is given by (6.8) and X is a closed spin 4-manifold. The same anomaly is reproduced in the UV theory using the Z q quotient on the dynamical U(1) gauge field 28 In the special case gcd(q, ) = 1, the Bockstein homomorphism is trivial since Z q = Zq × Z , and the 2-group symmetry has trivial Postnikov class i.e. it factorizes into a 0-form and a 1-form symmetry. From Footnote 27 we find that the background field for G = U(N f )/Z with non-trivial w ( ) 2 modifies the ordinary gauge and global symmetry bundle into a [U(1) dyn ×U(N f ) global ]/Z bundle, where the Z quotient is generated by the element (e 2πi(q −1 )/ , e −2πi/ ). We will focus on the case gcd(q, ) > 1. In particular, if we gauge the Z gcd(q, ) subgroup of the Zq 1-form symmetry to change (q, ) into (q/gcd(q, ), /gcd(q, )), the resulting UV 2-group symmetry has trivial Postnikov class. 29 If we include the charge conjugation symmetry, which we neglected, the permutation would be Z2.

JHEP03(2019)118
described by the same 2-cocycle (6.8), where the quotient makes the Chern-Simons term of the dynamical gauge field no longer properly quantized. The discussion can be repeated with the scalars replaced by N f massless fermions of charge q, and K replaced by the bare Chern-Simons level (we consider the case K bare = q ), namely in the theory U(1) q −q 2 N f /2 with N f fermions of charge q. 30 In the special case q = 1, the 1-form symmetry is trivial and the ordinary symmetry G does not participate in a non-trivial 2-group symmetry. The 't Hooft anomaly (6.9) of the ordinary symmetry G agrees with the computation in [50] (up to counterterms for the G background gauge field).
Another special case is QED 3 with N f fermions of charge q, where N f q needs to be even to avoid the standard parity anomaly. Following the previous notation, = qN f /2 and the bare Chern-Simons level is q 2 N f /2, thus from the previous discussion the theory has 2-group symmetry with ordinary symmetry G = U(N f )/Z qN f /2 , 1-form symmetry Z q , trivial permutation and Postnikov class Bock w (qN f /2) 2 .

Gauging a symmetry with mixed 't Hooft anomaly
Consider a theory with an ordinary 0-form global symmetry A × G, where A is an Abelian group while G is generic, and a mixed 't Hooft anomaly Here X is a closed four-manifold, C is a gauge field for A, A is a gauge field for G, the class [β] ∈ H 3 (BG, A) parameterizes the mixed 't Hooft anomaly and A is the Pontryagin dual to A. The 't Hooft anomaly is an obstruction to gauging the entire A × G symmetry. However, following the discussion in [14], we show that gauging only the subgroup A produces a theory with 2-group symmetry. For trivial G-background, namely A = 0, the anomaly (6.10) vanishes: we can gauge the subgroup A and make C dynamical in the path-integral. The resulting theory has a 1-form center symmetry A (isomorphic to A), which can be coupled to a background 2-form gauge field B through the term In the absence of the mixed anomaly (6.10), invariance under A gauge transformations would require B to be a cocycle. With (6.10), instead, gauge invariance requires that the background fields satisfy dB = A * β .

JHEP03(2019)118
Summarizing, one can produce examples of 3d theories with 2-group global symmetry by starting with a theory with ordinary global symmetry A × G and 't Hooft anomaly of the form (6.10), and then dynamically gauging A [14]. Notice that, naively, one could have expected that because of the mixed anomaly (6.10), promoting A to a dynamical gauge symmetry completely spoils the global symmetry G. Instead G survives and becomes part of a 2-group global symmetry. 31

Spin(N ) and O(N ) Chern-Simons-matter theories
Two interesting examples of the general strategy highlighted above are provided by Spin(N ) K and O(N ) K Chern-Simons theories with N f massless scalars in the vector representation. Those two theories can have 2-group global symmetry. To explain those examples, let us proceed step by step.
We start considering SO(N ) K Chern-Simons theory with N f massless scalars in the vector representation. 32 We take N = 2 mod 4, K even, and N f = 0 mod 4. The theory has charge conjugation symmetry C, magnetic symmetry M, as well as flavor symmetry O(N f ). More precisely, the action of the Z 2 center of O(N f ) on the matter fields can be identified with the Z 2 center of the SO(N ) gauge group, and besides, such a center flavor rotation does not act on the gauge-invariant operators with magnetic charge (which, for K even, need an even number of matter fields to be gauge invariant, and thus they carry an even number of flavor indices). Therefore the faithful flavor symmetry is P O(N f ). We would like to determine the 't Hooft anomaly for C, M and the connected component We can turn on a background gauge field A for a PSO(N f )-bundle with non-trivial second Stiefel-Whitney class, by which we mean the obstruction to lifting the bundle to an SO(N f ) bundle. Let us denote by [w ] the group cohomology class that represents the second Stiefel-Whitney class in the classifying space of PSO(N f ): This class has the property that for every PSO(N f )-bundle with connection A, its second

Stiefel-Whitney class is
. We then choose a representative w . Because of the non-trivial PSO(N f ) flavor bundle, also the bundle for the dynamical gauge field is forced to be a non-trivial PSO(N )-bundle, as the second Stiefel-Whitney classes of the two bundles are constrained to be the same [50]. Namely, the gauge fields live in (6.14) 31 In fact, all 3d examples with 2-group symmetry discussed in section 6 have such a parent theory (or a generalization where the 0-form symmetry is not the product A × G but an extension), which can be obtained by gauging a subgroup of the 1-form symmetry. 32 We can add an O(N f )-invariant potential for the scalar fields and tune the mass term to zero: depending on N , K, N f the theory at long distances has been conjectured to flow to a critical point or a symmetrybreaking phase [51,52]. In this discussion we will focus on the microscopic theory.

JHEP03(2019)118
From the point of view of the dynamical gauge sector, the constraint to non-trivial PSO(N )bundles is enforced by an effective coupling A dyn ∪ B 2 (obtained, for instance, by integrating out the massive scalar fields) to a 2-cochain In fact, the Chern-Simons term of SO(N ) K has a Z 2 1-form symmetry and B 2 acts as a source for the latter, enforcing the constraint. Let us stress that in the full theory with matter, such a would-be 1-form symmetry is explicitly broken.
On the other hand, consider for a moment the pure SO(N ) K Chern-Simons theory. Such a TQFT -as we said -has a Z 2 1-form symmetry related to the center of SO(N ), as well as magnetic and charge conjugation 0-form Z 2 symmetries M, C, respectively. From the analysis in section 2.4 of [53], the theory has the following 't Hooft anomaly: Here X is a closed spin four-manifold, P is the Pontryagin square (appendix C), Bock is the Z 2 Bockstein homomorphism (appendix B), while B M , B C are background gauge fields for M, C, respectively. Substituting the effective value (6.15) for B 2 in the theory with matter, we find the 't Hooft anomaly of SO(N ) K with N f scalars. Here we are only interested in backgrounds for PSO(N f ) and M, hence let us set B C = 0. Recalling that we chose N = 2 mod 4 and K even, we find the anomaly Notice that Bock w PSO(N f ) 2 would be trivial for N f = 2 mod 4. 33 Such an anomaly has the same form as in (6.10), therefore we can produce a theory with 2-group global symmetry by employing the procedure of [14] reviewed in section 6.3. We promote B M to a dynamical gauge field, which enlarges the gauge group to Spin(N ) K . The new theory has a Z 2 center 1-form symmetry (recall that Spin(N ) K has a Z 4 center 1form symmetry, however the coupling to matter in the vector representation breaks it to Z 2 ) which we can couple to a background field X 2 ∈ C 2 (M, Z 2 ) by the coupling π 3d B M ∪ X 2 . Invariance of the action under gauge transformations of B M requires the background fields A, X 2 to satisfy 34 . Moreover, we used that Bock w PSO(N f ) 2 is a Z2-valued cochain and so it is equal to its opposite.

JHEP03(2019)118
We conclude that in Spin(N ) K Chern-Simons theory with N f scalars in the vector representation (N = 2 mod 4, K even, N f = 0 mod 4), the PSO(N f ) flavor symmetry and the Z 2 1-form symmetry form a 2-group global symmetry (6.19) The non-trivial Postnikov class Bock w is an element of H 3 BPSO(N f ), Z 2 . We can easily write the 't Hooft anomaly for the 2-group symmetry G, as the non-dynamical part of (6.17): This anomaly has only a pure 0-form part (non-vanishing for K = 2 mod 4).
An alternative heuristic explanation for the 2-group global symmetry is as follows. The action of the Z 2 center of SO(N f ) on the elementary fields is identified with the action of a transformation in the center of Spin(N ) of order four. Thus in the presence of a PSO(N f ) background with nontrivial A * w JHEP03(2019)118 and K even, namely π X (K/2) PB 2 /2, and substitute (4.10). Noticing that f 2 : Z 2 → Z 4 is here multiplication by 2, the only term that survives is precisely (6.20).
In the special case that N = 2, we find the theory U(1) 4K with N f scalars of charge q = 2 (K even and N f = 0 mod 4), and conclude that it has 2-group symmetry. This is consistent with section 6.2 by turning off the background for the U(1) magnetic symmetry and restricting the background for the flavor symmetry to be in PSO(N f ).
The discussion can be repeated with scalars replaced by fermions, and the level replaced by the bare level (for O(N ) gauge theory there is also the bare Z 2 level). In particular we take N = 2 mod 4, K even and N f = 0 mod 4, and claim that the resulting theories have 2-group global symmetry. This also provides a consistency check for the dualities [53]: with N f ψ , (6.21) where the scalars φ and the fermions ψ are in the vector representation. In the first duality, for N = 2 mod 4, K even, N f = 0 mod 4, both sides have the same 2-group symmetry and the same 't Hooft anomaly. The Z 2 levels are 3d local counterterms added when gauging C or CM, and thus they do not affect the 2-group symmetry and its anomaly. Similarly in the second duality, for N, K even, N + K = 0 mod 4, N f = 0 mod 4, both sides have the same 2-group symmetry and the same 't Hooft anomaly. In fact, this simply follows from 't Hooft anomaly matching (6.16) in the SO(N ) Chern-Simons-matter dualities and the gauging strategy discussed in section 6.1.

Chern-Simons theories with time-reversal symmetry
Our next family of examples is given by Chern-Simons theories with a Z 2 1-form symmetry that forms a 2-group with time-reversal symmetry. We start with U(1) k Chern-Simons theory. For special values of k the theory is timereversal invariant as a spin-TQFT (up to a mixed gravitational anomaly): those are the integer solutions to the negative Pell equation for some integers p, q [54]. The first few values are k = 1, 2, 5, 10, 13, 17, 26. In order to prove time-reversal invariance, we start from the equality of the following two theories: where b, c,b,c are dynamical U(1) gauge fields, B is a background U(1) gauge field and A is a background spin c connection. Equality follows from the field redefinition b = qb + pc, c = −kpb − qc which has unit Jacobian because of (6.22). Integrating c,c out and setting A = 0 (which is consistent on spin manifolds) gives

JHEP03(2019)118
(Note that by the redefinitionb →b + B, the coupling q 2πb dB could be shifted by − k 2πb dB.) Written more simply, this is the duality of spin-TQFTs Thus, the theories are time-reversal invariant.
Taking into account the coupling to B, time reversal should act as T (B) = −qB. Yet, the theory is not time-reversal invariant in the presence of a background B, due to the anomalous shift on the right-hand side. To achieve invariance we should take The term 1/k 4π BdB is not properly quantized and thus not well-defined in 3d. We can realize it -and thus the theory can be made time-reversal invariant -by placing the system on the surface of a bulk with theta term θ = 2π/k for U(1) B (normalized as θ ∼ θ + 2π), which characterizes the mixed 't Hooft anomaly.
The mapping of lines can be deduced from their coupling to the background fields B, A, or from the change of variables. We find with the identifications k b + k c ∼ 2 c ∼ 0 and similarly forb,c. Namely, the topological charges satisfy (Q 1 , Q 2 ) ∼ (Q 1 + k, Q 2 + k) ∼ (Q 1 , Q 2 + 2). Applying the duality map twice we get Thus the time-reversal symmetry is a Z 4 anyon permutation symmetry for k > 2 (while for k = 2 we have Q 1 ∼ Q 1 + 2). 35 It satisfies where C is charge conjugation symmetry acting as C : B → −B and with C 2 = 1.
Using the level-rank duality U(1) k ↔ SU(k) −1 , we also obtain Thus also SU(k) 1 is time-reversal invariant as a spin-TQFT for k that satisfies (6.22). We will focus on the case that k is odd, where the theory is also time-reversal invariant as a non-spin TQFT, since the difference in the framing anomaly between the two sides is 35 Examples with this property were already observed in [31,55,56].

JHEP03(2019)118
2(k − 1) ∈ 8Z. 36 In fact, taking mod 4 and mod 8 on both sides of (6.22), one finds that k = 1 mod 4 for q even and k = 2 mod 8 for q odd (while p is always odd). The anyons of SU(k) 1 are labelled by Young diagrams with a single column of height Q mod k, and the time-reversal symmetry acts as T : Q → qQ . (6.31) Note that, once again, T 2 = C where C(Q) = −Q mod k. Time-reversal symmetry is a Z 4 anyon permutation symmetry. Consider gauging charge conjugation C in SU(k) 1 . The 1-form symmetry is Z k , and since for odd k there is no Abelian anyon stabilized by C, there is only one way to couple to the Z 2 charge conjugation symmetry. There are two possible non-spin Z 2 counterterms: (Z 2 ) 0 and (Z 2 ) 4 , where in our convention the Z 2 level is defined mod 8 (see [53] for explanations). Such counterterms preserve time-reversal invariance. The duality SU(k) 1 ↔ SO(k) 2 maps charge conjugation to the magnetic symmetry. Thus, depending on the choice of Z 2 counterterm, the gauging produces either Spin(k) 2 or Spin(k) 2,4 = [Spin(k) 2 × (Z 2 ) 4 ]/Z 2 (where the quotient is generated by the product of the line in the two-index symmetric tensor representation of Spin(k) and the Wilson line of the Z 2 theory, see [53]).
The anyons in the new theory are as follows. After gauging, the state Q = 0 splits into two states 1, , where generates the new Z 2 1-form symmetry. Denote k = 4m + 1 for some integer m. There are 2m + 4 lines, with two lines W 1 , W 2 in the spinor representation of Spin(k) of spin m 4 , m 4 + 1 2 for zero counterterm and spin m−1 4 , m−1 4 + 1 2 for the non-trivial counterterm. The two spinor lines are related by fusing with and they have the same quantum dimension √ k. Let us show that, depending on k, the new theories Spin(k) 2 and Spin(k) 2,4 can have 2-group symmetry. This discussion follows the one in [31]. The new theories have Z 2 anyonpermutation time-reversal symmetry as follows. It leaves invariant 1, , and maps the spinor lines among themselves (otherwise braiding with would be inconsistent). From the spins of the spinor lines W 1 , W 2 one can determine the map in the case of trivial counterterm: even m: In the case of non-trivial counterterm, m is replaced by m − 1 and the two cases are exchanged. Suppose that the Z 2 anyon-permutation time-reversal symmetry does not form a 2group with the 1-form symmetry. Then we can compute the 't Hooft anomaly of timereversal symmetry using the anomaly indicator formula in [59,60], and it must take values in {±1}. If the anomaly is not in {±1}, then the anyon-permutation symmetry must form a 2-group with the 1-form symmetry. The 't Hooft anomaly of time-reversal symmetry in a non-spin 3d TQFT can be parameterized by π w 2 2 and π w 4 1 [27,60] where w 1 , w 2 are the Stiefel-Whitney classes of the bulk manifold. The presence of the first term is detected

JHEP03(2019)118
by the framing anomaly c as e 2πic/8 . For the theory Spin(k) 2 with k = 4m + 1, the framing anomaly is c = 4m and thus the first anomaly is (−1) m ∈ {±1}. The second anomaly can be computed as even m: Here η T x are the phases (5.28) associated to the generator of T and to the lines x. It turns out that for even m we have η T = −1, while η T W 1 = −η T W 2 = ±1 depending on how we couple to the Z 2 symmetry (there are two fractionalization classes): we see that Z anom is in {±1}. On the other hand, for odd m no value of η T = ±1 can lead to Z anom = ±1. We conclude that for k = 5 mod 8 satisfying (6.22), the theory Spin(k) 2 has Z 2 anyonpermutation time-reversal symmetry that combines with the Z 2 1-form symmetry to form a 2-group. In a similar way, we can conclude that for k = 1 mod 8 satisfying (6.22), the theory Spin(k) 2,4 has Z 2 anyon-permutation time-reversal symmetry that combines with the Z 2 1-form symmetry to form a 2-group. This is consistent with the conclusion in [31].
We could instead couple the theories Spin(k) 2 or Spin(k) 2,4 , that have intrinsic 2group symmetry, to an external Z 4 0-form symmetry and the Z 2 1-form symmetry using the method of section 4, with the projection map f 1 : Z 4 → Z 2 and the identity map f 2 . From the discussion in section 4, the Postnikov class for the extrinsic 2-group symmetry is trivial by the property of the Bockstein homomorphism. Note that this applies to any example with such intrinsic 2-group symmetry. This agrees with the discussion in [31].

Z N gauge theory in general dimension
Consider the simplest Z N gauge theory in spacetime dimension d > 1 [35,48,49]: The theory has an intrinsic Z N (d−2)-form symmetry generated by the line e i b , and an intrinsic Z N 1-form symmetry generated by the operator 37 e i φ (d−2) . The corresponding charged objects are the 't Hooft operators e inm φ (d−2) and the Wilson lines e ine b with integers n m , n e ∈ Z N . We can turn on Z N background gauge fields B m d−1 or B e 2 for these symmetries (in this discussion they are normalized as B m d−1 , B e 2 ∈ 2π N Z), and this 37 When d = 2, the generator is a local operator e iφ (0) from the periodic scalar field φ (0) ∼ φ (0) + 2π.

JHEP03(2019)118
introduces one of the two couplings On the other hand, introducing both couplings (6.35) produces a mixed 't Hooft anomaly: the equation of motion of b implies N dφ (d−2) = −N B m d−1 , and thus the other coupling is not well-defined but has the anomaly where X is a closed bulk (d+1)-manifold. We can construct several interesting examples using this theory. As a first example, take N = pq with gcd(p, q) > 1. Using the method of section 4, we can couple the theory to an external 2-group symmetry with 0-form part G, 1-form part Z q ⊂ Z N , trivial action of G on Z q , and Postnikov class Bock(ζ) for ζ ∈ H 2 (BG, Z p ) (the Bockstein homomorphism is for the short exact sequence 1 → Z q → Z N → Z p → 1). Denote the 2-group background by a G gauge field X 1 and a Z q 2-cochain X 2 . The coupling to the external 2-group symmetry is realized by constructing a Z N 2-cocycle B e 2 = B e 2 [X 1 , X 2 ] in terms of X 2 and the Z p 2-cocycle X * 1 (ζ) as in (4.10). The coupling has a parameter ν ∈ H 2 (BG, Z N ) that shifts B e 2 by the Z N 2-cocycle X * 1 (ν). We can also introduce additional coupling parameters λ (i) ∈ H d−1−2i (BG, Z N ) by turning on the background The 't Hooft anomaly for the external 2-group symmetry is given by substituting the backgrounds B m d−1 , B e 2 into the mixed anomaly (6.36). Another particularly simple example, that does not involve 2-groups, is the following. Consider the Z N gauge theory coupled to an ordinary symmetry G, where G is a finite group. We set B m d−1 = 0 and couple to the background field X 1 by setting B e 2 = X * 1 (η) with η ∈ H 2 (BG, Z N ). The presence of the background B e 2 implies that the Wilson line e i b , charged under the 1-form symmetry, needs to be attached to a surface with B e 2 flux. From section 3.1, this means that the line carries a projective representation of G described by the cocycle η. Since there is no 't Hooft anomaly in this case, we can promote X 1 to be a dynamical field. The action of the theory reads The equation of motion of φ (d−2) no longer implies that b is a Z N gauge field, but rather that b and X 1 together constitute the gauge field for the group extension G: where G acts trivially on Z N and the extension G is specified by η. The discussion can be generalized to the case that G acts on Z N by a general homomorphism ρ : G → Aut(Z N ). Finally, we consider the Z 2 gauge theory coupled to various symmetries (with trivial Postnikov class) in various dimensions:

JHEP03(2019)118
• d = 2. We couple the theory to time-reversal and to an SO(3) symmetry (with gauge field X 1 ) by the backgrounds where w 1 is the first Stiefel-Whitney class of the spacetime manifold. Substituting into (6.36), we find the mixed anomaly where X is a closed non-orientable bulk 3-manifold with Stiefel-Whitney class w 1 . Thus the 2d Z 2 gauge theory can be the surface state of such a bulk term. In particular, the presence of the background B e 2 implies that the line e i b , charged under the 1-form symmetry, carries a projective representation of SO (3) i.e. it has halfinteger isospin. Similarly, since the 0-form gauge transformation of B m 1 is identified with a gauge transformation of w 1 , the point operator e iφ is odd under time-reversal symmetry.
• d = 3. We couple the theory to time-reversal symmetry. There are two linearly independent 1-form symmetries, with 2-form backgrounds B m 2 and B e 2 . Consider the coupling The presence of the 2-form backgrounds implies that the lines e i φ (1) , e i b charged under the two Z 2 1-form symmetries, respectively, carry projective representations of time-reversal symmetry T specified by the cocycle (6.42), i.e. they obey T 2 = −1.
The background-coupled theory with such anyons is also called the eT mT state [61]. The mixed anomaly (6.36) implies that time-reversal symmetry has anomaly where X is a closed non-orientable bulk 4-manifold. This reproduces the time-reversal anomaly of the eT mT state [27].
• d = 4. We couple the theory to the spacetime manifold using the following backgrounds for the 1-form and 2-form symmetries: Such a B e 2 background implies that the line e i b describes a fermionic particle. Similarly, the B m 3 background implies that the surface e i φ (2) charged under the 2-form symmetry, is attached to a volume with B m 3 = π w 3 flux. Such a surface is referred to as a fermionic string [62]. Then (6.36) implies that the Z 2 gauge theory with such couplings has gravitational anomaly where X is a closed 5-manifold. This reproduces the result in [27].

JHEP03(2019)118
A similar discussion for the examples in d = 3 and d = 4 can be found in [27], but here we propose the new interpretation that these couplings are realized by higher-form symmetries, and the anomalies for ordinary symmetries in those examples come from the anomaly of the higher-form symmetries.

JHEP03(2019)118
for ordered vertices {i j }. This differential is nilpotent as well, d 2 A = 0. Thus it leads to twisted cocycles, twisted coboundaries and twisted cohomology classes.
Let A, A , A be three Abelian groups with a given bilinear pairing We allow for an action of G on both A, A , A (for simplicity we call both actions ρ), and demand that the pairing be covariant with respect to the G-action: In the main text we will be mainly interested in the case that A = R/Z, there is no G-action on A and thus the pairing is G-invariant, but we will be general in this section. Then we define a (twisted) cup product. Let f ∈ C p (X, A) and g ∈ C q (X, A ), then the product f, ∪ g ∈ C p+q (X, A ) is defined as for ordered vertices {i j }. This product reduces to the standard cup product if there is no G-action ρ.
The twisted differential satisfies the Liebnitz rule when acting on the cup product, namely Notice that in each term, the action ρ contained in the twisted differential is the one that pertains to the corresponding Abelian group. To verify the formula we first compute where we used that A is closed and the pairing is covariant, and

JHEP03(2019)118
Then The two extra terms after the last equality cancel out. A particularly interesting case is when the second Abelian group is A, the Pontryagin dual to A, namely the Abelian group of linear functions λ : A → R/Z. Then there is a natural pairing , : Given an action ρ of G on A, we can define an action on A such that , is invariant: It follows ρ g λ, ρ g a = (ρ g λ)(ρ g a) = λ(ρ −1 g ρ g a) = λ, a . Therefore we can construct a twisted cup product and twisted differentials, that satisfy the Liebnitz rule.

A.1 Group cohomology
The group cohomology of G consists of the cohomology classes H n ρ (BG, A), where BG is the classifying (or Eilenberg-Mac Lane) space of G [21]. When A is finite, one can safely take the singular cohomology of BG. When A is continuous, on the other hand, the topology of A should be taken into account, and the correct language to use is sheaf cohomology. In particular, when we consider A = R/Z ∼ = U(1) we use the standard (as opposed to the discrete) topology. This guarantees that in all cases (see e.g. [37,38]). When G is finite, the cohomology groups have an algebraic description [63] (see also [64]) as cohomology groups of functions f : G n → A , (A.14)
(A.15) Such differential is nilpotent, d 2 ρ = 0, and this allows us to construct the (twisted) cohomology groups H n ρ . For finite groups, the notation H n ρ (G, A) ≡ H n ρ (BG, A) is often used in the literature.
Given Abelian groups A, A , A and a pairing , : A × A → A , covariant with respect to the G-action ρ, we construct the twisted cup product of f ∈ C p (BG, A) and b ∈ C q (BG, A ): . . , g p+q ) = f (g 1 , . . . , g p ), ρ g 1 ···gp b(g p+1 , . . . , g p+q ) (A. 16) which is an element of C p+q (BG, A ). The twisted differential satisfies the Liebnitz rule when acting on such a product: The proof is essentially the same as before.
In fact, if we regard the cocycle A ∈ Z 2 (X, G) as a homotopy class of maps A : X → BG, we realize that where the pull-back A * corresponds to substituting g j → A i j−1 i j for all n-simplices {i j }.

A.2 Steenrod's cup products
Following Steenrod [65], we can introduce higher generalizations of the cup product. As before, we let A, A , A be Abelian groups, , : A × A → A a bilinear pairing, and ρ : G → Aut(A (0,1,2) ) three actions of G on A, A , A (we use the same symbol ρ for both).
In order not to clutter our formulas, here we will keep the twist and the pairing implicit. As discussed before, the differential satisfies the Liebnitz rule when acting on the cup product (f ∈ C p (X, A) and g ∈ C q (X, A )): On the other hand, as opposed to the case of differential forms, the cup product is not graded-commutative: In the second term on the left we have made a slight abuse of notation (unless A = A and the pairing is symmetric): when we write g ∪ f we still pair f with g in the correct order;

JHEP03(2019)118
what we commute is the assignment of indices. The object ∪ 1 on the right is a (twisted) bilinear cup product from C p (X, A) × C q (X, A ) to C p+q−1 (X, A ) defined as for ordered {i j }. This is the pull-back of its version in group cohomology: (g 1 , . . . , g j j , g j+1 · · · g j+q 1 , g j+q+1 , . . . , g p+q−1 To facilitate the reading, we have indicated the number of entries with braces. The cup product ∪ 1 does not satisfies the Liebnitz rule, and equation (A.20) describes its failure. It is also not graded commutative: where ∪ 2 is a bilinear cup product from C p (X, A) × C q (X, A ) to C p+q−2 (X, A ) (its definition can be found in [65] or [35]). The structure continues, the general formula being for i ≥ 0. The formula can be rewritten as a modification of the Liebnitz rule: for i ≥ 1. At some point the structure stops, because f ∪ i g vanishes if i > min(p, q).

B Bockstein homomorphism
Suppose we have a short exact sequence of Abelian groups where i is inclusion and p is projection to the quotient. If we consider cohomology groups with values in those Abelian groups, the short exact sequence induces a long exact sequence The map on the right is called the Bockstein homomorphism (see e.g. [64]), It is the obstruction to lifting a class in H n (X, A/B) to a class in H n (X, A), because the image of p is the kernel of Bock.

JHEP03(2019)118
The map is constructed as follows. Take a representative ω ∈ Z n (X, A/B) of the class [ω]. Lift it to an element ω ∈ C n (X, A), namely In general ω will not be closed, but p(d ω) = 0. Because of the short exact sequence, d ω is in the image of i and thus Since i is injective, dν = 0 and thus ν defines a class [ν] ∈ H n+1 (X, B). One can check that this class only depends on the class [ω] and not on the other choices we made.

C Pontryagin square and affine generalization
In this appendix we give more details on the construction of the four-dimensional action that describes the 1-form anomaly in 3D, and in particular on the Pontryagin square and its affine generalization. Consider first the case of a pure 1-form symmetry A. The background it couples to is described by B ∈ H 2 (X, A), which can be thought of as a homotopy class of maps B : X → B 2 A. Four-dimensional actions [10] are written in terms of L ∈ H 4 (B 2 A, R/Z) as We can rewrite the action in a more convenient way. First we use that [10,66]  where Γ(A) is the universal quadratic group of A. We review the definition of this group in section C.1. Thus we can think of L as an elementq ∈ Γ(A). Then we use a canonical map P : H 2 (X, A) → H 4 X, Γ(A) , called the Pontryagin square [42] and reviewed in section C.2, to rewrite the action as This is the notation used in the main text.
In the case of a 2-group symmetry, B ∈ C 2 (X, A) is not closed. Rather, it has fixed differential d A B = A * β (for fixed 0-form background A). It is still the case that gauge transformations shift it by a coboundary, therefore B defines what we call an affine cohomology class. In this case we need an extension of the Pontryagin square P to affine cohomology classes, that we will present in section C.3.

C.1 Universal quadratic group
Let A, B be any two Abelian groups. A map q : A → B is a quadratic function if 38 It turns out [67] that there exist a unique Abelian group Γ(A) and a (not unique) quadratic function γ : A → Γ(A) such that, for any other Abelian group B and quadratic function q : A → B, we can write Consider the following cases.
• A general finite Abelian group is A = ⊕ i A i where each A i is a cyclic group, then 39 If we call e i the generator of A i and e ij the generator of A i ⊗ A j , we have γ(e i ) = e i , γ(e i + e j ) = e i + e j + e ij . (C.7) We will consider finite groups.

C.2 Pontryagin square
The Pontryagin square [42] is a map from H n (X, A) to H 2n X, Γ(A) . Let us give an explicit construction of the Pontryagin square, specializing to the case n = 2 which is relevant to this paper, in other words we construct a representative of the class in H 4 X, Γ(A) . Consider first the case that A = Z r with r odd. We let the 2-cocycle f ∈ Z 2 (X, Z r ) be a representative of the cohomology class [f ]. Then a representative of its Pontryagin square, that with some abuse of notation we indicate as Pf , is simply f ∪ f ∈ Z 4 (X, Z r ). 38 In particular x, x q = 2q(x). This does not fix q(x) completely, indeed q is also called a quadratic refinement. From 0 = 0, 0 q = −q(0) one finds q(0) = 0. From x, x q = − x, −x q and writing both sides in terms of q, one finds q(2x) = 4q(x). Then from x, (n − 1)x q = (n − 1) x, x q , writing both sides in terms of q and using induction, one finds q(nx) = n 2 q(x). 39 In this notation Zp ⊕ Zq is the group of pairs (a, b), usually denoted as Zp × Zq, while Zp ⊗ Zq is the group constructed out of the elements ab and which turns out to be equal to Z gcd(p,q) .

JHEP03(2019)118
Next consider the case that A = Z r with r even, and let f ∈ Z 2 (X, Z r ) be a representative. We take an integer lift of f , namelyf ∈ C 2 (X, Z) such thatf = f (mod r). Such a lift will satisfy df = ru for some u ∈ B 3 (X, Z). We construct Pf ≡f ∪f −f ∪ 1 df . (C.8) We ask whether this is well-defined modulo 2r. Suppose we chose another liftf =f + rw for some w ∈ C 2 (X, Z). Then, discarding multiples of 2r, we find Thus Pf is not uniquely defined as a cochain, but it is uniquely defined modulo exact terms. The action ofq ∈ Hom(Z 2r , R/Z) does not change this fact, sinceq(dω) = dq(ω).
Then we verify that Pf is closed modulo 2r: d f ∪f −f ∪ 1 df = 2r u ∪f − r 2 u ∪ 1 u . (C.10) Thus d Pf = 0 (mod 2r) and dq(Pf ) = 0. We see that Pf defines an element of H 4 (X, Z 2r ), and also a closed representative although the specific representative depends on the lift. Besides,q(Pf ) defines an element of H 4 (X, R/Z).
Finally, we check that the cohomology class [Pf ] only depends on the class [f ]: if we choose a different representativef =f + dv for some v ∈ C 1 (X, Z), we find We can construct the integral X Pf ∈ Z 2r , or more importantly the action Xq (Pf ) ∈ R/Z . (C.12) Notice that, in this case,q is multiplication by 1/2r times an integer. The integral is a well-defined function of [f ] ∈ H 2 (X, Z r ). For general A = ⊕ i A i , we decompose f = i f i where each component is valued in A i , then Pf = i Pf i + i<j f i ∪ f j . Notice that in the second summation f i and f j commute in cohomology.

JHEP03(2019)118
Thus we can write d Pf = 2 Ω ∪ f − P 1 Ω , (C. 23) and both sides are defined in Z 2r . Finally, if we shift f by an exact term, f = f + dv, we find Modulo exact terms and modulo 2r, under f → f + dv we have 25) In other words, the affine Pontryagin square is not closed and is not gauge invariant under f → f + dv. Both problems are cured by writing the full anomaly action. 41
(C.28) Therefore the action is topological (invariant under change of triangulation). Next we check that the action is gauge invariant under f → f + dv, namely that the integrand changes by exact terms under the gauge variation: ∆ q(Pf ) − λ, ∪f = − Ω, ∪v q − λ, ∪dv + exact = exact . (C. 29) We conclude that it is a good action. 41 Notice that Pf is also not invariant under a change of representative Ω → Ω + dθ. This is not surprise, as in general all our expressions depend on the representative β of the class [β]. Such a dependence, though, is reabsorbed in a shift of B (here f ).

D Trivial anyon permutation symmetry in 3d TQFT
It has been conjectured in [22] that for ordinary global symmetry that does not permute the anyons in 3d TQFT, the symmetry action on the three-punctured spheres (which form a basis of the Hilbert space) must be trivial. In this appendix we will prove the simple case for 3d TQFT that has fusion multiplicity N x y,z ∈ {0, 1}, namely the symmetry action takes the following form on three-punctured spheres U(x, y, z)|x, y; z = γ(x) γ(y) γ(z) −1 |x, y; z , (D.1) where x, y, z are anyons in the TQFT such that N x,y z = 0, and γ is some U(1) function. The symmetry action on the spheres must preserve the F -and R-symbols of the 3d TQFT. For fusion multiplicity either zero or one the condition is [22]; U(x, y; u i )U(u i , z; w) = U(x, y; u j )U(u j , z; w) = · · · = U(y, z; v k )U(x, v k ; w) = U(y, z; v l )U(x, v l ; w) = · · · . (D.5) We begin by showing U(x, y; u) takes the following form U(x, y; u) = f (x, y)h(u) −1 . (D.6) Note the equation holds automatically if the fusion channel of x, y is unique, e.g. when at least one of x, y is Abelian.
• If there does not exist another pair x , y = x, y that can fuse into u i.e. u appears only in the fusion channel of x, y, then the equation (D.6) holds with f = 1 and h(u) = U(x, y; u) −1 .
• If u appears in the fusion channel of the pairs x, y and x , y but there does not exist another u that appear in both fusion channels, then (D.6) is still true by choosing some (x, y) = (x * , y * ) and taking f (x * , y * ) = 1, h(u) = f (x * , y * )U(x * , y * ; u) −1 . For any other pair (x , y ) we can then take f (x , y ) = f (x * , y * )U(x * , y * ; u) −1 U(x , y ; u). 42 The fusion rules are associative: thus if there exists an u = ui such that the left-hand-side is nonzero, there must also exist some v = vi to make the right-hand-side nonzero, and vice versa.

JHEP03(2019)118
• To see the possible problem if both u, u appear in the fusion channels of more than one pairs, say x, y and x , y , note demanding U(x, y, u ) and U(x , y ; u ) to be of the same form (D.6) for an additional u requires the following constraint U(x , y ; u)U(x, y; u) −1 = U(x , y ; u )U(x, y; u ) −1 , (D.7) which might not be true if U were an arbitrary function. Instead, we will explore the constraints (D.3) that U is the symmetry action on the three-puncture spheres.
Consider the fusion tree of fusing x , y , x into y by the fusion channels u, v: where there exists v satisfies v · x ⊃ y and v · x ⊃ y by the associativity of the fusion rules. The condition (D.3) implies U(x , y ; u)U(u, x; y) = U(y , x; v)U(x , v; y) . (D.9) Next, consider the fusion tree of fusing y, x, x into y by the fusion channels u, 1: (yx)x ⊃ ux ⊃ y y(xx) ⊃ y · 1 = y . The right hand side is independent of which u appear in both the fusion channels of x, y and x , y , and therefore from the left hand side we again establish (D.6).
Next, applying the condition (D.5) on the fusion trees (D.10) for x·y = u+u +· · · gives U(x, y; u)U(u, x; y) = U(x, y; u )U(u , x; y) . The left hand side is independent of x, y, thus we find U also has the form U(u, x; y) = p(u)g(x, y) .

(D.15)
Note if the fusion of x, y gives a unique anyon u so u = u, the above equation holds automatically. If there is a unique pair x, y that has both u, u in their fusion channel, then by a similar discussion from the first two points under (D.6) we again obtain (D.15).

E 't Hooft anomaly and Hall conductivity
In this appendix we use the method of section 4 to show that for 3d TQFTs coupled to a U(1) symmetry that does not permute the anyons, the fractional Hall conductivity (i.e. the response to varying the U(1) background gauge field) can be computed from the 't Hooft anomaly of the 1-form symmetry. This provides a method for computing the fractional U(1) Hall conductivity in a TQFT without relying on a dynamical Abelian gauge theory description. Denote the U(1) background gauge field by A. From the discussion in section 4, the theory can couple to the U(1) symmetry by activating a background B 2 for some Z N 1-form symmetry, with B 2 expressed in terms of A (the normalization is B 2 ∈ 2π N Z): The 1-form gauge transformation changes the background A as B 2 → B 2 +dλ, A → A+N λ with U(1) gauge field λ, and it does not correspond to a U(1) gauge transformation of A, and thus the 't Hooft anomaly of the 1-form symmetry does not imply any inconsistency of the theory coupled to A. If we perform a singular 1-form gauge transformation λ = −A/N to remove the background (E.1) that couples the theory to A, the anomaly of the 1-form symmetry produces additional Chern-Simons contact term of A, which accounts for the U(1) Hall conductivity [68]. The anomaly of the 1-form symmetry can be computed from the spin of the generating lines [1,40]. If the line that generates the Z N 1-form symmetry has spin L 2N mod 1 for some integer L, the anomaly is where Y is a closed 4-manifold. In particular, if the coefficient N L is odd in the anomaly (E.2), the theory must be a spin theory for the anomaly to be well-defined. The Hall conductivity j = κ dA/2π can then be computed from the anomaly as which is meaningful modulo an integer for a spin theory, and modulo an even integer for a non-spin theory, since we can add a 3d local counterterm k 4π AdA for some integer k (k

JHEP03(2019)118
needs to be even if the theory is non-spin). If we change the coupling (E.1) to the U(1) symmetry by replacing the coefficient 1/N with q/N for some q ∈ Z, then the anomaly (E.2) implies the Hall conductivity (E.3) changes by multiplying with q 2 . The discussion can be generalized to multiple U(1) symmetries that do not permute the anyons, and again the 't Hooft anomaly of the 1-form symmetry gives the Hall conductivity.
Open Access. This article is distributed under the terms of the Creative Commons Attribution License (CC-BY 4.0), which permits any use, distribution and reproduction in any medium, provided the original author(s) and source are credited.