IIB flux non-commutativity and the global structure of field theories

We discuss the origin of the choice of global structure for six dimensional $(2,0)$ theories and their compactifications in terms of their realization from IIB string theory on ALE spaces. We find that the ambiguity in the choice of global structure on the field theory side can be traced back to a subtle effect that needs to be taken into account when specifying boundary conditions at infinity in the IIB orbifold, namely the known non-commutativity of RR fluxes in spaces with torsion. As an example, we show how the classification of $\mathcal{N}=4$ theories by Aharony, Seiberg and Tachikawa can be understood in terms of choices of boundary conditions for RR fields in IIB. Along the way we encounter a formula for the fractional instanton number of $\mathcal{N}=4$ ADE theories in terms of the torsional linking pairing for rational homology spheres. We also consider six-dimensional $(1,0)$ theories, clarifying the rules for determining commutators of flux operators for discrete 2-form symmetries. Finally, we analyze the issue of global structure for four dimensional theories in the presence of duality defects.


Introduction
One of the fundamental observables that we can use to characterize Quantum Field Theories is their partition function on arbitrary manifolds M. The partition function depends both on intrinsic data T defining the theory -which we can provide without reference to the underlying manifold -and on background data on M, such as a metric g µν , a Spin connection ω ab µ , and backgrounds A µ for the global symmetries of the theory, which might be continuous or discrete. 1 If M is non-compact, we need to specify boundary conditions for the theory, which we denote as |ψ , for reasons that will become apparent momentarily. For a theory T on a manifold M with this structure specified, we can thus write (1.1) for the partition function.
Our main interest in this paper will be the case in which T is a six-dimensional SCFT preserving N = (2, 0) supersymmetry, which we construct as follows. Consider IIB string theory on a manifold 2 M 6 × C 2 /Γ, with Γ ⊂ SU (2). By the McKay correspondence [1], the relevant discrete groups Γ are in a one-to-one correspondence with the simple Lie algebras of ADE type. Given such an algebra g Γ , we denote by G Γ the simply connected Lie group with algebra g Γ . It is a well supported conjecture that this system has a non-trivial interacting fixed point at low energies, given by an interacting six-dimensional N = (2, 0) SCFT [2], known as the (2, 0) theory of type g Γ . In fact, all known interacting (2, 0) SCFTs that do not factorize into decoupled SCFTs at the level of local operators can be obtained from this construction. 3 The (2, 0) theory of type g Γ has a number of remarkable properties, one of the most exotic ones being that on generic M 6 there is no canonical choice for the background connection for its global symmetries. More concretely, the (2, 0) theory of type g Γ is believed to possess a discrete global 2-form symmetry [3] given by the center Z(G Γ ) of G Γ . The generators of this symmetry do not all commute with each other, so quantum mechanically there is no way of setting all background fields for the 2-form symmetry to zero. The following consequence of this fact might be more familiar: upon compactification on a T 2 the (2, 0) theory becomes N = 4 SYM with gauge algebra g Γ , and the 2-form symmetry gives rise to the 1-form symmetries measuring the number of Wilson and 't Hooft lines. It is a familiar fact that the associated symmetry generators do not commute [4,5]. 1 The separation into background and intrinsic data is sometimes arbitrary: if we restrict ourselves to fourdimensional Yang-Mills theories with constant coupling τ we could view τ as part of the data defining T . However, if we wish to allow for the possibility that τ varies across M then we must include it as part of the background data to be specified for each manifold. The second interpretation will be more natural from the point of view in this paper, and such configurations will play an interesting role below. 2 In this paper we will take M6 to be closed, Spin and orientable, and furthermore we will assume that the cohomology groups of M6 are freely generated, so there is no torsion. 3 The free, or "abelian", (2, 0) theory can be obtained by replacing C 2 /Γ by a single-centered Taub-NUT space.
Since the symmetry generators do not commute, they are not simultaneous observables. The best we can do is to select a maximal commuting subset of these operators and decompose the Hilbert space in their simultaneous eigenbasis. By selecting an eigenvector from this basis, an associated subset of the background fields for the 2-form symmetry can all be set to zero, or to any definite value. However, choosing a maximal commuting set of fluxes to fix requires explicit reference to the structure of H 3 (M 6 ; Z(G Γ )), and generically such a choice will not be invariant under large diffeomorphisms of M 6 . This can be naturally interpreted as an anomaly (see [6] for an introduction), but the fact that the ambiguity in the partition function is not just a phase makes the situation exotic. This state of affairs is often described by saying that the (2, 0) theory has a partition vector (of "conformal blocks", in analogy with the situation for chiral theories in two dimensions) as opposed to having a partition function, or sometimes, more concisely, by saying that the (2, 0) theory is a "metatheory".
At this point we reach a puzzle, which this paper aims to clarify: we have explained that generally there is no canonical choice of partition function for the six-dimensional (2, 0) theory, due to the non-commutativity of the operators generating the 2-form symmetry. But on the other hand, we started our discussion by saying that the (2, 0) theory of type g Γ can be constructed by considering a low-energy limit of IIB string theory on C 2 /Γ×M 6 . The fact that there is no canonical choice of partition function for the (2, 0) theory should then imply that there is no canonical choice for the partition function of IIB string theory on C 2 /Γ × M 6 . We will argue that this is indeed the case.
Briefly, in order to have a well defined partition function of the IIB theory on C 2 /Γ × M 6 one needs to specify boundary conditions for the RR fluxes, and in the presence of torsion this is a fairly subtle affair due to the self-dual nature of RR fields in string theory [7,8]. We will show that there is indeed no choice of boundary conditions in which all RR fluxes are set to zero at infinity, and in fact the set of choices for boundary conditions for IIB on C 2 /Γ × M 6 is in one-to-one correspondence with the set of choices one makes in choosing a partition function for the (2, 0) theory of type g Γ on M 6 . This result removes a fair bit of mystery from the usual statement that the (2, 0) theory has no well-defined partition function, since the standard construction of such theories in string theory requires one to provide the missing data in the form of boundary values for the RR fluxes. Remarkably, all possible choices for the (2, 0) theory can be accommodated in the IIB construction. In terms of symmetries our viewpoint provides a reinterpretation of the 2-form symmetry of the (2, 0) theory in terms of transformations of the boundary conditions on IIB.
This whole discussion might come as a bit of a surprise to the reader familiar with the proof in [9,10] that there is a canonical partition function of IIB on a ten-manifold M 10 .
The key assumption in the argument in [9,10] that does not hold for the geometries analyzed in this paper is that M 10 has an intersection form with unit determinant. This is always the case for compact manifolds, but generically it is not the case for M 10 = M 6 × C 2 /Γ (except for the case associated with E 8 ). Similarly, the statement that string theory always gives rise to modular invariant theories (see for example [11]) is true under the assumption that we have a compact transverse space, so that the six-dimensional effective theory of interest is coupled to six-dimensional gravity. But this does not hold for the configurations that we study in this paper, in which the metric is just a background field in the six-dimensional theory. The effective six-dimensional theories that one finds in the case M 10 = M 6 ×C 2 /Γ are not modular invariant, but since six-dimensional gravity is non-dynamical there is no contradiction. (The ten-dimensional gravity theory is dynamical, but again there is no contradiction because as we will describe the lack of modular invariance of the six-dimensional theory ultimately comes from the lack of modular invariance of the choice of boundary conditions on M 6 × S 3 /Γ, and we do not sum over these when doing the gravitational path integral. ) We emphasize that our viewpoint here, focusing purely on a careful analysis of the original construction of (2, 0) theories in ten dimensional type IIB string theory, is complementary to existing viewpoints on the partition function of (2, 0) theories. One such viewpoint is that of relative QFTs articulated by Freed and Teleman in [12], where one views the (2, 0) theories as furnishing the boundary degrees of freedom for certain non-invertible seven dimensional TQFTs [13][14][15]. For the A N cases one can also study the question using holography [16]. We find that all three approaches give the same results whenever they are simultaneously applicable.
We have organized this paper as follows. We start in §2 by explaining how to choose boundary condition for RR fields in IIB string theory on M 6 × C 2 /Γ. In §3.1 we compare the results of §2 to the known results for the behaviour of the (2, 0) partition function, and extend the results to the (1, 0) case, refining a previous proposal in [17]. In §3.4 we show how one can rederive the known classification of four dimensional N = 4 theories [18] (of ADE type) from the IIB perspective. Along the way we encounter a simple geometric reinterpretation of the fractional instanton number in N = 4 theories with simply-connected gauge group, which we expect to generalize to less supersymmetric cases. In §4 we explore these ideas in less familiar backgrounds: we will discuss global aspects of 4d theories in the presence of duality defects (as studied in [19][20][21][22][23][24][25][26], for instance) and subtleties having to do with modular invariance in the context of 4d/2d dualities that arise when the four dimensional manifold has two-cycles. We point out an interesting relation between the Vafa-Witten partition function of self-dual su(p) theories on K3 and Hecke operators acting on the partition function of chiral bosons, and briefly discuss a (speculative, but suggestive) connection between these partition functions and the j invariant. We list a number of further directions for further research in the conclusions. Appendix A contains technical results on the complex K-theory groups of rational homology spheres that we use in the text, and appendix B discusses the partition function of N = 4 theory with algebra su(N ) on K3 with the Vafa-Witten twist [27] for different choices of the global form of the gauge group, and how their behavior under dualities agrees with expectations.
2 Quantization of type IIB string theory on M 6 × C 2 /Γ We start by giving a short informal outline of the main argument in this section, without going into the technical details. Most of the work in the rest of the section will be in making the arguments fully precise.
Let us consider type IIB string theory compactified on M 6 × C 2 /Z N which is believed to yield the A N −1 (2, 0) theory on M 6 at low energies. Notice that, without changing the behaviour at infinity, we could consider instead a situation in which the orbifold C 2 /Z N is resolved so that the curvature of spacetime is arbitrarily small while at the same time keeping the string coupling small and constant. Thus, the reason that specifying boundary conditions is subtle cannot be due to any particular property of string theory in singular spaces. It is, instead, due to the fact that IIB supergravity contains a self-dual form F 5 , and as pointed out in beautiful work by Freed, Moore and Segal [7,8] (building on [16,[28][29][30][31][32][33][34]), quantization of self-dual forms in spaces with torsion needs to be done with care, even at arbitrarily weak coupling.
More in detail, in order to characterize our IIB background we should specify boundary conditions for all the supergravity fields, including the RR form five-form flux F 5 . Classically, this would imply specifying a background for F 5 at infinity, which we could conventionally simply set to zero. Quantum mechanically, the story is far more subtle. We will work out the details carefully below, but the main point is that for each class σ ∈ Tor(H 5 (M 6 ×S 3 /Z N ; Z)) we have flux operators Φ σ , which measure the torsional part of the flux on the homology class Poincaré dual to σ. The boundary conditions are determined by the expectation value of these operators, and naively we would want to simply choose a state with Φ σ = 1 for every σ, corresponding to a background with no flux at infinity. But, surprisingly, this turns out to be inconsistent due to the fact that fluxes on torsion cycles for self-dual forms do not necessarily commute [7,8] Here L(σ, σ ) is the linking pairing for the torsion 5-forms σ, σ , taking values in Q/Z. Most of the technical details in this section deal with the careful computation of this linking pairing. The nonvanishing commutator (2.1) implies that one cannot specify the value of all fluxes simultaneously, and in particular one cannot simply set the F 5 flux at infinity to zero. Instead, the best we can do is choose a maximal set of commuting operators and set those to zero (or to another fixed value). Given such a choice we can in principle compute the partition function for type IIB on that background, which also determines the partition function for 4 In general, electric and magnetic fluxes for p-form theories on spaces with torsion do not commute [7,8].
The basic observation is that the action of the electric flux operator is to shift the connection by a closed form in H • (X; U (1)), while the magnetic flux operator measures the topological class of the bundle associated to the connection. This implies that whenever topologically non-trivial closed forms in H • (X; U (1)) exist (that is, in the presence of torsion, see footnote 5 below), electric and magnetic operators do not necessarily commute. It was argued in [7,8] that analogously, fluxes for self-dual forms do not necessarily commute with each other whenever the spacetime has torsion. the A N −1 (2, 0) theory on M 6 . However, there is no canonical choice for the maximal subset of commuting operators to set to zero and, in fact, large diffeomorphisms on the boundary typically relate different choices. In light of this, one might expect that the collection of boundary conditions for type IIB in this background, with the subtleties due to non-vanishing commutators properly taken into account, is precisely the vector space of partition functions of the (2, 0) theory on M 6 . In the coming sections we will argue that this expectation is indeed correct.

Flux operators and the Hilbert space
The brief outline of the argument that we have just given fails to take into account a number of important subtleties. First, and importantly, RR fields in IIB string theory are more properly described in terms of differential K-theory (we refer the reader to [8,35,36] for introductions to differential K-theory). This not only takes into account that there is data in C 4 itself, beyond its field strength F 5 (the "differential" qualifier), but also the fact that RR fluxes in IIB are better described by K-theory [37]. For the purposes of understanding commutation relations, as we do here, it will be sufficient to restrict ourselves to ordinary K-theory, since the commutators depend only on the K-theory class (or more specifically, its torsional component). Second, and relatedly, the classes σ really live in H 4 (M 6 ×S 3 /Z n ; U (1)) (or rather, its generalization in differential K-theory) rather than Tor(H 5 (M 6 × S 3 /Z N ; Z)), 5 but again for the purposes of understanding the flux commutation relations it will be sufficient to restrict ourselves to the torsional data.
This still leaves the fact that we should be doing computations in K-theory, and that we need to actually compute the commutators. We now rectify these omissions. We are interested in how to specify the boundary conditions for euclidean IIB string theory on a ten-dimensional manifold X 10 = M 6 × C 2 /Γ, where M 6 is closed, oriented, Spin, and has no torsion. In order to understand how to choose boundary conditions properly, we will first take a slight detour and explain some general facts about quantum field theory.
It is a general property of quantum field theory formulated on a d-dimensional manifold X d that it associates a Hilbert space H(N d−1 ) to each (d−1)-dimensional submanifold N d−1 ⊂ X d . (We refer the reader unfamiliar with this and the following facts to [38] for a less telegraphic exposition.) This Hilbert space is the one associated with quantization of the original theory on N d−1 × R, where R denotes the time direction. We stress that we are not yet specifying the value of the fields on N d−1 , the Hilbert space only depends on N d−1 itself. Indeed, in the quantum theory a choice of field configuration on N d−1 corresponds to choosing a state |ψ ∈ H(N d−1 ). 5 Both groups are related by the short exact sequence with W 4 the group of (topologically trivial) Wilson lines for C4 on M6 × S 3 /Zn. Now assume that N d−1 = ∂X d . Then the path integral on X d , without specifying the set of boundary conditions, can be understood as a dual vector Z| ∈ H * (N d−1 ), so the value of the path integral with boundary conditions specified by |ψ is Z|ψ ∈ C.
Type IIB string theory in ten dimensions is most certainly not an ordinary ten-dimensional quantum field theory, but a version of the above is believed to hold whenever the tendimensional manifold is non-compact, with X 10 asymptotically of the form N 9 ×R. Classically, we would specify the boundary conditions on N 9 by giving boundary conditions at infinity for the IIB supergravity fields. We focus on the RR fields, setting B = 0, which are classified by K-theory [37]. For the purposes of studying the Heisenberg group of fluxes it is enough to consider the topological class K 1 (N 9 ) of the RR fields at the boundary [8]. 6 In analogy with the situation on QFT described above, we will assume that there is a Hilbert space H(N 9 ) associated to quantum boundary conditions, and that a specific choice of boundary conditions furnishes a vector in this Hilbert space. 7 (This prescription has been used before, for instance in the case of AdS/CFT boundary conditions [16].) In particular, if We will focus on the subsector of the Hilbert space H(N 9 ) describing the topological class of the RR fields at the boundary, which we will denote H [RR] (N 9 ). If the classical picture were not modified quantum mechanically, then the answer would be that H [RR] (N 9 ) is graded by classes in K 1 (N 9 ), or in other words that the boundary conditions are determined topologically by the K-theory class of the flux on the boundary. That this is not the case was shown in [7,8]. We refer the reader to these papers for the derivation, and here just state the result of the analysis as it applies to our case. Recall that the K-theory group K 1 (N 9 ) is an abelian group which might (and, in our examples, will) contain a torsional subgroup Tor(K 1 (N 9 )) = x ∈ K 1 (N 9 ) nx = 0 for some n ∈ Z . (2.3) We can also construct the group of fluxes modulo torsion .
Freed, Moore and Segal [7,8] showed that there is a grading of H [RR] (N 9 ) by K 1 (N 9 ); in other words the non-torsional part of the flux can be specified without subtleties, and the 6 Although it is not true in general, we will show that for the spaces discussed in this paper one has: so the reader unfamiliar with K-theory can think instead of the formal sum of cohomology groups of odd degree. Note that whenever we write H i (Y ) or Hi(Y ), without explicit mention of the coefficient ring, we are always referring to singular (co)homology theory with coefficients in Z. 7 If we specify the IIB geometry without choosing boundary conditions for the fields, then what we have is a dual vector of partition functions Z| ∈ H * (N9), which in the case of M d = C 2 /Γ × M6 will induce a partition vector on the gΓ (2, 0) theory on M6.
associated flux operators commute. Remarkably, they also showed that this commutativity does not hold for the torsional part.
To quantify this, we postulate a set of unitary operators Φ x , one for each K-theory class x ∈ Tor K 1 (N 9 ). The precise relation between these operators and the background RR fluxes will become clear shortly, but we remark for the present that they are essentially the integrals "exp(i A x ∧ F RR )" where F RR is the background flux and A x is a flat connection associated to the torsion class x. As shown by Freed, Moore and Segal [7,8], these operators do not commute. Instead, that we will discuss extensively below. Some useful properties of s(x, y) are that it is skew (s(x, y) = s(y, x) −1 ), alternating (s(x, x) = 1) and bimultiplicative (s(x+y, z) = s(x, z)s(y, z) and s(x, y + z) = s(x, y)s(x, z)). We say that a pairing (1)) is an isomorphism. The fact that the pairing is perfect implies, in particular, that no non-trivial torsion flux commutes with all other fluxes. Note that it is not in general true that Φ x Φ y = Φ x+y . Indeed, this would be incompatible with (2.5). However, we will assume that More generally, Φ x Φ y and Φ x+y will differ by a phase.
Since the flux operators do not commute, we cannot specify the asymptotic values for all fluxes simultaneously. Instead, the asymptotic values define a state in the Hilbert space H [RR] (N 9 ), and this Hilbert space is a representation of the Heisenberg group generated by the flux operators, defined below. 8 To construct this representation, we diagonalize a maximal commuting subset of the flux operators, as follows. (See [16,40] for previous discussions of this construction in related contexts.) Consider a subgroup L ⊂ Tor(K 1 (N 9 )). Define where L ⊥ is itself a subgroup of Tor(K 1 (N 9 )). We say that L is isotropic if L ⊆ L ⊥ , and that L is a maximal isotropic subspace of Tor(K 1 (N 9 )) if there is no isotropic subspace L such that L ⊂ L , or equivalently, if L = L ⊥ . Clearly, L is isotropic if and only if the group generated by the flux operators {Φ x |x ∈ L} is abelian, hence choosing maximal isotropic L corresponds to picking a maximal set of commuting observables. Given maximal isotropic L, there is a unique state in the Hilbert space As a unit eigenvector of the flux operators in L, this state is naturally thought of as a state of "zero flux". To see what fluxes we have turned off (and to turn them on with definite, non-zero, values), we consider the quotient: Choosing a representative f of each coset in F L , we obtain a basis for H [RR] (N 9 ): where the choice of representative only affects the overall phase of each basis element. The flux operators {Φ x |x ∈ L} are diagonal in this basis: We conclude that in this basis the background RR flux belongs to a definite coset f ∈ F L , whereas the flux operators Φ x , x ∈ L, are diagonalized with eigenvalues s(x, f ). Each maximal isotropic subspace L ⊂ Tor K 1 (N 9 ) gives a different basis |f ; L for the same Hilbert space H [RR] (N 9 ), with different fluxes specified in different bases.
We reiterate at this point that it is only once we have specified |ψ ∈ H [RR] (N 9 ) that have we completely fixed the IIB background, and only in this case we expect to have a uniquely determined partition function. How do we choose |ψ ? In ordinary quantum mechanics we would write |ψ = j a j |j (2.12) and we would choose the a i freely, giving rise to arbitrary superpositions of basis states.
In the current context we are dealing with boundary conditions at infinity, so we expect the Hilbert space to split into superselection sectors. Given that fluxes do not commute, the most conservative proposal (essentially the same choices studied in [16,40])) is to first specify a maximal isotropic subspace L ⊂ Tor K 1 (N 9 ), which will select the generators of the discrete 2-form symmetries present in the (2, 0) theory. We then choose |ψ = |f ; L for arbitrary f ∈ F , specifying a background flux f ∈ F L for these 2-form symmetries.
As we discuss more extensively in §3.4, in the particular case that M 6 = M 4 × T 2 the different choices of L reproduce the choices of global form for the associated N = 4 theory in four dimensions. More precisely, the state |0; L is associated with the N = 4 theory with 1-form symmetries determined by L (and thus, with a specific choice of global form for the gauge group and discrete theta angles [18]), and no background fluxes.

