Exact effective interactions and 1/4-BPS dyons in heterotic CHL orbifolds

Motivated by precision counting of BPS black holes, we analyze six-derivative couplings in the low energy effective action of three-dimensional string vacua with 16 supercharges. Based on perturbative computations up to two-loop, supersymmetry and duality arguments, we conjecture that the exact coefficient of the $\nabla^2(\nabla\phi)^4$ effective interaction is given by a genus-two modular integral of a Siegel theta series for the non-perturbative Narain lattice times a specific meromorphic Siegel modular form. The latter is familiar from the Dijkgraaf-Verlinde-Verlinde (DVV) conjecture on exact degeneracies of 1/4-BPS dyons. We show that this Ansatz reproduces the known perturbative corrections at weak heterotic coupling, including tree-level, one- and two-loop corrections, plus non-perturbative effects of order $e^{-1/g_3^2}$. We also examine the weak coupling expansions in type I and type II string duals and find agreement with known perturbative results. In the limit where a circle in the internal torus decompactifies, our Ansatz predicts the exact $\nabla^2 F^4$ effective interaction in four-dimensional CHL string vacua, along with infinite series of exponentially suppressed corrections of order $e^{-R}$ from Euclideanized BPS black holes winding around the circle, and further suppressed corrections of order $e^{-R^2}$ from Taub-NUT instantons. We show that instanton corrections from 1/4-BPS black holes are precisely weighted by the BPS index predicted from the DVV formula, including the detailed moduli dependence. We also extract two-instanton corrections from pairs of 1/2-BPS black holes, demonstrating consistency with supersymmetry and wall-crossing, and estimate the size of instanton-anti-instanton contributions.

6 Weak coupling expansion in dual string vacua 67 6.1 Weak coupling limit in CHL orbifolds of type II strings on K3 × T 3 67 6.2 Weak coupling limit in type II string theory compactified on K3 × T 2 71 6.3 Type I string theory 74

Introduction
Providing a statistical origin of the thermodynamic entropy of black holes is a key goal for any theory of quantum gravity. More than two decades ago, Strominger and Vafa demonstrated that D-branes of type II string theories provide the correct number of micro-states for supersymmetric black holes in the large charge limit [1]. Since then, much work has gone into performing precise counting of black hole micro-states and comparing with macroscopic supergravity predictions. In vacua with extended supersymmetry, it was found that exact degeneracies of five-dimensional BPS black holes (counted with signs) are given by Fourier coefficients of weak Jacobi forms, giving access to their large charge asymptotics [2,3,4]. With hindsight, the modular invariance of the partition function of BPS black holes follows from the existence of an AdS 3 factor in the near-horizon geometry of these extremal black holes.
In a prescient work [5], Dijkgraaf, Verlinde and Verlinde (DVV) conjectured that fourdimensional BPS black holes in type II string theory compactified on K3×T 2 (or equivalently, heterotic string on T 6 ) are in fact Fourier coefficients of a meromorphic Siegel modular form, invariant under a larger Sp(4, Z) symmetry. This conjecture was subsequently extended to other four-dimensional vacua with 16 supercharges [6], proven using D-brane techniques [7,8], and refined to properly incorporate the dependence on the moduli at infinity [9], but the origin of the Sp(4, Z) symmetry had remained obscure. In [10,11,12], it was noted that a class of 1/4-BPS dyons arises from string networks which lift to M5-branes wrapped on K3 times a genus-two curve, but this observation did not lead to a transparent derivation of the DVV formula.
In [13], implementing a strategy advocated earlier in [14], we revisited this problem by analyzing certain protected couplings in the low energy effective action of the four-dimensional string theory compactified on a circle of radius R down to three space-time dimensions. In three-dimensional string vacua with 16 or more supercharges, the massless degrees of freedom are described by a non-linear sigma model on a symmetric manifold G 3 /K 3 , which contains the four-dimensional moduli space M 4 = G 4 /K 4 , the holonomies a i I of the four-dimensional gauge fields, the NUT potential ψ dual to the Kaluza-Klein vector and the circle radius R. Since stationary solutions with finite energy in dimension 4 yield finite action solutions in dimension 3, it is expected that black holes of mass M and charge Γ I i = (Q I , P I ) in 4 dimensions which break 2r supercharges induce instantonic corrections of order e −2πRM+2πia i I Γ I i to effective couplings with 2r fermions (or r derivatives) in dimension 3 (see e.g. [15]); and moreover that these corrections are weighted by the helicity supertrace where F is the fermionic parity and h is the helicity in D = 4. In addition, there are corrections of order e −2πR 2 |M 1 |+2πiM 1 ψ from Euclidean Taub-NUT instantons which asymptote to R 3 ×S 1 , where the circle is fibered with charge M 1 over the two-sphere at spatial infinity. While the two-derivative effective action is uncorrected and invariant under the full continuous group G 3 , higher-derivative couplings need only be invariant under an arithmetic subgroup G 3 (Z) known as the U-duality group. For string vacua with 32 supercharges, the R 4 , ∇ 4 R 4 and ∇ 6 R 4 effective interactions are expected to receive instanton corrections from 1/2-BPS, 1/4-BPS and 1/8-BPS black holes, respectively. In [16], two of the present authors demonstrated that the exact R 4 , ∇ 4 R 4 couplings, given by Eisenstein series for the U-duality group G 3 (Z) = E 8 (Z) [17,18,19,20], indeed reproduce the respective helicity supertraces Ω 4 and Ω 6 for 1/2-BPS and 1/4-BPS black holes in dimension 4. At the time of writing, a similar check for the ∇ 6 R 4 coupling conjectured in [21] still remains to be performed.
For three-dimensional string vacua with 16 supercharges, the scalar fields span a symmetric space of the form for a model-dependent integer k, which extends the moduli space in D = 4. The four-derivative scalar couplings of the form F (φ)(∇φ) 4 are expected to receive instanton corrections from 1/2-BPS black holes, along with Taub-NUT instantons, while sixderivative scalar couplings of the form G(φ)∇ 2 (∇φ) 4 receive instanton corrections both from four-dimensional 1/2-BPS and 1/4-BPS black holes, along with Taub-NUT instantons. In [13], we restricted for simplicity to the maximal rank case (k = 12) arising in heterotic string compactified on T 7 (or equivalently type II string theory compactified on K3 × T 3 ). Using low order perturbative computations, supersymmetric Ward identities and invariance under the U-duality group G 3 (Z) ⊂ O (24,8, Z), we determined the tensorial coefficients F abcd (φ) and G ab,cd (φ) of the above couplings exactly, for all values of the string coupling. In either case, the non-perturbative coupling is given by a U-duality invariant generalization of the genus-one and genus-two contribution, respectively: F (24,8)  similar techniques as in [22], we shall demonstrate that the Ansatz (1.7) satisfies the relevant supersymmetric Ward identities and produces the correct tree-level, one-loop and two-loop terms in the weak heterotic coupling limit, or powerlike terms in the large radius limit, accompanied by infinite series of instanton corrections consistent with the helicity supertraces of 1/2-BPS and 1/4-BPS states in D = 4. A significant feature and complication of (1.5),(1.7) compared to the 1/2-BPS coupling (1.4), (1.6) is that the integrand 1/Φ k−2 has a double pole on the diagonal locus Ω 12 = 0 and its images under Γ 2,0 (N ) (corresponding to the separating degeneration of the genus-two Riemann surface with period matrix Ω). In the context of the DVV formula, these poles are well-known to be responsible for the moduli dependence of the helicity supertrace Ω 6 . In the context of the BPS coupling (1.7), these poles are responsible for the fact that the weak coupling and large radius expansions receive infinite series of instanton anti-instanton contributions, as required by the quadratic source term in the differential equation (2.26) for the coefficient G (2k, 8) ab,cd . A similar phenomenon is encountered in the case of the ∇ 6 R 4 couplings in maximal supersymmetric string vacua [23].

Organization
This work is organized as follows. In §2 we recall relevant facts about the moduli space, duality group and BPS spectrum of heterotic CHL models in D = 4 and D = 3, record the known perturbative contributions to the ∇ 2 F 4 and ∇ 2 (∇φ) 4 couplings in heterotic perturbation theory, and preview our main results. In §3, we derive the differential constraints imposed by supersymmetry on these couplings, and show that they are obeyed by the Ansatz (1.7). In §4, we study the expansion of (1.7) at weak heterotic coupling, and show that it correctly reproduces the known pertubative contributions, along with an infinite series of NS5-brane, Kaluza-Klein (6,1)-branes and H-monopole instanton corrections. In §5, we move to the central topic of this work and study the large radius limit of the Ansatz (1.7). We obtain the exact ∇ 2 F 4 and R 2 F 2 couplings in D = 4 plus infinite series of O(e −R ) and O(e −R 2 ) corrections. We extract from the former the helicity supertrace of 1/4-BPS black holes with arbitrary charge, and recover the DVV formula and its generalizations. We further analyze two-instanton contributions from pairs of 1/2-BPS black holes and show their consistency with wall-crossing. In §6 we study the weak coupling limit of the ∇ 2 (∇φ) 4 couplings in CHL orbifolds of type II string on K3 × T 3 , and of the related ∇ 2 H 4 couplings in type IIB compactified on K3 down to six dimensions.
A number of more technical developments are relegated to appendices. In Appendix A we collect relevant facts about genus-two Siegel modular forms, and the structure of their Fourier and Fourier-Jacobi expansions. In §B we compute the one-loop and two-loop contributions to the ∇ 2 F 4 and ∇ 2 (∇φ) 4 couplings in CHL models, spell out the regularization of the corresponding modular integrals, compute the anomalous terms in the differential constraints due to boundary contributions, and discuss their behavior near points of enhanced gauge symmetry. In §C, we verify that the polar contributions to the Fourier coefficients of 1/Φ k−2 are in one-to-one correspondence with the possible splittings Γ = Γ 1 + Γ 2 of a 1/4-BPS charge Γ into a pair of 1/2-BPS charges Γ 1 , Γ 2 . In §D, we use this information to compute the singular contributions to Abelian Fourier coefficients with generic 1/4-BPS charge, and in §E demonstrate that the structure of these coefficients and of the constant terms is consistent with the differential constraint. In §F, we also estimate the corrections to the saddle point value of the Abelian Fourier coefficients, due to the non-constancy of the Fourier coefficients of 1/Φ k−2 and show that they are of the size expected for two-instanton effects on the one hand, and Taub-NUT instanton -anti-instanton on the other hand. In §G, we explain how to infer the non-Abelian Fourier coefficients with respect to O(p − 2, q − 2) from the knowledge of the Abelian coefficients with respect to O(p − 1, q − 1). Finally, §H collects definitions of various polynomials which enter in the formulae of §4 and §5.1.
Note: The structure of the body of this paper follows that of our previous work [22] on 1/2-BPS couplings, so as to facilitate comparison between our treatments of the genus-one and genus-two modular integrals. The reader is invited to refer to [22] for more details on points discussed cursorily herein.

BPS spectrum and BPS couplings in CHL vacua
In this section, we recall relevant facts about the moduli space, duality group and BPS spectrum of heterotic CHL models in D = 4 and D = 3, and summarize the main features of our Ansatz for the exact ∇ 2 (∇φ) 4 and ∇ 2 F 4 couplings in these models.

Moduli spaces and dualities
a symmetry of the full spectrum. In particular, the automorphism group of the perturbative lattice O(2k − 1, 7, Z) does not preserve the orbifold projection, and does not act consistently on states that are not invariant under the Z N action on the circle. Nevertheless, we expect the U-duality group to be larger than O(2k, 8, Z) and to include in particular Fricke duality.
An important consequence of the enhancement of T-duality group O(2k − 1, 7, Z) to the U-duality group O(2k, 8, Z) is that singularities in the low energy effective action occur on codimension-8 loci in the full moduli space M 3 , partially resolving the singularities which occur at each order in the perturbative expansion on codimension-7 loci where the gauge symmetry is enhanced.

BPS dyons in D = 4
We now review relevant facts about helicity supertraces of 1/2-BPS and 1/4-BPS states in heterotic CHL orbifolds. As mentioned above, the lattice of electromagnetic charges Γ = (Q, P ) decomposes into Λ em = Λ * m ⊕ Λ m , where on the heterotic side the first factor corresponds to electric charges Q carried by fundamental heterotic strings, while the second factor corresponds to magnetic charges P carried by heterotic five-brane, Kaluza-Klein (6,1)-brane and H-monopoles. The lattices Λ e = Λ * m and Λ m carry quadratic forms such that while Λ em carries the symplectic Dirac pairing Γ, Γ ′ = Q · P ′ − Q ′ · P ∈ Z. A generic BPS state with charge Γ ∈ Λ em such that Q∧P = 0 (i.e. when Q and P are not collinear) preserves 1/4 of the 16 supercharges, and has mass M(Γ; t) = 2 |Q R +SP R | 2 where t = (S, ϕ) denote the set of all coordinates on (2.1), and Q R , P R are the projections of the charges Q, P on the negative 6-plane parametrized by ϕ ∈ G 2k−2,6 . When Q ∧ P = 0, the state preserves half of the 16 supercharges, and the mass formula (2.5) reduces to M(Γ) 2 = 2|Q R + SP R | 2 /S 2 . In order to describe the helicity traces carried by these states, it is useful to distinguish 'untwisted' 1/2-BPS states, characterized by the fact that their charge vector (Q, P ) lies in the sublattice Λ m ⊕ N Λ e ⊂ Λ e ⊕ Λ m , from 'twisted' 1/2-BPS states where (Q, P ) lies in the complement of this sublattice inside Λ em . One can show that twisted 1/2-BPS states lie in two different orbits of the S-duality group Γ 0 (N ): they are either dual to a purely electric state of charge (Q, 0) with Q ∈ Λ e Λ m , or to a purely magnetic state of charge (0, P ) with P ∈ Λ m N Λ e . Similarly, untwisted 1/2-BPS states are either dual to a purely electric state of charge (Q, 0) with Q ∈ Λ m , or to a purely magnetic state of charge (0, P ) with P ∈ N Λ e . The fourth helicity supertrace is sensitive to 1/2-BPS states only, and is given by for untwisted charge Γ ∈ Λ m ⊕ N Λ e . Here, the c k 's are the Fourier coefficient of 1/∆ k = m≥1 c k (m)q m = 1 q + k + . . . , where ∆ k = η k (τ )η k (N τ ) is the unique cusp form of weight k under Γ 0 (N ). In the maximal rank case N = 1, we write c(m) = c 12 (m) for brevity.
jump in Ω 6 (Q, P ; t) can then be shown to agree [33,34,35] with the primitive wall-crossing formula [36] ∆Ω 6 (Γ) = −(−1) Γ 1 ,Γ 2 +1 Ω 4 (Γ 1 ) Ω 4 (Γ 2 ) , (2.12) where ∆Ω 6 is the index in the chamber where the bound state exists, minus the index in the chamber where it does not. The formula (2.8) only applies to dyons whose charge is primitive with unit torsion and that is generic, in the sense that it belongs to the highest stratum in the following graph of inclusions 2 When (Q, P ) is primitive and belongs to one of the sublattices above, it may split into pairs of 1/2-BPS charges that are not necessarily 'twisted' nor primitive. As explained in [13], the study of 1/4-BPS couplings in D = 3 provides a microscopic motivation for the contour prescription (2.11), and gives access to the helicity supertrace for arbitrary charges in (2.13) beyond the special case of the highest stratum for which (2.8) is valid. Indeed, it will follow from the analysis in the present work that for any primitive charge (Q, P ), the helicity supertrace is given by (2.14) where C k−2 and C k−2 are the Fourier coefficients of 1/Φ k−2 and 1/Φ k−2 evaluated with the same contour prescription as above, and Ω ⋆ 2 is conjugated by the matrix A. This formula is manifestly invariant under the U-duality group G 4 (Z), including Fricke duality that exchanges the last two lines. For primitive 'twisted charges' of gcd(Q ∧ P ) = 1, only the first line is non-zero and the only allowed matrix A is the identity such that one recovers (2.8). This is also the dominant term in the limit where the charges Q, P are scaled to infinity, since terms with A = 1 in the sum grow exponentially as e π|Q∧P |/|det A| , at a much slower rate that the leading term with A = 1 [2,8]. It would be interesting to check that the logarithmic corrections to the black hole entropy are consistent with the R 2 coupling in the low energy effective action, generalizing the analysis of [37,6] to general charges, and to identify the near horizon geometries responsible for the exponentially suppressed contributions, along the lines of [38,39].
After splitting C k−2 and C k−2 into their finite and polar parts, and representing the latter as a Poincaré sum, we shall show that the unfolded sum over matrices A accounts for all possible splittings of a charge (Q, P ) = (Q 1 , P 1 ) + (Q 2 , P 2 ) into two 1/2-BPS constituents, labeled by A ∼ p q r s ∈ M 2 (Z) [33], (Q 1 , P 1 ) = (p, r) sQ − qP ps − qr , (Q 2 , P 2 ) = (q, s) pP − rQ ps − qr . (2.15) Generalizing the analysis in [40], we shall show that the discontinuity of Ω 6 (Γ, t) for an arbitrary primitive (but possibly torsionful) charge Γ is given by a variant of (2.12) where Ω 4 (Γ) on the right-hand side is replaced by (2.16) in agreement with the macroscopic analysis in [35].

