Discrete and higher-form symmetries in SCFTs from wrapped M5-branes

We analyze topological mass terms of BF type arising in supersymmetric M-theory compactifications to $AdS_5$. These describe spontaneously broken higher-form gauge symmetries in the bulk. Different choices of boundary conditions for the BF terms yield dual field theories with distinct global discrete symmetries. We discuss in detail these symmetries and their 't Hooft anomalies for 4d $\mathcal N = 1$ SCFTs arising from M5-branes wrapped on a Riemann surface without punctures, including theories from M5-branes at a $\mathbb Z_2$ orbifold singularity. The anomaly polynomial is computed via inflow and contains background fields for discrete global 0-, 1-, and 2-form symmetries and continuous 0-form symmetries, as well as axionic background fields. The latter are properly interpreted in the context of anomalies in the space of coupling constants.

1 Introduction and summary 't Hooft anomalies are robust and useful observables in quantum field theory. They are invariant under renormalization group flow and can be used to constrain the phases of theories at long distances. The most familiar type of 't Hooft anomalies are arguably perturbative anomalies for continuous, ordinary (0-form) symmetries, which only occur in even spacetime dimension. The full set of anomalies, however, is much richer. This work is concerned with anomalies for discrete symmetries, generalized or higher-form symmetries [1], and anomalies in the space of coupling constants of a quantum field theory [2,3].
't Hooft anomalies are particularly helpful in the study of the dynamics of stronglycoupled field theories in the framework of geometric engineering. Moreover, anomalies provide an organizing principle in exploring the landscape of such theories. Discrete higher-form symmetries for field theories engineered by M-theory on a singular local geometry have been recently studied in [4,5].
This work focuses on field theories engineered with M5-branes. Using M5-branes, one can realize 6d (2,0) theories of type A N −1 [6,7], as well as 6d (1,0) theories obtained by putting the M5-brane stack on top of an orbifold singularity [8]. A vast class of 4d theories is realized by further compactification on a Riemann surface, possibly with punctures, as first studied for N = 2 theories in [9,10], and further extended to N = 1 theories [11][12][13][14][15]. It is beneficial to develop tools to extract 't Hooft anomalies of a field theory engineered using branes directly from the topology and geometry of the brane configuration. Anomaly inflow provides the framework to address this problem. Building on the results of [16][17][18][19] about anomaly inflow onto a stack of M5-branes, systematic tools have been developed to compute perturbative 't Hooft anomalies for 0-form symmetries via inflow for setups engineered with M5-branes [20][21][22] and D3-branes [23].
A more complete understanding of the space of quantum field theories would require to extend the scope of this program to include other types of 't Hooft anomalies. In this paper, we address a class of discrete and higher-form symmetries for 4d SCFTs engineered with wrapped M5-branes. In particular, we perform a detailed analysis for M5-branes probing a Z 2 singularity, further wrapped on a Riemann surface. This case study furnishes a controlled example that exhibits interesting features. Our strategy and results are summarized below.

Summary of results
For a 4d SCFT engineered with wrapped M5-branes, non-trivial information about 't Hooft anomalies for discrete symmetries, higher-form symmetries, and anomalies in the space of coupling constants [2] can be extracted via anomaly inflow. This is done by studying the topological couplings in the 5d low-energy effective action originating from reduction of Mtheory on M 6 , the compact space that encodes the geometry transverse to the four extended directions of the M5-branes worldvolume.
In our analysis, we include all 5d 0-, 1-, 2and 3-form gauge fields associated to expansion of the M-theory 3-form C 3 onto cohomology classes of M 6 , as well as 1-form gauge fields associated to isometries of M 6 . A crucial role is played by 5d topological mass terms of BF type between a 1-form gauge field A 1 and a 3-form gauge field c 3 , and between pairs (B 2i , B i 2 ) of 2-form gauge fields, where M 5 is 5d spacetime, and i labels the pairs of 2-form gauge fields. As we shall see, for setups with wrapped M5-branes the integers k and N are determined by the G 4 -flux quanta of the system, and i = 1, . . . , g where g is the genus of the Riemann surface. The BF term 1 2π k A 1 ∧ dc 3 implies that the 5d U (1) 0-form gauge symmetry associated to A 1 is spontaneously broken to a Z k 0-form gauge symmetry, and the 5d U (1) 2-form gauge symmetry associated to c 3 is spontaneously broken to a Z k 2-form gauge symmetry (see e.g. [24,25] for reviews). In a similar way, for each i the term 1 2π N B i 2 ∧dB 2i signals the spontaneous breaking of a bulk U (1) 2 1-form gauge symmetry to a (Z N ) 2 1-form gauge symmetry. After a choice of topological boundary conditions for the BF terms is made, the discrete gauge symmetries in the bulk are mapped to discrete global symmetries of the 4d SCFT. Moreover, the extended operators of the 5d BF theory are mapped to defects in the 4d SCFT, which are charged under the discrete global symmetries. A similar analysis in the context of AdS 4 /CFT 3 has been recently performed for ABJM-type theories [26].
In order to compute the full set of topological terms in five dimensions, including the contributions of gauge fields associated to isometries of M 6 and an arbitrary external spacetime metric, we use the tools developed in [22]. The 5d topological terms are conveniently encoded in a gauge-invariant closed 6-form I inflow 6 , which is a polynomial in the 5d gauge field strengths.
As concrete examples, we consider 4d SCFTs engineered by M5-branes wrapped on a Riemann surface [14,15], as well as theories from M5-branes wrapped on a Riemann surface and probing a Z 2 singularity-in this case the gravity dual was identified in [27] to be one of the solutions first discussed in [28]. The 6-form I inflow 6 for these setups are given in (5.7), (5.9), respectively. The 6-form I inflow 6 encodes the 't Hooft anomalies of the 4d SCFT, together with the anomalies of modes that decouple in the IR. Since the 5d bulk theory contains massive gauge fields, care has to be taken in reading off 4d 't Hooft anomalies from I inflow 6 . If one is interested in perturbative anomalies for continuous global symmetries of the 4d field theory, the topologically massive gauge fields in five dimensions must be integrated out. A similar mechanism is at play for 6d (1,0) SCFTs engineered with M5-branes probing an ALE singularity, and clarifies how the Green-Schwarz terms in the 8-form anomaly polynomial [29] are reproduced by inflow.
The perturbative anomaly polynomial for wrapped M5-branes probing a Z 2 singularity, recorded in (5.14), contains several terms with 0-form gauge fields (i.e. axions), with 1-form field strengths. Following [2], we interpret such terms as anomalies in the space of coupling constants. The couplings in question are associated to exactly marginal operators of the 4d SCFT. We argue that these operators can be thought of as dimensional reduction on the Riemann surface of the 6d conserved U (1) currents associated to the Cartan U (1) N × U (1) S of the SU (2) N × SU (2) S flavor symmetry of the 6d (1,0) theory engineered by M5-branes on a Z 2 singularity.
After the continuous part of a topologically massive gauge field is integrated out, a discrete gauge field is left over, whose precise features depend on the choice of boundary conditions for the BF terms. Hence, in order to extract 4d 't Hooft anomalies for discrete symmetries from the 6-form I inflow 6 , we need to specify the boundary conditions. For definiteness, we focus on the case in which we assign Dirichlet boundary conditions to the fields A 1 and B 2i (and free boundary conditions to c 3 and B i 2 ), so that the 4d field theory admits a Z k global 0-form symmetry and a (Z N ) g global 1-form symmetry. The field c 3 acts as a Lagrange multiplier that imposes a constraint on A 1 . If we write A 1 = A cont 1 + A 1 , the constraint fixes A cont 1 in terms of gauge fields for continuous symmetries, and forces A 1 to be a flat 1-form gauge field with holonomies that are k-th roots of unity. Similarly, the Lagrange multiplier B i 2 imposes a constraint on B 2i = B cont 2i + B 2i , which determines B cont 2i in terms of continuous gauge fields, and forces B 2i to be a flat 2-form gauge field with holonomies that are N -th roots of unity.
By substituting A 1 = A cont 1 + A 1 , B 2i = B cont 2i + B 2i into the 6-form I inflow 6 , we obtain a formal expression that encodes 't Hooft anomalies for both the continuous symmetries and the Z k 0-form symmetry and (Z N ) g 1-form symmetry. Discrete anomalies are read off from terms in I inflow 6 with dA 1 , dB 2i . These objects are zero as differential forms. To circumvent this difficulty, we reinterpret the quantity I inflow 6 in the framework of differential cohomology (see e.g. [2,30] and appendix D for some background material). Differential forms are regarded as a proxy for classes in differential cohomology, and their wedge product is a proxy for the product in differential cohomology. A crucial feature of the latter is that the product of a flat gauge field with other gauge fields is not necessarily zero. This approach dates back to Dijkgraaf and Witten [31] and has also been recently used in [32].
We apply the recipe outlined in the previous paragraphs to the setup with wrapped M5-branes probing a Z 2 singularity. The terms in I inflow 6 involving dA 1 , dB 2i are collected schematically in (5.33), while the full result is recorded in appendix E. We encounter a rich variety of 't Hooft anomalies involving the discrete symmetries, including: a cubic term in dA 1 ; terms mixing dA 1 and dB 2i to the other continuous symmetries, including a gravitational term dA 1 p 1 (T ); a mixed anomaly between the two discrete symmetries and a coupling constant.
Finally, we observe that the BF couplings in the 5d topological bulk theory can also be used to identify some of the singleton modes of the 5d supergravity theory. (By "singleton modes" we mean modes that are pure gauge in the 5d bulk, but propagate on the conformal boundary; they are holographically dual to modes in the 4d field theory that decouple in the IR.) For setups with wrapped M5-branes with 4d N = 2 supersymmetry, the knowledge of singleton modes from BF terms, combined with supersymmetry, is sufficient to reconstruct from the gravity side the entire set of modes that decouple on the field theory side. This offers a proof of principle that one can compute the exact anomaly polynomial from the gravity dual, including O(1) terms in the number of M5-branes.

Topological mass terms in 5d supergravity
Let us consider a supersymmetric AdS 5 solution of M-theory with internal space M 6 . These solutions were classified in [28]. We study the 5d supergravity theory obtained from reduction of M-theory on a warped product of the form M 5 × w M 6 , where external spacetime M 5 is negatively curved. The case M 5 = AdS 5 is recovered as the vacuum solution of the 5d supergravity theory. We restrict our attention to solutions where the space M 6 is compact and smooth, and the warp factor is smooth and non-vanishing. In this section we focus on the topological couplings in the low-energy effective action of the 5d supergravity.
In particular, we are interested in identifying the topological mass terms for the p-form gauge fields that arise from Kaluza-Klein expansion of the M-theory 3-form C 3 onto a basis of non-trivial cohomology classes on M 6 . If the internal space M 6 has isometries, the 5d supergravity theory contains additional (possibly non-Abelian) gauge fields. For the remainder of this section, these gauge fields associated to isometries of M 6 are turned off, since it can be checked that they do not contribute to the topological terms of interest. They will be reinstated in section 5.

Ansatz for G 4 and dimensional reduction
The spectrum of the 5d supergravity obtained from reduction of M-theory on M 6 contains massless Abelian p-form gauge fields coming from the Kaluza-Klein expansion of the M-theory 3-form C 3 . These massless p-form gauge fields are in 1-to-1 correspondence with non-trivial cohomology classes of M 6 .
For each q = 0, . . . , 6 we choose a basis in the lattice H q (M 6 , Z) free , 1 which has rank given by the Betti number b q (M 6 ). The Betti numbers of M 6 satisfy b 0 (M 6 ) = b 6 (M 6 ) = 1, b 1 (M 6 ) = b 5 (M 6 ), b 2 (M 6 ) = b 4 (M 6 ). Elements of H q (M 6 , Z) free can be identified with de Rham cohomology classes of closed q-forms with integral periods. As a result, we can represent a basis of H q (M 6 , Z) free using a set of closed (but not exact) q-forms on M 6 with integral periods. We use the following notation for these forms, (2.1) The 5d gauge fields originating from C 3 and their field strengths are denoted as follows, 0-form potentials: a x 0 , f x 1 = da x 0 , x = 1, . . . , b 3 (M 6 ) , 1-form potentials: A α 1 , F α 2 = dA α 1 , α = 1, . . . , b 2 (M 6 ) , 2-form potentials: Throughout this work, we adopt conventions in which the periods of the field strength of an Abelian p-form gauge fields are quantized in units of 2π. (A 0-form gauge field whose field strength is quantized in units of 2π is the same as a compact scalar field with period 2π.) In string/M-theory compactifications, torsion cycles in the internal space can be a source of discrete gauge symmetries [33,34]. In this work, we do not study the effects of torsion in the homology of M 6 . The geometries M 6 that are relevant for the setups with wrapped M5-branes studied in this paper do not have torsion in homology.
With the notation introduced in (2.1) and (2.2), the M-theory 4-form field strength G 4 = dC 3 , including both its background value and fluctuations associated to cohomology classes on M 6 , is given by The integers N α specify the background flux that threads M 6 . The periods of G 4 in (2.3) are quantized in units of 2π. 2 In our normalization conventions for G 4 , the topological terms of the low-energy effective action of M-theory are 3 The low-energy effective action for the 5d p-form gauge fields listed in (2.2) is computed via standard Kaluza-Klein reduction. Recall that external metric fluctuations and gauge fields associated to isometries of M 6 are turned off in this section. For the purpose of computing the effective action for the modes in (2.2) the term C 3 X 8 plays no role. 4 The kinetic term for G 4 yields standard kinetic terms for the 5d gauge fields. The Chern-Simons coupling C 3 G 4 G 4 yields a set of topological terms in the 5d effective action. They are most conveniently written in terms of a gauge-invariant 6-form, The flux quantization condition in M-theory on an orientable spacetime M11 can be written as [35] where w4 denotes the fourth Stiefel-Whitney class. It is known that w4 is zero for a spin manifold of dimension ≤ 7 (the argument can be found for instance on page 65 of [36]). In our setups the internal space M6 and external spacetime are spin manifolds, hence the shift in the quantization condition of G4 is not important. This holds true also for the purposes of writing the anomaly polynomial of a 4d theory using descent: in that case external spacetime is effectively six-dimensional. 3 In these conventions, the Einstein-Hilbert term and the kinetic term for G4 take the form where P is the 11d Planck length. The action enters the path integral via e iS and is defined mod 2π. 4 Even after the isometry gauge fields are turned on, the term C3X8 does not yield topological mass terms (i.e. topological terms quadratic in the external fields) for the cases of interest in this work.
where the 6-form I 6 is given by The quantities K αuv , K αβγ , K xuα , K xy are integer intersection numbers which can be defined in terms of the closed forms on M 6 as These intersection numbers depend only on the cohomology classes of the internal forms, and not on the specific representatives used to write down G 4 in (2.3). The first two terms in (2.6) are the sought-for topological mass terms in the 5d supergravity effective action. In contrast to the other topological couplings in (2.6), they are quadratic in the external gauge fields. We stress that the topological mass terms are due to the background flux quanta N α .
When b 2 (M 6 ) ≥ 2 we are free to consider a change of basis in the lattice H 2 (M 6 , Z) free , which is accompanied by a change of basis in the external 1-form gauge fields. A new basis A α 1 can always be found such that A 1 α=1 is the only 1-form gauge field with a topological mass term with c 3 . Since A 1 α=1 plays a special role compared to the vectors A 1 α =1 , we introduce the notation A α 1 = (A 1 , A α 1 ) ,α = 2, 3, . . . , n . (2.8) With this notation we have while the vectors A α 1 do not enter the topological mass terms. Further information about the new basis A α 1 is collected in appendix A.

