Chiral Four-Dimensional F-Theory Compactifications With SU(5) and Multiple U(1)-Factors

We develop geometric techniques to determine the spectrum and the chiral indices of matter multiplets for four-dimensional F-theory compactifications on elliptic Calabi-Yau fourfolds with rank two Mordell-Weil group. The general elliptic fiber is the Calabi-Yau onefold in dP_2. We classify its resolved elliptic fibrations over a general base B. The study of singularities of these fibrations leads to explicit matter representations, that we determine both for U(1)xU(1) and SU(5)xU(1)xU(1) constructions. We determine for the first time certain matter curves and surfaces using techniques involving prime ideals. The vertical cohomology ring of these fourfolds is calculated for both cases and general formulas for the Euler numbers are derived. Explicit calculations are presented for a specific base B=P^3. We determine the general G_4-flux that belongs to H^{(2,2)}_V of the resolved Calabi-Yau fourfolds. As a by-product, we derive for the first time all conditions on G_4-flux in general F-theory compactifications with a non-holomorphic zero section. These conditions have to be formulated after a circle reduction in terms of Chern-Simons terms on the 3D Coulomb branch and invoke M-theory/F-theory duality. New Chern-Simons terms are generated by Kaluza-Klein states of the circle compactification. We explicitly perform the relevant field theory computations, that yield non-vanishing results precisely for fourfolds with a non-holomorphic zero section. Taking into account the new Chern-Simons terms, all 4D matter chiralities are determined via 3D M-theory/F-theory duality. We independently check these chiralities using the subset of matter surfaces we determined. The presented techniques are general and do not rely on toric data.


Introduction and Summary of Results
Four-dimensional F-theory compactifications provide a broad domain of the string theory landscape with the potential to derive promising particle physics consequences of string theory. It has a number of advantages, such as encoding geometric structures of string theory compactifications at a finite string couplings. The main focus in recent years has been on studies of F-theory GUT models with SU(5) as well as SO (10) gauge groups, initiated in [1,2,3,4] within local model building. Techniques for constructions of global models were developed in [5,6,7,8,9], and efforts to embed local models into global ones have been pursued, see e.g. [10,11,12] for reviews.
The origin of non-Abelian gauge symmetries in four-dimensional F-theory compactifications is well understood since the origins of F-theory [13,14,15], and it is due to the full classification of codimension one singularities of elliptically fibered Calabi-Yau fourfolds with a section in the Weierstrass or Tate model [16,17,18]. Matter multiplets appear at co-dimension two singularities and were studied originally in [13,14,19] and more recently in [9,10,11,12]. 1 Constructions with chiral matter in four-dimensions require the addition of G 4 -flux, which belongs to the middle (vertical) cohomology on the resolved Calabi-Yau fourfold. Specific fluxes of this type were constructed in [24,21].
On the other hand Abelian gauge symmetries in F-theory are less understood and studied. This is primarily due to the fact that the classification of Abelian gauge symmetries and their matter spectrum depends crucially on the global geometry of the elliptic fibration. Nevertheless, some aspects of Abelian gauge symmetries have been studied in local F-theory models employing spectral cover methods [25,26,6,27,28,29,30,31]. The study of higher rank Abelian sectors in four-dimensional F-theory compactifications is also of phenomenological interest, since it can play an important rôle in model building beyond the Standard Model model.
Abelian gauge theory sectors appear in compactifications of F-theory on elliptic Calabi-Yau varieties with a general fiber being an elliptic curve with rational points. Elliptic curves with a so-called non-trivial Mordell-Weil group of rational points are a classical subject in mathematics [32,33,34,35,36]. These rational points lift to rational sections of the elliptically fibered Calabi-Yau manifold, which contribute new harmonic two-forms to the cohomology that support Abelian gauge fields in the Ftheory effective action. The number of Abelian gauge fields is set by the rank of the Mordell-Weil group of the elliptic curve and its torsion subgroup gives rise to non-simply connected groups [15,37,38]. Rank one Mordell-Weil groups in compact elliptic fibrations have been studied recently in the F-theory literature in a variety of contexts [39,40,41,42,43,44,44,45,46,47]. Elliptic fibrations with elliptic fiber of D 5 -type have been constructed in the context of counting BPS states in [48]. The resolutions of their most general fibrations, which have a Mordell-Weil group of rank three, as well as the complete induced F-theory matter spectrum have been analyzed in [49].
While a classification of possible Abelian gauge sectors in F-theory, analogous to the well-studied non-Abelian sector, is lacking (see, however [50] for a systematic study of rational sections on toric K3-surfaces), significant progress has been made recently for the systematic study of U(1) × U(1) gauge symmetry on elliptically fibered Calabi-Yau manifolds with a rank two Mordell-Weil group [46,51]. 2 The analysis found that the natural presentation of an elliptic curve with two rational points and a zero point is the generic Calabi-Yau one-fold in dP 2 and the birational map to its Tate and Weierstrass form was derived [51]. While the discussion of its resolved elliptic fibrations was done for a Calabi-Yau variety over a general base B, their classification was first performed for the base B = P 2 and later for any two-dimensional base B in [54]. One key finding of this classification, which we further elaborate on also in this work, was the identification of all topological degrees of freedom in the construction of a fibrations of a fixed elliptic curve over a fixed base B. These are encoded in the choice of two divisor classes S 7 , S 9 [51]. Allowing for all their possible values yields elliptic fibrations with novel properties, most notably with a non-holomorphic zero section, that were not constructed before because the existence of a holomorphic zero section was enforced. Next, a thorough analysis of the generic codimension two singularities of this most general family of elliptic Calabi-Yau threefolds was given. This determines geometrically all the matter representations under U(1) × U(1) and their multiplicities, that were shown to be consistent with anomaly cancellations in the six-dimensional compactified theory. Explicit toric examples were constructed, both with U(1) × U(1) and SU(5)× U(1)× U(1) gauge symmetries.
It is the purpose of this paper to develop explicit techniques for the calculation of the matter spectrum and their chiralities for four-dimensional F-theory compactifications with two U(1)-factors. This involves now F-theory compactifications on elliptically fibered Calabi-Yau fourfolds with rank two Mordell-Weil groups. Furthermore the appearance of the chiral matter requires an explicit construction of G 4 -flux. We would like to emphasize that our calculations are performed for general globally defined elliptic Calabi-Yau fourfolds and are not restricted to geometries described by toric reflexive polytopes. In particular, we find closed formulas for the basis of the vertical cohomology groups, the consistent G 4 -flux and the chiral indices for entire discrete families of Calabi-Yau fourfolds which depend explicitly on the aforementioned degrees of freedom S 7 , S 9 of these families. We underline that even if each member of this family could be realized torically, it would be hard to obtain this dependence on S 7 , S 9 by considering reflexive polytopes. In recent works [45,55,47] a classification of toric Calabi-Yau fourfolds with SU (5) and allowed U(1) factors was given (See also [46]). Note however that techniques employed have, at least to the knowledge of the authors, not culminated in the determination of the matter representations and their 4D chiralities yet which are the main results of this paper.
We advance the program in several important ways: • The general elliptic fiber is the generic Calabi-Yau one-fold in dP 2 with two rational points and a zero point (as analyzed in detail in [51]). The chosen fiber determines the representations of the matter multiplets under U(1) × U(1) over any base B. The spectrum for U(1) × U(1) and SU(5)× U(1) × U(1) (for a specific SU (5)) is derived and summarized in table 1.1. However, the analysis is performed now over a general threedimensional base and the matter appears over codimension two Riemann surfaces in the base, denoted as matter curves. We employ explicit algebraic geometry techniques using prime ideals 3 to represent these matter curves and classify the singularities of the elliptic fibration over them using the Calabi-Yau fourfold with the resolved elliptic fibration (See sections 2, 3.1 and 6.1). At present these techniques allow us, however, to determine only a subset of matter surfaces (three out of six in the U(1) × U(1) and six out of twelve in the SU(5) × U(1) × U(1) case).
• As a preparation for the construction of G 4 -flux on these Calabi-Yau fourfolds, we find for the first time consistent conditions on the G 4 -flux in F-theory compactifications with a non-holomorphic zero section. These conditions have to be formulated in three dimensions after the compactification on a circle and require the use of M-theory/Ftheory duality. We show the connections between holomorphicity of the zero section and Kaluza Klein-states via Chern-Simons (CS) terms on the 3D Coulomb branch. In particular, there are new CS-terms for a non-holomorphic zero section.
• We develop techniques to calculate explicitly the most general G 4 -flux that belongs to the vertical cohomology H (2,2) V resolved Calabi-Yau fourfolds (See Section 3.2 and 4). To this end we algebraically calculate the full vertical cohomology ring of these Calabi-Yau fourfolds. These cohomology calculations allow us to compute the general expression for the Euler number and the Chern classes of these fourfolds for an arbitrary base B, both in the U(1)×U(1) and SU(5)×U(1)×U(1) cases. As an application of these techniques we derive an explicit basis of the cohomology group for all elliptically fibered Calabi-Yau fourfolds with fiber in dP 2 and base B = P 3 . 4 Again these techniques are general and not restricted to toric examples. In particular the dependence on the divisors S 7 , S 9 is manifest. When the G 4 -flux is integrated over matter surfaces (determined via the geometric techniques mentioned above) we obtain the chiralities of three matter representations (second set in Table 1.1). Chiralities of the remaining matter representations are determined by a subset of the 3D CS-terms of the dual M-theory invoking M-/F-theory duality. 4D anomalies are found to be cancelled. We note that the rest of the 3D CS-terms, in particular those for the Kaluza-Klein vector, provide an indepen-dent check for chiralities of matter multiplets obtained via geometric techniques. It is important to note that, given the list of representations that are realized, all CS-terms taken together are sufficient to determine chiralities of all the matter multiplets. Our geometric techniques allow us to have an independent determination for a subset of them (See Section 5). We also perform an independent check that with the obtained spectrum the four-dimensional anomalies are cancelled. Explicit results are presented for the most general G 4 -flux for all generic resolved elliptic Calabi-Yau fourfolds over the base B = P 3 , both for U(1) × U(1) and SU(5) × U(1) × U(1) (for a specific embedding of SU(5)).
We note that the fibrations over the chosen base B = P 3 are generally non-flat at a single codimension three locus. This can be circumvented in two ways. Either, one can forbid the existence of the non-flat fiber geometrically, or restrict the allowed G 4 -flux by requiring a vanishing integral of it over the non-flat fiber. Both approaches yield an anomaly-free 4D spectrum with no chiral excess of additional light states.
The paper is organized in the following way: In Section 2 we summarize the geometry of the general elliptic curve with rank two Mordell Weil group in dP 2 and classify its fibrations. Section 3.1 is devoted to the analysis of the codimension two and three singularities of the fibrations specifying, respectively, the matter content, the matter curves and surfaces as well as the Yukawa couplings. In Section 3.2 we determine the cohomology ring and Chern classes for resolved elliptic Calabi-Yau fourfolds with rank two Mordell-Weil group. Section 4 is devoted to a detailed discussion of G 4 -flux and conditions imposed on them in general F-theory compactifications with a non-holomorphic zero section. This study is based on relations between 3D Chern-Simons terms under F-theory/M-theory duality. A special emphasis is on quantum loop corrections due to Kaluza-Klein states, that are computed explicitly. In section 5 the general G 4 -flux is explicitly calculated (Section 5.1), and matter chiralities both geometrically and via 3D Chern-Simons terms of dual the M-theory are derived (Section 5.2). In Section 5.3 anomaly cancellation of the four-dimensional field theory is checked and in section 5.4 an explicit toric example is presented. A generalization to F-theory compactifications with an additional SU (5) non-Abelian gauge symmetry is spelled out in sections 6 and 7. In section 6.1 the singularities at codimension one, two (matter representations) and three (Yukawa points) are presented. A non-flat fiber at codimension three is discovered. The cohomology ring and the general Euler number are calculated in 6.2. In section 7 the G 4 -flux and the 4D chiralities are computed and anomaly cancellation is checked in detail for all elliptic fibrations with dP 2 -fiber over P 3 . Section 7.1 demonstrates the general construction of G 4 -flux in F-theory compactifications with rank two Mordell-Weil group and a resolved SU(5)-singularity with B = P 3 . In section 7.2 the 4D chiralities are evaluated and anomaly cancellation is checked. We finish the section with one concrete toric example in section 7.3. Conclusions and future directions can be found in section 8.
This work has seven appendices. Appendix A contains formulas for all Chern classes of dP 2 -elliptic fibrations over an arbitrary base B along with the Chern classes and Euler numbers for their resolved Calabi-Yau two-, three-and fourfolds. In appendix B we present the cohomology ring of the generic fourfolds with B = P 3 and dP 2 -elliptic fiber. Appendix C contains the Chern classes of dP 2 -fibrations with resolved SU(5)-singularities, in appendices D and E the intersections and vertical cohomology ring of fourfolds with B = P 3 are computed. Appendix F contains all 3D CS-terms and chiralities. Appendix G concludes by describing how to systematically construct the toric polytopes for the example of Calabi-Yau fourfolds with base B = P 3 .

The Elliptic Curve in dP And Its Fibrations
In this section we review the construction of the elliptic curve E in dP 2 and its Calabi-Yau elliptic fibrations over a general B. These Calabi-Yau manifolds have a rank two Mordell-Weil group, that gives rise to U(1)×U(1) gauge symmetry in F-theory.
In section 2.1 we review the geometry of E as the generic Calabi-Yau onefold in the del Pezzo surface dP 2 following the conventions and notations of [51], to which we also refer for more details. The reader familiar with the geometry of this elliptic curve E can safely skip the first part of the section. Then, in section 2.2 we construct resolved elliptically fibered Calabi-Yau manifoldsπ :X → X over an arbitrary base B with this elliptic curve E as the general fiber. The singular Calabi-Yau manifold is denoted by X We show that these Calabi-Yau manifoldsX are classified by the choice of two divisors S 7 , S 9 in the base B. In particular, we work out all the line bundles that are relevant to formulate the Calabi-Yau constraint ofX, which is the analog of the Tate model for elliptic fibrations with dP 2 -elliptic fiber.
The content of section 2.2 is a direct extension of the discussion in [51], where the possibility of a full classification of all Calabi-Yau elliptic fibrations with general fiber E was pointed out, but demonstrated explicitly only for B = P 2 .

The Elliptic Curve with Rank Two Mordell-Weil Group
The hypersurface description of the elliptic curve E with a zero point P and two rational points Q and R has been derived in [51] from the existence of a degree three ample line bundle M = O(P + Q + R) on E. The result of this analysis is that such an elliptic curve is naturally represented as the generic Calabi-Yau hypersurface in the del Pezzo dP 2 . The Calabi-Yau constraint in dP 2 takes the form p= u(s 1 u 2 e 2 1 e 2 2 + s 2 uve 1 e 2 2 + s 3 v 2 e 2 2 + s 5 uwe 2 1 e 2 + s 6 vwe 1 e 2 + s 8 w 2 e 2 1 ) + s 7 v 2 we 2 + s 9 vw 2 e 1 , (2.1) where we introduced the homogeneous coordinates [u : v : w : e 1 : e 2 ] on dP 2 . 5 One readily checks that p is the most general section of the anti-canonical bundle K −1 dP 2 = O(3H −E 1 −E 2 ), by noting the following divisor classes of the homogeneous coordinates, divisor class C * -actions Here we also introduced the divisors D u , D v and D w obtained by setting u, v, w to zero, respectively. The group of divisors is generated by H, E 1 and E 2 whose geometric interpretation we give momentarily. We note that dP 2 is a toric variety with the (C * ) 3action on the homogeneous coordinates 6 specified by the last three columns of (2.2). Its reflexive two-dimensional polytope is given in figure 1. It is useful for our purposes to recall that a general del Pezzo surface dP n is obtained from P 2 by a blow-up at n generic points. Thus, the del Pezzo surface dP 2 is the blow-up 5 We deviate here from the conventions of [51] by denoting coordinates on dP 2 by [u : v : w : e 1 : e 2 ] and those on P 2 by [u : v : w ]. 6 Denoting one column vector in the last three columns of (2.2) by and the homogeneous coordinates collectively as x i , than the corresponding C * -action is defined as of P 2 at two generic points. In terms of the homogeneous coordinates [u : v : w ] on P 2 , this blow-up is performed in our case at u = w = 0 and u = v = 0, so that the blow-down map takes the form with the two sections e i associated to the exceptional divisors E i . We note that one can use this map to represent the elliptic curve E in (2.1) as a non-generic Calabi-Yau onefold in P 2 . As discussed in [51] this presentation of E suffices to obtain its Weierstrass model and discriminant. However, for the understanding of elliptic fibrations the completely resolved curve E in dP 2 with is inevitable.
The divisors classes in (2.2) are the classes of the e i , i.e. the exceptional divisors E i of the blow-up (2.3), and the divisor class H, that is the pullback of the hyperplane class on P 2 . We note the intersections on dP 2 are given as These intersections immediately follow on the one hand from the rule that two divisors corresponding to rays of the same two-dimensional cone have intersection number one and on the other hand from the exceptional set, the Stanley-Reissner ideal SR. The latter encodes all rays which do not share a two dimensional cone and have intersections number zero. From figure 1 one readily obtains SR = {uv, uw, e 1 e 2 , e 1 v, e 2 w} . (2.5) The rational points Q and R as well as the zero point P on E are simply given by the intersections of the three independent divisors in (2.2) with the elliptic curve (2.1). We have chosen the three different points on E that are obtained by intersecting the three divisors D u , E 1 and E 2 on dP 2 with p = 0 in (2.1). Upon setting all coordinates to one that can not vanish simultaneously with the divisor under consideration due to the exceptional set (2.5) we obtain . (2.6) The point P is considered as the zero point on E and the points Q, R are the rational points. They are the two generators of the rank two Mordell-Weil group of rational points, with the group law given by the addition of points on E. We note that these three points are generically distinct. P is always distinct from Q, however, we observe P = R for s 9 = 0 and Q = R for s 7 = 0.
When considering elliptically fibered Calabi-Yau fourfoldsX with the curve (2.1) as the general elliptic fiber, the points P , Q and R lift to rational sections of the fibration. We note that the coefficients s i in (2.1) are then base-dependent functions, that can vanish on B. In particular, we see from (2.6) that the points P , Q, and R, respectively, are ill-defined when s 8 = s 9 = 0, s 3 = s 8 = 0 and s 7 = s 9 = 0, respectively. This behavior is typical for rational sections and further discussed in section 3.1. In F-theory compactifications on such a fourfoldX each of the rational sections gives rise to an Abelian gauge symmetry. Thus, Calabi-Yau fourfolds with general elliptic fiber in dP 2 generically have a rank two Abelian gauge group, i.e. an U(1)×U(1) gauge symmetry.

