The Green-Schwarz Mechanism and Geometric Anomaly Relations in 2d (0,2) F-theory Vacua

We study the structure of gauge and gravitational anomalies in 2d N=(0,2) theories obtained by compactification of F-theory on elliptically fibered Calabi-Yau 5-folds. Abelian gauge anomalies, induced at 1-loop in perturbation theory, are cancelled by a generalized Green-Schwarz mechanism operating at the level of chiral scalar fields in the 2d supergravity theory. We derive closed expressions for the gravitational and the non-abelian and abelian gauge anomalies including the Green-Schwarz counterterms. These expressions involve topological invariants of the underlying elliptic fibration and the gauge background thereon. Cancellation of anomalies in the effective theory predicts intricate topological identities which must hold on every elliptically fibered Calabi-Yau 5-fold. We verify these relations in a non-trivial example, but their proof from a purely mathematical perspective remains as an interesting open problem. Some of the identities we find on elliptic 5-folds are related in an intriguing way to previously studied topological identities governing the structure of anomalies in 6d N=(1,0) and 4d N=1 theories obtained from F-theory.


Introduction
Quantum anomalies considerably constrain the structure of chiral gauge theories in even dimensions. Chiral matter is known to induce gauge and gravitational anomalies at the 1-loop level in perturbation theory [1], which jeopardize the consistency of the gauge theory. In the presence of tensor fields the celebrated Green-Schwarz-Sagnotti-West mechanism [2][3][4] can cancel such 1-loop anomalies provided the anomaly polynomial of the latter factorises suitably. A particularly interesting class of examples of such tensors are the self-dual tensor fields in 4k + 2 dimensions [5]. The ramifications of the anomaly cancellation mechanism have been investigated in great detail, most notably in the context of 6d N = (1, 0) supergravity theories (see e.g. [6][7][8][9][10] and references therein). A lower-dimensional analogue of these 6d N = (1, 0) supergravities, similar in many respects, are chiral theories in two dimensions with N = (0, 2) supersymmetry. Such theories have sparked significant interest from various field theoretic perspectives, most notably concerning their RG flow to an SCFT point [11][12][13][14][15], in the context of computing elliptic genera and localisation [16], or with respect to novel types of dualities [17,18]. Exploring the structure of anomalies of a class of 2d N = (0, 2) supergravities is the goal of this article.
If a supergravity theory is engineered by compactifying string theory, the consistency conditions from anomaly cancellation imply a rich set of constraints on the geometry defining the compactification. A prime example of this fruitful interplay between anomalies and geometry is provided by F-theory [19][20][21]. In this framework, 6d N = (1, 0) supergravities arise via compactification on elliptically fibered Calabi-Yau 3-folds. Anomaly cancellation then translates into various highly non-trivial relations between topological invariants of the latter [9,[22][23][24][25], which would be hard to guess otherwise, and some of which are even harder to prove in full generality. Compactification of F-theory to four dimensions on a Calabi-Yau 4-fold gives rise to an N = 1 supersymmetric theory which is chiraland hence potentially anomalous -only in the presence of non-trivial gauge backgrounds. This makes it perhaps even more intriguing that the same types of topological relations [26] are responsible for the cancellation of gauge and mixed gauge-gravitational anomalies in six and four-dimensional [27] F-theory compactifications. If one is able to establish the cancellation of anomalies directly from a physical perspective, as has been achieved recently in [28] for four-dimensional F-theory vacua, such reasoning amounts to a physics proof of a number of highly non-trivial topological relations on elliptic fibrations of complex dimension three and four. One of the motivations for this work is to extend this list of topological identities to elliptic fibrations of higher dimension.
The 2d (0, 2) supergravity theories considered in this article are obtained by compatifying Ftheory on an elliptically fibered Calabi-Yau 5-fold [29,30]. As we will review in section 3 the theories contain three different coupled sub-sectors: The structure of the gauge theory sector is similar to the 2d (0, 2) GLSMs familiar from the worldsheet formulation of the heterotic string [31,32]. It includes 2d (0, 2) chiral and Fermi multiplets charged under the in general abelian and non-abelian gauge group factors originating from a topologically twisted theory on 7-branes [29,30]. D3-branes wrapped around curves on the base of the fibration give rise to additional degrees of freedom. These include a particularly fascinating, but largely mysterious sector of Fermi multiplets from the string excitations at the intersection of the D3-branes and the 7-branes [33]. 1 These two sectors are coupled to a 2d N = (0, 2) supergravity sector [37]. The construction of 2d N = (0, 2) theories has received considerable attention also in other formulations of string theory, most notably via D1 branes probing singularities on Calabi-Yau 4-folds [38][39][40][41][42][43] and via orientifolds [44,45].
Various aspects of the non-abelian gauge and the gravitational anomalies in the chiral 2d (0, 2) theory obtained via F-theory have already been addressed in [29,30,33,37,46]. The non-abelian anomalies induced by the chiral fermions in the 7-brane brane gauge sector must be cancelled by the anomalies of the 3-7 modes, as indeed verified in globally consistent examples in [29]. The cancellation of all gravitational anomalies for 2d (0,2) supergravities with a trivial gauge theory sector has been proven in [37] with the help of various index theorems. Such theories are obtained by F-theory compactification on smooth, generic Weierstrass models. On the other hand, the structure of gauge anomalies in the presence of abelian gauge theory factors is considerably more involved, and the subject of this article.
As in higher dimensions, abelian anomalies induced at 1-loop level need not vanish by themselves provided they are consistently cancelled by a two-dimensional version of the Green-Schwarz mechanism. In general 2d (0, 2) gauge theories, the structure of the Green-Schwarz mechanism has been laid out in [47][48][49] (see [38,50] for early work). In the present situation, the Green-Schwarz mechanism operates at the level of real chiral scalar fields which are obtained by Kaluza-Klein reduction of the self-dual 4-form of Type IIB string theory. They enjoy a pseudo-action which is largely analogous to the pseudo-action of the self-dual 2-tensors in 6d N = (1, 0) supergravities and which we parametrise in general terms in section 2. As one of our main results we carefully derive this pseudo-action in section 5, thereby identifying the structure (and correct normalisation) of the anomalous Green-Schwarz couplings. The latter depend on the non-trivial gauge background and imply a classical gauge variance of the right form to cancel the 1-loop abelian gauge anomalies.
A challenge we need to overcome to show anomaly cancellation is that in absence of a perturbative limit the abelian charges of the 3-7 sector modes are notoriously hard to determine in a microscopic approach. Instead of computing the 3-7 anomaly from first principles we extract the anomaly inflow terms onto the worldvolume of the D3-branes in section 5. To this end we start from the Chern-Simons terms of the 10d effective pseudo-action in the presence of brane sources. Uplifting this result to Ftheory allows us to quantify the contribution of the 3-7 modes in particular to the gauge anomalies and in turn also to deduce the net charge of the 3-7 modes.
One of our main results is to establish a closed expression for the complete gauge and gravitational anomalies of a 2d (0, 2) theory obtained by F-theory compactified on a Calabi-Yau 5-fold. The resulting conditions for anomaly cancellation are summarized in (4.18) and (4.35) of section 4. The structure of anomalies reflected in these equations interpolates between their analogue in 6d and 4d F-theory vacua: In 6d F-theory vacua the anomalies are purely dependent on properties of the elliptic fibration, while in 4d they vanish in absence of background flux and depend linearly on the flux background. In 2d F-theory vacua, we find both a purely geometric and a flux dependent contribution to the anomalies. For anomalies to be cancelled, the flux dependent and the flux independent parts of the topological identities (4.18) and (4.35) must in fact hold separately, on any elliptically fibered Calabi-Yau 5-fold and for any gauge background satisfying the consistency relations reviewed in section 3. We verify these highly non-trivial anomaly relations in a concrete example fibration for all chirality inducing gauge backgrounds in section 6.
It has already been pointed out that, despite their rather different structure at first sight, the gauge anomalies in 6d and 4d boil down to one universal relation in the cohomology ring of an elliptic fibration over a general base, and similarly for the mixed gauge-gravitational anomalies [26]. 2 This prompts the question if the 2d anomaly relations (4.18) and (4.35) are also equivalent to this universal relation governing the structure of anomalies in four and six dimensions. As we will see in section 7, assuming the 4d/6d relation of [26] implies the flux dependent part of (4.18) and (4.35) for a special class of gauge background. However, it remains for further investigation whether the precise relations extracted in [26] on Calabi-Yau 3-folds and 4-folds follow in turn by anomaly cancellation on Calabi-Yau 5-folds in full generality.
2 Anomalies in 2d (0, 2) supergravities Consider an N = (0, 2) supersymmetric theory in two dimensions with gauge group and matter fields in representations R = (r 1 , . . . , r n G ) q . (2.2) Here r I denotes an irreducible representation of the simple gauge group factor G I and q = (q 1 , . . . , q n U (1) ) are the charges under the Abelian gauge group factors. We are interested in the structure of the gauge and gravitational anomalies in such a theory. These are induced by chiral matter at the 1-loop level.
In a general D-dimensional quantum field theory, the gauge and gravitational anomalies can be described by a gauge invariant anomaly polynomial of degree D/2 + 1 in the gauge field strength F and the curvature two-form R, where the sum is over all matter fields with spin s which have zero-modes in representation R with multiplicity n s (R). In particular, a chiral fermion, corresponding to s = 1/2, contributes with I 1/2 (R) = −tr R e −FÂ (T) , (2.4) whereÂ(T) is the A-roof genus and F denotes the hermitian gauge field strength. An anti-chiral fermion contributes with the opposite sign. For more details on our conventions we refer to appendix A. In D = 2 dimensions, the 1-loop anomaly polynomial from the charged matter sector is hence a 4-form. Correspondingly, the anomaly contribution from chiral and anti-chiral fermions in the theory sums up to where the first Pontryagin class of the tangent bundle is defined as p 1 (T) = − 1 2 trR 2 . For future purposes we express the anomaly polynomial for the non-abelian, the abelian and the gravitational anomaly as with χ(R) denoting the chiral index of zero-modes in representation R. In the first line we have related the trace in a representation r I of the simple gauge group factor G I to the trace in the fundamental representation via r I tr fund F 2 . (2.9) In general, the 1-loop induced quantum anomaly need not be vanishing in a consistent theory provided the tree-level action contains gauge variant terms, the Green-Schwarz counter-terms, which cancel the anomaly encoded by I D+2 . For this cancellation to be possible, the 1-loop anomaly polynomial I D+2 of the matter sector must factorize suitably. In two dimensions, the Green-Schwarz counterterms derive from gauge variant interactions of scalar fields. The structure of the possible Green-Schwarz terms in a general 2d N = (0, 2) supersymmetric field theory has been analyzed in [47][48][49] (see [38,50] for early work). In this paper, however, we are interested in the specific 2d N = (0, 2) effective theory obtained by compactification of F-theory on an elliptically fibered Calabi-Yau 5-fold [29,30]. In these theories a gauge theory with gauge group (2.1) is coupled to a 2d N = (0, 2) supergravity sector. 3 The latter contains a set of real axionic scalar fields c α arising from the Kaluza-Klein (KK) reduction of the F-theory/Type IIB Ramond-Ramond forms C 4 [37]. 4 As we will derive in detail in section 5, their pseudo-action can be parametrized as The structure of this action is completely analogous to the well-familiar generalized Green-Schwarz action [3,4] of self-dual tensor fields in D = 6 (see e.g. [52]) and, in fact, D = 10 dimensions, with the role of the gauge invariant self-dual field strengths being played here by the 1-forms H α = Dc α . These are subject to the self-duality condition The second term in the action constitutes the Green-Schwarz coupling, which is responsible for the non-standard Bianchi identity where we used that Ω αβ is a constant matrix. The Green-Schwarz couplings will be found to take the form with F A the field strength associated with the gauge group factor U (1) A and with Θ β A depending on the background flux. This identifies H α as (2.14) The axionic shift symmetry of the chiral scalars is gauged by the abelian vector A A according to the transformation rule such that the covariant derivative Dc α is gauge invariant. As a result, the pseudo-action picks up a gauge variation of the form The gauge theory in question arises from spacetime-filling 7-branes. In addition, the compactification contains spacetime-filling D3-branes, but the associated gauge fields are projected out due to SL(2, Z) monodromies along the D3-brane worldvolume [29,33]. 4 As discussed in [37], these scalars split into n+ chiral and n− anti-chiral real scalars. Out of these n+ pairs of real chiral and anti-chiral scalars form non-chiral real scalars, which constitute the imaginary part of the bosonic component of a corresponding number of 2d (0, 2) chiral multiplets. The remaining τ = n− − n+ anti-chiral real scalars form 2d (0, 2) tensor multiplets and contribute, together with the gravitino, to the gravitational anomaly at 1-loop level according to the general formulae reviewed in appendix A. This contribution to the 1-loop anomaly is in addition to the classical gauge variance of the Green-Schwarz action discussed in this section.
with I (1),GS 2 a gauge invariant 2-form. By the standard descent procedure, it defines an anomalypolynomial I GS 4 encoding the contribution to the total anomaly from the Green-Schwarz sector. Concretely, the descent equations Consistency of the theory then requires that This is possible only if the non-abelian and gravitational anomalies vanish by themselves and the abelian anomalies factorise suitably. The resulting constraints on the spectrum take the following form: Non-abelian : r I = 0 Abelian : Note that, unlike in higher dimensions, the 2d GS mechanism operates entirely at the level of the abelian gauge group factors: In (4k + 2) dimensions the analogue of (2.14) is the gauge invariant field strength associated with the self-dual rank (2k + 1)-tensor fields, and the correction term in the covariant action involves the Chern-Simons (2k + 2)-forms associated with the gauge and diffeomorphism group. In 2d the Chern-Simons form is proportional to the trace over the gauge connection and must hence be abelian. Therefore the 2d non-abelian and gravitational anomalies from the chiral sector at 1-loop must vanish by themselves; likewise there can be no mixed gravitational-gauge anomalies induced at 1-loop.
Furthermore, let us point out that in the 2d (0, 2) theories of the type considered here the gauging (2.15) of the scalars is directly related to the anomalous Green-Schwarz coupling (2.13). This is a notable difference to the implementation of the Green-Schwarz mechanism in the more general 2d (0, 2) gauge theories of [47], where these two are in principle independent.
Before we proceed, we would like to comment on the scalar fields c α . In principle, all of the axionic scalar fields c α obtained from the Type IIB RR fields C p can contribute to the Green-Schwarz mechansim. However, as in 6d and 4d F-theory compactifications, the gauging of the scalar fields from C 2 is encoded via a geometric Stückelberg mechanism in terms of non-harmonic forms, at least in the description via the dual M-theory [53]. In this work we will we will only focus on the Green-Schwarz mechanism associated with the scalar fields arising from the RR potential C 4 , which will be seen to depend on the background flux.

F-theory on elliptically fibered Calabi-Yau five-manifolds
In this section we provide some background material on N = (0, 2) supersymmetric compactifications of F-theory to two dimensions. The reader familiar with this type of constructions from [29,30] can safely skip this summary.

Gauge symmetries and gauge backgrounds, and 3-branes
We consider a 2d (0, 2) supersymmetric theory describing a vacuum of F-theory compactified on an elliptically fibered Calabi-Yau 5-fold X 5 [29,30] with projection π : X 5 → B 4 . (3.1) The base B 4 is a smooth complex 4-dimensional Kähler manifold, which is to be identified with the physical compactification space of F-theory. Via F/M-theory duality, F-theory on B 4 is related to the supersymmetric quantum mechanics [54] obtained by compactification of M-theory on X 5 .
For simplicity we assume that X 5 has a global section [z = 0] so that it can be described by a Weierstrass equation (3.2) Here the projective coordinates [x : y : z] parametrise the fiber ambient space P 2,3,1 and f, g are sections of the fourth and sixth power of the anti-canonical bundleK of the base. The discriminant locus specifies the location of the 7-branes. The non-abelian gauge group factors G I in (2.1) are associated with 7-branes wrapping divisors W I , which are complex 3-dimensional components of the discriminant locus ∆ = 0 in the base. We assume that the Kodaira singularities in the fibre above W I admit a crepant resolution 5π : The resolution replaces the singularity over W I by a chain of rational curves. After taking into account monodromy effects, which appear for non-simply laced groups, this allows one to identify a collection P 1 i I , i I = 1, . . . , rk(g I ) of independent rational curves in the resolved fiber which can be associated with the simple roots α i I of the Lie algebra g I underlying G I in the following sense: The fibration of P 1 i I over W I -more precisely of the image of P 1 i I under monodromies in the non-simply laced casedefines a resolution divisor E i I with the property that Here [E i I ] denotes the homology class of the divisor E i I and unless noted otherwise, all intersection products are taken onX 5 . The matrix C i I j I is the Cartan matrix of g I (in conventions where the entries on its diagonal are +2). Via duality with M-theory, M2-branes wrapping the fibral curves P 1 j J give rise to states associated with the simple roots −α i I , and the Cartan U (1) i I gauge field arises by KK reduction of the M-theory 3-form as In this sense the resolution divisors [E i I ] can be identified with the generators T i I of the Cartan subgroup of G I in the so-called co-root basis, whose trace over the fundamental representation of G I is normalised such that 5 To avoid clutter we will mostly avoid the hat above π in the sequel.
g A n D n B n C n E 6 E 7 E 8 F 4 G 2 λ 1 2 2 1 6 12 60 6 2 The quantity λ I denotes the Dynkin index in the fundamental representation and is tabulated in Table 3.1. Note that for simply-laced groups C i I j I = C i I j I . The geometric manifestation of this identification is the important relation where Tr is related to the trace in the fundamental representation via The push-forward π * ([E i I ] · [E j J ]) to the base of the fibration is defined by requiring that for any basis of vertical divisors . Each non-Cartan Abelian gauge group factor U (1) A is associated with a global rational section S A ofX 5 in addition to the zero-section S 0 . To each S A one can assign an element [U A ] ∈ CH 1 (X 5 ) through the Shioda map The vertical divisor D A and the in general fractional coefficients k i I are chosen such that U A satisfies the transversality conditions which must hold for every vertical divisor [D α ] = π * D b α . In analogy with the relation (3.8), one can define the so-called height pairing [25,55] The objects T A , T B are the generators of U (1) A and U (1) B and D AB is a divisor on the base of the fibration. Unlike the divisor W I , even for A = B this divisor is not one of the irreducible components of the discriminant ∆ (in the sense that ∆ would factorise into the union of various irreducible such D AA ). Nonetheless, we will see that it plays a very analogous role for the structure of anomalies also for F-theory compactifications to 2d.
A crucial ingredient in F/M-theory compactifications on Calabi-Yau five-folds is the gauge background for the field strength G 4 = dC 3 of the M-theory 3-form potential field. As in compactifications to four dimensions, the full gauge background is an element of the Deligne cohomology group H 4 D (X 5 , Z(2)) and can be parametrized by equivalence classes of rational complex codimension-2cycles [56,57], which form the second Chow group CH 2 (X 5 ). The field strength of G 4 as such takes values in H 4 (X 5 ). It is subject to the Freed-Witten quantization condition [58] (3.14) In order to preserve two supercharges in the M/F-theory compactification onX 5 , the (3, 1) and (1,3) Hodge components of H 4 (X 5 ) must vanish [54] and hence By F/M-duality, the G 4 fluxes are subject to the transversality constraints If this flux satisfies in addition the constraint it leaves the gauge group factor G I unbroken.
Higher curvature corrections in the M-theory effective action induce a curvature dependent tadpole for the M-theory 3-form C 3 . In the dual F-theory these curvature corrections subsume the curvature contributions to the Chern-Simons action of the 7-branes (including, in the perturbative limit, the orientifold planes). In a consistent M-theory vacuum this tadpole must be cancelled by the inclusion of background flux G 4 and/or by M2-branes wrapping a curve class onX 5 determined by the tadpole equation [54]. The projection of this curve class to the base B 4 describes 6 , in the dual F-theory, the class wrapped by background D3-branes filling in addition the extended directions along R 1,1 . The projected class is given by [29,54] [C] = 1 24

Matter spectrum from F-theory compactification on CY 5-folds
The charged chiral matter fields whose contributions to the 1-loop anomalies we will be studying arise from three sources [29,30]: 7-brane bulk matter propagating along the non-abelian divisors W I , 7-brane codimension-two matter localised along the intersections of various discriminant components or self-intersections of the discriminant, and finally Fermi multiplets at the pointlike intersection of D3-branes with the 7-branes. Due to the chiral nature of the 2d (0, 2) theory, all three types of matter are chiral even for vanishing gauge backgrounds.
The bulk matter fields transform, in the absence of gauge flux, in the adjoint representation of G I . In the dual M-theory quantum mechanics, this matter arises from M2-branes wrapping suitable combinations of resolution P 1 i I in the fiber over W I . For non-vanishing gauge backgrounds, which can be described by a non-trivial principal gauge bundle L, the original gauge group G I can be broken into a product of some sub-groups. The spectrum decomposea into irreducible representations R of the unbroken gauge factors Note that if R =R, each representation is accompanied by its complex conjugate. The matter fields organise into 2d (0, 2) chiral multiplets, which contain one complex boson and a complex chiral Weyl fermion, as well as Fermi multiplets, which contain one complex anti-chiral Weyl fermion. Each of these matter fields is counted by a certain cohomology group on W I involving the vector bundle L R . The chiral index of massless matter in a given complex representation, defined as the difference of chiral and anti-chiral fermions in complex representation R, is then given by [29,30] For real representations, this expression is to be multiplied with a factor of 1 2 . In particular, the chiral index of the adjoint representation depends purely on the geometry and takes the form χ(Adj(H I )) = − 1 24 W I c 1 (W I )c 2 (W I ). Extra matter states in representation R of G tot localizes on complex 2-dimensional surfaces C R on B 4 . This occurs whenever some of the rational curves P 1 i I in the fiber split over C R . Group theoretically, this signifies the splitting of the associated simple roots into weights of representation R.
The associated charged matter fields arise from M2-branes wrapped on suitable linear combinations of fibral curves over C R , which in fact span the weight lattice of the gauge theory. Hence to each state in representation R we can associate a matter 3-cycle S a R which is given by a linear combination of fibral curves over C R and carries a weight vector β a i I , a = 1, ..., dim(R), such that These matter states also organize both into chiral and Fermi multiplets and are counted by cohomology groups of a vector bundle L R which derives from the gauge background. If the surface C R on B 4 is smooth, the chiral index of this type of matter follows from an index theorem as [29,30] Otherwise one has to perform a suitable normalisation in order to be able to apply the index theorem, and this will lead to correction terms as exemplified in [29].
The third type of massless matter arises from 3-7 string states at the intersection of the 7-branes with the spacetime-filling D3-branes wrapping the curve class [C] in (3.18). Matter in the 3-7 sector comes in 2d (0,2) Fermi multiplets [29,30]. In purely perturbative setups, each intersection point of [C] with one of the D7-branes carries a single Fermi multiplet in the fundamental representation of the D7-brane gauge group. However, monodromy effects along the 3-brane worldvolume considerably obscure such a simple interpretation of the 3-7 modes in non-perturbative setups [29,33]. As one of our results, we will see how the structure of 2d anomalies sheds new light on the structure of 3-7 modes, including, in particular, their charges under the non-Cartan abelian gauge factors.

Anomaly equations in F-theory on Calabi-Yau 5-folds
In this section we present closed expressions for the anomaly cancellation conditions in 2d (0, 2) Ftheory vacua. We begin in section 4.1 by deriving a formula for the chiral index of charged matter states in the presence of 4-form flux G 4 in the dual M-theory, which is uniformly valid for the bulk and the localised 7-7 modes. We also shed some more light on the counting of 3-7 modes. Together with the Green-Schwarz counterterms this leads to formula (4.18) for the cancellation of all gauge anomalies. In section 4.2 we extend the gravitational anomaly cancellation conditions of [37] to situations with non-trivial 7-branes and fluxes, leading us to condition (4.34).

Gauge anomalies, Green-Schwarz terms and the 3-7 sector
Recall from the previous section that in this paper we assume the existence of a smooth crepant resolutionX 5 , which describes the dual M-theory on its Coulomb branch. This forces us, as usual in this context, to restrict ourselves to Abelian gauge backgrounds G 4 . In particular, the vector bundles appearing in the expressions (3.21) and (3.23) are complex line bundles.
For simplicity of presentation we first assume that the gauge flux G 4 does not break any of the non-abelian gauge group factors. The chiral index (3.23) of the localised matter can be split into a purely geometric and a flux dependent contribution We stress that this expression is correct provided the matter 2-cycles C R on B 4 are smooth. The line bundle L R on C R to which a state with weight vector β a (R)) couples is obtained from G 4 by first integrating G 4 over the fiber of the matter 3-cycle S a R and then projecting onto the surface C R . This gives rise to a divisor class on C R which is to be identified, similarly to the procedure in F-theory on Calabi-Yau 4-folds [56,57], with Note that for gauge invariant flux, the result is the same for each of the matter 3-cycles S a R and hence correctly defines the line bundle associated with representation R. This allows us to rewrite χ flux (R) explicitly in terms of G 4 as where · C R denotes the intersection product on C R .
Next, consider the bulk modes. For gauge invariant flux, this sector contributes only states in the adjoint representation of G I (which due to the quadratic nature of the anomalies nonetheless contribute to the anomaly), and according to (3.21) their chiral index is given by It is useful to note that χ bulk (R) is formally identical to the flux-independent part of the chirality of a localised state whose matter locus is given by the canonical divisor on W I , i.e. the complex 2-cycle on W I in the class Indeed, by adjunction, using the short exact sequence and the resulting relation one computes This implies that (4.10) The additional factor of 1 2 in (4.4) is due to the fact that the adjoint is a real representation. More generally, and in complete analogy to the description of bulk modes in compactifications on Calabi-Yau 4-folds [57], we can associate to a bulk matter state associated with the root ρ I the 3-cycle The parametersâ i I are related to the coefficients in the expansion of the root ρ I in terms of the simple roots α i I . 7 Geometrically, the fiber of S ρ I is given by the corresponding linear combination of fibral rational curves P 1 i I . An M2-brane wrapped along this linear combination of fibral curves gives rise to a state whose Cartan charges are given precisely by the root ρ I . For gauge invariant flux satisfying (3.17), the line bundle π * (S ρ I · G 4 ) vanishes by construction. Hence the expression for the bulk and the localised chirality are completely analogous and both types of matter will from now on be treated on the same footing.
This conclusion persists if the gauge background breaks some or all of the simple gauge group factors G I . In this case, the adjoint representation for the bulk matter or the representations associated with the localised matter decompose into irreducible representations of the unbroken subgroup. The operation (4.2) now leads to a well-defined line bundle for each of these individual representations, for bulk and localised matter alike.
Next, we consider the contribution from the 3-7 modes. As it turns out, to each representation R one can associate a divisor D 37 (R) on B 4 such that the chiral index of 3-7 states in representation R is given by The expression in brackets is the curve class [C], defined in (3.18), wrapped by the spacetime-filling D3branes. For instance, for a perturbative gauge group G I = SU (N ), each intersection point of [C] with the 7-brane divisor W I hosts a (negative chirality) Fermi multiplet in representation R = (N) [29,30] and therefore D 37 (R = (N)) = W I . For non-perturbative gauge groups and for Abelian non-Cartan groups U (1) A determining the representation and charge of the 3-7 strings from first principles is more obscure due to subtle SL(2, Z) monodromy effects on the worldvolume of the D3-brane along C [33]. However, in the next section we will derive that in the presence of extra U (1) A gauge group factors the net contribution to the U (1) A − U (1) B anomaly (2.7) from the 3-7 sector takes the form (4.14) Here we recall that U A and U B generate the respective U (1) factors via the Shioda map (3.11) and that the height-pairing π * (U A · U B ) had been introduced in (3.13). More generally, our results imply that the right-hand side correctly captures the contribution to the anomaly also of the Cartan U (1) group for non-perturbative gauge groups. Let us introduce the notation to collectively denote set of divisors generating any of the Cartan U (1) i I or non-Cartan U (1) A gauge symmetries. Then our claim is that the contribution to the gauge anomaly due to 3-7 modes can be summarized as If the index Λ = i I refers to a Cartan U (1) i I , the object β a i I (R) denotes the weights associated with representation R with respect this U (1) i I , and for Λ = A we define β a A (R) = q A (R). We will come back to the interpretation of this formula at the end of this section.
As the final ingredient we will derive, in section 5, the Green-Schwarz counterterms appearing on the righthand side of (2.20b). These are found to be purely flux dependent and of the form For instance, if we let F Λ = U A , F Σ = U B refer to non-Cartan Abelian groups, then this describes the Green-Schwarz counterterms for the With this preparation we can now rewrite the gauge anomaly equations (2.20a), (2.20b) in a rather suggestive form. Since the anomaly equations must hold for arbitrary gauge background G 4 and since the flux independent terms only give a constant off-set, the flux dependent and the flux independent contributions to the anomalies must vanish separately. The requirement (2.20a), (2.20b) of cancellation of all gauge anomalies therefore results in two independent identities: The two terms in (4.18a) respectively represent the flux independent anomaly contribution from the 7-7 sector, (4.1), and from the 3-7 sector, (4.16). In (4.18b) we have collected the flux dependent 3-7 and the Green-Schwarz contribution to the anomaly in the brackets in the second and third line to illustrate the striking formal similarity between them. We will understand this similarity in the next section.
Let us now come back to the interpretation of (4.16). For F Λ = E i I , F Σ = E j I this equation allows us to deduce the net contribution to the anomalies due to 3-7 strings charged under the non-abelian gauge group factors, which, as noted already, can be rather obscure due to monodromy effects. To interpret this expression, recall the crucial identity (3.8). If we assume that each geometric intersection point [C] · B 4 W I hosts an (anti-chiral) Fermi multiplet in representation R, then for consistency this representation must satisfy This is to be contrasted with the fact that for any representation R of a simple group with T i I denoting the Cartan generators in the coroot basis. The Dynkin index λ I for the fundamental representation of G I is collected, for all simple groups, in Table 3.1, and c R normalizes the trace with respect to the fundamental representation as in (2.9). By definition, the smallest value of c (2) R occurs for the fundamental representation c (2) fund = 1. Hence unless λ I = 1 or λ I = 2, the interpretation in terms of 3-7 modes necessarily involves 'fractional' Fermi multiplets. 8 This is in agreement with the observation of [29] that e.g. for G I = E 6 , the net contribution to the anomaly from the 3-7 sectors corresponds to that of a 1 6 -fractional Fermi multiplet per intersection point.

