Line operators of gauge theories on non-spin manifolds

We study four-dimensional gauge theories on oriented and non-spin spacetime manifolds. On such manifolds, each line operator arises only either as a boson or a fermion. Based on physical arguments, a method of systematically assigning spin labels to line operators is proposed, and several consistency checks are performed. This is used to classify all possible sets of allowed line operators — including their spins — for gauge theories with simple Lie algebras. The Lagrangian descriptions of the theories with these sets of allowed line operators are given. Finally, the one-form symmetries of these theories are studied by coupling to background gauge fields, and their ’t Hooft anomalies are computed.


Introduction
Line operators in four-dimensional gauge theories are important observables which can be used to classify phases of gauge theories. Wilson lines -worldlines of heavy electrically charged particles -obey an area law in a confining phase, while its magnetic analogs, 't Hooft lines -disorder operators which can be thought of as worldlines of magnetic monopoles -obey an area law in a Higgs phase [1,2]. While the gauge algebra of a four-dimensional gauge theory fully determines its local operators, it does not fully determine its line operators. Possible line operators are associated to representations of the gauge algebra and its GNO (Langlands) dual [3,4], and constraints from locality requires that only a subset of possible operators is allowed. In abelian theories, the charges of line operators have to satisfy the Dirac-Schwinger-Zwanziger quantization condition [5][6][7], and in non-abelian theories they have to satisfy its generalization [8]. Different subsets of allowed line operators correspond to different gauge groups and Lagrangians corresponding to the same gauge algebra.
In addition to their charges, line operators also carry quantum numbers under the spacetime symmetries, transforming under the little group of the Poincaré symmetry. On oriented manifolds, this is the group SO(3) r of spatial rotations, whose projective representations are labeled by the spin, and line operators can be either bosonic or fermionic. However, for non-spin manifolds, there is no spin structure so one cannot define chargeless fermionic lines (worldlines of heavy neutral fermions). Equivalently for a line operator of a given charge, we cannot have both fermionic and bosonic lines, since they could fuse to produce a chargeless fermionic line. However, the existence of charged fermionic lines on such manifolds is allowed and does not require a spin structure. For instance, in the pure U(1) gauge theory the dyon is a fermion [9][10][11] and the theory does not depend on a spin structure. Therefore on non-spin manifolds, the classification of gauge theories requires the specification of the spin of each allowed line operator, i.e. a spin/charge relation. 1 In contrast, on spin manifolds the classification does not depend on the spin, since for any charge there are both bosonic and fermionic lines. This is because the chargeless fermionic lines can be fused with any line in the theory to produce another one with the same charge but different spin. Therefore, on spin manifolds, lines are labeled only by their charges and were classified in [24] for all simple Lie groups. The purpose of this paper is to classify line JHEP04(2020)087 operators on oriented but non-spin manifolds, which amounts to consistently specifying the spins of all allowed lines in the theory.
Similarly, on non-orientable spacetime manifolds, we can measure the Kramers properties of Wilson-'t Hooft lines. In this article, we focus on oriented spacetime manifolds and leave the unoriented case for future work. For the case of abelian gauge theories, this classification was previously done in [25,26].
Gauge theories have dynamical particles of spin 1 -the gauge bosons -and hence the spins of line operators are only measurable, at long distances, modulo 1. Therefore, the theory has line operators labelled by their electromagnetic charges, as well as their spins modulo 1 -that is, whether the line operators are bosonic (integer spin) or fermionic (half-integer spin).
Because of the angular momentum of the gauge field, a bound state of two bosonic dyons can be a fermion. For instance, in U(1) gauge theories the bound state of a bosonic electron and a bosonic magnetic monopole of minimal charge is a fermion. More generally, the angular momentum J 3 , stored in the gauge fields is given by the Dirac pairing between the two dyons where Q i e and Q i m are their electric and magnetic charges. The Dirac quantization condition can be derived by requiring the angular momentum stored in the gauge field to be half-integer, or equivalently the Dirac pairing between any two dyons to be an integer. For a non-abelian gauge theory in the Coulomb phase, it turns out that there is a non-abelian version of the Dirac pairing between line operators which measures the angular momentum stored in the gauge field, see appendix B. Motivated by this, we conjecture a way to determine the spin of every allowed line operator, given the spins of two generating lines.
For a non-abelian gauge theory based on Lie algebra g, the set of line operators are specified by the Weyl orbit of a weight-coweight pairs w = (ν, µ ∨ ) ∈ Λ w × Λ cw , (1.2) where Λ w and Λ cw are the weight and coweight lattice of g [4]. Wilson lines are labeled by the Weyl orbit of a weight ν ∈ Λ w which specifies the highest weight of the corresponding representation. Similarly, the 't Hooft lines are labeled by (the Weyl orbit of) a coweight µ ∨ ∈ Λ cw which specifies the corresponding GNO charge. The Dirac pairing between two dyonic lines is defined by The Dirac quantization condition requires the Dirac pairing to be an integer. Let s w be the spin of a line (0 for boson and 1 for fermion) whose weights is given by the Weyl orbit of w ∈ Λ w × Λ cw . We propose that given the spins of lines with weights w, w ∈ Λ w × Λ cw , the spin of the line with weight w + w is s w+w = s w + s w + w, w D (mod 2Z) . (1.4)

JHEP04(2020)087
We further require that the lines whose weights are pure (co)roots to be bosonic, since they correspond to (dual) gluons. In other words, the lines with weights of the form (α, 0) and (0, α ∨ ), where α ∈ Λ r and α ∨ ∈ Λ cr , should be bosonic. We provide various checks for our proposal. As was showed in [24], for a given group G, there are several theories with different generating lines. These theories differ by theta terms, discrete or continuous. The definition of the later on non-spin manifolds, requires a quadratic refinement [27]. We show that our proposal is consistent with a quadratic refinement of the discrete theta terms, which we study in detail. These theta terms were determined recently in [28], and our proposal is in complete agreement.
Another check is provided by the Higgsing of a theory with gauge group G down to its maximal torus by adding an adjoint Higgs field. In appendix B, we show that after Higgsing, the proposal (1.4) correctly produces the spins of line operatros in U(1) theories. Furthermore, in appendix C, we show that the S and T orbtits for SU (2) theories reduce to those of U(1) theories [25,26]. In appendix D, we provide an additional cohomological check of our proposal.
The remainder of the paper proceeds as follows. In section 2, we review the classification of abelian charge lattices on non-spin manifolds as a warm up. There are four such theories that we denote by W b T b , W b T f , W f T b and W f T f . The last one is typically referred to as all-fermion electrodynamics and has a gravitational anomaly. We give the UV-completion of all these theories in terms of the Georgi-Glashow model. The Georgi-Glashow model with certain matter whose effective theory is the W f T f theory, exhibits the new anomaly discussed in [16]. We also give the action of S and T transformations.
In section 3, we present our proposal for consistently assigning spin labels to every allowed line operator. For a given gauge group G, only a subset of lines satisfying the Dirac quantization condition is allowed, and typically, there are several such sets. For each set, we give the list of requirements which has to be satisfied when assigning spins to lines in the theory. For each set of lines with a given spin, we give a Lagrangian realization and show that our proposal is equivalent to a quadratic refinement of the discrete theta terms. We further define the action of the T -transformation on the weights of the lines, which we use to determine the SL(2, Z) orbits.
In section 4, we apply our proposal for all simple Lie groups with non-trivial center. We present a complete classification of their charge lattices including the spins of allowed lines. For each case, we give the discrete theta terms and show which theories are related by a T transformation.
In section 5, we consider the couplings to background gauge fields for the one-form symmetry. We review the mixed 't Hooft anomaly in the abelian Maxwell theory. We then consider non-abelian Yang-Mills theories. We show how gauging subgroups of the discrete one-form symmetries yields different theories with the same algebra. This procedure relates all theories in the same family. We further study the requirements for the absence of mixed anomalies for non-abelian theories and we find new anomalies for center gauge groups.
Finally, in the appendix we have included additional material to the main discussion of the paper. In appendix A, we fix our conventions about Lie algebras. In appendix B, we perform a consistency check by adding adjoint Higgs fields to the non-abelian theories JHEP04(2020)087 and flow to abelian theories. In appendix C we give two examples of S and T orbits for the groups SU(2) and SU (4). In appendix D, we present a cohomological check of or our proposal. In appendix E we fix a normalization for the continuous theta term for any group G. Lastly, in appendix F we discuss the relation between discrete and continuous theta parameters, in terms of torsion characteristic classes of G.

Abelian theories
As a warm up, we review the classification of U(1) gauge theories on arbitrary oriented four-dimensional Riemannian spacetime manifolds. These spacetime manifolds are only required to carry an orientation and a metric -not, for instance, a spin structure. A given theory has a maximal set of line operators that are mutually local, i.e., satisfying the Dirac-Schwinger-Zwanziger (DSZ) quantization condition where Q i e and Q i m are the electric and magnetic charges of two line operators. Apart from these charges, the line operators can be in different representations of the spacetime symmetries, in particular the (−1) F symmetry. But before studying the properties of the lines under the spacetime symmetries, we first study the electric and magnetic charges of the lines.