General Calabi-Yau Fibrations with dP 2 -Elliptic Fiber
In this section we discuss the construction of resolved elliptically fibered Calabi-Yau manifoldsX with general elliptic fiber in dP 2 . The following results hold for general complex dimension ofX, in particular for Calabi-Yau three-and fourfolds. We end this section with the concrete example of B = P 3 .
Classifying dP 2 -fibrations and their Calabi-Yau hypersurfacesX In general an elliptically fibered Calabi-Yau manifold E →X π → B with π denoting the projection to the base B is constructed by first considering the defining equation for the desired elliptic curve E alone and then by lifting the coefficients in this equation to sections over the base B. In the case at hand, the elliptic curve is described by (2.1). Thus, all we have to do to obtain an elliptic fibration is to promote the coefficients s i to sections of line bundles on the base B. Finally, the Calabi-Yau condition for (2.1) fixes the respective line bundles for the sections s i .
The procedure of lifting the s i to sections of B is described as follows. First, we have to define the ambient space in which the elliptically fibered manifoldX → B is embedded. Since the constraint (2.1) merely cuts the elliptic curve E out of dP 2 , the ambient space is simply a dP 2 -fibration over the base B ofX. It takes the form which can be viewed as a generalization of a projective bundle. Here S 7 and S 9 are two divisors on B associated to the vanishing loci of the sections s 7 and s 9 in (2.1). The total space is denoted dP B 2 (S 7 , S 9 ) since it is uniquely determined by these divisors S 7 and S 9 if we demand that the constraint (2.1) defines a Calabi-Yau manifoldX. In fact, we first note that any the dP 2 -fibration is specified by only two divisors on B. This can be seen by noting that in a general such fibrations the homogeneous coordinates [u : v : w : e 1 : e 2 ] on dP 2 are sections of five different line bundles on the base B, respectively. However, we can always use the three C * -actions in (2.2) to eliminate three of these line bundles, so that only two of the five coordinates on dP 2 take values in non-trivial line bundles.
We make the following assignment of line bundles on B to the coordinates, where K B denotes the canonical bundle on B and [K B ] the associated divisor. All other coordinates on dP 2 transform as the trivial bundle on B. We note that this parametrization of the two line bundles for u and v is completely general, because S 7 and S 9 are completely general divisors on B at the moment.
Next, we use these results to readily calculate the total Chern class of dP B 2 (S 7 , S 9 ) from adjunction, see (A.2) in appendix A, from which we obtain its anti-canonical bundle where we suppressed the dependence on S 7 , S 9 for brevity of our notation. Then the Calabi-Yau condition implies that the constraint (2.1) has to be a section of K −1 dP B

2
. This immediately fixes the line bundles of all the sections s i on B. We summarize the sections defining the elliptically fibered Calabi-Yau manifoldX as follows O(S 9 ) (2.10) In particular we see that with the parametrization (2.8) the divisors S 7 and S 9 are indeed associated to s 7 and s 9 as claimed at the beginning.
Basic geometry of Calabi-Yau manifolds with dP 2 -elliptic fiber Having constructed the general elliptically fibered Calabi-Yau manifoldsX over B, we discuss next the group of divisors onX. By construction, the basis of divisors on a generic 7X is induced by a basis of divisors on the ambient space dP B 2 (S 7 , S 9 ), which consists of divisors of the base B and the fiber dP 2 . The divisors induced from a basis of divisors D b α of the base B are the vertical divisors D α = π * (D b α ) of the elliptic fibration π :X → B . Similarly, the classes H, E 1 , E 2 of the fiber dP 2 in (2.2) become divisors onX. Then, the points P , Q and R in (2.6) lift to, in general, rational sections of the fibration of π :X → B, denotedŝ P ,ŝ Q andŝ R , withŝ P the zero section. We denote the homology classes of the associated divisors by capital letters, In general, a rational section is a non-holomorphic map of the base B intoX, such asŝ P : B →X for example. A rational section B →X is ill-defined over codimension two loci to the effect that it wraps entire fiber components over these loci. From a given rational section, one can easily obtain a holomorphic section, i.e. a holomorphic map B →X, by a birational transformation, namely a blow-upB → B at those codimension two loci of B. Usually the zero sectionŝ P has been assumed to be holomorphic in Ftheory. Only lately, the possibility of a non-holomorphic zero sectionŝ P in F-theory has been studied [45,51,55]. The group of sections excluding the zero sectionŝ P is the Mordell-Weil group of rational sections onX, which in the case at hand is rank two and generated byŝ Q ,ŝ R . For brevity of our notation, we will occasionally denote the generators of the Mordell-Weil group and their divisor classes collectively aŝ There are some characteristic intersections involving the divisors S P , S Q and S R in (2.11) that immediately follow from the defining properties of a section. We list them in the following and refer to [59,43,44,51] for a more thorough discussion. We also give a simple criterion to distinguish between rational and holomorphic sections. A more detailed account on intersections in the presence of a rational zero section can be found in [55]. Here, we content ourselves with noting thatŝ P is holomorphic if S 9 = 0 or S 8 = 0, s Q is holomorphic if S 3 = 0 or S 7 = 0 andŝ R is holomorphic if S 7 = 0 or S 9 = 0, cf. the paragraph following (2.6) and [51].
The following intersections and definitions will be crucial in the rest of this work: Height pairing: Let us briefly comment on these intersections in the order of their appearance. The intersection (2.13) is an immediate consequence of the definition of a section: its divisor class intersects the general class of the fiber F ∼ = E at a point. The relation (2.14) can be shown by an adjunction argument, see section 3.2 for direct cohomology computations. Here we have defined the a projection onto the homology H 4 (B) of the base as for every complex surface C inX. The intersection pairings onX, respectively, B are denoted · and the Σ α = π * (Σ α b ) arise from a basis of curves Σ α b dual to the divisors D b α on B as indicated in the last equation in (2.19). We emphasize that in the case of a holomorphic section, the relations (2.14) hold in the full homology ofX as indicated in (2.16). The divisors S 7 , S 9 are the codimension one loci where the sections collide in the fiber E, as discussed below (2.6). They are encoded in the intersections (2.15). Next, we introduce the divisors σ(ŝ Q ), σ(ŝ R ) in (2.17). The map σ is the Shioda map that takes here the form where we introduced the combination [60, 61] We refer to [33,59,43,44,51] for more details on the Shioda map and to section 6 for the inclusion of an SU(5)-sector. We note that the divisors (2.17) support U(1)-gauge fields in F-theory due to their vanishing intersections with vertical divisors D α and the zero-section, as well as potential Cartan divisors D i of non-Abelian groups. Finally, we have calculated the intersection matrix of the Shioda map ofŝ Q ,ŝ R in (2.18).
We finish this section by some concluding definitions and remarks on the general structure of the fibrations (2.7) andX. First, we summarize the basis of divisors onX as where we have collectively denoted the basis (2.17) as σ(ŝ m ). We have also introduced one set of Cartan divisors D i with i = 1, . . . , rk(G) in order to prepare for the presence of a non-Abelian group G, as in section 6 with G =SU(5). These divisors D i are present for non-genericX with a resolved singularity of type G of the elliptic fibration over codimension one in B. The D i admit a fibration where the general fiber is a rational curve c −α i ∼ = P 1 that corresponds to the simple root −α i of G. The divisor S b G in B physically supports 7-branes that give rise to the non-Abelian gauge symmetry G in F-theory [14,15,18].
Next, we expand the canonical bundle K B of the base B in terms of the vertical divisors D α as with coefficients K α . Similarly, we expand the divisors with general positive integral coefficients n α 7 , n α 9 , α = 1, . . . , h (1,1) (B). It is important to emphasize that the coefficients n α 7 , n α 9 are in general further bounded from above by the requirement that all sections s i in (2.10) are generic, i.e. that the line bundle of s i admits sufficiently many holomorphic sections. If this is not the case we expect additional singularities inX, potentially corresponding to a minimal (non-Abelian) gauge symmetry in F-theory. For this reason, we will in the rest of this work assume thatX can be constructed with generic s i .
Despite these restrictions on the integers n α 7 and n α 9 we would like to point out that the constructions of the fibration (2.7) and ofX hold in general for an arbitrary base B and arbitrary complex dimension. In particular this analysis applies to an arbitrary choice of divisors S 7 and S 9 within these bounds. In particular the general construction here reproduce immediately the classification in [51] with B = P 2 as a special case. dP 2 -fibrations over B = P 3 with generic Calabi-Yau hypersurfacesX We conclude with the discussion of the special case B = P 3 , which will be considered in later sections of this work. In this case, there is only one divisor in the base, the hyperplane H B , so that the dP 2 -fibration (2.7) is specified only by two integers n 7 ≡ n 1 7 , n 9 ≡ n 1 9 . In this case we use the notation dP 2 / / dP 2 (n 7 , n 9 ) where we suppress the base B = P 3 when denoting the total space (2.7) of the fibration if the context is clear.
We note that K −1 P 3 = O P (4). In this case all sections s i exist iff all bundles in the second table in (2.10) have non-negative degree. This puts the following conditions on the integers n 7 , n 9 , 0 ≤ n 7 , n 9 ≤ 8 , n 7 + n 9 ≤ 12 , 0 ≤ 4 + n 7 − n 9 , 0 ≤ 4 + n 9 − n 7 . (2.27) The domain of allowed valued for n 7 and n 9 are displayed in figure 2. As we will see in section 5.4 we can torically construct the Calabi-Yau fourfoldsX for a wide range of values of n 7 , n 9 . The general strategy to build the corresponding reflexive polytopes is outlined in appendix G. It is satisfying, that in the toric context the conditions (2.27) are enforced by reflexivity of the toric polytope, i.e. for values n 7 , n 9 exceeding the bounds (2.27) the toric polytope is no longer reflexive.

Calabi-Yau Fourfolds with Rank Two Mordell-Weil
In this section we analyze F-theory compactifications to four dimensions on a generic elliptically fibered Calabi-Yau fourfoldX over a base B with general fiber E in dP 2 . These compactifications have a gauge theory with U(1)×U(1) gauge group and a number of chiral matter fields in representations 1 (q 1 ,q 2 ) . The possible U(1)×U(1)-charges (q 1 , q 2 ) have been determined recently in [46,51] and the full 6D anomaly-free spectrum including matter multiplicities has been derived for B = P 2 in [51].
Here we extend this geometric analysis to fourfolds. The main difference to the 6D case is that matter is not localized anymore at points in B, but on in general rather complicated matter curves. The determination of these matter curves and some of their associated matter surfaces, along with the Yukawa points, is presented in section 3.1. Then, in section 3.2 we present a method to determine the cohomology ring of the fourfoldX. We use these techniques to derive general expressions for the Euler number ofX and its second Chern class. For the example of B = P 3 we finally compute the full vertical cohomology group. These calculations serve as a preparation for the computation of 4D chiralities in section 5, which requires both the knowledge of matter surfaces and the construction of G 4 -flux.

Singularities of the Fibration: Matter Surfaces & Yukawa Points
We organize this section into a detailed discussion of codimension two singularities in section 3.1.1 and a very brief account on codimension three singularities in section 3.1.2.

Matter: Codimension Two
In general, the determination of the matter sector in F-theory vacua with general gauge group requires a detailed analysis of singularities of the elliptic fibration of the Calabi-Yau fourfold at codimension two in the base B, where the elliptic fiber E becomes reducible. Then one has to identify the isolated rational curve c w in the fiber over these loci, since these correspond in F-theory to matter in a representation R from wrapped M2brane states. These curves are in one-to-one correspondence to the weights w of the representations R and accordingly labeled. In the case of elliptically fibered Calabi-Yau fourfolds, the codimension two matter loci are Riemann surfaces of genus g, the so-called matter curves Σ R in B conveniently labeled by the corresponding matter representation R. In addition, for the determination of four-dimensional chirality, compare section 5, we have to know the homology classes of the associated matter surfaces which are constructed as the fibration of the rational curve c w corresponding to a given weight w of the representation R fibered over Σ R .
In this section we determine the matter curves Σ R and the matter surfaces C w R for the six representations occurring in the Calabi-Yau fourfoldX. As we demonstrate, their determination is complicated by the fact that three of the six the codimension two loci in the base B where the elliptic fiber E becomes reducible are themselves reducible curves. Their irreducible components are multiple different matter curves Σ R . Some of these matter curves, denoted Σ R , fail to be complete intersection and can only be described in terms of their prime ideals. These prime ideals are straightforwardly constructed from the two equations of the original reducible codimension two locus. However, the isolation of rational curves c w over those matter curves Σ R is very involved. Thus, in these cases we can not determine the corresponding matter surfaces (3.1) explicitly. Fortunately, we can obtain the other three matter surfaces straightforwardly, and are still able to determine the full F-theory matter spectrum for the fourfoldX, as outlined in section 5. It would be desirable, however, to reproduce the results obtained there invoking M-/Ftheory duality by direct geometric computation based on a better understanding of the matter surfaces C R in general.
In any case, we can qualitatively describe all the matter surfaces C w R by recalling the construction of the resolved fourfoldX. The smooth fourfoldX is formed by two consecutive blow-ups of a singular Weierstrass model X. We depict this schematically aŝ non-generic WSF X ⊂ (P 2 → B) non-generic cubic where the full blow-down mapπ :X → X is consequently a compositionπ = π 1 • π 2 .
On the left we have the smooth geometry with elliptic fiber constructed in section 2. It can be understood as a toric blow-up π 2 :X →X from a non-generic cubic in P 2 , with corresponding fourfold denoted byX. A final blow-down π 1 yields the singular Weierstrass form (WSF) X with P 2 (1, 2, 3)-fiber. The birational map π 1 is derived in detail in [51], see its defining equations Eqs. (3.18) and (3.20) therein.
Having the diagram (3.2) in mind, the three matter surfaces C R which have a simple description are those generated in the blow-up π 2 . There are three simple codimension two singularities inX, which are precisely the three simple matter curves Σ R . Their pullbacks under π 2 are precisely the matter surfaces C R = π * 2 (Σ R ). Because of the simplicity of both Σ R and the blow-up π 2 , these surfaces have a description as a simple complete intersection in the ambient space dP 2 (S 7 , S 9 ). In contrast, the other three matter curves Σ R are the loci of codimension two singularities in the WSF X, which are resolved by the map π 1 . However, these curves Σ R have a description only in terms of prime ideals and the map π 1 is not a simple toric blow-up but a fully-fledged birational map [51]. These two complications make an explicit determination of the surfaces C w Σ R hard. Nevertheless, the matter surfaces are again abstractly given by C R = π * 1 (Σ R ), which are ruled surfaces over Σ R . Thus, the determination of the exceptional loci of the map π 1 might be a first step towards an understanding of these matter surfaces.

Summary of Matter Representations & Their Matter Curves
Before going into technical calculations of matter curves and surfaces, let us briefly summarize the matter content as it has been determined in [46,51].
There are six different matter representations R = 1 (q 1 ,q 2 ) in the F-theory compactification on the fourfoldX. The list of realized U(1)×U(1)-charges, together with the cohomology class of the corresponding matter curves Σ R determined below, reads