The K-theory groups of
In the case of interest to us we have that N 9 = M 6 × S 3 /Γ, so our task is to compute the K 1 group of this space. Since N 9 is a product, we can make use of the Künneth exact sequence for K-theory [41] with all indices taken modulo 2. In this equation Tor Z (A, B) is the 'Tor' functor between A and B (see for instance [42] for a definition), which has the property of vanishing whenever A or B are free. Since we are assuming in our case that the cohomology of M 6 has no torsion, we find (2.14) We will compute these K-theory groups by making use of some basic properties of Ktheory. Consider first a manifold X without torsion, such as M 6 . The existence of the Chern isomorphism The computation of the K-theory groups for S 3 /Γ is slightly more involved, since this space has non-vanishing torsion. Remarkably, the end result is that (2.16) still applies. In particular, the cohomology groups of S 3 /Γ are where Γ ab := Γ/[Γ, Γ] is the abelianization of Γ, discussed further below, and we used π 1 (S 3 /Γ) = Γ (since S 3 is the universal cover of S 3 /Γ), along with H 2 (S 3 /Γ) = H 1 (S 3 /Γ) = π 1 (S 3 /Γ) ab by Poincare duality and the Hurewicz theorem. Thus, (2.16) would give That these are indeed the K-theory groups of S 3 /Γ is shown to be the case in appendix A. Applying the K-theory Künneth formula (2.13) and comparing with the Künneth formula for cohomology, we see that likewise 19) so in this case K-theory reduces to cohomology. In particular, and so 3,5,7,9 Tor H n ( with potentially non-vanishing contributions in degrees 3, 5 and 7 arising from the degree 1, 3 and 5 components of K 1 (M 6 ) = n=1,3,5 H n (M 6 ), respectively.

The defect group and the linking pairing
The group Γ ab is easy to determine: 9 Binary tetrahedral 2T The Γ = Z N case is clear, and that of Γ = Dic n can be worked out without much effort as follows. A presentation of Dic n is a, x | a 2n = 1, x 2 = a n , x −1 ax = a −1 . (2.23) We obtain the abelianization by adding the relation ax = xa, which after some straightforward simplifications leads to a, x | x 2 = a n , a 2 = 1 (2.24) which is Z 2 ⊕ Z 2 for n even and Z 4 for n odd. Similarly, one can verify the exceptional cases by adding the relation st = ts to the following presentations for the exceptional groups Notice that (2.22) follows a simple pattern: let G Γ be the simply connected Lie group with algebra g Γ , and Z(G Γ ) its center, then (as already pointed out in [17,43]) (2.26) This relation will play a key role below when we compare our IIB analysis with the results of previous analyses of the global structure of the (2, 0) theory. It is not hard to prove that this relation is not accidental. Since To do so, we first provide an alternate description of H 1 (S 3 /Γ). Recall that whenever we have a pair of spaces (X, A) such that A ⊂ X there is a long exact sequence in homology of the form [42] .
where H n (X, A) denotes the singular homology of X relative to A. We take A to be S 3 /Γ, and X Γ to be a smooth, simply-connected space such that ∂X Γ = S 3 /Γ. More concretely, X Γ can be taken to be a sufficiently large neighbourhood of the origin of a resolved C 2 /Γ. Since H 1 (X Γ ) = 0 and H 2 (S 3 /Γ) = 0, we have the short exact sequence Geometrically, this exact sequence encodes the fact that one-cycles in S 3 /Γ can be constructed by intersecting a non-compact 2-cycle in X Γ with the S 3 /Γ. Clearly, adding compact 2-cycles has no effect on this description, hence the exact sequence. More physically, we can understand the quotient as a "defect group" [17,44] describing the screening of surface operators, in analogy with the field theory analysis in [4,5]. In brief, H 2 (X Γ , S 3 /Γ) is expected to parametrize the surface operators in the six-dimensional SCFT living at the singular point, while H 2 (X Γ ) parametrizes the "charge carriers" of the theory, and so C measures how much of the charge of the surface operators remains unscreened in the 6d SCFT. We refer the reader to [17] for a more detailed discussion of C from this viewpoint. Recall that we can identify H 2 (X Γ ) with the root lattice Λ r Γ of g Γ . Because g Γ is simply laced, Λ r Γ is also the coroot lattice, whose dual is the weight lattice Λ w (G Γ ) of the universal cover G Γ . On the other hand, geometrically we have that where the first equality is Lefschetz duality and in the second we have used the universal coefficient theorem together with H 1 (X Γ ) = 0. We are thus led to identify H 2 (X Γ , S 3 /Γ) with Λ w (G Γ ). Therefore, we can rephrase (2.29) in group theory terms as It is well known that this quotient is Z(G Γ ), see for instance theorem 23.2 of [45].
We now come back to the perfect pairing s(x, y) introduced in (2.5). A key ingredient in constructing this pairing is the linking (or torsion) pairing L(x, y), which is a perfect pairing of the form L : Tor describing the linking of torsion homology classes on a (n − 1)-dimensional manifold N n−1 .
To define this pairing, consider a torsion homology class [a] ∈ Tor H p−1 (N n−1 ) of order k a , so that k a [a] = 0. Thus, given a representative a p−1 of the class [a], there is a chain A p such that k a a p−1 = ∂A p . We define where x•y denotes the signed intersection number between transversely intersecting chains x, y on N n−1 . This definition is independent of the choice of A p for fixed a p−1 , as the intersection number of [b] (a torsion cycle) with any closed cycle vanishes. Likewise, it does not depend on the choice of representative a p−1 within the torsion class [a], as a p−1 → a p−1 + ∂λ p shifts L(a, b) by an integer λ p • b n−p−1 . Finally, noting that ∈ Tor H n−p−1 (N n−1 ). By Poincaré duality, the linking pairing can also be framed in cohomology: To define it in cohomological terms, consider the short exact sequence which induces a long exact sequence in cohomology of the form where δ, (induced by) the coboundary operator, is sometimes called the Bockstein homomorphism. Given x ∈ Tor H n−p (N n+1 ; Z), π(x) = 0, and thus exactness of the above sequence implies that X ∈ H n−p−1 (N n−1 ; Q/Z) exists such that δX = x. The linking pairing is then which is valued in Q/Z. Writing y = δY for Y ∈ H p−1 (N n−1 ; Q/Z) as well, this becomes N n−1 X δY (schematically " X ∧ dY "), in which form the properties discussed in the preceding paragraph are readily established.
We now consider Maxwell theory for a (p − 1)-form gauge potential, following Freed, Moore and Segal [8]. Given electric and magnetic torsion classes, x ∈ H d−p (N d−1 ) and y ∈ H p (N d−1 ) respectively, the corresponding flux operators Φ x and Φ y do not commute, where L(x, y) is the linking pairing we have just discussed. The situation is slightly different for self-dual gauge fields, for which electric and magnetic fluxes are one and the same. In this case, the commutator is where S(x, y) is a correction of the form with k = d−2 4 and ν 2k the Wu class of degree 2k. 10 Note that S(x), S(y) = ±1, with S(x, y) = −1 if S(x) = S(y) = −1 and S(x, y) = +1 otherwise. This correction is needed because, e.g., the linking pairing is not alternating on H d/2 (N d−1 ) [8].
In this paper, our primary interest is in type IIB string theory on N 9 = M 6 × S 3 /Γ. Associated to the self-dual RR field C 4 , there are flux operators labelled by torsion classes (2.42) For such classes, N 9 x ν 4 = 0 requires ν 4 to have components of the form p 3 ⊗ q 1 ∈ H 3 (M 6 ) ⊗ H 1 (S 3 /Γ). Since H 1 (S 3 /Γ) = 0, we conclude that S(x) = 1 for all x ∈ H 5 (N 9 ), and so the S(x, y) correction factor can be dropped.
More generally, the RR fluxes are described by K-theory rather than cohomology. However, we have shown that the K-theory groups of N 9 = M 6 × S 3 /Γ reduce to cohomology groups, and so it is natural to guess that the flux commutators likewise reduce to the cohomological ones discussed above, and in particular that the perfect pairing s(x, y) introduced in (2.5) is given by where L(x, y) = 0 when the degrees of x and y do not add to d = 10, and the correction factor S(x, y) is absent per the above discussion. Indeed, (2.43) follows from the K-theory pairing found by Freed, Moore and Segal [8], validating this guess. 11 We now compute the linking pairing L(x, y) for N 9 = M 6 × S 3 /Γ. It is convenient to work in homology. Since torsion comes from the S 3 /Γ component, we have with a, b ∈ H * (M 6 ) and 1 , 2 ∈ H 1 (S 3 /Γ). Thus, it is sufficient to compute the linking pairing L Γ : To write down the linking pairing L Γ , it is convenient to use a construction of H 1 (S 3 /Γ) that emphasizes the intersection form on X Γ . Using (2.30), we can rewrite (2.28) as (2.45) 10 We assume that d/2 is odd in the self-dual case. For a more general discussion, see [7]. 11 To see this, one can use the result in Klonoff's thesis [46] to express the integral over differential K-theory classes in terms of the η-invariant. As shown by Atiyah, Patodi and Singer in [47] the η invariant on M6 ×S 3 /Γ will factor into the index on M6 times η on S 3 /Γ. For odd forms the first term will be simply the intersection pairing on M6, and since Ω Spin where Q is the homomorphism with q the intersection form on H 2 (X Γ ). Therefore, The linking pairing on S 3 /Γ can be constructed from this short exact sequence and the intersection form q, as follows (see also [44]). Given σ 1 , The linking pairing is then 12 Equivalently, this can be written as with q −1 : Hom(H 2 (X Γ ), Z) × Hom(H 2 (X Γ ), Z) → Q defined precisely by the above procedure. 13 We now discuss examples, starting with the D n case. The structure of H 2 (X Dn ) together with its intersection form is encoded in the Dynkin diagram shown in figure 1, where each dot represents a generator of H 2 (X Dn ) and each link between nodes indicates that the given homology classes intersect once. Ordering the homology basis elements as {α,α, a 0 , a 1 , . . . , a n−3 } we have the intersection matrix (2.50) 12 There is some ambiguity in the literature regarding the overall sign of the linking number. We follow the conventions in [48]. 13 Note that q −1 need not be integral; since q is integral, q −1 is integral iff det q = ±1.
We introduce a dual basis of Hom(H 2 (X Dn ), Z) given by {α * ,α * , a * 0 , a * 1 , . . . , a * n−3 }, with the property that a * i (a j ) = δ ij , and similarly for α andα. The relations introduced by Q on Hom(H 2 (X Dn ), Z) are then (2.51) A little bit of algebra shows that these relations imply that a * k = (n − 2 − k)a * n−3 , so we can take a * n−3 , α * ,α * as generators of the quotient (2.47), subject to the remaining relations which implies 2a * n−3 = 0. We now distinguish whether n is even or odd. For n even we have This is a Z 2 ⊕ Z 2 group, in agreement with (2.22). We can choose α * andα * as generators. Furthermore, it is easy to verify that when restricted to α * andα * we have, using (2.49) (2.54) If we instead choose n to be odd, we obtain the equations which gives a presentation of a Z 4 group generated by α * . From the inverse intersection form we obtain Taking into account that n is odd, we obtain a linking form Other cases can be analyzed similarly; we will present the results below. The technology that we developed above is not restricted to ALE cases, and applies equally well to any IIB background such that the horizon manifold is smooth. 14 We will 14 In some cases the IIB axio-dilaton might have non-trivial behaviour at infinity, so K-theory is not necessarily the right framework for classifying fluxes. (We refer the reader to [49] for a review of some of the difficulties in trying to extend the K-theory classification to situations in which SL(2, Z) dualities are important.) Our discussion below deals with F5 only, which is invariant under SL(2, Z) transformations, and we are in a context where K-theory reduces to cohomology, so we expect our results to survive in a more careful treatment.
The generalized geometries considered in the text. Nodes denote two-cycles, a line connecting two nodes indicates that the cycles intersect each other transversely, and a number next to the node denotes (minus) its self-intersection.
determine the linking pairing (and thus operator commutation relations in the six dimensional theory) geometrically in a number of cases, including those where more than one possibility exists at the level of the algebra. In particular, we can apply this method to geometrically engineered (1, 0) theories in six dimensions, as studied in [17].
Consider for instance the case in which the small resolution of X Γ has two curves a 1 and a 2 , of self-intersection −3 and −2 respectively. The two curves intersect at a point. The resulting intersection diagram is shown in figure 2(a). This geometry is one of the "generalized A-type" configurations studied in [17,50], to which we refer the reader interested in further details. The point of greatest interest to us is that X Γ can be understood as a desingularization of C 2 /Γ, with Γ a Z 5 subgroup of U (2) acting as with ω = exp(2πi/5). The intersection matrix for this geometry, in the a i basis, is From here we learn that H 1 (S 3 /Γ) = Z 5 , as expected. Given that 2 −1 = 3 in Z 5 we can take either a * 1 or a * 2 as generators, let us take a * 1 for convenience. We have Note that 3 is not a quadratic residue in Z 5 , so this linking form is inequivalent to the one with value 1 5 for the linking number of the generator with itself. As another illustration, consider the d = 6, N = (1, 0) compactifications classified in [50]. The associated defect group was discussed in [17], where it was shown that for the "generalized D-type" singularities, obtained by taking the quotient C 2 /D p+q,q , 15 one has whenever q is even. Consider for example the case p = 3. In this case Z 2p ∼ = Z 2 ⊕ Z 3 . Up to a sign that we specify below, there is a unique linking form for the Z 3 factor, but for the remaining Z 2 ⊕ Z 2 factor we have two possibilities, given by L even and L odd in (2.54). And indeed both possibilities appear: a straightforward application of the techniques above shows that the (p, q) = (3, 2) case (in figure 2(b)) has intersection form L even , while the (p, q) = (3, 4) case (in figure 2(c)) has a linking form given by L odd . Finally, let us consider the "generalized D N " theory of type D p+q,q with (p, q) = (2, 7). It was shown in [17] that the defect group in this case is Z 8 . A computation along the lines described above shows that the linking form is with the generator of H 1 (S 3 /D 9,7 ). Note that 5 is not a residue modulo 8, so this linking form is inequivalent to the naive pairing L( , ) = 1 8 mod 1. Another inequivalent pairing is also realized, for instance by choosing (p, q) = (2,9). More generally, one finds that S 3 /D p+q,q for (p, q) = (2, 2k + 1) has pairing despite the defect group always being Z 8 , so all possible pairings are realized.
Other generalized D N theories can be analyzed similarly, we will briefly state the results without proof. For instance, consider the family of theories D p+q,q with (p, q) = (3, 3k + 1). One finds that the defect group is Z 3 ⊕ Z 2 ⊕ Z 2 for q even (or equivalently, k odd), and Z 12 for q odd [17]. In this last case we find the linking form with the generator of Z 12 . For q even, we find instead with 3 a generator of the Z 3 factor, and L even when q ∈ 4Z + 2 (2.68) for the restriction of the linking form to the Z 2 ⊕ Z 2 factor. One can also see that the (p, q) = (3, 3k − 1) case leads to precisely the same results as the ones we have just given.
-18 -Let us summarize the story so far. Quantizing type IIB string theory on a non-compact manifold M 6 × C 2 /Γ requires a choice of flux boundary conditions on N 9 = M 6 × S 3 /Γ. Because electric and magnetic flux operators do not commute, there is no canonical "zero flux" boundary condition that we can choose. Instead, the possible boundary conditions for the RR fluxes are states in a Hilbert space acted on by the flux operators Φ where s(x, y) is a perfect pairing. Maximal commuting subsets of the flux operators are in direct correspondence with maximal isotropic subspaces L ⊂ Tor K 1 (N 9 ) with respect to the perfect pairing s(x, y). Given maximal isotropic L, there is a basis of eigenstates |f ; L labeled by cosets f ∈ F L = Tor K 1 (N 9 )/L with These states have boundary flux in a definite coset f ∈ F L , the strongest condition that we can consistently impose. In particular, f ∼ = 0 (restricting the flux to lie along L) is the closest we can come to a "zero flux" boundary condition. The resulting quantization depends on the choice of maximal isotropic subspace L ⊂ Tor K 1 (N 9 ). Note that the flux operators Φ x generate a Heisenberg group, summarized by the short exact sequence, 16 0 where π(Φ x ) = x. The Hilbert space of flux boundary conditions discussed above is the unique irreducible representation of W, and so the Heisenberg group W is a convenient avatar for the choice of boundary conditions. For N 9 = M 6 × S 3 /Γ with M 6 torsion-free, K 1 (N 9 ) is the sum of cohomology groups of odd degree and the perfect pairing is where a i ∈ H 1,3,5 (M 6 ), i ∈ H 2 (S 3 /Γ) = Γ ab , and L Γ is the linking pairing for S 3 /Γ, which can be computed using the methods described in the previous section. For instance, for 16 To be precise, this sequence is exact if we take W to be generated by the flux operators and arbitrary U (1) phase factors. If we take W to be generated by the flux operators alone, then U (1) must be replaced by ZN in the exact sequence, where N is the order of the largest cyclic subgroup of Tor K 1 (N9).
Γ ⊂ SU (2) -leading to the (2, 0) theories -we find (see also [51]) When the defect group Γ ab is cyclic, we list L Γ (a, a) for the generator a, whereas for Γ ab = Z 2 ⊕ Z 2 , we refer to the two cases in (2.54).
We emphasize that the correct linking pairing is in general not determined by the defect group. For instance, the defect groups for Spin(8N ) and Spin(8N + 4) are both Z 2 ⊕ Z 2 , but the linking pairings are distinct. This has physical consequences, e.g., for S-duality in 4d compactifications of these theories, and we will see that the linking pairings in (3.5) correctly reproduce known results from the literature. This is a sensitive test of our methods.

(2, 0) theories
This solves the problem of specifying the RR flux boundary conditions for type IIB string theory compactified on M 6 × C 2 /Γ. We now compare our results with known results about the global structure of 6d (2, 0) theories with simple Lie algebras. To do so, we use the universal coefficient theorem, which is the short exact sequence (see theorem 2.33 in [52]) Applying (2.21) along with the assumption that M 6 is torsion-free, we find Thus, the Heisenberg group can be presented as as is typically done in the (2, 0) literature. Note, however, that the cohomology theory of M 6 with coefficients in Γ ab does not in itself define the perfect pairing s(x, y). Instead, this depends on the topology of S 3 /Γ, as we have seen. Since (3.4) involves the cup product on M 6 , the Heisenberg group splits naturally into a direct sum The W 1,5 factor is associated with D1 and D5 branes wrapping torsional cycles in S 3 /Γ, and stretching from infinity to the singularity, giving rise to point and codimension two operators in the six dimensional theory. We also expect to have operators related to these by SL(2, Z) transformations of the IIB background, that is (p, q) 5-branes and (p, q) 1-branes. It would be interesting to understand these operators more fully from the field theoretic viewpoint, but we will not do so here, simply noting that a choice of maximal isotropic subspace within H 1 (M 6 ; Γ ab ) ⊕ H 5 (M 6 ; Γ ab ) can be done canonically, without reference to the details of M 6 . For example, we can choose L = H 1 (M 6 ; Γ ab ), or with equal validity L = H 5 (M 6 ; Γ ab ). Likewise, W 3 is associated with D3 branes wrapping torsion cycles in S 3 /Γ, giving rise to 2-surface operators in the six dimensional theory. However, unlike before, there is no M 6independent choice of boundary conditions (except in some special cases, see (3.12) below). This differs from the situation at the classical level, where all background fluxes can be set to zero if desired. Due to the non-commutativity of fluxes in the presence of torsion, this canonical choice ceases to exist in the quantum theory: trying to set all fluxes to zero would be akin to trying to fix both the position and momentum of a particle in ordinary quantum mechanics.
These IIB results have clear implications for 6d (2, 0) theories. In order to fully specify the partition function of a six-dimensional (2, 0) theory on a manifold M 6 we need to specify the background fields for the global 2-form symmetries of the theory. These background fields are inherited from the asymptotic boundary conditions for the F 5 flux -or somewhat more precisely, from the holonomies of C 4 on torsion cycles, see [7,8] and the remarks at the beginning of §2.1. But we have just argued that completely fluxless boundary conditions for F 5 are impossible. Thus, the background fields for the 2-form symmetries of the (2, 0) theory cannot all be set to zero. Instead, only a subset can be fixed, the remainder being summed over. The choice of this subset is a choice of maximal abelian subgroup of the Heisenberg group W 3 in (3.10), equivalently the choice of a maximal isotropic subspace of H 3 (M 6 ; Γ ab ).
Indeed, precisely the same structure has been previously argued -by different meansto describe the global structure of (2, 0) [16,53] and (1, 0) [17] theories. The IIB viewpoint that we have developed here encompasses all previously understood cases, and allows us to determine the precise commutation relations for the 2-form flux operators, as illustrated above for C 2 /D 2n and C 2 /D p+q,p . For instance, the distinction between L even and L odd for the case p = 3 with q even should lead to distinct S-duality patterns after compactification on T 2 ; to our knowledge this is not yet explored in the literature.

Theories and metatheories
As we have seen, the (2, 0) theories are generally "metatheories": they have a partition vector -associated to a choice of maximal isotropic subspace L ⊂ Γ ab ⊗ H 3 (M 6 ) -rather than a partition function. If we can devise a prescription for choosing L, independent of the details of M 6 , 17 then the partition vector becomes a partition function, and we obtain a "genuine" theory. In particular, this is true when i.e., equal to its orthogonal complement L 0 = L ⊥ 0 with respect to the linking pairing L Γ . Crucially, since the linking pairing L Γ on H 2 (S 3 /Γ) is symmetric (unlike the linking pairing L on H 5 (N 9 ), which is antisymmetric), self-dual L 0 need not exist. In particular, one can show that |L||L ⊥ | = |Γ ab |, and so the order of the defect group must be a perfect square. Examining (3.5), the possibilities corresponding to simple Lie algebras are easily classified: 18 where in each case L 0 is cyclic and we indicate its generator. Fixing these maximal isotropic subspaces, we obtain genuine (2, 0) theories (see, e.g., [3,40]), where G is the 5d gauge group that results from compactification on S 1 (see below) and Ss(4k) = Spin(4k)/Z (L) 2 and are the semispin groups. Notice in particular that the linking pairing L even leads to additional genuine (2, 0) theories that are not present for L odd .
The distinction between metatheories and genuine theories is further illuminated by considering the behavior of extended operators. For instance, the (2, 0) theory with Lie algebra D 4k contains three types of 2-surface operators, corresponding to the three non-zero elements of the defect group Z 2 ⊕ Z 2 . These 2-surface operators are not "mutually local", in that correlation functions containing multiple types of 2-surface operators will have branch cuts when one type circles another. We can solve this problem by declaring only one type of 2-surface operator to be "genuine" [3,16,54]. The remaining "non-genuine" 2-surface operators are then interpreted as lying at the boundaries of 3-surface operators (the branch cuts), with the correlation functions only topologically dependent on the position of the 3-surfaces.
Indeed, depending on which 2-surface operator we designate as genuine, we obtain one of the genuine theories SO(8k), Ss(8k), or Sc(8k) listed in the table above, where the generator of the maximal isotropic subspace L 0 corresponds to the genuine 2-surface operator. The other genuine theories also correspond to choosing genuine 2-surface operators in the same theory on an interval, with D on one boundary and gapped boundary conditions T on the other. Distinct choices of T lead to distinct genuine theories with the same spectrum of local operators (determined by D). If gapped boundary conditions are not possible then there are no genuine theories corresponding to D. 18 The Ss(8k) and Sc(8k) cases are related by an outer automorphism of Spin(8k), and triality relates them to SO(8) for k = 1. The case SU (4)/Z2 = SO(6) appears twice in the table due to an exceptional isomorphism.
manner, but with the added complication that some 2-surface operators fail to be "self-local", in that two operators of the same type can generate a branch cut upon circling each other. 19 To see how these properties follow from the string theory picture discussed previously, it is convenient to consider first the conceptually simpler 6d (1, 1) theories.

Wilson and 't Hooft operators
To obtain 6d N = (1, 1) Yang-Mills theories with simple ADE Lie algebra g Γ , we replace type IIB string theory with type IIA string theory in our discussion above, with Γ ⊂ SU (2). 20 To define the partition function for this theory on a manifold M 6 we again need to choose boundary conditions at infinity. The main difference with the IIB case is that in IIA the RR fluxes live in K 0 (X), instead of K 1 (X) [37]. Repeating the analysis above, mutatis mutandis, we obtain so that once more the Heisenberg group splits naturally into two components both with the commutation relations coming from the torsion pairing in S 3 /Γ times the intersection number in M 6 . As we will see, the Heisenberg algebra W 2,4 is associated to Wilson and 't Hooft operators, and correspondingly the maximal isotropic subspaces of H 2 (M 6 ; Γ ab ) ⊕ H 4 (M 6 ; Γ ab ) are related to the global form of the gauge group. The significance of W 0,6 is less clear, and we defer further consideration of it to a future work. 21 Wrapping a D2 brane on a torsion one-cycle σ a of S 3 /Γ and extending it from the singularity off to infinity, we obtain a Wilson line operator in the 6d gauge theory. To determine whether the Wilson line operator is genuine, we move it around a closed path in M 6 , tracing out a two-cycle Σ 2 , and ask whether the correlation function has changed once it returns to its original position. If we initially deform the D2 brane only within a distance r < r 0 of the singularity, then the net result of the deformation is to add a D2 brane wrapped on σ a × Σ 2 at radius r = r 0 . Extending the deformation outward (r 0 → ∞) corresponds to moving the wrapped D2 brane far away from the singularity. The Chern-Simons coupling σa×Σ 2 C 3 of the wrapped D2 brane contributes a phase to the path integral unless the holonomy of C 3 on σ a × Σ 2 vanishes. Explicitly, pulling back to S 3 /Γ × Σ 2 , 19 For instance, the A1 theory has one non-trivial 2-surface operator, which fails to be self-local. As a result, there is no maximal isotropic subspace of the kind (3.11) for this Lie algebra. 20 Note that F-theory is not available to restore (1, 0) supersymmetry in the Γ ⊂ U (2) cases, unlike in IIB. It would be interesting to consider IIA backgrounds with varying dilaton and compare with a geometric analysis in M-theory, but we do not attempt this here. 21 In the IIA description the associated operators come from D0 branes wrapping the torsion cycle (suggestive of fractional instanton effects in the field theory [55]), and D6 branes wrapping the torsion cycle and extending from infinity to the singularity, where they become Γ ab -valued domain walls.
the phase is exp(2πiL Γ (PD[σ a ], f )) where PD denotes the Poincaré dual within S 3 /Γ and f ∈ Tor Thus, the correlation function has a branch cut unless the linking pairing L Γ (PD[σ a ], f ) vanishes. Likewise, a D4 brane wrapped on σ b and extended from the singularity to infinity yields a 't Hooft 3-surface operator in the gauge theory. Consider the link Σ 2 of the 3-surface wrapped by the 't Hooft operator within M 6 . The presence of the D4 brane generates torsional flux f = PD[σ b ] within Tor H 4 (S 3 /Γ×Σ 2 ) ∼ = H 2 (S 3 /Γ), and so deforming a Wilson line associated to the torsion cycle σ a along Σ 2 we pick up a phase exp(2πiL Γ (σ a , σ b )): the Wilson and 't Hooft operators are not mutually local.
Suppose that we wish to designate all Wilson lines as genuine. Per the above discussion, this requires a boundary condition where the torsion component of [F 4 ], classified by Tor H 4 (S 3 /Γ × M 6 ) ∼ = Γ ab ⊗ H 2 (M 6 ), vanishes. The corresponding maximal isotropic subspace is L = Γ ab ⊗ H 4 (M 6 ). As this choice is independent of the details of M 6 , it produces a genuine (1, 1) theory with Wilson lines classified by Γ ab = Z(G Γ ). In a gauge theory with gauge group G, we expect a Wilson line operator for each element of Z(G) (see, e.g., [18]), so we interpret this theory as the 6d (1, 1) theory with simply connected gauge group G Γ .
More generally, for any subgroup L W ⊆ Γ ab , we can choose the maximal isotropic subspace for which the Wilson lines L W and 't Hooft lines L H = L ⊥ W are genuine. By the same reasoning as above, this is a genuine (1, 1) theory with gauge group G Γ /L H . 22 In this way, the M 6 -independent maximal isotropic subspaces reproduce the different global forms of the gauge group.
This result can also be understood from the viewpoint of generalized global symmetries [3]. Consider, as an example, the six-dimensional (1, 1) theory with algebra su(N ). The choice of a global form of the gauge group can be understood as a choice of which higher-form symmetries are present in the theory. For instance, if we choose global form SU (N ) then there is a Z N discrete 1-form symmetry counting Wilson lines (which are "genuine", in this theory), while if we choose global form SU (N )/Z N there is instead a Z N 3-form symmetry counting 't Hooft 3-surface operators. In the former case, we can couple the theory to a background 2-form Z N gauge field, with the non-trivial gauge bundles classified by H 2 (M 6 ; Z N ). These gauge bundles for the background 2-form should correspond to the background flux f ∈ F L , where F L is given by (2.10). Thus, the global form SU (N ) corresponds to the maximal isotropic subspace L = H 4 (M 6 ; Z N ) (for which F L ∼ = H 2 (M 6 ; Z N )), in agreement with the above analysis. The case SU (N )/Z N is analyzed similarly. 22 To make this statement precise, we need to specify a canonical map between Λ w (G) Λ r and Z(G). In particular, we choose this map so that g ∈ Z(G) gives a phase exp(2πiLΓ(g, r)) to representations in the coset r ∈ Λ w (G) Λ r . This is the natural choice, but has potentially unexpected consequences for the case D 4k , e.g., the left-handed spinor coset maps to the generator of Z

N = 4 theories of ADE type
The above discussion is readily generalized to the (2, 0) theories, with corresponding changes in the dimensions of branes/operators and the ranks of fluxes. However, as many (2, 0) theories do not admit an M 6 -independent maximal isotropic subspace, see §3.2, it is particularly interesting in this case to consider Lagrangian subspaces that depend on M 6 . The discussion of the previous section can be summarized as follows: switching to homology using Poincaré duality, the Lagrangian subspace L ⊂ H 1 (S 3 /Γ) ⊗ H 3 (M 6 ) ∼ = H 3 (M 6 ; Γ ab ) is the space of cycles on which the holonomy of C 4 is asymptotically fixed to zero by the boundary conditions. As such, these are the cycles around which we can deform the 2-surface operators without encountering a branch cut. When L is M 6 dependent, this means that some but not all branch cuts are eliminated, and in general no 2-surface operators are genuine when deformed around an arbitrary three-cycle.
Having understood the behavior of 6d (2, 0) theories in terms of boundary conditions in type IIB string theory, we can apply the same ideas to compactifications of the (2, 0) theory. Our goal in the remainder of this section is to demonstrate that the classification of 4d N = 4 theories given by [18] (see also [56]) is reproduced in this framework. To do so, we consider T 2 × M 4 compactifications of the (2, 0) theories, following a similar approach to Tachikawa [40] but using Heisenberg group commutators computed directly in the type IIB picture discussed above, rather than inferred from four dimensional reasoning [18,56]. The Lie algebras D 4k and D 4k+2 (not analyzed in [40]) provide a particular sensitive test of our reasoning, as the different linking pairings L even and L odd for these two cases lead to different patterns of 4d S-duality, in agreement with [18].
First note that, in the absence of torsion on M 4 , we have by the Künneth formula Again for degree reasons we have a natural splitting of the associated Heisenberg group The Heisenberg group W 1,3 is associated to point and 2-surface operators in the 4d theory. Noting that, M 4 and T 2 -independent choices of maximal isotropic subspace are always possible within this factor, such as L 1,3 = H 1 (M 4 ; Γ ab ) or L 1,3 = H 3 (M 4 ; Γ ab ), we ignore it for the time being, instead focusing on the factor W 2 describing line operators.
To obtain genuine 4d theories, we consider M 4 -independent maximal isotropic subspaces of H 2 (M 4 ) ⊗ H 1 (T 2 ) ⊗ Γ ab . These are of the form where L T 2 is a maximal isotropic subspace of H 1 (T 2 ; Γ ab ), corresponding to the Heisenberg algebra Since a maximal isotropic subspace of H 1 (T 2 ; Γ ab ) always exists there are genuine theories corresponding to every Lie algebra, unlike in six dimensions. Instead, the absence of a genuine six dimensional theory causes a "modular anomaly": tracing a closed path in the complex structure moduli space of the torus changes the partition function.
In particular, the partition function is generally not a modular-invariant function of the holomorphic gauge coupling τ . From the 6d perspective, τ is the complex structure of the torus and modular transformations τ → aτ +b cτ +d are large diffeomorphisms in the background metric. Thus, the failure of modular invariance (in the absence of additional background fields along the torus) is the result of a 6d anomaly in large diffeomorphisms. Depending on the 6d anomaly, a characteristic pattern of S-dualities is generated, as in, e.g., [18].
Note that if we view fixed τ as part of the defining data of the theory then we would not consider the non-invariance of the partition function under SL(2, Z) transformations of τ to be a 4d anomaly, but rather a consequence of deforming along a fixed line from one theory to another. On the other hand, when considering four-dimensional backgrounds with varying τ , the anomaly viewpoint becomes more natural. We revisit this point below in the context of theories with codimension-two duality defects. 23 Thus, for each maximal isotropic subspace of L T 2 ⊂ H 1 (T 2 ; Γ ab ) there is a genuine 4d N = 4 theory. Wrapping the 2-surface operators of the 6d (2, 0) theory on different cycles of the torus, we obtain different types of 4d line operators. For instance, reducing the (2, 0) theory first on the A cycle of the torus, we obtain a five-dimensional gauge theory, with Wilson line and 't Hooft 2-surface operators. Reducing again on the B cycle, the 't Hooft operators become lines. Thus, 2-surface operators wrapped around the A and B cycles are Wilson and 't Hooft lines, respectively, whereas those wrapped around a combination of the two are dyonic lines.
We can identify the genuine theory in question by specifying which of these line operators are genuine. In particular, by the same reasoning as in the previous section, there is a oneto-one correspondence between the elements of the maximal isotropic subspace L T 2 and the genuine line operators in the 4d theory, and so the result can be directly compared with [18].
Consider for example the N = 4 theories with Lie algebra su(N ), corresponding to the A N −1 (2, 0) theory on a torus. In general H 1 (T 2 ; Γ ab ) = H 1 (T 2 ) ⊗ Γ ab = Γ ab ⊕ Γ ab with the perfect pairing s(a, b) = exp(2πiL T 2 (a, b)), where L T 2 is the linking pairing on and π A : Γ ab ⊕ Γ ab → Γ ab and π B : Γ ab ⊕ Γ ab → Γ ab project onto the first and second summand, respectively. In the su(N ) case, Γ ab = Γ = Z N , and we obtain the perfect pairing   . We have labelled the possibilities using the nomenclature of [18]. Each filled dot corresponds to a genuine line operator.
For instance, L = {mq|0 ≤ m < N } is a maximal isotropic subspace whose elements correspond to 't Hooft lines of every possible Z N charge; the associated gauge theory is therefore (SU (N )/Z N ) 0 in the notation of [18]. For any fixed N , it is a simple exercise to enumerate the maximal isotropic subspaces of Z N ⊕ Z N with respect to the perfect pairing (3.23). For instance, the case N = 3 is shown in figure 3, with results that are easily seen to agree with [18]. More generally, flux operators This is the same as the mutual locality constraint found in [18], so the results will agree in general.
The above analysis generalizes readily to compactifications of the (2, 0) theory on an arbitrary compact Riemann surface Σ; M 4 -independent maximal isotropic subspaces are now of the form L = H 2 (M 4 ) ⊗ L Σ , associated to the Heisenberg group 0 • is the intersection form on Σ. It would be interesting to understand how adding punctures on Σ-as in class S constructions-changes this story.

Fractional instanton numbers and the linking form
Although this is somewhat outside the main line of development of our paper, we point out that in the N = 4 cases one can give a simple expression for the fractional instanton numbers for G Γ /Γ ab bundles, as computed in [61] (see also [18]) in terms of the linking pairing discussed above. Let us assume that M 4 has no torsion and also that it is a Spin manifold. Consider the class w 2 ∈ H 2 (M 4 ; Γ ab ) measuring the obstruction to lifting the given G Γ /Z(G Γ ) = G Γ /Γ ab bundle to G Γ . Since Tor H 4 (M 4 × S 3 /Γ) ∼ = H 2 (M 4 ; Γ ab ) along the same lines as above, we can rewrite this as a class w 2 ∈ Tor H 4 (M 4 × S 3 /Γ). Denoting byL the linking form in M 4 × S 3 /Γ, one can check that the fractional instanton number can be expressed as 24 From the type IIB string theory perspective this is a change in the phase of the partition function resulting from a large diffeomorphism of the T 2 factor in the M 4 × T 2 × C 2 /Γ geometry, in the presence of a RR 5-form flux given by w 2 ⊗ x, with x a generator of H 1 (T 2 ). As such, a rough argument for (3.27) is as follows. Heuristically, we could express the path integral of IIB string theory on a manifold X 10 with background flux F as the the partition function of the anomaly theory A on a manifold Y 11 with ∂Y 11 = X 10 , and an insertion in Y 11 of an appropriate flux operator Φ F (see for instance [16] for a similar construction in the context of AdS/CFT). In our situation, depicted in figure 4(a), we are interested in computing the partition function of A on a cylinder with flux w 2 ⊗ x on one end, and (due to the large diff on the T 2 factor) a flux w 2 ⊗ (x + y) on the other end. In order to create these fluxes, we introduce operators Φ w 2 ⊗x and Φ w 2 ⊗y into the bulk of the anomaly theory. Now take two copies of the cylinder constructed above, and glue them together, along with two trivial cylinders, into a torus, as in figure 4(b). Bringing the four insertions together we obtain the commutator s( w 2 ⊗ x, w 2 ⊗ y) which is a c-number, and can be taken out of the path integral. The c(M 4 ) factor in (3.28) is associated to the change in the partition function with no flux, so it is natural to conjecture that it is associated with the value of 24 Recall that we are taking M4 to be a Spin manifold, so 1 2 M 4 w2 w2 is an integer. 25 In comparing with the results of [18], it might be useful to recall that in the case at hand one can define the Pontryagin square of x ∈ H 2 (M4, Z2) by P(x) = x 2 mod 4, where x ∈ H 2 (M4) is an uplift of x. 26 That is, the fractional instanton number encodes an anomaly under θ → θ + 2π. See [60] for recent work discussing this viewpoint in more detail.  Gluing two copies of the configuration giving the anomaly to two configurations without flux we obtain the anomaly theory with four operator insertions. Bringing the operators together we obtain the commutator, a c-number.
the partition function in the absence of Φ F insertions. 27 Removing this overall factor, the construction implies that s( w 2 ⊗ x, w 2 ⊗ y) = exp(2πi n inst ) 2 .

(3.29)
Using the relations between s and the linking form given above, this implies (3.27) up to a sign, which depends on choices of orientation that we have not been careful about. The above argument is somewhat heuristic. It would be interesting to work it out in detail and determine its implications beyond the N = 4 case. It seems natural to conjecture, for instance, that (3.27) still holds if we consider (1, 0) theories compactified on T 2 . Even though the resulting theory may be non-Lagrangian, (3.27) is a natural guess for the behavior of the partition function in the presence of backgrounds for the 1-form symmetries. 27 It should in principle be possible to compute this change in the partition function of IIB string theory in terms of an eleven-dimensional anomaly theory A (see [31,[62][63][64][65]) on a cylinder with boundary the ten dimensional configurations related by the large diffeomorphism. A natural stepping stone towards the full eleven-dimensional computation would be to reproduce the anomalous phases of the partition function from the behaviour of the anomaly theory for the six-dimensional (2, 0) theory [15]. See [57] for an analysis following this approach for the abelian case (or more generally, for six-dimensional theories with an invertible anomaly theory).

Product groups
Consider the case of the E 8 theory in six-dimensions, arising from IIB on C 2 /E 8 . Since 28 H 2 (S 3 /E 8 ) = 0 the (2, 0) theory of e 8 type is a genuine six-dimensional theory: no choice of IIB boundary conditions at infinity is needed in order to define the theory on any six-manifold. This implies, in particular, the well-known fact that the N = 4 theory with gauge group E 8 is invariant under SL(2, Z) dualities. The group E 8 has a maximal subgroup (E 6 × SU (3))/Z 3 , and one can check that the N = 4 theory with this gauge group is also invariant under SL(2, Z).
We can reproduce this result from our geometric perspective, by showing that there is a genuine six-dimensional theory of type e 6 ⊕ su(3). Consider a local K3 with singularities of type locally C 2 /E 6 and C 2 /Z 3 . We link the singularities by small rational homology spheres S 3 /E 6 and S 3 /Z 3 , with total manifold their disjoint union S u := S 3 /E 6 S 3 /Z 3 . From (3.5) we obtain with linking form Let a and b be the generators of H 2 (S u ) corresponding to the H 2 (S 3 /E 6 ) and H 2 (S 3 /Z 3 ) factors, respectively. Because L u (a + b, a + b) = 0, H 2 (S u ) has a self-dual subspace generated by a + b (as well as one generated by a − b). Associated to this, there is a maximal isotropic subspace of H 2 (S u ) ⊗ H 3 (M 6 ) given by Following the same reasoning as above, after reduction on T 2 we obtain a 4d theory with line operators that carry equal charge under the Z 3 1-form symmetries associated to e 6 and su (3), hence the global form of the gauge group is indeed (E 6 × SU (3))/Z 3 . We emphasize that in this last example it was essential that L E 6 = −L Z 3 , so this is another sensitive check of our arguments. This condition can also be understood along the lines of the previous section: because of the change in sign of the linking form, the induced fractional instanton numbers associated to the two factors are equal and opposite, so that the τ → τ + 1 transformation becomes anomaly-free. Similar checks can be performed for the rest of the maximal subgroups of E 8 . For instance, (Spin(10) × SU (4))/Z 4 is another example where the precise signs in (3.5) are crucial to get the right results. 29 An interesting case is (SU (5) × SU (5))/Z 5 , for which 28 The space S 3 /E8 is known as the "Poincaré homology sphere", and is well known to have the same homology groups as S 3 . As we have explained above, this statement is equivalent to the fact that the centre of E8 is trivial. 29 As in (3.12), we use the global form of the 5d gauge theory that results from circle compactification to label genuine (2, 0) theories. and we can proceed as above.
As pointed out in [27], there are self-dual N = 4 theories with gauge group (SU (N ) × SU (N ))/Z N for any N . At first, this poses a bit of a puzzle, since in general there is no n such that n 2 ≡ −1 mod N . For instance, for N prime, the condition for such an n to exist (i.e., for −1 to be a quadratic residue) is that N ≡ 1 mod 4. Choose N = 3, for example. The linking pairing is and it is easy to see that H 2 (S u ) has no self-dual subspaces.
The resolution of the puzzle is that the theories described in [27] are really of the form (SU (N ) × SU (N ))/Z N , meaning that in the IIB string theory realization the 16 supercharges preserved by the first factor are precisely the 16 supercharges broken by the second factor, as in brane-antibrane systems. In the deep infrared, the two A N −1 theories decouple, and each is invariant under 16 supercharges. However, the preserved supercharges have opposite chiralities ((2, 0) versus (0, 2)), and the full theory is non-supersymmetric at the massive level.
Geometrically, this is achieved by gluing ALE spaces with opposite orientation to each other. The change of orientation flips the overall sign of the intersection form on the ALE space, which likewise flips the sign of the linking pairing on S 3 /Z N by (2.49). The correct linking pairing on H 2 (S u ) is therefore which admits self-dual subspaces, such as Span(a + b).

Self-dual boundary conditions
In the previous sections we have discussed how a careful treatment of boundary conditions in IIB string theory in M 6 × C 2 /Γ allows us to reproduce the known global structure of (2, 0) theories of type g Γ on M 6 , giving in particular a systematic way of understanding the set of discrete 2-form symmetries of the (2, 0) theory and their commutation relations, as encoded in the Heisenberg group We have seen that W 3 can be naturally understood as the group of asymptotic fluxes for the self-dual RR 5-form on M 6 × C 2 /Γ. The known classification of N = 4 theories arises beautifully from this viewpoint.
Have understood these rather subtle properties of the 6d (2, 0) and 4d N = 4 theories from the IIB viewpoint, the following question naturally arises. Say that we choose M 6 = M 4 × Σ, as above. In choosing boundary conditions for type IIB on M 4 × Σ × C 2 /Γ we generally need to choose between breaking large diffeomorphisms on Σ or on M 4 . What makes the IIB boundary conditions that are invariant under the large diffeomorphisms of M 4 special from the IIB viewpoint? The answer, clearly, is that there is nothing special about them from the 10d perspective. As such, it is in principle an interesting question to choose different boundary conditions and examine their consequences. In fact, we will argue that in some contexts it is more natural to choose boundary conditions that are invariant under large diffeomorphisms of Σ. Perhaps surprisingly, we show that these alternate "self-dual" boundary conditions are possible whenever M 4 satisfies a few basic assumptions, regardless of whether a genuine (2, 0) theory exists in six dimensions.

On the global structure of N = 4 theories with duality defects
As a warm-up, and to provide additional motivation, we first describe a situation where it becomes impossible to choose boundary conditions that are invariant under large diffeomorphisms of M 4 .
We consider the (2, 0) theory of type g Γ compactified on M 6 = K3 × Σ, where Σ is a Riemann surface and the K3 is elliptically fibered. More concretely, we construct K3 as a hypersurface {P = 0} of degree (12,6) in a toric space Y described by the gauged linear sigma model with charges u 1 u 2 x y z C * 1 1 1 4 6 0 C * 0 0 2 3 1

(4.2)
We can write the fibration in Weierstrass form where f and g are sections of the line bundles O P 1 (8) and O P 1 (12), respectively. (That is, locally they are homogeneous functions of s 1 , s 2 of degrees 8 and 12, respectively.) There is a fibration map π : K3 → P 1 induced by the ambient space fibration π a : Y → P 1 π a (u 1 , u 2 , x, y, z) = (u 1 , u 2 ) . The generic fiber π −1 (u 1 , u 2 ) is T 2 . The Calabi-Yau space K3 has a section, namely an embedding P 1 → X intersecting each fiber once, given by {z = 0} ∩ {P = 0}. There are two interesting limits to consider. When the volume of Σ is very small, we recover a 4d N = 4 theory on K3 along the same lines as we have already discussed. If instead the volume of the T 2 fiber of K3 is very small, we expect an effective local description in terms of 4d N = 4 SYM on P 1 ×Σ with algebra g Γ . However, this description is qualitatively different from the previous case, due to the presence of duality defects. Recall that the complexified gauge coupling of the N = 4 theory is given by the complex structure of the T 2 fiber. As the fibration is non-trivial in this case, the gauge coupling varies across M 4 = P 1 × Σ, and is now better viewed as a background field, rather than a "constant". 30 There are codimension two loci along the P 1 × Σ base-the duality defects-located at the vanishing points of the discriminant around which the complexified gauge coupling has SL(2, Z) monodromies. Notice that ∆ is a section of O P 1 (24), so generically it vanishes at 24 points in the base P 1 . For a generic fibration, it is easy to see that the monodromy group for loops beginning and ending at any fixed base point is the entire SL(2, Z). As an explicit example, let us start with a class of K3 manifolds introduced by Sen [66], where with α and a i arbitrary complex constants and a i = a j for i = j. The monodromy around each zero of Q is given by These K3 manifolds have the peculiarity that the complex structure of the torus is constant. In fact they have a familiar interpretation in the context of F-theory [67], where each defect corresponds to four D7 branes on top of an O7 − plane [66]. 31 In this configuration we have That is, there are six zeroes of ∆ coalescing on each zero of Q(s i ). We now study what happens around each zero of Q(s i ) when we perturb f, g away from the special form (4.6).
The answer is well known in the context of F-theory (and before that, from the analysis of the Seiberg-Witten solution of N = 2 SU (2) with four flavours [72,73]): the six zeroes of ∆ split into four mutually local degenerations (the D7 branes, in F-theory) and two mutually non-local degenerations (the O7 − plane). 30 See [19][20][21][22][23][24][25][26] for studies of such backgrounds. 31 We refer the reader interested in reading more about F-theory to the excellent reviews [68][69][70][71]. To show explicitly that the monodromy group is the full SL(2, Z), we choose an explicit basis for the geometry, following the conventions of [74,75]. The defect described above splits into four degenerations of type A, one of type B and one of type C. The A degenerations are associated with degenerations the (1, 0) cycle of the T 2 , the B with degenerations of the (1, −1) cycle, and C with degenerations of the (1, 1) cycle (all defined relative to a common canonical basepoint). The SL(2, Z) monodromies associated to these degenerations are One can obtain the two standard generators of SL(2, Z) from here. Clearly T = M −1 A , and one can also see easily that S = M C M 2 A . This situation is depicted in figure 5.
We now specialize to the A 2 theory, for concreteness, the generalization to other algebras being clear. 32 Thus, we aim to describe an N = 4 theory with algebra su(3) on P 1 × Σ in the presence of duality defects. What is the global form of the gauge group of this theory? 32 One subtlety in the A1 case is that the 4d N = 4 theory with algebra su(2) can also be understood as part of the usp(2N ) family. As the discussion in this paper does not cover such cases, we avoid using A1 for the following argument. Intriguingly, this question is not answerable, because none of the genuine su(3) theories can be placed in a background with generic duality defects. This because these theories are not invariant under the SL(2, Z) monodromy group of a generic collection of defects, see figure 6. More concretely, say that we declare that the gauge group on a R 4 neighbourhood of the point p in figure 5 is of the form SU (3). By taking the path with monodromy τ → −1/τ , we end up with (SU (3)/Z 3 ) 0 instead, in contradiction with our initial assertion.
There are two kinds of solutions to this problem. More conservatively, we can restrict to some particular genuine theory, which will restrict to a particular class of duality defects leaving the choice of theory invariant. While this is well suited to certain problems, this restrictive viewpoint is not always satisfactory. For instance, the 6d viewpoint suggests the possibility of a 4d/4d correspondence between duality defects on P 1 ×Σ and elliptically fibered K3 with constant gauge coupling. However, if we fix a choice of genuine theory in the former case, then the boundary conditions will not be invariant under large diffeomorphisms of K3 in the latter, whereas they will be invariant under large diffeomorphisms of Σ.
This suggests a second solution, which is to view the 4d theory with varying τ as a kind of metatheory, just like the (2, 0) theory. In classifying general boundary conditions, we are led back to the Heisenberg group arising from the 6d perspective. However, in some cases it is interesting to focus on more restricted choices other than those arising from genuine 4d theories. For instance, as we have seen above, it is particularly natural to consider choices that are invariant under large diffeomorphisms of Σ. We discuss a further motivation for Σ-independent boundary conditions in §4.3 below. Does W 3 contain a maximal isotropic subspace that is invariant under the large diffeomorphisms of Σ? It is a non-trivial result, shown below, that such a subspace does exist, not just for the su(3) theory on K3 but for any (2, 0) theory on any smooth, compact, Spin manifold M 4 without torsion.

Self-dual subspaces for smooth Spin four-manifolds
If M 4 has no torsion, then (cf. (3.17)): (4.12) Thus, a Σ-independent maximal isotropic subspace of H 3 (M 4 × Σ; Γ ab ) should take the form with a 1 • a 2 = M 4 a 1 a 2 the intersection form on M 4 . 33 Note that the linking pairing L M 4 is symmetric. Following the nomenclature of §3.2, we call a subspace L of the form L = L ⊥ "self-dual", where in particular this differs from a maximal isotropic subspace (applicable to an antisymmetric linking pairing) in that a selfdual subspace is not guaranteed to exist. Because we can freely pick L 1 , fixing L 3 = (L 1 ) ⊥ (or vice versa), the existence of a Σ-independent maximal isotropic subspace of H 3 (M 4 × Σ; Γ ab ) is equivalent to the existence of a self-dual subspace of H 2 (M 4 ; Γ ab ). Below, we show that such a subspace exists for any smooth, compact Spin manifold M 4 without torsion and for any Γ.

The su(2) case
We begin with the A 1 case, deferring a general statement till later. As above, we assume that M 4 is compact, Spin, and without torsion. Additionally, in order to be able to apply some general results of Donaldson, we require that M 4 is smooth.
Since which induces the long exact sequence in cohomology Since there is no torsion in M 4 the map φ = 0 in (4.16) is necessarily vanishing, and then H 2 (M 4 ; Z 2 ) ∼ = coker(ψ). Since ψ is simply multiplication of elements in H 2 (M 4 ) by 2, we can write 17) and think of elements of H 2 (M 4 ; Z 2 ) as the reduction modulo 2 of elements in H 2 (M 4 ).
For any x ∈ H 2 (M 4 ) we have where Sq 2 (x) denotes the Steenrod square [42] and ν 2 is the second Wu class [76], which in terms of Stiefel-Whitney classes can be written as ν 2 = w 2 + w 2 1 . A Spin manifold has w 1 = w 2 = 0, so we learn that the intersection form is even. A theorem of Donaldson [77,78] then implies that the intersection form is necessarily of indefinite signature.
Likewise, the intersection form is unimodular when M 4 is compact. The classification of even unimodular forms of indefinite signature is a classical result, known as the Hasse-Minkowski classification (see [79]), implying that one can choose a basis for H 2 (M 4 ) such that the intersection form is given by a block diagonal matrix of the form 34 Here p ≥ 0 and q > 0 are integers depending on M 4 , H is the matrix and −C(E 8 ) is the negative of the Cartan matrix of E 8 , which in our conventions will be written We would like to construct a Z 2 -symplectic structure on M 4 , by which we mean a choice of basis in H 2 (M 4 ; Z 2 ) such that the Z 2 valued intersection form in this basis is has the form H ⊕(4p+q) . Clearly, the problem reduces to finding a change of basis for each of the C(E 8 ) blocks. The Z 2 -valued intersection form on H 2 (M 4 ; Z 2 ) is defined in terms of that on where for conciseness we have denotedâ = ρ −1 (a) andb = ρ −1 (b) for the uplifts to H 2 (M 4 ). Likewise, there is a quadratic refinement (·) 2 /2 : H 2 (M 4 ; Z 2 ) → Z 2 (the Pontryagin square) given by a 2 /2 ≡ (â •â)/2 (mod 2) . (4.23) As discussed above, the intersection form is even, so a 2 /2 ∈ Z 2 as required. While we are primarily interested in the intersection form, the Pontryagin square shows up in certain 34 Here we assume that the signature σ(M4) = −8p is non-positive. When the signature is positive, we replace C(E8) → −C(E8).
calculations (see (3.27) and [18]), so we will keep track of it as well. In particular, the symplectic basis can be chosen so that a 2 /2 = 0 for each basis element a. We now explicitly construct a Z 2 -symplectic basis for the C(E 8 ) intersection form. Denote byê i the generators of H 2 (M 4 ) withê i ·ê j = −C(E 8 ) ij as above. They define an associated basis {e i } of H 2 (M 4 ; Z 2 ), by taking e i = ρ(ê i ). The desired symplectic basis is given by (4.24) Consider the liftŝ i = S ijêj . We havê (4.25) Reducing modulo 2, we conclude that Since the diagonal elements are likewise multiples of four, s 2 i /2 = 0, and we are done.

SL(2, Z)-invariant partition function on K3
The symplectic basis we have just constructed yields a self-dual subspace I 0 of H 2 (M 4 ; Z 2 ) in a rather trivial manner: divide the generators s i into pairs (e i ,ē i ), with the property that e i · e j =ē i ·ē j = 0 and e i ·ē j = δ ij . Then I 0 = Span{e 1 , . . . , e n } is self-dual, where n = 4p + q and |I 0 | = 2 n . There are many such subspaces because, e.g., we can exchange e 1 ↔ē 1 , and likewise for the other pairs. Note that I 0 is also "null", which we define to mean x 2 /2 = 0 for all x ∈ I 0 . 35 Self-dual does not imply null, since, e.g., Span{e 1 +ē 1 , . . . , e n +ē n } is self-dual but not null. This distinction makes a difference for some calculations. 35 Thus, the elements of I0 are even, in the classification of [27].
Letting M 4 be simply connected for simplicity (so as to be able to ignore L 1,3 in (4.13)), corresponding to the self-dual subspace I 0 there is a maximal isotropic subspace (4.27) The associated choice of boundary conditions is invariant under large diffeomorphisms of Σ, as desired, but not under large diffeomorphisms of M 4 . We now perform some checks on this construction. Consider type IIB string theory on M 4 × T 2 × C 2 /Z 2 with the boundary condition |L 0 associated to the maximal isotropic subspace L 0 in (4.27). Since L 0 is invariant under large diffeomorphisms of T 2 , in the small T 2 limit we expect to obtain an effective 4d description on M 4 that is SL(2, Z) invariant. For concreteness, choose M 4 = K3, which should give a four dimensional N = 4 theory with algebra su(2) on K3, with a peculiar choice of global structure that is not invariant under large diffeomorphisms of the K3, 36 but is invariant under the SL(2, Z) duality group of N = 4 su(2) theory. 37 We will refer to this choice of global structure as SO(3) 0 . We emphasize that in contrast to genuine 4d field theories, but reflecting its origin in the (2, 0) theory of type A 1 (equivalently from the IIB C 2 /Z 2 orbifold), the construction of this "theory" makes explicit reference to the topology of M 4 in the form of a particular choice of self-dual I, which is not invariant under large diffeomorphisms of M 4 . Note that by the 4d/4d correspondence discussed above, this theory is related to one with 24 duality defects on P 1 × T 2 where invariance under large diffeomorphisms has been imposed along the T 2 . The existence of self-dual I is a non-trivial check (at the level of the partition function) that this is possible.
To proceed further, we write |L 0 in a particular basis, which will give an expansion of the partition function Z(τ ) = Z|L 0 in terms of "conformal blocks." A convenient choice is the one associated to the ordinary SU (2) theory, with basis elements |v for each v ∈ H 2 (M 4 ; Z 2 ), each associated to a background flux v for the Z 2 one-form symmetry of the theory. Equivalently, as in [27], we can think of the basis elements |v as representing classes of SO(3) gauge bundles that are not SU (2) gauge bundles. Referring to §2.1, §3.4 we see that where a, b denote the generators of the A and B cycles of T 2 and we fix the phases of the basis elements so that |v = Φ v⊗b |0 . The associated conformal blocks Z v (τ ) = Z|v were computed by Vafa and Witten [27]. We will not need the precise expressions, only their transformations under SL(2, Z), which are given below. By linearity, given Z v (τ ) we can determine the partition function for the 36 A peculiarity of the K3 case is that the theory can be topologically twisted without changing the partition function [27], which implies that the partition function itself will, in fact, be invariant under large diffeomorphisms of the K3. But we have no reason to expect this to be true for general M4. 37 The existence of self-dual phases of the N = 4 su(2) theory has been suggested by Argyres and Martone [80]. Here we have shown that something similar can be constructed in IIB, at the price of breaking invariance under large diffeomorphisms in four dimensions. We emphasize that there is another class of constructions one could consider in this context, the N = 1 case in the usp(2N ) family, which we have not yet analysed.
SO(3) 0 theory on K3 once we decompose |L 0 in the {|v } basis. To do so, recall that the defining property of |L 0 is that Φ x |L 0 = |L 0 (4. 29) for all x ∈ L 0 = I 0 ⊗ H 1 (T 2 ). Since {|v } is a basis, we can write for some c v to be determined. We have L 0 = L for all u ∈ I 0 . The first condition implies that Since I 0 is self-dual, this implies that c v = 0 for v / ∈ I 0 . The second condition then implies c v = c v for v, v ∈ I 0 , so we conclude that up to an overall normalization that we will not fix carefully. The partition function for SO(3) 0 is therefore According to the results in [27], under S-duality we have with χ(K3) = 24 and σ(K3) = −16 the Euler characteristic and signature of K3, and n = 11 so that dim(H 2 (M 4 )) = 2n as above. Likewise, 38 in agreement with the general discussion in §3.5. We now check how Z 0 (τ ) transforms under SL(2, Z). Invariance under T is immediate, since I 0 is null. To derive the S-transformation, we use v∈I 0 The case u ∈ I 0 is immediate. When u / ∈ I 0 , I 0 can be divided into cosets I u and I u + v u , where I u = {v ∈ I 0 |u · v = 0} and v u is any element of I 0 − I u (so that (−1) u·vu = −1). The cosets are of equal size 2 n−1 , so the positive and negative terms in the sum cancel. Using (4.35) and (4.37), we immediately conclude that (4.38) As explained in [27], the fact that the partition function is a modular form of non-zero weight originates from omitting higher derivative couplings to the curvature. 39 We obtain a fully modular invariant function by multiplying by, e.g., η(τ ) 24 . Something similar should correspond to including the appropriate higher derivative terms in the calculation.
One can perform a similar analysis of the modular properties of the K3 partition function for su(N ) theories. We leave the technical details to appendix B, but note that the results are in perfect agreement with the type IIB viewpoint developed above as well as with [18]. For the present, we confine ourselves to the question of the existence of self-dual I 0 in the su(N ) case (and for other algebras), as discussed below.

su(N ) and other algebras
It is not difficult to extend the argument of §4.2.1 from su(2) to su(N ) for small values of N by brute force, but the computation quickly gets unwieldy. Luckily, the mathematical problem that we are studying has a well known general solution. 40 Abstractly, what we are trying to show is that the Cartan matrix C(E 8 ) in (4.21) and H ⊕4 are equivalent as bilinear forms over Z N . This is certainly not true over Z, as C(E 8 ) and H ⊕4 have different signatures, (8,0) and (4,4) respectively. However, the signature is not well-defined over Z N , and so with no obvious invariant to distinguish them, it perhaps unsurprising that C(E 8 ) and H ⊕4 become equivalent. In fact, we will see that any two even unimodular bilinear forms of the same dimension become equivalent over Z N .
To show this, note that by the Chinese remainder theorem 39) where N = p n 1 1 · · · p n k k and the p i are distinct prime numbers. Given a change of basis from C(E 8 ) to H ⊕4 modulo N i = p n i i for each factor, we can again use the Chinese remainder theorem to assemble them into a change of basis over N . Thus, we can set N = p n for the rest of the proof without loss of generality. 39 It would be very interesting to derive these corrections from the 11d anomaly theory for type IIB string theory, similarly to the heuristic argument in §3.5, see footnote 27. 40 We thank Jack Shotton for explaining the following proof to us.
We first consider the case of p = 2. We introduce the Jacobi-Legendre symbol for a ∈ Z and prime p, defined as Since we have that both det(H ⊕4 ) = det(C(E 8 )) = 1, it follows that these bilinear forms (or more generally, any two unimodular forms) are equivalent modulo p n for any n > 0 and any prime p > 2. The case p = 2 is addressed in theorem 10 in section 15.7.5 of [81]. This theorem implies 42 that even bilinear forms are equivalent over 2 n iff the same conditions as above hold, namely that they have the same dimension and the same Jacobi-Legendre symbol (4.42) As above, this is clearly satisfied for C(E 8 ) and H ⊕4 , as they are both even unimodular. Thus, C(E 8 ) and H ⊕4 are equivalent bilinear forms modulo N for any integer N . Note, however, that per (3.27) the partition function depends not just on the intersection form but also on its quadratic refinement, the Pontryagin square. Fortunately, in the torsion-free case that we are studying the quadratic refinement over Z N can be extracted from the intersection form over Z 2N , and so the above argument implies that the quadratic refinements of C(E 8 ) and H ⊕4 are likewise equivalent over Z N for any N . In particular, since the above argument does not depend on the details of C(E 8 ) and H ⊕4 , any even unimodular bilinear form admits a basis of the form e i · e j =ē i ·ē j = 0 , e i ·ē j = δ ij , e 2 i /2 =ē 2 i /2 = 0 , (4.43) upon reduction modulo N . From this, we can construct a null, self-dual subspace for su(N ) compactified on any smooth, compact, Spin M 4 without torsion, 44) 41 We give a simplified version that avoids the use of p-adic integersẐp (distinct from Zp := Z/pZ). The precise statement in [81] is that two p-adic quadratic formsf andĝ are equivalent if the conditions given in the text hold for every Jordan block off andĝ. To reach the statement in the text we first promote C(E8) and H ⊕4 to bilinear forms onẐp, then use the result in [81] to prove that they are equivalent overẐp, and finally use the well-known fact that for every m ≥ 0, every α ∈Ẑp is congruent modulo p m to a unique integer 0 ≤ n < p m to reduce the p-adic transformations that implement the change of basis to Zpm transformations. 42 There is also a classification theorem for odd forms; for simplicity we only present the statement for even forms.
just as in the case N = 2 discussed above.
We briefly comment on the (2, 0) theories of D and E type. In the cases D 2k+1 and E k , the defect group is cyclic, and the above analysis remains valid. For the D 4k+2 theory, the basis (4.43) for N = 2 leads to a larger basis with α i = e i ⊗ α, β i = e i ⊗ β, etc., where α and β are the generators of the Z 2 ⊕ Z 2 defect group. Likewise, for D 4k we obtain In either case, the expanded basis is still of the form (4.43) for N = 2 (with twice as many generators), and so a null self-dual subspace exists as before.
While we expect that similar statements can be made for any defect group and linking pairing, we defer further consideration of this to a future work.

