From gauge to higher gauge models of topological phases

We consider exactly solvable models in (3+1)d whose ground states are described by topological lattice gauge theories. Using simplicial arguments, we emphasize how the consistency condition of the unitary map performing a local change of triangulation is equivalent to the coherence relation of the pentagonator 2-morphism of a monoidal 2-category. By weakening some axioms of such 2-category, we obtain a cohomological model whose underlying 1-category is a 2-group. Topological models from 2-groups together with their lattice realization are then studied from a higher gauge theory point of view. Symmetry protected topological phases protected by higher symmetry structures are explicitly constructed, and the gauging procedure which yields the corresponding topological gauge theories is discussed in detail. We finally study the correspondence between symmetry protected topological phases and 't Hooft anomalies in the context of these higher group symmetries.

Over the past few years, there has been a lot of progress in our understanding of quantum phases of matter [1,2]. A quantum phase may be defined as a path connected component in the space of models. Since the language that currently most accurately describes quantum many body phases of matter is quantum field theory, one may say that a quantum phase of matter is a path connected component in the space of quantum field theories.
Such a space is very difficult to study in its full generality but one may make some progress by restricting to smaller and perhaps more manageable subspaces. This is often done by introducing some adjectives which specify what kind of models or phases we are interested in. These adjectives may refer to the spacetime dimension, the kind of matter involved such as fermionic or bosonic, the symmetry structures the theory is endowed with, broad descriptions of entanglement patterns such as short-range or long-range entanglement, and broad properties about the spectrum of the theory such as gapped or gapless.
In this work we will always be interested in gapped phases of matter. Gapped phases are those that have a spectral gap, above the groundstate of the many-body Hamiltonian, that persists in the thermodynamics limit. Focusing on gapped phases greatly simplifies the tasks of classification and characterization due to the expectation that these phases are described by topological quantum field theories (TQFTs) in the thermodynamic limit. In other words, all geometric or non-topological correlation functions are exponentially suppressed in some characteristic correlation length scale that depends on the microscopics of the model. Thus, if we consider a setup where the system size is much larger than any microscopic length scale of the system, we would expect that the only correlation functions that survive are topological in nature and can be captured by a topological theory. Describing a gapped phase is thus easier because TQFTs are much simpler than QFTs in many ways, e.g. their configuration space usually reduces to a finite sum from an integral over an (often divergent) infinite dimensional space. 1 This being said, it is not completely clear that there is a bijection between TQFTs and physically realizable phases of matter, i.e whether all such theories can be realized by physically sensible Hamiltonian lattice models for example. In a recent beautiful work [4] the relation between TQFTs and gapped phases of matter was carefully studied for theories with global symmetries.
TQFTs were originally mathematically formalized by Michael Atiyah [5] and were later shown to have a strong category theoretical flavour [6,7]. In (1+1)d and (2+1)d the categorical content of TQFTs have been studied in great detail. The situation is however much more complex in (3+1)d. In the present work, we are partly motivated by the study of the categorical structure underlying higherdimensional models. We provide some evidence that the natural structures are based on categorical groups and their higher generalizations. This supports and extends the proposal by Lan et al. 8. In the above mentioned taxonomy of quantum phases of matter, such TQFTs will describe bosonic, gapped long-range entangled phases of matter without any symmetries. It is possible to discuss enrichment by symmetry [9][10][11][12][13], however, we do not cover this topic in this manuscript.
There is a particularly tractable class of TQFTs which have a topological gauge theory interpretation. Given a (d+1)-manifold, the data that goes into defining them is simply a pair (G, [ω]) where G is a finite group and [ω] ∈ H d+1 (G, U(1)) a cohomology class [14,15]. Such cohomological models are typically defined as space-time state-sum models as in the original paper by Dijkgraaf and Witten [14]. Considering a triangulation with a G-coloring of the 1-simplices, the path integral is just a sum over the moduli space of principal G-bundles and the topological action is provided by a cocycle ω ∈ [ω] evaluated on each (d+1)-simplices. Because of their gauge theory interpretation, it is particularly easy to define the corresponding Hamiltonian models [9,[16][17][18][19].
In (2+1)d, such topological gauge theories based on finite groups have been extensively studied. They turn out to have strong connections to (quasi)-Hopf algebras [20] and orbifold models in rational conformal field theories [21,22]. Given a finite group G and an element [ω] ∈ H 3 (G, U(1)), one can indeed construct a non-trivial quasi-Hopf algebra whose irreducible representations label the anyons of the corresponding topological gauge theory. This quasi-Hopf algebra is the so-called twisted Drinfel'd double D ω (G) of the group G. The corresponding Hamiltonian model is referred to as the twisted quantum double model [16][17][18] which reduces to Kitaev model [16] when ω is chosen to be trivial. Three-dimensional generalizations of such statements were explored in 19, 23, and 24. Besides topological gauge theories, there are other TQFTs in (2+1)d which have been actively studied. Among these are theories based on modular tensor categories (MTCs). A topological state-sum can be built from an MTC using the Turaev-Viro construction [25][26][27] while the corresponding Hamiltonian realization is provided by the Levin-Wen models. More recently fermionic versions of MTCs known as super-MTCs were studied [28][29][30]. Objects in such categories have a natural Z 2 -grading provided by fermion number parity. The corresponding fermionic or spin-TFT state-sum models were studied in [31] and their Hamiltonian versions in [30]. Furthermore, there exists another class of models in (2+1)d that are almost-TQFTs. Canonical examples of these are Chern-Simons theories also known as Witten-Reshetekhin-Turaev theories [32][33][34]. These models are not TQFTs in a strict sense since they can only be well-defined by either provid-ing a framing of the three-manifold or by thinking of the three-manifold as the boundary of a four manifold which houses an almost trivial TQFT.
In comparison much less is known in (3+1)d. The only known classes of TQFTs with intrinsic topological order 2 are topological gauge theories built from groups or group-like structures. There has been significant recent progress in the study of such theories [19,23,[35][36][37][38][39][40][41][42][43][44]. Another class of (3+1)d theories uses unitary braided fusion categories as the input. State-sum models for these theories are then provided by Crane-Yetter models [45][46][47] and the corresponding Hamiltonian models are the so-called Walker-Wang models [48]. However, in the case where the fusion category is modular, such models are trivial in the sense mentioned above (groundstate degeneracy and fractionalized excitations). In this work, we focus on the former class, namely topological gauge theories.
Our study follows two parallel approaches. The first one involves Levin-Wen models obtained by coloring the oneskeleton of a triangulated d-manifold with objects of a group-like categories. Such models take as an input a map which performs a specific change of triangulation, namely a d-dimensional Pachner move. We then study the algebraic constraints that emerge from the consistency relations that such maps must satisfy, or equivalently, from requiring topological invariance of the corresponding (d+1) state-sum. To do so, we begin by analyzing the above question in the simpler setting of (2+1)d. Starting from the category C-Vec G of G-graded vector spaces, which is relevant for topological G-gauge theories, we can show that the freedom to weaken the associativity condition is captured by cohomological classes [α] ∈ H 3 (G, U(1)). But the consistency condition that the map performing a two-dimensional Pachner move must satisfy is precisely the 3-cocycle condition. Similarly, using simplicial arguments [49], we can show how the consistency condition of the map performing a three-dimensional Pachner move corresponds to the coherence relation of a structural 2morphism of a given monoidal 2-category. Starting with this 2-category, it is very natural to relax certain identities by introducing additional structural 2-morphisms while preserving topological invariance. In doing so, we obtain a (weak) monoidal 2-category whose underlying (weak) 1-category is given by a 2-group. 3 This takes us to our second approach. 2 We define theories with intrinsic topological order as those that have (i) non-trivial groundstate degeneracy that depends on the topology of the manifold (ii) fractionalized excitations i.e dynamical operators of the theory that have topological correlation functions and (iii) the theory has long range entanglement. 3 A 2-group is an algebraic structure one obtains by categorifying a group. In its weak version, it can succinctly be defined as a (weak) monoidal category whose 2-morphisms are all invertible and 1-morphism are weakly invertible [50].
Our second approach involves directly constructing state-sum models from 2-groups [51][52][53][54] as higher gauge theories. This is done in two equivalent ways: (i) By endowing a triangulated four-manifold with a G-coloring with a given 2-group G, (ii) building topological gauge theories as sigma models of the classifying space BG of the 2-group. In (i), the G-coloring together with some constraints define a flat G-bundle. The Dijkgraaf-Witten approach can then be generalized straightforwardly. By allowing the topological action to be a non-trivial element of the cohomology group H 4 (G, U(1)), we define distinct topological gauge theories built from 2-groups. Given a topological group G, the classifying space BG is a space which satisfies in particular the important property that its fundamental group is G and all other homotopy groups vanish. Furthermore, for a discrete group G, homotopy classes of maps from M to BG are equivalent to isomorphism classes of flat G-bundles that are locally 1-cochains. Similarly, we can define a space B q+1 H, where H is an abelian group, such that π q+1 (B q+1 H) = H and all other homotopy groups of B q+1 H vanish. Homotopy classes of maps from M to B q+1 H are equivalent to isomorphism classes of flat (q+1)-form H-bundles denoted by H [q] bundles, i.e. BH [q] ≡ B q+1 H. Finally the classifying space of a 2-group in (ii) may be understood as a fibration of classifying spaces of groups H [1] over G. With such an understanding of the classifying space of a 2-group, we can define topological higher gauge theories quite straightforwardly. The partition function reduces to a sum over homotopy classes of maps and with the topological action provided by the pullback of a representative of a cohomology class on the classifying space. Throughout this manuscript, we contrast and compare the original Dijkgraaf-Witten approach for groups with higher form groups, 2-groups and other generalizations.
Note that the subject of gauge theories built on categorified groups is not exactly a new one. In 55, D. Yetter defined a TQFT for three-manifolds based on 2-groups in a manner analogous to Dijkgraaf-Witten theories but without any cohomological twist. In 56, the construction of Yetter was extended to homotopy n-types such that the classifying space of a 2-group is a homotopy 2-type and that of an ordinary group is a homotopy 1-type. Furthermore, in 57, Mackaay provided an explicit construction of TQFTs based on homotopy 3-type whilst including a cohomological twist. In 58 and 59, Martins studied invariants of knotted surfaces embedded in S 4 based on Yetter's TQFT. More recently, in the condensed matter literature, there have been several papers related to topological constructions based on 2-groups [60][61][62][63][64][65]. See also the recent exhaustive study of abelian continuous 2-group global symmetries arising in quantum field theories [66].
Apart from intrinsic topological orders, it is possible to define symmetry protected topological phases of matter (SPTs) with a 2-group as input data. In general, SPTs are gapped short-range entangled symmetric phases of matter that have unique groundstates. A classification of bosonic SPTs based on group cohomology was proposed in 67. The authors showed that in (d+1) dimensions distinct bosonic SPTs with symmetry G are labeled by classes [ω] ∈ H d+1 (G, U(1)). Furthermore, it was shown that given a representative cocycle ω, one can construct an exactly solvable fixed point model based on a statesum construction. Later, it was shown in 68 that it is no coincidence if the classification of such SPTs coincides with the classification of G-topological gauge theories. In fact gauging the global symmetry G in an SPT labeled by [ω] yields the Dijkgraaf-Witten model (G, [ω]). Furthermore, one notices that SPT topological invariants are the U(1)valued response functions that an SPT furnishes in the presence of a background G-bundle [42,[69][70][71][72][73].
Besides containing point-like operators, SPTs may also contain operators that are localized on q-dimensional spacetime submanifolds.
Global symmetries of qdimensional operators dubbed generalized global symmetries were studied by Gaiotto H). A flat G [q] connection is then be captured by a system of fields (g, h) ∈ Z 1 (M, G) × C q+1 (M, H) that satisfy the conditions dg = 0 and dh = α(g). In the special case where q = 1 we recover a 2-group G.
Following the above discussion, we are able construct exactly solvable state-sum models for four scenarios of matter field distribution: (i) Point-like matter with global symmetry G, (ii) q-dimensional matter with global symmetry H [q] , (iii) point-like as well as string-like matter with global symmetry G [1] ≡ G and (iv) point-like as well as q-dimensional matter with global symmetry G [q] . For each one of these scenarios, gauging the global symmetry requires coupling the theory to appropriate background symmetry bundles and showing that, upon summing over isomorphism classes of such bundles, one obtains the usual or higher-categorical generalizations of Dijkgraaf-Witten theory.
A particularly interesting aspect of SPTs is their boundary theories. Consider a (d+1)-dimensional SPT with a global symmetry structure X = G, H [q] , G [q] labeled by a cohomology class representative [ω] ∈ H d+1 (BX, U(1)), where BX is the classifying space of X. Since the the-ory is symmetric under X, it is possible to probe the symmetry by coupling the theory to a flat background X-bundle. Such a bundle is provided via a map from M to BX. This can be done on closed manifolds as well as open manifolds. In the case of an open manifold M such that ∂M = N , one can show that the response theory is invariant under reparametrizations of the background gauge field only up to boundary terms. For the theory to be well-defined, there must exist a condition on the ddimensional boundary which precisely cancels the lack of invariance of the (d+1)-dimensional topological response action on M. In other words, there must exist a boundary X-symmetric theory on N which can be coupled to a background X-bundle but so that its partition function is not invariant under gauge variation of X. This is precisely what is referred to as 't Hooft anomaly. Such scnearios are particularly interesting to investigate in the context of SPTs [70,[75][76][77][78] protected by 2-group symmetry [79,80] and its generalizations.

Organization of the paper
In sec. II, we review the construction of (2+1)d string net models focusing on Hamiltonian realizations of the 3d Dijkgraaf-Witten model. We emphasize how the unitary map performing a 2-2 Pachner move is related to the associator of the category of G-graded vector spaces. We present the (3+1)d generalization of this construction in sec. III where we now emphasize how the unitary map performing a 3-2 Pacher move is related to the pentagonator of the 2-category which yields the 4d Dijkgraaf-Witten model. We then consider a generalization of this 2-category which naturally leads to a model built on a weak 2-category whose underlying 1-category is a 2-group. In sec. IV, we present the notions of weak 2-group and flat 2-connection allowing us to construct topological models from groups, higher-from groups, 2-groups and further generalizations having a higher gauge theory interpretation. We are then able to recover the model obtained from a category-theoretical point of view. In sec. V, we provide state-sum models protected by 2-group (and generalizations of 2-groups) symmetry together with their lattice realization. The gauging procedure of such models is also exposed. Finally, we discuss in sec. VI the relations between SPTs in d+1 dimensions and 't Hooft anomalies for higher symmetries in d-dimensional TQFTs.
global q-form symmetry group 4 group action G 2-group G [q] higher-form generalization of a 2-group 5 triangulation of manifold M i i-simplex of triangulation g G-coloring of the 1-simplices of h H-coloring of the 2-simplices of cohomological class in H d+1 (X, R/Z) cohomological cup product 4 Note that for q > 0, H [q] as a group is always abelian. When q = 0, it reduces to a group by G which may be non-abelian. When gauging a q-form symmetry, one introduces a (q+1)-form flat gauge field whose classifying space is denoted by B q+1 H. 5 It is a mixed symmetry group acting on point objects as well as q-dimensional objects. When q = 1, we recover the 2-group G.

II. REVIEW OF (2+1)D STRING NET MODELS
The construction of higher-dimensional topological models proposed in the next section follows closely the definition of (2+1)d string nets. As such, we briefly review here the general string net picture. More details can be found in 17. Since we are interested in gauge models, we restrict our attention to models whose input data is a grouplike category. This is the setup of the twisted quantum double models [18]. More specifically we will present the Hamiltonian realization of the 3d Dijkgraaf-Witten model.

A. Fixed point wave functions
Gapped quantum phases of matter can be defined in terms of equivalences classes of states (or many-body wave functions) under local unitary transformations. These equivalence classes are associated with a given pattern of long-range entanglement which is the defining feature of intrinsic topological orders. Thinking of these local transformations as implementing a wave function renormalization group flow, the task to find equivalence classes of states boils down to defining fixed-point wave functions. The fixed-point wave functions are expected to capture all the universal long-range features of the corresponding phase. String net models, or Levin-Wen models [17], were introduced as a systematic way to construct ground states exhibiting the phenomenon of string net condensation. These models are expressed in terms of graphs. Each graph, together with a given labeling, defines a state. The Hilbert space of the model is then defined as the linear superposition of spatial configurations of string nets. In particular, the fixed-point wave functions we are interested in are obtained as superpositions of such graphbased states. These wave functions are specified uniquely by the local transformations defined on the lattice and in turn define ground states of given Hamiltonians.
At the most basic level, a string net is a network of strings such that each string is decorated by an object x ∈ C, where C is a collection of super-selection sectors.
We equip C with a vacuum sector 1 C and a duality map x →x such that the typex is assigned to a type-x string with opposite orientation. We choose the underlying network to be the one-skeleton of a triangulation of a 2-dimensional hypersurface Σ. Furthermore, we introduce some compatibility conditions associated with every 2simplex { 2 } which are referred to as the branching rules.
The branching rules are constraints between superselection sectors labeling the 1-simplices surrounding a given 2-simplex. Consider a 2-simplex and let {x 1 , x 2 , x 3 } be the super-selection sectors labeling the corresponding 1-simplices. The branching rules are such that if we assign a vector space V x1,x2 x3 to the 2-simplex, its dimension is non-vanishing only if the branching rules between x 1 , x 2 and x 3 are satisfied.
The input data for a given string net model is (a priori) given by a set {C, N, α, , r} where • ( 1) and r ( 1 ) are maps associated to each superselection sector labeling a 1-simplex.
• N ( 2 ) is a three-valent tensor which vanish if the triplet of super-selection sectors {x 1 , x 2 , x 3 } labeling the 1simplices bounding the 2-simplex 2 does not satisfy the branching rules.
• α ( 3) is a map which depends on the super-selection sectors labeling the edges of a 3-simplex (or alternatively a 4-gon).
In the following we will not write the super-selection sectors explicitly. Instead we will label the vertices and refer to the simplices on which the super-selection sectors live in. For instance (ab) refers to the edge going from the vertex b to the vertex a while x ab is the super-selection sector labeling it. The local unitary transformations which are required to be satisfied by the fixed-point wave functions can be represented as follows where the dots are used to make manifest the presence of certain vertices while the dashed line represents a 1simplex labeled by the vacuum sector 1 C .
For the conditions (1)-(5) to be self-consistent, some coherence relations need to be satisfied. More precisely, not every set {C, N, α, , r} can give rise to a string net condensed phase. In particular the maps α, and r need to satisfy the so-called pentagon and triangle relations.

B. Pentagon relation
Let us first focus on the pentagon equation. From a simplicial point of view, the local transformation (5) corresponds to the so-called 2-2 Pachner move denoted by P 2 →2 . Considering a given triangulation of a pentagon, it is possible to perform five different P 2 →2 moves so as to reach back the original triangulation. We represent this cyclic property as follows ( =: K 4 (01234) (6) where each small pentagon is labeled from 0 to 5 starting at the upper vertex and going clockwise, while the edges of the global pentagon, whose vertices are given by the small pentagons, represent a P 2 →2 local transformation. For instance the top left edge labeled by (0234) is associated with Each edge of the global pentagon are labeled by a 4-gon and are associated with a given P 2 →2 move which can be performed in both directions. As it turns out, we can also think of the edges of this global pentagon as being associated with a 3-simplex. The 3-simplices { 3 } are identified by the vertices labeling the 4-gon on which the P 2 →2 move acts. The transformation of the corresponding states is performed by the map α ( 3) ( 3) where ( 3 ) ± 1 is a factor which is defined according to the following convention:

Convention for the 2-2 Pachner move
Pick one of the two triangles 2 in the source 4-gon whose vertices define a 3-simplex 3 . Let us assume this 2-simplex is label by (abc) such that a < b < c. The remaining vertex is labeled by d. If it takes an odd number of permutations to bring the list (d, a, b, c) to the ascending ordered one, then ( 3 ) = +1, otherwise ( 3 ) = −1. For instance, in the example above, we can choose as 2-simplex 2 = (023). It takes three permutations to bring (4, 0, 2, 3) to (0, 2, 3, 4) and therefore α Interestingly, the five 3-simplices on which the map α is defined bound the 4-simplex (01234). Furthermore, we can associate a higher-dimensional Pachner move to this cycle of P 2 →2 moves, namely the following 2-3 Pachner move denoted by P 2 →3 : Again the five 3-simplices appearing in this P 2 →3 move are the fives simplices (0124), (1234), (0134), (0123) and (0234) appearing above. In addition, the triangulated pentagons labeling the vertices of the global pentagon in (6) correspond to faces of the union of the 3-simplices appearing in the move (7).
We explained above that the map α performing the P 2 →2 move comes with a sign which depends on the ordering of the vertices labeling the corresponding source 4-gon whose vertices also define a 3-simplex. This suggests that each 3-simplex comes with an orientation which determines the sign of ( 3 ) in the action of α. Using the explicit representation of these 3-simplices, there is a canonical way to determine such orientation independently of the corresponding P 2 →2 move:

Orientation convention of the 3-simplices
Pick one of the triangles in the 3-simplex 3 and look at the remaining vertex through this triangle. If the vertices of the triangle are ordered in a clock-wise fashion, then the orientation is positive, otherwise it is negative. For instance, we have where ⊗ represent the fourth vertex as seen from behind the triangle.
Applying this convention to the five 3-simplices appearing in (7), or equivalently the convention for the 2-2 Pachner moves to the coherence relation (6), and requiring that any sequence of P 2 →2 moves such that the initial triangulation is the same as the final one must be associated with a trivial map, one finds the following formal condition: which is usually referred to as the pentagon relation. More generally, the following result holds: Any sequence of P 2 →2 moves between two given triangulations of an m-gon leads to the same isomorphism between the corresponding vector spaces. 6 Before moving on to the triangle equation, let us make a final remark. The object denoted by K 4 (01234) introduced in (6) corresponds to the so-called fourth Stasheff polytope [81] associated with the permutation of vertices (01234). It is a combinatorial object which appears in many areas of mathematics defined as follows: 6 As we will see later, this is a consequence of Maclane's coherence theorem of category theory.

Stasheff polytopes
The K n Stasheff polytope, or associahedron , is an (n−2)dimensional convex polytope whose vertices correspond to all the correct bracketings of a word containing n letters. Or equivalently, the vertices are associated to all possible triangulations of an n-gon. The first five Stasheff polytopes are represented below: Given a Stasheff polytope, a codimension-p face is always isomorphic to a product of p+1 lower dimensional Stasheff polytopes. For instance, the pentagonal faces of K 5 are obtained as K 2 × K 4 while the quadrilateral faces are isomorhpic to K 3 × K 3 . This property has interesting consequences at the light of the correspondence between Stasheff polytopes and coherence relations of n-categories.
In the same way the polytope K 4 naturally describes the combinatorics of the pentagon equation which ensures the coherence of the P 2 →2 moves, we will emphasize later the fact that the polytope K 5 is associated with the higherdimensional coherence relation appearing in 3d string net models.

C. Triangle relations
The triangular relations are coherence relations for the maps and r and translate the fact that adding a line labeled by the vacuum sector as in (3) or (4) commutes with the P 2 →2 move. This guarantees the "invisibility" of the vacuum sector. The triangle relation can be represented via the following commutative diagram l (12) α (01 12) such that the vertices are ordered as follows: 0 < 1 < 1 < 2. Later we will refer to this triangle relation as the fundamental triangle relation since it is possible to deduce corollary triangle coherence relations using the fundamental one together with the pentagon relation. The local unitary transformations (1)-(5) associated with the input data {C, N, α, , r} satisfying the pentagon equation as well as the fundamental triangle equation fully characterize the fixed point wave functions we are interested in. It turns out that the defining properties for the fixed point wave functions that we have been spelling out are nothing but the defining axioms of a (weak) monoidal category.

D. Categorical aspects
In the following we will make explicit use of the category theoretical language in order to construct (3+1)d gauge models of topological orders. More precisely, we will emphasize how it is possible to recover higher gauge theory models by simply weakening some of the defining axioms of the category. As such, we will now review some basic definitions of category theory [82] and emphasize how it relates exactly to the previous string net construction.
A (weak) monoidal category consists of: • A category C whose collection of objects is denoted by Ob(C) and for each x 1 , x 2 ∈ Ob(C), the collection of morphisms between them is denoted by Hom C (x 1 , x 2 ).
• A functor m : C × C → C where we use the notation • An identity object 1 ∈ C.
• Natural isomorphisms: referred to as the associator, the left unitor and the right unitor. These structural morphisms must satisfy coherence relations which are encoded into commutative diagrams. For all objects x 1 , x 2 , x 3 , x 4 ∈ C, the associator is defined such that the following diagram commutes while the coherence relation for the left and right unitors reads x1⊗x2 (x1⊗1)⊗x2 x1⊗(1⊗x2) A strict monoidal category is obtained from a weak monoidal category by requiring the isomorphisms α x1,x2,x3 , x and r gx to be identitiy isomorphisms so that From the two previous commutative diagrams, we can deduce the following ones x1⊗x2 (1⊗x1)⊗x2 1⊗(x1⊗x2) which are referred to as the corollary triangle relations. From now on and for the rest of this paper, we will focus on a specific class of models, namely group cohomological models. In particular, we will now describe the category which yields the Dijkgraaf-Witten topological theory. This category will be the starting point of the (3+1)d construction.
The string net model which corresponds to an Hamiltonian extension of Dijkgraaf-Witten theory is built upon the weak monoidal category C-Vec α G of G-graded vector spaces over the field of complex numbers C. 78 A G-graded vector space is a vector space V with a decomposition V = g∈G V g . The tensor product is then defined as This category has finitely many simple objects which are the 1-dimensional G-graded vector spaces, therefore they are in one-to-one correspondence with the elements of the finite group G. These simple objects are denoted by δ g , g ∈ G and they are defined according to the formula Hom(δ g , δ h ) = C if g = h, 0 otherwise. The tensor product between simple objects reads δ g1 ⊗ δ g2 ∼ = δ g1g2 7 The category C-Vec α G is actually an example of pointed fusion category. However, for our purpose it is not strictly necessary to provide the corresponding additional structures. 8 Given a finite group G, it is possible to define two types of string net models based on the Vec G or Rep[G] fusion categories, respectively. This dichotomy is explained from a canonical quantization point of view in [83].
which is nothing else than the group multiplication. In order to define an associator α for the category C-Vec α G , it is only necessary to define it on the simple objects. We are therefore looking for a natural isomorphism which performs but since δ g1g2g3 is itself a simple object, it follows that the associator is valued in C. We further require α to be invertible such that it lives in C × . We denote this number by α(g 1 , g 2 , g 3 ) ∈ C × . It then follows from the commutativity of the pentagon diagram 9 that α(g 1 , g 2 , g 3 )α(g 1 , g 2 g 3 , g 4 )α(g 2 , g 3 , g 4 ) α(g 1 g 2 , g 3 , g 4 )α(g 1 , g 2 , g 3 g 4 ) = 1 (11) where it is assumed that the group action on the Gmodule C × is chosen to be trivial. Equation (11) is nothing else than the defining relation for a group 3-cocyle α ∈ Z 3 (G, C × ) (see app. A). Interestingly, we can read off from the corollary triangle relations that The fundamental triangle relation then provides the equality which implies that the maps g and r g are trivial if and only if α(g, 1, h) = 1, ∀ g, h ∈ G i.e. α is a normalized 3-cocycle. Note that for any given equivalence class in H 3 (G, C × ), there is a normalized 3cocycle. It follows from the fact that two cocycles α, α in the equivalence class [α] are related by α = αd (2) β with β a 2-cochain so that is a 3-coboundary. By definition a 3-coboundary is a 3cocycle which is in the equivalence class of the trivial one (see app. A for details). By choosing β(1, g) = α −1 (1, 1, g) and β(g, 1) = α(g, 1, 1), α = αd (2) β defines a normalized cocycle. Therefore, for a given equivalence class [α] ∈ H 3 (G, C × ), there always exists a normalized cocycle α norm. ∈ [α] such that the monoidal category whose associator is given by α norm. has trivial right and left unitors. Note that for a finite group G, there is no difference between the cohomology groups H d (G, C × ) and H d (G, U(1)). In the following, we will therefore interchange freely C × -valued and U(1)-valued group cocycles.
Let us now spell out the correspondence between (2+1)d string net models and monoidal categories in the case of C-Vec α G . The super-selection sectors labeling the 1simplices of the triangulation correspond to the simple objects in the category C-Vec α G which are in one-to-one correspondence with the group elements. The branching rules which dictate which colorings of the one-skeleton of the triangulation are admissible is directly provided by the functor m. For simple objects, the branching rules therefore boil down to the multiplication rule of the group G. Let us consider a 2-simplex labeled by (abc) with a < b < c, we associate super-selection sectors δ g ab and δ g bc to the edges (ab) and (bc), respectively, such that the super-selection sector labeling the remaining edge (ac) is obtained as δ g ab ⊗ δ g bc ∼ = δ g ab g bc . Using the correspondence we just established, we also have (12) which follows from the definition of the branching rules in terms of the functor, as well as the convention where δ g ab denotes the simple object in C labeling the edge (ab). We also introduced in (12) a more abstract notation which keeps the objects as well as the tensor product implicit, we will use it when we only want to emphasize the bracketings and when no confusion is possible. Furthermore, we can identify each map α (abcd) performing a P 2 →2 move with the corresponding associator, e.g. α (0134) ←→ α(g 01 , g 13 , g 34 ) = α(g 01 , g 12 g 23 , g 34 ) Applying the convention (12) to every pentagon appearing in (6) together with the previous correspondence between α thought as an associator and α thought as a map performing a P 2 →2 move, we obtain the coherence relation for the associator. Similarly, we obtain from the triangle equation (8) the coherence relation for the left and right unitors g and r g . Using these two relations, we can also deduce the corollary triangle relations.
To complete our review of (2+1)d cohomological string net models, it remains to describe the topological invariant underlying this model as well as the corresponding lattice Hamiltonian whose ground states are described by the fixed point wave functions.

E. State-sum invariant and lattice Hamiltonian
The topological invariant associated with the Hamiltonian model under consideration was introduced by Dijkgraaf and Witten in 14. We will provide a more detailed definition of the model further, but for our current purpose, it is enough to use its explicit formulation in terms of triangulation and group cohomology. Let us consider a simplicial decomposition of a manifold M and introduce an ordering of the vertices so as to orientate the simplices. To every 1-simplex, we assign a group element g ab ∈ G such that for every 2-simplex 2 = (abc) with a < b < c, we impose the flatness condition To every oriented 3-simplex 3 = (0123), we then assign the following topological action in terms of the group 3-cocycle α such that the state-sum reads The topological invariance follows from the fact that the cocycle condition ensures that the quantity above remains unchanged under transformations of the triangulation. Let us now define the lattice Hamiltonian whose ground states are given by the fixed point wave functions previously defined. To each 0-simplex of the graph we associate an operator A ( 0) which enforces the twisted gauge invariance. To every 2-simplex, we associate a projector B ( 2) which enforces the zero-flux condition.
The zero-flux condition for a given 2-simplex is nothing else than the branching rules. Therefore, the action of the B ( 2) operator is particularly straightforward as it simply enforces the super-selection sectors labeling the boundary of every 2-simplex to be compatible. We have for instance The action of the operator A is more subtle, however there is particularly convenient way of writing it in terms of the partition function (13). Let 3 = (0123) be a 3-simplex of the triangulation . The corresponding topological action is given by Let us now perform a gauge transformation at the vertex (0) with gauge parameter k such that g 1 → kg 1 . It follows from the cocycle condition that the change for the toplogical action under such gauge transformation is given by This suggests a way to construct the action of the operator A. In the string net picture, the situation we are interested in consists in the action of the operator A on a vertex v shared by several 2-simplices. In such situation, the action can be expressed in terms of the partition function as follows where cl(v) defines the minimal subcomplex of the triangulation containing all the simplices which contains v as a subsimplex and ∪ j refers to the join of the corresponding simplices [62]. Furthermore, the vertex v appear just before v in the ordered list of the vertices. For instance, let us consider a vertex (0) shared by (and only by) three 2-simplices. In this case cl(0) is just the subcomplex containing these three 2-simplices so that the join operation (0 ) ∪ j cl(0) reads In the following, we will refer to such operation as a tent move. Using the convention regarding the orientation of the three-simplices, we apply (15) and we obtain the following action: which matches the expression (14) for k = g 0 0 , as expected. We will use a similar argument later in the context of 2-group gauge theory models of (3+1)d topological phases. The operators A ( 0) and B ( 2) commute and the lattice Hamiltonian projector finally reads Note that the construction presented above, and in particular the equation (15), is rather general. In fact we will see later how it can also be applied to higher gauge models.
The starting point of our study of (3+1)d gauge models of topological phases is a straightforward three-dimensional generalization of the lattice Hamiltonian model (16), i.e. a Hamiltonian realization of the 4d Dijkgraaf-Witten model.

III. (3+1)D STRING NET MODELS
In the previous section, we briefly recalled the categorytheoretical flavor of string net models. In particular, we emphasized how the Hamiltonian realization of the threedimensional Dijkgraaf-Witten model is defined in terms of the category C-Vec α G which is characterized by a discrete group G and cohomology class [α] ∈ H 3 (G, C × ). In this section, we consider a straightforward generalization of the previous construction where the underlying topological quantum field theory is the four-dimensional Dijkgraaf-Witten theory. As such, the corresponding Hamiltonian model will be characterized by a discrete group G and a cohomology class [π] ∈ H 4 (G, C × ). We will emphasize in particular the relation between (2+1)d and (3+1)d models from a geometrical and category theoretical point of view. This will serve as a motivation for the higher gauge theory models we consider in the following section.

A. Fixed point wave functions
The string net model we are interested in is defined on the one-skeleton of the triangulation of a three-manifold. The super-selection sectors still label the 1-simplices of and the branching rules are enforced to hold at every 2-simplex. If we were to define the model on the dual complex * such that a 1-simplex of is dual to a face in * , we would obtain a membrane net model where super-selection sectors live on faces and branching rules are define at edges. Because is a triangulation, the branching rules at every edge would only involve three super-selection sectors labeling the faces meeting at the edge.
The main difference between the (3+1)d model and its (2+1)d analogue is the replacement of the 2-2 Pachner move P 2 →2 (and its corollary 1-3 Pachner move) by the 2-3 Pachner move P 2 →3 (and its corollary 1-4 Pachner move). Using the same notation as previously, this local unitary transformation reads where π ( 4) is a map which depends on the superselection sectors labeling the edges of a 4-simplex 4 . The 4-simplices { 4 } are identified by the vertices labeling the union of 3-simplices on which the P 2 →3 move acts. In the general case, the transformation of the corresponding states is performed by the map π ( 4) where ( 4 ) ± 1 is a factor which is defined according to the following convention:

Convention for the 2-3 Pachner move
Pick one of the 3-simplex 3 in the source polytope whose vertices define the 4-simplex 4 . Let us assume this 3-simplex is labeled by (abcd) such that a < b < c < d. The remaining vertex is labeled by e. Determine the orientation of the 3-simplex using the convention defined earlier. If it takes an odd number of permutations to bring the list (e, a, b, c, d) to the ascending ordered one, then . For instance, in the example above, we can choose as 3-simplex 3 = (0123). It takes four permutations to bring (4, 0, 1, 2, 3) to (0, 1, 2, 3, 4) and therefore π (01234) The same P 2 →3 move appeared before in (7) when describing the coherence relation (6) of the P 2 →2 move. It turns out that the commutativity of the pentagon diagram can be interpreted as having a trivial map performing the corresponding P 2 →3 move. Conversely, we will see how the fact of having a non-trivial map π performing the P 2 →3 can be understood as relaxing the commutativity of a given pentagon diagram.
Analogous to the pentagon relation, there is a coherence relation for the P 2 →3 move. Considering the union of three 3-simplices, there are two different ways to apply three P 2 →3 moves so as to obtain a complex which is the union of six 3-simplices. Applying the convention we just defined, this is illustrated by the following diagram from which we read off the following coherence relation π (02345) π (01245) π (01234) = π (01235) π (01345) π (12345) . Before describing the categorical structure yielding such model, we want to make a geometrical remark. First of all, the six 4-simplices on which the map π is defined bound a 5-simplex (012345). The same 4-simplices appear in a higher-dimensional Pachner move, namely a 3-3 Pachner move. Furthermore, as mentioned above, the pentagon relation whose combinatorics corresponds to the one of the fourth Stasheff polytope is associated to a 2-3 Pachner move, and conversely, we can associate to each P 2 →3 move appearing in the coherence relation of the map π ( 4 ) a Stasheff polytope K 4 ( 4 ). For instance, the top-right Pachner move performed by the map π (02345) is associated with a pentagon relation as follows: From these remarks, it is tempting to think that the coherence relation for the map π should be associated with a fifth Stasheff polytope K 5 (012345). It is indeed true and can be seen by drawing all the polytopes K 4 associated with each P 2 →3 move as we did above and then build the 3d polytope by identifying identical vertices and edges. The result of this procedure is presented in fig. 1. This simple geometrical remark motivates the study of this model from a category theoretical point of view since the same combinatorial structure naturally appears in the definition of a monoidal 2-category.

B. 2-categorical aspects
It has been conjectured for some time that the proper language to describe the input data of a (3+1)d state sum TQFT is the one of fusion 2-categories (see for instance 84). Over the years, there have been several attempts to define such structures, but there is no widely agreed upon definition yet. We will not attempt to fill this gap in this paper. We will merely focus on specific examples which fall within the proposals of Kapranov, Voevodsky and Mackaay [85][86][87]. More specifically, we will be interested in higher-gauge theory models which can be understood as special cases of Mackaay's construction of spherical 2-categories for finite groups.
We can think of 2-categories as a generalization of 1categories where on top of the objects and 1-morphisms, we add 2-morphisms so that the 2-category consists of: (i) Objects, (ii) 1-morhpisms between objects and (iii) 2-morphisms between 1-morphisms. Roughly speaking, these 2-morphisms can be used in order to weaken equalities between 1-morphisms in the same way as 1-morphisms are used to weaken the equalities (9) and (10) of strict monoidal 1-categories.
Recall that there are three natural 1-morphisms entering the definition of a monoidal 1-category, namely an associator, a right unitor and a left unitor. These 1-morphisms satisfy the pentagon equation and the three triangle equations. By adding specific 2-morphisms, it is possible to weaken such equalities. These 2-morphisms are structural 2-morphisms of the corresponding monoidal 2-category.
The first structural 2-morphism is the pentagonator π which relaxes the pentagon equation. In the language of commutative diagrams, this is represented as follows: where we define the 2-morphism π as going from the composition of the three morphisms at the bottom to the composition of the two morphisms at the top. In general, simple arrows represent 1-morphisms while 2-morphisms are represented with a double arrow. Similarly we can introduce three structural 2-morphisms λ, µ and ρ referred to as triangulators which weaken the triangle relations: Naturally theses 2-morphisms satisfy coherence relations of their own. We display below the commutative diagrams for the pentagonator π together with one of the diagrams involving the triangulators: where we keep implicit the objects as well as the tensor product between them. The first commutative diagram contains six pentagons. Each one of them corresponds to a pentagon relation weakened by a pentagonator. It turns out that the geometry and the combinatorics of this diagram is exactly the one the fifth Stasheff polytope drawn in fig. 1. This is the confirmation that the map π performing a P 2 →3 move in our (3+1)d string net model correspond to the pentagonator of a given 2-category which we are about to describe. We further notice on the commutative diagram (or the corresponding Stasheff polytope K 5 (012345)) the presence of three squares decorated by ∼ =. In the categorical formalism, this indicates the fact that composition of the 1-morphisms bounding this square is isomorphic to the the trivial morphism. More specifically, it translates here the fact that two independent P 2 →2 moves commute.
We now have enough information to describe the 2category yielding the lattice Hamiltonian whose ground state is described by the four-dimensional DW model, namely the category of G-graded 2-vector spaces denoted by C-2Vec π G . First, let us define the category of 2-vector spaces. There exists several definitions for such structure which are more or less abstract. In order to keep the level of abstraction to a minimum, we will only present the so-called coordinatized version. For more details about 2-vector spaces and monoidal 2-categories, refer to 85.
Recall that the C-Vec category is the category whose objects are finite-dimensional complex vector spaces and 1-morphisms are linear maps. The coordinatized version of this monoidal category is a category whose objects are formal symbols V [n] with n = 0, 1, 2, . . . and such that the collection Hom We define a 2-matrix M as a matrix whose entries M ij are finite-dimensional vector spaces valued in C. The coordinatized version of C-2Vec is a 2-category whose objects are formal symbols V is the set of all matrices T of linear operators T ij : M ij → N ij . In the following, it will be enough to remember that C-2Vec is a 2-category whose objects are 2-vector spaces, 1-morphisms are matrices of vector spaces and 2-morphisms are matrices of linear maps.
Let us now describe the monoidal 2-category C-2Vec π G . The objects of this category are G-graded 2-vector spaces such that the simple objects denoted by δ g are the 1dimensional G-graded 2-vector spaces and are in one-toone correspondence with the group elements in G. As before, the tensor product between simple objects is given by the group multiplication. We suppose that the associator, the right unitor and the left unitor are all trivial 1-morphisms. However, we weaken the pentagon equation as well as the triangle equations by introducing a pentagonator π and three triangulators λ, ρ, µ. These can be represented by functions of the group valued in C × such that π : G 4 → C × and λ, ρ, µ : G 2 → C × . This means that despite the triviality of the structural 1-morphisms as functions on G, the coherence relations are satisfied only up to a complex phase.
The correspondence between the (3+1)d string net models and the category C-2Vec π G follows exactly the same rule as in the (2+1)d case. For instance, we have as well as π (01245) ←→ π(g 01 , g 12 , g 24 , g 45 ) = π(g 01 , g 12 , g 23 g 34 , g 45 ) Applying this correspondence to the commutative diagram of the pentagonator, we obtain π(g 1 g 2 , g 3 , g 4 , g 5 )π(g 1 , g 2 , g 3 g 4 , g 5 )π(g 1 , g 2 , g 3 , g 4 ) π(g 1 , g 2 , g 3 , g 4 g 5 )π(g 1 , g 2 g 3 , g 4 , g 5 )π(g 2 , g 3 , g 4 , g 5 ) = 1 which is the group 4-cocycle relation for a cohomology class [π] ∈ H 4 (G, C × ). Similarly, we can obtain from the coherence relation between the pentagonator and the triangulators different equations between functions on G. It turns out that these relations imply that the triangulators are trivial 2-morphisms if and only if the pentagonator is a normalized 4-cocycle. In the following, we will make the assumption that the triangulators are trivial so that the pentagonator is a normalized 4-cocycle. This is reminiscent of the fact the right and left unitors are trivial if and only if the associator is a normalized 3-cocycle. Therefore the Hamiltonian model under consideration is characterized by a discrete group G and a cohomology class The lattice Hamiltonian can finally be built following exactly the same procedure as in the (2+1)d case. In particular, the B ( 2) operator acts exactly in the same way since the branching rules are the same as before while the action of the A ( 0 ) is now defined in terms of the partition function of the four-dimensional DW model. Let 4 = (01234) be a 4-simplex of the triangulation . The corresponding topological action is given by π( 4 ) ≡ π(g 1 , g 2 , g 3 , g 4 ). Let us now perform a gauge transformation at he vertex (0) with gauge parameter k such that g 1 → kg 1 . The 4-cocycle condition implies that the topological action changes under such gauge transformation as which suggests that we can use the same definition (15) for the operator A ( 0) as in the (2+1)d case but it is now associated to a four-dimensional tent move together with the four-dimensional DW model. The lattice Hamiltonian is finally provided by (16).

C. Generalizations
In the previous section, we presented the 2-category C-2Vec π G of G-graded 2-vector spaces. This 2-category is such that the simple objects are labeled by group elements in G, the underlying 1-category is strict, and there is a single non-trivial structural 2-morphism π : G 4 → C × which is a normalized 4-cocycle of H 4 (G, C × ). This 2-morphism is a pentagonator weakening the pentagon equation.
We emphasized, both in (2+1)d and (3+1)d, how the DW model has a lattice gauge theory interpretation. In particular, the state-sum model is invariant under gauge transformations acting at the vertices of the triangulation. We will now see how it is possible to define a new model with a higher gauge theory interpretation by weakening some axioms of the 2-category C-2Vec π G . Effectively, it will amount to replace the gauge group G by a gauge 2-group G which will correspond to the underlying 1category of the new 2-category.
Roughly speaking, the strategy we follow consists in making our 2-category richer by weakening some of its defining axioms. Firstly, we would like to turn the underlying strict monoidal 1-category into a weak monoidal 1-category. Recall that the 1-morphisms of C-2Vec π G correspond to matrices of vector spaces. Let H be an abelian group such that G act trivially on it. We will now consider that the 1-morphisms correspond to matrices of H-graded vector spaces. We denote the corresponding category by C-2Vec π G,H . Let us further introduce an associator α turning the underlying category of C-2Vec π G,H into a weak monoidal 1-category. As before, it is enough to define such associators on the simple objects which are labeled by elements in G. Furthermore, we make the assumption that all the 1-morphisms are simple. This implies that given a simple object δ g we have Hom(δ g , δ g ) = H. Together with the pentagon equation, this implies that the associator α is an element of the cohomology class H 3 (G, H) and we denote the new category by C-2Vec π,α G,H . We could complete the weak monoidal category by introducing right and left unitors, however we will pick them to be trivial which in turn implies that α is a normalized cocycle.
At this point we would like to emphasize the fact that the associator α is a group 3-cocycle valued in H despite the fact that the 2-category C-2Vec π G,H possesses a pentagonator π which weakens the corresponding pentagon equation. It is not a contradiction in the sense that the associator does satisfy the 3-cocycle condition as a 3-cochain valued in H but the pentagon equation is only satisfied up to a morphism valued in C × .
The 2-category under consideration is now a monoidal 2category whose underlying 1-category is a weak monoidal 1-category and such that there is a pentagonator valued in C × . We can enrich further the category by introducing additional strutural 2-morphisms. The most obvious possibility consists in weakening the associativity of the 1-morphisms by introducing a 1-associator. However, in order to keep the notation simpler, we will assume such 1-associator to be trivial. There is another possible set of 2-morphisms which can be introduced. We mentioned above that the commutative diagram of the pentagonator whose combinatorics is the one of the fifth Stasheff polytope involves three commutating squares which translates the fact that independent P 2 →2 should commute. We now would like to introduce three 2-morphisms τ I , τ II and τ III which weaken these three square commutative diagrams as 10 We will refer to these 2-morphisms as squarators. Remember that we work under the assumption that all the 1-morphisms are simple such that the set of invertible morphism between 1-morphisms is C × . The first 2-morphism in the commutative diagrams above explicitly reads τ I α(g1g2g3,g4,g5),α(g1,g2,g3) . These squarators satisfy consistency conditions given by three-dimensional commutative diagrams which may involve additional morphisms. We will not reproduce them here but these can be found in 85.
After introduction of the squarators, the commutativity of the diagram (17) now reads g1,g2g3g4,g5),α(g2,g3,g4) so that the pentagonator π cannot be thought as a cocycle anymore but a 4-cochain. We can check that the righthand-side of this equation is a 5-cocycle in H 5 (G, C × ) referred to as the obstruction class. However, in order for this equation to be consistent, it is necessary for this obstruction class to be in the equivalence class of the trivial cocycle. In such a case, the model is qualified as "obstruction free".
Putting everything together, we obtain our final category denoted by C-2Vec π,α,τ G,H . This is a monoidal 2category which consists of: • A collection of simple objects δ g which correspond to the group elements of G.
• Squarators τ I , τ II , τ III : We can make the restricting assumption that the squarators τ I , τ II and τ III are chosen so as to evaluate to a function h2) with B(•, •) a bilinear form on H valued in Q/Z such that We further require for simplicity that for all h 1 , h 2 ∈ H, τ (h 1 , h 2 )τ (h 2 , h 1 ) = 1. The bilinearity of B implies the following consistency conditions which correspond the horizontal and vertical compositions of the corresponding 2-morphisms, respectively. We can then check that these conditions are compatible with the coherence relations of the morphisms τ I , τ II and τ III (still in the case where the 1-associator for the 1-morphisms is trivial). Under this assumption, we can make a connection with the state-sum model introduced in 63 where the squarators are identified with the R-matrix of the abelian group H seen as an abelian braided fusion category with trivial F -symbols. The consistency condition above is nothing else than the hexagon equation for such an Rmatrix. Let us assume for a moment that the abelian group H is the permutation group of two elements Z 2 . In this case, we can choose the bilinear form B so that τ h1,h2 = (−1) h1+h2 . The coherence relation for the pentagonator then reads d (4) π(g 1 , . . . , g 5 ) =(−1) α(g1g2g3,g4,g5)+α(g1,g2,g3) g1,g2g3g4,g5)+α(g2,g3,g4) which can be more succinctly rewritten as d (4) where Sq 2 (α) is the Steenrod square of the 3-cocycle α. The Steenrod square which was first introduced in 88 can be expressed in terms of the 1-cup product 1 according to Sq 2 (α) := α 1 α (see app. A for more details). This obviously reminds of the super-cohomology appearing in fermionic topological orders [31,89].
With the introduction of the squarators 2-morphisms, the 4-cochain π ∈ C 4 (G, C × ) does not close anymore so that a DW state-sum model built out of π would not describe a topological invariant anymore, i.e., invariance under the P 3 →3 would not be satisfied. Equivalently, for the corresponding Hamiltonian model, this means that the coherence relation of the map π performing the P 2 →3 move would not be satisfied anymore. However, we can build a new state-sum model.
As for the DW model, we consider a simplicial decomposition of the manifold M and introduce an ordering of the vertices. To every 1-simplex, we assign a group element g ab ∈ G such that for every 2-simplex 2 = (abc) with a < b < c, we impose the flatness condition g ac = g ab · g bc .
In order to incorporate the associator which is represented by a cohomology class [α] ∈ H 3 (G, H) to the model, we assign to every 2-simplex a group element h abc ∈ H such that for every 3-simplex 3 = (abcd), we impose the fake 2-flatness condition Finally, to every oriented 4-simplex 4 = (01234), we assign the topological action such that we can define the following state sum model It is a bit lengthy but straightforward to check, using the condition satisfied by π which now can be rewritten that the state-sum above is invariant under P 3 →3 moves [63]. In the following, we will explain how such model can be understood as a cohomological model built out of a 2-group G. We will then sketch the construction of the corresponding Hamiltonian model.

