Refined BPS invariants of 6d SCFTs from anomalies and modularity

F-theory compactifications on appropriate local elliptic Calabi-Yau manifolds engineer six dimensional superconformal field theories and their mass deformations. The partition function $Z_{top}$ of the refined topological string on these geometries captures the particle BPS spectrum of this class of theories compactified on a circle. Organizing $Z_{top}$ in terms of contributions $Z_\beta$ at base degree $\beta$ of the elliptic fibration, we find that these, up to a multiplier system, are meromorphic Jacobi forms of weight zero with modular parameter the Kaehler class of the elliptic fiber and elliptic parameters the couplings and mass parameters. The indices with regard to the multiple elliptic parameters are fixed by the refined holomorphic anomaly equations, which we show to be completely determined from knowledge of the chiral anomaly of the corresponding SCFT. We express $Z_\beta$ as a quotient of weak Jacobi forms, with a universal denominator inspired by its pole structure as suggested by the form of $Z_{top}$ in terms of 5d BPS numbers. The numerator is determined by modularity up to a finite number of coefficients, which we prove to be fixed uniquely by imposing vanishing conditions on 5d BPS numbers as boundary conditions. We demonstrate the feasibility of our approach with many examples, in particular solving the E-string and M-string theories including mass deformations, as well as theories constructed as chains of these. We make contact with previous work by showing that spurious singularities are cancelled when the partition function is written in the form advocated here. Finally, we use the BPS invariants of the E-string thus obtained to test a generalization of the Goettsche-Nakajima-Yoshioka $K$-theoretic blowup equation, as inspired by the Grassi-Hatsuda-Marino conjecture, to generic local Calabi-Yau threefolds.


Introduction
How well and how generally we can compute the topological string partition function Z top serves as a benchmark for how well we understand topological string theory. The computational tools available depend sensitively on the class of geometries on which we consider the theory. The most computable class of geometries to date are local toric Calabi-Yau 3-folds. The key methods that exist for the computation of Z top on these geometries rely on localization [1,2], large N-dualities involving matrix models [3] or 3d Chern-Simons theories giving rise to the topological vertex [4,5], as well as the modular approach [6,7,8] based on the holomorphic anomaly equations [9,7]. In this paper, following [10], we will use modular methods in conjunction with vanishing conditions on 5d BPS invariants N κ j − j + to compute the refined topological string partition function on a class of non-toric geometries, consisting of elliptically fibered local Calabi-Yau manifoldsM .
The N κ j − j + are the multiplicities of 5d BPS states that arise upon M-theory compactification on the Calabi-Yau manifoldM . Such BPS states were first considered in [11,12] and play a decisive role in our analysis. They fall into spin representations of the 5d little group SU (2) + × SU (2) − and are labelled by classes κ ∈ H 2 (M , Z) determining the mass of the corresponding BPS particles. The N κ j − j + determine the refined partition function Z top , which depends on Kähler parameters of the geometry as fugacities for the classes κ, and the parameters ± = 1 2 ( 1 ± 2 ) which serve as fugacities for the ± spins j − and j + . On general Calabi-Yau manifolds, a deformation invariant BPS index is obtained only upon summing over the right spin quantum number. This corresponds to setting s 2 = −(2 + ) 2 to zero and leads to the conventional topological string partition function in which the string coupling constant -a genus counting parameter -is identified as g 2 s = − 1 2 [11,12]. A geometrical model for computing these 5d BPS invariants was proposed in [13]. If the Calabi-Yau manifold admits a U (1) isometry, as will be the case with the geometriesM that we consider in this paper, the integers N κ j − j + are individually invariant [2,14]. On local Calabi-Yau manifolds that engineer N = 2 gauge theories in 4 and 5 dimensions, Z top can be identified [15,16,5] with the Nekrasov partition function [17], with i playing the role of the equivariant parameters introduced by Nekrasov in his localization calculation.
The refined Z top plays a central role in the AGT correspondence [18] and its generalizations, via which the refined partition function Z top is related to correlators in Liouville and Toda conformal field theories [19,20,21,22]. In the 2 → 0 limit, refined Z top relates to integrable models underlying the space of vacua of N = 2 supersymmetric gauge theories [23] . It also features prominently in a recent proposal [24] for a non-perturbative completion of the refined topological string on toric geometries which relies crucially on refinement for the so-called pole cancellation mechanism [25,26].
In addition to the coupling constants g s and s, refined Z top depends on Kähler parameters t of the underlying geometry. The modular methods referred to in the opening paragraph yield log Z top as an asymptotic series in g s and s with coefficients that are exact in t, whereas topological vertex computations yield Z top as an expansion in e t with coefficients that are exact in g s and s [4,5]. For the latter, on appropriate geometries, the sum over some [27] but not all of the Kähler parameters can be performed. The methods [10,28] we will advance in this paper for elliptically fibered manifolds rely on modular considerations and the holomorphic anomaly equation in the form [29], and yield Z top again as an expansion in Kähler parameters assigned to the base of the elliptic fibration, but now with coefficients that enjoy modular properties making the invariance of Z top under fiber monodromies manifest. These coefficients are meromorphic Jacobi forms of vanishing weight and of index determined by the holomorphic anomaly equations, with modular parameter the Kähler parameter of the fiber, and elliptic parameters built from the parameters and additional Kähler parameters identified with masses in the six dimensional setting that we will discuss presently. Based on the pole structure of these forms, as implied by the form of Z top in terms of 5d BPS states [11,12,30], we can argue that they must be quotients of weak Jacobi forms, with a universal denominator. Determining the numerator at each base degree then becomes a finite dimensional problem, which can be solved by imposing boundary conditions in the form of vanishing conditions on the refined BPS invariants N κ j − j + . These methods can also be applied to compact geometries [10], in which case the vanishing conditions are however not sufficient to solve the theory, as the index of the denominator grows too rapidly with the base degree [28].
The geometries on which we will consider Z top yield via F-theory compactification an intriguing class of chiral 6d supersymmetric field theories. These theories are exotic in that they generally do not admit a Lagrangian description, exhibit strings in their spectrum (which become tensionless in the IR), and defy the expectation based on power counting that they should be trivial in the infrared. Indeed, we will focus on geometries that lead to 6d theories with a superconformal fixed point in the infrared. The topological string on these geometries captures the Kaluza-Klein modes of the tensionless string upon circle compactification. As initiated in [31], studying these modes can yield insight into the nature of such strings. The elliptic genus of their 2d chiral worldsheet theory is closely related to Z top , and provides a physical explanation for the transformation properties as Jacobi forms, based on the chiral anomaly of the theory.
A classification of geometries leading to 6d super conformal field theories upon F-theory compactification, conjectured to be complete, is presented in [32,33], based on earlier work in [34]. They consist of elliptic fibrations over non-compact complex surfacesB which contain tree-like configurations of intersecting P 1 's. In this work, we will focus on geometries leading to 6d theories without enhanced gauge symmetry; this requires the self-intersection number of these curves to be −1 or −2. In upcoming work [35], we will take up the more general case.
The cases in which all curves inB have self-intersection number −2 are covered by the resolution of the quotient C 2 /Γ, with Γ a discrete subgroup of SU (2). AsB in this case has trivial canonical class, the elliptic fibration yielding the Calabi-Yau 3-fold is trivial, and the corresponding 6d theories have (2, 0) supersymmetry. The A n series in this class yields superconformal theories which describe a stack of n + 1 M5 branes. The A 1 case, corresponding to the geometry T 2 × O(−2) → P 1 , is called the M-string [36].
The generic case requires a non-trivial elliptic fibration to yield a Calabi-Yau 3-fold overB, and leads to a 6d theory with (1, 0) supersymmetry. The simplest example of this class is called the E-string [37,38,31], and consists of the elliptic fibration over the non-compact base surface O(−1) → P 1 . This geometry can also be constructed as the total space of the canonical bundle of the compact elliptic surface 1 2 K3, a nine point blow-up of P 2 . According to the classification results in [32,33], an ADE chain of (−2) curves with a single (−1) curve at one end also engineers a 6d theory without gauge symmetry with a superconformal fixed point.
Our methods yield closed results at a given base degree from which all refined BPS invariants can easily be extracted. We list some of these invariants for ease of reference for mathematicians approaching them by other means. We use this data to refine the vanishing conditions on these invariants which follow from application of the adjunction formula. For the E-string, this data also allows us to provide some circumstantial evidence that the E-string BPS spectrum is computable via the quantization of an appropriate underlying quantum curve: We show that a suitably generalized consistency condition [39] between two perspectives [24,39] on the quantization of the mirror curve in the case of toric Calabi-Yau manifolds is satisfied by these invariants. For a special class of toric Calabi-Yau manifolds, the consistency condition is shown in [40] to be the Nekrasov-Shatashvili limit of the Göttsche-Nakajima-Yoshioka K-theoretic blowup equation [41,42,43] for the gauge theoretic Nekrasov partition functions. The natural generalization of the blowup equation that we propose, and that is satisfied by the E-string, can be applied to any local Calabi-Yau geometry on which the refined topological string can be formulated. This paper is organized as follows. In section 2, we outline the general strategy to obtain the refined topological string partition on elliptically fibered Calabi-Yau manifolds and introduce the coefficients Z β of the expansion of Z top in base Kähler parameters. We then review integer BPS invariants and their vanishing from a geometric point of view in section 3.1 and present the geometries we will discuss in this paper, centered around the Eand the M-string, in section 3.2. We discuss the geometric meaning of the mass parameters in section 3.3. In section 4.1, we show that Jacobi forms satisfy a differential equation, which we identify with a generalization of the holomorphic anomaly equations in wave function form to the refined case in subsection 4.2. The differential equation encodes the indices of the various elliptic parameters on which Z β depends. These indices can be derived from the anomaly polynomial of the 2d chiral theory living on the worldsheet of the non-critical strings of the 6d theories, as we demonstrate in section 4.3. In section 4.4, we make a universal ansatz for the denominator of Z β based on the pole structure of refined Z top as implied by the form of Z top in terms of 5d BPS numbers. Together with the information regarding the indices, this determines Z β up to a finite number of coefficients. In section 5.1, we determine under what circumstances vanishing conditions on BPS invariants suffice to determine these coefficients. We conclude that for all geometries relevant to this paper, they suffice 1 . Our approach thus leads to a complete solution for the class of theories we are considering. We present concrete results for the M-string in section 5.2, for the E-string in section 5.3, and for the E-M string chain in section 5.4. Further results and examples for refined BPS invariants are relegated to appendix C. In section 6, we extract BPS numbers from our closed expressions for Z β and discuss their structure and their vanishing. In section 7, we relate our results for the E-and M-string to the ones obtained by [44] using a domain wall argument in terms of ratios of theta function. Based on theta functions identities, proven in appendix B, we show that additional poles exhibited by these latter expressions are spurious. Finally, in section 8, we propose a generalization of the blowup equation and find that it is satisfied for the E-string. Some of the data needed for this check is presented in appendix D. Some background on the ring of modular and generalized Jacobi forms is provided in appendix A. As we summarize in the conclusions in section 9, our method has a wide range of applicability. We are confident that it can be adapted to encompass all geometries engineering 6d superconformal field theories [45,35]. 1 At lowest base wrapping degree, they need to be supplemented with one non-vanishing BPS number.
2 General strategy for the solution of the topological string partition function on elliptically fibered Calabi-Yau manifolds We will compute the refined topological string partition function on elliptic Calabi-Yau spaces with at least one zero section recursively as an expansion in the base classes β. The fundamental objects in this study are the expansion coefficients Z β in these classes, defined via (2.1) We distinguish between three classes of Kähler parameters: those associated to the base, denoted t b , the exponentials Q β = exp(2πit β ) = exp(2πi β i t b i ) of which provide our expansion parameters, 2 the Kähler parameter τ of the elliptic fiber, with q = exp(2πiτ ), which will play the role of modular parameter, and the remaining Kähler parameters t m associated to mass deformations of the theory (for geometries containing curves of selfintersection number less than -2, there will also be Kähler parameters associated to the resolution of singular elliptic fibers, see [45,35]).
For the unrefined case 1 = − 2 , an ansatz for Z β (t b , τ, t m , 1 , 2 ) has been presented in [10] based on general arguments that is valid both for compact and non-compact elliptically fibered Calabi-Yau spaces. In this paper, we seek to generalize this ansatz to the refined case. The ingredients are the following: • Elliptically fibered Calabi-Yau manifolds M exhibit special auto-equivalences of the derived category of coherent sheafs D b (M ) which can be identified with the S and the T transformation of the modular group SL(2, Z). Via the Fourier-Mukai transform, they induce an action on the K-theory charges K(M ) = H even (M ). Via mirror symmetry, this action can be identified with the monodromy action of the symplectic group Sp(h 3 (W ), Z) on the middle cohomology H 3 (W ) of the mirror manifold W to M . This action can also be computed directly on W . One obtains The projective nature of the first two transformations arises as the Kähler parameters are ratios of periods. The more non-trivial fact is the transformation of t β up to exponentially suppressed contributions. In particular µ γ (β) gives rise to a multiplier system γ (β) = exp(2πiµ γ (β)). It is characterized by µ S (β) = µ T (β) = −(C β · K)/2, see [28] for a derivation.
• The transformation properties of Z(t b , τ, t m , 1 , − 1 ) under this action have been determined in [29].
• Demanding that Z(t b , τ, t m , 1 , − 1 ) (before taking the holomorphic limit!) be invariant under the monodromy transformations (2.2) requires also transforming g s as Combining this with results on the refined holomorphic anomaly equations allows us to extend this transformation property to the refined case, yielding • The invariance of Z(t b , τ, t m , 1 , 2 ) under the joint transformations (2.2) and (2.4) implies that in the holomorphic limit, Z β (τ, t m , 1 , 2 ) transform as Jacobi forms with the multiplier system γ (β), modular parameter τ and elliptic parameters (t m , 1 , 2 ).
• The pole structure of Z(t b , τ, t m , 1 , 2 ) as suggested by the form of the free energy expressed in terms of 5d BPS numbers (as reviewed in the next section, see formula (3.11)) implies that Z β (τ, t m , 1 , 2 ) is a ratio of weak Jacobi forms, and allows us to make a universal ansatz for the denominator, see (4.31).
• The indices related to the elliptic parameters can be calculated in the unrefined case from the topological terms that appear in the holomorphic anomaly equations of [29] as explained in [10,28]. A derivation of the indices in the refined case should be possible based on the refined holomorphic anomaly equations. We provide such a derivation, modulo several constants which we fix by studying examples. We demonstrate that our final result also follows from anomaly considerations, following [45]. 3 • The ring of weak Jacobi forms with given even weight and integer index in a single elliptic parameter z is generated by the forms A(τ, z) and B(τ, z), see appendix A.
Lacking an analogous structure theorem for weak Jacobi forms exhibiting multiple elliptic parameters, we conjecture that the numerator of Z β (τ, t m , 1 , 2 ) is an element of the ring generated by {A(, τ, z i ), B(τ, z i )} z i ∈{ + , − } , where ± = ( 1 ± 2 )/2, together with an appropriate generating set of Weyl invariant Jacobi forms: these exhibit the mass parameters t m as tuples of elliptic parameters, and are invariant under the action of the Weyl group of the flavor symmetry group on these tuples. This fixes the numerator up to a finite number of coefficients.
• Vanishing conditions on 5d BPS invariants suffice to uniquely fix the numerator, and therewith Z β . We thus obtain explicit expressions for Z(t b , τ, t m , 1 , 2 ) which, aside from passing the stringent test of integrality for all 5d BPS invariants encompassed, match all results available in the literature computed by other means.

