Absolute anomalies in (2+1)D symmetry-enriched topological states and exact (3+1)D constructions

Certain patterns of symmetry fractionalization in (2+1)D topologically ordered phases of matter can be anomalous, which means that they possess an obstruction to being realized in purely (2+1)D. In this paper we demonstrate how to compute the anomaly for symmetry-enriched topological (SET) states of bosons in complete generality. We demonstrate how, given any unitary modular tensor category (UMTC) and symmetry fractionalization class for a global symmetry group $G$, one can define a (3+1)D topologically invariant path integral in terms of a state sum for a $G$ symmetry-protected topological (SPT) state. We present an exactly solvable Hamiltonian for the system and demonstrate explicitly a (2+1)D $G$ symmetric surface termination that hosts deconfined anyon excitations described by the given UMTC and symmetry fractionalization class. We present concrete algorithms that can be used to compute anomaly indicators in general. Our approach applies to general symmetry groups, including anyon-permuting and anti-unitary symmetries. In addition to providing a general way to compute the anomaly, our result also shows, by explicit construction, that every symmetry fractionalization class for any UMTC can be realized at the surface of a (3+1)D SPT state. As a byproduct, this construction also provides a way of explicitly seeing how the algebraic data that defines symmetry fractionalization in general arises in the context of exactly solvable models. In the case of unitary orientation-preserving symmetries, our results can also be viewed as providing a method to compute the $\mathcal{H}^4(G, U(1))$ obstruction that arises in the theory of $G$-crossed braided tensor categories, for which no general method has been presented to date.

In the absence of any symmetries, gapped quantum many-body states of matter in (2+1) space-time dimensions can still form distinct, topologically ordered phases of matter. 1-3 Topologically ordered states are characterized by the fusion and braiding properties of topologically non-trivial quasiparticle excitations (anyons), which are described mathematically by an algebraic theory of anyons known as a unitary modular tensor category (UMTC), C. 2,4,5 It is believed that the pair (C, c), where c is the chiral central charge characterizing the possible gapless degrees of freedom on the boundary, completely characterizes gapped phases of matter in (2+1)D in the absence of symmetry.
In the presence of a symmetry group G, the classification of gapped phases is further refined. Symmetryenriched topological states (SETs) are characterized by a host of additional properties. 6 These include (1) the way that symmetry actions can permute quasiparticle types, (2) the pattern of symmetry fractionalization, which determines the ways in which quasiparticles carry fractional symmetry quantum numbers, and (3) the fusion and braiding properties of symmetry defects. Recently it has been shown how these data can be described in general through the mathematical framework of G-crossed braided tensor categories. 6 The theory of SETs also includes a set of possible anomalies, or obstructions. 6,7 For example, once it is specified how symmetries permute anyon types in a way that is consistent with the symmetries of the fusion and braiding data, there is an obstruction to defining the notion of symmetry fractionalization. This obstruction, sometimes referred to as a symmetry localization anomaly, takes values in the third cohomology group H 3 (G, A), where A is the Abelian group formed by fusion of Abelian anyons, and there is an implicit action of G on A defined by how the symmetry permutes the anyons. Ref. 6 presented a formula for how to compute this obstruction given any possible permutation action of the symmetries. One interpretation of this obstruction is that the associated topological quantum field theory is only compatible with a 2-group symmetry, where G is the ordinary, 0-form, symmetry, A is the 1-form symmetry, 8 and [O] ∈ H 3 (G, A) characterizes the 2-group. 6,7,9 When the H 3 symmetry localization anomaly vanishes, there are different possible patterns of symmetry fractionalization. Depending on the precise pattern of symmetry fractionalization, there can be a further anomaly, which we refer to as a symmetry fractionalization anomaly, valued in the fourth group cohomology H 4 (G, U (1)). In the langauge of high energy physics, this is an example of a 't Hooft anomaly associated with the global symmetry G. 10 This is an obstruction to defining a consistent set of braiding and fusion data of symmetry defects; that is, it is an obstruction to defining a full Gcrossed braided tensor category to describe a consistent set of braiding and fusion of symmetry defects in addition to braiding and fusion of anyons. Stated differently in the context of quantum field theory, this anomaly is an obstruction to consistency of the theory in the presence of background fields associated with G. To date, a general method to compute this H 4 anomaly given the data that characterizes symmetry fractionalization has not been presented, aside from some special cases that we review in the following subsection.
In a variety of examples, it is known that such anomalous symmetry fractionalization classes, while they cannot exist purely in (2+1) space-time dimensions, 11 can exist at the surface of a (3+1)D symmetry-protected topological (SPT) state. [12][13][14] SPT states are gapped phases of matter that, if we allow the symmetry to be broken, are adiabatically connected to a trivial direct product state, but are otherwise non-trivial. 15 In terms of topological quantum field theory (TQFT), SPT states are described by invertible TQFTs with G symmetry, implying that the path integral on all closed manifolds has unit magnitude. [16][17][18] A large class of (3+1)D SPT states can be classified by H 4 (G, U (1)). 19,20 The appearance of H 4 (G, U (1)) in two different contexts has led to the expectation that all anomalous symmetry fractionalization classes can be realized at the (2+1)D surface of (3+1)D SPT states, although this has not been explicitly demonstrated in general.
In this paper, we resolve the outstanding issues mentioned above by demonstrating an explicit way to compute the H 4 anomaly in general, and demonstrating by explicit construction how any anomalous symmetry fractionalization class for any UMTC can be realized at the surface of a (3+1)D SPT. Specifically, we show how any UMTC C and possibly anomalous symmetry fractionalization class can be used to define a (3+1)D topologically invariant path integral. The path integral takes the form of a discrete state sum on a triangulation of the spacetime manifold and choice of background G-bundle. Topological invariance follows from invariance of the state sum under retriangulation and various other choices made in the construction. We demonstrate that the resulting (3+1)D TQFT describes a bulk (3+1)D SPT state. (3+1)D SPTs can be distinguished by the value of their topological path integral on various G-bundles. Our path integral may be computed explicitly on such G-bundles, thus allowing us to completely characterize the (3+1)D SPT. In particular this allows us to extract an element of H 4 (G, U (1)) given any UMTC and symmetry fractionalization class for arbitrary symmetry groups G.
The path integral on a (3+1)D manifold M 4 defines a wave function |Ψ(∂M 4 ) on ∂M 4 . We further derive a Hamiltonian, which is explicitly G symmetric and acts on a local tensor product Hilbert space, for which the wave function |Ψ(∂M 4 ) is the exact ground state. We then define the Hamiltonian on a three-dimensional space with boundary in a way which preserves the G symmetry, and show that the surface theory is a (2+1)D symmetryenriched topological state whose quasiparticle excitations are described by the same UMTC and symmetry fractionalization data that was used as input into the (3+1)D state sum. This then proves by explicit construction that any symmetry fractionalization class can appear at the surface of a (3+1)D SPT. Since (2+1)D surfaces of nontrivial (3+1)D SPTs are understood to be anomalous, characterizing the bulk (3+1)D SPT that hosts a given (2+1)D symmetry fractionalization pattern at its surface is equivalent to characterizing the anomaly of the (2+1)D surface.
We also discuss a method which allows the H 4 anomalies to be computed in an algorithmic way in general. We describe an algorithm that constructs invariants I i of H 4 (G, U (1)), for i = 1, · · · , dim H 4 (G, U (1)), in terms of a U (1) valued combination of representative U (1) 4cochains. We then show how this combination can be mapped to a state sum and then be used to compute the H 4 invariants by taking as input the UMTC and symmetry fractionalization data. Our procedure thus allows a brute force computation of the H 4 obstruction in complete generality. The complexity of the calculation is exponential in the number of 4-cochains that appear in I i and polynomial in the number of distinct anyons in the UMTC.
Our results apply for arbitrary symmetry groups G, whose elements may have either unitary or anti-unitary symmetry action, and may permute the anyons. In particular, to treat anti-unitary symmetries, we generalize the mathematical structures involved in describing symmetry fractionalization for unitary symmetries, making contact with notions in higher category theory.
It is expected that the classification of topological phases with spatial symmetry (in Euclidean space R d ) is equivalent to those with on-site symmetry, and this expectation has been demonstrated explicitly for a wide variety of SPT and SET states. [21][22][23][24] Consequently, we expect our methods will apply for computing symmetry fractionalization anomalies associated with spatial symmetries as well. However, not all of our constructions -in particular our exactly solvable Hamiltonians -are directly compatible with spatial symmetries.

A. Relation to prior work
The fact that a braided tensor category (BTC) can be used to define a (3+1)D topologically invariant path integral state sum was first pointed out by Crane and Yetter 25 (see also Ref. 26). More recently Walker and Wang 27 provided a Hamiltonian realization of these theories. Our work can be viewed as a general symmetryenriched version of these constructions, which takes as input an arbitrary BTC together with any symmetry fractionalization class, and outputs a topological path integral and a corresponding Hamiltonian realization. If the input BTC is a UMTC, our construction realizes a (3+1)D SPT. Prior to our work, Ref. 14 studied an example of decorated Walker-Wang models that give SPTs with surface SETs when G = Z 2 × Z 2 and the UMTC is the semion theory (denoted U (1) 2 ); a generalization to Abelian anyons not permuted by symmetries and carrying projective representations of G was also sketched. However our general construction is quite different from that of Ref. 14. In (2+1)D, the Turaev-Viro-Barrett-Westbury state sum is well-known to give a topologically invariant path integral for closed 3-manifolds given a spherical fusion category. 28,29 The Levin-Wen model provides a Hamiltonian realization of the Turaev-Viro theories associated to unitary fusion categories with a certain tetrahedral symmetry. 30 Recently these (2+1)D theories have been extended to include on-site (internal) G-symmetry, so that a G-graded fusion category can be used to define a (2+1)D state sum 31 and also exactly solvable Hamiltonian. 32,33 The work in this paper can be viewed as a (3+1)D generalization of these ideas.
Recently, Cui presented a state sum construction for a (3+1)D topological quantum field theory that takes as input a G-crossed braided tensor category. 34 Its corresponding Hamiltonian realization was studied in Ref. 35. Our construction is closely related to these constructions, but differs in two fundamental ways. First, since Cui's construction takes as input a G-crossed braided tensor category, the H 4 obstruction necessarily vanishes; therefore anomalous symmetry fractionalization classes are not included in this construction. Secondly, our construction is capable of taking as input symmetry fractionalization classes associated with anti-unitary symmetries. However, G-crossed braided tensor categories require that G correspond to a unitary orientation-preserving symmetry, and therefore such anti-unitary symmetries are not incorporated in the constructions of Ref. 34. In particular, the anti-unitary symmetry actions allow us to define our path integrals on non-orientable manifolds, generalizing the construction in Ref. 31. The extension to non-orientable manifolds is beyond the most general mathematical constructions for (3+1)D TQFTs in terms of spherical fusion 2-categories defined recently in Ref. 36, which assign topological invariants to oriented 4-manifolds. We comment more on the technical similarities and differences between our construction and those of Ref. 34 and 35 in subsequent sections.
While many prior works have studied symmetry fractionalization anomalies, none of them have so far fully solved the problem of computing the H 4 obstruction under completely general circumstances. When the symmetry is finite, unitary, space-time orientation preserving, and does not permute anyon types, Ref. 7 presented a formula for the H 4 obstruction for bosonic topological phases (where the microscopic constituents are bosons as opposed to fermions; mathematically this corresponds to non-spin TQFTs). This formula was later summarized in Ref. 14, and rederived using a more detailed mathematical framework for the data and consistency conditions of G-crossed braided tensor categories in Ref. 6 (which is also expected to apply in the cases of continuous and infinite G). In the particular case of Abelian symmetry groups (which are unitary, space-time orientation preserving) and Abelian topological orders where the symmetry does not permute the anyon types, Ref. 37 explicitly studied the bulk-boundary correspondence and a notion of "anomaly inflow" to understand the anomaly in more detail.
On the other hand, for space-time reflection symmetries that square to the identity, denoted Z T 2 or Z r 2 , Ref. 31 derived a general formula for the anomaly. Note that in this case, the anomaly is mathematically not an obstruction to defining a G-crossed braided tensor category, but rather an obstruction to defining a generalized version of a G-crossed braided tensor category where the defects can be space-time orientation reversing. Such a mathematical construction was briefly outlined in Ref. 38, but has not yet been fully developed. We note that Ref. 39 also independently conjectured the same formula for the Z T 2 anomaly for both bosonic and fermionic topological orders. The formula for the Z T 2 anomaly for fermionic topological orders was subsequently derived in Ref. 40. A number of subsequent works further studied and rederived these anomaly formulae through various other methods. [41][42][43][44] For symmetries of the form U (1) G that do not permute anyons and for the specific case of Z 2 topological orders, Ref. 45 provided a method to diagnose symmetry fractionalization anomalies. Subsequently, for U (1) × Z T 2 and U (1) Z T 2 symmetry, Ref. 46 recently presented formulas for anomaly indicators that apply to general topological orders and allow anyon permutations.
Aside from these special cases, completely general results have so far been presented for relative anomalies, for bosonic topological phases. 38,47 Specifically, given a UMTC and choice of how symmetry permutes the anyons, the difference between symmetry fractionalization patterns is classified by the second group cohomology H 2 ρ (G, A). 6 Here ρ defines the action of G on A as specified by how the symmetries permute the anyon types. Given two symmetry fractionalization classes that differ by [t] ∈ H 2 ρ (G, A), the relative anomaly is the difference in the H 4 anomalies for the two symmetry fractionalization classes. It was shown how these relative anomaly formulae are consistent with all previously derived results.
A main goal of this paper, then, is to complete the story by demonstrating how to compute the absolute anomaly in complete generality for bosonic topological phases of matter.

II. SYMMETRY FRACTIONALIZATION REVIEW
A. Review of UMTC notation Here we briefly review the notation that we use to describe UMTCs. For a more comprehensive review of the notation that we use, see e.g. Ref. 6. The topologically non-trivial quasiparticles of a (2+1)D topologically ordered state are equivalently referred to as anyons, topological charges, and quasiparticles. In the category theory terminology, they correspond to isomorphism classes of simple objects of the UMTC.
A UMTC C contains splitting spaces V ab c , and their dual fusion spaces, V c ab , where a, b, c ∈ C are the anyons. These spaces have dimension dim V ab c = dim V c ab = N c ab , where the fusion coefficients N c ab determine the fusion rules. They are depicted graphically as: where µ = 1, . . . , N c ab , d a is the quantum dimension of a, and the factors dc are a normalization convention for the diagrams.
We denoteā as the topological charge conjugate of a, for which N 1 aā = 1, i.e.
a ×ā = 1 + · · · Here 1 refers to the identity particle, i.e. the vacuum topological sector, which physically describes all local, topologically trivial excitations. The F -symbols are defined as the following basis trans-formation between the splitting spaces of 4 anyons: (4) To describe topological phases, these are required to be unitary transformations, i.e.
Anyon lines may be "bent" using the A and B symbols, given diagrammatically by where D = a d 2 a . A particularly useful quantity for the present discussion is the double braid, which is a phase if either a or b is an Abelian anyon: B. Topological symmetry and braided auto-equivalence An important property of a UMTC C is the group of "topological symmetries," which are related to "braided auto-equivalences" in the mathematical literature. They are associated with the symmetries of the emergent UMTC description, irrespective of any global symmetries of the microscopic model from which C emerges as the description of the universal properties of the anyons.
The topological symmetries consist of the invertible maps The different ϕ, modulo equivalences known as natural isomorphisms, form a group, which we denote as Aut(C). 6 The symmetry maps can be classified according to a Z 2 grading corresponding to whether ϕ has a unitary or anti-unitary action on the category: We note that one can consider a more general Z 2 × Z 2 grading by considering separately transformations that correspond to time-reversal and spatial reflection symmetries. 6,38 Here we will not consider spatial parity reversing transformations and thus do not consider this generalization. Thus the topological symmetry group can be decomposed as Aut σ (C).
Aut 0 (C) is therefore the subgroup corresponding to topological symmetries that are unitary (this is referred to in the mathematical literature as the group of "braided auto-equivalences"). It is also convenient to define The maps ϕ may permute the topological charges: subject to the constraint that The maps ϕ have a corresponding action on the F -and R− symbols of the theory, as well as on the fusion and splitting spaces, which we will discuss in the subsequent section.

C. Global symmetry
We now consider a system which has a global symmetry group G. The global symmetry acts on the anyons and the topological state space through the action of a group homomorphism We use the notation [ρ g ] ∈ Aut(C) for a specific element g ∈ G. The square brackets indicate the equivalence class of symmetry maps related by natural isomorphisms, which we define below. ρ g is thus a representative symmetry map of the equivalence class [ρ g ]. We use the notation We associate a Z 2 grading q(g) (and related σ(g)) by defining ρ g has an action on the fusion/splitting spaces: This map is unitary if q(g) = 0 and anti-unitary if q(g) = 1. We write this as where U g ( g a, g b; g c) is a N c ab × N c ab matrix, and K denotes complex conjugation.
Under the map ρ g , the F and R symbols transform as well: where we have suppressed the additional indices that appear when N c ab > 1. We demand that composition of ρ g obey the group multiplication law up to a natural isomorphism κ g,h where the action of κ g,h on the fusion / splitting spaces is defined as and, being a natural isomorphism, obeys by definition where β a (g, h) are U(1) phases. The above definitions imply that whereḡ ≡ g −1 .

