Dynamical generalization of Yetter’s model based on a crossed module of discrete groups

We construct a lattice model based on a crossed module of possibly non-abelian finite groups. It generalizes known topological quantum field theories, but in contrast to these models admits local physical excitations. Its degrees of freedom are defined on links and plaquettes, while gauge transformations are based on vertices and links of the underlying lattice. We specify the Hilbert space, define basic observables (including the Hamiltonian) and initiate a discussion on the model’s phase diagram. The constructed model reduces in appropriate limits to topological theories with symmetries described by groups and crossed modules, lattice Yang-Mills theory and 2-form electrodynamics. We conclude by reviewing classifying spaces of crossed modules, with an emphasis on the direct relation between their geometry and properties of gauge theories under consideration.


Introduction and summary
One of the most fruitful ideas in the study of phase transitions is Landau's theory [1], which classifies phases of matter according to their symmetries. Despite this success, it is currently known [2] that there exist transitions not driven by spontaneous symmetry breaking. In the case of gapped quantum systems, possibly with no symmetries, it has been proposed [3] that phases may be distinguished by their topological orders, which were later interpreted in more physical terms [4] as patterns of long range entanglement. Topological aspects of many body quantum physics also turned out to play a role in understanding the quantum Hall effect [5], topological insulators [6], superconductors [7] and other quantum phases of matter [8,9]. Several interesting applications arise in the study of geometry of Fermi surfaces [10]. Topologically nontrivial observables are often JHEP03(2021)282 robust against local perturbations, and hence have been suggested to possess potential to be used in fault-tolerant quantum computation [11,12].
A popular framework for description of topological order is that of Topological Quantum Field Theories (TQFTs) [13,14]. Many well-known TQFTs are gauge theories, for example Chern-Simons [14], BF [15] or Dijkgraaf-Witten [16] theories. Several constructions, such as the Turaev-Viro [17] or Crane-Yetter [18] models, are based on quantum algebra, e.g. fusion categories. There is a closely related line of study in which gapped lattice hamiltonian models are considered, such as in the Kitaev's quantum double model [11], Levin-Wen string nets [19] or Walker-Wang model [20]. One of advantages of this approach is that it provides not only the space of ground states, but also the part of information about its possible excitations which is universal for the given gapped infrared renormalization group fixed point.
In this work we study a generalized lattice gauge theory, which may be seen as a nontopological extension of the Yetter's 2-type TQFT [21]. It is shown that various TQFTs, as well as the lattice Yang-Mills theory with finite gauge group [22][23][24] and 2-form gauge theory may be obtained as limits of our model. We emphasize that the Hamiltonian of our model is not the sum of commuting local terms, so dynamics of its local excitations is expected to be nontrivial and beyond the scope of description purely in terms of TQFT.
A crucial role in the analysis of physical systems is played by symmetries. It has been suggested [25,26] that so-called higher symmetries, which act on extended objects, also play a significant role. An excellent example is provided by the center symmetry [27] in Yang-Mills theory (possibly with adjoint matter), which acts trivially on all local operators, but changes the value of Polyakov loops. Spontaneous breaking of this symmetry is responsible for a phase transition, which, however, is absent in QCD due to explicit breaking of the center symmetry.
Just as ordinary symmetries, higher symmetries may be used to derive selection rules on correlation functions. Moreover, they may be anomalous [28], which can be used to obtain theoretical constraints on the renormalization group flow. This is also related to the proposal [29] of Symmetry Protected Topological (SPT) phases [30] involving higher symmetries.
Higher symmetries may also be gauged, which leads to so-called higher gauge theories. One of the first models of this type, involving parallel transports over surfaces, was proposed in the context of string theory by Kalb and Ramond [31]. It has been argued [32] that higher gauge theories are necessarily abelian, essentially because there is no meaningful notion of time ordering on objects of dimension higher than one. To some extent this conviction is defied by models inspired by higher category theory [33][34][35]. In this case parallel transports are indeed valued in an abelian group, but they are defined in terms of genuinely non-abelian degrees of freedom. Besides truly dynamical models, higher gauge fields appear also in TQFTs such as the Yetter's model [21], its generalizations [29,[36][37][38][39] and hamiltonian formulations [40][41][42]. We refer to [40] for a comparison between these models. Higher gauge theories have also been proposed [29,43,44] as effective descriptions of Yang-Mills theory vacua.

JHEP03(2021)282
Conventional gauge theories depend on a choice of a gauge group. It has been proposed [33] that generalization of this notion suitable for theories with transports over surfaces [45][46][47] is a 2-group. There are several equivalent ways to define these objects [48].
Here we choose to work with the formulation through crossed modules, whose definition will be recalled in the main text. We remark that these objects have also found applications in the classification of defects [49], mathematically modeled as solitonic sectors of sigma models.
Models discussed in this paper allow non-abelian degrees of freedom associated to edges and faces of a spatial lattice. They are subject to a constraint called fake flatness. This enables to consistently define parallel transports over spheres, besides the more standard Wilson loops. As usually, there is a gauge freedom, which is however reduced with respect to that present in Yetter's model. This is necessary in order to preserve the dynamical (rather than purely topological) nature of the 1-form gauge field, and hence to construct models generalizing the Yang-Mills theory. We propose a suitable hamiltonian and discuss its symmetries and various special cases, including Yetter's theory. Ground states are described in several integrable limits, which allows to formulate initial conjectures concerning the phase diagram.
The organization of this paper is as follows. Section 2 sets the stage for subsequent developments. Most of the contained material is not new and has been discussed for instance in [42], but we do hope that our way of presenting it may be useful for some readers. In subsection 2.1 we review basic geometric notions used in the text. This allows to state precisely what is meant by field configurations valued in a crossed module. Interpretation of these fields is discussed in subsection 2.2, where we define also the basic observables. Subsection 2.3 is devoted to transformations of the configuration space, including a presentation of our motivation to restrict the group of gauge transformations. To our knowledge, plaquette transformations introduced there have not appeared in the literature. This simple definition is important in the construction of 2-form electric operators. Examples in subsection 2.4 illustrate several aspects of the subtle interplay between spatial topology and algebra of crossed modules, in which the fields are valued. In section 3 we complete the construction of our model and present first results about its dynamics. Then in subsection 3.1 we specify the Hilbert space and define basic operators, including the hamiltonian. In order to make this more concrete, in subsection 3.2 we carry out the construction explicitly in the case of a hypercubic lattice and a particular crossed module. Symmetries of proposed hamiltonians are discussed in subsection 3.3. Afterwards, in subsection 3.4, we describe ground states of four integrable limits of our model and in each case relate it to some well-known TQFT. This is followed by subsection 3.5, in which it is shown that in a certain region of the phase diagram, intermediate between TQFTs and the full model, one finds Yang-Mills theory or 2-form gauge theory. Appendices A and B are devoted to a review of certain technical, albeit standard mathematical tools used in the main text. The more extensive appendix C is devoted to a discussion of classifying spaces of crossed modules. Relation of classifying spaces to gauge theories based on crossed modules is derived. This offers an interesting perspective on several properties of higher gauge theories. These results are known, but we are not aware of a similar exposition in the literature.

JHEP03(2021)282
A natural next step would be to analyze the dynamics of proposed models in more detail, e.g. using perturbation theory. There exists a natural candidate for a state sum formulation of the model presented here, which could be studied using strong coupling expansion or Monte Carlo methods. Similar questions may also be asked about corresponding models with continuous spacetimes and crossed modules of Lie groups.

Geometric setup and field configurations
Homotopy classes of (parametrized) paths in a topological space form a structure very similar to a group, since they can be composed in a way which is associative and admits multiplicative inverses. There is only one complication: composition γ γ exists only if the "source" of γ coincides with the "target" of γ. This is abstracted by the notion of a groupoid, whose definition we now recall. A groupoid consists of: 1. sets G and Ob G , called the set of arrows and the set of objects, respectively, 2. functions s, t : G → Ob G , called the source and the target map, 3. an associative binary operation on G, denoted by juxtaposition, with γ γ defined if γ, γ ∈ G are such that s(γ ) = t(γ).
These data are subject to two axioms: a) For every object x there exists an arrow id x , with source and target x, such that γ id x = γ and id x γ = γ whenever these compositions are defined.
In further discussion we will abuse the language by calling the set G itself a groupoid. 1 We note that for any x ∈ Ob G the set of all γ ∈ G with x = t(γ) = s(γ) is a group. In particular, if Ob G has exactly one element, then G itself is a group.
If B is a subspace of a topological space A, the fundamental groupoid π 1 (A; B) has B as its set of objects and the set of homotopy classes of paths in A with (fixed) endpoints in B as the set of arrows. Source and target maps are obvious. A composition γγ is defined as γ followed by γ, which makes sense if s(γ) = t(γ ). We note that the fundamental group In our applications we shall consider connected spaces X equipped with a lattice decomposition. 2 In this situation we have a chain of inclusions where d is the dimension of X. Here X 0 is the set of vertices (also called lattice sites or 0-cells), X 1 is constructed by gluing in edges (links or 1-cells) to X 0 , X 2 by gluing in faces (plaquettes or 2-cells) to X 1 etc. 3-cells will be referred to as balls. We will make an extensive use of the groupoid π 1 (X 1 ; X 0 ). Its set of arrows may be described as the free groupoid generated by the edges of X. This means that any arrow is a product of some number of edges (identity arrows being understood as empty products), and that the only relations between two such products are those which follow from associativity of composition and identification of an edge e with orientation reversed with the inverse of the edge e. The above description of the fundamental groupoid is convenient for applications in field theory, since it is given in terms of local data. In some arguments another set of generators proves to be useful. Let us choose some * ∈ X 0 . The fundamental group π 1 (X 1 ; * ) is free [50, p. 83], i.e. there exists a set L of generators satisfying no non-trivial relations, called a basis of loops. Secondly, we may choose a maximal tree T , i.e. a maximal set of edges with the property that there exists no non-trivial loop composed entirely of edges in T . Then π 1 (X 1 ; X 0 ) is freely generated by L ∪ T .
A simple example is in order. Consider the space illustrated on figure 1. It has seven edges {e i } 6 i=0 . A basis of loops based at * may be taken as L = {l 1 , l 2 }, where l 1 = e 3 e 2 e 1 and l 2 = e −1 0 e 6 e 5 e 4 e 0 . Set T = {e 0 , e 1 , e 3 , e 4 , e 6 } is a maximal tree. groupoid π 1 (X 1 ; X 0 ) is generated by the loops l 1 , l 2 and the edges in T . There are no non-trivial relations between these generators. Now let G, G be groupoids. Map F : G → G is called a homomorphism if: 2 For the most part it would be sufficient to consider smooth manifolds with a triangulation, though we prefer to allow more general decompositions: CW-complexes with cellular attaching maps for 2-cells and 3-cells. Here we have in mind the standard CW-decompositions of S 1 and S 2 with exactly two cells. Many results can be formulated in even larger generality, but this class of topological spaces is sufficient for our purposes.