IV. HIGHER GAUGE THEORY MODELS
Previously we introduced the 2-category C-2Vec π,α,τ G,H by progressively weakening some axioms of the category yielding the Hamiltonian realization of the four-dimensional DW model. We will now motivate this categorical structure from another point of view, namely higher gauge theory. In particular, we are going to show to what extent the partition function (19) is a special case of topological gauge theories built from a 2-group.

A. 2-connections and strict 2-groups
Ordinarily a gauge theory is built from a connection on a principle G-bundle where G is a discrete or continuous group. For topologically trivial bundles, a connection is fully prescribed by holonomies of a 1-form field A ∈ Ω 1 (M, g) where g is the Lie algebra of G. In case G is a discrete group, it is often more convenient to work with a local description wherein the analog of a 1-connection is a 1-cochain valued in G denoted by g 11 . A concise way 11 Here g may be understood as aČech 1-cochain for a general group G (abelian or non-abelian) or as a simplicial 1-cochain for to describe a G-connection is via the holonomy functor from the path groupoid of the manifold M to the group G. This definition requires some explanation. A path groupoid on a manifold M is a category where the objects are points on M and morphisms are paths between points. This is a groupoid as each morphism has an inverse that is provided by the reversed-path. In the path groupoid, composing morphisms is given by composition of paths. In the present discussion, we won't worry about smooth structure too much however it has been dealt with carefully in [54,90,91]. Similarly, in categorical terms, a group G is a groupoid with a single object. Morphisms from the object to itself are labeled by elements in G, composition of objects is by group multiplication and the identity morphism is provided by the identity element of the group. Flat connections can have non-trvivial holonomies along noncontractible paths only and therefore a flat G-connection can be defined as a homorphism from the fundamental group π 1 (M) to G. Locally, this means that a flat Gconnection is fully characterized by a 1-cocycle valued in G satisfying dg = 1 .
In analogy, a 2-connection on a 2-bundle can be defined most succinctly as a 2-functor from a certain path 2groupoid P 2 (M) to a 2-group G: A path 2-groupoid is a 2-groupoid, i.e, a 2-category in which every 1-morphism and every 2-morphism is invertible. More specifically a path 2-groupoid P 2 (M) for a manifold M is a 2-category with points as objects, paths as 1-morphisms and surfaces between paths as 2morphisms. A flat 2-connection may be defined in analogy to a flat connection as a homomorphism from the fundamental 2-group [92] to a 2-group 12 .
A 2-group G can be defined in several ways. In its weak version, it can be succinctly defined as a (weak) monoidal category whose 1-morphisms are all invertible and objects are all weakly invertible. We will make use of this definition eventually, however for now, we will consider strict 2-groups which can be defined as a 2-groupoid with a G abelian. In either case, there is an equivalent description using a G-coloring of a triangulation of the manifold M which we make explicit in the coming sections. We will often find it necessary to work with cochains or G-colorings satisfying some (possibly twisted) cocycle conditions. These structures can be generalized straightforwardly to higher-form groups H [q] and higher 2-groups G [q] . 12 Roughly speaking a fundamental 2-group of M may be thought of as a path 2-groupoid of M with paths and surfaces replaced homotopy classes of paths and surfaces, respectively.
single object such that all 1-morphisms and 2-morphisms are invertible. The 1-morphisms are labeled by elements of a group Γ 1 which compose according to the group multiplication in Γ 1 , i.e.
where g, g ∈ Γ 1 and • refers to the single object in the category. The set of 2-morphisms from the identity 1- Hom(1, g) .
Given such a 2-morphism h, we denote the target 1morphism by t(h) such that where the identification follows from the vertical composition being given by the group multiplication in Γ 2 . As a matter of fact, 2-morphisms can be composed both vertically and horizontally. The horizontal composition implies in particular that for two 2-morphisms h, h ∈ Γ 2 , it is simply the product hh ∈ Γ 2 , which in turn implies that the map t : Γ 2 → Γ 1 is a group homomorphism, i.e.
The horizontal composition of 2-morphisms can also be used to define a Γ 1 -group action on Γ 2 such that : .
It turns out that the quadruple G = (Γ 1 , Γ 2 , t, ) introduced above defines an algebraic structure known as a crossed module [93]. In particular, we can show that the set (Γ 1 , Γ 2 , t, ) satisfies the properties which enter the definition of a crossed module. The first relation follows from the definition of while the second one is a bit more subtle and can be shown diagrammati-cally as follows More generally, the domain of a 2-morphism need not to be the identity 1-morphism in which case we label it by a tuple λ ∼ (g, h) ∈ Γ 1 × Γ 2 where g refers to the source 1morphism. When λ : g → g we can introduce source and target maps s, t : Γ 1 × Γ 2 → Γ 1 which map a 2-morphism to its source and target 1-morphisms, respectively. In terms of the data of the crossed module introduced above, these can be expressed as Note that a general 2-morphism is still valued in Γ 2 , however the horizontal composition is not the group multiplication in Γ 2 anymore but instead it is a mutliplication in the semi-direct product Γ 2 Γ 1 which depends on the source 1-morphisms. Hence the labeling by an element of Γ 1 × Γ 2 . The horizontal composition is finally defined by the following diagram Furthermore, the vertical composition now reads where λ · λ = (g, h h). Horizontal and vertical compositions must be compatible with one another. This is encoded in the fact that the diagram implies that the following equation must hold It is straightforward to show that this is true for the composition rules define above.
Having defined the structure of a strict 2-group, we return to the original motivation of studying hol 2 which describes a 2-connection. The functor hol 2 would assign elements of Γ 1 to the paths on a manifold M and elements of Γ 2 to paths between paths. Furthermore these assignments must compose in a coherent way adhering to the structure of the (strict) 2-group described above. Since our main purpose is to analyze topological models, we will only need to work with flat 2-connections. It turns out [94,95] that in analogy with flat connections, a flat 2-connection can be fully determined by a 1-cochain g valued in Γ 1 satisfying and a 2-cocycle h valued in Γ 2 , but which compose as Γ 1 Γ 2 , satisfying where the differential d g on 2-cochains evaluated on a 3-simplex (abcd) reads D. Yetter constructed an interesting topological invariant for a manifold M from a crossed module or 2-group G [94]. Let M be a compact oriented piecewise linear manifold. An admissible "G-configuration of M" is a configuration (g, h) satisfying the above constraints. Furthermore, we denote by b i the i-th Betti number of M. The Yetter's invariant I G (M) then reads Recall that while constructing the Hamiltonian extension of Dijkgraaf-Witten theory, we introduced a weak-version of a category whose group elements were labeled by a discrete group G. By weakening the associativity constraint, we were able to construct the most general topological gauge theories from group-like categories. Similarly, it is natural to construct topological gauge theories from weak 2-group-like 2-categories.

