Topological invariant of 4-manifolds based on a 3-group

We study a generalization of a 4-dimensional BF-theory in the context of higher gauge theory. We construct a triangulation independent topological state sum Z, based on the classical 3BF action for a general 3-group and a 4-dimensional spacetime manifold. This state sum coincides with Porter's TQFT for d=4 and n=3. In order to verify that the constructed state sum is a topological invariant of the underlying 4-dimensional manifold, its behavior under Pachner moves is analyzed, and it is obtained that the state sum Z remains the same. This paper is a generalization of the work done by Girelli, Pfeiffer, and Popescu for the case of state sum based on the classical 2BF action with the underlying 2-group structure.


I. INTRODUCTION
Within the Loop Quantum Gravity framework, one studies the nonperturbative quantization of gravity, both canonically and covariantly, see [1][2][3][4] for an overview and a comprehensive introduction. The covariant approach focuses on defining of the path integral for the gravitational field by considering a triangulation of a spacetime manifold and specifying the path integral as a discrete state sum of the gravitational field configurations living on the simplices in the triangulation. This quantization technique is usually referred to as the spinfoam quantization method, and it can be divided into three major steps: 1. first, one writes the classical action S[g] as a topological BF -like action plus simplicity constraints, 2. then one uses the algebraic structure underlying the topological sector of the action to define a topological state sum Z, 3. and finally, one deforms the topological state sum by imposing simplicity constraints, thus promoting it into a path integral for a physical theory.
Spinfoam models for gravity are usually constructed by constraining the topological gauge theory known as BF theory, obtaining the Plebanski formulation of general relativity [5]. For example, in 3 dimensions, the prototype spinfoam model is known as the Ponzano-Regge model [6]. In 4 dimensions there are multiple models, such as the Barrett-Crane model [7,8], the Ooguri model [9], and the most sophisticated EPRL/FK model [10,11] (see also [12][13][14]). All these models aim to define a viable theory of a quantum gravitational field alone, without matter fields. The attempts to include matter fields have had limited success [15], mainly because the mass terms cannot be expressed in the theory due to the absence of the tetrad fields from the topological BF sector of the theory. In order to overcome this problem, a new approach has been developed within the framework of higher gauge theory (for a review of higher gauge theory, see [16,17], and for its applications in physics see [18][19][20][21][22][23][24][25][26][27][28][29]). Within higher gauge theory formalism, one generalizes the BF action, which is based on some Lie group, to a 2BF action based on the 2-group structure. Within this approach [30], one rewrites the action for general relativity as a constrained 2BF action, such that the tetrad fields are present in the topological sector. This result opened up the possibility to couple all matter fields to gravity in a straightforward way. Nevertheless, the matter fields could not be naturally expressed using the underlying algebraic structure of a 2-group, rendering the spinfoam quantization method only half-implementable, since the matter sector of the classical action could not be expressed as a topological term plus a simplicity constraint, which means that the steps 2 and 3 above could not be performed for the matter sector of the action.
This final issue has recently been resolved in [31], where one more step in the categorical ladder is performed in order to generalize the underlying algebraic structure from a 2-group to a 3-group (see also [32] for the 4-group formulation). This generalization then naturally gives rise to the so-called 3BF action, which proves to be suitable for a unified description of both gravity and matter fields. The first step of the spinfoam quantization program is carried out in [31] where the suitable gauge 3-groups have been specified, and the corresponding constrained 3BF actions constructed so that the desired classical dynamics of the gravitational and matter fields is obtained. A reader interested in the construction of the constrained 2BF actions describing the Yang-Mills field and Einstein-Cartan gravity, and 3BF actions describing the Klein-Gordon, Dirac, Weyl, and Majorana fields, each coupled to gravity in the standard way, is referred to [30,31].
In this paper, we focus our attention on the ssecond step of the spinfoam quantization program: we will construct a triangulation independent topological state sum Z, based on the classical 3BF action for a general 3-group and a 4-dimensional spacetime manifold M 4 . This state sum coincides with the Porter's TQFT [33,34] for d = 4 and n = 3. In order to verify that the constructed state sum is topological, we analyze its behavior under Pachner moves [35]. Pachner moves are local changes of a triangulation that preserve topology, such that any two triangulations of the same manifold are connected by a finite number of Pachner moves. In 4 dimensions, there are five different Pachner moves: the 3 − 3 move, 4 − 2 move, and 5 − 1 move, and their inverses. After defining the state sum, we calculate its behavior under these Pachner moves. We obtain that the state sum Z remains the same, proving that it is a topological invariant of the underlying 4-dimensional manifold. This construction thus completes the second step of the quantization procedure. Our result paves the way for the third step of the covariant quantization procedure and a formulation of a quantum theory of gravity and matter by imposing the simplicity constraints on the state sum. We leave the third step for future work.
The layout of the paper is as follows. In Section II we review the pure and the constrained nBF theories describing some of the physically relevant models -the constrained 2BF actions describing the Yang-Mills field and Einstein-Cartan gravity, and constrained 3BF actions describing the Klein-Gordon and Dirac fields coupled to Yang-Mills fields and gravity in the standard way. In Section III, we review the relevant algebraic tools involved in the description of higher gauge theory, 2-crossed modules, and 3-gauge theory. Starting from the notion of Lie 3-groups, we generalize the integral picture of gauge theory to a 3-gauge theory that involves curves, surfaces, and volumes labeled with elements of non-Abelian groups. In Section IV, we define the discrete state sum model of topological higher gauge theory in dimension d = 4. The proof that the state sum is invariant under the Pachner moves and thus independent of the chosen triangulation is presented in Appendix A.
Notations and conventions throughout the paper are as follows. If G is a finite group, G dg = 1/|G| g∈G denotes the normalized sum over all group elements, while δ G denotes corresponding δ-distribution on G. The δ-function is defined for every g ∈ G such that δ G (g) = |G| if g = e, i.e. , if g is the unit element of the group, and δ G (g) = 0 if g = e. If G is a Lie group, G dg and δ G denote the Haar measure and the δ-distribution on G, respectively. We define our model for any closed and oriented combinatorial manifold M 4 of dimension d = 4. The set of all k-simplices, 0 ≤ k ≤ d, is denoted by Λ k . The set of vertices Λ 0 is finite and ordered, and every k-simplex is labeled by (k + 1)-tuples of vertices (i 0 . . . i k ), i 0 , . . . , i k ∈ Λ 0 such that i 0 < · · · < i k .