2d/4d correspondences and Hecke transforms
There is another application of the previous discussion that we will now briefly outline. Consider a compactification of the (2, 0) theory of type g Γ on M 6 = M 4 × Σ. There are two natural limits to take: we can take the limit in which Σ is small, obtaining an effective four-dimensional theory T Σ on M 4 , or alternatively we can first make M 4 small, obtaining a two-dimensional theory T M 4 on Σ. There are deep relations between T M 4 and T Σ , due to their common six-dimensional origin. It is expected that such a 2d/4d correspondence exists for any suitable M 4 /Σ pair, as long as we can introduce appropriate supersymmetric twists. 43 A basic observable that we can compute in these theories is the partition function. The expectation is that where the first term denotes the partition function of the six-dimensional (2, 0) theory of type Γ on M 4 × Σ, with a choice of maximal isotropic subspace L ⊂ W 3 . Although we have chosen not to display it to avoid cluttering the notation too much, T M 4 and T Σ will depend on the choice of L and Γ. An important subtlety now arises: to obtain a genuine 4d theory, we should choose L to be independent of the details of M 4 . Likewise, to obtain a genuine (i.e., modular invariant) 43 A case that has been extensively studied in the last few years is the one described by Alday, Gaiotto and Tachikawa [82], see [83] for a clear and concise review. The best understood cases in this context are M4 = S 4 , in which T S 4 is Liouville theory (or perhaps more naturally, Toda theory [84]), and M4 = S 3 × S 1 , where T S 3 ×S 1 is q-deformed Yang-Mills [85]. From the point of view of this paper, the most interesting cases arise whenever M4 has non-trivial one or two-cycles. An example of a configuration with non-trivial one-cycles is M4 = S 3 × S 1 , and indeed in this case one can relate the choice of maximal isotropic subgroup in the Heisenberg group with the choice of the global form of the q-deformed Yang-Mills theory [40]. The simplest example with non-trivial two-cycles is M4 = S 2 × S 2 , which was studied in [86].
2d theory, we should choose L to be independent of the details of Σ. However, we have seen that in general L cannot simultaneously be invariant under large diffeomorphisms of both M 4 and Σ! In particular, this is only seems to be possible when the corresponding (2, 0) theory is genuine, see §3.2. Thus, to make (4.47) true we must either choose a genuine (2, 0) theory -and the associated Σ and M 4 reductions 44 -or at least one of T M 4 and T Σ cannot be genuine.
In this section, we will explore the consequences of making the 2d theory T M 4 genuine (modular invariant). To do so, we choose a maximal isotropic subspace of the form (4.13), just as above. In particular, fixing M 4 = K3 and choosing a self-dual subspace I 0 of the form (4.44) leads to a modular-invariant 2d CFT K Γ on Σ. 45 We have not identified this theory, but we will be able to prove some interesting facts about its elliptic genus (as defined by the Vafa-Witten partition function [87]).
Choose, for concreteness, Γ = Z 2 . We denote by K 2 := K Z 2 the two-dimensional modular invariant theory that we are after. In this case (4.47) implies that see (4.34). It is interesting to compute this explicitly using the results of [27]. In particular, from a general partition vector we obtain (4.50) since the conformal blocks Z v = {Ẑ, Z even , Z odd } only depend on whether v is zero, non-zero and even, or odd, with [27] where q = exp(2πiτ ) and (4.52) 44 In particular, the 4d theory must be modular invariant in this case. 45 It is possible that the particular 2d CFT obtained in this way depends on the specific choice of I0; however, the topologically twisted Vafa-Witten partition function (essentially an elliptic genus from the 2d perspective) does not depend on this choice (cf. footnote 36), and we so we ignore this subtlety for now.
We now consider the SO(3) 0 theory, as defined above. From (4.33), c v = δ v∈I 0 . Since I 0 is null and self-dual, this implies c 0 = 1, c even = 2 11 − 1, and c odd = 0, where we use |I 0 | = 2 11 . Thus, explicitly It is an easy exercise, using the well-known modular transformation properties of η(q), to show that Z K 2 (τ ) transforms as a modular form of degree −12, the same as G(q) itself. In fact, the two expressions are closely connected, as where T m is the Hecke operator (see [88,89] for reviews) acting on modular forms of degree k by In fact, the relation (4.54) holds more generally. Let K p denote the theory K Zp arising from the A p−1 theory on K3. In the case where p is prime, the elliptic genus for K p is computed in appendix B.2, with the result which can be easily checked to satisfy We see that, at least at the level of the elliptic genus, the set of theories K p is in some sense generated from the theory of 24 left-moving bosons with elliptic genus G(τ ). More precisely, there exists a family of modular-invariant two-dimensional conformal field theories K p , obtained by compactification of the six-dimensional (2, 0) theory of type A p−1 on K3, whose elliptic genera are 58) in the case of prime p, where now we introduce a prefactor of f (τ ) to account for possible (unknown) curvature corrections [27]. We expect these corrections to restore modular invariance, as we ultimately have a IIB compactification with boundary conditions invariant under large diffeomorphisms on Σ. Modular invariance constrains f (τ ) to be a modular form of degree 12, but it is otherwise unknown. We will conjecture a specific form below. Note that the situation is very similar to the original discussion in [87], where it was show that there is a similar relation between the theory of N M5 branes and the heterotic string. 46 Namely, the partition function of N M5 branes on K3 × T 2 is the same as the N -th Hecke transform of the heterotic string partition function on T 2 . While in the case of M5 branes it was natural to expect the existence of a modular invariant theory -as the N = 4 U (N ) theory is SL(2, Z) invariant -the existence of the K p theories is a bit more surprising, and crucially depends on the existence of the self-dual subspaces I 0 constructed in §4.2.2. It would be very interesting to learn more about this class of theories (and their natural generalizations when we replace K3 by other four-manifolds), particularly given their close connection to the six-dimensional (2, 0) theory.
A conjecture for f (τ ) We now make a simple guess for f (τ ), with interesting consequences. To motivate it, we make the following assumptions: 1. f (τ ) is a modular form of degree 12.
3. The form (4.58) holds for p = 1, where we expect to have a trivial theory.
These conditions, taken together, fix f (τ ) = G −1 (τ ) = η 24 (τ ), up to an overall constant which we take to be p 13 for convenience. That is, we conjecture that the full modular invariant elliptic genus is Assuming that this is indeed the case, one finds the result 47 where is Klein's j-invariant without the constant term. Two dimensional theories with partition function equal to the j-invariant have a rich history, most notably in the proof by Frenkel, Lepowsky and Meurman of the monster moonshine [92]. It is quite enticing that the same function seems to appear (assuming that our guess for f (τ ) is correct) in trying to understand the partition function of the (2, 0) A 1 theory on K3.
From a purely mathematical point of view, we can understand the appearance of the j-function here from the fact that Z K 2 [T 2 ](τ ) is a modular function with a pole of order one at q = 0, and such functions can always be expressed in terms of the J-invariant as aJ(τ ) + b, for some choices of a, b that can be fixed by looking to the Laurent expansion. In fact, it is possible to find expressions for all the Z Kp [T 2 ] in terms of the J-invariant, as a special case of the results in [93]. Define , (4.62) where we have introduced the Eisenstein series E 4 (q) = 1 + 240q + 2160q 2 + 6720q 3 + . . . and For reference, we find the elliptic genera for the first few primes to be (4.65)