Applications to wrapped M5-branes
In this section we specialize the results of the previous section to two classes of AdS 5 solutions that are particularly relevant in connection to 4d N = 1 SCFTs engineered with M5-branes wrapped on a Riemann surface. More precisely, we consider: • M5-branes wrapped on a Riemann surface without punctures, which correspond to the solutions of [14,15], referred to as BBBW.
• M5-branes probing a Z 2 singularity and wrapped on a Riemann surface without punctures [27], which correspond to a class of solutions of [28], referred to as GMSW.

M5-branes wrapped on a Riemann surface
The BBBW solutions [14,15] describe the near-horizon geometry of a stack of M5-branes wrapped on a genus-g Riemann surface Σ g with a non-trivial topological twist preserving 4d N ≥ 1 superconformal symmetry. The internal space M 6 is topologically an S 4 bundle over Σ g . Its topology is encoded in two integer numbers p, q satisfying We can regard S 4 → M 6 → Σ g as the unit-sphere bundle associated to a real rank-5 vector bundle R 5 → N → Σ g . The bundle N is identified with the normal bundle to the M5-brane stack. It splits as N = L 1 ⊕ L 2 ⊕ N 0 , where L 1 , L 2 are complex line bundles over Σ g , and N 0 is a trivial real rank-1 vector bundle. The integers p, q are the Chern numbers of the complex line bundles L 1 , L 2 , respectively. In table 1 we summarize the choices of g, p, q for which a smooth AdS 5 M-theory solution exists, and for each case we list the isometries of the internal space M 6 . Some comments are in order. In all cases, M 6 admits at least a U (1) 1 × U (1) 2 isometry, which is the subgroup of the SO(5) isometry of the S 4 fiber that is preserved by the fibration over Σ g for any choice of p, q. When g ≥ 2, p = 0, U (1) 1 enhances to SU (2) 1 . Supersymmetry enhances to N = 2 and the isometry group SU (2) 1 × U (1) 2 is identified with the R-symmetry of the SCFT. This setup is the N = 2 Maldacena-Nuñez (MN) solution [37]. Similar remarks apply to g ≥ 2, q = 0. In the case g ≥ 2, p = q, the difference of the generators of U (1) 1 and U (1) 2 enhances to SU (2), which is identified with an enhanced flavor symmetry of the SCFT side. This is the N = 1 MN solution [37]. When g = 0, the Riemann surface is a round sphere S 2 . The space M 6 admits an additional SO(3) Σ isometry, originating from the isometry of S 2 . Finally, we would like to emphasize that the case g = 1, p = q = 0, which corresponds to 4d N = 4 SYM theory, is not included in table 1, because there is no smooth AdS 5 M-theory solution with internal space S 4 × T 2 without any twisting. The N = 4 SYM theory is best studied holographically via the standard AdS 5 × S 5 solution in type IIB string theory.
The number of external p-form fields entering the topological terms (2.6) in the 5d effective action is determined by the Betti numbers of M 6 . The latter do not depend on the twist parameters p, q and are given by This claim is verified in appendix B.1, where we also construct the associated closed forms with integral periods. The fact that b 4 (M 6 ) = 1 is consistent with the fact that BBBW solutions have only one flux parameter, which is the number of M5-branes in the stack. We notice that b 1 (M 6 ) = 2g stems from the fact that the 2g harmonic 1-forms on Σ g can be pulled back to M 6 , yielding closed but not exact 1-forms, whose de Rham classes account for the entire 1-cohomology of M 6 . The 5d p-form gauge fields originating from the expansion of C 3 are while we do not find any 0-form gauge potential. Making use of the closed forms of appendix B.1, we can compute explicitly the intersection numbers (2.7). The only non-zero intersection pairing is K α=1 uv , which can be written as (2.14) In the previous expression C 1u denotes a basis of integral 1-homology on Σ g , and Ω uv is the intersection pairing, which is antisymmetric and non-degenerate. The 6-form I 6 encoding the topological couplings of the 5d action as in (2.6) is given by It is useful to choose a basis C Σ 1u of integral 1-homology on Σ g that is based on the standard A and B cycles on the Riemann surface. Correspondingly, we write In other words, the intersection pairing Ω uv in this basis takes the standard form The group of linear transformations of the lattice H 1 (Σ g , Z) that preserve this form of Ω uv is Sp(2g; Z). (In our notation, Sp(2, Z) = SL(2, Z).) The choice of basis (2.16) implies that the index u on the 2-form gauge fields B u 2 is split into two sets of g values, In this basis, the 6-form I 6 reads

M5-branes probing a Z 2 singularity and wrapped on a Riemann surface
Let us now consider a class of solutions first discussed in [28]. The space M 6 is topologically an S 2 bundle over the product of two Riemann surfaces. If one of the Riemann surfaces is a torus, the setup is best studied by dualizing the M-theory solution to a type IIB string theory solution. We thus focus on the case where both Riemann surfaces are non-flat. There is no smooth solutions if both Riemann surfaces are negatively curved. We are therefore left with one sphere and one Riemann surface Σ g with g = 0 or g ≥ 2.
The line element has the form In the previous expression, ψ is an angular coordinate with period 2π, while µ is a coordinate on an interval, µ ∈ [µ S , µ N ]. The quantity ds 2 (S 2 ϕ ) = dθ 2 + sin 2 θ dϕ 2 is the standard line element on a unit-radius two-sphere, while ds 2 (Σ g ) denotes the line element on a Riemann surface of constant curvature κ = ±1, respectively. The functions f ϕ , f Σ are strictly positive on the entire µ interval. The function f µ has poles at µ = µ N,S , while f ψ as zeros at µ = µ N,S ; as a result, the µ and ψ coordinate describe a two-dimensional space S 2 ψ which is topologically a 2-sphere, with isometry group U (1) ψ . The circle S 1 ψ shrinks smoothly at µ = µ N,S . Finally, the fibration of S 2 ψ over the base S 2 ϕ × Σ g is encoded in where V ϕ , V Σ are the volume forms on S 2 ϕ , Σ g , respectively, normalized according to More details on these geometries can be found in appendix B.2.
To highlight the interpretation of M 6 in terms of wrapped M5-branes, it is convenient to present M 6 as where the space M 4 consists of the µ, ψ directions and the 2-sphere S 2 ϕ . It is depicted schematically in figure 1. The space M 4 can be identified with the resolution of the quotient S 4 /Z 2 [27]. Notice that S 2 ϕ does not shrink at µ = µ N,S and defines two 2-cycles in M 4 . The latter are identified with the resolution cycles originating from the blow-up of the singularities of S 4 /Z 2 . 5 This motivates the interpretation of M 6 as near horizon geometry of a stack of M5-branes probing a Z 2 singularity and wrapped on a Riemann surface.
The Betti numbers of The Z2 action is (y 1 , y 2 , y 3 , y 4 , y 5 ) → (−y 1 , −y 2 , −y 3 , −y 4 , y 5 ) in terms the Cartesian coordinates y 1,2,3,4,5 of R 5 ⊃ S 4 . This action has two fixed points on S 4 at y 5 = ±1. Near each fixed point the space looks like R 4 /Z2 and can be resolved by a 2-center ALE Taub-NUT geometry. This is verified in appendix B.2, where we also construct the closed forms needed to represent all cohomology classes of M 6 . In accordance with b 4 (M 6 ) = 3, this class of GMSW solutions has three independent flux parameters. They can be taken to be 25) where N is the flux through M 4 (at a generic point on Σ g ) and is identified with the number of M5-branes in the stack, while N ± = 1 2 (N N ± N S ) encode the fluxes through the 2-cycles in M 4 at µ = µ N,S combined with Σ g . A more detailed discussion can be found in appendix B.2. With reference to (2.25), the three 1-form gauge fields originating from expansion of C 3 onto 2-cohomology classes are denoted The 1-cohomology classes of M 6 are labeled by the same index u = 1, . . . , 2g that labels the non-trivial 1-cycles on the Riemann surface. As in the previous section, we can choose a canonical basis of 1-cycles on Σ g , and split the index u into two sets of g values. Accordingly, we have a total of 2g 2-form gauge fields, which we can arrange into two groups of g each, and similarly for their field strengths, By a similar token, we organize the 4g 0-form gauge fields associated to 3-cohomology class of M 6 into four groups of g elements. Within each group, we label 0-form fields with the same index i as in (2.27), (2.28) multiplicity fields top. mass terms 5d bulk gauge symm. Table 2: Summary of p-form gauge fields in 5d supergravity obtained from expansion of C 3 onto cohomology classes in M 6 for M5-branes at a Z 2 singularity wrapped on a genus-g Riemann surface. We have defined k = gcd(N α ).
Having introduced our choice of bases in cohomology and our notation, we can present the expression for I 6 . It reads (suppressing wedge products) The topological mass terms are collected in the first line. We summarize the p-forms fields and their topological mass terms in table 2. The bulk gauge groups in the last column are explained in greater detail in the next section.

BF theory in the bulk and holographic interpretation
In this section we analyze the 5d dynamics of the p-form gauge fields originating from the expansion of the M-theory 3-form C 3 . We make contact with well-known aspects of BF theories [24,25] and argue that the 5d theory contains gauge fields with discrete gauge groups. When the 5d spacetime has a boundary, the theory has to be supplemented by suitable boundary conditions and boundary terms, which we partially review. Moreover, we describe the singleton modes that propagate on the boundary of spacetime. Finally, we discuss the holographic correspondence between discrete gauge fields in five dimensions and global discrete p-form symmetries in the 4d boundary theory, as well as the holographic interpretation of the singleton modes of the 5d bulk theory. Most of the ideas presented in this section are modeled on results that have appeared in the literature. Our main goal here is to collect useful observations to set the stage for the 't Hooft anomaly discussion of section 5.

Low-energy dynamics in five dimensions
The relevant couplings in the effective action for the p-form gauge fields coming from the M-theory 3-form are the kinetic terms and the topological terms (2.5). At very low-energies, the dynamics is governed by the topological terms that are quadratic in the p-form gauge fields, as these terms in the 5d action contain only one derivative. These topological terms are encoded in the first line of the formal 6-form I 6 in (2.6).
We have already argued that the basis of 1-form gauge fields in (2.8) is the best suited for discussing topological mass terms involving c 3 . We also notice that, in all setups described in section 2.2, the term 1 (2.19) and (2.29). For these reasons, for the remainder of this section we consider the 5d topological theory defined by the action In the previous expression M 5 denotes external spacetime. In writing the action (3.1) we have chosen a specific antiderivative I 5 of the formal 6-form I 6 . If M 5 has no boundary, this choice does not matter. The case ∂M 5 = ∅ is discussed below. Recall that i = 1, . . . , g and k = gcd(N α ) (if b 2 (M 6 ) = 1, we define k = N α=1 ). The action (3.1) describes a collection of decoupled standard BF theories. We refer the reader to e.g. [24,25] for background material on BF theories and their relation to the Stückelberg mechanism.
The fact that the 1-form gauge fields A α 1 do not enter (3.1) means that their dynamics is governed by the kinetic terms and the cubic topological couplings in (2.5). As a result, the 1-form gauge fields A α 1 are standard U (1) gauge fields. In contrast, the dynamics of A 1 , c 3 , B 2i , and B i 2 is governed by (3.1) and therefore: • A 1 describes a 1-form gauge field with gauge group Z k .
• c 3 describes a 3-form gauge field with gauge group Z k .
• B 2i , B i 2 describe 2-form gauge fields with gauge group Z N . The field A 1 is a continuum description of a discrete gauge field because it is a flat connection and its holonomies are restricted in Z k ⊂ U (1). Similar remarks apply to c 3 , B 2i , B i 2 : for arbitrary cycles C 1 , C 3 , C 2 in 5d spacetime M 5 , We stress that, since all these p-form gauge fields are flat on-shell, the holonomies written above only depend on the homology classes of C 1 , C 3 , C 2 , and not on the specific representatives. Let us also emphasize that this description of discrete gauge fields in terms of local p-forms and their holonomies is convenient for our purposes, but in more general situations an approach based on cocycles is preferred [31,32].