JHEP03(2021)282
We note that F 0 is uniquely determined by F and that the first property guarantees that the second one makes sense. The second property together with existence of inverse arrows implies that F takes identity arrows to identity arrows. If G, G are groups, F is simply a homomorphism of groups. To give a concrete example: lattice gauge field on X valued in a group G may be defined as a homomorphism π 1 (X 1 ; X 0 ) → G. Since there are no relations between distinct edges, regarded as arrows of π 1 (X 1 ; X 0 ), defining a lattice gauge field amounts to specifying independently a group element g e ∈ G for every edge e. The element associated to a path γ = e n . . . e 1 is g γ = g en . . . g e 1 . Alternatively, a lattice gauge field may be specified by giving a homomorphism π 1 (X 1 ; * ) → G for some * ∈ X 0 and the values of g e for edges e from any maximal tree T . These data can be chosen independently because there are no relations between generators of π 1 (X 1 ; * ) and elements of T . In order to capture twodimensional aspects of geometry needed to formulate models considered in this work, we need to review another algebraic structure. A crossed module of groupoids is a quadruple (G, H, , ∂) consisting of: These data are subject to the axioms: Properties 1-3 characterize the action , while Peiffer identites 4 and 5 are compatibility conditions between and ∂. If G has exactly one object, (G, H, ∂, ) is called a crossed module of groups. We proceed to motivate this lengthy definition by giving the example most important for our models.
For a topological space A, its subspace B and an element b ∈ B, the second relative homotopy group π 2 (A, B; b) of A relative to B and base b is defined as the set of homotopy classes of maps   classes of maps of a disc to A which map the boundary to B and a single point of the boundary to b. In the case B = {b} we abbreviate π 2 (A, B; b) = π 2 (A; b). Elements of this group are homotopy classes of maps S 2 → A, since a square with its boundary crushed to a point is a two-sphere. More generally, for a subspace C ⊆ B we let π 2 (A, B; C) be the groupoid with object set C and the set of arrows from c to c given by π 2 (A, B; c) if c = c and empty otherwise. Homomorphism ∂ : π 2 (A, B; C) → π 1 (B; C) is defined by mapping the homotopy class of a map σ to the homotopy class of σ| [0,1]×{1} , see figure 4.
Last, but not least, an action of π 1 (B; C) on π 2 (A, B; C) is defined on figure 5. Based upon the inspection of figures 3-5 one can show that Π 2 (A, B; C) = (π 1 (B; C), π 2 (A, B; C), ∂, ) satisfies all axioms of a crossed module of groupoids. For a detailed proof we refer to [60].
A homomorphism of crossed modules of groupoids (G, H, ∂, ) → (G , H , ∂ , ) is a pair of homomorphisms of groupoids, E : G → G and F :   Figure 7. Schematic representation of a map representing the element in π 2 (X 2 , X 1 ; b(f )) corresponding to a plaquette f . as a homomorphism Π 2 (X 2 , X 1 ; X 0 ) → G. In order to turn this concise definition into an operational one, we need a description of the groupoid π 2 (X 2 , X 1 ; X 0 ) in terms of explicit generators, preferably constructed in terms of local data. It is a nontrivial fact, which follows from the results of Whitehead [51,52], that this is indeed possible. 4 This is what we will review next.
For every face f we choose a basepoint b(f ) and an orientation. The boundary of f then forms a loop ∂f based at b(f ). See figure 6 for an example.
There exists a corresponding element f ∈ π 2 (X 2 , X 1 ; b(f )), given by the homotopy class of any map of the schematic form depictured on figure 7. By acting on faces with paths it is possible to obtain new elements, possibly based at different points. It turns out that the set of all γ f with s(γ) = b(f ) generates the groupoid π 2 (X 2 , X 1 ; b(f )). The only non-trivial relations between these elements follow from Peiffer identities and are of the form For the sake of example, we consider the real projective plane, X = RP 2 . It admits a decomposition with exactly one cell in every dimension up to 2 -see figure 8. In this case the groupoid π 1 (X 1 ; X 0 ) has one object * and one generator e. There is one plaquette f , with ∂f = e 2 . The relative homotopy group π 2 (X 2 , X 1 ; * ) is generated by elements f n := e n f , n ∈ Z. The first Peiffer identity gives ∂f n = e 2 , so relations (2.2) reduce to There are no other independent relations, so π 2 (X 2 , X 1 ; * ) ∼ = Z 2 .
We are now ready to explain what are field configurations in the considered models. In order to define a homomorphism Π 2 (X 2 , X 1 ; X 0 ) → G we have to assign an element e ∈ E to every edge e and ϕ f ∈ Φ to every face f . Since this assignment is to define a homomorphism π 1 (X 1 ; X 0 ) → E, we map a path γ = e n . . . e 1 to γ = en . . . e 1 . Element γ f ∈ π 2 (X 2 , X 1 ; t(γ)) has to be sent to γ ϕ f , by the definition of a homomorphism of crossed modules. Since any arrow in π 2 (X 2 , X 1 ; X 0 ) is a product of arrows of this form, the element ϕ σ ∈ Φ assigned to any σ is determined. We still have to make sure that this is consistent. Firstly, the definition of a homomorphism asserts that we should have for any face f.
We claim that there are no other constraints, since compatibility with the relation (2.2) is automatic. Indeed, equality follows from the fake flatness condition and Peiffer identities in G. To understand how field configurations look like in practice, consider the example of X taken to be the pentagon presented on figure 6. A field configuration consists of elements e 1 , . . . , e 5 ∈ E and ϕ f ∈ Φ subject to the constraint (2.6) In the above discussion we have been forced to choose base points and orientations for the elementary plaquettes. Distinct choices correspond to distinct choices of generators of the same algebraic structure. We close this section with an explanation how generators are transformed upon a change of these choices: 1. Change of orientation of a plaquette maps the element f to f −1 .
2. Change of the base point from * to * (with both elements belonging to the boundary of f ) changes f to γ f , where γ is a path from * to * along the boundary of f . For an example see figure 9. If f is simply-connected, the element γ f does not depend on the choice of γ. Indeed, in this case any other allowed path takes the form γ = γ (∂f ) n for some n and ∂f f = f , by the second Peiffer identity.
The above discussion is concerned with generators of an abstract group describing the geometry. Corresponding transformation laws for field configurations are of the form ϕ f → ϕ −1 f and ϕ f → γ ϕ f for points 1. and 2., respectively. The fact that γ ϕ f is then independent of the choice of γ relies on the fake flatness constraint.

Degrees of freedom and holonomies
In models based on crossed modules there are, besides holonomies along loops (built out of degrees of freedom located on edges), also holonomies along surfaces (built out of degrees of freedom located on edges and faces). In order to explain their construction we first need to discuss certain basic properties of crossed modules.
Let (G, H, ∂, ) be a crossed module of groups. We note two important consequences of the first Peiffer identity:
For future use we remark that if E and F are group isomorphisms, (E, F ) is said to be a weak isomorphism. Existence of a weak isomorphism G → G does not imply 5 that there is a weak isomorphism G → G. Thus in order for this notion to yield an equivalence relation, one declares two crossed modules G and G to be weakly equivalent if there exist a family of crossed modules G 1 , . . . , G n and a zig-zag sequence of weak isomorphisms of the form In other words, weak equivalence is the coarsest equivalence relation such that weakly isomorphic crossed modules are equivalent.
Let us now specialize to the crossed module Π 2 (X 2 , X 1 ; * ) for some * ∈ X 0 . As reviewed in the appendix A, coker(∂) and ker(∂) are the fundamental group of X and the second homotopy group of X 2 , respectively. Therefore any field configuration induces homomorphisms π 1 (X; * ) → coker(∆) and π 2 (X 2 ; * ) → ker(∆). We will now explain their significance.
Consider a field configuration given by and ϕ. Element γ ∈ E assigned to a path γ has the interpretation of a parallel transport from s(γ) to t(γ) along γ. Parallel transports along closed paths (s(γ) = t(γ)) will be called 1-holonomies, to distinguish them from 2-holonomies, to be considered soon.
We define γ as the reduction of γ modulo im(∆). Assignment γ → γ defines an ordinary coker(∆)-valued lattice gauge field . Its definition is motivated by inspecting the fake flatness condition (2.4) reduced modulo im(∆): for any face f.