Gravitational Anomaly
The gravitational anomaly for F-theory compactified on a smooth Weierstrass model X 5 without any 7-brane gauge group and background flux has already been discussed in [37]. The anomaly polynomial receives contributions from the moduli sector, from the 2d (0, 2) supergravity multiplet as well as from the 3-7 sector,

22)
A grav | uni = 24 (4.23) Note that A grav | mod includes what would be called in Type IIB language the contributions from the closed string moduli sector, from the moduli associated with the 7-branes (which however by assumption carry no gauge group), and from τ (B 4 ) many 2d (0, 2) tensor multiplets. Here and . Furthermore the signature τ (B 4 ) counts the difference of self-dual and anti-self-dual 4-forms on B 4 and is related to the Hodge numbers of B 4 as The D3-brane class appearing fixed by the tadpole on a smooth Weierstrass model without flux is [C] = 1 24 π * c 4 (X 5 ). As shown in [37] with the help of various index theorems, the total anomaly can be evaluated as where the last equality holds because h 0,i (B 4 ) for i = 0 if B 4 is to admit a smooth Calabi-Yau Weierstrass fibration over it.
Suppose now that the fibration contains in addition a non-trivial 7-brane gauge group and charged 7-7 matter, and let us also switch a non-trivial flux background G 4 . For simplicity assume first that the supersymmetry condition that G 4 be of pure (2, 2) Hodge type [54] does not constrain the moduli of the compactification. In analogy with G 4 flux on Calabi-Yau 4-folds, this is guaranteed whenever vert (X 5 ), the primary vertical subspace of H 2,2 (X 5 ) generated by products of (1, 1) forms. 9 In this situation the gravitational anomaly generalizes as follows: First, we must now work on the resolutionX 5 of the singular Weierstrass model describing the more general 7-brane configuration. In particular the D3-brane curve class changes to [C] = 1 24 π * c 4 (X 5 ) − 1 2 π * (G 4 · G 4 ) with c 4 (X 5 ) evaluated on the resolved spaceX 5 . Second, we must add the anomaly contribution from the non-trivial 7-7 sector. This sector includes the localised matter in some representation R of the total gauge group as well as the bulk matter in the adjoint representation (or its decomposition if the flux background breaks the non-abelian gauge symmetry). Each massless multiplet in the bulk sector contributes dim(adj) many states to the anomaly. Of these, rk(G) many states are associated with the Cartan subgroup of the gauge group and are in fact encoded already in the contribution from the 'moduli sector'. More precisely, if we replace in (4.22) the contribution χ 1 (X 5 ) by χ 1 (X 5 ), the resulting expression A grav | mod now includes the anomaly from the rk(G) = h 1,1 (X 5 )−(h 1,1 (B 4 )−1) many vector multiplets associated with the Cartan subgroup as well as the 'open string moduli' in the Cartan, which enter the values of h 1,p (X 5 ). As a result, the total gravitational anomaly polynomial is now with the individual contributions Note that the topological invariants χ 1 (X 5 ) and c 4 (X 5 ) contain correction terms in addition to the base classes appearing for the case of a smooth Weierstrass model which depend on the resolution divisors and extra sections (if present).
The vanishing of the total gravitational anomaly implies that these individual contributions must cancel each other, This leads to a set of topological identities which must hold for every resolutionX 5 of an elliptically fibered Calabi-Yau 5-fold, and for every consistent configuration of background fluxes thereon, as specified above. Note that the flux background enters not only through the 3-brane class in A 3−7 , but also because the chiral indices in the 7-brane sector split as χ(R) = χ(R)| geom + χ(R)| flux as in (4.1). In principle, if the Hodge type of G 4 were to vary over the moduli space, the supersymmetry condition G 4 ∈ H 2,2 (X 5 ) would induce a potential for some of the moduli [54] and hence modify the number of uncharged massless fields. According to our assumptions, this does not occur for the choice of flux considered here and the uncharged sector contributes to the anomaly as above.
Then the anomaly equations split into the independent sets of equations In the second equation, which accounts for the flux dependent anomaly contribution, we do not need to treat the 7-brane states in the Cartan separately as their chirality is not affected by the flux background.
The flux independent contribution can be analysed further if the fibrationX 5 is smoothly connected to a smooth Weierstrass model X 5 . In the terminology of [59], this means that the F-theory model does not contain any non-Higgsable clusters and hence after the blowdown of the resolution divisors the gauge symmetry can be completely Higgsed. In that case we know already from (4.28) that the anomalies on the resulting smooth Weierstrass model X 5 cancel for G 4 = 0. Let us therefore define The anomaly equations can then be rewritten as It is interesting to speculate about the effect of G 4 fluxes which are not automatically of (2, 2) Hodge type. The supersymmetry condition (3.15) is reflected in a dynamical potential which is expected to render some of the supergravity moduli massive [54]. The resulting change in the gravitational anomaly compared to the fluxless geometry must be compensated by a suitable modification of the remaining uncharged spectrum. Indeed, the flux contributes at the same time to the D3-brane tadpole and hence changes the D3-brane curve class [C] compared to the fluxless compactification. This changes the number of massless Fermi multiplets in the 3-7 sector. The net number of moduli stabilized in the presence of flux must equal the change in the number of 3-7 modes. This interesting effect has no analogue in 6d or 4d F-theory vacua: In 6d there is no background flux, and in 4d there is no purely gravitational anomaly.

