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

We construct a dynamical lattice model based on a crossed module of possibly non-abelian finite groups. 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 generalizes, and in appropriate limits reduces 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 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 encodes not only the space of ground states, but also its possible excitations. In this work we study a generalized lattice gauge theory, which may be seen as a non-topological 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.
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 [36,37,38,29] and hamiltonian formulations [39,40,41]. Related models have also been proposed [42,43,29] as effective descriptions of Yang-Mills theory vacua.
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 [44,45,46] is a 2-group. There are several equivalent ways to define these objects [47]. 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 [48], 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 is introductory and sets the stage for subsequent developments. In subsection 2.1 we review basic geometric notions used in the text, to some extent following [41]. 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. 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 not new, but we are not aware of an exposition which stresses relation with field theory. We hope this way of presentation will be helpful for some readers.
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.

Basic notions 2.1. 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 grupoid, whose definition we now recall. A grupoid 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: 1. 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 grupoid.
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 grupoid π 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 π 1 (A; b) of A based at b ∈ B may be described as {γ ∈ π 1 (A; B) | t(γ) = s(γ) = b}.
In our applications we shall consider connected spaces X equipped with a lattice decomposition 1 . 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 grupoid 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 grupoid 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 [49, p. 83], i.e. there exists a set L of generators satisfying no nontrivial 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 . of π 1 (X 1 ; X 0 ) for a certain space X. Edges are depictured by continuous lines, with a maximal tree distinguished by the red color. Two independent loops based at the point * (the big dot) are indicated by dashed lines.
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. Grupoid π 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 grupoids. Map F : G → G ′ is called a homomorphism if: We note that F 0 is uniquely determined by F and that the first property guarantees that the second one makes sense. Secondly, 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 two-dimensional aspects of geometry needed to formulate models considered in this work, we need to review another algebraic structure. A crossed module of grupoids 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 figure 2 for a pictorial representation of these conditions. Figure 3: Definition of the product in π 2 (A, B; b), which is given by horizontal concatenation.
Multiplication of elements of π 2 (A, B; b) is given by horizontal concatenation -see figure 3. One may also show [49, p. 343] that elements of π 2 (A, B; b) describe homotopy 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. Figure 5: Definition of the action of π 1 (B; C) on π 2 (A, B; C). Here γ is a path from c ′ to c and σ belongs to π 2 (A, B; c ′ ).
A homomorphism of crossed modules of grupoids (G, H, ∂, ⊲) → (G ′ , H ′ , ∂ ′ , ⊲ ′ ) is a pair of homomorphisms of grupoids, E : G → G ′ and F : be a fixed crossed module of groups with finite E and Φ. A G-valued lattice gauge field is defined 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 [50,51], that this is indeed possible. 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. Figure 7: Schematic representation of a map representing the element in π 2 (X 2 , X 1 ; b(f )) corresponding to a plaquette f .
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 grupoid π 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 grupoid π 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 * • * • e e f Figure 8: The real projective plane is a disc with antipodal points of the bounding circle identified. It can be constructed by attaching a plaquette to a circle along a map of winding number two. f n := e n ⊲ f , n ∈ Z. The first Peiffer identity gives ∂f n = e 2 , so relations (2.2) reduce to Evaluating this for m = n gives f n = f n+2 . Thus all generators can be expressed in terms of f 0 and f 1 . Secondly, taking n = 0, m = 1 gives f 0 f 1 = f 1 f 0 . 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 ∆ϕ f = ǫ ∂f for any face f.
This is a non-trivial constraint on the collections ǫ = {ǫ e }, ϕ = {ϕ f }, called fake flatness. 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 ∆ϕ f = ǫ e 5 ǫ −1 e 4 ǫ e 3 ǫ −1 e 2 ǫ e 1 . (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.
e e • * • * ′ f f ′ Figure 9: Illustration of the change of a base point. In this case

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: 1. The image im(∂) of ∂ is a normal subgroup of G. Thus there is a group structure on the quotient space coker(∂) = G/im(∂).
2. The action of G on H preserves ker(∂), the kernel of ∂: and two conclusions from the second Peiffer identity: 1. ker(∂) is a central subgroup of H. In particular ker(∂) is abelian.
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 2 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. (2.9) This is the statement that ǫ = {ǫ e } is a flat gauge field: the holonomy along any loop in X which bounds a surface is trivial 3 , 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.
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. 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 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): By construction, ϕ σ may also be computed as 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.
. On the other hand, we also have l = ∂ ((e 4 e 5 ⊲ f 2 ) f 1 ). Thus 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 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 4 .
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 We will call them vertex transformations. They preserve the fake flatness, since Thus they define a left action of the group E (0) 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. Figure 13: Composition rule for vertex transformations: Secondly, an edge transformation is parametrized by a collection ψ = {ψ e } of elements of Φ. It changes ǫ according to 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 the center 1-form symmetry operators are also of electric type: they shift the gauge field by a center-valued cocycle. This operation reduces to a gauge transformation for cocycles of trivial cohomology class.
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 ∆ψ (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(∆), γ for general paths γ by demanding that this relation is satisfied exactly (rather than merely up to elements from ker(∆)) and that ψ (ǫ) e = ψ e for any edge e. Freeness of the grupoid π 1 (X 1 ; X 0 ) guarantees that this definition is well-posed. More explicitly, for a path γ = e n e n−1 . . . e 1 it gives By induction on n, formulas (2.18) and (2.22) imply that with this definition of ψ (ǫ) γ , transformation law (2.19) is indeed satisfied for any γ. We also note that the composition rule (2.22) yields the inversion formula 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 ϕ f i ∈ Φ. 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.

Edge transformations form a group Φ
(1) Indeed, for configurations as on figure 14 we have Thus in order to prove the claimed composition law it only remains to show that ψ ∂f . 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 (0) Next we define plaquette transformations. They are labeled by ker(∆)-valued collections χ = {χ f } indexed by faces. The action on fields is given by Figure 15: Illustration of the semi-direct product structure of the group E (0) X generated by vertex and edge transformations.
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.
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 • 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 (ǫ, ϕ). For each vertex v we write ξ v = ∆(ρ v ) for some ρ v ∈ Φ. Then we have 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. Figure 16: A decomposition of the 2-torus. In this case we have ∂f = b −1 a −1 ba.
We take E to be the dihedral group D 4 . It is generated by elements x, y, z, which are subject to relations The group Φ is taken to be {1, z}, with ∆ the inclusion map. Action of E on Φ is trivial. As a result, ker(∆) is trivial and coker(∆) = Z 2 × Z 2 .
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 5 . 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 (2.40) 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].
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 .
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 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 ψ = {ψ e } of elements of Φ we let V ψ be • 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 (0) 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. Instead we have 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: 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
(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 6 , 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 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.
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 7 ker(∆) and coker(∆). Furthermore, E acts nontrivially 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: Finally, there are edge Gauss' operators, which take the form 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.
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 8 ζ ∂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 9 κ ∂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 (3.29) 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

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: • Ground states of H E are characterized by strong fluctuations of holonomies.
Similar behaviour is expected to be exhibited also by ground states of the full hamiltonian in the regime in which H E dominates over H M . Such phase, if it indeed exists, would likely be characterized by an area law for 1-holonomies and a volume law for 2-holonomies.
• 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 possible to diagonalize all of them at the same time. Eigenvectors are labeled by element χ of the Pontryagin dual of ker(∆), i.e. the group ker(∆) of homomorphisms ker(∆) → U(1). Such eigenvector, here labeled by | χ , satisfies

Hamiltonian of the model Basis of ground states
for every χ ∈ ker(∆). (3.31) It then follows that we have The quantity in the parenthesis is, by definition, ν( χ) -the Fourier transform of ν evaluated at χ. We have assumed that functions ν f defining terms for some reference (ǫ, ϕ). The next step is to understand the space of orbits.
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 ξ,ϕ G(ξ)|ǫ, ϕ , (3.34) 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, (3.35a) ϕ ∂q = 1 for every ball q. (3.35b) 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): 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 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. Below we prove this statement and give a more explicit 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 ξ,ψ G(ξ)V(ψ)|ǫ, ϕ . (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.
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 some twisted cocycle χ (see apppendix B). The more stringent condition that χ is a twisted coboundary holds if and only if configurations (ǫ, ϕ) and (ǫ, ϕ ′ ) are related by an edge transformation with ψ e in ker(∆) for each e. Therefore the set F (ǫ) of equivalence classes of flat ϕ (with the given ǫ) modulo ker(∆)-valued edge transformations is an affine space over H 2 (X, ker(∆), ǫ). That is not the end of the story, because the group Stab V,E (ǫ) of combined vertex and edge transformations preserving ǫ acts on F (ǫ). We will now show that this action factors through the smaller group Stab V (ǫ) of coker(∆)-valued vertex transformations, i.e. collections ξ = {ξ v } of elements of coker(∆) such that for every path γ.
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.
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 ) : . We let T be the map which sends a G-valued configuration (ǫ, ϕ) to (E(ǫ), F (ϕ)), where E(ǫ) = {E(ǫ e )} and F (ϕ) = {F (ϕ f )}. 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 [53], 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 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.