JHEP03(2021)282
This is the statement that = { e } is a flat gauge field: the holonomy along any loop in X which bounds a surface is trivial, 6 so holonomies along homotopic loops are equal. In other words, defines a homomorphism π 1 (X; X 0 ) → coker(∆).
To further understand the fake flatness condition, consider the problem of finding its solutions , ϕ for a fixed flat . First, each e is determined by e up to multiplication by ∆ψ e for some ψ e ∈ Φ. Having chosen any particular , we are guaranteed by flatness of that each ∂f belongs to im(∆): there exists some ϕ f ∈ Φ, unique up to multiplication by any χ f ∈ ker(∆), such that ∆ϕ f = ∂f .
The above discussion may be summarized as follows. Gauge field valued in a crossed module may be though of as consisting of three components: 1. coker(∆)-valued field located on edges, constrained by (2.9) and hence defining a flat gauge field , 2. im(∆)-valued degrees of freedom located on edges, responsible for the freedom in the choice of for a given , 3. ker(∆)-valued degrees of freedom located on faces, responsible for the freedom in the choice of ϕ for a given .
As in ordinary gauge theory, some degrees of freedom are eventually removed by introducing a "gauge equivalence" relation on the set of field configurations. This will be discussed in subsection 2.3. Typical observables sensitive to degrees of freedom of the third type are (functions of) 2-holonomies, i.e. elements ϕ σ ∈ Φ assigned to σ ∈ ker(∂). Notice that ϕ σ are automatically in ker(∆). Indeed, ∆ϕ σ = ϕ ∂σ = 1. This gives the promised homomorphism π 2 (X 2 ; * ) → ker(∆). It may be interpreted as a two-dimensional analogue of parallel transport along closed paths, with loops replaced by spheres embedded in X 2 .
To summarize the above discussion, ker(∆)-valued holonomy along any sphere in X 2 is defined. We will now demonstrate how to compute it in some simple examples.
Consider the triangulation of a two-sphere presented on figure 10. We choose * as the base point of f 1 , f 2 , f 3 and t(e 1 ) as the base point of It is well known that the second homotopy group of S 2 is infinite cyclic. Choice of one of two possible generators of this group is equivalent to a choice of orientation. One may construct a generator by multiplying the four faces (all transported to a common base point by acting with edges) in such a way that an element with trivial boundary is obtained. There is more than one way to do this, as shown on figure 11. It is not difficult to convince oneself that the two elements σ, σ presented on figure 11 represent the same JHEP03(2021)282  Figure 11. Graphical representation of two ways to construct a generator of π 2 (X 2 , X 1 ; * ) for the tetrahedron from figure 10: σ = (e −1 orientation. Thus they must be equal. We will now check this by a direct computation: where we applied the second Peiffer identity, inserted the definition of σ and used the fact that σ is central in the second, third and fourth equalities, respectively. Having constructed the element σ ∈ π 2 (X 2 , X 1 ; * ), we compute ϕ σ simply by replacing each edge e (resp. plaquette f ) in the definition of σ by the corresponding e (resp. ϕ f ). Thus (compare with figure 11): (2.12) By construction, ϕ σ may also be computed as Triangulation of a disc. We take * and s(e 2 ) as the base points of f 1 and f 2 , respectively. Both faces are oriented counterclockwise.
More generally, element σ may always be constructed in an essentially unique way for any decomposition of a two-sphere with a chosen base point and orientation (possibly embedded in a larger space). The case particularly important for us is that of a sphere bounding a ball q, oriented and based at a point b(q) ∈ X 0 . In this case we denote the corresponding element σ ∈ π 2 (X 2 ; b(q)) by ∂q.
We close this section with remarks about Π 2 (X 2 , X 1 ; X 0 ) in the case when X is (a decomposition of) a disc. Then the first and the second (non-relative) homotopy groups are trivial. Thus ∂ has trivial kernel and cokernel, i.e. it is an isomorphism. This means that a polygon embedded in X bounded by a loop l corresponds to the uniquely determined element ∂ −1 (l) ∈ π 2 (X 2 , X 1 ; s(l)). There is more than one way to construct the element ∂ −1 (l) out of elementary plaquettes, but they are all equal due to Peiffer identities. Of course there is still some arbitrariness in the choice of the base point s(l), but groups π 2 (X 2 , X 1 ; x) with distinct x ∈ X 0 are canonically isomorphic. Remarks of this paragraph are also applicable to calculations performed in completely general geometries X, as long as only elements constructed out of edges and plaquettes in a contractible subcomplex of X 2 are involved.
As an example, let us consider the triangulation of a disc depictured on the figure 12. With the chosen base points and orientations of faces we have (2.13) We will construct the element corresponding to the whole disc out of elementary plaquettes and edges. We choose the counterclockwise orientation and pick * as the base point. Then the bounding loop is l = e 4 e 3 e 2 e 1 . We observe that l = e 4 e 5 e 1 Indeed, this is easy to verify directly:

Gauge and electric transformations
As in ordinary gauge theory, there exist two particularly important broad classes of transformations of the set of field configurations. Firstly, we have gauge transformations. They JHEP03(2021)282 Figure 13. Composition rule for vertex transformations: describe redundancies in the description of the system, since configurations related by gauge transformations are regarded as physically indistinguishable. Secondly, there are transformations which are used to define higher analogues of the electric field operators in the quantized theory. Here we will discuss both types at the same time, as they are closely related. 7 Another distinction between various transformation arises from geometric considerations: p-form transformations are parametrized by data associated to geometric objects of dimension p. Here we will consider vertex (0-form) transformations, regarded as gauge redundancies, analogous to those present in the ordinary gauge theory. Secondly, there will be edge (1-form) transformations. Declaring them to be gauge transformations is necessary to obtain the Yetter's topological field theory and its twisted versions. We will discuss the possibility to restrict the group of gauge transformations. This increases the number of physical degrees of freedom and hence allows to construct models with richer dynamics. Finally, we will introduce plaquette (2-form) transformations. They play the role of electric transformations and are very analogous to corresponding transformations in abelian 2-form gauge theory.
We begin with the discussion of vertex transformations. They are parametrized by collections ξ = {ξ v } of elements of E indexed by lattice sites. Their action on is as for usual gauge fields, while ϕ f transforms as a matter field placed on the lattice site b(f ): We will call them vertex transformations. They preserve the fake flatness, since Thus they define a left action of the group E X of all collections ξ (with vertex-wise multiplication, see figure 13) on the set of field configurations. All transformations in this group will be regarded as gauge redundancies.
Secondly, an edge transformation is parametrized by a collection ψ = {ψ e } of elements of Φ. It changes according to e = ∆ψ e e . (2.18)

JHEP03(2021)282
Before we give the transformation law for ϕ, let us inspect how γ changes for general γ.
We observe that e = e implies that γ = γ for any path γ. Thus for some ψ ( ) γ , which depends on ψ as well as on . This equation determines each ψ ( ) γ up to multiplication by an element of ker(∆). As a step towards an unambiguous definition, we consider a composite path γγ and evaluate γγ in two different ways. Firstly, by equation (2.19), it is equal to ∆ψ ( ) γγ γγ . On the other hand we have γγ = γ γ . Applying (2.19) to the two terms separately we obtain Comparison of the two results yields This formula has the consequence that, perhaps up to multiplication of the right hand side by an element of ker(∆), ψ It is convenient to define ψ ( ) γ for general paths γ by demanding that this relation is satisfied exactly (rather than merely up to elements from ker(∆)) and that ψ (2.24) Let us now return to the problem of defining an action of edge transformations on ϕ. The guiding principle is the preservation of the fake flatness condition. Thus we must have The simplest way to satisfy this condition is to declare We illustrate the above definitions by considering a field configuration on the geometry depictured on figure 12. Such configuration consists of five elements e i ∈ E and two JHEP03(2021)282 Vertex transformation given by the collection {ψ e i } maps e i to ∆ψ e i e i . Action on ϕ variables is given by Definition (2.26) implies the following transformation law for ϕ σ for arbitrary σ: This can be proven as follows. First we note that, by definition, it holds for σ = f for any face f . Secondly, if σ and σ share the base point and are such that (2.28) holds, then the same is true for the product σσ : Next we show that if σ is such that (2.28) holds and b(σ) = s(γ), then (2.28) holds also for γ σ. Indeed, in this situation we have This is indeed the case, since γ ϕ σ transforms as: This concludes the proof, since any σ may be written as a product of some number of elements of the form γ f . The following special case of the above result is worth to be mentioned separately: if σ has trivial boundary (∂σ = 1), then ϕ σ is invariant with respect to edge transformations. ( , ϕ)

JHEP03(2021)282
Thus in order to prove the claimed composition law it only remains to show that ψ In fact even more is true: for any path γ we have Indeed, by the induction principle, it is sufficient to demonstrate that the above equality is satisfied for a composite path γγ provided that it holds for γ and γ separately. To this end we use (2.22) and apply the inductive hypothesis: We remark also that conjugation of an edge transformation with a vertex transformation gives another edge transformation, see figure 15. This means that vertex transformations together with edge transformations form a semi-direct product structure E

JHEP03(2021)282
Next we define plaquette transformations. They are labeled by ker(∆)-valued collections χ = {χ f } indexed by faces. The action on fields is given by It is clear that the fake flatness condition is preserved. As announced at the beginning of this subsection, in topological field theories based on crossed modules all edge transformations are regarded as gauge transformations. We will now list some important consequences of this choice: 1. Up to a gauge transformation, is uniquely determined by . Thus the only gauge invariant functions constructed entirely of are the (conjugacy classes of) holonomies of , which are topological observables.
2. Apart from topological degrees of freedom present in , there remain ker(∆)-valued degrees of freedom in ϕ. These can be made topological by introducing additional flatness constraint: ϕ ∂q = 1 for every ball q.
3. There exists a space BG, called the classifying space of G, with the property that gauge equivalence classes of flat field configurations are in one-to-one correspondence with homotopy classes of maps from X to BG. In particular the set of gauge orbits of flat gauge fields is a homotopy invariant of X. We review this in appendix C.
4. Despite the fact that models under consideration are formulated in terms of the crossed module G, they depend only on its weak equivalence class. We will obtain this fact as a corollary from considerations in section 3.4. Furthermore, we give its second, logically independent proof in appendix C.4.
Here we would like to focus on an alternative possibility and regard only edge transformations with ψ e ∈ ker(∆) for each edge e as gauge redundancies. With this definition it is possible to formulate dynamical models with 1-form and 2-form gauge fields interacting in an interesting way. Indeed, the conjugacy classes of holonomies of (rather than merely their reductions modulo im(∆)) become gauge invariant. These holonomies are not necessarily trivial for contractible loops, so some non-topological degrees of freedom may be present in the field .
Topological quantum field theories briefly discussed above may still be recovered in a certain limit, by enforcing invariance with respect to all edge transformations and flatness of the ϕ field dynamically. Furthermore, two other well-known models may be obtained as special cases: • If E is taken to be trivial, Φ can still be any abelian group. In this case one recovers 2-form lattice gauge theory valued in Φ.
• Taking Φ = E, homomorphism ∆ to be the identity map and the action of E on Φ given by conjugation we recover the standard lattice gauge theory.

JHEP03(2021)282
There are two other special cases which correspond to slight variations of the above: • Given any E and an abelian group Φ on which E acts one can form a crossed module by letting ∆ be the trivial homomorphism. Then fake flatness implies that is flat, so it carries no local gauge-invariant degrees of freedom. The effect of nontrivial holonomies of along non-contractible loops may be loosely described as imposing twisted boundary conditions for the field ϕ. Models of this type may be obtained from 2-form gauge theories by gauging a global symmetry of the form ϕ f → ϕ f .
• Taking a crossed module with injective ∆ one obtains lattice gauge theory with gauge group E in which the curvature is constrained to be valued in the normal subgroup im(∆) ∼ = Φ.
We have shown that proposed models unify and at the same time generalize several interesting classes of gauge theories involving 1-form and 2-form gauge fields, which provides compelling motivation to study them.
We close this subsection with a technical lemma, to be used later. Consider the effect of a vertex transformation ξ valued in im(∆) on a configuration ( , ϕ).
where ψ e = ρ t(e) e ρ −1 s(e) . We claim that one also has ϕ f = ψ ( ) ∂ f ϕ f , so the pertinent vertex transformation is equivalent to an edge transformation with some ψ depending on ρ and . Indeed, first observe that we have It only remains to show that ψ ( ) In fact even more is true: for any path γ. This follows from (2.22) and the definition of ψ, by induction on the number of edges in γ.

Interesting field configurations -examples
In this subsection we present examples of field configurations illustrating certain phenomena that will play important roles in the further discussion.
Firstly, we would like to point out that flatness of does not guarantee that one can find a corresponding flat . To illustrate this feature we consider the decomposition of a 2-torus depictured on figure 16.
We take E to be the dihedral group D 4 . It is generated by elements x, y, z, which are subject to relations Now consider a configuration with a = x and b = y. Since ∂f = b −1 a −1 ba and coker(∆) is abelian, we have ∂f = 1. On the other hand we must have a ∈ {x, zx}. Similarly, b ∈ {y, zy}. In each of the four possibilities we get ∂f = z. Therefore cannot be flat for the given .
Next we would like to show that there may exist field configurations which are not gauge equivalent, even though all holonomies coincide. 8 To this end we continue to consider the 2-torus, but we no longer restrict ourselves to the specific choice of the crossed module.
We choose a = b = 1. Notice that this condition is preserved by vertex and edge transformations with arbitrary ξ * and ψ a , ψ b . Furthermore, ϕ f may be any element from the kernel of ∆. Under a gauge transformation, this element changes according to the formula Next, since ker(∆) is abelian, Therefore the formula (2.40) simplifies to which does not depend on the choice of ψ a and ψ b in ker(∆). This means that configurations with = 1 and ϕ f in different orbits of E are not related by a gauge transformation. Thus there will be at least two such non-equivalent configurations if ker(∆) is nontrivial. On the other hand, all these configurations have the same values of all holonomies. Indeed, 1-holonomies are all equal 1 and there are no nontrivial 2-holonomies, since the second homotopy group of a torus vanishes. This indicates existence of gauge invariant observables associated to non-spherical surfaces. This is indeed true, but they are slightly tricky to define. We will not consider this problem here. An interesting discussion in the context of state sum formulation of topological higher gauge theories was given in [29].

JHEP03(2021)282
In the final example of this subsection we shall show that some 2-holonomies may be determined already by . In particular, it may happen that for some it is not possible to choose and ϕ so that ϕ ∂q = 1 for every ball q.
Let us consider the decomposition of the projective plane presented on figure 8. We take the crossed module with where we use additive notation. In this case ker(∆) ∼ = coker(∆) ∼ = Z 2 .
In the present example, fake flatness does not impose any conditions on e . Thus we can set it to be the nonzero element of Z 2 . Then e ∈ {1, 3}, so ∂f = e 2 = 2. Then fake flatness gives ∆(ϕ f ) = 2, so ϕ f ∈ {1, 3}.
Recall now that the second homotopy group of RP 2 is generated by the element σ = (e f ) f −1 . Evaluation of the 2-holonomy along this generator gives One can also embed RP 2 in RP 3 by attaching an additional 3-cell q along the generator of π 2 (RP 2 ). In other words, we may decompose RP 3 into RP 2 and an extra ball q with ∂q = σ. Field configurations discussed above make sense also as configurations on RP 3 . Hence we see that in this case if is nontrivial, then ϕ cannot be chosen to be flat. As reviewed in the appendix C.3, this phenomenon is controlled by the so-called Postnikov class.

Construction
In this section we present the proper construction of our models. We work in the hamiltonian formulation of quantum mechanics. As the first step we construct the Hilbert space H and local operators resembling electric field operators from the usual gauge theory. Hamiltonian H E is defined in terms of these electric operators. It may be though of as a kinetic term. The full hamiltonian H involves also a magnetic term H M . Each of H E and H M is separately solvable (being a sum of commuting local terms), but its action exchanges states which are stationary for the other. Thus the sum is expected to describe interesting dynamics.
Let us consider the Hilbert space H 0 with an orthonormal basis whose elements are labeled by collections = { e }, ϕ = {ϕ f } of elements of E and Φ, The Hilbert space of the constructed model will be the subspace H ⊂ H 0 spanned by those | , ϕ for which the fake flatness condition ∆(ϕ f ) = ∂f is satisfied. This Hilbert space is

JHEP03(2021)282
not the tensor product of local Hilbert spaces associated to edges and faces, but it does admit a basis consisting of product states. Several interesting classes of operators may be defined on H: • For a collection ξ = {ξ v } of elements of E we define G ξ by • For a collection χ = {χ f } of elements of ker(∆) we introduce W χ by putting Operators G ξ form a representation of the group of vertex transformations E X on H. We will call them vertex Gauss' operators. Only elements of H which satisfy the vertex Gauss' law, i.e. are invariant with respect to the action of all G ξ , will be regarded as physical states.
Operators V ψ form a representation of the group Φ X of edge transformations. As discussed in subsection 2.3, its subgroup ker(∆) (1) X describes (a part of the) gauge redundancy of the constructed model. Therefore we will call V ψ with ψ e ∈ ker(∆) the edge Gauss' operators. The final requirement for an element of H to be regarded as a physical state is that it should satisfy the edge Gauss' law, i.e. be invariant with respect to the action of all edge Gauss' operators.
We will now construct electric operators associated to edges. These are required to be gauge invariant, i.e. to commute with Gauss' operators of both types. Let us denote by V e (ψ) the operator V {ψ e } with ψ e = ψ for e = e and ψ e = 1 otherwise. Recall that ker(∆) is a central subgroup of Φ, so operators V e (ψ) do commute with all edge Gauss' operators. However, they are not invariant with respect to vertex gauge transformations.
. (3.5) This means that to obtain a gauge invariant operator it is sufficient to sum V e (ψ) over ψ with any E-invariant weight µ : Φ → C. Explicitly, we define This operator commutes with G ξ provided that µ(ξ ψ) = µ(ψ) for all ξ ∈ E.
If µ and µ are two E-invariant functions, operators V e,µ and V e ,µ commute. This is obvious for e = e, while:

JHEP03(2021)282
Operators W χ form a representation of the abelian group ker(∆) (2) X and, in particular, commute with each other. Moreover, they commute with all V ψ . We will use them to construct electric operators associated to faces.
Let us denote by W f (χ) the operator W {χ f } with χ f = χ for f = f and χ f = 1 for f = f . For a function ν : ker(∆) → C we put (3.8) The gauge transformation law for W f (χ) operators takes the form hence W f,ν commutes with G ξ if and only if ν(ξ χ) = ν(χ) for all ξ ∈ E. As our candidate for the electric hamiltonian we take with a priori different functions µ e and ν f for different edges e and faces f , since the spatial lattice is not necessarily assumed to admit any symmetries. By construction, H E commutes with all Gauss' operators and thus is a well-defined operator on the physical subspace of H.
In order for H E to be self-adjoint we have to take functions µ, ν to satisfy µ(ψ −1 ) = µ(ψ) and ν(χ −1 ) = ν(χ). Furthermore, we would like H E to admit either a unique ground state, or at most a finite number of ground states, dependent only on the topology. This can be achieved by assuming that all functions µ e and ν f are such that their Fourier transforms vanish at the trivial representation and are positive otherwise, 9 as will be demonstrated in subsection 3.4. Following a common terminology we shall call operators, which are diagonal in the adapted basis of H, "magnetic". The first important class of operators of this type are those constructed out of 1-holonomies. Consider a function η : E → C and a path γ. We define an operator A γ,η by A γ,η , ϕ = η( γ ) , ϕ . (3.11) This operator is gauge invariant if and only if the endpoints of γ coincide and η is a class function, i.e. η(ξ ξ −1 ) = η( ) for any ξ, ∈ E. Our magnetic hamiltonian will involve only terms A ∂f,η for faces f , as in standard lattice gauge theory. In this case the function η needs to be defined only on the subgroup im(∆) ⊆ E, since ∂f ∈ im(∆) by fake flatness. Analogously, let θ be a complex function on Φ and let σ ∈ π 2 (X 2 , X 1 ; x) for some base point x ∈ X 0 . We define an operator B σ,θ by (3.12) Recall that for σ with trivial boundary the 2-holonomy along σ is invariant with respect to edge gauge transformations. Thus B σ,θ commutes with each V(ψ).
Recall that 2-holonomies transform nontrivially under vertex transformation. This has the consequence that B σ,η commutes with all G ξ (and thus defines an operator on the physical subspace of H) provided that η satisfies η(ξ ϕ) = η(ϕ) for all ϕ ∈ ker(∆), ξ ∈ E. (3.13) We are ready to propose our candidate for the magnetic hamiltonian: with a priori different functions η f and θ q for different faces f and balls q. We shall assume that functions η f and θ q are non-negative, with value zero attained only for the neutral element. Thus the magnetic hamiltonian penalizes configurations with nontrivial holonomies along contractible loops and surfaces. We close this subsection with a brief discussion on how the above construction needs to be modified if all edge transformations (i.e. with ψ e not necessarily in ker(∆)) are regarded as gauge transformations. In this case the term in H M involving A operators has to be dropped, as it is no longer gauge invariant. Furthermore, all V operators in H E may be dropped, since they act trivially on the space of physical states. Thus the hamiltonian reduces to H B + H W .

An explicit example
In order to illustrate general features discussed so far, we consider here an example constructed on a cubic lattice with a particular crossed module chosen. We shall parametrize the set of vertices by ordered triples of integers [j 1 , j 2 , j 3 ], edges by ordered triples consisting of two integers and one half-integer, while for faces we use ordered triples consisting of an integer and two half-integers -see figure 17.
Due to the translational symmetry we can restrict attention to one elementary cell. We will introduce the necessary notation and conventions based upon this cell, in order to avoid tedious expressions.
The orientation of edges is chosen as follows: and similarly for other edges, while faces are oriented so that: and analogously for other faces. We illustrate this on the figure 17. The basepoints are , and so on. Finally, each 3-cell q will be parameterized by an ordered triple of half-integers and oriented so that the orientation of ∂q [   Let us now consider the crossed module G 44 = (Φ, E, ∆, ) with Φ ∼ = E ∼ = Z 4 , ∆(n) = 2n for n ∈ Φ and m n = (−1) m n for n ∈ Φ and m ∈ E. This is an example of a crossed module with nontrivial 10 ker(∆) and coker(∆). Furthermore, E acts non-trivially on Φ. However, it is still relatively simple, since coker(∆) is abelian and acts trivially on ker(∆).
Our present goal is to write down an explicit formula for the proposed Hamiltonian for the above system. We shall denote basis states in the Hilbert space H as |m, n , where m = {m e } and n = {n f } are collections of integers modulo four. An operator which for a fixed edge e shifts m e → m e + 1 will be denoted by T e . The definition of T f is analogous. Furthermore, we let:

JHEP03(2021)282
It can be shown that operators W f,ν f satisfying all conditions given in subsection 3.1 are essentially uniquely determined to be of the form On the other hand, the operators V e,µe are given by Imposing further translational invariance of the system we are forced to put all parameters ν f,0 and µ e,1 to be constant, i.e. independent of f and e, respectively. Therefore we have with some µ, ν > 0.
There is some freedom in the definition of H A . One good choice is given by Next we consider a ball q and denote by f 1 , f 2 and f 3 faces with b(f i ) = b(q) (they are necessarily contained in ∂q). The three remaining faces of q will be denoted by f j , with j = 4, 5, 6. For each of these three faces we take e j be the edge such that s(e j ) = b(q) and t(e j ) = b(f j ). With this notation we have: where U e −1 j f j can be expressed in terms of elementary U e and U f operators as Hamiltonian H B is essentially uniquely determined to be

Symmetries
We will now describe symmetries of our model. Firstly, any field configuration determines a flat gauge field valued in coker(∆). Such field is described up to gauge transformations by an element [ ] ∈ Hom(π 1 (X; * ), coker(∆))//coker(∆), with double slash denoting the quotient with respect to a group action (in this case given by conjugation), and * being an arbitrarily chosen base point in X 0 . One may regard [ ] as an essentially classical quantity, because it is unchanged by the action of all operators introduced in our model thus far. In particular, the subspace of H spanned by all | , ϕ corresponding to a single [ ] is H-invariant.

JHEP03(2021)282
Secondly, there exist so-called electric symmetries. In order to introduce them, we need to define the following two groups: E 0 is the subgroup of E consisting of all elements which commute with the whole E and act trivially on Φ, while Φ 0 is the subgroup of ker(∆) of all elements invariant under the action of whole E. Now let ζ = {ζ e } be a collection of elements of E 0 such that 11 ζ ∂f = 1 for each f . We define an operator L 1 (ζ) by the formula It is straightforward to check that this preserves fake flatness and that L 1 (ζ) commutes with H. Now suppose that ζ is of the special form ζ e = λ t(e) λ −1 s(e) for some collection λ = {λ v } valued in E 0 . In this case we have L 1 (ζ) = G(λ), which acts trivially on physical states.
We conclude from the preceding discussion that operators L 1 define a representation of the cohomology group H 1 (X, E 0 ) on the space of physical states. This is a 1-form symmetry with symmetry group E 0 .
Secondly, let κ = {κ f } be a collection of elements of Φ 0 such that 12 κ ∂q = 1 for every ball q. Then we can introduce (3.28) Again, this operation preserves fake flatness and commutes with H. For a collection κ of the form κ f = ω ∂f for some ω = {ω e } valued in Φ 0 we have L 2 (κ) = V(ω). Hence on the space of physical states a representation of H 2 (X, Φ 0 ) is defined. This is a 2-form symmetry with symmetry group Φ 0 . The last type of symmetries we discuss here is related with automorphisms of crossed modules. An automorphism of G is a homomorphism (E, F ) : G → G such that E and F are group automorphisms. An automorphism of G is said to be inner if it is of the form E( ) = ξ ξ −1 , F (ϕ) = ξ ϕ for some ξ in E.
Automorphisms of G form a group Aut(G), with inner automorphisms being its normal subgroup. The quotient group is called the group of outer automorphisms and denoted by Out(G). We remark that the name is potentially misleading, because elements of Out(G) are merely equivalence classes of automorphisms (typically there exists no embedding of Out(G) as a subgroup of Aut(G)). Now let (E, F ) be an automorphism of G. We define an operator K(E, F ) by Clearly this defines a representation of Aut(G) on H. Now let us observe that for an inner automorphism given by an element ξ ∈ E we have

JHEP03(2021)282
with the constant collection ξ v = ξ for every v. As this is a gauge transformation, K(E, F ) acts trivially on physical states in this case. Hence on the space of physical states a representation of the group Out(G) is defined. Hamiltonian H may or may not be invariant under the action of these transformations, depending on the choice of "coupling constant" functions {µ e }, {ν f }, {η f } and {θ q } in its definition. It is always possible to choose these functions so that whole Out(G) is realized as a global symmetry group.

Vacuum states
One of the most interesting goals in the study of models described by hamiltonians H = H M + H E would be to describe their possible phases. We will now make a small step in this direction by describing the space of ground states of H in various limits in which diagonalization can be performed exactly. In each case we have found that the lowest energy subspace: • is the space of states of a certain topological field theory, • admits a basis whose elements are in one-to-one correspondence with homotopy classes of maps from X to some other space.
These results are summarized in the table 1. All proofs are given in the remainder of this section. For each hamiltonian we provide a more explicit description of the basis ground states, not involving classifying spaces. We speculate that some features found in the discussed limits may be generic for certain regions in the phase diagram of our model: • The putative phase approximately described by ground states of H AW would be characterized by a perimeter law for 1-holonomies and a volume law for 2-holonomies.
• For ground states of H M slightly perturbed by the electric hamiltonian H E , we expect a perimer law for 1-holonomies and an area law for 2-holonomies.
• In a phase continuously connected to dynamics of H BV we expect an area law for 1-holonomies as well as for 2-holonomies.
This will be further corroborated by the discussion in subsection 3.5, where we consider certain still simple, but already not purely topological limits of our model. They are shown to reduce to more standard purely 1-form or 2-form gauge theories, which are believed to exhibit behaviour consistent with the description above. Let us start by considering the ground states of H E . We will minimize every term in (3.10) at the same time, which clearly minimizes the whole H E . First let us observe that for every face f we have a representation of the group ker(∆) by operators W f (χ). It is

JHEP03(2021)282
Hamiltonian of the model Basis of ground states for some reference ( , ϕ). The next step is to understand the space of orbits.

JHEP03(2021)282
It is clear that two configurations with the same are related by a plaquette transformation. Furthermore, for two configurations with the same one can perform an edge transformation to make equal. Collection itself is not changed by edge and plaquette transformations, but it transforms with respect to vertex transformations in the way usual for a gauge field.
We conclude that there is a basis of ground states of H E indexed by elements of Hom(π 1 (X; * ), coker(∆))//coker(∆). Distinct ground states may be distinguished by values of 1-holonomies along nontrivial loops in X. In other words, we have found the space of states of a topological gauge theory with gauge group coker(∆).
Secondly, we discuss the space of ground states of H AW . It admits a basis consisting of vectors of the form where is any collection with ∂f = 1 for each f . The sum over ϕ runs over collections with ϕ f in ker(∆), by fake flatness. Distinct vectors of the form (3.34) are labeled by elements of Hom(π 1 (X; * ), E)//E determined by . Hence we find the space of states of a topological gauge theory with gauge group E.
Next we consider the ground states of H M . This is facilitated by the fact that holonomy operators act diagonally. To minimize all terms in (3.14) at the same time we have to restrict attention to configurations ( , ϕ) satisfying flatness conditions for every face f, The first condition implies that each ϕ f is in ker(∆), by fake flatness. Besides these constraints, only gauge invariant states are allowed. Such state may be constructed by summing over the gauge orbit of some configuration ( , ϕ) satisfying (3.35): where we write ( , ϕ ) ∼ ( , ϕ) if ( , ϕ ) and ( , ϕ) are related by a gauge transformation. Thus there is a basis of the space of ground states whose elements are in one-to-one correspondence with gauge orbits of configurations ( , ϕ) subject to conditions (3.35). We will now describe this space of orbits. An admissible collection defines a flat gauge field on X valued in E. For every conjugacy class of homomorphisms π 1 (X; * ) → E we focus on one representative . Having fixed , we consider the allowed ϕ. They have to satisfy (3.35b). Furthermore, we have to identify collections related by for any collection ψ of elements of ker(∆). We note the fact that elements ψ ( ) ∂f actually depend on only through , since the image of ∆ acts trivially on ker(∆).
The space of equivalence classes of admissible collections ϕ is the twisted cohomology group H 2 (X, ker(∆), ), as recalled in the apppendix B. It is not true in general that distinct JHEP03(2021)282 cohomology classes correspond to different gauge orbits. This is because there might exist vertex transformations ξ which preserve : s(e) = e for each edge e. (3.38) This formula implies that ξ * commutes with γ for every loop based at * . Secondly, given such ξ * it is possible to uniquely determine ξ v for every vertex v from the above relation.
In summary, the group Stab V ( ) of vertex transformations preserving is isomorphic to the group of elements of E whose adjoint action preserves the homomorphism π 1 (X, * ) → E determined by . It acts on H 2 (X, ker(∆), ) by (abelian) group homomorphisms, so the quotient space is also a group. We conclude that the set of gauge orbits of flat configurations is a disjoint union of groups H 2 (X, ker(∆), )//Stab V ( ), with running through a set of representatives of elements of Hom(π 1 (X; * ), E)//E. We remark that this is also the space of states of a topological gauge theory based on the crossed module G which consists of the trivial homomorphism ker(∆) → E and action of E on ker(∆) inherited from G. Indeed, condition ∂f = 1 for each f is precisely the fake flatness constraint for G . Moreover groups, in which fields , ϕ as well as gauge transformations are valued, coincide.
Vacuum states corresponding to non-equivalent may always be distinguished by values of 1-holonomy operators along nontrivial loops. It is not always true that states with the same but non-equivalent ϕ can be discriminated by evaluating 2-holonomies, as illustrated by one of examples in subsection 2.4.
Last, but not least, we consider the problem of minimization of H BV . There exists a basis of ground states indexed by homotopy classes of maps X → BG. This implies that ground states of this hamiltonian form the space of states of the Yetter's model. This fact was discussed also in [40,42]. For the sake of completeness we include a proof here. Furthermore, we give another description of the space of ground states.
In order to minimize operators B ∂q,θq we have to restrict attention to configurations obeying ϕ ∂q = 1 for every ball q. Given any such configuration ( , ϕ) we obtain a ground state by forming the superposition (3.39) A basis of the space of ground states is formed by vectors of this form, one for each orbit of the group of vertex and edge transformations in the set of admissible configurations. The fact that these orbits are in one-to-one correspondence with homotopy classes of maps X → BG has been reviewed in the appendix C.2. We proceed to give an alternative description of the set of orbits. Since in the present analysis configurations related by edge transformations with arbitrary ψ are identified, the only invariant datum specified by is the corresponding element of Hom(π 1 (X; * ), coker(∆))//coker(∆). For every element of this set we choose one representative and lift it to some . It is not always possible to choose which is itself flat, as shown in examples in subsection 2.4.

JHEP03(2021)282
Next we consider the set of allowed ϕ for the given . As illustrated in subsection 2.4, for having nontrivial holonomies it may happen that no ϕ satisfying the flatness condition ϕ ∂q = 1 exists. Let us consider the case in which some flat ϕ does exist. Then any other flat ϕ is of the form for every path γ. (3.41) Transformations in Stab V,E ( ) are represented by operators of the form G(ξ)V(ψ), where the pair (ξ, ψ) is such that for any path γ. (3.42) Let us first consider a pair (ξ, ψ) such that in addition ξ v = ∆ρ v for each v. The discussion around equation (2.37) gives for some Φ-valued collection ψ. By the definition of Stab V,E ( ), we must have ψ e ψ e ∈ ker(∆) for each e. Thus the action of (ξ, ψ) on the set of allowed ϕ for the given reduces to a ker(∆)-valued edge transformation. Hence (ξ, ψ) acts trivially on the set F ( ).
Next let us observe that the map Stab V,E ( ) (ξ, ψ) → ξ ∈ Stab V ( ) is a homomorphism. Preceding discussion shows that its kernel acts trivially on F ( ), so to complete the proof it is sufficient to show that this homomorphism is surjective. Thus we choose some obeying (3.41) and lift it to an E-valued collection arbitrarily. By construction, we have that for each path γ the element belongs to im(∆). Directly from the definition of µ γ we have that is satisfied for any composite path γ γ. Now for every edge e we choose some ψ e such that µ e = ∆ψ e . Then µ γ coincides with ∆ψ ( ) γ whenever γ is a single edge, and furthermore these two collections satisfy the same composition rule for concatenated paths. Thus µ γ = ∆ψ ( ) γ for every γ. Plugging this into (3.44) we obtain and hence the claim is proven.

JHEP03(2021)282
In summary, vectors of the form (3.39) form a basis of ground states of H BV . They can be labeled by elements of the disjoint union of sets F ( )//Stab V ( ) with running through representatives of elements of Hom(π 1 (X; * ), coker(∆))//coker(∆).
We are now ready to deduce that the space of ground states of H BV , as well as the space of states invariant under all vertex and edge transformations, but not necessarily with flat ϕ, depends on G only through its weak equivalence class. Clearly it is sufficient to consider a weak isomorphism (E, F ) : G → G = (E , Φ , ∆ , ). We let T be the map which sends a This intertwines between G and G -valued vertex and edge transformations, so there is an induced mapping on the space of orbits. The latter is in both cases a disjoint union of subsets labeled by Hom(π 1 (X; * ), coker(∆))//coker(∆) ∼ = Hom(π 1 (X; * ), coker(∆ ))//coker(∆ ), where we used the fact that E : coker(∆) → coker(∆ ) is an isomorphism. Mapping T preserves this decomposition. Thus it is sufficient to consider configurations of the form ( , ϕ) and (E( ), ϕ ) for one , for now with no constraint on ϕ. Let C( ) and C (E( )) be the sets of all allowed ϕ and ϕ modulo ker(∆)-(resp. ker(∆ )-)valued edge transformations. They are affine over H 2 (X 2 , ker(∆), ) ∼ = H 2 (X 2 , ker(∆ ), E( )), because a flat configuration on X 2 is the same as an arbitrary configuration on X (constraint ϕ ∂q = 1 for every ball q being vacuous if balls are absent). The map T intertwines between the affine structures, so we have C( ) ∼ = C (E( )). Furthermore, we clearly have Stab V ( ) ∼ = Stab V (E( )), and again T preserves actions of these groups. Thus which proves that T is a bijection. Finally, let us observe that F (ϕ) ∂q = F (ϕ ∂q ), since ϕ ∂q ∈ ker(∆). Since F is an isomorphism, this implies that flatness of F (ϕ) is equivalent to flatness of ϕ. Hence T is bijective also after restricting to flat configurations.
Another interesting point to be raised here is that there is an explicit topological criterion to determine when the set F ( ) is nonempty. Here we give a short summary, with a more detailed description postponed to the appendix C.3. Field determines (up to homotopy) a map h from X to Bcoker(∆), the classifying space of the group coker(∆). There is a distiniguished twisted cohomology class β on Bcoker(∆), called the Postnikov class. The set F ( ) is nonempty if and only if the pullback h * β is the trivial cohomology class on X.
We close this section with the remark that it has been shown in [29] that the topological field theory describing ground states of H V B may be formulated using fields valued in groups ker(∆) and coker(∆) only. In this approach crossed modules do not have to be invoked explicitly. One has to merely specify the action of coker(∆) on ker(∆) and the Postnikov class β. These are precisely the data that determine the crossed module up to weak isomorphisms [54], in accord with the fact that the model possesses weak isomorphism invariance.

A peek at dynamics
In this subsection we discuss models described by hamiltonians in which three out of four terms of H are present. See figure 18 for an illustration of the four possibilities. In each JHEP03(2021)282

Yang-Mills
Yang-Mills 2-form gauge theory 2-form gauge theory case dynamics reduces to that of some simpler theory. Therefore we can understand the dynamics generated by H along the boundary of its phase diagram. Several topological aspects of our models have been discussed in subsection 3.4. In this step we would like to focus instead on local dynamics. Therefore we assume now a topologically trivial situation, i.e. that the first two homotopy groups of X vanish. In this case we can always fix gauge e = 1. In other words, the field can be regarded as valued in im(∆). True physical states may be obtained in the end by summing over vertex transformations. Thus in the further analysis it is necessary to explicitly take into account only those vertex transformations ξ which preserve the gauge condition e = 1, i.e. those with constant ξ.
Let us begin with the case H ABW = H A + H B + H W . Term H A commutes with the other two, so it may be minimized exactly. 13 Therefore we may restrict attention to field configurations with ∂f = 1 for each f . Each gauge equivalence class of fields with this property admits a representative with e = 1 for each edge e. For these representatives the fake flatness constraint implies that ϕ f ∈ ker(∆). As a result, the only physical degree of freedom is a ker(∆)-valued 2-form field. Residual gauge freedom consists of transformations of two types: edge transformations valued in ker(∆), which play the role of standard gauge transformations for the 2-form field, and vertex transformations with constant ξ. Explicitly, the latter acts according to the formula ϕ σ −→ ξ ϕ σ for every σ. From the point of view of the 2-form theory this is a global symmetry. Summarizing, the ground states of H ABW coincide with ground states of a 2-form gauge theory valued in ker(∆), restricted to the singlet sector of a certain global symmetry.
For the hamiltonian H AV W , the analysis is analogous. Field ϕ is effectively removed by exactly minimizing H W , which enforces that for any all configurations ( , ϕ) allowed by fake flatness enter with an equal amplitude. The final conclusion is that ground states 13 Strictly speaking, it could happen that an eigenvector of HB + HW to a much lower eigenvalue could be found in excited subspaces of HA. Thus presented analysis is valid exactly only under the additional assumption that HA dominates over the other two terms.

JHEP03(2021)282
are the same as in a Yang-Mills theory with gauge group im(∆), restricted to the singlet sector of a global symmetry.
Next, consider the model with hamiltonian H ABV . In this case we impose the constraint ϕ ∂q = 1 for each q. There exists a unique such ϕ, up to edge transformations valued in ker(∆), for every . Therefore the field ϕ is effectively removed from the theory. In the end we obtain the singlet sector of lattice Yang-Mills theory with gauge group im(∆), as in the case of H AV W .
It remains to analyze the theory with H BV W as a hamiltonian. In this case we minimize exactly the H V term. Therefore ground states may be written as superpositions of states of the form Finally, we would like to emphasize that, in spite of the preceding discussion, models found on opposite edges of the diagram on figure 18 are not identical. They differ in their global properties once we start considering spaces X with nontrivial homotopy groups. Firstly, let us compare hamiltonians H ABV and H AV W . In the first case low-lying states have flat ϕ, but can be distinguished by 2-holonomies along non-contractible spheres in X. There is a possibility of ground state degeneracy due to existence of several non-equivalent flat ϕ for a given . Thus the 2-form electric symmetry may be broken. On the other hand for the hamiltonian H AV W field ϕ is effectively absent. Since ground states are invariant under all W operators, the 2-form symmetry is unbroken. Comparison of H ABW and H BV W is similar. In the former case fields are flat, but they may still have nontrivial 1-holonomies. Thus the 1-form electric symmetry may be broken. On the other hand for ground states of H BV W holonomies of are undefined, since they are not invariant with respect to edge transformations (which are symmetries of the states).

B Twisted cohomology
In this appendix we give a definition of twisted cohomology as it arises directly in calculations done in this paper. We refer to [55, p. 255-290] for a more complete treatment. We shall use relative homotopy groups π n (A, B; * ) with any n ≥ 2, as well as the action of π 1 (B; * ) on these groups. Their definition is entirely analogous to the case n = 2 and can be found e.g. in [50, p. 343]. They are abelian for n ≥ 3. As for n = 2, there is a homomorphism ∂ : π n (A, B; * ) ∂ − → π n−1 (B; * ), whose kernel coincides with the image of the self-evident map π n (A; * ) → π n (A, B; * ). Furthermore, a map A → A which takes B to B ⊆ A induces a homomorphism π n (A, B; * ) → π n (A , B ; * ), which is unchanged by homotopic deformations preserving the condition that B is mapped to B at all intermediate stages. All that generalizes to a groupoid version π n (A, B; C), for which a whole set C ⊆ B of base points is allowed, in a way analogous to the case n = 2.
In our applications we need the above structure with A = X n , B = X n−1 and C = X 0 . Thus π 1 (B; C) = π 1 (X 1 ; X 0 ) if n = 2 and π 1 (B; C) = π 1 (X; X 0 ) for n ≥ 3. Since the latter group is a quotient of π 1 (X 1 ; X 0 ), we have an action of π 1 (X 1 ; X 0 ) on π n (X n , X n−1 ; X 0 ) in each case. Groups π n (X n , X n−1 ; x) with x ∈ X 0 and n ≥ 3 may be handled in practice using the fact [55, p. 212] that they are free π 1 (X; x)-modules, with bases labeled by n-cells of X. Now let us fix a group G, an abelian group K on which G acts by automorphisms and a homomorphism α : π 1 (X; X 0 ) → G. Thus for every path γ there is an endomorphism k → α γ k of K, trivial if γ is contractible in X. It obeys the composition law α γ γ = α γ α γ . In our applications we will mostly consider the case G = coker(∆) and K = ker(∆) for some crossed module G, with α = . This is not relevant for the discussion in this appendix.
By an α-twisted p-cochain on X valued in K we shall mean: • p = 0: collection of elements ρ v ∈ K labeled by vertices v, • p = 1: assignment of ψ γ ∈ K to every path γ, subject to the composition law ψ γ γ = ψ γ (α γ ψ γ ) whenever s(γ ) = t(γ), Figure 19. The two colored maps factors through the dashed ones marked by the same colors. The composition depictured by the dashed black arrow is the trivial map.
For p = 1 one needs triviality of ∂∂, for which an analogous reasoning applies. Now let us assume that l : Y → X is a cellular map of CW-complexes. Given α ∈ Hom(π 1 (X, X 0 ), G), its pullback l * α ∈ Hom(π 1 (Y, Y 0 ), G) is defined as the composition of α with the pushforward map π 1 (Y, Y 0 ) → π 1 (X, X 0 ) induced by l. Furthermore, the pullback l * : C • (X, K, α) → C • (Y, K, l * α) may be defined in an analogous way. It intertwines between the differentials, so there is an induced pullback map of cohomology We close this appendix with a remark that twisted cohomology may be defined also without reference to a cell structure on X. They depend only on the topology of X

JHEP03(2021)282
and another datum called a local system of abelian groups on X. The latter may be (noncanonically) encoded by a single abelian group K and a homomorphism π 1 (X; * ) → Aut(K) for some base point * .

C Classifying spaces
Due to the length of this appendix, we divided it into several parts. In C.1 we recall the basic properties of classifying spaces of groups. Appendix C.2 is devoted to the definition and the proof of the fundamental property of classifying spaces of crossed modules, which relates field configurations on a space X valued in a crossed module G with maps X → BG. In C.3 we explain the relation of the so-called Postnikov class with the problem of constructing field configurations (or equivalently, maps to BG). In C.4 we construct maps between classifying spaces corresponding to homomorphisms of crossed modules and obtain the corollary that weakly equivalent crossed modules have homotopy equivalent classifying spaces. A simple proof of existence of classifying spaces is given in C.5.

C.1 Classifying spaces of groups
We begin with a short review of the classifying space BG of a group G. One way to define it 14 is as a connected CW-complex with fundamental group G and trivial higher homotopy groups. It is well known [55,Thm. 7.1] that such space exists and is determined uniquely up to a homotopy equivalence. One may also assume that BG has exactly one 0-cell * , which we take as its base point.
We claim that gauge orbits of G-valued lattice gauge fields on X are in one-to-one correspondence with homotopy classes of maps X 1 → BG. Flatness of a gauge field is equivalent to existence of an extension of the corresponding map to X 2 . If this condition is satisfied, extending to the whole X is automatic, and furthermore this extension is unique up to homotopy. There is also a correspondence between flat gauge fields (rather than gauge equivalence classes) on X and homotopy classes of maps of pairs 15 (X, X 0 ) → (BG, * ). Again, flatness condition may be lifted by considering maps (X 1 , X 0 ) → (BG, * ).
To prove the above claims, let us first note that any mapping X → BG is homotopic to one which sends the whole X 0 to * , by the homotopy extension property [50, p. 15] of the pair (X, X 0 ). Such map sends every edge of X to a loop in BG based at the base point * . As a result it determines a homomorphism π 1 (X 1 , X 0 ) → π 1 (BG, * ) ∼ = G, i.e. a lattice gauge field on X. Two maps h α , h α are homotopic if and only if they determine gauge-equivalent fields α and α . Indeed, constructing a homotopy between them amounts to constructing an extension to 16 I × X of the map {0, 1} × X → BG given by h α and h α , respectively, on {0} × X and {1} × X. This can be done iteratively, cell-by-cell.
14 There is a more general notion of a classifying space of a topological group [56], for which this definition is not suitable. Here only discrete groups are considered. 15 Map of pairs (X, Definition of homotopy classes of maps of pairs allows only homotopies for which Y is mapped to Y at all times. Maps of triples and their homotopy classes are defined analogously. 16 Here I is the unit interval. First we consider 1-cells, which are of the form I ×{v} with v -vertices of X. These can be mapped to any loops in BG, which determine elements ξ v ∈ π 1 (BG, * ). Next we extend through 2-cells, which are products of I and edges of X. Considering an edge e, we arrive at the problem of extending to the whole square the map on the boundary depictured on figure 20. This is possible if and only if the boundary map is null-homotopic, i.e. if α e ξ s(e) α −1 e ξ −1 t(e) = 1 in G. In other words, if α and α are gauge equivalent, we have to choose ξ in the previous step which is a gauge transformation from α to α . Afterwards one has to extend through higher cells. This is always possible since higher homotopy groups of BG vanish. Thus h α and h α are homotopic. If α and α are not gauge equivalent, it is impossible to extend the map through 2-cells regardless of the choice of an extension through 1-cells. Hence h α and h α are not homotopic.
We still have to determine which gauge fields can be realized by some map to BG. On the 1-skeleton of X we can realize any gauge field, simply by constructing the corresponding map cell-by-cell. An obstruction arises if one attempts to extend the map from X 1 to X 2 . Concretely, extension over a face f is possible if and only if the bounding loop is sent to a trivial loop in BG, i.e. if α ∂f = 1. Thus a map h : X 1 → BG extends to X 2 if and only if the corresponding gauge field is flat. Further extension from X 2 to X is unobstructed, again because higher homotopy groups of BG are trivial.
The only part that remains to be proven is the one concerning homotopy classes of pairs (X, X 0 ) → (BG, * ). Such homotopy class determines a homomorphism π 1 (X 1 , X 0 ) → G. We already know that every homomorphism is realized by some homotopy class. Furthermore, in the construction of a homotopy between two maps determined by the same homomorphism we may take ξ v = 1 for every v, and hence the homotopy may be taken to be stationary on I × X 0 .
Being done with the proof, notice that there exists a distingushed G-valued gauge field ι on BG, corresponding to the tautological (identity) homomorphism π 1 (BG, * ) → G. It is universal in the sense that one has h * α ι = α for a map h α : X → BG corresponding to a gauge field α on X. Furthermore the twisted cohomology groups H • (BG, K, ι) are defined for any G-module K. They are also called the cohomology groups of the group G and can be constructed in a purely algebraic manner, see [57]. The universal character of the field ι implies that pullback through h α maps H • (BG, K, ι) to H • (X, K, α).

C.2 Classifying spaces of crossed modules
Here we will describe classifying spaces of crossed modules. For our purposes, the following definition is suitable: BG is a connected CW-complex which contains BE, the classifying space of the group E, as a subcomplex and has homotopy groups for n = 2, 0 for n ≥ 3.
(C.1) Furthermore, it is required that Π 2 (BG, BE; * ) ∼ = G. Again, we may assume that BG has exactly one 0-cell * , which we choose as the base point. It is known that such space BG exists and is determined uniquely up to a homotopy equivalence by the above properties [54,[58][59][60]. The latter fact is also obtained as a simple corollary from the discussion in the appendix C.4, while the former is proven in the appendix C.5.
The property of BG most important for us is that field configurations ( , ϕ) on X with flat ϕ, modulo vertex and edge transformations, are in one-to-one correspondence with homotopy classes of maps X → BG. Clearly the flatness constraint may be lifted by considering maps X 2 → BG instead. We remark also that homotopy classes of maps of triples (X, X 1 , X 0 ) → (BG, BE, * ) correspond to field configurations with flat ϕ. Again, the flatness condition may be removed by replacing X with X 2 . Finally, it will be clear from the proof that a map (X, X 1 , X 0 ) → (BG, BE, * ) is homotopic as a map of triples to one with image in BE if and only if the corresponding configuration ( , ϕ) has trivial ϕ, i.e. ϕ f = 1 for every face f .
For the purpose of the proof, we may again asssume that all maps X → BG take X 0 to a base point * . Let us consider first homotopy classes of maps of X 1 into BG and BE. Proceeding as in the above exposition of classifying spaces of groups one may show that they are in one-to-one correspondence with gauge equivalence classes of π 1 (BG, * ) ∼ = coker(∆) and π 1 (BE, * ) ∼ = E-valued gauge fields on X 1 , respectively. Furthermore, the map [X 1 , BE] → [X 1 , BG] induced by the inclusion of BE in BG corresponds to reduction modulo im(∆), so in particular it is surjective. Using the homotopy extension property of the pair (X, X 1 ) we conclude that any map X → BG is homotopic to one which maps X 1 to BE and X 0 to * . Such map sends every edge e of X to a loop in BE based at * , and hence determines an element e ∈ π 1 (BE, * ) ∼ = E. Now consider the problem of extending a map h : X 1 → BG which determines an E-valued gauge field to X 2 . For every face f we have to extend the map on the boundary whose homotopy class is given by the element ∂f ∈ π 1 (BG, * ). An extension exists if and only if ∂f = 1, i.e. if ∂f belongs to im(∆). Homotopy class of this extension, regarded as a map of triples (I 2 , ∂I, * ) → (BG, BE, * ), determines and is determined by an element ϕ f ∈ π 2 (BG, BE, * ) such that ∆ϕ f = ∂f . Summarizing, every homomorphism Π 2 (X 2 , X 1 ; X 0 ) → G is realized by some map of triples (X 2 , X 1 , X 0 ) → (BG, BE, * ). Conversely, any homotopy class of maps of triples is determined by the corresponding homomorphism. Thus a bijection [(X 2 , X 1 , X 0 ), (BG, BE, * )] ∼ = Hom(Π 2 (X 2 , X 1 ; X 0 ), G) is established. Next, let us take two maps h ,ϕ , h ,ϕ : (X 2 , X 1 , X 0 ) → (BG, BE, * ), labeled by the corresponding field configurations, and consider the problem of deciding if they are homotopic as maps X 2 → BG. Thus we ask if the map {0, 1} × X 2 → BG given by h ,ϕ and h ,ϕ on {1} × X 2 and {0} × X 2 extends to I × X 2 . By using the homotopy extension property of the pair I × X 2 , ({0, 1} × X 2 ) ∪ (I × X 0 ) we conclude that every such extension is homotopic to one which sends I × X 0 to BE. Then cells I × {v} are sent to loops in BE described by elements ξ v ∈ π 1 (BE, * ), which can be chosen at will. Next we extend through 2-cells. We encounter a problem analogous to the one illustrated on  We have completed the classification of homotopy classes of maps X 2 → BG. Now let us observe that restriction from X to X 2 defines maps

JHEP03(2021)282
We claim that they are injective. Indeed, suppose that l, l : X → BG are such that their restrictions to X 2 are homotopic. Every map ({0, 1} × X) ∪ (I × X 2 ) → BG extends to I × X, since π n (BG; * ) is trivial for n ≥ 3. If the initial homotopy was a homotopy of maps of triples, then so is the extension. This completes the proof of the claim. Next we ask when does a map h : X 2 → BG extend to X. Firstly, the answer depends only on the homotopy class of h, by the homotopy extension property of (X, X 2 ). Thus we may assume that h is a map of triples (X 2 , X 1 , X 0 ) → (BG, BE, * ) and write h = h ,ϕ . Secondly, if an extension to X 3 exists, then there exists also an extension to X, by triviality of higher homotopy groups of BG. It remains to decide when it is possible to extend through 3-cells. We consider a ball q. Its boundary is mapped to BG with homotopy class ϕ ∂q ∈ π 2 (BG; * ) = ker(∆). Thus an extension to whole X 3 exists if and only if ϕ is flat. Hence the proof that homotopy classes of maps X → BG are in one-to-one correspondence with configurations with flat ϕ modulo vertex and edge transformations, as well as of the corresponding statement for the maps of triples, is completed.

C.3 Postnikov class
In this appendix we consider the following question: for which there exists a flat ϕ? First let us observe that the answer depends only on modulo gauge transformations since flatness of ϕ is invariant under vertex and edge transformations. Now let us choose one representative , its lift to and any ϕ satisfying the fake flatness condition. Next we define δϕ : π 3 (X 3 , X 2 ; X 0 ) → ker(∆) by the formula ( δϕ) ω = ϕ ∂ω . Let us observe that it has the following properties: • π 1 (X; X 0 )-equivariance, i.e. ( δϕ) γ ω = γ ( δϕ) ω for a path γ starting at the base point of ω. Thus δϕ is a twisted 3-cochain, see appendix B.
• δϕ is a twisted cocycle. The proof of this is analogous to the proof of the fact that δ 2 is trivial. Nevertheless, it is not necessarily true that δϕ is in the image of δ: ϕ, being valued in the non-abelian group Φ, is not a 2-cochain.
• The cohomology class of δϕ does not depend on the choice of a lift of to nor the choice of ϕ. Indeed, edge transformations do not change δϕ at all, while plaquette transformation χ merely shifts it by δχ.
h ,ϕ l h l * ,l * ϕ Figure 23. Pullback of field configurations may be defined in terms of the associated maps to the classifying space: (l * , l * ϕ) corresponds to the map l • h ,ϕ . Figure 24. Given a map h ,ϕ : X 2 → BG we may compose it with Υ and then extend to a map X → Bcoker(∆), uniquely up to a homotopy. This extension corresponds to the gauge field .
• δϕ is trivial (i.e. ϕ ∂ω = 1 for every ω) if and only if ϕ is flat. Here we are using the fact that balls q generate π 3 (X 3 , X 2 ; x) as a π 1 (X 1 ; x)-module for any x ∈ X 0 .
It is clear from the above properties that the cohomology class [ δϕ] ∈ H 3 (X, ker(∆), ) is trivial if and only if is such that there exists a compatible configuration ( , ϕ) with flat ϕ.
The identity homomorphism π 1 (BG, * ) → coker(∆) determines, up to a homotopy, a map of pairs Υ : (BG, * ) → (Bcoker(∆), * ). Therefore for a configuration ( , ϕ) on X (not necessarily with flat ϕ) we have a commutative diagram of continuous maps presented on the figure 24. Suppose that there existed a map Ξ : Bcoker(∆) → BG such that Υ • Ξ was homotopy equivalent to the self-identity map on Bcoker(∆). Then the map h = Ξ • h : X → BG would be such that Υ • h is homotopic to h , yielding a conclusion that some configuration ( , ϕ ) with = and flat ϕ exists. This is not always true, so the desired Ξ does not always exist. On the other hand one could attempt to construct it cell-by-cell. The obstruction to do this is a universal example for the cohomology classes [ δϕ], as we will now demonstrate.
Let ι be the tautological coker(∆)-valued gauge field on Bcoker(∆). We may construct its lift to a G-valued field configuration (ι, o) on BG, which determines a mapping h ι,o : (Bcoker(∆) 2 , Bcoker(∆) 1  We reiterate the fact that β does not depend on the choice of ι and o, although the representative cocycle δo certainly does. The map h ι,o induces the identity homomorphism between fundamental groups, and conversely, any map with this property is homotopic to one of the form h ι,o for some (ι, o). Thus if β is nontrivial, a right homotopy inverse Ξ of Υ does not exist. Conversely, if β is trivial, then some h ι,o extends to the whole Bcoker(∆). Denoting the extension by Ξ, we have that Υ • Ξ induces the identity map on π 1 (Bcoker(∆), * ) and hence is homotopic to the identity map, by the classification of maps valued in classifying spaces of groups. We claim that for any field configuration ( , ϕ) on X one has the relation Indeed, consider the field configuration ( , ϕ ) = (h * ι, h * o). Then = , which implies that δϕ = h * δo and δϕ are cohomologous. In particular, a configuration ( , ϕ ) with flat ϕ and = exists if and only if the pullback h * β of the Postnikov class is trivial.

C.4 Homomorphisms and weak equivalences
In this appendix we will assume that the 1-skeleton of BG is contained in BE. This is possible, because the inclusion of BE in BG induces an epimorphism of fundamental groups, see [55, p. 219]. With this condition the identity map on BG may be regarded as a map of triples (BG, BG 1 , * ) → (BG, BE, * ). Thus it determines a G-valued field configuration (κ, η) on BG, called the tautological configuration. This configuration has flat η. The corresponding map takes BE to BE, so η restricted to BE is trivial: η f = 1 for every face f in BE (but not necessarily for faces in BG). Configuration (κ, η) is universal: if h ,ϕ is a cellular map (X 2 , X 1 , X 0 ) → (BG, BE, * ) corresponding to a configuration ( , ϕ), then h * ,ϕ (κ, η) = ( , ϕ). This is because in this case the map l on the figure 23 is simply the inclusion of (BG 2 , G 1 , * ) in (BG, BE, * ), so h l * ,l * ϕ = h ,ϕ . Now let G be another crossed module and let (E, F ) : G → G be a homomorphism. Then (E(κ), F (η)) is a G -valued configuration on BG, so it determines a map (BG 2 , BG 1 , * ) → (BG , BE , * ), unique up to a homotopy of maps of triples. Since η was flat, so is F (η). Thus the corresponding map extends to whole BG, uniquely up to a homotopy of maps of triples (BG, BG 1 , * ) → (BG , BE , * ). We denote the extension by B(E, F ). Furthermore, F (η) is trivial on BG, so (perhaps after a homotopy of maps of triples) B(E, F ) takes BE to BE . Then B(E, F ) induces a homomorphism (B(E, F )) * : G = Π 2 (BG, BE; * ) → Π 2 (BG , BE ; * ) = G .
We claim that (B(E, F )) * = (E, F ). Indeed, let i : (BG 2 , BG 1 , * ) → (BG, BE, * ) be the inclusion. Since B(E, F ) corresponds to the configuration (E(κ), F (η)), we have that the Maps π 1 (BG 1 ; * ) → π 1 (BG; * ) and π 2 (BG 2 , BG 1 ; * ) → π 2 (BG, BE; * ) are epimorphisms, so (C.5) implies the validity of the claim. Indeed, surjectivity of the first homomorphism is clear. Secondly, we know that the inclusion BG 2 → BG induces an epimorphism of second homotopy groups and that the second homotopy groups of BG 1 and BE are trivial. Hence by naturality of the long exact sequence of relative homotopy groups, the diagram on figure 26 is commutative with exact rows. The proof is completed by the four lemma.
We have proven that (B(E, F )) * = (E, F ), so in particular the maps of first and second homotopy groups induced by B(E, F ) are E and F , respectively. Thus if (E, F ) is a weak isomorphism, then B(E, F ) is a homotopy equivalence, by Whitehead's theorem [50, p. 346]. Thus it induces a bijection [X, BG] ∼ = [X, BG ] for every space X, so topological gauge theories based on G and G are equivalent. More explicitly, this equivalence is given by mapping a G-valued configuration ( , ϕ) on X to a G -valued configuration (E( ), F (ϕ)).
We remark that the above result implies that BG is determined uniquely up to a homotopy equivalence, a fact which we have never used. Indeed, if BG is another construction of the classifying space of G, the above construction gives a homotopy equivalence BG → BG induced by the identity homomorphism G → G.

C.5 Construction of classifying spaces
In this appendix we fix a crossed module G and construct a classifying space BG together with its subcomplex BE by gluing cells. In the process we will repeatedly use standard results [55, p. 215] concerning the effect of attaching cells on homotopy groups, in particular the fact that the n-th homotopy group is not changed by attaching cells of dimension greater than n + 1 (say, by the cellular approximation theorem). The latter is true also for relative homotopy groups. Firstly, for the 0-skeleton we take a single point * . To proceed further, we choose a presentation of E, i.e. a set { i } i∈I and relations {ρ j } j∈J . For each i ∈ I we attach to * a single edge, so that BG 1 = BE 1 is i∈I S 1 , a bouquet of circles. Now the fundamental group of BE 1 is free with generators indexed by the set I. We denote the generator corresponding to i ∈ I by i . Each relation ρ j is a word in the alphabet { i } i∈I , so it defines an element of the fundamental group of BE 1 . Space BE 2 is formed by attaching to BE 1 a 2-cell for each j ∈ J, with an attaching map of homotopy class ρ j ∈ π 1 (BE 1 ; * ). Then π 1 (BE 2 ; * ) = E.
Next we choose a set {ϕ k } k∈K ⊆ Φ such that the elements ϕ k with any ∈ E generate the group Φ. Space BG 2 is formed from BE 2 by attaching a 2-cell for each k ∈ K, with attaching maps of homotopy classes ∆ϕ k ∈ E = π 1 (BE 2 ; * ). Then the fundamental group of BG 2 is coker(∆).
Space BE 3 is formed by attaching 3-cells to BE 2 in such a way that π 2 (BE 3 ; * ) becomes trivial, e.g. one 3-cell for each element of a set of generators of π 2 (BE 3 ; * ). Then an auxillary space BG 2 1 2 is formed by attaching to BG 2 the 3-cells of BE, or equivalently [55, p. 49] by gluing to BE 3 those 2-cells of BG which are not in BE.
To proceed further, we need to understand the group Φ := π 2 (BG 2 1 2 , BE 3 ; * ). Since BG 2 1 2 is obtained from BE 3 by attaching faces, Whitehead's theorem applies and we have that Φ is generated by elements φ k (with φ k -the generator corresponding to the k-th face), subject only to relations following from Peiffer identities in the crossed module G := Π 2 (BG 2 1 2 , BE 3 ; * ). Furthermore, the boundary homomorphism π 2 (BG 2 1 2 , BE 3 ; * ) → π 1 (BE 3 ; * ) = E is given by The assignment p( φ k ) = ϕ k defines a group epimorphism p : Φ → Φ. Furthermore, (id, p) is a homomorphism of crossed modules G → G. All that is summarized by the commutative diagram with exact rows presented on figure 27. We let {λ l } l∈L be a set of generators of ker(p). Then for each l we have that ∂λ l = ∆(p(λ l )) is trivial. On the other