Matter
Homology class of Σ R in B Here we used as before the notation [K −1 B ] for the anti-canonical divisor of the base and denoted the intersection on B as '·'. These representations of matter fields are modelindependent and in particular do not depend on the choice of base B. The last three matter representations arise from rational curves created in the blow-up π −1 2 in (3.2). Their matter curves are simply described by s 3 = s 7 = 0, s 7 = s 9 = 0 and s 8 = s 9 = 0 in the order of their appearance in (3.3). The first three representations arise from rational curves from the blow-up π −1 1 in (3.2). The determination of their matter curves is more involved and presented below.
All the matter representations in (3.2) arise from M2-branes on rational curves c w with wight w = (q 1 , q 2 ). These charges are calculated by the intersection of the curve c w with the Shioda maps σ(ŝ Q ), σ(ŝ R ) defined in (2.17) as All curves c w are part of an I 2 -fiber. Along the matter surfaces in (3.3) the general elliptic fiber E splits into two rational curves c 1 , c 2 ∼ = P 1 intersecting in two points with one curve, say c 1 , the original singular fiber and the other curve c 2 ≡ c w . We write this as I 2 -fiber : A cartoon of such a reducible fiber together with possible locations of the points P , Q and R is depicted in figure 3. In terms of the Calabi-Yau constraint (2.1) the split of E into an I 2 -fiber is visible as a factorization at a point pt ∈ Σ R as Here the two rational curves in (3.5) are described by one of these two factors, for example Matter Surfaces C (−1,1) , C (0,2) , C (−1,−2) and their Homology Classes Next, we determine the matter surfaces C w R for the last three representations in (3.3). As we will see, this is straightforward since the matter curves Σ R in these cases are irreducible varieties of the simple form s i = s j = 0 for appropriate i, j. This implies that the factorization of the elliptic fiber E = c 1 + c 2 is manifest over the entire matter curve Σ R and the matter surfaces C w R can be described by a complete intersection of three constraints in the ambient space dP B 2 (S 7 , S 9 ). Then its homology class is given simply by the product of the divisor classes of each of these constraints.
The resulting homology classes of matter surfaces read
Matter Curves Σ (1,0) , Σ (0,1) , Σ (1,1) and their Prime Ideals As mentioned before, the three remaining matter curves Σ R are themselves no simple complete intersections, but contained in a reducible codimension two subvarieties in B that are complete intersections. To isolate the component Σ R of interest we have to determine its prime ideal. This prime ideal is generated by more than two constraints, but still describes a codimension two variety in B. In addition, the factorization (3.6) describing the split E = c 1 + c 2 of the elliptic curve does not occur globally over the matter curves Σ R , but is manifest only at generic points of Σ R . These combined effects render the determination of the homology class of the matter surfaces C R unfeasible. However, we can obtain the homology class of the matter curves Σ R as shown next. For completeness we will also present the prime ideal for one illustrative example. In general the prime ideals are needed for a thorough analysis of codimension three singularities presented in section 3.1.2.
We begin with the determination of the homology classes of the matter curves Σ R . They can be obtained by first determining the homology class of the two equations for the reducible codimension two locus in B and by then subtracting the classes of those components Σ R we are not interested in. As in the six-dimensional case [51] we have to subtract the components Σ R with the right multiplicity, which is computed by the resultant 8 of the two equations at the root corresponding to Σ R . The resulting homology classes of this computations give the first three lines of (3.3). We work out these homology classes in detail in the remainder of this section.
First we present the equations for the reducible codimension two loci in B that contain the three matter curves Σ R that we are interested in as irreducible components. These codimension two loci read [51]  By calculating the associated prime ideals 9 of loc 1 we see that it has two irreducible components. One is obviously the matter curve Σ 1 (−1,−2) = {s 8 = s 9 = 0} and the other one is the matter curve Σ 1 (1,1) . Then we determine the homology class of the reducible variety loc 1 . We further recall from [51] that the order of the root (s 8 , s 9 ) = (0, 0) of the two polynomials in loc 1 is 4. Thus, decompose the class of loc 1 as where we used (2.10) and denote the equivalence relation in homology as ' ∼ ='. Here we also used that the homology class of Σ 1 (−1,−2) as given in the third line of (3.7) by the first two factors. Thus, we have obtained the homology class of Σ 1 (1,1) as in (3.3).

Yukawa Couplings: Codimension Three
At codimension three the singularities of the fibration enhance further signaling the presence of a Yukawa point. In the case at hand we find an enhancement to an I 3singularity, which is resolved into three intersecting P 1 's inX. The loci of I 3 -fibers are determined by looking at zeros of higher order of the discriminant and by checking whether the fiber in the resolutionX splits further. We find the following loci, We note that the first three agree with earlier results, see [46]. The last two loci also produce reducible fibers with three irreducible components that can be described in terms of the prime ideals. The study of these new Yukawa points, along with a more thorough discussion of the use of prime ideals, will be postponed to future work.

The Cohomology Ring and the Chern Classes ofX
In this section we abstractly calculate the cohomology ring of the fourfoldX. The central result of these computations is the basis of surfaces or dual (2, 2)-forms in H (2,2) (X), which is relevant for the construction of G 4 -flux, see section 5.1. Furthermore, for the calculation of the D3-brane tadpole and the quantization of the G 4 -flux, we use these techniques to calculate the general expression for the Euler number and the second Chern class ofX for a general base B. In addition, we derive the full cohomology ring explicitly for B = P 3 , leaving the straightforward generalization to other bases for future works.
We note that the presentation of the cohomology ofX used here has been employed in the context of toric mirror symmetry for a long time and is in this sense not new. For an F-theory context see e.g. [58,62] and references therein. We refer also to [21] for cohomology calculations in the same spirit. However, we emphasize that, except for the language that we borrow from toric geometry, the following discussion is based only on reasonable assumptions on the intersections ofX. Thus, we expect the following procedure to work also in the non-toric case. In particular, not all fourfolds considered here have, to our knowledge, a description in terms of a reflexive polytope, which does, however, not keep us from using them for F-theory and computing their full chiral 4D spectrum.
The basic idea to calculate the cohomology ring H ( * , * ) V (X) of a general elliptically fibered Calabi-Yau fourfoldX over a base B with general fiber the elliptic curve in dP 2 is to exploit the Stanley-Reissner (SR) ideal 10 SR of the ambient space dP B 2 (S 7 , S 9 ) together with the linear equivalences of divisors. After dividing out the linear equivalences, the cohomology ring H ( * , * ) V (X) can be represented as the quotient ring R of the form 11 where the basis (2.11) together with the vertical divisors D α are the variables of the free polynomial ring C[D α , S P , S Q , S R ] and SR is considered as an ideal in this ring. For this purpose, the ideal SR has to be translated into intersection relations of those divisors. Note that we have to multiply by the homology class ofX in dP B 2 (S 7 , S 9 ) in (2.9) to restrict the intersections on the ambient space dP B 2 (S 7 , S 9 ) toX. 12 By the Calabi-Yau condition this class is precisely given as O( The quotient ring (3.18) is graded with each graded piece being finitely generated by monomials in the divisors D α , S P and S m of appropriate degree. We denote this ring by R. The k-th graded piece is then identified with after restriction toX, i.e. after dropping the overall factor K −1 dP B 2 in (3.18). More precisely, at grade zero we obtain H (0,0) (X) = 1 , at grade one we have H (1,1) (X) = D α , S P , S Q , S R . At higher grade we obtain naively as many generators as homogeneous monomials of appropriate degree in the divisors in (3.18). However, due to equivalence relation in R the number of independent monomials is in general smaller. In fact, by 10 We merely borrow this term from toric geometry. In general, SR can be any ideal containing all vanishing intersections of divisors on dP B 2 (S 7 , S 9 ), which not necessarily has to be a toric variety. 11 We note that this polynomial ring is only the primary vertical cohomology H ( * , * ) V (X) [63]. This is the subspace of H ( * , * ) (X) relevant for G 4 -flux inducing chirality in F-theory. Its complement in H (2,2) (X) is the horizontal cohomology H (2,2) H (X) that encodes complex structure moduli ofX. See e.g. [58] for an analysis of G 4 -flux in H (2,2) H (X) in F-theory. 12 Generally, not all divisors onX arise as restrictions of divisors on the ambient space. However, for genericX with elliptic fiber in dP 2 , only divisors in B can potentially miss this assumption. We exclude those B in the following. Note that non-genericX can have additional divisors, see the footnote 13.
Poincaré duality the rings R (3) , and R (4) are fixed, i.e. the corresponding Hodge numbers are related as h (3,3) by reasons of dimensionality. In this sense the only non-trivial piece is R (2) ∼ = H (2,2) V (X), and the corresponding Hodge-number h (2,2) V (X). Furthermore, it is precisely the elements H (2,2) V (X) of independent surfaces on X into which the general G 4 -flux onX has to be expanded, as discussed in section 5.1.
The main advantage of the representation (3.18) compared to concrete toric models is that it allows us to determine the cohomology ring for all fibrations dP B 2 (S 7 , S 9 ) in (2.7) over a given base B with general divisors S 7 , S 9 . Of course the relevant computations depend on the geometry of the base B since the ideal SR in (3.18) in general is generated by the SR-ideal (2.5) of the fiber dP 2 and of the base B, which differs from case to case. Nevertheless, as we demonstrate next, it is possible to calculate the total Chern class c(X) and Euler number χ(X) ofX for any base B using minimal assumptions.

Second Chern Class and Euler Number ofX: General Formulas
For the purpose of finding the general expression for c(X) and, thus, the Euler number χ(X), it suffices to know, that the intersections of more than three vertical divisors D α in both dP B 2 (S 7 , S 9 ) andX are zero. The latter is true because of the properties of fibrations. Thus, we are working in the following with the ideal of vanishing intersections on dP B 2 (S 7 , S 9 ) generated by the ideal (2.2) of the fiber dP 2 supplemented by the vanishing of quartic intersection of vertical divisors, Here we have employed (2.10) in combination with (2.11) to translate (2.5) into intersection relations. The prime in SR reminds us that we are not working with the full SR-ideal of the base B, but just assume vanishing quartic intersections. As before '·' denotes the intersections product in dP B 2 (S 7 , S 9 ). Next we can perform the calculation of the total Chern class ofX. For this purpose we first compute the formal expression of the Chern class c(X) by adjunction, .
The numerator denotes the total Chern class of dP B 2 (S 7 , S 9 ) and the denominator is the Chern class of its anti-canonical bundle (2.9), which is the class ofX as mentioned above.
Then, we reduce this expression in the quotient ring (3.18) with SR replaced by the reduced ideal SR in (3.20). We refer to appendix A for the detailed calculations leading to the following results, as well as for the general expression of the total Chern classes c(dP B 2 ) and c(X) for Calabi-Yau two-, three-and fourfolds. We obtain for the second Chern class c 2 (X) ofX the expression where we have expressed all cohomology classes in terms of the basis of divisors (2.11) on the fiber dP 2 and the first and second Chern classes c 1 ≡ c 1 (B), respectively, c 2 ≡ c 2 (B) of the base B. By abuse of notation we denote a divisor and its Poincaré dual (1, 1)-form by the same symbol.
As a first sanity check we note that (3.22) is consistent with the formula for the second Chern class of a fourfold with a generic E 6 -elliptic fiber, i.e. with the elliptic curve in P 2 . In fact, in the limit S 7 = S 9 = 0, the total space dP B 2 (S 7 , S 9 ) formally turns into , the sections S P , S Q and S R become indistinguishable and fuse into a single holomorphic three-section σ, following conventions in the literature. Then the second line in (3.22) vanishes and we use the relation (2.16) for σ 2 to rewrite the first line as where we denote by X E 6 the fourfold with E 6 -elliptic fiber. This expression is in line with the results obtained in [53].
Similarly, the Euler number ofX is calculated from the integration of the fourth Chern class c 4 (X) as (3.24) Here the integral overX has been reduced to an integral over the base B by first consecutive application of the relation (2.14) and then by employing (2.13), which can be rewritten for Calabi-Yau fourfolds as the intersection relation Here S m collectively denotes the divisors S Q , S R of the sectionsŝ Q ,ŝ R and D α , D β , D γ are general vertical divisors. We emphasize that our expression of the Euler number (3.24) reproduces the Euler number of [53] as the special case S 7 = S 9 = 0. As before S P , S Q and S R become homologous and we obtain As another consistency check, and also for the sake of the discussion of general flux quantization and the D3-brane tadpole in section 5.1, we calculate the arithmetic genus χ 0 (X) onX. It is calculated from the Todd class Td 4 (X) by the Hirzebruch-Riemann-Roch index theorem. SinceX is a simply-connected Calabi-Yau fourfold, its arithmetic genus has to be two, This immediately follows from h (0,0) (X) = h (4,0) (X) = 1 and h (p,0) (X) = 0 otherwise. From index theory, however, we obtain Evaluating this integral using our expressions (3.22), (3.24) for the second Chern class and Euler number onX, cf. appendix A for details, we obtain Here the first equality is due to a remarkable cancellation of all terms containing the divisors S 7 , S 9 in the second Chern class and Euler number ofX. In the second equality we used the index theorem for the arithmetic genus of the base 30) and the last equality follows from the constraint (3.27). Thus we see, that the arithmetic genus χ 0 (X) = 2 precisely iff χ 0 (B) = 1. In general, one demands the stronger conditions pull back to (p, 0)-forms onX under the projection π :X → B, which we excluded by assumption.
We note that our result (3.29) for the arithmetic genus is in line with the computations in [64,57], whose analysis we followed. We also refer to [21] for an application of these techniques to F-theory with SU(5) gauge group.

The Full Cohomology Ring ofX: Base B = P 3
As we demonstrate next, the representation (3.18) for a concrete base B allows us to calculate the full cohomology ring for a general Calabi-Yau fourfoldX in dP B 2 (S 7 , S 9 ) with general divisors S 7 , S 9 . We exemplify this in the following for the base B = P 3 , but note that this analysis can be generalized to other bases. For all details of the intersection calculations as well as the quartic intersections, we refer the reader to appendix B.
In the case B = P 3 the cohomology H (1,1) (X) is generated according to (2.22) by the divisors D A . We choose the following basis, where H B is the only vertical divisor of the fibration, which is pullback of the hyperplane of P 3 toX. The three other divisors are related to the in general rational sectionsŝ P , s Q andŝ R . Employing (2.10) and (2.11), their associated divisor classes are where we have used c 1 (K P 3 ) = −c 1 (P 3 ) = −4H B . We recall that the divisors S 7 , S 9 on P 3 are specified by integers n 7 , n 9 in the region in figure 2 specifying the total space (2.26) of the dP 2 -fibration over P 3 .
We set up the construction of the cohomology ring of π :X → P 3 via (3.18) by specifying the ideal SR. We note that the SR-ideal in the case of B = P 3 is generated by the Stanley-Reissner ideal (2.5) of the fiber dP 2 and the base, which is just H 4 B = 0. Thus, using the divisor classes (3.31), the resulting ideal is identical to (3.20) with all vertical divisors equal to H B and with K −1 P 3 = O P 3 (4). Then, we need the anti-canonical bundle K −1 dP 2 (n 7 ,n 9 ) of dP 2 (n 7 , n 9 ). It is given in general in (2.9) and easily specialized to B = P 3 using S 7 = n 7 H B and S 9 = n 9 H B as well as expressed in the basis (3.32). Now we are equipped with all the necessary quantities to construct the quotient ring representation (3.18) of the cohomology ring H We begin by summarizing the Hodge numbers of the vertical cohomology ofX as where the subscript V indicates that we are considering the vertical subspace, and the number in the bracket denotes the non-generic case with (n 7 , n 9 ) on the boundary 13 of the allowed region in figure 2. These are the lines n 7 = 0, n 9 = 0, n 9 = 4 + n 7 for n 7 ≤ 4, n 9 = n 7 − 4 and n 9 = 12 − n 7 , both of the latter two for 4 < n 7 .
Indeed, we obtain these Hodge numbers as follows from the ring (3.18). At degree zero, which is H (0,0) (X), the only generator is the trivial element 1. The graded piece there are ten different combinations D A ·X D B , of which, however, only five are generically inequivalent. As outlined in appendix B a choice of basis, denoted in general by C r with r = 1, . . . , h Here σ(ŝ Q ), respectively, σ(ŝ R ) are the Shioda maps (2.17) of the sectionsŝ Q ,ŝ R . In the case at hand these take the form We can evaluate the 5 × 5-intersection matrix η (2) in the basis (3.34) using the quartic intersections in (B.4) as Here entries η (2) rs that are determined by symmetry are omitted and denoted by η (2) sr . We note that for values of (n 7 , n 9 ) on the boundary of figure 2, there are only four inequivalent such surfaces. A quick way to see this is by calculating the rank of the matrix (3.36) which is generically five, but decreases to four in these cases. In all these cases we can drop the basis element We conclude by summarizing some key intersections onX which are discussed in section 2.2 as general properties of the fibrations, that can, however, be proven explicitly using the representation (3.18). Of the complete quartic intersections summarized in B.4 of appendix B we highlight the following intersections, 37) where S * collectively denotes all the divisor classes S P , S Q and S R of the sections. Here the first two relations are the versions of (2.15), respectively, on B = P 3 . The third relation implies that a section of the elliptic fibration ofX intersects the generic fiber F = π * (pt) for a generic point pt in B precisely at one point, cf. (2.13). Finally, the last relation is the analog of (2.14) on B = P 3 . We note that for a holomorphic section, this relation holds without intersection with H 2 B . Indeed, this is confirmed by the concrete cohomology calculation in appendix B for the zero-section S P in (B.12).

G -Flux Conditions in F-Theory from CS-Terms: Kaluza-Klein States on the 3D Coulomb Branch
In this section we discuss the construction of G 4 -flux in F-theory compactifications on general elliptically fibered Calabi-Yau fourfoldsX with a non-trivial Mordell-Weil group and a non-holomorphic zero section.
We define G 4 -flux in F-theory through the M-theory compactification on the resolved fourfoldX, that is dual to F-theory reduced on a circle to 3D. The general constraints on G 4 -flux in M-theory compactifications are reviewed in section 4.1. In addition to these conditions, G 4 -flux that is admissible for an F-theory compactification has to obey additional constraints. The form of G 4 -flux that yields a consistent F-theory has been derived first in [65] by requiring a Lorentz-invariant uplift to four dimensions. Here we discuss a different logic to obtain constraints on the G 4 -flux. As we point out in section 4.2, these constraints are appropriately formulated as the requirement of the vanishing of certain Chern-Simons (CS) terms on the Coulomb branch of the effective three-dimensional theory 14 . In particular, consistent conditions on the G 4 -flux are obtained only if one-loop corrections of both massive states on the 3D Coulomb branch as well as Kaluza-Klein (KK) states are taken into account. Most importantly, the presence of a non-holomorphic zero section is linked to the existence of new CS-terms for the KK-vector, that are generated by KK-states, whereas other CS-terms receive additional shifts.
We present for the first time a consistent set of conditions on G 4 -flux in F-theory compactifications with a non-holomorphic zero section. We also evaluate explicitly the corrections of massive states to 3D CS-levels for the F-theory/M-theory compactification on the fourfoldX with dP 2 -elliptic fiber.
The following discussion is an extension of [44], where KK-states have first been discussed in the context of 4D anomaly cancellation, and inspired by the analogous six-dimensional analysis in [55] 15 , see also [68] for the relevance of KK-states in the description of self-dual two-forms in 6D/5D.