The electromagnetic charge lattice
We denote the electric and magnetic charge lattice of the theory as Λ. In complex coordinate, Λ consists of points z = Q e + iQ m , where Q e and Q m are the electric and magnetic charges of some line operator in the theory. Requiring the DSZ quantization condition, the closeness of the OPE of lines operators, and CPT invariance of the theory, the charge lattice has to satisfy It is easy to see a maximal lattice that satisfy these conditions must be generated by the two closest point to the origin which we denote as z 1 and z 2 , i.e. Λ = {n 1 z 1 + n 2 z 2 |n 1 , n 2 ∈ Z}. However, for U(1) theories with a Lagrangian description, there is always the electric excitation of charge Q e = e, where e is the coupling constant of the theory. This particle corresponds to the fundamental Wilson line W (γ) = exp(i γ A), where A is the U(1) connection. Hence we can set z 1 = e and furthermore to satisfy (2.2), we can parametrize z 2 such that and z 2 is the charge of the fundamental monopole (dyon), which corresponds to the fundamental 't Hooft line. A priori θ is a parameter allowed by the DSZ condition and JHEP04(2020)087 momentarily we will relate it to the Lagrangian description of the theory. Thus all the possible charge lattices are labeled by τ , where Λ τ = { (n + mτ )e | n, m ∈ Z} and it is generated by the fundamental Wilson line W and the fundamental 't Hooft line T . The point (n + mτ )e ∈ Λ τ corresponds to the Wilson-'t Hooft line of the form W n T m , which we denote as (n, m) and its electric and magnetic charges are given by If we ignore discrete spacetime symmetries, the charge lattice Λ τ classifies all the U(1) theories on spin manifolds, and we could write a local Lagrangian for these theories as where we have identified the charge lattice label τ with the coupling constant and the theta angle of the theory. Indeed in such a theory, the fundamental monopole has electric charge θ 2π e because of the Witten effect [29].

Oriented U(1) gauge theories
Now that we have identified the charge lattice, to classify different theories it is enough to label the generating Wilson and 't Hooft lines W s and T s with their spins s. There are four possibilities: , and W f T f . However the last theory W f T f , also known as the "all-fermion electrodynamics", has a gravitational anomaly [30][31][32]. In section 2.4, we give UV completions of all these four theories. In the Lagrangian description, the first two theories correspond to U(1) gauge theories and the second two correspond to Spin C (4) := Spin(4) × Z 2 U(1) theories, where we have a Spin C (4) connection instead of a U(1) connection [12,13,26]. Hence we get the following theories with their generating lines as where the labels b and f stand for boson and fermion. Note that the properties of the Wilson and 't Hooft lines, uniquely determine those of the other lines by fusion, or taking bound states if we think of the lines as world line of heavy classical particles. For instance, the line (n, m) is the bound state of n Wilson lines, and m 't Hooft lines. The quantum numbers of this bound state is the sum of quantum numbers of the individual lines plus the quantum numbers of the electromagnetic field. The electromagnetic field carries a non-trivial quantum number only when there is a minimal pairing between the (n, 0) and (0, m) lines [9][10][11], i.e. nm ≡ 1 (mod 2Z). In that case, the non-trivial quantum number is a half-integer angular momentum. For instance, in the U(1) b = W b T b theory the dyon (1, 1) is a fermion, hence (1, 1) f .

S and T transformations
In this section we define the action of S and T transformations on the oriented U(1) theories, by defining a map on the line operators of these theories. We define the maps by their action on the (n, m) s labels denoting the Wilson-'t Hooft line W n T m with spin s. Define the action of S and T on the line operators as which leaves the spins invariant. These transformations map the line operators of the oriented U(1) theories to each others. In particular we get the following maps and the line operators of the Spin C f theory is mapped to itself. However if we also act on the coupling constant τ as then S and T become duality transformations (up to gravitational SPT phases) [13,33].
In particular, for the T -transformation we get a duality between U(1) τ f and U(1) τ +1 b , that is shifting θ by 2π is equivalent to changing the spin of the monopole 2 [16,26,31,34]. Altogether, we get the identifications Thus there are only two classes of physically distinct theories that are not related by continues deformations -the anomalous and the non-anomalous theories -and hence we have the following SL(2, Z) orbits Here we comment on the Ultra-Violet completions of the oriented U(1) theories we discussed so far. Physically line operators correspond to world line of heavy particles. Therefore to realize microscopic descriptions of these theories, we must provide UV completions where for each line operator there is the corresponding dynamical particle of the same quantum numbers. The fundamental Wilson line can be UV completed by just adding ordinary matter fields of electric charge 1. The only non-trivial part is the UV completion of the 't Hooft lines as dynamical monopoles [35,36]. This can be done by the 't Hooft-Polyakov monopole, which is a classical solution of the Georgi-Glashow model [37]; for review see [38,39]. The Georgi-Glashow model is an SU(2) gauge theory with a scalar Higgs field in the adjoint representation of the gauge group. The 't Hooft-Polyakov monopole is a soliton of finite mass, spin 0, and unit magnetic charge in the topological sector of the theory. Therefore the U(1) b and Spin C b theories can be UV completed by such solutions where there is a dynamical bosonic monopole. Also note that we have the relation U(1) θ f = U(1) θ+2π b , therefore to UV complete the U(1) f theory we just need to add a θ SU(2) = π term in the Georgi-Glashow model as we have the relation with the theta angle in the U(1) theory after Higgsing.
The only remaining theory to discuss is the anomalous Spin C f theory which was recently studied in [16]. The UV completion is the Georgi-Glashow model with an additional Weyl fermion of isospin 3 2 which is coupled to the Higgs field via a Yukawa coupling. As it was discussed in [16], the UV theory also has a gravitational anomaly. The additional Weyl fermion gives fermionic zero modes to the 't Hooft-Polyakov monopole solution which makes it a fermion. Hence all of the oriented U(1) theories can be given a microscopic description.

Wilson-'t Hooft operators and spin
We move on to classify non-abelian gauge theories on oriented spacetime manifolds. In this section, we present and give some justification for our proposal, and give an explicit recipe for constructing the actions of these theories. In the next section, we apply the proposal to each simple Lie group, finding agreement with results in the literature. When the spacetimes are also required to carry spin structures, such a classification was previously carried out in [24]. Here, we extend that discussion to oriented and non-spin manifolds.
As we discussed in the introduction, on non-spin spacetimes the line operators, apart from their electromagnetic charges, are labelled by their spins modulo 1 -that is, whether the line operators are bosonic (integer spin) or fermionic (half-integer spin). Mutual locality restricts the set of allowed line operators in a given gauge theory to a maximal set satisfying the Dirac quantization condition. This information can be expressed in terms of a charge lattice decorated with spin labels (boson or fermion).

Line operators
We begin by reviewing line operators in gauge theories defined on spin spacetime manifolds, following [24]. Consider a four-dimensional gauge theory with a simple gauge algebra g. Fix a Cartan decomposition t ⊂ g and let Λ r ⊂ Λ w ⊂ t * be respectively the root and weight lattices, and t * the dual Cartan algebra. We denote by W the Weyl group. Wilson lines are labelled by representations of g, which are in bijective correspondence with elements of the Weyl chamber Λ w /W -the highest weights. 't Hooft lines are disorder line operators defined by removing the line from spacetime and imposing boundary conditions on a tubular neighborhood around the line. They are labelled by the dual Weyl chamber Λ cw /W, where Λ cw ⊂ t is the coweight lattice. 3 More generally, dyonic Wilson-'t Hooft lines are classified by weight-coweight pairs where [ν, µ ∨ ] W is the Weyl orbit of (ν, µ ∨ ) ∈ Λ w × Λ cw . Not all line operators are allowed in a given theory. They are restricted by a non-abelian version of the Dirac-Schwinger-Zwanziger quantization condition [4,8], which says that the Dirac pairing between any two allowed lines w = (ν, µ ∨ ) and w = (ν , µ ∨ ) in a given theory must be integral: Here, ·, · is the pairing induced from the inclusions Λ w ⊂ t * and Λ cw ⊂ t and the natural pairing between t and t * = Hom(t, R/Z). This condition is required for the locality of the correlation function between the two line operators, in that the correlation function should remain invariant when the first line operator is transported along a closed surface linking the second line. In the Coulomb phase, this is equivalent to requiring the electromagnetic field between two dyons to have half-integer angular momentum. The gauge theory contains dynamical adjoint-valued gauge bosons, whose worldlines are labelled by the adjoint representation. Therefore, any line labelled by the sum of an allowed weight with the highest weight of the adjoint representation must itself also be allowed. In other words, it suffices to check the quantization condition (3.2) on the quotient by the root and coroot lattices where Z(G) is the center of the simply connected Lie groupG corresponding to g. 4 A maximal subset of lines obeying the condition (3.2), as well as closure under fusion, corresponds to a subgroup L ⊂Ẑ(G) × Z(G) for which the pairing w, w is integral -in other words, a subgroup which is Lagrangian with respect to the pairing e 2πi w,w [24].