Derivation of the Green-Schwarz terms and 3-7 anomaly
In this section we derive the two key results of this paper, the form and correct overall normalization of the 2d Green-Schwarz terms and the contribution to the gauge anomalies from the 3-7 string sector. As we will see, both can be obtained in a very compact manner directly from the gauging of the Type IIB Ramond-Ramond 4-form in the presence of source terms. The gauging of the Ramond-Ramond forms in the presence of brane sources is standard [60][61][62], and a similar ten-dimensional approach to determining the gauging in a compactification has been taken in [63,64]. We will first derive this gauging in an orientifold limit and describe its implications for the Green-Schwarz terms and its relation to the 3-7 anomalies. We then uplift the result to F-theory on an elliptically fibered Calabi-Yau, which is valid beyond the perturbative limit. We close this section by making contact with the 2d effective action laid out in section 2.

10d Chern-Simons terms
Consider a Type IIB orientifold compactification on a Calabi-Yau 4-fold X 4 , with spacetime-filling D7branes and O7-planes associated with a holomorphic orientifold involution σ : X 4 → X 4 . To simplify the presentation we omit orientifold invariant D7-branes and only consider D7-branes as pairs D7 a , D7 a ′ wrapping effective divisors D a and D a ′ = σ * (D a ) = D a on X 4 . The cohomology class Poincaré dual to D a will be denoted by [D a ]. The field strength on the D7 a -brane is denoted as F a with F a ′ = −σ * (F a ). In addition we allow for spacetime-filling D3-branes and their image wrapping curves C i and C i ′ on X 4 . Our conventions for the effective action of the supergravity fields and the branes are summarized in appendix A.2. The 10d supergravity action in the presence of 7-branes and 3-branes and after taking the orientifold quotient takes the form 10 We are interested in the gauging of the RR 4-form potential C 4 . Prior to taking into account the source terms due to the branes, its associated field strength is 11 F 5 = dC 4 . It is gauge invariant and satisfies the Bianchi identity dF 5 = 0. Including the source terms, the relevant part of the action after taking the orientifold quotient becomes The source terms linear in C 4 follow by summing up the C 4 dependent contributions to the Chern-Simons action of the 7-branes, the O7-plane and the D3-branes listed in Appendix A.2 as (5.5) 10 The overall factor of 1 2 results from the orientifold quotient. 11 Strictly speaking, the SL(2, Z) invariant field strength in 10d isF5 = dC4 + 1 2 B2 ∧ F3 − 1 2 C2 ∧ H3 with H3 = dB2 and F3 = dC2, but since we are only interested in the gauging of C4 these corrections play no role for us.
Note the appearance of the trace Tr, defined in (3.9), in the expression (5.3). In the strict perturbative limit, in particular for gauge groups of type SU (n), there is no difference compared to the trace in the fundamental representation. But more generally in F-theory, it is the object Tr, rather than tr, which appears in the Chern-Simons action.
As a result, the Bianchi identity for the field strength F 5 associated with C 4 now takes the nonstandard form To proceed further, we introduce the Chern-Simons forms w 3a for the gauge group on the 7-brane along D a as well as w 3Y for the spin connection ω with the property Similarly, one can define an Euler form e 5,i associated with the 6-form [C i ] Poincaré dual to the curve C i such that de 5,i = [C i ]. 12 This allows us to express (5.6) as which is solved by setting Taking into account the backreation of the source terms means that it is now this form of F 5 which appears in the kinetic term in (5.6). The full action (5.2) is equivalent to again with F 5 as in (5.9). 13 The form (5.9) for the gauge invariant field strength F 5 implies that C 4 must transform non-trivially under gauge transformations associated with the 7-brane gauge group and the spin connection. In absence of any background values for the fields, if under a gauge and Lorentz transformation the gauge connection A a and the spin connection ω change as then the Chern-Simons forms vary as Since the field strength F 5 defined in (5.9) is gauge invariant, this induces a corresponding gauge transformation of the potential C 4 . We are interested in situations in which both the gauge and the 12 A careful definition can be found in [65]. A proper regularization of this term is necessary for a correct treatment of the normal bundle anomalies [61], but this will play no role for us in this paper. 13 Note that the cross-terms quadratic in the Chern-Simons terms vanish due their odd form degree.
spin connection acquire non-trivial background values. Correspondingly we can decompose the field strength F into its fluctuation piece F and a background componentF , and similarly for R, The gauge dependence of C 4 then becomes 14 Here we have used λ a = −λ a ′ , relating the gauge group on each brane along D a and its orientifold image. The relative factor of 2 in the first terms involving the background field strength and curvature results from expanding F 2 a = 2F aFa + F 2 a +F 2 a , and similarly for R. As we will see next, the terms on the righthand side involving the internal background fluxF a induce the Green-Schwarz counterterms in the two-dimensional effective action, while the terms depending on the fluctuations F a and R contribute to the anomaly inflow counterterms for the anomaly from the 3-7 string modes.