A Brief Portrait of G 4 -Flux in M-Theory
LetX denote an arbitrary smooth Calabi-Yau fourfold. In general, G 4 -flux in M-theory can only be defined on such a smooth manifold, that in the context of F-theory typically arises from resolutions of both codimension one singularities from non-Abelian gauge groups or, as in the case considered here, from higher codimension singularities in the presence of a non-trivial Mordell-Weil group.
Then, G 4 -flux in F-theory is defined as G 4 -flux in M-theory with as set of additional F-theoretic restrictions discussed in the next section 4.2. G 4 -flux in M-theory is consistent 14 See also [66,67] for recent related studies of connections between CS-terms and contact terms in 3D effective field theories with background fields in the context of F-maximization. 15 We are grateful to Thomas W. Grimm for explanations and comments on the importance of Θ 00 .
if it obeys two basic conditions. First, G 4 has to be quantized as [69] which depends on the second Chern class c 2 (X) ofX. In addition, the M2-brane tadpole has to be cancelled [64,70], 16 where χ(X) is the Euler characteristic ofX and n 3 the number of spacetime-filling M2branes. This tadpole lifts to the D3-brane tadpole in F-theory with n 3 denoting the number of D3-branes.
In addition, one can distinguish G 4 -flux further by decomposing H 4 (X) into its primary vertical and horizontal subspaces H 4 (X) = H 4 V (X) ⊕ H 4 H (X) [63]. As mentioned before, only G 4 -flux in the vertical homology induces 4D chirality as well as gaugings of axions in F-theory and is considered here. A general G 4 -flux in the vertical cohomology H (2,2) V (X) than has an expansion as where C r with r = 1, . . . , h

Deriving Conditions on G 4 -Flux in F-theory
The additional constraints on the G 4 -flux in F-theory compactifications are most conveniently formulated in the three-dimensional theory obtained after compactification of the 4D N = 1 effective action of F-theory on S 1 . Then we can use the basic duality between three-dimensional F-theory onX × S 1 and M-theory onX. Consideration of the resolved fourfoldX means in terms of the 3D N = 2 effective theory obtained in the circle reduction to go to the 3D Coulomb. The corresponding fields acquiring a VEV are the adjoint valued scalars ζ A , A = 0, . . . , h (1,1) (B) + rk(G) + n U(1) , along the Cartan directions of the 4D gauge group G × U(1) n U (1) . The zeroth component denotes the scalar in the multiplet of the KK-vector. Then the 3D gauge group is broken in an 16 We are working here in the carefully checked conventions of [71], where also comparison with other, inconsistent sign choices in the literature can be found. 17 In general, c 2 (X) has to be decomposed into the integral basis of H (2,2) V (X). However, the determination of this basis is very involved and requires more sophisticated techniques that would exceed the scope of this work. We refer to [58] for the application of mirror symmetry to fix the integral basis. See also [72] for a discussion of potential conflicts between the split of H 4 (X) into vertical and horizontal subspace and the choice of an integral basis.
ordinary Higgs effect to the maximal torus U(1) h (1,1) (B)+rk(G)+n U(1) +1 and in addition the charged fermions, in particular those from the 4D massless matter multiplets, obtain a mass (shift) as m = q A · ζ A , where q A denotes the full 3D charge vector.
This Coulomb branch then describes the IR dynamics of the dual M-theory compactification on the fourfoldX in the supergravity approximation. It is the key point of the following analysis that the matching of the two dual descriptions works only on the level of the quantum effective action after massive degrees of freedom have been integrated out on the F-theory side. As we emphasize in the following, also corrections due to KK-states have to be considered. In fact, consistent conditions on the G 4 -flux in the presence of a non-holomorphic zero section are only obtained if new CS-terms for the KK-vector are taken into account.
The general approach of matching F-and M-theory in 3D initiated in [73] has been exploited recently in [42,74,44,45] to study various aspects of the F-theory effective action. We refer to these references for the background of the following discussion.

F-Theory Conditions from KK-States Corrected CS-Terms
First we recall that G 4 -flux in M-theory induces CS-terms for the U(1)-gauge fields A A on the 3D Coulomb branch that read Now the strategy to formulate conditions on the G 4 -flux for a valid F-theory compactification is as follows. We require that the CS-levels on the F-theory side, denoted Θ F AB , have to agree with the M-theory CS-levels, denoted Θ M AB and given by the flux integral in (4.4), This means, whenever a non-vanishing CS-level Θ F AB is there on the F-theory side, as a classical CS-level or generated by loops of massive matter on the 3D Coulomb branch, then the same CS-level has to be there on the M-theory side, i.e. it has to be generated by the G 4 -flux. In contrast, when a CS-term is not there on the F-theory effective field theory side, the corresponding flux integral in (4.4) for the same CS-term in M-theory has to vanish. However, the critical point is to allow in the corresponding F-theory loop-computation also for loops with an infinite tower of KK-states. If KK-states are not included, the G 4 -flux is in general over-constrained, in particular in the presence of a non-holomorphic zero section. In addition, certain CS-levels get shifted by KK-states and a consistent match of CS-terms in F-and M-theory is only possible if these corrections are included.
The general form for the correction to the classical CS-level on the F-theory side, denoted by Θ F cl, AB , has been worked out in [75,76,77]. The correction is one-loop exact with all 3D massive fermions contributing in the loop. Assuming a fermion with charge vector q A , the loop corrected CS-term takes the simple form where n(q) is the number of fermions with charge vector q and the sum runs over all these charge vectors. We note that since real masses can be negative in 3D, the sign-function is non-trivial. We can rewrite this expression further by noting the general form of thee charge vector where we recall the 3D gauge group U(1) h (1,1) (B)+rk(G)+n U(1) +1 on the Coulomb branch and that the charge under the KK-vector A 0 is just the KK-label of KK-states, q 0 ≡ q KK = n.
Next, we assume that in a theory obtained by circle reduction from 4D, there are no states with charge under the A α , since these do not correspond to a 4D gauge symmetry, i.e. we assume q α = 0. 18 We consider in the following the massive charged states obtained from the reduction of four-dimensional massless chiral matter to 3D, along with their KKstates. Denoting their charge vectors as q A = (n, 0, q i , q m ) with q i the Dynkin labels of their non-Abelian representations R under G, we write the loop-correction (4.6) as where we invoked the absence of classical CS-terms. Here we have suppressed a labeling of the KK-charges n by the weights w of the representation R qm and unified the labels i and m as Λ = (i, m) and χ(R qm ) denote the 4D chiralities of chiral matter fields. We have also defined the Coulomb branch mass m CB = q Σ ζ Σ and the KK-mass m KK = 1

R KK
with R KK the radius of the S 1 . The terms (4.8) are, bearing our assumptions on the spectrum of massive fermions in mind, the only CS-terms receiving loop-corrections via (4.6). Other CS-terms are classically generated, either in 4D or in the 3D reduction.
We summarize all CS-terms, the presence of classical terms, the potential correction via loop-effects, their physical interpretation and a related reference in the following, anomaly cancellation [44] (for holomorphicŝ P ) Here we also mention in one column whether the corresponding CS-term is used to impose a condition on the G 4 -flux. Indeed, the effect of CS-terms Θ F 0α is the induction of circle fluxes along the S 1 in compactification from 4D and, thus, not a physical effect in 4D. Therefore, we impose these CS-terms to vanish. Then, the CS-terms Θ F αβ obstruct the lift back to 4D [73], potentially by non-geometric effects, and are required to vanish. Finally, the CS-terms Θ αi correspond to 4D gaugings of axions via the maximal torus of the GUT and are thus set to zero. Thus, using the M-/F-theory duality relation (4.5) we formulate the F-theory conditions on the G 4 -flux in terms of 3D CS-levels Θ AB as We note that these conditions on the G 4 -flux look much weaker than the ones considered in the literature before. We claim that these conditions are the appropriate ones, in particular in cases with a non-holomorphic the zero sectionŝ P . In contrast, however, in compactifications with a holomorphic zero section, the vanishing of the CS-levels in (4.10) implies the vanishing of other, dependent CS-levels. We discuss this in the following and contrast it to the situation with a non-holomorphicŝ P .

KK-Corrected 3D CS-Terms: Field Theory Computations
In certain cases, the loop-corrections (4.8) can vanish, leading to additional vanishing CS-terms. In particular, for a holomorphic zero-section, the CS-term Θ F 00 in field theory vanishes, and consistently also the geometric CS-term Θ M 00 in M-theory. The latter can be seen easily using the conditions (4.10) in the relation which is derived employing the definition (2.21), the intersection property (2.16), and K α introduced in (2.24). In order to see the same from the field theory side and, in general, to compute the loop-corrections to the CS-terms, we first have to evaluate the sign-function in (4.8).
We calculate the sign-function geometrically, recalling from the discussion of section 3.1 that to every weight w of a representation R qm realized in F-theory there is a corresponding curve c w , cf. (3.1). The sign-function in (4.8) is then determined by testing whether the curve c w associated to a given weight w with Dynkin labels q Λ and KK-charge n is in the Mori cone M (X) of effective curves onX. We define Here the KK-charge q 0 = n of a curve c w is obtained geometrically as In general, a curve is in the Mori cone if it is described by holomorphic equations and an analysis of the geometry allows in general to find all holomorphic curves corresponding to matter, cf. sections 3.1 and 6.1 as well as [51]. 19 In the toric context, the relevant parts of the Mori cone can be constructed systematically as recently demonstrated in [55].
Now, in the presence of a holomorphic zero section the sign-function is centered around 0 because no curve c w has KK-charge. This follows from the simple geometric fact that by definition any rational curve c w does not intersect S P , which always goes through the original singular curve, cf. figure 3. This implies that the loop-corrections in (4.8) that are odd in the KK-level n vanish since KK-states with charge −|n| cancel those with charge |n|. In particular, Θ F 00 = 0, confirming the geometric result (4.11). In addition, the sum over KK-states in Θ F ΛΣ reduces to which has been used in [42,44].
In contrast, the CS-levels Θ 0Λ receive an infinite loop-correction that has to be regularized by zeta-function regularization. In [44] this zeta function regularization has been performed and it was shown that the field theory result for Θ 0m agrees with the 4D mixed Abelian-gravitational anomaly, with n(q) denoting the number of fermions in 4D with U(1)-charge vector q. In particular, anomaly cancellation follows then using the M-/F-theory relation (4.5) and the geometric result where the right side is immediately identified with the 4D Green-Schwarz term for Λ = m, cf. section 5.3. Here we used the general result S P ·D Λ = 0 for a holomorphic zero section. We also infer from (4.16) that the CS-terms Θ 0i are set to zero recalling (4.10).
In the presence of a non-holomorphic sectionŝ P the only thing that changes on the field theory side is a shift of the sign function in (4.12). It is no longer centered symmetrically around the origin of the sum over KK-labels n. This is geometrically clear because there are now rational curves c w in the Mori cone that have non-zero intersection with the rational zero sectionŝ P , i.e. that have non-zero KK-charge (4.13). These curves have to be located precisely at the loci where the rational zero section is ill-defined and wraps a whole P 1 in the fiber, which is the original singular curve. Everywhere else in the base B the zero section is only a point on the original singular fiber and does not intersect curves c w .
The effect of the shift of the sign-function is dramatic because now KK-states with positive and negative KK-label |n|, respectively, −|n| do no longer cancels in corrections (4.8) that are odd in n. The infinite parts of the sums over KK-states still cancel, but with a non-zero remainder. Thus, the CS-term Θ F 00 that was zero for a holomorphic zero section is now generated by a contribution of a finite number of KK-states. For example, assuming, with k denoting an integer, a sign-function of the form for only one weight of a single matter multiplet R qm the loop induced CS-term in (4.8) reads See e.g. [55] for a formal derivation or the following for an intuitive understanding, Here the unshifted sum was normalized to zero, then the shifted sum differs only by the amount obtained as the finite sum over the differences between the first and second row in (4.19) for each column.
Thus we see that Θ F 00 in (4.18) is directly proportional to one chirality. Consequently, imposing Θ M 00 = 0, as done in the literature with holomorphic zero sections, also in the non-holomorphic case would unnecessarily set this chirality to zero. We will see that the loop-correction to Θ F 00 precisely takes the form (4.18) for dP 2 -elliptic fibrations, both without and with an additional SU(5) gauge group, cf. sections 5.2 and 6.1, since only one singlet has a non-trivial KK-charge n = 2 and, thus, a shifted sign-function (4.17) with k = −2.
We conclude by mentioning that the CS-terms Θ ΛΣ are shifted in a similar way, where as in (4.19) the shift originates from a finite number of KK-states. We note that this shift has to be taken into account when we determine certain 4D chiralitites via 3D CSterms in sections 5.2 and 7.2. In addition, also the relation (4.15) is modified by a finite correction due to KK-states. Assuming again that only one weight in the representation R qm has a non-trivial KK-charge with shifted sign-function (4.17), we obtain the corrected expression Thus, we see that these CS-levels are no longer directly related to the 4D mixed Abeliangravitational anomaly as in (4.15) with a holomorphic zero section. Geometrically this is also clear since in general S P · σ(ŝ m ) = 0 in compactifications with rational zero sections. Thus, (4.16) does not hold and the cancellation of 4D mixed Abelian-gravitational anomaly is not geometrically implied. However, after subtracting the contribution of KK-states in (4.20), 4D anomaly cancellation requires the remaining piece to again equal In other words, we can formulate the relation on the fourfoldX as a necessary and sufficient condition for 4D anomaly cancellation. It would be nice to proof this relation purely geometrically. Finally, we note that also the CS-terms Θ F 0i need no longer vanish, since geometrically Θ M 0i = 1 2 K α Θ M αi . However, in the geometryX at hand, cf. section 6.1, this relation still holds since the singularity of the zero section happens away from the resolved SU(5) singularity and, thus, no SU(5)matter has non-trivial intersections with S P . Moreover, we obtainS P · D i = 0 for all SU(5)-Cartan divisors D i in section 6.2.

G 4 -Flux & Chiralities on Fourfolds with Two U(1)s
In this section we analyze chirality-inducing G 4 -flux in F-theory on the fourfoldsX with dP 2 -elliptic fiber and a non-holomorphic zero section. In section 5.1 we first construct the general G 4 -flux for the fourfold π :X → P 3 , where we also comment on the general D3-brane tadpole. Then in section 5.2 we outline first our general strategy to obtain chiralities on Calabi-Yau fourfolds with higher rank Mordell-Weil group and a rational zero section, before applying it again to the fourfoldX with B = P 3 . Then in section 5.3 we first review anomaly cancellation conditions in general 4D effective field theories.
Then we show that the general spectrum obtained for the Calabi-Yau fourfoldX is anomaly-free for the entire allowed region of figure 2. We conclude in section 5.4 with a concrete toric example to exemplify the general findings.
The case of an un-Higgsed SU(5) GUT-group is considered separately in section 6.

G 4 -Flux on Fourfolds with Two Rational Sections
In this section we first show that on a general fourfoldX with dP 2 -elliptic fiber the D3-brane tadpole can always be solved by adding a sufficient amount of n D3 of integral D3-brane charge. Then we construct viable G 4 -flux for F-theory on a general fourfoldX with base B = P 3 . We show that for different elliptic fibrations, i.e. for different values of the integers n 7 , n 9 , the number of independent G 4 -flux quanta changes.
Integral D3-Tadpole on General Fourfolds with U(1)×U (1) In the following we prove the necessary condition for D3-tadpole cancellation onX, namely that the induced D3-brane charge from the combination of the Euler number and the quantized G 4 -flux in the tadpole equation (4.2) is always integral. The following discussion is an application of the arguments in [64,69,57], that immediately carry over to elliptic fibrationsX with dP 2 -elliptic curve.
To this end, we use the relation (3.28) between the arithmetic genus χ 0 (X) and the Euler number χ(X) to rewrite the tadpole (4.2) as Here we have also employed that χ 0 (X) = 2, cf. (3.29). Using the flux quantization condition (4.1) this can be written as where we used x = G 4 + 1 2 c 2 (X). By flux quantization (4.1) we know that x is integral, i.e. an element in H 4 (X, Z). This implies by Wu's theorem that x 2 ∼ = c 2 (X) ∧ x mod 2 [69], so that the integrand in (5.2) is divisible by two. Thus, the number n D3 of D3-branes is integral for every elliptically Calabi-Yau fourfoldX with general elliptic fiber in dP 2 .
The G 4 -Flux onX with B = P 3 Next we explicitly determine the G 4 -flux onX for a general elliptic fibration over the base B = P 3 , i.e. for all integers n 7 , n 9 in the allowed region in figure 2.
We begin by expanding the G 4 -flux according to (4.3) into the basis of H (2,2) V (X) determined in (3.34), for general coefficients a i , where as before the application of Poincaré duality is understood. Then we calculate the CS-levels (4.4) employing the intersection ring (B.4) in the basis of divisors (3.31), but withS P = S P + 2H B as defined in (2.21) replacing the zero section S P . The generic solution is a three-parameter family of G 4 -flux given by which is valid for all values of n 7 and n 9 in the allowed region figure 2.
This generic three-parameter solution for the G 4 -flux is expected since there are generically five different surfaces in (5.3) and two independent conditions (4.10), namely Θ 0α = Θ αβ = 0 with α, β = 1. However, the situation becomes more interesting at special values for (n 7 , n 9 ). First, we recall that for (n 7 , n 9 ) on the boundary of the region in figure 2, the dimensionality of H In all these cases we can obtain the expression for the G 4 -flux by specializing (5.4). This ensures that all quantities, in particular the chiralities of 4D charged matter, that are calculated from the most general G 4 -flux specialize correctly for non-generic values of (n 7 , n 9 ). We discuss this specialization at the end of this subsection, but note that the reader may want to skip these details on a first read and proceed with the chirality formulas in section 5.2.
We conclude with one remark on the form of the G 4 -flux obtained here. In some cases, Type IIB seven-brane gauge fluxes F (1) , F (2) of two single D7-branes can be lifted into F-theory by considering a G 4 -flux of the type We note that the flux (5.9) is precisely of this form. In contrast,t he interpretation of the general G 4 -flux in (5.4) in terms of Type IIB quantities, if possible, is less clear and would be very interesting to investigate.