D. Symmetry localization and fractionalization
Now let us consider the action of a symmetry g ∈ G on the full quantum many-body state of the system, which may correspond, for example, to a lattice model defined on a Hilbert space that decomposes as a local tensor product. We consider systems that are described by a TQFT in the long wave length limit and thus contain many more "microscopic" degrees of freedom.
Let R g be the representation of g acting on the full Hilbert space of the theory. We consider a state |Ψ a1,··· ,an in the full Hilbert space of the system, which consists of n anyons, a 1 , · · · a n , at well-separated locations, which collectively fuse to the identity topological sector. Since the ground state is G-symmetric, we expect that the symmetry action R g on this state possesses a property that we refer to as symmetry localization. This is the property that the symmetry action R g decomposes as R g |Ψ a1,··· ,an ≈ n j=1 U (j) g U g ( g a 1 , · · · , g a n ; 1)|Ψ g a1,··· , g an .
Here, U (j) g are unitary matrices that have support in a region (of length scale set by the correlation length) localized to the anyon a j . The map U g ( g a 1 , · · · , g a n ; 1) is the generalization of U g ( g a, g b; g c), defined above, to the case with n anyons fusing to vacuum. U g ( g a 1 , · · · , g a n ; 1) only depends on the global topological sector of the system -that is, on the precise fusion tree that defines the topological state -and not on any other details of the state, in contrast to the local operators U (j) g . The ≈ means that the equation is true up to corrections that are exponentially small in the size of U (j) and the distance between the anyons, in units of the correlation length.
The choice of action ρ defined above defines an element is non-trivial, then there is an obstruction to Eq. (32) being consistent when considering the associativity of three group elements. We refer to this as a symmetry localization anomaly, or symmetry localization obstruction. See. Ref. 6, 48, and 49 for examples. 50 If [O] is trivial, so that symmetry localization as described by Eq. (32) is well-defined, then it is possible to define a notion of symmetry fractionalization. 6 In general, symmetry fractionalization is characterized by a consistent set of data {η} and {U }, where {U } was defined above. η a (g, h) is defined as The data η a (g, h) characterize the difference in phase obtained when acting "locally" on an anyon a by g and h separately, as compared with acting on a by the product gh. This can be captured through a physical process involving symmetry defects, as explained in the next subsection. There are two important consistency conditions for U and η, which we will use repeatedly later in this paper. 6 The first one is with κ defined in terms of U as in Eq. (31). The other one is These data are subject to an additional class of gauge transformations, referred to as symmetry action gauge transformations, which arise by changing ρ by a natural isomorphism: 6 We note that U also changes under a vertex basis gauge transformation according tõ with the shorthandḡ = g −1 .
Different gaugeinequivalent choices of {η} and {U } characterize distinct symmetry fractionalization classes. 6 In this paper we will always fix the gauge One can show that symmetry fractionalization forms a torsor over H 2 ρ (G, A). That is, different possible patterns of symmetry fractionalization can be related to each other by elements of H 2 ρ (G, A). In particular, given an element [t] ∈ H 2 ρ (G, A), we can change the symmetry fractionalization class as where t(g, h) ∈ A is a representative 2-cocyle for the cohomology class [t] and M ab is the double braid (see Eq. 15).
In the case where the permuation ρ is trivial, there is always a canonical notion of a trivial symmetry fractionalization class, where η a (g, h) = 1 for all g, h ∈ G. In this case, an element of H 2 (G, A) is sufficient to completely characterize the symmetry fractionalization pattern, as was discussed for the case where the UMTC C only contains Abelian anyons in Ref. 51.
More abstractly, the data ρ, {U g (a, b; c)} and {η a (g, h)} defines a categorical G action on C.

E. Symmetry fractionalization and symmetry defects
A convenient way to understand symmetry fractionalization is through a graphical calculus that incorporates symmetry defects. In 2D space, we can consider a linelike symmetry defect labeled by a group element g, which we will sometimes refer to as a branch cut. In the (2+1)D space-time, this corresponds to a branch sheet. When an anyon x crosses the g defect sheet in space-time, it is permuted to a different anyon, g x. η x (g, h) and U g (a, b; c) can then be understood through the diagrams shown in Fig. 1.
Note that here we take the symmetry group element to be unitary and orientation-preserving. In Sec. IV we will discuss the generalization to anti-unitary symmetries.
Although we will not do so in the rest of this paper, we may also consider the branch cuts to end at a point in space. In this case, we can have topologically distinct endpoints, labeled as a g . If the symmetry fractionalization class is non-anomalous, the symmetry defects a g form a consistent G-crossed braided tensor category. 6 It is known for finite G that there is a cohomological obstruction [O] ∈ H 4 (G, U (1)) to defining a consistent Gcrossed braided tensor category, which provides a mathematically precise definition of symmetry fractionalization anomalies, at least for the case of unitary, orientation preserving symmetries.

III. STATE-SUM CONSTRUCTION
The input data to our construction is a braided tensor category (BTC) C, a symmetry group G, the group homomorphism ρ and associated {U g (a, b; c)}, and the symmetry fractionalization data {η a (g, h)}. The state sum that we define in this section does not require C to be modular; however when C is modular, we will see that the resulting state sum defines a (3+1)D SPT and allows a calculation of the symmetry fractionalization anomaly.
We note that in this section G is discrete and finite and corresponds to an on-site (internal) unitary symmetry. The extension to anti-unitary, spatial, infinite and/or continuous symmetries will be discussed in subsequent sections.
To simplify the notation, we always assume that the fusion multiplicities N c ab of simple objects in C are at most 1; this restriction can be relaxed straightforwardly.

A. Basic data
Given a 4-manifold M 4 , we pick a triangulation and a branching structure (i.e. a local ordering of vertices). We associate to each simplex the following data: • 0-simplex i: a group element g i ∈ G • 2-simplex ijk: an anyon a ijk ∈ C • 3-simplex ijkl: an anyon b ijkl ∈ C obeying certain rules The 3-simplex data is determined as follows. Consider a particular 3-simplex ijkl, where i < j < k < l, with group elements {g i } on its four 0-simplices and anyons {a ijk } on its four 2-simplices. We choose i, j, k = 0, 1, 2, 3 for concreteness; this is shown in Fig. 2(a). Then we demand that the anyon b 0123 placed on this 3-simplex obeys N b0123 a023, g 32a 012 = 0 and N b0123 a013,a123 = 0 (40) where N c a,b are fusion coefficients and we define In the language of category theory, the 2-simplex data is a simple object of C, and the data on the 3-simplex is an element of the space Hom(a 013 ⊗ a 123 , a 013 ⊗ g32 a 012 ), i.e. an element of In other words, if we had allowed N c ab > 1, we would also need to associate elements of a fusion space and a splitting space to the 3-simplices; this generalization is straightforward.
We can interpret this graphically as follows. Consider the 3D dual of the 3-simplex, as in Fig. 2(b). Each dual 1-simplex is now associated to an anyon line, and four anyon lines fuse at the dual 0-simplex. Ignoring the group elements for the moment, the choice of data at the dual 0-simplex is a resolution of those four anyon lines into two trivalent fusion vertices, as in Fig. 2(c). This data is then interpreted in graphical calculus by placing the anyon lines associated to negatively oriented 2-simplices at the bottom of the diagram, as in Fig. 2(d). (a) Data associated to 0-, 2-, and 3-simplices in the state sum. Group elements gi (blue spheres) are associated to 0-simplices, anyons a ijk (green spheres) are associated to 2-simplices, and an anyon b0123 (purple sphere) is associated to the 3-simplex. (b) Upon dualizing in 3 dimensions, the dual to the 1-simplex ij is a domain wall (orange sheet) acting by the group element gij = gig −1 j . The four a anyons fuse into the b anyon, and all the anyons live on domain wall junctions. (c) Our choice of resolution of the fusion channels and symmetry action; fusion is resolved trivalently, and the anyons get pushed towards a 0-simplex (dual 3-simplex). One anyon line, corresponding to a012, passes through a domain wall before it reaches a fusion vertex. (d) Representation of (c) in graphical calculus; negatively oriented 2-simplex data are on the bottom of the diagram. Parts (e)-(h) are the same process for a negatively oriented 3-simplex.
To see how the symmetry action in Eq. (40) arises, consider how the group elements behave when dualizing, as in Fig. 2(b). The membranes dual to the 1-simplices separate regions of space which are labeled by different group elements (associated to the dual of the 0-simplices). As such, we can think of these membranes as domain walls which have a symmetry action on the anyons. For example, the domain wall between the region associated to g 0 and g 1 acts on the anyons by g 10 . However, the anyon lines (dual to 2-simplices) naturally live on trijunctions between these domain walls, which leaves the symmetry action ambiguous. To disambiguate the symmetry action, deform all of the data associated to a k-simplex towards the highest-numbered 0-simplex (dual 3-simplex) associated with that k-simplex. That is, a 012 is deformed towards the 0-simplex labeled 2, while all other data is deformed towards the 0-simplex labeled 3, as shown in Fig. 2(c). The symmetry action in Eq. (40) then appears naturally. At this stage, the data can be interpreted in graphical calculus as in Fig. 2(d). The same process is shown for a negatively oriented 3-simplex in Fig. 2(e)-(h).
There are two types of arbitrary choices in this definition of the data. First, we could have resolved the fourfold fusion in a different channel, related by an F -move to our current choice. Second, we could have resolved the symmetry action differently, for example by pushing anyon lines towards the lowest-numbered 0-simplex.
Once we define our path integral, we will need to show that it does not depend on these arbitrary choices.
Placing g 23 branch cut lines as shown in the graphical calculus of Figs. 2(d) and (h) is determined as follows. Given a branching structure, each 1-simplex carries an orientation. Upon dualizing in 3 dimensions, this orientation defines a positive normal vector to the domain wall. Consider a domain wall between the g i and g j domains where i < j. Given our branching structure the 1-simplex is oriented from i to j, so we choose the convention where we associate the domain wall to the group element g ij (as opposed to g ji ). An anyon a that passes from the g i region to the g j region is converted to gj g −1 i a. In other words, an anyon a that crosses a domain wall labeled g ij along the positive normal vector to the domain wall converts to gji a, while an anyon crossing in the direction opposite to the positive normal converts to gij a.
In the graphical calculus, when projecting the diagrams to a two-dimensional plane, an oriented domain wall is depicted as an oriented line (colored orange in the figures), where the orientation of the line corresponds to the orientation of the positive normal through the convention depicted in Fig. 3. Therefore, when an anyon passes an oriented domain wall line labeled g ij from the right, it transforms to gij a; when it passes the domain wall from the left, it transforms to gji a. We note that in what follows we will avoid excessive subscripts by labeling simplices and data the same way. For example, we generally notate R We now define our path integral. Given a labeling of all the simplices, we will compute an anyon diagram for each 4-simplex based on the labeling. We multiply the results, and then sum over all labelings. Let ∆ 4 be a 4-simplex, and let (∆ 4 ) = ± be its orientation. Then define complex numbers Z (∆ 4 ) (∆ 4 ) in the following diagrammatic way, shown in Fig. 4. For each 3-simplex in ∆ 4 , take the diagram obtained in Fig. 2 given the induced orientation on that 3-simplex. Lay out these five diagrams in a plane such that anyon lines shared between two 3-simplices are near each other. Then connect up all of the lines and domain walls, sliding domain walls along anyon lines and bending domain walls far from anyon lines as necessary to obtain a closed diagram. This process is shown for positively oriented ∆ 4 in Fig. 4, while the end results are shown for both orientations in Fig. 5. Alternatively, these anyon diagrams arise from projecting the boundary 3-simplices, which form a triangulation of S 3 , into the plane.
These diagrams can be evaluated explicitly, leading to the following complex number associated to each 4simplex: The normalization factor N 01234 is given by where the products are over 3-simplices ∆ 3 and 2simplices ∆ 2 of the 4-simplex 01234, and d a is the quantum dimension of anyon a.
We may now define the path integral. On a closed 4-manifold M 4 , we define Here T k denotes the set of k-simplices and N k = |T k | is the number of k-simplices in the triangulation. The sum is over all possible labelings of the anyons {a}, {b} on the 2-and 3-simplices, and group elements on 0-simplices. Z(M 4 ) defined above can be viewed as a path integral on a 4-manifold M 4 equipped with a trivial G bundle. For computing anomaly indicators, it will be crucial to compute path integrals on non-trivial flat G bundles. Therefore, we wish to define the path integral above in the presence of flat background G connections, which modifies the construction as follows. Fix a gauge h ij for the background connection, where h ij is defined on 1-simplices of the triangulation. Our convention is such that moving from j to i should pick up the action of h ij (note that h ji = h −1 ij , as above). Flatness of the connection requires h ij h jk h ki = 1 for any 2-simplex (ijk). In every location in the above construction that g ij appears, replace g ij byg ij wherẽ This modifies the fusion rules used in defining the 3-simplex data and modifies the various transformations and group elements that appear in the definition of Z ± . Otherwise, the construction is completely unchanged. Note in particular thatg ijgjk =g ik .
Recall that flat G-bundles are in one-to-one correspondence with elements of Hom(π 1 (M 4 ), G); that is, the set of group homomorphisms from the fundamental group of M 4 into G. Therefore the above prescription defines a path integral Z(M 4 , f ), for f ∈ Hom(π 1 (M 4 ), G).
For an open 4-manifold, we fix the {a, b, g} labels on the boundary of the triangulation, and sum over the rest of the labels. Apart from not summing over surface data, the construction is unmodified. This then defines a wave function on the boundary triangulation.
We note that when G is trivial, the above path integral reduces to the Crane-Yetter state sum. 25 Our state sum is closely related to that of Cui. 34 The key difference is that in our construction, the elements of G live on 0-simplices rather than 1-simplices. In a rough sense, we have "ungauged" Cui's model. This has several consequences. First, and most importantly, this allows us to generalize the construction to allow as input anomalous symmetry fractionalization classes. Cui's construction, on the other hand, is defined by taking as input a G-crossed BTC, which necessarily is associated with non-anomalous symmetry fractionalization classes (i.e. trivial H 4 (G, U (1)) obstruction). The reason for this difference is that when one allows arbitrary group elements on 1-simplices, there can be a net flux through each 2-simplex. Cui's model associates an object a g of a G-crossed BTC to a 2-simplex whenever the flux through a 2-simplex is g. This construction therefore requires the G-crossed BTC to be well-defined and thus correspond to a non-anomalous symmetry fractionalization class. However when group elements are placed on vertices, the net flux through a plaquette is always the identity, so one never has to require the existence of a consistent Gcrossed BTC.
Secondly, we will see that for modular C our model has trivial topological order in the bulk, and therefore corresponds to a G SPT. In contrast, Cui's model is generally topologically ordered (that is, it corresponds to a noninvertible TQFT). Cui's path integral effectively sums over all possible G bundles. This is a crucial distinction that will allow us to extend the construction to include anti-unitary symmetry actions, as described in Sec. IV.

C. Important properties of the state-sum
The path integral defined in the previous section has a number of important properties. Namely, it • possesses a global internal G symmetry, • defines a topological invariant for closed M 4 and choice of flat G bundle, • defines a G SPT (i.e. defines an invertible TQFT) when C is modular.

Global G symmetry
Showing that our model has a global G symmetry is straightforward. The only way that the group elements labeling the 0-simplices {g i } enter the state sum is through {g ij }. Therefore the amplitude in the path integral associated with a given set of {g i } labelings on 0-simplices is exactly equal to the amplitude for the labelings {g i g −1 }, with the 2-and 3-simplex labelings unchanged. Note in particular that the wave function defined on the boundary of the triangulation is also symmetric under the operation {g i } → {g i g −1 }.

Topological invariance
When M 4 is closed, Z(M 4 , f ) is a topological invariant of M 4 and the choice of G bundle, defined by f ∈ Hom(π 1 (M 4 ), G).
To prove this, we must prove that the construction is independent of the choice of triangulation, branching structure, fusion channel defining the 3-simplex data, and deformation of the anyon labels towards the 0-simplices.
The retriangularization invariance is proven by using the fact that any two triangulations can be related by a finite sequence of Pachner moves. Therefore to prove retriangularization invariance, we directly compute the product of diagrams associated with each Pachner move to demonstrate invariance under the 3−3, 2−4, and 1−5 Pachner moves. The calculations are essentially the same as those of Ref. 34 and are reproduced in Appendix A 1.
In Appendix A, we further prove invariance under the choice of fusion channel for the 3-simplex data and choice of deformation of the anyon labels towards the 0simplices. The proof of independence of the choice of branching structure follows from the results of Ref. 34 and is not reproduced here.
Finally, we must prove that the construction is independent of the particular choice of flat connection h ij used to describe the flat G bundle. To do so, we must prove gauge invariance of the path integral under the gauge transformation This follows from the fact that given a set of labelings, the amplitude in the state sum only depends ong ij = g i h ij g −1 j . Therefore, under the gauge transformation, g ij → g i s i h ij s −1 j g −1 j . Then the relabeling g i → g i s i gives back the original path integral due to the sum over all group element labels of the 0-simplices.