Boundary terms and boundary conditions
For applications to holography we have to consider 5d spacetimes with a conformal boundary. In this case, the bulk action (3.1) has to be supplemented with suitable boundary conditions and possibly additional boundary terms, in order to ensure a well-defined variational problem.
In this section we describe some sets of boundary conditions that will be relevant below in the holographic discussion.
Topological boundary conditions. Let us first discuss boundary conditions for the c 3 , A 1 BF theory. A simple choice is to assign Dirichlet boundary conditions on A 1 , with free boundary conditions for c 3 . The variational problem is well-posed because the relevant terms in the on-shell variation of the action (3.1) are Let us stress that imposing Dirichlet boundary conditions for both A 1 and c 3 would be inconsistent, since the variational problem defined by the bulk BF action (3.1) is first-order. If desired, the roles of A 1 and c 3 can be exchanged. By adding the boundary term − k 2π ∂M 5 c 3 ∧ A 1 to (3.1), we can rewrite the relevant terms in the total action as In this case we impose Dirichlet boundary conditions on c 3 , with free boundary conditions for A 1 . The boundary conditions described so far as topological, since they are invariant under orientation-preserving diffeomorphisms of ∂M 5 and do not require the choice of a boundary metric. (See [38] for a classification of topological boundary conditions in Abelian 3d Chern-Simons theory.) If the integer k can be factorized as k = mm , we can also consider a generalization of the above topological boundary conditions, along the lines of [1,26]. Let us stress that, since A 1 is a discrete 1-form gauge field, assigning Dirichlet boundary conditions for A 1 means specifying its Z k holonomies around 1-cycles in the boundary ∂M 5 . We can partially relax the boundary conditions on A 1 as follows. To a given 1-cycle C 1 in ∂M 5 we no longer associate an element x ∈ Z k , but rather a coset [x] Zm ∈ Z k /Z m . The holonomy exp(i C 1 A 1 ) is free to take any value y ∈ [x] Zm , which is the same as y = x mod m . 6 Following the terminology of [26], we say that A 1 is free in Z k modulo Z m . It is interesting to notice that, since Z k /Z m ∼ = Z m , the data encoded in the boundary conditions for A 1 is the same data that define a background Z m 1-form gauge field on the boundary.
In order to have a well-defined variational problem, we must partially restrict the field c 3 . Its boundary conditions are no longer free. To a 3-cycle C 3 , we assign a coset [x] Z m and the holonomy exp(i C 3 c 3 ) can take any value y ∈ [x] Z m , which is the same as y = x mod m. In short, we say that c 3 is free in Z k modulo Z m . Specifying the boundary condition for c 3 is the same as choosing a background Z m 3-form gauge field on the boundary.
Let us now comment on topological boundary conditions for the B i 2 , B 2i BF theory. For a given label i = 1, . . . , g, we may assign Dirichlet boundary conditions for B i 2 and free boundary conditions for B 2i , or vice versa. If N can be factorized as N = nn , we can also consider boundary conditions in which B 2i is free in Z N modulo Z n , while B i 2 is free in Z N modulo Z n (in the same terminology explained above.) The full set of boundary conditions for the B i 2 , B 2i BF theory, however, is richer. Indeed, we can select suitable linear combinations , and impose that B 2i be free in Z N modulo Z n , and B i 2 be free in Z N modulo Z n . Moreover, the duality group Sp(2g, Z) acts on the set of topological boundary conditions. We leave the problem of classifying topological boundary conditions for the B i 2 , B 2i BF theory to future work.
The role of kinetic terms. Let us close this section by emphasizing that the discussion of boundary conditions is qualitatively different if the kinetic terms are included in the analysis. This is because, if the kinetic terms are retained, the variational problem is a second-order problem. It is therefore possible, for instance, to impose Dirichlet boundary conditions on all fields. This point is discussed in [39,40] in the context of 3d and 5d topological theories. We expect similar features in our 5d BF system.

Singleton modes propagating on the boundary
When a topological 5d BF theory with a coupling between a p-form gauge field and a (4 − p)form gauge field is considered in a spacetime with a boundary, there is a massless (p − 1)form gauge field propagating along the boundary. (Equivalently, the massless mode on the boundary can be thought of as a (3 − p)-form gauge field.) These massless boundary modes are usually referred to as singletons. For a justification of the previous claims and of the following statements, see e.g. [24,25]. For the case at hand, the singleton modes are: • One 0-form gauge field in ∂M 5 .
All these gauge fields are standard U (1) gauge fields, as opposed to discrete gauge fields.
While the Hilbert space of the singleton fields is insensitive to the choice of boundary terms and boundary conditions, its dynamics (i.e. the Hamiltonian on the Hilbert space) is different for different boundary terms and boundary conditions. In this work, we refrain from a detailed analysis of the singleton dynamics. We will be mainly interested in counting singletons and discussing their holographic duals. A thorough analysis of the singleton sector would require to take into account the kinetic terms, as in [40,41]. We leave such investigation for the future.

Holographic interpretation
Let us now turn to a discussion of the holographic interpretation of the features of the bulk BF theory listed in the previous section.

Global discrete symmetries in four dimensions
We have argued above that the 1-form gauge fields A α 1 are standard U (1) gauge fields in five dimensions. As a result, they are dual to global U (1) 0-form symmetries in the interacting CFT living on the boundary.
In contrast, the holographic interpretation of the discrete gauge fields A 1 , c 3 , B 2i , and B i 2 is more subtle. We describe it in the purely topological BF theory, neglecting kinetic terms.
Holography of the topological BF theory. The holographic interpretation of the 5d bulk BF theory (3.1) depends on the choice of boundary conditions. In other words, different boundary conditions correspond to different dual CFTs, which may have different global symmetries. This is a standard phenomenon in the paradigmatic example of AdS 5 × S 5 in type IIB [42] and has recently been studied in the context of ABJM theories [26].
Firstly, let us focus on the A 1 , c 3 system. The holographic interpretation of the topological boundary conditions discussed above is as follows.
(a) Dirichlet boundary conditions for A 1 and free boundary conditions for c 3 : The dual interacting CFT admits a global Z k 0-form symmetry. Specifying the boundary condition for A 1 is the same as fixing a configuration for the 4d background 1-form gauge field that couples to this global symmetry.
(b) Dirichlet boundary conditions for c 3 and free boundary conditions for A 1 : The dual interacting CFT admits a global Z k 2-form symmetry. Specifying the boundary condition for c 3 is the same as fixing a configuration for the 4d background 3-form gauge field that couples to this global symmetry.
(c) The case k = mm with A 1 free in Z k modulo Z m and c 3 free in Z k modulo Z m : The dual interacting CFT admits both a global Z m 0-form symmetry and a global Z m 2-form symmetry. Specifying the boundary conditions for A 1 and c 3 is the same as fixing a configuration for the 4d background 1-form and 3-form gauge fields that couple to these global symmetry.

Case (c) is intermediate between cases (a) and (b).
In case (c), there is a mixed 't Hooft anomaly between the Z m 0-form symmetry and the Z m 2-form symmetry. This 't Hooft anomaly is encoded in the 6-form I 6 = −k dc 3 2π ∧ dA 1 2π , which is related by descent to the BF coupling in the 5d bulk action. 7 7 Roughly speaking, terms in I6 involving two or more Dirichlet fields are interpreted as 't Hooft anomalies.
If we choose Dirichlet boundary conditions for A1, the field c3 has free boundary conditions. The 6-form I6 = −k dc 3 2π ∧ dA 1 2π does not encode a 't Hooft anomaly, and indeed we only have a global Z k 0-form symmetry.
Let us also observe that cases (b) and (c) can be obtained from case (a) via gauging. More precisely, suppose k = mm . The CFT of case (a) has a global Z k 0-form symmetry. We may gauge a subgroup Z m ⊂ Z k of this global symmetry. The gauging is performed by path-integrating over the background 1-form gauge field that couples to the Z m subgroup. This is the same as modifying the boundary conditions for A 1 : we go from Dirichlet boundary conditions, to having A 1 free in Z k modulo Z m . After gauging, the residual global 0-form symmetry is Z m . There is also an emergent global Z m 2-form symmetry. We recognize the features of the CFT of case (c). Selecting m = k, m = 1 we recover case (b).
The B 2i , B i 2 system can be analyzed in a similar way. As recalled in section 3.1.1, the full set of allowed topological boundary conditions is rich, and their classification is left for future work. To illustrate the relation between boundary conditions and global discrete symmetries, we consider a simple class of boundary conditions, in which we can treat each label i = 1, . . . , g independently. One may thus consider the following three scenarios.
(a ) Dirichlet boundary conditions for B 2i and free boundary conditions for B i 2 : The dual interacting CFT admits a global (Z N ) g 1-form symmetry of "electric type". Specifying the boundary condition for B 2i is the same as fixing a configuration for the 4d background 2-form gauge fields that couple to this global symmetry.
(b ) Dirichlet boundary conditions for B i 2 and free boundary conditions for B 2i : The dual interacting CFT admits a global (Z N ) g 1-form symmetry of "magnetic type". Specifying the boundary condition for B i 2 is the same as fixing a configuration for the 4d background 2-form gauge fields that couple to this global symmetry.
(c ) The case N = nn with B 2i free in Z N modulo Z n and B i 2 free in Z N modulo Z n : The dual interacting CFT admits both a global (Z n ) g 1-form symmetry of "electric type" and a global (Z n ) g 1-form symmetry of "magnetic type". Specifying the boundary conditions for B 2i and B i 2 is the same as fixing configurations for the 4d background 2-forms that couple to these global symmetries.
As before, the case (c ) is intermediate between (a ) and (b ), and in case (c ) there is a mixed 't Hooft anomaly between the (Z n ) g and (Z n ) g 1-form symmetries. This 't Hooft anomaly is encoded in the 6-form

Singleton modes as Goldstone modes
According to the usual holographic dictionary, the supergravity theory in the bulk of 5d spacetime M 5 is dual to an interacting CFT living on ∂M 5 . The gravity theory in five dimensions has additional singleton modes, that only propagate on the conformal boundary of 5d spacetime. These modes to not gravitate. They are holographically dual to additional, decoupled free fields in four dimensions.
When we let A1 free in Z k modulo Z m and c3 free in Z k modulo Zm, both fields A1 and c3 are "partially Dirichlet". As a result, I6 = −k dc 3 2π ∧ dA 1 2π now encodes the mixed 't Hooft anomaly between the 0-form and 2-form global symmetries.
BF singletons as Goldstone modes. In section 3.1.2 we have identified a subset of the singleton modes for the 5d gravitational theories of interest in this work. More precisely, we have identified the singleton modes associated to the 5d BF theory (3.1). For these singleton modes we can offer an interpretation in terms of Goldstone's theorem, as follows.
The singleton mode associated to the BF coupling k c 3 ∧ dA 1 is a 4d 0-form gauge field, i.e. an axion. The BF coupling k c 3 ∧ dA 1 can be related by dualization to a Stückelberg coupling between the vector A 1 and the axion dual to c 3 . (Useful background material can be found in [24,25].) The 5d theory describes a U (1) 0-form gauge symmetry Higgsed down to Z k . According to the usual holographic dictionary, the U (1) 0-form gauge symmetry in five dimensions is dual to a U (1) 0-form global symmetry in four dimensions. The boundary value of the 5d gauge field A 1 is identified with the Noether 1-form current J 1 for the global U (1) 0-form symmetry in four dimensions. Since the U (1) 0-form gauge symmetry is spontaneously broken in five dimensions, the dual U (1) 0-form global symmetry in four dimensions is also spontaneouly broken. As a result, we have a 4d massless Goldstone scalar Φ, related to the current J 1 by the schematic relation J 1 ∼ dΦ. The Goldstone mode Φ enjoys a global shift symmetry Φ → Φ + const. It is an axion and its interactions are derivative interactions. In the deep IR, Φ decouples from the rest of the 4d theory. We identify it with the holographic dual of the singleton mode from the BF coupling k c 3 ∧ dA 1 .
Similar remarks apply to the singleton modes associated to the BF coupling N B i 2 ∧ B 2i . A general statement is as follows: It is identified with the Goldstone mode originating from spontaneous breaking of a global (p − 1)-form symmetry in the (D − 1)-dimensional dual field theory.
In the case D = 2p+1 we can formulate a similar statement regarding Chern-Simons couplings.
A (2p + 1)-dimensional Chern-Simons coupling A p ∧ dA p for a p-form gauge field A p yields a singleton mode which is a massless chiral U (1) (p − 1)-form gauge field in 2p dimensions. It is identified with the Goldstone mode originating from spontaneous breaking of a global (p − 1)-form symmetry in the 2p-dimensional dual field theory.
Here a chiral (p − 1)-form gauge field is by definition a gauge field whose p-form field strength obeys a self-duality constraint of the form * 2p F p = ±F p or * 2p F p = ±i F p , depending on the dimension and signature of spacetime.

Extended operators and discrete symmetries
In this section we review the extended operators of the 5d topological BF theory with action (3.1). We identify the 11d origin of these operators in terms of wrapped M2-branes. We also consider the interplay between these operators and the topological boundary conditions for the BF system (3.1) and infer what extended operators are expected in the dual 4d field theories.

Extended operators in the BF bulk theory
A natural set of gauge-invariant observables in the 5d theory (3.1) is given by the holonomies of the gauge fields c 3 , A 1 , B i 2 , B 2i on cycles in 5d spacetime, where n, n i , and n i are integers and C ext 1 , C ext 2 , C ext 3 and 1-, 2-, 3-cycles in 5d spacetime. The superscript 'ext' stands for external and is inserted to avoid possible confusions with cycles in the internal geometry M 6 . We remind the reader that p-form gauge fields are normalized to have periods quantized in units of 2π. In the topological BF theory, the operator W c (C ext 3 , n) describes a 3d defect in 5d spacetime extended along C ext 3 with electric charge n under c 3 . In a similar way, The operators (4.1) will be referred to as electric operators.
If a defect charged under A 1 is transported around a defect charged under c 3 , it acquires a non-trivial Z k Aharonov-Bohm phase. The latter is encoded in the correlator where L(C ext 3 , C ext 1 ) is the integer linking number of C ext 1 and C ext 3 in the ambient 5d spacetime. By a similar token, the Aharonov-Bohm phases of defects charged under B 2i , B 2i are captured by the correlators The derivation of (4.2) and (4.3) can be found e.g. in [24,25]. In addition to the electric operators in (4.1), the 5d topological theory also admits "mixed" electric-magnetic operators. If we consider a 2-cycle B ext 2 in external spacetime, we can define a 't Hooft operator for A 1 supported on B ext 2 . This is done in the usual way. We remove a small tubular neighborhood of B ext 2 from 5d spacetime. The boundary of the tubular neighborhood is an S 2 bundle over B ext 2 . The 't Hooft operator on B ext 2 is defined by performing the path integral over A 1 with the boundary condition 1 2π S 2 F 2 = 1. Because of the k c 3 ∧ dA 1 coupling in the action, the 't Hooft operator is not gauge invariant. It must be supplemented with a charge-k Wilson operator for c 3 on a 3-chain C ext 3 such that ∂C ext 3 = B ext 2 [42][43][44]. 8 In a completely analogous fashion, one can consider a 't Hooft operator for c 3 supported on a 0-cycle B ext 0 (a collection of points taken with signs). To preserve gauge invariance, this must be supplemented with a charge-k Wilson operator for A 1 supported on a 1-chain C ext  2). Finally, the operators W B, B (C e 2 , n, n) originate from probe M2-branes wrapping a 1-cycle in M 6 . The charges n i , n i are identified with the integers that define this 1-cycle, with respect to a fixed basis of 1-cycles in M 6 . It can also be verified that the 5d Aharonov-Bohm phases encoded in the correlators (4.2), (4.3) can be reproduced from an 11d perspective, using the C 3 G 4 G 4 coupling in the M-theory low-energy effective action.
The mixed electric-magnetic operators are realized using probe configurations with M2branes ending on M5-branes. As an example, let us consider a charge-1 't Hooft operator for In our discussion so far we have not taken supersymmetry into consideration. One could determine the BPS conditions for probe M2-branes and M5-branes by analyzing κ-symmetry on their worldvolumes.