Geometry
We begin this section by recalling some aspects of the geometric invariants associated to the topological string and its refinement. We then introduce the elliptically fibered geometries that will be the subject of this paper.

Integer BPS numbers and their vanishing
The free energy F (t, g s ) of the topological string on a Calabi-Yau manifold M was initially defined from the world-sheet point of view as a sum over connected word-sheet instanton contributions, via the expansion The rational invariants r κ g are called Gromov-Witten invariants. Mathematically, they can be defined as follows: Let M g,κ (M ) be the moduli stack of holomorphic embedding maps X : Σ g → M such that the image [X(Σ g )] lies in the curve class κ. Then r κ g = Mg,κ(M ) 1 is the degree of the virtual fundamental class. As the virtual dimension dim vir (M g,κ (M )) = κ c 1 (M ) + (g − 1)(3 − dim C (M )) is zero on Calabi-Yau 3-folds, the determination of r κ g reduces to a point counting problem with rational weights, generically with a non-zero answer.
An important insight into the structure of the topological string free energy was provided by string-string duality. Comparing the expansion (3.1) with a BPS saturated heterotic one loop computation, Gopakumar and Vafa [11,12] conjectured that the g s expansion takes the general form (3. 2) The coefficients I κ g of this expansion are integers. They can be identified with the counting parameters in the BPS index Generically, this decomposition is not invariant upon motion in moduli space. The invariant index (3.3) is obtained upon summing over the spin quantum numbers of SU (2) + with alternating signs. Using ideas of [12], this index was geometrically interpreted in [13] based on the SU (2) − ×SU (2) + Lefschetz decomposition of the moduli space M κ g of a D0-D2 brane system. M κ g was realized in [13] as the Jacobian fibration over the geometric deformation space of a family of curves of maximal genus g in the class κ wrapped by the D2 brane. The D0 brane number counts the degeneration of the Jacobian and is hence related to the geometric genus of the curve.
An important ingredient in our determination of the topological string partition function will be the vanishing of the invariants I κ g at fixed class κ for sufficiently large g. For geometrieš M which are the total space of the canonical bundle of a compact surface S, as is the case for the E-string and the M-string geometry which we will review below, this vanishing can be argued for very simply: the only curves that contribute to the partition function lie inside the compact surface. Given a smooth representative C κ of a class κ ∈ H 2 (S, Z), the adjunction formula permits us to express the canonical class K C of C κ in terms of its normal bundle in the surface, and the canonical class K of the surface S. Via the relation between the degree and the arithmetic genus p a (κ) of the curve, 2p a (κ) providing an upper bound on the geometric genus of any representative of the class κ. Note that a smooth representative of a class κ ∈ H 2 (S, Z) does not necessarily exist. More generally, we have to resort to Castelnuovo theory, which studies the maximal arithmetic genus of curves of given degree in projective space, see e.g. [46]. Either way, at fixed κ, there exists a bound beyond which I κ g vanishes, simply because the moduli space M κ g is empty. This is in contrast to the Gromov-Witten invariants r κ g , which due to multi-covering contributions do not vanish for fixed κ even at arbitrarily large genus. At large degree, the bound scales as g max ∼ κ 2 . We will use the term Castelnuovo bound generically to refer to a bound beyond which BPS invariants vanish.
Mathematically, the BPS data of the D0-D2 brane system is best described by stable pair or PT invariants [47]. If the curve is smooth at the bound and the obstructions vanish, the dimension of the deformation space PH 0 (O(C κ )) follows from the Riemann-Roch theorem and the I κ gmax(κ) evaluate to The invariants I κ g at g < g max (κ) generically evaluate to much larger numbers due to the increasing degeneration of the Jacobian.
When the Calabi-Yau manifold admits a C * isometry, one can also give a geometrical interpretation to states with definite + Lefschetz number and the BPS numbers N b j − j + ∈ N introduced in (3.4) which keep track of the degeneracy of states with definite SU (2) − and the SU (2) + spin. The corresponding index is We have here assigned to every irreducible SU (2) representation labeled by j ∈ N/2 a Laurent polynomial, where the summation index k is increased in increments of 1 starting at −j. These BPS numbers are computed by the refined topological string, whose free energy takes the form [30] We have introduced the variables For geometriesM that geometrically engineer N = 2 gauge theories in 5 dimensions, (3.11) coincides with the K-theoretic instanton partition function of Nekrasov [17], and 1,2 map to equivariant parameters in the localization computation performed in the gauge theoretic setting.
To facilitate the transition between the refined and the unrefined free energy, it is also convenient to introduce the variables (3.14) Comparing (3.3) and (3.9) allows us to relate the BPS number N κ j − j + to the invariants I κ g . In terms of the tensor representations T g = 2[0] + 1 2 ⊗g , where the bracket [j] indicates the irreducible SU (2) representation of spin j, we obtain This relation implies that if at fixed κ, the maximal genus for which I κ g = 0 is g max (κ), the maximum left spin for which the number N κ To describe a generic bound on the right spin, we will need to review some aspects of PT theory of stable pairs [47,48] and its relation to KKV theory [13] and refined KKV theory as outlined in [2]. As above, we will assume that there is a smooth curve C κ in the class κ ∈ H 2 (S, Z). Following the notation in [2], we denote by P n (M, κ) the moduli space of stable pairs (F, s), where F is a free sheaf of pure dimension 1 generated by the section s ∈ H 0 (F ) outside d points, with ch 2 (F ) = κ and holomorphic Euler characteristic The PT invariant P n,κ is defined as the degree of the virtual fundamental class of P n (M, κ). These invariants were related to I κ g in [48]. Following [2], we will review a generic model for P n (M, κ) based on which the SU (2) − × SU (2) + decomposition of the Hilbert space H β of 5d BPS states can be computed. This will permit us to arrive at a bound for the maximal right spin j max + (κ) of non-vanishing BPS numbers N κ j max − j + . Based on experience, this also serves as a bound below j max − .
The basic identity relating the geometric SU (2) Lefschetz decomposition to the SU (2) − × SU (2) + decomposition of H β is motivated by the KVV approach [13,2]. It is given, at sufficiently small Euler characteristic as we explain presently, by here is the relative Hilbert scheme parameterizing curves C of class κ with k distinguished points. In the generic cases we will consider, such Hilbert schemes will be projective spaces, and the corresponding cohomology carries the standard Lefschetz decomposition. θ is an SU (2) − lowering operator, i.e. it acts as with the understanding that [j] = 0 for j < 0. (·) SU (2) ∆ is the map from SU (2) − × SU (2) + representations to the diagonal SU (2) ∆ representation. Corrections to (3.17) arise from reducible curves. At a given class κ, the minimal Euler characteristic of a reducible curve with components of class κ 1 + κ 2 = κ will be χ 1 + χ 2 = 1 − p a (κ 1 ) + 1 − p a (κ 2 ). At given κ, the minimal Euler characteristic at which corrections due to reducible curves can arise is thus given by min 1 − p a (κ 1 ) + 1 − p a (κ 2 )|κ 1 + κ 2 = κ . (3.19) Below this bound, (3.17) holds unmodified.
We will argue for a bound on the SU (2) + number at given κ for geometriesM which are the total space of the canonical bundle over a Fano surface S. In this case, for small d bounded by a constraint linear in κ [48], the moduli space of stable pairs onM coincides with that of S, P 1−pa+d (M , κ) = P 1−pa+d (S, κ). The latter in turn is isomorphic to the appropriate relative Hilbert scheme of curves of class κ with d distinguished points (cf. proposition B.8 of [48]), (3.20) For C κ a curve of class κ, a model for this Hilbert scheme is given by Returning to (3.17), we see that the contributions to highest left spin can be read off at d = 0. We obtain i.e.
2j max We reiterate that we have derived j max − as the right spin at highest left spin, but expect it to present more generally a bound on right spin at given κ. This generic bound is quadratic in κ, just as the bound on j − . It is implicit in the formalism of [2], but not spelled out explicitly. Instead, more complicated calculations are performed there for d > 0, showing an asymptotic pattern of the refined BPS numbers that we also observe in our examples. The generic bound is satisfied for the large κ asymptotics in all known geometric examples, in particular for the E-string for which S is only semi-Fano.
Let us finally comment on geometries bases on chains of (−1) and (−2) curves. We can consider each such curve as the base of an elliptic surface. For curve classes lying in a single such surface, the bounds (3.16) and (3.22) should apply unaltered. More general classes will require a more detailed analysis. In these cases, the leading contributions must come from reducible curves which have been excluded by the condition (3.19), so the precise bound will have to include these. We still expect it to remain quadratic in the curve class. This expectation is confirmed by our explicit computations, see section 6.

