Multiple D3-instantons and mock modular forms I

# Multiple D3-instantons and mock modular forms I

Sergei Alexandrov, Sibasish Banerjee, Jan Manschot, Boris Pioline
Laboratoire Charles Coulomb (L2C), UMR 5221 CNRS-Université de Montpellier, F-34095, Montpellier, France
IPhT, CEA, Saclay, Gif-sur-Yvette, F-91191, France
School of Mathematics, Trinity College, Dublin 2, Ireland
CERN PH-TH, Case C01600, CERN, CH-1211 Geneva 23, Switzerland
Laboratoire de Physique Théorique et Hautes Energies, CNRS UMR 7589,
Université Pierre et Marie Curie, 4 place Jussieu, 75252 Paris cedex 05, France

e-mail: , , ,
###### Abstract:

We study D3-instanton corrections to the hypermultiplet moduli space in type IIB string theory compactified on a Calabi-Yau threefold. In a previous work, consistency of D3-instantons with S-duality was established at first order in the instanton expansion, using the modular properties of the M5-brane elliptic genus. We extend this analysis to the two-instanton level, where wall-crossing phenomena start playing a role. We focus on the contact potential, an analogue of the Kähler potential which must transform as a modular form under S-duality. We show that it can be expressed in terms of a suitable modification of the partition function of D4-D2-D0 BPS black holes, constructed out of the generating function of MSW invariants (the latter coincide with Donaldson-Thomas invariants in a particular chamber). Modular invariance of the contact potential then requires that, in case where the D3-brane wraps a reducible divisor, the generating function of MSW invariants must transform as a vector-valued mock modular form, with a specific modular completion built from the MSW invariants of the constituents. Physically, this gives a powerful constraint on the degeneracies of BPS black holes. Mathematically, our result gives a universal prediction for the modular properties of Donaldson-Thomas invariants of pure two-dimensional sheaves.

preprint: L2C:16-056
IPhT-T16/037
TCDMATH 16-08
CERN-TH-2016-121
arXiv:1605.05945v2

## 1 Introduction

The low energy effective action of type II string theory compactified on a Calabi-Yau threefold is determined by the metric on the moduli space, which is a direct product of its vector multiplet and hypermultiplet components. Whereas the former is classically exact, the hypermultiplet moduli space receives a variety of quantum corrections (see e.g. [1, 2] and references therein). In type IIB string theory, if the volume of the Calabi-Yau threefold is taken to be large in string units, these quantum corrections can be ordered according to the following hierarchy: i) one-loop and D(-1) instanton corrections, ii) string instantons, iii) D3-instantons, iv) five-brane instantons. All these corrections are expected to be governed by topological invariants of , including its intersection form , Euler number , Chern classes , genus zero Gromov-Witten invariants and Donaldson-Thomas (DT) invariants .111Here the index runs over , labels effective homology classes , labels vectors in the homology lattice , and are complexified Kähler moduli. In addition, they are severely constrained by the fact that the exact metric on should be quaternion-Kähler [3] and smooth across walls of marginal stability [4, 5] in spite of the discontinuities of the DT invariants . Most notably, it should carry an isometric action of the modular group [6], originating from the S-duality symmetry in uncompactified type IIB string theory.

In order to satisfy the first requirement, it is most convenient to use the twistorial formulation of quaternion-Kähler manifolds [7, 8]. In this framework, quantum corrections to the metric on are captured by a set of holomorphic functions on the twistor space of , which encode gluing conditions between local Darboux coordinate systems for the canonical complex contact structure on . Furthermore, discrete isometries of must lift to holomorphic coordinate transformations on preserving the contact structure, which constrains the possible gluing conditions. In the presence of a continuous isometry, another important object, central for this work, is the contact potential , a real function on , defined as the norm of the moment map for the corresponding isometry [8, 9]. Its importance lies in the fact that it provides a Kähler potential on , and that it must be invariant under any further discrete isometry, up to a rescaling dictated by the transformation of the contact one-form. In the present context, the isometry corresponds to translation along the NS axion, which is broken only by five-brane instantons, while the contact potential determines the 4-dimensional string coupling.

Since the action of the modular group preserves the large volume limit, modular invariance should hold at each level in the aforementioned hierarchy of quantum corrections. For the first two levels, modular invariance was used in [6] to infer the D(-1) and -string instanton corrections from the known world-sheet instantons at tree-level and the one-loop correction. The contributions of D3 and D5 instantons were then deduced by requiring symplectic invariance and smoothness across walls of marginal stability [5, 10]. The consistency of D3-instantons with S-duality however depends on special properties of the DT invariants , where in this case labels the charges of a D3-D1-D(-1) instanton, or more mathematically, the Chern character of a coherent sheaf with support on an effective divisor in .

In order to study this problem, it is useful to express the DT invariants , which in general exhibit wall-crossing behavior with respect to the Kähler moduli , in terms of the so-called Maldacena-Strominger-Witten (MSW) invariants , familiar from the study of the partition function of D4-D2-D0 black holes [11]. Unlike DT invariants, MSW invariants are independent of the moduli. Moreover, in the case where the divisor wrapped by the D4-brane is irreducible (in the sense that cannot be written as the sum of two effective divisors)222This irreducibility condition has not been fully appreciated in the past, and part of the present work aims at relaxing it., the MSW invariants appear as Fourier coefficients of a modular form, namely the elliptic genus of the superconformal field theory describing an M5-brane wrapped on [11]. More precisely, the elliptic genus decomposes into333 The elliptic genus is usually a function of the modular parameter and of complex parameters coupling to conserved currents in the SCFT, and transforms as a Jacobi form of fixed weight and index. In contrast, the function defined in (1.1) depends on the Kähler moduli and RR potentials at spatial infinity, which decouple in the near-horizon geometry, and transforms as an ordinary modular form of weight . The standard elliptic genus is obtained by specializing to the large volume attractor point with , setting and analytically continuing in . With this understanding, we shall nonetheless refer to (1.1) as the elliptic genus of the M5-brane SCFT. Incidentally, we warn the reader that our definition of theta series is complex conjugate of the usual one used in [12]. This avoids a proliferation of complex conjugations and facilitates comparison with the results of the twistorial formalism.

 χp(τ,za,ca)=∑μ∈Λ⋆/Λhp,μ(τ)θp,μ(τ,ta,ba,ca), (1.1)

where is the Siegel theta series (2.22), a vector-valued modular form of weight , and is the generating function (2.21) of MSW invariants. When is irreducible, is a holomorphic vector-valued modular form of weight , so that transforms as a modular form of weight , as expected from the elliptic genus of a standard SCFT [13, 14, 15].

DT invariants coincide with MSW invariants at the ‘large volume attractor point’, but in general receive additional contributions proportional to products of MSW invariants with moduli-dependent coefficients, corresponding to black hole bound states [16, 17]. The D3-instanton corrections to the metric can thus be organized as an infinite series in powers of MSW invariants, corresponding to multi-instanton effects. In [12] we considered the one-instanton approximation (and large volume limit) of the D3-instanton corrected metric on , keeping only the first term of the expansion (2.14) of DT invariants in terms of MSW invariants. Relying on the modular properties of MSW invariants encoded in the elliptic genus (1.1), we showed that in this approximation, the metric on admits an isometric action of the modular group. This result was achieved by showing that S-duality acts on the canonical Darboux coordinates on introduced in [5, 10] by a holomorphic contact transformation. While the transformation properties of Darboux coordinates are, already at the classical level, quite complicated, S-duality requires that the contact potential should transform in a simple way, namely as a modular form of weight . In [12] we proved that this is the case by showing that the contact potential is directly related to the elliptic genus (1.1) via the action of a modular covariant derivative.

In this paper, we study the corrections to the metric on at the two-instanton level, i.e. at order in the expansion in powers of MSW invariants. The analysis of the transformation properties of Darboux coordinates and a complete proof of the existence of an isometric action of S-duality on is deferred to a subsequent paper [18]. In this paper, we shall restrict our attention to the contact potential, which is much simpler but yet encodes all possible quantum corrections.

At two-instanton order, we must take into account both corrections to the contact potential which are quadratic in the DT invariants, and order contributions in the relation between DT and MSW invariants. Our main result is as follows: the contact potential can be expressed in terms of the modular covariant derivative of the following BPS partition function

 ˆZp=∑μ∈Λ⋆/Λˆhp,μθp,μ+12∑p1+p2=p∑μi∈Λ⋆/Λiˆhp1,μ1ˆhp2,μ2ˆΨp1,p2,μ1,μ2+⋯, (1.2)

where the dots denote terms of higher order in . Here two new objects are introduced:

• is the non-holomorphic theta series constructed in [16] for the lattice of signature spanned by the D1-brane charges of the two constituents. It transforms as a vector valued modular form of weight and captures the wall-crossing dependence of due to two-center black hole solutions (or equivalently two-centered D3-instantons).

• , where is a non-holomorphic function of constructed out of the MSW invariants,

 Rp,μ(τ) = −14π∑p1+p2=p∑μi∈Λ⋆/Λihp1,μ1(τ)hp2,μ2(τ)∑ρ∈(Λ1−~μ)∩(Λ2+~μ)(−1)Sp1,p2(μ1,μ2,ρ) (1.3) ×∣∣Sp1,p2(μ1,μ2,ρ)∣∣β32⎛⎝2τ2(Sp1,p2(μ1,μ2,ρ))2(pp1p2)⎞⎠eπiτQp1,p2(ν1,ν2),

where is the function defined in (2.29) and the definitions of other notations can be found in Appendix B.

When the effective divisor is irreducible, the sum over is empty so that and the second term in (1.2) vanish and reduces to the elliptic genus (1.1). If on the contrary can be decomposed into a sum of two effective divisors , then modular invariance of the contact potential requires that the non-holomorphic function must transform as a (vector-valued) modular form of weight . This shows that the holomorphic generating function is not a modular form, but rather a (mixed) mock modular form [19, 20].

A similar modular anomaly was in fact observed long ago for the partition function of topologically twisted Yang-Mills theory with gauge group on a complex surface in [21] and, more recently, in [22]. This set-up was related to the case of multiple M5-branes wrapped on a rigid divisor in a non-compact threefold in [23, 24]. For M5-branes wrapped on non-rigid divisors in an elliptically fibered compact threefold, such an anomaly was also argued to appear in [25] using the holomorphic anomaly in topological string theory [26] and T-duality. However in the latter context the anomaly is of quasi-modular type rather then mock-modular.

Modular or holomorphic anomalies are also known to occur in the context of quantum gravity partition functions for AdS/CFT [27], non-compact coset conformal field theories [28], and partition functions for BPS black holes in supergravity [29]. In the context of black hole partition functions, the non-holomorphic completion was related to the spectral anomaly in the continuum of scattering states in [30]. Our result shows that modular or holomorphic anomalies generally affect M5-branes or D4-branes wrapped on reducible divisors in an arbitrary compact Calabi-Yau threefold, and gives a precise prediction for the modular completion in the case where is the sum of two irreducible divisors. Physically, this gives a powerful constraint on the degeneracies of D4-D2-D0 brane black holes composed of two D4-branes. In particular, the mock modularity of affects the asymptotic growth of the degeneracies [31]. Mathematically, upon re-expressing the MSW invariants in terms of DT-invariants, our result gives a universal prediction for the modularity of DT invariants for pure 2-dimensional sheaves, which is receiving increasing attention from the mathematics community, see e.g. [32, 33, 34, 35, 36]. Using similar techniques, it should be possible in principle to determine the modular anomaly in the case where can split into a sum of more than two irreducible divisors.

The organization of the paper is as follows. In section 2 we discuss the BPS invariants counting D3-brane instantons and associated modular forms. In section 3, we review the twistorial formulation of the D-instanton corrected hypermultiplet moduli space of type IIB string theory compactified on a Calabi-Yau threefold. Then in section 4 we compute the D3-instanton contribution to the contact potential in the two-instanton approximation and express it in terms of . Finally, we conclude in section 5. Appendices A, B and C contain some useful material and details of our calculations.

## 2 BPS invariants for D3-instantons and mock modularity

In this section, we discuss the modular properties of the BPS invariants which control D3-brane instanton corrections to the hypermultiplet moduli space in type IIB string theory compactified on a Calabi-Yau threefold . The same invariants also control the degeneracies of D4-D2-D0 black holes in type IIA string theory compactified on the same threefold . When the D3-brane wraps a primitive effective divisor444We will identify a divisor with its class in . We call a divisor irreducible if it is an irreducible analytic hypersurface of [37]. Let be a set of irreducible divisors forming a basis of . Then a divisor is effective if for all , and not all equal to simultaneously. We call a divisor primitive if gcd=1. , these invariants are claimed to be Fourier coefficients of a vector-valued modular form. Instead, we will argue that, when is the sum of irreducible divisors, the invariants are the coefficients of the holomorphic part of a real-analytic modular form. For , we show that this holomorphic part is in fact a mixed mock modular form, whose modular anomaly is controlled by the invariants associated to .

### 2.1 D3-instantons, DT and MSW invariants

Let us first introduce some mathematical objects and notations relevant for D3-instantons. As in [12], we denote by an integer irreducible basis of , their Poincaré dual 2-forms, an integer basis of , their Poincaré dual 4-forms, and the volume form of such that

 ωa∧ωb=κabcωc,ωa∧ωb=δbaωY,∫γaωb=∫γbωa=δab, (2.1)

where is the intersection form, integer-valued and symmetric in its indices. For brevity we shall denote and .

A D3-instanton is described by a coherent sheaf of rank supported on a divisor . The homology class of the divisor may be expanded on the basis of 4-cycles as . We assume that is effective, and furthermore that its Poincaré dual belongs to the Kähler cone,

for all effective divisors and effective curves . We expect however that our results can be generalized to cases where lies on the boundary of the Kähler cone.

The D-brane charges are given by the components of the generalized Mukai vector of on a basis of ,

 γ=chE√TdY=paωa−qaωa+q0ωY, (2.3)

where . The charges satisfy the following quantization conditions555The electric charges and (denoted by in [38]) are not integer valued. They are related to the integer charges which appear naturally on the type IIA side by a rational symplectic transformation [38].

 pa∈Z,qa∈Z+12κabcpbpc,q0∈Z−124pac2,a. (2.4)

We denote the corresponding charge lattice by , and its intersection with the Kähler cone (2.2) by . Upon tensoring the sheaf with a line bundle on , with , the magnetic charge is invariant, while the electric charges vary by a ‘spectral flow’

 qa↦qa−κabcpbϵc,q0↦q0−ϵaqa+12κabcpaϵbϵc. (2.5)

This transformation leaves invariant the combination

 ^q0≡q0−12κabqaqb, (2.6)

where is the inverse of , a quadratic form of signature on . We use this quadratic form to identify and , and use bold-case letters to denote the corresponding vectors. We also identify with its image in . Note however that the map is in general not surjective: the quotient is a finite group of order . The transformation (2.5) preserves the residue class defined by

 qa=μa+12κabcpbpc+κabcpbϵc,ϵ∈Λ. (2.7)

We note also that the invariant charge is bounded from above by .

The contribution of a single D3-instanton to the metric on is proportional to the DT invariant , which is the (weighted) Euler characteristic of the moduli space of semi-stable sheaves with fixed Mukai vector . The relevant stability condition is -stability [39], which reduces to slope stability in the large volume limit. The latter stability condition states that for each subsheaf the following inequality is satisfied

 (q′a+(bp′)a)ta(p′t2)≤(qa+(bp)a)ta(pt2). (2.8)

It is useful to define the rational DT invariant [40, 41, 42],

 ¯Ω(γ;z)=∑d|γ1d2Ω(γ/d;z), (2.9)

which reduces to the integer-valued DT invariant when is a primitive vector, but is in general rational-valued. Both and are piecewise constant as a function of the complexified Kähler moduli , but are discontinuous across walls of marginal stability where the sheaf becomes unstable, i.e. the codimension-one subspaces of the Kähler cone across which the inequality (2.8) flips. and are in general not invariant under the spectral flow (2.5), but they are invariant under the combination of (2.5) with a compensating shift of the Kalb-Ramond field, .

A physical way to understand the moduli dependence of is to note that the same invariant counts D4-D2-D0 brane bound states in type IIA theory compactified on the same CY threefold . The mass of a single-particle BPS state is equal to the modulus of the central charge function (where and is the derivative of the holomorphic prepotential ). Some of these single-particle BPS states may however arise as bound states of more elementary constituents with charge such that . Typically, these bound states exist only in some chamber in Kähler moduli space, and decay across walls of marginal stability where the central charges become aligned, so that the mass coincides with the sum of the masses of the constituents. A similar picture exists for D3-instantons, where the modulus of the central charge controls the classical action, but the analogue of the notion of single-particle state is somewhat obscure.

At the special value of the moduli given by the attractor mechanism [43], no bound states exist, and therefore counts elementary states, which cannot decay. Since we are only interested in the large volume limit, we define the ‘MSW invariants’ as the DT invariants evaluated at the large volume attractor point,

 z∞(γ)=limλ→+∞(b(γ)+iλt(γ))=limλ→+∞(−q+iλp). (2.10)

The reason for the name MSW (Maldacena-Strominger-Witten) is that when corresponds to a very ample primitive divisor, these states are in fact described by the superconformal field theory discussed in [11]. It is important that, due to the symmetry (2.5), only depend on and defined in (2.6) and (2.7). We shall therefore write .

Away from the large volume attractor point (but still in the large volume limit), the DT invariant receives additional contributions from bound states with charges such that and for each . For , the case of primary interest in this work, bound states exist if and only if the sign of is equal to the sign of [44]. In the large volume limit, one has

 Im(Zγ1¯Zγ2)=−12√(p1t2)(p2t2)(pt2)Iγ1γ2, (2.11)

where666It is worth recognizing that is equal to the large volume limit of the binding energy (as follows from (2.16) and (B.1)). In particular, it vanishes on the wall of marginal stability.

 Iγ1γ2=(p2t2)(q1,a+(bp1)a)ta−(p1t2)(q2,a+(bp2)a)ta√(p1t2)(p2t2)(pt2) (2.12)

is invariant under rescaling of . It is convenient to define the ‘sign factor’

 Δtγ1γ2=12(sgn% (Iγ1γ2(t))−sgn% (⟨γ1,γ2⟩)), (2.13)

where we indicated explicitly the dependence on the Kähler moduli. This factor takes the value when bound states are allowed, or otherwise. The DT invariants are then expressed in terms of the MSW invariants by [16]

 ¯Ω(γ;z) = ¯ΩMSW(γ)+12∑γ1,γ2∈Γ+γ1+γ2=γ(−1)⟨γ1,γ2⟩⟨γ1,γ2⟩Δtγ1γ2¯ΩMSW(γ1)¯ΩMSW(γ2)+⋯, (2.14)

where the dots denote contributions of higher order in the MSW invariants.

### 2.2 Modularity of the BPS partition function

Let us now consider the partition function of DT invariants with fixed magnetic charge . Let , the RR potentials conjugate to D1-brane charges, and the Kalb-Ramond field. The BPS partition function is defined as the following generating function of DT-invariants

 Zp(τ,z,c)=eπτ2(pt2)∑qΛ¯Ω(γ;z)(−1)p⋅qe−2πτ2|Zγ|−2πiτ1(q0+b⋅q+12b2)+2πic⋅(q+12b), (2.15)

where the sum goes over charges satisfying the quantization conditions (2.4). The DT-invariants are weighted by the Boltzmann factor and by a phase factor induced by the couplings of the charges to the potentials , and . The factor is motivated by modular properties of , whereas the prefactor is included so as to subtract the leading divergent term in the large volume limit of :

 |Zγ|=12(pt2)−q0+(q+b)2+−(q+12b)⋅b+⋯. (2.16)

Here the dots denote terms of order and, as in [12], we defined

 q+=qata(pt2)t,q−=q−q+,q+=qata√(pt2), (2.17)

so that . In the following we shall study the behavior of the BPS partition function (2.15) under modular transformations.

Substituting (2.14) into (2.15), one obtains an expansion in powers of the MSW invariants

 Zp(τ,z,c)=∑n≥1Z(n)p(τ,z,c), (2.18)

where corresponds to the terms of degree in . Due to the symmetry of the MSW invariants under the spectral flow (2.5), all terms in this expansion have a theta series decomposition. Indeed, decomposing the vectors according to (2.7), we find, for the first [13, 14, 15] and second [16] terms

 Z(1)p(τ,z,c)=χp(τ,z,c)=∑μ∈Λ⋆/Λhp,μ(τ)θp,μ(τ,t,b,c), (2.19)
 Z(2)p(τ,z,c)=12∑p1+p2=p∑μi∈Λ⋆/Λihp1,μ1(τ)hp2,μ2(τ)Ψp1,p2,μ1,μ2(τ,t,b,c). (2.20)

Here, we denote by the image of inside under the map and introduce the following objects (we denote ):

• a holomorphic function of the modular parameter built from the MSW invariants

 hp,μ(τ)=∑^q0≤^qmax0¯ΩMSWp,μ(^q0)E(−^q0τ); (2.21)
• the Siegel-Narain theta series

 θp,μ(τ,t,b,c)=∑k∈Λ+μ+12p(−1)k⋅pX(θ)p,k, (2.22)

where

 X(θ)p,k=E(−τ2(k+b)2−−¯τ2(k+b)2++c⋅(k+12b)); (2.23)
• the ‘mock Siegel-Narain theta series’ which is a sum over the double lattice [16]

 Ψp1,p2,μ1,μ2(τ,t,b,c)=∑ki∈Λi+μi+12pi(−1)p1⋅k1+p2⋅k2+(p21p2)⟨γ1,γ2⟩Δtγ1γ2e2πτ2I2γ1γ2X(θ)p1,k1X(θ)p2,k2, (2.24)

where and are defined in (2.12) and (2.13).

The theta series decompositions (2.19) and (2.20) provide the starting point to discuss the modular properties of the BPS partition function. The modular group acts by the following transformations

 τ↦aτ+bcτ+d,t↦|cτ+d|t,(cb)↦(abcd)(cb), (2.25)

with . Under this action, the theta series is well-known to transform as a vector-valued modular form of weight and multiplier system . In contrast, the double theta series (2.24) does not transform as a vector-valued modular form under . However, it was shown in [16], using similar techniques as in [19], that it can be completed into a vector-valued modular form of weight , at the expense of adding two double theta series of the form

 Ψ(±)p1,p2,μ1,μ2(τ,t,b,c)=∑ki∈Λi+μi+12pi(−1)p1⋅k1+p2⋅k2+(p21p2)Π(±)γ1γ2e2πτ2I2γ1γ2X(θ)p1,k1X(θ)p2,k2, (2.26)

where the insertions are given by the following expressions

 Π(+)γ1γ2 = √(pt2)(p1p2t)28π2τ2(p1t2)(p2t2)e−2πτ2I2γ1,γ2−12⟨γ1,γ2⟩sgn(Iγ1γ2)β12(2τ2I2γ1γ2), (2.27) Π(−)γ1γ2 = −14π|⟨γ1,γ2⟩|β32(2τ2⟨γ1,γ2⟩2(pp1p2)). (2.28)

Here we used the function , so that for

 β12(x2)=Erfc(√π|x|),β32(x2)=2|x|−1e−πx2−2πβ12(x2). (2.29)

In Appendix A we provide a simple proof of the modular invariance of based on Vignéras’ theorem [45]. For the proof, it is important that the insertions cancel the discontinuities of the sign factor in (2.24) on the loci or in the -dimensional space spanned by the vectors , so that the summand in the completed theta series is a smooth function. It is also important to remark that both functions (2.26) are exponentially suppressed as , and that is independent of the Kähler moduli, whereas does depend on through defined in (2.12).

In [13, 14, 15, 16, 12], it was argued that the first term (2.19) transforms as a modular form of weight . As a consequence, the generating function had to transform as a vector-valued modular form of weight and multiplier system , where and is the multiplier system of the Dedekind eta function. This proposal has been confirmed in examples where the effective divisor wrapped by the D3-brane is irreducible [13, 46], but its validity for a general non-primitive or reducible divisor remained to be assessed.

In fact, the example of D4-branes in non-compact Calabi-Yau manifolds (or equivalently topologically twisted Yang-Mills theory [21]) indicates that is unlikely to be modular in general. In the context of Yang-Mills, examples are known with reducible (more precisely, with the gauge group [21, 23, 22]), where is not modular, but becomes so after adding to it a suitable non-holomorphic function . In other words,

 ˆhp,μ(τ)=hp,μ(τ)−12Rp,μ(τ) (2.30)

is a vector-valued modular form at the cost of being non-holomorphic, while is a vector-valued (mixed) mock modular form [19, 20]. Given that additional non-holomorphic terms were also required to turn the double theta series (2.24) into a modular form , we expect that for a general divisor, the holomorphic generating function of MSW invariants will only become modular after the addition of a suitable non-holomorphic function.

Assuming then that exists such that (2.30) is a vector-valued modular form, the modular completion of the BPS partition function (2.15) becomes

 ˆZp(τ,z,c)=∑n≥1ˆZ(n)p(τ,z,c), (2.31)

where

 ˆZ(1)p=∑μ∈Λ⋆/Λˆhp,μθp,μ,ˆZ(2)p=12∑p1+p2=p∑μi∈Λ⋆/Λiˆhp1,μ1ˆhp2,μ2ˆΨp1,p2,μ1,μ2. (2.32)

Since the modular anomaly of is expected to arise when the divisor can split into several components, we expect that should be controlled by the product of the corresponding MSW invariants. At this point, however, the function remains still undetermined. We shall now fix it by comparing the above construction with the analysis of the D3-instantons corrections to the hypermultiplet metric.

### 2.3 Comparison with the contact potential

In our study of instanton effects on the hypermultiplet moduli space in the twistor formalism, we shall find in section 4 that D3-instanton contributions to the contact potential in the two-instanton approximation can be expressed in terms of the following function:

 ∑μ∈Λ⋆/Λhp,μθp,μ+12∑p1+p2=p∑μi∈Λ⋆/Λihp1,μ1hp2,μ2(Ψp1,p2,μ1,μ2+Ψ(+)p1,p2,μ1,μ2). (2.33)

In order for the metric on to carry an isometric action of the modular group, it is necessary that (2.33) be a modular form of weight .

On the other hand, the completed BPS partition function (2.31) differs from (2.33) in two ways: the modular forms are replaced by their non-completed version , and in the second term the contribution of is missing. Remarkably, these two differences cancel amongst each other provided

 ∑μ∈Λ⋆/ΛRp,μθp,μ=∑p1+p2=p∑μi∈Λ⋆/Λihp1,μ1hp2,μ2Ψ(−)p1,p2,μ1,μ2. (2.34)

In more detail, this condition ensures that the complementary terms, appearing due to the completion of to in , cancel a part of the additional terms in , while the remaining discrepancy due to the difference between and in is of higher order in the expansion in MSW invariants. In Appendix B, we show that the condition (2.34) is solved by choosing as in (1.3), where the functions , and the variables , are defined in (B.11), (B.13), (B.8) and (B.14), respectively. This shows that in order for the contact potential to have the right modular property, the generating function of MSW invariants must have an anomalous modular transformation. Its modular completion is provided by the non-holomorphic function (1.3), constructed out of the generating functions and of MSW invariants associated to all possible decompositions . In the next subsection we demonstrate that is actually a vector-valued mixed mock modular form.

It is worth stressing that the result above is valid if can be written as a sum for at most two effective divisors and . In particular, are modular forms, since cannot be further decomposed as a sum of effective charges . If can be written as a sum of more than two effective , then (1.3) will involve further corrections of higher order in MSW invariants. It is reassuring to note that (1.3) is consistent with explicit expressions which are available for various non-compact Calabi-Yau’s, given by canonical bundles over a rational surface . For instance, setting in (1.3), it reproduces the result of [21, Eq. (4.30)] and [22, Section 3.2] for , where is the canonical class of the surface .

### 2.4 Mock modularity and the MSW elliptic genus

Having deduced the modular completion of the generating function of MSW invariants , which appears as a building block of the contact potential, we shall now compare its properties with mock modular forms and consider its implications for the elliptic genus of the MSW conformal field theory.

First we recall a few relevant aspects of mock modular forms [20, 29]. Let be a holomorphic modular form of weight . The “shadow map” maps to the non-holomorphic function defined by

 g∗(τ)=(i/2)k−1∫∞−¯τ(z+τ)−k¯¯¯¯¯¯¯¯¯¯¯¯¯¯g(−¯z)dz. (2.35)

A mock modular form of weight and with shadow , is a holomorphic function such that its non-holomorphic completion

 ˆh=h+g∗ (2.36)

transforms as a modular form of weight . Acting with the shadow operator on gives

 τ22∂¯τˆh=τ2−k2¯¯¯g, (2.37)

from which the shadow is easily obtained by multiplication with and complex conjugation. Note that the r.h.s. transforms as a modular form of weight .

More generally, a mixed mock modular form of weight [29] is a holomorphic function such that there exists (half) integer numbers and modular forms and