B. Weak 2-groups
Starting from the definition of strict 2-groups as 2groupoids with simple objects, we can define a weak 2group as a 2-category where all 1-morphisms are weakly invertible and all 2-morphisms are invertible. It was shown by Baez and Lauda [50] 13 that there is a one-to-one correspondence between equivalence classes of weak 2-groups and isomorphism classes of quadruples (G, H, , [α]) which consist of • An abelian group H = ker(t) • An action : G → Aut(H) • A cohomology class [α] ∈ H 3 (G, H) which corresponds to the first Postnikov invariant.
with t is the group homomorphism introduced above. Equivalently, if two 2-groups G and G are isomorphic, their classifying spaces are homotopy equivalent and, according to a theorem by Maclane and Whitehead [96], captured by the above data.
where the differential on 2-cochains evaluated on a 3simplex (abcd) now reads where we used an additive product rule since the group H is abelian. To summarize, g is a 1-cocycle and h is a 2-cochain satisfying a certain twisted cocycle condition controlled by α. 14 These cocycle conditions can be made natural by recalling that distinct flat 2-connections can be obtained via homotopy classes of maps from the manifold to a certain homotopy 2-type known as the classifying space of the 2-group. We defer a more detailed explanation to the next section. At this stage, we can use this result to redefine a weak 2-group as a weak monoidal category which consists of: Objects labeled by group elements in a group G which are weakly invertible, 1-morphisms labeled by group elements in an abelian group H which are invertible, and an associator α provided by a cohomology class in H 3 (G, H). 13 Strictly speaking Baez and Lauda show this for coherent 2-groups but since there is an equivalence between the category of coherent and weak 2-groups, this statement holds. 14 Note that we denote the cochains by (g, h) both in the case of a strict 2-group and an equivalence class of weak 2-groups. However in the former case they are valued in (Γ 1 , Γ 2 ) and in the latter one in (G, H).
Assuming a trivial action of G on H, 15 this is exactly the input data of the underlying weak monoidal 1-category in C-2Vec π,α,τ G,H defined in sec. III C. As we will see, it turns out that the state-sum introduced in (19) corresponds to a topological higher gauge model for the 2group (G, H, triv, [α]). In the following, we will always assume the the group G acts trivially on H for notational convenience.