Geometries underlying the E-and M-string and generalizations
The geometries we will consider in this paper consist of elliptically fibered Calabi-Yau manifoldsM over non-compact basesB, such that • all compact curves C i inB are contractible, and • the elliptic fiber does not degenerate over all of C i for any i.
The first condition is required for the 6d theories engineered by compactifying F-theory onM to have a superconformal fixed point [32,33], and is a prerequisite, as we explain below, for the boundary conditions supplied by vanishing conditions on GV invariants to completely fix our ansatz. The second condition implies that the 6d theories do not exhibit gauge symmetry. We will treat the case with gauge symmetry in a forthcoming publication [35].
The simplest examples that we consider contain a single compact curve C in the baseB. These geometries can be obtained via decompactification limits of elliptic fibrations over Hirzebruch surfaces. Recall that a Hirzebruch surface F k is a P 1 fibration over a base P 1 . Two irreducible effective divisors C k and F can be chosen to span H 2 (F k , Z). F corresponds to a fiber of F k , hence F · F = 0, and C k is a section of the fibration, thus C k · F = 1, with C k · C k = −k. The canonical class of F k in terms of these two divisors is given by Calabi-Yau elliptic fibrations over the Hirzebruch surfaces F k , k = 0, 1, 2, can be constructed as hypersurfaces in an appropriate ambient toric variety. The constructions considered in [49] yield geometries with h 1,1 = 3, corresponding to the lifts of C k and F , and the elliptic fiber E. Taking the defining equation of the hypersurface to be in Weierstrass form, we must choose f 4 and g 6 as sections of particular line bundles over the base surface B, 24) to ensure that the total space of this fibration is a Calabi-Yau manifold. Here, K B is the canonical class of B. The elliptic fibration is singular along the discriminant locus of the fibration, defined as the zero locus of the discriminant The type of singularity along each component of the discriminant locus depends on the vanishing order of ∆ together with that of f and g on this component, and has been classified by Kodaira.
The minimal vanishing order γ of a section of the line bundle −nK B along a curve C k with negative self-intersection number −k can be computed by decomposing −nK B = γC k + A, with γ the smallest positive integer such that C k · A ≥ 0. Equivalently, we can consider a decomposition −nK B = γ C k + A , where now, γ ∈ Q and we impose A · C k = 0.
, and by minimality of γ, −1 < A·C k C 2 k ≤ 0; hence the minimal vanishing order is given by the smallest integer larger or equal to γ . Either way, based on the canonical class of the Hirzebruch surface F k cited above, we can argue that for k = 0, 1, 2, sections of −4K B , −6K B or ∆ generically do not vanish identically over C k . Thus, ∆| C k will generically vanish only at the intersection of C k with −12K B , hence at −12K B · C k = 12(2 − k) points. As f | C k and g| C k will generically not vanish at these points, the elliptic fibration above C k (recall that C k is a section of B) will generically exhibit 12(2 − k) isolated I 1 singularities, hence correspond to a K3 surface, 1 2 K3 surface, and the trivial product P 1 × T 2 respectively. We decouple gravity by decompactifying these geometries along the direction of the fiber F of the Hirzebruch surface. The fibration structure of these geometries is summarized in diagram (3.26).
We can engineer more general 6d superconformal theories by replacing the base C k of the non-compact baseB of the elliptic fibration by a string of intersecting P 1 's. Settinǧ B = C 2 /Γ, with Γ chosen among the discrete subgroups of SU (2), yields theories with (2, 0) supersymmetry, as the elliptic fibration here is trivial. The string of compact curves inB and their intersections is encoded in the Dynkin diagram corresponding to the subgroups Γ; recall that these enjoy an ADE classification. In particular, all of these curves have the topology of P 1 and have normal bundle −2H. We refer to them as (−2) curves. The massless M-string is the simplest member of this class of geometries, with Γ = Z 2 ∼ A 1 .
The papers [32,33] discuss which F-theory compactifications on elliptic fibrations over non-compact bases can lead to 6d SCFTs with generically only (1,0) supersymmetry. The only additional SCFTs without gauge symmetry contained in this classification arise upon including a single (−1) curve at the end of a string of (−2) curves; in the case Γ = Z n+1 , this corresponds to an E-M n string chain bound state.
The topological data that we will need to determine the topological string partition function on these geometries consists of the intersection numbers of these curves, as well as their intersection product with the canonical line bundle ofB. The latter is once again simply determined by the adjunction formula (3.5), this time applied toB. As all compact curves C inB have genus 0, we obtain

Turning on mass parameters
Above, we have identified the elliptic fibration over the total space of the bundle O(−1) → P 1 as local 1 2 K3. Let us briefly recall the geometry of the 1 2 K3 surface. It can be obtained as the blow up of P 2 at nine points. One can construct a series of del Pezzos surfaces B k by blowing up k generic points in P 2 . The canonical class is given by (3.28) Here, H is the hyperplane class of P 2 and e i , i = 1, . . . , k, denote the exceptional P 1 curves resulting from the blowups. The intersection numbers between these divisors are The intersection product induces an inner product on this lattice. One can readily show that Λ k can be equipped with a root (or co-root) basis whose negative Cartan matrix is For example, in the case k = 8, we obtain the root lattice of E 8 , as depicted in figure  1. We set α k = e k − e k+1 , k = 1, . . . , 7, and α 8 = γ 123 . The labels correspond to the upper indices in the figure (the lower indices are the Dynkin labels). The full set of positive roots is then all β ij , of which there are 28, all γ ijk (56), all δ ij = 2H − k =i,j e k (28) and i = 3H − k =i e k (8), yielding 120 = 248−8 2 . It follows from the intersection numbers that K 2 = 9 − k. The 1 2 K3 surface is obtained by blowing up the unique base point of the elliptic pencil that models B 8 . It is elliptically fibered over this exceptional divisor C 1 = e 9 . As k = 9, −K is no longer positive. Indeed, it can be identified with the elliptic fiber E of this surface. Setting α 0 = e 9 − e 8 , the divisors can be mapped to simple roots of the affine E 8 Lie algebra, with α 0 constituting the affine root. The additional intersection numbers are C 2 The explicit geometric interpretation of the mass parameter in the case of the M-string, and more generally in the case of elliptic fibrations over resolved ADE singularities, is not equally transparent to us. Following [50], one could attempt to interpret the mass parameter as deforming the geometryM =B × T 2 away from the trivial product by fibering the noncompact surfaceB over T 2 . We leave the exploration of this possibility (and in particular the analysis of the D and E case, the mass deformation of which is excluded in [51] based on physical considerations) to future work. In section 6, we will discuss a related proposal for the mass deformation.