Effect of changing projection
The precise braided fusion diagram that we associate to a 4-simplex depends on how we project the dual 1skeleton of the 3-simplices on the boundary of the 4simplex onto the plane. There are a number of different choices we can consider associated with this projection. We could consider (1) flipping the fusion diagrams associated to 3-simplices about a vertical axis, (2) flipping the fusion diagrams associated to 3-simplices about a horizontal axis, and (3) changing the over-crossing to an under-crossing. Note that applying (1) and (3) together is equivalent to rotating the diagram about a vertical axis by π, which as we discuss in Appendix A 8 does not change the value of the path integral on a closed manifold. Therefore (1) and (3) are equivalent choices for the path integral on a closed manifold.
Applying (2) is equivalent to changing the convention for positive and negative orientation, which complex conjugates the path integral. This convention can be fixed by comparing to a known example, which we do by considering the case with G = Z 3 ×Z 3 and the unique UMTC of rank 3 with Abelian Z 3 fusion rules.
In Appendix A 9 we discuss the effect of applying (3) alone. In the Crane-Yetter theories with a UMTC taken as input, one can prove that changing the over-to undercrossing simply complex conjugates the path integral. 52 We show under a mild assumption that the same holds in our theory, that is, applying (3) complex conjugates the path integral on a closed manifold. The proof is rather indirect, relying on the relationship between the path integral and SET anomaly in order to use the relative anomaly formula 38 . We have verified this by computerized computation of the path integral for the examples in Sec. VI along with the example of G = Z 3 × Z 3 and the unique UMTC of rank 3 with Abelian Z 3 fusion rules mentioned above.
We note that in Cui's construction where a G-crossed BTC is used to define the path integral, there is a unique choice of over-or under-crossing that allows the path integral to be well-defined. It is thus natural for us to use this convention as it is compatible with the natural generalization to Cui's state sum.

D. SPT for modular C
It has been shown that every (at least once-extended) (d+1)-dimensional TQFT which assigns one-dimensional vector spaces to both T d and S d is invertible. 5354 Equivalently, if Z(T 4 ) = Z(S 3 × S 1 ) = 1, the theory does not have intrinsic bulk topological order. We demonstrate for our model that if C is modular, then Z(T 4 ) = Z(S 3 × S 1 ) = 1 (for trivial background G-bundle). This then shows that our path integral defines a G SPT.
Given that our state sum is topologically invariant, we may compute Z(T 4 ) using the simplest possible triangulation. In fact, we choose to use a cellulation rather than a triangulation. 55 The simplest cellulation of T 4 consists of twenty-four 4-simplices, but only one 0-simplex which we label 0. See Fig. 6 for the analogous cellulation of T 3 . The details of the cellulation are described in Appendix C, but given that it exists, we can use it to compute Z(T 4 ). Because there is only a single 0-simplex and we choose the background G bundle to be trivial, there are no domain walls; all the g ij are the identity. Therefore, for this particular cellulation, every term is independent of g 0 , so we may as well choose the term where g 0 is the identity. It immediately follows that where Z CY is the Crane-Yetter path integral for C. This is the desired result because Z CY (T 4 ) = 1 for modular C (see e.g. Ref. 26). The partition function Z(S 3 × S 1 ) in the absence of a background gauge field can also be calculated explicitly. The simplest cellulation of this manifold involves eight 4-simplices and is detailed in Appendix C. Once the cellulation is written down, one can explicitly show that the symmetry factors U and η cancel out in the absence of a background gauge field, reducing the calculation to the Crane-Yetter path integral for C on S 3 × S 1 : Since describing the cellulation is rather tedious, this calculation is relegated to Appendix D.
For reference, we note that it is also straightforward to check that As a technical aside, in order to use such simple decompositions of the manifolds in question, we are using the fact that our path integral is independent of the cellulation of the manifold in question. That this is the case for the Crane-Yetter state sum was proven in Ref. 26, and we similarly expect it to be true for our construction. Alternatively, one can check whether Pachner moves can convert the cellulations used here to triangulations, which we also expect to be true (it is a simple exercise to check the lower dimensional analog for T 2 ).

E. Conjecture for removing sum over group elements
The state sum defined above contains a sum over all group labels on the 0-simplices, 1 {gi} . We conjecture that, at least for modular C, every term in this sum is equal and therefore the sum is actually unnecessary. In other words, the amplitude associated to any given set of labelings is actually independent of the choice of G-defect networks present in the (3+1)D space-time. In this case, the symmetry fractionalization data only contributes when the G-bundle is non-trivial, in which case the braided fusion diagrams that define the 4-simplex amplitudes necessarily have domain walls due to the nontrivial holonomies around non-contractible cycles. This conjecture is borne out in the examples that we study in Sec. VI.
We note that the analogous statement is also true for the SPT state sum based on group cohomology. 19 It is clear that if such a conjecture is true, then it implies that the state sum is a (3+1)D G-SPT. The reason is that the computation of the state sum on trivial G bundles necessarily reduces to the Crane-Yetter state sum for which it is known that the path integral is unity on every trivial closed G-bundle. We believe that the converse is also true: the fact that modular C with the symmetry fractionalization data determines a G-SPT should imply the aforementioned conjecture.

IV. EXTENSION TO ANTI-UNITARY ON-SITE SYMMETRIES
In this section we extend our state sum construction to symmetry groups G that contain anti-unitary symmetry actions. This will allow us to extend our results to arbitrary time-reversing or spatial parity reversing symmetries. In particular, theories with such anti-unitary actions will allow us to formulate path integrals on nonorientable manifolds for theories that have anti-unitary symmetry actions.
We note that the symmetry fractionalization formalism discussed in this section is closely related to previous discussions in Ref. 6 and 31 although the discussion here proceeds through a somewhat different perspective in light of our model.

A. Reformulation of unitary symmetry fractionalization
In order to extend our construction to allow G to contain anti-unitary symmetry actions, we will first consider the unitary case from a different perspective. Formally this amounts to packaging the UMTC and symmetry fractionalization data into the structure of a 3-category where the objects (0-morphisms) are group elements of G.
The state sum construction we defined in Sec. III required us to input a consistent graphical calculus involving the data {F abc def , R ab c , G, ρ, U gij (a, b; c), η a (g ij , g jk )}. The domain walls g ij are essentially a shorthand tracking the group elements g i associated to regions of space in the graphical calculus (recall that in passing from sim-plices to the graphical calculus, we consider the dual of the triangulation, so group elements on the 0-simplices are associated to regions of space in the graphical calculus). We can do this because the state sum does not explicitly depend on any of the g i , but rather just on the domain walls.
However, we could have reasonably defined the same type of state sum by having the fusion spaces explicitly depend on the group element of the domain in which they sit. That is, we define the fusion and splitting spaces V c ab (g),Ṽ ab c (g). Then the c − ab splitting vertex that has been deformed towards the 0-simplex i is an element of V ab c (g i ); diagrammatically, this is represented as The data defining the theory can then depend on these group elements: where the {g i } label the regions involved in the graphical calculus operation. For example, the g i inR is associated to the spatial region in which the abc fusion vertex being acted on by the R-move is contained. Diagrammatic representations of these generalized data are shown in Fig. 7.
In particular,Ũ is now defined via the unitary maps where the L superscript refers to the fact that group elements are left-multiplied under this map. The consistency of the graphical calculus then leads to consistency conditions analogous to the ones we had previously: For example, in deriving the analogue of Eq. (35), one considers the equality of the two diagrammatic processes shown in Fig. 8, producing Eq. (60). Internal indices for the fusion spaces can be added straightforwardly at the cost of additional notation.
One can check that the consistency of this graphical calculus yields a topologically invariant path integral that is independent of the various arbitrary choices made in the definition. However, it does not yet have a G symmetry, as everything depends explicitly on the g i . Therefore it cannot be consistently coupled to a background G connection and defined on non-trivial G bundles.
To ensure that the theory is G symmetric, we demand that the wavefunction on any closed 3-manifold ∂M 4 be G-invariant. That is, we demand invariance under the unitary G action which right-multiplies the G degrees of freedom byḡ and does not modify any of the other degrees of freedom. Since the wave function is given by the partition function on M 4 with fixed boundary data, this means that where the {g i }, {a ijk }, {b ijkl } are the labels on ∂M 4 , and i, j, k, l label boundary vertices. It is important that we have chosen right-multiplication for the G action because it preserves the combinations g iḡj that naturally act on anyons in the path integral. Specializing to the case where M 4 is a single 4-simplex 01234, (meaning ∂M 4 = S 3 ), we thus require which equates two anyon diagrams, with no bulk data to sum over, for every choice of anyons and group elements. A sufficient condition to satisfy Eq. (62) is to demand F ,R,η andŨ are individually invariant under this G- Another way to say this is the following. For fixed a, b, c, all the fusion spacesṼ c ab (g i ) are isomorphic. In order to impose G symmetry, we should identify all of these fusion spaces using isomorphisms and then demand G-equivariance.
The R superscript refers to the fact that group elements are rightmultiplied. That is, the maps α R g should be unitary and strictly preserve all of the UMTC plus symmetry fractionalization data of the theory. In particular we demand thatρ It follows that The last equalities define the data F , R, η and U (without tildes), which are what we usually use to define symmetry fractionalization on a BTC. It is straightforward to check that the consistency conditions Eqs. (60)- (59) for the data with tildes, when recast in terms of the data without tildes, become the usual consistency conditions Eqs. (27) and (34)- (35). Another way to say this is that the data without tildes that appears in Sec. II C should be identified as the identity sector of the data with tildes, that is, We can then define a map ρ g which acts only on the spaces without tildes and also has the properties given in Sec. II C by where the restriction means that we are restrictingρ to act only on vector spaces without tildes, i.e. those in the identity domain. At this stage, we have simply added a lot of extra notation for very little gain, as it is clear from Eqs. (63)-(66) that the data without tildes characterizes the data of the theory with tildes. However, this machinery will make the extension to antiunitary symmetries much more natural.
Before proceeding, we make two technical comments. First, in principle both the vertex basis and symmetry action gauge transformations can depend on the domain in question, and furthermore one could imagine changing α R andρ L by natural isomorphisms separately. However, imposing the equivariance conditions, Eq.(63)-(66), which arose from demanding symmetry of the wave function, Eq. (62), constrains the gauge transformations so that the transformations must act the same way on all the domains. For example, ifΓ c ab (g i ) is a vertex basis gauge transformation onṼ c ab (g i ), theñ and similarly for the symmetry action gauge transformations. Second, in the equivariance condition Eq. (68), it is crucial that ifρ left-multiplies the group elements, α must right-multiply. If we instead used a map then the equivariance condition would not even make any sense if G is non-Abelian because the codomains of the two maps are different spaces:

B. Anti-unitary symmetry actions
We now generalize the above discussion to the case where G contains anti-unitary symmetry actions. Then the natural G action Eq. (61) on the wavefunction involves complex conjugations: where σ was defined in Eq. (19). Following the same logic, the desired symmetry transformation rules change: In particular, we now take the isomorphisms α R g (see Eq. (67)) to be anti-unitary maps when g is an antiunitary symmetry action.
With this in mind, we may now generalize the definitions of the data F , R, η and U (without tildes) viã Another way to think of Eqs. (84)-(87) is that they allow us to take symmetry fractionalization data given in the language of Sec. II C and convert it into data "with tildes" which can be inserted into our path integral.
Following the above, we can now write the consistency conditions for the data F, R, η, U in the presence of anti-unitary symmetry actions by simply substituting Eqs. (84)-(87) into Eqs. (54)-(60) These exactly reproduce Eqs. (27) and (34)- (35) in the presence of anti-unitary symmetry actions. Because Fand R-moves need only involve a single domain, the pentagon and hexagon equations take their usual forms.
To make contact with Sec. II C, we again note that all of the data without tildes act on vector spacesṼ c ab (1) in the identity domain. We claim that the formalism in Sec. II C arises if we define V c ab =Ṽ c ab (1) and define the topological symmetry operator ρ g , without a tilde, again by Eq. (74). The map ρ g is anti-unitary if the action of g is anti-unitary (sinceρ is always unitary and α g is anti-unitary when the action of g is anti-unitary). We can check that this ρ g behaves in the desired way: where the anti-unitarity of α R g played an important role by complex conjugatingŨ .
A key point to notice is that the derivations of the consistency equations for the data with tildes, Eqs. (54)-(60), do not depend on whether the symmetry group elements have unitary or anti-unitary action.
We comment at this point that, in terms of symmetry fractionalization data, the maps ρ g defined in Sec. II C and Eq. (74) are either unitary or anti-unitary according to the action of g. Importantly, in our present formalism, ρ g does not describe sweeping a domain wall over a fusion vertex in the graphical calculus defined in Fig. 7. Instead, the action of a domain wall in the graphical calculus is related to the mapρ L g . We takeρ L g to always be unitary. Then ρ g = α R g •ρ L g and α R g are either both unitary or anti-unitary. 56 .
We note that the results of this section highlight the fact that to properly describe anti-unitary symmetry actions, it is helpful to view symmetry fractionalization in terms of the language of 3-categories. Note that any UMTC can be interpreted as a 3-category with trivial 0 and 1 morphisms. The objects of the UMTC, which are the anyons, then correspond to 2-morphisms while the 1-morphisms of the UMTC are promoted to 3morphisms in the 3-category. Symmetry fractionalization can then be described by a 3-category where the objects (0-morphisms) correspond to group elements of G and the 1-morphisms correspond to the domain walls. The 3-category is equipped with G actions, which define the dataρ,Ũ ,η. Finally, the 3-category has a G-equivariance condition, where the possible anti-unitary action of symmetry group elements complex conjugates the data.

C. Defining the state sum on non-orientable manifolds
For unitary spatial parity-preserving symmetries, SPTs are distinguished by their topological path integrals on non-trivial G bundles. For anti-unitary symmetries such as time-reversal symmetry, or unitary spatial parity-reversing symmetries, it is well-known that one must also consider the path integral on non-orientable manifolds. Equivalently, certain anomaly indicators for (2+1)D SETs involving time-reversal or spatial reflection symmetries are associated with (3+1)D path integrals on non-orientable manifolds. 31 For example, for G = Z T 2 time-reversal symmetry, SPTs are distinguished by their path integrals on RP 4 and CP 2 . We therefore should ensure that our path integral is well-defined on nonorientable manifolds when G contains group elements with anti-unitary symmetry action.
Suppose that we wish to calculate the path integral on some non-orientable manifold M 4 . First let W 3 be a closed submanifold dual to the first Stieffel-Whitney class w 1 (M 4 ). To perform the calculation, we cut open M 4 along some set of 3-simplices that triangulates W 3 in order to form an open, orientable 4-manifoldM 4 , such that ∂M 4 = W 3 ∪W 3 . AssignM 4 a global orientation, and for a 4-simplex ∆ 4 let s(∆ 4 ) = +1 (respectively −1) if the orientation of ∆ 4 given by the ordering of its vertices matches (respectively fails to match) the orientation ofM 4 . This allows us to compute a path integral onM 4 as a function of the labels on the boundary simplices.
Next, to construct the path integral on M 4 , we glue along the boundary 3-simplices with a twist by an antiunitary symmetry group element as follows. Group elements on opposite sides of the cut are identified up to an action of an anti-unitary symmetry group element. The data assigned to 2-and 3-simplices are however unaffected by the twist. The path integral on M 4 is then obtained by summing over the labels on ∂M 4 , including the appropriate normalization factors for the boundary data.
The above procedure may alternatively be thought of as adding a flat background G gauge field to M 4 . The important point is that the holonomy of this background gauge field must agree with the orientation bundle of M 4 ; that is, the G-holonomy around any cycle corresponds to a symmetry group element g with anti-unitary action if and only if the local orientation reverses when traveling around that cycle. As we show in Appendix A, this requirement, together with the anti-unitary action of the isomorphisms α R g , ensures that the path integral is invariant under vertex basis and symmetry action gauge transformations. Importantly, gauge invariance cannot be maintained on non-orientable manifolds if α R g is unitary.
From this perspective we see why "gauging G" is not possible for anti-unitary symmetries. Gauging G corresponds to summing over all possible G bundles, which is not possible when G contains anti-unitary symmetries because of the requirement that anti-unitary holonomies must be compatible with the orientation bundle of M 4 , which is fixed.