Conclusions
In this paper we have shown how to understand from the IIB perspective the fact that the six-dimensional (2, 0) theories arising at C 2 /Γ singularities typically do not have a partition function, but rather a vector of partition functions, in which the components mix under large diffeomorphisms. The basic observation is that non-commutativity of RR fluxes in type IIB string theory and non-commutativity of 2-form discrete flux operators in the (2, 0) theory are two sides of the same coin, and in fact they generate the same Heisenberg group. So the problem of choosing a specific direction in the Hilbert space of possible six-dimensional (2, 0) theories (that is, the space of "conformal blocks") maps to the problem of choosing boundary conditions in the non-compact IIB space. More formally, we have shown how a theory with a non-invertible anomaly theory, the six-dimensional (2, 0) theory, can arise as a subsector of type IIB string theory, an anomaly-free theory. One advantage of the IIB viewpoint is that it allows us to separate the problem of determining the behaviour of the discrete 2-form symmetries of the (2, 0) theory from the complicated local dynamics of the tensionless strings. Effectively, we have geometrized this sector of the problem into one involving free field theory for RR forms, solved in [7,8]. This reformulation allows us to give simple derivations of some subtle facts in the six-dimensional theory, in particular the structure of the commutation relations for flux operators. While the answer for the (2, 0) theory was already known by compactification on T 2 , our derivation has the virtue of easily generalizing to cases where the answer was not previously known, such as the (1, 0) theories.
The IIB perspective also provides a first principles approach to discussing the global structure of more exotic field theory setups, such as the theories with duality defects studied in §4, and naturally suggests a method to compute the anomalous phases of some stronglycoupled 4d theories under specific modular transformations, as conjectured in §3.5.
There are a number of interesting open questions that we have not addressed. For instance, we have assumed that M 6 had no torsion. This was done only for mathematical simplicity, and it would be fact be physically quite interesting to drop this assumption. The fact that K-theory plays an important role in the IIB picture suggests that in the presence of torsion on M 6 K-theory might play a role in the classification of field theories. It would be interesting to work this out in detail.
Along related lines, we have seen that in the absence of M 6 torsion the IIB construction gives rise to all the global forms of the (2, 0) theories known from the holographic viewpoint [16]. The presence of torsion in M 6 introduces an interesting twist: the holographic classification of global forms for the (2, 0) theory is given in terms of cohomology in M-theory, while that for IIB is given in terms of K-theory. Comparing the results of both descriptions would be very interesting, and is potentially somewhat analogous to but different from [10,94].
It would also be interesting to understand the results in this paper from the viewpoint of the 11d anomaly theory for IIB string theory [31,[62][63][64][65]. Our results suggest that in some sense non-invertible anomaly theories can be constructed by considering the behaviour of invertible anomaly theories in non-compact spaces; it would be interesting to make this statement precise. Such a reformulation would likely have useful applications in the study of duality anomalies for strongly coupled four dimensional theories, as we have sketched above.
Although we have focused mostly on K3 × C 2 /Γ × T 2 , it is clear that the basic idea will generalize to more involved geometries. For instance, one can study the global structure in the case of Vafa-Witten topologically-twisted compactifications of N = 4 on other fourmanifolds M 4 , such as P 2 , where we also know the answer for the partition function [27,87], by considering cases in which M 4 appears as a submanifold of threefolds [87] or G 2 manifolds [95]. More generally, we might consider different theories in four dimensions, such as those coming from other choices for the 4d topological twist, or alternatively the Ω-deformed backgrounds that lead to the 4d/2d correspondence found by Alday, Gaiotto and Tachikawa [82]. (See [96,97] for discussion on how to realize these backgrounds in string theory.) Along similar lines, we could also consider compactifications on singular Calabi-Yau theefolds in the context of geometric engineering (starting with [98][99][100][101], and more recently [102][103][104][105][106][107][108][109]). The global structure of any theory that can be engineered in terms of a singular threefold or fourfold with isolated singularities can in principle be obtained via an extension of the methods described here. It would be very interesting to do this in detail.
Another assumption that would be interesting to drop is that M 6 is compact. We might, for instance, consider IIB on spacetimes of the form C 2 /Γ 1 × C 2 /Γ 2 × T 2 . As argued in [110], such a configuration leads to a chiral WZW model (with algebra determined by Γ 1 and Γ 2 ) living on T 2 . It is natural to conjecture that a careful analysis of the boundary conditions of IIB in this background should reproduce the structure of conformal blocks of the chiral WZW model, and in particular give a geometric picture for the Verlinde formula for these theories [111][112][113][114][115] (and relatedly, a direct string theory interpretation of the work by Nakajima [116]). Additionally, considering such non-compact geometries would be the starting point for understanding the behaviour of the global structure under gluing, along the lines of [44,117].
The inclusion of non-simply laced algebras in lower dimensions is another important open problem. This would require the analysis of IIB backgrounds with orientifold actions, changing the type of K-theory that we need to consider.
Finally, we could also ask what happens if one replaces C 2 /Γ by a multi-centered Taub-NUT space (for simplicity we refer to the Γ = Z N case here). The local dynamics are unaffected, but there is an additional normalizable mode, corresponding to a centre of mass degree of freedom. In the six-dimensional (2, 0) theory this mode leads to a free tensor multiplet, which is expected to reduce in the N = 4 theory to the U (1) factor of U (N ). In light of the results of this paper, it is natural to ask whether this is the only possibility, or one can obtain the other gauge groups with algebra u(1)⊕su(N ) by choosing boundary conditions appropriately in the same IIB background. It would be interesting to work this out in detail; we expect the work of Belov and Moore [31,62,63] to be relevant here.
A K-theory groups of S 3 /Γ In this appendix we would like to compute the (complex) K-theory groups of S 3 /Γ, with Γ an arbitrary discrete subgroup of U (2) acting freely on S 3 . These spaces are orientable, with cohomology groups 48 where Γ ab := Γ/[Γ, Γ] denotes the abelianization of Γ, as given by the Hurewicz homomorphism. Note that clearly Γ ab is torsion, since Γ itself is.

The Atiyah-Hirzebruch spectral sequence
Say that we are interested in computing the (complex) K-theory groups K p (X) of some manifold X, where p is the degree. Given that K p is a generalized cohomology theory (see for example §13.90 of [118] for a description of the associated spectrum), we can compute the groups of interest using the Atiyah-Hirzebruch spectral sequence (we refer the reader to [119] for background on the computation of spectral sequences) associated to the fibration 0 → pt → X → X → 0. Using that and the cohomology groups (A.2) we can immediately write the E 2 terms in the Atiyah-Hirzebruch spectral sequence. We show the result in figure 7.
There are two small complications one encounters in going from E 2 to K i (S 3 /Γ). First, there might be non-vanishing differentials acting on the modules in the spectral sequence. By dimensional reasons, the only potentially non-vanishing differential is for p even. This differential necessarily vanishes, though, because otherwise we would find K 0 (S 3 /Γ) = Γ ab , which is incompatible with the Chern homomorphism (2.15). The other issue to deal with is that of potential non-trivial extensions. Recall that we have Since H0(X) is free, this implies that H 1 (X) = Hom(H1(X), Z), which vanishes since H1(X) = Γ ab is torsion. Figure 7: Contributions of the second page E 2 = E ∞ to K 0 (S 3 /Γ) (blue, on top) and for the filtration The only potentially non-trivial step is 8) or in other words that 0 → Γ ab → K n (S 3 /Γ) → Z → 0 (A.9) is exact. But this sequence splits, since Z is free, and thus we find and K 1 (S 3 /Γ) = Z. So K-theory is completely determined by cohomology here: B K3 partition functions for N = 4 theories with algebra su(N ) In this appendix we perform two related calculations of the N = 4 Vafa-Witten partition function on K3 [27,87] for gauge algebra su(N ). Firstly, we compute the partition function for all the genuine theories classified by [18], and verify that their duality relations are as expected. Secondly, we compute the elliptic genus of the modular-invariant K N theory described in §4.3, restricting the case where N is prime for simplicity.