BPS couplings in D = 4 and D = 3
In supersymmetric string vacua with 16 supercharges, the low-energy effective action at twoderivative order is exact at tree level, being completely determined by supersymmetry. In contrast, four-derivative and six-derivative couplings may receive quantum corrections from 1/2-BPS and 1/4-BPS states or instantons, respectively. At four-derivative order, the coefficients of the R 2 + F 4 and F 4 couplings in D = 4, which we denote by f and F (2k−2, 6) abcd , are known exactly, and depend only on the first and second factor in the moduli space (2.1), respectively: ∆ k (ρ) , (2.18) where Γ Λ 2k − 2, 6 [P abcd ] denotes the Siegel-Narain theta series (B.4) for the lattice Λ m = Λ 2k−2,6 , with an insertion of the symmetric polynomial P abcd (Q) = Q L,a Q L,b Q L,c Q L,d − 3 2πρ 2 δ (ab Q L,c Q L,d) + 3 16π 2 ρ 2 2 δ (ab δ cd) , (2.19) and ∆ k is the same cusp form whose Fourier coefficients enter in the helicity supertrace (2.6),(2.7). Here and elsewhere, we suppress the dependence of Γ Λp, q [P abcd ], and therefore of the left-hand side of (2.18), on the moduli φ ∈ G p,q . As explained in [22], both couplings arise as polynomial terms in the large radius limit of the exact (∇φ) 4 coupling in D = 3. The latter is uniquely determined by supersymmetry Ward identities, invariance under U-duality and the tree-level and one-loop corrections in heterotic perturbation string theory to be given by the genus-one modular integral (1.4). In the weak heterotic coupling limit g 3 → 0, (1.4) has an asymptotic expansion abcd is a schematic notation for the tensor appearing in front of the exponential, including an infinite series of subleading terms which resum into a Bessel function. In the large radius limit R → ∞, the asymptotic expansion of (1.4) instead gives, schematically, 8) abcd ( where we used the same schematic notation P ( * ) abcd for the tensor appearing in front of the exponential including subleading terms. The first line in (2.21) reproduces the four-dimensional couplings (2.18), while the second line corresponds to O(e −R ) corrections from four-dimensional 1/2-BPS states whose wordline winds around the circle. These contributions are weighted by the BPS indexc k (Q, P ) = Ω 4 (Q, P ) given in (2.16), The last line in (2.21) corresponds to O(e −R 2 ) corrections from Taub-NUT instantons.
with P ab = Q L,a Q L,b − δ ab 4πρ 2 andÊ 2 = E 2 − 3 πρ 2 is the almost holomorphic Eisenstein series of weight 2, while G (p,q) ab,cd the genus-two modular integral (of which (1.7) is a special case), G (p,q) ab,cd = R.N. (2.30) Here P ab,cd is the quartic polynomial δ ab, Q r Lc (Ω 2 ) rs Q s Ld + 1 8π 2 |Ω 2 | δ ab, δ cd , (2.31) and for any polynomial P in Q r La and integer lattice Λ p,q of signature (p, q), we denote Γ (2) Λp, q [P ] = |Ω 2 | q/2 where r, s = 1, 2 label the choice of A-cycle on the genus-two Riemann surface. Since the modular integral (2.30) itself satisfies the differential constraints (2.23)-(2.26), as shown in §3.3, it is consistent with supersymmetry to propose that the exact coefficient of the ∇ 2 (∇φ) 4 coupling be given by (1.7). In § §4 below, we shall demonstrate that the weak coupling expansion of the Ansatz (1.7) indeed reproduces the perturbative corrections (2.28), up to O(e −1/g 2 3 ) corrections. Unlike the (∇φ) 4 couplings (2.20) however, the latter also affect the constant term in the Fourier expansion with respect to the axions a I , as required by the quadratic source term in the differential equation (3.20). Such corrections can be ascribed to (NS5, KK, H-monopoles) instanton anti-instanton of vanishing total charge.
In the large radius limit, the ∇ 2 (∇φ) 4 coupling must reduce to the exact R 2 F 2 and ∇ 2 F 4 couplings in D = 4. Consistently with this expectation, we shall find that the asymptotic expansion of (1.7) in the limit R → ∞ takes the form ab,cd . (2.33) In the first line, G ab,cd predicts the exact R 2 F 2 and ∇ 2 F 4 couplings in D = 4, which are exhibited in (5.67),(5.70) below, and involve explicit modular functions of the axio-dilaton S, as well as genus-two and genus-one modular integrals for the lattice Λ m . These couplings are by construction invariant under the S-duality group Γ 0 (N ) and under Fricke duality.
The second line in (2.33) are the 1/2-BPS Fourier coefficients, weighted by a genus-one modular integralḠ cd (Q, P ; t) for the lattice orthogonal to Q, P given in (5.18), (5.46). This weighting is similar to that of 1/2-BPS contributions to the ∇ 4 R 4 coupling in maximal supersymmetric vacua [16], and is typical of Fourier coefficients of automorphic representations that do not belong to the maximal orbit in the wavefront set.
The third line corresponds to contributions from 1/4-BPS dyons, weighted by the modulidependent helicity supertrace, up to overall sign, C k−2 (Q, P ; t) = (−1) Q·P +1 Ω 6 (Q, P ; t) (2.34) whereas the fourth line corresponds to contributions from two-particle states consisting of two 1/2-BPS dyons that are discussed in detail in Appendices C and D. While the two contributions on the third and fourth line are separately discontinuous as a function of the moduli t, their sum is continuous across walls of marginal stability. In Appendix C we show the non-trivial fact, especially for CHL orbifolds, that for fixed total charge Γ, the sum involves all possible splittings Γ 1 + Γ 2 , weighted by the respective helicity supertraces (2.22). This complements and extends the consistency checks on the helicity supertrace formulae [29] to arbitrary charges. Moreover, we show in Appendix E that these contributions are consistent with the differential constraint (2.26). The 1/4-BPS Abelian Fourier coefficients of the nonperturbative coupling are the main focus of this paper, and the results are discussed in detail in section 5.3. The first term G ab,cd M 1 on the last line corresponds to non-Abelian Fourier coefficients of order e −R 2 , ascribable to Taub-NUT instantons of charge M 1 . We compute them in Appendix §G by dualizing the Fourier coefficients in the small coupling limit g 3 → 0 computed in §4, rather than by evaluating them directly from the unfolding method.
Finally G (IĪ) contains contributions associated to instanton anti-instantons configurations, which are not captured by the unfolding method but are required by the quadratic source term in the differential equation (2.26). This includes O(e −R ) and O(e −R 2 ) contributions to the constant term, which are independent of the axions a 1 , a 2 , ψ, and contributions of order O(e −R 2 ) to the Abelian Fourier coefficients, which depend on the axions a 1 , a 2 as e 2πi(a 1 ·Q+a 2 ·P ) but are independent of ψ. The latter can be ascribed to Taub-NUT instanton-anti-instantons, and are necessary in order to resolve the ambiguity of the sum over 1/4-BPS instantons [48], which is divergent due to the exponential growth of the measureC k−2 (Q, P ; Ω ⋆ 2 ) ∼ (−1) Q·P +1 e π|Q∧P | . We do not fully evaluate G (IĪ) in this paper, but we identify the origin of the O(e −R 2 ) corrections as coming from poles of 1/Φ k−2 which lie 'deep' in the Siegel upper-half plane H 2 and do not intersect the fundamental domain, becoming relevant only after unfolding. While the precise contributions can in principle be determined by solving the differential equation (2.26), it would be interesting to obtain them via a rigorous version of the unfolding method which applies to meromorphic Siegel modular forms.
In §6, we discuss other pertubative expansions of the exact result (1.7), in the dual type I and type II pictures. In either case, the perturbative limit is dual to a large volume limit on the heterotic side, where either the full 7-torus (in the type I case) of a 4-torus (in the type II case) decompactifies. We find that the corresponding weak coupling expansion is consistent with known perturbative contributions, with non-perturbative effects associated to D-branes, NS5-branes and KK-monopoles wrapped on supersymmetric cycles of the internal space, T 7 in the type I case, or K3 × T 3 on the type II case.

Supersymmetric Ward identities
In this section, we establish the supersymmetric Ward identities (3.16)- (3.20), from linearized superspace considerations, and show that the genus-two modular integral (2.30) obeys this identity.

∇ 2 (∇Φ) 4 type invariants in three dimensions
This analysis is a direct generalization of the one provided in [22, §3]. We shall define the linearised superfield Wâ a of half-maximal supergravity in three dimensions that satisfies to the constraints [49,50,51] (4)) parametrizing a Spin (8) group element u r 1 i , u r 2 r 3 i , u r 1 i in the Weyl spinor representation of positive chirality [52], where the r A indices for A = 1, 2, 3 are associated to the three SU (2) subgroups of SU (2) 1 × Spin(4) = SU (2) 1 × SU (2) 2 × SU (2) 3 . The harmonic variables parametrize similarly a Spin(8) group element u r 3â , u r 1 r 2â , u r 3â in the vector representation and a group element u r 2î , u r 3 r 1î , u r 2î in the Weyl spinor representation of opposite chirality. They satisfy the same relations as (3.2) upon permutation of the three SU (2) A . The superfield W r 3 a ≡ u r 3â Wâ a then satisfies the G-analyticity condition One can obtain a linearised invariant from the action of the twelve derivatives D αr 1 ≡ u r 1 i D i α and D r 2 r 3 α ≡ u r 2 r 3 i D i α on any homogeneous function of the W r 3 a 's. The integral vanishes unless the integrand includes at least the factor W 1 such that the non-trivial integrands are defined as the homogeneous polynomials of degree 4 + 2n + m in W r 3 a in the representation of SU (2) isospin m/2 and in the SL(p, R) ⊃ SO(p) representation of Young tableau [n + 2, m] (n + 2 rows of two lines and m of one line) that branches under SO(p) with respect to all possible traces. After integration, the resulting expression is in the same representation of SO(p) and in the irreducible representation of highest weight mΛ 1 + nΛ 2 of SO(8), i.e. the traceless component associated to the Young tableau [n, m], with Λ 1 , Λ 2 denoting two fundamental weights.
It follows that the non-linear invariant only depends on the scalar fields through the tensor function F ab,cd and its covariant derivatives D n F ab,cd and covariant densities L [n,m] in the corresponding irreducible representation of highest weight mΛ 1 + nΛ 2 of SO(8) that only depend on the scalar fields through the covariant fields (3.4) and the dreibeins and the gravitini fields, and where P ab ≡ dp Rb I η IJ p La J , ω ab ≡ −dp La I η IJ p Lb J , ωâb ≡ dp Râ I η IJ p Rb J , (3.5) are defined from the Maurer-Cartan form of SO(p, 8)/(SO(p) × SO (8)). Using the known structure of the t 8 tr∇ µ F ∇ µ F trF F invariant in ten dimensions [47], 5 one computes that the first covariant density L [0,0] bosonic component is The factor of π is introduced by convenience for the definition (2.30) to hold. Investigating the possible tensors one can write in this mass dimension, one concludes that the tensor densities L [n,m] are only non-zero for 0 ≤ n ≤ 2 and 0 ≤ m ≤ 4 and the density L [2,4] ∼ χ 12 with open SO(p) indices in the symmetrization . The invariant admits therefore the decomposition where the L Checking the supersymmetry invariance (modulo a total derivative) of L in this basis, one finds that there is no term to cancel the supersymmetry variation δF ab,cd = ǫ i (Γf ) i χ e D ef F ab,cd (3.8) of the tensor F ab,cd and of its derivative when three open SO(p) indices are antisymmetrized, hence the tensor F ab,cd must satisfy the constraints Therefore, the tensor F ab,cd must obey an equation of the form (3.12) for some numerical constants b 1 , b 2 which are fixed by consistency. In particular the integrability condition on the component antisymmetric in e and f implies b 1 = 4 − 3b 2 . Before determining the constants b i , it is convenient to generalize F ab,cd to a tensor F (p,q) ab,cd on a general Grassmanian G p,q , which would arise by considering a superfield in D = 10 − q dimensions with 4 ≤ q ≤ 6, with harmonics parametrizing SO(q)/(U (2)×SO(q −4)) [53]. The same argument leads again to the conclusion that F (p,q) ab,cd satisfies to (3.12) with b 1 = q 2 − 3b 2 . Equivalently, these constraints follow from the general Ansatz preserving the symmetry of the indices ab, cd and the two first equations in (3.9). An additional integrability condition comes from the equation which is indeed consistent, if and only if b 2 = 1 2 and so b 1 = q−3 2 so that (3.12) reduces to (3.14) Alternatively, one can represent a tensor with the symmetry with two pairs of indices that are manifestly symmetric, i.e. G ab,cd = G ba,cd = G ab,dc = G cd,ab such that G (ab,c)d = 0, such that The tensor G ab,cd satisfies the constraints and The discussion so far only applies to a supersymmetry invariant modulo the classical equations of motion, whereas one must take into account the first correction in (∇Φ) 4 . The direct computation of this correction via supersymmetry invariance at the next order is extremely difficult, however, one can determine its form from general arguments. The modification of the supersymmetry Ward identities implies that the corrections to the differential equations must be an additional source term quadratic in the completely symmetric tensor F (p,q) abcd defining the (∇Φ) 4 coupling. This correction should preserve the wave-front set associated to the original homogeneous solution, so it is expected that (3.16) is not modified, while the second order equation (3.17) admits a source term quadratic in F (p,q) abcd and consistent with (3.16). Inspection of the various possible tensor structures shows that there is indeed no possible correction to (3.16), because F (p,q) abcd satisfies itself Equation (3.17) admits the symmetry associated to the Young tableaux and , however it is easy to check that the latter is trivially satisfied ab,cd reads where ̟ is an undetermined numerical coefficient at this stage. In §3.3 we shall show that the genus-two modular integral (2.30) satisfies this equation with ̟ = π. Let us note that this discussion only applies to the Wilsonian effective action. As we shall see in section B.2.4, the differential Ward identity satisfied by the renormalized couplinĝ G ab,cd appearing in the 1PI effective action is expected to be corrected in four dimensions (q = 6) by constant terms and by terms linear inF abcd .
Because of the quadratic source term in (3.20), the tensor G ab,cd does not belong strickly speaking to an automorphic representation of SO(p, q). One can nonetheless define a generalization of the notion of automorphic representation attached to this tensor. The linearised analysis exhibits that the homogeneous differential equation is attached to the SO(p, q) representation associated to the nilpotent orbit of partition [3 2 , 1 p+q−6 ] such that the nilpotent elements Z ab ∈ so(p + q)(C) ⊖ (so(p)(C) ⊕ so(q)(C)) satisfy the constraint (cf. (3.9), (3.12)) For a representative of the nilpotent orbit in the unipotent associated to the maximal parabolic which admits a subspace of solutions of dimension 2 and a subspace of 6 The unipotent being non-Abelian for k ≥ 2, one cannot generally define the Fourier coefficients for (Q m i , Kij ), but one must consider separately the Abelian Fourier coefficient with Kij = 0, from the non-Abelian Fourier coefficients with Kij and a subset of the charges Q m i defining a polarization.
, and therefore a Kostant-Kirillov dimension 2(p+q −4)+1 that is exactly saturated by the Fourier coefficients in the maximal parabolic decomposition with k = 2.
The tensor F abcd is instead in an automorphic representation associated to the nilpotent orbit of partition [3, 1 p+q−3 ] such that the nilpotent elements Z ab ∈ so(p + q)(C) ⊖ (so(p)(C) ⊕ so(q)(C)) satisfy the constraint For a representative of the nilpotent orbit in the unipotent associated to the maximal parabolic this gives the constraints which admits a subspace of solutions of dimension p , and therefore a Kostant-Kirillov dimension p + q − 2 that is exactly saturated by the Fourier coefficients in the maximal parabolic decomposition with k = 1. One easily checks that the sum of two generic elements (Q m i , K ij ) solving (3.24) always solve (3.22), so that the quadratic source in F abcd sources the Fourier coefficients of the tensor G ab,cd consistently with the automorphic representation associated to the nilpotent orbit of partition It is important to note that the 1/4-BPS black hole solutions (single-centered and multicentered) are solutions of the Euclidean three-dimensional non-linear sigma model over O(2k, 8) /(O(2k) × O(8)) which are themselves associated to a real nilpotent orbit of O(2k, 8) of partition [3 2 , 1 2+2k ] [54,55]. This is consistent with the property that the Fourier coefficients in the maximal parabolic decomposition GL(2)×O(2k −2, 6)⋉R 2(4+2k)+1 saturate the Kostant-Kirillov dimension and are proportional to the helicity supertrace associated with these black holes.

R 2 F 2 type invariants in four dimensions
In four dimensions, there are two distinct classes of six-derivative supersymmetric invariants. In the linearised approximation, they are defined as harmonic superspace integrals of Ganalytic integrands annihilated by a quarter of the fermionic derivatives, and can be promoted to non-linear harmonic superspace integrals [56]. The first class of invariants is the one defined in the preceding section for q = 6. It includes a G (2k−2, 6) ab,cd ∇(F aF b )∇(F cF d ) coupling with a tensor G (2k−2, 6) ab,cd satisfying to (3.16) and (3.20). The second class of invariants is defined as a chiral harmonic superspace integral at the linearised level, as we now explain.
In four dimensional supergravity with half-maximal supersymmetry, the linearised Maxwell superfield Wâ a ∼ W ija satisfies the constraints whereas the chiral scalar superfield satisfies with i = 1 to 4 of SU (4) and α,α the SL(2, C) indices. The chiral 1/4-BPS linearised invariants are defined using harmonics of SU (4)/S(U (2)×U (2)) parametrizing a SU (4) group element u r i , ur i with r andr the indices of the two respective SU (2) subgroups. The superfield W 34a ≡ u 3 i u 4 j W ija = 1 2 εrŝur i uŝ j W ija then satisfies the G-analyticity constraints One can obtain a linearised invariant from the action of the eight derivatives D αi and the four derivativesD rα ≡ u i rDiα on any homogeneous function of the G-analytic superfields W 34a and S. Using for short u 34 a = (Γâ) ij u i 3 u j 4 and the projection (â 1 . . .â n ) ′ on the traceless symmetric component, one gets [n]+m are symmetric tensors that only depend on the scalar fields through their derivative. One works out in particular that L (0)ab +2 includes a term of type R 2 F 2 as with C αβγδ the complex Weyl curvature tensor (which we denote schematically by R), whereas the highest monomials only depend on the fermion fields as is of U (1) weight −2, so one can anticipate that it must be multiplied by a modular form of weight 2 at the non-linear level. At the non-linear level, derivatives of the scalar fields only appear through the pull-back of the right-invariant form P ab over the Grassmanian and the covariant derivative (S −S) −1 ∂ µ S of the upper complex half plan field S. One defines in the same way the covariant derivative D ab on the Grassmanian and the Kähler derivative D = (S −S) ∂ ∂S + w 2 on a weight w form. According to the linearised analysis, the supersymmetry invariant is associated to a tensor G ab (φ, S), holomorphic in S and function of the Grassmanian coordinates φ.
Due to the superconformal symmetry P SU (2, 2|4) of the linearised theory in four dimensions, the non-linear invariants are in bijective correspondance with the linearised invariants, themselves determined by harmonic superspace integrals. However, the linearised invariants that combine to define a general class of non-linear invariants are not necessarily defined from the same harmonic superspace. The general ∇ 2 F 4 type invariants defined in the preceding section are determined by vector-like harmonic superspace integrals of SU (4)/S(U (1) × U (2) × U (1)). In contrast the R 2 F 2 type invariants described in this section involve both structures, such that the defining function G ab (φ, S) is of weight zero, and the terms in the Lagrangian that do not involve its Kähler derivative D are defined at the linearised level from SU (4)/S(U (1)×U (2)×U (1)) harmonic superspace integral of a restricted type. These invariants are constructed explicitly in [56] for a SO(p) invariant function on the Grassmannian. One finds that G ab (φ, S) must be holomorphic in S, as the linearised analysis suggested. It defines a Lagrange density L that decomposes naturally as . . .
[n]+m are SL(2) × O(2k − 2, 6) invariant polynomial functions of the covariant fields and their derivatives and the vierbeins and the gravitini fields. Because non-linear invariants induce linear invariants by truncation to lowest order in the fields (3.4), the covariant densities L [n+2] [n]+m reduce at lowest order to homogeneous polynomials of degree n+2 in the covariant fields (3.4) that coincide with the linearised polynomials L (0)[n+2] [n]+m for m ≥ 2. For m = 0, the linearised invariants L (0)[n+2] [n] are the real analytic superspace integrals described in the preceding section [n + 2, m] for n = 0, and where indices are contracted with δ ab to reduce the representation from the Young Tableau [2, m] to [0, m + 1]. The analysis of the invariant defined as a non-linear harmonic superspace integral indeed shows that the component L ab is of the type The complete invariant is the real part of this complex invariant. So the four-photon MHV amplitude gives a contribution to the Wilsonian effective action in G ab (φ, S) + G ab (φ,S), whereas the amplitude with two gravitons of positive helicity and two photons of negative helicity gives a contribution in DG ab (φ, S). Because DG ab (φ,S) = 0, we will usually refer to a single function G (0) ab (φ, S,S) = G ab (φ, S) + G ab (φ,S). Similarly to [22], one can show that supersymmetry at the linearised level implies tensorial differential equations of the form with q = 6, where the coefficients of the two terms on the right-hand side have been fixed by requiring that these constraints are integrable.
As in the preceding section, this linearized analysis does not take into account the lower order corrections in the effective action and the local terms coming from the explicit decomposition of the effective action into local and non-local components. The coefficient F abcd (ϕ) of the F 4 coupling and the real coefficient E(S) of the R 2 coupling give rise to source terms in these differential equations, such that we get eventually Finally, let us note that the same class of harmonic superspace integrals (3.28) produces higher derivative invariants by integrating instead (3.36) This gives rise to chiral 1/4-BPS-protected invariants of the same class, including couplings of the form Here C is the Weyl tensor and G (2p) (S, ϕ) is a rank 2p SO(6) symmetric traceless tensor, which is a weight 2p + 4 weakly holomorphic modular form in S. It satisfies to a hierarchy of differential equations on the Grassmannian [57] On the type II side these couplings can be computed in topological string theory [58].

The modular integral satisfies the Ward identities
In this subsection, we shall prove that the modular integral G (p,q) ab,cd = R.N.
satisfies the differential equations (3.16) and (3.20), with a specific value of the coefficient ̟ in the quadratic source term. Here, Φ k−2 (Ω) is the meromorphic Siegel modular form defined in (A.33), and Γ (2) Λp, q [P ab,cd ] is the genus-two partition function (2.32) for a level N even lattice of signature (p, q), with an insertion of the quartic polynomial P ab,cd defined in (2.31). Since Φ k−2 and Γ (2) Λp, q [P ab,cd ] are modular forms of weight k − 2 and p−q 2 + 2 = k − 2 under Γ 2,0 (N ), the integrand is well defined on the quotient Γ 2,0 (N )\H 2 . The symbol R.N. refers to a regularization procedure which is necessary to make sense of the integral when q ≥ 5, as discussed in Appendix B.2.4.
In order to derive these results, we shall first establish differential equations for the general class of genus-two Siegel theta series Γ (2) Λp, q [P ], where the polynomial P (Q) is obtained by acting on a homogeneous polynomial of bidegree (m, n) in (ε rs Q r L Q s L , ε rs Q r R Q R ) s respectively, with the operator |Ω 2 | n e − ∆ 2 8π , where ε rs is the rank-two antisymmetric tensor with ε 12 = 1 and ∆ 2 is the second order differential operator Under this condition, one can show using Poisson resummation that Γ (2) Λp, q [P ] satisfies which implies that Γ (2) Λp, q [P ] transforms as a modular form of weight p−2 2 + m − n under Γ 2,0 (N ). For our purposes, it will be sufficient to focus on polynomials of the form, using  Acting with D eĝ on (2.32) we get where (Q L,e Ω 2 Q R,ĝ ) = (Ω 2 ) rs Q r La Q s Rĝ is a short notation that will be used in the following. It will prove useful to compute the commutation relations Note that the derivation rules ensure that the constraints (3.16) are automatically satisfied at the level of the integrand, from the structure of (3.42) with n = 0. Antisymmetrizing (3.50) with n = 0, one obtains which thus establishes (3.16). Note that these properties are independent of the details of the function 1/Φ k−2 (Ω). Now, the main equation (3.20) arises by applying the quadratic operator D 2 ef ≡ D (eĝ D f )ĝ on the lattice partition function with polynomial insertion, and commuting with the summation measure e iπQ L ΩQ L −iπQ RΩ Q R of the partition function (3.53) Using the commutation relations (3.46), one can re-express it to make modular invariance explicit 8π P , (3.54) and notice that all the terms in (3.54) except the first and last one will become linear tensorial combinations of the original partition function Γ (2) Λp, q [P ]. The first term on the r.h.s of (3.54) can be rewritten as the action of the lowering operator for Siegel modular forms, which take a weight w representation sym l modular form to a weight w − 2 representation sym 2 ⊗ sym l modular form [59]. Indeed, 8π P , (3.56) and the r.h.s. of (3.54) can thus be written as The third line contains contributions from partition functions with more or fewer momentum insertions, respectively, and the fourth line is to be computed explicitly. We now specialize to the case of interest and obtain where the operator ∆ ef is defined as Let us now return to the modular integral (3.39). In order to regularize the infrared divergences which arise when q > 5 (discussed in more detail in Appendix B.2.4), it is useful to first fold the integration domain Γ 2,0 (N )\H 2 onto the fundamental domain F 2 = Sp(4, Z)\H 2 , and restrict the latter to truncated fundamental domain excising both the non-separating degeneration at Ω 2 = i∞ and the separating degeneration at v = 0. We thus define The renormalized integral (3.39) is defined as the limit of (3.61) as Λ → ∞, η → 0, possibly after subtracting divergent terms. Acting with the operator ∆ ef and using (3.58) one obtains To compute the boundary term, we use Stokes' theorem in the form where f rs and g are modular form of Γ 2,0 (N ) respectively of weight w and representation sym 2 , and weight w ′ = 2 − w and trivial representation. The differential operator ∂Ω commutes with factors of Ω 2 because of the natural connectionD rs . Then, sinceD rs 1/Φ k−2 = 0 by holomorphicity, we obtain that the r.h.s. of (3.62) reads −2π The contributions from the Λ-dependent boundary of F 2,Λ,η lead to powerlike terms in Λ, which cancel in the renormalized integral, except for q = 5 or q = 6 where these divergent terms become logarithmic and are responsible for an anomalous term in the differential equation. These anomalous terms are computed in §B.2.5 and will be displayed in the final result below. Here we focus on the contribution from the boundary at |v| = η due to the pole of the integrand at v = 0, which is cut-off independent for any q and can be computed using Cauchy's theorem.
To compute the residue at v = 0, recall that the function 1/Φ k−2 has a second order pole at v = 0 (cf. (A.44)) and behaves as Φ k−2 ∼ (2πiv) 2 . The only cosets γ preserving the pole at v = 0 are those in γ ∈ (Γ 0 (N )\SL(2, Z)) ρ × (Γ 0 (N )\SL(2, Z)) σ . Adding up these contributions, we find that the residue of the integrand at v = 0 is (3.65) Near the boundary at |v| = η, the fundamental domain F 2,Λ,η reduces to F 1 (ρ)×F 1 (σ)×{|v| > η}/Z 2 × Z 2 where the first Z 2 exchanges ρ and σ while the second sends v → −v. Thus, the sum in (3.65) factorizes into two genus-one integrands, leading to where the dots denote contributions from the Λ-dependent boundary, discussed in detail in Appendix B.2.4, while F (p,q) abcd (Λ) is the genus-one regularized modular integral This establishes (3.20) with ̟ = π. We show in Appendix B.2.5 that the divergent terms from the Λ-dependent boundary of F 2,Λ,η combine consistently such that the renormalised coupling satisfies the same differential equation (3.20), but for q = 5 or q = 6, for which one gets additional linear source terms. For the perturbative string alplitude, υ = N , the additional source term vanishes for q = 5, and for q = 6 it can be ascribed to the mixing between the analytic and the non-analytic parts of the amplitude. In this case one obtains (B.97) where ∆ ef was defined in (3.59).