Holomorphic anomaly and Jacobi forms
The holomorphic anomaly equations for elliptic fibrations can be written in a form which implies that Z β is a Jacobi form of weight 0 and index a fixed function of β. For the relevant properties of Jacobi forms, see appendix A. In the following, we will use the notation with ζ = 2πz, for the two generators of the ring of holomorphic weak Jacobi forms interchangeably. When only one argument is given, the elliptic parameter is meant.

A differential equation for Jacobi forms
A weak Jacobi form of weight k has a Taylor expansion with the η j being quasi-modular forms of weight j + k (in fact, one can be more precise about the form of these coefficients, expressing them as functions of modular forms, their derivatives, and the weight and index of φ [52]). Considering (4.2) term by term, we deduce that the phase factor arising upon modular transformation of φ is due to the occurrence of factors of E 2 in the coefficients η k . Since E 2 transforms under modular transformations as generates the inverse of the phase factor occurring in the transformation of the Jacobi form. The product exp( π 2 3 mz 2 E 2 )φ thus transforms without phase factor. Arguing again termwise, we conclude that the E 2 dependence in the Taylor coefficients is cancelled by this prefactor. Hence a Jacobi form of index m satisfies the equation Conversely, a power series in z with quasi-modular coefficients that satisfies the equation transforms under modular transformations as a Jacobi form of index m. If it is also periodic under z → z + 1, its transformation behavior under z → z + τ as a Jacobi form follows by combining periodicity and modular transformations. In the following, we will use elliptic parameters ζ with period 2π + 2πτ ; they are related to z by z → ζ/(2π). For these,

The index from the holomorphic anomaly equations
For the geometries described in the previous section, the holomorphic anomaly equations have been motivated in the form [10] Here, the modular parameter of E 2 is the Kähler parameter τ of the elliptic fiber, and where D b i denote compact divisors in the non-compact base surfaceB of the elliptic fibration, whose canonical divisor is denoted as KB. Comparing to equation (4.7), we conclude that the Z β are Jacobi forms with modular parameter τ , elliptic parameter the string coupling g s , and of index This expression for the index can easily be evaluated using the intersection matrix of the D b i and the adjunction formula in the form (3.27). For the E-and the M-string, with β = (n b ), we obtain for the M-string. (4.10) Already in [53], it was argued that the masses of the E-string should enter the partition function as the elliptic parameters of Jacobi forms, with index proportional to the number of strings. The same holds true for the M-string. This gives rise to the equation (·, ·) e 8 is the E 8 Weyl invariant inner product on the root lattice Λ e 8 , normalized so that the norm square of the highest (and hence every) root of e 8 is 2 (the Killing form will also make an appearance below, for which we will use the notation (·, ·), dropping the index). for the E-string, 1 for the M-string. (4.13) The coupling constant s of the refined topological string in many respects behaves as a mass parameter [8]. It is hence to be expected that it also enters the holomorphic anomaly equations with a coefficient proportional to n b .
We determine the values of c s experimentally to be for the E-string, 1 4 for the M-string. (4.15) The value of c s for the E-string was already reported in [54]. We will call Assuming that the contributions to the index polynomial which depend on s and the masses remain linear in the base class, M β has a unique generalization to geometries with baseB a resolved ADE quotient of C 2 , possibly with a (−1) curve added at the end of the chain of (−2) curves, given by We have here set β = (n 0 , n), with n 0 specifying the wrapping number of the (−1) curve, and called the rank of the ADE quotient n. With recourse to (3.27), we can easily evaluate the intersection products. This yields where we have introduced the intersection matrix This index polynomial can in principle be applied to any of the ADE quotients. For the D and the E series, it is not immediately obvious that twisting by the mass parameter is well-defined geometrically. In appendix C, we give some coefficients N κ j − j + extracted from our preliminary results for the D 4 quotient which pass basic consistency checks: they are positive integers, and follow a checkerboard pattern [2].

The index from anomalies
The contribution Z β (τ, m, 1 , 2 )Q β in the expansion (2.1) of the refined topological string partition function can be identified with the elliptic genus of the non-critical string coming from D3 branes wrapping the curve class β in the Calabi-Yau. From the elliptic genus point of view, 1 , 2 and m are interpreted as fugacities u a associated to global symmetries in the worldsheet theory of the non-critical string. This connection gives us another way to derive the index polynomial (4.18).
The elliptic genus transforms under the modular group as [55] Here η is a phase factor which will be reproduced in our ansatz by inclusion of factors of the Dedekind η function; A a are the 't Hooft anomaly coefficients of the global symmetry currents Q a being the charge operators of the global symmetries with fugacities u a . The index polynomial of the elliptic genus is thus given by On the other hand, the 't Hooft anomaly coefficients are naturally contained in the anomaly polynomial I 4 of the 2d worldsheet theory, since the latter contains terms like [56] where F a are the field strength of the global symmetries which are weakly gauged. In fact, as pointed out in [45], the index polynomial M of the elliptic genus can be obtained from the anomaly polynomial I 4 by a simple substitution. This procedure reproduces the index polynomial (4.18) argued for above, as we now demonstrate.
The anomaly polynomial of the 2d worldsheet theory of the non-critical string reads [57] (4.24) Here c 2 (L), c 2 (R) are the second Chern classes of the SU (2) − , SU (2) + bundles associated to the Omega background, while c 2 (I) is the second Chern class of the SU (2) I bundle associated to the SU (2) R-symmetry of the 6d (1, 0) theory inherited by the worldsheet of the non-critical string. p 1 (T ) is the first Pontryagin class of the tangent bundle of the worldsheet, and it vanishes in the elliptic genus calculation as the worldsheet is a torus. F a are the field strength of weakly gauged flavor symmetries. They include those G i induced by singular elliptic fibers over the compact divisors D b i in the base, which manifest themselves as gauge symmetries in the 6d theory, as well as the flavor symmetries inherited from the 6d theory, for instance the E 8 symmetry associated to the E-string and the U (1) m symmetry associated to the M-string. If G i = ∅, one sets h ∨ g i = 1. n i are the wrapping numbers of the non-critical string on D b i . η ij can be identified with the intersection numbers C ij of D b i , and η ia are the charges of the flavor symmetries carried by the non-critical string. For the flavor symmetries of the E-string and the M-string, η ia = −1 [57].
It is claimed in [45] that the index polynomial (called modular anomaly in that paper) of the elliptic genus can be obtained from the anomaly polynomial by the substitution Here, Φ g indicates the set of roots. The inner product (·, ·) g was introduced above as the scalar product normalized such that long roots have length squared 2. To relate to our discussion in section 4.2, note that the only flavor symmetries are the E 8 symmetry of the E-string and the U (1) m symmetry associated to the chain of (−2) curves. In the latter case, one simply needs In the case of the E-string, via the equalities where θ indicates a highest root and the inner product (·, ·) on the complexified root lattice is the one induced by the Killing form, we can simplify the replacement rule and obtain The replacement rules (4.25) together with (4.26) and (4.28) reproduce the index polynomial (4.18).
Note that given the information that Z β is a Jacobi form, the holomorphic anomaly equations are completely determined by the index polynomial of the Jacobi form, as we argue in section 4.1 and 4.2. We have here seen that the index polynomial is also fully determined by the chiral anomaly of the 2d worldsheet theory of the 6d BPS string. The holomorphic anomaly in this setting thus follows from the chiral anomaly.

The ansatz for Z β
The space of holomorphic weak Jacobi forms of fixed weight and index is finite dimensional. We will make the ansatz, following [10] for the unrefined case, that the meromorphic Jacobi form Z β is a rational function of Jacobi forms, with a universal denominator. Once the form of the denominator is fixed, we have the following situation: • In the massless unrefined case, the structure of the numerator of Z β is completely fixed, and the computation of Z β reduces to fixing a finite number of coefficients.
• Considering masses increases the number of elliptic parameters. The simplest generalisation of the massless ansatz is to consider the numerator to be a polynomial of Jacobi forms of elliptic parameter either g s or the masses. This proves to be sufficient for the smooth elliptic fibrations that we are considering. The M-string exhibits a single mass parameter, Jacobi forms of index n b with regard to this mass are hence polynomials in A(τ, m) and B(τ, m). The 8 mass parameters of the E-string enjoy the action of the E 8 Weyl group, under which the theory is symmetric. A set of 9 E 8 Weyl invariant Jacobi forms here generates the ring of Jacobi forms required. The main properties of these forms are reviewed in appendix A.4. In the case of the E-M n string chain, one includes both the 8 masses of the E-string and the extra mass associated to the M-string chain.
• Refinement increases yet again the number of elliptic parameter. Now, Jacobi forms of different combinations of the elliptic parameters are required.
To arrive at the correct ansatz in the massive refined case, we take the form of the refined topological string free energy [30] in terms of 5d BPS invariants n g − ,g + β as inspiration. 5 Recall that this takes the form where ± = 1 ± 2 2 . Note that the argument of the sine functions are proportional to 1,2 in the denominator, and proportional to ± in the numerator. Given that the generators of integer index Jacobi forms, A(τ, z) and B(τ, z), have an expansion in with A ∼ x to leading order, we make the ansatz with φ km (m) a polynomial of appropriate weight and index in the generators A(τ, m), B(τ, m), and the E 8 Weyl invariant Jacobi forms. The η(τ ) dependent prefactor is argued for in [28], and entails that Z β for β including a (-1) curve class transforms as a Jacobi form only up to a non-trivial multiplier system. The factor √ q comes from a redefinition of the curve classes Q in the base such that the latter behave properly under the modular transformation of the elliptic fiber [10]. We include it in Z β so that the combination √ q/η(τ ) 12 is invariant under the shift τ → τ + 1. For Z β to have vanishing weight, we restrict the sum such that the total weight k of each summand cancels that of the denominator in (4.31). For the Eand the M-string, with β = (n b ), this yields The index of Z β determined in section 4.2 then constrains the indices (n + , n − ) of the Jacobi forms in each summand as follows: for the E-string, for the M-string. yielding and for the E-string,

Computing Z β in terms of meromorphic Jacobi forms
To determine the coefficients of the numerator (4.32) of Z β , we proceed as follows: 6 Assume all Z β below a certain base degree β have been determined.
• Expand F β in q, with its coefficients expressed as polynomials in with x as defined in (4.30).
• Obtain the same expansion of F β expressed in terms of BPS invariants by expressing (4.29) in terms of x ± and x m and expanding appropriately.
• Imposing the boundary conditions on the BPS invariants that we discuss in section 5.1 and comparing coefficients suffices to fix all unknown coefficients.
Below, we will give a summary of the partition functions we have computed, including the weight, the indices, and the number of summands in the numerator φ k,n + ,n − ,β for the E-string, the M-string, and the E-M n string chain. In each case, we also give explicit expressions for the numerator φ k,n + ,n − ,β for relatively small base degrees in terms of weak Jacobi forms, such that Z β can easily be reconstructed in accordance with (4.31). The φ k,n + ,n − ,β for higher base degrees are available upon request. In the following, we will use the following notation:

Sufficiency of vanishing conditions to fix ansatz
In this section, we study to what extent the vanishing conditions on the BPS numbers N κ j − j + suffice to fix the coefficients in the ansatz (4.32).

The unrefined case
For ease of exposition, we begin with the unrefined case. The ansatz (4.31) simplifies in this case to We will think of Z β as a power series in q with coefficients that are Laurent series in x = (2 sin πz) 2 , see appendix A. For the ensuing discussion, it will be convenient to introduce the following terminology: we will call a series geometrically bounded if for all n, the series f n (x) are finite polynomials. For example, 1+qx is geometrically bounded, while 1 + q 1−x is not. Clearly, the product of two geometrically bounded series is also geometrically bounded. It is easy to show that A(τ, z) and B(τ, z) are geometrically bounded as power series in q and x; hence, all weak Jacobi forms are, as they can be written as polynomials in A(τ, z), B(τ, z), E 4 (τ ) and E 6 (τ ). The inverse φ(q, x) −1 of a geometrically bounded series φ(q, x) is geometrically bounded if and only if the leading term f 0 (x) is a non-vanishing constant.
As we discussed in section 3.1, Castelnuovo theory asserts the vanishing of Gopakumar-Vafa invariants of a given curve class at sufficiently high genus. Defining the single wrapping contribution to Z β as where g s = 2πz and Q = (q, Q m ), we conclude that xZ single β must be geometrically bounded. We will call a series that becomes geometrically bounded upon multiplication with x a Gopakumar-Vafa series.
Z single β will generically not be of the form (5.4). Assume however that we have fixed all Gopakumar-Vafa invariants at base degrees β < β. Assume further that at base degree β, we find two different sets of constants c 1 and c 2 in (5.5) that are compatible with the vanishing conditions on Gopakumar-Vafa invariants. Multi-wrapping contributions cancel out in the difference of Z β (c 1 ) and Z β (c 2 ), as these depend on β < β. The ambiguity Z ambig β in our procedure, is therefore a Gopakumar-Vafa series, and it can be written in the form (5.4), as evident from the first equality in (5.8). Our argument will now rely on the lemma that the only rational functions of weak Jacobi forms of the form (5.4) which are Gopakumar-Vafa series have at most a single power of A(τ, z) in the denominator. Hence, Note that Z ambig β has the same index as Z β . Z ambig β vanishes, and Z β is therefore completely determined by the vanishing conditions, when this index would require the index of φ ambig β to be negative.
To prove the lemma, assume that Z ambig β is a Gopakumar-Vafa series. Then is geometrically bounded, with D(τ, z) in the product form implied by (5.4). By the factorized form (A.23) of A(τ, z), D(τ, z) can be decomposed as D(τ, z) = d(z)D(τ, z), such that D(τ, z) = 1 + O(q, z). Geometric boundedness of (5.10) thus implies that each coefficient of φ(τ, z) in a q expansion must be divisible by d(z). We can conclude that φ(τ, z) vanishes at the zeros of d(z) with at least equal multiplicity. Now d(z) has only real zeros, and these coincide (counted with multiplicities) with the real zeros in z of D(τ, z). Invoking the SL(2, Z) transformation properties of both φ(τ, z) and D(τ, z) to obtain the SL(2, Z) images of these zeros in the complex plane, we can conclude that φ(τ, z) vanishes at all the zeros of not only d(z) but D(τ, z), with at least equal multiplicity. Hence, only exhibits removable singularities, is thus a weak Jacobi form, and Z ambig β is of the form (5.9). This concludes the argument for the lemma.

The refined case
To adapt the terminology introduced above to the refined case, we introduce the notation x ± = (2 sin( ± 2 )) 2 , and call a power series in q, x ± organized in the form geometrically bounded if the f n are polynomials in both x + and x − . The numerator (4.32) is evidently such a geometrically bounded power series. Likewise, we introduce the terminology refined Gopakumar-Vafa series for a power series in (q, x + , x − ), which, like the single wrapping contribution to Z β in the refined case, becomes geometrically bounded when multiplied by x + − x − = 4 sin( 1 2 ) sin( 2 2 ). To adapt our argument regarding Z ambig β to the refined case, we require a lemma stating that the only rational functions of weak Jacobi forms of the form (4.31) which are refined Gopakumar-Vafa series have at most a single power of in the denominator. This will allow us to conclude that the ambiguity in determining Z β upon imposing vanishing conditions takes the form .
The negativity of either the + or the − index of φ ambig β will then suffice to conclude that the ambiguity must vanish.
To establish the lemma, we argue as above: if Z ambig β is to be a Gopakumar-Vafa series, must be geometrically bounded. Replacing D(τ, + , − ) by d( + , − ) and arguing term-wise, we again conclude that (5.14) exhibits no poles. At this point, we would require a structure theorem stating that a weak Jacobi form in two integer indices + and − is generated by  Table 5.1: The weight k, the indices n ± , and the number of terms # in the numerator φ k,n + ,n − ,(n b ) of the partition function of the massive/massless M-string.
A ± , B ± , E 4 and E 6 . Short of this, we invoke the conjecture put forth in section 2, stating that Z β can be expressed in the form (4.31), to conclude the argument.
Let us now apply these considerations to the massless E-string and M-string. For the leading base degree β = C 1,2 , the general ansatz (4.31) is a refined Gopakumar-Vafa series, so imposing the vanishing of BPS invariants is not sufficient to determine the coefficients c. It turns out that for both models, providing one non-vanishing BPS invariant is sufficient to completely fix the ansatz. Beyond this base degree, the indices for − in both models are negative and smaller than −1. While for the ansatz (4.31), the numerator still has non-negative index, the numerator of Z ambig β would now require negative index for − . As this is not possible, imposing the vanishing conditions suffices to fix the ansatz completely for all base degrees beyond β = C 1,2 . The analysis for the more general geometries we consider proceeds analogously.

The M-string
For the M-string with its associated mass m turned on, we have computed the partition function up to base degree three. The results are summarized in Tab. 5.1. The explicit forms of the numerator with base degree one and two are given in the following. The weight k, the indices n ± , and the number of terms # in the numerator φ k,n + ,n − ,(n b ) of the partition function of the massive/massless E-string.
The massless limit is smooth and is obtained by replacing A m by 0 and B m by 12. Alternatively, the partition function of the massless M-string can be computed directly from the ansatz (4.31) with mass set to zero. We pushed this calculation up to base degree 4 as summarized in Tab. 5.1.

The E-string
We have computed the partition functions for the E-string with its eight mass parameters turned on up to base degree three. The results are summarized in Tab. 5.2. The explicit form of the numerator with base degrees one and two are given in the following.
(5.20) Similar to the M-string, the partition function of the massless E-string can alternatively be computed from the ansatz (4.31) with all masses set to zero. We have pushed this calculation up to n b = 4 as summarized in Tab. 5.2.

The E-M n string chain
Here we consider the E-M n string chain, which is engineered by the geometric configuration of one (−1) curve connected to one end of a linear chain of n (−2) curves. To simplify the computation, we turn off the eight mass parameters associated to the E-string, but we keep the mass m associated to the M-string chain finite. The weight and the indices of the numerator φ k,n + ,n − ,(n b ) read n i (n i + 1)(2n i + 1) 6 .
The partition functions with (n b ) = (1, 1), (1, 2), (2, 1) are also given in the appendix of [51] in terms of Jacobi theta functions, and we have checked that our results coincide with theirs in the small q = exp(2πi τ ) expansion. Furthermore, the partition functions with base degrees (n b ) = (0, n 1 , n 2 ) can also be computed with the multi-M-string setup where M 2 branes are suspended between three parallel M 5 branes, as discussed in [36]. We have checked that our results of (n b ) = (0, 1, 1), (0, 2, 1) are identical with those in [36].

(5.26)
All these factorization properties can be summarized in the following formula It can be explained by a mechanism similar to that behind (5.25). When m = + , as argued in [51], all M 2 branes must form bound states like (k, k, . . . , k j ), in other words, an M 2 brane suspended between the M 9 brane and the j-th M 5 brane, and the bound state behaves like an E-string state; see Fig. 2. Any remaining M-string state that is not part of a bound state leads to the vanishing of the partition function.

BPS invariants and vanishing conditions
In this section, we will discuss the BPS invariants that we can extract from our modular expressions for Z β . We will supplement the vanishing conditions (3.16) and (3.22) derived in section 3.1 with more stringent conjectured bounds based on these results, and get additional hints with regard to the geometric origin of the mass parameter in geometries involving (−2) curves.

The E-string
The topological string on the compact elliptic fibration over the Hirzebruch surface F 1 can be solved to low genus in the B-model using mirror symmetry. This allows the computation of the BPS invariants of local 1 2 K3 which are accessible in the compact model, corresponding to curve classes C = bC 1 + eE. In this manner, [31] obtained the result In fact, these numbers are also related to modular generating functions, see [28] for details.
As discussed in section 3.3, eight additional homology classes arise in the decompactification limit of the geometry, given by the total space of the canonical bundle over 1 2 K3. A general compact curve class in this geometry is of the form With the intersection numbers discussed in section 3.3, we obtain and can evaluate the Castelnuovo bound (3.6) for this geometry. For the case e < b, our computations suggest a stricter bound than the one that follows from (3.6). Overall, the vanishing conditions for the unrefined invariants I b,e g = 0 that we obtain are (6.5) Note that due to the positivity of the Cartan matrix of E 8 , the bound is weakest at µ = 0. We further conclude that only a finite number of E 8 Weyl orbits of the mass parameters, as specified by the Weyl invariant inner product M = (µ, µ) e 8 ∈ 2N for µ ∈ Λ e 8 ⊗ Z, can contribute to BPS invariants at fixed (b, e): For the massless case, we can revert to (3.8) to predict the leading unrefined BPS invariants at g max (b, e) to be I b,e g max (b,e) = (−1) gmax(b,e)+b (g max (b, e) + b) .

(6.7)
This is confirmed by our explicit determination of Z β in section 5.3. We list some of the invariants I b,e g at base degree b = 1, 2, 3 in table 6.1. Some invariants at base degrees b = 4, 5 can be found in appendix C.
Note that the Weyl symmetry that acts on the curves in 1 2 K3 guaranties that the BPS states are organized in terms of representations of the Weyl group. Setting m = 0 yields BPS invariants that are sums over the contributions of different Weyl orbits. This is visible for the refined BPS invariants in table 6.2, as all orbits contribute with positive sign. Moreover, in the refined case, we see that the contributions of degenerate curves at higher arithmetic genus complete these Weyl orbit contributions to full representations of E 8 . For instance, the N b=1,e=1   We can use the classic projective description of the moduli space of smooth very high genus and high κ curves also in the refined case, and obtain asymptotic formulae for the multiplicities of states. Let us introduce a degeneration parameter d = d + + d − such as at the end of section 3.1. In a suitable range d ≤ d(κ), we can use the projective model of the moduli space P n (M, κ) given by a P (C 2 κ −K·Cκ)/2 bundle over S [d] , together with its SU (2) − × SU (2) + Lefschetz decomposition and the multiplicities of Weyl orbits to predict an infinite number of non-vanishing BPS numbers at arbitrary high base degree b: we start with any maximal left and maximal right spin (3.16,3.22) and predict, using the methods of [2], the lower spin BPS degeneracies N κ Note that at the boundary for even d the checkerboard pattern already predicts vanishing numbers. Applying this procedure to all κ bounded by b < 5 and e < 13, we find that the BPS numbers stabilize for We have also solved the massive E-string up to base degree b ≤ 3. The results at the ----0  8  ---0  0  7  ---250  0  6  --44250  1  0  5  --1398253  4625  0  4  -44250  261501  250  0  3  -250  4625  39625  1  2  0  1   level of BPS numbers are available upon request. Some have already been discussed in [54] based on computations using the refined holomorphic anomaly equations and imposing boundary conditions. In this work, we have provided the systematic underpinning of such calculations, and demonstrated the complete integrability of the massive E-string using our modular ansatz and the boundary conditions. Given a solution of the massive E-string, [54] explains how to take limits to get solutions for the refined topological string on del Pezzo surfaces B k P 2 given by P 2 blown up at k points. For degree 9 − k smaller than six, these are generically not toric and therefore not solvable by the topological vertex. Hence, our methods also provide complete solutions for these previously inaccessible cases.

The M-string
The geometry of the M-string is less well understood in the literature. In the original paper [36], a 'non-planar toric diagram' is considered with identifications of two outer legs which indicate the sums with which the legs of refined topological vertices have to be connected to obtain the partition function. It is however not at all obvious how to compute the homology, the intersection numbers or the Kähler cone of the resulting local Calabi-Yau spaceM . Another description, most explicitly proposed in [58,59], is in terms of an elliptic fibration over a non-compact base containing a (−2) curve. As explained in section 3.2, this implies that f 4 and g 6 restrict to constants at the (−2) curve and leads generically toM as a non-compact threefold over a local surface S = T 2 × P 1 . This geometry appears too simple to allow for a mass deformation. One possibility to arrive at such a deformation is to tune complex structure moduli and choose these constants so that ∆ vanishes at the (−2) curve, yielding an I 1 singularity over the entire curve, i.e. giving rise to a constant fibration with a nodal torus. This is reminiscent of the geometry described in [58,59], except for two additional non-compact curves with I 1 singularities intersecting the compact P 1 in those references. This would allow the introduction of an additional Kähler parameter as mass parameter by resolving the node over the compact P 1 .
Below, we will analyze the BPS numbers of the M-string and their vanishing. We find BPS degeneracies and vanishing conditions which roughly follow the pattern expected from a geometric description and are sufficient to solve the model completely. There are several interesting features of the BPS spectrum which might help clarify the mass deformation of the geometry, which we will elaborate on in the following.
The enhanced supersymmetry of the massless M-string is visible in the trivial fibration structure of the geometry described above (as the BPS numbers are independent of the complex structure, we can consider the generic geometry T 2 × S in the massless case). Consequently, the unrefined BPS invariants I (b,e) g of the massless M-string vanish for b ∈ N, e ∈ N 0 . 7 For the refined invariants, this implies We also find that the sums over left spins vanish, For the refined invariants N b,e j − j + , we find the vanishing conditions . (6.14) We note by comparing with (3.16) and (3.22) that this would correspond to intersection numbers C 2 = 0, C · E = 1, K · C = −2 and K · E = 0. Note in particular that this is not compatible with C 2 = −2, our naive expectation. A possible explanation is a change in the normal bundle of the base curve C required to allow for mass deformation, as discussed above. We list the BPS numbers for b = 1, 2 and e ≤ 3 in the table 6.4.
Just as in the E-string case exemplified in table 6.3, the BPS numbers exhibit an asymptotic stability pattern for large κ and j ± , suggesting a simple projective description of the moduli space P n (M , κ). However, they do not follow a checkerboard pattern. This can be explained in part by the fact that in the mass deformed case, even and odd mass degrees exhibit a checkerboard pattern filling the "white" and "black" fields respectively. In the massless limit, these contributions are added.    For this reason, we will only list BPS invariants for µ ≥ 0.
The negative powers of Q m are at odds with the identification of (t b , t e = τ, t m = m) as Kähler parameters in a large radius Kähler cone expansion of Z top . By the structure of the coefficients of weak Jacobi forms, we can however shift the modular parameter τ as thus absorbing all negative powers of Q m , yielding a geometric large radius expansion interpretation. In the following, it will however be more convenient to continue working in unshifted classes.
The Castelnuovo bounds that we extract from our computations for the massive M-String depend on whether the degree µ in the mass parameter is even or odd. For even degree, we obtain whereas for odd degree, Note that both 2j max ∓ (b, e, ν) must be non-negative in order for N b,e,µ j − j + not to vanish. Just as for the E-string, these vanishing conditions allow us to formulate a bound µ max (e, b) at given (b, e) on µ above which all invariants vanish.
We can deduce from (6.17,6.18) for every class (b, e) a bound on µ which grows 8 to leading order in e as µ max (b, e) = 4be + c 1 b + c 0 .

The E-M n string chain
In this section, we report on Castelnuovo bounds for the E-M n string chain that we extract from our computations. According to the general theory, the bounds j max − (b i , e) and j max + (b i , e) grow quadratically in the base degrees b i and the elliptic fiber degree e. Furthermore, in the limit b i≥2 = 0 and the limit b 1 = 0, one should recover the bounds for the E-string and the M-string respectively. The only freedom we are allowed are quadratic terms b i b j (i < j) mixing base degrees in the bounds j max − (b i , e) and j max + (b i , e). These terms proved sufficient to deduce bounds for all cases considered. E.g., for the massive E-M string chain with base degrees b 0 , b 1 > 0 and only the M-string mass turned on, we find the bounds 9 (6.23)

Relating to the domain wall method
We now would like to compare our results on the E-and M-string with those of [44]. The philosophy underlying [44] is that as both the M-and the E-string descend from the M2 brane of M-theory, stretched between two M5 branes and an M5 and an M9 brane respectively, the elliptic genus capturing their BPS excitations should be constructed from the same ingredients. More precisely, [36] invokes the relation between the elliptic genus of the M-string and the topological string partition function to compute the former via the refined topological vertex formalism [5]. 10 The resulting expression is given the interpretation of the quantum mechanics of groundstates of M2 brane wrapped on T 2 , labelled by Young tableaux (consistent with the findings of [60]). The computation is then organized in terms growth scales only with √ e. It is saturated for (b, e) = {(1, 0), (1, 1), (1, 2)}, while our bound is saturated for an infinite set of (b, e). 9 When either b1 = 0 or b0 = 0 we can use the E-string or the M-string bounds. 10 The geometries are not toric, but based on a representation first proposed in [30], vertex methods apply. of certain matrices D ν t µ which are interpreted in terms of M5 brane domain walls separating M2 brane states ν and µ. In [44], this interpretation is pushed further: an expressions D µ for M9 domain walls is guessed, permitting the computation of both the Hilbert series for heterotic strings (M2 branes spanning between two M9 branes) and E-strings (spanning between an M5 and an M9 brane). Using this method, the elliptic genus of two E-strings was determined in [44]. The calculation was generalized to three E-strings in [61].

The M-string via the topological vertex
The elliptic genus for the M-string obtained in [36] via a refined topological vertex calculation is (7.1) Here, the first sum is taken over Young diagrams ν, and the second over the integer coordinates of boxes of each such diagram. |ν| indicates the total number of boxes of the diagram ν, and ν i the number of boxes in the i th row. Recall that the zeros of ϑ 1 , all of which are simple, lie at the origin and the lattice translates thereof. The expression (7.1) thus has an infinite number of poles that are unexpected from the vantage point of the Gopakumar-Vafa form of the refined topological string free energy [11,12]. We will demonstrated here for the case n b = 2 that these poles are spurious.
The single M-string elliptic genus is given by (7.1) as This expression exhibits merely the expected poles at 1,2 = 0. To identify this result with (5.15), we use the sum of squares relation and the addition formula Further identities among ϑ-functions are collected in appendix A.3.
n b = 2 As the expressions and identities required rapidly grow lengthy, we here focus on the massless case. Z 2 in this case reduces to This expression is more compact than the result (5. 16), yet exhibits a pole on the diagonal 1 = 2 . That this pole is spurious follows from the identity The easiest method to obtain such identities is by making a polynomial ansatz in A ± , B ± , E 4,6 with appropriate modular weight and elliptic indices in ± , and then fixing the coefficients by comparing the small expansion. We relegate the proof of this identity to appendix B.

The E-string via the domain wall method
The formula (5.17) for the elliptic genus of a single E-string obtained in [31], which we rederived above with our methods, serves as input in [44] to determine the matrix element of the M9 domain wall operator between the states corresponding to ν = · and ν = .
For two E-strings, [44] obtain the result The two terms are the contributions to a sum over Young diagrams as in (7.1), stemming from ν = and ν = . The A i , B i are the E 8 Jacobi forms with index i and modular weights 4, 6 respectively already encountered above. Here again, a pole arises on the diagonal The validity of the identities (7.8) can be shown directly via manipulations involving the ϑ-function identities reviewed in appendix A.3. We do this for the first identity in (7.8) in appendix B. The rest can be proved analogously.
8 The E-string and a generalizion of the blowup equation Recently, there has been a lot of progress on the quantization of the mirror curve to a toric Calabi-Yau threefold X. One perspective on this problem is to view the mirror curve as the spectral curve of a quantum integrable system constructed by Goncharov and Kenyon [62]. The spectrum of this system can be solved exactly by a quantization condition that is based on the refined free energy in the Nekrasov-Shatashvili limit of the topological string on X [63,64,39]. This quantization condition is notably invariant under the transformation → 4π 2 / (with appropriate transformations of the Kähler moduli t i , related to the Hamiltonians of the integrable system by quantum mirror maps). A second perspective, following [65,66,67,24], extracts trace-class difference operators from the quantum mirror curve. The exact form of the Fredholm determinant of these operators, which allows for a Fermi gas and matrix model interpretation, has been obtained in [68,69]. The compatibility of these two perspectives on the quantum spectral curve implies an identity from which an infinite number of constraints on the BPS invariants of X can be extracted [70]. We call this identity the compatibility formula. It can be formulated for any toric Calabi-Yau threefold.
As we have discussed above, the massive E-string is associated to the local 1 2 K3 geometry, which is not toric. However, generalizing work on Seiberg-Witten curves with E-type flavor symmetry [71], a mirror curve has also been formulated for this geometry [72]. It is natural to ask whether a proper quantization of this curve leads to an equally rich story as in the toric case. If the two perspectives on the quantization of the mirror curve in the toric case generalize, then the BPS spectrum of the E-string should satisfy a generalization of the compatibility formula to the non-toric case.
In [40], it was shown that if the local Calabi-Yau manifold X is the space Y N,m , i.e. the resolution of the cone over a Y N,m singularity, the compatibility formula is the Nekrasov-Satashvili limit of the Göttsche-Nakajima-Yoshioka K-theoretic blowup equation for Nekrasov partition functions [41,42,43]. We will here propose a generalization of this formula, pre-NS limit, which can be applied to all local Calabi-Yau manifolds X which permit the refinement of the topological string, i.e. exhibit a C * isometry. In particular, X need not be toric.
We will show that the BPS invariants of local 1 2 K3 satisfy the constraints implied by this generalization of the blowup equation.

Generalizing the blowup equation
To formulate the blowup equation and its generalization, we separate the n X irreducible compact curve classes C i into two sets, based on their intersections with the g X irreducible compact divisor classes D j in the geometry. These are captured by the n X × g X intersection We distinguish between those C i which intersect at least one compact divisor, and those which do not. In the toric setting, g X corresponds to the genus of the mirror curve. When the geometry engineers a supersymmetric gauge theory, the Kähler parameters t i of the former set map to moduli of the gauge theory, while the parameters m i of the latter map to masses of hypermultiplets. We will retain this nomenclature and refer to the m i as mass parameters.
We will also need to specify an n X dimensional integral vector B such that non-vanishing BPS invariants N d j − ,j + occur only at This condition specifies B only mod 2. The existence of such a vector B is guaranteed by the fact that the non-vanishing BPS invariants follow a so-called checkerboard pattern, as first observed in [2].
We define the twisted refined free energies F ref (t, 1 , 2 ) via Here, the perturbative contributions are given by 4) where a ijk and b i are related to the topological intersection numbers in X, and b NS i can be obtained from the refined genus one holomorphic anomaly equation [7,73]. The instanton contributions are given by the refined Gopakumar-Vafa formula (3.11).
In terms of these quantities, we formulate the following generalization of the blowup equation to arbitrary local Calabi-Yau manifolds with C * isometry: Here r is chosen among an appropriate subset of integer vectors satisfying (8.2), as (8.9) depends on the explicit representative of the mod 2 class. Two different vectors r, r however do yield the same constraints if there exists a g X dimensional integral vector m such that r = r + 2C · m ; (8.6) changing from r to r only amounts to a shift in the index vector n in the blowup equation.
It is conjectured in [70] that at least g X inequivalent choices for the vector r exist for toric Calabi-Yau geometries, such that the equation (8.5) is true. For the Y N,m geometry with g X = N − 1, at least (N − 1) 2 such vectors exist [40]. In the next section, we will find one appropriate r vector for local 1 2 K3, which has g X = 1. We can separate the perturbative and non-perturbative contributions to (8.5) to obtain a form of this equation more amenable to computation. Defining the invariants n d g,n via and introducing where we have used the notation Thus, in order to extract constraints on BPS invariants one needs, in addition to the BPS invariants, the following perturbative data

Constraints on the BPS invariants of 1 2 K3
In this section, we verify that the constraints implied by (8.5) are satisfied by the BPS invariants of local 1 2 K3, with an appropriately chosen integer vector r. We begin by determining the perturbative data (8.11) for this geometry.
We have discussed the 1 2 K3 surface in section 3.2, and in particular noted that it exhibits an elliptic fibration. We will denote the Kähler moduli associated to the base C 1 and elliptic fiber E of this fibration by t b and t f respectively. Local 1 2 K3, the total space of the canonical line bundle of 1 2 K3, has a single compact divisor, given by the zero section S = 1 2 K3 of the line bundle. Using the adjunction formula, we find that S · C 1 = 1 , S · E = S · e i = 0 , i = 1, . . . , 8 . which decompose into E 8 characters or E 8 Weyl orbits. We can thus work with a reduced intersection matrix and integer vector, which we continue to denote by the same symbols, The coefficients a ijk , b i of the perturbative free energy can in principle be computed from the topological intersection numbers of divisors in the local 1 2 K3. The coefficients b NS i however cannot be computed from the topology of X; we will compute them by applying the refined holomorphic anomaly equation to the mirror curve of X constructed by Sakai [72]. Indeed, we will extract all of the remaining perturbative data a ijk , b i , b NS i from this curve.
For this calculation, we express Sakai's mirror curve in the Weierstrass form The coefficient functions g 2 (u, τ, m) and g 3 (u, τ, m) are polynomials in u of degree 4 and 6 respectively. Their explicit forms are reproduced in appendix A.4. The modulus u is chosen such that u → 0 is the large volume limit. τ is the elliptic modulus of the elliptic fiber inside 1 2 K3 in the limit u → 0. These parameters are related to the Kähler moduli t b , t f of X by The coefficients a ijk can now be extracted from the prepotential which can be computed through the special geometry relations following the procedure in [54]. We find The coefficients of t b t 2 f and t 3 f are integral constants, and they are fixed by the requirement that F 0 (t b , t f , m) splits and reproduces the prepotential of the local del Pezzo E 8 surface in the blow down limit of the base e 9 : Next, we fix the genus one refined holomorphic anomaly equations [7,73] by the known genus one BPS invariants and obtain 11 .

Conclusions
We have demonstrated that our approach to computing Z top is sufficiently powerful to completely solve Z top on all local elliptically fibered Calabi-Yau 3-folds leading to superconformal 6d field theories without gauge symmetry. In forthcoming work [35], we will extend this analysis to singularities in the elliptic fibration that lead to gauge symmetry.
While we have justified the general form of our ansatz based on the holomorphic anomaly equations, we obtained the exact form of the index polynomial based on anomaly considerations. To further our understanding of the refined topological string, it would be important to derive the index purely from topological string considerations.
Regarding our proposed generalization of the blowup equation, much remains to be done. Its range of validity should be determined, and a derivation provided within this class of geometries. More ambitiously still, one should study to what extent the Grassi-Hatsuda-Mariño conjecture or variants thereof can be extended to this class of geometries.
One aspect of our approach that we find intriguing is that its justification lies in the Witten form [29] of the holomorphic anomaly equations [28], which is formulated for the partition function directly. The holomorphic anomaly equations in their BCOV incarnation [9] on the other hand are formulated in terms of the coefficients F n,g of the coupling constant expansion of the topological string amplitudes. The two formulations yield complementary results for Z top ; the former yields closed expressions for Z β , coefficients of an expansion in base classes, while the latter yields exact results for F n,g , coefficients in coupling constant expansions. Understanding the precise relation between the two formulations might thus be a stepping stone towards understanding Z top pre-expansion in any variables.

A Definitions and properties of modular forms and weak Jacobi forms
In this appendix, we collect some facts regarding modular forms and weak Jacobi forms. We follow closely the treatment of [74] for the former and [52] and [75] for the latter.

A.1 Modular forms
The Eisenstein series are defined as with τ taking values in the complex upper half plane H = {τ ∈ C|Im(τ ) > 0}. For integer m > 1, the Eisenstein series are modular forms of weight k = 2m. By definition a weight k modular form f k (τ ) transforms under an SL(2, Z) action The two modular forms Q := E 4 , and R := E 6 (A.5) generate the ring of holomorphic modular forms M * = ⊕ k≥0 M k (Γ 1 ) of the modular group Γ 1 = SL(2, Z).
The Dedekind η function is defined as Its 24 th power, is a weight k = 12 modular form called the discriminant function. The modular invariant j-function is defined as Any modular function can be written as a rational function of j(τ ).
The second Eisenstein series E 2 is an interesting special case as it transforms under an SL(2, Z) action with a shift This Eisenstein series is an example of a quasimodular form (of weight k = 2). More generally P := E 2 , Q and R generate the ring of quasimodular formsM * (Γ 1 ) = M * (Γ 1 )[E 2 ] of even weight. The ringM * (Γ 1 ) is closed under differentiation with respect to τ . Alternatively, one can define the almost holomorphic second Eisenstein serieŝ which does transform as a modular function of weight k = 2. The ring of almost holomorphic modular forms is defined asM * (Γ 1 ) = M * (Γ)[Ê 2 ]. Quasimodular forms are the holomorphic parts of almost holomorphic forms, but they are not necessarily modular themselves.

A.2 Jacobi forms
Jacobi forms [52] are functions φ : H × C → C that depend on a modular parameter τ ∈ H and an elliptic parameter z ∈ C. They transform under the action of the modular group on H × C, given by cτ +d φ(τ, z) . (A.12) Furthermore, they enjoy the property of quasi-periodicity, k ∈ Z is called the weight and m ∈ N the index of the Jacobi form.
Due to the periodicity under τ → τ + 1, z → z + 1, the Jacobi forms enjoy a double Fourier expansion φ(τ, z) = n,r c(n, r)q n y r , where q = e 2πiτ , y = e 2πiz . (A.14) It is in fact more appropriate to write the coefficients as c(n, r) = C(4nm − r 2 , r) as the combination 4nm − r 2 is invariant under the transformation (A.13) and C(4nm − r 2 , r) has a periodicity of 2m in r. Holomorphic Jacobi forms satisfy the constraint c(n, r) = 0 unless 4mn ≥ r 2 , cusp forms satisfy c(n, r) = 0 unless 4mn > r 2 , while for weak Jacobi forms, one imposes the condition c(n, r) = 0 unless n ≥ 0.
According to [52], the ring of weak Jacobi forms of integer index is freely generated over the ring of modular forms by the two generators φ −2,1 (τ, z) and φ 0,1 (τ, z) of index 1. Introducing the notation A(τ, z) = φ −2,1 (τ, z) and B(τ, z) = φ 0,1 (τ, z) , (A. 15) we see that the vector space of weak Jacobi forms of weight k and index m is equal to The generators A and B are of index m = 1 and weight −2 and 0 respectively. They can be defined as Our conventions for the theta functions associated to the spin structure on the torus are The Jacobi theta functions are then θ 1 = iΘ In particular, we have In order to accommodate our convention for the normalization of i , we will also use the notation Using the Jacobi triple product for θ 1 and the notation one finds that the weak Jacobi form A has a simple product form The weight zero index one weak Jacobi form B is one half of the elliptic genus of K3, χ(K3; q, y) = 2B(τ, z) = 2y + 20 + 2 y + 20 y 2 − 128 y + 216 − 128y + 20y 2 q + O(q 2 ) , (A.24) and it enjoys the following expansion in x 1 with g n (x 1 ) a polynomial in x 1 of order n. Note that A(τ, z) vanishes when z = 0, while B(τ, 0) = 12, as can be seen from the expansion of these Jacobi forms in z with quasi modular coefficients The real zeros of A coincide with the zeros of x 1 . All complex zeros are obtained as translates of these zeros by multiples of 1 and τ .
The weak Jacobi forms A(τ, nz) of index n 2 will play an important role in this paper. A(τ, n 1 z) is divisible by A(τ, n 2 z) if the integer n 1 is divisible by n 2 . Based on this observation, it is convenient to define a more primitive weak Jacobi form, due to Zagier, where µ(n) is the Möbius function. The first few P d are given by where we have defined A k = A(τ, kz). For any d, one can show that P d (τ, z) has no poles and vanishes only at primitive d-torsion points, i.e. at z = 2π(n 1 + τ n 2 )/d for integers n 1 , n 2 with the greatest common divisor gcd(n 1 , n 2 , d) = 1. So P d (τ, z) is a weak Jacobi form and can be written as a polynomial in A(τ, z), B(τ, z), E 4 , E 6 . These polynomials P d will feature prominently in a forthcoming paper [28]. We can express A(τ, nz) in terms of these more basic building blocks via A.3 Some useful identities for Jacobi theta functions We review some basic identities for Jacobi theta functions in this appendix, which can be found e.g. in [76]. For simplicity of notation, we will only indicate the elliptic argument of theta functions, and use the notation ϑ i := ϑ i (τ, 0). Apart from the odd function ϑ 1 (z), all other Jacobi functions ϑ i (z), i = 2, 3, 4 are even functions of the elliptic argument. When the elliptic argument is set to zero, the Jacobi theta functions satisfy the famous abstruse identity, Only two of the four theta functions are algebraically independent, as they satisfy the relations Denoting ± ≡ 1 2 ( 1 ± 2 ) and ϑ i± ≡ ϑ i ( ± ), the following formulae express theta functions with elliptic arguments 1,2 in terms of theta functions with elliptic arguments ± : These identities are not entirely independent. For example, we can transform the product ϑ 1 ( 1 )ϑ 1 ( 2 )ϑ 2 ( 1 )ϑ 2 ( 2 ) with either the first two formulae or the fifth formula above, and obtain the the same result due to (A.31). We can also derive the duplication formulas from the above (A.32). For example, set 1 = 2z, 2 = 0 in the 5th formula we obtain ϑ 1 (2z) = 2ϑ 1 (z)ϑ 2 (z)ϑ 3 (z)ϑ 4 (z) ϑ 2 ϑ 3 ϑ 4 . (A.33) The Eisenstein series can be expressed in terms of the the Jacobi theta functions. We have for µ, ν ∈ Λ e 8 . Recall that the inner product (·, ·) e 8 on Λ e 8 is normalized such that the roots have length squared 2.
The ring of E 8 Weyl invariant Jacobi forms is generated by the following forms [72]:

B Proof of some identities involving ϑ-functions and Jacobi forms
In this appendix, we prove two identities invoked in section 7.
To prove the identity (7.6), which we reproduce in the following we begin with the first term: we multiply the numerator and the denominator by ϑ 2 1− , pair this factor with ϑ 1 ( 3 2 1 + 1 2 2 ) 2 via (A.32), and replace ϑ 1 (2 2 ) using the duplication formula (A.33). We find it is easy to see the coefficients of ϑ 1− ϑ 2− ϑ 3− ϑ 5 4− and ϑ 3 1− ϑ 2− ϑ 3− ϑ 3 4− vanish. For instance, the coefficient of ϑ 1− ϑ 2− ϑ 3− ϑ 5 4− reads Now all the theta functions of − can be factored out. We are left with the following coefficient of the factor ϑ 1 ( 2 − 1 )A − : now can either be seen directly by expressing both (B.7) and (B.8) in terms of algebraically independent ϑ functions, or by noting that both expressions define weak Jacobi forms with the same weight and index, and fixing coefficients by comparing their small q expansion to sufficiently high order. 12 .
We next prove the first formula in (7.8), which we also reproduce here First, we use the duplication formula (A.33) to obtain Applying the formulae in (A.32) to the pairs ϑ 1 ( 1 )ϑ i ( 2 ), i = 2, 3, 4 in the first term, and likewise with 1 and 2 exchanged in the second term, we find The four factors of ϑ i− in front are proportional via the duplication identity (A.33) to the expected factor ϑ 1 ( 1 − 2 ) required to cancel the pole in (7.7). It is straightforward to work out the rest by re-expressing the weak Jacobi forms in (7.8) and the RHS of (B.12) in terms of an independent set of theta functions, and invoking the identities (A.34) and (A.35). This then completes the proof of the first identity in (7.8). The proof of the others follows the same pattern.
C BPS invariants from the modular approach C.1 Massless E-string n b = 4, 5 Here in Tabs. C.1, C.2 we give the unrefined BPS indices for massless E-string at base degree n b = 4, 5 respectively.  for massless E-string at n b = 5.
C.2 Massless M-string n b = 3, 4 and n e ≤ 3 We give here the BPS numbers for the massless M-string at base degree 3, 4 and fiber degree up to 3 in Tabs. C.3, C.4 respectively. In the head of each table, (n b , n e ) means base degree n b and fiber degree n e . Conspicuously, the checkerboard pattern disappears in these tables.    · · · · · · · · · .
where we have used the nine generators of the ring of E 8 Weyl invariant Jacobi forms introduced in subsection A.4. The other coefficients a 3 , a 4 , b 3 , . . . , b 6 of the Sakai curve are not needed in our computations and can be found in [72]. Note that compared to Sakai's original notation, we have inverted u so that u → 0 is the large volume limit.