C. Topological gauge theories from groups and group-like generalizations
There is a natural way to define topological gauge theories as sigma models with the target space being the classifying space of a group, 2-group or some other group-like generalization. The general form of the partition function reads where ω ∈ C d+1 (X where d : C d (X, R/Z) → C d+1 (X, R/Z) is the coboundary operator. Since we require (21) to hold for all bordisms one has ω ∈ Z d+1 (X, R/Z). Similarly we may ask, what is the effect of modifying the cocycle ω by a coboundary dλ where λ ∈ C d (X, R/Z). Clearly this has no effect when M is closed. When M is an open manifold it alters the action by a boundary term that can be absorbed into a U(1) phase when quantizing the theory. The redefined Hilbert space preserves amplitudes and hence describes the same theory. Therefore distinct topological sigma models are labeled by cohomology classes [ω] ∈ H d+1 (X, R/Z). 16 15 When defining the category C-2Vec π,α,τ G,H it would have been possible to introduce a non-trivial action of G on H but we chose not to do so for notational convenience. 16 Here we have switched from labelling cohomological models by cocycles valued in U(1) to an equivalent convention of labelling such models by cocycles valued in R/Z. Although these two formulations are clearly equivalent, we make such a switch because a lot of the discussion will be focussed on topological actions which are more naturally valued in R/Z.
In the following, we will be interested in situations corresponding to gauge theories built from: (i) An ordinary group G, which could be abelian or non-abelian, (ii) a higher-form group which we denote H [q] where q > 1 such that it is necessarily abelian, (iii) a 2-group G together with its higher form generalization (iv) G [q] . In these examples, the corresponding classifying spaces will be X = BG, B q+1 H, BG and BG [q] , respectively. Furthermore, we will emphasize the lattice descriptions corresponding to these different kinds of topological gauge theories. As such we briefly recall here the notations we have been using so far: We are interested in a (d+1)-dimensional, compact, oriented manifold M with a triangulation . We denote the vertices by labels a, b, c etc. and 1-simplices, 2-simplices, 3-simplices by (ab), (abc), (abcd) etc. , respectively. Each i-simplex is assigned an orientation which we denote (abc . . .) ∈ ±1 depending on whether the orientation of the particular simplex coincides with the orientation of M. The number of i-simplices is denoted by | i |.

Dijkgraaf-Witten theory
The Dijkgraaf-Witten partition function on a compact, oriented, (d+1)-dimensional manifold M takes the form with b 0 the 0-th Betti number. A property of BG that will be important for the present discussion is that its only non-vanishing homotopy group is in degree one, i.e π i (BG) is G if i = 1 and 0 otherwise. The topological action in (22) can thus be realized as a lattice TQFT action. Let M be equipped with an oriented triangulation . Since BG is path-connected (π 0 (BG) = 0), one may smoothly deform a map γ such that each 0-simplex (vertex) on M is mapped to the same point in BG. Edges or 1-simplices of the triangulation are mapped to the space of paths in BG which, up to homotopy, is G. Contractible paths are mapped to the identity element in G. This is obviously a rather familiar construction in lattice gauge theories as this is simply the lattice implementation of flat connection, i.e given a 2-simplex 2 = (abc) we assign group elements to the edges such that The Dijkgraaf-Witten partition function (22) can now be recast as a lattice gauge theory. Consider M with a G-coloring, i.e an assignment of group elements g ∈ G to every 1-simplex of M such that the above cocycle constraint is everywhere satisfied. Let the set of colorings be denoted by Col(M, G). It is easy to check that the coloring of each (d+1)-simplex depends on d+1 group elements. The topological action assigns a U(1) phase to each (d+1)-simplex which depends on the coloring g ∈ Col(M, G) and a group cohomology class representative of [ω] ∈ H d+1 (G, R/Z). For example in (3+1)d, consider a simplex 4 = (abcde), the topological actions reads e 2πiSω(g , 4 ) ≡ e 2πi ( 4)ω(gab ,g bc ,g cd ,g de ) so that the Dijkgraaf-Witten partition function takes the form 4) . (23) Note finally that if we would choose ω to be U(1)-valued instead of R/Z-valued, we would recover exactly the expression (13) in (2+1)d.