Extended operators in the dual field theory
The operators of the 5d topological theory discussed in the previous section can yield operators in the dual boundary field theory. The choice of boundary conditions for A 1 , c 3 , B 2i , B i 2 8 After removing a small tubular neighborhood U of B ext 2 , the gauge variation of the 5d action reads where we have used 1 2π S 2 F2 = 1. The above expression shows that the gauge variation of the 't Hooft operator for A1 can be cancelled by k Wilson operators for c3. determines whether a 5d operator is allowed to end on the boundary ∂M 5 or not. A similar discussion has recently appeared in [26] in the context of AdS 4 /CFT 3 .
Let us discuss operators constructed with A 1 , c 3 . We make contact to the cases (a), (b), (c) discussed in section 3.2.1. In case (a) the operators W A (C e 1 , n) defined in (4.1) are allowed to end on ∂M 5 , while the operators W c (C e 3 , n) are forbidden from ending on ∂M 5 . 9 The 5d operator W A (C e 1 , 1) yields a local operator O on ∂M 5 that has unit charge under the global Z k 0-form symmetry of the field theory. In a similar way, in case (b) it is the operators W c (C e 3 , n) that can end on the boundary, and W c (C e 3 , 1) yields a surface operator on ∂M 5 with unit charge under the global Z k 2-form symmetry of the field theory. In case (c), with factorization k = m m , the operator W A (C e 1 , n) is allowed to end on ∂M 5 if the charge n is a multiple of m, while W c (C e 3 , n) can end on the boundary if n is a multiple of m . In the boundary field theory we obtain both local operators and surface operators, compatibly with the global Z m 0-form and Z m 2-form symmetry.
The mixed electric-magnetic operators of the 5d topological bulk theory act as baryon vertices [45] from the point of view of the dual field theory. For example, in case (a) we can consider the operator O k on the boundary and connect it to a point in the bulk, where a charge-1 't Hooft operator for c 3 is supported (a "monopole event"). The arguments of [44] show that in this case O k acquires a VEV. Notice that this phenomenon does not break the global Z k 0-form symmetry. Analogous remarks apply to cases (b) and (c).
Let us now turn to the operators W B, B (C e 2 , n, n) in (4.1). In section 3.2.1 we have defined the cases (a ), (b ), (c ). Notice that we can choose any of these three options independently for each label i = 1, . . . , g. For the sake of simplicity, let us discuss the situation in which we choose case (a ) for all i = 1, . . . , g. Other choices of topological boundary conditions for the ( B i 2 , B 2i ) system can be discussed in a similar way. If we select case (a ) for all i = 1, . . . , g, the operator W B, B (C e 2 , n, n) is allowed to end on ∂M 5 if its B i 2 charges n i are all equal to zero. If this condition is met, we get a line operator in the dual field theory. It has charges n i under the global "electric" (Z N ) g 1-form symmetry of the QFT. If n i = N s i for some integers s i , we can connect the line operator on the boundary to a mixed electric-magnetic operator (baryon vertex) in the bulk. More precisely, the line operator on M 5 is connected by a 2d worksheet to a line B ext 1 in the bulk, which supports a 't Hooft operator for H i 3 with charges s i . 10 According to the analysis of [44], the presence of the baryon vertex in the 5d bulk implies condensation of the line operator with charges n i = N s i . 11 This condensation does not trigger a spontaneous breaking of the (Z N ) g 1-form symmetry.
The analysis of extended operators and boundary conditions in the B i , B i BF theory can be used as a tool to access allowed line operators in 4d SCFTs from wrapped M5-branes. The 9 More precisely, Wc(C e 3 , n) can end on ∂M5 only if n is a multiple of k, in which case the operator Wc(C e 3 , n) is trivial. 10 More explicitly, we consider a small tubular neighborhood of B ext 1 in M5. Its boundary is an S 3 bundle over B ext 1 . We impose the boundary condition 1 2π S 3 H i 3 = s i . 11 A line operator is said to be condensed if it obeys a perimeter law [1].
goal is a classification that generalizes the results of [46] beyond Lagrangian gauge theories. We expect a rich variety of line operators and a non-trivial action of the duality group Sp(2g, Z) on them. Notice that this strategy can be applied to both N = 2 and N = 1 theories. We plan to study this problem in greater detail in future work.

't Hooft anomalies from inflow
In this section we compute the inflow anomaly polynomial for the M-theory setups of interest in this work. We include all p-form gauge fields originating from expansion of C 3 onto cohomology classes of M 6 , as well as background fields for isometries of M 6 , and an arbitrary background metric. A systematic method for performing this computation was developed in [22]. One main novelty here is the interpretation of the terms involving A 1 , c 3 , B 2i , B i 2 , which encode 't Hooft anomalies for discrete global symmetries. Moreover, in the case of M5-branes probing a Z 2 singularity, we include background 0-form gauge fields and we discuss their interpretation in terms of anomalies in the space of coupling constants.