II. REVIEW OF THE CLASSICAL THEORY
A. Topological nBF theories For a given Lie group G whose Lie algebra g is equipped with the G-invariant symmetric nondegenerate bilinear form _ , _ g , and for a given 4-dimensional spacetime manifold M 4 , one can introduce the BF action as where 2-form F ≡ dα + α ∧ α is the curvature for the g-valued connection 1-form α ∈ A 1 (M 4 , g) and 2-form B ∈ A 2 (M 4 , g) is an g-valued Lagrange multiplier. Varying the action (1) with respect to the Lagrange multiplier B and the connection α, one obtains the equations of motion of the theory, From the first equation of motion, one sees that α is a flat connection, which then, together with the second equation of motion, implies that B is constant. Therefore, the theory given by the BF action has no local propagating degrees of freedom, i.e., the theory is topological. For more details about the BF theory see [5,36,37]. Within the framework of Higher Gauge Theory, by passing from the notion of a gauge group to the notion of a gauge 2-group, one defines the categorical generalization of the BF action, called the 2BF action. A 2-group has a naturally associated notion of a 2-connection (α , β), described by the usual g-valued 1-form α ∈ A 1 (M 4 , g) and an h-valued 2-form β ∈ A 2 (M 4 , h), where h is a Lie algebra of the Lie group H. The 2-connection gives rise to the so-called fake 2-curvature (F , G), where F is a g-valued fake curvature 2-form F ∈ A 2 (M 4 , g) and G is a h-valued curvature 3-form G ∈ A 3 (M 4 , h), defined as Representing the 2-group as a crossed-module (H ∂ → G , ✄), see the next section for the definition and notation, one introduces a 2BF action using the fake 2-curvature (3) as where the 2-form B ∈ A 2 (M 4 , g) and the 1-form C ∈ A 1 (M 4 , h) are Lagrange multipliers, and _ , _ g and _ , _ h denote the G-invariant symmetric nondegenerate bilinear forms for the algebras g and h, respectively. Similarly as in the case of the BF theory, varying the 2BF action (4) with respect to the Lagrange multipliers B and C one obtains the equations of motion, i.e. , the conditions that the curvature 2-form F and the curvature 3-form G vanish, while varying with respect to the connections α and β one obtains Similar to the case of the BF action, the 2BF action defines a topological theory, i.e., a theory with no propagating degrees of freedom, see [38][39][40][41] for review and references.
Continuing the categorical ladder one step further, one can generalize the 2BF action to the 3BF action, by passing from the notion of a 2-group to the notion of a 3-group. Representing the 3-group with a 2-crossed module , see next section for definition and notation, one can define a 3-connection as an ordered triple (α, β, γ), where α, β, and γ are appropriate algebra-valued differential forms, α ∈ A 1 (M 4 , g), β ∈ A 2 (M 4 , h), and γ ∈ A 3 (M 4 , l). The corresponding fake 3-curvature (F , G, H) is defined as: Then, similarly to the construction of BF and 2BF actions, one defines the 3BF action as where g, h, and l denote the Lie algebras corresponding to the Lie groups G, H, and L and the forms _, _ g , _, _ h , and _, _ l are G-invariant symmetric nondegenerate bilinear forms on g, h, and l, respectively. The variables B ∈ A 2 (M 4 , g), C ∈ A 1 (M 4 , h), and D ∈ A 0 (M 4 , l) are Lagrange multipliers, and their associated equations of motion are the conditions that the 3-curvature (F , G, H) vanishes, Additionally, varying with respect to the 3-connection variables α, β, and γ one gets: For further details see [22,42,43] for the definition of the 3-group, and [31] for the definition of the pure 3BF action.
All the above actions are topological, in the sense that they do not contain any local propagating degrees of freedom [44,45]. In this sense, they are not very interesting for the description of realistic physics, which should feature nontrivial dynamics. Nevertheless, choosing the convenient underlying 2-crossed module structure and imposing the appropriate simplicity constraints onto the degrees of freedom present in the 3BF action, one can obtain the nontrivial classical dynamics of the gravitational and matter fields, as we will see in the following subsection.