Higher-form topological gauge theory
Let us now consider an abelian group H which we would get upon gauging a q-form global symmetry H [q] . A topological gauge theory corresponding to this group is built from (q+1)-form H-valued cocycles. In (d+1)-dimensions these are classified by the cohomology group H d+1 (B q+1 H, R/Z) where B q+1 H is the classifying space such that π q+1 (B q+1 H) = H and all other homotopy groups vanish. The partition function is defined analogously to the Dijkgraaf-Witten model: [M] with b 0→q := q i=0 (−1) i b q−i . Similar to the case discussed above, homotopy classes of maps to B q+1 H define distinct flat (q+1)-form fields which are labeled by elements in Hom(π q+1 (M), H) which, since H is abelian, is H q+1 (M, H). Furthermore, since H is abelian, we can always construct a simplicial expression for the topological action in terms of cup products and H-valued (q+1)-cochains h (q+1) such that We can construct an explicit lattice gauge theory realization by considering colorings Col(M, H [q] ) of M, i.e. an assignment of group elements h (q+1) ∈ H to every (q+1)simplex which satisfy the cocycle condition dh (q+1) = 0. The partition function for the topological gauge theory takes the form In particular, for a trivial cocycle ω ∼ 0 ∈ H d+1 (B q+1 H, R/Z), the partition function simplifies and reads For q = 1, these topological gauge theories were studied in more detail in [38,40,74].

2-group topological gauge theory
Similar to the group case, one can construct a topological gauge theory from a 2-group G = (G, H, , α). The partition function mimics the Dijkgraaf-Witten model: [γ]:M→BG e 2πi γ ω, [M] for some ω ∈ H d+1 (BG, R/Z) where BG is the classifying space of the 2-group. The classifying space BG has nonvanishing homotopy in degree one and two such that In fact BG can be understood conveniently as a B 2 H fibration on BG, where B 2 H is the classifying space for 2-form H-connections. Therefore, the 2-group classifying space can be understood through the sequence

which is captured by the Postnikov class [α] ∈ H 3 (BG, H).
In analogy to lattice Dijkgraaf-Witten theory, we may finally understand isomorphism classes of flat G 2-bundles via homotopy classes of maps γ : M → BG [97].
Let M be a piecewise linear triangulated manifold (or more generally aČech or simplicial complex) such that the simplices are oriented following the same convention as before. Since BG is path connected, we may deform γ so that each 0-simplex is mapped to the same point in BG, then each 1-simplex gets mapped to an element of G such that contractible paths are mapped to the identity element which in turn imposes the cocycle condition corresponding to a flat bundle. In practice, it means that we assign to every 1-simplex a group element g ab ∈ G, such that for every 2-simplex 2 = (abc) we impose the flatness condition Similarly, 2-simplices are identified with group elements h abc ∈ H, such that for every 3-simplex 3 = (abcd) we impose the condition These two conditions are only a simplicial translation of the cocycle conditions satisfied by the cochains g and h 17 . As expected, these conditions match the ones introduced in III C. The topological action then assigns a U(1)-valued phase to every (d+1)-simplex, namely e 2πiSω(g|h , d+1 ) so that the partition function takes the form and (g, h) ∈ Col(M, G) the set of colorings for which the cocycle conditions written above are satisfied. It turns out that the topological action S ω defined in (18) was nothing else than an explicit representation of a non-trivial cocycle in H 4 (BG, U(1)). By linearizing this cocycle we would obtain a representative of H 4 (BG, R/Z) and the partition function (19) would match (26) in (3+1)d. In [60] different classes of cocycles [ω] ∈ H 4 (BG, R/Z) were enumerated so that a general 2-group cocycle can be expressed as a sum of such classes. We distinguish three types: • Cocycles for the ordinary group G which are naturally classified by H 4 (BG, R/Z).
• Cocycles corresponding to the 2-form group H [1] and are classified by H 4 (B 2 H, R/Z).
• Non-trivial combination of cochains valued in G, H which can be expressed in the form of a 4-cocycle It turns out that the 4-cocycle obtained in (18) can be understood as 2-group 4-cocycle which accounts for the first two classes presented above. 18 Generally, in the same way as the topological action of the Dijkgraaf-Witten model (22) 1)). Note finally that starting from the general formula (26) for the topological theory constructed from the 2-group G and assuming that the 2-group cohomology class is trivial, we recover the lattice version of Yetter's invariant, but this time for a weak 2-group, still denoted by I G (M) and defined as where # (G-colorings of M) is the number of colorings of the 1-simplices and 2-simplices satisfying the closure constraints (24) and (25). Here we have made use of the 18 This can be made more explicit by realizing that the squarators terms in (18) reproduces the Pontryagin square defined as Pf = f f − f 1 df out of which the cocycles corresponding to the 2-form group H [1] are constructed.
fact that there is a bijection between equivalence classes of admissible G-colorings of M and homotopy classes of maps [γ] : M → BG with BG. Also, starting with the model constructed from the 2-group G and assuming that the group G is trivial, we recover the 2-form gauge theory model presented in sec. IV C 2.