Inflow anomaly polynomial
Let us outline the recipe for the computation of the inflow anomaly polynomial. We refer to [22] for further explanations. The input data is the internal geometry M 6 and the background G 4 -flux configuration G 4 . In the notation of (2.3), the latter is Our goal is to compute the 6-form inflow anomaly polynomial I inflow 6 . As per usual descent formalism, I inflow 6 is a closed, gauge-invariant 6-form that is defined in a fiducial spacetime M 6 , which is taken to be Euclidean and six-dimensional.
In order to compute 't Hooft anomalies for symmetries associated to isometries of M 6 , we have to consider a fibration of M 6 over the fiducial spacetime M 6 . The relevant space is therefore an auxiliary 12-manifold M 12 , The desired 6-form I inflow 6 is computed by fiber integration along M 6 of a globally defined 12-form I 12 on M 12 , (5. 2) The 12-form I 12 is constructed from the class X 8 (T M 12 ) (see (2.4) for the definition of X 8 in terms of Pontryagin classes) and from a 4-form E 4 on M 12 , according to The expression for E 4 is discussed below. It is argued in [22] that the 6-form (5.2) is equal to minus the 't Hooft anomalies of the full 4d theory living on the M5-branes stack. In the cases of interest in this paper, the 4d theory consists of an interacting SCFT, together with free decoupled modes. We may then write We comment further on I decoupl 6 in section 5.2. Let us now turn to a description of the 4-form E 4 . It is a globally defined, closed 4-form on M 12 with integral periods, which can be written as In the previous expression the forms F α 2 , f x 1 , H u 3 , γ 4 are closed forms on the base M 6 of the fibration (5.1), pulled back to the total space M 12 (the pullpack is implicit in our notation). Exactly as in ( as the field strengths of p-form background gauge fields on M 6 , so that the periods of F α 2 , f x 1 , H u 3 , γ 4 are quantized in units of 2π. The forms (Ω α 4 ) eq , (ω 2α ) eq , (Λ 3x ) eq , (λ 1u ) eq are globally defined, closed forms on M 12 with integral periods. 12 They can be regarded as a gauge-invariant and closed extension of the forms Ω α 4 , ω 2α , Λ 3x , λ 1u on the fiber M 6 . Indeed, if the fibration (5.1) is replaced by a direct product and all external gauge fields related to isometries of M 6 are turned off, the forms (Ω α 4 ) eq , (ω 2α ) eq , (Λ 3x ) eq , (λ 1u ) eq reduce to Ω α 4 , ω 2α , Λ 3x , λ 1u . We discuss the construction of the forms (Ω α 4 ) eq , (ω 2α ) eq , (Λ 3x ) eq , (λ 1u ) eq in appendix C. We would like to emphasize here, however, that they are not uniquely determined by the forms Ω α 4 , ω 2α , Λ 3x , λ 1u on M 6 . Different realizations of (Ω α 4 ) eq differ by a closed (but not necessarily exact) 4-form on M 12 , and similarly for the other forms. We show in appendix C that the ambiguities related to a specific choice of (Ω α 4 ) eq , (ω 2α ) eq , (Λ 3x ) eq , (λ 1u ) eq in E 4 can always be undone by adding exact pieces to E 4 (which do not alter the integral (5.2)) and/or performing a field redefinition of the external field strengths F α 2 , H u 3 , γ 4 . We also verify that the necessary field redefinitions preserve the lattice of periods of the field strengths. We conclude that the inflow anomaly polynomial I inflow 6 is unambiguously defined, up to a choice of basis in the space of external p-form gauge fields on M 6 .
After these preliminary remarks, we can discuss anomaly inflow for the wrapped M5-brane setups of interest in this work.

M5-branes wrapped on a Riemann surface
In section 2.2.1 we have summarized the choices of g, p, q that lead to a smooth supersymmetric AdS 5 M-theory solution, see table 1. In all cases, M 6 admits at least a U (1) 1 ×U (1) 2 isometry, associated to angular directions φ 1 , φ 2 . We couple these isometries to external Abelian gauge fields A φ 1 , A φ 2 . We introduce the notation for the first Chern classes of these background connections. When g = 0, the space M 6 admits an additional SO(3) Σ ∼ = SU (2) Σ isometry. We can couple this isometry to a triplet of external gauge fields. We use the notation c Σ 2 = c 2 (SU (2) Σ ) for the second Chern class of these SU (2) Σ background gauge fields. Appendix B.1 contains a more detailed discussion of the gauging of isometries of M 6 .
The derivation of the inflow anomaly polynomial is reported in appendix B.1. The result reads (suppressing wedge products) This result includes the terms originating from −E 4 X 8 in I 12 . In (5.7), p 1 (T ) denotes the first Pontryagin class of the background metric on spacetime. Notice that the coefficients of the BF terms are both equal to N here. It is understood that the terms with c Σ 2 are only present if g = 0. We stress that (5.7) does not contain mixed 't Hooft anomalies between the symmetries related to isometries of M 6 and the symmetries associated to cohomology classes on M 6 . 13

Interpretation
If we focus only on continuous symmetries, the background fields F 2 , γ 4 , H i 3 , H 3 are set to zero. This follows from the tadpole condition on E 2 4 + 2 X 8 discussed in [22]. Alternatively, we notice that I inflow 6 in (5.7) can be regarded as collecting all topological terms in the 5d AdS 5 effective action. Enforcing the tadpole condition is equivalent to using the 5d EOMs for A 1 , c 3 , B i 2 , B 2i that come from this topological action: all these fields are flat on-shell. After integrating out F 2 , γ 4 , H i 3 , H 3 , the first two lines of (5.7) reproduce known results [15,22] and their interpretation is standard: they encode 't Hooft anomalies for the symmetries U (1) 1 , U (1) 2 , SU (2) Σ and Poincaré symmetry.
The terms γ 4 F 2 and H i 3 H 3i on the last line of (5.7) are a proxy for 't Hooft anomalies involving discrete global symmetries. More precisely, the global symmetry on the boundary SCFT depends on the choice of boundary conditions for A 1 ≡ A 1 , c 3 , B 2i , B 2 i . The terms γ 4 F 2 and H i 3 H 3i each encode a mixed 't Hooft anomaly if we choose boundary conditions of type (c), (c ) in the terminology of section 3.2.1.

M5-branes probing a Z 2 singularity and wrapped on a Riemann surface
If we consider a higher-genus Riemann surface, the internal space M 6 has isometry group U (1) ψ × SU (2) ϕ . In the case g = 0 we have an additional SO(3) Σ ∼ = SU (2) Σ isometry. We 13 The anomaly polynomial is sensitive to the choice of the forms (Ω α 4 ) eq , (ω2α) eq , (Λ3x) eq , (λ1u) eq . There exists a choice such the result takes the form (5.7). As we shall see, in the GMSW setup such a choice is not possible.
introduce the compact notation for the Chern classes of the background gauge fields for U (1) ψ , SU (2)  where I inflow,1 6 encodes the anomalies involving exclusively the symmetries associated to isometries and Poincaré symmetry, I inflow,2 6 collects all terms that only involve p-form gauge fields originating from expansion of C 3 , and I inflow, 3 6 contains all other terms. Explicitly, It should be stressed that, in presenting I inflow 6 , we have implicitly chosen a basis of external p-form fields originating from expansion of C 3 . We are free to consider field redefinitions that shift these p-form fields with terms constructed with the background connections for the isometries of M 6 . Unlike the BBBW case, however, there is no such redefinition that can set to zero all mixed terms between symmetries originating from isometries, and symmetries originating from C 3 .

Perturbative anomalies
Let us extract physical information about perturbative anomalies for continuous symmetries from the inflow anomaly polynomial (5.9). The gauge fields B 2i , B i 2 , c 3 , together with one linear combination of the three vectors A 1 , A ± 1 , are topologically massive gauge fields in five dimensions and therefore cannot be interpreted as background gauge fields for continuous symmetries in the 4d field theory. If we are only interested in studying local aspects of 't Hooft anomalies for continuous global symmetries, we have to eliminate the topologically massive fields from the anomaly polynomial. This is done enforcing the tadpole constraints on E 2 4 + 2 X 8 discussed in [22]. Equivalently, we impose the equations of motion for c 3 , B 2i , B i 2 in the 5d topological theory defined by I inflow 6 . If we do so, we obtain the relations We may solve these relations for F 2 , H 3i , H i 3 . After plugging the corresponding expressions back into I inflow 6 , the field γ 4 drops away and we are left with a polynomial in c ψ This polynomial encodes the sought-for perturbative anomalies and reads (5.14) The above expression extends the results of [27] with the inclusion of the terms involving f ± 1i , f i± 1 . Notice the appearance of 1/N factors in the 't Hooft anomaly coefficients. They originate from solving the relations (5.13). Physically, they come from integrating out topologically massive modes. The perturbative anomaly polynomial (5.14) can be used to compute central charges via a-maximization; at leading order in N , one finds a perfect match with the dual supergravity computation based on the GMSW solutions [27].

Aside: topologically massive fields and Green-Schwarz terms in six dimensions
A variant of the mechanism that generates 1/N terms in (5.14) by integrating out topologically massive fields is at play in six dimensions. More precisely, let us consider a stack of N M5branes probing a Γ ADE ⊂ SU (2) singularity. The internal geometry is S 4 /Γ ADE . Upon resolution of the orbifold singularities at the north and south poles of S 4 , we get a smooth internal internal space M 4 . At each pole we have a collection of resolution 2-cycles. Expansion of the M-theory 3-form C 3 in cohomology of M 4 yields an external 3-form gauge field c 3 and a collection of 1-form gauge fields, associated to the resolution 2-cycles at the north and south poles. In the limit in which the resolution cycles are shrunk to zero size we have an G N Γ × G S Γ non-Abelian gauge symmetry in the 7d low-energy effective action, where G Γ is the ADE Lie group associated to Γ ADE . The topological couplings of the 7d effective action are conveniently encoded in a gauge-invariant 8-form, which contains the terms The 4-form γ 4 is the field strength of the 3-form gauge field c 3 , while F N,S is the field strength of the gauge group G N,S Γ . The 3-form gauge field c 3 is topologically massive by virtue of the 7d Chern-Simons coupling encoded in the term γ 2 4 in (5.15). In order to study the perturbative anomalies for continuous global symmetries of the system, we have to integrate out this massive field. Eliminating c 3 via its classical equation of motion is the same as enforcing the tadpole constraint of [22]. The terms (5.15) are traded for In the analysis of [29] this term is interpreted as a Green-Schwarz term related to the centerof-mass mode of the M5-branes, see also the recent field-theoretic analysis of [47]. Our analysis of topological mass terms in supergravity reveals how this term is automatically accounted for in inflow via integrating out massive modes.
Remarks on the background 0-form gauge fields a ± 0i , a i± 0 The terms in I inflow should be interpreted along the lines of [2] as 't Hooft anomalies in the space of coupling constants. We can think of a ± 0i , a i± 0 as background fields for global "(−1)-form symmetries" in the 4d field theory. (We refer the reader to [2] for a careful discussion of the merits and limitations of the notion of "(−1)-form symmetry".) Recall that a ± 0i , a i± 0 originate form expansion of C 3 onto 3-cycles in the internal space M 6 . We can offer an interpretation of a ± 0i , a i± 0 in terms of the picture of M5-branes probing a Z 2 singularity. The 6d SCFT on the worldvolume of the M5-branes has an SU (2) N × SU (2) S global symmetry. This theory is reduced on Σ g with a non-zero flavor flux, which breaks SU (2) N × SU (2) S to the Cartan subgroup U (1) N × U (1) S . The 6d background 1-form gauge fields for this 0-form symmetry can be dimensionally reduced along 1-cycles in Σ g to yield 0-form gauge fields in four dimensions. Since Σ g has 2g 1-cycles, this reduction generates a total of 2 × 2g = 4g 0-form gauge fields in four dimensions, which matches the total number of a ± 0i , a i± 0 fields. The operators in the 4d SCFT coupled to a ± 0i , a i± 0 are exactly marginal operators. In a schematic semi-Lagrangian language, the deformation of the SCFT associated to a ± 0i , a i± 0 takes the form In light of the discussion of the previous paragraph, we can regard O ± i , O i± as coming from the dimensional reduction on Σ g of the 6d 1-form conserved current operators associated to the 6d U (1) N × U (1) S 0-form symmetry. Schematically, where λ i , λ i are closed 1-forms on Σ g as in section 2.1. We also notice that a ± 0i , a i± 0 are compact scalars with period 2π. This indicates that the spacetime integrals of the associated operators O ± i , O i± satisfy a quantization condition of the form Intuitively, the operators O ± i , O i± are analogous to tr (F F ) in gauge theory, and a ± 0i , a i± 0 are analogous to θ angles.
Let us stress that a ± 0i , a i± 0 are distinct from the axionic couplings that originate from the complex structure moduli of the Riemann surface Σ g . The geometric origin of the latter resides in a deformation of the metric on Σ g . 't Hooft anomalies associated to these coupling constants have been analyzed in [48].

Anomalies for discrete symmetries
The inflow anomaly polynomial balances against the total 't Hooft anomalies of interacting and decoupled modes in the 4d field theory, see (5.4). It should be stressed that the separation into interacting and decoupling modes does not necessary correspond to a simple factorization of the partition function in field theory. From the perspective of the dual gravity theory, the singleton sector in a string theory/M-theory compactification decouples from the rest of the dynamics of quantum gravity, but in general the full quantum gravity partition function does not simply factorize into a contribution from the singleton sector times a contribution from interacting modes. Rather, as argued in [40], one expects the total string theory/M-theory partition function to be of the schematic form (5.20) In the previous expression, the discrete label β enumerates the relevant topological sectors of string theory/M-theory in the background under consideration. The quantities Z singleton β encode the contribution of singleton modes, while Z β encode the contributions of all other interacting bulk modes. The holographic duals of Z β are the conformal blocks of an interacting 4d CFT, while the holographic duals of Z singleton β are the conformal blocks of a free 4d theory.
As demonstrated in [40], the correct strategy to compute Z singleton β on the gravity side is to consider both kinetic terms and topological terms in the 5d supergravity effective action. In this approach the Hamiltonian in the singleton sector is unambiguously determined. (In contrast, in the purely topological BF theory without kinetic terms, the Hamiltonian can be modified by adding boundary terms.) For the setups of interest in this work, one needs to consider the BF couplings (3.1) supplemented with standard kinetic terms.
In the setups with wrapped M5-branes studied in this work, the total worldvolume theory has a partition function of the form (5.20) with more than one term on the RHS. Indeed, the different summands labeled by β correspond to inequivalent choices of boundary conditions for the fields entering the BF couplings (3.1). In the total worldvolume theory, the fields A 1 , c 3 , B 2i , B i 2 are associated to global continuous U (1) 0-, 2-, and 1-form symmetries. These U (1) symmetries are spontaneously broken. The breaking pattern is different for the various β summands in (5.20). Indeed, we know that interacting theories associated to different choices of boundary conditions have different global discrete symmetries. For example, with reference to the terminology of section 3.2.1, the U (1) 0-form symmetry associated to A 1 is broken to Z k in case (a), is broken to nothing in case (b), and is broken to Z m in case (c).
The inflow anomaly polynomial I inflow 6 in (5.7) or (5.9) is interpreted as minus the anomaly polynomial of the total worldvolume theory (5.20). Since this theory has continuous symmetries, we can describe its anomalies using the language of differential forms. If we ignore the specific breaking pattern of the U (1)'s to discrete symmetries, all interacting SCFTs with partition functions Z β have the same perturbative 't Hooft anomalies for their unbroken continuous symmetries. For wrapped M5-branes these anomalies are the first two lines of (5.7), while for wrapped M5-branes at a Z 2 singularity the perturbative anomalies are collected in (5.14).
Extracting the anomalies for discrete symmetries of a given interacting SCFT Z β is more challenging. We expect that the language of differential cohomology should give us the proper mathematical framework to discuss these anomalies. In appendix D we provide a brief review of the aspects of differential cohomology that are relevant for this work. We use the notatioň H (M 4 ) to denote the -th differential cohomology group of external spacetime. An element ofȞ (M 4 ) models an ( − 1)-form U (1) gauge field.
As a first case, let us consider the BBBW setup and assign Dirichlet boundary conditions to A 1 and free boundary conditions to c 3 , case (a) in the terminology of section 3.2.1. We can dualize the 3-form gauge field c 3 to a 0-form gauge field φ 0 . The effect of the dualization is to convert the original BF theory (3.1) (supplemented by standard kinetic terms) into a Stückelberg theory written in terms of the combination Dφ 0 = dφ 0 −k A 1 . In the deep IR, the 1-form gauge field A 1 and the 0-form gauge field dφ 0 are subject to the constraint Dφ 0 = 0, or The gauge field k A 1 is pure gauge, because it is given in terms a globally defined closed 1-form dφ 0 with periods that are quantized in units of 2π. Crucially, this does not mean that A 1 is trivial. Instead, A 1 is a flat gauge field that is allowed to have non-trivial holonomies that are k-th roots of unity. These features show that the pair (A 1 , φ 0 ) subject to the constraint (5.21) describes a background 1-form Z k gauge field, as in [25,32]. 14 In the process of dualizing c 3 to φ 0 , the BF term k A 1 ∧ dc 3 is removed. As a result, the anomaly polynomial (5.7) does not contain c 3 nor A 1 . This is consistent with the global symmetries of the theory in case (a): we have a global 0-form Z k symmetry from A 1 , but no global symmetry from c 3 , and thus no mixed anomaly between the two. Moreover, since (5.7) lacks mixed terms between F 2 , γ 4 , and the other field strengths, there are no mixed anomalies between the 0-form Z k symmetry and other symmetries.
Similar remarks apply to case (b), in which we assign Dirichlet boundary conditions to c 3 . In this situation we dualize A 1 to φ 2 , and we impose the constraint Thus, the pair (c 2 , φ 2 ) models a 3-form gauge field for a Z k symmetry. The B 2i , B i 2 system is studied in a similar way.
The setup with wrapped M5-branes probing a Z 2 singularity is considerably richer. Let us focus on the fields A 1 , c 3 , and let us impose Dirichlet boundary conditions on A 1 . In the total anomaly polynomial (5.9) we can collect all terms with a γ 4 factor, where we have recalled that N α F α 2 = k F 2 . The dualization of c 3 yields a 0-form gauge field φ 0 as before. The analog of the constraint (5.21) reads now In the previous expression, A ff 1 denotes the 1-form gauge field whose field strength satisfies If G is a finite group, giving a connection on a principal G-bundle over M4 is the same as specifying an element of Hom(π1(M4), G). For the case at hand G = Z k is Abelian, and therefore (by Hurewicz theorem) we can equivalently consider Hom(H1(M4), Z k ). The pair (A1, φ0) determines indeed an element of Hom(H1(M4), Z k ), because the holonomies of A1 for any 1-cycle are in Z k ⊂ U (1), and only depend on the homology class of the 1-cycle because A1 is flat. If external spacetime M4 has no torsion in homology, we also have Hom(H1(M4), Z k ) ∼ = H 1 (M4, Z k ) from the universal coefficient theorem.
More precisely, the 0-form gauge fields a ± 0i , a i± 0 can be modeled by elements of the differential cohomology groupȞ 1 (M 4 ). In differential cohomology a well-defined notion of product exists, which mapsȞ 1 (M 4 ) ×Ȟ 1 (M 4 ) toȞ 2 (M 4 ). In other words, to a pair of 0-form gauge fields one can associate a 1-form gauge field, see appendix D for further details. It is in this sense that A ff 1 is constructed from a ± 0i , a i± 0 . The relation (5.24) should be interpreted as a relation between elements ofȞ 2 (M 4 ). If we take the field strength of both sides, we get an equation for differential 2-forms, This relation is one of the equations of motions of the topological theory defined by (5.9), or equivalently one of the tadpole constraints on E 2 4 + 2 X 8 . The 2-form equation (5.26) can be integrated on any 2-cycle in spacetime. Since F 2 has periods that are quantized in units of 2π, we learn that dA ff 1 has periods that are quantized in units of 2π k. This indicates that we can introduce a new 1-form gauge field A 1 defined as and that dA 1 has periods that are quantized in units of 2π. It should therefore be possible to model A 1 with an element ofȞ 2 (M 4 ). The new gauge field A 1 satisfies Therefore, the pair (A 1 , φ 0 ) describes a background gauge field for a Z k 0-form symmetry.
We can now go back to the anomaly polynomial (5.9). Dualization of γ 4 has removed all terms with a γ 4 factor. There are several other terms, however, that contain A 1 . We rewrite these terms using (5.27) to trade A 1 for A 1 and A ff 1 . After this rewriting, we find terms with dA 1 , for example the term where n is an integer 't Hooft anomaly coefficient. The 2-form dA 1 is zero: how should (5.29) be interpreted? We regard the 6-form I inflow 6 as the field strength of a U (1) 5-form gauge field, modeled by an element ofȞ 6 (M 6 ). The wedge product in (5.29) is reinterpreted as the product in differential cohomology. The second Chern class c ϕ 2 admits a natural extension in differential cohomology and defines an element ofȞ 4 (M 4 ). A more detailed discussion of this point can be found in appendix D. The 1-form gauge field A 1 is thought of as an element of H 2 (M 4 ). Their product is thus an element inȞ 6 (M 6 ). Even though the field strength of this element ofȞ 6 (M 6 ) is zero (because A 1 is flat), this object is still non-trivial. It encodes a non-zero 't Hooft anomaly between the the discrete Z k 0-form symmetry and the SU (2) ϕ symmetry.
The ideas outlined in the previous paragraphs can also be applied to the B 2i , B i 2 system. For example, if we assign Dirichlet boundary conditions to B 2i (for each label i), we have to collect all terms in (5.9) with H i 3 an dualize B i 2 to a 1-form gauge field φ 1i . We obtain a Stückelberg-like system that enforces a constraint of the form The quantity B comp 2i is a composite 2-form gauge field, whose field strength satisfies As in the case of A ff 1 , the object dB comp 2i is best thought of as a sum of products in differential cohomology of 1-form and 0-form gauge fields. The relation (5. The dualization of B i 2 to φ 1i has removed all terms with H i 3 from (5.9). There are other terms containing B 2i , however. We rewrite such terms trading B 2i for B 2i . As before, the terms that contain dB 2i encode mixed 't Hooft anomalies between the "electric" (Z N ) g 1-form symmetry and other symmetries of the field theory.
In appendix E we present a case study for a detailed analysis of the anomalies, along the lines explained in the previous paragraphs. In particular, we give the full anomaly polynomial in the case in which we assign Dirichlet boundary conditions to A 1 and B 2i . We find a rich variety of mixed anomalies involving the Z k 0-form symmetry, the (Z N ) g 1-form symmetry, and the continuous symmetries of the system, see (E.18)-(E.21). The terms in the anomaly polynomial that involve dA 1 and dB 2i have the following structure, In the previous expression we have made use of the notation introduced in (2.8), in which the indexα refers to the continuous U (1) 2 symmetry associated to two out of the three vectors coming from expansion of C 3 onto cohomology classes. The explicit expressions of the anomaly coefficients a 1 , . . . , a 22 can be read off from (E.18)-(E.21). Among the various terms in (5.33) we notice in particular: terms that are cubic and quadratic in dA 1 ; the term p 1 (T ) dA 1 describing a mixed discrete-gravitational anomaly; the last term in (5.33) which mixes the two discrete symmetries with a continuous axionic "(−1)-form symmetry". In closing this section, let us comment on boundary conditions of type (c) or (c ). Intuitively speaking, in case (c) only a part of the field c 3 should be dualized to φ 0 , and a part of A 1 should be dualized to φ 2 . More precisely, we expect a difficulty in using a Lagrangian formalism to describe this case, analogous for instance to the difficulties that one encounters in formulating a 4d U (1) gauge theory with both the electric and magnetic photon in the Lagrangian. Even though we are not able to describe the dualization from BF form to Stückelberg form with the same level of detail as in cases (a) and (b), we can still give an interpretation of (5.9) in terms of 't Hooft anomalies for discrete symmetries. As already anticipated in section 3.2.1, the term k F 2 γ 4 describes a mixed anomaly between the Z m 0-form symmetry and the Z m 2-form symmetry. By a similar token, all terms involving F 2 signal non-zero 't Hooft anomalies between the Z m 0-form symmetry and the other symmetries in the system, and similarly for terms with γ 4 . Analogous remarks apply to B 2i , B i 2 . As in the case studied in appendix E, we find a rich structure of mixed 't Hooft anomalies.

Singletons and 't Hooft anomalies
A better understanding of the decoupled sector of the 4d field theory is crucial to obtain a detailed prediction for the anomalies of the interacting CFTs of interest. The holographic dictionary suggests a general strategy to extract information about the decoupling modes on the field theory side from the gravity side: one has to study the singleton modes that propagate on the conformal boundary of M 5 × w M 6 .
Let us consider the setup with a stack of M5-branes wrapped on a Riemann surface. In this case we know the decoupling modes on the field theory side. They are obtained from dimensional reduction on Σ g of a free 6d N = (2, 0) tensor multiplet, which corresponds to the center-of-mass degrees of freedom of the M5-brane stack. Our goal is to compare the set of decoupled fields with singleton modes in M 5 × w M 6 , where M 6 is the internal space of BBBW solutions.
The dimensional reduction of a free 6d N = (2, 0) tensor multiplet on a genus-g Riemann surface with twist parameters p, q is discussed in appendix F. Recall that, for any values of p, q, the internal space has a U (1) 1 × U (1) 2 isometry. We find the following 4d N = 1 multiplets: g vector multiplets: A µ (0, 0) , λ (1, 1) ; one chiral multiplet:  In the above expressions, K is the canonical bundle of Σ g (we are assuming g = 1, see appendix F for the case g = 1). The scalars Φ, b 0 are real, while Q, Q are complex. The spinors λ, ψ, Λ, Λ are Weyl spinors of positive chirality. For each field, we have included its U (1) 1 × U (1) 2 charges. The combination U (1) 1 + U (1) 2 is an R-symmetry, while U (1) 1 − U (1) 2 is a flavor symmetry.
The multiplicities and the U (1) 1 × U (1) 2 charges of the free fields listed in (5.34) are such that their combined 't Hooft anomalies match exactly with the dimensional reduction on Σ g of the 8-form anomaly polynomial of a free 6d N = (2, 0) tensor multiplet, as expected. Notice that the anomalies only depend on the difference h 0 (K p p+q ) − h 0 (K q p+q ), which is fixed by the Riemann-Roch theorem, see appendix F.
How are the free fields in (5.34) identified with singleton modes on M 5 × w M 6 ? The g vectors A µ (we omit the degeneracy label) are identified with the g singleton 1-form gauge field associated to the BF coupling N B i 2 ∧dB 2i . In a similar way, the real scalar b 0 is identified with the singleton 0-form gauge field associated to the BF coupling k A 1 ∧ dc 3 . The origin of the other scalar modes and of the fermions is different. These fields are identified with suitable Kaluza-Klein modes of 11d supergravity on M 5 × w M 6 , whose internal wavefunction is such that they are pure gauge in the bulk of M 5 , but propagate on the conformal boundary ∂M 5 . We may refer to these modes as Kaluza-Klein singletons. They are well-understood for the AdS 5 × S 5 solution in type IIB supergravity [49].
As we can see from (5.34), the Kaluza-Klein singletons Φ, λ, ψ sit in supermultiplets that contain the BF singletons. The existence and charges of these Kaluza-Klein singletons can be easily determined by counting BF singletons (which are neutral under U (1) 1 × U (1) 2 ) and using 4d N = 1 supersymmetry. In contrast, the chiral multiplets (Q, Λ) and ( Q, Λ) do not contain BF singletons. It follows that to verify the existence, charges, and multiplicities of these Kaluza-Klein singletons we cannot rely on a simple counting of BF terms, and we rather have to perform a direct analysis of the Kaluza-Klein spectrum.
The situation is different if we specialize to g ≥ 2, q = 0, i.e. the N = 2 Maldacena-Nuñez solution. The U (1) 1 isometry enhances to SU (2) 1 and the internal space M 6 contains a round S 2 . The free fields in (5.34) can be reorganized into 4d N = 2 multiplets, g vector multiplets: For each field we have indicated its SU (2) 1 representation and U (1) 2 charge. The triplet of real scalars Q comes from combining the complex scalar Q and the real scalar Φ in (5.34), while the fermion λ comes from λ, Λ, and the fermion ψ comes from ψ, Λ. It is clear from (5.35) that in this 4d N = 2 setup all Kaluza-Klein singletons are related to BF singletons by supersymmetry. Thus, the existence, charges, and multiplicities of the Kaluza-Klein singletons can be easily inferred from counting BF singletons and exploiting 4d N = 2 supersymmetry. If we consider the setup with wrapped M5-branes probing a Z 2 singularity, the task at hand it to identify singleton modes for GMSW solutions on the gravity side. A subset of these modes is easily identified: a real 0-form BF singleton b 0 and a set of g real 1-form BF singletons A µ . These fields are neutral under the SU (2) ϕ flavor symmetry and the U (1) ψ isometry, which is an R-symmetry. 15 Exploiting 4d N = 1 supersymmetry, we predict the following multiplets of singleton modes in GMSW, g vector multiplets: We have indicated the SU (2) ϕ representation and the U (1) ψ charge. (All these fields are neutral under the baryonic U (1) 2 symmetry.) In analogy with (5.34), we expect additional chiral multiplets of Kaluza-Klein singletons, whose charges and multiplicities cannot be inferred from the BF terms alone. To identify these chiral multiplets, we need to perform a more detailed study of the Kaluza-Klein spectrum of GMSW solutions. We plan to address this problem in future work. It should be stressed, however, that we do not expect Kaluza-Klein singletons to exhaust the entire set of singleton modes for these geometries. This expectation is based on analogy with D3-brane setups in type II string theory. As pointed out in [24], if we consider type IIB supergravity on AdS 5 × T 1,1 , we only see one vector BF singleton (coming from the term B 2 ∧ dC 2 , where B 2 in the NSNS 2-form and C 2 is the RR 2-form). On the other hand, the worldvolume theory on the D3-branes is a U (N ) × U (N ) quiver theory (with superpotential) in which the two U (1)'s in U (N ) × U (N ) decouple in the IR. The overall U (1) is identified with the BF vector, but the relative U (1) does not appear to have an obvious singleton interpretation within the supergravity approximation. The geometry AdS 5 × T 1,1 can be regarded as originating from blow-up of a Z 2 orbifold singularity. This feature is qualitatively similar to our interpretation of the smooth GMSW solutions in terms of a blow-up of the C 2 /Z 2 singularities at the north and south poles of S 4 . For this reason, we expect that, in order to capture all decoupling modes on the worldvolume theory of the M5-brane stack, one has to analyze singleton modes beyond the supergravity approximation, including stringy modes. This program could give an exact answer for the decoupled modes, which, combined with inflow, would yield the exact anomaly of the interacting SCFT, including O(1) terms.

Outlook
The problems studied in this work suggest several directions for future research. For instance, a systematic analysis of topological boundary conditions for the BF theory N B i 2 ∧ dB 2i , including the action of the duality group Sp(2g, Z), has not been performed. Such a study has the potential of furnishing an organizing principle for the classification of line operators in 4d SCFTs engineered with M5-branes, with either N = 2 or N = 1 supersymmetry.
Another problem that deserves further analysis is the computation of the partition function vector of the singleton modes in a setup with wrapped M5-branes. The full partition function from the gravity side is expected to take the form (5.20), where the vector Z β encodes the contribution of interacting bulk modes (and is dual to the partition function vector of an interacting SCFT), while Z singleton β is the partition function vector of singleton modes. The latter is computable following the methods of [40,41]. The action of Sp(2g, Z) on the conformal blocks Z β of the interacting SCFT can be determined from its action on Z singleton β . One may then explore the interplay between the duality group and 't Hooft anomalies for various global symmetries.
We have observed that BF couplings in the bulk 5d topological theory account for a set of singleton modes on the gravity side. On the other hand, additional singleton modes are present, which do not originate from BF terms. In general N = 1 setups, supersymmetry is not sufficient to determine all singleton modes starting from BF singleton modes. It would be beneficial to perform a systematic study of singleton modes in string/M-theory compactifications, especially in setups with lower amounts of supersymmetry. On the basis of the holographic dictionary, it is expected that singleton modes on the gravity side should account for all modes that decouple in the IR on the field theory side. A detailed knowledge of decoupling modes can provide access to precision holography, allowing for example for a computation of exact anomalies, beyond the large-N limit, including O(1) terms. The role of singleton modes in holographic flows is also worth analyzing further.
It is natural to wonder how the results of this paper would be modified by the inclusion of punctures on the Riemann surface. In order to address this question in a more systematic way, a better understanding of punctures for 4d N = 1 theories engineered with M5-branes would be useful. With regards to N = 1 regular punctures for 6d (2, 0) theories of type A N −1 on a Riemann surface, our expectation is that there should be no mixed anomalies between the continuous 0-form flavor symmetries at the punctures and the discrete and higher-form symmetries of the system. On the other hand, we anticipate a much richer structure in setups with M5-branes probing a Z 2 singularity and wrapped on the Riemann surface with punctures.
Finally, it would be useful to extend the discussion of symmetries and anomalies in geometric engineering, including other possible sources of internal discrete symmetries (such as discrete isometries of the internal space or torsion cycles [33,34]), as well as spacetime discrete symmetries (such as parity or time reversal).

A A change of basis
In this appendix we consider an internal space M 6 with n := b 2 (M 6 ) ≥ 2. The lattice H 2 (M 6 , Z) free is preserved by the action of SL(n, Z). In terms of the closed 2-forms ω 2α , we can consider a change of basis of the form This linear transformation is accompanied by transformations on the closed 4-forms Ω α 4 , as well as on the basis C α 2 of 2-cycles in M 6 , and the basis C 4 α of 4-cycles in M 6 . In order to preserve the relations M 6 ω 2α ∧ Ω β 4 = δ β α , C α 2 ω 2β = δ α β , and C 4 α Ω β 4 = δ β α , we must set The ansatz (2.3) for G 4 contains the terms A α 1 ∧ ω 2α and N α Ω α 4 . As a result, the linear transformation (A.1) induces a linear transformation for the external 1-form gauge fields and flux quanta, To proceed, we define the integers k and m α via the relations It can then be shown that a matrix M ∈ SL(n, Z) exists, such that This can be argued as follows. The integers {m α } n α=1 are relatively prime. There must exist labels α 1 , α 2 ∈ {1, . . . , n}, α 1 = α 2 , such that m α 1 and m α 2 are relatively prime. After reordering {m α } n α=1 if necessary, we can take α 1 = 1, α 2 = 2. We may then consider the following matrix, This is why this basis is best suited to study the topological terms in the 5d action.

B Cohomology classes and gauging of isometries
In this appendix we study non-trivial cohomology classes of the internal space M 6 for BBBW solutions and GMSW solutions. To compute the full inflow anomaly polynomial, we need to activate background gauge fields for the isometries of M 6 . After turning on these gauge fields, the relevant spacetime is denoted M 12 and is of the form where M 6 denotes external spacetime. For the purposes of computing anomalies in the descent formalism, we take X 6 to be Euclidean and six-dimensional. We discuss representatives for cohomology classes in M 6 and their counterparts in M 12 . We suppress wedge products throughout this appendix.

B.1.1 Cohomology classes in M 6
In the BBBW solutions, the internal space M 6 is topologically an S 4 fibration over a genus-g Riemann surface Σ g . We refer to [15] for the full expression of the metric on M 6 . For the purposes of this work, we can use the following simplified line element on M 6 , which captures the topology and isometries of the metric in [15], .
The angles φ 1 , φ 2 have periodicity 2π and ds 2 (Σ g ) denotes the metric on Σ g with constant curvature κ ∈ {0, 1, −1}. We have also introduced three constrained coordinates µ 0 , µ 1 , µ 2 , satisfying We use B 2 to denote the 2d space parametrized by µ 0 , µ 1 , µ 2 . The total space of the S 1 φ 1 ×S 1 φ 2 fibration over B 2 is an S 4 . We refer to the points µ 0 = ±1 as the north and south poles of S 4 , respectively. The space B 2 is depicted schematically in figure 2. The space M 6 admits one integral 4-homology class. A representative is obtained by considering the 4-cycle C 4 that is obtained by taking the S 4 fiber on top of a generic point on the Riemann surface. Correspondingly, there is one non-trivial 4-cohomology class on M 6 . We represent it by a closed but not exact 4-form ω 4 , which integrates to 1 on the C 4 cycle, The closed 4-form ω 4 is parametrized as follows, Figure 2: Schematic depiction of the space B 2 described by the constrained coordinates (B.3) with line element dµ 2 0 + dµ 2 1 + dµ 2 2 . We have also indicated the orientation of ∂B 2 used throughout this appendix.
In the above expression, h 2 is a 2-form on B 2 , while h 1,2 1 are 1-forms on B 2 . Closure of ω 4 requires It follows that d(h 1 1 + h 2 1 ) = 0 and therefore (since B 2 has trivial cohomology) there exists a 0-form h 0 such that Without loss of generality, we can take h 0 to satisfy where the superscript N, S means evaluation at µ 0 = ±1, respectively. The 1-forms h 1 1 , h 2 1 satisfy additional requirements that ensure the regularity of ω 4 . In particular, we must demand that h 1 1 be zero if restricted to the locus {µ 1 = 0} ⊂ B 2 , and similarly for h 2 1 , This is due to the fact that S 1 φ 1 shrinks along µ 1 = 0, and similarly for S 1 φ 2 . We also have to impose (B.4), In the first step we have integrated over φ 1 , φ 2 . In the second step we used (B.6). The boundary ∂B 2 consists of the arcs {µ 1 = 0} and {µ 2 = 0}, with a relative minus due to orientation, see figure 2. We conclude recalling (B.9) and (B.7). We learn that (h 0 ) N −(h 0 ) S = 1, which, combined with (B.8), yields Poincaré duality implies that the space M 6 admits one non-trivial 2-cohomology class. It can be represented by a closed but not exact 2-form ω 2 , normalized in such a way that M 6 Ω 4 ω 2 = 1 . (B.12) We parametrize ω 2 as where H 1 0 , H 2 0 are 0-forms on B 2 . We might have included an additional term ∆ω 2 = (const) V Σ , but such term can always be reabsorbed by redefining H 1 0 or H 2 0 . (We do not consider the case p = 0 = q because it does not correspond to a smooth M-theory solution.) The 0-forms H 1 0 , H 2 0 satisfy additional requirements that ensure regularity of ω 2 . In particular, regularity the term dH 1 0 ∧ Dφ 1 implies that the function H 1 0 restricted to {µ 1 = 0} must be a constant. Similarly, H 2 0 restricted to {µ 2 = 0} must be a constant, Since we can connect the north and south poles with either the arc {µ 1 = 0} or {µ 2 = 0}, we conclude that the values of H 1 0 , H 2 0 at the poles are equal, Next, let us consider the integral in (B.12). It can be computed with manipulations similar to those in (B.10). The result is Next, let us discuss 1-cohomology classes on M 6 . The Riemann surface admits 2g independent non-trivial 1-cohomology classes, which are represented by closed but not exact 1-forms λ 1u , u = 1, . . . , 2g. These 1-forms can be pulled back to the total space M 6 , yielding 1-forms that we still denote λ 1u and that are still closed. It can be checked that they are not exact in M 6 , and that they furnish representatives for all 1-cohomology classes of M 6 . The associated 1-cycles on M 6 are realized by taking a 1-cycle on the Riemann surface, at the point µ 0 = 1, where both S 1 φ 1 and S 1 φ 2 shrink. (Choosing µ 0 = −1 yields 1-cycles in M 6 that are homologous to those at µ 0 = 1.) Finally, the space M 6 admits no 3-cohomology class and no 3-cycles.

B.1.2 Inclusion of background gauge fields for isometries
The background gauge fields for the U (1) 1 × U (1) 2 isometry are denoted A φ 1 , A φ 2 , with field strenghts F φ 1 = dA φ 1 , F φ 2 = dA φ 2 . After turning on A φ 1 , A φ 2 we introduce the 1-forms The periods of the field strengths F φ 1 , F φ 2 are quantized in units of 2π and we have 16 In the case g = 0, the Riemann surface is a round 2-sphere and the space M 6 admits an additional SO(3) Σ ∼ = SU (2) Σ isometry. We find it convenient to describe the 2-sphere as the locus y a y a = 1 in R 3 , where a = 1, 2, 3 is a vector index of SO(3) Σ . One can verify that the following 1-forms on M 6 are dual to Killing vectors in the metric (B.2), In other words, the SO(3) Σ isometry of the Riemann surface extends to an isometry of the total space M 6 for any value of p, q. We couple the SO(3) Σ isometry to a triplet A a of external gauge fields. Our conventions are After turning on A a , the volume form V Σ on the Riemann surface in (B.18) must be replaced with the global angular form of SO(3) Σ , and in particular S 2 e Σ 2 = 1 in our normalization. In writing the inflow anomaly polynomial below, we find it convenient to replace p 1 (SO(3)) Σ with the second Chern class of SU (2) Σ , according to After activating the gauge fields for isometries of M 6 we are effectively considering the auxiliary 12 space M 12 in (B.1). We have to discuss how the closed forms ω 4 , ω 2 , λ 1u extend to closed forms (ω 4 ) eq , (ω 2 ) eq , (λ 1u ) eq on M 12 . We start by noting that the 1-forms λ 1u are unaffected by the gauging of the isometry U (1) 1 × U (1) 2 . Since they are only present for g = 0, the SO(3) Σ isometry plays no role. 17 We conclude that we do not need to modify λ 1u in any way after gauging the isometries of M 6 , (λ 1u ) eq = λ 1u .
(B.25) 16 The normalization of A φ 1 , A φ 2 in (B.18) can be checked by matching anomaly inflow with the know anomaly polynomial of the 4d SCFT. 17 One might wonder if, in the case g = 1, the isometries of the T 2 base extend to isometries of M6. We have checked that, contrary to the g = 0 case, for p = 0 one cannot find globally-defined Killing vector fields on M6 that reduce to the Killing vectors on the base T 2 .
Next, let us consider the 2-form (ω 2 ) eq . It can be written as This is manifestly closed and gauge-invariant. It is also globally defined, and reduces to ω 2 if all background gauge fields for isometries of M 6 are turned off. The 2-form (ω 2 ) eq in M 12 should have integral periods. In particular, we may consider a 2-cycle in external spacetime, sitting at µ 0 = ±1 and a generic point on the Riemann surface in M 6 . We have defined (ω 2 ) eq in such a way that its integral over such cycles is zero. Indeed, the relevant terms are .27) and the relation (B.15) implies that the prefactors of F φ i vanish both at µ 0 = 1 and µ 0 = −1.
We conclude with two remarks. First, in the case g = 0 the background gauge fields for SO(3) Σ are implicitly included in (B.26) and (B.28) inside the 1-forms Dφ i . Second, the forms (ω 2 ) eq , (ω 4 ) eq are not the only possible choices of a closed and gauge-invariant completion of ω 2 , ω 4 . As argued in appendix C, however, any other choice leads to equivalent results for the inflow anomaly polynomial.

B.1.3 Computation of the inflow anomaly polynomial
Our first task is the computation of − 1 6 M 6 E 3 4 , where E 4 is given by To compute the integral M 6 E 3 4 , we first collect terms with exactly one Dφ 1 and one Dφ 2 factor. The integral over the Riemann surface for g = 0 is straightforward; in the case g = 0, we perform it with the help of the Bott-Cattaneo formula (B.23). We are left with an integral over B 2 . It is performed in a similar way as in (B.10). More precisely, the integrand 2-form is cast as a total derivative of a 1-form on B 2 . Applying Stokes' theorem, we reduce the problem to an integral over the two arcs {µ 1 = 0}, {µ 2 = 0}, with a relative minus sign. In the computation, we make use of (B.6), (B.7), (B.9), (B.11), (B.14), (B.15), and (B.17). The result reads We have used the relation (B.24) and we have written final expression in the notation introduced in the main text.
To proceed, we need the 8-form class X 8 , defined in (2.4). The computation of X 8 for BBBW setups is reviewed e.g. in [22]. One finds The exact line element on M 6 in recorded in [28]. For the purposes of this appendix, we can use the schematic line element in (2.20) without a detailed knowledge of the f functions. We can define the following 4-cycles in M 6 , We recall that S 2 ψ is the two-dimensional space spanned by the angle ψ and the µ interval, with topology of a two-sphere and isometry U (1) ψ . The 4-cycles C 4 N , C 4 S , C 4 C , C 4 Σ define elements in the integral 4-homology of M 6 . They are not all independent, however, since the following relation holds in homology, The above can be verified by checking that the linear combination of 4-cycles on the LHS yields integral zero when paired with an arbitrary closed 4-form on M 6 . The relation (B.33) implies that C 4 N − C 4 S represents an even 4-homology class. (The Euler characteristic χ is always an even integer.) The class C 4 N + C 4 S = (C 4 N − C 4 S ) + 2 C 4 S is therefore also an even class. This observation allows us to choose the following basis of integral 4-homology, We can check that C 4 N , C 4 S , C 4 C , and C 4 Σ can all be written as linear combinations of C 4 α with integer coefficients.
To each 4-homology class C 4 α there is a corresponding 4-cohomology class, which can be represented by a closed but not exact 4-form Ω α 4 . The 4-forms Ω α 4 are parametrized as where C α is constant and U ϕ , U Σ are functions of µ only, satisfying We demand the standard pairing C 4 α Ω β 4 = δ β α between 4-homology and 4-cohomology classes. This fixes the values of U ϕ (µ N ), U Σ (µ N ), C α , To each 4-homology class C 4 α there is also a Poincaré dual 2-cohomology class, which we represent by a closed but not exact 2-form ω 2α . The parametrization of ω 2α reads where t ϕ α , t Σ α are constants and H α is a function of µ only, satisfying We impose the relation M 6 Ω α 4 ω 2β = δ α β to fix the values of H α (µ N ), t ϕ α , and t Σ α , We can define the following five 2-cycles inside M 6 , C ϕ,N 2 : S 2 ϕ at µ = µ N and at a point on Σ g , C ϕ,S 2 : S 2 ϕ at µ = µ S and at a point on Σ g , C Σ,N 2 : Σ g at µ = µ N and at a point on S 2 ϕ , C Σ,S 2 : Σ g at µ = µ S and at a point on S 2 ϕ , C fiber 2 : the S 2 ψ fiber at a point on the base S 2 ϕ × Σ g .

(B.41)
They all correspond to elements in the integral 2-homology of M 6 , but they satisfy two linear relations in homology, The previous relations can be checked by pairing the combinations of 2-cycles with an arbitrary closed 2-form on M 6 . It is convenient to use a basis of integral 2-homology C α 2 such that C α 2 ω 2β = δ α β . One can check that such a basis is given by Moreover, we verify that all the five 2-cycles defined in (B.41) can be written as integral linear combinations of the basis 2-cycles C α 2 . Let us now discuss 3-cycles in M 6 . We can define several 3-cycles in terms of the 1cycles on the Riemann surface. Let Ω uv denote the inverse of the intersection pairing Ω uv , with the convention Ω uv Ω vw = −δ w u .
Since Ω uv is integral and unimodular, so is Ω uv . From Σg λ 1u λ 1v = Ω uv = C Σ 1u · C Σ 1v , we see that a basis of 1-cycles C Σu 1 with C Σu 1 λ 1v = δ u v is given by C Σu 1 = Ω uv C Σ 1v . We use these 1-cycles on the Riemann surface to construct 3-cycles in M 6 , S 2 ψ fibered over C Σu 1 at a point on S 2 ϕ .

(B.44)
These 3-cycles represent integral 3-homology classes, subject to the relations In total, we have 4g independent 3-homology classes. The above relation implies that C Nu 3 −C Su 3 is an even 3-homology class. The class C Nu 3 + C Su 3 = (C Nu 3 − C Su 3 ) + 2 C Su 3 is also even. It follows that the following classes are integral, We use them as a basis of 3-homology, Notice that C Nu 3 , C Su 4 , and C ψu 3 can all be written as linear combinations of C x 3 with integer coefficients.
The 3-cohomology classes dual to the 3-homology classes C x 3 can be represented by closed but not exact 3-forms Λ 3x . We parametrize them as follows, where λ 1u are the harmonic 1-forms on the Riemann surface, pulled back to M 6 , and S ± are functions of µ only. If we demand C x 3 Λ 3y = δ x y we derive The pairing K xy defined in (2.7) takes the form and is antisymmetric and unimodular. Finally, we may compute the intersection numbers K xvα in (2.7). The only non-zero components of K xvα are

B.2.2 Inclusion of background gauge fields for isometries
For g ≥ 2, the isometry group of To describe the isometries of ds 2 (S 2 ϕ ) = dθ 2 + sin 2 θ dϕ 2 it is convenient to introduce three constrained coordinates yãỹã = 1 ,ỹã = (sin θ cos ϕ, sin θ sin ϕ, cos θ) ,ã = 1, 2, 3 . It is the closed and gauge-invariant completion of V ϕ /(2π) and satisfies Bott-Cattaneo identities analogous to (B.23). The 2-form e Σ 2 is understood in different way depending on g ≥ 2 or g = 0: for g ≥ 2 it is simply proportional to the volume form V Σ , while for g = 0 it is the global angular form of SO(3) Σ , The anomaly polynomial will be written in terms of the second Chern classes of SU (2) Σ and SU (2)  Let us now turn to a discussion of the extension of the closed 4-forms Ω α 4 on M 6 to closed 4-forms (Ω α 4 ) eq on M 12 . We define and we verify that (Ω α 4 ) eq are globally defined, closed 4-forms on M 12 with integral periods. By a similar token, the 2-forms ω 2α on M 6 extend to the 2-forms (ω 2α ) eq , defined as (B.60) The 1-forms λ 1u are unaffected by the gauging of the U (1) ψ × SU (2) ϕ isometry, Finally, the 3-forms Λ 3u± on M 6 extend to the following 3-forms on M 12 ,

B.2.3 Computation of the inflow anomaly polynomial
Having defined the closed forms (Ω α 4 ) eq , (ω 2α ) eq , (Λ 3u± ) eq , and (λ 1u ) eq , we have a fully explicit expression for the quantity E 4 . The other ingredient for the computation of the inflow anomaly polynomial is the 8-form X 8 . Following [27], we can compute it using the following relations among Pontryagin classes, The computation of the integrals M 6 E 3 4 and M 6 E 4 X 8 is straightforward. After collecting the terms with exactly one Dψ factor, we can integrate over S 2 ϕ with the help of the Bott-Cattaneo formula. The integral over Σ g receives two contributions: terms with an odd power of e Σ 2 (treated with the Bott-Cattaneo formula), and terms with exactly two λ 1u factors (treated using Σg λ 1u λ 1v = Ω uv ). We are left with a one-dimensional integral over the µ interval, which is evaluated making use of (B.37), (B.40), and (B.49). The final result is recorded in the main text.
Let us conclude with a comment on the large N limit. We define this limit by letting the three flux quanta N α scale in the same way, N α ∼ O(N ), with fixed ratios N α /N β for α = β. We assign scaling N 0 to p 1 (T ) and to the background fields associated to isometries of M 6 , while we assign scaling N 1 to all external gauge fields originating from expansion of C 3 onto cohomology classes of M 6 . In this way, the O(N 3 ) terms in I inflow 6 all originate from the E 3 4 term in I 12 , while the O(N ) terms originate from E 4 X 8 .
Suppose that M 6 admits a collection of Killing vectors k m I , with m = 1, . . . , 6 a curved tangent index on M 6 , and I labeling a basis of Killing vectors. The latter obey the Lie algebra where £ denotes Lie derivative. The fibration in (5.1) includes arbitrary background gauge fields associated to the isometries of the M 6 fiber. These gauge fields are 1-form gauge fields on the base M 6 . We refer to the operation of turning them on as gauging. In terms of local coordinates ξ m on the M 6 fiber, the gauging is conveniently described by the replacement where A I is the external gauge field associated to the Killing vector k m I . In our conventions, the field strength F I of A I reads (we suppress wedge products throughout this appendix) Let ω q be a q-form on M 6 , where the components ω m 1 ...mq depend only on the coordinates ξ m on M 6 . We use the symbol (ω q ) g for the gauged version of ω, obtained by means of the replacement (C.2), where ι I denotes the interior product of the vector k m I with a differential form. If we choose a metric on M 6 , we can select the harmonic representatives for the de Rham classes defined by Ω α 4 , ω 2α , Λ 3x , λ 1u . A harmonic form is automatically invariant under all isometries of M 6 . 18 This means that (after adding suitable exact forms, if necessary) we can take the closed forms Ω α 4 , ω 2α , Λ 3x , λ 1u to be invariant under all isometries of M 6 , It follows that the forms ι I λ 1u , ι I ω 2α , ι I Λ 3x , ι I Ω α 4 are closed. We may then write where c uI , c α u I , c x α I , c αx I are constants. For example, we have observed that 2π ι I ω 2α is a closed 1-form, and that the de Rham classes of λ 1u furnish a basis of H 1 (M 6 , R). It follows there are suitable constants c α u I such that that the difference 2π ι I ω 2α − c α u I λ 1u is exact. Similar remarks apply to the other expressions in (C.8). The forms ω 0αI , Λ 1xI , Ω α 2I are only defined modulo addition of a closed form. Without loss of generality, they can be taken to satisfy Symmetrizing in IJ and using (C.8) we derive If we integrate the second relation on a non-trivial 1-cycle in M 6 , only the term with λ 1u contributes. It follows that its coefficient must be zero. Similar remarks apply to the third line. We conclude that the constants c satisfy It follows from (C.10) that the forms 2π ι (I Λ 1x|J) − c x α (I ω 0α|J) and 2π ι (I Ω α 2|J) − c αx (I Λ 1x|J) are closed. We can therefore write 18 For example, if ω2 is a harmonic 2-form, the fact that £I ω2 = 0 can be seen as follows. From dω2 = 0 we derive £I ω2 = d(ιI ω2). Making use of ∇ (m k I|n) = 0 and ∇ m ωmn = 0, we verify (£I ω2)mn = ∇ p (kI ∧ ω2)pmn.
We have thus established that the 2-form £I ω2 is both exact and co-exact. It follows that M 10−d (£I ω2) * (£I ω2) = 0 (no sum over I), which in turn guarantees £I ω2 = 0.
where b xIJ and b αu IJ are constants and Ω α 0IJ are 0-forms, defined up to a constant. We can now write the forms (Ω α 4 ) eq , (ω 2α ) eq , (Λ 3x ) eq , (λ 1u ) eq . They are given by Making use of the identity (C.6), the Bianchi identity for F I , and the relations (C.8), (C.12) we compute For the spaces M 6 of interest in this work, all c and b constant vanish, and we verify closure of (Ω α 4 ) eq , (ω 2α ) eq , (Λ 3x ) eq , (λ 1u ) eq , as anticipated in the main text. If we were to study a setup with non-zero c or b constants, we could still make use of (5.5), but we would have to modify the Bianchi identities for the external field strengths, We leave further investigation of this case to future work. We noticed above that the forms Ω α 2I , Λ 1xI , ω 0αI are only defined up to addition of a closed form. We can parametrize this ambiguity by writing , ω 0αI = ω 0αI + ν αI (C.16) where the ν parameters are constant, and the Y forms can be taken to satisfy relations analogous to (C.9). Since we have a new Ω α 2I , we have to determine a new Ω α 0IJ , by solving the second relation in (C.12). For simplicity, we only consider the situation in which the c and b constants are zero. We can then write where τ α IJ are arbitrary constants. If we insert the primed objects into the expression of E 4 , we obtain a new realization of E 4 , denoted E 4 , The last line collects the total derivative of a globally defined 3-form on M 12 . Adding an exact piece to E 4 has no effect on the computation of I inflow 6 . We see that, up to this immaterial total derivative, E 4 has the same form as E 4 , if we perform a redefinition of the external gauge fields, Let us stress that the constants ν βα I , ν x u I , ν αI , τ α IJ are not completely arbitrary: they must be chosen in such a way that E 4 has integral periods. Let us assume that the normalization of the Killing vectors in (C.2) has been chosen in such a way that F I has periods that are quantized in units of 2π (here we are assuming an Abelian isometry group for simplicity). The ν and τ constants have to be chosen in such a way that It then follows that the redefinition (C. 19) preserves the lattice of periods of the external gauge fields. 19

D Aspects of differential cohomology
In this appendix we give a brief review of some basic aspects of differential cohomology. We follow a presentation based on Cheeger-Simons differential characters [52]. Introductions aimed at physicists can be found e.g. in [2,30].

Cheeger-Simons differential characters
A degree-Cheeger-Simons differential character χ on a manifold M is a group homomorphism χ ∈ Hom(Z −1 (M), U (1)) with the following property: there exists a globally defined -form 19 We notice that the field redefinitions for H u 3 and γ4 are non-linear. For example, the quantity can be regarded as the 3-form field strength of a "composite" 2-forms gauge field constructed from a x 0 and A I . This notion of product of a p-form gauge field and a q-form gauge field to yield a (p + q + 1)-gauge field can be made mathematically precise in the framework of differential cohomology, see appendix D.
F χ such that for all B ∈ C (M) . (D.1) The notation C (M) stands for the group of -chains in M, while Z −1 (M) denotes the group of ( − 1)-cycles. (Chains and cycles are understood in the context of smooth singular homology.) One can verify from the definition of χ that the -form F χ is uniquely determined, is closed, and has integral periods. The set of degree-Cheeger-Simons differential characters has a natural Abelian group structure. We find it convenient to adopt an additive notation, and write In this notation, χ = 0 means that χ associates 1 ∈ U (1) to every Σ −1 ∈ Z −1 (M). The group of degree-Cheeger-Simons differential characters is denotedȞ (M). (Contrary to ordinary cohomology groups,Ȟ (M) is usually infinite-dimensional.) The mathematical object χ models an ( − 1)-form U (1) gauge field, or more precisely, the equivalence class of an ( − 1)-form U (1) gauge field up to gauge transformations. To see this, we interpret the map χ : Z −1 (M) → U (1) as the map that to each ( − 1)-cycle in spacetime M assigns the holonomy of the gauge field on that cycle. The globally-defined, closed -form F χ with integral periods is identified with the field strength of the ( − 1)-form gauge field. (Notice that, in the main text, field strengths are normalized to have periods that are quantized in units of 2π.) The equation (D.1) encodes the expected physical relation between the holonomy of a gauge field along a boundary of a chain, and the flux of its field strength through that chain.
A differential character χ ∈Ȟ (M) determines uniquely an element a χ ∈ H (M, Z), called the characteristic class of χ. 20 The characteristic class a χ and the field strength F χ satisfy the following compatibility condition, The relation (D.3) might erroneously suggest that all interesting information about a χ is already contained in the field strength F χ . Crucially, however, the map forgets torsion: a χ is determined by F χ only up to torsion elements in integer cohomology, i.e. up to an element of Tor H (M, Z). This additional data encoded in a χ (and missed by F χ ) is particularly important if the spacetime manifold M has torsion in homology, as already emphasized for instance in [31].
A differential character χ is called topologically trivial if a χ = 0. It can be proven that a χ = 0 if and only χ can be written in terms of a globally defined ( − 1)-form A as In this case, F χ = dA and (D.1) follows from Stokes' theorem. Moreover, (D.3) is satisfied because [F χ ] dR = 0 (since F χ = dA and A is globally defined). A differential character χ is called flat if F χ = 0. It can be proven that flat characters are identified with elements of the (ordinary) cohomology group H −1 (M, U (1)). Interestingly, there exist flat but topologically non-trivial characters. Indeed, H −1 (M, U (1)) is a compact Abelian group that generically has more than one connected component. The connected component of the identity consists of characters that are both flat and topologically trivial (we may refer to them as Wilson lines). The connected components of H −1 (M, U (1)) are labeled by Tor H (M, Z). This fits with the fact that a χ for a flat character χ is an element of Tor H (M, Z) (this follows from (D.3) and F χ = 0).
Let us emphasize that χ ∈Ȟ (M) contains more information than its field strength F χ and its characteristic class a χ . In fact, F χ and a χ are unaffected if we shift χ by a Wilson line.
The language of differential characters offers a uniform way to describe U (1) p-form gauge fields, including 0-form fields. In fact, one can prove thatȞ 1 (M) is the same as the group of smooth maps from M to S 1 . This mathematical fact fits with the physics picture of a 0-form gauge field as a circle-valued scalar field.

Cheeger-Simons characters and Z k gauge fields
In section 5.1.3 we have encountered a constrained 1-form gauge field A 1 , subject to (5.21). If we describe the (gauge-equivalence class of the) 1-form gauge field A 1 with a differential character χ ∈Ȟ 2 (M), we have the correspondence k A 1 = dφ 0 ↔ k χ := χ + · · · + χ k times = 0 ∈Ȟ 2 (M) . (D.10) Indeed, we have argued that k A 1 = dφ 0 means that k A 1 is pure gauge. Since differential characters are gauge-equivalence classes of gauge fields, k A 1 is described by the zero character 0 ∈Ȟ (M). The equation k χ = 0 implies F χ = 0 , k a χ = 0 , χ(Σ 1 ) ∈ Z k ⊂ U (1) for all Σ 1 ∈ Z 1 (M) . (D.11) Crucially, k a χ = 0 does not imply a χ = 0, but merely that a χ is a k-torsion element in integer cohomology. Even if a χ = 0 (which is the case if M has no torsion in homology), the character χ can be non-zero: it is a Wilson line with holonomies in Z k ⊂ U (1) determined by a globally-defined closed 1-form. In physics terms, we may simply write A 1 = 1 k dφ 0 [25]. There exist other realizations of the differential cohomology groupsȞ (M), for instance in terms of Hopkins-Singer cocycles [53] or Deligne-Beilinson cocycles, see e.g. [32,54] for a review. Loosely speaking, in these formalisms one can model not only the gauge-equivalence class of a gauge field, but the gauge field itself. In these mathematical frameworks we can give a precise definition to A 1 and dφ 0 separately, and impose the relation k A 1 = dφ 0 . This approach is taken in [32] using Deligne-Beilinson cocycles.

Cheeger-Simons characters and characteristic classes
The notions of Chern classes, Pontryagin classes, Euler classes admit a natural generalization in the framework of differential cohomology. For definiteness, let us focus on Chern classes; analogous remarks hold for other characteristic classes. Our exposition follows [55].
Let V be a complex rank-n vector bundle over M, with structure group U (n), equipped with a hermitian fiber metric and a connection ∇ compatible with the fiber metric. The curvature of ∇ is the 2-form F ∆ on M. In our conventions, F ∆ is antihermitian. The Chern forms c k (∇) are defined via det I + i F ∇ 2π = 1 + c 1 (∇) + c 2 (∇) + . . . , c k (∇) ∈ Ω 2k Z (M) . (D.12) The 2k-form c k (∇) is closed and has integral periods. If we choose a different connection ∇ on the same vector bundle, the form c k (∇ ) is generically different from c k (∇), but they differ 2. Collect all terms with γ 4 and H i 3 and define new gauge fields A 1 , B 2i in such a way that these terms take the form As explained in section 5.1.3, we can then dualize c 3 and B i 2 to φ 0 , φ 1i , respectively. We get a Stückelberg-type theory for the pairs (A 1 , φ 0 ), (B 2i , φ 1i ) with constraints Thus A 1 is the background gauge field for the global Z k 0-form symmetry and B 2i is the background gauge field for the global (Z N ) g 1-form symmetry.
3. Remove all terms with γ 4 and H i 3 from I inflow 6 , and write the rest of I inflow 6 in terms of A ± 1 , A 1 , B 2i , a ± 0i , a i± 0 , p 1 (T ), and the background gauge fields for isometries of M 6 .
Let us address each step in turn. The field strengths of A 1 , A ± 1 are denoted F 2 , F ± 2 . Next, we examine the terms in (5.9) with γ 4 and H i 3 . We find .
If an integer m divides 2(g − 1), it is possible to define an m-th root K 1 m of the canonical bundle, but the root is not unique. Since p + q = 2(g − 1), the bundles K p p+q , K q p+q can be defined, but we would require more data to fully specify them. (For example, for p = q the additional data is a choice of spin structure on Σ g .) Even though we are not able to determine the multiplicities h 0 (K p p+q ) and h 0 (K q p+q ) without further input, the Riemann-Roch theorem implies the relation Notice that, since p + q is an even integer, so is p − q, so the RHS is an integer. To justify (F.2), we notice that the Riemann-Roch theorem can be stated as where L is a line bundle on Σ g . If we set L = K p p+q , then we have L −1 ⊗K = K q p+q . Moreover, deg(K) = 2(g − 1) gives deg(L) = 2(g − 1) p p+q = p, and (F.3) implies (F.2). Interestingly, the 't Hooft anomaly polynomial of the 4d fields listed in table 3 (with those U (1) 1 , U (1) 2 charge assignments) only depends on the difference h 0 (K p p+q ) − h 0 (K q p+q ). We can thus make use of (F.2) and verify that the anomaly polynomial computed from table 3 matches exactly with the integration over Σ g of the 8-form anomaly polynomial of a free 6d N = (2, 0) tensor multiplet.
We may also consider the case p = q = −χ/2. The chiral multiplets (q, Λ α ), ( q, Λ α ) have the same multiplicity and fit into a doublet of the enhanced flavor symmetry SU (2) F . In contrast, the chiral multiplet (Φ, b 0 , ψ α ) is a singlet of SU (2) F . (The Cartan of SU (2) F is proportional to the difference t 1 − t 2 .) Finally, let us comment on the case g = 1, p = 0. The Riemann surface is flat and its canonical bundle is trivial. The total covariant derivative on T 2 (in local flat coordinates) has no spin connection term but includes the terms originating from the background U (1) 1 × U (1) 2 ⊂ SO(5) R fields. It takes the schematic form D m = ∂ m + p A m (t 1 − t 2 ), where A m is a local antiderivative of the volume form on T 2 . With reference to table 3, the modes of χ with t 1 = t 2 = ±1 are unaffected by the U (1) 1 × U (1) 2 background. To get massless modes in four dimensions, we take their internal wavefunction to be a covariantly constant spinor on T 2 . Since T 2 is flat, a covariantly constant spinor is constant, yielding a multiplicity 1 for both λ α and ψ α . (We select periodic boundary conditions on both 1-cycles of T 2 .) As before, the fermion λ α combines with A µ in one vector multiplet, and ψ α combines with b 0 and Φ in one chiral multiplet with U (1) 1 × U (1) 2 charges (0, 0). The mode of χ with (t 1 , t 2 ) = (+1, −1), denoted Λ α in table 3, is affected by the topological twist, and behaves as a section of L p , where L is a degree-one line bundle on T 2 . The same holds true for the scalar φ 1 + i φ 2 . The fields Λ α , φ 1 + i φ 2 fit into chiral multiplets with U (1) 1 × U (1) 2 charges (2, 0) and multiplicity h 0 (L p ). In a similar way, Λ α and φ 1 − i φ 2 fit into chiral multiplets with U (1) 1 × U (1) 2 charges (0, 2) and multiplicity h 0 (L −p ). The difference between h 0 (L p ) and h 0 (L −p ) can be computed using (F.3), with the replacement L → L p , to give h 0 (L p ) − h 0 (L −p ) = p . (F.4) As in the g = 1 case, this relation can be used to verify that the 't Hooft anomalies of the 4d fields match with the result obtained by integration over the Riemann surface of the 8-form anomaly polynomial of a free 6d N = (2, 0) tensor multiplet.