JHEP04(2020)087
In this article, we shall consider gauge theories on oriented, but not necessarily spin, spacetime manifolds. As we discussed in the introduction, the main novelty is that without a spin structure, there is a spin/charge 5 relation and a line operator of given (gauge) charge has definite spin (bosonic or fermionic). This is because, if there exist two line operators of same charge (weights) but different spin, one of them could fuse with the CPT reversal of the other line to produce a neutral fermionic line. But existence of such chargeless fermions (worldlines of gauge singlet fermions) requires a spin structure. To find the possible spin/charge relations, first, we consider the spins of line operators resulting from the fusion of two line operators. Upon fusion, the resulting line generically sits in a reducible representation, and the fusion rules are specified by a complicated operator product expansion (OPE) whose exact form is known only in cases with sufficient supersymmetry [8,[40][41][42][43][44]. We will not need any details of the OPE -the only fact used in this article is that the fusion of line operators [ν, 6 We propose that the angular momentum stored in the electromagnetic field of the two dyons w and w is which is integral or half-integral (multiple of ) depending on the value of the Dirac pairing Fusing two dyonic lines with the same spin (boson-boson or fermion-fermion) and odd mutual pairing produces fermionic dyons, while fusing two lines of opposite spins (bosonfermion) and odd pairing produces bosonic dyons. For even paired dyons, the converse holds. This implies that fusing a line operator with a dynamic gauge boson may change the parity of the pairing (3.5), so a line dressed with even or odd numbers of gauge bosons can remain distinguishable at long distances. On the other hand, shifting ν (µ ∨ ) by twice a root (or coroot) does not change the parity of the pairing and hence preserves spin. Hence, on non-spin manifolds, we propose that the quantization condition (3.2) needs to be checked on the charges modulo twice of the root and coroot lattices. To classify the allowed sets of line operators, and therefore all the possible theories with the same Lie algebra, on a spacetime without spin structure, we consider subsetsL ⊂Λ of the quotient together with a function s :L → Z 2 , which specifies the spin of each line operator (0 for boson and 1 for fermion). As line operators are labelled by Weyl orbits, we demand the value of s to be the same on each Weyl orbit ofL. Furthermore, the data (L, s) should satisfy the following conditions: 5 Here the charge is the gauge charge, which is the weight-coweight pair labeling JHEP04(2020)087 1. As in [24], the set of allowed line operatorsL ⊂Λ should be closed under fusion, and be maximal. In other words, it must once again be a subgroup ofΛ which is Lagrangian with respect to the pairing e 2πi w,w defined in (3.5). Note that Lagrangian subgroupsL ⊂Λ are in one-to-one correspondence with Lagrangian subgroups L ⊂ Λ Λ / ((Λ r × Λ cr )/(2Λ r × 2Λ cr )). Indeed, roots have integer Dirac pairing with all weights, thus every Lagrangian subgroupL always includes all roots. The main difference between considering L andL is that the pairing (3.5) is defined modulo integers on L, but is defined modulo even integers onL. Moreover, the pairing is odd when there is a half-integer angular momentum contribution from the chromodynamic field to the spin, and it is even when the contribution is integral.
2. As discussed above, pure gluons and dual gluons in a gauge theory are bosonic, so we require that s maps elements of the form (α, 0) and (0, α ∨ ) to zero, where α ∈ Λ r /2Λ r and α ∨ ∈ Λ cr /2Λ cr .
3. The labeling s must be consistent with the fusion rule of two lines taking into account the angular momentum contribution from the chromodynamic field: That is to say, the line w + w arising from the fusion of two lines with weights w and w has spin given by the sum of the spins of the individual lines and the contribution from the angular momentum of gauge field, which is 1 2 w 1 , w 2 D (mod Z).
As a consistency check, we should make sure that the condition (3.7) is consistent with s being constant on Weyl orbits. Indeed, this follows from the pairing (3.5) being invariant under a Weyl transformation Based on these consistency conditions, in order to classify possible weights and spins (L, s) of gauge theories, it is sufficient to study the set of lines generated by some fundamental Wilson and 't Hooft lines. We denote them respectively as W (γ) and T (γ) that have supports on a line γ in the spacetime. We choose their weights to be some specific weight ν • ∈ Λ w and coweight µ ∨ • ∈ Λ cw , which we define them specifically in a later section. More precisely, we denote the Wilson-'t Hooft lines and also label them by the pair of integers (n, m). However, not all of these lines are genuine in a given theory, but to determine the theory it is enough to know the spins of the genuine lines of this form.

Lagrangian formulation and discrete theta terms
Spin manifolds. In this section, we review the Lagrangian formulations of the gauge theories considered above, with line operators labelled by (L, s). As a warm up, we begin JHEP04(2020)087

1-form Charges Symmetry group
Electric Table 1: The relation between Γ e , Γ m , the (co)weight lattices Λ G , Λ cG , and the one-form symmetries and charges of the plain G =G/Γ m gauge theory. In particular Γ e = Z(G) is the electric one-form symmetry group (also known as the center symmetry), and Γ m = π 1 (G) is the group of magnetic charges carried by the 't Hooft lines, which was denoted Γ in [27].
with spin spacetime manifolds, where the choice of lines is completely determined by L, which is the projection ofL ⊂Λ onto Λ =Ẑ(G) × Z(G). This will largely be a review of [24], but will also serve to introduce notation used in the rest of this paper. Let Γ m denote the projection of L onto Z(G). The gauge group of the theory is G :=G/Γ m . Let Γ e := Z(G) denote the center of the gauge group. The center Z(G) of the universal covering group and the group of line operators L sit in the following two extensions 7 To see (3.11), note that the line operators with trivial magnetic charge -Wilson linesmust be representations of G, and therefore sit inΓ e =Ẑ(G) ⊂Ẑ(G). In terms of the (co)weight lattices,Γ e = Λ G /Λ r and Γ m = Λ cG /Λ cr are the electric and magnetic charges of the Wilson and 't Hooft lines respectively for the G gauge theory not coupled to any TQFT, i.e. without any discrete theta term (see table 1). There are generically many theories with the same gauge group G, which differ from each other by discrete theta terms. We now describe these terms. Lagrangian subgroups L ⊂ Λ projecting onto Γ m ⊂ Z(G) are in one-to-one correspondence with bilinear forms η : Γ m × Γ m → R/Z on Γ m [27]. This can be seen explicitly as follows: taking (3.11) and the dual of (3.10), notice that L arises as the pullback with respect to some homomorphism η : Γ m →Γ m , or, equivalently, a bilinear form η : Γ m × Γ m → R/Z. In other words, the maximal subgroup labeling the lines is The extension (3.10) can be viewed as the decomposition of the one-form symmetry group of theG gauge theory into the subgroup Γm and the quotient Γe = Z(G)/Γm. In section 5.2.5, we will see that gauging the Γm symmetry yields the G =G/Γm gauge theory with emergentΓm one-form magnetic symmetry.

JHEP04(2020)087
whereî :Ẑ(G) →Γ m is the projection map dual to the inclusion i : Γ m → Z(G). Physically, this means that the electric charge of a line with magnetic charge µ ∨ must project onto η(µ ∨ ). The desired discrete theta term is then where b m ∈ H 2 (M, Γ m ) is the Brauer class 8 of the gauge bundle, σ : Γ m → R/Z is a quadratic refinement 9 of η, and P σ : is the Pontryagin square 10 operation corresponding to the quadratic form σ [27,45]. On a spin manifold, the discrete theta term (3.14) is independent of the choice of quadratic refinement σ (and depends only on η). This gives the complete relation between (1) the set of allowed line operators L of the theory, (2) the bilinear form η, and (3) the discrete theta term (3.14) in the Lagrangian formulation. As an example, consider G = SO(3), for whichG = SU(2) and Γ m = Z(G) = Z 2 . On a spin manifold, there are two distinct choices of line operators, including either the magnetic line They correspond respectively to the bilinear forms η 0 , η 1 : Each bilinear form has two quadratic refinements, given respectively by The corresponding discrete theta terms are, respectively, , establishing that the discrete theta terms are not dependent on the choice of quadratic refinement. The discrete theta terms (3.16) may be more familiar to the reader expressed in terms of continuum gauge fields [46,47] 1 The Brauer class is the characteristic class of the G =G/Γm bundle corresponding to the group In the physics literature, this is sometimes called the second Stiefel-Whitney class, because the Brauer class coincides with the second Stiefel-Whitney class for the frame bundle, where G is SO(d) andG is Spin(d). 9 A quadratic refinement σ : Γm → R/Z of a bilinear form η : . 10 The Pontryagin square is usually defined as a map P : the universal quadratic group of an abelian group Z. The universal quadratic group is an abelian group equipped with a quadratic function γ : Z → U(Z), with the property that any quadratic function q : Z → A taking values in any abelian group A (in this paper, A = R/Z) factors through γ, i.e. there exists q : U(Z) → A such that q =q • γ. (See e.g. the appendix of [45] for more details.) Then, we define Pq as q * P :

JHEP04(2020)087
where a is a one-form U(1) gauge field,b is a two-form gauge field and f is a two-form Lagrange multiplier enforcing the constraint thatb is a Z k gauge field. The extra factor of (1 − k 2 ) is to insure the gauge invariance of (3.17) under which is equivalent to p(1 − k 2 )k being even. For even k this factors drops out and pk is indeed even, but for odd k this is necessary to make pk even. Integrating out f and a, and making the replacement kb/2π = b m yields the discrete theta term The second term is required since the cup product is not supercommutative at the level of cochains [46]. In the example of SO(3) above, k = 2 and σ • = σ 1 .
Non-spin manifolds. On non-spin manifolds, different quadratic refinements yield distinct discrete theta terms. This is expected, since there is more information contained in the line operators (L, s) of a non-spin gauge theory, which determines the appropriate quadratic refinement, and hence discrete theta term (3.14) in the Lagrangian formulation.
Consider first the situation where all purely electric line operators are bosonic, s(w) = 0 for all w ∈L of the form w = (ν, 0). (This corresponds to the gauge group being G rather than Spin -G := Spin(4) × Z 2 G.) We claim that the relation between the set (L, s) of allowed line operators and the quadratic function σ : Γ m → R/Z is given by where (ν, µ ∨ ) ∈L is the weights of any allowed line, and [µ ∨ ] ∈ Λ cw /Λ cr denotes the mod Λ cr reduction of the coweight µ ∨ ∈ Λ cw , similarly [ν] ∈ Λ w /Λ r denotes the mod Λ r reduction of the weight ν ∈ Λ cw . Note that ν, µ ∨ is defined modulo 2, so the above definition is single-valued. It can be checked that the right hand side is independent of the choice of representative µ ∨ as well as choice of line (ν, µ ∨ ), and furthermore that σ is a quadratic refinement of η, using the conditions we imposed on (L, s) above. We carry out these checks explicitly below.
In the general case, purely electric line operators are not required to be bosonic. In the Lagrangian description, this corresponds to also allowing the gauge group to be Spin -G := Spin(4) × Z 2 G, where Spin(4) is the Lorentz group of the spacetime manifold. In order to account for this, we require σ to be extended to a functionσ : L → R/Z defined on all of L, as follows 11σ Now, s(ν − ν, 0) = 0 according to condition 2, as different representatives differ by a root. This shows that σ is independent of representative of [ν]. A similar argument can be given for [µ ∨ ].

JHEP04(2020)087
Note thatσ is a quadratic refinement of η trivially extended to L × L as (One can check that η defined this way does not actually depend on ν and ν , and coincides with the η defined above corresponding to L.) Indeed, this follows immediately from the conditions (3.7) sincẽ The discrete theta term corresponding to the generalized quadratic refinement (3.22) is is a dynamical cocycle generating the one-form symmetry -discrete analog of the symmetry current. b can be related to the Brauer class b m ∈ H 2 (M, Γ m ) mentioned above, as well as another class b e ∈ C 2 (M,Γ e ) via the decomposition is the extension class of L. In practice, the discrete theta term will only involve a Z 2 subgroup ofΓ e , and we only need deal with a mod 2 reduction of b e . 12 b e is only turned on when there are fermionic pure electric lines, identifying the Z 2 subgroup of the gauge group with (−1) F and imposing a spin/charge relation on the theory. In the simple case where L is a direct productΓ e × Γ m , b e is closed, and the discrete theta term can be written explicitly in terms of the conserved cocycles b e and b m as where s is the spin of any pure electric line generating Γ e , and σ isσ restricted to {0}×Γ m . By integrating out b e , it can be explicitly seen that this coupling turns the gauge group from G to Spin -G = Spin(4) × Z 2 G when s = 1.
As an example, take again the example of G = SO (3), focussing on the case where the line operator is magnetic, which we denoted by L 0 above. Corresponding to L 0 , there are two possible assignments of spins s onL 0 . Identifying Λ cw /2Λ cr Z 4 , we denote the lines asL (3.29) The two possible assignments are s (1) assigning (2, 1 ∨ ) and (2, 3 ∨ ) to be fermionic and all other lines to be bosonic, or s (2) assigning (0, 1 ∨ ) and (0, 3 ∨ ) to be fermionic, and all JHEP04(2020)087 other lines bosonic. These theories are denoted as SO(3) 0,b and SO(3) 0,f in the discussion around (4.26) and correspond respectively to the two quadratic refinements of the bilinear form η = η 0 (1 ∨ , 1 ∨ ) = 0. Therefore, the corresponding discrete theta terms are 0 , 2π respectively, recovering the result that the discrete theta term π b m ∪ w 2 (T M) changes the spin of the magnetic lines.

T transformations
Some theories with the same gauge group but different discrete theta terms can be related to one another by shifts of the usual continuous theta angle 13 A discrete theta term (3.14) changes the set (L, s) of line operators of a theory [24], while the continuous theta term (3.32) does not change the charge lattice. Nevertheless, in some situations, instantons fractionalize and the periodicity of θ is increased. 14 When this happens, shifting θ by 2π becomes equivalent to adding a discrete theta term. 15 More precisely, a theory (with a given discrete theta term) at θ = θ 0 is dual to another theory (with a different discrete theta term) at θ = θ 0 + 2π. We refer to the duality map between the two theories as the T transformation where G θ p denotes the theory with gauge group G with parameter θ and discrete theta parameter labelled by p, as in [24].
Relation between continuous and discrete theta terms. In the following, we compute the exact discrete theta term, schematically denoted ∆p in (3.33), generated by increasing θ by 2π.
First, we choose a special basis for the weights and coweights, as follows. Assume for now that g is a simple Lie algebra, but not of type D N with N even, so that the center generates it. Now, choose a weight ν • ∈ Λ w such that its class inẐ(G) has weight one with respect to the chosen coweight; that is, 13 See appendix E for conventions for the normalization of theta terms. 14 This heralds an anomaly between the (−1)-form symmetry θ → θ + 2π and the 1-form electric center symmetry of theG gauge theory [24,27]. It can also be understood as an anomaly in the space of coupling constants [28,48]. 15 See appendix F for a mathematical discussion of this phenomenon.

JHEP04(2020)087
Every weight (coweight) can be expressed as an integer multiple of ν • ] (mod Λ cr ), for some n, m ∈ Z M . 16 For example, for g = su(N ) the center is isomorphic to Z N and we choose 17 µ ∨ • := µ ∨ 1 corresponding to the fundamental representation of the dual algebra L g, and ν • := ν N −1 to be the highest weight of the anti-fundamental representation of g which acts with charge 1/N on the defining N -dimensional representation.
We call a line of weight (ν • , 0) a basic Wilson line W , and a line of weight (0, µ ∨ • ) a basic 't Hooft line T . Not all possible lines are allowed in a given theory. Consider, for example,G gauge theory. W is an allowed line operator, while T is not. Rather, T is the boundary of the (open) Gukov-Witten surface operator U e (Σ) implementing the Z(G) electric one-form symmetry. Then, (3.34) leads to the following relation Thus, (3.34) is equivalent to choosing a basis such that the fundamental line W has charge one under the fundamental electric symmetry generator. A similar argument can be made forG/Z(G) theory where T is now an allowed line operator and W is the boundary of the fundamental magnetic surface operator implementing the Z(G) magnetic one-form symmetry which can be written as is the Brauer class of the gauge bundle. Next, consider the effect of adding discrete theta terms on the line operators of a theory with gauge groupG/Z k , where Z k is some subgroup of Z(G) = Z M , so M = kk for some integer k . Quadratic functions on Γ m = Z k can be written as σ = p σ • : Z k → R/Z for some p, where, following the conventions of [27], we define 19 as defined above, generates the Z k subgroup of Z M .) In this paper, we often identify Z k with integers modulo k, and k [µ ∨ • ] with 1 ∈ Z/kZ, so in both cases this can be written as (3.38) 16 n and m can be taken modulo M since M times of ν• (µ ∨ • ) is a root (coroot). 17 Such a choice of generator for Z(G), is equivalent to choosing a ring structure for Z(G) whose unit element under multiplication is [µ ∨ • ]. Writing cup product in the action requires such a ring structure, but here such a choice is made in (3.37) which defines a pairing on H 2 (M, Z(G)). 18

JHEP04(2020)087
According to our proposal (3.22), the theory defined by adding the discrete theta term has the bosonic line labelled by (p(1 − k 2 )ν • , k µ ∨ • ) b as a genuine line operator. Meanwhile, a shift θ → θ + 2π of the continuous theta angle (3.32) results in the following shift in the line operators [4] T : where * is a map from Λ cw to Λ w induced by the Killing form and the inclusions Λ cw ⊂ t and Λ w ⊂ t * , and s is the spin label. The Killing form, denoted by tr in (3.32), is normalized such that a generator of Λ cw is mapped to a generator of Λ w . More explicitly, the normalization is such that a simple coroot α ∨ i is mapped to a simple root with the following prefactor [4] where the length-squared of short coroot(s) is 2; see appendix A for our Lie algebra conventions. The 2π shift maps one allowed set (L, s) of line operators to another allowed set, and therefore maps between theories with the same gauge group. 20 We now derive the relation between continuous and discrete theta terms. T sends a line . According to (3.22), the shift in its electric charge is equivalent to adding a discrete theta term (3.14) corresponding to the quadratic function that is shifting θ by 2π is equivalent to adding the coupling 2πP σ T (b m ). Identifying Γ m with the integers modulo k using the basis we chose earlier, we find 43) and from this we solve for ∆p, yielding with the above equality taken modulo 2k for k even and modulo k for k odd. 21 To summarize, there is a duality (3.33), which we call the T transformation, between gauge theories labelled by the following continuous and discrete theta parameters The discrete parameter p is defined modulo 2k for even k, and modulo k for odd k [46]. 20 T transformations do not affect the spins of purely electric lines (or equivalently, the gauge group), and therefore do not affect the be dependence of discrete theta terms (3.25). 21 To derive (3.44) for k odd, we have made use of the fact that kk 2 tr µ ∨ 0 µ ∨ 0 is always an even integer.

JHEP04(2020)087
In section 4, we will explain how ∆p = (M 2 /k) tr µ ∨ • µ ∨ • can be obtained by looking at the inverse Cartan matrix. We will also calculate ∆p for simple Lie groups, finding agreement with [28]. For the D N series with N even, where Γ m may not be cyclic, refer to section 4.4.
we can find appropriate choices of fundamental Wilson and 't Hooft lines by looking at the inverse of the Cartan matrix. The dyonic Wilson-'t Hooft line W n T m has weights (nν N −1 , mµ ∨ 1 ) ∈ Λ w × Λ cw . Since W 2N and T 2N belong to twice the root 2Λ r and coroot 2Λ cr lattices, it is sufficient for our purposes to consider the mod 2N reduction of the integers n and m. Therefore we label the line W n T m by (n, m) ∈ Z 2N × Z 2N ⊂Λ . A further mod N quotient of (n, m) yields the one-form symmetry charges (n (mod N ), m (mod N )) ∈ Λ =Ẑ(SU(N )) × Z(SU(N )) .  Note that if we had defined ν 1 and µ ∨ 1 as the basis for W and T , there would have been an extra factor of N − 1, since ν 1 , µ ∨ 1 = (N − 1)/N . Requiring the r.h.s. of (4.4) to be an integer, we get different solutions that are labeled by two integers k and q [24]; the integer k is a divisor of N , i.e. N = kk for some integer k . The charge lattice of the theory L k,q ⊂ Z N × Z N , is then generated by the lines W k ≡ (k, 0) and W q T k ≡ (q, k ) , (4.5)

JHEP04(2020)087
where q = 0, 1, . . . , k −1. 22 Now we can give a microscopic description of a theory with such set of lines. The value of k fixes the gauge group to be SU(N )/Z k , and for spin theories q can be identified with the theta parameter p defined in (3.39) as q ≡ p (mod k). However for non-spin theories, we also need to determine the spin of the generating lines in (4.5).
We denote the theory where the generating electric line W k is bosonic and the magnetic generating line has weights and spin (q, k ) s , as (SU(N )/Z k ) q,s . For theories where the generating electric line is fermionic, we denote the theory as (Spin-SU(N )/Z k ) q,s where again the other generating line is (q, k ) s . In summary we have the following possibilities with the following generating lines for non-spin theories: However, not all these choices are consistent. As stated in rule 2 in section 3, lines labelled by just a root or a coroot must be bosonic. For instance, for N odd, k = 1 and q = 0, the gauge group is SU(N ) and the fundamental Wilson line with weight (ν N −1 , 0) cannot be fermionic; this is because fusing N of them, according to (3.7), results in a fermionic line labelled by a root, and hence is not allowed. We will find the consistency conditions below and demonstrate the details with a few examples. But before that, let us discuss the theta parameters in these theories. Consider the SU(N )/Z k theory whose set of lines and their spins are Here the label s denotes SU(N )/Z k for s = 0 and (Spin-SU(N )/Z k for s = 1, see (4.6); these two notations are used interchangeably in this article. We claim that such theory can be obtained from (SU(N )/Z k ) 0,b theory by adding the coupling (3.25) associated with the quadratic refinement where (nk +mq, mk ) ∈ Z N ×Z N are the electric and magnetic charges. This simply follows from (3.22) by noting that the line (nk + mp, mk ) s can be obtained by fusing (nk, 0) ns with (mq, mk ) ms and thus has spin s ≡ ms+ns +nm (mod 2Z). Such quadratic function induces a coupling of the form where the pair (b e , b m ) essentially measure the integers n and m. As explained in section 5.2.6, after adding such coupling the one-form symmetry extension changes which puts some constraints on the symmetry generators which restricts the coefficients in (4.9). For instance we should check that σ is a well-defined function; that is if we shift the electric JHEP04(2020)087 and magnetic charges by N it does not change mod Z. One can easily see that this gives the relations ks + (k + s )q ≡ k s ≡ 0 (mod 2Z) . (4.10) For the sake of completeness let us rederive these relations by the consistency conditions for the spin labels. Take (k, 0) s line and fuse it k times with it self to get (N, 0) k s which is a pure root and must be bosonic hence the first relation. Now fusing the line (qk, 0) qs with (kq, kk ) ks gives (0, N ) qs +ks+kq which is bosonic hence the second relation. Therefore, we get the following consistent theories based on Lie group su(N ) on non-spin manifolds (Spin-SU(N )/Z k ) q,s : for ks + (k + 1)q, k ∈ 2Z . (4.11) Now we find the relation between the T -transformation and adding the coupling (4.9) for these theories. For the case where s = 0 and the basic Wilson line is bosonic, we have the usual theta parameter p in (3.39) and the identification which automatically satisfies (4.10). A result of this relation is the fact that for even k, shifting p by k changes the spin of the basic 't Hooft line [49], hence p is 2k periodic. Furthermore since the basic 't Hooft line is T k , following the discussion around (3.45), we have ∆p = k(k µ ∨ 1 , k µ ∨ 1 ) = k (N − 1) and hence we get the following identification of the theta parameters (θ + 2π, p) ∼ θ, p + k (N − 1) , where p ∈ Z k for odd k and p ∈ Z 2k for even k. Thus shifting p by one and the Ttransformation is equivalent to the following maps on the weights and spins p → p + 1 : (n, k m) s 0 → (n + (1 − k 2 )m, k m) s 0 , (4.14) θ → θ + 2π : (n, k m) s 0 → (n + k (N − 1)m, k m) s 0 . (4.15) Therefore we get the relation thus for k even θ is 4πk/gcd(2k, k ) periodic, and for odd k it is 2πk/gcd(k, k ) periodic. For the Spin-SU(N )/Z k theories 23 where s = 1, however the coupling (3.39) does not make sense for arbitrary values of p and we should really think of the coupling (4.9) instead, where from (4.10) we have the relation k ≡ ks + (k + 1)q ≡ 0 (mod 2Z). When k is odd, s must be even and we have the map q → q + 1 : (n, k m) s 0 → (n + m, k m) s 0 . (4.17)

JHEP04(2020)087
However when k is even, q must be even too and we can only shift q by an even number. In both cases by comparing the above map with the T -transformation we get the identification (θ + 2π, q) ∼ (θ, q + k (N − 1)). However, note that shifting q by k does not change the spins and therefore q is only defined mod kZ, hence for both k even and odd θ is 2πk/gcd(k, k ) periodic. g = su (2). Let us begin with the simplest example of the su(2) algebra. This algebra has only one simple root and therefore The Dirac quantization condition for the lines W n T m and W n T m is given by For spin theories only the charges (n, m) mod 2 -modulo the root lattices -matters and we get three solutions by solving (4.19). In each case the charge lattice L ⊂ Λ is isomorphic to Z 2 and hence is generated by a single line operator as [24] SU (2)  The T -transformation (3.40) acts as and leaves the SU(2) charge lattice invariant, while mapping SO(3) 0 to SO(3) 1 .
Going to the case of oriented theories without spin-structure, we label the lines by their weights in the quotient (3.6) which can be identified with mod 4 reduction of n and m, i.e. (n, m) ∈ Λ w /2Λ r × Λ cw /2Λ cr ∼ = Z 4 × Z 4 . For instance, the lines T and W 2 T have the same one-form charge in Λ, but they are distinguishable since they have different spins. For SU(2) we have two lattices, one where the generating line is (1, 0) b -a boson -and one where it is a fermion, i.e. (1, 0) f . As we mentioned in section 3 we require that the adjoint line (0, 2) is always bosonic; this along with the fusion rule (3.7) fixes the spin of all the lines completely. For each case, we get the following set of weights and spins   hence θ is 8π periodic. From (4.12) we have p ≡ q + 2s (mod Z), thus we get the identification (θ + 2π, p) ∼ (θ, p + 1). We also have the relation which can be verified by either looking at the weight lattices of these theories and match their line operators, looking at the relation p ≡ q + 2s (mod Z), or looking at the coupling (3.39) for p = 2. Using the Wu formula 1 2 , this coupling is equivalent to adding πi M b m ∪ w 2 (T M), which attaches a w 2 (T M) surface to the fundamental 't Hooft line and hence changes its spin [15,16,31,49]. To see these relations explicitly, let us take a closer look at how the T -transformation (4.21) maps the JHEP04(2020)087 line operators of these four theories to each other: Let us first review the results of [24] for these theories on spin manifolds. For the case of SU(4), there is only one theory and θ is 2π periodic. For gauge group SO(6) = SU(4)/Z 2 , the two solutions with p = 0 and p = 1 are not related by the T -transformation and θ is 2π periodic. Finally for PSU(4), all the four theories are related by the T -transformation and hence θ is 8π periodic.
Moving to non-spin manifolds, we need to also determine the spin of the generating lines of the above charge lattices. For SU (4) there are two theories one where the basic Wilson line W (γ) is bosonic and one where it is fermionic. Both are consistent since the adjoint lines W 4 and T 4 are bosonic. Thus we get two solutions denoted as SU(4) and Spin-SU(4). From (4.15), we see that for both lattices θ is 2π periodic.
For SO(6) 0 both the generating (2, 0) and (0, 2) lines can be either bosonic or fermionic and we get four theories. Whereas for SO(6) 1 , the line (2, 0) can only be bosonic; this is because it can be obtained by fusing the line (1, 4) with itself and therefore must be bosonic. Hence there is no Spin-SO(6) 1,s solution and in total we get six theories. From (4.12), we have q + 2s ≡ p (mod 4). To verify this relation, let us study the action of shifting p by one -given in (4.14) -on the line operators of different SO(6) theories

JHEP04(2020)087
There is also the identification the theta parameters as (θ + 2π, p) ∼ (θ, p + 2). Thus we get the action of the T-transformation on these theories as shown in (4.28) and (4.29).
Hence θ is 4π periodic for the SO(6) theories, and 2π for the Spin-SO(6) theories. For the PSU(4) q theories, the charge lattice is generated by (q, 1) which can have any spin. Thus we get eight different theories denoted as PSU(4) q,s , where the generating line has weights and spin (q, 1) s . All of these eight theories are related by adding the coupling (3.39), where p ≡ q + 4s (mod 8). There is also the identification (θ + 2π, p) ∼ These theories have interesting 't Hooft anomalies which are discussed in section 5. In particular, the Spin-SO(6) f theory has the same gravitational anomaly as the all-fermion electrodynamics theory Spin C f .

C series: sp(N )
The universal covering group of g = sp(N ) is Sp(N ), whose center is isomorphic to  where q = 0, 1. For the universal covering group Sp(N ), there is no possible discrete theta term and θ is 2π periodic. For the Sp(N )/Z 2 theories, the periodicity of θ is increased, and according to (3.45), the T -transformation identifies theories differing by ∆p = 2(µ ∨ • , µ ∨ • ) = 2(C −1 ) N N = N and the following continuous and discrete theta parameters are identified where p ≡ q + 2s (mod 4), in agreement with [28]. Thus, the various Sp(N )/Z 2 theories have the following relations The classification of the lines for theories with so(2N +1) algebra proceeds similarly to that of the Langlands dual algebra sp(N ), but with roots and coroots exchanged. The universal covering group is Spin(2N + 1), with center isomorphic to Z 2 . The Dynkin diagram is .
The classification of the lines for theories with D-series gauge groups differs qualitatively depending on the parity of N . For odd N , the center Z(Spin(2N )) = Λ cw /Λ cr is isomorphic to Z 4 , and is generated by either [   For theories with gauge group Spin(2N ) and Spin-Spin(2N ), the θ parameter is 2π-periodic. For the (Spin(2N )/Z k ) q,s theories (with k = 2, 4), theta periodicity is enhanced. Following the discussion around (3.45), a 2π shift in the theta angle is dual to a discrete theta angle of Hence, the following theta parameters are identified

JHEP04(2020)087
Even N . When N is even, the center of the universal covering group Spin(2N ) is Z s 2 ×Z c 2 , which is novel, as all the π 1 (G) we have encountered thus far have been cyclic. The center is generated by the fundamental coweights corresponding to the spinor and conjugate spinor representations and we denote the 't Hooft lines with these coweights as T 1 and T 2 respectively. The weights of the fundamental Wilson lines W 1 and W 2 are chosen such that where each q ij = 0 or 1, and q 12 = q 21 . We have defined the various gauge groups with algebra so(2N ) following the notation of [24], , where the subgroups Z v 2 , Z s 2 and Z c 2 are generated by the vector, spinor and conjugate spinor representations of the dual Lie algebra L so(2N ) ≈ so(2N ) respectively. As before, the left subscript s denotes the spin of the fundamental Wilson line; for instance 1 SO(2N ) := Spin -SO(2N ). Note that, as there are three Z 2 subgroups of Z(Spin(2N )) = Z s 2 × Z c 2 , the notation Spin -Spin(2N ) is ambiguous and it is more precise to use the notation with the left subscript.
We now investigate the relation between theta terms. The SO(2N ), Ss(2N ) and Sc(2N ) theories have Γ m ∼ = Z 2 , and there is a single discrete theta term p ≡ q + 2s (mod 4). For SO (2N )   The quadratic function σ (3.22) for the PSO(2N ) q ij ,s i theory is 55) and so PSO(2N ) q ij ,s i theory can be obtained from PSO(2N ) 0,0 by adding the discrete theta term where p s = q 11 + 2s 1 (mod 4), p c = q 22 + 2s 2 (mod 4) and p sc = q 12 (mod 2). As was seen in (3.40), a 2π-shift of the usual theta angle (3.32) is equivalent to shifting the lines by the quadratic function Comparing this to (4.55) yields JHEP04(2020)087 modulo 4 for ∆p s and ∆p c and modulo 2 for ∆p sc . The values of tr µ ∨i • µ ∨j • were read off from the entries of the inverse Cartan matrix (4.38). Therefore, the T -transformation identifies the theories PSO(2N ) θ+2π q ij ,s i = PSO(2N ) θ q ij +∆p ij ,s i , (4.59) with ∆p ij given in (4.58). In other words, shifting θ → θ + 2π is equivalent to adding the discrete theta term reproducing the result of [28].

E series: e 6 and e 7
Of the exceptional Lie groups, only E 6 and E 7 have non-trivial centers, with Z(E 6 ) = Z 3 and Z(E 7 ) = Z 2 . e 6 . The center of E 6 is isomorphic to Z 3 , and there are two possible gauge groups with e 6 algebra, namely E 6 and E 6 /Z 3 . The Dynkin diagram of the Lie algebra is Its center is generated by any of µ ∨ 1 , µ ∨ 2 , µ ∨ 4 or µ ∨ 5 , and any of them furnishes a possible choice of basic magnetic charge. We choose µ ∨ • := µ ∨ 1 . The basic electric charge ν • should be chosen so that ν • , µ ∨ • = 1/3. The quantization condition (3.2) has the following solutions, listed with the generating lines: where, for consistency, as discussed in (4.10), q ≡ s (mod 2). In the E 6 theory, θ is 2π periodic, while for the E 6 /Z 3 , shifting θ → θ + 2π is equivalent to adding a discrete theta term of ∆p = 3C −1 11 = 4 (4.62) where, as in (4.12), 4p = q + 3s (mod 6). Thus, the following theories are identified and θ is 6π periodic. The three different E 6 /Z 3 theories are in the same T -orbit. and the center of the universal covering group E 7 is isomoprphic to Z 2 . It is generated by either µ ∨ 4 , µ ∨ 6 or µ ∨ 7 , and we choose µ ∨ • := µ ∨ 6 . Once again, the basic electric weight ν • is chosen so that ν • , µ ∨ • = 1/2. Solving for the quantization conditions yields the following theories and corresponding generating lines For E 7 /Z 2 theory, the discrete theta parameter can be identified as p = q + 2s (mod 4), and the T -transformation relates theories differing by a discrete theta term with leading to the identifications Thus, θ is 8π periodic for E 7 /Z 2 theories, and all such theories are in the same T -orbit. which are related to the electric and magnetic charges by (2.6). There is a mixed 't Hooft anomaly between U(1) e and U(1) m , which can be explicitly seen in the next section when the theory is coupled to background gauge fields for the symmetries.

Coupling to background gauge fields
The background gauge field B m ∈ H 2 (M, U(1) m ) for the magnetic symmetry U(1) m couples to the action (2.7) as

JHEP04(2020)087
Meanwhile, the coupling to the electric gauge field B e ∈ H 2 (M, U(1) e ) is more complicated.
To motivate it, we look at a simpler example of a two dimensional sigma model on target which has an ordinary (zero-form) symmetry U(1) t × U(1) w with associated currents j t = R 2 * dφ and j w = dφ/2π. The translation symmetry U(1) t is the analog of the electric symmetry of Maxwell theory. A background field A t is a flat connection for some circle bundle over Σ. In order to couple the theory to A t , φ is promoted to a section of a bundle associated to said circle bundle, and the derivative is replaced with the covariant derivative Analogously, in Maxwell theory, in order to couple to B e , the gauge field a is promoted to a bundle-valued section of a flat U(1) gerbe, on which B e is a gerbe connection. The action is Note that Maxwell theory cannot be simultaneously coupled to both B e and B m . Indeed, upon coupling to B m , the conservation of the current j e is violated by terms involving B m . Equivalently, if we took the action (5.6) coupled to B e and tried to add the minimal coupling B m ∧ f /2π, we find that B e background gauge invariance is lost. It can be restored by introducing a bulk term on a five dimensional manifold Y with boundary ∂Y = M, as follows In other words, there is a mixed anomaly between the one form symmetries U(1) e and U(1) m , with anomaly polynomial which can be obtained via descent from the six dimensional polynomial [27,50] (5.9)

Relation to non-spin theories
The non-spin theories we considered in section 2 can be obtained by turning on specific background fields. More specifically, we would like to couple a Z 2 subgroup of either the electric or magnetic U(1) one-form symmetry to the second Stiefel-Whitney class w 2 (T M) of the spacetime manifold.

JHEP04(2020)087
In the magnetic case, setting B m = 2π 1 2 w 2 (T M) yields where c 1 (E) is the (mod 2 reduction of the) first Chern class of the gauge bundle E. This discrete theta term makes the monopole a fermion [16].
In the electric case, to gauge a Z 2 subgroup of U(1) e , it is only necessary to promote the U(1) bundle to a U(1)/Z 2 U(1) bundle, rather than a full blown gerbe. The quotient bundle has a characteristic class arising from the exact sequence which we set to be equal to B e . If B e = 2π 1 2 w 2 (T M), then the connection on the quotient bundle is exactly a Spin C connection, which we saw in section 2 describes a theory with a fermionic electric particle.
If we turn on both background gauge fields B e = B m = 2π 1 2 w 2 (T M), then we have a theory describing all-fermion electrodynamics. According to (5.8), this theory has an anomaly of [26,30,31] 2π Here, β is the Bockstein homomorphism associated to the sequence 0 → Z 2 → Z 4 → Z 2 → 0. 26

S-duality
S-duality in Maxwell theory is an equivalence of theories under the exchange of electric and magnetic charges. In the path integral framework, it can be implemented by coupling the theory to a gauge field for its one-form electric symmetry, and integrating over the gauge field while inserting a Lagrange multiplier field coupled to the gauge field. Integrating out the Lagrange multiplier enforces flatness and triviality of the gauge field, returning us to the original Maxwell theory, while integrating out the gauge field instead leads one to the S-dual theory, formulated in terms of the Lagrange multiplier field [33]. For the non-spin Maxwell theories defined in section 2, the theory with fermionic electric particle is S-dual to the theory with fermionic magnetic particle. This can be seen in a completely analogous manner, and was done in great detail in [13]. In the following, we give a brief outline of the procedure.
Let us review this procedure for spin spacetime manifolds. The partition function of Maxwell theory is where the sum is over U(1) bundles on M, and the path integral taken with respect to the connections on each bundle. The factor Vol(G) is the volume of the group of gauge JHEP04(2020)087 transformations of a. The Maxwell action is where we define f ± := 1 2 (f ± * f ) and recall (2.5) yielding the partition function If one integrates outã first, the Lagrange multiplier term enforces the flatness of the gerbe connection b e , and the sum over bundles on whichã is a connection enforces the topological triviality of b e . This shows that the partition function is identical to that of Maxwell theory (5.13).
If instead one integrates out b e first, one can use its gauge symmetry to set f = 0. The squares can be completed to The gaussian integral over b e yields an overall τ -dependent numerical factor, 27 while the terms on the second line give exactly Maxwell theory, with connectionã and coupling constant −1/τ . On non-spin manifolds, there is a possibility of coupling Maxwell theory (electrically or magnetically) coupling to w 2 (T M). Consider first adding a magnetic coupling to (5.14) of the form 2π The factor is τ −(χ+σ)/4τ −(χ−σ)/4 [33].

JHEP04(2020)087
where c 1 (E) is (the mod 2 reduction of) the first Chern class of the line bundle. Upon coupling to b e and gauge fixing, this results in a five dimensional term 21) and integrating out b e enforces the constraint In other words, the connection valued Lagrange multiplierã is a Spin C connection.