4D Chiralities from Matter Surfaces & 3D CS-Terms
Finally we are prepared to calculate the chirality of matter in four-dimensional F-theory compactifications onX with U(1)×U(1) gauge group. We demonstrate that the chirality of all six matter representations discussed in section 3 can be determined uniquely. Half of the chiralities are determined by integration of the G 4 -flux over matter surfaces C w R , the other half from the 3D CS-terms Θ ΣΛ . As we see explicitly, the 3D CS-terms Θ ΛΣ are not sufficient to fix all chiralities, in contrast to earlier works with a holomorphic zero section. However, supplemented by new CS-terms present only for non-holomorphic zero sections, see section 4.2, the chiralities can be obtained also exclusively via 3D CS-terms. We emphasize that this analysis requires the inclusion of KK-charges for all curves c w . In the fourfoldX only the representation 1 (−1,−2) has non-trivial KK-charge q KK = 2.
We outline the general strategy to obtain 4D chiralities in section 5.2.1 before we determine them explicitly in section 5.2.2 The concrete calculations are performed for the Calabi-Yau fourfoldX with base B = P 3 for the entire allowed region in figure (2).

General Strategy to Determine 4D Chiralities
We begin our discussion by recalling how to extract the chiral index of 4D matter in a representation R under a gauge group G in a global F-theory compactification on an arbitrary resolved elliptically fibered Calabi-Yau fourfoldX.
As explained in section 3, each matter representation R possesses an associated ruled surface, the matter surface C w R , where w denotes a weight of R. Then, the chiral index of charged matter in this representation R is given by the flux integral 20 [1,80,40,21] where the G 4 -flux is a quantized M-theory flux subject to the conditions (4.10). It is important to note that these conditions, more precisely the conditions Θ iβ = 0, imply that the integral (5.12) is independent on the choice of a particular weight w, since different weights w, w of the same representation R are related by a root α i , w−w = α i .
In cases where all the matter surfaces C w R are known, the integral (5.12) is the most direct and geometric way of calculating the chirality χ(R). However, for the fourfoldX at hand, but also for the fourfoldX SU (5) with an additional resolved SU(5) singularity constructed in section 6, the homology class of all matter surfaces C w R is not known. Fortunately, since we know the expected matter spectrum from the geometric analysis there is to determine the missing chiralities χ(R) indirectly via 3D CS-terms.
For this purpose we recall the three-dimensional M-/F-duality explained in section 4.2.
There we have seen that the 3D CS-terms (4.4) for the U(1)-vector fields A Λ = (A i , A m ) on the Coulomb branch can be calculated in two independent ways. On the one hand, after solving the G 4 -flux condition (4.10), one can calculate all CS-terms Θ M ΛΣ on the M-theory side by evaluating the classical flux integrals in (4.4). On the other hand, the CS-levels Θ F AB on the F-theory side are generated and corrected at one-loop from integrating out charged matter and, thus, contain, as shown in section 4.2, cf. (4.8), the 4D chiral indices χ(R qm ) of all 4D matter. Since we know which representations R qm are there from our geometric analysis in section 3.1 and the later section 6.1 for the SU(5) case, we can solve the matching condition (4.5) for the chiralities χ(R qm ).
We note that in both fourfoldsX andX SU(5) we know the homology classes for a number of matter surfaces C w R , but not for all. For these matter surfaces, we can evaluate the index (5.12) directly. The remaining chiralities can be fixed, as demonstrated in sections 5.2 and 7.2 by the matching of the CS-terms Θ ΛΣ , that are given on the Ftheory side by the loop-expression given in (4.8). However, we can also obtain all 4D chiralities by taking into account the CS-terms Θ 00 and Θ 0m in (4.8), respectively, in (4.18) and (4.20). As we will see concretely, the obtained results agree with the direct computations via (5.12), confirming the validity of application of the M-/F-theory duality (4.5) to the determination of 4D chiralities.
We conclude by noting that the matching (4.5) of CS-terms Θ ΣΛ has been used in [42,44,45] to calculate successfully the chiralities of F-theory compactifications with SU(5) and SU(5)×U(1) gauge symmetry. In this work, however, we encounter the novel situation that the conditions arising from Θ ΣΛ are not sufficient to determine the chiralities of the full spectrum with both U(1)×U(1) as well as SU(5)×U(1)×U(1) gauge symmetry as outlined in the following and in section 6. The reason for this is precisely the existence of a non-holomorphic zero section. However, either supplemented by the chiralities that can be directly determined by the flux integrals (5.12) or by the CS-terms Θ 00 and Θ 0m , we obtain all chiralities. For an application of the latter resolution, see also the analogous analysis of [55] in 6D.
One might wonder whether the CS-terms always provide enough conditions to solve for the chiralities of a known F-theory spectrum. By a simple counting argument assuming a rank n U(1) Mordell-Weil group, we enumerate the number of conditions arising from the matching of these CS-terms as #(CS-terms) = (n U(1) + 2)(n U(1) + 1) 2 .

(5.13)
If all these conditions remain independent, the CS-terms might indeed be sufficient to determine the chiralities in F-theory compactifications with more U(1)-symmetries. This can be seen by a similar estimate on the growth of the number of different representations as a function of the rank n U(1) of the Mordell-Weil group.

Chiralities onX with B = P 3 : Matter Surfaces & CS-Terms
In the following we calculate for the first time 4D chiralities χ(R) of an F-theory compactification on a general elliptically fibered Calabi-Yau fourfoldX with rank two Mordell-Weil group and with the full matter spectrum analyzed in section 3. The following is a direct extension of the six-dimensional analysis in [51] to a 4D chiral theory.
In order to obtain the chiralities for the matter fields 1 (q 1 ,q 2 ) with charges (q 1 , q 2 ) = (1, 0), (0, 1), (1, 1), we have to use the 3D CS-levels and the matching condition (4.5). For this purpose we have to determine the KK-charges of all six matter representations on X. As mentioned before, a non-trivial KK-charge is calculate by the intersection (4.13) of the curve c w and the zero sectionS P . Such a non-trivial intersection can only occur at loci, where the zero section is ill-defined and wraps fiber components. This is precisely the case at the loci s 8 = s 9 = 0, where 1 (−1,−2) is supported. Since the fiber is an I 2 -fiber over all matter loci, we obtain a KK-charge and zero for all other matter representations. We note that (5.15) implies that the signfunction (4.12) is given by the shifted sign-function (4.17) with k = −2 whereas the other matter fields retain a point-symmetric sign-function.
We can immediately cross-check this result using the field theory computations of sections 4.2.2. We first calculate the CS-level Θ F 00 for the 3D KK-vector on the field theory side. Using the general expression (4.18) for k = −2 we obtain Θ F 00 = −χ(1 (−1,−2) ) , (5.16) with the chirality χ(1 (−1,−2) ) determined in (5.14). We readily calculate the corresponding flux integral Θ M 00 via (4.4) and immediately reproduce (5.16). Next we check the relation (4.20) for the CS-level Θ 0m , respectively, (4.21). Again we start with the field theory result for the right hand side of (4.21) which requires We confirm this relation easily by calculating the intersections on the left hand side directly from the G 4 -flux (5.4). Thus, as we have just demonstrated the results for the chiralities in (5.14) obtained from the matter surface integrals can be employed as an independently check of the field theory expressions for the CS-levels in 4.2.2 and the M-/F-theory duality relation (4.5).
We conclude by noting that the chiralities we obtain include factors of 1 2 and 1 4 . These factors should disappear once the G 4 -flux has been quantized appropriately according to (4.1). The precise quantization will, however, depend on the values of n 7 , n 9 and has to be done in a case by case analysis. In addition, for concrete n 7 , n 9 the factors in the numerator (5.14) and (5.21) have different divisibility properties and can cancel the denominators. Therefore, in order to not obscure these cancellation effects, we keep the normalization in (5.14), (5.21) and the mild fractions of 1 2 and 1 4 . In concrete toric examples, they can be cancelled appropriately.

4D Anomaly Cancellation: F-Theory with Multiple U(1)s
Finally, after having calculated the matter spectrum of an F-theory compactification, we check consistency of the obtained low-energy effective physics. One check is anomaly cancellation. In the following we introduce the necessary quantities to analyze anomalies and refer to [44] for more details on anomalies in general and, in particular, in F-theory. Then we use these techniques to show that the general spectrum found in section 5.2 for F-theory compactifications onX → P 3 with gauge group U(1) 2 is anomaly-free.

4D Anomaly Cancellation: General Discussion
In the following we assume a 4D gauge group G with a single non-Abelian factors, see for example [44] for the general case, and with a number n U (1) of Abelian factors. Charges are summarized by a charge vector q = (q m ) and the number of left Weyl fermions in a matter representation R q are denoted in general by n(R q ). The number of fermions in a representation R irrespective of their U(1)-charges is denoted by n(R), whereas n(q) indicates the number of fermions with charges q regardless of their non-Abelian representation. All these numbers can be expressed in terms of the chiralities χ(R q ).
The conditions for 4D anomaly cancellation via the generalized Green-Schwarz (GS) mechanism [81,82] yield a system of linear equations involving the spectrum of the theory as well as parameters encoding the GS-counter terms and the gaugings of axions. These conditions for cancellation of 4D purely non-Abelian, purely Abelian, mixed Abeliannon-Abelian and mixed Abelian-gravitational anomalies read, in the same order, purely non-Abelian anomaly : Here V (R) and U (R) denote group theoretical constants that arise when rewriting traces in the representation R as traces in the fundamental representation f . Letting F denote the non-Abelian field strength, we set Similarly, we note that λ = 2c G /V (adj) with c G the dual Coxeter number of G and adj its adjoint representation. Note that λ = 1 for G = SU(N ), the case of interest here.
There are some remarks in order. The left hand sides of (5.22) are the actual one-loop triangle anomalies of the field theory. These are determined entirely by the spectrum. The right hand sided of (5.22) are the contribution of the anomalous tree-level GS-counter terms. In an F-theory compactification on a Calabi-Yau fourfoldX over a base B they are identified as follows [83,44] Here the CS-terms Θ M AB are defined in (4.4), the Néron-Tate height pairing has been introduced in (2.18) for two sections and can be straightforwardly generalized to an arbitrary number of sections, Σ α b denotes a basis of curves defined in (2.19), S b G is the divisor in the base B supporting the gauge symmetry G, cf. 2.23, and K α is the coefficient (2.24) in the expansion of K B .
We conclude note that the spectrum calculated in section 5.2 is the uniquely determined anomaly-free spectrum if only one chirality χ(1 (q 1 ,q 2 ) ) is calculated independently. Anomaly cancellation is not sufficient to fix the spectrum completely, since the U (1) 3 1anomaly is proportional to the U (1) 1 -gravitational anomaly as is evident from (5.25).

A Toric Example
We conclude the analysis of F-theory compactifications with U(1)×U(1) gauge group with explicit toric constructions of the fourfoldsX with dP 2 -elliptic curve E. We focus on elliptically fibered Calabi-Yau fourfoldsX → P 3 over P 3 .
First we note that we can construct using the algorithm of appendix G toric fourfolds realizing a wide variety of values for n 7 and n 9 inside the allowed region in figure 2 of dP 2 -fibrations over P 3 with generic Calabi-Yau hypersurfaceX. In the following, we present the case n 7 = 4 and n 9 = 5 to illustrate key ideas of the toric construction.
The toric reflexive polytope defining the toric variety dP 2 (4, 5) takes the form variable vertices C * -action divisor class z 0 Here the first column denoted the projective coordinates on the toric variety dP 2 (4, 5), the next five columns are the vertices of the polytope, that are given as five-dimensional row vectors. Next we displayed the four C * -actions of dP 2 (4, 5) along with the divisor classes in the last column.
Comparing the divisor classes in (5.27) with the general assignments in (2.10) we immediately confirm that the above polytope indeed describes a fibration with divisors S 7 = 4H B and S 9 = 5H B . This can also be checked explicitly by torically calculating the intersections (2.15) in the toric variety associated to the single star triangulation of the polytope specified in (5.27). The Euler number, as well as the Hodge numbers, of the fourfoldX in dP 2 (4, 5) read 28) where the zeros in parenthesis indicate the absence of any non-toric divisors, respectively, complex structure moduli onX as expected by construction. The Euler number χ(X) as well as the number h (2,2) V (X) of independent surfaces in (5.28) agree with the general formula in (5.5), respectively, the cohomology calculations leading to (3.34). The topological metric η (2) of these five classes is read off from (3.36) with n 7 = 4, n 9 = 5.
The codimension two singularities of this concrete Calabi-Yau fourfoldX yield the full spectrum (3.3) of six different singlet representations 1 (q 1 ,q 2 ) . The cohomology classes of the three sections are given by the toric divisors S P = E 2 , S Q = E 1 and S R = H − E 1 − E 2 + H B in (5.27) and agree with the general expression (3.32). We obtain the (1, 1)-forms inducing the U(1)×U(1)-gauge fields by evaluating the Shioda map of the sectionsŝ Q ,ŝ R following (3.35) as The Nero-Tate height pairing b α mn of these two classes follows from (5.26) with n 7 = 4, n 9 = 5.
Finally, we calculate the general G 4 -flux onX employing the procedure of section 5.1. We precisely obtain the G 4 -flux in (5.4) in the case n 7 = 4, n 9 = 5. With this result, we readily calculate the chiralities for the matter representations, along with the CS-terms (4.4), again obtaining a perfect match with the results (5.14), (5.21) and (5.18) evaluated for n 7 = 4, n 9 = 5. Then we also calculate the GS-terms (5.26), most prominently the gaugings Θ mα , and show, following section 5.3, that all anomalies are cancelled.

Calabi-Yau Fourfolds with SU(5)×U(1) × U(1)
Building on the results of previous sections, the aim of this section is to develop tools for the construction of phenomenologically appealing F-theory compactifications with additional non-Abelian gauge symmetries. For concreteness we consider in this section a Calabi-Yau fourfoldX SU(5) with a resolved SU (5)-singularity, while maintaining the rank two Mordell-Weil group. Compactifications of F-theory onX SU (5) give rise to a four-dimensional GUT with SU(5) × U(1) × U(1) gauge group.
We consider here one particular geometric way of adding and resolving the SU(5)singularity. Once this non-Abelian sector is added, it is rather straightforward to implement the techniques developed in previous sections for the rank-two Abelian symmetry. As the first step in section 6.1 we describe the resolution toX SU (5) , determine the matter representations as well as Yukawa points and the matter surfaces for a subset of matter multiplets. We note, that the spectrum that we obtain in this analysis has not been found via the toric classification of SU(5)-TOPs in [46]. As the next step we calculate the vertical cohomology ring H ( * , * ) V (X SU(5) ) in section 6.2. For a general base B we derive expressions for the Chern classes and Euler number ofX SU(5) , before we calculate the full vertical cohomology for the fourfold with B = P 3 explicitly.
We emphasize one finding of our analysis. With the addition of an SU(5)-singularity we encounter at one codimension three locus a non-flat fiber (NFF), i.e. at this particular codimension three locus the fiber ofX SU(5) is no longer a complex one-dimensional elliptic curve, but a complex two-dimensional surface C N F F . We note that this was also observed in [46]. The physics of non-flat fibers has been studied in [84], to which we refer for more details. In summary, the complex surface in the fibration can be wrapped by an M5brane, that gives rise, in the blow-down of the resolved fibration ofX SU(5) , to a charged tensionless string with an infinite tower of massless excitations. In addition, further light states are contributed by M2-branes wrapping holomorphic curves in the surface of the non-flat fiber.
Compactifications of F-theory with such a spectrum of additional light states are problematic for phenomenology. One obvious way out is to geometrically avoid the presence of the Yukawa couplings supporting the dimension two fiber. This can be achieved by considering a base B where the dangerous Yukawa coupling does not exist but all the other physical features of the compactification onX SU(5) are retained. See also [45] for a toric analysis. Such bases are easily constructed and realize phenomenologically interesting F-theory compactifications [85].
Another way to deal with the non-flat fiber is to forbid at least a chiral excess of the additional light states induced by C N F F . This requires the G 4 -flux onX SU(5) to integrate to zero over C N F F , Non-flat fiber condition: Following this approach later in section 7, we show explicitly that we can obtain a physical and consistent low-energy spectrum with all 4D field theory anomalies cancelled even in the presence of a non-flat fiber at codimension three. It would be interesting to investigate the microscopic meaning of (6.1) in more detail.

Singularities of the Fibration: Gauge Group, Matter & Yukawa Couplings
In this section we analyze the codimension one, two and three singularities and their resolutions inX SU (5) . We thoroughly determine all matter representations and determine some of the associated matter surfaces.
Before going into the details of this geometric analysis ofX SU (5) it is instructive to introduce some terminology and the following simple geometric picture. We construct X SU(5) by first considering a non-generic Calabi-Yau fourfoldX with an SU(5)-singularity over codimension one in B. Then we resolve all singularities and obtain the smootĥ X SU (5) . Thus, the smooth Calabi-Yau fourfoldX SU(5) is schematically obtained from a singular Weierstrass model X as, Here π SU(5) blows down the four Cartan divisors of SU(5) andπ = π 1 • π 2 is the two-step blow-up in (3.2). Thus the fourfoldX SU(5) is constructed via a combination of a total of six resolutions starting from the singular Weierstrass model X.

Explicit Resolution of a Codimension One SU(5)-Singularity
In the following we first engineer and then resolve an SU(5)-singularity over codimension one in B. We introduce the section z ∈ O(S SU (5) ) that vanishes along the divisor S b SU (5) in the base B of SU(5)-singularities of the elliptic fibration ofX. Here we focus on the interplay between the non-Abelian and Abelian sector and choose one particular SU(5)-singularity first constructed in [51] that has been missed in the literature before.
The SU(5)-singularity of interest is obtained by considering non-generic coefficients s i in the Calabi-Yau equation (2.1) of the form Since the s i are still required to be sections of the bundles (2.10) by the Calabi-Yau condition, this implies that the s i have to be sections of the following line bundles: We note that we assume in the following that we obtain a fourfoldX SU(5) that is a generic besides the resolved SU(5)-singularity, i.e. that all the s i respectively s i in (2.10) and (6.9) exist. As before in the U(1) 2 -case, this poses upper and lower bounds on the coefficients n α 7 , n α 9 in the expansion (2.25) of S 7 , S 9 , that depend on the base B. For the case B = P 3 that is of most interest in this work, these bounds replace (2.27) and read, using K −1 P 3 = O P 3 (4) and S SU(5) = H B , 0 ≤ n 7 ≤ 7 , 0 ≤ n 9 ≤ 6 , n 7 + n 9 ≤ 9 , 0 ≤ 2 + n 7 − n 9 , 0 ≤ 4 + n 9 − n 7 . (6.5) The allowed region is displayed in figure 5.  Figure 5: Each dot represents a dP 2 -fibration over P 3 with generic Calabi-YauX SU (5) . The red region is the set of dP 2 -fibration with genericX without SU(5), cf. figure 2.
We note that the factor z 5 in (6.6) signals an A 4 -singularity over the divisor z = 0, as desired. In addition, we see that the singularity gets further enhanced at β 5 = 0 to D 5 and at P = 0 to A 5 , indicating appearance of matter multiplets at codimension two singularities. Yukawa points are located at the codimension three loci.
In order to resolve all singularities, we perform four blow-ups of the ambient space (2.7) that induce two blow-ups and two small resolutions on the Calabi-Yau fourfold. The blow-down map π SU(5) :X SU(5) →X of this resolution then reads [51], The total transform of the Calabi-Yau hypersurface (2.1) then reads p = s 6 (e 1 e 2 )uvw + s 7 (d 1 d 2 )e 2 v 2 w + s 8 (d 2 d 2 3 d 4 )e 2 1 uw 2 + s 9 (d 1 d 4 d 2 3 d 2 2 )e 1 vw 2 (6.10) where we dropped, by abuse of notation, all tildes of the coordinates in (6.8) and all primes of the sections in (6.9). The hypersurface (6.10) is a section of the anti-canonical bundle of the new ambient space, denoted dP B 2 (S 7 , S 9 ), after the blow-up (6.8). It reads denotes the anti-canonical bundle (2.9) of dP B 2 (S 7 , S 9 ) that is pulled back via the blow-down map (6.8).
There is one caveat when working with a particular resolution such as (6.8). It has been discussed in detail in [20,21,22], but has also been long clear in the toric context, see e.g. [41,42,44,78] for recent studies, that the resolution of an SU(5)-singularity over codimension one in B is not unique. The different resolutions are related by mild birational transformations. In the context of toric geometry, this is visible as different phases of the toric ambient variety 21 , that descend to different phases on the Calabi-Yau fourfoldX SU (5) . One way to specify these different phases is by the Stanley-Reissner ideal SR, which describes which divisors in (6.9) do not intersect. However, we can always restrict ourselves to one particular resolution in order to extract physical quantities like the matter content, Yukawa points and chiralities in F-theory. This is intuitively clear since the resolved geometryX SU (5) is just a tool to analyze the geometry and not physical in F-theory. This can be argued more precisely in the dual M-theory compactification similar to the discussion in [79].
Thus, we focus here on one particular phase of the resolution (6.8) to extract the effective physics of F-theory onX SU (5) . Following the spirit of toric geometry, we specify the precise resolution (6.8) by stating a specific SR-ideal. Here we consider an ideal of the form We immediately recover the SR-ideal (2.5) of the dP 2 -fiber as the first set in (6.12), ensuring the intersections (2.4) of the fiber. The second set gives rise to the correct intersections of the Cartan divisors to obtain the intersection pattern of the A 4 Dynkin diagram. The third part encodes the intersections of the Cartan divisors with the sectionŝ s P ,ŝ m . The last part in (6.12) is the pull-back of the SR-ideal SR B of the base B under the blow-down map π SU(5) in (6.8). We will comment on the structure of this ideal in more detail in section 6.2. For now we just state that it contains the SR-ideal of the base and additional intersections involving the D i and the vertical divisors, that take care of the split of the divisor z into multiple components under the blow-up map (6.8).
Let us next discuss the structure of the resolutionX SU(5) at codimension one in B. The general fiber ofX SU(5) is the dP 2 -elliptic curve E. However, over S b SU(5) the fiber becomes reducible. One way to see this is by noting the following intersections of the Cartan divisors D I , where D α , D β are arbitrary vertical divisors and C IJ is the extended Cartan matrix of 21 In general, there can also be phases of the toric variety andX SU(5) that do not correspond to different resolutions but for example to different phases of B or of the general fiber E. These might even change the intersections e.g. of the fiber E from the ones considered in section 2.1 by going for instance into a phase corresponding to F 1 blown up at a point. We exclude these phases here and in particular in sections 5.4 and 7.3.

SU (5) reading
(6.14) We note that (6.13) can be calculated via the abstract presentation (3.18) of the cohomology ring ofX SU(5) , see section 6.2 and appendix D for details. The intersections (6.13) then immediately imply that the divisors D I resolve a singularity of type G = SU (5). Indeed, we note first that (6.13) implies a fibration structure (2.23) of the Cartan divisors π : D I → S b SU (5) with the rational fibers c −α I corresponding to the simple roots −α i and the extended root −α 0 = i α i of SU (5). The latter conclusion can be shown by representing the individual curves c −α I as intersections of the divisors D i with a curve Σ b dual to S b SU (5) in the base, i.e. assuming S b SU(5) · Σ b = 1 we obtain Then, we immediately confirm from (6.13) and (6.14) that the c −α I in fact intersect as the affine Dynkin diagram of SU(5), see figure 6, justifying the assignment c −α I ↔ −α I .
Next we turn to the behavior of the rational sections ofX SU (5) . Generically, the sections are points in the fiber and only intersect one of its irreducible components. As we have just seen the fiber over S b SU(5) splits into five rational curves. The component which is pierced by the three sectionsŝ P ,ŝ Q andŝ R can be determined by calculating the intersections of their divisor classes S P , S Q,R with the curves (6.15). We find that S P and S R intersect c −α 0 , and S Q passes through c −α 3 , i.e. S P · c −α I = S R · c −α I = (1, 0, 0, 0, 0) I , S Q · c −α I = (0, 0, 0, 1, 0, 0) I . (6.16) This situation is summarized in figure 6. We note that this intersection pattern of the rational sections would correspond to a 2−3 split in the language of spectral covers. Again, the result (6.16) can be obtained via the abstract intersection computation outlined in section 6.2 and in appendix D. Figure 6: I 4 -fiber over S b SU(5) marked according to the intersections of the nodes with S P , S Q , S R , corresponding to a 2 − 3-split of a spectral cover.
Equipped with these intersections of the sections with the nodes of the Dynkin diagram, we can calculate the Shioda maps of the sectionsŝ Q ,ŝ R . We obtain (6.17) Here we have used the general formula for the Shioda map in the presence of one set of Cartan divisors D i due to a codimension one singularity of type G of the elliptic fibration, (6.18) The first two terms are identical to those in the Shioda map (2.20), whereas the last term incorporates the presence of G and involves the fibral curves c −α i corresponding to the simple roots of G as well as the inverse of the normalized coroot matrix C ij of G. For the case of SU(5) considered here C ij is identical to the Cartan matrix C ij .

Matter: Codimension Two
Now we proceed to analyze the resolved codimension two singularities inX SU (5) . There are five loci z = P i = 0, i = 1, . . . , 5, in (6.7) where the order of vanishing of the discriminant enhances, indicating the presence of an I 5 -singularity and of 5 representations in F-theory. In addition, there is one codimension two loci z = β 5 = 0, where the singularity enhances to type D 5 and where matter in the 10 representation is located F-theory.
We analyze in the following the splitting of the nodes of the A 4 -fiber over all these codimension two loci, determine the U×U(1)-charges (q 1 , q 2 ) of all the non-Abelian representations along with their KK-charges, which we find to be zero. As in the U(1)×U(1) case there will be only the SU(5)-singlet 1 (−1,−2) with non-trivial KK-charge. We also determine which weights of the respective representations are realized as holomorphic curves and thus lie in the Mori cone ofX SU (5) . This fixes the sign-function in (4.12) for each of these representation and allows for the field theoretic computations outlined in section 4.2, that will be used in section 7. We conclude with a determination of some matter surfaces C w R . The analysis of the splitting of nodes at codimension two presented in this section is very similar to the ones performed earlier in the literature based on the Tate model of elliptic fibrations. Therefore, our discussion will be brief and we refer to [21,22] for more background on the general methodology.

The 5-representations and their U(1) × U(1)-charges
In the following we study the codimension two loci z = P 1 = 0 in detail. The analysis of the other loci z = P i = 0 of 5-representations is very similar. Therefore, we will only summarize the results of our computations at the end of this section.
At the loci P 1 = (s 2 s 5 − s 1 s 6 ) = 0 defined (6.7) the second node in figure of the fiber becomes reducible, as depicted figure 7. This can be observed by intersecting the locus This means that the class of the curve c −α 2 splits into two curves c 1 , c 2 when restricted to the non-generic loci P 1 = 0 . From the perspective of the ambient space dP B 2 (S 7 , S 9 ) we can write this splitting using (6.19) as where we denoted the homology classes of the curve c i as [c i ] and used the shorthand notation [v] for the homology class of v, cf. (6.9). In order to arrive at this result we first have to use the SR-ideal 6.12 and the fact that H 4 B = 0. The splitted curves c 1 , c 2 correspond to a weight w, respectively, −w of the 5representation according to the general correspondence between isolated rational curves over codimension two in B and matter in F-theory explained before (3.1). The Dynkin label 22 (q i ) of a weight w is calculated in general geometrically as the intersection which is in complete analogy with the formula (3.4) for the computation of U(1)-charges. We apply (6.21) for the curves in (6.20) to obtain the Dynkin labels of c 1 and c 2 as respectively. As an immediate consistency check we recover the Dynkin label of −α 2 as the sum of these Dynkin labels. We also note, for completeness, that in this case, none of the curves c 1 , c 2 intersect the rational sections, as can be seen by calculating intersections as in (6.16). This is again expected since the original unsplitted curve c −α 2 does not intersect the rational sections either, see figure 7.
The first set of Dynkin labels in (6.22) is recognized as the Dynkin label of the weight −(µ 5 − α 1 ), where −µ 5 is the highest weight with Dynkin label Λ 5 = (−1, 0, 0, 0). Since the Cartan divisors correspond to −α i , however, we interpret this as 5-representation The second Dynkin label corresponds to the weight (µ 5 − α 1 − α 2 ) of the 5 representation. All the other weights of 5 can then be obtained by adding appropriately one of the curves c 1,2 and a number of curves c −α i of the simple roots c −α i . We exemplify this here to obtain the remaining weights of the 5,

Dynkin label
Curves (-1,0,0,0 From this table we can directly see which curves are in the Mori cone ofX SU (5) . The two curves c 1 , c 2 are effective because we explicitly know their holomorphic representation (6.19) . Also by construction, the curves associated to the simple roots c −α i are effective and so are the sums of effective curves with positive coefficients. This implies that we can now evaluate the sign-function (4.12). It is positive for the first two representations in table 6.23, but negative for the other three curves, that are not in the Mori cone. We summarize these findings, along with the signs of the other representations in (6.27).
Next, we calculate the U(1)×U(1)-charge using the first equality in the charge formula (3.4). For the U(1) associated to the S Q section, we intersect the Shioda map σ(ŝ Q ) in (6.17) with any of the curves in (6.23) of the representation. For example using the locations in figure 7 of the sections on the fiber, as well as the intersections (6.13) and (6.22) we obtain The second U(1)-charge related to the section S R follows similarly as In summary, we have found the matter representation 5 (− 2 5 ,0) is realized at the codimension two loci P 1 = z = 0.
A similar analysis can be performed at all other loci z = P i = 0, i = 2, 3, 4, 5 of 5-representations. The computations are completely analogous to the ones performed above, but not very enlightening. In all cases we obtain a split of nodes similar to the one in figure 7 and obtain an I 5 -fiber. The U(1)×U(1)-charges can be straightforwardly calculated. We skip these details and just summarize all charges of 5 representations we obtain: We note that we are working in a normalization of charges which allows for fraction. We can rescale our charges as usually done in the literature in this case by a factor of 5 to obtain integral charges.
We also summarize which curves c w of which weights are in the Mori cone ofX SU (5) . As before we use this to determine the values of the sign-function in (4.12). We obtain the following results: The 10-representation and its U(1)×U(1)-charges For completeness, we briefly discuss the fiber at the loci z = β 5 = 0. In this case more curves c −α i become reducible. Repeating the same procedure as above, we insert z = β 5 = 0 and d i = β 5 = 0 into the Calabi-Yau equation (6.10), we obtain the following splitting of nodes, Node splits into Cartan charges z = 0 c a : d 4 s 8 u + d 1 d 2 d 4 s 9 v + d 1 e 2 s 7 v 2 = 0 (0, 1, 0, 0) We observe that both the curves c −α 0 and c −α 2 split into two, respectively, three components, denoted c a , c b , respectively, c b , c −α 4 and c c , where we note that the curve c a is the extended note, i.e. the original singular fiber. The fact that the curves c b and c −α 4 appear twice means that they have multiplicity two. The intersection numbers between all the curves in (6.28) can be calculated taking into account the SR-ideal of the ambient space. The intersection pattern of the curves reproduces a D 5 -curve, see figure 8.

KK-Charges
We note that at all codimension two singularities inside the divisor S SU (5) the section S P is holomorphic. This means for these type of matter the KK-charges vanish, q KK = 0. The only representation with non-trivial KK-charge is, as before in section 5.2 the matter field 1 (−1,−2) . Its KK-charge is q KK = 2.

Matter surfaces
We conclude the discussion of codimension two singularities by constructing the classes of certain matter surfaces C w R . As before in section 3.1 we are able to obtain these classes only for a subset of the representations.
We first comment on the calculation of matter curves in the base. A very convenient way to calculate all matter curves Σ R is by projecting the intersections d i = P l = 0, l = 1, . . . , 5 or d i = β 5 = 0 to the base, where d i is the coordinates associated to the Cartan divisor D i that has split at that codimension two loci under consideration. The homology classes of the matter surfaces are then given as where the divisor D i has to correspond to the node that has split at the location of the matter representation R. Here we have used the property π(D I ) = S SU (5) in the second equality.
As in the Abelian case, we can only specify some matter surfaces completely. As before, this complication arises since we are only able to isolate the irreducible components in the elliptic fiber locally, but can not infer the total space of the fibration C w R → Σ R . The subset of matter surfaces, that we can explicitly determine, along with their homology classes, reads, Here we made use of the SR-ideal (6.12), the assignments of sections given in (6.4), (6.9) and have abbreviated the divisors class of the s i as [s i ]. In addition, we have suppressed the intersection with the class of the base B when denoting the matter curves Σ R and by abuse of notation used same symbol for vertical divisors and divisor in the base.
The matter surfaces for the singlets 1 (−1,1) , 1 (0,2) and 1 (−1,−2) have been analyzed in detail in section 3.1 in the case of a U(1)×U(1) gauge group only. In the presence of an SU(5) at codimension one, the matter surfaces determined in (3.7) change. Taking into account the new classes (6.4), (6.9) and the new equation of the Calabi-Yau fourfold (6.10) we obtain the matter surfaces as

Yukawa Couplings: Codimension Three
We focus in this section on the determination of those Yukawa points that involve at least one the non-trivial representations under SU (5). For an analysis of the Yukawa points of the singlets, we refer to the discussion in section 3.1.2, that applies without any changes.
Further enhancement of singularity type of the elliptic fibration can be read directly from the discriminant (6.6) ofX SU (5) . Our strategy in determining these loci is to look for two polynomials, typically describing two matter curves, such that at their common vanishing locus the discriminant vanishes with order n greater than five, i.e. ∆ ∼ z n for n > 5. Then we check explicitly that the fiber of the resolutionX SU(5) splits further. We perform this analysis in the following for all present matter representations ofX SU (5) .
We begin with the loci of the single 10 representation. We note that here, since β 5 = s 6 = 0, the discriminant already vanishes to degree seven and takes the form Vanishing of any of these prefactors will enhance the zero of the discriminant to degree eight or higher. First, we analyze the vanishing s 6 = s 5 = 0 on the divisor z = 0. The polynomial P 1 vanishes but no other P i does, so this point belongs both to the matter curve of 5 2/5,0 and of 10. Although the fiber does not degenerated to an E 6 -fiber the Yukawa coupling exists. The gauge invariant coupling we read off is ,0) , (6.35) Next, we study the vanishings of s 2 or s 8 with s 6 = z = 0. In this case we obtain couplings of the type 5 × 5 × 10. We note that the fiber does not enhance to a D 6 -fiber, but the Yukawa is still realized geometrically.
Finally, we consider the last enhancement of the vanishing of (6.34) with s 7 = s 6 = 0. In this case the intersection of the Cartan divisor D 4 with the Calabi Yau hypersurface is automatically zero. Since we are now only specifying three conditions d 4 = s 6 = s 7 = 0 in a five-dimensional ambient space, the fiber has to be complex two-dimensional, namely the whole del Pezzo surface dP 2 . The elliptic fibration ofX SU(5) is non-flat, with a complex two-dimensional fiber over codimension three. We note that this effect occurs also for other SU(5)-embeddings [46].
The physics of this a non-flat fibration has been discussed in [84]. As mentioned before, an M5-brane can wrap the surface in the non-flat fiber, and give rise to a string in a three-dimensional M-theory compactification. In addition, M2-branes can wrap holomorphic curves in dP 2 . In the blow-down ofX SU (5) , and in particular in the Ftheory limit, the states associated to these degrees of freedom become massless. For phenomenology these additional light states are usually undesired and can render the compactification unphysical, since we have to deal with an infinite tower of charged excitations of the string, which cannot easily be represented by a finite number of fields.
As discussed in the introduction of the section, one attempt to deal with the presence of the extra degrees of freedom from the non-flat fiber is to forbid a chiral excess of states. As we will demonstrate in section 7 this can be achieved by tuning the G 4 -flux as in (6.1), so that it integrates to zero over the non-flat fiber. Alternatively, we can simply forbid the Yukawa point with the non-flat fiber geometrically. Recalling [s 6 ] = [K −1 B ], cf. (2.10), and π(D 4 ) = S SU (5) , all we have to demand is that One obvious but drastic solution is S 7 = 0 since it deprives us from some singlets and nonsinglets representations. A more sophisticated solution to (6.36) is obtained as follows.
We recall the basis expansion (2.25) of the divisor S 7 and in addition expand Then, it is possible over an appropriate base B to tune the integers n α 7 and n α SU(5) in such a way to only forbid the dangerous Yukawa point (6.36) without restricting the spectrum ofX SU (5) and the other Yukawa points. As a concrete simple example one can choose B = BlP 3 , the blow-up of P 3 along the curve x i = x j = 0. Then (6.36) yields n 1 SU(5) (4n 1 7 + 3n 2 7 ) + 3n 2 SU(5) n 1 7 = 0 for D α = {H, H − E} with H the hyperplane and E the exceptional divisor and K −1 Clearly, this can be solved without removing other codimension two or three singularities.
We summarize all Yukawa couplings involving the 10-representation at s 6 = z = 0 in the following table, Loci Yukawa coupling s 5 = 0 5 6.2 The Cohomology Ring and the Chern Classes ofX SU (5) In this section we apply the techniques described in section 3.2 to perform computations in the vertical cohomology H ( * , * ) V (X SU(5) ) of the Calabi-Yau fourfoldX SU(5) with a resolved SU(5)-singularity over S SU (5) . The computations are completely analogous to the ones performed to obtain the cohomology ofX. All we have to do is to add the Cartan divisors D i , i = 1, . . . , 4, as additional variables to the polynomial ring R in (3.18). We note that the extended node D 0 = S SU(5) − i D i corresponding to z is then automatically included. We also have to replace the ideal SR in (3.18) by the ideal (6.12) arising after the resolution process (6.8). Finally, we have to employ the anti-canonical bundle (6.11), which is the class ofX SU (5) in the blown-up ambient space dP B 2 (S 7 , S 9 ). We summarize the presentation of the vertical cohomology ring ofX SU (5) as with the ideal SR given in (6.12). Here we have singled out the vertical divisor S SU(5) of the original SU(5)-singularity.
We begin by using these techniques to calculate the Euler number and Chern classes ofX SU(5) for a general base B. Then we construct the full cohomology in the case of B = P 3 . In the following discussion we will quote the main results from this analysis and refer to appendix D for more details on the calculation, in particular the full quartic intersections ofX SU (5) from which all the following is derived.