V. CONSTRUCTING ANOMALY INDICATORS
We have seen in Sec. III that a UMTC C, symmetry group G, and symmetry fractionalization data specified by {ρ, U, η} defines a path integral for a (3 + 1)D G-SPT. G-SPTs are characterized completely by the values of the TQFT path integral on an appropriate set of 4-manifolds and non-trivial G bundles. The specific set of 4-manifolds and G bundles necessary to fully specify the (3+1)D SPT depends on G and correspond to generators of cobordism groups.
G-SPTs in (3+1)D form an Abelian group S G . A given G-SPT is therefore characterized by a set of roots of unity {I i }, for i = 1, · · · , n, where n is the number of generators of S G , and where Here M 4 i is a 4-manifold and f i ∈ Hom(π 1 (M 4 ), G) specifies a G bundle.
The set {I i } are referred to as the anomaly indicators associated with the data {C, G, ρ, U, η}. The reason is as follows. As we will show in Sec. VIII, the (3+1)D G SPT that we have defined hosts a (2+1)D surface termination that respects the G symmetry and that is characterized by the data {C, G, ρ, U, η}. Therefore, {I i } specifies the bulk (3+1)D SPT that hosts the given symmetry fractionalization class at its (2 + 1)D surface.
Since (3+1)D G-SPTs are partially classified by H 4 (G, U (1)), we have that H 4 (G, U (1)) ⊂ S G . The H 4 (G, U (1)) part is therefore determined by a subset of the anomaly indicators {I i }. In this section, we provide a general algorithm that can determine this subset of anomaly indicators, which thus specifies an element [S] ∈ H 4 (G, U (1)). This converts the problem of computing the H 4 (G, U (1)) anomalies from the data of {C, G, ρ, U, η} into a concrete algorithm that can be run by computer.
To do this, we start with a finite group G and present an algorithm for finding cohomology invariants, that is, functionals of a cocycle whose value depends only on the cohomology class of the cocycle. From a given H 4 (G, U (1)) invariant, we construct a cellulation of a 4manifold with G bundle. Our path integral, evaluated on that 4-manifold with G bundle, is an anomaly indicator for a G-SPT. We show that our procedure produces a full set of anomaly indicators; that is, the anomaly indicators are sufficient to fully extract the element of H 4 (G, U (1)) that characterizes the anomaly. The approach in this section works both for unitary and anti-unitary symmetry actions.

A. Generating cohomology invariants
We will first show how to find a complete set of cohomology invariants given a group G. We do this by recasting the cocycle condition in a convenient form, after which some simple manipulations yield the desired invariants.
Consider a representative n-cocycle ω = e 2πiφ of a class [ω] ∈ H n (G, U (1)). Then ω is a map from G n → U (1). We can choose to think of ω instead as an element of (U (1)) |G| n ; that is, as a vector of U (1) phases associated to each of the |G| n possible inputs. In a similar fashion, φ is a map from G n → R (ignoring for the moment the integer ambiguity) and can therefore be written as a realvalued vector v (n) of length |G| n . For example, in the n = 1 case, where we have chosen an arbitrary ordering g i of the elements of G. From now on we fix n and suppress the n superscript on v to make the notation less cumbersome.
The coboundary operator d takes n-cochains to (n + 1)-cochains; in the above language, it maps elements of (U (1)) |G| n to elements of (U (1)) |G| n+1 . Crucially, the coboundary operator can be written as a linear map on v because dω is a product of ω's. For example, for n = 1, We have used the notationdφ to indicate that the coboundary operator d has induced an operatord acting on φ. "Vectorizing"dφ into a vectordv of length |G| n+1 , we see thatd where M G n is a |G| n+1 × |G| n integer matrix which depends on n and on G. For example, for G = Z 2 and In this language, the cocycle condition dω = 1 becomes where Λ is any integer vector with |G| n+1 components. Next, we write M G n in terms of the Smith normal form: where A, D, B are all integer-valued matrices, D is diagonal and A, B are invertible over the integers. Multiplying Eq. (100) on the left by A −1 means Let us recall where each term comes from. The matrices A, B, D are determined entirely by G and n, while v is a reparametrization of the cocycle ω. Provided ω is indeed a cocycle, then Λ exists and is determined by v. Note that v is ambiguous up to an integer change of each of its entries, v → v + X for any integer vector X. Such a change will shift Λ by an integer vector: Λ → Λ + M G n X. Suppose we change the cocycle ω by a coboundary.
Then v changes to v + M G n−1 e for some element e of R |G| n−1 . Varying ω over all representatives of its cohomology class corresponds to continuously varying e over all its values. In this process, the left-hand side of Eq. (103) varies continuously. But the right-hand side of Eq. (103) is rational and thus can only vary discretely. The only way that this is possible is if the left-hand-side is completely invariant when ω changes by a coboundary, that is, if is a cohomology invariant when D ii = 0, where we have re-exponentiated to avoid the integer ambiguity in v. Furthermore, since k (A −1 ) ik Λ k is an integer, I i must be a (D ii )-th root of unity.
Of course, many of these invariants are trivial. For example, dω evaluated on any set of group elements is 1 and therefore an invariant. In particular, when D ii = 1, the right-hand side of Eq. (103) is always an integer, so multiplying both sides by 2πi and exponentiating tells us that some product of ω's is 1, independent of the cohomology class. While this is an invariant, it is not useful for distinguishing different cohomology classes. Therefore, nontrivial invariants only occur when D ii > 1. Recalling that B has an integer inverse, it is straightforward to for k m ∈ Z produces an explicit cocycle with anomaly indicator Note that k m must be an integer in order to satisfy the cocycle condition (100). Hence all such invariants are nontrivial, and H n (G, U (1)) contains a subgroup Z Dii for each D ii > 1. We prove in Appendix B that these invariants provide a full characterization of H n (G, U (1)).
There is no conceptual change to this procedure in the presence of anti-unitary symmetries; all that happens is that the cocycle condition changes slightly. For example, for n = 1, the boundary operator Eq. (97) changes to In this case, M Z T 2 1 has no D ii > 1, corresponding to the fact that H 1 (Z T 2 , U (1)) is trivial.

B. Generating cellulations
where the are ±1. We can associate a labeled d-simplex to each factor as follows. Consider the factor ω(g 1 , g 2 , . . . , g d ) g . We consider a d-simplex with orientation given by g and order its vertices. Suppose its vertices are, in order, 0123 · · · d. For each i, label the 1-simplex connecting vertices (i − 1) and i by g i . This labels d of the d(d + 1)/2 1-simplices. To label the remaining 1-simplices, we demand that the net flux through each 2-simplex is trivial. This uniquely specifies the labels of the remaining 1-simplices.
We claim that there is always a way to glue together all of the d-simplices associated to a given invariant I such that the 1-simplex group elements and induced orientations match to form a closed d-manifold with some nontrivial flat G-bundle.
To see this, suppose that we modify ω by a coboundary dα. Just as we can interpret ω as a d-simplex, we can also interpret α(k 1 , . . . , k d−1 ) as corresponding to a (d − 1)simplex with orientation and a flat G-connection, where the group elements k i are placed on (d − 1) 1-simplices and determine (via flatness) group elements on the other 1-simplices. Then, by definition, dα(g 1 , g 2 , . . . , g d ) is a product of one factor of α for each (d − 1)-simplex of ω(g 1 , g 2 , . . . , g d ), where the orientation of the (d − 1)simplex corresponding to each factor of α is given by the (d − 1)-simplex's orientation relative to ω. In order for I to be a cohomology invariant, every factor of α must cancel, that is, each factor of α must appear in I the same number of times with positive relative orientation as it appears with negative relative orientation. That is, each (d − 1)-simplex can be paired with an identical simplex, but with opposite orientation, which is all that is needed to be able to glue the d-simplices together to form a closed manifold.
For example, for G = Z 2 2 , d = 4, our algorithm generates the cohomology invariants where Z and X generate Z 2 2 in multiplicative notation and obey XZ = ZX. We focus on I 1 since it has many fewer factors of ω. For example, the factor of ω(1, ZX, X, ZX) in Eq. (109) is associated to a 4-simplex 01234 with group elements associated to the links via 01 = 1, 12 = ZX, 23 = X, 34 = ZX, and the rest of the group elements determined by requiring that the 2-simplices all have trivial flux through them. To determine how to make a closed manifold, from left to right, denote the five 4-simplices in the numerator of Eq. (109) 1, 2, 3, 4, 5 and the ones in the denominator 6, 7, 8, 9, 10. Then, for example, the 4-simplices 1 and 2 can be glued together along two 3-simplices, one with elements 1, ZX, X on three successive edges (+ and -orientation for 1 and 2 respectively) and one with elements 1, ZX, Z on three successive edges (-and + orientation for 1 and 2 respectively).
In fact, it can be checked that a closed manifold with a consistent G connection can be obtained by gluing the 4simplices in the way shown in Fig. 9, where a line between two 4-simplices represents a 3-simplex shared between those 4-simplices.
There are, in general, multiple valid ways to glue together the 4-simplices to produce a closed manifold. Presumably these different gluings correspond to different cellulations of the same manifold with the same holonomies, although we have not studied this in detail.
This procedure needs a small modification in the presence of anti-unitary symmetries because of the nontrivial group action that appears in the coboundary operator. In particular, let us re-run the argument that the d-simplices can be glued together. The key difference is that now group actions can appear: the dsimplex ω(g 1 , g 2 , . . . , g d ) now picks up a (d − 1)-simplex α σ(g1) (g 2 , . . . , g d ). That is, if g 1 is antiunitary, then we should interpret the 3-simplex α(g 2 , . . . , g d ) as having a negative orientation relative to ω(g 1 , g 2 , . . . , g d ).
As an example, take G = Z T 2 with d = 2. The above procedure produces the cohomology invariant The 2-simplices that arise from this invariant are shown in Fig. 10a, along with the relative orientations on the 1simplices accounting for the group action of g 1 . Crucially, the 1-simplex 12 should be interpreted as having negative relative orientation thanks to the fact that g 0 1 = T has a group action on 12 . The 1-simplices 02 and 0 2 with the group element 1 on them can be glued to produce Fig. 10b, but there are two valid ways to glue the 1-simplices with T on them to produce a closed manifold. It is easy to see by inspection that both produce the real projective plane, RP 2 . It is well-known that Z(RP 2 ) is the anomaly indicator for a 1 + 1D Z T 2 SPT. 16 The relative orientations of the 1-simplices are shown next to them; the 1-simplex 12 is interpreted as having the "wrong" relative orientation because of the group action arising from g 0 1 = T. (b) The 1-simplices 02 and 0 2 are glued together. There are two valid ways to glue the remaining 1-simplices together, either by gluing 01 to 03 or 01 to 12. By inspection, both produce RP 2 .

C. Algorithm for determining anomaly indicators
We can now combine the above results to obtain anomaly indicators, which fully specify an element of H 4 (G, U (1)) from the symmetry fractionalization data. Given a group G, UMTC C, and symmetry fractionalization data {ρ, U, η} we proceed by the following algorithm: 1. Compute cohomology invariants {I i } for H 4 (G, U (1)) in the way described in Sec. V A.
2. Construct a cellulation for a closed 4-manifold M i with a background G connection A i for each such invariant as described in Sec. V B.
3. Input C, G, and the given symmetry fractionalization data to our state sum construction to compute the path integral Z(M i ; A i ) on each M i equipped with its G connection A i by using the cellulation obtained in the previous step.
The above algorithm therefore allows explicit computation of a set of anomaly indicators {I i } given the data {C, G, ρ, U, η}. These anomaly indicators may be used in Eq. (105) to compute an explicit representative cocycle in the anomaly's cohomology class. For the G = Z 2 2 example introduced above, it is already known that one choice of a full set of SPT invariants consists of the SPT path integral on the manifold L(2, 1) × S 1 with flux ZX through one cycle and flux Z through the other cycle 57,58 . Here L(p, q) is Lens space and L(2, 1) = RP 3 . Explicit formulas for these path integrals in terms of representative cocycles are known 57-59 , so given a representative cocycle, we can evaluate the SPT path integrals and compare the results to explicitly evaluating I 1 and I 2 for the same cocycle. We find that where the first and second group elements label the fluxes through the L(2, 1) and S 1 cycles, respectively. As such, we believe that the cellulations produced by the above algorithm applied to I 1 and I 2 actually yield cellulations of L(2, 1)×S 1 with the appropriate holonomies, although we have not verified this directly.

VI. EXAMPLES OF ABSOLUTE ANOMALIES
In this section we compute a number of examples. Where there is overlap, we find consistency with all previous calculations for anomalies. In particular our computation of absolute anomalies for G = Z 2 × Z 2 anyon permuting symmetries for the U (1) 4 topological order has not been performed before through any method and is consistent with the relative anomaly calculation of Ref. 38.
We note that we are limited in the number of examples that we can easily calculate due to the large number of terms in the state sum. In principle the calculations can be parallelized on the computer, and the number of terms in the state sum scales polynomially with the number of anyons in the UMTC. However we expect that the complexity of the cellulations involved increases with |G| such that in general the complexity of the computation would be exponential in |G|.
Here we compute symmetry fractionalization anomalies for a series of topological orders: U (1) 2 and U (1) 4 with G = Z 2 × Z 2 symmetry, with both permuting and non-permuting symmetry actions. The case U (1) 2 and U (1) 4 with no anyon permutations reproduces previous known results, while the case U (1) 4 includes anyonpermuting symmetries and is consistent with the relative anomaly calculation of Ref. 38.

(3+1)D SPTs
For G = Z 2 × Z 2 , we have In principle we could use the computer-generated invariants in Eqs. (109) and (110) to construct cellulations. However, they contain a large number of 4simplices. It will be simpler to use the known result that for a G = Z 2 × Z 2 SPT, the path integral on M 4 = L(2, 1) × S 1 provides a set of anomaly indicators for certain choices of background G connections. 57 Recall that here L(p, q) is a Lens space, and L(2, 1) = RP 3 is real projective space. This manifold has two nontrivial cycles; one which appears in the Lens space and one around the S 1 . We call the flux threading those cycles g and h respectively. More precisely, the fundamental group π 1 (L(2, 1) × S 1 ) = Z 2 × Z; the g (respectively, h) flux is the one through the loop generating the factor of Z 2 (respectively, Z). We can then define the anomaly indicators Of course, only two such indicators are independent. We take as a generating set I X,Z and I Z,X , where X and Z generate Z 2 × Z 2 . That is, the values of I X,Z , I Z,X characterize the four distinct possible SPTs in this case. Note that this is a slightly different set of generators than we found algorithmically in Sec. V; one can check that, as defined in Eqs. (112) and (113), we have We can make contact with previous parameterizations 57, 58 of the (3+1)D path integrals as follows. We use the following set of representative cocycles for H 4 (Z 2 × Z 2 , U (1)) = Z 2 × Z 2 : where group elements g = (g 1 , g 2 ) with (1, 0) = X and (0, 1) = Z, and where [k J + l J ] = (k J +l J ) mod 2. Here q IJ is an off-diagonal matrix with entries in Z 2 which labels the cohomology class in question. If, on M 4 , there is a flux g through the non-trivial Lens space cycle and a flux h through S 1 , then the SPT partition function is This results in the path integrals: We then numerically explicitly evaluate the path integral on L(2, 1) × S 1 using a cellulation given in Appendix C. The aforementioned cellulation contains eight 4-simplices, which is much simpler than the ten and twenty-four 4-simplices produced by Eqs. (109) and (110), respectively. Even so, our implementation of the numerical computation has a runtime which scales as N 9 a for Abelian C, where N a is the number of anyons in C, which is computationally expensive. As such, we only examined topological orders with at most four anyon types.

Gauge-invariant characterization of Z2 × Z2 symmetry fractionalization
For a given symmetry action, one can solve the consistency conditions to determine all possible fractionalization patterns up to gauge equivalence. In the tables that follow, we specify symmetry fractionalization patterns by a set of gauge-invariant quantities λ g c ,λ g c and τ c where g ∈ G and c ∈ C.
Further suppose that there exists a sequence of g-invariant anyons c 0 = c, c 1 , c 2 , . . . , c n−2 , c n−1 = 1 such that c × c k can fuse to c k+1 , that is, N c,c k c k+1 > 0. Then we can define If insteadc = g c for some fixed g, then definẽ Finally, if c is G-invariant, that is, g c = c for all g ∈ Z 2 × Z 2 , then the quantity is also gauge-invariant. The equalities follow from the cocycle-like condition on η.

U (1)2 (semion) topological order
Semion topological order has anyon types {1, s} with one non-trivial F -symbol F sss = −1 and one nontrivial R-symbol R ss = i. Any symmetry action is nonpermuting, so we can gauge-fix all the U s to be 1. In this gauge, λ g s = η s (g, g), which is invariant under any additional gauge transformations. One can check that these quantities can be independently chosen to be ±1 for each g = 1, and that this is an exhaustive list of symmetry fractionalization classes. Our numerics produce the absolute anomalies shown in Table I.
It is known that H 4 (Z T 2 , U (1)) = Z 2 , with the anomaly indicator given by the path integral of the (3+1)D SPT on RP 4 . There is also a beyond cohomology SPT, with the anomaly indicator given by the (3+1)D path integral evaluated on CP 2 , but this is not expected to be related to the SET anomaly. Hence here we study only Z(RP 4 ).
which can be turned into a cellulation with four 4simplices. Let the 4-simplices corresponding to the four factors in Eq. (128) be labeled 1,2,3,4 in the order in which they appear. Then, accounting for the matching of the background connections, these 4-simplices can be glued together in the manner shown in Fig. 11, where each number represents a 4-simplex and each line represents a 3-simplex on which two 4-simplices have been glued together. One can check that for Abelian C, the number of terms in the sum scales as N 4 a , where N a is the total number of anyons in C.