Symmetries
Consider, as in section 4, Yang-Mills theory based on a simple, connected and compact gauge group G. Let L be its set of line operators, which, as we saw in section 3.1, can be described as an extension of groups where G =G/Γ m and Γ e = Z(G). The one-form symmetry groupL is the Pontryagin The charge operator -the analogs of the Noether charges in the abelian case -for the Γ m subgroup is where b m ∈ H 2 (M,Γ m ) is the Brauer class of the G-bundle, as we defined in section 3.1. The unitary operator implementing the symmetry transformation by the group element g ∈ Γ m , is given by the exponential of the charge operator as U m (Σ, g) = e 2πi g,Qm . (5.26) The symmetry operators for the group elements which project non-trivially onto Γ e are disorder-type Gukov-Witten surface operators [51]. For ease of exposition, we denote the charge and unitary symmetry operator by

Coupling to background gauge fields
Let A ∈ H 2 (M,L) be the background field for theL one-form symmetry. Let A e denote the projection of A to H 2 (M, Γ e ), and A m ∈ C 2 (M, Γ e ) be defined by whereÃ e is some choice of lift of A e . The flatness of A implies where β : H * (M, Γ e ) → H * +1 (M, Γ m ) is the Bockstein homomorphism 29 associated to the extension (5.24). Physically, this reflects the fact that the symmetry groupL is a Γ m -projective extension of Γ e -so lifts of Γ e elements violate the group law up to elements of Γ m . This means that Γ m flux can be sourced by junctions between Γ e symmetry operators [52].
In terms of the fields A m and A e , the minimal coupling can be written as (Note that A m ∪ B e = 0 due to exactness.)