Second Chern Classes and Euler Number ofX SU(5) : General Formulas
The strategy for the computation of the Euler number is is a mixture of the strategy in section 3.2 and the approach of [21] to compute Chern classes of fourfolds with a resolved SU(5)-singularity. The key point is to find a SR-ideal that contains sufficiently fine information to do concrete calculations, but that is sufficiently coarse in order to not depend on the details of B. The starting point is the SR-ideal (6.12). The only degree of freedom here is the pullback π SU(5) (SR B ) of the SR-ideal of the base. Instead of using the full ideal that depends on the details of B we again work with a simplified version denoted SR B that is based on some universal geometric properties of the fibration of X SU (5) .
As in (3.20) we assume that SR B contains all quartic intersections of the vertical divisors D α . In addition we assume as in [21] that three vertical D α never intersect the Cartan divisors D i due to a too large codimension in the base. Thus we use the ideal instead of π SU(5) (SR B ) in (6.12). As we demonstrate next this is sufficient to calculate the Chern classes and Euler number as well as to check basic intersections ofX SU(5) , as for the fourfoldX considered in section 3.2.
Next we calculate the total Chern class ofX SU (5) . All we need is the Chern class of the blown-up ambient space dP B 2 (S 7 , S 9 ) and to apply adjunction. The computation of the Chern class of the ambient space is straightforward, but lengthy and little illuminating. We simply use the result (C.2) and refer to appendix C for details. Then we use adjunction as in (3.21) to obtain the total Chern class ofX SU (5) . We present here the results of the second Chern class c 2 (X SU (5) ) that reads where c 2 (X) denotes the second Chern class (3.22) onX. As a sanity check we take the blow-down limit by formally setting D i → 0 and S SU(5) → 0 in which we precisely recover the Chern class (3.22) before resolution.
Next we calculate the Euler number onX SU (5) . For this purpose we can either bootstrap ourselves and use (6.43) in combination with the relation (3.28) or calculate the fourth Chern class onX SU(5) directly by expanding (C.2) to higher order in the adjunction formula expression for the Chern class forX SU (5) . In either case we obtain where χ(X) denotes the Euler number (3.24) ofX before the blow-up, to which our result (6.44) specializes correctly in the limit D i , S SU(5) → 0.
The Full Cohomology Ring ofX SU(5) : B = P 3 Next we compute the full vertical cohomology ofX SU(5) with base B = P 3 . In this case, there is only one divisor in the base, the hyperplane H B , thus, we have D α = H B . Furthermore, the resolved SU(5)-singularity ofX SU(5) is located over S b SU(5) = H B . The Hodge numbers are calculated to be where the number of independent surfaces as in the Abelian case depends on the values of n 7 , n 9 = 0, see figure 9. As the basis of H (1,1) , we use the following divisors  Then we compute the grade two piece R (2) of the ring (6.41). We obtain 64 different monomials in two divisors, but due to equivalence relations in (6.41) at most 13 of them (X SU(5) ) for the various values of allowed n 7 , n 9 . On the blue boundary and at n 7 = n 9 = 0 we have a holomorphic zero section.
are independent, with jumps along the boundary of the allowed region of n 7 , n 9 in figure  9. A carefully chosen basis of H (2,2) V (X SU(5) ), thus, has to have always the correct number of surfaces for the entire allowed region. The analysis of appendix E proves that one convenient basis is given by At the boundaries of figure 9, one or more elements in H (2,2) V (X SU(5) ) become linearly dependent. Thus, they can be expressed in terms of as smaller basis that one obtains by dropping the linearly dependent elements from (6.47). The expansions of the linearly dependent elements in terms of this reduced basis for the various boundary components of figure 9 can be found in appendix E. The result of this analysis is that we can obtain a basis on all boundaries from the basis 6.47 by successively dropping the elements S P · σ(ŝ R ), H B · σ(ŝ Q ) and D 2 · D 4 . This way we obtain, as required, in steps twelve, eleven and ten independent surfaces on the relevant boundary components.

G 4 -Flux & Chiralities on Fourfolds with SU(5)×U(1) 2
With the cohomology ring at hand we finally calculate the general G 4 -flux, see section 7.1, and 4D chiralities in this section. As before, the lack of knowledge of all the matter surfaces forces us to employ the 3D Chern-Simons terms and M-/F-theory duality to determine the remaining chiralities, cf. section 7.2. It turns out again, that the Chern-Simons terms by themselves are sufficient to determine all the chiralities. The chiralities determined by geometric techniques for a subset of matter therefore provide an independent check. We also check that for the obtained spectrum all four-dimensional anomalies are cancelled. Full explicit results are again presented for the base B = P 3 . We also present one concrete toric examples in section 7.3.
There is one accompanying appendix F with further details on the G 4 -flux and the full expressions for the 4D chiralities.
We recall that there can be non-flat fibers at codimension three inX SU (5) . As mentioned before, these can be avoided for general bases B, but are generically present for B = P 3 . 23 We deal with these complications here by forbidding a chiral excess of the additional light degrees of freedom associated to the non-flat fiber. This is achieved by requiring one additional condition on the G 4 -flux, namely the vanishing of the integral (6.1). As we demonstrate here, this ensures that the 4D chiralities can successfully be determined both via geometric techniques and M-/F-theory Chern-Simons terms, and that the resulting chiral spectrum cancels all anomalies of the four-dimensional quantum field theory.

G 4 -Flux on Fourfolds with Two Rational Sections & SU(5)
The construction of G 4 -flux presented in this section is very similar to the one of section 5. Therefore, we will keep the following discussion as brief as possible and choose, as before, the base B = P 3 to demonstrate our techniques.
We begin by expanding the G 4 -flux in the generically 13-dimensional basis (6.47) of the cohomology group H (2,2) V (X SU(5) ), see (4.3). We note that the dimensionality of H (2,2) V (X SU (5) ) jumps at the boundaries of figure 9, however, our general formulas for the G 4 -flux derived in this section will remain valid. Then we enforce the generically six independent flux-conditions (4.10). Again we emphasize, that unlike in compactifications with a holomorphic zero section, the CS-terms Θ M 00 , Θ M 0i must not be required to vanish, nor vanish automatically.
Since we are imposing generically six independent conditions 4.10 on the 13-parameter G 4 -flux, we obtain a seven-dimensional G 4 -flux, +125 · H 2 B 136 5 + n 9 (4 − n 7 + n 9 ) + 850 · H B · S P + 125σ(ŝ Q ) 2 , The general G 4 -flux (7.1) specializes correctly at the boundaries of figure 9 and the concrete expressions for it can be obtained at every boundary component, completely analogous to the discussion of section 5.1. The necessary analysis of the behavior of the basis (6.47) along with the homology relations between linearly dependent elements on the respective boundaries can be found in appendix E.

4D Chiralities from Matter Surfaces & 3D CS-Terms
In this section we finally calculate the chiralities of the total matter content of the Ftheory compactification onX SU (5) , that we have determined in section 6.1. We recall that there are six singlets, five different 5-representations and one 10, cf. section 6.1. After having determined these chiralities, we check cancellation of 4D anomalies at the end of this section. We find that all anomalies are cancelled in general.
As mentioned before, all chiralities can in principle be calculated from the G 4 -flux in (7.1) and the matter surfaces by evaluating the index (5.12). However, as in the discussion of section (5.2), we only have the explicit homology classes of the six matter surfaces (3.7) and (6.32). Again, we can obtain all chiralities by combining this information with the matching of 3D Chern-Simons terms as outline in section 5.2.1. We first calculate the chiralities from the six matter surfaces for the general G 4 -flux (7.1) and then impose the non-flat fiber condition (6.1). Only then it is possible to obtain the remaining chiralities from the matching of 3D CS-terms.
Similarly, we check the matching of the CS-levels Θ 0m . As before, a matching of the M-and F-theory expression for these CS-levels requires the relation (5.17) to hold, −2) ) . (7.5) Indeed, we evaluate the flux integral on the left to confirm this equality.
Finally, we comment on the CS-terms Θ 0i . From the direct computation of the relevant integrals of the G 4 -flux, cf. (4.4), we obtain Θ M 0i = 0, since S P · D i = 0 in the homology ofX SU(5) , cf. (D.5) in appendix D. This immediately agrees with the field theory result Θ F 0i in (4.8) since there the only charged matter states in 3D with non-trivial KK-charge is the singlet 1 (−1,−2) , which however has q i = 0 for all i.
Coming back to the calculation of chiralities, we recall that for n 7 > 0 there is a non-flat fiber, since the codimension three point s 6 = s 7 = d 4 = 0 exists, cf. section 6.1.3. If we ignore this fact and try to solve for the chiralities using the matching condition 4.5 we find where the left hand sides are functions of chiralities. These equations are obviously inconsistent on the F-theory side. However, this is not surprising since the existence of a non-flat fiber implies the presence of additional light states, that we have not taken into account on the field theory side. Since these states are probably unwanted in setups aimed at the construction of phenomenologically appealing F-theory compactifications, we require the absence of a chiral excess of these light states. As we see from (7.6) the appropriate condition to impose is to demand the vanishing of the second line.
It is satisfying to see that the vanishing of this second line is precisely the non-flat fiber condition (6.1) on the G 4 -flux. Indeed, using the general G 4 -flux (7.1) and the homology class of the loci of the non-flat fiber on the left of equation (6.36), we obtain which implies exactly a vanishing of the second line in (7.6). Thus, we see that we obtain a consistent set of equations in (7.6) if we impose the non-flat fiber condition (6.1), as claimed.
In summary, for n 7 = 0 the vanishing of (7.6) does not impose any additional conditions on the G 4 -flux, whereas for for n 7 > 0 its vanishing implies the additional condition Thus, the number of free parameters in the G 4 -flux in (7.1) is reduced to six. Furthermore, as we demonstrate in the following imposing the condition (7.6) will yield a consistent 4D chiral spectrum with all anomalies cancelled. For a better overview over the conditions we impose, we summarize the number of independent elements in the G 4 -flux graphically in figure 10.
Imposing now the condition (7.7) we solve the first line of (7.6). The solutions are straightforwardly obtained, but lengthy and can be found in appendix F. However, instead of parametrizing the chiralities in the parameters a i of the G 4 -flux in (7.1), we can  Figure 10: There are six independent constraints on the G 4 -flux from the CS-terms. In order to obtain an anomaly free spectrum, for n 7 > 0, we force the vanishing condition (7.6), respectively, (7.7). The small number in orange next to each point is the final number of parameters in G 4 -flux. The maximal number is six in the bulk.

Anomaly Cancellation
We conclude this general discussion of the spectrum by checking the cancellation of 4D anomalies. For a short review, see section 5.3, or see [44] for more details.
Having derived the spectrum in the previous paragraph, all we have to calculate to check anomaly cancellation are the gaugings Θ αm for m = 1, m = 2, cf. (5.22). The results of this computations in terms of the parameters a i of the G 4 -flux can be found in appendix F. As mentioned before, we can alternatively use the chiralities (7.8) as parameters. Then we obtain The coefficients b α mn of the GS-counter terms change slightly compared to the U(1)×U(1)case of section 5.3 because of the altered Shioda map (6.17), with and a α remaining the same. We obtain b α mn = 34 5 4 − n 7 + n 9 4 − n 7 + n 9 8 + 2n 9 , a α = −4 . χ(5 (q 1 ,q 2 ) ), (7.12) where the sum is over all different 5-representations, that are labeled by their charges (q 1 , q 2 ), and where we used the representation 10 (− 1 5 ,0) as explained below (7.9). The purely Abelian anomalies are The mixed non-Abelian-Abelian, and Abelian-gravitational anomalies read (7.14) Using the gaugings (7.10) and the coefficients (7.11) of the GS-terms, we confirm that the 4D anomaly cancellation conditions (5.22) hold.

A Toric Example
In this concluding subsection we construct explicitly a toric model with all characteristics described in this section, i.e. an SU (5) × U (1) 2 4D gauge group, the full spectrum computed in sections 6.1, 7.2 and with a non-flat fiber.
The concrete fourfoldX SU(5) we construct has n 7 = n 9 = 4 in figure 5 and has S SU(5) = H B . It is engineered following the general guideline of appendix G. The vertices specifying the reflexive polytope, along with their associated homogeneous coordinates and divisor classes, are as follows, variable vertices divisor class Here we follow the notation of section 6.1, i.e. H B is the hyperplane of P 3 , the D i are the Cartan divisors of the SU(5) and H, E 1 , E 2 are the classes of the dP 2 -fiber.
It follows that all 4D anomalies are cancelled.

Conclusions and Future Directions
In this paper we have advanced the program on F-theory compactifications on elliptic Calabi-Yau manifolds with rank two Mordell-Weil group to four-dimensional chiral compactifications.
The analysis of resolved Calabi-Yau elliptic fibrations with dP 2 -elliptic fiber has now been performed for Calabi-Yau fourfolds over a general three dimensional base B, extending earlier results in six dimensions [46,51]. We study general compactifications with U (1) × U (1) and a specific SU (5) × U (1) × U (1) gauge symmetry. We determined the general matter representations associated with the codimension two singularities of the fibration as well as its Yukawa points. However, at present the geometric techniques, relying on the use prime ideals, that we employed allow us to determine all matter curves and only a subset of matter surfaces. As a next step, we determine explicitly the general G 4 -flux of these resolved Calabi-Yau fourfolds. Since we considered Calabi-Yau fourfolds with a non-holomorphic zero section, we encountered the novel problem of having to define G 4 -flux over these manifolds. For this purpose we had to derive the general F-theory conditions on G 4 -flux on Calabi-Yau manifolds with a non-holomorphic zero section. We have formulated these conditions in terms of Chern-Simons terms on the Coulomb branch of the effective theory obtained by compactifying on a circle. The relevance of Kaluza-Klein states generating new Chern-Simons terms in order to ensure a consistent M-/F-theory duality mapping in 3D has been pointed out After this interlude on G 4 -fluxes in F-theory we constructed the most general G 4 -flux. We presented explicit calculations for the three dimensional base B = P 3 . In both the U(1)×U(1) and SU(5)×U(1)×U(1) case we could determine certain chiralities directly by evaluating the chiral index (5.12) directly while the remaining matter chiralities were determined by a subset of the 3D Chern-Simons terms. It turned out that Chern-Simons terms are sufficient to determine chiralities of all the matter multiplets if also the new, Kaluza-Klein generated Chern-Simons terms are taken into account. The geometric techniques allowed an important, independent consistency check. The complications of non-flat fibers could be successfully circumvented by imposing one additional condition on the G 4 -flux, namely the vanishing of the integral of the G 4 -flux over the non-flat fiber. We also presented concrete explicit examples using toric geometry. We emphasize that our techniques are in line, but not restricted to toric geometry. In particular, we could calculate the most general G 4 -flux and chiralities, along with the proof of anomaly cancellation, for the entire class of all elliptically fibered Calabi-Yau fourfolds, cf. Figure  2 and Figure 5, with dP 2 -elliptic fiber, an additional SU(5) GUT-sector and a fixed base B, here chosen to be B = P 3 for simplicity.
There paper leaves room for a number of further studies and improvements: • The geometric techniques developed here apply to general elliptic Calabi-Yau fourfolds, and they are not restricted to toric examples. In particular, we could derived closed formulas for e.g. the Euler number, the G 4 -flux and the 4D chiralities that explicitly depend on the divisors S 7 , S 9 , introduced in Section 2.2, which label the members in the family of all inequivalent Calabi-Yau fourfolds obtained by varying the topologically data specifying their elliptic fibration. It would be desirable to obtain these formula for an arbitrary base B. Our results are independent of the existence of toric realizations of the Calabi-Yau fourfolds. We emphasize that employing toric geometry techniques one can typically study only one polytope at a time, which obscures the dependence on S 7 , S 9 .
• The finite number of choices for the divisors S 7 , S 9 on the F-theory side fix the topology of the fibration of dP 2 over the base B. It would be interesting to understand these new degrees of freedom from the point of view of the heterotic string. In particular it would be important to understand how the parameters in S 7 , S 9 enter the heterotic vector bundle and potentially modify the spectral cover construction [85].
• Although all 4D chiralities could still be derived by a combination of geometric and field theoretic techniques, we were at this point unable to determine explicitly the matter surfaces for a subset of representations. It would be desirable to derive these missing homology classes purely geometrically by further extending the geometric techniques of Section 3.1.1. For this analysis important lessons might be learned from a geometrical interpretation of the field theoretically derived G 4 -flux conditions in Section 4.2.
• While explicit results were presented for a specific three-dimensional base B = P 3 , it would be important to present similar computations for systematically classified threedimensional bases, extending a similar analysis in 6D [86,87]. These studies are also motivated by a search for SU (5) GUT models with flat fibers.
• In this paper we have not systematically performed a classification of SU (5) GUT models. We presented models for a specific SU (5) construction with a specific base B = P 3 , only. The example does not have a flat fibration at codimension three, which may lead to an infinite tower of massless states (a so-called tensionless string spectrum). We removed chiral states in the tower by further constraining the G 4 -flux. It would be important to classify SU(5) constructions by carrying over the Tate classification to dP 2elliptic fibrations, and to construct a base B where the fibration can be engineered to be flat. For efforts in these directions, primarily employing toric techniques, see [46,47]. We note that the classification of SU(n)-singularities for general n should work similarly to the SU(5) case and thus will be facilitated by techniques developed in this work.
• The techniques developed in this paper pave the way to phenomenological studies of chiral four-dimensional models with rank-two Abelian sectors. However in order to achieve these goals a number of further details have to be addressed. First, the quantization of G 4 -flux is not well understood in general. However, as pointed out in Section 4 we can choose the chiralities of our matter multiplets to parameterize the spectrum which should in turn also yield integer values for the flux-quanta in the G 4 -flux. Second, the constraints imposed by the self-duality condition on the G 4 -flux and by D3-brane tadpole cancellation have to be investigated. Those are important topics for future research.

A Chern Classes of dP 2 -Elliptic Fibrations
In this appendix we analyze the total Chern-class of the total space of dP 2 -fibrations dP B 2 (S 7 , S 9 ) over a general base B. The following discussions hold in any complex dimension, although we specialize to Calabi-Yau two-, three-and fourfolds in the following.
The final goal of this section is the derivation of general formulas for the Euler number of smooth Calabi-Yau manifoldsX of complex dimension two, three and four in dP B 2 (S 7 , S 9 ). For the reader only interested in these formulas, we first state the results of the analysis and refer to the remainder of this section for a detailed derivation. The Euler numbers for Calabi-Yau two-, three-and fourfolds are expressed as the following integrals over the one-, two-respectively, three-dimensional base B of the Calabi-Yau manifoldX, Here we denoted the Poincaré dual (1, 1)-forms by abuse of notation by the same symbol as their corresponding divisors S 7 , S 9 in the base B. Furthermore, wedge-products have been omitted for brevity of our notation. We emphasize that these formulas for χ(X) are a direct generalization of the formulas in [57] for fibrations by the E 6 elliptic curve, that are obtained as the special case S 7 = S 9 ≡ 0.
We prepare the derivation of the Euler numbers (A.1) by a computation of the total Chern class of the ambient space dP B 2 (S 7 , S 9 ). The total space of the dP 2 -fibration dP B 2 (S 7 , S 9 ) in (2.7) has the structure of a generalized projective bundle: the twodimensional fiber is dP 2 and it can be understood as the projectivization of a rank five vector bundle over B by three C * -actions. Consequently, the Chern class of the dP B 2 (S 7 , S 9 ) is calculated analogous to the Chern-class of an ordinary projective bundle by adjunction. Denoting the projective coordinates of the general dP 2 fiber by [u : v : w : e 1 : e 2 ] we follow the assignments (2.2) of line bundles over the base B from the main text. Thus we obtain for the total Chern-class of dP B 2 (S 7 , S 9 ), Here we suppressed the dependence on S 7 , S 9 for brevity of our expression. By abuse of notation we denote the divisors E i and H and the first Chern-classes of their associated divisor bundles by the same symbol. In addition, we used c(B) = 1 + c 1 (B) + c 2 (B) + c 3 (B) + . . . to denote the total Chern class of B. We readily expand (A.2) order by order to obtain the following Chern classes of dP B 2 (S 7 , S 9 ), Here we have used the notation c i ≡ c i (B). All divisors in the above expressions are understood as their Poincaré dual (1, 1)-forms, that are given as the first Chern class of the associated divisor line bundle, e.g. c 1 (O(E 1 )) for O(E 1 ). The expressions for the first to third Chern classes are completely general, whereas we have assumed dim C (B) = 3 for the fourth and fifth Chern class to be able to drop terms containing more than three vertical divisors. In the last line we have used the toric intersections E 2 1 = E 2 2 = −1 in where the numerator is to be computed using (A.2) and the denominator is the Chern class of the anti-canonical bundle of dP B 2 (S 7 , S 9 ), cf. the first line in (A.3), employing thatX is the anti-canonical divisor. Expanding out this expression for the total Chern class of the fourfoldX yields the following individual Chern classes c i (X), Here we have dropped terms quartic in divisors on the base B and have reduced all expressions in the quotient ring (3.18). For the evaluation of (A.9) it proves convenient to express all the elements in terms of the divisor classes S P = E 2 , S Q = E 1 and S R = H − E 1 − E 2 + S 9 + [K B ] of the sections ofX. Then, we can make use of the intersection relations for the sections where we collectively denote the divisor classes of the sections by S m . We note that this relation is a direct consequence of the property of the S m being the classes of sections, as noted before in (2.14), but it is satisfying that it can also be proven directly in the intersection ring (3.18).
In the following we assume thatX is either complex two-, three-and four-dimensional and for each case employ (A.10) and its lower dimensional analogs to simplify the Chern classes in (A.9) even further. We obtain for the top Chern class c d (X) on a d-dimensional for the arithmetic genus of the base B. We observe a surprising cancellation of all terms involving S 7 , S 9 in the fourth Chern class in (A.9) and in c 2 (X) 2 in (A.15) so that the final result in (A.14) only depends on the Chern classes of the base B.
We conclude that for a suitable base B of a simply-connected Calabi-Yau fourfold with χ 0 (X) = 2, which follows from h (0,0) (X) = h (4,0) (X) = 1 and h (p,0) (X) = 0 otherwise, we have to require χ 0 (B) = 1 or, using (A. 16 B Intersection Ring onX with B = P 3 In this section we work out the intersection ring H ( * , * ) V (X) of the fourfoldX over the base B = P 3 . To this end, we relate the intersections onX to intersections on the ambient space dP 2 (n 7 , n 9 ). On the ambient space dP 2 (n 7 , n 9 ) the intersections are determined completely by the intersections of the fiber dP 2 , the base P 3 and basic properties of the fibration. This will allow us, as demonstrated below and in the main text, to work out the basis of H (k,k) V (X) for all k ≤ 4 on the one hand, and to calculate the quartic intersections onX.
We recall from the main text, cf. where S P , S Q , S R denote the homology classes of the sectionsŝ P ,ŝ Q andŝ R , respectively.

Intersection relations and the quartic intersections
Next we begin by calculating the intersections of two divisors D A , where we denote the intersection pairing onX by a subscript. We employ the representation (3.18) for H ( * , * ) (X) to relate these to intersections on the ambient space dP 2 (n 7 , n 9 ), that we denote as '·'. First we note that there are 5! 2!3! = 10 different quadratic combinations D A ·X D B .
We evaluate these as where we used S 7 = n 7 H B , S 9 = n 9 H B and [K −1 B ] = 4H B for B = P 3 . Here we suppressed the intersection product '·' for brevity of our notation. The intersections on the left side of the equations are carried out in the Calabi-Yau fourfoldX and related to the intersections on the ambient space dP 2 (n 7 , n 9 ) on the right side of the equations.
Next, we calculate the triple intersections of divisors onX. There are 6! 3!3! = 20 different cubic combinations D A ·X D B ·X D C with intersections We note that all other intersections vanish, since S P · S Q = 0 and as before we suppressed the intersection product "·" ofX, respectively, dP 2 (n 7 , n 9 ) on the left, respectively, right side of the equations.

The cohomology basis of H
The basis of H (k,k) V (X) for each k = 0, . . . , 4 is now determined as follows. First, we note that there is a canonical basis both for k = 0, 1. Namely, the one-dimensional space H (0,0) (X) is spanned by the generated by 1, H (0,0) (X) = 1 , and four-dimensional H (1,1) (X) is generated by the D A as indicated in (B.1). Using the quartic intersections (B.4) we can now calculate a basis of H −2 (4 + n 9 ) 2n 9 (4 − n 7 + n 9 ) −4 η where lengthy entries η (2) rs that are determined by symmetry of η (2) are omitted and denoted by η (2) sr . From this matrix it is apparent that if (n 7 , n 9 ) are on the boundary of the allowed region in figure 2, the rank is reduced to four. In this case, the five surfaces in (B.5) become homologous. A choice of basis in this case is given by the first four surfaces in (B.5) with the surface S 2 P dropped. Consequently, the intersection matrix η (2) in this case is the 4 × 4-submatrix of (B.7) obtained by deleting the fifth row and column. Let us discus these non-generic cases in more detail, to illustrate the decrease from five to four basis elements. n 7 = 0 : We see from (2.10) that s 7 = 0, which implies thatŝ Q andŝ R are holomorphic, cf. the discussion below (2.12). we obtain the cohomology relation These relations can be proven for n 7 = 0 using the presentation (3.18).
n 9 = 4 + n 7 : In this situation, the sectionŝ Q is holomorphic. Analogously, as before, we compute the homology relation onX reading that are calculated for n 9 = 0. Combining these two relations precisely yields (B.12). n 9 = n 7 − 4 : For this value the sectionsŝ P , but this time since s 8 = 0 as is clear from (2.10). Thus, the relation (B.13) still holds.
Next, we note that the basis of H (3,3) (X) is determined by Poincaré duality from H (1,1) (X). Thus, the group H (3,3) (X) is generated by four elements, independently of n 7 and n 9 , which can be checked by an explicit calculation. However, we will refrain from presenting the details, since the group H (3,3) (X) is of no immediate relevance for F-theory, and leave this as an exercise for the interested reader. Finally, H (4,4) (X) is generated by a single element which is the volume form normalized by the volume ofX. It is given, up to combinatorical factors, by C 0 in (B.4).
C Total Chern Class of dP B 2 (S 7 , S 9 ) In this brief appendix we outline the calculation of the total Chern class of the resolved space dP B 2 (S 7 , S 9 ), which is straightforward but tedious. We keep our discussion short, leaving some details of the calculations for the interested reader.
The basic strategy to obtain the Chern class of dP B 2 (S 7 , S 9 ) is to successively modify (A.2) taking into account all changes of divisor classes in the blow-up (6.8). First we have to use the new divisor classes (6.9) for homogeneous coordinates [ũ :ṽ :w : e 1 : e 2 ]. This alters the second to fourth factors in (A.2) accordingly. Then we have to include the classes of the Cartan divisor, which is achieved by multiplying in (A.2) by i (1 + D i ). Finally we have to modify the first factor in (A.2) to incorporate the split and shift of the class of z by the D i as in (6.9) appropriately. All we have to do is to formally replace the divisor S SU (5)  where we used the relation S SU(5) − D 0 = D 1 + D 2 + D 3 + D 4 between the extended node D 0 and S SU(5) as well as abbreviated the ambient space as dP B 2 . We also denote the classes (6.9) of the homogeneous coordinates by brackets [·]. We emphasize that the new factors (1 + D i ) from the Cartan divisors D i have been combined with the changes in the first factor in (A.2) containing the Chern class of B. D Intersection Ring forX SU(5) with B = P 3 In this section we present the core cohomology calculations of elliptically fibered Calabi-Yau fourfolds π :X → P 3 over P 3 with general elliptic fiber E in dP 2 and an additional resolved SU(5)-singularity over codimension one in P 3 . The geometry has been introduced in section 6, to which we refer for more details. The following discussion is very similar to the one in A and B. Thus, we will keep the exposition as short as possible and only present the key results necessary for the construction of G 4 -flux and 3D CS-terms in the main text.

(D.1)
As before, all intersections are understood to be evaluated onX and the quartic intersections D A ·X D B ·X D C ·X D D are read off as the coefficient of the appropriate monomial in C 0 .
As one immediate application we calculate the Cartan matrix C IJ of the affine Lie algebra of SU(5) as where we supplemented as before the Cartan divisors D i , i = 1, . . reproducing the independent findings in (6.16) and, consequently, the Shioda maps (6.17).
Here we exploited (6.15) to represent the curve c −α I corresponding to the simple root α I as employing H 2 B · S b SU(5) = H 3 B = 1. We note that we can even make the stronger statement S P · D i = 0 (D. 5) in the homology ofX SU(5) , which will be important for the discussion of section 7.2.
The cohomology group H (2,2) V (X SU (5) ) is readily calculated. We generically obtain a 13-dimensional vector space, with certain jumps in the cohomology for non-generic values of n 7 and n 9 , see figure 5. For the application of the construction of G 4 -flux, it proves useful to make a particular choice of basis by hand. We present a thorough analysis of this basis in the next appendix. To obtain the smaller vector spaces of the boundaries we need to drop some elements of this basis. The vectors that become linearly depended at the boundary have to be re-expressed as a linear combination of the smaller basis on the boundary. In the next subsections, we choose bases for the different boundaries. We write the linearly dependent elements, that we can drop from the above 13-dimensional basis, as linear combinations of the rest of the vectors in the smaller basis.

Dimensional
We obtain an eleven-dimensional basis by choosing • At n 7 = n 9 − 4 we obtain the homology relation S P · σ(S R ) ∼ = 0, 10 Dimensional Finally a ten-dimensional basis is given by In this appendix we present the 3D Chern-Simons terms on both the M-and F-theory side and the chiralities, all of which parametrized by the parameters a i of the general G 4 -flux.

F.1 Chern-Simons levels F-Theory Loop induced CS terms
The one loop Chern-Simons levels read as follows. For the Cartan generators, we obtain Θ F ij as:
In order to find this list of vertices we follow the algorithm presented in [47] to construct all reflexive convex polytopes for a given toric base and a given toric fiber. This algorithm uses the GL(Z, 5) symmetry to bring all the vertices of the polytope in