Results: ZN toric code
Let the excitations of the Z N toric code be labeled by (a 1 , a 2 ) where a 1 , a 2 ∈ Z N represent the charge and flux respectively and fusion is given by addition mod N . The F -symbols can be chosen to all be 1 and the R-symbols are We take the Z T 2 action on the anyons to be T (a 1 , a 2 ) = (a 1 , −a 2 ), taken mod N ; this symmetry action leaves (m, 0) and (n, N/2) invariant for any m, n ∈ Z N .
Since all the F -symbols are 1, we can take all the U = 1. The only non-trivial ηs are η T x ≡ η x (T, T), for T x = x. The consistency conditions require: One can check straightforwardly that if T x = x, then η T x is gauge-invariant and real. In our gauge η T (0,0) = 1, which can be used to show that η T (1,0) = ±1 and η T (0,N/2) = ±1, and that up to gauge transformations, these specify all fractionalization classes. Physically, η T x (for a Tinvariant anyon x) specifies whether x carries a local Kramers degeneracy, that is, roughly speaking, locally "T 2 = η T x " for the anyon x. We numerically evaluated the path integral for N = 2, 4, 6 and obtained This says that of the four distinct Z T 2 symmetry fractionalization patterns, only the state with (η T (1,0) , η T (0,N/2) ) = (−1, −1) is anomalous, which matches the results from Eq. (127) and obtained previously. 31 For the case of the Z 2 toric code, the anomalous symmetry fractionalization pattern is referred to as eTmT and was found to be anomalous in Ref. 12.

VII. HAMILTONIAN FORMULATION
Here we present a Hamiltonian formulation of the system described by the path integral state sum of the previous sections. In particular, we provide an exactly solvable Hamiltonian whose exact ground state on a closed 3-manifold corresponds to the wave function obtained by evaluating the path integral of Sec. III on a 4-manifold with boundary. The relation between the Hamiltonian and the path integral state sum here is similar to the approach of previous works: the Levin-Wen model gives an exactly solvable Hamiltonian formulation of the (2+1)D Turaev-Viro state sum, while the Walker-Wang model provides an exactly solvable Hamiltonian for the Crane-Yetter state sum. In particular our formulation is a generalization of the Walker-Wang and Williamson-Wang models 27,35 to allow G domain walls and anomalous G symmetry actions.
Our primary motivation for studying the Hamiltonian formulation is to be able to study the model on a 3D space with boundary. This allows us to demonstrate explicitly that there exists a (2+1)D surface termination for the Hamiltonian that preserves the G symmetry, and that the surface hosts a (2+1)D SET described by the same UMTC C and symmetry fractionalization data {ρ, U, η} that was used to define the model. In particular, this therefore allows us to demonstrate explicitly that (1) every symmetry fractionalization class for any UMTC can be realized at the surface of a (3+1)D SPT, and (2) to see the data describing symmetry fractionalization at the surface {ρ, U, η} emerge explicitly via an exactly solvable model.
Schematically, the ground state of our 3D Hamiltonian will consist of a superposition of all braided fusion diagrams in C and all possible networks of G-domain walls. The relative weights of the different terms in the superposition are obtained by evaluating the corresponding braided fusion diagrams with G actions, which are obtained using the data of the UMTC C and the symmetry fractionalization data. With open boundary conditions we will see how the G-symmetric (2+1)D surface possesses anyonic excitations described by C and symmetry fractionalization described by {ρ, U, η}.
We note one technicality in relating the Hamiltonian formulation to the path integral formulation. Our Hamiltonian will be defined on a certain 3D trivalent lattice and a preferred direction in space -here for concreteness we will take a trivalently-resolved cubic lattice, as described below. On the other hand, the wave function obtained from the path integral construction is defined on a 3D triangulation. We assert that the ground state wave function obtained from our Hamiltonian can be related to the wave function obtained from the path integral construction by a local constant depth circuit, and therefore realizes the same phase of matter. This assertion is on a firm footing given our understanding of the relation between Levin-Wen models and Turaev-Viro path integrals, and between Walker-Wang models and Crane-Yetter path integrals, for which the analogous statements have also not been proven rigorously in general. In this spirit we therefore leave a rigorous proof of this assertion to future work.

A. Setup
We start with a trivalently resolved cubic lattice. As usual, we choose a particular projection of this lattice to 2D (similar to how braided fusion diagrams are evaluated according to a choice of projection from 3D to 2D). This trivalent resolution breaks the rotational and reflection symmetries of the cubic lattice.
Next, we choose one direction of the space that will be interpreted as a "time" direction in the braided fusion diagrams that will appear in the calculations. Importantly, the "time" direction must be picked in such a way that all edges of the lattice have some non-zero projection in the "time" direction. The edges are then all oriented along the positive "time" direction, as in Fig.  12b. These choices are made to obtain a well-defined graphical calculus for completely general BTCs in order to define the terms in the Hamiltonian. Choosing different "time" directions will produce a slightly different Hamiltonian with the same general properties.
We note that the above choice of "time" direction is also required to obtain a Hamiltonian realization for general Crane-Yetter models. The Walker-Wang models 27 also require these choices unless additional restrictions are made on the type of anyons theories that can be used as input into the construction (although Ref. 27 did not explicitly describe these choices). Models that do not actually depend on this choice of "time" direction presumably possess some notion of "hypertetrahedral" symmetry, which means that the evaluation of braided fusion diagrams obtained from a labeled 4-simplex should be, in an appropriate sense, independent of the branching structure on the 4-simplex. This notion of hypertetrahedral symmetry does not appear to have been formally defined for BTCs. This restriction is analogous to how Levin-Wen models were originally defined 30 to take as input fusion categories with a tetrahedral symmetry, even though the path integral construction can be extended to any spherical fusion category. 29 The Hilbert space of the model consists of the following. On each cube center, we place a qudit where a basis of orthonormal states are labeled |g , for g ∈ G. At the center of each link of the trivalently resolved lattice, we place a qudit with an orthonormal basis labeled by anyons in C.
On the cubic lattice, cubes are naturally G domains with domain walls naturally living on the faces of the lattice; on the trivalently resolved cubic lattice, the domain (cube) and domain walls (faces) are deformed as shown in Fig. 12a. If an anyon line extends from a cube with g 0 in its center to a cube with g 1 in its center, the anyon should be acted on by g 1 g −1 0 ≡ g 10 . Note that Furthermore, in the trivalently resolved cubic lattice, some of the domain wall junctions lie along edges of the lattice. Just as in the path integral construction, we will not want anyon lines to be coincident with domain wall junctions. Thus we choose to resolve this ambiguity by shifting the domain walls slightly, as shown in Fig. 12b; different choices of this shift will not change the topological properties, although the model will be slightly different (just as it would change if we changed the projection to 2D). This deformation naturally associates, in a translation-invariant way, six links and four vertices (shown in green and purple, respectively, in Fig. 12b) to a domain (deformed cube). One can further choose a trivalent resolution of the domain wall junctions, but this will have no effect on the model. As a technical comment, since we will be demanding that the anyon degrees of freedom satisfy the fusion rules at the vertices, we would need to add degrees of freedom on the vertices to track elements of the fusion spaces V c ab if we allowed N c ab > 1. Because dim V c ab depends in general on a, b, c, additional care must be taken to ensure that the Hilbert space remains a tensor product of local Hilbert spaces. While this is possible, such a generalization has not been described in the literature for the Levin-Wen or Walker-Wang models. For the models described in this paper, we also restrict to the cases with N c ab ≤ 1 and leave the generalization for future consideration.

B. Constructing the Hamiltonian
In order to have the desired ground state, the Hamiltonian has the form where v, p, c are vertices, plaquettes, and cubes of the trivalently resolved cubic lattice, respectively. The vertex term A v enforces the fusion rules at each vertex, paying attention to any domain walls that are crossed. The plaquette term has the form where B s p creates a closed anyon loop on plaquette p and fuses it into the edges of p. For comparison, A v and B p are analogous to the terms of the Walker-Wang model but are modified in the presence of the domain walls. The cube term D c has the form where D g c creates a closed domain wall of type g at the center of cube c, then fuses that domain wall into the domain walls on the plaquettes. The factor of |G| −1 is for later convenience.
In the rest of this section, we explain how we construct each of these terms. Before doing so, we make some notational comments. Because B s p and D g c have very complicated formulas, we will use compact notation where no confusion results: we use the notation ij a to mean gij a, and use bars to refer to inverses of matrices (e.g. F = F −1 ), inverses of group elements (ḡ = g −1 ), and antiparticles. We will also slightly overload the variable v, which will refer either to a vertex or to an anyon on a specific link. The usage should be clear from context.

Vertex term
The term A v enforcing the fusion rules is straightforward. It acts as the identity on the G degrees of freedom and can be written for, e.g., the vertex where u , u, d meet in Fig. 13a. The domains are numbered using the scheme in Fig. 13b. The delta function here means δ07 u ,d;u = 1 N u 07 u ,d > 0 0 else (138) where N c ab is a fusion coefficient. The symmetry action on u comes from the fact that u lives on a link associated to the g 7 domain, while the fusion vertex is associated to the g 0 domain. Hence the anyon line passes through the domain wall g 70 and is thus acted on by the symmetry. The terms for the other vertices are straightforward generalizations.

Plaquette term
The matrix elements of the plaquette term are obtained by evaluating the amplitude obtained in the braided fusion diagram associated with starting with a closed loop labeled by an anyon s at the center of the plaquette p and fusing it into the edges. This must be done carefully to ensure that we capture all of the group actions correctly.
The setup is as in Fig. 13a. The procedure is similar to that for the Walker-Wang models 27 , where we take that diagram and fuse the anyon line s into the lattice anyon lines. This is done by first doing an R move on the q − q − 23 b and r − 00 c − c vertices, then fusing s into a, then working our way around counterclockwise, then undoing the R-moves, all while tracking the domain walls. In the end, all unprimed lines (e.g. a) will be replaced with their double-primed counterparts (e.g. a ).
The final result is a product of four Rs, twelve F s, two ηs, five U s, two bending moves, and some factors of quantum dimension:    The sum over anyons is over all of the anyons that appear in the bra and ket in Eq. 139. Note that A bc a and B bc a are the bending moves defined in Eqs. (6) and (7) (not to be confused with the vertex and plaquette terms A v and B p ). One can check at this stage that when G is trivial, our model reduces precisely to the Walker-Wang model (in a slightly more general form than the usual presentation).
We have assumed in the above that the symmetry actions are unitary. To include both unitary and antiunitary symmetries, the above calculation can be repeated using the graphical calculus involving the data {F ,R,Ũ ,η} defined in Sec. IV. In this case the group elements (not just the domain walls) need to be carefully tracked. For example, in the graphical calculus derivation, the F -move producing the term F r rs u ur in F occurs in the g 0 domain. More generally this term should thus be replaced byF r rs u ur (g 0 ). The relation between the data with tildes and the data without tildes, Eqs. 84-87, determines whether the model will be symmetric under unitary or anti-unitary symmetry actions.

Cube term
The cube term D g c fluctuates the domain wall configuration by changing g i → gg i for g ∈ G. Schematically, this creates a domain wall of type g at cube c and fuses it into the domain wall configuration, as in P v |gg 0 g 0 |⊗ | g c, g r, g r , g , g u, g d c, r, r , , u, d| where e iφg is a phase factor which depends on nearby anyons and group elements in a way which we will determine shortly. Here P v projects onto the A v = +1 subspace of vertex v, ensuring that the fusion rules are satisfied. Although φ depends on more anyons and group elements, D g c acts diagonally on all anyons apart from c, r, r , , u, d and group elements apart from g 0 .
The result is obtained similarly to the plaquette term using diagrammatics. Since there are no anyon lines in the way, the g domain wall may be immediately fused into the front right corner of Fig. 14, where the g 01 , g 03 , and g 00 branch sheets meet. We then slide the domain wall around, crossing it over various anyon lines in the process.
The final result is One can check by a tedious computation that the D g c obey G multiplication rules, that is, Eq. (146) assumes that the symmetry actions are unitary. Just as for the plaquette operator, anti-unitary symmetry actions may be taken into account using the graphical calculus of {Ũ ,η} defined in Sec. IV, tracking the group elements carefully. It follows that, physically speaking, D g c implements the mapρ g defined in Sec. IV on all of the fusion and splitting spaces contained inside the domain c.
Recall that in Sec. IV we definedρ L g to always be a unitary map. If we instead considered a theory with an anti-unitaryρ L g , the operator D g c would need to be antiunitary, leading to a non-local Hamiltonian. Therefore, to allow for a local Hamiltonian, we requireρ L g to be unitary. We account for the possibility of anti-unitary symmetry actions by allowing the map α R g defined in Sec. IV to be anti-unitary.

C. Bulk properties
The graphical interpretation of the Hamiltonian terms make it clear that the (unnormalized) ground state wavefunction is where {g i } is a group element configuration on the cube centers, D is a braided fusion diagram in the presence of the domain walls for the configuration {g i }, and V (D) is the value of the diagram D evaluated by the usual graphical calculus. Since this ground state corresponds to the state sum constructed in Sec. III, the model is gapped and there is a unique ground state on a closed 3-manifold when C is modular. We do not know a general proof of this fact directly from the Hamiltonian formalism.
The model also has a global G symmetry where R (c) g is the right multiplication operator on cube c It is immediately obvious that R g R h = R gh . The symmetry action R g commutes with A v , B s p , and D g c . This follows immediately from the fact that A v , B s p , and D g c only depend on the domain walls, g ij and not on the g i individually. Note that the symmetry acts by right multiplication because the domain walls act on anyons by group elements of the form g ij = g i g −1 j . This action could be changed to make the symmetry act by left multiplication, but both the domain wall action on anyons and the interpretation of the D g c operator as fus-ing in a domain wall would be altered to be considerably less natural. It is straightforward to check that when R g has an antiunitary action, then the model is also symmetric when the modifications described in the preceding section for anti-unitary symmetry actions are made.

VIII. (2+1)D SURFACE TOPOLOGICAL ORDER
In this section, we explain how, with appropriate boundary conditions, the (2+1)D surface of our model realizes a symmetry-enriched topological phase where the topological order is described by the UMTC C and the symmetry fractionalization by the data {ρ, U, η} that was used to define the model.

A. G-symmetric boundary Hamiltonian
For concreteness we choose a boundary normal to the arrow of time direction (which we callẑ in this section) in Fig. 12b (strictly speaking the "time" direction is tilted slightly from the normal of the boundary to ensure that all links can be oriented in the positive "time" direction with no ambiguity). For the links in the trivalently resolved cubic lattice, choose smooth boundary conditions, where links which protrude above the surface are not included. In addition, we include the G degrees of freedom in the plane above the surface as well. This surface termination is shown in Fig. 15a, and the domain walls on the surface are shown in Fig. 15b.
The reason that we include the G degrees of freedom in the plane above the surface is so that the model possesses domain walls lying along theẑ direction at the surface. The anyon lines at the surface (which are orthogonal to theẑ direction) will then pierce these domain walls and then be acted on by the corresponding symmetry group elements. Note that, as discussed in the previous section, we have defined the model by deforming the domain walls downward so that the domain wall junctions are not coincident with the links of the lattice. If we had instead chosen to deform the domain walls upward, then we would not need the dangling G degrees of freedom at the surface, as domain walls that affect the anyon lines at the surface would already exist.
The surface Hamiltonian terms are obtained straightforwardly from the bulk terms by accounting for the erased links. Using the labelings of Fig. 15b, this amounts to removing any terms involving d and q from B p , setting v = 10 d, q = 32 b, and r = 05 (since those links are identified on the surface), and removing terms involving from D c . Explicitly, on the surface, we modify Eqs.
with E and U unmodified. The labelings are given in Fig. 15b.
It is not hard to check that the global G symmetry with generators R g given in Eq. (149) is still present with this choice of boundary conditions. The ground state wave function is still a superposition of domain walls and closed braided fusion diagrams, as in the bulk. Although it plays no role in the Hamiltonian or the ground state wavefunction, it will be useful to think of the domains as "closed" on top as if the vacuum is assigned to an identity domain; this is indicated by the blue sheet in Fig. 15b.

B. Surface topological order
Here we will see how the surface possesses deconfined anyon excitations, whose algebraic properties are described by the same UMTC C that was used to define the model.
In the case that G is trivial, the model reduces to the Walker-Wang model and the boundary conditions we consider are the standard smooth boundary conditions. It has been found 60 in that case that such a boundary has surface topological order described by the UMTC C that was used to define the theory. label domain walls (orange) and are determined by the G degrees of freedom, with the same numbering scheme for nearby cubes as in the bulk (see Fig. 13b, though the double-primed domains do not exist at the surface). Black lines are anyon lines and are oriented upward. The blue sheet is a fictitious domain wall between g0 and the vacuum; it plays no role in the Hamiltonian but is useful for defining string operators.