Derivation of the GS term in Type IIB
In order to derive the Green-Schwarz counterterms, we first consider the flux-dependent piece in the gauge variation of C 4 , (5.14), Due to the appearance of C 4 in the action (5.2), while F 5 by itself is gauge invariant, this induces a gauge dependence of the effective action, which is precisely the manifestation of a Green-Schwarz counterterm. As we will see, the only relevant terms contributing to the Green-Schwarz terms are the couplings to Q a (F a ) and Q a ′ (F a ′ ). If we focus on these, substituting the variation (5.16) of C 4 into (5.1) gives 17) where we are indicating that after compactification the spacetime is of the form R 1,1 × X 4 . If we identify the fluctuations F with the 2d field strength F 2d , we see that for reasons of dimensionality only the last term in the decomposition makes a contribution. We thus find 14 Strictly speaking, we are not taking into account variations of the spin connection in the direction of the normal bundle, which are more subtle [61,65] but play no role for us. Note also that, as we will argue momentarily, only abelian fluxes are of relevance for us so that we are writingFa instead of dĀa.
Here we have used the definition σ * (TrF a ∧ [D a ]) = TrF a ′ ∧ [D a ′ ]. Furthermore we have denoted the trace over the gauge group on brane D a with Tr a , and similarly for D b . Through the descent equations, this gauge variance yields the Green-Schwarz contribution to the anomaly polynomial Note that the trace is taken simultaneously over the external and the internal components of the field strength, both for the gauge groups associated with D a and with D b . This implies that I GS 4 can only be non-vanishing for the abelian gauge symmetry factors in the two-dimensional effective action: Indeed, a contribution to a non-abelian gauge group would require at the same time non-abelian flux internally, but this would break the gauge group. The only option is that the flux is embedded along the direction of an abelian generator, which then acquires a Green-Schwarz anomaly term of the above form. This is a notable difference from the Green-Schwarz mechanism in six dimensions, which is well-known to operate also at the level of non-abelian gauge groups.
For a similar reason, the other source terms in (5.2) do not contribute to the gauge variance of the classical action. Also, there can be no Green-Schwarz contribution to the pure gravitational anomaly or even a mixed gauge-gravitational anomaly in two dimensions. This can be seen explicitly if one proceeds along the same lines with the background terms in (5.15) and uses the direct product structure of the Lorentz group as SO(1, 1) × G int upon compactification. In summary, the complete effect of the gauge dependence associated with the background term in (5.14) is the Green-Schwarz anomaly polynomial (5.20), while the background term in (5.15) does not lead to any gauge dependence of the effective action.
The Green-Schwarz counterterm (5.20) and in particular its overall normalization will be checked in a prototypical brane setup in Appendix B, where we will verify that it correctly cancels the 1-loop anomalies induced by the 3-7 and the 7-7 sector.

