Comments on One-Form Global Symmetries and Their Gauging in 3d and 4d

We study 3d and 4d systems with a one-form global symmetry, explore their consequences, and analyze their gauging. For simplicity, we focus on $\mathbb{Z}_N$ one-form symmetries. A 3d topological quantum field theory (TQFT) $\mathcal{T}$ with such a symmetry has $N$ special lines that generate it. The braiding of these lines and their spins are characterized by a single integer $p$ modulo $2N$. Surprisingly, if $\gcd(N,p)=1$ the TQFT factorizes $\mathcal{T}=\mathcal{T}'\otimes \mathcal{A}^{N,p}$. Here $\mathcal{T}'$ is a decoupled TQFT, whose lines are neutral under the global symmetry and $\mathcal{A}^{N,p}$ is a minimal TQFT with the $\mathbb{Z}_N$ one-form symmetry of label $p$. The parameter $p$ labels the obstruction to gauging the $\mathbb{Z}_N$ one-form symmetry; i.e.\ it characterizes the 't Hooft anomaly of the global symmetry. When $p=0$ mod $2N$, the symmetry can be gauged. Otherwise, it cannot be gauged unless we couple the system to a 4d bulk with gauge fields extended to the bulk. This understanding allows us to consider $SU(N)$ and $PSU(N)$ 4d gauge theories. Their dynamics is gapped and it is associated with confinement and oblique confinement -- probe quarks are confined. In the $PSU(N)$ theory the low-energy theory can include a discrete gauge theory. We will study the behavior of the theory with a space-dependent $\theta$-parameter, which leads to interfaces. Typically, the theory on the interface is not confining. Furthermore, the liberated probe quarks are anyons on the interface. The $PSU(N)$ theory is obtained by gauging the $\mathbb{Z}_N$ one-form symmetry of the $SU(N)$ theory. Our understanding of the symmetries in 3d TQFTs allows us to describe the interface in the $PSU(N)$ theory.


Introduction and Summary
One-form symmetries Point operators can be charged under an ordinary internal global symmetry. Extended operators can be charged under a higher-form global symmetry [1]. One-form symmetries characterize line operators, two-form symmetries characterize surface operators, etc. One of the points of [1] is that many of the standard properties of ordinary global symmetries are present also in the case of their higher-form generalizations.
• The symmetries might or might not be spontaneously broken. If they are unbroken, the spectrum includes charged states. For example, when a one-form global symmetry is unbroken the spectrum includes charged strings. If they are broken, the lowenergy dynamics reflects the broken symmetry. For example, if the global symmetry is discrete and the spectrum is gapped, the low-energy theory includes a TQFT.
• As with ordinary symmetries, higher-form symmetries can have 't Hooft anomalies. Such anomalies obstruct their gauging. These anomalies can be used, just like 't Hooft anomaly matching of ordinary global symmetries, to constrain the IR behavior of a theory and to check duality between distinct theories. Also, such an anomaly in a higher-form symmetry can flow from a bulk to a defect in the bulk.
Unlike ordinary global symmetries, higher-form symmetries must be Abelian. In this note we will focus mostly on Z N one-form global symmetries in 3 and 4 dimensions. Typical examples in 3d are U (1) N or SU (N ) k Chern-Simons (CS) theory. They have a spontaneously broken Z N one-form symmetry.
A typical example in 4d is an SU (N ) gauge theory without quarks. Here the Z N oneform symmetry is expected to be unbroken, which is related to the confinement of the system. If we add quarks in the fundamental representation to this theory, then the oneform symmetry is absent, and indeed the theory with quarks does not have a meaningful notion of confinement.
4d SU (N ) gauge theory with θ and domain walls Of particular interest for us will be the behavior of this 4d SU (N ) theory with a θparameter. The lore is that at generic θ the system is confining and gapped with a trivial vacuum. At θ ∈ πZ, we have time-reversal and parity symmetries. These are unbroken at θ ∈ 2πZ. (For small values of N there are also other logical options [2].) But they are spontaneously broken at θ an odd multiple of π. In these cases the system has two degenerate vacua with domain walls that interpolate between them. Arguments based on anomalies in the one-form symmetry, which we will review below, suggest that the theory on the domain wall is an SU (N ) 1 TQFT [1,2]. 1 As stressed in [1,2], the transition at θ = π separates two distinct vacua in the following sense. On one side of the transition monopoles condense, leading to confinement, and on the other side of the transition dyons condense, leading to oblique confinement. More precisely, the transition at θ an odd multiple of π separates two distinct oblique confinement vacua. Since different dyons condense on the two sides of the domain wall, no dyon condenses on the wall. Therefore, the theory on the wall is not confining and the Wilson lines of the SU (N ) 1 theory on the wall are world lines of unconfined probed quarks. Not only are these quarks liberated, they also have nontrivial braiding, i.e. they are anyons! Below we will give an intuitive physical argument explaining why they are anyons.

Interfaces
One of our goals is to study in detail interfaces in this theory. We let θ be a spacedependent interpolation between θ 0 to θ 0 + 2πk. If the interpolation is over a length scale much longer than the inverse of the dynamical scale of the theory Λ, then at a generic spacetime point θ is essentially constant on the scale where confinement takes place and the vacuum is unique and varies smoothly. When θ crosses an odd multiple of π there is a domain wall separating two vacua. Therefore, the interpolation leads to k domain walls with SU (N ) 1 on each of them [2], as illustrated in Figure 1a. If the interpolation is more rapid, then the TQFT SU (N ) 1 ⊗ SU (N ) 1 ⊗ ... can undergo a transition to another TQFT T k , see Figure 1b. It was suggested in [2,3] that this theory is SU (N ) k . However, we will soon argue that there are also other logical possibilities and only a more detailed dynamical analysis can determine the right answer.
It is important that the theory on the interface is uniquely determined by the microscopic theory and by the profile of the space-dependent θ. This is to be contrasted with a sharp interface when θ is discontinuous, as illustrated in Figure 1c. Here we have the freedom to change the theory on the interface by adding more degrees of freedom there and to consider their dynamics. We will not study it here. The same comments apply to a system with a boundary. As with the sharp interface, the boundary theory is constrained by anomalies, but there is a lot of freedom in adding boundary degrees of freedom.
Our main tool for analyzing the system is its Z N one-form global symmetry. Related to this symmetry is an integer label p with p ∼ p + 2N and pN even [4,1]. Furthermore, we have an identification in labeling the theories [4,1,2] (θ, p) ∼ (θ + 2πk, p + k(N − 1)) . (1.1) One way to think about the parameter p is through coupling the Z N global symmetry to 1 Although as spin TQFTs SU (N ) 1 ←→ U (1) −N , we prefer to use SU (N ) 1 because our theory is bosonic.  The theory on each domain wall is T 1 , which we argue is SU (N ) 1 [1]. When the θ variation is more rapid, as in (b), there is only one interface and the theory on it is T k . One option for that theory is SU (N ) k , but we will argue that other options are also possible. Finally, as in (c), θ can be discontinuous. In this case the theory on the interface T is not determined uniquely by the microscopic dynamics. But it is constrained by anomaly considerations.
a classical background two-form gauge field B C (the subscript C means that it is classical). Then, the parameter p is the coefficient of a counterterm proportional to the square of B C [4,1]. This term does not affect any separated points correlation function, but it does affect contact terms and the behavior of the system with a boundary.
The key dynamical fact is that the theory confines. This means that the Z N one-form symmetry is unbroken. Also, the spectrum is gapped and the low-energy dynamics is trivial -there is not even a TQFT at long distances. The only meaningful fact that remains at low energies is the coefficient p of the counterterm of B C , which means that the system can be in a nontrivial Symmetry Protected Topological (SPT) phase.
When we have an interface where θ changes by 2πk the two sides of the interface are typically in different SPT phases labeled by p ± with (1. 2) This means that when p + = p − mod 2N the theory on the interface cannot be trivial. It must have a Z N one-form global symmetry with anomaly (p + − p − ) mod 2N .
Let us try to determine the theory on the interface. When the interface is rapid, we can shift θ on one side, as in equation (1.2), so that θ does not change across the interface, but p changes. It induces a Chern-Simons term SU (N ) k on the interface. Next, as the theory becomes strongly coupled it confines and the bulk on the two sides of the interface become gapped and trivial. What happens to the SU (N ) k theory on the interface? One option, which was advocated in [2], is that at least for small enough |k| it is not affected by the confinement. However, the strong dynamics could change that answer. 2 But whatever the dynamics does, the one-form Z N global symmetry and its anomaly p + − p − cannot change. Therefore, if p + = p − mod 2N , the theory on the interface cannot be trivial, and we'll denote it by T k .
We start by reconsidering the special case k = 1. Can the UV answer SU (N ) 1 be modified? We suggest that this cannot happen. First, as we will discuss in detail below, this particular theory is the minimal theory with a Z N one-form symmetry of anomaly N − 1. Every other TQFT with this property factorizes into SU (N ) 1 times another TQFT, whose line operators are Z N invariant. Therefore, it is natural to assume that in this case the UV answer does not change. Also, in a closely related supersymmetric theory, a string construction shows that the theory on the interface is U (1) −N [5], which is dual (as spin TQFT) to our answer SU (N ) 1 [6].
As we move to higher values of k the situation is less clear. It was suggested in [2] that as a slow interface becomes steeper, the SU (N ) ⊗k 1 TQFT can be Higgsed to the diagonal SU (N ) k . This would agree with the answer in the UV. However, further dynamical effects can change this answer. Since we expect the interface theory to remain non-confining, we do not anticipate monopoles to participate in this dynamics on the interface. Instead, we can consider dynamical scalar fields in the adjoint representation of SU (N ). Such scalar fields can arise from modes of the microscopic gluons and their presence does not break the exact Z N one-form symmetry of the system. The condensation of these scalars can Higgs SU (N ) to various subgroups. The maximum possible Higgsing with one adjoint scalar is to the Cartan torus U (1) N −1 . In this case the SU (N ) k theory becomes U (1) N −1 with a coefficient matrix given by kK Cartan with K Cartan the Cartan matrix of SU (N ). (Note that for k = 1 the TQFT SU (N ) 1 is the same as this Abelian TQFT.) With more than one adjoint scalars, we can further Higgs the system all the way down to a Z N gauge theory 3 with level K = −kN (N − 1) = −(p + − p − )N . Below we will review in detail this TQFT and its properties.
The upshot of the discussion above is that the spontaneously broken Z N one-form symmetry and its anomaly p + − p − restrict the TQFT on the interface T k , but do not uniquely determine it. For k = 1 it is natural to assume that the correct answer is the minimal one T 1 = SU (N ) 1 . For higher values of k there are several natural possibilities including SU (N ) k , but the other options include also some Abelian TQFTs. It should be emphasized, 2 We thank E. Witten for encouraging us to think about other options. 3 The Z N gauge theory at level K can be expressed as the following U (1) × U (1) Chern-Simons theory [7,8,4] For even K this is a Dijkgraaf-Witten (DW) theory [9]. however, that despite our inability to determine T k beyond the symmetry and anomaly constraints, this theory is uniquely determined by the dynamics.
Gauging the Z N one-form symmetry -4d P SU (N ) gauge theory and interfaces When the Z N one-form symmetry is gauged, the microscopic 4d SU (N ) gauge theory becomes a P SU (N ) gauge theory and the macroscopic theory might no longer remain trivial [10]. Specifically, it becomes a Z L gauge theory with 4 L = gcd(p, N ) . (1.4) Unlike the original SU (N ) theory where p affects only the SPT phase, here it affects the low-energy dynamics. Now the interface is more interesting. Clearly, we have a Z L ± gauge theory with L ± = gcd(p ± , N ) on the two sides of the interface. But what is the resulting theory on the interface? 5 When L + = L − = 1 the bulk theory on the two sides is trivial and the low-energy theory is only the 3d theory on the interface and it is completely meaningful. However, when either L + or L − (or both) are not equal to one, the bulk theory is not trivial and the low-energy TQFT is not three dimensional. It is four dimensional and the interface appears as a 3d defect in the 4d bulk. Therefore, it is meaningless to ask what the 3d theory on the interface is. It is not decoupled from the 4d bulk. Nevertheless, we will argue that there exists a 3d TQFT that captures many of the features of the physics along the interface. Roughly, it is a quotient of the full 4d system by the physics of the 4d bulk. We will describe this in more detail below.

One-form global symmetries in 3d and their gauging
In order to understand these TQFTs we will have to explore in more detail the one-form global symmetry, its anomaly, and its gauging in 3 and 4 dimensions. Let us start with a 3d one-form symmetry A. The charge operators are line operators a g labeled by a group element g ∈ A. The group multiplication corresponds to the fusion of the lines: where the group multiplication of A is denoted by addition, and the product of two lines denotes their fusion. Each line a g represents an Abelian anyon in the TQFT.
For simplicity we will focus on a Z N one-form symmetry. The symmetry lines are a s 4 Below we will show that on a nonspin manifold this Z L gauge theory is sometimes twisted in a particular way. 5 Note that the naive answer P SU (N ) k cannot be right. For generic k this is not a consistent theory [11,9] and we refer to a as the generating line. In general, this generator is not unique and some of the expressions below depend on the choice of generator.
In a TQFT with a Z N one-form symmetry, each line W carries a Z N charge q(W ) ∈ Z N under the symmetry, which is determined by braiding the generating line a with W (see Figure 2): (1.7) We will show that general considerations constrain the spins of the symmetry lines to be 6 for some integer p = 0, 1, · · · , 2N − 1 mod 2N . Imposing (1.6) leads to The situation in spin TQFT is slightly different because such theories have a transparent spin-half line ψ. This will be discussed in detail below.
One significance of the parameter p is that it determines the Z N charge q(a) = −p mod N of the generating line a (see Section 2.1). Clearly, the symmetry can be gauged only when the symmetry lines themselves are neutral, i.e. when q(a) = 0. Therefore, the parameter p controls the obstruction to gauging, which is the 't Hooft anomaly.
When p = 0, the Z N one-form symmetry is anomaly free and it can be gauged. Denoting the original TQFT by T , we will denote the result of this gauging by the TQFT (1.10) When p = N the generating line has spin 1 2 and the gauged system T /Z N is a spin TQFT. 7 There are several ways to describe the gauging procedure. From the perspective of symmetry defects, gauging a symmetry amounts to summing over all possible insertions of symmetry defects [1]. In the corresponding two-dimensional chiral algebra, gauging the one-form symmetry corresponds to extending the chiral algebra [12,11]. For Chern-Simons theory it can sometimes be described by the quotient of the gauge group by a subgroup of the center [11,1]. In the condensed matter literature, it is called "anyon condensation" of the Abelian anyon that corresponds to the generating line of the one-form symmetry [13].
For p = 0 when the symmetry generating line a has integer spin the gauging involves three steps [12,11]: Step 1 Discard the lines W that are not invariant under the Z N one-form symmetry.
Step 2 Since a is trivial, we identify the lines W and W a obtained by fusing with a.
Step 3 If W is a fixed point under the fusion with a, then there are N copies of W . More precisely, if s is the minimal divisor of N such that W is invariant under the fusion with a s , then there are N/s copies of W . 8 For even p = N , the generating line a has half-integer spin and then the resulting theory after gauging is a spin TQFT. As we will discuss below, this leads to the same three-step process.
When p = 0, N the generating line a is charged under the Z N symmetry and that symmetry cannot be gauged. However, a subgroup Z L ⊂ Z N with 9 L = gcd(p, N ) (1.11) can be gauged. It is generated by the line a = a N/L . Since its spin is h = pN 2L 2 , its pparameter is p = pN L mod 2L. Note that p = 0 mod L. When p = 0 mod 2L we can gauge this Z L subgroup as above, and when p = L mod 2L the resulting gauged theory is a spin TQFT. The most anomalous case has L = 1 and it will have particular significance below. 7 This is the case even when the original TQFT is non-spin. In this case we can say that there is a mixed 't Hooft anomaly between the Z N one-form symmetry and gravity (the bosonic Lorentz symmetry). 8 This can be proven by iteration. Let N 1 be the highest non-trivial divisor of N 0 = N . Then gauging the Z N0/N1 subgroup generated by a N1 leads to N 0 /N 1 copies at each fixed point. We can continue to gauge the remaining Z N1 symmetry by repeating the process. For the minimal divisor N i such that W is the fixed point under the fusion with a Ni , there will be N0 N1 N1 N2 · · · Ni+1 Ni = N Ni copies of W after gauging the Z N symmetry. 9 The relation to the seemingly unrelated equation (1.4) will be clear soon.

Outline and summary of new results
In Section 2 we will discuss in detail the one-form symmetry in 3d and will prove the statements above. We will also show that for given relatively prime N and p (i.e. L = 1) there is a minimal TQFT with a Z N one-form symmetry of anomaly p. We will denote it by A N,p . Furthermore, we will show that any TQFT T with such a one-form global symmetry factorizes as This means that all the lines in T are Z N neutral. This is quite surprising -the entire effect of the global symmetry is limited to this factor of A N,p and the rest of the theory is not affected by it. We can also invert equation (1.12) and map the TQFT T to (1.13) When L = N we have the three-step gauging procedure we discussed above that maps a TQFT T to T = T /Z N (1.10). In the other extreme of L = 1 we can map T to T of (1.13). Here we simply remove the non-invariant lines, i.e. we perform only step 1 of the three steps.
In Section 2.5 we will generalize this procedure to generic L = gcd(N, p). We map (1.14) The equality between these expressions will be derived in Section 2. In the map (1.14) we perform step 1 of the three-steps using Z N and perform steps 2 and 3 using Z L . This expression coincides with (1.10) for L = N and with (1.13) for L = 1 and generalizes them to generic L. (Depending on the details (1.14) might be a spin TQFT.) This generalized gauging procedure has a physical interpretation, which we describe below, in terms of coupling the system to a 4d bulk gauge theory. It is also related to a more mathematical discussion in [14][15][16][17] and the discussion on the Walker-Wang lattice models in [18,19].
In Section 3, we couple the 3d system to a 4d bulk and promote the background B C gauge fields to quantum fluctuating fields and correspondingly, we drop the subscript C. The bulk theory becomes effectively a Z L gauge theory.
As we said above, for L = 1 the bulk theory is trivial and therefore there is a meaningful 3d TQFT on the boundary. It cannot be T /Z N because the anomaly makes this quotient inconsistent. Instead, we will show that the theory on the boundary is T of (1.13) This equation has several complementary interpretations. First, we can say that the bulk produces a factor of our minimal theory A N,−p on the boundary such that the combined boundary theory T × A N,−p is anomaly free and then we can gauge the Z N symmetry using the three steps above. Second, T is as in (1.12), i.e. it includes only the Z N invariant lines in T . This means that it is obtained from T by applying only step 1 of the three-step gauging procedure above. And since L = 1 this leads to a consistent TQFT.
When L = 1 it is not meaningful to discuss the boundary theory, because it does not decouple from the bulk, which includes a non-trivial 4d TQFT. We could attempt to consider a 3d theory that consists only of the lines on the boundary and describes their correlation functions. We will find that these lines are the Z N invariant lines from T . This amounts to implementing step 1 of the three-step gauging procedure above. Because of the lack of decoupling from the bulk, the resulting theory is not a consistent 3d TQFT. It includes L lines that can move from the boundary to the 4d bulk and therefore they have trivial braiding with every line on the boundary. It is natural to consider a new effective theory obtained by performing a quotient by these lines. 10 In more detail, we performed step 1 of the three-step procedure above for Z N , and now we perform steps 2 and 3 with respect to the Z L subgroup. The resulting TQFT is T of (1.14) and it is a fully consistent 3d TQFT. It captures the nontrivial correlation functions of the lines on the boundary. However, as we said above, T is not "the theory on the boundary" except for L = 1. We will refer to it as "the effective boundary theory". We can think of the factor of A N/L,−p/L as a 3d TQFT produced by the bulk so that the Z N gauging can be performed.
We see that the 3d discussion of T of (1.14) has a physical interpretation in terms of a 4d system with a boundary. We will discuss in detail the purely 3d system in Section 2 and the 4d interpretation in Section 3.
We will further generalize this discussion to interfaces between bulks with p + and p − . Again, when L + = L − = 1 there is a meaningful 3d theory on the interface. And for other values of L ± there is only an effective description as above. It is As in the case of a boundary, the two factors of A N/L ± ,∓p ± /L ± can be interpreted as being produced by the bulk in the two sides such that the Z N gauging can be performed on the interface.
In Section 4, we review the bulk dynamics of the SU (N ) and the P SU (N ) gauge theories and discuss their interfaces. Here we use the results in Section 3 to construct the interfaces in the P SU (N ) theory by gauging the one-form Z N symmetry of the corresponding interfaces in SU (N ) theory.
In several appendices we summarize some background information and extend the analysis in the body of the paper. Appendix A reviews the equivalence of different definitions of Abelian anyons and derives some useful facts we use in the paper. Appendix B reviews the properties of the Jacobi symbols that appear in the central charge of the minimal Abelian TQFT A N,p . In Appendix C, we demonstrate that every Abelian TQFT corresponds to a unitary chiral RCFT. In Appendix D, we prove the equivalence of different procedures that remove lines from a TQFT. Appendix E reviews and extends the analysis of a Z N two-form gauge theory in 4d. In Appendix F, we generalize the discussion to a TQFT with an arbitrary Abelian one-form global symmetry group Z N I . where the symmetry transformation is implemented by the symmetry line a s that braids with W as illustrated in Figure 2 with a the generating line of the symmetry. The charge q(W ) can be determined by the spins of the lines h[W ] [20] (for a later presentations see e.g. the mathematical treatment in [21] and a more physical review in [22]) where aW denotes the unique line in the fusion of a and W . (The line aW is unique since a is an Abelian anyon as explained in Appendix A.) For the special case W = a s , the transformation under the group element s is characterized by some integer P mod N a s (γ)a s (γ ) = a s (γ )e − 2πiss P N , The condition a N = 1 in (1.6) requires that a N has spin pN 2 = 0 mod 1 and hence pN must be even. Therefore, for even N , the distinct cases are labeled by p = 0, 1, ..., 2N − 1 and for odd N , they are labeled by p = 0, 2, ..., 2N − 2.
Some different values of the label p can be identified using group automorphisms. For a Z N one-form symmetry, this amounts to choosing a new generating line for the symmetry a = a r with gcd(N, r) = 1. The charge of a line W in the TQFT becomes q(W )r mod N . The new generating line a has spin p 2N mod 1 with p = pr 2 mod 2N so the label p and p = pr 2 mod 2N should be identified.
In a spin TQFT there are new elements. These theories include a transparent spin-half line ψ. Using the language of one-form symmetries, we can say that ψ generates a Z 2 one-from symmetry that does not act faithfully on the lines.
Consider first the case of even N . Here we can replace the generating line a with a = aψ, which also satisfies (1.6) a N = 1. The spin of a is p 2N + 1 2 = p+N 2N . Therefore, we can identify p ∼ p + N . Equivalently, we can say that our system has a Z N ⊗ Z 2 one-form symmetry, where the first factor is generated either by a or by a and the second by ψ.
For odd N we could contemplate a N = ψ and therefore allow odd pN (and hence p is also odd). This means that a generates a Z 2N symmetry. Since N is odd, Here, the first factor is generated by a = aψ; indeed, a N = 1. The second factor is generated by ψ. The Z N factor is characterized by the label p = (p + N ) mod 2N , which is even (because p and N are both odd). Therefore, without loss of generality, we can say that even in spin theories we impose that pN is even. (Alternatively, we can allow odd pN , but  Table 1: The allowed labels p for Z N one-form symmetry up to the redundancy in redefining the generators of the symmetries. A Z N one-form symmetry of parameter p is generated by a line a of spin h[a] = p 2N mod 1. For a non-spin TQFT, we need pN ∈ 2Z, and p ∼ p + 2N . For a spin TQFT, we can use pN ∈ Z and p ∼ p + N . Alternatively, we can say that in the spin case we keep the condition pN ∈ 2Z and add the identification p ∼ p + N only for even N .
The labels of distinct one-form symmetries for both non-spin and spin theories are summarized in Table 1. Recall that in addition, choosing a different generator for the Z N symmetry changes p.

Examples
An example of a class of 3d TQFTs that has a Z N one-form symmetry of all possible parameter p = 0, · · · , 2N − 1 mod 2N is the U (1) pN Chern-Simons theory. The symmetry lines of the Z N one-form symmetry are generated by the Wilson line a of U (1) charge p, and the line a s for a general group element s has spin in accordance with (2.5).
Another example is the simplest Abelian Z N gauge theory in 3d, denoted by (Z N ) 0 . The theory has a Z N × Z N one-form symmetry, generated by the basic electric and magnetic lines V E , V M of integer spins. V E generates a Z N one-form symmetry with p = 0 and V M generates another Z N one-form symmetry with p = 0. However, these two lines V E , V M have a mutual braiding phase e −2πi/N . This fact can be used to find a Z N ⊂ Z N × Z N of arbitrary even label p. Specifically, the line generates a Z N ⊂ Z N × Z N one-form symmetry and since its spin is p 2N mod 1, the one-form symmetry is characterized by p.
What about the remaining lines? The line generates a Z N one-form symmetry of even parameter −p mod 2N . However, the lines b and c satisfy (bc) N/ gcd(N,p) = 1 , (2.9) and therefore only when gcd(N, p) = 1 do the two lines generate the entire Z N × Z N one-form symmetry.
Let us study a third example. We consider U (1) N ⊗ U (1) −N (for N odd this is a spin TQFT) with gauge fields z and y and an action Writing it in terms of x = z − y, this action becomes and as in [4], it describes the Z N DW theory [9] that we denote as (Z N ) N . It has a Z N × Z N one-form symmetry, generated by Z = exp(i z) of spin 1 2N mod 1, and Y = exp(i y) of spin − 1 2N mod 1. The two lines Z and Y have trivial mutual braiding. The basic electric and magnetic lines of the DW Z N gauge theory can be written as V E = ZY −1 = exp(i x) and V M = Y . As in the previous example of (Z) 0 , the line Again, we could ask about the remaining lines. The line generates a Z N one-form symmetry of odd parameter −p mod N . As in the previous example, these lines satisfy a relation: (bc) N/ gcd(N,p) = 1 and therefore only when gcd(N, p) = 1 do the two lines b and c generate the entire Z N × Z N one-form symmetry.
Let us summarize the last two examples. A subset of the lines of (Z N ) 0 generates a Z N one-form symmetry with even parameter p and a subset of the lines of (Z N ) N generates a Z N one-form symmetry with odd parameter p. When gcd(N, p) = 1 the remaining lines also generate a Z N one-form symmetry with parameter −p.
We can combine these two examples more concisely using the theory ( xdy . (2.14) Here the parameter p can be identified with p + 2 using the redefinition y → y − x so these theories are either (Z N ) 0 or (Z N ) N , and the lines b and c in (Z N ) 0 and (Z N ) N are mapped to the following lines in (

The minimal Abelian TQFT A N,p
In this section, we will show that when gcd(N, p) = 1 and pN ∈ 2Z the N symmetry lines associated to a Z N one-form symmetry form a consistent TQFT. We call this theory "the minimal Abelian TQFT" and denote it by A N,p . This theory was first studied in [20] and more recently in [23,24]. Here we emphasize its one-form global symmetry and show how it appears as a sub-theory in TQFTs with a Z N one-form global symmetry. 11 Using the assumed underlying Z N one-form symmetry, we can simplify the discussion in [20]. The symmetry determines the spins of the lines h[a s ] = ps 2 2N mod 1, and their braiding leads to the following S matrix   The summation is a Gaussian sum with the following closed-form expression [20,26] Table  2, and they are always integers.
Similar to one-form symmetries, any two minimal Abelian TQFTs A N,p and A N,pr 2 with gcd(N, r) = 1 are related by group automorphsims.
Following the discussion of spin TQFTs in the previous subsection we can generalize the minimal theory to spin theories. Originally, we imposed a N = 1 and then pN has to be even and the minimal theory is nonspin. We can make it into a spin TQFT by tensoring the almost trivial theory 14 {1, ψ}. After doing that, for odd N we can further redefine a → aψ, which makes a N = ψ and shifts p → p + N making pN odd. This way we can define a spin 13 Typically (and perhaps always) the TQFT can be described by a Chern-Simons (CS) gauge theory and a corresponding Rational Conformal Field Theory (RCFT). In fact, there are often several distinct CS theories corresponding to the same TQFT. Then the symbol ←→ means that they are dual. It is important to stress, however, that distinct RCFTs with the same TQFT are often inequivalent.
14 The almost trivial TQFT {1, ψ} can be represented by SO(M ) 1 for some integer M . The dependence on M is only in the framing anomaly or equivalently in the chiral central charges c = M 2 . See e.g. Appendix C of [33], Appendix B of [34], and also [6].

(2.19)
This is the minimal spin TQFT generated by a line of spin p 2N mod 1. As an application, the spin TQFT U (1) N for odd N factorizes 15 where the first factor is a nonspin minimal theory.

Factorization of 3d TQFTs when gcd(N, p) = 1
In this section we show that a TQFT T with a Z N one-form symmetry of label p such that gcd(N, p) = 1 factorizes as This is quite surprising. It means that in this case all the information about the global symmetry and its action on T is included in a decoupled factor of the minimal theory A N,p and T is invariant under the symmetry. 17 The theory T includes the Z N symmetry lines a s . When gcd(N, p) = 1 these lines form the minimal theory A N,p . Next, consider any line W ∈ T . Since a is Abelian, the fusion of W with a includes a single line rather than a sum of lines. (See Appendix A.) Therefore, since gcd(N, p) = 1, we can always find an integer s such that the line W = W a s has vanishing charge q(W ) = 0 mod N . Denote the set of neutral lines W by T . This shows that every line W ∈ T is a product of a line W ∈ T and a line in A N,p . It is clear that all the conditions of a consistent TQFT are satisfied separately for T and A N,p and hence we have the factorization (2.21).
The factorization (2.21) also follows from a theorem in modular tensor category (see [16] and Theorem 3.13 in [17]). In physics language, the theorem states that if a 3d TQFT T has a consistent sub-theory A, then T factorizes into A ⊗ T where T is another consistent TQFT that consists of all the lines in T that have trivial braiding with the lines in A. 18 Next, we use the fact that (A N,p ⊗ A N,−p )/Z N is a trivial theory, where the quotient means gauging the anomaly free diagonal Z N one-form symmetry generated by the two generating lines of the minimal Abelian TQFTs. This leads to an alternative presentation of the TQFT T To show the factorization of an Abelian TQFT, it is sufficient to check the factorization in the fusion rules, the spins of the lines and the chiral central charge. The fusion rules of U (1) pN are the same as the group law of Z pN . When gcd(N, p) = 1, the group factorizes into Z N × Z p and every line in the theory can be decomposed into W = a s b r with some unique (s, r) ∈ Z N × Z p . The spins of the lines also factorize The chiral central charge of U (1) pN is c = 1. It agrees with the sum of the chiral central charges of individual sub-theories up to a periodicity of 8 The minimal Abelian TQFT A N,p is also a sub-theory in (Z N ) −pN when gcd(N, p) = 1. Similarly, the theory also factorizes 26) where A N,p and A N,−p are generated by the lines b and c in (Z N ) −pN defined in (2.15).
As a consistency check, combining (2.21) and (2.22) and using the factorization property of (Z N ) −pN in (2.26), we recover the following canonical duality [36] T ←→ We remark that although the 3d TQFT factorizes, the corresponding 2d RCFTs may not factorize since the unitary modular tensor category does not fully specify the 2d chiral conformal field theory [37]. For Abelian TQFTs, we provide a construction of a corresponding unitary chiral RCFT in Appendix C.

't Hooft anomaly of one-form global symmetries
Consider a 3d TQFT T with a Z N one-form symmetry of label p with the symmetry generating line a. Gauging the one-form symmetry amounts to summing over all possible insertions of the symmetry lines [1]. If the symmetry lines have non-integer spin, the partition function vanishes because of the summation. This means that the one-form symmetry has an 't Hooft anomaly unless p = 0 mod 2N . Indeed, the one-form symmetry of label p = 0 mod 2N can be gauged following the procedure outline in Section 1. (When p = N , the theory can also be gauged as a spin TQFT by redefining the symmetry generating line using the transparent spin-half line. After gauging it becomes a spin TQFT, even though the original theory can be a non-spin theory. It reflects a mixed 't Hooft anomaly between the one-form symmetry and gravity, which we will explain in details later.) We couple the one-form symmetry of the 3d TQFT to a classical Z N two-form gauge field B C ∈ H 2 (M 4 , Z N ). 20 The anomaly of the one-form symmetry is characterized by a 4d term of the gauge field B C through anomaly inflow. To determine the 4d term, we use the canonical duality in (2.27) Under the duality, the original Z N one-form symmetry in T is mapped to the one-form symmetry generated by line b defined in (2.15) in the dual description so the theory on the right hand side couples to the classical gauge field B C through the (Z N ) −pN factor. It was shown in [4] that the anomaly of (Z N ) −pN is cancelled by the 4d term where P is the Pontryagin square operation (for a review see e.g. [10,38,39]). Therefore, the anomaly of a Z N one-form symmetry of label p is characterized by the 4d term (2.29) [4,1,39].
The 4d term (2.29) is consistent with the Z N periodicity of the B C field only for even pN . Furthermore, for p = N (which is possible only for even N ) it can be written as is the second Stiefel-Whitney classe of the manifold M 4 (see e.g. [40,41]). Equation (2.30) follows from the identity x ∪ x = w 2 (M 4 ) ∪ x for x = (B C mod 2) ∈ H 2 (M 4 , Z 2 ) (on orientable manifolds). We interpret the 4d term (2.30) as a mixed 't Hooft anomaly between the one-form symmetry and gravity (fermion parity), which means that when this anomaly exists the one-form symmetry can be gauged only on spin manifolds. See also the related discussion in appendix E.
The anomaly can be changed by choosing a different generating line a = a r with gcd(N, r) = 1 as explained in Section 2.1. It is equivalent to redefining the classical gauge field B C by a multiplication by r and the anomaly coefficient in (2.29) becomes pr 2 mod 2N .
In the presence of the classical gauge field B C , the line W is dressed with an open surface e − 2πiq(W ) N B C for gauge invariance and the redefinition of the classical gauge field B C rescales the charge from q(W ) to q(W )r.
An anomalous Z N one-form symmetry can have anomaly free subgroups. On spin manifolds, a Z m subgroup is anomaly free if the symmetry generator a = a N/m has integer or half-integer spin There is always a Z L subgroup with L = gcd(N, p) that satisfies this condition and hence it is anomaly free. But the Z L subgroup may not be the maximal anomaly free subgroup. For N L = r 2 t with some integers r, t such that t does not contain any complete-square divisors great than one, the maximal anomaly free subgroup is Z r . As a non-spin TQFT, a Z m subgroup is anomaly free only if h[ a] ∈ Z and therefore the Z L subgroup is anomaly free only for even pN/L 2 .

A generalization of the three-step gauging procedure to anomalous theories
In this subsection, we will introduce a new operation on 3d TQFTs that generalizes the three-step gauging procedure outlined in Section 1. This generalized operation will appear naturally in Section 3, where we consider 4d theories with boundaries and interfaces.
The standard gauging procedure of an anomaly free Z N one-form symmetry can be used when p = 0, where all the symmetry lines have integer spins. Then in step 1 we remove the non-invariant lines, in step 2 we identify lines that differ by the fusion with the symmetry lines, and in step 3 we take lines at fixed points of the identification several times.
When p = N this simple process cannot be repeated because the generating line a has half-integer spin. As we said above, this can be interpreted as a mixed anomaly between the one-form symmetry and gravity. This anomaly vanishes on spin manifolds and therefore, we can gauge the symmetry and find a spin TQFT. Let us discuss it in more detail. If the original TQFT T is a spin theory, it has a transparent spin-half line ψ. Otherwise, we make it into a spin TQFT by tensoring the almost trivial theory {1, ψ}. Now that we have a spin TQFT we can redefine a → a = aψ. Since p = N and pN is even, this occurs only for even N and then the redefinition preserves the fact that a N = 1. The redefinition shifts p to be zero. As a result, even in this case we can use the standard three-step gauging process with a. The only difference is that the theory is spin.
For simplicity from this point on we will limit ourselves to spin TQFTs.
Consider a 3d spin TQFT T with a Z N one-form symmetry of label p such that gcd(N, p) = 1, the spin TQFT factorizes as discussed in Section 2.3 where T is the 3d spin TQFT that consists of all the Z N invariant lines in T , and it can be extracted through In this case, we define an operation that maps T to T . The operation discards all the Z N non-invariant lines in T . It is equivalent to applying only the step 1 of the three-step gauging procedure.
When gcd(N, p) = 1, the Z N one-form symmetry has an anomaly free Z L subgroup generated by a = a N/L with L = gcd (N, p). where (T /Z L ) contains all the lines in T /Z L that have trivial braiding with a. We define the generalized gauging operation that maps In both presentations, the quotient in the denominator uses the symmetry generator a and the generating line of the minimal Abelian TQFT. In the second presentation, the Z L subgroup of the Z N quotient acts only on T .
There are three ways to think about the map (2.35).
First, as we motivated it and as in the first presentation in (2.35), we first gauge the Z L subgroup of the Z N one-form symmetry and then remove the sub-theory in T /Z L consisting of the Z N/L symmetry lines.
Second, since the Z N symmetry is anomalous, we tensor a minimal theory A N/L,−p/L that cancels the anomaly and then gauge the new anomaly free Z N symmetry. This is clear in the second presentation in (2.35).
Third, we can perform step 1 of the three-step gauging procedure using the full Z N symmetry and then perform steps 2 and 3 using only its Z L subgroup: Step 1 Select the lines invariant under the Z N one-form symmetry. In particular, among the symmetry lines, only the ones associated to the Z L subgroup generated by a = a N/L remain.
Step 2 If a has integer spin, identify W ∼ W a and if a has half-integer spin, identify W ∼ W aψ.
Step 3 Take multiple copies at the fixed points of the identification.
When p = 0, N , the symmetry is anomaly free and the generalized gauging operation reduces to the standard gauging procedure that produces T = T /Z N .
In general, the Z N one-form symmetry can have larger anomaly free Z m subgroups that contain the Z L subgroup. In Appendix D we show that the same result (2.35) can be reproduced if we first gauge the Z m subgroup and then apply the generalized gauging operation to the remaining theory (up to a possible transparent spin-half line, which we will ignore).
Below we will see similar operations on TQFTs, which are not minimal. Following the second presentation in (2.35), we can tensor not the minimal theory A N/L,−p/L , but other theories that cancel the anomaly, e.g. B The equation of motion of A constrains B C to be a Z N two-form gauge field 2π N B C . The theory (3.2) is invariant under a one-form gauge transformation of background fields with λ a one-form gauge parameter.
We put the theory on a 4-manifold M 4 with a boundary. 22 The action is gauge invariant under (3.3) up to a boundary term It can be cancelled by a theory on the boundary with a Z N one-form symmetry of anomaly p, that couples to the classical gauge field B C . So we are going to place on the boundary an arbitrary TQFT T with such a symmetry and anomaly.
The coupling of the boundary TQFT T to the classical gauge field B C has a convenient Lagrangian description using the canonical duality in (2.27) [36] and the Lagrangian description (2.14) of the second factor in the numerator. Then the classical gauge field B C couples to the boundary theory through the (Z N ) −pN theory where the last term B C A can be absorbed into the bulk action by modifying B C dA to AdB C . Now the one-form gauge transformation (3.3) acts as

Gauge the one-form symmetry
The whole system is anomaly free so there is no obstruction to gauging the one-form symmetry by turning the background gauge field B C into a dynamical gauge field denoted by B. After gauging, the bulk theory becomes a dynamical Z N two-form gauge theory reviewed in Appendix E. For later convenience, we define The bulk Z N two-form gauge theory is effectively a Z L one-form gauge theory 23 [4,1]. It has L genuine line operators generated by V = exp(iK A) and L surface operators generated by U = exp(i B). We will be interested in the effect of gauging on the boundary TQFT. For simplicity, we will limit ourselves to spin 4-manifolds.
It is important to stress that when L = 1 the bulk theory is nontrivial and hence it is meaningless to ask what the 3d theory on the boundary is. Instead, it should be thought of as part of the 4d-3d system. Nevertheless, we can discuss the physical observables such as the line operators on the boundary and their correlation functions. We will extract from the 4d-3d system an effective boundary theory that reproduces many of these observables.
Let us examine the line operators on the boundary. The bulk Z N gauge theory has L line operators. When they are restricted to the boundary, they are regarded as boundary lines. But they have trivial braiding with all the boundary lines since they can smoothly move into the bulk and get un-braided. This means that unless L = 1 (where the bulk is trivial) the boundary lines to do not form a modular TQFT [4].
What are the other lines on the boundary? They can be constructed by fusing a line W from the 3d TQFT T and the bulk lines generated by exp(i A)|, where | denotes the restriction to the boundary where m ∼ m+N . The coupling to B is needed for the one-form gauge symmetry. Next, we impose that these lines are genuine line operators, i.e. independent of the choice of surface Σ. This happens when q(W ) = mp mod N [4, 1] An operator W for which we cannot solve q(W ) = mp mod N cannot be "dressed" to 23 When pN/L 2 is odd, V = exp(iK A) represents the worldline of a fermionic particle and the bulk theory is effectively a Z L gauge theory that couples to w 2 (M 4 ) of the manifold (see Appendix E). Using this identification we also recognize the L symmetry lines associated to the Z L subgroup generated by a = a K as the bulk lines generated by V = exp(iK A). As we said above, these lines have trivial braiding with all the lines on the boundary.
One of the main points in our discussion is that since the bulk lines are trivial in any 3d correlation functions, we find it natural to identify them with the trivial line and accordingly, identify the boundary lines W ∼ W a. This works when pN/L 2 is even, so that the bulk line V | = a = a K has integer spin h[ a] = pN/2L 2 . When pN/L 2 is odd, the bulk line V is charged under the Z 2 fermion parity (see Appendix E), and on the boundary it is identified with a of half-integer spin. Thus, we identify W ∼ W aψ. The procedure above is equivalent to quotienting by the boundary lines that can move to the bulk. This is essentially the step 2 of the gauging procedure, except that we perform it with respect to Z L rather than with respect to Z N . As with the step 3 in the gauging procedure, the identification leads to new lines. Consider a boundary line W at the fixed point of the fusion with a. It can form junctions by emanating bulk lines at some points as shown in Figure 3. When the bulk lines are viewed as trivial, these junctions become new boundary line operators.
We have just performed step 1 of the gauging with respect to Z N and steps 2 and 3 gauging bulk boundary theory effective boundary theory Table 3: Gauging an SPT phase of Z N one-form symmetry with a boundary supporting a 3d TQFT T leads to a 4d-3d system. It is not meaningful to discuss the resulting boundary theory unless the bulk is trivial. This happens when L = gcd(N, p) = 1. However, we can extract an effective boundary theory that captures many of the features for any L.
with respect to its Z L subgroup. The result is exactly T defined in (2.35) We note that the identification by the bulk lines, whose correlation functions on the boundary are trivial, is similar to the procedure of the more mathematical analysis in [14][15][16][17][18].
In this system, the minimal theory A N/L,−p/L can be interpreted as the 3d TQFT that the bulk theory provides to cancel the anomaly.
After gauging the Z N one-form symmetry, there is an emergent dual Z N one-form symmetry in the bulk and an emergent dual Z N zero-form symmetry on the boundary. They are both generated by exp(i B). The original system can be recovered by gauging these emergent symmetries.
In summary, starting with a general 3d TQFT T with a Z N one-form symmetry of anomaly p, by coupling it to the bulk (3.1) and then gauging the one-form symmetry, we find the 3d TQFT T as the effective boundary theory. We emphasize again that T is only an effective theory, since the boundary can only be thought of as part of the 4d-3d system when the bulk theory is nontrivial. However, in the special cases when L = 1, the bulk theory is trivial and T is the theory on the boundary.

Interfaces between two different bulk TQFTs
A generalization 24 is to consider interfaces between two different SPT phases of Z N one-form symmetry one with coefficient p + and the other with p − On the interface ∂M + 4 = ∂M − 4 , we choose the boundary condition B C = B + C | = B − C | where | represents the restriction to the interface. The anomaly inflow can be cancelled by an interface theory with a Z N one-form symmetry of anomaly p = p + − p − that couples to B C . As in the case of a boundary, which we discussed above, we place on the interface a 3d TQFT T with a Z N one-form symmetry generated by a and with anomaly p. Following the discussion of the boundary, we use the canonical duality (2.27) and couple the interface theory to B C through the (Z N ) −pN factor (3.14) The one-form gauge symmetry of the system is We can gauge the Z N one-form symmetry in the full system, i.e. make B C dynamical (and remove the subscript C). For later convenience, we define L ± = gcd(N, p ± ), L = gcd(L + , L − ), K ± = N/L ± , K = N/L = lcm(K + , K − ) . (3.16) After gauging, the bulk theory becomes effectively a Z L ± one-form gauge theory on each side. In the special cases when L ± = 1, the bulk theories on both sides are trivial and there is a meaningful 3d theory on the interface. Otherwise, the interface can only be thought of as coupled to the 4d TQFT.
All the line operators W on the interface can be constructed by fusing the lines W from the original 3d TQFT T and the lines V ± = exp(i A ± )| one-form: Table 4: The emergent global symmetry in a 4d system with an interface. The first row summarizes the symmetries and their spontaneous breaking. The second row presents the charge generators. In U the integral is over a closed surface that pierces the interface. U L ± ± = 1 means that this symmetry is broken to Z K ± . Below we will study an effective theory on the interface by performing a quotient of the full 4d-3d system by the bulk modes. We will see that the one-form global symmetry of this effective theory is Z gcd(K + ,K − ) = Z N/lcm(L + ,L − ) .
here a possible trivial open surface exp(iN B) and use m ± ∼ m ± + N .) An operator W for which we cannot solve this equation cannot be "dressed" to a physical operator.

Using the equation of motion of
and that a is a special case of W , all the lines on the interface can be written as 25 Let us discuss the global symmetry of the system and its breaking (Table 4). After gauging, the bulk theories have an emergent Z N one-form symmetry. It is spontaneously broken to Z K ± on the two sides. The broken Z L ± = Z N /Z K ± one-form symmetry is generated by the surface operator U ± = exp(i B ± ) with U L ± ± = 1. It acts on the Z L ± gauge theories in the two sides.
The interface has an emergent symmetry generated by the surface operator that pierces the interface U = exp(i where Σ ± are two hemispheres in the two sides of the interface. Together they form a closed surface. U acts on the interface lines (3.17) W V m + + V m − − by a phase of e −2πi(m + +m − )/N . (As a check, this phase is invariant under the fusion with the trivial operator a V −1 + V − = 1.) The original Z N one-form symmetry acted faithfully on T . This means that there are lines W with all possible Z N charges. Therefore, for every value of m ± we can find a line W satisfying (3.17). After gauging this Z N symmetry, the emergent Z N symmetry acts with charge −(m + + m − ). We see that it acts faithfully in the resulting TQFT. This means that this emergent Z N one-form symmetry is completely broken on the interface.
There is also an emergent dual Z N zero-form symmetry on the interface generated by exp(i B|). All these emergent symmetries have the same origin and gauging them with appropriate counterterms recovers the original system.
We conclude that the 4d-3d system has an emergent Z N one-form symmetry, which acts faithfully on the interface; i.e. it is spontaneously broken.

Effective 3d theory
Next, we imitate what we did with a boundary and construct an effective interface theory by moding out by the bulk lines (3.21) Step 2 The bulk lines are trivial in all correlation functions in 3d. We identify them with the trivial lines and therefore, the interface lines W are identified as where we used the result that V ± has interger spin for even K ± p ± /L ± and half integer spin for odd K ± p ± /L ± (see Appendix E).
Step 3 A line at the fixed point of the identification using a K with K = lcm(K + , K − ) can form junctions by emanating two bulk lines V K/K + + and V K/K − − at the same point. These junctions become genuine line operators if the bulk lines are taken to be trivial.
As an example we consider T = (Z N ) −pN defined in (2.14). After gauging all the lines on the interface are generated by (3.23) We are interested in the expectation value of a knot on the interface Since the path integral is quadratic it can be evaluated easily (see Appendix E for similar calculations) where (C i , C j ) is the linking number between C i and C j . Here the result arises from contractions of A + A + and A − A − . Since (b ± ) K ± is identified with the bulk line V ± = exp(iK ± A ± ), the effective interface theory is Using the canonical duality (2.27), the effective interface theory for a general 3d TQFT T is where the quotient in the first presentation means gauging the diagonal anomaly free Z N one-form symmetry generated by The two minimal Abelian TQFTs A K + ,−p + /L + and A K − ,p − /L − can be interpreted as the 3d TQFTs that the bulk theory provides to cancel the anomaly. The sign difference in the labels comes from the different orientations of the bulk relative to the interface.
It should also be added that when we performed the quotient of the full 4d-3d system by the two bulk theories to find an effective 3d theory, we modded out by the bulk operators. This means that the effective theory captures the correlation functions of interface lines, but does not capture the correlation functions of the bulk lines and the bulk surfaces.
Let us determine the one-form global symmetry of the effective theory. Since we have modded out by some bulk lines, it is different than the Z N that acts on all possible lines in the interface.
Clearly, we should focus on the surface operator U that pierces the interface (3.20). In general, it has nontrivial correlation functions with the lines in the bulk. Hence, its intersection with the interface ∂Σ + = ∂Σ − does not represent a genuine line operator on the interface. Since it is not included as a line operator in our effective theory, the effective theory does not have the full Z N symmetry.
However, the surface operator has trivial correlation functions with all the bulk lines and therefore we expect that it corresponds to a line operator on the interface. Indeed, it is This line generates a Z N/ L subgroup of the emergent Z N one-form symmetry of the full 4d-3d system.
The one-form global symmetry of the effective theory can also be obtained from (3.26). First, using the Z K quotient we can express the symmetry lines as the lines in the minimal Abelian theories. Since r ± p ± /L ± = 1 mod K ± , we can choose the generating line of the minimal theories A K ± ,∓p ± /L ± to be ( V ± ) r ± . Then the lines in the effective interface theory (3.26) originating from the minimal theories are with m ± ∼ m ± + K ± . The condition only has solutions (m + , m − ) = n( L/L + , − L/L − ) with integer n and hence the line (3.28) generates all the interface lines originating from the minimal theories. This means that the Z N/ L one-form symmetry is the largest symmetry of the effective interface theory (3.26) generated by the lines from the minimal theories.
Another way to understand this global Z N/ L one-form symmetry of the effective theory is the following. The full 4d-3d system realizes a spontaneously broken Z N symmetry, which acts faithfully. In the bulk this symmetry is spontaneously broken to Z K ± , so the bulk modes realize Z L ± . Together, the two bulk half-spaces realize Z L = Z L + ∪ Z L − . Therefore, the effective interface theory, obtained as the quotient by the bulk modes realizes Z N/ L . Equivalently, the unbroken global one-form symmetries in the two bulks are Z K ± and hence Z gcd(K + ,K − ) = Z K + ∩ Z K − is unbroken throughout the two bulks. We know that the full Z N symmetry is broken in the interface. Therefore, the quotient theory should realize the symmetry Z gcd(K + ,K − ) = Z N/ L .

walls and interfaces
We begin by reviewing the dynamics of 4d pure SU (N ) gauge theory and its domain walls and interfaces following [42,1,2]. The action of the theory is where the parameter θ is identified periodically θ ∼ θ + 2π.
This system has a Z N one-form global symmetry, which we will refer to as electric. It is generated by a surface operator where C depends on the dynamical gauge fields. As expected of a charge operator, the correlation functions of the surface operator U E are topological [1]. The charged objects are Wilson lines in representations of SU (N ) and the Z N charge is determined by the action of the center of the gauge group on the representation. We will denote the Wilson line in the fundamental representation by W.
In addition to the Wilson lines and the charges U r E = exp(ir C), the system also includes open versions of the charges where T is the 't Hooft operator. In the SU (N ) theory it is not a genuine line operator and needs to be attached to an open surface operator. The 't Hooft operator is the worldline of a monopole, which is defined by being surrounded by a two-sphere with a nontrivial P SU (N ) bundle on it. The SU (N ) theory does not have such objects. They have to be attached to strings. (This is like the Dirac string of a magnetic monopole, except that it is detectable by Wilson lines, and hence it is physical.) The surface in (4.3) can be interpreted as the worldsheet of this string. This allows us to interpret the Z N charge operator U r E = exp(ir C) as a closed worldsheet of such strings. It is natural to couple the global Z N symmetry to background gauge fields B C . Then, since the Wilson lines are charged under the symmetry, they take the form One way to think about the classical background B C is that instead of summing over SU (N ) bundles in the path integral, we sum over P SU (N ) bundles E with fixed second Stiefel-Whitney classes w 2 (E) = B C ∈ H(M 4 , Z N ).
Another consequence of the background field is that we can add to the action the counterterm 2π In the presence of this term the θ periodicity is as in (1.1) This lack of 2π periodicity in θ has another consequence. Because of the Witten effect  This fact will be important below.
So far we have discussed the kinematics of the SU (N ) theory. Now we turn to the dynamics. At low energies the SU (N ) theory has a gap and it confines. This means that the Z N one-form symmetry is unbroken and the charged Wilson lines (those in representations that transform nontrivially under the Z N center) have an area law. Correspondingly, these Wilson lines vanish at long distances. As a result, the low-energy theory is trivial. It does not even have a TQFT. In the low-energy theory the Wilson lines W r vanish and the charges U r E are equal to one. The dynamical objects of the system have electric and magnetic charges that are N times the basic units of the Wilson line W and the 't Hooft operator (with its attached surface (4.3)). Confinement means that some dynamical monopoles or dyons condense. But these are different dyons at θ and at θ + 2π. Because of the Witten effect, their electric charges differ by N units. This means that if we have confinement at θ, we have oblique confinement at θ + 2π. And more generally, we have different kinds of oblique confinement at these two values of θ.
At θ ∈ πZ, the SU (N ) gauge theory has a time-reversal symmetry. It is unbroken at θ ∈ 2πZ. At θ ∈ 2πZ + π, the theory is argued to have two degenerate vacua associated with the spontaneous symmetry breaking of the time reversal symmetry. Since the action of time reversal at these points involve a shift of θ by a multiple of 2π, the two vacua have different kinds of oblique confinement.
Let us discuss the domain walls between these two vacua. Since they have different kinds of oblique confinement in the two sides, one dyon condenses in one side and another dyon condenses in the other side. Therefore, no dyon condenses on the wall and correspondingly, the theory is not confining there. This means that the electric Z N one-form symmetry is spontaneously broken on the domain wall and the fundamental Wilson loops are physical observables in the low-energy theory.
It was argued in [2] that the wall supports a nontrivial TQFT, SU (N ) 1 . This TQFT has a Z N one-form symmetry with an anomaly p = N − 1, which accounts to the different anomaly inflow from the two sides of the wall. Note that this is the minimal TQFT with these properties A N,N −1 and any other TQFT with such properties includes SU (N ) 1 as a decoupled sector and the rest of the theory is Z N invariant.
The SU (N ) gauge theory can also have interfaces that interpolate between θ 0 and θ 0 + 2πk for some integer k. The anomaly inflow requires the interfaces to support theories with a Z N one-form symmetry of anomaly p = k(N − 1) mod 2N . This does not uniquely specify the theories on the interfaces. However, when θ varies smoothly, the interface theory is uniquely determined by the microscopic theory and the profile of the θ-parameter. This is to be contrasted with sharp interfaces when θ is discontinuous. When θ varies smoothly and slowly with |∇θ| Λ, where Λ is the dynamical scale of the theory, there are k domain walls where θ crosses an odd multiple of π. Each domain wall supports an SU (N ) 1 TQFT. When θ varies smoothly and more rapidly with |∇θ| Λ, the interface theory SU (N ) ⊗k Chern-Simons term induced by by the θ-term in the bulk.
However, it is possible that the strong dynamics changes the interface theory at lowenergy. One logical possibility is that the dynamics Higgses SU (N ) using scalar fields in the adjoint representation. This preserves the Z N one-form symmetry and the anomaly. The maximum possible Higgsing with one adjoint scalar is to the Cartan torus U (1) N −1 , where the U (1) N −1 gauge fields a I , I = 1, · · · , N − 1 are embedded in the SU (N ) gauge field a through a = a I H I , (H I ) ij = diag(0, · · · , 0 ) . (4.8) In terms of these fields the SU (N ) k theory becomes a U (1) N −1 Chern-Simons theory where K Cartan is the Cartan matrix of SU (N ) For k = 1 this Abelian TQFT is the same as SU (N ) 1 , so this possibility is the same as the previous suggestion.
We can further Higgs SU (N ) all the way down to its Z N center. In order to identify the TQFT of this Z N gauge theory, we use a presentation of SU (N ) k based on U (N ) × U (1) gauge fields b and y [6] k 4π Tr where the U (1) field y constrains b to be a SU (N ) gauge field. The Z N gauge field x is embedded in U (N ) through b = xI. After Higgsing, the SU (N ) k theory becomes a Z N gauge theory ( Alternatively, the precise Z N gauge theory can be determined by matching the anomalies. In conclusion, without a more detailed dynamical analysis we cannot uniquely determine the TQFT on the interface, so we will denote it by T k . The simplest case T 1 was argued to be the minimal allowed theory, SU (N ) 1 . But for higher values of k there isn't a preferred choice and we presented several options, e.g. SU (N ) k and (Z N ) −kN (N −1) = (Z N ) −pN . However, using the analysis in the previous sections, we can proceed without knowing exactly what T k is.
Let us analyze the interface theory T k in more detail. The theory has a Z N one-form symmetry of anomaly k(N − 1), which means that the symmetry lines are anyons with a braiding phase of e −2πik(N −1)/N . These symmetry lines can be thought of as bulk charge operators generated by U E that pierce the interface. To see that, recall that because of confinement, the shape of U E in the bulk is not important (a closed surface on each side equals to one) and therefore, U E , which pierces the interface is effectively a line operator on the interface. Also, U E can be interpreted as the worldsheet of a string constructed by gluing two 't Hooft lines from the two sides at the interface. So we can view U E as associated with two 't Hooft lines, T on one side of the interface and T −1 on the other side. Then, because of the Witten effect [43], the electric charges of these two 't Hooft lines differ by k and therefore U E that pierces the interface appears as a Wilson line with electric charge k. More precisely, it is the generator of the Z N one-form global symmetry on the interface. For example, if the theory on the interface T k is SU (N ) k , it is a Wilson line in a k index symmetric representation of SU (N ).
The fact that U E leads to a Wilson line on the interface shows that not only are the probe quarks on the interface liberated (because there is no confinement there), they are also anyons!

P SU (N ) gauge theory
The P SU (N ) gauge theory differs from the SU (N ) gauge theory in the global form of the gauge group. It can be constructed by gauging the electric Z N one-form symmetry in the SU (N ) gauge theory, i.e. by making the classical background field B C dynamical (and dropping the subscript C). Summing over B means that we sum over all P SU (N ) bundles E. Now, the choice of the counterterm (4.5) is more significant than in the SU (N ) theory and the value of p affects the set of observables.
Let us discuss the operators in the theory. Since now B is dynamical, the Wilson loop (4.4) is no longer a genuine line operator; it depends on the surface Σ. We can consider a closed surface operator where w P SU (N ) 2 is the abbreviation for w 2 (E) (with E the P SU (N ) bundle). It is the generator of a new emergent Z N one-form symmetry, which we will refer to as magnetic. For p = 0 the 't Hooft line T is a genuine line operator and we do not need to write C of (4.3). It is charged under the magnetic symmetry (4.12). Other dyonic operators of the form T W r need an attached surface and they are not genuine line operators (unless r = 0 mod N ).
We would like to find the line operators when p is nonzero. We simplify the discussion by considering the theory on a spin manifold such that the periodicity of p is p ∼ p + N . 26 We first keep p = 0 and extend the range of θ ∼ θ + 2πN . Clearly, T remains a genuine line operator as we change θ. But because of the Witten effect it acquires electric charge −k as θ is shifted by −2πk. Then we restore the original θ and have nonzero p = k(N − 1). This means that the basic line operator has electric charge p, i.e. it is [10] T (γ) = T (γ)W(γ) p . (4.13) Note that this is a genuine line operator, which does not need a surface.
Another way to understand the lines (4.13) is to write them as T W p exp i Σ (C + 2πp N B) , where C comes from T (4.3) and 2πp N B from W (4.4). In the P SU (N ) theory with p the term in the exponent vanishes and hence this operator is independent of Σ. Now, let us consider the dynamics. In the SU (N ) theory the dyons that condense at θ = 2πk have the quantum numbers of T N W kN . (Note that these dyons exist as dynamical objects regardless of the global structure of the gauge group. The global part of the group and the value of p determine the line operators in the theory.) Let us focus on θ = 0 with arbitrary p. The genuine line operators in the theory are powers of T (4.13). Some of them have area law because of the condensation and hence they vanish at low energies. Only the lines that are generated by are aligned with the condensed dyons and hence they have a perimeter law. These are the only nontrivial line operators in the low-energy theory.
It is clear that the magnetic Z N one-form symmetry is spontaneously broken to Z K and the broken elements are realized at low-energy by a Z L gauge theory [10]. The operators in this Z L gauge theory are generated by the basic Z L Wilson line (4.14) (which is not to be confused with the microscopic P SU (N ) Wilson line) and its dual surface operator, which is the microscopic operator U M . 27 26 On an orientable non-spin manifold, the change p → p + N (with even N ) produces the coupling π w 2 (M 4 ) ∪ B (where w 2 (M 4 ) is the second Stiefel-Whitney class of the 4d manifold M 4 ) that is equivalent to turning on classical background field B C = N w 2 (M 4 )/2 for the magnetic Z N one-form symmetry generated by exp( 2πi N B). Thus it changes the statistics of the basic 't Hooft line from a boson to a fermion and vice versa [44,39,45]. This does not modify the P SU (N ) bundle but instead gives additional weights in the path integral. 27 On a nonspin manifold this Z L gauge theory could be twisted, as in Appendix E.
Microscopic P SU (N ) gauge theory Low energy Z N two-form gauge theory Table 5: The dictionary between the operators in the microscopic P SU (N ) gauge theory and the operators in the macroscopic Z N two-form gauge theory. The line operator in the second row is the minimal line that obeys a perimeter law. It is identified with the genuine line operator in the low-energy theory (and hence we suppress the B dependent term). Here we use a continuous notation for the low-energy TQFT, which is reviewed in appendix E.
In conclusion, the low-energy manifestation of this spontaneous symmetry breaking of the magnetic Z N one-form symmetry is the theory (3.2). And the relation between the microscopic operators in the P SU (N ) gauge theory and the low-energy theory is summarized in Table 5.

Interfaces in P SU (N ) gauge theory
Here we study an interface in the P SU (N ) theory. We let it interpolate smoothly between θ = 0 and θ = 2πk. As above, we can approximate it at low energies with constant θ = 0 and p changing from p + to p − . This is the setup we considered in the SU (N ) theory above, and now we simply gauge the electric Z N one-form symmetry in that theory. The low-energy dynamics of the P SU (N ) theory in the two sides are approximated by the Z N two-form gauge theories with parameters p ± , which are equivalent to Z L ± gauge theories. They describe the spontaneous breaking of the magnetic Z N one-form global symmetry to Z K ± . Note that unlike the SU (N ) theory, where the two sides of the interface differed only by a counterterm for background fields, here the two sides are dynamically different.
The TQFT in the bulk and on the interface is as in Section 3.3, so we will not repeat its analysis in detail, except to summarize the main points.
We have already said that in the bulk the magnetic Z N one-form symmetry is spontaneously broken to Z K ± . On the interface, since the confined line operators in the bulk become liberated, the magnetic Z N one-form symmetry, generated by the surface operators piercing the interface, is completely broken. Equivalently, we have argued above that in the SU (N ) theory no monopole condenses on the wall and the dynamics is weakly cou-pled there. Therefore, the Z N one-form symmetry of the P SU (N ) theory should also be spontaneously broken there.
When θ varies smoothly and rapidly, the interface in the SU (N ) gauge theory supports a TQFT T k . The effective interface theory on the corresponding P SU (N ) interface is found easily using the results in Section 3.3. When L + = L − = 1 the theory on the interface is As in Section 3.3, we can interpret the two minimal theories in the numerator as produced by the bulk in the two sides, such that we can gauge an anomaly free Z N one-form global symmetry.
For generic L ± the interface couples to the Z L ± gauge theory in the bulk and it is meaningless to ask what the theory on the interface is. Yet, we can identify an effective interface theory. It is As an example, we argued above that the interface in the SU (N ) theory between θ = 0 and θ = 2π with p + = p − = 0 supports an SU (N ) 1 theory. This corresponds to θ = 0 with p + = 0 and p − = 1 − N , and thus L + = N, L − = 1. The effective interface theory on the corresponding P SU (N ) interface is trivial, since A N,1−N = SU (N ) −1 .

A Definitions of Abelian anyons
In this Appendix we will review some properties of Abelian anyons. There are three equivalent definitions of Abelian anyons. An anyon a in a 3d TQFT is called Abelian when (1) a obeys group-law fusion, aa s = a s+1 for integers s with a 0 = 1. In particular, since the number of lines in a consistent 3d TQFT is finite, there exists an integer m such that a m = 1.
(2) a obeys Abelian fusion rules. For any line W in the 3d TQFT, the fusion product aW only contains one line.
(3) the quantum dimension of a is one.
First, the definition (1) implies (3). The group-law fusion a m = aa · · · a = 1 implies d m a = 1 for the quantum dimension d a of a. Since d a must be a positive real number in any unitary 3d TQFT, we conclude d a = 1.
The definition (2) implies (1) by specializing W = a, aa, · · · and defining the unique line appears in the fusion of n line a to be a n . Now we will show the definition (3) implies (2) by contradiction. Suppose there exists a line x that fuses with a into at least two lines that we denote by y, z: a · x = y + z + · · · . (A.1) This implies a · y = x + · · · , (A.2) where a denotes the antiparticle of a, i.e. a · a = 1 + · · · . The quantum dimensions in the fusion u · v = i w i satisfy d u d v = i d w i [22], and thus where the last two inequalities used the property that the quantum dimensions are real and positive, and in particular the last inequality comes from the existence of the second anyon z in the fusion (A.1). Since a and a have the same quantum dimension, by definition (3) d a = d a = 1. Thus the last equation in (A.3) leads to a contradiction. Therefore, any line x must fuse with a into only one line. We conclude that (3) implies (2), and since we have already shown that (1) implies (3), this means that (1) implies (2). This completes the proof that the three definitions are equivalent to one another.

B Jacobi symbols
For any odd prime number q, the Legendre symbol is defined as For any odd integer b with a prime factorization b = k q α k k , the Jacobi symbol is the generalization of the Legendre symbol defined as The Jacobi symbol obeys the following identities for odd integers a, b, c

C 2d unitary chiral RCFT for Abelian 3d TQFT
In this Appendix we will show that every Abelian 3d TQFT corresponds to a 2d unitary chiral RCFT. Such unitary CFTs are generally not unique for a given TQFT and here we construct one example of them. The unitary RCFT is characterized by an extended chiral algebra of a product of chiral algebras of free compact bosons, free complex fermions, and SU (N ) 1 Wess-Zumino-Witten models. If the TQFT is a spin theory, then the RCFT is Z 2 -graded [9]. Every Abelian TQFT A can be expressed as an Abelian Chern-Simons theory 28 [27][28][29][30][31] (for a review see e.g. [32]). Denote the U (1) gauge fields by x 0 , x 1 , · · · , x n for some integer n, and the Chern-Simons action is k 4π x where k, q 0i are integers, and L[x 1 , · · · , x n ] denotes Chern-Simons terms independent of the gauge field x 0 . k, q 0i cannot be simultaneously zero for all i, since otherwise the theory has a decoupled gapless sector described by the dual photon of x 0 . If k = 0, there exists q 0i = 0 for some i, and the redefining x i → x i + x 0 produces nonzero k. Thus we can assume k is always nonzero without loss of generality. Consider the change of variables from x 0 , x 1 , · · · , x n to y 0 , y 1 , · · · , y n The Jacobian is |k| n . The theory A can thus be expressed as where the quotient denotes gauging a one-form symmetry Z n |k| , and A is an Abelian Chern-Simons theory with U (1) gauge fields y 0 , y 1 , · · · , y n . Substituting (C.2) into (C.1), we find the theory A has the Chern-Simons action where L[y 1 , · · · , y n ] denotes Chern-Simons terms independent of y 0 . Thus A = U (1) k ⊗ A for another Abelian Chern-Simons theory A with gauge fields y 1 , · · · , y n . By iteration, we find the Abelian TQFT A can be expressed as where the quotient denotes gauging a one-form symmetry Z that is a finite Abelian group, and k i are non-zero integers.
If all k i are positive, then the Abelian TQFT A corresponds to the extended chiral algebra of a product of compact bosons in 2d (the RCFT may be Z 2 graded).
If some of k i = −m i is negative, the corresponding U (1) −m i in A can be replaced by an SU (N ) Chern-Simons theory at level one using the duality 29 where for even m i the theory U (1) −m i is non-spin, and we omit a trivial TQFT such as (E 8 ) 1 in the duality.
For odd m i the theory U (1) −m i is a spin theory. On the right hand side of the duality (C.6) the theory {1, ψ} represents the almost trivial TQFT that has only two lines (of integer and half integer spins), and it includes the gravitational Chern-Simons term −2M i CS g for some positive integer M i = −m i mod 8. The almost trivial TQFT corresponds to M i free complex fermions in 2d.
Thus the theory A corresponds to the 2d unitary chiral RCFT (Z 2 graded if some k i is odd) given by the product of free compact bosons, free complex fermions, and SU (N i ) Wess-Zumino-Witten models at level one with N i given in (C.6) (or its extended chiral algebra when k i = −m i is even and negative). The Abelian TQFT A then corresponds to the 2d unitary chiral RCFT given by the extended chiral algebra (C.5) of the 2d unitary chiral RCFT of A.

D Gauging a general anomaly free subgroup
In order to simplify the discussion we will assume in this appendix that all the TQFTs are spin TQFTs.
A theory T with a Z N one-form symmetry with anomaly p can have multiple anomaly free subgroups. One of them is the Z L subgroup with L = gcd(N, p). In this Appendix, we will discuss gauging a larger anomaly free symmetry Z m , i.e.
It is anomaly free when pN/m 2 is an integer (recall that we discuss spin theories). Gauging this symmetry leads to T /Z m , which has a Z N one-form symmetry of anomaly p with They satisfy gcd(N , p ) = 1. Then we can further apply the generalized gauging operation with respect to this Z N one-form symmetry to find 3) The goal of this appendix is to show that this is the same as the answer in (2.35) Note, as a check that for L = m they are trivially the same.
We will use the canonical duality in (2.27) [36] T ←→ The second factor in the numerator can be described by the Lagrangian (2.14) xdy . In this dual description, the Z N one-form symmetry is entirely in the (Z N ) −pN factor and it is generated by b.
The duality allows us to only keep tack of the (Z N ) −pN factor in various procedures (and ignore the TQFT T ).
Gauging the anomaly free Z L subgroup in (Z N ) −pN is the same as redefining x as x = Lx and viewing x as a U (1) gauge field. This leads to (Z K ) −p K with K = N/L and p = p/L. Since gcd(K, p ) = 1, the theory (Z K ) −p K factorizes (2.26) where the first and second minimal theories are generated by b and c, respectively.
Then, gauging the anomaly free Z m ⊂ Z N (which includes Z L ) in (Z N ) −pN is equivalent to gauging the anomaly free Z m/L subgroup generated by b N/m in (Z K ) −p K = A K,p ⊗A K,−p . Only the first minimal theory is involved in the gauging, which reduces it to A N ,p with N = K(L/m) 2 = N L/m 2 and p = p/L. 30 This implies that The remaining global symmetry is Z N and it is carried by the second factor in the numerator. Applying the generalized operation with respect to this symmetry removes this factor 30 More generally, A M,r with gcd(M, r) = 1 is generated by a line z such that z M = 1 and the spin of z is r 2M . When M = M q 2 with M , q ∈ Z, it has a Z q anomaly free subgroup generated by z M q . (It is anomaly free because the spin of this line is r M 2 .) The gauged theory A M,r /Z q has M lines generated by z q (with (z q ) M = 1), whose spin is r E Two-form Z N gauge theory in 4d The 4d topological Z N two-form gauge theory of a gauge field B ∈ H 2 (M 4 , Z N ) has a continuum description [4, 1] where A is a U (1) one-form gauge field and B is a U (1) two-form gauge field. A constrains B to be a Z N two-form gauge field B → 2π N B. The theory has a one-form gauge symmetry Under the gauge transformation, the action is shifted by On a closed spin manifolds it is always a multiple of 2π, but on general closed manifolds it is a multiple of 2π only when pN is even. The parameter p has an identification of p ∼ p + 2N on non-spin manifolds and p ∼ p + N on spin manifolds.
The theory has L surface operators generated by and L genuine lines operators generated by (they are genuine line operators because they do not depend on the surface Σ). These operators and their correlation functions are identical to the ones in a Z L gauge theory, and they realize a Z L = Z N /Z K one-form symmetry. As we will discuss below, depending on N and p this Z L gauge theory could be twisted on nonspin manifolds.
This theory can arise as the low-energy approximation of a microscopic theory whose Z N one-form symmetry is spontaneously broken to Z K . Examples of such UV theories are a P SU (N ) gauge theory (discussed in Section 4) and the Walker-Wang lattice model [18,46,19].
There are also open surface operators generated by They are genuine line operators if the surface dependence is trivial, otherwise, the surface is physical and the operators can only have contact terms. Hence, we will not include them in the list of operators.
Two special cases are particularly interesting. First, for p = 0 this theory is the same as an ordinary Z N gauge theory. Here B implements the constraint that A is a Z N one-form gauge field.
The second special case is p = N . On a spin manifold, it is the same as p = 0, i.e. it is an ordinary Z N gauge theory. On a nonspin manifold, we must have pN ∈ 2Z so, p = N can happen only when N is even. Then, the action (E.1) is the same as π P(B) = π w 2 (M 4 ) ∪ B mod 2π , (E.9) where w 2 (M 4 ) is the second Stiefel-Whitney class of the manifold. This fact has some interesting consequences. First, it shows that the possible added term (E.9) on nonspin manifolds for even N was already included in our labelling by p = 0, 1, · · · , 2N − 1. Second, it makes it manifest that on spin manifolds we can identify p ∼ p + N . Finally, it shows that on a non-spin manifold, the theory with even p = N , which is an ordinary Z N gauge theory on a spin manifold, becomes a Z N gauge theory coupled to w 2 (M 4 ) of the manifold.
In the Z N gauge theory, the surface B is the world volume of a Z N magnetic string. It generates the one-form symmetry that acts on the Wilson lines in the Z N gauge theory. The coupling (E.9) is thus equivalent to turning on a background gauge field for this oneform symmetry B C = (N/2)w 2 (M 4 ) mod N . One consequence of this is that on a non-spin manifold, the basic Z N Wilson line, which corresponds to the microscopic line A, is attached to the surface 2π N B C = π w 2 (M 4 ). The surface represents an anomaly in the theory along the line and it implies that if we view this line as the worldline of a probe particle, this particle is a fermion [44,39]. The conclusion is that the theory with p = N for even N is a (twisted) Z N gauge theory with fermionic probe particles.
Another way to see this is as follows. w 2 (M 4 ) of a manifold is the obstruction to lifting the SO(4) tangent bundle to an Spin(4) bundle. Thus the background B C = (N/2)w 2 (M 4 ) modifies the symmetry to be Z gauge N × Spin(4) The quotient identifies Z 2 ⊂ Z gauge N with the Z 2 fermion parity symmetry (−1) F of the Lorentz symmetry. Thus the Z N Wilson lines in the odd-charge representations also transform under the fermion parity, and they represent fermionic probe particles.
Let us examine in more detail the path integral of the Z N gauge theory coupled to fixed w 2 (M 4 ) of the manifold. The path integral is performed over twisted Z N gauge fields as in the symmetry (E.10), which is an extension of the bosonic Lorentz group SO(4) by the Z N gauge group. The twisted Z N gauge field is a one-cochain a valued in Z N that satisfies δa = (N/2)w 2 (M 4 ) mod N . (E.11) The path integral sums over all possible a with fixed w 2 (M 4 ) of the manifold.
If N/2 is odd, Z N ∼ = Z N/2 ×Z 2 and the symmetry (E.10) is isomorphic to Z N/2 ×Spin(4). Another way to see this is that (E.11) implies w 2 (M 4 ) = δa mod 2 by reducing both sides to mod 2. On a general manifold w 2 (M 4 ) is non-trivial, and therefore the gauge field a cannot be defined everywhere. Indeed, near a surface operator insertion B that generates the one-form symmetry, the gauge field a is not well-defined: a Wilson line of a that links with the surface transforms by its one-form charge. For a similar discussion, see [47].
Let us return to generic p. On a spin manifold the theory is the same (up to a geometric counterterm) as a Z L gauge theory [1]. On a non-spin manifold the situation is more interesting. For odd N the equivalence to a Z L gauge theory is still true [1]. However, for even N a new subtlety occurs, which is related to (E.9). The computation in [1] can be interpreted to mean that when both K = N/L and p/L are odd (which can happen only when both N , p, and therefore also L are even), or equivalently, when pN/L 2 is odd the equivalent Z L gauge theory is actually a twisted theory as mentioned above. In terms of a Z L two-form gauge field, its action is Similarly, the basic line operator in the Z L gauge theory corresponding to exp(i KA) also represents a fermion when pN/L 2 is odd.
This discussion of odd pN/L 2 is consistent with our 3d analysis in Section 2.4, where we saw that in this case the generating line of the Z L one-form symmetry is a fermion and the 3d theory has a mixed anomaly between the Z L global symmetry and gravity (E.12).
Next, consider the Z N two-form gauge theory on a manifold with a boundary [4,1]. 31 We choose the Dirichlet boundary condition B| = 0. This explicitly breaks the one-form gauge symmetry on the boundary so the line V = exp(i A) is liberated there and it satisfies where γ, γ ∈ ∂M 4 and (γ, γ ) is the linking number of γ and γ . When L = gcd(N, p) = 1, the bulk theory is trivial and the N lines generated by V form the minimal Abelian TQFT A N,−p that has a Z N one-form symmetry of label p. For general L, V = V K can smoothly move into the bulk so it has trivial braiding. Therefore the lines on the boundary do not form a modular TQFT. However, we can perform a quotient with the bulk lines generated by V to find an effective 3d TQFT A K,−p/L . If K, p/L are odd, the line V has half-integer spin so from the boundary perspective, V can only be taken as ψ the transparent spin-half line and the 2K lines generated by V form a consistent spin TQFT A K,−p/L .

F Minimal TQFTs for general one-form symmetries
In this Appendix, we generalized the previous discussion to a general discrete one-form symmetry A = Z N I .
We start with an arbitrary TQFT with one-form global symmetry Z N I and analyze its symmetry lines, as in the introduction and in Section 2.1. Each Z N I factor is generated by a line a I . The symmetry group means that they satisfy the mutual braiding 31 Some examples were considered in [46,19] in the context of the Walker-Wang lattice model. The one-form symmetry A = Z N I is characterized by the symmetric integral matrix p IJ that satisfies p II ∼ p II + 2N I and p IJ ∼ p IJ + N IJ for I = J .  (1)).
An example of a TQFT that has the one-form symmetry A = Z N I characterized by p IJ is the Abelian Chern-Simons theory The symmetry lines in L = ker M have trivial braiding with all the symmetry lines in A. Thus the braiding (F.5) is degenerate if and only if L is non-trivial. If L is trivial, the symmetry lines form a modular 3d TQFT, and we will call it the minimal Abelian TQFT for the one-form symmetry A, denoted by A {N I },{p IJ } . An example is the (Z N ) 0 theory that corresponds to the minimal theory with N 1 = N 2 = N , p 11 = p 22 = 0 and p 12 = p 21 = 1.
Next we discuss the anomaly for the one-form symmetry A. From an argument similar to that in Section 2.4, the anomaly is characterized by the symmetric matrix p IJ , and can be described by the following 4d term with background two-form gauge fields B C ∈ H 2 (M 4 , A): 2π P h (B C ) = 2π where on the left hand side P h is the generalized Pontryagin square with the quadratic function h that maps a line in A to its spin (F.3) (for a review see e.g. [39]). On the right hand side we express the anomaly in the basis {a I } for A, and B I C ∈ H 2 (M 4 , Z N I ) are the components of B C in this basis.
Let us use the anomaly (F.8) as the bulk action and promote the gauge field B C to be a dynamical gauge field B. The theory has surfaces given by the fluxes of B, and magnetic lines, both are described by the group A with the group multiplication given by the fusion of operators. As we will see, some of the operators have trivial correlation functions, and they should not be included in the list of non-trivial operators. The equation of motion for the gauge field B in (F. Note that these K and L generalize the groups Z K and Z L in the case A = Z N that we have been discussing throughout most of this paper. We can also study the bulk theory in the continuum description. On an open manifold with the choice of boundary condition B I | = 0, the gauge symmetry (F.11) is completely broken on the boundary and all the bulk lines are liberated there. Their braiding is the same as (F.5) with p IJ → −p IJ (see Appendix E for a similar calculation). If L is trivial, they form a modular TQFT A {N I },{−p IJ } . Otherwise, the bulk lines associated to L have trivial braiding and we can only find an effective boundary theory consisting of the lines in A/L by modding out by the bulk lines.
Alternatively, as in the main text we can consider the boundary condition B I | = 0. To do this, we start with a 4d-3d system with an SPT phase (F.8) in the bulk and a 3d TQFT T on the boundary that has an anomalous one-form symmetry coupled to the classical gauge fields (B C ) I , and the anomaly is cancelled by the inflow. We can then promote the gauge fields to be dynamical. When L is trivial, the bulk dynamics is trivial and there is a meaningful boundary theory It is obtained from T by removing all lines that are not invariant under the one-form symmetry. When L is non-trivial, the theory above is not modular, and we can find an effective boundary theory as a quotient by the transparent bulk lines associated to L. The discussion can be generalized easily to interfaces.