Further generalizations
Recently, interesting generalizations of the above 2-group structure were discussed by Tachikawa [80]. Let us call such a generalization G [q] . This structure can be defined via its classifying space which is a fibration As a topological space, BG [q] has non-vanishing homotopy in degree 1 and q + 1. More precisely, π 1 (BG [q] ) = G, π q+1 (BG [q] ) = H and all other homotopy groups vanish. The bundle obtained upon pulling back from BG [q] can be understood in terms of a local system of fields g and h (q+1) that satisfy H). Similar to the above constructions, one can construct a topological gauge theory as a sigma model with target space BG [q] . Such topological gauge theories are also classified by cohomology classes [ω] ∈ H d+1 (BG [q] , R/Z) and the partition function takes the form This can be realized more explicitly as a topological lattice gauge theory by considering a simplicial triangulation for the compact oriented manifold M with a coloring Col(M, G [q] ) which involves assigning G elements to 1simplices and H-elements to (q+1)-simplices subject to the above cocycle conditions. The topological action assigns a U(1) phase which depends on a representative of the cohomology class [ω].

D. 2-group gauge transformations
We presented topological models based on 2-groups which have a higher gauge theory interpretation. In this short section we emphasize what the corresponding gauge transformations are. 2-group gauge theory models have two sets of gauge symmetries. First we have the usual gauge transformations which will now be referred to as 0-form gauge transformations. These are parameterized by a gauge parameter k ∈ C 0 (M, G) and act at 0-simplices such that the G-group variables labeling the 1-simplices transform as The H-group variables labeling the 2-simplices are modified as well according to This condition ensures that the twisted cocycle condition is preserved under 0-gauge transformations: We also have 1-form gauge transformations. These are parameterized by a gauge parameter λ ∈ C 1 (M, H) and act at 1-simplices such that the H-group variables labeling the 2-simplices transform as with dλ abc = dλ, (abc) . Together the gauge transformations form a crossed module so that their action on the fields satisfies the following multiplication rule where we have reintroduced the group action , despite choosing it to be trivial, so as to make the semigroup structure of gauge transformations manifest.

E. Lattice Hamiltonian realization
We obtained earlier a generalization of DW model in (3+1)d by weakening some of the axioms of the corresponding category. This resulted in the definition of the 2-category C-2Vec π,α,τ G,H . We emphasized above how the underlying 1-category is actually the weak 2-group (G, H, triv, [α]), and in which sense the state sum (19) is actually a twisted 2-group model whose 4-cocycle ω defined in (18) represents a class in H 4 (BG, U(1)). In particular, this suggests a way to construct the lattice Hamiltonian corresponding to the string net model built upon C-2Vec π,α,τ G,H using the notions we just recalled about 2-groups, higher gauge theory and 2-connections. We will now sketch the general construction of such lattice Hamiltonian for a given 2-group cocycle which in (3+1)d would comprise the case of the C-2Vec π,α,τ G,H string net model. So we would like to construct a lattice Hamiltonian whose ground state is described by a 2-group TQFT using an approach analoguous to the one described in sec. II E. To do so without burdening the reader with unwieldy notations, we will consider a representative of an equivalence class [ω 3 ] ∈ H 3 (BG, U(1)). Note, however, that the model retains all the features of the four-dimensional case as far as the 2-group is concerned. The labeling convention for a 2-group 3-cocycle is the following: Labeling convention for 2-groups Let 3 = (abcd) with a < b < c < d be a 3-simplex of the triangulation . We consider a flat G-connection by assigning group variables g ab ∈ G to the 1-simplices and group variables h abc ∈ H to the 2-simplices. Using the differential on cochains, these group variables must satisfy dg = 1 and dh = α(g) at every 2-simplex and 3simplex, respectively. Because of the closure constraints, a 3-cocyle in H 3 (BG, U(1)) for the 2-group G, depends on three group variables g 1 , g 2 , g 3 ∈ G such that g b ≡ g b−1b and three group variables Using this labeling convention, we show in app. B how to obtain the 2-group 3-cocycle condition. We reproduce the corresponding equation below in a slightly different form: In sec. II E, we explained how the cocycle condition could be used to write down how the topological action is modified under a (0-form) gauge transformation. The result could then be used to define the corresponding projection operator in the lattice Hamiltonian picture. Let us now study how this strategy generalizes to the 2-group case using the cocycle condition written above. Let 3 = (0123) be a 3-simplex of the triangulation . The corresponding topological action is given by Let us now perform simultaneously: (i) A 0-form transformation at the vertex (0) with gauge parameter k ∈ G such that g 1 → kg 1 , 023 and h 3 → h 3 +ζ(g, k) 013 . (ii) Three 1-form gauge transformations at the 1-simplices (01), (02) and (03) with gauge parameters λ 01 , λ 02 , λ 03 ∈ H such that h 1 → h 1 − λ 02 + λ 01 , h 2 → h 2 −λ 03 +λ 02 and h 3 → h 3 −λ 03 +λ 01 . Putting everything together, we obtain the following gauge transformation where ζ(g, k) must satisfy the equation dζ(g, k) 0123 ≡ dζ(g, k), (0123) = α(kg 1 , g 2 , g 3 ) − α(g 1 , g 2 , g 3 ). We can therefore choose ζ(g, k) such that where ζ abc ≡ ζ(g, k) abc . Using a simple relabeling of the variables, it is now possible to use the 3-cocycle condition for ω 3 in order to rewrite how the topological actions transforms under the gauge transformation considered above. One has which can be used to confirm the gauge invariance of the state sum model. Furthermore it provides an explicit expression for the operator A v of the lattice Hamiltonian model acting on a vertex v shared by three 1-simplices and performing the gauge transformations described above: The same strategy applies when considering different 0form and 1-form gauge transformations. More generally, the action of the operator A v can be obtained using expression (15) where the state-sum is the 2-group one defined in terms of ω 3 . We postpone a thorough study of the complete lattice Hamiltonian to another article, however the same strategy applies for a 2-group 4-cocycle as for the one corresponding to the model built upon the 2-category C-2Vec π,α,τ G,H .

V. BOSONIC SPTS PROTECTED BY HIGHER SYMMETRIES: STATE SUM MODELS AND THEIR GAUGING
Symmetry protected topological phases (SPTs) of matter are short-range entangled, gapped phases of matter that are trivial in the absence of symmetry (say G) in the sense that if we allow ourselves to break symmetry G then these phases can all be adiabatically connected to the trivial phase. A manifestation of this triviality is that the partition function for SPTs on a topologically trivial manifold takes the form where ξ is some correlation length determined by the microscopics of the model and L is the system size. In other words the partition function of an SPT is unity up to corrections that are exponentially suppressed in the system size and therefore vanish in the thermodynamic limit. This is not unexpected since it is just a statement about the theory being short-range entangled and having a unique ground state. In order to unravel the non-trivial aspects of these phases, one must probe their symmetry properties. This is naturally done by coupling the phase to a background Gconnection A on some manifold M. Since these phases of matter are inherently short-range entangled (also referred to as invertible), the partition function in the presence of any background structure A and M (note that we treat the background topology and connection on a somewhat equal footing) can at most be a U(1) phase. Hence, distinct phases of matter must furnish topologically distinct actions built from data of G-connection A. Long ago Dijkgraaf and Witten [14] classified possible topological G gauge theories for a general group in dimension 3 and for a finite group in any dimension. Let us restrict ourselves to a finite group for simplicity. Then the topological actions take the form where ω ∈ H d+1 (BG, R/Z) and as before γ ∈ Map[M, BG], [M] ∈ H d+1 (M, Z) is the fundamental homology cycle and BG is the classifying space for G. This simply implies that bosonic SPT phases in (d+1)dimensions protected by group G are classified by group cohomology classes H d+1 (BG, U(1)) [67]. 19 In the above equation (27), γ ω should be thought of as a functional of local data which in our case is essentially a G-valued cocycle g. Hence we will often denote this interchangeably as ω(g) γ ω. Furthermore, when G is a discrete abelian group, we can always construct a simplicial expression for ω(g), i.e an expression in terms of cup products and codifferentials of local objects defined on a simplicial triangulation. The distinct SPTs protected by symmetry G, labeled by cocycles [ω] ∈ H d+1 (BG, R/Z) furnish the following partition functions when coupled to a background connection g on a manifold M More precisely we should specify that here G is a 0-form symmetry i.e it acts on point-like objects. Below we will consider several different situations, namely SPTs protected by (i) 0-form symmetry, (ii) q-form symmetry, (iii) 2-group symmetry and (iv) further group-like generalizations. We construct fixed point models for each of these cases. In order to gauge the symmetry we couple the model to background (i) 1-form connection, (ii) 2-form connection, (iii) 2-group connection and (iv) generalized higher group connection, respectively. These phases can be labeled as above by the topological response actions they furnish which are classes in , R/Z), respectively.

A. SPTs protected by 0-form symmetry
Bosonic SPTs protected by 0-form symmetry G and labeled by a cohomology class [ω] ∈ H d+1 (BG, R, Z) can be modeled as a lattice quantum field theory. Consider a compact, oriented (d+1)-dimensional manifold M with a given triangulation. Let k denote local matter degrees of freedom that live on the vertices of the triangulation and are valued in G. The model takes the form where we have the identification S ω (1 k , d+1 ) ≡ ω(1 k ), d+1 ≡ ( d+1 )ω(1 k ) which stipulates that the topological action evaluated via a pairing with a (d+1)simplex is the same as the corresponding group cohomology cocycle evaluated on this simplex via a choice of coloring. This is essentially (23) with g ab replaced by k a k −1 b . We note that ω(g) may have pieces of the form dg so that ω(1 k ) ≡ ω(dk) may contain terms with d 2 k. When G is abelian, we have an isomorphism G P i=1 Z ni for some P , n i ∈ Z, so that we may lift k to a cochain valued in Z P . Therefore G fits in the exact sequence n i Z and G = Z P . Furthermore, there is a natural homomorphism associated with the previous short exact sequence known as the Bockstein homomorphism where we should think of d 2 k as being an element of H 2 (M, G).
This model is invariant under the global symmetry transformation k a → k a K −1 where K ∈ Z 0 (M, G) Hom(π 0 (M), G) is a constant. We can gauge this global G-symmetry by firstly promoting K so that it represents a 0-cochain l, and secondly introducing a flat background G-connection g so that they tranform as As before the flat connection is obtained by coloring the lattice with group variables g ab ∈ G on every 1simplex such that for every 2-simplex 2 = (abc) one has g ac = g ab · g bc . The set of such colorings is still denoted by Col (M, G). Furthermore, we replace all the differentials on cochains by their covariant extensions, namely . The gauged SPT model therefore reads We may gauge away the bosonic degrees of freedom k by choosing l = k so that the gauged partition function finally takes the form where we made use of the fact that |G| | 0| = k∈C 0 (M,G) . As before, we have the identification S ω (g , d+1 ) ≡ ω(g), d+1 . As expected we recover exactly the Dijkgraaf-Witten partition function (23).

B. SPTs protected by q-form symmetry
We now consider models where the objects on which the symmetry group acts have support on q-dimensional manifolds embedded in spacetime submanifolds. In order to probe these symmetries we follow a procedure completely analogous to the one for 0-form symmetries, namely we introduce a flat background (q+1)-form connection h (q+1) . Such connection is captured by "holonomies" hol h ∈ Hom(π q+1 (M), H). Since H is always abelian for q > 0 [74], isomorphism classes of flat connections are elements in H q+1 (M, H).
We expect that phases of matter protected by q-form symmetry are in correspondence with topological actions that can be built from (q+1)-form connections h (q+1) via the Dijkgraaf-Witten prescription.
So given a class [ω] ∈ H d (B q+1 H, R/Z), one can construct an invertible lattice topological field theory that describes an SPT phase. The matter degrees of freedom denoted by λ (q) correspond to so-called q-connections (rather than H-valued q-cochains) whose space is provided by H). This may be thought of as a lattice analog of what is commonplace in gauge theory, i.e taking a quotient on the space of lie algebravalued forms by gauge transformations. The matter degrees of freedom λ (q) are mathematical objects that are identical to the gauge transformations of a H-valued (q + 1)-connection. Since when q > 1 the gauge transformations themselves have "gauge transformations", λ (q) ∈ C q (M, H) 20 . The partition function then reads H). In order to gauge this model we promote Λ (q) to a q-connection ξ (q) and introduce a (q+1)form flat H-connection h (q+1) satisfying dh (q+1) = 0 along with the gauge transformation The procedure to obtain the response action is identical to that for 0-form SPTs, we first gauge away λ (q) and then perform the partition sum to obtain which is a topological gauge theory for the symmetry group H [q] , or equivalently a topological sigma model with target space B q+1 H and topological action provided by a class representative of [ω] ∈ H d+1 (B q+1 H, R/Z).