B. Models with relevant dynamics
Let us review how one can employ n-group structure to introduce the topological nBF actions corresponding to gravity and matter fields, as well as the form of the appropriate simplicity constraints to be imposed on these fields to obtain the classical dynamics.
First we review the most important constrained 2BF actions. We begin by rewriting general relativity as a constrained 2BF action based on the underlying Poincaré 2-group. The Poincaré 2-group is equivalent to a crossed module (G ∂ → H, ✄), where the groups are choosen as G = SO(3, 1) and H = R 4 , and the map ∂ is trivial. The action ✄ is a natural action of SO(3, 1) on R 4 , defined as where M ab and P a are the generators of groups SO(3, 1) and R 4 , respectively. The action ✄ of SO(3, 1) on itself is given via conjugation, by definition of a crossed module. Then, Poincaré 2-group gives rise to the 2-connection (α, β), given by the algebra-valued differential forms where we have interpreted the connection 1-form α ab as the ordinary spin connection ω ab . Also, the corresponding 2-curvature (F , G) is given as where we can recognize the standard Riemann curvature 2-form R ab in F . Having these variables in hand, one defines 2BF action (4) for the Poincaré 2-group as Here, the crucial insight is that the Lagrange multiplier fields C a can be identified with the tetrads [30], since one can show that 1-forms C a transform in the same way as the tetrad 1-forms e a under the Lorentz transformations and diffeomorphisms. One can now construct the action for general relativity by simply adding the additional simplicity constraint term to the action (16): Here λ ab is a Lagrange multiplier 2-form associated to the simplicity constraint term, and l p is the Planck length. It is straightforward to show that the corresponding equations of motion reduce to vacuum Einstein field equations. Thus the action (17) is classically equivalent to general relativity. The construction of the action (17) is analogous to the Plebanski model, where general relativity is constructed by adding a simplicity constraint to the BF theory based on the Lorentz group. However, one clear advantage of this model over the Plebanski model is that the tetrads are explicitly present in the topological sector of the action. Upon the covariant quantization, tetrads are therefore fundamental, off-shell quantities, in contrast to the Plebanski model where they appear only on-shell, as solutions of the classical equations of motion. The off-shell presence of the tetrads facilitates the straightforward coupling of the matter fields to gravity, and thus overcomes the problems present in the spinfoam models [15]. The Poincaré 2-group can be easily extended to include the coupling of the SU (N ) Yang-Mills fields to gravity [31].
To achieve this, one constructs the crossed module (G ∂ → H, ✄), where the groups are chosen as G = SO(3, 1)×SU (N ) and H = R 4 , while the map ∂ remains trivial, as before. The action ✄ of the group G on H is such that the SO(3, 1) subgroup acts on R 4 via the vector representation (13), while the action of the SU (N ) subgroup is trivial, where τ I are the SU (N ) generators. This crossed module yields the 2-connection (α, β), where algebra-valued 1-form α and algebra valued 2-form β are defined as follows, where we can identify the gauge connection 1-form A I . This connection gives rise to the 2-curvature (F , G), where F as defined as while the curvature G for β remains the same as before. Given these variables, the Lagrange multiplier B in the first term of the topological action (4) also splits into two pieces corresponding to the direct product of the group G, giving where 2-form B I ∈ A 2 (M 4 , su(N )) is the second piece of the Lagrange multiplier. To obtain the non-trivial classical dynamics for gravity and the Yang-Mills field, we add the appropriate simplicity constraint terms to the action (21), and construct the constrained 2BF action: Here, the first row is the topological sector and the familiar simplicity constraint for gravity from (17), while the second row contains the appropriate simplicity constraints for Yang Mills field, featuring the Lagrange multipliers λ I and ζ abI . The action (22) provides two dynamical equations -the equation for A I , where Γ λ µν is the standard Levi-Civita connection, and an equation for e a which is the Einstein field equation with the SU (N ) gauge field source term, In this way, we see that both gravity and gauge fields can be successfully represented within a unified framework of higher gauge theory, based on a 2-group structure. A generalization from SU (N ) Yang-Mills case to the more complicated cases, such as SU (3) × SU (2) × U (1), is straightforward. Let us now review how one can use the 3-group structure and the corresponding constrained 3BF theory to describe general relativity coupled to Klein-Gordon and Dirac fields. To describe a single real Klein-Gordon field coupled to gravity, one begins by specifying a 2-crossed module (L where I is the sole generator of the Lie group L. This 2-connection gives rise to the fake 3-curvature (F , G, H), The importance of the 3BF theory for this choice of the 2-crossed module lies in the fact that the Lagrange multiplier D can transform as a scalar with respect to Lorentz symmetry, M ab ✄ I = 0, and it transforms as a scalar with respect to diffeomorphisms since D is also a 0-form. In other words, one can interpret the Lagrange multiplier D to be a real scalar field, D ≡ φ, and write the topological 3BF action (8) as: In order to obtain the Klein-Gordon field φ of mass m coupled to gravity in the standard way, the appropriate simplicity constraints are imposed, and the constrained 3BF action takes the form: The first row is the topological sector (27) and the simplicity constraint for gravity from the action (17), the second row contains two new simplicity constraints featuring the Lagrange multiplier 1-forms λ and Λ ab and the 0-form H abc , and the third row features the mass term for the scalar field. The action (28) has two dynamical equations of motion -the equation for the scalar field φ is the covariant Klein-Gordon equation, while the equation for the tetrads e a is the Einstein field equation with the scalar field source term, We see that the obtained theory is classically equivalent to general relativity coupled to a scalar field. Most importantly, one sees that the choice of the group L dictates the matter content of the theory, while the action ✄ of G on L specifies the transformation properties of the matter fields. Finally, in order to describe the Dirac field coupled to Einstein-Cartan gravity, the 2-crossed module (L δ → H ∂ → G , ✄ , {_ , _}) has to be chosen as follows. The groups are G = SO (3,1). H = R 4 , and L = R 8 (G), where G is the algebra of complex Grassmann numbers. The maps ∂, δ and the Peiffer lifting are trivial, as before. The action of the group G on H is via vector representation, and on L via spinor representation, in the following way. Denoting the eight generators of the Lie group R 8 (G) as P α and P α , where the bispinor index α takes the values 1, . . . , 4, the action ✄ of G on L is given explicitly as where σ ab = 1 4 [γ a , γ b ], and γ a are the usual Dirac matrices. This choice of the 2-crossed module gives rise to the 3-connection (α , β , γ), defined as where the 3-connection 3-forms γ α andγ α should not be confused with the Dirac matrices γ a due to different types of indices. The 3-curvature (F , G , H) is given as: As in the case of the scalar field, the choice of the group L and action ✄ of G on L dictate the matter content of the theory and its transformation properties. The group L prescribes that D contains eight independent real anticommuting matter fields as its components. Then, since D is a 0-form and it transforms according to the spinorial representation of SO(3, 1), these eight real Grassmann-valued fields can be identified with the four complex Dirac bispinor fields, and one can write the corresponding topological 3BF action as: In order to obtain the action that gives us the dynamics of Einstein-Cartan theory of gravity coupled to a Dirac field, we add the following simplicity constraints: The topological sector is in the first row, as well as the gravitational simplicity constraint, the second row contains the new simplicity constraints for the Dirac field, while the third row contains the mass term for the Dirac field and a term that ensures the correct coupling between the torsion and the spin of the Dirac field. Varying the action (35), one obtains the following dynamical equations of motion -the equations for ψ andψ which are the standard covariant Dirac equation and its conjugate, and the differential equation of motion for e a which is the Einstein field equation with a Dirac field source term, Moreover, one obtains the desired equation of motion for the torsion, where s a is the Dirac spin 2-form. The equations of motion (36), (37), and (38) are precisely the equations of motion of the Einstein-Cartan-Dirac theory.
The natural presence of a scalar and Dirac field in the 3BF action is an essential property of the specific choices of the 3-group structures in a 4-dimensional spacetime, just like the existence of the tetrad field e a in the topological 2BF action is an essential property of the 2BF action and the Poincaré 2-group. In this way, both the scalar field and the Dirac field appear in the topological sector of the action, making the quantization procedure feasible. Similarly, one can introduce Weyl and Majorana fields as well, see [31].

III. A REVIEW OF 2-GROUPS AND 3-GROUPS
As we have seen in the previous section, the gauge symmetry of 3-gauge theory is described by an algebraic structure known as a 3-group. In this section, we present the relevant definition of the 3-group, and we briefly explain how this structure is used to equip curves, surfaces, and volumes with holonomies. The results obtained in this section are necessary for the construction of the topological invariant, which will be studied in section IV.

A. 3-Groups
In the category theory, a 2-group is defined as a 2-category consisting of only one object, where all the morphisms and 2-morphisms are invertible. It has been shown that every strict 2-group is equivalent to a crossed module (H ∂ → G , ✄).
A pre-crossed module (H ∂ → G , ✄) of groups G and H, is given by a group map ∂ : H → G, together with a left action ✄ of G on both groups, by automorphisms, such that the group G acts on itself via conjugation, i.e. , for each g 1 , g 2 ∈ G, and for each h 1 , h 2 ∈ H and g ∈ G the following identity holds: In a pre-crossed module the Peiffer commutator is defined as: A pre-crossed module is said to be a crossed module if all of its Peiffer commutators are trivial, which is to say that the Peiffer identity is satisfied: Continuing the categorical generalization one step further, one can generalize the notion of a 2-group to the notion of a 3-group. Similar to the definition of a group and a 2-group within the category theory formalism, a 3-group is defined as a 3-category with only one object, where all morphisms, 2-morphisms, and 3-morphisms are invertible. Moreover, in analogy with how a crossed module encodes a strict 2-group, it has been proved that a semistrict 3-group -Gray group is equivalent to a 2-crossed module [42,46].
is a chain complex of groups, given by three groups G, H, and L, together with maps ∂ and δ, such that ∂δ = 1 G , an action ✄ of the group G on all three groups, and a map {_ , _} p called the Peiffer lifting: The maps ∂ and δ, and the Peiffer lifting are G-equivariant, i.e. , for each g ∈ G and h ∈ H and for each h 1 , h 2 ∈ H and g ∈ G: The action of the group G on the groups H and L is a smooth left action by automorphisms, i.e. , for each g, g 1 , g 2 ∈ G, h 1 , h 2 ∈ H, l 1 , l 2 ∈ L and k ∈ H, L, The action of the group G on itself is again via conjugation. Further, the following identities are satisfied: In a 2-crossed module the structure (L δ → H, ✄ ′ ) is a crossed module, with action of the group H on the group L defined for each h ∈ H and l ∈ L as: and it follows that the Peiffer identity is satisfied for each l 1 , l 2 ∈ L: However, the structure (H ∂ → G , ✄) in the general case does not form a crossed module, but a pre-crossed module, and for each h, h ′ ∈ H the Peiffer commutator does not necessarily vanish.
The following identities hold, for each h 1 , h 2 , h 3 ∈ H [42]: and are of prime importance for the proof of the Pachner moves invariance. By using the condition (41e) of the definition of a 2-crossed module, it follows that for each h ∈ H and l ∈ L the following identity holds: Moreover, for each h 1 , h 2 ∈ H, A reader interested in more details about 3-groups is referred to [43].

B. 3-gauge theory
In this subsection, we will describe how the language of 3-gauge theory can be used in order to define compositions of labeled paths, surfaces, and volumes. In a 3-gauge theory, one labels geometric objects at three levels. Curves are labeled by elements of G. Their composition and orientation reversal is defined as in conventional gauge theory. In addition, surfaces are labeled with elements of H, and volumes are labeled with the elements of L. The reader interested in the formulation of a 2-gauge theory is referred to [47].
Curves are labeled with the elements of G, and the elements are composed as in the ordinary gauge theory, i.e. , for each g 1 , g 2 ∈ G, the composition of the elements results in the element g 1 g 2 ∈ G. The orientation of a curve can be reversed if it is labeled by the inverse element g −1 instead. Surfaces are labeled with the elements h ∈ H. For each surface, we choose two reference points on the boundary, and split the boundary into two curves, the source curve labeled with g 1 ∈ G and the target curve labeled with g 2 ∈ G, as demonstrated in the diagram so that the label h ∈ H of the surface is required to satisfy the following condition: The orientation of the surface can be reversed and labeled with the inverse element instead, while the orientation reversal of the curves leads to the surface element labeled withh = g −1 1 ✄ h −1 : One can now compose 2-morphisms vertically. The vertical composition of 2-morphisms (g 1 , h 1 ) and (g 2 , h 2 ), when they are compatible, i.e. , when results in a 2-morphism (g 1 , h 2 h 1 ), An important operation is known as whiskering. One can whisker a 2-morphism h with a morphism g 1 by attaching the whisker g 1 to the surface h from the left, i.e. , such that ∂ − 1 (g 1 ) = ∂ + 1 (h), which results in the 2-morphism with the source curve g 1 g 2 and target curve g 1 g ′ 2 , carrying the label g 1 ✄ h. Similarly, by attaching whisker g 2 to a surface h from the right, i.e. , such that one obtains the 2-morphism with the source curve g 1 g 2 and target curve g ′ 1 g 2 , carrying the label h. The volumes are labeled with the elements l ∈ L. For each volume, we split the boundary into two surfaces, the source surface labeled with ∂ − 3 (l) = h 1 and the target surface labeled with ∂ + 3 (l) = h 2 . On the common boundary of the source and target surface, we choose two reference points, and split the boundary into two curves, the source curve labeled with ∂ − 2 (l) = g 1 and the target curve labeled with ∂ + 2 (l) = g 2 , as demonstrated in the diagram below , so that the volume label l ∈ L is required to satisfy the following condition: The orientation of the volume can be reversed if one labels it with the inverse element l −1 : while the orientation reversal of the curves and surfaces leads to the surface element labeled withl = g −1 1 ✄ l, One can compose two 3-morphisms via the upward composition (visualizing a third axis, orthogonal to the plane of the paper, as the direction up). The upward composition of 3-morphisms (g 1 , h 1 , l 1 ) and (g 1 , h 2 , l 2 ), when they are compatible, i.e. , when , results in a 3-morphism (g 1 , h 1 , l 2 l 1 ): The upward composition of 3-morphisms is associative, and for every h ∈ H there is a 3-morphism that is an identity for the upward composition of 3-morphisms The vertical composition of two 3-morphisms (g 1 , h 1 , l 1 ) and (g 2 , h 2 , l 2 ), when they are compatible, i.e. , when One can write, for (g 1 , h 1 , l 1 ) and (g 2 , h 2 , l 2 ), The vertical composition of 3-morphisms is an associative operation. Composition of 3-morphisms is invariant under the change of order of upward composition and vertical composition of 3-morphisms, i.e. , which is demonstrated in the diagram notation, where the diagram uniquely determines the 3-morphism.
One can whisker the 3-morphisms with morphisms and 2-morphisms. Whiskering of a 3-morphism by a morphism from the left is the composition of a volume l ∈ L and curve g 1 ∈ G from the left, when they are compatible, i.e. , The composition results in a 3-morphism: Similarly, one can whisker a 3-morphism by a morphism from the right, when they are compatible, i.e. , ∂ − 1 (l) = ∂ + 1 (g 2 ), which results in the 3-morphism: Whiskering of a 3-morphism with a 2-morphisms from below, when they are compatible, i.e. , ∂ + 2 (l) = ∂ − 2 (h 2 ), is formed as a vertical composition of 3-morphisms (g 1 , h 1 , l) and (g 2 , h 2 , 1 h2 ), One writes, Whiskering a 3-morphism by 2-morphism from above, when they are compatible, i.e. , when ∂ − 2 (l) = ∂ + 2 (h 1 ), is formed as a vertical composition of 3-morphisms (g 1 , h 1 , 1 h1 ) and (g 2 , h 2 , l), which results in a 3-morphism, One obtains The interchanging 3-arrow is the horizontal composition of two 2-morphisms h 1 and h 2 , when they are compatible, i.e. , when that results in a 3-morphism l, with source surface .
One obtains, where the 3-morphism l is Peiffer lifting and from the definition of the Peiffer commutator, the identity (39), and the property (41a) of the 2-crossed module, Given any collection of curves, surfaces, and volumes, a configuration of 3-gauge theory is an assignment of elements of G to the curves, elements of H to the surfaces, and elements of L to volumes so that the following conditions hold: 1. For each surface labeled by h ∈ H, one has that ∂(h) = g 2 g −1 1 where g 1 and g 2 are the source and target curve, respectively; 2. For each volume labeled by l ∈ L, one has that δ(l) = h 2 h −1 1 , where h 1 and h 2 are the source and target surface, respectively; 3. For each 4-simplex labeled by (jkℓmn) ∈ Λ 4 , the volume holonomy around it is trivial.
The configurations thus defined can be viewed as the classical configurations of 3-gauge theory or, in a path integral quantum theory, these are the configurations over which we integrate in the path integral.

C. Gauge invariant quantities
In subsection III B, we have introduced a number of operations by which we can combine labeled paths, surfaces, and volumes, in order to calculate the composition of elementary paths, surfaces, and volumes, to arbitrarily large ones. In this subsection, we will make use of these compositions in order to construct gauge invariant quantities that are associated with closed paths, surfaces, and volumes. In lemmas III.1, III.2, and III.3, this procedure is used for the boundary path of a triangle, the boundary surface of a tetrahedron, and the boundary volume of the 4-simplex. The result of the lemma III.1 is already derived for the case of 2-groups and remains unchanged in the 3-gauge theory, see [38]. The higher flatness condition for the boundary surface of a tetrahedron derived in [38], is generalized for the case of 3-groups in the lemma III.2. One of the main results of the paper is the lemma III.3 where we derived the higher flatness condition for the boundary volume of the 4-simplex.
The curve γ 1 = g kℓ g jk is the source and the curve γ 2 = g jℓ is the target of the surface morphism Σ : γ 1 → γ 2 , labeled by the group element h jkℓ , i.e. , Lemma III.2. Let us consider a tetrahedron, (jkℓm). The edges (jk) , j < k, are labeled by group elements g jk ∈ G and the triangles (jkℓ) , j < k < ℓ, by elements h jkℓ ∈ H, and the tetrahedron (jkℓm) , j < k < ℓ < m by the group element l jkℓm ∈ L. We have oriented the triangles (jkℓ) so that they have the source is g kℓ g jk and the target is g jℓ , i.e. g jℓ = ∂(h jkℓ )g kℓ g jk . Let us first cut the tetrahedron surface along the edge (jm). This determines the ordering of the vertical composition of the constituent surfaces. We just have to make sure that all surfaces are composable, i.e. , they have the suitable reference points and the correct orientation in order to compose them vertically.
Consider the diagram (64). We first move the curve from g kℓ g jk to the curve g jℓ . At this stage, one cannot compose the result with the triangle (jℓm), and one first has to whisker it from the left by g ℓm . Now the two morphisms are vertically composable, and this moves the curve to g jm . The following 2-morphism is obtained Let us then consider the diagram (65). We first move the curve from g ℓm g kℓ to the curve g km . At this stage, one cannot compose the result with the triangle (jkm), and one first has to whisker it from the right by g jk . Now the two morphisms are vertically composable, and this moves the curve to g jm . The following 2-morphism is obtained The two surfaces have the same source and target, Σ 1 : g ℓm g kℓ g jk → g jm and Σ 2 : g ℓm g kℓ g jk → g jm . Now, moving from surface shown on the diagram (64) to the surface shown on the diagram (64) is given by the volume morphism V : Σ 1 → Σ 2 determined by the group element l jkℓm , i.e. , (g ℓm g kℓ g jk , h jkm h kℓm ) = g ℓm g kℓ g jk , δ(l jkℓm )h jℓm (g ℓm ✄ h jkℓ ) , that gives the relation, Lemma III.3. Let us consider a 4-simplex, (jkℓmn). The edges (jk) , j < k, are labeled by group elements g jk ∈ G, the triangles (jkℓ) , j < k < ℓ, by elements h jkℓ ∈ H, and the tetrahedrons (jkℓm) , j < k < ℓ < m, by the group element l jkℓm ∈ L. We have oriented the triangles (jkℓ) so that the source curve is g kℓ g jk and the target curve is g jℓ , i.e. , g jℓ = ∂(h jkℓ )g kℓ g jk , and the tetrahedrons (jkℓm) so that the source surface is h jℓm (g ℓm ✄ h jkℓ ) and the target surface is h jkm h kℓm , i.e. , h jkm h kℓm = δ(l jkℓm )h jℓm (g ℓm ✄ h jkℓ ). Let us first cut the 4-simplex volume along the surface h jmn g mn ✄ (h jℓm g ℓm ✄ h jkℓ ). This surface determines the ordering of the vertical composition of the constituent volumes. We have to make sure that all volumes are composable, i.e. , they have the suitable reference points and the correct orientation in order to compose them vertically. First, let us consider the diagram (68). We first move the surface from h jℓm g ℓm ✄ h jkℓ to surface h jkm h kℓm with the 3-arrow l jkℓm . To compose the resulting 3-morphism with the surface h jmn one must first whisker it from the left with g mn . The obtained 3-morphism (g mn g ℓm g kℓ g jk , g mn ✄ (h jℓm g ℓm ✄ h jkℓ ), g mn ✄ l jkℓm ) can be whiskered from below with the 2-morphism (g mn g jm , h jmn ), and the resulting 3-morphism is (g mn g ℓm g kℓ g jk , h jmn g mn ✄ (h jℓm g ℓm ✄ h jkℓ ), h jmn ✄ ′ (g mn ✄ l jkℓm )), with the source surface h jmn g mn ✄ (h jℓm g ℓm ✄ h jkℓ ) and the target surface h jmn g mn ✄ (h jkm h kℓm ), Let us move the surface to h jkn h kmn g mℓ ✄ h kℓm , see diagram (69). To do that, we consider the 3-morphism (g mn g km g jk , h jmn g mn ✄ h jkm , l jkmn ) with the source surface h jmn g mn ✄ h jkm and target surface h jkn h kmn . This 3morphism can be whiskered from above with the 2-morphism (g mn g ℓl g kℓ g jk , g mn ✄h kℓm ), and the obtained 3-morphism is (g mn g ℓm g kℓ g jk , h jmn g mn ✄ (h jkm h kℓm ), l jkmn ), with the source surface h jmn g mn ✄ (h jkm h kℓm ) and target surface h jkn h kmn g mn ✄ h kℓm , Next, we want to move the surface h jkn h kmn g mn ✄ h kℓm to surface h jkn h kℓn h ℓmn , as shown on the diagram (70). We whisker the 3-morphism (g mn g ℓm g kℓ , h kmn g mn ✄ h kℓm , l kℓmn ), with the source surface h kmn g mn ✄ h kℓm and target surface h kℓn h ℓmn , with the morphism g jk from the right, obtaining the 3-morphism (g mn g ℓm g kℓ g jk , h kmn g mn ✄ h kℓm , l kℓmn ). Now, we whisker this 3-morphism with the 2-morphism (g kn g jk , h jkn ) from below, and we obtain the 3-morphism (g mn g ℓm g kℓ g jk , h jkn h kmn g mn ✄ h kℓm , h jkn ✄ ′ l kℓmn ), The mapping of the surface h jkn h kℓn h ℓmn to the surface h jℓn g ℓn ✄ h jkℓ h ℓmn in shown on the diagram (71). The 3-morphism with the appropriate source and target is constructed by whiskering the 3-morphism (g ℓn g kℓ g jk , h jkn h kℓn , l −1 jkℓn ) with 2-morphism (g mn g ℓm g kℓ g jk , h ℓmn ) from above. The obtained 3-morphism is (g mn g ℓm g kℓ g jk , h jkn h kℓn h ℓmn , l −1 jkℓn ), Next we map the surface h jℓn g ℓn ✄ h jkℓ h ℓmn to the surface h jℓn h ℓmn (g mn g ℓm ) ✄ h jkℓ , see the diagram (72). We use the inverse interchanging 2-arrow composition to map the surface g ℓn ✄ h jkℓ h ℓmn to the surface h ℓmn (g mn g ℓm ) ✄ h jkℓ , resulting in the 3-morphism (g mn g ℓm g kℓ g jk , g ℓn ✄ h jkℓ h ℓmn , {h ℓmn , (g mn g ℓm ) ✄ h jkℓ } p ). Next, we whisker the obtained 3-morphism with the 2-morphism (g ℓn g jℓ , h jℓn ) from below. The obtained 3-morphism with the appropriate source and target surfaces is (g mn g ℓm g kℓ g jk , h jℓn g ℓn ✄ h jkℓ h ℓmn , h jℓn ✄ ′ {h ℓmn , (g mn g ℓm ) ✄ h jkℓ } p ), (72) Finally, we construct the 3-morphism that maps the surface h jℓn h ℓmn (g mn g ℓm )✄h jkℓ to the starting surface h jmn g mn ✄ (h jℓm g ℓm ✄ h jkℓ ). To obtain the 3-morphism with the appropriate source and target surfaces we first move the surface h jℓn h ℓmn to the surface h jmn g mn ✄ h jℓm with the 3-arrow (g mn g ℓm g jℓ , h jℓn h ℓmn , l −1 jℓmn ). Next, we whisker the 3-morphism (g mn g ℓm g jℓ , h jℓn h ℓmn , l −1 jℓmn ) with the 2-morphism (g mn g ℓm g kℓ g jk , (g mn g ℓm ) ✄ h jkℓ ) from above. The obtained 3-morphism (g mn g ℓm g kℓ g jk , h jℓn h ℓmn (g mn g ℓm ) ✄ h jkℓ , l −1 jℓmn ) moves the surface to the starting surface, as shown on the diagram (73), After the upward composition of the 3-morphisms given by the diagrams (68)-(73), the obtained 3-morphism is: (g mn g ℓm g kℓ g jk , h jℓn h ℓmn (g mn g ℓm ) ✄ h jkℓ , l −1 jℓmn )# 3 (g mn g ℓm g kℓ g jk , g ℓn ✄ h jkℓ h ℓmn , h jℓn ✄ ′ {h ℓmn , (g mn g ℓm ) ✄ h jkℓ } p )# 3 (g mn g ℓm g kℓ g jk , h jkn h kℓn h ℓmn , l −1 jkℓn )# 3 (g mn g ℓm g kℓ g jk , h jkn h kmn g mℓ ✄ h kℓm , h jkn ✄ ′ l jkmn )# 3 (g mn g ℓm g kℓ g jk , h jmn g mn ✄ (h jkm h kℓm ), l jkmn )# 3 (g mn g ℓm g kℓ g jk , h jmn g mn ✄ (h jℓm g ℓm ✄ h jkℓ ), h jmn ✄ ′ (g mn ✄ l jkℓm )) The obtained 3-morphism is the identity morphism with source and target surface

IV. QUANTIZATION OF THE TOPOLOGICAL 3BF THEORY
In conventional BF theory, one chooses the action in such a way that the theory does not depend on any background field, but only the spacetime manifold. The classical field equations of the theory require the gauge connection to be flat, i.e. , in terms of the holonomy variables, that any null-homotopic closed curve corresponds to the identity of the gauge group. In the framework of higher gauge theory, specifically 2-gauge theory, one generalizes this idea by imposing the higher flatness condition requiring that the surface holonomy around the boundary 2-sphere of any 3-ball be trivial instead. One can continue further categorical generalization by choosing a 3-group structure to describe the gauge symmetry of the theory, and formulate a 3BF theory whose equations of motion impose a higher flatness condition for a 3-curvature (F , G, H). In this section, we present a combinatorial description of such a model for any triangulation of any smooth manifold of dimension d = 4. This model coincides with Porter's abstract definition of a TQFT [33] for d = 4 and n = 3, which is itself a generalization of Yetter's work [48,49].
Let us show how to construct a state sum model from the classical action (8) by the usual heuristic spinfoam quantization procedure. We consider the path integral for the action S 3BF , The formal integration over the Lagrange multipliers B, C, and D leads to: Similarly to conventional gauge theory, the connection 1-form α ∈ A 1 (M 4 , g) is discretized by colouring the edges ǫ = (jk) ∈ Λ 1 of the triangulation with group elements g ǫ ∈ G. The connection 2-form β ∈ A 2 (M 4 , h) is represented by group elements h ∆ ∈ H coloring the triangles ∆ = (jkℓ) ∈ Λ 2 . The connection 3-form γ ∈ A 3 (M 4 , l) is represented by group elements l τ ∈ L coloring the tetrahedrons τ = (jkℓm) ∈ Λ 3 . The path integral measures of (76) are discretized by replacing where dg jk , dh jkℓ , and dl jkℓm denote integration with respect to the Haar measures of G, H, and L, respectively. The vanishing fake curvature condition is discretized on each triangle (jkl) ∈ Λ 2 by discretizing δ(F ). When passing from a smooth manifold to its triangulation, the δ distribution is defined over the appropriate set of simplices as follows, where for each (jkl) ∈ Λ 2 the δ-function δ G (g jkl ) is given by: Similarly, on the triangulated manifold the condition δ(G) on the fake curvature 3-form reads where for every tetrahedron (jkℓm) ∈ Λ 3 one has: Finally, the condition δ(H) is disretized as where for each 4-simplex (jkℓmn) ∈ Λ 4 one has: The identities (82) Here we integrate over g jk ∈ G for every edge (jk) ∈ Λ 1 , over h jkℓ ∈ H for every triangle (jkℓ) ∈ Λ 2 and over l jklm for every tetrahedron (jkℓm) ∈ Λ 3 . The δ-distributions under the integral impose the following conditions. First, the condition that ∂(h jkℓ ) g kℓ g jk = g jℓ for each triangle (jkℓ) ∈ Λ 2 , i.e. , that each surface label h jkℓ has got the appropriate source and target, see Lemma III.1. Second, the condition that h jkm h kℓm = δ(l jkℓm )h jℓm (g ℓm ✄ h jkℓ ) for each tetrahedron (jkℓm) ∈ Λ 3 , i.e. , that each volume label l jkℓm has got the appropriate source and target, see Lemma III.2. Finally, the condition that the volume holonomy around every 4-simplex (jkℓmn) ∈ Λ 4 is trivial, i.e. , If the 1 ↔ 5 Pachner move does not change the state sum (88), then the state sum of the right hand side,  should be equal to the state sum of the left hand side, Here, the prefactors |G| −|Λ0|+|Λ1|−|Λ2| , |H| |Λ0|−|Λ1|+|Λ2|−|Λ3| , and |L| −|Λ0|+|Λ1|−|Λ2|+|Λ3|−|Λ4| are |G| −11 |H| −4 |L| −1 on the r.h.s. and |G| −5 |H| 0 |L| −1 on the l.h.s., as obtained by counting the numbers of the k-simplices on both sides of the 1 → 5 move, shown in the Table I. The Z remainder denotes the part of the state sum that is the same on both sides of the move, and thus irrelevant for the proof of invariance. The proof that Z left = Z right is given in the Appendix A.
We order the vertices in such a way that on the l.h.s. of the move we have the 4-simplices (23456) and (12345) On the l.h.s. there is the state sum,   Table II. The term Z remainder denotes the part of the state sum that is identical on both sides of the move, as before. The proof that Z left = Z right is given in the Appendix A.   (2) (4) (1) (6) (3) whereas on the r.h.s. the state sum reads (94) The numbers of k-simplices agree on both sides of the 3 ↔ 3 move for all k, and the prefactors play no role in this case, so they are part of the Z remainder . The proof that Z left = Z right is given in the Appendix A.
We conclude that the state sum given by the definition IV.1 is invariant under all three Pachner moves, and thus independent of triangulation of the underlying 4-dimensional manifold.

V. CONCLUSIONS
Let us summarize the results of the paper. In Section II we reviewed the pure the constrained 2BF actions describing the Yang-Mills field and Einstein-Cartan gravity, and constrained 3BF actions describing the Klein-Gordon and Dirac fields coupled to Yang-Mills fields and gravity in the standard way. In Section III, we reviewed the relevant algebraic tools involved in the description of higher gauge theory, 2-crossed modules, and 3-gauge theory and generalized the integral picture of an ordinary gauge theory to a 3-gauge theory that involves curves, surfaces, and volumes labeled with elements of non-Abelian groups. We have also proved three key results, stated in Lemmas III.1, III.2, and III.3, which are crucial for the construction of the invariant state sum. In Section IV, we have presented the two main results of the paper. First, we constructed a triangulation independent state sum Z of a topological higher gauge theory for a general 3-group and a 4-dimensional spacetime manifold M 4 . Second, we proved the theorem that the constructed state sum is indeed independent of the choice of triangulation, i.e., that it is a genuine topological invariant.
The constructed state sum coincides with the Porter's TQFT [33,34] for d = 4 and n = 3. The proof that the state sum is invariant under the local changes of triangulation called the Pachner moves and thus independent of the chosen triangulation is presented in Appendix A. It is obtained that the state sum is invariant under all five different Pachner moves: the 3 − 3 move, 4 − 2 move, and 5 − 1 move, and their inverses. The state sum constructed this way can be thought of as a combinatorial construction of a topological quantum field theory (TQFT) in the sense of Atiyah's axioms, a topic that is beyond the scope of this paper and will be studied in a future work.
In order to finish the second step of the spinfoam quantization procedure, however, the generalizations of the Peter-Weyl and Plancharel theorems to 2-groups and 3-groups are required, which so far represent open problems. Namely, these theorems should provide a decomposition of a function on a 3-group into a sum over the corresponding irreducible representations of a 3-group. In this way, the spectrum of labels for the simplices, i.e. , the domain of values of the fields living on the simplices of the triangulation, would be specified. Nonetheless, one can still try to guess the irreducible representations of 3-groups, as was done for example in the case of 2-groups in the spincube model of quantum gravity [30], or obtain the state sum using other techniques, see for example [50][51][52]).
However, if one wants to describe a real physical theory, i.e. , the theory which contains local propagating degrees of freedom, one needs to construct the nontopological state sum, with the non-trivial dynamics. To do so, once the topological state sum is constructed, the final third step of the spinfoam quantization procedure is to impose the constraints that deform the topological theory into a realistic theory of gravity coupled to matter fields (as defined in [31]) at the quantum level. We leave the construction of the constrained state sum model for future work.
In addition to the above topics, there are also many other possible applications of the invariant state sum, both in physics and mathematics.