Yang-Mills
Yang-Mills 2-form gauge theory 2-form gauge theory 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 10 . 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 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 which are labeled by collections ϕ valued in ker(∆), modulo 2-form gauge transformations ϕ f → ψ ∂f ϕ f with ker(∆)-valued ψ. Thus we obtain the space of states of a 2-form gauge theory. Vertex gauge transformations with ξ valued in im(∆) act trivially, because they reduce to edge transformations, which were already taken care of. There remains only the condition of invariance with respect to vertex transformations with constant ξ, which again can be interpreted as a global symmetry.
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).
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 [54, 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.
With this differential, C • (X, K, α) is a cochain complex, whose cohomology we denote by H • (X, K, α) and call the twisted cohomology. Another popular name is cohomology with local coefficients. To see that δ is nilpotent, first note that for a 0-cochain ρ we = 1, as α ∂σ = 1. For a p-cochain χ with p ≥ 2 we have (δ 2 χ) τ = χ ∂ 2 τ . Homomorphism ∂ 2 fits in the commutative diagram shown on figure 19, so it factors through the (trivial) composition of two subsequent homomorphisms in the long exact sequence of relative homotopy groups [49,Thm. 4.3] of the pair (X p+1 , X p ). 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. 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.
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 l * : 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 and another datum called a local system of abelian groups on X. The latter may be (non-canonically) 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 11 is as a connected CW-complex with fundamental group G and trivial higher homotopy groups. It is well known [54,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 12 (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 [49, 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 13 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. 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 11 There is a more general notion of a classifying space of a topological group [55], for which this definition is not suitable. Here only discrete groups are considered. 12 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. 13 Here I is the unit interval. 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 [56]. 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 π n (BG; * ) =      coker(∆) for n = 1, ker(∆) 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 [53,57,58,59]. 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.
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 figure 20. An extension exists if ǫ ′ e ξ t(e) ǫ e ξ −1 s(e) −1 ∈ E represents a trivial element of π 1 (BG, * ) = coker(∆). Assuming this is true, homotopy classes of extensions are described by elements ψ e ∈ π 2 (BG, BE, * ) = Φ such that From now we focus on one extension and proceed to extending through 3-cells. These are products of I and faces of X 2 . A calculation shows that for every face f one encounters the problem of extending a map from the boundary of a cylinder, illustrated on figure 21, to its interior. This is possible if and only if the corresponding element ϕ ′−1 Here ǫ ′′ is given by ǫ ′′ e = ξ t(e) ǫ e ξ −1 s(e) . Summarizing, a homotopy between h ǫ,ϕ and h ǫ ′ ,ϕ ′ exists if and only if there exist collections ξ ∈ E (0) X and ψ ∈ Φ (1) X fitting in a diagram of the form presented on the figure 22. In other words, configurations (ǫ, ϕ) and (ǫ ′ , ϕ ′ ) have to be related by the action of vertex and edge transformations. Figure 22: Field configuration (ǫ ′ , ϕ ′ ) is obtained from (ǫ, ϕ) by a vertex transformation ξ followed by an edge transformation ψ.
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 δχ.
• δϕ 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 ϕ.
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 ǫ,ϕ .
Cocyle δϕ satisfies an important naturality property. Namely, let us consider a map of triples l : (Y 2 , Y 1 , Y 0 ) → (X 2 , X 1 , X 0 ) for some CW-complex Y . Then it makes sense to pull back a field configuration (ǫ, ϕ) on X to a configuration l * (ǫ, ϕ) = (l * ǫ, l * ϕ) on Y . One possible description of this pullback operation is through the diagram 23. Equivalently, (l * ǫ, l * ϕ) is given by the composition Clearly we have l * [ δϕ] = [ δl * ϕ] ∈ H 3 (Y, ker(∆), l * ǫ). This innocuous-looking statement allows to relate [ δϕ] to a universal example. 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 ǫ.
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 , * ) → (BG, BE, * ). Thus we may form the cocycle δo, which is a representative of the so-called Postnikov class β = [ δo] ∈ H 3 (Bcoker(∆), ker(∆), ι). (C.3) 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.

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 [54, 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).
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 [49, 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 [54, 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 [54, 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 ; * ).
At this point all homotopy groups up to degree 2 are as desired. The procedure may be continued inductively: for every k ≥ 4 space BE k is obtained from BE k−1 by attaching k-cells in such a way that π k−1 (BE k ; * ) becomes trivial. Then BG k is formed from BG k−1 by attaching all k-cells of BE and possible some additional cells needed to assure that π k−1 (BG k ; * ) becomes trivial. Finally, we let BG (resp. BE) be the union of all BG k (resp. BE k ), endowed with the weak topology.