Weak coupling expansion of exact ∇ 2 (∇φ) couplings
In this section, we study the asymptotic expansion of the proposal (1.5) in the limit where the heterotic string coupling g 3 goes to zero, and show that it reproduces the known tree-level and one-loop amplitudes, along with an infinite series of NS5-brane, Kaluza-Klein monopole and H-monopole instanton corrections. For the sake of generality, we analyze the family of modular integral G (p,q) ab,cd = R.N.
for a level N even lattice Λ p,q of arbitrary signature (p, q), in the limit near the cusp where , so that the moduli space decomposes into  In this subsection we assume that the lattice Λ p,q is even self-dual and factorizes in the limit (4.2) as Λ p,q → Λ p−1,q−1 ⊕ II 1,1 . We shall denote by R the coordinate on R + , ϕ the coordinates on G p−1,q−1 and by a I , I = 1 . . . p+q−2 the coordinates on R p+q−2 . The variable R > 0 parametrizes a one-parameter subgroup e RH 0 in O(p, q), such that the action of the non-compact Cartan generator H 0 on the Lie algebra so p,q decomposes into while the coordinates a I parametrize the unipotent subgroup obtained by exponentiating the grade 2 component in this decomposition. The lattice vectors are now labelled according to the choice of A-cycle on the genus-two Riemann surface. They thus take value take value in double copy of the original lattice Λ p,q ⊕ Λ p,q . Thus, the generic charge vector (Q 1 I , where (n 1 , n 2 , m 1 , m 2 ) ∈ II 1,1 ⊕ II 1,1 and ( Q 1 I , Q 2 I ) ∈ Λ p−1,q−1 ⊕ Λ p−1,q−1 , such that Q r · Q r = −2m r n r + Q r Q r (with no summation on r). The orthogonal projectors defined by Q r L ≡ p I L Q r I and Q r R ≡ p I R Q r I decompose according to where p I L,α , p I R,α (α = 2 . . . q + 16,α = 2 . . . q) are orthogonal projectors in G p−1,q−1 satisfying In the following, we shall denote | Q r R | ≡ p I R,α p Jα R Q r I Q r J . To study the behavior of (4.1) in the limit R ≫ 1, it is useful to perform a Poisson resummation on the momenta (m 1 , m 2 ). For a lattice partition function Γ (2) Λp, q with or without insertion, we must distinguish whether the indices lie along the direction 1 or along the directions α. The result can be obtain by applying the corresponding derivative polynomial with respect to (y r,1 , y r,α ) to the following partition function Γ (2) Λp, q e 2πiya· Q a + π where we denote the winding and momenta doublets n = (n 1 , n 2 ), m = (m 1 , m 2 ), and we use Einstein summation convention for indices I = 1, . . . , p + q − 2 and α = 2, . . . , p. In this representation, modular invariance is manifest, since a transformation Ω → (AΩ + B)(CΩ + D) −1 (A.2) can be compensated by a linear transformation (n, m) → (n, m) D ⊺ −B ⊺ −C ⊺ D ⊺ , y 1 → y 1 · (CΩ + D), under which the third line of (4.7) transforms as a weight p−q 2 modular form. We can therefore compute the integral using the orbit method [60,61,62,63,64], namely decompose the sum over (n, m) into various orbits under Sp(4, Z), and for each orbit O, retain the contribution of a particular element ς ∈ O at the expense of extending the integration domain F 2 = Sp(4, Z)\H 2 to Γ ς \H 2 , where Γ ς is the stabilizer of ς in Sp(4, Z). The integration domain is unfolded according to the formula γ∈Γς \Sp(4,Z) where one must take into account that −1 ∈ Sp(4, Z) acts trivially on H 2 . The coset representative ς ∈ O, albeit arbitrary, is usually chosen so as to make the unfolded domain Γ ς \H 2 as simple as possible. In the present case, there are two types of orbits: The trivial orbit (n, m) = (0, 0, 0, 0) produces, up to a factor of R 2 , the integrals (4.1) for the lattice Λ p−1,q−1 , provided none of the indices ab, cd lie along the direction 1, while it vanishes otherwise.
The integral over σ 1 is trivial while the integral over u 1 , u 2 is computed using (A.72), where E 2 (ρ) = E 2 (ρ) − 3 πρ 2 is the non-holomorphic completion of the weight 2 Eisenstein series. The contributions with Q 2 = 0 therefore lead to the integral (after exchanging the order of sum and integral) and G (p,q),1,0 αβ,γ1 = 0. Note that they are the only components by symmetry of the indices ab, cd. Here G (p,q) ab is the genus-one modular integral defined in (2.29) with N = 1 and ξ(s) = π −s/2 Γ(s/2)ζ(s) = ξ(1 − s) is the completed Riemann zeta function.
The missing constant term: It is clear from the differential equation (3.20) that (4.17) does not give all the power-like terms: indeed, the coupling F (p,q) appearing on the r.h.s. of (3.20) behaves schematically in the same limit as [22, (4.37)] (4.18) The power-like terms (4.17) can be checked to satisfy the differential constraint with the source term R q−5 F (p−1,q−1) appearing in the square of F (p,q) , but the accompanying source term ξ(q − 6) 2 R 2q−12 requires that G (p,q) ab,cd should also include a term proportional to R 2q−12 . We shall now argue that these terms originate from the intersection of the separating and non-separating degenerations described by the figure-eight supergravity diagram depicted in Figure 1ii). In the region |Ω 2 | ≫ 1, the fundamental domain asymptotes to the domain where Ω 2 parametrizes the first factor. In the case where all external indices are along the subgrassmaniann, the dominant contributions in this limit have Q 1 = Q 2 = 0 and vanishing winding number (n 1 , n 2 ) along the circle. The sum over dual momenta (m 1 , m 2 ) running in the two loops leads to Using (A.90), the integral over Ω 1 leads to a delta function supported at v 2 = 0 and its images under the action of GL(2, Z) (modulo the center). After unfolding, the remaining integral then factorizes into two integrals over ρ 2 and σ 2 . Assuming that this contribution is accurately computed by this integral by extending the integration domain of ρ 2 and σ 2 to R + , one obtains the correct power-like term where the second line -the other non-vanishing polarization -can be deduced in a similar fashion. While the power-like terms (4.20) are not captured by the unfolding trick in the degeneration (p, q) → (p−1, q −1), we shall be able to recover them below from the degeneration (p, q) → (p − 2, q − 2), see (5.26).
The fact that the unfolding method does not give the full result is seemingly due to the non-absolute convergence of the integral near the separating locus. In principle, the missing contributions can be determined by checking the differential equation (3.20). In Appendix E.4 we derive the contributions (4.20) rigorously in this fashion. The same analysis also implies that there exists additional exponentially suppressed corrections to the constant term due to instanton-anti-instanton contributions. For what concerns non-trivial Fourier coefficients, we shall argue in §5.1 (and specifically in Appendix E.1) that the unfolding method is in fact reliable.
Exponentially suppressed corrections: Contributions from non-zero vectors Q 2 lead to exponentially suppressed contributions, which depend on the axions through a phase factor e 2πika I Q 2I . Each Jacobi form ψ m (ρ, v) in (4.14) can be decomposed as the sum of a finite and polar contributions, ψ m = ψ P m + ψ F m (see §A.5), where ψ F m is an almost holomorphic Jacobi form, and ψ P m is proportional to a completed non-holomorphic Appell-Lerch sum. For m = −1, the finite part vanishes and the polar part requires special treatment. In either case, the integral over σ 1 enforces Q 2 2 = −2m. We first treat the finite contributions ψ F m (ρ, v) with m ≥ 0 according to whether Q 2 2 = 0 or Q 2 2 = 0, and then consider the polar contributions: 1. In the case Q 2 2 = 0, since ψ F 0 = c(0) E 2 12∆ and does not depend on v, the integral over u 1 receives only contributions from vectors Q 1 such that Q 1 · Q 2 = 0. To express the remaining sum, we choose a second null vector Q ′ 2 such that ( Q 2 , Q ′ 2 ) = m 2 , where m 2 , which we also denote by gcd( Q 2 ), is the largest integer such that 1 m 2 Q 2 ∈ Λ p−1,q−1 . The vectors Q 1 orthogonal to Q 2 are then of the form We denote the resulting lattice by Λ p−2,q−2 . This parametrization is not unique, but the result of the integral will be independent of the choice of Q ′ 2 , in other words it is a function of the Levi subgroup of the stabilizer of Q 2 inside O(p − 1, q − 1). The sum over Q 1 therefore becomes a sum over Q ⊥ 1 ∈ Λ p−2,q−2 and m 1 = m 2 s + r, s ∈ Z , r ∈ Z m 2 . The sum over s can be used to unfold the integral over u 2 ∈ [− 1 2 , 1 2 ] to the full R axis, as one can see from (4.12), while the dependence on r can be absorbed by a translation in u 2 and therefore leads to an overall factor m 2 . The integral thus becomes, for a given null vector . (4.21) The Gaussian integral over u 2 removes the dependence on the unipotent part of the stabilizer of Q = k Q 2 , leaving a modular integral of a genus-one partition function G (p−1,q−1)⊥ αβ ,0 for the lattice Λ p−2,q−2 depending only on the sub-Grassmaniann G p−2,q−2 ⊂ G p−1,q−1 parametrizing the Levi component of this stabilizer, given by where we write Q 1 as Q for simplicity. Note that the integrand only depends on Q through , and so is invariant under Q → Q + ǫQ for any ǫ ∈ R such that the sum is defined on the quotient lattice Λ p−1,q−1 mod Q gcd(Q) with the constraint Q · Q = 0, and does not depend on the specific choice of Λ p−2,q−2 .
We find that the Fourier coefficient with charge Q ∈ Λ p−1,q−1 {0} for Q 2 = 0, is given by The full expression for all polarizations will be given together with the polar contributions in (4.44).
2. In the case Q 2 2 < 0, the finite part of the Fourier-Jacobi coefficient has the following expansion in theta series where θ m,ℓ and h m,ℓ are vector-valued modular forms of weight 1/2 and 3/2, respectively defined in (A.62) and (A.67). The integral over σ 1 enforces Q 2 2 = −2m, while the integral over u 1 enforces Q 1 · Q 2 = −ℓ. The summation over s ∈ Z in (A.62) can be used to unfold the integral over u 2 ∈ [− 1 2 , 1 2 ] to the full real axis, after shifting each term in the lattice sum as One thus obtain Fourier coefficients similar to previous case, using when all the indices are chosen along the sub-Grassmanian, whereP (4.30) The latter satisfies Vignéras' equation where ·, · is the inverse of the integer norm on the lattice Λ p−1,q−1 , which ensures [65] that (4.29) is a vector-valued modular form of weight p−q+5 2 = 21 2 , consistently with the weight of 3/2 of h m,ℓ (ρ) (note that the condition Q·Q = 0 in the sum of (4.29) implies that the lattice over whichQ is summed is of dimension p + q − 3). The analogue expression for other polarizations will be given along with the polar contributions in (4.44).
3. Let us now consider the contributions arising from the polar part ψ P m of the Fourier-Jacobi coefficient ψ m with m ≥ 0. According to (A.69), the latter can be written as an indefinite theta series As in the previous case, one can shift the charges to Q 1 → Q 1 + s Q 2 since Q 1 , Q 2 ∈ Λ p−1,q−1 , and then use the sum over s to unfold the One then carries out the change of variable One obtains the Fourier coefficients, using when all indices are chosen along the sub-Grassmanian, and where we define for Q 2 < 0 with the kernel Using integration by part over u one computes that φ P, αβ (x, Q) satisfies the Vignéras equation therefore the lattice sum in (4.37) is a modular form of weight p−q 2 + 4, and the integral is well defined. For Q 2 = 0, one has instead The integrand in (4.40) must be modular by construction, but its modularity does not follow directly from Vignéras theorem. In this case φ P, αβ (x, Q) satisfies Vignéras equation (4.39), but it is a distribution and its second derivative is not square integrable. The function φ ′⊥ P,αβ (x, Q) satisfies Vignéras equation (4.31), but this is not the correct eigenvalue to give the correct modular weight. As the failure of φ P, αβ (x, Q) to define a modular form comes from its singularity at (Q · x) = 0, it is somehow natural that its modular anomaly can be compensated by a partition function on the lattice orthogonal to Q.
4. Finally, the case m = −1 requires special treatment. The finite part of ψ −1 automatically vanishes, but the polar part is proportional to a modified Appell-Lerch sum, as explained in Appendix A.5, which differs from the naive Appell-Lerch sum (which diverges when the index is negative) by a replacement signℓ → sign(ℓ − 2s). In this case we still get (4.40) with Although the modularity of (4.43) no longer follows from Vignéras' theorem, it must hold by construction.
Combining the finite and polar contributions, we finally obtain the full expressions for the exponentially suppressed corrections, where the polynomialsP αβ is defined bȳ
For the function G (p,q),1 ab,cd , changing y variables as before (y ′ 11 , y ′ 21 , y ′ 1α , y ′ 2α ) = (y 11 , y 11 u 2 − y 21 , y 1α , y 1α u 2 − y 2α ), the sum of the two classes of orbits then reads As before, we substitute 1/Φ k−2 by its Fourier-Jacobi expansion 1/Φ k−2 = m≥−1 ψ k−2,m e 2πimσ , so that the integral over σ 1 enforces Q 2 2 = −2m. For Q 2 2 = 0 case, the integral over u 1 , u 2 in the first line follows from (A.73), is a level-N weight 2 holomorphic modular form. The contribution from the second line in (4.53) is calculated using the transformation properties of the genusone cusp form and partition function 9 . The transformation ρ → −1/ρ changes the integration domain from Γ 0 (N )\H 1 to Γ 0 (N )\H 1 , and one thus obtains, denoting The zero mode contribution, Q = 0, may be expressed in terms of the genus-one modular integrals ab (ς · ϕ). The zero mode Q = 0 thus leads to power-like terms As in the maximal rank case (4.20), the unfolding trick fails to capture another powerlike term proportional to R 2q−12 , which is required by the non-homogeneous differential equation (3.20). This term can be seen to arise in the maximal non-separating degeneration, and can be computed as in (4.19), leading to These results can also be obtained by taking the limit S 2 → ∞ from the result (5.60) obtained in the degeneration limit (p, q) → (p − 2, q − 2). The contributions from vectors Q = 0 lead to exponentially suppressed contributions of the same form as the Fourier modes of null vectors (4.23), non-null vectors (4.26), and the polar contribution (4.36) respectively, with different coefficients: 1. For null Fourier vectors Q 2 = 0, the moduli-dependent coefficient coming from the finite part of 1/Φ k−2 (Ω) reads 2. For non-null Fourier vectors, Q 2 = 0, the moduli-dependent coefficient coming from the finite part of 1/Φ k−2 (Ω) is given bȳ where we defined, similarly to ς G (p−1,q−1) F, αβ, 0 (Q), with Γ m,l αβ (Q) defined in (4.29).
Note that the polar part and the finite part of the functionḠ (p−1,q−1) αβ (Q, ϕ) combine for all Q into the same divisor sum of the function G (p−1,q−1) P αβ (Q) as in the maximal rank case (4.45). The only apparent difference is for the finite part of the function (4.61), because we defined the function (4.61) αβ (ϕ Q ) on the quotient of the sublattice of Λ p−1,q−1 orthogonal to Q by the shift in Q.

Perturbative limit of exact heterotic
According to our Ansatz (1.7), the exact ∇ 2 (∇φ) 4 coupling in three-dimensional CHL orbifolds is given by a special case of the family of genus-two modular integrals (4.1) for the 'nonperturbative Narain lattice' (2.3) of signature (p, q) = (2k, 8) = (2k, 8). The degeneration (4.2) studied in this section corresponds to the limit of weak heterotic coupling g 3 → 0. In this limit, the lattice Λ 2k,8 decomposes into Λ 2k−1,7 ⊕ II 1,1 [N ], where the 'radius' of the second factor is related to the heterotic string coupling by g 3 = 1/ √ R, and the U-duality group is . In order to interpret the various power-like terms in the large radius expansion as perturbative contributions to the ∇ 2 (∇φ) 4 coupling, it is convenient to multiply the coupling by a factor of g 6 3 , which arises due to the Weyl rescaling γ E = γ s /g 4 3 from the Einstein frame to the string frame [22,Sec 4.3]. The weak coupling expansion can be extracted from section 4.2 upon setting q = 8 and υ = 1, and reads αβ, The three first terms in (4.65) originate (in reverse order) from the trivial orbit (4.47), the rank one orbit (4.59), and the splitting degeneration contribution (4.60). By construction, the trivial orbit reproduces the two-loop contribution computed in (B.58). More remarkably, the rank one orbit matches the one-loop contribution (B.14), while the splitting degeneration contribution reproduces the tree-level ∇ 2 (∇φ) 4 , obtained by dimensional reduction of the ∇ 2 F 4 coupling in 10 dimensions. 10 The exponentially suppressed terms in the second line of (4.65) can be interpreted as instantons from Euclidean NS five-branes wrapped respectively on any possible T 6 inside T 7 , KK (6,1)-branes wrapped with any S 1 Taub-NUT fiber in T 7 , and H-monopoles wrapped on T 7 . One has similarly for the other components (4.44) αβ, and takes the form For the null charges Q 2 = 0, we write instead the finite contribution as In the maximal rank case N = 1, upon setting ς G (p,q) ab = G (p,q) ab and replacing c k (m) → c(m), k → 12 = c(0)/2, Eqs. (4.67) and (4.68) simplify tō It is important to note that the orbit method misses exponentially suppressed terms which do not depend on the axions a in the last line of (4.65). The existence of these terms is clear from the differential constraint (3.20), since the (∇φ) 4 coupling F abcd appearing on the right-hand side contains both instanton and anti-instanton contributions. Unfortunately, our current tools do not allow us to extract these contributions from the unfolding method at present. One could obtain them by solving the differential equation (E.51) for Q = 0.
Finally, it is worth stressing that while the perturbative contributions G (2k−1,7) ab and G (2k−1, 7) ab,cd have singularities in codimension 7 inside M 3 at points of enhanced gauge symmetry, the full instanton-corrected coupling (1.7) has only singularities in codimension 8. In Appendix B.3, we analyze the structure of the singularities for a general genus-two modular integral of the form (2.30) and find the expected one-loop and two-loop contributions with nearly massless gauge bosons running in the loops.