Anomalies
As in abelian gauge theory, there may exist mixed 't Hooft anomalies in theL one-form symmetry, which can be detected by coupling to the background gauge field A. Mixed anomalies between Γ e and Γ m are characterized by the mild violation (i.e. violation only when background fields are turned on) of discrete "current" conservation Fixing cocycle representatives for e,ê and a representative ω ∈ C 5 (B 2 Γ e , R/Z) satisfying δω = e ∪ê, the five-dimensional anomaly polynomial can be written as [52] 2π

JHEP04(2020)087
As an example of a theory exhibiting such an anomaly, consider the gauge group SU(rs)/Z s , with η = 0. The one-form symmetry of the theory is the direct product of Γ e = Z r and Γ m = Z s . The generator for the magnetic symmetry is the Brauer class b m = w m (E) ∈ H 2 (M,Γ m ) of the gauge bundle E associated to the sequence 0 →Γ m = Z s → SU(rs) → SU(rs)/Z s → 0 .

JHEP04(2020)087
Like in the abelian case, the spacetime manifold can couple to (Z 2 subgroups of) the one-form symmetries. For example, if r is even, one could set A e = r w 2 (T M)/2, which makes the fundamental electric particles fermionic. If s is even, setting A m = s w 2 (T M)/2 makes the fundamental magnetic particles fermionic. In both r and s are even, turning on both couplings to w 2 (T M) results in the same all-fermion anomaly as can be seen from (5.35).

Anomalies and T -transformation
Returning to the general setup at the beginning of section 5.2.3, consider now the addition of a discrete theta term 2π Due to the anomaly (5.33), the discrete theta term is not gauge invariant. Indeed, In other words, the addition of a discrete theta term modifies the extension class e of the one-form symmetry group by an amount proportional to the 't Hooft anomalyê.

Gauging one-form symmetries
The various different gauge theories with based on the same Lie algebra can be related to one another by gauging their one-form symmetries. Indeed, we have already encountered and implicitly used this fact starting from the theory based on the simply connected Lie groupG. The one-form symmetry group in this case is purely electric and equal to its center Z(G). Suppose we minimally couple and dynamically gauge a subgroupΓ m ⊂ Z(G). 30 According to the prescription discussed above, this is done by promoting theG bundle to aG/Γ m bundle, allowing cocycle conditions to be violated by elements inΓ e . The Brauer class w(E) ∈ H 2 (M,Γ m ) of theG/Γ m bundle is constrained to be equal to the gauge field a m by a Lagrange multiplier field, which is then summed over in the path integral. Clearly, this simply yieldsG/Γ m theory with η = 0, which now has an emergent Γ m one-form symmetry generated by the cocycle w(E).
In order to arrive at the theories with non-trivial η, or, equivalently, non-trivial extensions 0 →Γ e → L →Γ m → 0 , (5.49) 30 Note that this is subtly different from coupling to a Z(G) background field and then gauging a subgroup.
There are someG/Γm theories that cannot be obtained in this manner, whereas they can be reached by coupling directly toΓm gauge fields.

JHEP04(2020)087
one couples non-minimally to the gauge field a m by adding discrete theta terms of the form 2π M P σ (a m ) , (5.50) where σ is the quadratic form corresponding to the desired theory, as discussed in section 4. We can apply the same procedure to any theory, dynamically gauge some subgroup of its one-form symmetryL, possibly with discrete theta terms, to arrive at any other theory with the same gauge algebra.

Anomalies and one-form symmetries under gauging
Gauging a subgroup of the one-form symmetry yields another theory, with the same gauge algebra, but with the 't Hooft anomaly and group extension class exchanged. This is a manifestation of the phenomenon described in [52].
We illustrate this by beginning with aG gauge theory, and gauge a subgroup Γ m of its one-form symmetry group Z(G) yieldingG/Γ m gauge theory. The parentG theory has one-form symmetry group described by the extension (3.10). Let e ∈ H 3 (B 2 Γ m , Γ e ) denote its extension class. This theory is non-anomalous, so the one-form symmetry of the daughterG/Γ m theory is a direct product Γ e ×Γ m . Meanwhile, the background gauge field b m of the parent theory is now summed over in the daughter theory, so the failure of the cocycle condition δb m = A * e e (5.51) is now interpreted as a mixed anomaly with anomaly polynomial [52] 2π where A e ,Â m are the two-form gauge fields for Γ e andΓ m respectively. In order to arrive at other theories with gauge groupG/Γ m -whose set of line operators L is not a direct product of electric and magnetic factors, but rather a nontrivial extension (3.11) -we add a discrete theta term (3.14). As discussed in section 5.2.4, such a term shifts the extension class of the one-form symmetry by the mixed anomaly e = η • e , (5.53) where η(x, y) = σ(x + y) − σ(x) − σ(y) is the bilinear form corresponding to the quadratic form used to define the Pontryagin square term in (3.14). This discussion of the one-form symmetry gives an alternative understanding of (3.12) in terms of its Pontryagin dual. Indeed, e ∈ H 3 (B 2 Γ e , Γ m ) is the extension class of (3.10), while e ∈ H 3 (B 2 Γ e ,Γ m ) is the extension class of the Pontryagin dual of (3.11) (5.54) The relation e = η • e establishes the one-form symmetry groupL as the pushout which is dual to the pullback diagram (3.12).

JHEP04(2020)087
The coroots and fundamental coweights generate Λ cr and Λ cw respectively and we have Here Λ cG is the cocharacter lattice of G where the magnetic charges take value in, and its dual lattice Λ G := Hom(Λ cG , Z) is the character lattice of G. The lattices Λ G and Λ cG are dual in the sense that for any ν ∈ Λ G and µ ∨ ∈ Λ cG , ν, µ ∨ ∈ Z. As explained in section 3.2, the actual weight lattice of a theory with gauge group G is an extension of Λ cG by Λ G , where the extension is determined by the topological theta parameters of the theory. In particular modding out by the (co)root lattices and projecting onto the one-form symmetry charges, we get the extension (3.11). For weights ν ∈ Λ w and µ ∨ ∈ Λ cw , we denote the corresponding one-form symmetry charges by [ν] ∈ Λ w /Λ r and [µ ∨ ] ∈ Λ cw /Λ cr , which are the projection of the weights onto Λ w /Λ r and Λ cw /Λ cr .

B Adjoint Higgsing
In this section we perform a consistency condition of our proposal by adjoint Higgsing. We add an adjoint scalar Higgs field to the non-abelian theories we discussed. As a result, the theory flows in the infrared to an abelian gauge theory with gauge group T = t/Λ cGwhich is the maximal (Cartan) torus of G -with some topological theta term. We refer to this infrared theory as the Coulomb phase. This abelian theory is free and as discussed in section 2 we know its set of line operators and their spins exactly. We see how our proposal predict the spins of these lines in the infrared.
Denoting the gauge field of the Higgsed theory as A ∈ Ω 1 (M, t), the gauge transformation are given by A → A + dλ , for : λ ∈ Ω 0 (M, T) , where λ : M → T is a smooth function. Every such map can be written as where h ∨ 1 , . . . , h ∨ r=rank(G) generate the cocharacter lattice of G, This lattice is the kernel of the exponential map above and we have the short exact sequence Therefore λ i : M → R/Z, and each of them individually define a separate U(1) gauge transformation. Accordingly if we expand the gauge fields as each of A i is a seperate U(1) gauge field with U(1) holonomies. Upon Higgsing, the theory flows in the infrared to where g ij = tr h ∨ i h ∨ j , and F i = dA i .

JHEP04(2020)087
Denote Q ie and Q im as the electric and magnetic charges under A i . More precisely measure the electric and magnetic charges inside the surface Σ. By doing the Noether procedure as in (5.2), we find the integer valued one-form symmetry charges where we have the relations Therefore, it is easy too see that we have for any pair of dyons. This is in fact the DSZ quantization condition of this theory, which also measures the angular momentum stored in the electromagnetic fields in the presence of the pair of dyons. Now one could find the Wilson-'t Hooft lines which are charged under these one-form symmetries and match them with the UV line operators. We define the Wilson lines by integrating the gauge fields, and the 't Hooft lines can be defined as the boundary of the surfaces which generate the electric one-form symmetries, We find the UV line operators that flows after Higgsing to these basic Wilson and 't Hooft lines, by finding their corresponding weights. First we pick a basis for the character lattice Λ G of G which is dual to the chosen basis for Λ cG , i.e.
Thus in the UV weights of the form (h i , h ∨ j ) generate all the possible genuine Wilson-'t Hooft lines. Wilson lines of the UV theory are labeled by representations of G. Define R i as the representation whose highest weight is h i , then the corresponding UV Wilson line is defined by Thus the Dirac pairing of the UV lines labeled by weights (n i h i , m i h ∨ i ) and (n i h i , m i h ∨ i ), indeed calculate the angular momentum of the electromagnetic fields in this Coulomb phase. Thus our proposal of labeling the UV lines with spin, is consistent with the spin of the IR lines after Higgsing.
Also note that all the 't Hooft lines of the IR theory whose weights (charges) are inside the coroot lattice Λ cr , can be realized as dynamical 't Hooft-Polyakov monopole solutions of the UV theory. This is because, the VEV of the Higgs field breaks the guage group G down to its Cartan torus T. Thus topologically solitonic solutions are characterized by π 2 (G/T). There is the long exact sequence π 2 (G) = 1 → π 2 (G/T) → π 1 (T) = Λ cG → π 1 (G) = Λ cG /Λ cr → · · · , (B.15) and we get π 2 (G/T) = Λ cr . Thus 't Hooft lines with charges (0, m i ) such that m i h ∨ i ∈ Λ cr , are UV completed as 't Hooft-Polyakov monopoles of the UV theory.
Furthermore, from (B.9) one could find the effect of shifting θ by 2π by noting that Hence shifting θ by 2π shifts the electric weight ν = n i h i by which is consistent with the T -transformation defined in section 3.