Definition of string operators
We now generalize the techniques from the Walker-Wang model to describe the string operator S k, a for our model, which creates a pair of topologically non-trivial excitations at the surface corresponding to the anyon pair a and a. Ignoring the group elements k and for the moment, the action of the string operators S k, a away from the string endpoints can be determined by following the graphical calculus for evaluating braided fusion diagrams. Consider an open string of type a far above the surface. Then, for a given configuration of domain walls and fusion diagrams, fuse that string into the braided fusion diagram, acting on it with any domain walls it passes through (and in particular acting with the blue domain wall in Fig. 15b). This process is shown in Fig. 16. The amplitude that relates the original configuration to the final configuration then gives the matrix elements of S k, a . This schematic is in principle sufficient to determine, using the graphical calculus, the action of the string operators S k, a everywhere except at the string endpoints, which is where the k and labels come in. To further fix the action at the endpoints, recall that, after the domain walls are resolved away from the anyon degrees of freedom, each vertex is contained in a cubical domain c, see Fig. 12b. Suppose that the string ends at the vertices v 1 and v 2 inside cubes c 1 and c 2 , respectively. Then we fix the local action of S k, a on the G degrees of freedom in c 1 and c 2 by declaring where P g c projects the G degree of freedom in cube c to the state |g . We will fix this local action a little bit more precisely in what follows but will not describe in more detail the string operators along the length of the string.
We claim that the S k, a commute with every term in the Hamiltonian that does not involve v 1 or v 2 , which implies that they create deconfined point-like excitations at their endpoints. This is obviously true for the vertex term A v . To see this for the B p operators, note that B s p is obtained by fusing in a loop labeled s into a plaquette, while the string operator is defined by fusing a string labeled by a from "above" the surface. Since the a and s strings are unlinked, the graphical calculus makes it clear that the order in which these are done does not affect the final result, which implies that the string operator must commute with B s p . Finally, the consistency of the graphical calculus ensures that the string operator commutes with the cube operators D c away from the endpoints since both D c and S k, a only involve sliding domain walls over anyon lines.
Consider now the state |ā, a; 1; 1, 1 = S 1,1 where the a-type string operator S 1,1 a stretching from vertex v 1 to vertex v 2 has been applied to the ground state |Ψ 0 . (The reason for the notation will be clear in the subsequent section.) Clearly this state has A vi = 0 where v 1 , v 2 are the string endpoints. Any plaquette p involving a v i and the cubes c i containing v i (recall that each vertex is contained in a single cube after the domain walls are shifted, see Fig. 12b) automatically obey

Excited state wavefunction
We now describe the wavefunction of |ā, a; 1; 1, 1 . We begin by applying S 1,1 a to the particular term in the ground state superposition where all of the group element degrees of freedom g i and all the respective anyon labels are the identity. This creates a string of anyon labels a from v 1 to v 2 , as shown in the first term in Fig. 17. This state will be referred to as a reference state from which we build the rest of the terms in the superposition that defines |ā, a; 1; 1, 1 . We fix a gauge where the reference state has amplitude 1, ignoring overall normalization. Obviously the reference state is not an eigenstate of the Hamiltonian; demanding that we are in an eigenstate of all the B p means that the wavefunction has nonzero amplitude for configurations which represent braided fusion diagrams with net anyon chargeā at v 1 and a at v 2 , and no other net anyon charge. The ratio of the amplitudes of any two such states is equal to the amplitude obtained when turning the first state into the second state by applying F − and R− moves to the braided fusion diagram. An example is given in the second term of Fig. 17.
We also want to demand that D c = 1 away from the endpoints of the string. We therefore must superpose over domain wall configurations, and the relative amplitude between the state with and without a given domain wall is related by nucleating and expanding the domain wall in the graphical calculus. Some examples are given in the last two terms of Fig. 17. Importantly, since S 1,1 a projects onto g 1,2 = 1, where g i is the G degree of freedom on cube c i , |ā, a; 1; 1, 1 only contains states where the cubes c 1 and c 2 contain identity group elements.

The surface realizes C
Next we want to check that the F and R symbols describing the algebraic properties of the deconfined surface anyons coincide with those of the UMTC C that was used to define the model. Here we discuss F explicitly; the argument for R is essentially identical.
We begin by defining an operator U e graphically: it creates a particular braided fusion diagram far above the surface, slides it through the surface domain walls, and fuses it into the bulk braided fusion diagram. We choose the braided fusion diagram where a, b fuse to e, e and c fuse to d, and finally d fuses withd to vacuum. This process is shown in Fig. 18a. The matrix elements between an initial configuration |ψ and U e |ψ is given by performing the appropriate graphical calculus in C with symmetry fractionalization. We may then suggestively name a state where we are ignoring all of the local degrees of freedom near the endpoints of the strings involved. Similarly, we can graphically define a different operator V f by fusing in a different braided fusion diagram; this diagram has b and c fusing to f , a and f fusing to d, then d andd fusing to vacuum. This is shown in Fig. 18b. We can then define a state Consistency of the graphical calculus demands that because we may always evaluate the fusion diagrams involved in calculating matrix elements of U e by performing an F -move first. Therefore the states obey (161) which justifies the names we have given the states; the point-like excitations which we have called a, b, c,d indeed obey the F -moves given by C. A precisely analogous argument holds for R-symbols; therefore the surface topological order is indeed given by C.
We also note that projectors P ωa onto fixed anyon sectors a inside a loop ω can be defined graphically. In C, such a projector is given by where W (ω) x is a Wilson loop operator (specifically a closed string operator) for x on the loop ω. We define P ωa  FIG. 17. Wavefunction of the state |ā, a; 1; 1, 1 . Black are anyon lines, orange are domain walls, G labels label domains. The first term is the "reference" state with an a-type string running from v1 to v2. The Hamiltonian term Bp causes fluctuations from the first and third terms to the second and fourth, while Dc causes fluctuations between the first two terms and the last two. graphically by taking this same superposition of Wilson loops and fusing them onto the surface (again passing through domain walls as necessary). It is clear from consistency of the graphical calculus that this definition will also justify our labelings of states; by choosing different ω, we can measure the fusion channels associated with different sets of anyons to be as we have claimed.

C. Surface symmetry fractionalization
Here we analyze the symmetry action on the surface topological order. Remarkably, we will see that the symmetry localization ansatz of Eq. (32) is realized exactly, along with the symmetry fractionalization relation of Eq. (33). Moreover, we also demonstrate how the symme-try fractionalization pattern on the surface is described by the same choice of {ρ, U, η} that was used to define the model.

Local degeneracy at anyons
First we note that each anyon at the surface carries a local degeneracy of |G| states. As we will see, this degeneracy is local in the sense that local operators in the vicinity of the anyon can distinguish the different states.
The origin of this degeneracy lies in the fact that the cube operators D c are by definition zero whenever the vertices contained in the cube have violations of the vertex operator A v . The string operator S k, a described in the previous section breaks the fusion rules at v 1,2 , that is, acting on the ground state it makes a state with A v1,2 = 0. If c i contains the vertex v i , then we have This is why the state |ā, a; 1; 1, 1 only contains states where the group label in the cubes c 1 and c 2 , at the endpoints of the string, is the identity. Next, let us define an operatorD g c,v , which is given by D g c , but with the phase factors of U involving the vertex v removed. For example, if there was an anyon at the vertex where w, w , and a meet in Fig. 13a, thenD g c would be defined by Eq. (146) with the factor U −1 g ( g w, gg 00 w ; g a) removed. It is clear by inspection thatD g c,v commutes with all A v , B p , D c for any vertex v , cube c = c, and plaquette p which does not contain v. Recalling that, for p containing v, B p = 0 on any state with A v = 0, this means thatD g c,v H|ā, a, 1; 1, 1 = HD g c,v |ā, a, 1; 1, 1 because A v |ā, a, 1; 1, 1 = 0. The model therefore has some degeneracy, but sincẽ D g c,v is local, the degeneracy is non-topological. Of course,D g c,v cannot change the net anyon type in cube c. Therefore, there are many eigenstates, related by local operators, which have the same anyon types at v 1 , v 2 . We label these states |ā, a; 1; k, . The labeling scheme is as follows:ā, a means that the (physical) anyonsā and a are present on the surface, the 1 means thatā and a are in the 1 fusion channel, and the labels k, mean that g 1 = k and g 2 = , where g 1,2 are the group elements on c 1,2 . We fix a gauge by defining |ā, a; 1; k, =D k c1,v1D c2,v2 |ā, a; 1; 1, 1 .
where |ā, a; 1; 1, 1 was gauge-fixed earlier. The state |ā, a; 1; k, is illustrated pictorially in Fig. 20a. Accordingly, we can define the string operators S k, a by where S 1,1 a is specified by Eq. (156). This implies that It is straightforward to check that the wave function of |ā, a; 1; k, is obtained in the same way as that of |ā, a; 1; 1, 1 in Fig. 17, but starting from a reference state where the anyons are surrounded by domain walls, as in Fig. 19a. There is a subtlety here that the reference state should not have phase 1; instead, as shown in Fig. 19b and more schematically in Fig. 19c, moving a string through the domain walls picks up a phase of ηā(k, k). This changes the wavefunction by a global phase and thus is simply a basis choice, but it does arise from our definitions of the string operators in Eq. (166). Importantly, the physical anyon type a cannot be changed by a local operator such asD c,v . However, sincẽ D c,v still acts on the anyon labels on the links in c, the anyon label along the string that ends at v 2 changes to a. Therefore, if in the wave function a string type labeled b ends at v 2 , then the physical anyon type at v 2 is a =ḡ 2 b, where g 2 is the state of the G degree of freedom in cube c 2 .
Note that the local degenerate state space at each anyon excitation on the surface forms a regular representation of G. In general such a representation is reducible, which means that the Hamiltonian should admit G symmetry-preserving perturbations that lifts this degeneracy. The understanding of the ground and excited states, and in particular the symmetry fractionalization analysis below, would then have to be modified, but the data that characterizes symmetry fractionalization should remain unchanged, up to possible gauge transformations.

Symmetry localization
For simplicity, we consider only simple states with two anyons a andā fusing to the identity; the generalization is straightforward.
We define the topological symmetry transformation ρ g |ā, a; 1; k, = U g ( gā , g a; 1)| gā , g a; 1; k, Obviously this map by definition obeys Eq. (26) with the original U that we input into the Hamiltonian. To show that we have the correct symmetry fractionalization pattern at the surface, we first need to show that the global symmetry action R g acts in a way according to Eq. (32), which we refer to as symmetry localization. Subsequently we must show that Eq. (33) is obeyed with ρ defined in Eq. (168) and with η given by the η that we input into the Hamiltonian. We compute R g |ā, a; 1; k, by examining the wavefunction. Consider in particular the terms |ā, a; 1; k, shown in Fig. 20a, where all of the group elements except for g 1,2 are either 1 or g. By our normalization and gauge fixing, the first term has amplitude ηā(k, k). By nucleating a domain wall of type g, as in the second term in Fig. 20a, and expanding it, we eventually reach the third term, picking up various U s and ηs as the domain wall expands. Now apply the symmetry operator R g to |ā, a; 1; k, , which right-multiplies all group elements byḡ but does not change any link labels. The result is shown in Fig. 20b.
Separately, we may compute the wavefunction for the state | gā , g a; 1; kḡ, ḡ ; this is shown in Fig. 20c. Comparing Figs. 20b and 20c term-by-term and using the  19. (a) Wavefunction of the state |ā, a; 1; k, . Blue are anyon lines, orange are domain walls, G labels label domains. The first term is the "reference" state with an a-type string running from v1 to v2. The Hamiltonian term Bp causes fluctuations from the first and third terms to the second and fourth, while Dc causes fluctuations between the first two terms and the last two. The anyon labels label the string type as it intersects the surface, not the physical anyon labels; the physical anyons arē a and a at v1 and v2, respectively. (b) Side view of the surface showing that moving a string (black) through the domain walls generates the phase ηā(k, k) appearing in the reference configuration (first term) in Fig. 19a. There is also a factor of ηa(1, ) which we have gauge-fixed to 1. View is similar to Fig. 15a. Blue spheres are group elements, all of which (in this configuration) are in the state |1 except for the labeled ones inside the domain walls (orange). Green spheres are anyons on the end of the string. (c) Same as (b), but projected into the plane of the page. Floating group elements label the domains.
consistency conditions for U and η, we find that R g |ā, a; 1; k, = ηgā(g,k)ηg a (g,¯ )× × U g ( gā , g a; 1)| gā , g a; 1; kḡ, ḡ where we have defined the local operators U (vi) g as they act on a state with anyon a i at v i by where h labels the degree of freedom on the cube c i containing the vertex v i . The topological part of the symmetry action ρ g that was previously defined has indeed appeared in the actual global symmetry action of the model, and the remaining factors decompose into local factors U (vi) g , as expected.

Symmetry fractionalization
Verifying Eq. (32) is now a matter of straightforward computation. Using Eq. (35): FIG. 20. Some terms in the wavefunctions for symmetry-related excited states on the surface of our construction. The view is from the side in the same schematic picture as Fig. 19c. Grey indicates the bulk. Colors indicate G domains labeled by the "floating" group labels; unlike in Fig. 19c, we have used different colors for different domains. The anyon labels kā and a label the string type which terminates at that point; the black string changes type when it passes through a domain wall.
As a technical aside, our definition of ρ g is not invariant under independent basis rotations of the local degrees of freedom in different anyon sectors. For a simple example, we could modify the states |ā, a; 1, k, with a kor -dependent phase. Such basis changes yield surface fractionalization with data that is gauge-equivalent but not identical to a given choice of η and U that defines the model.
(175) Following the same argument, the anti-unitary operator  Fig. 20 are thus expressed in terms of the data with tildes, but using G-equivariance, they can be converted to the physical U and η data via Eqs. (84)-(87).

IX. GENERALIZATIONS: SPATIAL SYMMETRIES, CONTINUOUS, INFINITE G
So far we have defined models that possess an internal, on-site symmetry action, which may be unitary or anti-unitary. Furthermore, the state sums defined in the previous sections require finite, discrete groups. Here we briefly discuss the generalizations of the construction to spatial (crystalline) symmetries, and to continuous and/or infinite symmetry groups.
A. Infinite and/or continuous G When G is compact and continuous (and for simplicity of this discussion connected), there is a natural generalization of our state sum obtained by replacing the sum over group element labels by integrals, 1 i∈T 0´dgi , where vol(G) =´dg i is the volume of G and N 0 is the number of 0-simplices. The integration measure is then taken to be the Haar measure on G. We note that such a construction necessarily still defines a G SPT due to the G translation invariance of the measure. Therefore our construction yields topologically invariant path integrals on non-trivial flat G bundles for continuous G as well. Our Hamiltonian construction furthermore also goes through straightforwardly as well.
For infinite discrete G we can define the state sum as a limit of a sequence of finite discrete groups that approach G in the limit. However, if our conjecture in Sec. III is true, then the above modifications are actually all unnecessary, and our construction naturally gives a concrete way to compute the path integral on any flat G bundle regardless of whether G is infinite, continuous, or compact.
We note that our discussion of obtaining cohomology invariants in Sec. V A applies only to finite groups; therefore some other method would be required to find cohomology invariants for the case of infinite or continuous G.

B. Spatial symmetries
Given a symmetry group G, it is possible that certain elements of G are spatial symmetries, meaning that they act on the quantum system by some combination of translations, rotations, and reflections in space. Here we briefly discuss some issues in incorporating such symmetries into our discussion. There are three aspects to the discussion, which we will briefly address: 1. Classification of spatial symmetry fractionalization and anomaly computations 2. Path integral construction 3. Hamiltonian construction: boundary and bulk symmetries

Classification of spatial symmetry fractionalization and anomaly computations
First, let us consider classification of symmetry fractionalization and anomaly computations. It is expected that the classification of symmetry-enriched topological phases with spatial symmetries is identical to the case with internal symmetries, where spatial parity reversing symmetries are treated as anti-unitary symmetries. This expectation has already received strong direct supporting evidence from studies of SPT states [21][22][23] and from the understanding of the relation between Lieb-Schulz-Mattis theorems and mixed anomalies between translation and on-site symmetries. 24 Therefore, the same data that characterizes symmetry fractionalization and the same anomaly calculations are expected to hold even in the case of spatial symmetries.
The general reason for this expectation is as follows. The low energy universal properties of these SET states is described by a TQFT enriched with a G symmetry. The TQFT always has a diffeomorphism symmetry, which in particular includes the isometries of space. Any spatial symmetry of the microscopic Hamiltonian can then be taken to correspond to a combination of an internal symmetry in the field theory together with an isometry of the space. Stated differently, one can consider a combination of the spatial symmetry of the microscopic Hamiltonian, followed by an isometry of space in the field theory, which then leads to an internal symmetry acting in the field theory. Examples where the above logic is borne out are prevalent throughout the literature regarding effective quantum field theories describing quantum many-body systems. Thus classifying different ways of incorporating internal symmetry in a TQFT should also give the classification of spatial symmetry enriched topological phases of matter.

Path integral construction
The state sum for the path integral proceeds by choosing a triangulation and a branching structure. Therefore we can consider triangulations and branching structures that are invariant under a space-time symmetry G s of interest. For example, one can consider a space-time manifold M 4 = W 3 ×S 1 , and one can consider a triangulation and branching structure that reduces on W 3 to a particular (finite) space group symmetry of interest. In this case, the amplitudes that are summed over in the path integral possess a G × G s symmetry. If we pick G such that G s ⊆ G, then we can consider the diagonal group elements of the form (g, g) ∈ G × G s , where g ∈ G s ⊆ G. Then we can consider any type of space group symmetry fractionalization, and the path integral will possess the space group symmetry.
Alternatively, one can consider a 4-manifold with boundary such that W 3 = ∂M 4 has a triangulation and branching structure associated with the space group symmetry of interest. We can take the triangulation of M 4 to correspond to just adding a single "bulk" 0-simplex to which all 0-simplices in the triangulation of W 3 are connected. The resulting wave function will be symmetric under G × G s , and again as in the previous paragraph we can consider the diagonal action (g, g) ∈ G × G s for g ∈ G s ⊆ G.
Therefore, the path integral construction can be easily extended to space group symmetries for which there is a triangulation and branching structure that preserves the space group symmetry. It is an interesting question whether a symmetric triangulation and branching structure exists for any given space group symmetry.

Hamiltonian construction
Our Hamiltonian construction in general picks a preferred direction to correspond to an "arrow of time" in evaluating the braided fusion diagrams. As such, our Hamiltonian construction, while it preserves lattice translational symmetries, in general breaks point group symmetries. It is a non-trivial question whether our general construction can be modified to allow space group symmetries in general.
It may be possible to consider certain classes of UMTCs that are invariant under changing the "time" direction. This seems to be a generalization of the "tetrahedral" symmetry of fusion categories to a higher dimensional version, which we may term "hypertetrahedral" symmetry. UMTCs that possess such a symmetry and which have self-dual anyons will then give Hamiltonians that are independent of the chosen "time" direction and any orientations on the edges. While the trivalently resolved cubic lattice is still incompatible with point group symmetries, we expect it is possible to consider Hamiltonians on other trivalent lattices, or to use certain gadgets that allow for sites with more than three edges, that would be compatible with any given space group symmetry.

Spatial reflection symmetries mapping to anti-unitary internal symmetries
Here we consider spatial reflection symmetries in the path integral construction and demonstrate how they can be captured using the anti-unitary on-site action. We leave for future work to study spatial reflection symmetry in the Hamiltonian formalism, and in particular to understand spatial reflection symmetry fractionalization in the (2+1)D surface SET in the Hamiltonian construction.
Accordingly, suppose that G contains symmetries that reverse spatial parity. For simplicity, we choose to examine a pure reflection r, but the following discussion holds for any unitary parity-reversing element of G. Since r acts unitarily on the wavefunction but changes the locations of vertices, the desired G-action on the wavefunction is a modification of Eq. (61): where, as a reminder, the {g i }, {a ijk }, {b ijkl } are the degrees of freedom on ∂M 4 , and i, j, k, l label boundary vertices. The notation r(i) means the image under spatial reflection of the vertex i. This is not enough to determine the consistency equations for the objects that appear in the state-sum. In order to do so, we need to understand the way that group multiplication by r acts onsite. We claim that where there is no group multiplication. To see this, note that under the action of reflection, every 4-simplex ∆ 4 changes its orientation. If the data associated to the 4-simplex remains unchanged, this orientation reversal simply complex conjugates the corresponding amplitude Z ± (∆ 4 ). Eq. (178) therefore follows. Combining Eq. (178) and (177), we find This is exactly the same as Eq. (79); that is, the onsite action of a parity-reversing symmetry should be antiunitary, despite the fact that the global action is unitary. The rest of the derivation following Eq. (79) therefore holds for parity-reversing symmetries as well, provided the definition Eq. (19) of σ(g) is reinterpreted to refer to the (anti-)unitarity of the onsite action of g. In particular, we should be choosing anti-unitary α h despite the unitarity of the overall symmetry action.
Repeating the above argument for g ∈ G which is both anti-unitary and spatial parity-reversing, we find that g should have a unitary onsite action as in Eq. (61).

X. DISCUSSION
We have shown how the symmetry fractionalization data determines a (3+1)D SPT, and thus determines an element [S] ∈ H 4 (G, U (1)). As we have discussed, it is also known that there is an obstruction [O] ∈ H 4 (G, U (1)) in defining a G-crossed braided tensor category from a given symmetry fractionalization class. In mathematical terms, there is an obstruction [O] ∈ H 4 (G, U (1)) in lifting a categorical G action to a Gcrossed braided tensor category. It is clear on physical grounds that [S] = [O], since we physically understand the presence of a non-trivial bulk (3+1)D SPT as an obstruction to defining a consistent theory of symmetry defects purely at the (2+1)D surface. On mathematical grounds, we expect that the categorical G action defines a single element of H 4 (G, U (1)), not two distinct elements. Nevertheless, to have a complete mathematically rigorous theory, we must prove that [S] = [O], which we leave for future work.
While we have given a concrete general method to compute the anomaly, there are still many interesting and important directions left for further study. For example, it would be interesting to understand "anomaly in-flow" in these models. That is, to understand precisely how processes on the surface give rise to inconsistencies that are canceled by the bulk SPT. Along these same lines, it would be interesting to understand how to extract a 4-cocyle through consideration of certain processes in the (2+1)D surface theory in a way which would not require a complete computation of the path integral on closed 4-manifolds with non-trivial G-bundles.
A related issue is to make contact between the results here and the relative anomaly formula derived in Ref. 38. It was conjectured in Ref. 38 that the relative anomaly obtained there could be canceled by a bulk (3+1)D SPT. The bulk construction provided here should in principle provide a way of demonstrating this explicitly, however we have not pursued this direction here.
As noted in the main text, while our state sum requires a sum over group elements, we conjecture that every term in the sum over group elements is identical, and therefore that the sum over group elements is actually not required. The G action would therefore enter only through the presence of non-trivial G holonomies along non-contractible cycles of the space-time manifold. It would be useful for practical computations to prove this rigorously.
While we have presented our construction in terms of an explicit state sum associated with a triangulation of the space-time manifold, we expect that there should be an alternative formulation where the path integral on arbitrary space-time manifolds and G bundles can be ob-tained by gluing together path integrals on simpler manifolds via a handle decomposition. Such a formulation was developed for the Crane-Yetter state sum (i.e. the case where G is trivial) in Ref. 26. The extension to non-trivial G would require, for example, defining a vector space for 3-manifolds equipped with G bundles via skein modules on G bundles. A simple version of such a formulation for the case of Z 2 space-time reflection symmetry was used in Ref. 31 for computing path integrals on non-orientable manifolds. Such constructions could lead to more efficient ways of computing anomaly indicators, and we leave them for future work.
It is clear that similar ideas should hold in all dimensions. Symmetry fractionalization in general d dimensional TQFTs with G symmetry should define a dcategory where the objects (0-morphisms) correspond to group elements of G, and there is a G action on the dcategory. This d-category should then define a (d + 1)dimensional state sum for a G-SPT, which then can be used to compute the anomaly. We note that initial steps for computing anomalies in (3+1)D by defining a (4+1)D path integral have already been taken in some simple cases. 43 Finally, we note that our Hamiltonian constructions explicitly break most spatial symmetries. It would be interesting to develop constructions that preserve any given spatial symmetry. However we note that even the simpler Levin-Wen models for (2+1)D topological orders (and Walker-Wang models for (3+1)D topological orders) have not been generalized to take as input arbitrary unitary (braided) fusion categories in a way that is compatible with point group symmetries on the lattice. left-and far right-hand sides of Fig. 21a, where the intermediate equalities are the proof of the merging lemma. The first two equalities follow from the usual UMTC diagrammatic equation where we have been implicitly assuming N c ab ≤ 1 for all a, b, c. Conservation of total anyon charge means that in the third diagram, the only nonzero term occurs when z is the identity, producing the last equality.
We then use this first merging lemma to prove a second, shown in Fig. 21b.
With these lemmas in hand, we can prove invariance under the 3-3 Pachner move. Given five vertices 0, 1, 2, 3, 4, 5, a 3-3 Pachner move takes the 4-simplices 01234, 01245, 02345, all positively oriented, to the 4simplices 01235, 01345, 12345, also all positively oriented. In doing so, the 2-simplex 024 is replaced by the 2simplex 135 and the 3-simplices 0124, 0234, 0245 are replaced by the 3-simplices 0135, 1235, 1345. Our aim is to show that Our aim will be to use the merging lemmas in Fig. 21 to perform the sums on 024, 0124, 0234, and 0245 in Eq. (A2). In order to do so, both diagrams should involve, say, 54 0124, but as naturally written, the diagram for 01234 involves 0124 and the diagram for 01245 involves 54 0124. Hence, we sweep a g 54 domain wall through the diagram for 01234 as shown in Fig. 22. By the consistency of the graphical calculus, we may evalu-ate the diagram either before or after this sweeping process; as long as we account for all of the factors of U 54 or U −1 54 which arise in the sweeping process, the value of the diagram is unchanged. At the algebraic level, this process simply transforms all of the F -and R-symbols in the explicit formula Eq. (42) for Z + (01234) by g 54 using the consistency condition Eq. (27). The proportionality factor x in Fig. 22 (34,45) (A5)

RHS
Laborious but straightforward use of the consistency conditions Eqs. (34) and (35) demonstrates that the symmetry factors on the LHS and the RHS are now equal.
Canceling these symmetry factors reduces each side of Eq. (A2) to of a product of three diagrams with no domain walls or symmetry factors. We define where N L,R do not involve quantum dimensions of any of the summands in Eq. (A2). We can now do graphical calculus to demonstrate the equality of those products of diagrams, as shown in Figs. 23 and 24. Careful examination of the final diagrams shows that both the diagrams and normalization factors are indeed equal, proving Eq. (A2).

Independence of fusion channel on 3-simplices
In defining our path integral, we made an arbitrary choice of fusion channel for the data on the 3-simplices. Suppose we change the fusion channel; we wish to show that the path integral is unchanged. On a closed manifold, each 3-simplex appears in exactly two 4-simplices with opposite induced orientation. For concreteness we focus on the 3-simplex 0123 which, again for concreteness, we suppose is in the 4-simplices 01234 (+ orientation) and 01235 (-orientation). We define the unitary One can check that where F ceb f is the usual F -symbol, although this form does not make the unitarity of F ab cd manifest. It can also be checked that would appear if we had chosen to construct the path integral using the new fusion basis for the 3-simplex 0123. Therefore the choice of fusion channel does not affect the partition function for a closed manifold. The same is true for an open manifold if the 3-simplex is not on the surface. If the 3-simplex is on the surface, then there is no cancellation; instead the amplitude in the wavefunction of the initial configuration is related to the amplitude of the final configuration by an F -symbol, which is as expected.

Independence of deformation of 3-simplex data
We also chose a particular deformation of the data on the 3-simplices towards 0-simplices, as in Fig. 2(c). Suppose that instead of deforming a 3-simplex, call it 2345, towards g 5 , we deformed it towards g i instead, where i = 2, 3, or 4. Our claim is that the term in the state sum with data b 2345 on 2345 in the original deformation is equal to the term in the state sum with i5 b 2345 on spacetime manifold, then 2345 appears in exactly two 4simplices ∆ 4 1 and ∆ 4 2 , one with each relative orientation. Hence, for every term in the state sum, the above factors coming from ∆ 4 1 and ∆ 4 2 cancel out, and the state sum is unchanged. If 2345 is on the surface, then the aforementioned phase factor is the relative amplitude in the wavefunction between two states where the braided fusion diagrams labeling the state differ by sliding the appropriate domain walls over anyon lines, which is as we expect.

Independence of deformation of 2-simplex data
Another choice was a deformation of the 2-simplex data towards a 0-simplex. Consider a 2-simplex 234. For simplicity of presentation we assume there are no vertices m such that the branching structure orders 2 < m < 3 or 3 < m < 4; this assumption may be relaxed at the cost of checking a few extra cases in what follows. Suppose that we deformed 234 towards g j for j = 2 or 3 instead of towards g 4 . We relate the term in the newly deformed state sum with i4 a 234 on the simplex in question to the term in the old deformation with a 234 .
Let us examine each 4-simplex ∆ 4 n which contains 234, where n enumerates all such 4-simplices. There are three possibilities for ∆ 4 n ; without loss of generality, ∆ 4 n can be labeled 01234, 12345, or 23456, where all that matters is whether the additional vertices are smaller than 2 or larger than 4. For each of these three cases one can determine the ratio of the amplitudes Z(∆ 4 n ; a 234 ) and Z (∆ 4 n ; i4 a 234 ) with the old and new deformations, respectively. The portions of the diagrams which differ for each of these cases are shown in Fig. 27. Graphical calculus shows Of course, the 4-simplex ∆ 4 n always contains exactly two 3-simplices ∆ 3 n;m which involve 234, where m enumerates the two 3-simplices. Each 3-simplex is labeled either ∆ 3 n;m = m234 or 234m for some m. Define Then we see that Eq. (A15) can be rewritten where the product is over all 3-simplices in ∆ 4 n containing 234 and (∆ 3 n;m ; ∆ 4 n ) is the orientation of ∆ 3 n;m induced by ∆ 4 n . But every bulk 3-simplex appears in exactly two 4-simplices with opposite induced orientations. Since ζ depends only on the 3-simplex labels, it is now clear that the bulk factors of ζ all cancel pairwise, that is, for a closed manifold, n Z (∆ 4 n ; i4 a 234 ) Z(∆ 4 n ; a 234 ) = 1 (A18) Therefore, the two terms in question in the state sum are equal, as desired.

Independence of branching structure
In Ref. 34, Cui proves the invariance of a closely related TQFT under changes of branching structure. The proof constructs, for each configuration in the state-sum with the original branching structure, a corresponding configuration in the state-sum with the new branching structure, then shows that the amplitude associated to that configuration is the same with both branching structures. The construction and proof are rather involved, but apply mutatis mutandis to our state-sum. We therefore do not reproduce the proof here.

Gauge invariance under vertex basis gauge transformations
Consider a basis transformation on the fusion or splitting spaces given by a unitary map Γ ab c : V ab c → V ab c . Our claim is that on a closed manifold M , the path integral is invariant under this basis transformation. On a closed manifold, each 3-simplex appears twice, once with positive orientation and once with negative orientation. Hence, for a fixed term in the state sum, each fusion vertex (say, the fusion vertex associated to a positively oriented 3-simplex) will appear exactly once and its dual splitting vertex (say, the splitting vertex associated to the same 3-simplex with opposite orientation) will also appear exactly once. Let Z(M ; {a, b, g}, µ, ν) be the path integral amplitude with fixed anyon and group data, but we place the splitting vertex in the state µ and the fusion vertex in the state ν. The gauge-transformed path integral involves sums over the terms with µ = ν, so we compute that sum: where the prime indicates the gauge-transformed amplitude. The final expression is exactly the same amplitude in the original gauge, which demonstrates the desired equality.
On an open manifold, these gauge transformations on bulk 3-simplices cancel in the same way. The gauge transformations do not cancel on surface 3-simplices, but instead transform the wavefunction in the expected way.
In the presence of anti-unitary symmetries, the gauge transformation rule needs to account for the group elements; the gauge transformation takes the form where the hat refers to the gauge-transformed state and the abc fusion vertex is in domain g. Demanding Gequivariance of the gauge transformations, we find where the last equality defines the shorthand Γ ab c . Using this object, the above argument for gauge invariance of the path integral goes through exactly on an orientable manifold.
On an unorientable manifold, in order to define the path integral, as described in Sec. IV, we should cut open the manifold to obtain an orientable open manifold. For any 3-simplex which does not lie entirely on the cut, the argument goes through as above. However, on the cut, we identify the data on two 3-simplices with the same relative orientation. The key difference is that the group elements on the vertices of those two 3-simplices are twisted by an anti-unitary group element h. That is, if 0123 is a 3-simplex lying on the cut and has positive induced orientation, then 0123 appears in two diagrams in the path integral shown in Fig. 28. These two diagrams pick up the gauge transformatioñ where we have used the fact that σ(h) = * . Hence the path integral remains gauge-invariant. The fact that the boundary conditions for the group elements are twisted by a group element h with an anti-unitary action is what ensures that the path integral is gauge-invariant on an unorientable manifold.