Large radius expansion of exact ∇ 2 (∇φ) 4 couplings
We now study the asymptotic expansion of the modular integral (1.7) in the limit where the radius R of one circle in the internal space goes to infinity. We show that it reproduces the known ∇ 2 F 4 and R 2 F 2 couplings in D = 4, along with an infinite series of O(e −R ) corrections from 1/2-BPS and 1/4-BPS dyons whose wordline winds around the circle, up to an infinite series of O(e −R 2 ) corrections with non-zero NUT charge, corresponding to Taub-NUT instantons. We start by analyzing the expansion of genus-two modular integral (2.30) for arbitrary values of (p, q), in the limit near the cusp where O(p, q) is broken to As in the previous section, we first discuss the maximal rank case N = 1, p − q = 16, where the integrand is invariant under the full modular group, before dealing with the case of N prime. The reader uninterested by the details of the derivation may skip to §5.3, where we specialize to the values (p, q) = (2k, 8) relevant for the ∇ 2 (∇φ) 4 couplings in D = 3, and interpret the various contributions arising in the decompactification limit to D = 4.
In this subsection we assume that the lattice Λ p,q is even self-dual and factorizes in the limit We denote by R, t, a Ii , ψ the coordinates for each factors in (5.1) (here i = 1, 2 and I = 3, . . . , p + q − 2). The coordinate R (not to be confused with the one used in §4) parametrizes a one-parameter subgroup e RH 1 in O(p, q), such that the action of the non-compact Cartan generator H 1 on the Lie algebra so p,q decomposes into while (a iI , ψ) parametrize the unipotent subgroup obtained by exponentiating the grade 1 and 2 components in this decomposition. We parametrize the SO(2)\SL(2, R) coset representative v µ i and the symmetric SL The remaining coordinates in G p−2,q−2 will be denoted by ϕ. As in the weak coupling expansion, lattice vector are labelled according to the choice of A-cycle on the genus-two Riemann surface. A generic charge vector (Q 1 In order to study the region R ≫ 1 it is useful to perform a Poisson resummation on the momenta m ri along II 2,2 ⊕ II 2,2 . Note that this analysis is in principle valid for a region containing R > √ 2. Insertion of momenta polynomials along the torus or the sublattice can be again obtained using an insertion of a auxiliary variables (y r,µ , y r,α ) where the sum over indices r = 1, 2 is implicit, we used Einstein summation convention for indices r = 1, 2, µ = 1, 2, i, j = 1, 2 and α = 3, ..., p, and where M ij is defined in (5.4).
In this representation, modular invariance is manifest since a transformation Ω → (AΩ + B)(CΩ + D) −1 can be compensated by a linear transformation n 1 m 1 n 2 m 2 → n 1 m 1 , under which the third line of (5.7) transforms as a weight p−q 2 modular form. We can therefore decompose charges (n i , m j ) into various orbits under Sp(4, Z) and apply the unfolding trick to each orbit: The trivial orbit (n i , m j ) = (0, 0) produces the integral (4.1) for the lattice Λ ⊕2 p−2,q−2 ≡ Λ p−2,q−2 ⊕ Λ p−2,q−2 , up to a factor R 4 , and vanishes if one of the indices ab, cd lies along 1, 2 Rank-one orbit This orbit consists of matrices (n i , m j ) = (0, 0) where (n 1 , m 1 ) and (n 2 , m 2 ) are collinear and not simultaneously vanishing. Such matrices can be decomposed can all be rotated to (0, 0, 0, ±1) by a Sp(4, Z) element, whose stabilizer is the central extension of the Jacobi group Γ J 1 (4.10), and are in one-to-one correspondence with elements of Γ J 1 \Sp(4, Z). Thus for each doublet (j, p) = (0, 0), one can unfold the integration domain Sp(4, Z)\H 2 to Γ J is derivative polynomial of order four defined in (4.13), and where the Fourier-Jacobi expansion of 1/Φ 10 is given eq.(4.14).
The integral over σ 1 picks up the Jacobi 15), and lead to power-like terms 11 where E ⋆ (s, S) is the completed weight 0 non-holomorphic Eisenstein series with ξ(2s) the reduced zeta function ξ(2s) = π −s Γ(s)ζ(2s) and D µν is the traceless differential operator on SL(2,R) SO(2) acting on S and defined in terms of raising and lowering operators of weight w as with σ ± = 1 2 (σ 3 ± iσ 1 ) and σ i the Pauli matrices. Non-zero vectors Q 2 lead to exponentially suppressed contributions, in a similar fashion as what described for the O(p, q) → O(p − 1, q − 1) limit, section 4.1. They depend on the axions through a phase factor e 2πim 2j Q 2I a Ij . In order to evaluate them, we insert the Fourier-Jacobi expansion (A.54) and decompose each ψ m (ρ, v) into its finite and polar parts. In either case, the integral over σ 1 imposes Q 2 2 = −2m. As in the previous section, we consider first the contributions of the finite part ψ F m (ρ, v), for null and non-null vectors, and then the contributions of the polar part ψ P m (ρ, v) 1. In the case Q 2 2 = 0, one can make the same decomposition as in section 4.1, using the constraint Q 1 · Q 2 = 0 from ψ F 0 (ρ). The integral then reads, for a given null vector Q 2 and 11 Note that (5.10) has a pole at q = 6 and q = 8, of which the first is substracted by the regularization prescription discussed in §B.2.4, and the second cancels against the pole from the trivial orbit contribution (5.8).
where gcd( Q 2 ) comes from unfolding the u 2 -integral that uses the component of ) (for further details, see (4.21)). We obtain the a one-loop integral on a sub- where ∆ k = ∆ in the case at hand. After defining Γ i = (Q, P ) = m 2i Q 2 , with support on 1/2-BPS states, and covariantizing the expression with the torus vielbein, we find that the Fourier coefficient with support where the polynomial P (l) in (4.23) is defined in appendix H.2, and and where we definedQ and the unique coprimes (j ′ , p ′ ) such that Γ = (Q, P ) = (j ′ , p ′ )Q.
The full expression for all polarizations will be given together with the polar contributions in (5.22).
The variable s ∈ Z in (A.62) can be used to unfold the integral over u 2 ∈ [− 1 2 , 1 2 ] to R, after shifting each term in the lattice sum as One thus obtain a Fourier coefficient similar to previous case, where we denoted, by extension, the function The full expression for all polarizations will be given together with the polar contributions in (5.22).
3. For the polar contributions, we use the representation One can then shift the charges to Q 1 → Q 1 + s Q 2 since Q 1 , Q 2 ∈ Λ p−2,q−2 , and then use the sum over s to unfold the u 2 ∈ [− 1 2 , 1 2 ] to R. Then, integrating over Here (j ′ , p ′ ) are coprimes such that Γ = (j ′ , p ′ )Q, and where we used the automorphic tensor G (p,q) P, ab (Q, ϕ) defined in (4.37). Note that the expression above is identical to (5.18), but expressed in a different manner to include the case where the norm of Γ vanishes.
Combining all contributions, the sum of the finite and polar contributions to the rank one Fourier mode are given for all polarizations by Rank two Abelian orbits These orbits consist of matrices n 1 m 1 n 2 m 2 where (n 1 , m 1 ) and (n 2 , m 2 ) are not collinear (in particular, non-zero) but have vanishing symplectic product n 1 · m 2 − m 1 · n 2 = 0. Such matrices can be decomposed as n 1 m 1 Doublets (C, D) can be rotated to (0, 1) by an element of Sp(4, Z), and are in one-to-one correspondence with elements Γ 2,∞ \Sp(4, Z). The fundamental domain can thus be unfolded from where P 2 is the set of positive-definite matrices. Finally, one can restrict the matrices A = (j, p) ∈ M 2 (Z) to A ∈ M 2 (Z)/GL(2, Z), in order to unfold GL(2, Z)\P 2 to P 2 .
The resulting contribution can be expressed in terms of the auxiliary variables (y r,µ , y r,α ) (5.7), and we obtain where the factor two comes from the non-trivial center of order 2 of GL(2, Z) acting on H 2 . For sufficiently large |Ω 2 |, the integral over Ω 1 ∈ [0, 1] 3 selects the Fourier coefficient C(m, n, L; As discussed in §A.6, the Fourier coefficient can be decomposed into a finite contribution C F (n, m, L), independent of Ω 2 , and an infinite series of terms associated to the polar part, is the dihedral group of order 8, which stabilizes (up to sign) the matrix 0 1/2 1/2 0 , or equivalently the locus v 2 = 0. As explained in Appendix A.6, this formula holds only when |Ω 2 | > 1/4, such that the contour C = [0, 1] 3 + iΩ 2 avoids the poles of 1/Φ 10 for generic values of Ω 2 . Inserting (5.25) in (5.24), we find the following contributions, 1. The contributions from ( Q 1 , Q 2 ) = (0, 0) produces power-like terms in R 2 , from the delta function contribution in (5.25), even though C F (0, 0, 0) = 0, Here, the non-holomorphic Eisenstein series E ⋆ (s, S) and traceless differential operator D µν are defined in (5.11) and (5.12). It is worth noting that in the limit S 2 → ∞, the constant term proportional to ξ(q−6) S q−6 2 2 in the Eisenstein series E ⋆ ( 8−q 2 , S) reproduces the missing constant term in (4.20). Thus, while this term is missed by the unfolding procedure in the degeneration (p, q) → (p − 1, q − 1), it is correctly captured by the unfolding procedure in the degeneration (p, q) → (p − 2, q − 2). (5.25), and for the simplest tensorial representation, the unfolded integral leads to

Contributions of non-zero vectors
is the matrix-variate Bessel function [67], defined by Note that B δ (Z) depends on Z only through its trace and determinant. In the limit R → ∞, or large |Z| = |U V |, the integral over Ω 2 is dominated by a saddle point where , given by (5.24), we obtain For the contributions on the last line of (5.25), the integral over Ω 2 no longer evaluates to a matrix-variate Bessel integral, since these contributions depend on Ω 2 , being discontinuous across the walls where tr ( 0 1/2 1/2 0 γ ⊺ Ω 2 γ) changes sign. However, as long as (5.31) does not sit on the walls, the integral over Ω 2 is still dominated by the same saddle point, with a prefactor obtained by replacing . In appendix F, we estimate the error made by neglecting the variation of C(Q 2 1 , Q 2 2 , Q 1 ·Q 2 ; Ω 2 ) at finite distance away from the saddle point, and find that they are of the order expected for multiinstanton corrections. For the remainder of this section, we ignore these corrections, and perform the above replacement in (5.27).
In order to write the result for more general polarizations, it will be useful to introduce , we therefore obtain the Fourier expansion with respect to where the measure factor is given by, for Γ = (Q, P ) 3. Contributions from the Dirac delta function and sign function in the first line of (5.25) also produce exponentially suppressed contributions to the same Fourier coefficient. These contributions are localized on the walls tr ( 0 1/2 1/2 0 γ ⊺ Ω 2 γ) associated to the splittings (Q, P ) = (Q 1 , P 1 ) + (Q 2 , P 2 ). For the Dirac delta function terms the integral separates into the product of two Bessel functions, with arguments given by the masses M(Q 1 , P 1 ) and M(Q 2 , P 2 ) of the 1/2-BPS components, as shown in Appendix D. In Appendix C, we show that he summation measure for these contributions also factorizes into the two respective measures for 1/2-BPS instantons appearing in the genus-one integral (1.4), (1.6). The contributions from the sign functions are estimated in Appendix F.
Rank two non-abelian orbits These orbits consist of matrices n 1 m 1 n 2 m 2 where (n 1 , m 1 ) and (n 2 , m 2 ) have non vanishing symplectic product M 1 ≡ n 1 · m 2 − m 1 · n 2 = 0 (in particular, they are non collinear). Unlike all other orbits considered previously, the contribution of such matrices depend on the scalar ψ corresponding to the top grade component in the decomposition (5.3) via a factor e 2iπM 1 ψ , and therefore contribute to the non-Abelian Fourier coefficient. While the classification of the orbits of such matrices under Sp(4, Z) is rather complicated, we show in Appendix G that these contributions can be deduced by a simple change of variables from the already known Fourier coefficients in the degeneration (p, q) → (p − 1, q − 1).

Extension to Z N CHL orbifolds
The degeneration limit (5.1) of the modular integral (2.30) for Z N CHL models with N = 2, 3, 5, 7 can be treated similarly by adapting the orbit method to the case where the integrand is invariant under the congruence subgroup Γ 2,0 is the genus-two partition function with insertion of P ab,cd for a lattice is obtained from the usual unimodular lattice II 2,2 by restricting the windings and momenta to , exactly as in [22]. After Poisson resummation on m 1 , m 2 , Eq. (4.7) continues to hold, except for the fact that n 2 are restricted to run over (N Z) 2 . The sum over A = n 1 m 1 n 2 m 2 can then be decomposed into orbits of Γ 2,0 (N ): Trivial orbit The term n 1 m 1 n 2 m 2 = 0 0 0 0 produces the same modular integral, up to a factor of R 4 , αβ,γδ is the integral (4.1) for the lattice Λ p−2,q−2 defined by (5.35).
Rank-one orbits Matrices A of rank one fall into two different classes of orbits under Γ 2,0 (N ). Let us first consider the case where (n 2 , m 2 ) = (0, 0) and denote (n 2 , m 2 ) = p(n ′ 2 , m ′ 2 ) with p = gcd(n 2 , m 2 ): 1. Matrices with n ′ 2 = 0 mod N , as they are required to be rank one, can be decomposed as For this class of orbits, one can thus unfold directly the domain ,σ 1 (for further details, see (4.48)); 2. Matrices with n ′ 2 = 0 mod N can be decomposed as and where S σ denotes the inversion over σ. One can then unfold the fundamental domain Under this change of variable, the level-N weight-(k − 2) cusp form transforms as in (4.51), while the partition function for the sublattice Λ p−2,q−2 transforms as where we denoted in the cases of interest).
The remaining contributions A with (n 2 , m 2 ) = (0, 0) can be split in the two classes of orbits above. Given (n 1 , m 1 ) = j(n ′ 1 , m ′ 1 ), where j = gcd(n 1 , m 1 ) and j ∈ Z, terms with n ′ 1 = 0 mod N correspond to cases (j, p) = (j, 0) in the first class above, while terms with n ′ 1 = 0 mod N correspond to (j, p) = (j, 0) in the second class above. For the function G (p,q),1 ab,cd , changing the y variables as before (y ′ 1µ , y ′ 2µ , y ′ 1α , y ′ 2α ) = (y 1µ , y 1µ u 1 − y 2µ , y 1α , y 1α u 2 − y 2α ), the sum of the two classes of orbits then reads (similarly to (4.53)) . The contributions with Q 2 2 = 0, after integration over u 1 , u 2 (4.55), can be brought back to regular integral over Γ 0 (N )\H 1 by changing variable ρ → −1/ρ. Similarly to (4.56), the transformation property of the genus-one partition function and the level-N cusp form allows to obtain 12 The zero mode contribution, Q 2 = 0, lead to power-like terms where we use the genus-one modular integral G (p,q) ab (ϕ) (B.11), with integrand invariant under the Hecke congruence subgroup Γ 0 (N ), as well as ς G (p,q) ab (4.57) (Note that the cases of interest The terms with non-zero vectors Q lead to exponentially suppressed contributions of the same form as the Fourier modes of null vectors (5.15), non-null vectors (5.17), and the polar contribution (5.20) respectively, with the following changes: 1. In the case of the finite part of 1/Φ k (Ω), for null Fourier vectors where we defined the coprimes (j ′ , p ′ ) such that Γ = (j ′ , p ′ )Γ.
1. When n 1 /k 1 and n 2 /k 2 = 0 mod N , one can rotate the element as n 1 m 1 are not independent and the fourth winding entry, say n 22 , vanishes because of the symplectic contraint). The representative is stabilized by Γ 2,∞ = GL(2, Z) × T 3 , and one can restrict the sum over 2. The two cases n 1 /k 1 = 0 mod N but n 2 /k 2 = 0 mod N , and n 1 /k 1 = 0 mod N but n 2 /k 2 = 0 mod N , should be considered together. Respectively, the charges can be rotated as n 1 m 1 and one can then unfold Γ 2,0 (N ) 2,∞,N S −1 σ \H 2 , and change variable ρ → −1/ρ, σ → −1/σ, respectively. After exchanging ρ and σ in the second case 13 , the two cases can be assembled together to form the two orbits of the decomposition of Explicitely, One thus obtains a single sum over matrices A ∈ M 2,0 (N )/(Z 2 ⋉ Γ 0 (N )), with a fundamental domain unfolded to Γ such that it satifies the splitting degeneration limit (A.44), while the genus-two partition function for the sublattice transforms as 3. When n 1 /k 1 , n 2 /k 2 = 0 mod N , one can rotate the element as n 1 m 1 n 2 m 2 = j 1 j 2 0 0 After unfolding and changing variables, the result for the simplest component G (p,q),2 Ab where υ 2 = N k+2 |Λ * p−2,q−2 \Λ p−2,q−2 | −1 (which reduces to υ 2 = N 2−2δ q, 8 for q ≤ 8 in the cases of interest).
2. Contributions of non-zero vectors ( Q 1 , Q 2 ) ∈ Λ ⊕2 p−2,q−2 lead to the exponentially suppressed contributions written in (5.33). The measure of each Fourier mode will fall in three category, depending on the support of (Q, P ) . The simplest one is for the most generic vector Q ∈ Λ * m , P ∈ Λ m -where we denote X ∈ Λ the strict inclusion of the vector X in Λ, meaning that X ∈ Λ , X / ∈ Λ[N ] -for which only the first orbit in (5.51) of the second term in (5.24) contributes where the N factor comes from the width of the integration domain (R/N Z).
For less generic vectors Q ∈ Λ * m , P ∈ N Λ * m , one must add to (5.62) the second orbit of (5.51), allowing to rewrite the two as a sum over M 2,0 (N )/(Z 2 ⋉ Γ 0 (N )) defined in (5.51), as well as the contribution from the last term of (5.24). We obtain Finally, for vectors Q ∈ Λ m , P ∈ Λ m , one must add to (5.62) the contribution from the first term of (5.24). One thus obtain the full measure as Finally, there are also contributions from rank two non-abelian orbits where the two rows (n 1 , m 1 ) and (n 2 , m 2 ) have non vanishing symplectic product n 1 · m 2 − m 1 · n 2 = 0, but as mentioned in the previous subsection, it is more convenient to obtain them from the Fourier coefficients in the degeneration (p, q) → (p − 1, q − 1), as explained in Appendix G.

Large radius limit and BPS dyon counting
We now apply the results in §5.1 and 5.2 for (p, q) = (2k, 8) and Λ p−2,q−2 = Λ m , to discuss the limit of the exact ∇ 2 (∇φ) 4 couplings in three-dimensional CHL orbifolds, in the limit where one circle inside T 7 (orthogonal to the circle involved in the orbifold action) decompactifies. We regularize the coupling coefficient by analytic coninuation of q = 8 + 2ǫ, and we substract the pole at ǫ = 0. We find that the conjectured exact ∇ 2 (∇φ) 4 coupling (1.7) has the large radius expansion αβ,γδ + G αβ,γδ + G (TN) αβ,γδ (5.65) corresponding to the constant term, 1/2-BPS and 1/4-BPS Abelian Fourier modes and finally, the non-Abelian Fourier modes with non-zero Taub-NUT charge discussed in Appendix G.

Effective action in D = 4
The constant term in (5.65) takes the form The first term originates from orbits of rank 0 (5.36), rank-1 (5.44) and Abelian rank-2 (5.60), and combines all terms proportional to R 4 that survive in the decompactification limit. The second term comes from (5.60), and can be ascribed to the 2-loop sunset diagram shown in Figure 1 c), with Kaluza-Klein states running in the loops. Its coefficient vanishes in the maximal rank case. The exponentially suppressed contributions of order e −R and e −R 2 are missed by the unfolding procedure, but they must be present because of the differential equation (2.26). We shall return to them in the next subsection. If our Ansatz (1.7) for the exact ∇ 2 (∇φ) 4 couplings in D = 3 is correct, the term proportional to R 4 in (5.66) must reproduce the exact ∇ 2 F 4 couplings in four dimensions, up to logarithmic corrections in R due to the mixing between local and non-local couplings in D = 4. For the maximal rank case, we find αβ,γδ (S, ϕ) = G (24,6) αβ,γδ (ϕ)− and the regularized value at s = 1, where A G = e 1 12 −ζ ′ (−1) is the Glaisher-Kinkelin constant. Recalling that S 2 = 1/g 2 4 , we see that the first term in (5.67) indeed reproduces the two-loop contribution to the ∇ 2 F 4 coupling in D = 4, while the two other terms reproduce the tree-level and one-loop contributions to the same coupling, along with non-perturbative NS5-brane corrections of order e −2πS 2 . Because there is no holomorphic modular form of weight zero for SL(2, Z), supersymmetry Ward identities and U-duality determine uniquely this non-perturbative coupling from its perturbative expansion.
For the CHL orbifolds with N = 2, 3, 5, 7, we find instead which is manifestly invariant under the Fricke duality S → −1/(N S), ϕ → ς · ϕ [27]. In the weak coupling limit S 2 → +∞, this again reproduces the tree-level, one-loop and two-loop contributions to the ∇ 2 F 4 coupling in D = 4 (discarding the log terms) This agreement is of course guaranteed by the similar agreement in D = 3 discussed in §4.3.
Since there are no cuspidal forms of weight zero for Γ 0 (N ), (5.70) is in fact the unique nonperturbative completion of the perturbative coupling consistant with supersymmetry Ward identities and U-duality, including Fricke duality. 15 Other tensorial components G αβ,µν correspond instead to R 2 F 2 couplings in D = 4, which we refrain from discussing in detail. 15 The square ofÊ 1 (NS)+Ê 1 (S)

Contributions from 1/4-BPS instantons
Exponentially suppressed corrections arise from the rank one orbits (5.22), the Abelian rank two orbits (5.33), and the non-Abelian rank two (G.9). In this section, we focus on the contributions from the the Abelian rank two orbits, which provide the Abelian Fourier coefficients for generic 1/4-BPS charges. 16 These Fourier coefficients can be interpreted as non-perturbative corrections associated to space-time instantons corresponding to 1/4-BPS black holes wrapping the Euclidean time circle.
As emphasized earlier, 1/Φ k−2 (Ω) and 1/ Φ k−2 (Ω) are meromorphic functions with poles, so that their Fourier coefficients are piecewise constant functions of Ω 2 , with discontinuities as well as delta-function singularities at the boundary between distinct chambers (moreover, they are strictly speaking well-defined only for |Ω 2 | > 1 4 , since the contour C = [0, 1] 3 generically crosses the poles for lower values of |Ω 2 |). Due to this non-trivial Ω 2 -dependence, one cannot compute the integral (5.72) analytically, but one may analyze its asymptotic expansion at large radius.
For generic moduli S and ϕ, the integral is dominated by a saddle point at Ω 2 = Ω ⋆ 2 (5.31), in the neighborhood of which the Fourier coefficients of 1/Φ k−2 (Ω) and 1/ Φ k−2 (Ω) are constant. One can compute the leading contribution in the saddle point approximation by integrating (5.72) withC k−2 (Q, P ; Ω 2 ) ∼C k−2 (Q, P ; Ω ⋆ 2 ) kept constant in the integrand. Using (5.33) and the identities [13, (20)] , the resulting 1/4-BPS Abelian Fourier coefficients in this approximation can be expressed in terms of the standard modified Bessel functions, . This leading contribution can be ascribed to instantons of charge Γ associated to 1/4-BPS black holes (including bound states of two 1/2-BPS black holes) wrapping the Euclidean time circle. It is indeed exponentially suppressed in e −2πRM(Γ) for M(Γ) (2.5) the BPS mass of a black hole of charge Γ, and it is weighted by the measure factorC k−2 (Q, P ; Ω ⋆ 2 ). For a primitive charge Γ, i.e. such that there is no d = 1 with d −1 Γ ∈ Λ * m ⊕ Λ m , the only matrix A contributing to the measure is A = 1 and one can interpret the measure factor (up to an overall sign) as the helicity supertrace counting string theory states of charge Γ, as advocated in the introduction (2.14), C k−2 (Q, P ; Ω ⋆ 2 ) = (−1) Q·P +1 Ω 6 (Q, P, S, ϕ) .
The value of Ω 2 at the saddle point (5.31) reproduces the contour prescription of [9,32] when both electric and magnetic charges are separately primitive in Λ * m and Λ m and d −1 Q ∧ P ∈ Λ * m ∧ Λ m for d = 1 only. More generally, the contour prescription depends on the set of matrices A dividing (Q, P ) in the electromagnetic lattice. For example in the maximal rank case, all primitive charges (Q, P ) are in the U-duality orbit of a charge of the form [68] Q = e 1 + q e 2 , P = p e 2 , Q ∧ P = p e 1 ∧ e 2 , with e 1 and e 2 primitive in Λ 22,6 . The integer p is sometimes known as the 'torsion'. In that case (5.74) simplifies tō in agreement with the prescription in [40,69], with additional fineprint on the contour of integration. If we consider the same charge configuration (5.79) in CHL orbifolds for e 1 primitive in Λ * m and not in Λ m , e 2 primitive in Λ m and not in N Λ * m , and with p not divisible by N , such that it corresponds to a twisted state, only the second line in (5.75) contributes and the result reduces similarly tō in agreement with [6] for p = 1. For general primitive charges such that Q can be in Λ m and P in N Λ * m , all three terms contribute to the helicity supertrace, and the result is manifestly invariant under U-duality including Fricke duality.
For fixed total charge Γ, we expect contributions from all pairs of 1/2-BPS states with charges Γ 1 and Γ 2 such that Γ = Γ 1 + Γ 2 . We show in Appendix C that a general such splitting is parametrized by a non-degenerate matrix B = p q r s ∈ M 2 (Z), such that 18 In the range |Ω2| < 1 4 , there are additional contributions from 'deep poles' of the form (F.10) with n2 = 0 which must be avoided in order to define the Fourier coefficientC(Q, P, Ω2). In Appendix (F.2), we show that irrespective of the detailed prescription for avoiding these poles, the contribution from the region |Ω2| < 1 is exponentially suppressed in e −2πR 2 |2n 2 | , and can be ascribed to pairs of Taub-NUT instanton anti-instantons of charge ±n2.
where π 1 = 1 0 0 0 and π 2 = 0 0 0 1 . All splittings of a given charge Γ are in one-to-one correspondence with the matrices B ∈ M 2 (Z)/Stab(π i ) such that (5.83) In the following it prove convenient to use an equivalent unimodular representativê is the stabilizer of the doublet π i in SL(2, Q).
We show in Appendix C that the summation measure (5.74) on the domain |Ω 2 | > 1 4 (taking into account the discontinuities displayed in (5.25)) reads (focusing on the maximal rank case for simplicity) withB ∈ SL(2, Q)/Stab(π i , Q) determined such that Γ i =Bπ iB −1 Γ and where [B ⊺ Ω 2B ] ij denotes the entrises ij of the matrix.
To interpret the second line, recall that the central charge Z = 2 √ S 2 (Q R + SP R ) for an arbitrary 1/4-BPS state decomposes into orthogonal components Z = Z + + Z − with The BPS mass is M(Q, P ) = |Z + |. It is convenient to write Z +α = (z 1 + iz 2 )αM(Q, P ) with z 1 and z 2 vectors of SO(6) satisfying (5.87) The matrix Ω ⋆ 2 at the saddle point determines precisely this decomposition through A generic two-center 1/4-BPS solution with total charge (Q, P ) is written in terms of the harmonic functions 19 and is regular away from the points x 1 and x 2 provided the distance |x 1 − x 2 | satisfies In contrast, when [B ⊺ Ω ⋆ 2B ] 12 and Γ 1 , Γ 2 have the same sign, the bound state is not allowed and the last term in (5.85) vanishes at the saddle point Ω 2 = Ω ⋆ 2 in (5.31). This term still contributes to the integral (5.72), but is exponentially suppressed. At large R, the integral is now dominated by the boundary of the chamber where the sign of [B ⊺ Ω 2B ] 12 flips, as shown in Appendix F.1. On this locus, the argument of the exponential Tr R 2 S 2 Ω −1 The integral is then exponentially suppressed by e −2πR(M(Γ 1 )+M(Γ 2 )) . The same holds for the contribution of the Dirac delta function which is computed explicitly in Appendix D.
We conclude that (5.72) receives contributions of each possible splitting Γ = Γ 1 + Γ 2 , weighted by the product of the 1/2-BPS measuresc(Γ 1 )c(Γ 2 ) and further exponentially suppressed by e −2πR(M(Γ 1 )+M(Γ 2 )) . It is important to distinguish these two-instanton contributions from one-instanton contributions due to bound states of 1/2-BPS states. Due to the triangular inequality M(Γ 1 ) + M(Γ 2 ) ≥ M(Γ), these contributions are subdominant compared to the one-instanton contributions (5.77) away from the walls of marginal stability. On the wall, the two contributions become comparable and the complete Fourier coefficient is continuous.
This discussion generalizes with some efforts to CHL models with N prime. In Appendix C we show that the measure function for |Ω 2 | ≥ 1 4 decomposes as withB ∈ SL(2, Q)/Stab(π i , Q) such that Γ i =Bπ iB −1 Γ. In this case one must distinguish the charges Γ 1 and Γ 2 that are twisted or untwisted to reproduce the exact measure (2.22).
In Appendix C we analyze all the possible splittings depending on the orbit -electric or magnetic -of the charges Γ 1 and Γ 2 under Γ 0 (N ). The sign (−1) Q·P = (−1) Γ 1 ,Γ 2 for all splittings, which ensures that the contribution of the sign function in (5.92) to the helicity supertrace Ω 6 (Q, P, t) satisfies to the wall-crossing formula (2.12) with the correct sign.
It is interesting to understand this property from the differential equation imposed by supersymmetry Ward identities (2.26). We show explicitly in Appendix E.3 that the component of the differential equation with all indices along the decompactified torus is satisfied. In general, one finds that the leading contribution to the Fourier coefficient (5.72) with constant measureC k−2 (Q, P ; Ω 2 ) ∼C k−2 (Q, P ; Ω ⋆ 2 ) as in (5.77), solves the homogeneous equation (3.17). The contributions due to the discontinuities of the summation measureC k−2 (Q, P ; Ω 2 ) give a particular inhomogeneous solution sourced by the quadratic term in F abcd . For a given 1/4-BPS charge Γ, the Fourier coefficients of F abcd contribute a source term proportional tō c k (Γ 1 )c k (Γ 2 ) for all possible splittings Γ = Γ 1 + Γ 2 , which matches the structure of the measure measure in (5.92). In this way, the differential equation constrains the measure function to be consistent with wall crossing, such that the discontinuities must correspond to the sum over all possible splittings weighted by the 1/2-BPS measures of the constituent charges as exhibited in (5.92).
The explicit check of the differential equation in Appendix E.3 demonstrates that the unfolding procedure reproduces the correct Abelian Fourier coefficients, at least up to terms that are exponentially suppressed in e −2πR 2 . This is an important consistency check because the same unfolding procedure fails to reproduce the non-perturbative contributions to the constant terms associated to instanton anti-instantons, which are also required to be present in order for the differential equation to hold . These effects are also necessary in order to resolve the ambiguity of the sum over 1/4-BPS instantons [48], which is divergent due to the exponential growth of the measureC k−2 (Q, P ; Ω ⋆ 2 ) ∼ (−1) Q·P +1 e π|Q∧P | [2,8].

Weak coupling expansion in dual string vacua
In section §4.3, we analyzed the weak coupling expansion of the exact ∇ 2 (∇φ) 4 in D = 3, in the limit where the heterotic string coupling is small. However, the CHL vacua of interest in this paper also admit dual descriptions in terms of freely acting orbifolds of type II string theory compactified on K 3 × T 3 [70,71], or of type I strings on T 7 [72]. In this section, we discuss the weak coupling expansion of these exact results on the type II and type I sides. We also include a brief discussion of the ∇ 2 H 4 couplings in type IIB string theory compactified on K3, whose exact form was conjectured in [46] and involves the same type of genus-two modular integral, albeit with a lattice of signature (21, 5).
6.1 Weak coupling limit in CHL orbifolds of type II strings on K3 × T 3 On the type II side, string vacua with 16 supercharges can be obtained by orbifolding the type II string on K3 × T 3 by a symplectic automorphism of K3 combined with a translation on T 3 [70,71]. In order to keep manifest the four-dimensional origin of these models, we shall assume that the translation acts only on a T 2 inside T 3 . In the weak coupling limit g 6 → 0 (where g 6 is the string coupling in type IIA compactified on K3), the 'non-perturbative Narain where the first summand is the sublattice of the homology lattice Λ 20,4 = H even (K3) which is invariant under the symplectic automorphism, the second is the lattice of windings and momenta along T 2 , and the third is the lattice of windings and momenta along S 1 together with the non-perturbative direction. The last two summands can be combined into a lattice Λ 4,4 = II 2,2 ⊕ II 2,2 [N ] which can be thought as the lattice of windings and momenta along a fiducial torus T 4 . Assuming for simplicity that flat metric on the torus T 3 is diagonal and the Kalb-Ramond two-form vanishes, the radii of the four circles in this fiducial T 4 are related to the three radii R 5 , R 6 , R 7 of the physical T 3 by In the limit g 6 → 0, the four radii r i scale to infinity at the same rate, so the automorphism group O(Λ 4,4 ) is broken to a congruence subgroup of SL(4, Z), which is identified with the Tduality group O(Λ 3,3 ) along the three-torus. In order to make T-duality invariance manifest, it is useful to define the type II string coupling in three-dimensions g ′ 3 = g 6 ℓ 3 II /V 3 where ℓ II is the type II string length and V 3 = R 5 R 6 R 7 .
The analysis in §4.1 and §5.1 -and our previous analysis of the one-loop integral in [22] is readily generalized to the case where n radii of a lattice II n−r,n−r ⊕ II r,r [N ] become large, leading in the maximal rank case N = 1 to δ αβ, δ γδ + . . . (6.4) or in the case of N = 1,  where the dots denote exponentially suppressed terms and U ij is the metric on the n-torus, normalized to have unit determinant. 20 Here M n,2 (Z) is the set of rank two n by 2 matrices over the integers, M n,2,0 [N r ] the subset for which the first column last r entries vanish mod N , and M n,2,00 [N r ] the subset for which the two columns last r entries vanish mod N . The sums over m i ∈ Z n \{0} can be expressed in terms of the vector Eisenstein series for the congruence subgroup of SL(n, Z) for which the lower left r × (n − r) entries vanish mod N in the fundamental matrix representation, which we denote by SL n [N r ], The sums over A can be expressed in terms of rank two tensor Eisenstein series for the same 20 In the case of a square torus of volume Vn = r1 . . . rn, Uij = r 2 i δij/V 2 n n .
Note that for N = 1, E ⋆SLn sΛ k (U ) is the standard Langlands Eisenstein series satisfying the functional relation E ⋆SLn . For (n, r) = (1, 0) and (n, r) = (2, 1), (6.3) and (6.5) reduce to the results in §4 and 5 of [22] and the present paper, respectively. The case relevant in the present context is (n, r) = (4, 2). Setting (p, q, n) = (2k, 8, 4), V 4 = V 2 3 /(g 4 6 ℓ 6 II ) = 1/g ′4 3 , and multiplying by a suitable power of g ′ 3 for translating to the string frame, we find that the perturbative terms in the (∇φ) 4 and ∇ 2 (∇φ) 4 couplings in the maximal rank case are given by Similarly, for N > 1 we get In either case, the rank 0, rank-1 and rank-2 orbits are now interpreted on the type II side as tree-level, one-loop and two-loop contributions, with an additional one-loop contribution in the rank-2 orbit for N > 1. The tree-level contributions are consistent with the observation in [74] that the tree-level F 4 coupling of four twisted gauge bosons is governed by a genus-one modular integral, and the analogous statement in [75] that the tree-level ∇ 2 F 4 coupling of four twisted gauge bosons is governed by a genus-two modular integral.  21 It would be interesting to confirm these predictions by independent one-loop and two-loop computations in type II string theory. Finally, the exponentially suppressed terms in (6.8) can be ascribed to D-brane, NS5-branes and KK (6,1)-brane instantons as explained in more detail in [74].

Weak coupling limit in type II string theory compactified on K3 × T 2
Let us now consider the expansion of the exact ∇ 2 F 4 and R 2 F 2 terms in D = 4 obtained in (5.70) at weak coupling on the type II side. Recall that the heterotic axiodilaton S corresponds respectivly to the 2-torus Kähler modulus T A in type IIA, and the 2-torus complex structure modulus U B in type IIB, while the type II axiodilaton S A = S B corresponds to the Kähler modulus T of the 2-torus on the heterotic side, i.e.
In order to expand at small type II string coupling, i.e. at large T 2 , we decompose the lattice Λ 2k−2,6 into Λ 2k−4,4 ⊕ II 1,1 ⊕ II 1,1 [N ] as in section 5.2. For simplicity we shall use the type IIB moduli in this section, and we won't write explicitly the label B. So S is now the type IIB axiodilaton with S 2 = 1 g 2 s . For simplicity we shall only consider the perturbative terms for the Maxwell fields in the RR sector, corresponding to indices α, β, . . . along the sublattice Λ 2k−4,4 . Using the results of [22], the perturbative part of the exact F 4 coupling is given by where the first term matches the tree-level coupling computed in [74], while the second term is related by supersymmetry to the R 2 coupling computed in [76,77]. The exact ∇ 2 F 4 coupling is obtained from (5.70) after dropping the logarithmic terms in R, where U parametrizes SL(2)/SO(2) and ϕ the Grassmannian on Λ 2k−2,6 . The power-behaved term of G (2k−2,6) ab,cd (ϕ) in this limit is given in equations (  . After expanding around q = 6 + 2ǫ and subtracting polar terms, 22 we find γδ (t) (6.14) To compute the power-like term of G (2k−2,6) ab (ϕ) one proceeds as in [22], and finds after expanding around q = 6 + 2ǫ and subtracting polar terms The function ς G (2k−2,6) ab (ϕ) is obtained by acting with the involution ς on the K3 moduli t and on the Kähler moduli T by Fricke duality T → − 1 N T , so that Collecting all terms, we obtain the complete perturbative ∇ 2 F 4 coupling in D = 4, The terms involving log g s originate as usual from the mixing between the local and non-local terms in the effective action [78]. The result (6.17) is manifestly invariant under the exchange of U and T , hence identical in type IIA and type IIB. It is also invariant under the combined Fricke duality T → − 1 N T , U → − 1 N U , t → ςt [27], which is built in our conjecture for the non-perturbative amplitude. In the maximal rank case, (6.17) must be replaced by 23 G (22,6) αβ,γδ II = 1 g 4 s G (20,4) αβ,γδ (t) + 3 4πg 2 s δ αβ, log(T 2 |η(T )| 4 ) + log(U 2 |η(U )| 4 ) − 2 log g s G (20,4) γδ (t) It would be interesting to check these predictions by explicit perturbative computations in type II string theory. Noting that the 2-loop contribution on the last line of (6.17) takes the suggestive form The (log g s ) 2 term is consistent with the 2-loop logarithmic divergence of the four-photon amplitude [79] (recall that the log g s can be traced back to the logarithm of the Mandelstam variables in the full amplitude, and therefore to the logarithm supergravity divergences [78,22]). The term linear in log g s in (6.20), corresponding to the t 8 F 4 form factor divergence, can be rewritten as where one uses integration by part on the definition of F (2k−2,6) with − 1 iπ ∂ ∂τ 1 ∆ k (τ ) = k 12 (E 2 (τ )+ N E 2 (N τ ))/∆ k (ρ), and δ (ab δ cd) δ cd = 2k 3 δ ab . Ignoring these logarithmic contributions, the twoloop coupling (6.20) does not depend on the K3 moduli, as required by supersymmetry, and might be computable in topological string theory.
The amplitudes with two photons in the Ramond sector and two gravitons can be obtained in the same way. It is non vanishing only when the two photons have the same polarization and the two gravitons have the opposite polarization. In type IIB, the complex amplitude is obtained through the Kähler derivative of the same function (6.17) with respect to U , e.g. in the maximal rank case R (22,6) αβ II = − 9 2π 3 δ αβÊ2 (U ) log(T 2 |η(T )| 4 ) + log(U 2 |η(U )| 4 ) − 2 log g s + 1 4πg 2 sÊ 2 (U ) G (20,4) αβ (t) , (6.22) or with respect to T in type IIA. The log g s term can be interpreted as the divergence of the form factor of the operator R F 2 R (where Fα R are the graviphoton field strengths) belonging to the R 2 -type supersymmetric invariant. 23 Note that G (20,4) αβ is finite for the maximal rank case, whereas G (2k−4,4) αβ requires in general a regularization due to the 1-loop supergravity divergence in six dimensions.

Type I string theory
The heterotic string with gauge group Spin(16)/Z 2 is dual to the type I superstring [80]. In ten dimensions, the duality inverts the string coupling e φ → e −φ and identifies the Einstein frame metrics. After compactifying on a torus T q , the effective string coupling g s in 10 − q dimensions and volume V s in string units are given by where V is the volume of the torus T q measured in ten-dimensional Planck units. It follows that the heterotic/type I duality identifies where the unprimed variables refer to the heterotic string while the primed variables refer to the type I string, the unit volume metric U ij being the same on both sides. In particular, the weak coupling regime g ′ s → 0 on the type I side corresponds to strong coupling on the heterotic side when D = 10 − q > 6, or to weak coupling when D < 6. In either case, the volume V ′ s in heterotic string units scales to infinity. Furthermore, in dimension D > 4 the coefficients of the F 4 and ∇ 2 F 4 couplings are purely perturbative on the heterotic side, so their type I dual expansion is obtained by taking the large volume limit. We shall now show that the resulting weak coupling expansion on the type I side has only powers of the form g ′2h+b−2 s , compatible with type I genus expansion where b is the number of boundaries or crosscaps. For simplicity we focus on the maximal rank model and consider only gauge bosons with indices along the D 16 lattice, but these considerations easily extend to CHL models and gauge bosons with indices along the torus.
Using (6.3) and similar computations using the same method, we find that for D > 4, the F 4 coupling at weak type I coupling is given by where the dots stand for non-perturbative corrections associated to D1 branes wrapping twocycles inside T q . The first term is the expected disk amplitude of 4 open string gauge bosons in type I, while the remaining terms of order g ′0 s , g ′1 s , g ′2 s are contributions from genus 1, 3/2, where the dots stand for non-perturbative corrections associated to D1 branes wrapping twocycles inside T q . In the last term, the integral of the constant part C F (Q) of the Fourier coefficient of 1/Φ 10 produces a matrix-variate Gamma function and contributes to order g ′ s , g ′ for ℓ = 0, 1, 2, 3, 4, which are sourced by the square of the 'Wilson lines corrections' in (6.25) in the differential equation (2.26). The jumps due to deep poles where |Ω 2 | ≤ 1 4 lead to further corrections of order e −2π/g ′ s , which can be ascribed to D1-anti-D1 instantons. The first term 1 g ′ s 2 G (16,0) αβ,γδ in (6.26) is however apparently inconsistent with type I perturbation theory, since the four-photon amplitude only involves open string vertex operators which cannot couple at genus zero. Fortunately, we can show that this term vanishes for the heterotic Spin(16)/Z 2 string. Indeed, using the same integration by parts argument as in section 3.3 (the boundaries at the cusp do not contribute at q = 0) one finds 20G (16,0) αβ,γδ + δ αβ, G (16,0) γδ ,ǫ ǫ = πF ǫζ (16,0) αβ, F (16,0) γδ ,ǫζ = 0 , so (6.26) is indeed consistent with type I perturbation theory. In particular, the genustwo double trace ∇ 2 (TrF 2 ) 2 coupling computed in [43] for the ten-dimensional Spin(16)/Z 2 heterotic string vanishes. It is worth stressing that the same genus-two coupling in the E 8 ×E 8 string does not vanish. 24 Let us now discuss the form of the non-perturbative corrections in some more details. For any D ≥ 3, the contributions of the non-Abelian rank-2 orbit are non-perturbative on the type I side, with an action given for vanishing gauge charge by where g ′ s V ′ s 1 2 = e φ ′ is the ten-dimensional type I string coupling. This can be ascribed to Euclidean D1 branes wrapping T q with charge N ij ∈ Z q ∧ Z q . For D = 4, the NS5-brane instantons on the heterotic side translate into D5-brane instantons on the type I side, with action S 2 = V ′ Finally, non-perturbative heterotic instantons with non-vanishing NUT charge translate into type I Taub-NUT instantons, with action Thus, all non-perturbative effects on the heterotic side map to expected instanton effects in type I.

Exact ∇ 2 H 4 couplings in type IIB on K3
Finally, let us briefly discuss the couplings of four self-dual three-form field strengths H a µνρ in type IIB string theory compactified on K3. In [74,46], it was conjectured that the exact H 4 coupling is given by a genus-one modular integral of the form (1.4) for the non-perturbative Narain lattice Λ 21,5 of signature (p, q) = (21,5). This was later generalized to the case of 24 For the E8 × E8 heterotic string, we have instead 20G (16,0) αβ,γδ + δ αβ, G (16,0) γδ ,ǫ ǫ = πF ǫζ (16,0) αβ, F (16,0) γδ ,ǫζ = with F (16,0) αβγδ = 8π(P 1 (αβ P 1 γδ) + P 2 (αβ P 2 γδ) − P 1 (αβ P 2 γδ) ) , (6.31) and P i αβ the two projectors to the eight-dimensional subspaces. One computes that G (16,0) αβ,γ γ = 0, such that the ∇ 2 H 4 couplings, which were conjectured to be given exactly by a genus-two modular integral of the form (1.5) for the same lattice [46]. These conjectures follow from our exact non-perturbative results for the maximal rank model 25 in D = 3 by decompactification. Here, we briefly discuss the weak coupling expansion of these results on the type IIB side, using the results of section 4.1. At weak coupling, the even self-dual lattice Λ 21,5 decomposes into Λ 20,4 ⊕ II 1,1 , where the 'radius' associated to the second factor is related to the type IIB string coupling by g s = 1/R. The low energy action in the string frame was recalled in [22, 4.40], after changing the metric for γ = g s γ E and renormalising the Ramond-Ramond field as H a = g s H a . The coefficient of the ∇ 2 H 4 coupling in this frame is then given by G (21,5) αβ,γ,δ , without any further power of g s . The results of section 4.1 then provide its weak coupling expansion, G (21,5) αβ,γδ = 1 The first term proportional to G (20,4) αβ,γδ is recognized as a tree-level contribution in type IIB on K3 [75]. The second and third terms correspond to one-loop and two-loop corrections, and to our knowledge have not been computed independently yet. The second line of (6.37) corresponds to exponentially suppressed terms that originate from D3, D1, D(-1) branes wrapped on K3 [74], or, formally, to Fourier coefficients of the coupling coefficient. The functionḠ (21,5) αβ is the sum of a finite and a polar contribution and reads G (20,4) whereḠ (20,4) αβ =Ḡ (20,4) F, αβ +Ḡ (20,4) P, αβ as described in §4. The last line corresponds to instanton antiinstanton corrections that are missed by the unfolding method, and which could be computed by solving (E.51) for Q = 0.

Heis σ (leaving Ω
Defining where p, p ′ run over primes. Indeed the corresponding quotients can be understood as where the subscript indicates the embedding SL(2, Z) ⊂ Sp(4, Z) of the coset representatives.
Of special interest is the Hecke congruence subgroup Γ 2,0 (N ) and its conjugatesΓ 2,0 (N ), Γ 2,0 (N ). The cosets of Sp(4, Z)/Γ 2,0 (N ) are in one-to-one correspondence with cosets of GSp N (4, Z)/Sp(4, Z), where GSp N (4, Z) is the group of symplectic similitudes such that γεγ t = N ε. For N prime, the (N + 1)(N 2 + 1) = 1 + N + N 2 + N 3 cosets can be chosen as (see e.g. [84, p.6 For Φ(ρ, σ, v) a Siegel modular form of weight w for the full Siegel modular group Sp(4, Z), the sum of the action of these elements on Φ produces again a Siegel modular form for the full Siegel modular group Sp(4, Z), which is the image of Φ under the N -th Hecke operator H N , The first term in this sum, Φ(N ρ, N σ, N v), is then a Siegel modular form for Γ 2,0 (N ). The 'Fricke involution' takes a Siegel modular form Φ of weight w under Γ 2,0 (N ) into another one. Similarly, takes a Siegel modular formΦ of weight w under Γ 2,0 (N ) into another one.

A.3 Genus two theta series
The genus-two even theta series are defined as with a i , b i ∈ Z. It is an even or odd function of ζ = (ζ 1 , ζ 2 ) t depending on the parity of a 1 b 1 +a 2 b 2 . When it is even, the value at ζ = 0 is the Thetanullwert denoted by ϑ (2) a 1 ,a 2 b 1 ,b 2 (Ω). The value of a i , b i modulo two defines a spin structure labelled by the column vector κ = (a 1 , a 2 , b 1 , b 2 ) t , whose parity is that of a 1 b 1 + a 2 b 2 . Under translations of the characteristics by even integers, Under Sp(4, Z) transformations, and ǫ(κ, γ) is an 8-th root of unity. In particular, In the separating degeneration limit,
(A.34) Here, c (r,s) b (n) with b ∈ Z/(2Z) are Fourier coefficients of a family of index 1 weak Jacobi forms obtained as a twining/twisted elliptic genus of the Z N orbifold of K3. In particular, for N = 1, 2, 3, 5, 7 and 1 ≤ s ≤ N − 1, From this relation, it is manifest thatΦ k−2 is invariant under the Fricke involution [85, §C], and therefore, so is Φ k−2 , It is worth recalling that the infinite products (A.33) and (A.34) arise as theta liftings of F (r,s) , namely R.N.

A.5 Fourier-Jacobi coefficients and meromorphic Jacobi forms
Given a meromorphic Siegel modular form 1/Φ(ρ, σ, v) of weight −w, the Fourier expansion with respect to σ gives rise to an infinite series of meromorphic Jacobi forms ψ m (ρ, v) of fixed weight w and increasing index m. If Φ is modular under the full Siegel modular group, then m ∈ Z and ψ m is a Jacobi form for the full Jacobi group SL(2, Z) ⋉ Z 2 , i.e. it satisfies In particular, the Fourier-Jacobi expansion of the inverse of the Igusa cusp form is given by [89, (5.16)], is (up to a factor (2πi) 2 ) the Weierstrass function, a weak Jacobi form of weight 2 and index 0.
In the case of CHL orbifolds with N = 2, 3, 5, 7, it will be useful to introduceΦ k−2 , the image of Φ k−2 under an inversion S σ , where we chose the normalization such thatΦ k−2 ∼ −4π 2 v 2 ∆ k (ρ)∆ k (σ/N ) near the divisor v = 0. The Fourier-Jacobi expansion of Φ k−2 andΦ k−2 is given by where ϑ 1 (ρ, v) = n∈Z (−1) n q 1 2 (n− 1 2 ) 2 y n− 1 2 (note that it differs from ϑ 1 1 (ρ, v) by a factor of i) and Now, unlike holomorphic or weak Jacobi forms, a meromorphic Jacobi form ψ m (ρ, v) of index m > 0 and weight w in general do not have a theta series decomposition, unless it happens to be holomorphic in the variable v. Instead, it was shown in [90,89] that it can be decomposed into the sum of a polar part and a finite part, where the finite part ψ F is holomorphic in z and has a theta series decomposition, where A m (ρ, v) is the standard Appell-Lerch sum [89] A m (ρ, v) = s∈Z q ms 2 +s y 2ms+1 (1 − q s y) 2 . (A.64) The latter satisfies the elliptic property (A.52) but not the modular property (A.53). However, it admits a non-holomorphic completion term such that A m ≡ A m + A ⋆ m transforms like a Jacobi form of weight 2 and index m, although it is no longer holomorphic in the ρ and v variables. Consequently, both transform like Jacobi forms of weight 2 − k and index m, although neither is holomorphic in the ρ and v variables. Moreover, ψ F m (ρ, v) has a theta series decomposition similar to (A.61) with coefficients transforming as a vector-valued modular form of weight 3 2 − k. By Taylor expanding the denominator, we can rewrite (A.64) as an indefinite theta series of signature (1,1), Similarly, its modular completion can be written as an indefinite theta series, is a smooth function which asymptotes to √ π|x| at large |x| [91]. For meromorphic Jacobi forms of index m = 0, the decomposition (A.60) still holds, but the finite part ψ F 0 is now independent of z, while the non-holomorphic completion term of the Appell-Lerch sum A 0 (ρ, v) reduces to A * 0 = 1/(4πρ 2 ). The simplest example, relevant for the present work, is the (rescaled) Weierstrass function (A.55), which decomposes into In particular, it follows from this decomposition and from (A.88) (with L = 0) that the integral over the elliptic curve v ∈ E is given by which is non-holomorphic in ρ as a consequence of the pole of P(ρ, v) at v = 0. From this, it follows in particular that the average values of the zero-th Fourier-Jacobi modes (A.59) of 1/Φ k−2 and 1/Φ k−2 with respect to v are given by For negative index m < 0, it turns out that any meromorphic Jacobi form ψ can be expressed as a linear combination of iterated derivative of a modified Appell-Lerch sum, (here y = e 2πiz , w = e 2πiu ) [92] The latter transforms as a Jacobi form of index M = −m in u and has a simple pole at u − z ∈ Z + τ Z, with residue 1/(2πi) at u = z. If S denotes the set of poles of ψ(z) in a fundamental domain of C/(Z + τ Z), and D n,u are the Laurent coefficients of ψ at z = u, then Theorem 1.1 in [92] states that For the case of interest in this paper, the leading Fourier-Jacobi coefficient ψ −1 = 1 η 18 θ 2 1 (z) of 1/Φ 10 has a double pole at z = 0 with residue 1/∆, hence Note that this plays the role of ψ P −1 , while ψ F −1 vanishes. The modified Appell-Lerch sum can be written as an indefinite theta series, where signℓ is interpreted as −1 for ℓ = 0. To see that this formula is consistent with the quasi-periodicity (A.52), note that under (y, s, ℓ) → (yq, s − 1, ℓ + 2), (A.77) becomes This differs from (A.77) (up to the automorphy factor qy 2 ) only due to the terms ℓ = 0 and ℓ = −1, but those two terms leads to a vanishing contribution, Shifting ℓ to ℓ − 2s, (A.77) may be written equivalently as

A.6 Fourier coefficients and local modular forms
In this section we shall use the decomposition (A.60) to infer the Fourier coefficients of 1/Φ k−2 and 1/Φ k−2 in the limit Ω 2 → i∞. Starting with the maximal rank case, and assuming that σ 2 ≫ ρ 2 , v 2 , we find C(n, m, L; where we have used ℓ = L − 2ms, M = n − ms 2 − ℓs. However, while this naive manipulation lead to the correct result for generic u 2 , it turns out to miss a distributional part localized at u 2 ∈ Z, originating from the poles of A m (ρ, v) at q s e 2πiv = 1.
To compute this distribution, let us first consider the contribution from the term s = 0 in the sum (A.64). Upon expanding one would be tempted to conclude that the integral 1 0 dv 1 y (1−y) 2 vanishes. However, we claim that instead, To see this, we first consider first the single pole function 1 2 y+1 y−1 , with Fourier expansion 1 2 with the understanding that sign(0) = 0. We claim that this identity is valid at the distributional level. As a check, using the Euler formula representation for (A.85) and acting with an anti-holomorphic derivative on each term (recalling that ∂v 1 v = πδ(v 1 )δ(v 2 )), we get (A.86) The right-hand side is also what one gets by acting with ∂v = 1 2 (∂ v 1 + i∂ v 2 ) on each term in the Fourier series (A.85), noting that sign ′ (v 2 ) = 2δ(v 2 ).
The double pole distribution (A.83) is obtained by acting with a holomorphic derivative on (A.85), therefore admits the Fourier expansion In particular, integrating over v 1 we reach (A.84). 28 . More generally, the same argument shows that for any s, Using this identity, we find that the naive result (A.82) misses an additional term supported at Using the same reasoning, we find the Fourier coefficients of 1/Φ k−2 , which must be invariant under GL(2, Z), For the Fourier coefficients of 1/Φ k−2 , which must be invariant under Γ 0 (N ), we find instead It is important to note that the identities (A.90),(A.94),(A.95) are only valid when |Ω 2 | is large enough such that the integration contour [0, 1] 3 + iΩ 2 does not cross any pole for generic values of Ω 2 , and only crosses quadratic divisors (A.6) with n 2 = 0 on real-codimension one loci. When |Ω 2 | < 1/(4n 2 2 ) with |n 2 | ≥ 1, the contour crosses the the quadratic divisor (A.6) for generic values of Ω 2 , and the integral on the first line of (A.81) is no longer well-defined. We leave it as an interesting open problem to define the Fourier coefficient C(n, m, L; Ω 2 ) of 1/Φ 10 (or its analogue for 1/Φ k+2 and 1/Φ k−2 ) in the region where |Ω 2 | ≤ 1/4.

B Perturbative contributions to 1/4-BPS couplings
In this section, we compute the one-loop and two-loop contributions to the coefficient of the ∇ 2 F 4 coupling in the low-energy effective action in heterotic CHL orbifolds. In both cases we start with the maximal rank case, i.e. heterotic string compactified on a torus T d , and then turn to the simplest heterotic CHL orbifolds with N = 2, 3, 5, 7.

B.1.1 Maximal rank case
In heterotic string compactified on a torus T d , the one-loop contribution to the coefficient of the ∇ 2 F 4 coupling in the low-energy effective action can be extracted from the four-gauge boson one-loop amplitude, given up to an overal tensorial factor by [41] where χ ij = e g(ρ,z i −z j ) and g(ρ, z) = − log |θ 1 (ρ, z)/η| 2 + 2π ρ 2 (Imz) 2 is the scalar Green function on the elliptic curve E with modulus ρ. The four-point function of the currents evaluates to where P ab and P abcd are quadratic and quartic polynomials, respectively, in the projected lattice vector Q La = p La I Q I ∈ Γ d+16,d arising from the zero-mode of the currents, and for any polynomial P in Q La and integer lattice Λ p,q of signature (p, q), we denote Upon expanding in powers of α ′ , the leading term reproduces the one-loop contribution to the F 4 coupling, where R.N. denotes the regularization procedure introduced in [93,94,95], which is needed to make sense of the divergent integral when d ≥ 6 (we return to this point at the end of this subsection). Equivalently, (B.5) may be written as [46] F (1) abcd = R.N.
where Γ Λp, q (y) is the partition function of the compact bosons deformed by the current y a J a integrated along the A-cycle of the elliptic curve, At next to leading order in α ′ , the term linear in the Mandelstam variables s, t, u reduces to since all other terms at this order are total derivatives with respect to z i . The integral over z can be computed by using the Poincaré series representation of the Green function, where the sum over (m, n) was regularizedà la Kronecker. Up to an overall numerical factor, we therefore find that the one-loop contribution to the coefficient of ∇ 2 F 4 coupling for the maximal rank model is given by For d = 0, corresponding to either of the E 8 × E 8 or Spin(32)/Z 2 heterotic strings in 10 dimensions, one has ab,cd becomes proportional to the TrF 2 TrR 2 coupling computed from the elliptic genus [96, C.5], [97], as required by supersymmetry.

B.1.3 Regularization of the genus-one modular integrals
As indicated above, the modular integrals (B.13) and (B.14) are divergent when d ≥ 6 and d ≥ 4, respectively. We follow the same regularization procedure as in [98,22] and define them by truncating the integration domain to F N,Λ = ∪ γ∈Γ 0 (N )\SL(2,Z) γ · F 1,Λ , where F 1,Λ = {− 1 2 < ρ 1 < 1 2 , |ρ| > 1, ρ 2 < Λ} is the truncated fundamental domain for SL(2, Z), and minimally subtracting the divergent terms before taking the limit Λ → ∞. Using the fact that the constant terms of 1/∆ k andÊ 2 /∆ k are equal to k and k(1 − 3 πρ 2 ) − 24, the constant terms of their Fricke dual are k and k(N − 3 πρ 2 ) and the constant terms of the Fricke dual of the partition function include an extra factor of υN where the terms Λ q−6 2 / q−6 2 and Λ q−4 2 / q−4 2 should be replaced by log Λ when q = 6 or q = 4, respectively. Note that the second term in (B.16) cancels in the case of the full rank model where k = 24. It will be also useful to consider the Fricke dual function to G (p,q) ab for the N = 2, 3, 5, 7 models, introduced in (4.57) and whose regularization is given by

B.1.4 Differential identities satisfied by genus-one modular integrals
Like the genus-two modular integral G (p,q) ab,cd discussed in §3.3, the genus-one modular integrals (B.15), (B.16) and (B.17) satisfy differential identities with constant source terms in q = 6, q = 4 determined by regularization techniques using the same paramatrization as for section B.1.3. The equation for the modular integral F (p,q) abcd was calculated in [22, (3.57)], which we reproduce below: Here the volume factor υ is either equal to N for the perturbative Narain lattice, or to 1 for the non-perturbative Narain lattice. The equation satisfied by the genus-one integral G (p,q) ab can be computed using the same techniques described in [22, §3.2] and reads δ (ef δ ab) δ q,4 + 9(1 + υ N )k 8π 2 δ (ef δ ab) δ q,6 , where the term proportional to F (p,q) ef ab corresponds to the contribution of the non-holomorphic completion inÊ 2 , and the two constant contributions of the second line correspond to the boundary contribution after integration by part (see [22, (3.54)]). One checks that the divergent contributions cancel each others, so the equation is valid for the renormalized couplings. For the perturbative lattice with υ = N , these linear corrections are associated to the mixing between the analytic and the non-analytic components of the amplitude, and are indeed proportional to the corresponding 1-loop divergence coefficient in supergravity [79].
The same analysis for ς G (p,q) ab gives (B.20)

.1 Maximal rank case
At two-loop, the scattering amplitude of four gauge bosons in ten-dimensional heterotic string theory was computed in [42,43]. Upon compactifying on a torus T d , one obtains where Σ is a genus-two Riemann surface with period matrix Ω, Y S is a specific (1, 1) form in each of the coordinates z i on Σ [42, (11.32)], where ∆(z, w) = ω 1 (z)ω 2 (w) − ω 1 (w)ω 2 (z), χ ij = e G(Ω,z i −z j ) and G(Ω, z) is the scalar Green function on Σ. At leading order in α ′ , χ ij can be set to one, and similarly to (B.6), the integrated current correlator Σ J a (z)dz ω I z can be expressed as a multiple derivative [46] is the partition function of the compact bosons deformed by the currents y r a J a integrated along the r-th A-cycle of Σ, La Ωrs Q s L a −iπQ r RâΩ rs Q s Râ +2πiQ r La y a r + π 2 y a r Ω rs 2 y as .

(B.24)
Evaluating the derivatives explicitly, we obtain the result announced in (2.30) for the two-loop ∇ 2 F 4 coupling in the maximal rank case, d+16) ab,cd =R.N.
where P ab,cd is the quartic polynomial defined in (2.31). The regularization procedure needed to make sense of this modular integral when d ≥ 5 will be discussed in §B.2.4.
In the special case (d = 0) of the E 8 × E 8 heterotic string in 10 dimensions, and for a suitable choice of indices ab, cd, the partition function Γ (2) 4 is the holomorphic Eisenstein series of weight 4, which coincides with the Siegel theta series for the lattice E 8 , and Ψ 2 is a non-holomorphic modular form of weight (2,0) given by in agreement with [43, (5.7)]. This can be viewed as the genus-two counterpart of the genusone formula (B.12). We shall now discuss the extension of (B.25) to CHL orbifolds, starting with the simplest case N = 2.

B.2.2 Z 2 orbifold
The simplest CHL model is obtained by orbifolding the E 8 × E 8 heterotic string on T d by an involution σ exchanging the two E 8 factors, and translating by half a period along one circle in T d [25]. This model was studied in more detail in [99,100] and revisited in [22, §A.1]. Some aspects of the genus-two heterotic amplitude in this model were discussed in [11] in the context of 1/4-BPS dyon counting, which we shall build on.
Following standard rules, the two-loop amplitude is now a sum over all possible twisted or untwisted periodicity conditions [h 1 h 2 ] and [g 1 g 2 ] along the A and B cycles of the genus-two curve Σ, respectively, The untwisted amplitude A (2) 00 00 coincides with (B.21), restricted on the locus G d+8,d ⊂ G d+16,d which is invariant under the involution σ. As in the genus-one case [22, §A.1], it is convenient to further restrict to the locus G d,d ⊂ G d+8,d where the lattice factorizes as Λ d+16,d = E 8 ⊕E 8 ⊕II d,d , and retain from A (2) h 1 h 2 g 1 g 2 the chiral measure for the ten-dimensional string, which we denote by , the genus-two partition function of the lattice Λ E 8 ×E 8 appearing in the numerator can be decomposed as where Θ (2) E 8 [2],(P 1 ,P 2 ) is the genus-two theta series for Λ E 8 [2]: For P 1 = P 2 = 0, Θ (2) E 8 [2],(0,0) (Ω) = Θ (2) E 8 (2Ω). As for the twisted sectors h g ≡ h 1 h 2 g 1 g 2 = 00 00 , we use the fact that the Z 2 orbifold blocks of d compact scalars on a Riemann surface of genus 2 are given by [101,102] ϑ (2) where Z 0 (Ω) is the inverse of the chiral partition of a (uncompactified, untwisted, unprojected) scalar field on Σ, and τ h,g is the Prym period, namely the period of the unique even holomorphic form on the double cover of Σ, a Riemann surfaceΣ of genus 3. The Prym period τ h,g is related to the period matrix Ω by the Schottky-Jung relation [102, (1.6)] for any choice of distinct i, j ∈ {1, 2, 3}. Here, δ ± i are the 6 even spin structures δ such that δ + 1 2 h g is also en even spin structure; moreover δ − i = δ + i + 1 where τ ≡ τ h,g . In particular, under (ρ, σ, v) → (ρ + 1, σ, v), the Prym period transforms as τ → τ + 1, whereas in the non-separating degeneration σ → i∞, τ ∼ ρ mod 4Z [102, §7.2].
In our case, we need the orbifold blocks of 16 chiral scalars under exchange X i → X i+8 mod 16 . By decomposing X i into its even and odd components X i ± X i+8 mod 16 , we find that the orbifold blocks are given by As a consistency check on this result (first obtained in [11] from the partition function of the E 8 root lattice on the genus 3 covering surfaceΣ), let us consider the maximal nonseparating degeneration limit: the imaginary part of the period matrix Ω 2 = parametrizes Schwinger times along the three edges of the two-loop sunset diagram shown in Figure 1 iii). Assuming that the Z 2 action is inserted along the edge of length L 3 , the E 8 ⊕ E 8 momenta running in the three edges are (p 1 , p 2 ), (p 1 + q, p 2 + q), (q, q). Decomposing as usual p 1 + p 2 = 2Σ + P, p 1 − p 2 = 2∆ − P, the classical action is in agreement with the maximal non-separating degeneration limit of the second factor in (B.34), using τ h,g ∼ ρ.
Including the contribution from the second line in (B.21), and retaining the next-to-leading term in the low energy expansion, we see that the ∇ 2 F 4 coupling on the locus G d,d ⊂ G d+8,d where the lattice Λ d+16,d factorizes is given by G (2) ab,cd = 1 4 R.N.
8 00 00 Z (2) d,d 00 00 + ′ hr,gr∈{0,1} (B.54) where the bracket [P ab,cd ] denotes an insertion of the quartic polynomial P ab,cd (2.31) in the sum over the latticeΛ d+8,d and its modular images. Now, in parallel with the 'Hecke identity' (B.42), observe that the untwisted genus-two chiral partition function satisfies The validity of this identity can for example be checked for the minimal non-separating degeneration using (A.31). Using this identity in the sum over all sectors, as in (B.54), we can rewrite it as a sum over Sp(4, Z)/Γ 2,0 (2), as in the second line of (B.53), to obtain 1 4 hr,gr∈{0,1} The insertions of 1 2 1+(−1) δ·Q i can be seen as projectors on the latticeΛ d+8,8 to vectors with even entries along one of the cicle designated by δ, such that the resulting sum is recognized as a genus-two partition function, with insertion of P ab,cd only, for the 'magnetic charge lattice' introduced in [22, (A,16)], At this point, we can readily extend the result away from the factorized locus by allowing nontrivial Wilson lines in the lattice partition function. As established in (B.56), the partition function can be written down as a sum over images from under Sp(4, Z)/Γ 2,0 (2), such that the integral can be unfolded from a fundamental domain of Sp(4, Z) to a fundamental domain of Γ 2,0 (2) G (2) ab,cd = R.N.
This concludes the computation of the two-loop ∇ 2 F 4 coupling in the Z 2 orbifold. Upon using the Niemeier lattice construction of the Z N -symmetric lattice outlined in [22], one finds that the invariant lattice Λ k, This orbifold block can in principle be computed using the N -sheeted cover of the genus-two curve Σ, which now has genus N + 1. Rather than following this route, we instead postulate that it is given by the natural generalization of (B.51), namely where Γ 2,0,e 1 (N ) = Γ 2,e 1 (N ) ∩ Γ 2,0 (N ) has index N + 1 in Γ 2,e 1 (N ) and N 2 − 1 in Γ 2,0 (N ), and δ · Q 2 = n 2 is the winding of the d-th embedding coordinate along the cycle B 2 , so that Γ (2) is a modular form of Γ 2,0,e 1 (N ). As a consistency check, one may verify that (B.61) has the correct behavior Similarly as in the N = 2 case, we deduce from (B.60) and (B.61) that the sum over all non-trivial twisted sectors can be rewritten as a sum over images under Γ 2,0 (N ), Next, we observe that the untwisted genus-two amplitude also satisfies an Hecke identity generalizing (B.55), namely Combining (B.61) and (B.65), and using we find that the sum over all twisted sectors reduce to a sum over images under Γ 2,0 (N ) where now the Siegel theta series involves the rescaled lattice After including the contribution from the second line in (B.21), retaining the next-to-leading term in the low energy expansion, and unfolding the integration domain F 2 against the sum over images in (B.67), we conclude that the genus-two ∇ 2 F 4 coupling is given by as announced in (2.28).

B.2.4 Regularization of the genus-two modular integral
In order to regulate the genus-two modular integral (2.30), it is easiest to fold the integration domain H 2 /Γ 2,0 (N ) back to the standard fundamental domain of Sp(4, Z) defined in (A.5), G (p,q) ab,cd = R.N.
The renormalized modular integral over F 2 can then be defined following the procedure in [103,64], i.e. by truncating the fundamental domain to F Λ 2 = F 2 ∩ {t < Λ}, where the coordinate t on H 2 was defined in (A.9). In order to separate one-loop and primitive two-loop subdivergences, we then decompose F Λ 2 into three subregions, where Λ 1 ≪ Λ is a fiducial scale. One-loop subdivergences arise from integration over F I 2 , while primitive divergence arises from integrating over F II 2 . In extracting the divergences as Λ → ∞, we can safely ignore terms proportional to powers of Λ 1 , since they cancel in the sum over the three regions [103].
Let us first consider the divergences from region I. In this region, the variable t is bounded by Λ while ρ is restricted to the fundamental domain F 1,Λ 1 . For the first 1 + N cosets of Γ 2,0 (N )\Sp(4, Z) listed in (A.22), the charges (Q 1 , Q 2 ) whose contributions are not exponentially suppressed as t → ∞ are those with Q 2 = 0. For those, the integral over σ 1 projects 1/Φ k−2 | γ to its zero-mode ψ 0 | γ in (A.59), while the remaining integral over u 1 , u 2 projects the latter to its average value (A.73), with a factor of 1/2 because of the element of SL(2, Z) permuting them. The divergence from these N + 1 cosets is then For the remaining N 2 + N 3 cosets, the representative γ includes again the N + 1 γ ρ elements again, times the N transformations {S σ , T σ S σ , . . . , T N −1 σ S σ }, which requires a Poisson resummation over Q 2 before setting its dual to 0, and the N shifts b in (A.22). The divergence is then of the same form as above, upon replacing ψ 0 by its image under S σ , N k/2ψ 0 (A.59), and including a volume factor |Λ * p,q /Λ p,q | − 1 2 = υN − k 2 −2 from the Poisson resummation and a multiplicity factor N 2 from the transformations listed above: R.N.
cd e e (B.74) where we recognized the coefficient of the divergence as the renormalized one-loop F 4 coupling by integrating by part, as in [22, §3.2], upon using the identity is the raising operator. We now turn to the primitive two-loop divergence coming from the integral over F II 2 . In this region, it is more convenient to use the variables V, τ defined in (A.9). The variable V runs from τ 2 /Λ to 1/τ 2 Λ 1 , while the variable τ takes values in the standard fundamental domain F 1 /Z 2 of GL(2, Z), truncated at τ 2 ≤ Λ/Λ 1 [103]. The primitive divergence comes from the region V → 0. For the first coset in (A.22), the contribution of all charge vectors with Q 1 = 0 or Q 2 = 0 are exponentially suppressed as V → 0. For (Q 1 , Q 2 ) = (0, 0), the polynomial P ab,cd in (2.31) reduces to 3δ ab, δ cd /(16π 2 |Ω 2 |), and the integral over Ω 1 projects 1/Φ k−2 to its zero-mode C k−2 (0, 0, 0) = 48N N 2 −1 in (A.49). For the second and third class of cosets in (A.22), the limit V → 0 requires first performing a Poisson resummation over either Q 1 or Q 2 , resulting in a volume factor of |Λ * p,q /Λ p,q | − 1 2 = υN − k 2 −2 , and the integral over 50), for each of the N (N + 1) cosets. Finally, for the fourth class of cosets in (A.22), the limit V → 0 requires performing a Poisson resummation over both Q 1 and Q 2 , resulting in a volume factor of |Λ * p,q /Λ p,q | −1 = υ 2 N −k−4 , and the integral over Ω 1 projects N k−2 /Φ k−2 (Ω/N )| γ to its zero-mode after having used the identity (A.40), for each of the N 3 cosets. Adding up all contributions, we find 3δ ab, δ cd 16π 2 R.N.
Setting υ = N , the term in square bracket cancels, so the coefficient of the two-loop primitive divergence in fact vanishes.
Finally, it remains to consider a potential divergence from the separating degeneration. For generic values of ρ, σ in F 2 , the integral around v = 0 is of the form dvdv/v 2 , which vanishes provided one integrates first over the angular direction in the v-plane. There can however be a divergence from the region ρ 2 , σ 2 → ∞ while v → 0, where the genus-two curve degenerates into a figure-eight graph. For the first coset in (A.22), the contribution of all charge vectors with Q 1 = 0 or Q 2 = 0 are exponentially suppressed as ρ 2 , σ 2 → ∞. As shown in §A.6, the integral over v 1 gives rise to a delta-function c k (0) 2 δ(v 2 ). To integrate this delta distribution it is convenient to unfold the integration domain of Ω 2 near the cusp |Ω 2 | → ∞, P 2 /GL(2, Z) to P 2 , using the sum over GL(2, Z)/Dih 4 in (5.25), and taking into account the factor of 4 associated to Dih 4 , the stabilizer of the singular locus v = 0. Equivalently one can think of the integral over P 2 /GL(2, Z), and simply unfold the order four symmetry permuting σ 2 and ρ 2 and changing the sign of v 2 . At v 2 = 0, σ 2 = t and the integration domain is Λ 1 ≤ ρ 2 ≤ σ 2 < Λ, which after symmetrization gives the divergent contribution For the other cosets in (A.22), the zeroth Fourier-Jacobi coefficient behaves has N k 2ψ 0 (ρ, v) leading to N k 2 c k (0) 2 δ(v 2 ), and N k−2 ψ 0 (ρ/N, v/N ) leading to N k−2 c k (0) 2 δ(v 2 /N ). The first contribution occurs from the trivial coset only; the second from 2N cosets because of the symmetry ρ ↔ σ, with an overall volume factor υN − k 2 −2 ; and the third from N 3 cosets corresponding to all shifts ( ρ+a N , σ+b N , v+c N ), with an overall volume factor υ 2 N −k−4 . Combining these terms and using c k (0) = k, we find that the divergence from the figure-eight degeneration is For q = 6, the divergent term (Λ q−6 2 / q−6 2 ) 2 is replaced by (log Λ) 2 . Combining these results, we can now define the renormalized integral (2.30) by subtracting all divergent contributions before taking the limit Λ → ∞. In the case of the two-loop ∇ 2 F 4 couplings (υ = N ), we obtain 2 ) and O(Λ q−6 ) divergences become logarithmic and doubly logarithmic, cd e e + (log Λ) 2 3k 2 64π 3 δ ab, δ cd , (B.80) where F (p,q) abcd is the regularized integral (B.13). The renormalization of the couplings F abcd and G ab,cd is in fact consistent with supergravity computations [79], as we now explain. Recall that the complete string theory amplitude can be obtained by performing a functional integral over the fields of N = 4 supergravity with 2k −2 vector multiplets, weighted by the Wilsonian effective action computed in string theory. This Wilsonian action can be defined by imposing an infrared cutoff Λ on the moduli space of complex structures, identified with the ultra-violet cutoff in supergravity. It follows that the Λ-dependent couplings such that the UV divergences in the path integral cancel at this order. These divergences cancel for any functions F (2k−2,6) abcd and G (2k−2, 6) ab,cd satisfying their respective differential constraints.
Upon setting F (2k−2,6) abcd and G (2k−2, 6) ab,cd to zero in (B.81), one reproduces precisely the counterterms computed in [79] in four dimensions. The variation of L(Λ) with respect to F (2k−2, 6) abcd is interpreted in supergravity as the form factor for the operator t 8 F 4 (at zero momentum and properly supersymmetrized). Similarly, the variation of L(Λ) with respect to G (2k−2, 6) ab,cd is the form factor for the operator t 8 ∇ 2  Figure 1ii), for which the subdivergence is proportional to the 1-loop counter-term form factor.
Let us now briefly discuss the regularization of the integral (B.70) in the case where the lattice Λ p,q is the non-perturbative Narain lattice (2.3). In this case, the volume factor υ is equal to 1. In this case, the cancellation in (B.76) still takes place in the maximal rank case since the zero-th Fourier coefficient of 1/Φ 10 vanishes from (A.48), but it no longer holds for CHL models with N = 2, 3, 5, 7. Setting υ = 1 in the previous computations, we now get where ς G (p,q) ab denotes the regularized integral (B.17). The maximal rank case is obtained by setting N = 1, and ς G (p,q) ab = G (p,q) ab . Of course, the case relevant for the non-perturbative ∇ 2 (∇φ) 4 coupling in D = 3 corresponds to q = 8, in which case there are power-like divergences but no logarithmic divergence.

B.2.5 Anomalous terms in the differential equation for G ab,cd
In section 3.3 we established that the renormalized integral G (p,q) ab,cd satisfies the differential equation (3.20), with a quadratic source term originating from the separating degeneration locus v = 0. In this section we take into account the boundary of the regularized domain F Λ 2 and show that the equation indeed holds for the renormalized couplings at generic values of q. For q = 5 with υ = N and q = 6 we find additional linear source terms from the non-separating degeneration. For the perturbative amplitude in four dimensions, q = 6, υ = N , these linear term originate from the mixing between the analytic and the non-analytic components of the amplitude. Our analysis parallels that of the D 6 R 4 couplings in [103, §3.3].
In (B.89) we kept the constant term in the Fourier expansions of 1/Φ k−2 and we used ∂ /∂Ω ∼ − i 4 V Ω −1 2 ∂ /∂V . On the boundary at V = τ 2 /Λ, the first term in (B.89) gives (δ ef δ ab δ cd + 2δ e a δ b,|f | δ cd ) R.N. The case q = 6 must be computed separately and turns out to give zero. Finally, the quadratic term in the second line of (3.66) can be written using the regularized genus-one integral F (p,q) abcd (B.15) as Using the action of the operator (3.59) on the tensor defining the counter-terms of G (p,q) ab,cd , one finds that all Λ dependent terms cancel in the differential equation for the renormalized coupling, such that for generic q, The cases featuring logs must be treated separately. Here we shall only discuss the case of the perturbative lattice in four dimensions, i.e. υ = N and q = 6, which is physically relevant.
Because the first term proportional to q − 6 in (B.93) vanishes at q = 6, it does not cancel the finite contribution from (B.87) and one gets an additional linear source term in the equation. The computation of the anomalous terms from the counter-term in G (2k−2,6) ab + ς G (2k−2,6) ab involves the detailed analysis of the integration by part in the boundary between regions F I 2 and F II 2 . Since this boundary is artificial, these anomalous terms must cancel other contributions from (B.86) and (B.89), such that one can assume that G (2k−2,6) ab + ς G (2k−2,6) ab satisfies the naive differential equation (B.93), ignoring the anomalous source term in (B.19). This prescription is in fact necessary for the differential equation to be well defined on the renormalized couplings. In this way we obtain (B.97) where we recall that ∆ ef is a shorthand for the operator in (3.59).

B.3 Loci of enhanced gauge symmetry
Even after regulating infrared divergences occurring at generic points on G p,q , further divergences may occur on loci of enhanced gauge symmetry, where perturbative 1/2-BPS states become massless. Divergences from region F I 2 in (B.71) occur from contributions of lattice vectors Q 2 ∈ Λ such that Q 2 2 = 2. For such vectors, the integral over σ 1 ∈ [0, 1] picks up the polar term in the Fourier-Jacobi expansion (A.57) of 1/Φ k−2 , contributing a term of the form to the modular integral G (p,q) ab,cd . The integral over t diverges on the codimension q locus where |Q 2R | → 0, corresponding to 1/2-BPS states with charge ±Q 2 becoming massless. This is a familiar phenomenon in perturbative heterotic string theory, where such BPS states can be viewed as W-bosons for a SU (2) gauge symmetry which spontaneously broken away from the locus where |Q 2R | = 0. Near the singular locus, the genus-two integral diverges as a sum of powers of the mass M = √ 2|Q 2R |, weighted by the genus-one modular integral appearing in (B.98), which can interpreted as the four-point amplitude with two massless and two massive gauge bosons. Note that this genus-one integral does not suffer from any divergence from the lattice vector Q 1 = Q 2 , since the polynomial P ab,cd in representation vanishes when Q 1 and Q 2 are collinear. Of course, similar gauge symmetry enhancements arise from vectors Q 2 ∈ Λ p,q with Q 2 2 = 2/N , due to the polar term in the Fourier-Jacobi expansion of the images of 1/Φ k−2 under Γ 2,0 (N )\Sp(4, Z).
In addition, the modular integral G (p,q) ab,cd has further singularities from region F II 2 , due to polar terms of the form q −N 1 in the Fourier expansion (A.49) of 1/Φ k−2 , with N 1 , N 2 , N 3 < 0. The integral over Ω 1 picks up contributions of pairs of vectors (Q 1 , Q 2 ) ∈ Λ p,q ⊕ Λ p,q satisfying the level-matching conditions where we denote Q 3 = Q 1 + Q 2 . The remaining integral over Ω 2 is of then the form which for q = 6 has a leading singularity in This integral is singular on the codimension q locus where Q 2 iR = 0 for one index i ∈ {1, 2, 3}, but the corresponding divergence is covered by region I. Genuine new divergences occur in codimension 2q where Q 2 1R = Q 2 2R = 0 for two distinct indices, in which case Q 2 3R automatically vanishes. The latter occurs for (N 1 , N 2 , N 3 ) = (1, 1, 1) and corresponds to a SU (3) gauge symmetry enhancement. Of course, similar divergences arise from pairs of vectors (Q 1 , Q 2 ) ∈ Λ * p,q ⊕ Λ * p,q due to the polar terms in the Fourier expansion of the images of 1/Φ k−2 under Γ 2,0 (N )\Sp(4, Z). It would be interesting to recover (B.101) from a two-loop computation in a super-Yang-Mills theory with SU (3) gauge group.

C Composite 1/4-BPS states, and instanton measure
In this Appendix our main aim is to prove Eqs (5.85) and (5.92), which play a central role in our analysis of the decompactification limit in §5. In particular, they ensure the consistency of the 1/4-BPS Abelian Fourier coefficients of G ab,cd with the differential equation (2.26), (3.20), and the consistency of the helicity supertrace (2.14) with wall-crossing, generalizing the consistency checks of [29] to arbitrary charges Γ. Specifically, we show that the summation measurec(Q, P ; Ω 2 ) for 1/4-BPS Abelian Fourier coefficients of G ab,cd decomposes into an Ω 2 -independent part associated to single-centered 1/4-BPS black holes, and a sum over all possible splittings of a 1/4-BPS charge vector Γ = Γ 1 + Γ 2 into 1/2-BPS charges, Γ 1 and Γ 2 , weighted by the productc(Γ 1 )c(Γ 2 ) of the summation measures for 1/2-BPS black holes. We start by describing the possible splittings of a 1/4-BPS charge Γ = (Q, P ) into 1/2-BPS constituents. Assuming an Ansatz of the form Γ 1 = (p ′ , r ′ )(sQ − qP + tR) and Γ 2 = (q ′ , s ′ )(pP − rQ + uR) for rational coefficients and linearly independent charges (Q, P, R), with R an arbitrary auxiliary charge, it is easy to find that the condition Γ = Γ 1 + Γ 2 fixes t = u = 0 and p ′ , r ′ q ′ , s ′ such that This splitting is conveniently parametrized by the a non-degenerate matrix B = p q r s ∈ M 2 (Z), such that where π 1 = 1 0 0 0 and π 2 = 0 0 0 1 . To parametrize the possible splittings bijectively one must factorize out the stabilizer Stab(π i ) of π 1 and π 2 in M 2 (Z) up to permutation, i.e.

Stab(π
All splittings of a charge Γ are therefore classified by the set of matrices B ∈ M 2 (Z)/Stab(π i ). Decomposing the matrix B as and using Stab(π i ) ∩ GL(2, Z) = Dih 4 one can always choose γ ∈ GL(2, Z)/Dih 4 . 30 We conclude that the possible splittings are in one-to-one correspondence with the elements of (C.5) such that the quantization condition Bπ i B −1 Γ ∈ Λ * m ⊕ Λ m , i = 1, 2 on the charges of the two constituents is obeyed. It suffices to check this condition for i = 1, since the sum of the two is by assumption in Λ * m ⊕ Λ m . 30 One checks indeed that the quotient by Dih4 passes to the right of γ, by changing the representatives γ and j/ gcd(j, k) for 0 1 1 0 ∈ Dih4.

C.1 Maximal rank
In the maximal rank case the condition These splittings are all related by GL(2, Z) to a canonical splitting Denoting by ∆C(Q, P ; Ω 2 ) =C(Q, P ; Ω 2 ) − the contribution from the poles of 1/Φ 10 on the second line of (5.25) to the measure factor (5.74) we thus find ∆C(Q, P ; Ω 2 ) = where we combined the sum over A ∈ M 2 (Z)/GL(2, Z) and the sum over γ ∈ GL(2, Z)/Dih 4 into the sum over Aγ ∈ M 2 (Z)/Dih 4 that we call A again, Further decomposing the sum over A as parametrizing the splittings, one obtains ∆C(Q, P ; Ω 2 ) =

C.2 Γ 0 (N) orbits of splittings
For CHL orbifolds the charge quantization condition Bπ i B −1 Γ ∈ Λ * m ⊕ Λ m for the splitting (C.6) does not reduce to a single condition. They will depend on the charge orbit, as well as on its twistedness, and only if γ ∈ Z 2 ⋉ Γ 0 (N ) ⊂ GL(2, Z), the quantization condition Bπ i B −1 Γ ∈ Λ * m ⊕ Λ m reduces to aP −cQ k ′ ∈ Λ * m . Therefore it will be more convenient to decompose M 2 (Z)/Stab(π i ) into orbits of γ ∈ Γ 0 (N )/Z 2 acting on the left. 31 Therefore we choose to decompose the splitting matrix as if (p,r) gcd(p,r) = ( * , 0) mod N , and otherwise. In the former case the splitting can be rotated under Γ 0 (N ) to the canonical splitting (C.7), such that Γ 1 is in the Γ 0 (N ) orbit of a purely electric charge. In this case we say that Γ 1 is of electric type and we call (C.7) 'splitting of electric type'. This splitting exists if and only if P/k ′ ∈ Λ * m . In contrast, the splitting (C.13) can be rotated under Γ 0 (N ) to the canonical form such that Γ 1 is in the Γ 0 (N ) orbit of a purely magnetic charge. We then way Γ 1 is of magnetic type and we call (C.14) a 'splitting of magnetic type'. This splitting exists if and only if Q/k ′ ∈ Λ m . Note that the second charge Γ 2 can be either of electric or of magnetic type in both types of splitting. In fact, we shall see that a splitting of mixed type, such that one charge is of electric type and the other of magnetic type, can be rotated by a suitable γ ∈ Γ 0 (N ) into either type of splittings. We drop the primes on (j ′ , k ′ ) in this discussion to simplify the notation, with the understanding that k and j are now relative prime. In the electric type, a splitting matrix with k = 0 mod N , such that j k 1 k P is of electric type, can be rotated by a Γ 0 (N ) element to another splitting of electric type with 0 ≤ < k, j + bk = 1. In the case where k = 0 mod N , such that j k 1 k P is of magnetic type, an element of Γ 0 (N ) rotates it to a splitting of magnetic type This can be understood as follows: in (C.15), the second charge in the splitting is also electric since k = 0 mod N , and thus exchanging (Q 1 , P 1 ) with (Q 2 , P 2 ) preserves the type of the splitting; in (C.16), the second charge is magnetic since k = 0 mod N , and thus exchanging the two charges of the splitting sends the splitting of electric type to a splitting of magnetic type. The same reasoning applies to the splitting of magnetic types: when j = 0 mod N , such that k j 1 k Q is of electric type, one has 0 with d = 0 mod N , 0 ≤ < k, and when j = 0 mod N , such that k j 1 with c = 0 mod N , 0 ≤ < N k and j + ck = −1.
It follows from this discussion that the splittings are in one-to-one correspondence with the cosets where the splittings of mixed type are included either in the electric type or the magnetic type. In the following we shall consider both representatives, keeping in mind that we systematically double-count the splittings of mixed type in this way.

C.3 Factorization of the measure factor
We now discuss the factorization of the measure factor associated to the poles of 1/Φ k−2 and 1/Φ k−2 for |Ω 2 | > 1 4 displayed in (5.75). In this subsection we show that whenever a term in the measure associated to the charge Γ factorizes, it produces the correct measure factor of the corresponding 1/2-BPS charges Γ i .
• For the third term in the measure (5.75), it is convenient to consider insteadÃ = 1 0 0 N A ∈ M 2,00 (N ) such that A∈M 2 (Z)/GL(2,Z) A matrixÃ ∈ M 2,00 (N ) admits either a decomposition with γ ∈ Γ 0 (N ) such that or a decomposition with γ ∈ Γ 0 (N ) such that For the splitting matrix of electric type (C.25), the charge Γ 1 is of electric type with with the divisor integer d 1 = p ′ ; and either the second charge Γ 2 is of electric type, with kN gcd(j,kN ) = 0 mod N and with the divisor integer d 2 = gcd(j, N k), or Γ 2 is of twisted magnetic type with kN gcd(j,kN ) = 0 mod N and with the divisor integer d 2 = gcd(j, N k)/N . For the splitting matrix of magnetic type (C.27) the first charge Γ 1 is of untwisted magnetic type with with the divisor integer d 1 = p ′ ; and either the second charge Γ 2 is of electric type, with N j gcd(N j,k) = 0 mod N and with the divisor integer d 2 = gcd(N j, k), or Γ 2 is of twisted magnetic type with N j gcd(N j,k) = 0 mod N and with the divisor integer d 2 = gcd(N j, k)/N . • At last we consider the second term in (5.75), which is a combination . We combine the sum over A ∈ M 2,0 (Z)/[Z 2 ⋉ Γ 0 (N )] and the sum over γ ∈ Γ 0 (N )/Z 2 in (5.58) to get A matrix in A ∈ M 2,0 (N ) admits one of the following decompositions with respect to γ ∈ Γ 0 (N ): 1.
, and Γ 2 is either of , and Γ 2 is either of untwisted electric type with

4.
, and Γ 1 is either of elec- We conclude that after trading each of the sums over A as sums over splitting matrices B, the contribution from (5.75) gives a term of the form to the last line in (5.92), where c ′ (Γ i ) is either when the contribution is only non-vanishing for untwisted charge Γ i , or for generic contribution such the charge Γ i is either twisted or untwisted. It remains to show that the three terms in the measure count all the possible splittings with the correct multiplicity, so as to reproduce the product of the summation factors of formula (2.22) for the two charges Γ i .

C.4 Electric-magnetic type of splittings
We summarize the conditions from the three terms in (5.75) to contribute to a given splitting in Table 2, where for the second term we distinguish the cases where Table 2: Γ 0 (N ) orbits of splittings from the three terms in (5.75). The first column indicates the support of B −1 (Q, P ). The second and third columns give the corresponding constraints on Γ 1 , Γ 2 , for each of the two possible splittings (C.7) and (C.14). The last column records the counting function. We write k = N k ′ and j = N j ′ whenever k or j are forced to be multiple of N . O ij is used in the text to denote in the table above contribution from row i and column j.
For this purpose we enumerate the possible 1/4-BPS charges Γ and the type of 1/2-BPS charges they can possibly split into, i.e. twisted or untwisted, electric or magnetic. It will be convenient to introduce some notation for classifying pairs of 1/2-BPS charges: for each type of splitting we define a 2-component vector which first component accounts for the electric type charges and the second for the magnetic type charges, with a U for untwisted and a T for twisted. e.g.
We shall enumerate the possible splittings according to the following graph of inclusions, We will denote X ∈ Λ the strict inclusion of the vector X in Λ, meaning that X is a generic vector in Λ and does not belong to a smaller latticeΛ in this sequence In the following, it will be convenient to recall the generating function whose Fourier coefficients give the contribution to the measure. According to table 2, the factorizations (A. 44) imply that when the condition is 1 , the corresponding measure factor for the Electric-type splitting : the first charge in (C.7) is purely electric and thus untwisted in both O 11 and O 21 , the second one is congruent to an electric charge for k = 0 mod N , and a magnetic one otherwise. But since P ∈ Λ m , 1 k P ∈ Λ m implies that k = 0 mod N , and thus the second charge in (C.7) is magnetic-twisted. O 11 and O 21 combine together to give (U, T ) splittings with measure factor (c T (Γ 1 ) + c U (Γ 1 ))c T (Γ 2 ) coming from Fourier Magnetic-type splitting : the first charge in (C.14) is purely magnetic, and thus twisted for O 32 , untwisted for O 22 , and can be either twisted or untwisted for O 12 , the second 1/2-BPS charge is congruent to a magnetic-untwisted charge for j = 0 mod N , and electric-twisted otherwise.
This concludes the proof of formula (5.92). As a consistency check, we note that these results are consistent with Fricke duality. Namely, for 1/4-BPS charges belonging to Frickeinvariant subsets, such as (Q, P ) ∈ Λ * m ⊕ Λ m or (Q, P ) ∈ Λ m ⊕ N Λ * m , the possible splittings are invariant under the exchange of electric and magnetic type; whereas for charges in subsets that are exchanged under Fricke duality, as (Q, P ) ∈ Λ m ⊕ N Λ m and (Q, P ) ∈ N Λ * ⊕ N Λ * , the possible splittings are themselves exchanged under Fricke duality. Moreover, we find that all the splittings of electric-magnetic type are correctly double-counted through the splitting matrices of electric and magnetic type, consistently with (C.19).

D Two-instanton singular contributions to Abelian Fourier coefficients
In this section, we extract the contributions to the rank-2 Abelian Fourier modes from the Dirac delta functions in the Poincaré series representation (5.25), (5.57) of the Fourier coefficients of 1 Φ k−2 .

D.2 Measure factorization in CHL orbifolds
For CHL orbifolds, the contributions from the Dirac delta functions in (5.57) and (5.58) to the Fourier mode (5.56) can be computed similarly to the full rank case (D.4) by using the results of Appendix C. Here we explain the factorization of the measure for a general lattice Λ p−2,q−2 of signature (p − 2, q − 2), which we denote by Λ for short. When the lattice is N -modular, as in the case of the magnetic lattice Λ m discussed in section C, one can rewrite the measure in a form manifestly invariant under Fricke electro-magnetic duality. However, this is not the case in generic signature. In this section we use the results of the previous section to write the 1/2-BPS charge measure factors coming from the different orbit terms in (5.64). By abuse of language we shall refer to the charges (Q, P ) ∈ Λ * ⊕ Λ components as electric and magnetic, although this terminology is only accurate when q = 8. For the most generic lattice vectors, namely (Q, P ) ∈ Λ * ⊕ Λ, the only matrices A which contribute belong either to the electric first orbit of the second set of splittings (C.36), or the but for simplicity we shall only consider the components G µν,σρ , G µν,γδ and G αβ,γδ that admit a non-trivial constant term. The differential operator D (µĉ D ν)ĉ G ab,cd acts diagonally on the various components of fixed number of indices along the Grassmanian, so it is consistant to only consider the components with an even number of indices along the sub-Grassmaniann in the differential equation (3.20). Using the Fourier decompositions  It is a non-trivial task to compute these Fourier coefficients from the explicit non-Abelian Fourier coefficients of the tensor F abcd , which we shall attempt to carry out in this paper. Introducing for brevity the vector G Γ G Γ = (G Γ ρσ,τ υ , G Γ ρσ,γδ , G Γ αβ,γδ ) , (E. 15) we find that the differential operator with two indices along the sub-Grassmaniann acts on is a specific solution of the Laplace equation It is then straightforward to find a particular solution to Eq. (E.17) G 0 µν,ρσ = −3πe 2(6−q)φ δ µν, δ ρσ 8−q 2 2 E(S) 2 − 2D κλ E(S)D κλ E(S) , G 0 µν,γδ = − π 6 e (4−q)φ 8−q 2 δ µν − 2D µν E(S)G γδ (ϕ) − 2πe 2(6−q)φ δ γδ E(S) 8−q 2 δ µν − 2D µν E(S) , G 0 αβ,γδ = e −4φ G αβ,γδ (ϕ) − π 2 e (4−q)φ E(S)δ αβ, G γδ (ϕ) − 3πe 2(6−q)φ δ αβ, δ γδ E(S) 2 , (E. 21) with G αβ,γδ (ϕ) solution to an equation analogue to (3.20) with source term quadratic in F αβγδ (ϕ), and G αβ (ϕ) solution to the equation on the sub-Grassmaniann G p−2,q−2 2D (γα D δ)α G αβ = 4−q 2 δ γδ G αβ + (6 − q)δ γ)(α G β)(δ + δ αβ G γδ + 12F αβγδ .
(E. 33) Acting with this differential operator on R 8 L(A −⊺ Ω 2 A −1 ) one obtains which allows to rewrite (E.34) as a total derivative in Ω 2 , .

(E.35)
By integration by parts, it follows that the Fourier coefficient would satisfy the homogeneous differential equation if the Fourier coefficient C A −1 Q 2 Q · P Q · P P 2 A −⊺ ; Ω 2 did not depend on Ω 2 . We shall now show that the dependence of the Fourier coefficients of 1/Φ 10 in Ω 2 , due to the poles at large |Ω 2 | accounts for the appearance of the quadratic source term in the differential equation. Using (5.25) and (A.90), we obtain G (p,q) (Q, P ) = R 8 A∈M2(Z)/GL(2,Z) +O(e −R 2 ) . (E.36) The differential operator (E.35) annihilates the finite part of the Fourier coefficient, and gives D µâ D νâ + (q − 5)δ µν G (p,q) (Q, P )e 2πi(Qa 1 +P a 2 ) = − 1 2 where the differential operator acting on the first term in (E.36) gives a total derivative, while the second term factorizes after integrating the Dirac delta function, and the third is integrated by part using d dΩ 2 sign(tr 0 1/2 1/2 0 Ω 2 ) = δ(v 2 ) 0 1 1 0 and vA 0 1 1 0 A ⊺ v ⊺ A −1 Q 2 Q · P Q · P P 2 A −⊺

12
= 2vAπ (1 A −1 Q 2 Q · P Q · P P 2 A −⊺ π 2) A ⊺ v ⊺ . (E.38) Further using (E.34) to express D µâ D νâ + (d − 5)δ µν L(A −⊺ ρ 2 0 0 σ 2 A −1 )e 2πi(Qa 1 +P a 2 ) , and inserting π 1 + π 2 = 1 on both sides of (E. 35), we see that the terms which involve two powers of π 1 or two powers of π 2 cancel out since they are total derivatives with respect to ρ 2 or to σ 2 , leaving only terms involving one factor of π 1 and one factor of π 2 : D µâ D νâ + (q − 5)δ µν G (p,q) (Q, P )e 2πi(Qa 1 +P a 2 ) = − π 2 A∈M2(Z)/Dih4 where in the last step we recognized Q 2 + Q 2 R = Q 2 L . Defining for i = 1 or 2 the tensors Thus, we have shown that the abelian Fourier coefficients with generic 1/4-BPS charge are consistent with the differential constraint (3.20). This is a strong consistency check on the validity of the unfolding method in this sector.
E.4 Differential equation in the degeneration O(p, q) → O(p − 1, q − 1) We now briefly discuss the consistency of the constant terms (4.20) computed in §4 with the differential equation (3.20). We follow [22, §B] for the parametrization of the Grassmannian and of the decomposition of the covariant derivative operators. The operator D ab decomposes into D 11 , D 1β , D α1 , D αβ acting on any vector F a = (F 1 , F α ), and on any vector Fb = (Fβ, F1), as whereas D αβ reduce to the differential operators on the sub-Grassmannian that act on the projectors p I L γ , p I Rα : D αβ p I L γ = 1 2 δ αγ p I Rβ , D αβ p I Lα = 1 2 δβαp I R α . (E. 45) In this decomposition, the tensor G ab,cd admits 3 independent components G 11,γδ , G 1β,γδ and G αβ,γδ , but only the first and last have a non-trivial constant term. Using the Fourier decomposition G ab,cd = Q∈Λ * G Q ab,cd e 2πiQ·a , F abcd = Q∈Λ * F Q abcd e 2πiQ·a , (E. 46) we obtain that the first component of (3.20) with (e, f ) = (1, 1) reads where the sum over k in the r.h.s. runs over all indices α and 1.

F Beyond the saddle point approximation
In the analysis of the large radius limit of the genus-two modular integral in §5.1, we neglected the dependence of the Fourier coefficients C k−2 (n, m, L; Ω 2 ) of the meromorphic Siegel modular form 1/Φ k−2 on Ω 2 , and evaluated the integral over Ω 2 arising in the Abelian rank-two orbit in terms of a matrix variate Bessel function. Since the integral over Ω 2 is dominated by a saddle point at large R, and since C k−2 (n, m, L; Ω 2 ) is constant in the vicinity of the saddle point (at least at generic point in the moduli space G 4 /K 4 ) , this approximation correctly captures the leading behavior of order e −2πRM(Q,P ) at large R, as well as the infinite series of perturbative corrections around the saddle point. As a result of the poles in 1/Φ k−2 however, the Fourier coefficient C k−2 (n, m, L; Ω 2 ) is only locally constant, and this approximation misses contributions from the region where this Fourier coefficient differs from its saddle point value. Here we shall estimate these effects and find that 1. poles occuring at large |Ω 2 | give rise to contributions of order e −2πR(M(Q 1 ,P 1 )+M(Q 2 ,P 2 )) for all possible splittings (Q, P ) → (Q 1 , P 1 ) + (Q 2 , P 2 ) of the total charge into a pair of 1/2-BPS charges; these contributions are subleading away from the walls of marginal stability, but crucial for the smoothness of the physical couplings across the wall; 2. deep poles occuring at |Ω 2 | ≤ 1 (2n 2 ) 2 give rises to subleading contributions exponentially suppressed in e −4π|n 2 |R 2 which can be interpreted as |n 2 | pairs of Taub-NUT instantons and anti-instantons.
In either case, the gist of the argument is as follows: one decomposes the integral where Ω * 2 (W k ) is the minimum of S[Ω] on W k .

F.1 Poles at large |Ω 2 |
Recall that the saddle point lies at where A is a non-generate integer matrix, which we decompose as A = 1 j It is straightforward to compute the minimum of the action on the surface parametrized by σ 2 and ρ 2 , because the matrices in the traces are then diagonal. The minimum is reached at which we recognize as the sums of the actions associated to 1/2-BPS states with charge (Q 1 , P 1 ) = (Q − j k P, 0) and (Q 2 , P 2 ) = ( j k P, P ), as announced. Taking j = 0 for simplicity and parametrizing the distance away from the divisor v = 0 by ǫ such that the perturbation of the action at small v 2 gives For ǫ small enough, i.e. Ω * 2 close enough to the wall v 2 = 0, one sees indeed that the action increases monotonically away from the wall, and therefore, the minimum of the action in the neighboring chamber must indeed be reached along the wall. All the other cases are then determined from this one by SL(2, Z).
In order to bound the contribution from this region, we shall look for the minimum of the action (F.5) on the domain P 2 with |Ω 2 | < 1 (2n 2 ) 2 . For simplicity we consider the case A = 1, but the argument is general. Extremizing over τ in the parametrization (F.11) one obtains the solution at which point the action becomes (F.14) At large R the action grows monotonically in V , so the minimum of the action on the domain V ≥ 2|n 2 | is reached on the boundary at V = 2|n 2 |, where it evaluates to S[τ * , 2|n 2 |] = (2n 2 R 2 ) 2 + 2R 2 |Q R + SP R | 2 S 2 + 1 n 2 2 |Q R ∧ P R | 2 .
(F. 15) The correction in this domain are therefore exponentially suppressed as e −4πR 2 |n 2 | , which is the expected magnitude of a contribution for |n 2 | pairs of Taub-NUT instanton anti-instantons.