C S and T transformations
Here we study the S and T operations defined in [27] (section 6), on the non-abelian gauge theories discussed in the previous section. These operations are defined as a generalization of Witten's operation on 3d theories with global symmetries [53]. The T operation is already discussed in section 3.3, and acts by adding a discrete theta term to the action. Whereas the S operation acts by gauging the one-form symmetry of the theory which is further explained in section 5. The S and T operations can be defined by their action on the line operators as where the map * : t → t * is induced by the Killing form on t -see section 3.3. Since different gauge theories are determined by their set of genuine line operators and their JHEP04(2020)087 spins, these maps uniquely determine a map between the theories. It is straightforward then to obtain the full SL(2, Z) orbits of these non-abelian gauge theories. We do it for u(2) and su(4) gauge theories below. Note that these operations, a priori, do not act on the coupling constant τ of the theory. But in some cases if we also change τ we can obtain duality transformations. For instance as was explained in section 3.3, for the T operation by shifting the θ-angle of the theory by 2π, the T operation becomes a duality transformation. Furthermore, for the case of U(1) theories by a proper action on τ we have the full SL(2, Z) duality transformation on the abelian theories. However, for non-abelian theories to get the full SL(2, Z) group to act as a duality transformation, we need to look at the supersymmetric version of the Yang-Mills theory. N = 4 super Yang-Mills on non-spin manifolds. For the case of N = 4 super Yang-Mills theory, the S and T operations become duality transformations [54][55][56] given the actions on the coupling constant of the theory, where n g = 1 for simply laced Lie algebras (for non-simply laced algebras see [40,57]). The orbits of S-duality for non-abelian theories on spin manifolds was obtained in [24]. Here we extend that discussion to non-spin manifolds. As explained in [15], to define N = 2 super Yang-Mills theory with SU(2) guage group on non-spin manifolds, we have to define a non-abelian spin/charge relation [14,16] because of the adjoint fermions. In particular, we have to identify the Z 2 subgroup of the Lorentz transformation generated by (−1) F with the central Z 2 subgroup of the global R-symmetry that the adjoint fermions are charged under. For the case of N = 4 supersymmetry, the adjoint fermions transform in the fundamental representation of the SU(4) R symmetry, so one could identify the central element −1 ∈ SU(4) R with (−1) F of the Lorentz group. This defines a non-abelian spin/charge relation which allows us to define the N = 4 Yang-Mills theory on non-spin manifolds.
For the example of su(2) gauge theory on non-spin manifolds, all the theories belong to the same orbit of S and T operations and we get the following web T T (C.4) By looking at the N = 4 version of these theories, we can obtain extra consistency checks for our proposal by Higgsing these theories to U(1), and match the S-duality orbits.

JHEP04(2020)087
For the case of s SU(2) theory, the fundamental Wilson line has spin s which under Higgsing becomes the fundamantal Wilson line of the U(1) theory. For the SO(3) q,s theory however, the basic Wilson line is W 2 = (2, 0) b which Higgses to the fundamental Wilson line of the U(1) theory (1, 0) b . The other generating line W q T = (q, 1) s , Higgses to a line of spin s and electric charge q/2 in the U(1) theory. This fractional electric charge is equivalent to adding a theta angle of qπ to the U(1) theory. Moreover by looking at the coupling constants of these theories, we have the relations τ U(1) = 2τ SU(2) and τ U(1) = τ SO(3) /2. Therefore after Higgsing we get Higgsing Higgsing To see the consistency of the S-duality of su(2) theories with U(1), we Higgs the theories in (C.4) and indeed we get a web of dualities for the U(1) theories as expected For the case of Yang-Mills theory based on the Lie algebra su(4), we get the following orbits

JHEP04(2020)087
Interestingly for this example, different orbits have different one-form symmetry groups or the same symmetry but different 't Hooft anomalies for that symmetry. In particular, the theories in the orbit of SU(4) have a Z 4 one-form symmetry, whereas the other theories have a Z 2 × Z 2 one-form symmetry. Furthermore, as explained in section 5, the theories in the orbit of Spin-SO(6) b are anomaly free while the Spin-SO(6) f theory has a gravitational 't Hooft anomaly.

D Consistency with Wu's formula
In this appendix we perform a non-trivial check on our proposal of determining the spin of lines in non-Ableian gauge theories. This check is based on Wu's formula, which states that for any Z 2 cohomology class x ∈ H 2 (M, Z 2 ), But such open surfaces are not gauge invariant, and has to be attached to a line operator with some weight which we denote by ∆γ ∈Λ. Therefore, if we start with a theory that have a line operator with weightγ ∈L and spin s (mod 2) which is charged under the Z 2 symmetry, then the duality guarantees that the theory should also have a line with spin s + 1 (mod 2) and weightγ + ∆γ. Now we want to prove this requirement by using our proposal. Let us assume that the theory has a set of lines labeled by their weights inL. Thus the one-form symmetry charges of these lines is given by projection of their weights onto L. This projection is given by the restriction of the projection p :Λ → Λ toL ⊂Λ. Also, since L is the group of the charges, its Pontryaging dualL, is the symmetry group. Denote b ∈ H 2 (M, L) as the generator of this one-form symmetry, and denote the Z 2 one-form symmetry subgroup by the inclusion i : Z/2Z →L. The Pontryagin dual of this inclusion defines the generator of this Z 2 one-form bŷ where we have identified Z 2 andẐ 2 with Z/2Z. Now take an arbitrary line operator of the theory with weightγ and one-form charge γ = p(γ), then the Z 2 charge of this line is given simply byî(γ) ∈ Z/2Z. We conclude that adding the first term in (D.1) to the action JHEP04(2020)087 change the spin of a line with weightγ byî(γ). So it changes the spin lables s :L →Ẑ 2 to s = s +î • p. Now we want to find how the weights change by adding the second term in (D.1), i.e. finding ∆γ. To do so note that the second coupling in (D.1) can be written as where η : L × L → R/Z. Equivalently, η can be viewed as a homomorphism η : L → Λ/L, where we have identified L with Λ/L by an isomorphism 31 induced by the Dirac pairing on Λ. Then similar to (3.13), η changes the Lagrangian charge lattice L ⊂ Λ to 32 L = {γ + ∆γ | γ ∈ L , ∆γ ≡ 2η(γ) mod L} , (D. 6) and we have ∆γ ∈ 2p −1 (η(γ)), where here p is the projectionΛ → Λ/L. Putting everything together the duality sends the line with weightγ with spin s(γ) to the line with weightγ + ∆γ and spin (s +î • p)(γ) which has to be the genuine line of the same theory. But before the action of this duality the line with weightγ + ∆γ has spin s(γ + ∆γ). Thus the consistency of our proposal with Wu's formula requires these two spins to be the same, i.e.

E Normalization of theta terms
In this appendix, we discuss our normalization of the continuous theta term We shall do so by specifying the characteristic class, as well as any numerical factor, which multiplies the periodic parameter θ. This will unambiguously give the definition of θ, 31 More precisely the Dirac pairing on Λ -which is the projection of the pairing (3.5) on Λ -gives an isomorphism * :L → Λ/L, by the relation g * , γ Dirac = g, γ (mod Z) for : g ∈L and γ ∈ L , (D.5) where the r.h.s. is evaluated by the natural pairing between L and L. This can be summarized in a short exact sequence 0 → L → Λ →L → 0. Interestingly when the sequence is not split, theL one-form symmetry is anomalous. 32 However for η given in (D.4) L = L, otherwise the duality would have failed.

JHEP04(2020)087
avoiding any niggly numerical factors, and furthermore, the integrality and multiplicity of characteristic classes will immediately tell us the periodicity of θ. For abelian U(1) theory, the theta term is normalized as where c 1 (E) is the first Chern class of the U(1) bundle E. On spin manifolds, c 2 1 is even, and so θ is 2π-periodic for a spin theory. On non-spin manifolds, however, θ is 4π-periodic.
For non-abelian theories, the story is more complicated, as there are different Lie groups corresponding to the same Lie algebra. The fourth cohomology of a connected, simply connected and simple Lie groupG has rank one where a : M → BG is the Yang-Mills connection. It follows that θ is 2π periodic. Now, consider a group G =G/π 1 (G) which is not simply connected. The fourth integral group cohomology of BG is again of rank one, and the projection map ρ :G → G induces an injection for some nonzero integer n ∈ Z, which we can choose to be positive by redefining x. The theta term of an oriented Yang-Mills theory with gauge group G is normalized as θ n M a * x , (E. 7) and it follows that θ is 2πn periodic. For example, for G = PSU(N ) = SU(N )/Z N , n = N if N is odd and n = 2N if N is even [28]. One way of computing n is to compute c 2 (Ad) for the associated adjoint bundle Ad, which is a characteristic class of PSU(N ), in terms of characteristic classes of the defining N -dimensional bundle. One finds that c 2 (Ad) = 2N c 2 (N ) [58]. For N even, this class is primitive and is therefore equal to ρ * x (up to sign), while for N odd, this class is divisible by 2 and so 2ρ * x = c 2 (Ad) (up to sign) [28,59].

F Relation between discrete and continuous theta terms
The relation between discrete and continuous theta terms can be understood as a relation between integral and torsion characteristic classes of the gauge G-bundle. See section 6 of [24] for a similar discussion on spin spacetime manifolds. As in appendix E, let x be a generator of H 4 (BG, Z), and the positive integer n be such that the continuous theta term is normalized as θx/n. When θ is a multiple of 2π, the continuous theta term can be expressed in terms of a discrete theta term P(w), where b is the Brauer class of the G bundle corresponding to the extension 1 → Γ m →G → G → 1. This is the topological genesis of the T -transformation described in section 3.3. The relation takes the form x = −∆p P(b) (mod n) . (F.1) The values of theta period n and T -transformation ∆p are tabulated in table 3. For some gauge groups such as PSU(N ) and SO(N ), the relations can be found and corroborated in the mathematics literature -see [59,60], as well as [24,28] and the references therein. For other gauge groups, we are not aware of results in the mathematics literature, and the physical arguments in this and the earlier papers [24,28] serve as heuristic arguments for them.
Open Access. This article is distributed under the terms of the Creative Commons Attribution License (CC-BY 4.0), which permits any use, distribution and reproduction in any medium, provided the original author(s) and source are credited.