Gauge invariance under symmetry action gauge transformations
Gauge transforming the symmetry action changes the way that the global symmetry action factorizes into its topological and local parts according to Eq. (32). Given an anyon diagram with domain walls, the gauge transformation changes the diagram by a phase γ a (g) for every crossing of a domain wall of type g with an anyon a as shown in Fig. 29a, where checks over diagrams represent the gauge-transformed diagram. We presently check that our state-sum is invariant under this transformation.
It is straightforward to check by inspecting Fig. 4 that the amplitudes Z ± for a 4-simplex, each crossing of a domain wall over an anyon line in the full diagram can be associated to a 3-simplex, i.e. the set of crossings on the left-hand-side of Fig. 4 is in correspondence with the crossings on the right-hand-side. Using the diagrammatic rules in Fig. 29a, we see that the crossing in a 3-simplex ijk (here i, j, k, label vertices) appearing in a 4-simplex ∆ 4 picks up a factor of γ (ijk ;∆ 4 ) ijk (g k ) under gauge transformations, where (ijk ; ∆ 4 ) is the orientation of ijk induced by the 4-simplex ∆ 4 . Since, on a closed manifold M , each 3-simplex appears in two 4simplices, each leading to opposite induced orientation, the factors of γ all cancel out in computing a single term of the path integral on M . Hence the path integral on a closed manifold is gauge invariant.
On a manifold M with boundary, the gauge transformations of crossings associated to bulk 3-simplices still cancel out. However, gauge transformations of crossings involved in surface 3-simplices do not cancel. Instead, they modify the wave function by changing the value of the wave function to match the gauge-transformed value of the closed anyon diagram on the boundary of M , as expected.
In the presence of anti-unitary symmetries, we should modify the gauge transformation rules Fig. 29a to those in Fig. 29b, which allows us to define the shorthand objects γ a (g ij ) by the equatioñ With this definition, the only difference is that the crossings in a 3-simplex pick up the gauge transformation factor γ ( (ijk ;∆ 4 )×σ(c) ijk (k ). On an orientable manifold, the above argument carries through straightforwardly.
On an unorientable manifold, we consider the same setup discussed in the previous section on vertex gauge transformations. For 3-simplices which do not lie entirely on the cut, the argument for the unitary case goes through, mutatis mutandis. For a 3-simplex 0123 on the cut, its two appearances are, as before, shown in the diagrams in Fig. 28. These two diagrams pick up the gauge transformation factorsγ 012 (g i , g j ) andγ 012 (g i h, g j h) = γ 012 (g i , g j ) respectively, where h is some anti-unitary group element. But σ(h) = * , hencẽ γ 012 (g i , g j )γ 012 (g i h, g j h) =γ 012 (g i , g j )γ 012 (g i , g j ) * = 1 (A26) Hence the path integral is gauge-invariant, even on an unorientable manifold. As for the vertex transformations, this gauge invariance fundamentally requires that the boundary conditions for the group elements are twisted by a group element h with an anti-unitary action.

Mirroring 3-simplices about the vertical axis
Our path integral is built by assigning a fusion diagram to the 3-simplex 0123, corresponding to the process 013 ⊗ 123 → 023 ⊗ 32 012. Mathematically this corresponds to an element of b V b 013,123 ⊗ V 023, 32 012 b (or, in the category theory terminology, this corresponds to an element of the Hom space Hom(013 ⊗ 123, 023 ⊗ 32 012)). Given an orientation of the 3-simplex, the 2-simplices 013 and 123 have the same induced orientation, which is why 013 and 123 both appear in the domain (or codomain, for the opposite orientation of the 3-simplex) of this process. However, it is not a priori clear why we should not mirror the entire diagram about the vertical axis when constructing the amplitudes associated to 4-simplices; that is, use Hom(123 ⊗ 013, 32 012 ⊗ 023) instead.
We claim that on a closed manifold, the path integral is invariant under this mirroring, provided that the over/under-crossing in the diagram is also changed. That is, constructing Z + using the diagram in Fig. 30(a) yields the same path integral as in Fig. 30(b), and likewise Figs. 30(c) and (d) would yield the same path integral on a closed manifold.
Note that mirroring the diagram about the vertical axis and changing the over-to under-crossing is equivalent to rotating the entire diagram about the vertical axis by π. Thus another way of stating the result is that the path integral is invariant under rotating the diagrams associated with all 4-simplices by π around the vertical axis.
The idea of the proof is the following. Start with Fig. 30(a) and shrink the domain walls, evaluating the symmetry factors as appropriate. Next, slide all of the 3-simplex lines into their positions in Fig. 30(b). This introduces many twists into the diagram. Then, remove those twists with R-moves. Finally, reintroduce the domain walls as appropriate; this produces, after some isotopy, Fig. 30(b). The whole process introduces a factor of R ab c for each fusion space and a factor of R ab c −1 for each splitting space in the diagram (use of the consistency of U and R moves is required for the 0123 vertex inside the domain walls). Since each 3-simplex appears once with each orientation in a closed manifold, each vertex appears once as a fusion vertex and once as a splitting vertex. Hence the R-moves cancel. On a non-orientable manifold, we consider, as usual, cutting the manifold to produce an orientable one. For all 3-simplices away from the cut, the above argument works identically. The only difference is for 3-simplices on the cut, which appear once on each side of the cut with the same induced orientation. However, there is a twist of the group elements on both sides of the cut; the 3-simplex lives in domain g on one side and gh on the other side, where σ(h) = * . Hence we pick upR ab c (g)R ab c (gh), which still cancels out by the G-equivariance of the R-symbols.

Changing over-crossing to under-crossing
In this section, we discuss changing the crossing in the diagrams defining our state-sum (Fig. 4) from an overcrossing to an under-crossing.
This crossing is the source of the factor of R in the explicit formulas Eqs. (42) and (43), and it is easy to check that changing the crossing replaces R ab c by R ba c −1 . By inspection of the consistency conditions for BTCs and symmetry fractionalization, if the data F, R ab c , U, η defines a consistent BTC C 1 with symmetry fractionalization, then the data F, R ba c −1 , U, η also defines a con- sistent BTC C 2 with symmetry fractionalization. Therefore, changing the crossing interchanges the path integrals for these two theories.
The modular S and T matrices, where T is a diagonal matrix with clearly obey T 2 = T * 1 , S 2 = S * 1 where S i , T i belong to the BTC C i .
It immediately follows that, on a closed manifold, the Crane-Yetter invariant for C 1 and C 2 are complex conjugates. This is because for a UMTC C, for the Crane-Yetter invariant. Here σ(M 4 ) is the signature of the closed 4-manifold M 4 and c is the chiral central charge given by For our state sum with the G symmetry action, it is less clear to see directly from the path integral what happens when we replace R ab c with [R ba c ] −1 and thus effectively interchange C 1 with C 2 . We will prove (subject to a mild additional assumption) that when the input to our state sum is a UMTC, this interchange complex conjugates our path integral. The technique is indirect, using the relative anomaly formalism of Ref. 38, but the result is borne out in the examples that we study in Sec. VI and also the example of G = Z 3 × Z 3 with the unique rank 3 Abelian UMTC with Z 3 fusion rules.
The method of proof is to show that, given two fractionalization classes given by data F, R ab c , U, η (1) and F, R ab c , U, η (2) , the path integral on any closed 4manifold M (with a general background G gauge field) obeys (A30) Rephrased in terms of anomalies, we wish to show that the anomaly of F, R ab c , U, η (2) relative to F, R ab c , U, η (1) is the inverse of the anomaly of F, R ba c −1 , U, η (2) relative to F, R ba c −1 , U, η (1) .
Under the additional assumption that some nonanomalous class exists for any U , setting η (1) to the nonanomalous class proves the desired equality, since on any manifold a non-anomalous SPT has Z = 1.
In general, different fractionalization classes form an H 2 (G, A) torsor 6 , where A is the set of Abelian anyons in the theory. That is, given any two fractionalization classes F, R ab c , U, η (i) for i = 1, 2, there exists t(g, h) ∈ H 2 (G, A) such that where M ab is the double braid defined in Eq. (15). The anomaly [O] ∈ H 4 (G, U (1)) of F, R ab c , U, η (2) relative to F, R ab c , U, η (1) is 38 × F t(ghk,l),t(gh,k),t(g,h) F t(g,hkl), g t(hk,l), g t(h,k) F t(gh,kl),t(g,h), gh t(k,l) × × F t(ghk,l),t(g,hk), g t(h,k) F t(g,hkl), g t(h,kl), gh t(k,l) F t(gh,kl), gh t(k,l),t(g,h) * In what follows, the factors of U and F will be unchanged throughout, so we suppress all of their arguments. We now reinterpret O as a relative anomaly between theories with the R-symbol R ba c −1 . Since t(g, h) is Therefore, according to Eq. (A31), Setting x = gh t(g, h) and substituting into Eq. (A32), we obtain Explicitly, where the last equality follows from Eq. (A34). Hence η = η (1) . Furthermore, since relative anomalies form an Abelian group, the anomaly of In Sec. V, we constructed sets of cohomology invariants for H n (G, U (1)) using the Smith normal form of a matrix version of the coboundary operator. In this appendix, we demonstrate that those invariants fully characterize the cohomology group. That is, following the notation in Sec. V In the following, when no ambiguity results we will abuse terminology slightly by using "cochain" (and "cocycle", etc.) to interchangably mean either a function ω : G n → U (1) or its "vectorized" form v, where v is a real-valued vector of length |G| n defined modulo integers.
Recall first that n-cocycles are vectors which satisfy Eq. (100). Treating M n as a map between vector spaces over R, it follows that all elements of ker M n are cocycles, but not all cocycles are in ker M n . However, all n-coboundaries are in im M n−1 (modulo the integer ambiguity).
Next we claim that ker M n = im M n−1 .
To see this, note that by construction, M n is the matrix of the coboundary map for H n (G, R). (Note that M n is an unambiguously defined integer matrix, while vectors which represent cocycles over U (1) are only defined modulo integers.) Hence, generators of ker M n /im M n−1 correspond to generators of H n (G, R). The latter, however, is known to be trivial for any finite group G for n > 0; that is, ker M n /im M n−1 is trivial, which proves Eq. (B2). One way to prove this latter fact is to use the universal coefficient theorem, which, for present purposes 61 , states that 62 H n (G, R) = Hom(H n (G, Z), R) ⊕ Ext(H n−1 (G, Z), R) where H k (G, Z) are the homology groups of G, Hom(H 1 , H 2 ) is the group of homomorphisms from H 1 to H 2 , and Ext is the Ext functor, whose detailed definition we do not need here. The important properties of Ext are that, for any finitely generated groups G 1 , G 2 , and Abelian group H, 62 Ext(G 1 ⊕ G 2 , H) = Ext(G 1 , H) ⊕ Ext(G 2 , H) (B4) Ext(R, H) = 0 (B5) Ext(Z k , H) = H/kH (B6) Using the fact that R/kR = 0, it follows that Ext(H n−1 (G, Z), R) = 0. Further, homology groups for n > 0 over Z are finite 63 , so by inspection Hom(H n (G, Z), R) is trivial. Thus H n (G, R) = 0, as claimed.
We now claim that if two cocycles have the same invariants I i as defined in Eq. 104, then they differ by an element of im d n−1 ; that is, they are in the same cohomology class. This is enough to prove equality in Eq. (B1).
Let v and w be two cocycles (over U(1)) with identical I i for all i. Then for each i with D ii > 0, where this equation defines n i . Since B has an integer inverse, Recalling that v is ambiguous up to an integer vector, we can freely replace v → v − ∆v without changing the cocycle. We now claim that, as a strict equality (over the reals), This is readily verified by computation of (M n ∆v) i = j,k, |D >0 In the third line, we were free to extend the sum over because the summand is zero when D = 0 anyway, and we substituted the definition of n i . Hence (v − ∆v) − w ∈ ker M n . But we showed earlier that ker M n = im M n−1 Hence the cocycles represented by v and w are in the same cohomology class. This means that our invariants I i distinguish all cohomology classes; that is, In this appendix, we give a general procedure for cellulating M × S 1 , where M is a manifold of arbitrary dimension with a known cellulation. We then apply this procedure to some particular cases of M to obtain cellulations used elsewhere in the paper.
We start with the case where M consists of disjoint d-simplices. Start with a 0-simplex, i.e. a single vertex 0. Obviously a point times S 1 is just S 1 , which can be cellulated with a single 0-simplex 0 and a single 1simplex. For later purposes, imagine first adding a 0simplex 0 and a 1-simplex 00 , then identifying 0 ∼ 0 , as shown in Fig. 31a. Now cross a 1-simplex, labeled 01, with S 1 . As shown in Fig. 31b, for each of the original 0-simplices 0 and 1, we repeat the procedure for crossing a 0-simplex with S 1 ; add "primed" vertices 0 and 1 and 1-simplices 00 and 11 . Next, for the 1-simplex 01, add a new 1-simplex 0 1 and two new 2-simplices 011 ,00 1 . Finally, identify the "top" and "bottom" to make the S 1 , that is, identify 0 ∼ 0, 1 ∼ 1 , and 01 ∼ 0 1 . Even after identification, it is convenient to keep tracking 0 and 0 separately (and 1 and 1 , etc.) in order to define the 2-simplices.
In general, then, given an original k-simplex 012 . . . n, crossing it with S 1 should be done as follows. First, for each k-simplex in the original object, we add k +1 new ksimplices and k+1 new (k+1)-simplices to the cellulation. As above, the k-simplices are constructed by "priming" some vertices starting from the highest-numbered ones, and the (k + 1)-simplices are constructed in the same way but including both the unprimed and primed vertices for the lowest-numbered primed vertex. This crosses the original simplex with the interval. Then compactify the interval into S 1 by identifying simplices with all primed vertices with their unprimed counterparts; this means that in total, for each k-simplex in the original object, only k new k-simplices appear after compactification.
It is now straightforward to see that given a cellulation of a general n-dimensional manifold M , one obtains a cellulation of M × S 1 by performing the above process on every individual simplex in the cellulation. That is, for each k = 0, 1, . . . , n, we find all of the k-simplices in the original cellulation of M and add k new k-simplices and (k +1) new (k +1)-simplices in the manner described above.

Dealing with identifications
We start with a very simple example of the above procedure: cellulating D 2 × S 1 given a cellulation of S 1 . From this, we will see how to cellulate T 3 = T 2 × S 1 and in the process understand how to pass from a cellulation of a manifold M × S 1 to one of M × S 1 , where simplices of M are identified with each other to produce M . This will be particularly helpful for generating a cellulation of L(2, 1) × S 1 .
One can, of course, obtain a cellulation of T 3 by identifying various objects on the boundary of the cellulation of D 2 × S 1 . To take a more systematic approach we start by compacting D 2 into T 2 , that is, identifying 0 ∼ 1 ∼ 2 ∼ 3, 01 ∼ 23, and 02 ∼ 13 and ask how this affects the prior procedure.
The key point is that when two simplices in D 2 are identified, we should also identify their corresponding "child" simplices. For example, 01 generated one new 1simplex 01 and two new 2-simplices 011 and 00 1 , while 23 generated the 1-simplex 23 and the 2-simplices 233 and 22 3 . Thus, identifying 01 ∼ 23 in D 2 means that we should identify 01 ∼ 23 , 011 ∼ 233 , and 00 1 ∼ 22 3 in D 2 ×S 1 . It is easy to check that, for each identification of the "parent" simplices in D 2 to produce T 2 , identifying "child" simplices in D 2 × S 1 in this manner is exactly how one produces the natural cellulation of T 3 from the given cellulation of D 2 × S 1 .
To summarize, suppose we start with a manifold M such that a list of simplices of M can be pairwise identified to produce M . To obtain a cellulation of M × S 1 , first obtain a cellulation of M × S 1 in the normal way. In this process, a "parent" k-simplex of M produces "child" k− and (k + 1)−simplices in the cellulation of M × S 1 . Given two parent k-simplices which are identified in passing from M to M , then identify their corresponding child simplices as well. After this identification process, we have a cellulation of M × S 1 .  Table VI.

T 4
We start from the cellulation of T 3 given in Fig. 6. A list of all the simplices contained in it, with identifications, is given in Table IV.
Clearly these factors cancel. In fact, since for any ± pair, the two diagrams involve exactly the same 2-simplices, the only way that the symmetry factors could fail to cancel is if U involves different 3-simplices. In the 4-simplices 0122 3 (±) , 011 2 3 (±) , and 00 1 2 3 (±) , the factor of U acts on 0122 , 011 2 , and 00 1 2 , respectively in both the + and the − diagram. Therefore all of these symmetry factors cancel out. The only pair that we need to check is the 01233 (±) pair, which has Z + (01233 (+) ) ∝ η −1 012 (g 23 , g 33 )U −1 33 (023, 32 012; 0123 (+) )U 33 (013, 123; 0123 (+) ) (D4) Z − (01233 (−) ) ∝ η 012 (g 23 , g 33 )U 33 (023, 32 012; 0123 (−) )U −1 33 (013, 123; 0123 (−) ) (D5) Because these two 4-simplices involve b 0123 (±) , which are not a priori equal, there is not obviously a cancellation. However, because of the absence of background flux, g 33 = 1. Therefore, all of these symmetry factors are 1. What we have shown is that, for any given term in the state-sum, the factors of U and η either cancel out or are equal to 1. At this stage, one can now check straightforwardly that each anyon always appears with the same symmetry action on it, that is, for example, 012 always appears as 42 012. Reindexing the sum (e.g. 42 012 → 012) and performing the (now-trivial) sum on g i , we obtain precisely the Crane-Yetter state-sum for C on S 3 × S 1 , which is known to be 1, that is, Z(S 3 × S 1 ) = Z CY (S 3 × S 1 ) = 1 (D6) as desired. One can explicitly compute the Crane-Yetter state-sum on S 3 × S 1 ; this is most conveniently done using the decomposition in Eq. (D1) and the merging lemma in Fig. 21b, but since the result is known, we do not reproduce the calculation here.