B.1 The Hecke operator
Before diving into the physics, we briefly review the Hecke operator and some associated identities.
Recall that a modular form f of weight w ∈ 2Z is a holomorphic function satisfying for any integers a, b, c, d satisfying ad − bc = 1. More generally, a non-holomorphic modular form of weight (w,w) satisfies where w −w ∈ 2Z. For any integer m ≥ 1, we define the Hecke operator T m (see [88,89] for reviews) by its action on a modular form of weight w For a non-holomorphic modular form we replace w → w +w. We now show that T m [f ] is itself a modular form of weight w. It is easy to see that To compute the S transformation, we first derive a useful identity. Consider (B.1) with c = 0, and define t ≡ cτ + d, so that τ = t−d c and Thus, for coprime k, N : where kk ≡ −1 (mod N ). More generally: where k is the solution to the equation: and we take the convention gcd(0, n) = n for n > 0. Thus, where bb ≡ − gcd(b, d) (mod d). Defineã := gcd(b, d),d := m/ gcd(b, d), andb := b a, and note that there is a bijective relationship between (a, d, b) and (ã,d,b) (with 0 ≤ b < d and 0 ≤b ≤d); in particular a = gcd(b,d), d = m/ gcd(b,d), and bb ≡ −aã (mod m), so the map is its own inverse. Thus, so T m [f ] is indeed a modular form of weight w.