C. SPTs protected by 2-group symmetry
Let us now construct SPT phases protected by a 2-group G = (G, H, , α). These SPTs must reduce to the usual group cohomology SPTs described in sec. V A when H is trivial and to the 2-form SPTs described in sec. V B when G is trivial. As such, these can be modeled as a state-sum model with degrees of freedom k ∈ C 0 (M, G) and λ ∈ C 1 (M, H) 21 . For an SPT labeled by a cocycle [ω] ∈ H d+1 (BG, R/Z), the model takes the form [60] (1 k |dλ+ζ(1,k) , d+1 ) 20 The configuration space of the matter degrees of freedom can alternately be motivated from the physical requirement that the partition function on a manifold M without any background H [q] field turned on must be unity. 21 Similar to h (q+1) , we drop the superscript on λ (q) when q = 1. with # G,H, = |G| | 0 | |H| | 1 |−| 0 | . Note that as before we have the identification S ω (1 k |dλ + ζ(1, k) , d+1 ) ≡ ω (1 k |dλ + ζ(1, k)), d+1 . The gauged SPT is obtained by coupling the model to a flat background G-connection so that the partition function reads where (g, h) ∈ Col(M, G) are such that dg = 1 and dh = α(g). This model has two sets of gauge transfromations, namely a 0-form gauge transformation with gauge parameter l which is a 0-cochain valued in G, and a 1-form gauge transformation with gauge parameter ξ which is a 1-cochain valued in H. Under the 0-form gauge transformation the flat connection (g, h) transform as whereas the matter degrees of freedom transform as k a → k a l −1 a and ζ(g, k) transforms as On the other hand, the 1-form gauge transformation acts as The model can be gauge fixed by setting l = k and ξ = λ to gauge away the matter degrees of freedom k and λ. The partition function then takes the form which is a 2-group topological gauge theory labeled by cohomology class [ω] ∈ H d+1 (BG, R/Z).

D. Further generalizations
State-sum models for SPT phases protected by G [q] can be constructed in a similar manner as the models described above. The matter degrees of freedom live on q-simplices and vertices of a triangulation of the (d+1)-manifold M.
We denote the degrees of freedom living on q-simplices as λ (q) where λ (q) ∈ C q (M, H). ω|SPT (M) H). This model has a global G [q] -symmetry which comprises of a 0-form part and a q-form part which act as where K ∈ Map(π 0 (M), G) is a constant and Λ (q) ∈ Map[π q (M), H] is an element of Z q (M, H). The model can be gauged by promoting K and Λ (q) to cochains l and ξ (q) such that and by introducing 1-form gauge field g and (q+1)-form gauge field h (q+1) . Coupling the model with this background connection amounts to the following replacements Under 0-form gauge transformations, we have We can finally gauge away the matter degrees of freedom by choosing l = k and ξ (q) = λ (q) . The gauged model finally takes the form where the sum is over configurations (g, h) satisfying dg = 0 and dh (q+1) = α (q+2) (g) with [α (q+2) ] ∈ H q+2 (BG, H). This is nothing but a G [q] -topological gauge theory.

E. Explicit lattice realization of 2-group SPTs
As explained above, SPTs are phases of matter satisfying three properties: (i) They display a global symmetry, (ii) they are gapped, (iii) the low-enery limit is described by a TQFT which is trivial. As for the corresponding intrinsic topological orders, these symmetry protected phases can be formulated as lattice quantum field theories.
In this section, we will present in detail an explicit lattice realization of SPTs protected by a 2-group symmetry together with the corresponding gauging procedure. In order to be as explicit as possible, we will focus, as in sec. IV E, on the three-dimensional case. However, the same strategy applies to any dimension. Let us consider a closed three-dimensional manifold M realized as a gluing of oriented 3-simplices 3 by picking a triangulation . We then consider a matter field configuration which is obtained by assigning group elements {k} of G to every vertex and group elements {λ} of H to every 1-simplex. We then consider a U(1)-valued function ν 3 which is evaluated on each 3-simplex so that partition function finally reads (k|λ) (28) with # (G,H, ) = |G| | 0| |H| | 1|−| 0| . We could also work with a linearized version of ν 3 valued in R/Z as in the previous sections but chose not to for notational convenience. For a given 3-simplex labeled as follows (k|λ) ≡ ν +1 3 (k 0 , . . . , k 3 ; λ 01 , λ 02 , λ 03 , λ 12 , λ 13 , λ 23 ). Recall that the system must display a global 2-symmetry such that the 0-form symmetry group is G and the 1-form symmetry group is H. This imposes the function ν 3 to be homogeneous, i.e. ν 3 (k 0 , . . . , k 3 |λ 01 , . . . , λ i<j , . . . , λ 23 ) such that K ∈ Z 0 (M, G) an Λ ∈ Z 1 (M, H). Furthermore, the low energy limit is described by a TQFT which requires invariance of the partition function under Pachner moves which in turn imposes the function ν 3 to satisfy the following condition where the notation • means that the corresponding element is omitted from the list. For instance, we have This function ν 3 turns out to represent a cocycle in H 3 (BG, U(1)).
Let us now show how gauging the global G-symmetry yields the topological model we discussed in the previous section. To do so we will generalize the procedure proposed in 98 to 2-groups. By fixing the global symmetry such that K = k 3 , Λ a = −λ 02 , Λ b = −λ 12 and Λ c = −λ 03 , we can rewrite the partition function (28) in terms of the function Let us now define another function ω 3 such that It follows from the condition (29) that the function ω 3 satisfies the usual 2-group 3-cocycle condition (see app. B).
We then deduce from the definition of ω 3 that the topological action (30) can be rewritten which is manifestly invariant under global G-symmetry (making in part use of the fact that we chose a normalization such that ζ(1 k , K) = 0 if K is constant). The previous expression can be rewritten in the synthetic form ω 3 (1 k |dλ + ζ(1, k)).
Let us now couple our SPT phase cohmological model to a flat G-connection. As explained in sec. IV B, this can be performed by assigning a group variable g ab ∈ G to every 1-simplex of the lattice and a group element h abc ∈ H to every 2-simplex. Furthermore these variables must satisfy conditions which are the simplicial translations of cocycle conditions, namely g ac = g ab · g bc and h bcd − h acd + h abd − h abc = α(g ab , g bc , g cd ). Graphically, the coupling to the flat 1-connection can be represented as follows in the case of a 3-simplex 3 = (0123): More generally the convention regarding the labeling of the edges and faces is the same as the one presented in sec. IV E. The insertion of these variables is such that the topological action now reads ω 3 (k 0 g 01 k −1 1 , . . . , k 2 g 23 k −1 3 |h 012 + dλ 012 + ζ(g, k) 012 , h 023 + dλ 023 + ζ(g, k) 023 , h 013 + dλ 013 + ζ(g, k) 013 ) , where we made use of the notation dλ abc ≡ dλ, (abc) = λ bc −λ ac +λ ab . The new topological action is now invariant under the 1-form gauge transformation h abc → h abc + ξ bc − ξ ac + ξ ab , λ ab → λ ab − ξ ab and the 0-form gauge transformation with k a a G-valued 0-form gauge parameter and ξ ab is an H-valued 1-gauge parameter. These are exactly the 2-group gauge transformations we introduced above.
By choosing l a = k a and ξ ab = λ ab we can set the matter field to the identity which shifts at the same time the flat G-connection configuration. If we now decide to integrate over the space of flat G-connections using the discrete measure 1/# G,H, , we can perform explicitly the sum over the matter field so as to recover the higher gauge model for the 2-group G: (g|h) .

VI. 'T HOOFT ANOMALIES FOR HIGHER SYMMETRY STRUCTURES
't Hooft anomalies for global symmetries in d-dimensional quantum field theories and symmetry protected topological phases of matter in (d+1) dimensions are very intimately related. Consider a QFT on a d-dimensional manifold N with a global symmetry. Global symmetries can be of different varieties. Restricting to unitary symmetries that do not act on spacetime indices, one can have 0-form symmetries, q-form symmetries, or symmetries corresponding categorically-higher versions of groups such as G or G [q] , as mentioned in the previous section. One might be interested in gauging these global symmetries, some subgroup or subcategory of them as the case may be. The usual method to carry out such a gauging procedure is to couple the theory to a background field and ask whether the theory is invariant under gauge transformations. More specifically, a background field is equivalent to a network of symmetry defects so that invariance under gauge transformations is equivalent to invariance under rearrangements of the defect structure.
For a quantum field theory on a d-dimensional manifold N , defects corresponding to 0-form symmetries are localized on (d−1)-dimensional submanifolds of spacetime while q-form symmetry defects are localized on (d−q−1)dimensional submanifolds. Defects corresponding to other categorified generalizations can also be appropriately defined. The goal in such case is to build a fine enough mesh with these symmetry defects so as to be able to triangulate the manifold N using a network of defects.
If the symmetry is healthy, i.e non-anomalous, the path integral of the quantum field theory assigns to the network of defects a U(1)-valued number that is invariant under changes of triangulation, i.e. rearrangements of the network.
Let us denote the path integral on a manifold N in the presence of background defects A X by Z (N , A X ). 22 A reparamentrization corresponds to a "gauge transformation" of A X so that we require A violation of this requirement would then take the form which are most naturally encoded in cohomology classes of degree d+1, i.e H d+1 (X, R/Z) where X is the classifying space of the group-like global symmetry structure. In other words, in most cases of interest, it is possible to find a cohomology class [ω] ∈ H d+1 (X, R/Z) and a manifold M satisfying ∂M = N such that the quantity depends unambiguously on the background field A X . In the equation above, ω(A # X ) should be understood as a cocycle evaluated on a background structure on M such that it restricts to A X on N as discussed in the previous sections. Therefore, d-dimensional QFTs with 't Hooft anomalies can be realized as symmetric theories on the surface of appropriate SPTs.
Below we discuss several examples of quantum field theories with 't Hooft anomalies corresponding to higherform symmetry and 2-group symmetries which can be realized on the surface of the corresponding higher-form and 2-group SPTs. Most of the examples we study correspond to gapped boundaries of SPTs.

A. Scenario 1: 1-form symmetry anomalies in (2+1)d abelian Dijkgraaf-Witten theories
In this subsection we study abelian Dijkgraaf-Witten theories in (2+1)d. We show that in general these theories have 2-group global symmetries. The 1-form symmetry subgroup of the 2-group is generated by the (abelian) line operators of the theory. Then gauging this 1-form symmetry implies condensing the corresponding lines. Such a condensation process may be anomalous if two or more of the lines are not-mutually local, i.e they have non-trivial braiding statistics. In this case, we say we have an abelian Dijkgraaf-Witten theory with an anomalous 1-form symmetry. We show that such a symmetry can be gauged on the surface of a 2-form SPT.
Let us consider global symmetries of abelian Dijkgraaf-Witten theories in (2+1)d. Since any finite abelian group is a product of cyclic groups, it is convenient to work with G = Z k n . This can be generalized to other finite abelian groups straightforwardly. Such Dijkgraaf-Witten theories admit a Lagrangian formulation of the form where we use the Einstein summation convention.
Here ω is a simplicial expression that represents a cohomology class in H 3 (G, R/Z) and the fields a, b 23 are cochains valued in G 24 . The above action (31) is invariant under both a 0-form and a 1-form symmetry transformations which together have the structure of a 2-group. The 0-form global symmetry group is provided by Aut ω (G), namely the subgroup of Aut(G) which preserves the cohomology class ω 25 , such that a given ϕ ∈ Aut ω (G) acts on the fields as The 1-form global symmetry group denoted by (G×G) [1] 26 such that λ = (λ a , λ b ) ∈ (G × G) [1] acts on the fields as λ : where λ I a , λ I b ∈ Z 1 (M, Z n ). Before attempting to gauge these global symmetries, let us explain how they form a 2-group. Earlier we saw that the data that prescribes a 2-group is: A group, an abelian (1-form symmetry) group, an action of the former on the latter, and a certain cohomology class. Let us call the 2-group of global symmetries of a particular Dijkgraaf-Witten labeled by [ω] by G (ω,α) . Clearly the first three pieces of data are the group Aut ω (G), the 1-form symmetry group (G × G) [1] and the obvious action of the former on the latter. In addition we must pick a 3-cocycle [α] ∈ H 3 (Aut ω (G), G × G). Then the 2-group G (ω,α) fits in the exact sequence 1 → (G × G) [1] → G (ω,α) → Aut ω (G) → 1 . 23 To avoid confusion we reserve using the notation g, h etc. for fields appearing in the response theory of the bulk SPT. 24 More precisely b labels charge excitations in these twisted quantum doubles and should therefore be valued in Rep(G) but for abelian groups Rep(G) G. 25 More specifically, one defines Autω(G) as ϕ ∈ Aut(G) ω(ϕ(g), ϕ(h), ϕ(k)) = ω(g, h, k), ∀g, h, k ∈ G .
Note that here we only consider those global symmetries that are obtained from automorphisms of G. Notably we do not consider electric-magnetic duality like symmetries that mix electric and magnetic sectors (a and b fields). 26 More precisely this is the 1-form symmetry only for type-(I),(II) Dijkgraaf-Witten theories, not for type-(III) as we will see shortly.
As expected gauging G (ω,α) would involve turning on a background 1-cochain g and 2-cochain h valued in Aut ω (G) and G × G respectively that satisfy the twisted cocycle conditions Let us now return to the more modest task of gauging the 1-form subgroup (G × G) [1] . As explained earlier, gauging a global symmetry is performed locally by relaxing the cocycle condition on λ I a , λ I b (32). We work explicitly by picking a cocycle in the group cohomology H 3 (G, U(1)). In general, discrete abelian groups have three families of 3-cocycles usually referred to as type-(I), type-(II) and type-(III) [99]: It is clear from the equations above that types-(I),(II) are quite similar so that we treat these cocycles separately from type-(III) cocycles. In the former case, the action (31) takes the form Under a 1-form gauge transformation (i.e treating λ I a,b as a Z n -valued cochains instead of cocycles) the variation of the action reads 27 In order to compensate for the new terms which depends on the 1-form gauge parameters, we couple the model with background 2-form gauge fields h I a and h I b which transform as so that the gauged action reads S gauged (I,II)|DW (N ) 27 Note that we drop boundary terms as N is a closed manifold.
Under gauge transformations, the variation of its action is finally given by δS gauged (I,II)|DW (N ) It turns out that the variation of the gauged action exactly cancels the boundary term in the variation of Together the 3+1d bulk and 2+1d boundary are gauge invariant under 1-form gauge transformations. Hence we have shown that it is possible to gauge a 1-form symmetry corresponding to non-mutually local abelian lines at the cost of introducing a (3+1)d bulk with the topological response action proposed above. Gauging a 1-form symmetry corresponding to mutually non-local lines implies trying to proliferate these lines freely commonly known as anyon condensation. It is clear that such a process cannot be well defined (i.e is anomalous) for an inherently (2+1)d theory due to the phase ambiguity that the partition function would accrue every time two mutually non-local lines cross each other. Next we show that no such anomaly exists for type-(III) Dijkgraaf-Witten theory as all the abelian lines are mutually local for such theories.
Consider the following action that describes type-(III) Dijkgraaf-Witten theories Recall that a 1-form symmetry is generated by abelian lines in the theory. It is known that the type-(III) theory for G = Z k n has only n k abelian line operators instead of |G 2 | = n 2k [99,100]. Therefore in this case the 1form symmetry is only G [1] instead of (G × G) [1] and is generated by the following abelian Wilson line operators Furthermore, the global 1-form symmetry acts as Since all these lines are bosonic and mutually transparent, we are able to gauge the 1-form symmetry 28 and the 28 Gauging a 1-form symmetry is synonymous to condensing abelian lines that generate the symmetry. If the lines are all bosonic and mutually transparent, they can be condensed and there is no 1-form 't Hooft anomaly [31,101].
gauged action reads It is then straightforward to show that this is invariant under the gauge transformation (33) and (N , G).

B. Scenario 2: Anomalies from gauging 1-form subgroup of 2-group symmetry in (2+1)d QFTs
We consider an H-topological gauge theory in (2+1)d where H is an abelian group. As we saw in the previous section, such theories have a 1-form symmetry which always has a subgroup H [1] . Let us consider the scenario where our QFT has a global 2-group symmetry with the 1-form part being H [1] , 0-form part being G and extension class being α ∈ H 3 (BG, H). We will see that by gauging H [1] , we realize a quantum field theory whose anomaly can be tuned by choosing [α] and can be cancelled by a 0-form SPT in (3+1)d protected by 0-form group G × H.
We begin with a theory with a 2-group global symmetry G, defined on a closed (2+1)d manifold N whose partition function we denote by Z th (N ) 29 . The global symmetry can be probed by coupling the theory to a background 2-group connection defined by the local data (g, h) satisfying the usual twisted cocycle conditions dg = 1 and d g h = α(g). We denote the partition function of the theory coupled to background 2-group connection by Z th (g|h , N ). The 1-form subgroup can be gauged by summing over equivalence classes of 2-chains h. The partition function after gauging H [1] ⊂ G is The gauged theory has a dual 0-form global symmetry H in addition to the original 0-form symmetry G. Therefore we can probe H by coupling to a background 1-cochainĥ as Under a gauge transformationĥ →ĥ − dλ, the partition function transforms as . 29 The superscript th is meant to denote theory. Similarly the superscript th/• implies the partition function for the same theory after • subgroup of the total global symmetry group has been gauged.
This anomaly can be absorbed by a bulk 0-form SPT in (3+1)d protected by the symmetry group G × H with the topological response More specifically, by choosing H = Z n and G = Z k−1 n we may obtain candidate surface theories for all (3+1)d bosonic SPTs protected by G × H = Z k n . Indeed, similar to (2+1)d abelian DW theories, (3+1)d DW are constructed from three kinds of cocycles which we call type-(II),(III),(IV). The topological action corresponding to type-(II),(III) takes the form [36,42]  Surface theories corresponding to these anomalies can be constructed via the above recipe by choosing α(g) ∝ g dg or α(g) ∝ g g g with the appropriate coefficient in (34).
An alternate construction for gapless surfaces of (3+1)d 0-form bosonic SPTs was provided in 42.

C. Scenario 3: Mixed 0,1-form anomalies from gauging finite subgroups of (2+1)d QFTs
We will now consider a situation which was recently studied in the interesting work by Tachikawa (1)) which is generated by the line operators of the gauge theory. We can probe these global symmetries by coupling the model with background fields g ∈ Hom(π 1 (N ), G) andĥ ∈ H 2 (N ,Ĥ). Such model has an anomaly which we can now express as More precisely, let the partition function of the original theory coupled to a background H-connection h ∈ Z 1 (N , H) be denoted by Z th (h , N ). We can dynamically gauge this symmetry by summing over classes of flat bundles. The partition function for the gauged theory then reads N ) .
This theory has a mixed 0-form and 1-form global symmetry which we write (G,Ĥ). This mixed symmetry can be probed by introducing a background system of fields (g,ĥ) ∈ Z 1 (N , G), Z 2 (N ,Ĥ) . It is crucial to notice that in the presence of background g, the gauge field h is no longer a cocycle but satisfies the relation dh = β(g). The theory th/H coupled to background (g,ĥ) takes the form This theory is not invariant under the gauge transformationĥ →ĥ +λ whereλ ∈ C 1 (M,Ĥ). It can be readily checked that it transforms as hence the anomaly valued in a 4d theory described by the topological response action M β(g) ĥ . These kind of response theories were studied previously in 60. The corresponding mixed 1,2-form topological topological gauge theory was analyzed in 104 and shown to furnish interesting Borromean-ring like triple link invariants between two surfaces and a loop knotted in four-dimensional spacetime.

D. Scenario 4: Anomalies from gauging 1-form subgroup of 2-group symmetry in (3+1)d QFTs
Consider a 4d version of Scenario 2 above. Let there be a QFT with global symmetry structure described by a 2-group G captured by the sequence 0 → H [1] → G → G → 0 where the extension class is [α] ∈ H 3 (G, H). We can gauge the 1-form symmetry H [1] by coupling to a background h ∈ Z 2 (N , H) 30 . Let the partition function be labeled Z th (h , N ). We can make the gauge field dynamical, i.e sum over isomorphism classes of flat 2-connections to obtain the gauged theory with partition function Z th/H [1] (N ) = 1 |H| b1−b0 [h]∈H 2 (N ,H) Z th (h , N ) 30 Note that in this subsection, N is a closed 4-manifold and M a 5-manifold such that ∂M = N .
Then the gauged theory has a global symmetry group which as a set can be described as (Ĥ [1] , G). As described above and in [80], the theory th/H [1] has an anomaly given by M α(g) ĥ (35) where we have introduced background fields g ∈ Hom(π 1 (M), G) andĥ ∈ H 2 (M,Ĥ) 31 . α(g) ∈ Z 3 (M, H) refers to the cocycle α evaluated on g. The background fieldĥ enters the action via the coupling N h ĥ , i.e, the gauged theory th/H [1] coupled to background fields (g,ĥ) takes the form e i (h ĥ +ω(g|ĥ)) Z(g|h , N ) where we have also included ω ∈ H 4 (G × H [1] , R/2πZ) which is the analog of the discrete torsion phase that shows up in orbifold conformal field theories for fourdimensional spacetime with a 2-group instead of an ordinary group. The anomaly may be computed straightforwardly by performing a gauge transformationĥ →ĥ + dλ whereλ ∈ C 1 (N ,Ĥ). Since dh = α(g), it can be seen that a term of the form (35) is required to cancel this gauge variation.
Alternately, we can consider a more interesting scenario where the theory 'th' is itself anomalous and has an anomaly of the form M h α(g) (36) where [ α] ∈ H 3 (G,Ĥ). Let us denote this theory by "th anom ". Then we may be interested in studying the anomaly structure of the theory one obtains by gauging the 1-form symmetry H [1] in theory th anom . In a recent study of SU(N ) gauge theories [105] a similar phenomena was shown to occur for a mixed anomaly between 0-form CP symmetry and 1-form center Z N symmetry (at θ = π).
As before let us label the partition function of th anom coupled to background fields (g, h) by Z thanom (g|h , N ). Then we may gauge by summing over isomorphism classes of flat 2-form fields [h] Z thanom/H [1] (g , N ) [h]∈H 2 (N ,H) Z thanom (g|h , N ) . 31 Here we use g,ĥ for both the fields on N and their extension to the 5-manifold M.
As before, the gauged theory th anom /H [1] has a dual 1form symmetry which may be probed by coupling to a background field h ∈ H 2 (N ,Ĥ [1] ) Z thanom/H [1] (g|ĥ , N ) We require the theory th anom /H [1] to be invariant under gauge transformations, h → h + dλ where λ ∈ C 1 (N , H). This requires imposing dĥ = α(g) in order to cancel the variation of the anomaly (36) which reminds us that the symmetry of the gauged theory is not a direct product of a 0-form and 1-form symmetry but in fact forms a nontrivial 2-group whose extension class is [ α] ∈ H 3 (G,Ĥ). Topologically distinct coupling to background (g,ĥ) are labeled by classes in H 4 ( G, R/2πZ) where G is the 2group which fits in the short exact sequence 0 →Ĥ [1] → G → G → 0 with extension class [α].

VII. DISCUSSION
Cohomological models of topological phases have been under intense investigation in the past years. So far they seem to encapsulate most of the known models of intrinsic topological orders in (3+1)d. For instance, it was argued in 8 that bosonic topological orders with bosonic pointlike excitations are classified by a pair (G, [ω]) with G a discrete group and [ω] ∈ H 4 (BG, U(1)). Furthermore, these models typically have a topological lattice gauge theory interpretation which is made prominent in the design of lattice Hamiltonian realization.
The goal of this manuscript was three-fold: Provide additional evidence that 2-category is the proper language to describe the input data of a (3+1)d string net model, emphasize how higher gauge theories naturally arise as a generalization of the group cohomological models, and finally study properties of these higher-gauge models built upon 2-groups.
Starting with the study of the Hamiltonian realization of the four-dimensional Dijkgraaf-Witten model, we used simplicial arguments to explain how the consistency condition of the unitary map performing a three-dimensional Pachner move corresponds to the coherence relation of a structural 2-morphism of a given monoidal 2-category, namely the pentagonator. The combinatorics of the corresponding commutative diagram is the one of the fifth Stasheff polytope. We were then able to identify the 2-category which yields the four-dimensional Dijkgraaf-Witten, namely the category of G-graded 2-vector spaces, such that the cohomological twists plays the role of the pentagonator. Thinking of this 2-category as a base, we were then able to obtain richer topological phases by relaxing some of its defining axioms. Most interestingly, in the process we turned the underlying 1-category into a weak 2-group. The corresponding topological theory could therefore be understood as a cohomological model for a 2-group which has a higher gauge theory interpretation. Exploiting this relation with higher gauge theories is key in order to derive the corresponding lattice Hamiltonian.
Following a strategy analogous to the one suitable to cohomological gauge models, we were able to describe the symmetry protected phases associated with the 2-group TQFTs, higher-form TQFTs and their generalizations. Further we described their lattice realization. Moreover, we explained in detail the gauging procedure which relate these symmetry protected phases to their respective topological orders. Finally, we provided a detailed discussion regarding the relation between these symmetry protected topological phases in d+1 dimensions and 't Hooft anomalies for global symmetries in d-dimensional quantum field theories.
An interesting question that we will address in the future is the characterization of the excitations for these higher gauge models of topological phases. In (2+1)d, it is well-known that the excitations of the Hamiltonian realization of the three-dimensional Dijkgraaf-Witten model are labeled by irreducible representations of the twisted Drinfel'd double [18,21,106,107]. Furthermore, it was shown in 19, 23, and 41 using dimensional reduction techniques that the three-dimensional generalization of Kitaev's double model yields excitations labeled by irreducible representations of the so-called quantum triple. We expect the excitations of topological models built upon 2-groups to be characterized by extensions of these algebraic structures. This will probably require us to make use of higher order representation theory [108]. A first step should be to study the excitations in the case of 2-form gauge theories. In three dimensions, these should yield point-like and membrane-like excitations.
Another prospect is the study of the Lagrangian formulation for such models in the continuum. We would then show how we can recover the lattice higher gauge models presented here upon canonical quantization. In particular, we would like to be able to provide explicit formulas in the spirit of (31). However, such explicit formula in terms of cochains are usually reserved for abelian groups. Therefore, we expect to study first the case of 2-groups built upon two abelian groups.
More generally, it would be very interesting to provide additional physical motivation for the study of such models. As we explained in this paper both from a category theoretical and gauge theory point of view, topological phases of matter built upon 2-groups appear very naturally. However, the role played by such models in physics needs further investigation.

ACKNOWLEDGMENTS
CD and AT contributed equally to this work. CD is supported by an NSERC grant awarded to B. Dittrich. AT is supported by NSF grant (under Grant No. NSF PHY-1125915) awarded to S. Ryu. We would like to thank Bianca Dittrich for discussions. AT would like to thank Davide Gaiotto, Shinsei Ryu, Lakshya Bhardwaj and Ken Shiozaki for numerous helpful conversations. This research was supported in part by Perimeter Institute for Theoretical Physics. Research at Perimeter Institute is supported by the Government of Canada through the Department of Innovation, Science and Economic Development Canada and by the Province of Ontario through the Ministry of Research, Innovation and Science.
We can now make the following statement: The coboundary d (n) ω n of ω n evaluated on n+1 is equal to the evaluation of the cocycle ω n on the boundary ∂ (n+1) n+1 of n+1 . This can be summarized as follows d (n) ω n , n+1 = ω n , ∂ (n+1) n+1 which is nothing else than the cohomological version of Stoke's theorem.

Appendix B: 3-cocycle condition for 2-groups
Let us consider a 2-group 3-cocycle ω 3 in H 3 (BG, U(1)). In vertue of the fact that a flat 2-connection is realized locally by a 1-cocycle and a 2-cochain, the cocycle ω 3 is a function of three group variables g 1 , g 2 , g 3 ∈ G and three group variables h 1 , h 2 , h 3 ∈ H. Applying the convention defined in the main the text in sec. IV E, the tetrahedron associated with ω 3 (g 1 , g 2 , g 3 |h 1 , h 2 , h 3 ) is given by