3-7 anomaly from gauging in Type IIB
Let us now analyze the effect of the dependent piece of the gauging (5.14), If we plug this expression into (5.2) we receive a contribution only from the internal components of the source terms. Summing over all source terms associated with the D3-branes, the D7-branes and the O7-plane gives a vanishing total result because the total C 4 charge along the internal space X 4 vanishes as a result of D3-brane tadpole cancellation. Nonetheless, each individual term by itself contains valuable information, namely (part of) the counterterms for the 1-loop gauge anomaly on the worldvolume of the respective branes. By construction of the Chern-Simons brane actions, these counterterms locally cancel the 1-loop anomaly associated with chiral modes on the worldvolume of the branes via the anomaly inflow mechanism [60][61][62]. Tadpole cancellation then implies that the sum of all counterterms vanishes globally, which equivalent to the statement of anomaly cancellation.
To extract the full anomaly inflow counterterm cancelling the 7-brane gauge anomalies from the 3-7 sector as well as the tangent bundle anomalies along the D3-brane, we follow the standard procedure [60][61][62] and rewrite the non-kinetic terms in the action (5.2) as The anomaly inflow counterterms now have two contributions. The first contribution comes from plugging the gauge variation (5.21) into S 1 , where in the first line we have used that A 2d a ′ = −A 2d a . In addition, the Chern-Simons forms appearing in S 2 vary according to (5.12). 15 After integration by parts we find a non-zero contribution because of the Bianchi identity (5.6). The relevant terms describing the anomaly inflow are obtained by plugging in only the last terms in (5.6), i.e. using dF 5 This gives a contribution of exactly the same form as (5.25) and hence altogether The terms (5.25) cancel the contribution to the 7-brane gauge group anomaly from the sector of 3-7 strings. By descent, the associated 1-loop anomaly polynomial is therefore because (5.27) represents the inflow counterterms to the actual 1-loop anomaly. As the trace structure clearly shows, this contribution is non-vanishing also for simple gauge groups, in contrast to the Green-Schwarz terms derived earlier.
From the perspective of the effective 2d (0, 2) theory, the gauging (5.21) translates into a gauging of the non-dynamical 2-forms obtained by dimensional reduction of C 4 in terms of internal 2-forms on X 4 . This offers an interesting perspective on the contribution (5.28) to the total anomaly polynomial: Rather than interpreting it as due to chiral localised defect modes we can view it as the effect of gauging these non-dynamical top-forms in the effective supergravity theory. This makes the formal similarity between the Green-Schwarz terms, associated with the gauging of the scalars from C 4 , and the 3-7 anomaly on the righthand side of (4.18b) more natural.
The remaining terms (5.26) cancel the contribution to the gravitational anomaly from all modes on the D3-brane worldvolume. This includes the 3-7 modes as well as the 3-brane bulk modes analyzed in detail in [33]. The associated anomaly polynomial is

F-theory lift
It remains to uplift the perturbative results for the Green-Schwarz terms and the 3-7 anomaly to a description in fully-fledged F-theory, defined via duality to M-theory on an elliptic fibrationX 5 . If a weakly coupled limit exists, the perturbative Type IIB Calabi-Yau X 4 is the double cover of the F-theory base B 4 , with projection π + : X 4 → B 4 .
With this in mind consider first the perturbative expression (5.28) for the 3-7 anomaly, with the aim of uplifting the sum over all brane stacks and their image to F-theory. A divisor on X 4 wrapped by a non-abelian stack of 7-branes on X 4 uplifts, together with its image under the involution, to a corresponding divisor on B 4 according to the above rule, and this divisor on B is a component of the discriminant locus carrying the corresponding non-abelian gauge group. More subtle are the non-Cartan abelian gauge groups. In Type IIB language, U (1) gauge symmetries which are massless in the absence of background flux are supported on linear combinations of divisors which are in the same class as their orientifold image. Hence each abelian gauge group factor U (1) A is associated with a linear combination of (typically several) divisor classes [D a ] + σ * [D a ] on X 4 .
Let us assume first that a brane configuration gives rise to no massless (in absence of fluxes) abelian gauge symmetries, i.e. the gauge group is only a product of non-abelian factors G I , Then the uplift of a TrF 2d a ∧ F 2d a ([D a ] + [D a ′ ]) to F-theory is Here we used (3.8) to express the correctly normalised trace to π * (E i I · E j J ).
In the presence of non-Cartan abelian symmetries, we must include these in the sum. In Ftheory language, a non-Cartan gauge group factor U (1) A is generated by a 2-form U A , defined via the Shioda-map as in (3.11), but typically there is no separate component of the divisor ∆ which we would associate with U (1) A . This is because, form a 7-brane perspective, massless (in absence of gauge flux) U (1)s involve combinations of several divisor classes. However, the height-pairing (3.13) defines a completely analogous object on the base B 4 including the information about the trace appearing in (5.28). Hence, the correct uplift of the expression for the 3-7 anomaly is Here [C] is the total class of the D3-brane on B 4 and we summing over all generators F Σ , Cartan and non-Cartan. The last line in addition uses (5.32). Hence (5.35) in precise agreement with our claim (4.16) for the 3-7 gauge anomaly.
Note that in (5.28), there appear no mixed anomaly contributions because in the perturbative limit the 3-7 strings can only be charged under the diagonal U (1) a gauge group of at most one D7-brane stack. On the other hand, if we sum over all massless (in absence of flux) U (1) A group factors (which are linear combinations of the U (1) a if a perturbative limit exists), mixed anomaly terms in general do result.
To uplift the 3-7 contribution to the gravitational anomaly polynomial, we recall from [66] the general rule that π * + (c 1 (B 4 )) = [O7], and therefore The resulting expression had already been derived in [33].
It remains to uplift the Green-Schwarz anomaly polynomial (5.20) to F-theory. Consider an internal flux background associated with a line bundle whose structure group is identified with either a Cartan or a non-Cartan U (1) subgroup. Such fluxes uplift in F-theory to expressions of the form G 4 =F ∧ F Λ for the corresponding divisor generator that U (1) symmetry. Employing once more (3.8) and (3.13), an expression of the form Tr a F 2d a (F a ∧ [D a ] + σ * (F a ∧ [D a ])) uplifts to F 2d Σ (−π * (G 4 · F Σ )) .

(5.38)
This remains correct even if the flux, on the Type IIB side, is associated with a U (1) that is geometrically massive even before switching on the flux. Such fluxes lift to more general elements of G 4 [66,67]. Taking again into account the factor of 2 from (5.32) we therefore arrive at in agreement with our previous claim (4.17).

Relation to 2d effective action
For completeness, we can express our findings in the language of the 2d effective action and make contact with the formalism introduced in section 2. Indeed, straightforward dimensional reduction of the action (5.2) allows us to read off the kinetic metric g αβ , the coupling matrix Ω αβ and the gauging parameters Θ α A . This can be achieved by first performing the dimensional reduction in the language of Type IIB orientifolds and then uplifting the results according to the general rules described in section 5.4. We directly give the result in the language of F-theory: If we fix a basis ω α of H 4 (B 4 , R), the real scalar fields are obtained as Matching the 10d and 2d kinetic terms in (5.2) and (2.10), respectively, as well as the 10d self-duality condition F 5 = * F 5 with its 2d analogue (2.11) then fixes Dimensional reduction of the interaction terms in (5.2) finally identifies the gauging parameters in terms of the inverse matrixΩ satisfyingΩ αβΩ βγ = δ α γ . As a check, plugging this expression into (2.18) correctly reproduces our result (5.39) for the Green-Schwarz anomaly polynomial.

Example: SU (5) × U (1) gauge symmetry in F-theory
In this section we exemplify our general expressions for the anomaly relations in an F-theory compactification on a Calabi-Yau 5-fold with gauge group SU (5) × U (1). The four-dimensional version of this model and its flux backgrounds has been studied in great detail in the literature [26,57,66,68], and its extension to Calabi-Yau five-folds has been discussed in [29]. The geometry is sufficiently intricate to exemplify all interesting aspects of abelian, non-abelian and gravitational anomaly cancellation, while at the same time it avoids extra complications which arise when the codimension-two matter loci on the base B 4 are singular.

Geometric background and 3-7 states
We will briefly recall the properties of this model relevant for our discussion, referring for more details to [29] as well as to [26,68], whose notation we adopt.
We are considering the resolution of a Weierstrass model in Tate form defined by  and indicates that there are four codimension-two matter loci on B 4 with classes The subscripts denote the charges under the non-Cartan U (1) A associated with the divisor [68] 16 Note that in this example all of the codimension-two loci are smooth, while in principle they could exhibit singularities. In this case the chirality formula (3.23) would receive corrections [29]. The height pairing associated with U A is The D3-brane tadpole requires the inclusion of D3-branes wrapping a curve of total class C constrained as in (3.18). In the present example, each intersection point between C and the SU (5) divisor W carries one Fermi multiplet in the fundamental representation 5 q 1 of SU (5) [29] with U (1) A charge q 1 . The intersections with the remainder of the discriminant carry additional Fermi multiplets, whose determination is very subtle due to SL(2, Z) monodromies along C. In general some of these will have a non-zero U (1) A charge, while some may be completely uncharged under SU (5) × U (1) A . Our knowledge of the net contribution (4.14) of the 3-7 sector to the abelian anomaly together with its contribution to the gravitational anomaly [37] allow us to constrain this matter as follows: Let us adopt from the discussion around (4.12) the notation D 37 (R) for the divisor class on B 4 such that the effective chiral index of 3-7 states in representation R is given by χ(R) = −[C] · D 37 (R). Then D 37 (5 q 1 ) = W , and the remaining divisor classes are constrained by the abelian and gravitational anomaly as These equations are consistent with the assertion that, in addition to the states 5 q 1 , there is only one further type of 3-7 Fermi multiplets in representation 1 q 2 with charge assignments such that These values are in complete agreement with the perturbative limit of the compactification: To see this, recall from [66] that the Type IIB limit consists of a brane stack (plus image) with gauge group U (5) a and another brane-image brane pair carrying gauge group U (1) b . The geometrically massless U (1) symmetry is given by the linear combination U (1) [66]) and the normalization conforms with the definition (6.7) of the U (1) A generator. The 3-7 modes at the intersection of C with the U (5) a stack hence carry charge |q 1 | = 1 2 |(1 + 0)| and transform as 5 of SU (5) a and those at the intersection of C with U (1) b are SU (5) a singlets with charge |q 2 | = 1 2 |(0 − 5)|. The class (6.12) furthermore coincides with the class of the U (1) b brane as dictated by the 7-brane tadpole cancellation condition.
We stress that more generally the pattern of singlets in the 3-7 sector can be more intricate. What is uniquely determined, however, is the net contribution of the 3-7 states both to the gauge and the gravitational anomalies. Now we are in the position to check our proposal (2.20) within this example. As we have discussed before, we expect that the curvature and the flux induced anomalies should each cancel among themselves. Therefore, in the following we split our proof into three parts: We begin with the flux independent contribution to the anomalies and verify their precise cancellation as a result of rather sophisticated relations between the topological invariants of the resolved 5-fold. Next we consider the two different types of G 4 flux spanning the space of fluxes within H 2,2 vert (X 5 ) with the purpose of verifying in particular our proposal for the Green-Schwarz term (4.18), and it will be shown that the anomalies induced by the two G 4 fluxes are cancelled very neatly.

Curvature dependent anomaly relations
In this section, we verify that the conditions (2.20) for anomaly cancellation are satisfied in the absence of background flux, i.e. G 4 = 0. This amounts to evaluating (4.18a) for the gauge and (4.38a) for the gravitational anomalies.
The various 7-brane codimension-two matter loci C R have been listed in (6.6), and in the present example they are all smooth [29] such that the index theorem can be applied as in (4.1). With the help of the adjunction formula we find the following flux independent part of the chiral indices for the matter surfaces, (6.13) The first equation in (2.20), i.e. the purely non-abelian SU (5) gauge anomaly, has been verified in [29]. For this analysis to be self-contained, let us briefly recap the computation as a warmup. With the appropriate anomaly coefficients (2.9), c  where we have used (4.4). In addition, there is another contribution from anti-chiral fermions generated in the 3-7 sector. These modes transform in representation 5 q 1 and their chiral index is given by minus the point-wise intersection number −[W ] · [C] with [C] = 1 24 π * (c 4 (X 5 ) in the absence of flux. With the help of (6.3), their SU (5) anomaly contribution follows as Then the pure non-abelian SU (5) anomalies, in the absence of G 4 fluxes, indeed cancel, Now we switch gear to check the cancellation of the U (1) A gauge anomaly. As we have discussed above, there are two types of charged matter states in the 3-7 sector with different U (1) A charges. With the help of (6.9), their combined contribution to the abelian anomalies is This perfectly cancels the anomalies from the 7-7 sector, as it must since the Green-Schwarz counterterms vanish in absence of flux.
Finally, let us compute the gravitational anomalies. In absence of flux, gravitational anomaly cancellation is equivalent to (4.38a) over a generic base B 4 . This equation involves the Chern class c 5 (X 5 ) and c 4 (X 5 ) of the resolved Calabi-Yau five-foldX 5 . With the help of (6.2), we find Summing both terms up perfectly matches the RHS of (4.38a), In summary, we have checked that in this example with the absence of G 4 fluxes, all types of anomalies are cancelled by themselves and in agreement with (2.20).

Flux dependent anomaly relations
In the SU (5) × U (1) A model defined by (6.1), there only exist two types of gauge invariant 4-form fluxes G 4 ∈ H 2,2 vert (X 5 ) compatible with the SU (5) × U (1) A gauge group [66]. We choose a basis of fluxes as Here [U A ] is the 2-form class dual to the non-Cartan U (1) A divisor U A defined in (6.7), λ is a constant and F ∈ H 1,1 (B 4 ) is an arbitrary class parametrizing the flux. Both λ and F are to be chosen such that G 4 + 1 2 c 2 (X 5 ) ∈ H 2 (X 5 , Z). We now analyze the anomaly relations, including the Green-Schwarz terms, for both of these flux backgrounds in turn.

G A 4 flux
We begin with the flux background (6.22). The cancellation of non-abelian SU (5) gauge anomalies in the presence of G A 4 has already been verified in [29] so that we can focus on evaluating (4.18b), or equivalently (2.20b), for the U (1) A anomaly. To compute the flux dependent chiral index of the 7-brane various matter states, we need to extract the line bundle L R defined in (4.2) on the 7-brane codimension-two matter loci. Since G A 4 is simply the gauge flux associated with the non-Cartan factor U (1) A , we know that π * (G A 4 · S a R ) = q A (R)F | C R . It follows that and therefore The anomaly contribution (4.16) from the 3-7-brane sector is (6.8). Altogether this gives for the LHS of (2.20b) This is to be compared to the RHS of (2.20b) given by the Green-Schwarz counterterms (4.17) Hence (2.20b) and therefore (4.18b) hold.

G λ 4 flux
Verifying the anomalies in the presence of flux of the form G λ 4 is slightly more involved. In the sequel we heavily build on the analysis of [57], where this gauge background is described, in a compactification to four dimensions, as a 'matter surface flux'. Since the fiber structure is the same, we can extend these results to F-theory compactification on an elliptic 5-fold. Since we are now working over a base of complex dimension four, extra technical complications arise in the computation of the chiral index for the 7-brane ammeter, which we will solve in appendix C.
Key to computing the 7-brane matter chiralities is again the induced line bundle L R = π * (G λ 4 ·S a R ), given this time by A derivation can be found in section 5 of [57]. By Poincaré duality, the objects Y i describe curve classes on the respective matter codimension-two loci on the base, defined as the intersection loci The first Chern classes of the line bundles L 10 1 and L 5 3 can be expressed as the pullback of divisor classes from W to the respective matter loci, Hence we can straightforwardly compute the associated chiralities as integrals on B 4 By contrast, c 1 (L 5 −2 ) cannot be interpreted as the class of a complete intersection of a base divisor with C 5 −2 [57]. Each of the classes Y i defines a divisor class on C 5 −2 , dual to a curve. The technical difficulty is that Y 1 and Y 2 separately cannot be written as the pullback of a divisor class from the 7-brane divisor W to C 5 −2 . Rather, on W , the curves Y i are given by intersections where the class of these Tate coefficients have been listed in (6.4). In appendix C we will discuss how to evaluate the chirality of 5 −2 despite this complication, our final result being In light of the discussion of section (6.1), the chiral indices for the 3-7 matter states as induced by G λ 4 take the form χ 3−7 (5 q 1 ) = −[C]| flux · W (6.42) where the flux dependent piece of the 3-brane class reads To derive this latter result, recall from section 4.3 of [57] that up to irrelevant correction terms G λ 4 for λ = 1 is the class associated with one of the matter fibrations S a 10 1 . The result for π * (G λ 4 · G λ 4 ) = λ π * (G λ 4 · S a 10 1 can then be read off from (6.36). We are finally in a position to check the cancellation of anomalies in the presence of G λ 4 , beginning with the pure non-abelian gauge anomaly. Note the G λ 4 background does not induce any chirality for the 7-brane bulk matter. Together with the above explicit expressions for chiral indices in the 7-brane and the 3-7 sector, one can easily confirm that Next we turn to the G λ 4 dependent part of the abelian gauge anomalies. The combined 1-loop anomaly from the 7-7 and the 3-7 matter evaluates to For the 3-7 contribution we can either use (6.42) with the charge assignments (6.11), or directly evaluate the G λ 4 dependent component of (4.14). The combined 1-loop anomaly forms the LHS of (2.20b) and must be cancelled by the Green-Schwarz terms (4.17) appearing on the RHS. To compute the latter, we make again use of the interpretation of G λ 4 as one of the matter fibrations S a (10 1 ). Intersection this with the U (1) A generator U A in the fiber reproduces the U (1) A charge of 10 1 and therefore π * (G 4 · [U A ]) = λ C 10 1 · W = λ c 1 · W . (6.47) With this the Green-Schwarz terms are This perfectly cancels the 1-loop anomalies (6.46) and hence verifies the G λ 4 dependent part of (2.20b) or equivalently (4.18b).

Comparison to 6d and 4d anomaly relations
In this final section we compare the 2d anomaly relations (4.18) and (4.35) to their analogue in a 6d or 4d F-theory compactification on an elliptic fibrationX 3 orX 4 , respectively. The cancellation of all gauge and mixed gauge-gravitational anomalies in both these classes of theories is captured by two relations, each valid in H 4 (X 3 ) or H 4 (X 4 ), of the form These two homological relations have been shown in [26] to be equivalent to the intersection theoretic identities derived from the requirement of gauge and mixed gauge-gravitational anomaly cancellation in 6d [25] and 4d [27] F-theory vacua. In addition the cancellation of purely gravitational anomalies in 6d F-theory vacua poses an extra constraint on the geometry ofX 3 , which has no direct counterpart in 4d. 17 Interestingly enough, however, apart from this latter point anomaly cancellation in 6d and 4d F-theory vacua is based on the same type of homological relations.
While a general proof of these relations from first principles, and without relying on anomaly cancellation, is not yet available in the literature, these relations can be verified in explicit examples. 18 The details of such a verification appear to be completely independent of the choice of base of the elliptic fibration, including its dimension [26]. This raises the question if the same type of relations also holds on elliptically fibred Calabi-Yau 5-folds and if they play any role in anomaly cancellation in the associated 2d (0,2) theories.
The situation in compactifications to two dimensions looks rather more involved at first sight: As we have shown in section 4, there are two types of independent anomaly relations, (4.18), associated with the cancellation of the gauge anomaly, and another two, (4.35), for the pure gravitational anomaly. We will now see that the flux dependent part of these anomaly relations, (4.18b) and (4.35b), is in fact closely related in form to (7.1) and (7.2).
Consider first relation (4.18b) for the cancellation of the flux dependent part of the 2d gauge anomalies,

(7.3)
A priori (7.3) holds for every transversal flux G 4 , i.e. for every element G 4 ∈ H 2,2 (X 5 ) satisfying (3.16), including potentially non gauge invariant fluxes. Our first observation is that this relation can be generalized to 4 . Since the quadratic terms vanish by themselves thanks to (7.3), this is enough to establish the more general relation (7.4).
Let us now specialise one of the fluxes appearing in (7.4) to and analyze the resulting identity further by repeatedly using the projection formulae for suitable cohomology classes on B 4 andX 5 . In the sequel, unless specified explicitly, the symbol · denotes the intersection product onX 5 . Then with (7.5) the first term on the RHS takes the form Similar manipulations for the remaining two other terms on the RHS of (7.3) yield RHS of (7.3) = 3 π * D · G 4 · F (Γ · π * π * (F Λ · F Σ) ) . (7.11) As for the LHS, observe that Here we are using that in expressions of this form, the intersection of the divisor F Γ with the matter 3-cycle S a R in the fibre reproduces the charge β a Γ of the associated state with respect to U (1) Γ . As explained around (4.2), the expression on the right of (7.12) is the first Chern class of the line bundle induced by the specific flux G (1) 4 to which the matter states on C R couple. For the special choice (7.5) this line bundle is the pullback of a line bundle from B 4 . With this understanding, the intersection product appearing on the LHS can be further simplified as Altogether we have thus evaluated (7.4), for the special choice (7.5), to Repeating the same steps for the flux dependent gravitational anomaly relation (4.35b) leads to The terms in brackets are identical in form with the linear combinations of 4-form classes which are guaranteed to vanish on an elliptically fibered Calabi-Yau 3-fold and 4-fold by anomaly cancellation according to (7.1) and (7.2). We conclude that if the relations (7.1) and (7.2) hold also within H 4 (X 5 ), as suggested by the results of [26], this implies cancellation of the flux dependent part of the anomalies in 2d F-theory vacua for the special choice of flux (7.5). For more general fluxes, however, the constraints imposed on anomaly cancellation on a Calabi-Yau 5-fold seem to be stronger. In particular, a direct comparison with (7.1) and (7.2) is made difficult by the fact that (4.18b) and (4.35b) are quadratic in fluxes and a priori involve the intersection product on the matter loci C R , not on B 4 . For general G 4 backgrounds, this makes a difference, as we have seen in section 6.3. Furthermore, anomaly cancellation in 2d predicts the flux independent relations (4.18a) and (4.35a). Condition (4.35a) can be viewed as analogous, though very different in form, to the geometric condition on cancellation of the purely gravitational anomalies in 6d referred to in footnote 17. It would be very interesting to investigate if a deconstruction of the topological invariants appearing in (4.18a) and (4.35a), similar to the procedure applied for the Euler characteristic on Calabi-Yau 3-folds in [23,24], can lead to a geometric proof of these identities.

Conclusions and Outlook
In this work we have provided closed expressions for the gravitational and gauge anomalies in 2d N = (0, 2) compactifications of F-theory on elliptically fibered Calabi-Yau 5-folds. In particular, we have derived the Green-Schwarz counterterms for the cancellation of abelian gauge anomalies. The Green-Schwarz mechanism operates in a manner very similar to its 6d N = (1, 0) cousin: Dimensional reduction of the self-dual Type IIB 4-form results in real chiral scalar fields whose axionic shift symmetry is gauged and whose Chern-Simons type couplings hence become anomalous. We have uplifted our results for the gauging and the couplings to an expression valid in the most general context of F-theory on elliptically fibered Calabi-Yau 5-folds. Anomaly cancellation in the 2d (0, 2) supergravity is then equivalent to (4.18) for the gauge and (4.35) for the gravitational part. Each equation splits into a purely geometric and a flux dependent identity. These must hold separately on every elliptic Calabi-Yau 5-fold and for every consistent background of G 4 fluxes. We have verified this explicitly in a family of fibrations and for all vertical gauge fluxes thereon.
It is instructive to compare these 2d anomaly cancellation conditions to their analogue in 6d and 4d F-theory vacua in the form put forward in [25] and [27], respectively. The structure of anomalies as such becomes more and more constraining in higher-dimensional field theories. At the same time the engineering of the quantum field theory in terms of the internal geometry becomes more intricate as the dimension of the compactification space increases, and hence the number of large spacetime dimensions decreases. Correspondingly, the topological identities governing anomaly cancellation on elliptic 5-folds contain considerably more structure compared to their analogues in 4d and 6d F-theory compactifications. For once, the anomaly relations in 6d N = (1, 0) F-theory vacua are only sensitive to the topology of the elliptic fibration, while in 4d N = 1 theories they are linearly dependent on a gauge flux. In 2d N = (0, 2) F-theories, both a purely topological and a flux dependent contribution arises. The latter is, in fact, quadratic in the gauge background.
Despite differences in structure, the 6d and 4d gauge anomaly relations of [25] and [27] can be reduced to one single identity [26], valid in the cohomology ring H 2,2 (X n ) of an elliptically fibered Calabi-Yau n-fold, with n = 3 and 4, respectively. The same is true for their mixed gauge-gravitational counterparts. One motivation for the present work was to investigate these universal identities, (7.1) and (7.2), with respect to anomaly cancellation in 2d F-theories. The flux-dependent parts of (4.18) and (4.35) exhibit striking similarities to (7.1) and (7.2). We have shown that if the 6d and 4d universal relations hold also in the cohomology ring of an elliptic 5-fold, as suggested by the examples studied in [26], they imply the flux dependent anomaly relations at least for the subset of gauge backgrounds associated with massless U (1) gauge groups. It would be very interesting to study further if also the converse is true, i.e. if the 2d relations allow us to establish a relation in the cohomlogy ring of elliptic 5-folds governing the 4d and 6d anomalies as well. The flux-independent anomaly relations, on the other hand, seem not to be related in a straightforward manner to the structure of anomalies in higher dimensions. In fact, already in 6d N = (1, 0) F-theory vacua, cancellation of the purely gravitational anomalies implies another topological identity with no counterpart in 4d. This relation has been proven quite generally in [23] using a deconstruction of the Euler characteristic of elliptic 3-folds. It would be worthwhile exploring if a similar proof is possible on Calabi-Yau 5-folds.
The structure of anomalies in 6d and 4d F-theory vacua is closely related to the Chern-Simons terms in the dual M-theory in five [52,69,70] and three dimensions [27,71,72]. In [28] this reasoning has lead to a proof of anomaly cancellation in 4d N = 1 vacua obtained as F-theory on an elliptic Calabi-Yau 4-fold. It would be very interesting to extend such reasoning also to the 2d case. The Chern-Simons terms in the dual 1d N = 2 Super-Quantum-Mechanics have been analyzed in [29] and expressed geometrically in terms of data of the Calabi-Yau 5-fold. As expected, the similarities between the resulting identities such as (10.8) in [29] and the 2d anomaly conditions are striking.
At a more technical level, the expressions for the anomalies presented in this work are valid under the assumption that the loci on the base hosting massless matter are smooth. Quite frequently, this assumption is violated, and an application of the usual index theorems requires a normalization of the singular loci [29]. We leave it for future investigations to establish the anomaly relations in such more general situations. Likewise, in the presence of Q-factorial terminal singularities in the fiber the precise counting of uncharged massless states in terms of topological invariants will change. In 6d F-theory vacua, this leads to a modification of the condition for cancellation of the gravitational anomaly [73,74], and similar effects are expected to play a role in 2d models.
Our focus in this work has been on the implications of anomaly cancellation rather than on the structure of the effective 2d N = (0, 2) supergravity per se. The axionic gaugings induced by the flux background, as derived in this context, give rise to a Kähler moduli dependent D-term, as noted already in [29]. What remains to be clarified is a careful definition of the chiral variables in the supergravity sector and a comparison of the Green-Schwarz action to the superspace formulation put forward in 2d (0,2) gauge theories in [47][48][49]. This will also determine the correct normalization of the D-term. At the level of the supersymmetry conditions induced by the flux, we have made, in passing, an interesting observation: Extrapolating from the situation on Calabi-Yau 4-folds we expect the existence of G 4 backgrounds which are not automatically of (2, 2) Hodge type and would hence break supersymmetry [54]. More precisely, whenever H 2,2 (X 5 ) contains (2, 2) forms which are not products of (1, 1) forms, it is expected that the Hodge type of a 4-form varies over the complex structure moduli space. This would constrain some of the complex structure of the 5-fold [54]. This makes it tempting to speculate that the contribution of the supergravity sector to the purely gravitational anomaly should change compared to a background without flux. At the same time, the flux dependent contribution to the D3-brane tadpole modifies the class of the D3-branes in the background and therefore also the anomaly contribution from the sector of 3-7 string modes. For consistency, both effects have to cancel each other, which is in principle possible due to the opposite chirality of the fields involved. In this sense the net effect of complex moduli stabilization would be topological, in stark contrast to the situation in 4d N = 1 compactifications. More work on elliptically fibered 5-folds is needed to flesh out the details behind this phenomenon.

A Conventions
In this appendix we collect our conventions for the technical computations in this paper.

A.1 Local Anomaly
Our conventions for the anomaly polynomial mostly follow [75]. Consider a quantum field theory in D = 2r-dimensional Minkowski space M 2r with quantum effective action S[A], where A α is the connection associated with a local symmetry of S with gauge parameter ǫ α . The anomaly A α is defined as the gauge variation It is expressible as where the 2r-form I 2r (ǫ) is related to (2r + 2)-form I 2r+2 via the Stora-Zumino descent relations In our sign conventions, the anomaly polynomial I 2r+2 of a complex chiral Weyl fermion in representation R takes the form Here F is the hermitian field strength associated with the gauge potential A and T denotes the tangent bundle to spacetime. Its curvature 2-form R is the curvature associated with the spin connection. Furthermore, in 2r = 4k + 2 dimensions, a self-dual r-tensor contributes to the gravitational anomalies with The A-roof genus and the Hirzebruch L-genus above can be expressed aŝ We will oftentimes write the first Pontrjagin class of the tangent bundle as Note that we have included an overall minus sign in (A.4) and (A.5) compared to the conventions used in [75]. The reason is that in the quantum field theory we are analyzing the chiral fermion fields arise as the zero-modes of strings on the worldvolume of 7-and 3-branes. The anomalies induced by these modes on the brane worldvolume must be cancelled via an anomaly inflow mechanism by the anomalous Chern-Simons action of the branes. This relates the sign of the 1-loop anomalies to the sign conventions used for the Chern-Simons brane actions. As we will discuss below, the sign of the 7-brane Chern-Simons action is fixed as in (A.10) by the convention that the 7-brane couples magnetically to the axio-dilaton, which is usually defined in F-theory as τ = C 0 + ie −φ (rather than −C 0 + ie φ ). The sign chosen in (A.10) conforms with this convention. In order for the anomalies of chiral fermions in the worldvolume of a D7-brane to be cancelled by anomaly inflow, we must then adopt the convention (A.4).

A.2 Type IIB 10D supergravity and brane Chern-Simons actions
The bosonic part of the 10d Type IIB supergravity pseudo-action in its democratic form is given by Here we are working in conventions where the string length ℓ s = 2π √ α ′ ≡ 1 and the field strengths are defined as together with the duality relations F 9 = * F 1 , F 7 = − * F 3 , F 5 = * F 5 , which hold at the level of equations of motion.
The Chern-Simons action for the D7-branes and the O7-plane takes the form . (A.10) Since we are working in the democratic formulation, where each RR gauge potential is accompanied by its magnetic dual, the Chern-Simons action has to include a factor of 1 2 [61], which we are making manifest in (A.10). This factor is crucial in order to obtain the correctly normalized anomaly inflow terms, and, as we find in the main text, also to reproduce the correctly normalised Green-Schwarz counterterms. As stressed already, the minus sign in front of the Chern-Simons action of the D7-branes ensures that in the above conventions for the supergravity fields the D7-brane couples magnetically to the axio-dilaton τ = C 0 + ie −φ . Note furthermore that we are writing the brane action in terms of Tr = 1 λ tr fund , where the Dynkin index λ is given in Table 3.1. Finally, TD 7 and ND 7 denote the tangent and normal space to the 7-brane along D 7 , and similarly for the O7-plane. The Chern-Simons action for a D3-brane carries a relative sign compared to the 7-brane action, The gauge invariant field strength F above is defined as Compared to expressions oftentimes used in the literature we have absorbed a factor of 1 2π in the definition of F. The NS-NS two-form field B 2 is pulled back to the brane via φ * . We will always set B 2 = 0 in this article, but one should bear in mind that it appears in various consistency conditions as detailed e.g. in [76]. We will sometimes decompose F = F +F (A. 13) so that F denotes the gauge invariant field strength of the gauge field in non-compact flat space whilē F stands for the internal flux background. Note that it is the hermitian field strength F which appears in the anomaly polynomial (A.4). Finally, the curvature terms in the above Chern-Simons actions enjoy the expansion Â (TD 7 ) A(ND 7 ) = 1 + 1 24 Here we have used the definitions (A.6) together with the fact that c 1 (TD) = −c 1 (ND) by adjunction on the Calabi-Yau space on which we compactify the Type IIB theory

A.3 Type IIB orientifold compactification with 7-branes
In a Type IIB orientifold compactification on a Calabi-Yau 4-fold X 4 , the orientifold projection Ω(−1) F L σ acts as in the more familiar case of compactification on a 3-fold, as summarized e.g. in [77]. In particular, the p-form fields transform under the combined action of worldsheet parity Ω and left-moving femrion number (−1) F L as The holomorphic involution σ acts only on the internal space X 4 such that the Kähler form J and the holomorphic top-form Ω 4,0 transform as The cohomology groups H (p,q) (X 4 ) split into two eigenspaces H (p,q) (X 4 ) = H Under the orientifold action the field strength on each brane is mapped to its cousin on the orientifold image brane where the minus sign is due to the worldsheet parity action.

B Anomalies and Green-Schwarz term in Type IIB orientifolds
In this appendix we verify our intermediate results (5.20) for the Green-Schwarz terms in Type IIB orientifolds. Together with our confirmation of the final F-theoretic expressions in the explicit example of section 6, this also supports our rules explained in (5.4) for the correct uplift to F-theory.
The setup we analyze is identical to the one in appendix C.2 of [29], which we now briefly summarize. Consider a Type IIB orientifold on a general Calabi-Yau 4-fold X 4 with gauge group (SU (n) × U (1) a ) × U (1) b . The brane configuration consists of n 7-branes wrapping a divisor W and one extra D7-brane along the divisor V , each accompanied by their orientifold images wrapped along W ′ and V ′ , respectively. We assume that all brane divisors are smooth. In order to cancel the D7-tadpole, it is required that Here L W and L V denote line bundles on W and V whose structure groups are identified with U (1) a and U (1) b , respectively.
For simplicity, we require to prevent the gauge potentials associated with U (1) a and U (1) b from acquiring a mass, in absence of flux, via the geometric Stückelberg mechanism. 19 We simplify the calculation of the U (1) a anomaly contribution further by assuming This implies that there exists no intersection locus of W and W ′ away from the O7-plane, which would carry matter in the symmetric representation of SU (n). This would lead to extra complications in the computation of the chiral spectrum, which we avoid by requiring (B.5). For the same reason we make the simplifying assumption that None of these assumptions is essential, but dropping them would require some modifications of the anomaly computation.
We are now in a position to determine the contribution to the U (1) a − U (1) a and the U (1) b − U (1) b anomaly due to the chiral matter states. Since our primary interest here is to check the Green-Schwarz counterterm (5.20) and its normalization relative to the 1-loop anomalies, it suffices to focus on the flux-dependent contribution of these states. The chiral spectrum from the D7-D7 brane sector and the flux dependent part of its contribution to the anomalies are listed in table B.1, and similarly for the 3-7 sector in table B.2. Note that we have omitted matter in the adjoint representation, which is not charged under U (1) a and U (1) b . We adapt the convention (A.4) for the anomaly polynomial so that there is overall factor of −1 in front of every term in Table B.1, while in Table B.2 we have taken into account the anti-chiral nature of the 3-7 matter, which hence contributes with a +1. Merely to save some writing, we have assumed, in the column containing the U (1) 2 a anomalies, that L V = 0, and similarly in the column containing the U (1) 2 b anomalies that L W = 0. Furthermore, with our assumption (B.5) all matter on W ∩ W ′ transforms in the anti-symmetric representation of U (n), while due to (B.6) the states on V ∩ V ′ are all projected out (as there exists no anti-symmetric representation of U (1) b ). The total anomaly from the 7-7 sector is then obtained by summing over all states in table Table B.1 and dividing the final result by two. The division by two is due to the orientifold quotient. Table B.1 contains sectors in this upstairs picture which are pairwise identified under the involution. To offset for this overall factor of 1 2 in the invariant sector W ∩ W ′ we are including a factor of 2 for these states in Table B 19 Otherwise, a D5-bane tadpole cancellation must be imposed on the gauge background.

C Chirality computation for matter surface flux
In this appendix we compute flux dependent part of the chiral index (6.41) induced for states in representation 5 −2 by the gauge background G λ 4 in the SU (5) × U (1) A model of section 6.3. The matter surface C 5 −2 ⊂ W ⊂ B 4 is cut out by the locus P ∩ W on B 4 with P := {a 1 a 4,3 − a 2,1 a 3,2 = 0} . (C.1) The classes in which the Tate polynomials a i,j take their value are listed in (6.4). As discussed in section 6.3, our task amounts to computing where [Y 1 ] and [Y 2 ] denote the classes of eponymous curves on the surface C 5 −2 ⊂ W ⊂ B 4 . These curves cannot be expressed as the complete intersection of the surface C 5 −2 with a divisor from B 4 , but are defined by the complete intersection of 7-brane divisor W with two divisors on B 4 . Concretely, from (6.40) we read off We hence need to evaluate the intersections C 5 −2 [Y i ] · [Y j ] for i = 1, 2. The self-intersections of Y i on C 5 −2 are computed via where the first Chern class of the normal bundle N Y i ⊂C 5 −2 is computed via the normal bundle short exact sequence The normal bundles are given as The integral (C.5) can now be expressed as an integral directly on W , Since all involved classes are defined on or can be extended to B 4 , this evaluates to 13) in terms of the intersection product on B 4 , where we are using (C.4) and (6.4).
The remaining task is to compute the cross-term . We note that even though the curves Y i cannot individually be written as the complete intersection of a divisor with the divisor P defining C 5 −2 , the combination Y 1 + Y 2 is of this simpler form: Indeed on W we have that (C.14) Since C 10 1 = {a 1 = 0} we can then write on In particular, with [a 1 ] = c 1 , where the last intersection is taken on B 4 . The idea is then to express the cross-term as Plugging everything into (C.2) leads to the final result (6.41).