B.2 su(p) with p prime
Here Γ 19,3 is the even self-dual lattice of signature (19,3), θ Γ 19,3 (τ,τ ) is the associated theta function, and Z U (N ) has weights (−5/2, 3/2), with (−12, 0) coming from G(τ ) and (19/2, 3/2) coming from θ Γ 19,3 . Note that, since K3 has negative signature σ = −16, the geometric intersection form on K3 is This is the reverse of the usual worldsheet convention, but we will stick to it to maintain consistency with the rest of the paper. The U (N ) partition function can be decomposed as where q := e 2πiτ and Z V (τ ) is holomorphic and satisfies the periodicity condition Z V (τ ) = Z V +N U (τ ) for any U ∈ Γ 19,3 . In particular, Z v (τ ) are the conformal blocks, indexed by gauge bundles v valued in since K3 is torsionless. Our goal is now to extract the conformal blocks Z v (τ ) from the U (N ) partition function Z U (N ) (τ,τ ). First, noting that there are not N 22 distinct conformal blocks but rather many of them equal due to the symmetries of K3, we list the data on which Z v (τ ) can depend. Clearly, these include the order k of v within Z 22 N , where k divides N by elementary group theory. Likewise, the blocks can depend on the Pontryagin square v 2 /2, which is single-valued on Z 22 N modulo N because However, if v has order k < N then it lies within N k Γ 19,3 , and therefore v • u is a multiple of N/k, implying that 1 2 v 2 is single-valued modulo N 2 /k, or equivalently that the refined Pontryagin square 1 2 (kv/N ) 2 is single-valued modulo k. This is naturally interpreted as the Pontryagin square on the subgroup H 2 (K3; Z k ) = N k H 2 (K3; Z N ) of SU (N )/Z k gauge bundles modulo SU (N ) gauge bundles. Note that 1 2 v 2 (mod N ) is fixed by 1 2 (kv/N ) 2 (mod k), but the converse is not true when gcd(k, N/k) > 1, which holds for some k whenever N is divisible by a perfect square.
Thus, we can categorize the conformal blocks Z v (τ ) by the order k of v, as well as a ≡ 1 2 (kv/N ) 2 (mod k), or more physically as SU (N )/Z k gauge bundles that do not lift to any covering group, where the associated Stiefel-Whitney class v = w 2 has Pontryagin square a modulo k. In fact, this is all the data on which the conformal blocks can depend, because the U (N ) partition function only depends on 1 2 V 2 , and we have extracted all data from this that is invariant under shifts V → V + N U . Thus, we denote the su(N ) conformal blocks as Z To compute these blocks, define the sublattice Γ N ;k = N k Γ 19,3 for each k|N , let Γ (a) N ;k be the subset of Γ N ;k with (v/(N/k)) 2 2 ≡ a (mod k), and letΓ Explicitly, we find: with the added constraint that d is a multiple of k and a phase factor in the sum.
In the special case where N is prime, we recover:
We resum this in terms of the variables: = N gcd(j, ) ,j = j N , (B.51) which are "dual" to the original variables j, , in that there is bijective involution between them, i.e., gcd(j , ) = N/ and jj ≡ − N 2 ˜ (mod N ), just as discussed below (B.8). Let (k,m) be related to (k, m) by the same bijective involution. Observe that: k˜ . (B.52) Using this formula, we obtain: which reproduces the predictions of [18].
Proof of (B.52) To prove (B.52), it is convenient to generalize it slightly to gcd[j X − mkY, k 2 , 2 ] k = gcd[j Y − m k X, k 2 , 2 ] k (B.54) for any X, Y ∈ Z such that gcd(X, N ) = gcd(Y, N ) = 1. We proceed inductively in the prime factors of N . Consider first the case where N = p n is a prime power. We then have k = p κ , m = m 0 p µ , = p λ , j = j 0 p θ , gcd(k, m) = p µ , gcd( , j) = p θ , (B.55) for integers κ, µ, λ, θ, m 0 , j 0 satisfying 0 µ κ n and 0 θ λ n. We can chose m in the range 0 < m k and j in the range 0 < j , in which case gcd(m 0 , p) = gcd(j 0 , p) = 1. Therefore: We can assume λ + θ κ + µ without loss of generality due to the symmetry of the identity to be proven under ( , j, X) ↔ (k, m, Y ). We then obtain: If λ+θ−κ−µ > 0, then the first term is not divisible by p since gcd(m 0 Y, p) = gcd(j 0 Y, p) = 1, so we obtain p µ−λ in both cases. Conversely, if λ + θ = κ + µ, we find: and the identity is proven for N a prime power. Next, consider the case where N = N 1 N 2 with gcd(N 1 , N 2 ) = 1. We can split = 1 2 and = 1 2 such that i |N i and i |N i . Observe that gcd( , j) = gcd( 1 , j) gcd( 2 , j), so that We define j i ≡ j/ gcd(j, i±1 ) = j i±1 /N i±1 , and observe that gcd( i , j) = gcd( i , j i ), so that . and likewise for j 2 j 2 . Assuming that (B.54) is true for N 1 , we obtain gcd[j X − mkY, k 2 1 , 2 1 ] where in the penultimate step we make use of our freedom to exchange gcd(x, y) ↔ gcd(zx, y) provided that gcd(y, z) = 1. Thus, if (B.54) is also true for N 2 , we find: