<figure><img src="image_1.png" /></figure>

HAL
open science

# D3-instantons, Mock Theta Series and Twistors

Sergey Alexandrov, Jan Manschot, Boris Pioline

► To cite this version:

Sergey Alexandrov, Jan Manschot, Boris Pioline. D3-instantons, Mock Theta Series and Twistors. Journal of High Energy Physics, 2013, pp.002. 10.1007/JHEP04(2013)002. [hal-00715152](https://hal.science/hal-00715152)

HAL Id: hal-00715152

https://hal.science/hal-00715152

Submitted on 7 Jun 2021

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
RECEIVED: January 14, 2013

ACCEPTED: February 21, 2013

PUBLISHED: April 2, 2013

# D3-instantons, mock theta series and twistors

Sergei Alexandrov,ª Jan Manschotᵇ,ᶜ and Boris Piolineᵈ,ᵉ

ªLaboratoire Charles Coulomb, Universié Montpellier 2,
Place Eugène Bataillon, F-34095, Montpellier, France

ᵇBethe Center for Theoretical Physics, Universität Bonn,
Nußallee 12, 53115 Bonn, Germany

ᶜMax Planck Institute for Mathematics,
Vivatsgasse 7, 53111 Bonn, Germany

ᵈ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: salexand@univ-montp2.fr, manschot@uni-bonn.de,
boris.pioline@cern.ch

**ABSTRACT:** The D-instanton corrected hypermultiplet moduli space of type II string theory compactified on a Calabi-Yau threefold is known in the type IIA picture to be determined in terms of the generalized Donaldson-Thomas invariants, through a twistorial construction. At the same time, in the mirror type IIB picture, and in the limit where only D3-D1-D(-1)-instanton corrections are retained, it should carry an isometric action of the S-duality group SL(2, Z). We prove that this is the case in the one-instanton approximation, by constructing a holomorphic action of SL(2, Z) on the linearized twistor space. Using the modular invariance of the D4-D2-D0 black hole partition function, we show that the standard Darboux coordinates in twistor space have modular anomalies controlled by period integrals of a Siegel-Narain theta series, which can be canceled by a contact transformation generated by a holomorphic mock theta series.

**KEYWORDS:** D-branes, Differential and Algebraic Geometry, Superstring Vacua, String Duality

ARXIV ePRINT: 1207.1109
# Contents

1 Introduction 2

2 HM moduli space in type IIB CY vacua 5

2.1 Tree-level metric 5

2.2 Continuous symmetries at tree-level 7

2.3 Twistorial description of the tree-level metric 8

2.4 Quantum corrections and S-duality 10

2.5 Twistorial construction of D-instanton corrections 12

3 Modularity of DT invariants for D3-instantons 14

3.1 D3-instantons, coherent sheaves and DT invariants 15

3.2 MSW invariants and modularity 17

3.3 One-instanton approximation: heuristics 19

4 D3-instantons, period integrals and mock theta series 21

4.1 Instanton corrections in the large volume limit 21

4.2 Modular invariance of the contact potential 24

4.3 Instanton corrections to Darboux coordinates and period integrals 24

4.4 Anomaly cancelation from mock theta series 27

5 Discussion 28

A Indefinite theta series and period integrals 30

A.1 Vignéras' theorem 30

A.2 Siegel-Narain theta series 31

A.3 Zwegers' mock theta series 31

A.4 An infinite sequence of mock theta series 33

B Instanton corrections in the large volume limit 34

B.1 S-duality and mirror map 34

B.2 Large volume limit 37

C Relation to the Poincaré series construction 39
# 1 Introduction

In type II string vacua with $N = 2$ supersymmetry in four dimensions, the moduli space spanned by massless scalar fields famously factorizes as the product $M_V \times M_H$ of the vector multiplet (VM) and hypermultiplet (HM) moduli spaces, respectively [1, 2]. A complete understanding of the former was achieved by the end of the last millenium, and has led to key developments in black hole physics and algebraic geometry. By contrast, until recently our understanding of the latter was confined to the tree-level [3–5] and one-loop [6–10] approximations to the metric, together with some general expectations about the form of instanton corrections [11, 12]. While it has been clear to many that an exact solution for the quaternion-Kähler (QK) metric on $M_H$ would have considerable impact both for physics and geometry, progress was hindered mainly by the lack of a convenient parametrization of this class of metrics.

The situation has improved dramatically in recent years, as projective superspace and twistorial techniques [13–19] were brought to bear on this problem. The key idea behind these methods is that the QK metric on $M_H$ is encoded in the complex contact structure on the twistor space $\mathcal{Z}$, a $\mathbb{P}^1$ bundle over $M_H$ [16]. The latter is in turn specified by a set of holomorphic generating functions for complex contact transformations between local Darboux coordinate systems, subject to certain global consistency and reality requirements [20]. These gluing conditions can be converted into a system of integral equations, which can often be solved by iteration. The QK metric on $M_H$ is then obtained by expanding the resulting Darboux coordinates around any fixed section of $\mathcal{Z}$, similar to the usual twistorial construction of HK manifolds [15, 21].

Using these techniques, combining earlier results on the twistorial description of the perturbative metric and of D1-D(-1)-instantons [22–25] and taking inspiration from a similar construction in the context of gauge theories [26], a general construction of the D-instanton corrected HM moduli space was laid out in [27, 28], in terms of the generalized Donaldson-Thomas (DT) invariants $\Omega(\gamma; z)$ which count D-instantons. For reasons that will become clear below, we refer to the construction of [27, 28] as the ‘type IIA’ construction. In type IIA string theory compactified on a Calabi-Yau (CY) threefold $\mathfrak{Z}$, D-instantons come from D2-branes wrapping special Lagrangian cycles, while in type IIB string theory compactified on the mirror threefold $\mathfrak{Z}'$, they come from D5-D3-D1-D(-1)-branes wrapping even-dimensional cycles, or more generally coherent sheaves on $\mathfrak{Z}'$. Although the DT invariants typically depend on the complex structure moduli (in type IIA) or Kähler moduli (in type IIB), they are piecewise constant away from walls of marginal stability, and their discontinuity is such that the resulting contact structure on $\mathcal{Z}$ (and hence, the QK metric on $M_H$) is smooth [26]. In fact, the type IIA construction of [27, 28] is essentially dictated by consistency with wall-crossing, and is isomorphic to the gauge theory construction of [26] under the QK/HK correspondence [29, 30].

In addition to these D-instantons, one also expects contributions from NS5-brane instantons wrapped on the CY threefold. Those effects are in principle determined from the known D5-instanton corrections, by requiring that the QK metric should carry an isometric action of SL(2, $\mathbb{Z}$), originating from S-duality in ten-dimensional type IIB string theory.
NS5-brane corrections were constructed at linear order in [31] (see also [32–34]), but an understanding of these effects at non-linear level is still missing.

In this work, we focus on a subset of the allowed instanton corrections, namely those corresponding to D3-D1-D(-1)-instantons on the type IIB side. Although these effects are exponentially suppressed compared to D1-D(-1)-instantons in the large volume limit, they are still exponentially larger than D5 and NS5-brane instantons. Thus, a natural question is whether the twistorial construction of [27, 28] produces a modular invariant quaternion-Kähler metric, in the large volume limit where D5-NS5-instantons are ignored but the effects of D3-D1-D(-1)-instantons with non-zero D3-brane charge are still retained.<fnref n="1" /> In this work, we shall answer this question in the affirmative, at least in the one-instanton approximation. As will become clear shortly, even in this simplified setting, modular invariance is achieved in a very non-trivial way, and depends on the sophisticated machinery of Eichler integrals and indefinite theta series. We expect an even richer structure beyond the one-instanton approximation, but we shall hardly touch upon it in this work.

The reason why this problem is non-trivial is that modular invariance is far from manifest in the ‘type IIA’ twistorial construction [27, 28]. Indeed, when lifted to a holomorphic action on twistor space, the action of S-duality involves a SU(2) rotation along the fiber, and therefore relates Darboux coordinate systems on different patches. The only exception are the patches around the points $t = \pm i$, where $t$ is the usual stereographic coordinate on the fiber, which are mapped onto themselves under S-duality. But even in these patches the Darboux coordinates need only be modular covariant up to a local complex contact transformation. Finally, a technical but serious difficulty is that the natural type IIA coordinates parametrizing the twistor fiber need not have simple transformation properties under S-duality, and it is a priori unclear how to construct a basis of type IIB fields which would transform covariantly. Put differently, there is no general method to construct the quantum mirror map (see however [36] for recent progress in a closely related set-up).

Fortunately, we find that this picture drastically simplifies in the large volume limit $V \to \infty$, provided one simultaneously scales $z \sim (t \pm i) \to 0$ keeping the product $zV^{1/3}$ fixed. In this case all BPS rays (the contours on $\mathbb{P}^1$ associated to D-instantons [26, 27]) coincide with the real axis in the complex $z$ plane, shifted slightly above or below the origin $z=0$ depending on the D1-brane charge. The corrections to Darboux coordinates are then given by integrals of certain Siegel-Narain theta series along these contours, corresponding to the sum over D1-brane charges at fixed D3-brane charge. These Gaussian theta series are far simpler than the non-Gaussian sums which would otherwise arise at finite volume.

Another simplification of the large volume limit is that the moduli-dependent DT invariants can be traded for another set of invariants, which we call the MSW invariants, which are independent of the Kähler moduli in type IIB (or complex structure moduli in type IIA), and have simple modular properties. The idea is that D3-D1-D(-1)-instantons are governed by the same DT invariants which count D4-D2-D0 black holes in type IIA string theory compactified on the same CY threefold $\tilde{\mathbb{Q}}$. At large volume, the latter can

<footnote n="1">¹For zero D3-brane charges, i.e. in the limit where only D1-D(-1)-instantons are retained, the QK metric and twistor space are known to be modular invariant [22, 35, 36], although this is not apparent in the usual type IIA formulation.</footnote>
be described by micro-states of the MSW superconformal field theory (SCFT) [37], and bound states thereof [38, 39]. We define the multi-instanton expansion in the large volume limit in such a way that only elementary MSW states contribute in the one-instanton approximation. With this definition, the Gaussian theta series alluded to in the previous paragraph reconstruct the elliptic genus of the SCFT (or modular derivatives thereof), and the corrections to Darboux coordinates are now identified as Eichler integral of the MSW elliptic genus. For illustration, we display the result for the correction to the Darboux coordinates $\xi$ conjugate to the D1-brane charges $q$, evaluated for simplicity at the point $z = 0$ on the twistor fiber,

$$ \delta\xi(0) = -\frac{p}{4\pi} e^{-2\pi S_{\text{cl}}} \sum_{\mu \in \Lambda^*/\Lambda} h_{p,\mu}(\tau) \int_{\bar{\tau}}^{-i\infty} \frac{\tilde{\theta}_{p,\mu}(w, \bar{\tau}, t, b, c) \, d\bar{w}}{\sqrt{i(\bar{w} - \tau)}} \quad (1.1) $$

where $S_{\text{cl}}$ is the classical D3-instanton action (4.11). It involves the Siegel-Narain type theta series $\tilde{\theta}_{p,\mu}(w, \bar{\tau}, t, b, c)$ (A.16) of weight $(\frac{3}{2}, \frac{b_2-1}{2})$, where $b_2 \equiv b_2(\hat{\mathfrak{Q}})$, analytically continued away from the slice $w = \tau$, and the partition function of the MSW invariants $h_{p,\mu}(\tau)$, which is a vector-valued modular form of weight $(-\frac{b_2}{2} - 1, 0)$. As a consequence, the Darboux coordinates around $t = \pm i$ are not modular covariant, but transform with a specific modular anomaly given by the period integral of the MSW elliptic genus. In the example above, this implies

$$ \delta\xi(0) \mapsto (c\tau+d)^{-1} \left( \delta\xi(0) + \frac{p}{4\pi} e^{-2\pi S_{\text{cl}}} \sum_{\mu \in \Lambda^*/\Lambda} h_{p,\mu}(\tau) \int_{-d/c}^{i\infty} \frac{\overline{\tilde{\theta}_{p,\mu}(w, \bar{\tau}, t, b, c)} \, d\bar{w}}{\sqrt{i(\bar{w} - \tau)}} \right) \quad (1.2) $$

The final step in the proof is to show that the modular anomalies in the Darboux coordinates can be absorbed by a complex contact transformation, which will then ensure that the complex contact structure on $\mathcal{Z}$ transforms covariantly under S-duality. For this purpose, we observe that the Eichler integral which determines the corrections to the Darboux coordinates is in fact the modular completion of the holomorphic mock theta series introduced in [40],

$$ \bar{\Theta}_{p,\mu}(\tau, t, t', b, c) = \sum_{k \in \Lambda + \mu + \frac{1}{2}p} (-1)^{k \cdot p} \left[ \operatorname{sgn}((k+b) \cdot t) - \operatorname{sgn}((k+b) \cdot t') \right] e^{-\pi i \tau (k+b)^2 + 2\pi i c \cdot (k + \frac{1}{2}b)}, \quad (1.3) $$

where $t$ are physical Kähler moduli and $t'$ is an arbitrary reference point on the boundary of the Kähler cone. In an amusing role reversal, we find that this holomorphic mock theta series provides the generating function of a complex contact transformation which cancels the modular anomaly in the Darboux coordinates. This establishes the modular invariance of the QK metric in the large volume, one-instanton approximation.

Clearly, an important challenge for the future is to establish modularity at the non-linear level. One possible strategy would be to recast the type IIA twistorial construction into the manifestly SL(2, $\mathbb{Z}$)-invariant type IIB formalism presented in [36]. As a first step in this direction, one may try to use the Poincaré series representation (also known as Farey tail [41, 42]) of the generating functions of the MSW invariants to represent the section of
$H^1(\mathcal{Z}, \mathcal{O}(2))$ describing D3-instanton corrections at linear order as a sum $H = \sum_{m,n} G_{m,n}$, such that S-duality acts by permuting these contributions. Unfortunately, this manipulation is formal since Poincaré series with negative weight are divergent without a suitable regularization. Even though this naive idea fails, it nevertheless provides very useful guidance for determining the quantum mirror map, as we explain in appendices B and C.

The remainder of this work is organized as follows. In section 2, we review the general properties of the HM moduli space in type IIB string theory compactified on a CY threefold, with particular emphasis on the discrete symmetries under S-duality and large gauge transformations, and recall the type IIA twistorial construction of D-instantons. In section 3, we recall the geometric description of D3-brane instantons in terms of coherent sheaves, the definition of the generalized DT invariants which count them and their relation to the MSW invariants, which are independent of the moduli and have simple modular properties. We define a multi-instanton expansion which is best suited for studying modularity, and give a heuristic explanation of modular invariance in twistor space. In section 4, we analyze the instanton corrections to the Darboux coordinates in the large volume, one-instanton limit, zooming in near the S-duality invariant points $t = \pm i$. We express these instanton corrections in terms of Eichler integrals of Siegel-Narain theta series, and construct their modular invariant completion. Some open problems are discussed in section 5. The relevant properties of indefinite theta series and Eichler integrals are reviewed in appendix A, while appendix B contains details about the derivation of instanton corrections and quantum mirror map in the large volume limit. Finally, appendix C gives a preliminary attempt to recast the type IIA twistorial construction of D3-instantons in the type IIB framework of [36].

## 2 HM moduli space in type IIB CY vacua

In this section, we briefly recall some basic facts about the hypermultiplet moduli space in type IIB CY vacua. We mainly follow [27], incorporating further improvements introduced in [28, 30, 31], as well as some new insights on the action of S-duality on the tree level geometry.

### 2.1 Tree-level metric

Recall that the hypermultiplet moduli space in type IIB string theory compactified on a CY threefold $\hat{\mathcal{Y}}$ is a quaternion-Kähler manifold $\mathcal{M}_H$ of dimension $4b_2 + 4$, where $b_2 \equiv b_2(\hat{\mathcal{Y}})$, which describes the dynamics of

1. the ten-dimensional dilaton $g_s$;

2. the Kähler moduli $b^a + it^a \equiv \int_{\gamma^a} \mathcal{J} (a = 1, \dots, b_2)$ where $\mathcal{J} \equiv B + iJ$ is the complexified Kähler form on $\hat{\mathcal{Y}}$ and $\gamma^a$ is a basis of $H_2(\hat{\mathcal{Y}}, \mathbb{Z})$;

3. the Ramond-Ramond (RR) scalars $c^0, c^a, \tilde{c}_a, \tilde{c}_0$, corresponding to periods of the RR 0-form, 2-form, 4-form and 6-form on a basis of $H_{\text{even}}(\hat{\mathcal{Y}}, \mathbb{Z})$;

4. the NS axion $\psi$, dual to the NS 2-form $B$ in four dimensions.
The ten-dimensional string coupling $\tau_2 \equiv 1/g_s$ and the RR axion $\tau_1 \equiv c^0$ combine into the ten-dimensional axio-dilaton field $\tau = \tau_1 + i\tau_2$. The resulting field basis $\tau, t^a, b^a, c^a, \tilde{c}_a, \tilde{c}_0, \psi$ is adapted to the action of S-duality in ten dimensions, as will become apparent below.

At tree level in type IIB string perturbation theory, the metric on $M_H$ is obtained from the moduli space $M_{SK}$ of complexified Kähler deformations (which also describes the vector multiplet moduli space in Type IIA string theory compactified on the same CY threefold $\hat{\mathcal{Y}}$) via the c-map construction [3, 5]. In the large volume limit, the special Kähler manifold $M_{SK}$ is characterized by the holomorphic prepotential

$$F^{\text{cl}}(X^{\Lambda}) = -\kappa_{abc} \frac{X^a X^b X^c}{6X^0} + \frac{1}{2} A_{\Lambda\Sigma} X^{\Lambda} X^{\Sigma}, \qquad (2.1)$$

where $X^\Lambda$ are homogeneous complex coordinates on $M_{SK}$ such that $X^\Lambda/X^0 = z^\Lambda$ (with $z^0 = 1$), $\kappa_{abc}$ is the triple intersection product in $H_4(\hat{\mathcal{Y}}, \mathbb{Z})$, and $A_{\Lambda\Sigma}$ is a constant, real symmetric matrix which satisfies the quantization conditions [31, 43]$^2$

$$A_{00} \in \mathbb{Z}, \quad A_{0a} = \frac{c_{2,a}}{24} + \mathbb{Z}, \quad A_{ab}p^a - \frac{1}{2}\kappa_{abc}p^b p^c \in \mathbb{Z} \quad \text{for } \forall p^a \in \mathbb{Z}. \qquad (2.2)$$

The c-map construction [5] produces the QK metric

$$ds_{M_H}^2 = \frac{dr^2}{r^2} + 4ds_{SK}^2 - \frac{1}{2r} (d\tilde{\zeta}_\Lambda - \mathcal{N}_{\Lambda\Sigma} d\zeta^\Sigma) \operatorname{Im} \mathcal{N}^{\Lambda\Lambda'} (d\tilde{\zeta}_{\Lambda'} - \mathcal{N}_{\Lambda'\Sigma'} d\zeta^{\Sigma'}) \\ + \frac{1}{16r^2} (d\sigma + \tilde{\zeta}_\Lambda d\zeta^\Lambda - \zeta^\Lambda d\tilde{\zeta}_\Lambda)^2, \qquad (2.3)$$

where $ds_{SK}^2$ is the metric on $M_{SK}$ with Kähler potential $K = -\log[i(\bar{X}^\Lambda F_\Lambda^{\text{cl}} - X^\Lambda \bar{F}_\Lambda^{\text{cl}})]$,

$$\mathcal{N}_{\Lambda\Lambda'} = \bar{\tau}_{\Lambda\Lambda'} + 2i \frac{[\operatorname{Im} \tau \cdot X]_\Lambda [\operatorname{Im} \tau \cdot X]_{\Lambda'}}{X^\Sigma \operatorname{Im} \tau_{\Sigma\Sigma'} X^{\Sigma'}}, \qquad (2.4)$$

is the Weil period matrix, $\tau_{\Lambda\Sigma} \equiv \partial_{X^\Lambda} \partial_{X^\Sigma} F^{\text{cl}}(X)$ the Griffiths period matrix, and

$$r = \frac{\tau_2^2}{2} \nu, \quad \nu = \frac{1}{6} \int_{\hat{\mathcal{Y}}} J \wedge J \wedge J = \frac{1}{6} \kappa_{abc} t^a t^b t^c. \qquad (2.5)$$

Here $\nu$ is the volume of the threefold $\hat{\mathcal{Y}}$ in string units, and the variable $r$ is related to the four-dimensional string coupling by $r = 1/g_4^2$. The variables $z^a, \zeta^\Lambda, \tilde{\zeta}_\Lambda, \sigma$ appearing in (2.3) are the natural variables in type IIA string theory compactified on the threefold $\mathcal{Y}$ mirror to $\hat{\mathcal{Y}}$, and are related to the type IIB fields $\tau_1, t^a, b^a, c^a, \tilde{c}_a, \tilde{c}_0, \psi$ by the ‘classical mirror map’ [44]

$$z^a = b^a + it^a, \quad \zeta^0 = \tau_1, \quad \zeta^a = -(c^a - \tau_1 b^a), \\ \tilde{\zeta}_a = \tilde{c}_a + \frac{1}{2} \kappa_{abc} b^b (c^c - \tau_1 b^c), \quad \tilde{\zeta}_0 = \tilde{c}_0 - \frac{1}{6} \kappa_{abc} b^a b^b (c^c - \tau_1 b^c), \qquad (2.6) \\ \sigma = -2 \left( \psi + \frac{1}{2} \tau_1 \tilde{c}_0 \right) + \tilde{c}_a (c^a - \tau_1 b^a) - \frac{1}{6} \kappa_{abc} b^a c^b (c^c - \tau_1 b^c).$$

<footnote>$^2$For simplicity we set $A_{00} = 0$ in this paper, as this can always be achieved by an integer symplectic transformation. The constants $c_{2,a}$ are the components of the second Chern class of $\hat{\mathcal{Y}}$ along the basis of $H_4(\hat{\mathcal{Y}}, \mathbb{Z})$.</footnote>
Here the primed coordinates $\tilde{\zeta}'_\Lambda \equiv \tilde{\zeta}_\Lambda - A_{\Lambda\Sigma}\zeta^\Lambda$ are the RR fields in a non-integer homology basis on the type IIA side, which is best suited for comparison with type IIB [31]. The electric charges $q'_\Lambda$ in this basis are related to the electric charges $q_\Lambda$ in the integer basis by $q'_\Lambda = q_\Lambda - A_{\Lambda\Sigma}p^\Sigma$, and therefore satisfy the quantization properties

$$q'_a \in \mathbb{Z} - \frac{p^0}{24}c_{2,a} - \frac{1}{2}\kappa_{abc}p^b p^c, \quad q'_0 \in \mathbb{Z} - \frac{1}{24}p^a c_{2,a}. \qquad (2.7)$$

The prepotential in the non-integer basis is given by (2.1) with $A_{\Lambda\Sigma} = 0$, which we henceforth denote by $F^{\prime\mathrm{cl}}(X^\Lambda)$.

## 2.2 Continuous symmetries at tree-level

The tree-level metric (2.3) is invariant under a large group of continuous isometries which is generated by three subgroups:

* continuous shifts of the RR and NS axions

$$T_{(\eta^\Lambda, \tilde{\eta}_\Lambda, \kappa)} : (\zeta^\Lambda, \tilde{\zeta}_\Lambda, \sigma) \mapsto (\zeta^\Lambda + \eta^\Lambda, \tilde{\zeta}_\Lambda + \tilde{\eta}_\Lambda, \sigma + 2\kappa - \tilde{\eta}_\Lambda \zeta^\Lambda + \eta^\Lambda \tilde{\zeta}_\Lambda), \qquad (2.8)$$

* monodromies around the large volume point

$$M_{\epsilon^a} : \quad b^a \mapsto b^a + \epsilon^a, \quad \zeta^a \mapsto \zeta^a + \epsilon^a \zeta^0, \quad \tilde{\zeta}'_a \mapsto \tilde{\zeta}'_a - \kappa_{abc} \zeta^b \epsilon^c - \frac{1}{2} \kappa_{abc} \epsilon^b \epsilon^c \zeta^0, \qquad (2.9) \\ \tilde{\zeta}'_0 \mapsto \tilde{\zeta}'_0 - \zeta'_a \epsilon^a + \frac{1}{2} \kappa_{abc} \zeta^a \epsilon^b \epsilon^c + \frac{1}{6} \kappa_{abc} \epsilon^a \epsilon^b \epsilon^c \zeta^0;$$

* continuous SL(2, $\mathbb{R}$) transformations given in the type IIB field basis by

$$\tau \mapsto \frac{a\tau + b}{c\tau + d}, \quad t^a \mapsto t^a|c\tau + d|, \quad \tilde{c}_a \mapsto \tilde{c}_a, \qquad (2.10) \\ \begin{pmatrix} c^a \\ b^a \end{pmatrix} \mapsto \begin{pmatrix} a & b \\ c & d \end{pmatrix} \begin{pmatrix} c^a \\ b^a \end{pmatrix}, \quad \begin{pmatrix} \tilde{c}_0 \\ \psi \end{pmatrix} \mapsto \begin{pmatrix} d & -c \\ -b & a \end{pmatrix} \begin{pmatrix} \tilde{c}_0 \\ \psi \end{pmatrix},$$

with $ad - bc = 1$ [7, 44].

The algebra generated by these isometries is the semi-direct product SL(2, $\mathbb{R}$) $\times$ N, where $N = N^{(1)} \oplus N^{(2)} \oplus N^{(3)}$ is a nilpotent algebra of dimension $3b_2 + 2$, satisfying

$$[N^{(1)}, N^{(1)}] \subset N^{(2)}, \quad [N^{(p)}, N^{(q)}] = 0 \quad \text{if } p + q \ge 3, \qquad (2.11)$$

with the generators in $N^{(1)}, N^{(2)}, N^{(3)}$ transforming as $b_2$ doublets, $b_2$ singlets and one doublet under SL(2, $\mathbb{R}$), respectively. The relation of this algebra decomposition to the symmetries presented above is the following:

* the group elements $T_{(\epsilon^a, \eta^a)}^{(1)}$ obtained by exponentiating $N^{(1)}$ (with a suitable admixture of higher level generators) consist of the monodromies (2.9) and the Heisenberg shifts (2.8) with non-vanishing $\eta^a$;
* the group elements $T_{\tilde{\eta}_a}^{(2)}$ obtained by exponentiating $N^{(2)}$ correspond to the Heisenberg shifts with non-vanishing $\tilde{\eta}_a$;

* the group elements $T_{(\tilde{\eta}_0, \kappa)}^{(3)}$ associated to $N^{(3)}$ coincide with Heisenberg shifts with non-vanishing $\tilde{\eta}_0$ and $\kappa$;

* unlike the other Heisenberg shifts which belong to $N$, the Heisenberg shift $\zeta^0 \mapsto \zeta^0+\eta^0$ belongs to SL(2, $\mathbb{R}$) and in fact coincides with the SL(2, $\mathbb{R}$) transformation $\tau \mapsto \tau+\eta^0$.

In the presence of quantum corrections, all these continuous isometries are lifted, but a discrete subgroup of these symmetries is conjectured to remain unbroken, as will be discussed in section 2.4.

## 2.3 Twistorial description of the tree-level metric

In studying instanton corrections to hypermultiplet moduli spaces, it has proven very useful to encode the metric on a QK manifold $\mathcal{M}$ in terms of the complex contact structure on its twistor space $\mathcal{Z}$, the total space of the $\mathbb{P}^1$-bundle over $\mathcal{M}$ twisted with the projectivized SU(2) connection (see [46] for a review of this approach). This contact structure is represented by a (twisted) holomorphic one-form $\mathcal{X}$, which locally can always be expressed in terms of complex Darboux coordinates as

$$ \mathcal{X}^{[i]} = d\alpha^{[i]} + \tilde{\xi}_{\Lambda}^{[i]} d\xi_{[i]}^{\Lambda}, \qquad (2.12) $$

where the index $[i]$ labels the patches $U_i$ of an open covering<fnref n="3" /> of $\mathbb{P}^1$. The contact structure on $\mathcal{Z}$ (hence, the QK metric on $\mathcal{M}$) is then encoded in holomorphic generating functions $H^{[ij]}(\xi_{[i]}^{\Lambda}, \tilde{\xi}_{\Lambda}^{[j]}, \alpha^{[j]})$ for the contact transformations between Darboux coordinate systems on the overlap $U_i \cap U_j$. For QK manifolds with one quaternionic isometry, which in our case is realized as constant shifts of the NS axion $\sigma$, the transition functions $H^{[ij]}$ should be independent of $\alpha^{[j]}$. In this case, the corresponding contact transformation takes the following form

$$ \begin{gathered} \xi_{[j]}^{\Lambda} = \xi_{[i]}^{\Lambda} - \partial_{\tilde{\xi}_{\Lambda}^{[j]}} H^{[ij]}, \qquad \tilde{\xi}_{\Lambda}^{[j]} = \tilde{\xi}_{\Lambda}^{[i]} + \partial_{\xi_{[i]}^{\Lambda}} H^{[ij]}, \\ \alpha^{[j]} = \alpha^{[i]} + H^{[ij]} - \xi_{[i]}^{\Lambda} \partial_{\xi_{[i]}^{\Lambda}} H^{[ij]} \end{gathered} \qquad (2.13) $$

and reduces to a complex symplectomorphism in the subspace spanned by $(\xi^{\Lambda}, \tilde{\xi}_{\Lambda}^{\Lambda})$ variables. In addition to the set of transition functions $H^{[ij]}$, one must also specify a real constant $c_{\alpha}$, known as the anomalous dimension, which characterizes the singular behavior of $\alpha$ near the poles of $\mathbb{P}^1$. The QK metric is then obtained by ‘parametrizing the twistor lines’, i.e. solving the gluing conditions (2.13) for the Darboux coordinates as functions of coordinates on the base $\mathcal{M}$ and the $\mathbb{P}^1$ coordinate $t$, and expanding the contact one-form in the vicinity of any fixed point on $\mathbb{P}^1$. A useful construct in this procedure is the contact potential $e^{\Phi}$, which determines a Kähler potential on $\mathcal{Z}$ (see [20] for more details on this procedure).

<footnote n="3">³In principle, since $\mathcal{Z}$ is a non-trivial $\mathbb{P}^1$-bundle over $\mathcal{M}$, one should be using an open covering of $\mathcal{Z}$. However, for QK manifolds with one quaternionic isometry, as is the case in this paper, the QK/HK correspondence gives a natural trivialization of an open subset of $\mathcal{Z}$, which allows to view $\mathcal{Z}$ as a $\mathcal{M}$-bundle over $\mathbb{P}^1$.</footnote>
As explained in [20, 27], the QK metric (2.3) can be cast in this twistorial framework by choosing a covering of $\mathbb{P}^1$ consisting of two patches $U_+$, $U_-$ around the north and south poles, $t = 0$ and $t = \infty$, and a third patch $U_0$ which covers the equator. The transition functions between complex Darboux coordinates on each patch are given by

$$H^{[+0]} = F^{\text{cl}}(\xi^{\Lambda}), \quad H^{-[0]} = \bar{F}^{\text{cl}}(\xi^{\Lambda}), \qquad (2.14)$$

whereas the corresponding Darboux coordinates in the patch $U_0$ read as [20, 47]

$$\begin{aligned}
\xi^{\Lambda} &= \zeta^{\Lambda} + \frac{\tau_2}{2} (t^{-1}z^{\Lambda} - t \bar{z}^{\Lambda}), \\
\tilde{\xi}_{\Lambda} &= \tilde{\zeta}_{\Lambda} + \frac{\tau_2}{2} (t^{-1}F_{\Lambda}^{\text{cl}} - t \bar{F}_{\Lambda}^{\text{cl}}), \\
\tilde{\alpha} &= \sigma + \frac{\tau_2}{2} (t^{-1}W^{\text{cl}} - t \bar{W}^{\text{cl}}),
\end{aligned} \qquad (2.15)$$

where $W^{\text{cl}}$ denotes the 'superpotential'

$$W^{\text{cl}}(z) \equiv F_{\Lambda}^{\text{cl}}(z) \zeta^{\Lambda} - z^{\Lambda} \tilde{\zeta}_{\Lambda} \qquad (2.16)$$

and we have traded the Darboux coordinate $\alpha$ for $\tilde{\alpha} \equiv -2\alpha - \tilde{\xi}_{\Lambda}\xi^{\Lambda}$. Moreover, the contact potential $e^{\Phi}$ turns out to coincide with the four-dimensional string coupling $r$ given in (2.5).

A very useful property of this twistorial framework is that isometries of $\mathcal{M}$ can always be lifted to a holomorphic contact transformation on the twistor space $\mathcal{Z}$, by a suitable choice of action on the $\mathbb{P}^1$ fiber. Thus, the nilpotent generators (2.8) and (2.9) (supplemented with the trivial action on $\mathbb{P}^1$) lift to the holomorphic contact transformations

$$T_{(\eta^{\Lambda}, \tilde{\eta}_{\Lambda}, \kappa)} : (\xi^{\Lambda}, \tilde{\xi}_{\Lambda}, \tilde{\alpha}) \mapsto (\xi^{\Lambda} + \eta^{\Lambda}, \tilde{\xi}_{\Lambda} + \tilde{\eta}_{\Lambda}, \tilde{\alpha} + 2\kappa - \tilde{\eta}_{\Lambda}\xi^{\Lambda} + \eta^{\Lambda}\tilde{\xi}_{\Lambda}), \qquad (2.17)$$

$$M_{\epsilon^a} : \xi^0 \mapsto \xi^0, \quad \xi^a \mapsto \xi^a + \epsilon^a \xi^0, \quad \tilde{\xi}'_a \mapsto \tilde{\xi}'_a - \kappa_{abc} \xi^b \epsilon^c - \frac{1}{2} \kappa_{abc} \epsilon^b \epsilon^c \xi^0, \qquad (2.18) \\ \tilde{\xi}'_0 \mapsto \tilde{\xi}'_0 - \tilde{\xi}_a \epsilon^a + \frac{1}{2} \kappa_{abc} \xi^a \epsilon^b \epsilon^c + \frac{1}{6} \kappa_{abc} \epsilon^a \epsilon^b \epsilon^c \xi^0, \quad \tilde{\alpha} \mapsto \tilde{\alpha},$$

respectively, where we defined the Darboux coordinates in the non-integer symplectic basis in the same way as in (2.6),

$$\tilde{\xi}'_{\Lambda} = \tilde{\xi}_{\Lambda} - A_{\Lambda\Sigma}\xi^{\Sigma}, \quad \alpha' = \alpha - \frac{1}{2} A_{\Lambda\Sigma}\xi^{\Lambda}\xi^{\Sigma}. \qquad (2.19)$$

Similarly, the isometric SL(2, $\mathbb{R}$) action (2.10) lifts to the following holomorphic action on $\mathcal{Z}$ (here expressed in terms of the Darboux coordinates in the patch $U_0$):

$$\begin{gathered}
\xi^0 \mapsto \frac{a\xi^0 + b}{c\xi^0 + d}, \quad \xi^a \mapsto \frac{\xi^a}{c\xi^0 + d}, \quad \tilde{\xi}'_a \mapsto \tilde{\xi}'_a + \frac{c}{2(c\xi^0 + d)}\kappa_{abc}\xi^b\xi^c, \\
\begin{pmatrix} \tilde{\xi}'_0 \\ \alpha' \end{pmatrix} \mapsto \begin{pmatrix} d & -c \\ -b & a \end{pmatrix} \begin{pmatrix} \tilde{\xi}'_0 \\ \alpha' \end{pmatrix} + \frac{1}{6} \kappa_{abc} \xi^a \xi^b \xi^c \begin{pmatrix} c^2/(c\xi^0 + d) \\ -[c^2(a\xi^0 + b) + 2c]/(c\xi^0 + d)^2 \end{pmatrix}.
\end{gathered} \qquad (2.20)$$

This action agrees with (2.10) provided the latter is supplemented with a SU(2) rotation along the fiber,

$$z \mapsto \frac{c\bar{\tau} + d}{|c\tau + d|} z, \qquad (2.21)$$
where the coordinate $z$ is related to the coordinate $t$ appearing in (2.15) by the Cayley transformation:

$$z = \frac{t + i}{t - i}, \qquad t = -i \frac{1 + z}{1 - z}. \qquad (2.22)$$

Under this action, the complex contact one-form (2.12) transforms by an overall holomorphic factor $\mathcal{X}^{[0]} \mapsto \mathcal{X}^{[0]}/(c\xi^0 + d)$, leaving the complex contact structure invariant, while the contact potential $e^\Phi$ transforms with modular weight $(-\frac{1}{2}, -\frac{1}{2})$,

$$e^{\Phi} \mapsto \frac{e^{\Phi}}{|c\tau + d|}. \qquad (2.23)$$

It will be key to note that the points $z = 0, \infty$ (corresponding to $t = \pm i$) are invariant under SL(2, $\mathbb{R}$). As a result, the leading Taylor coefficients of the Darboux coordinates around these points have simple modular transformations, e.g. $\xi^a = \tau b^a - c^a + \mathcal{O}(z)$ transforms with modular weight $(-1, 0)$.

## 2.4 Quantum corrections and S-duality

Away from the large volume, weak coupling limit, the continuous SL(2, $\mathbb{R}$) isometric action is broken by several types of quantum corrections. Firstly, due to worldsheet instantons the holomorphic prepotential (2.1) entering the c-map metric (2.3) is corrected into $F = F^{\text{cl}} + F^{\text{w.s.}}$ where

$$F^{\text{w.s.}}(X^\Lambda) = \chi_{\hat{\mathcal{Y}}} \frac{\zeta(3)(X^0)^2}{2(2\pi i)^3} - \frac{(X^0)^2}{(2\pi i)^3} \sum_{k_a \gamma^a \in H_2^+(\hat{\mathcal{Y}})} n_{k_a}^{(0)} \text{Li}_3 \left( e^{2\pi i k_a X^a / X^0} \right). \qquad (2.24)$$

The first term, proportional to the Euler number $\chi_{\hat{\mathcal{Y}}}$ of $\hat{\mathcal{Y}}$, corresponds to a perturbative correction in the $\alpha'$-expansion around large volume. The second term corresponds to a sum of worldsheet instantons, labeled by their effective$^4$ homology class $k_a \gamma^a \in H_2^+(\hat{\mathcal{Y}})$, $\mathbb{Z}$, and weighted by the genus zero Gopakumar-Vafa invariants $n_{k_a}^{(0)} \in \mathbb{Z}$. These instantons contribute through the tri-logarithm function $\text{Li}_3(x) = \sum_{m=1}^\infty m^{-3} x^m$, which takes into account multi-covering effects. Note that the two terms in (2.24) may be combined by including the zero class $k_a = 0$ in the sum and setting $n_0^{(0)} = -\chi_{\hat{\mathcal{Y}}}/2$. In the presence of these worldsheet instantons, the twistor space is still described by three patches related by the transition functions (2.14), where $F^{\text{cl}}(\xi^\Lambda)$ is replaced by $F(\xi^\Lambda)$.

Secondly, the HM moduli space receives corrections controlled by the string coupling $g_s$. At the perturbative level, it is believed [7, 9, 20] that the only corrections occurs at one-loop, and is proportional to the Euler number $\chi_{\hat{\mathcal{Y}}}$ [6, 7]. Its effect on the metric was explicitly calculated in [9, 10]. At the level of the twistor space, the one-loop correction is simply incorporated by allowing a logarithmic singularity in the Darboux coordinate $\tilde{\alpha}$ with prescribed coefficient,

$$\tilde{\alpha} = \sigma + \frac{\tau_2}{2} (t^{-1}W - t \bar{W}) - \frac{i \chi_{\hat{\mathcal{Y}}}}{24\pi} \log t. \qquad (2.25)$$

<footnote>$^4$Effective means $k_a \in \mathbb{Z}^+$ for all $a$, not all $k_a$'s vanishing simultaneously.</footnote>
Including both worldsheet instantons and the one-loop correction, the contact potential (equivalently the one-loop corrected four-dimensional dilaton) is now given by

$$r = e^{\Phi} = \frac{\tau_2^2}{2} V - \frac{\zeta(3)\chi_{\hat{g}}}{8(2\pi)^3} \tau_2^2 + e^{\Phi_{\text{ws}}} - \frac{\chi_{\hat{g}}}{192\pi}, \qquad (2.26)$$

where

$$e^{\Phi_{\text{ws}}} = \frac{\tau_2^2}{4(2\pi)^3} \sum_{k_a, \gamma^a \in H_2^+(\mathcal{Y})} n_{k_a}^{(0)} \text{Re} \left[ \text{Li}_3 \left( e^{2\pi i k_a z^a} \right) + 2\pi k_a t^a \text{Li}_2 \left( e^{2\pi i k_a z^a} \right) \right]. \qquad (2.27)$$

In addition to these perturbative corrections, one expects instanton corrections from Euclidean D(-1), D1, D3, D5-branes wrapping supersymmetric 0,2,4,6-cycles on $\mathcal{Y}$, as well as from Euclidean NS5-branes wrapping $\mathcal{Y}$. Lacking a non-perturbative definition of string theory, an effective way of computing these effects is to assume that a certain discrete subgroup of the classical symmetry group SL(2, $\mathbb{R}$) × N stays unbroken at the quantum level, and investigate how this symmetry constrains quantum contributions.

For what concerns the nilpotent algebra of isometries $N$, it is natural to assume that quantum corrections will be invariant under the unipotent group $N(\mathbb{Z})$ consisting of integer monodromies around the large volume point, and large gauge transformations of the RR and NS axions. The former consists of monodromies $M_{\epsilon^a}$ in (2.9) with $\epsilon^a$ integer. The latter were analyzed in [31, 34] using properties of the five-brane partition function. It was found that large gauge transformations act by integer shifts of the RR axions $\zeta^\Lambda, \tilde{\zeta}_\Lambda$, but require an additional shift of the NS-axion,

$$T_{(\eta^\Lambda, \tilde{\eta}_\Lambda, \kappa)} : \sigma \mapsto \sigma + 2\kappa - \tilde{\eta}_\Lambda(\zeta^\Lambda - 2\theta^\Lambda) + \eta^\Lambda(\tilde{\zeta}_\Lambda - 2\phi_\Lambda) - \eta^\Lambda \tilde{\eta}_\Lambda, \qquad (2.28)$$

where $\theta^\Lambda, \phi_\Lambda$ are the characteristics entering the fivebrane partition function, and $\kappa$ is an arbitrary integer. Clearly, the same correction must also affect the transformation of the Darboux coordinate $\tilde{\alpha}$ in (2.17).

Finally, since the SL(2, $\mathbb{R}$) action (2.10) descends from the S-duality of ten-dimensional type IIB string theory (or, in the T-dual picture, from the diffeomorphism symmetry of M-theory compactified on $\mathcal{Y} \times T^2$), it is natural to assume that the modular subgroup SL(2, $\mathbb{Z}$) remains a symmetry at the quantum level. It was noted in [31], and will be further confirmed in this paper, that the action of S-duality must however differ from the naive action (2.10) by an additional shift in the RR axion dual to D3-branes

$$\tilde{c}_a \mapsto \tilde{c}_a - c_{2,a} \varepsilon(g), \qquad (2.29)$$

where $\varepsilon(g) \in (-\frac{1}{2}, \frac{1}{2}]$ is defined in terms of the multiplier system of the Dedekind eta function $\eta(\tau)$:

$$e^{2\pi i \varepsilon(g)} = \frac{\eta\left(\frac{a\tau+b}{c\tau+d}\right)}{(c\tau+d)^{1/2} \eta(\tau)}, \qquad g = \begin{pmatrix} a & b \\ c & d \end{pmatrix}. \qquad (2.30)$$

Of course, the same correction must affect the Darboux coordinate $\tilde{\xi}'_a$,

$$\tilde{\xi}'_a \mapsto \tilde{\xi}'_a + \frac{c}{2(c\xi^0 + d)} \kappa_{abc} \xi^b \xi^c - c_{2,a} \varepsilon(g). \qquad (2.31)$$
<table><caption>**Table 1.** The action of Heisenberg group generators on type IIB fields.</caption><thead><tr><th></th><th>δb<sup>a</sup></th><th>δc<sup>a</sup></th><th>δtilde{c}<sub>a</sub></th><th>δtilde{c}<sub>0</sub></th><th>δψ</th></tr></thead><tbody><tr><td>T<sup>(1)</sup><sub>(ε<sup>a</sup>,0)</sub></td><td>ε<sup>a</sup></td><td>0</td><td><sup>1</sup>&frasl;<sub>2</sub> κ<sub>abc</sub>ε<sup>b</sup>c<sup>c</sup></td><td>−ε<sup>a</sup>tilde{c}<sub>a</sub> − <sup>1</sup>&frasl;<sub>6</sub> κ<sub>abc</sub>ε<sup>a</sup>(b<sup>b</sup>+2ε<sup>b</sup>)c<sup>c</sup></td><td><sup>1</sup>&frasl;<sub>6</sub> κ<sub>abc</sub>ε<sup>a</sup>c<sup>b</sup>c<sup>c</sup></td></tr><tr><td>T<sup>(1)</sup><sub>(0,η<sup>a</sup>)</sub></td><td>0</td><td>η<sup>a</sup></td><td>−<sup>1</sup>&frasl;<sub>2</sub> κ<sub>abc</sub>η<sup>b</sup>b<sup>c</sup> + A<sub>ab</sub>η<sup>b</sup></td><td><sup>1</sup>&frasl;<sub>6</sub> κ<sub>abc</sub>η<sup>a</sup>b<sup>b</sup>b<sup>c</sup> + A<sub>0a</sub>η<sup>a</sup></td><td>η<sup>a</sup>(tilde{c}<sub>a</sub> − φ<sub>a</sub>) + <sup>1</sup>&frasl;<sub>2</sub> A<sub>ab</sub>η<sup>a</sup>η<sup>b</sup><br>− <sup>1</sup>&frasl;<sub>6</sub> κ<sub>abc</sub>η<sup>a</sup>b<sup>b</sup>(c<sup>c</sup>+2η<sup>c</sup>)</td></tr><tr><td>T<sup>(2)</sup><sub>η<sub>a</sub></sub></td><td>0</td><td>0</td><td>tilde{η}<sub>a</sub></td><td>0</td><td>0</td></tr><tr><td>T<sup>(3)</sup><sub>(tilde{η}<sub>0</sub>,κ)</sub></td><td>0</td><td>0</td><td>0</td><td>tilde{η}<sub>0</sub></td><td>κ</td></tr></tbody></table>

These additional shifts are closely related to the quantization condition (2.7) for the charge $q'_0$, and ensure the coincidence of the Heisenberg shift $\zeta^0 \mapsto \zeta^0 + \eta^0$ with the SL(2, $\mathbb{Z}$) transformation $\tau \mapsto \tau + \eta^0$, which was noticed at the classical level. Moreover, it was observed that the characteristics $\theta^\Lambda$ must vanish, and that $\phi_a$ must transform under monodromies $M_{\epsilon^a}$ as $\phi_a \mapsto \phi_a + \frac{1}{2}\kappa_{aab}\epsilon^b$. Based on these considerations, it is therefore natural to expect that the instanton corrected moduli space will be invariant under the action of $\zeta^5$ SL(2, $\mathbb{Z}$) $\times N(\mathbb{Z})$, where the action of the unipotent group $N(\mathbb{Z})$ in the type IIB field basis is summarized in table 1.

In the remainder of this paper, we shall ignore the action of this discrete symmetry on the axions $\tilde{c}_0$ and $\psi$, since they couple only to D5-brane and NS5-branes. In this sector, the generators $T_{\tilde{\eta}_0, \kappa}^{(3)}$ act trivially, and the remaining generators satisfy the Heisenberg-type relations (not to be confused with the Heisenberg algebra satisfied by the generators (2.8))

$$T_{(0,-\eta^a)}^{(1)} \cdot T_{(-\epsilon^a,0)}^{(1)} \cdot T_{(0,\eta^a)}^{(1)} \cdot T_{(\epsilon^a,0)}^{(1)} = T_{\kappa_{abc}\epsilon^b\eta^c}^{(2)}. \qquad (2.32)$$

It is interesting to note that this Heisenberg-type algebra is isomorphic to the one which appears in the Coulomb branch of five-dimensional gauge theories compactified on a torus [45]. We comment on the relation between the string theory and field theory set-ups in section 5.

## 2.5 Twistorial construction of D-instanton corrections

Using the twistorial methods reviewed above and the symmetry restrictions discussed in the previous subsection, in [27, 28] it was shown how to incorporate all D-brane multi-instanton corrections. For convenience we shall phrase this construction in the language of type IIA string theory compactified on the mirror threefold $\mathfrak{Z}$, where D-instantons correspond to Euclidean D2-branes wrapping special Lagrangian cycles with homology class $\gamma = (p^\Lambda, q_\Lambda) \in H_3(\mathfrak{Z}, \mathbb{Z})$ (or more generally, elements in the Fukaya category of $\mathfrak{Z}$).

To specify the twistor space corrected by these D2-brane contributions, one should replace the patch $U_0$, appearing in the above perturbative construction, by a (in general infinite) set of angular sectors which extend between two consecutive BPS rays

$$\ell_{\gamma} = \{t \in \mathbb{P}^1 : Z_{\gamma}(z^a)/t \in i\mathbb{R}^{-}\}, \qquad (2.33)$$

where $Z_\gamma(z^a)$ is the central charge

$$Z_{\gamma}(z^{a}) = q_{\Lambda}z^{\Lambda} - p^{\Lambda}F_{\Lambda}(z^{a}), \qquad (2.34)$$

<footnote n="5">⁵Further enhancements of S-duality to SL(3, $\mathbb{Z}$) or SU(2, 1, $\mathbb{Z}$) were proposed in [32, 33].</footnote>
evaluated at a fixed point $z^a$ in $\mathcal{M}_{SK}$. Across each BPS ray $\ell_\gamma$, the Darboux coordinates are required to jump by the following complex contact transformation

$$ 
\begin{aligned}
\Delta\xi^\Lambda &= \frac{\Omega(\gamma; z^a)}{2\pi i} p^\Lambda \log[1 - \sigma_\gamma \mathcal{X}_\gamma] \\
\Delta\tilde{\xi}_\Lambda &= \frac{\Omega(\gamma; z^a)}{2\pi i} q_\Lambda \log[1 - \sigma_\gamma \mathcal{X}_\gamma] \\
\Delta\tilde{\alpha} &= \frac{\Omega(\gamma; z^a)}{2\pi^2} \left( \mathrm{Li}_2(\sigma_\gamma \mathcal{X}_\gamma) - \frac{1}{2} \log \mathcal{X}_\gamma \log[1 - \sigma_\gamma \mathcal{X}_\gamma] \right),
\end{aligned}
\quad (2.35) $$

where $\mathcal{X}_\gamma = \mathbf{E}(p^\Lambda \tilde{\xi}_\Lambda - q_\Lambda \xi^\Lambda)$, $\Omega(\gamma; z^a)$ are the generalized Donaldson-Thomas (DT) invariants,<fnref n="6" /> $\sigma_\gamma$ is the quadratic refinement

$$ \sigma_\gamma = \mathbf{E}\left(-\frac{1}{2}q_\Lambda p^\Lambda + q_\Lambda \theta^\Lambda - p^\Lambda \phi_\Lambda\right), \quad (2.36) $$

and we introduced the notation $\mathbf{E}(x) = e^{2\pi i x}$ which will be extensively used below. In [28] it was shown how to integrate the contact transformation (2.35) to a generating function $H^{[ij]} \equiv H^{[\gamma]}$. While the result is somewhat cumbersome, we will only require its limit in the one-instanton approximation,

$$ H^{[\gamma]}(\xi, \tilde{\xi}) = \frac{\Omega(\gamma; z^a)}{(2\pi)^2} \mathrm{Li}_2(\sigma_\gamma \mathcal{X}_\gamma). \quad (2.37) $$

Using the fact that the Darboux coordinates must approach the classical answer (2.15), (2.25) exponentially fast at $t = 0$, $t = \infty$, the gluing conditions (2.35) can be rewritten as integral equations for the Fourier modes $\mathcal{X}_\gamma$, having the form of the Thermodynamical Bethe Ansatz equations [26, 49],

$$ \mathcal{X}_\gamma = \mathcal{X}_\gamma^{\text{sf}} \mathbf{E} \left( \frac{1}{8\pi^2} \sum_{\gamma'} \Omega(\gamma; z^a) \langle \gamma, \gamma' \rangle \int_{\ell_{\gamma'}} \frac{dt' t' + t}{t' t' - t} \log[1 - \sigma_{\gamma'} \mathcal{X}_{\gamma'}] \right), \quad (2.38) $$

where

$$ \mathcal{X}_\gamma^{\text{sf}} = \mathbf{E} \left( \frac{\tau_2}{2} \left( \bar{Z}_\gamma t - \frac{Z_\gamma}{t} \right) + p^\Lambda \tilde{\xi}_\Lambda - q_\Lambda \zeta^\Lambda \right) \quad (2.39) $$

are the Fourier modes constructed from the perturbative Darboux coordinates (2.15). Eq. (2.38) uniquely determines the Darboux coordinates in each angular sector in terms of the DT invariants $\Omega(\gamma; z^a)$. In the weak coupling limit, it can be solved iteratively, leading to a (formal) multi-instanton series. The one-instanton approximation is obtained by substituting $\mathcal{X}_\gamma \rightarrow \mathcal{X}_{\gamma'}^{\text{sf}}$ on the r.h.s. and evaluating the integral over $t'$. The latter is dominated by a saddle point at

$$ t'_\gamma = i \frac{Z_\gamma}{|Z_\gamma|}, \quad S_\gamma = \tau_2 |Z_\gamma| - i (p^\Lambda \tilde{\xi}_\Lambda - q_\Lambda \zeta^\Lambda), \quad (2.40) $$

<footnote n="6">⁶As further discussed in section 3.1, the DT invariants are piecewise constant functions of the moduli $z^a$. Thus, despite appearances (2.35) is still a holomorphic complex transformation. Moreover, as in the gauge theory setting [26], the consistency of the construction for different values of the moduli $z^a$ requires that the jump of the DT invariants across lines of marginal stability (where two BPS rays collide) satisfies the Kontsevich-Soibelman wall-crossing formula [48].</footnote>
leading to a correction of order $O(e^{-2\pi S_\gamma})$ consistent with the expected semi-classical action for single-centered D-instantons. Having solved these equations, the contact potential is then obtained from the Penrose-type integral

$$e^{\Phi} = \frac{\tau_2^2}{16} e^{-K(z, \bar{z})} + \frac{\chi_2}{192\pi} - \frac{i\tau_2}{64\pi^2} \sum_{\gamma} \Omega(\gamma; z^a) \int_{\ell_{\gamma}} \frac{dt}{t} (t^{-1}Z_{\gamma} - t\bar{Z}_{\gamma}) \log[1 - \sigma_{\gamma}\chi_{\gamma}]. \quad (2.41)$$

Since the HM moduli spaces of type IIA and type IIB string theories compactified on mirror Calabi-Yau threefolds must be identical, the above construction also defines in principle the D-instanton corrections in the type IIB formulation. In practice however, this is complicated by the fact that the relation between the coordinates $z^a, \zeta^\Lambda, \tilde{\zeta}_\Lambda, \sigma$ appearing in the boundary conditions (2.15) and the physical type IIB fields<fnref n="7" /> is a priori unknown beyond the classical mirror map (2.6). One way to specify this relation is to require that the physical type IIB fields $\tau, c^a, t^a, b^a, \tilde{c}_a, \tilde{c}_0, \psi$ should satisfy the same transformation rules (2.10) as at tree-level. But then, one faces the second shortcoming of the construction above, namely that of the lack of manifest S-duality invariance. This problem was solved in the D1-D(-1) sector in [35, 36] where both, a manifestly S-duality invariant twistor construction and the quantum corrected mirror map were found. In this paper we address the more complicated case of D3-instantons and uncover their S-duality invariant description in the linearized approximation.

### 3 Modularity of DT invariants for D3-instantons

In this section, we establish the modular properties satisfied by the generalized DT invariants which count D3-instantons. The arguments are very similar to those which allow to establish the modularity of the partition function of D4-D2-D0 black holes in type IIA/2, or equivalently of M5-branes in M-theory on 2 [37, 50–53]. This is not a surprise, since T-duality relates the HM moduli space in type IIB on 2 × S₁ to the VM moduli space in type IIA on 2 × S₁, and maps D3-brane instantons wrapping a divisor D in type IIB to a D4-brane instanton wrapping D × S¹ in type IIA. In section 3.1, we recall the geometric representation of D3-instantons as coherent sheaves on divisors, and recall the main properties of the generalized DT invariants which count them. This subsection may be skipped by the reader uninterested in mathematical aspects of D3-instantons. In section 3.2, we express the DT invariants in the large volume limit in terms of the MSW invariants, which have simple modularity properties, and define a novel multi-instanton expansion which is well suited for modularity. In section 3.3, we give a heuristic description of D3-instanton corrections in twistor space, formally summing up the transition functions while ignoring the fact that each of them is associated to a different contour. A more rigorous treatment of modularity in twistor space is deferred till section 4.

<footnote n="7">⁷In contrast, it is reasonable to assume that the coordinates $z^a, \zeta^\Lambda, \tilde{\zeta}_\Lambda, \sigma$ are identified with the physical type IIA fields, as they transform in the required way under symplectic transformations.</footnote>
## 3.1 D3-instantons, coherent sheaves and DT invariants

First, we recall the description of D3-brane instantons in type IIB string theory compactified on a Calabi-Yau threefold $\hat{\mathcal{Y}}$ in the large volume limit. Similarly to their D4-brane cousins [53–56], D3-instantons are described by pure, dimension-two, semi-stable sheaves $\mathcal{E}$ supported on a divisor $\mathcal{D} \subset \hat{\mathcal{Y}}$, i.e. a complex hypersurface in $\hat{\mathcal{Y}}$ (more generally, objects in the derived category of coherent sheaves [54, 57].). Let the 4-cycles $\gamma_a$ (Poincaré dual to 2-forms $\omega_a$) denote an integer basis of $H_4(\hat{\mathcal{Y}}, \mathbb{Z}) \equiv \Lambda$, and the 2-cycles $\gamma^a$ (Poincaré dual to 4-forms $\omega^a$) denote an integer basis of $H_2(\hat{\mathcal{Y}}, \mathbb{Z}) \equiv \Lambda^*$, such that

$$ \omega_a \wedge \omega_b = \kappa_{abc} \omega^c, \quad \omega_a \wedge \omega^b = \delta_a^b \omega_{\hat{\mathcal{Y}}}, \quad \int_{\gamma^a} \omega_b = \int_{\gamma_b} \omega^a = \delta_b^a, \qquad (3.1) $$

where $\omega_{\hat{\mathcal{Y}}}$ is the volume form, normalized to $\int_{\hat{\mathcal{Y}}} \omega_{\hat{\mathcal{Y}}} = 1$, and $\kappa_{abc} = \int_{\hat{\mathcal{Y}}} \omega_a \omega_b \omega_c = \langle \gamma_a, \gamma_b, \gamma_c \rangle$. The homology class of the divisor $\mathcal{D}$ may be expanded on the basis of 4-cycles as $\mathcal{D} = d^a \gamma_a$, or equivalently its Poincaré dual may be expanded on a basis of 2-forms, $[\mathcal{D}] = d^a \omega_a$. We denote by $\mathbf{d}$ the vector $(d^1, \dots, d^{b_2})$. We assume that $\mathcal{D}$ is an ample divisor, i.e. that $[\mathcal{D}]$ belongs to the Kähler cone,

$$ \mathbf{d}^3 = \kappa_{abc} d^a d^b d^c > 0, \quad \mathbf{r} \cdot \mathbf{d}^2 = \kappa_{abc} d^a d^b r^c > 0, \quad \mathbf{q} \cdot \mathbf{d} = q_a d^a > 0, \qquad (3.2) $$

for all effective divisors $r^a \gamma_a \in H_4(\hat{\mathcal{Y}}, \mathbb{Z})$ and effective curves $q_a \gamma^a \in H_2(\hat{\mathcal{Y}}, \mathbb{Z})$. The intersection matrix of 2-cycles of an ample divisor $\mathcal{D}$ provides a natural quadratic form $\kappa_{abc} d^c$ on $\Lambda$, which has signature $(1, b_2 - 1)$. This also provides the quadratic form $\kappa^{ab} = (\kappa_{abc} d^c)^{-1}$ of $\Lambda^*$. In the following, we shall use this quadratic form to identify $\Lambda$ as a sublattice of $\Lambda^*$, $k^a \mapsto k_a \equiv \kappa_{abc} p^b k^c$.

Given any coherent sheaf $\mathcal{E}$ on $\hat{\mathcal{Y}}$, the D-brane charges are given by the components of the generalized Mukai charge vector $\gamma'$ on a basis of $H^{\text{even}}(\hat{\mathcal{Y}}, \mathbb{Z})$,

$$ \gamma' = \mathrm{ch} \mathcal{E} \sqrt{\mathrm{Td}\hat{\mathcal{Y}}} = p^0 + p^a \omega_a - q'_a \omega^a + q'_0 \omega_{\hat{\mathcal{Y}}}, \qquad (3.3) $$

and satisfy the quantization conditions (2.7). D3-brane instantons correspond to dimension-two sheaves with $p^0 = 0$. Such a sheaf $\mathcal{E}$ can be considered as the push forward $\mathcal{E} = \iota_*(\mathcal{F})$ of a coherent sheaf $\mathcal{F}$ on $\mathcal{D}$, where $\iota: \mathcal{D} \to \hat{\mathcal{Y}}$ is the embedding of the surface $\mathcal{D}$ in the Calabi-Yau. The Chern character $\mathrm{ch}\mathcal{E}$ is related to the Chern character of the sheaf $\mathcal{F}$ on $\hat{\mathcal{Y}}$ by the Grothendieck-Riemann-Roch formula [58, 59]

$$ \mathrm{ch}(\mathcal{E}) = \iota_* (\mathrm{ch}(\mathcal{F}) \mathrm{Td}(\mathcal{D})) / \mathrm{Td}(\hat{\mathcal{Y}}), \qquad (3.4) $$

where $\iota_*$ is the push-forward in cohomology, obtained by first Poincaré dualizing on $\mathcal{D}$, then pushing-forward in homology, then Poincaré dualizing on $\hat{\mathcal{Y}}$ (thereby increasing the form degree by 2). The Chern character $\mathrm{ch}(\mathcal{F})$ is given in terms of the rank $r$ of $\mathcal{F}$ and Chern classes $c_i(\mathcal{F})$ by: $\mathrm{ch}(\mathcal{F}) = r + c_1(\mathcal{F}) + \frac{1}{2}c_1(\mathcal{F})^2 - c_2(\mathcal{F})$. We recall that the first Chern class of $\mathcal{F}$ must satisfy $c_1(\mathcal{F}) \in H^2(\mathcal{D}, \mathbb{Z}) + \frac{1}{2}c_1(\mathcal{N})$, where $\mathcal{N}$ is the normal bundle of $\mathcal{D}$ in $\hat{\mathcal{Y}}$. The components of the charge vector $\gamma'$ are then [56, 60]

$$ \begin{aligned} p^0 &= 0, & p^a &= r d^a, & q'_a &= - \int_{\mathcal{D}} \iota^*(\omega_a) \left(c_1(\mathcal{F}) + \frac{r}{2} c_1(\mathcal{D})\right), \\ q'_0 &= \int_{\mathcal{D}} \frac{1}{2r} \left(c_1(\mathcal{F}) + \frac{r}{2} c_1(\mathcal{D})\right)^2 + \frac{r}{24} \chi(\mathcal{D}) - r \Delta(\mathcal{F}), \end{aligned} \qquad (3.5) $$
where $i^*$ denotes the pull-back map in cohomology, and $c_1(\mathcal{D}) = -c_1(\mathcal{N}) = -[\mathcal{D}]$. The Euler number of $\mathcal{D}$ is

$$ \chi(\mathcal{D}) = [\mathcal{D}]^3 + c_2(\mathcal{D}) \cdot [\mathcal{D}] = \mathbf{d}^3 + \mathbf{c}_2 \cdot \mathbf{d}, \qquad (3.6) $$

while $\Delta(\mathcal{F})$ is the Bogomolov discriminant, invariant under tensoring by line bundles,

$$ \Delta(\mathcal{F}) = \frac{1}{r} \int_{\mathcal{D}} \left( c_2(\mathcal{F}) - \frac{(r-1)}{2r} c_1^2(\mathcal{F}) \right). \qquad (3.7) $$

Similarly to BPS D4-brane black holes, D3-instantons with the minimal number of fermionic zero modes (namely, four) correspond to semi-stable sheaves. Recall that a sheaf $\mathcal{F}$ is semi-stable if all subsheaves $\mathcal{F}' \subset \mathcal{F}$ satisfy $\mu(\mathcal{F}') \le \mu(\mathcal{F})$. The (generalized) slope<fnref n="8" /> for D3-instantons is defined by

$$ \mu(\mathcal{F}(\gamma)) = \frac{(\mathbf{q}' + \mathbf{b}) \cdot \mathbf{t}}{\mathbf{p} \cdot \mathbf{t}^2}. \qquad (3.8) $$

In particular the Bogomolov discriminant (3.7) of a semi-stable sheaf is positive, which can be stated physically as a bound

$$ \hat{q}_0 \le \frac{r}{24} \chi(\mathcal{D}) = \frac{1}{24} \left( \frac{1}{r^2} \mathbf{p}^3 + \mathbf{c}_2 \cdot \mathbf{p} \right), \qquad (3.9) $$

on the 'invariant D(-1) charge'

$$ \hat{q}_0 = q'_0 - \frac{1}{2} q'^2 = \frac{r}{24} \chi(\mathcal{D}) - r \Delta(\mathcal{F}), \qquad (3.10) $$

where $q'^2 = \kappa^{ab} q'_a q'_b$. A useful property of $\hat{q}_0$ is that it is, like the Bogomolov discriminant, invariant under tensoring of $\mathcal{F}$ by a line bundle $\mathcal{L}$ on $\mathcal{D}$. If $c_1(\mathcal{L}) = -\epsilon \in \Lambda$, the corresponding change of the Chern character $\mathrm{ch}(\mathcal{E})$ is the 'spectral flow'

$$ \mathbf{p} \mapsto \mathbf{p}, \quad \mathbf{q}' \mapsto \mathbf{q}' - \epsilon, \quad q'_0 \mapsto q'_0 - \epsilon \cdot \mathbf{q}' + \frac{1}{2} \mathbf{p} \cdot \epsilon^2. \qquad (3.11) $$

Note that the residue class of $q' \in \Lambda^*$ modulo $\Lambda$ is unaffected by this flow. This operation however does not leave invariant the stability condition for sheaves $\mathcal{E}$ on $\hat{\mathcal{D}}$, unless one also changes the moduli $z$ accordingly: $z \mapsto z + \epsilon$ [38].

The moduli space of semi-stable dimension-two sheaves $\mathcal{E}$ on $\hat{\mathcal{D}}$ is a complex space of finite dimension. The generalized Donaldson-Thomas invariant $\Omega(0, \mathbf{p}, \mathbf{q}', q'_0; z)$ is an integer given, informally, by the Euler characteristics of this moduli space. It is also useful to consider the rational DT invariant [48, 61, 62],

$$ \bar{\Omega}(\gamma; z) = \sum_{d|\gamma} \frac{1}{d^2} \Omega(\gamma/d; z), \qquad (3.12) $$

<footnote n="8">⁸The relevant stability condition in string theory is $\Pi$-stability, but this reduces in the large volume limit to (generalized) slope stability (see [54] for further details).</footnote>
which coincides with the integer $\Omega(\gamma/d; z)$ whenever $\gamma$ is a primitive vector, but in general is a rational number. Both $\Omega$ and $\bar{\Omega}$ are piecewise constant as a function of the Kähler moduli $z$, but are discontinuous across walls of marginal stability where the sheaf becomes unstable. This moduli dependence persists even in the large volume limit, with the exception of CY threefolds with $b_2 = 1$, where the invariants $\Omega(p, q', q'_0; z)$ are independent of $z$ at large volume.

## 3.2 MSW invariants and modularity

The moduli dependence of the DT invariants makes it difficult to state their modular properties directly. Fortunately, it is possible to express the DT invariants in the large volume limit in terms of a different set of invariants $\bar{\Omega}_p(q, q'_0)$, which we call the MSW invariants. They are moduli independent and given by Fourier coefficients of a certain Jacobi form, namely the elliptic genus of the MSW superconformal field theory which describes D4-D2-D0 black holes [37, 50–53],

$$ \begin{aligned} \mathcal{Z}_p(\tau, \mathbf{y}) &= \mathrm{Tr}'(2J_3)^2 (-1)^{2J_3} \mathbf{E}\left(\left(L_0 - \frac{c_L}{24}\right) \tau - \left(\bar{L}_0 - \frac{c_R}{24}\right) \bar{\tau} + \mathbf{q}' \cdot \mathbf{y}\right) \\ &= \sum_{\mathbf{q}', \mathbf{q}'_0} (-1)^{p \cdot q} \bar{\Omega}_p(\mathbf{q}', \mathbf{q}'_0) \mathbf{E}\left(-\hat{q}_0 \tau - \frac{1}{2} \mathbf{q}'_0^2 \tau - \frac{1}{2} \mathbf{q}'_+^2 \bar{\tau} + \mathbf{q}' \cdot \mathbf{y}\right), \end{aligned} \quad (3.13) $$

Here, the summation runs over

$$ \mathbf{q}' \in \mathbb{Z}^{b_2} + \frac{1}{2} \mathbf{p}, \qquad \mathbf{q}'_0 \in \mathbb{Z} - \frac{1}{24} \mathbf{c}_2 \cdot \mathbf{p}, \qquad (3.14) $$

where $(\mathbf{p})_a \equiv \kappa_{abc}p^b p^c$, subject to the bound (3.9). For a general vector $\mathbf{k} \in \Lambda$, the vectors $\mathbf{k}_{\pm} \in \Lambda \otimes \mathbb{R}$ are projections of $\mathbf{k}$ onto the positive and negative definite subspaces of $\Lambda \otimes \mathbb{R}$ defined by the magnetic charge vector $\mathbf{p}$ and the Kähler moduli<fnref n="9" /> $\mathbf{t}$,

$$ \mathbf{k}_{+} = \frac{\mathbf{k} \cdot \mathbf{t}}{\mathbf{p} \cdot \mathbf{t}^2} \mathbf{t}, \qquad \mathbf{k}_{-} = \mathbf{k} - \mathbf{k}_{+}, \qquad \mathbf{k}^2 = \mathbf{k}_{+}^2 + \mathbf{k}_{-}^2, \qquad (3.15) $$

which satisfy

$$ \mathbf{k}_{+}^{2} > 0, \qquad \mathbf{k}_{-}^{2} < 0, \qquad \forall \mathbf{k} \neq \mathbf{0}. \qquad (3.16) $$

We also use the notation $k_+$ to denote the modulus of the vector $k_+$. It follows from general properties of the CFT that the elliptic genus (3.13) is a Jacobi form of weight $(-3/2, 1/2)$ under SL(2, $\mathbb{Z}$), with multiplier system $M_{\mathbb{Z}} = \mathbf{E}(\varepsilon(g) \mathbf{c}_2 \cdot \mathbf{p})$, where $\varepsilon(g)$ is the multiplier system (2.30) of the Dedekind eta function.

The MSW invariants $\bar{\Omega}_p(q', q'_0)$ coincide with the generalized DT invariants at the so-called ‘large volume attractor point’ [64]

$$ \bar{\Omega}_p(q', q'_0) = \bar{\Omega}(0, \mathbf{p}, q', q'_0; z_{\infty}(\gamma)), \qquad z_{\infty}(\gamma) = \lim_{\lambda \to +\infty} (\mathbf{b}(\gamma) + i\lambda \mathbf{t}(\gamma)), \qquad (3.17) $$

<footnote n="9">⁹This result is usually stated for $\mathbf{t} \propto \mathbf{p}$, but the SCFT has a moduli space of marginal deformations which allows to go away from this point [63].</footnote>
where $z(\gamma) = b(\gamma) + it(\gamma)$ is the standard attractor point. In particular, $\bar{\Omega}_p(q', q'_0)$ is invariant under tensoring by a line bundle (3.11), which corresponds to the spectral flow symmetry in the SCFT. Decomposing

$$q' = \mu + \epsilon + \frac{1}{2} p, \qquad (3.18)$$

where $\mu \in \Lambda^*/\Lambda$ is the residue class<fnref n="10" /> of $q' - \frac{1}{2}p$ modulo $\epsilon$, it follows that the MSW invariant $\bar{\Omega}_p(q', q'_0) \equiv \bar{\Omega}_{p,\mu}(\hat{q}_0)$ depends only on $p$, $\mu$ and $\hat{q}_0$. As a result, the elliptic genus has a theta function decomposition:

$$\mathcal{Z}_p(\tau, y, t) = \sum_{\mu \in \Lambda^*/\Lambda} h_{p,\mu}(\tau) \overline{\theta_{p,\mu}(\tau, y, t)}, \qquad (3.19)$$

where $\theta_{p,\mu}$ is the Siegel-Narain theta series<fnref n="11" /> associated to the lattice $\Lambda$ equipped with the quadratic form $\kappa_{ab}$ of signature $(1, b_2 - 1)$,

$$\theta_{p,\mu}(\tau, y, t) = \sum_{k \in \Lambda + \mu + \frac{1}{2}p} (-1)^{k \cdot p} \mathbf{E}\left(\frac{1}{2}k_+^2\tau + \frac{1}{2}k_-^2\bar{\tau} + k \cdot y\right), \qquad (3.20)$$

and the $y$-independent coefficients are given by

$$h_{p,\mu}(\tau) = \sum_{\hat{q}_0 \le r\chi(D)/24} \bar{\Omega}_{p,\mu}(\hat{q}_0) \mathbf{E}(-\hat{q}_0\tau). \qquad (3.21)$$

Since the theta series (3.20) is a vector valued Jacobi form of modular weight $(\frac{1}{2}, \frac{b_2-1}{2})$ and multiplier system $M_\theta$ under SL(2, $\mathbb{Z}$), it follows that the function $h_{p,\mu}$ must transform as a vector-valued holomorphic<fnref n="12" /> modular form of negative weight $(-\frac{b_2}{2} - 1, 0)$ and multiplier system $M(g) = M_Z \times \overline{M_\theta}^{-1}$ under the full modular group SL(2, $\mathbb{Z}$). This is equivalent to $M(g) = M_Z \times M_\theta$ since $M_\theta$ is unitary. The Fourier coefficients of $h_{p,\mu}$ with $\hat{q}_0 > 0$ are known as the polar degeneracies, and determine the remaining MSW invariants by the usual Rademacher representation [53].<fnref n="13" />

Away from the large volume attractor point $z_\infty(\gamma)$ (but still at large volume), the DT invariant $\bar{\Omega}(0, p, q', q'_0; z)$ differs from the MSW invariant $\bar{\Omega}_{p,\mu}(\hat{q}_0)$ by terms of higher order

<footnote n="10">¹⁰The quotient $\Lambda^*/\Lambda$ is a finite group of order $|\det \kappa_{ab}|$, sometimes known as the discriminant group.</footnote>

<footnote n="11">¹¹looseness=-1 Note that (3.20) coincides with the theta series (A.6) with $y_+ = b_+\tau - c_+$, $y_- = b_-\bar{\tau} - c_-$, up to a phase $\mathbf{E}(\frac{1}{2}(b_+^2\tau + b_-^2\bar{\tau} - b \cdot c))$.</footnote>

<footnote n="12">¹²Non-compact directions in the target space of the CFT could potentially lead to mock modular forms and thus holomorphic anomalies [65]. For local Calabi-Yau manifolds, e.g. $\mathcal{O}(-K_{\mathbb{P}2}) \to \mathbb{P}^2$, it is known that the holomorphic generating series of DT-invariants for sheaves with rank > 1 requires a non-holomorphic addition in order to transform as a modular form [66]. We assume that this issue does not arise here.</footnote>

<footnote n="13">¹³The most polar term $q^{-r\chi(D)/24}$, arises in the CFT from the fact that $L_0 \ge 0$ and that $c_L = r\chi(D)$. Application of the Cardy formula shows that the asymptotic growth of states is dominated by $r = 1$ for given magnetic charge $p$, therefore the contribution of non-Abelian D3-instantons is exponentially suppressed compared to Abelian instantons.</footnote>
in the MSW invariants [38, 39]:

$$ \begin{aligned} \bar{\Omega}(0, \mathbf{p}, \mathbf{q}', \mathbf{q}'_0; \mathbf{z}) ={}& \bar{\Omega}_{\mathbf{p},\mu}(\hat{q}_0) \\ & + \sum_{\substack{\gamma_1+\gamma_2=(0,\mathbf{p},\mathbf{q}',\mathbf{q}'_0) \\ \mathbf{p}_i>0}} \frac{1}{2} \left( \operatorname{sgn} \left( \frac{(\mathbf{q}'_2+\mathbf{b}) \cdot \mathbf{t}}{\mathbf{p}_2 \cdot \mathbf{t}^2} - \frac{(\mathbf{q}'_1+\mathbf{b}) \cdot \mathbf{t}}{\mathbf{p}_1 \cdot \mathbf{t}^2} \right) - \operatorname{sgn}(\langle \gamma_1, \gamma_2 \rangle) \right) \\ & \times \langle \gamma_1, \gamma_2 \rangle (-1)^{\langle \gamma_1, \gamma_2 \rangle} \bar{\Omega}_{\mathbf{p}_1,\mu_1}(\hat{q}_{0,1}) \bar{\Omega}_{\mathbf{p}_2,\mu_2}(\hat{q}_{0,2}) \\ & + \dots \end{aligned} \quad (3.22) $$

where $\gamma_i = (0, \mathbf{p}_i, \mathbf{q}'_i, \mathbf{q}'_{0,i})$, and therefore $\langle \gamma_1, \gamma_2 \rangle = \mathbf{p}_1 \cdot \mathbf{q}'_2 - \mathbf{p}_2 \cdot \mathbf{q}'_1$. Moreover one recognizes on the second line the difference of the slopes (3.8) of the constituents. The higher order terms can be thought of as describing bound states of the MSW constituents, which exist away from the large volume attractor point $z_\infty(\gamma)$. This decomposition is analogous to the decomposition of the index in terms of the multi-centered black hole bound states, although the elementary MSW constituents may themselves arise as bound states of more basic constituents such as D6-anti D6 bound states [53], which may decay across walls in the interior of the Kähler cone. The decomposition (3.22) hinges on the fact that walls for constituents with $\mathbf{p}_1 = 0, \mathbf{p}_2 \neq 0$ lie on the boundary or outside the Kähler cone, such that the only relevant walls are those between D3-instantons, i.e. constituents with charges $\mathbf{p}_i > 0$ [38]. As shown in [38], the ‘two-centered’ contribution in (3.22) (after smoothing out the sign function into an error function as in eq. (A.8)) leads to a modular invariant partition function with the same modular properties as the elliptic genus, and it is expected that modularity persists to all orders. It is worthwhile to note that the expansion (3.22) has a finite number of terms in any chamber related by a finite number of wall-crossings from the large volume attractor chamber.

Having expressed the generalized DT invariants in terms of the moduli-independent MSW invariants, which have simple modular properties, it is thus natural to reorganize the multi-instanton series expansion of the integral equations (2.38) by first expressing $\Omega(\gamma; \mathbf{z})$ in terms of $\bar{\Omega}_{\mathbf{p},\mu}(\hat{q}_0)$ using (3.22), and then expanding in powers of the MSW invariants $\bar{\Omega}_{\mathbf{p},\mu}$. We stress that this expansion in MSW invariants is not a Taylor expansion in a small parameter, rather it is a finite sum in any chamber separated by a finite number of walls from the large volume attractor chamber. In terms of the usual multi-instanton expansion of (2.38), the n-th order in this reorganized multi-instanton expansion will contain the usual n-instanton contribution weighted by products of MSW degeneracies $\bar{\Omega}_{\mathbf{p},\mu}$, together with terms with $n' < n$ instantons weighted by terms of order $n-n'$ in the expansion (3.22). In the remainder of this work, we shall be concerned with only the first term in this expansion, which we dub the ‘one-instanton approximation’.

### 3.3 One-instanton approximation: heuristics

In the one-instanton approximation introduced in the previous subsection, quantum corrections to the perturbative metric are effectively encoded by the set of holomorphic
functions<fnref n="14" />

$$H_{\gamma}(\xi^0, \xi, \tilde{\xi}) = \frac{1}{(2\pi)^2} \bar{\Omega}_{p,\mu}(\hat{q}_0) \sigma_{\gamma} \chi_{\gamma}, \qquad (3.23)$$

which generate the infinitesimal complex contact transformation across the BPS ray $\ell_{\gamma}$. The set of all $(\ell_{\gamma}, H_{\gamma})$ can be viewed as a Cech representative of $H^1(Z, O(2))$, which is known to classify the linear deformations of QK manifolds. In this subsection, we take a heuristic approach and consider the formal sum $H = \sum_{\gamma} H_{\gamma}$, ignoring the important fact that the functions $H_{\gamma}$ are attached to different contours. This will allow us to highlight the main mechanism which ensures invariance under S-duality, deferring a rigorous treatment to section 4.1 onward.

Ignoring the contributions of D5 and NS5-instantons, which are exponentially suppressed at large volume with respect to D3-D1-D(-1)-instantons, and restricting to a fixed D3-brane charge $p$, the D3-D1-D(-1) one-instanton corrections are thus described by the formal sum<fnref n="15" />

$$H_{(1)} = \frac{1}{(2\pi)^2} \sum_{\substack{q', q'_0 \\ q' \neq q'_0}}^{!} (-1)^{p \cdot q'} \bar{\Omega}_{p,\mu}(\hat{q}_0) \mathbf{E}(p \cdot \tilde{\xi}' - q' \cdot \xi - q'_0 \xi^0), \qquad (3.24)$$

where $\bar{\Omega}_{p,\mu}(\hat{q}_0)$ are the MSW invariants introduced in the previous subsection. In writing (3.24), we identified the quadratic refinement $\sigma_{\gamma}$ with the phase $(-1)^{p \cdot q'}$ by setting the characteristics $\theta^{\Lambda}$, $\phi_{\Lambda}$ to zero. We also omit the phase $\mathbf{E}(\frac{1}{2}A_{\Lambda\Sigma}p^{\Lambda}p^{\Sigma})$ which is unimportant for fixed magnetic charges $p^{\Lambda}$. The assumption $\phi_{\Lambda} = 0$ is for simplicity, since $\phi_{\Lambda}$ couples only to magnetic charges which are kept constant in our set-up. In contrast, the condition $\theta^{\Lambda} = 0$ is necessary for modular invariance, which requires the phase factor $(-1)^{p \cdot q'}$ in the sum (3.24). The vanishing of $\theta^{\Lambda}$ was also seen to be necessary in the linear analysis of NS5-instanton corrections in [31].

Using the same steps as before, we can therefore trade the sum over $q'$, $q'_0$ in (3.24) for a sum over $\mu$, $\hat{q}_0$ and $k = \epsilon + \mu + \frac{1}{2}p$, and represent (3.24) as a sum of theta series analogous to (3.19),

$$H_{(1)} = \frac{1}{(2\pi)^2} \mathbf{E}(p \cdot \tilde{\xi}') \sum_{\mu \in \Lambda^*/\Lambda} h_{p,\mu}(\xi^0) \Xi_{p,\mu}(\xi^0, \xi), \qquad (3.25)$$

where

$$\Xi_{p,\mu}(\xi^0, \xi) = \sum_{k \in \Lambda + \mu + \frac{1}{2}p}^{!} \mathbf{E}\left(-\frac{1}{2}k \cdot p^2 - k \cdot \xi - \frac{1}{2}k^2 \xi^0\right) \qquad (3.26)$$

and $h_{p,\mu}(\xi^0)$ is the same modular function which was defined in (3.21), evaluated at $\tau = \xi^0$. It therefore transforms as a vector-valued holomorphic modular form of modular weight $-\frac{b_2}{2} - 1$ and multiplier system $M(g) = M_Z \times M_{\theta}$ under the S-duality action (2.20). On

<footnote n="14">¹⁴Indeed, the multi-covering contributions induced by the dilogarithm function in (2.37) are described just as well by replacing $Li_2(\sigma_{\gamma}\chi_{\gamma}) \mapsto \sigma_{\gamma}\chi_{\gamma}$ and using the rational DT invariants (3.12) in place of the integer DT invariants. Due to (3.22), the rational DT invariants can then be replaced by $\bar{\Omega}_{p,\mu}$.</footnote>

<footnote n="15">¹⁵The symbol $\sum$ indicates a divergent sum.</footnote>
the other hand, $\Xi_{p,\mu}(\xi^0, \xi)$ is formally a holomorphic theta series for the lattice $\Lambda$ of rank $b_2$ with quadratic form $-\kappa_{ab}$, with modular parameter $\tau = \xi^0$ and elliptic parameters $\xi^a$. Thus, under the action (2.20), it is expected to transform as a holomorphic Jacobi form of weight $\frac{b_2}{2}$, multiplier system $M_{\theta}^{-1}$ and index $m_{ab} = -\frac{1}{2}\kappa_{ab}$. Finally, thanks to the term proportional to $c_{2,a}$ in the transformation of $\tilde{\xi}'$, the exponential prefactor in (3.25) transforms as the automorphy factor of a multi-variable holomorphic Jacobi theta series with the index $m_{ab} = \frac{1}{2}\kappa_{ab}$ and multiplier system $M_{\tilde{\xi}}^{-1}$. We thus conclude that, under the action of S-duality in twistor space, the formal sum (3.24) transforms as a holomorphic Jacobi form of weight $-1$ and trivial multiplier system. In [36] it was shown that this is precisely the condition ensuring the presence of the SL(2, $\mathbb{Z}$) isometry group. Thus, $H_{(1)}$ is expected to generate an S-duality invariant deformation of the perturbative HM metric.

However, this analysis overlooks the important fact that the quadratic form $\kappa_{ab}$ has indefinite signature $(1, b_2 - 1)$, and therefore the theta series (3.26) is formally divergent. Fortunately, the theta series (3.26) never arises as such in the computation of the metric, rather each of the terms in (3.26) must be integrated along a different contour, which renders the resulting series convergent. Another fortunate circumstance is that there does exist a natural holomorphic 'mock' theta series of signature $(1, b_2 - 1)$, the convergence of which is ensured by restricting the sum to lattice vectors lying in a certain cone where the quadratic form is definite positive [40]. While each of these two series transform with modular anomalies, their sum is in fact modular invariant, ensuring the modular invariance of the D3-instanton corrected metric, as the next section will aim to demonstrate.

# 4 D3-instantons, period integrals and mock theta series

In this section, we discuss how S-duality is realized in the presence of D3-D1-D(-1) instantons, but in the absence of D5 and NS5-instantons. This situation arises in the large volume limit, where D5 and NS5-brane instantons are suppressed compared to D3-D1-D(-1) and worldsheet instantons. In section 4.1 we introduce a large volume limit which retains modular invariance but reduces the D3-instanton sums to (generalized) Gaussian theta series, and obtain the instanton corrections to the Darboux coordinates and contact potential in this limit. We establish their modularity (or lack thereof) in section 4.2, section 4.3. Finally, in section 4.4 we show how modular anomalies can be canceled by a contact transformation generated by a mock theta series.

## 4.1 Instanton corrections in the large volume limit

In order to analyze the action of S-duality on the D-instanton corrected twistor space, it is useful to focus on the Darboux coordinates around the point $t = -i$, or equivalently $z = 0$, which is invariant under the S-duality action (2.21) on the $\mathbb{P}^1$ fiber. In the large volume limit $t^a \to \infty$, it may be checked that the saddle points (2.40) dominating the integral equations (2.38), for D3-D1-D(-1) charges $\gamma = (0, p, q, q_0)$ such that $p \cdot t^2 > 0$, accumulate near the same point

$$t'_{\gamma} \approx -i - 2 \frac{(k+b)_{+}}{\sqrt{p \cdot t^2}} + \dots, \quad z'_{\gamma} \approx -i \frac{(k+b)_{+}}{\sqrt{p \cdot t^2}} + \dots \qquad (4.1)$$
Thus, it is natural to expand the Darboux coordinates around the point $z = 0$, $t^a \to \infty$, keeping the product $zt^a$ fixed. Retaining all the terms from the perturbative result (2.15) which are finite or divergent in this limit, we find

$$
\begin{align}
\xi^0 &= \tau, \nonumber \\
\xi^a &= \tau b^a - c^a + 2\tau_2 t^a z + \delta\xi^a, \nonumber \\
\tilde{\xi}_a' &= \frac{i}{2}\tau_2 \kappa_{abc} t^b t^c + \tilde{c}_a + \frac{1}{2}\kappa_{abc} b^b (c^c - \tau b^c) - 2\tau_2 \kappa_{abc} t^b b^c z + i\tau_2 \kappa_{abc} t^b t^c z^2 + \delta\tilde{\xi}_a', \nonumber \\
\tilde{\xi}_0' &= \frac{1}{6}\kappa_{abc}\tau_2 t^a t^b (2t^c z + 3b_c) + \tilde{c}_0 - \frac{1}{6}\kappa_{abc}b^a b^b (c^c - \tau b^c) + \tau_2 \kappa_{abc} t^a b^b (b^c z - it^c z^2) + \delta\tilde{\xi}_0', \nonumber \\
\alpha' &= -\frac{1}{6}\kappa_{abc}\tau_2 t^a t^b (2t^c z\bar{\tau} + 3c^c) + \psi + \frac{1}{6}\kappa_{abc}b^a (b^b\tau - c^b)(b^c\tau - 2c^c) \tag{4.2} \\
&\qquad + \tau_2 z \kappa_{abc} t^a \left(b^b(b^c\tau - 2c^c) + t^b(2zb^c\tau_2 + iz^2c^c)\right) + \delta\alpha', \nonumber
\end{align}
$$

where $\delta\xi^a$, etc, denote the instanton corrections which include two types of contributions: from the integral terms in (2.38) and from instanton corrections to the classical mirror map (2.6). Note that the former contributions can be split into two parts. The first corresponds to D-branes with charge $\gamma$ with $p \cdot t^2 > 0$, while the second comes from anti D-branes with opposite charge $-\gamma$. In the former case, the integrals are dominated by a saddle point at $t'_\gamma$, which approaches $t' = -i$ in the large volume limit, while in the latter case, they are dominated by a saddle point at the antipodal point $t'_{-\gamma} = -1/t'_\gamma$, which approaches $t' = i$ or $z' = \infty$ in the large volume limit. This suggests to keep fixed inside these integrals a different combination, $t^a/z'$.

Besides the Darboux coordinates, it is important to consider also the contact potential $e^\Phi$. In our approximation, it is dominated by the classical term in (2.26), so we can write it as

$$e^{\Phi} = \frac{1}{2} \tau_2^2 \mathcal{V} + \delta e^{\Phi}. \qquad (4.3)$$

Our task will be to compute the corrections $\delta\xi^a$, etc. in the one-instanton and large volume approximation, and to show that the resulting instanton corrected Darboux coordinates (4.2) and contact potential (4.3) continue to transform in the same way (2.20), (2.23) as their perturbative counterpart, possibly up to a contact transformation. For what concerns the coordinates $\xi^a$ and the contact potential $e^\Phi$, this requires showing

$$\delta\xi^a \mapsto \frac{\delta\xi^a}{c\tau + d}, \qquad \delta e^\Phi \mapsto \frac{e^\Phi}{|c\tau + d|}. \qquad (4.4)$$

For what concerns the other coordinates $\tilde{\xi}'_a, \tilde{\xi}'_0, \alpha'$, the corresponding constraints are best expressed by forming suitable linear combinations<fnref n="16" />

$$
\begin{align}
\hat{\delta}\tilde{\xi}'_a &= \delta\tilde{\xi}'_a + \kappa_{abc} (b^b - izt^b) \delta\xi^a, \nonumber \\
\hat{\delta}_+\alpha' &= \delta\alpha' + \tau\hat{\delta}\xi'_0 + \kappa_{abc}(b^a - izt^a)(c^b - \tau b^b - 2\tau_2 z t^a)\delta\xi^c, \tag{4.5} \\
\hat{\delta}_-\alpha' &= \delta\alpha' + \bar{\tau}\hat{\delta}\xi'_0 + \kappa_{abc}(b^a - izt^a)(c^b - \tau_1 b^b - \tau_2 z t^a)\delta\xi^c. \nonumber
\end{align}
$$

<footnote n="16">¹⁶These linear combinations are equal to the large volume limit of the linear combinations in eq. (B.6) of [36], up to a divergent term which also transforms as in (4.6) and can therefore be dropped.</footnote>
These linear combinations are designed to transform canonically under S-duality as

$$ \hat{\delta\xi}'_a \mapsto \hat{\delta\xi}'_a, \quad \hat{\delta}_+\alpha' \mapsto \frac{\hat{\delta}_+\alpha}{c\tau+d}, \quad \hat{\delta}_-\alpha' \mapsto \frac{\hat{\delta}_-\alpha'}{c\bar{\tau}+d} \quad (4.6) $$

if and only if the corrected Darboux coordinates (4.2) transform according to (2.20).

As was mentioned above, the instanton corrections acquire two types of contributions. The first is computed by replacing $\mathcal{X}_\gamma$ by $\mathcal{X}_\gamma^{sf}$ on the r.h.s. of the integral equations (2.38) and (2.41), taking the large volume limit, and evaluating the integrals in terms of the type IIA coordinates $\tau_2, z^a, \zeta^\Lambda, \tilde{\zeta}_\Lambda, \sigma$. The latter can then be replaced by the type IIB coordinates $\tau, t^a, b^a, c^a, \tilde{c}_a, \tilde{c}_0, \psi$, adapted for S-duality, using the classical mirror map (2.6). However, there are further contributions stemming from instanton corrections to this mirror map and coming from the tree level terms on the type IIA side. In appendix B we extend the procedure of [36] and compute these corrections to the mirror map in our approximation. The result is presented explicitly in (B.15). In the same appendix it is shown that, adding up the two types of contributions, the instanton corrections to the Darboux coordinates and the contact potential can be written as

$$ \begin{aligned} \delta\xi &= 2\pi i \mathbf{p} \mathcal{J}_{\mathbf{p}}, \\ \hat{\delta}\xi' &= -\mathbf{D} \cdot \mathcal{J}_{\mathbf{p}}, \\ \hat{\delta}_+\alpha' &= \left[\frac{\tau_2}{\pi}\mathbf{D} \cdot \bar{\mathbf{D}} - 2\right] \cdot \mathcal{J}_{\mathbf{p}}, \quad (4.7) \\ \hat{\delta}_-\alpha' &= -[4\pi\tau_2\mathcal{D}_{-1} + (\mathbf{c} - \bar{\tau}\mathbf{b}) \cdot \mathbf{D}] \cdot \mathcal{J}_{\mathbf{p}} + i\tau_2 z(p \cdot t^2) \sum_{q_\Lambda} \int_{\ell_{-\gamma}} \frac{dz'}{(z')^2} H_{-\gamma}, \\ \delta e^\Phi &= -\frac{\tau_2}{4} \sum_{q_\Lambda} \int_{\ell_\gamma} dz' \left[\hat{q}_0 + \frac{1}{2}(\mathbf{k} + \mathbf{b} - i\mathbf{z}'\mathbf{t}) \cdot (\mathbf{k} + \mathbf{b} - 3i\mathbf{z}'\mathbf{t})\right] H_\gamma + \text{c.c.} \end{aligned} $$

where

$$ \mathcal{J}_{\mathbf{p}}(z) = \sum_{q_{\Lambda}} \int_{\ell_{\gamma}} \frac{dz'}{2\pi i(z' - z)} H_{\gamma}, \quad (4.8) $$

and $\mathcal{D}_{-1}, \mathbf{D}, \bar{\mathbf{D}}$ are the covariant derivative operators$^{17}$

$$ \mathcal{D}_{\bar{\mathbf{h}}} = \frac{1}{2\pi i} \left( \partial_{\tau} + \frac{\mathbf{h}}{2i\tau_2} \right), \quad \mathbf{D} = -\frac{i}{2\tau_2} \left[ \partial_{\mathbf{b}} + \bar{\tau}\partial_{\mathbf{c}} - i\pi(\mathbf{c} - \bar{\tau}\mathbf{b}) \right], \quad \bar{\mathbf{D}} = (\mathbf{D})^*. \quad (4.9) $$

Moreover, $H_{\pm\gamma}$ is the large volume limit of (3.23) where one keeps fixed $z^{\pm 1}t^a$, respectively. Explicitly, these two functions are given by

$$ \begin{aligned} H_{\gamma} &= \frac{(-1)^{\mathbf{p}\cdot\mathbf{k}}}{(2\pi)^2} \bar{\Omega}_{\mathbf{p},\mathbf{\mu}}(\hat{q}_0) \mathbf{E} \left( iS_{\mathrm{cl}} - \frac{1}{2}(\mathbf{k} + \mathbf{b})_+^2 \bar{\tau} - \left(\hat{q}_0 + \frac{1}{2}(\mathbf{k} + \mathbf{b})_-^2\right) \tau + \mathbf{c} \cdot \left(\mathbf{k} + \frac{1}{2}\mathbf{b}\right) + iQ_{\gamma}(z') \right), \\ H_{-\gamma} &= \frac{(-1)^{\mathbf{p}\cdot\mathbf{k}}}{(2\pi)^2} \bar{\Omega}_{\mathbf{p},\mathbf{\mu}}(\hat{q}_0) \mathbf{E} \left( i\bar{S}_{\mathrm{cl}} + \frac{1}{2}(\mathbf{k} + \mathbf{b})_+^2 \tau + \left(\hat{q}_0 + \frac{1}{2}(\mathbf{k} + \mathbf{b})_-^2\right) \bar{\tau} - \mathbf{c} \cdot \left(\mathbf{k} + \frac{1}{2}\mathbf{b}\right) + iQ_{-\gamma}(z') \right), \end{aligned} \quad (4.10) $$

<footnote>$^{17}$Acting on theta functions of weight $(\mathbf{h}, \bar{\mathbf{h}})$, the operators $\mathcal{D}_{\mathbf{h}}, \mathbf{D}, \bar{\mathbf{D}}$ raise the modular weight by $(2,0)$, $(1,0)$, $(0,1)$, respectively. To avoid cluttering, we abuse notation and declare that $\mathcal{D}_{\mathbf{h}}$ annihilates the classical, modular invariant contribution $S_{\mathrm{cl}}$ in $H_{\gamma}$.</footnote>
where $S_{cl}$ is the leading part of the Euclidean D3-brane action in the large volume limit, and $Q_{\pm\gamma}(z)$ is the only part which depends on $z$,

$$S_{cl} = \frac{\tau_2}{2} \mathbf{p} \cdot \mathbf{t}^2 - i \tilde{c} \cdot \mathbf{p}, \qquad Q_{\pm\gamma}(z') = \tau_2 \mathbf{p} \cdot \mathbf{t}^2 \left( (z')^{\pm 1} \pm i \frac{(k+b)_+}{\sqrt{\mathbf{p} \cdot \mathbf{t}^2}} \right)^2 . \qquad (4.11)$$

The notation $\int_{\ell_{\gamma}}$ signifies that each term must be integrated on a contour which extends from $z' = -\infty$ to $z' = +\infty$ and goes through the saddle point $z'_{\gamma} = -i(k+b)_+ / \sqrt{\mathbf{p} \cdot \mathbf{t}^2}$. This corresponds to the BPS ray $\ell_{\gamma}$ in the large volume limit.

As we shall see momentarily, the corrections (4.7) do not quite transform as required in (4.6), but the modular anomaly can be absorbed by a contact transformation. This issue however does not arise in the case of the contact potential, which we consider first.

## 4.2 Modular invariance of the contact potential

The one-instanton correction to the contact potential in (4.7) involves a Gaussian integral over $z'$ (renamed as $z$) which is easily calculated. Rewriting the integrand

$$\delta e^{\Phi} = -\frac{\tau_2}{4} \sum_{q_{\Lambda}} \int_{\ell_{\gamma}} dz \left[ \hat{q}_0 + \frac{1}{2}(\mathbf{k} + \mathbf{b})^2_- - \frac{3}{8\pi\tau_2} + \frac{1}{4\pi\tau_2} \partial_z \left( z + \frac{1}{8\pi\tau_2 \mathbf{p} \cdot \mathbf{t}^2} \partial_z \right) \right] H_{\gamma} + \text{c.c.} \qquad (4.12)$$

and dropping the total derivative, we arrive at

$$\delta e^{\Phi} = -\frac{\tau_2}{16\pi^2\sqrt{2\tau_2 \mathbf{p} \cdot \mathbf{t}^2}} \sum_{q_{\Lambda}} (-1)^{\mathbf{k} \cdot \mathbf{p}} \bar{\Omega}_{\mathbf{p},\mu} \left[ \hat{q}_0 + \frac{1}{2}(\mathbf{k} + \mathbf{b})^2_- - \frac{3}{8\pi\tau_2} \right] \times \mathbf{E} \left( iS_{cl} - \frac{1}{2}(\mathbf{k} + \mathbf{b})^2_+ \bar{\tau} - \left( \hat{q}_0 + \frac{1}{2}(\mathbf{k} + \mathbf{b})^2_- \right) \tau + \mathbf{c} \cdot \left( \mathbf{k} + \frac{1}{2}\mathbf{b} \right) \right) + \text{c.c.} \qquad (4.13)$$

The sum over $q_{\Lambda}$ is recognized as the partition function (3.19), except for the insertion in the square bracket. The latter in turn arises by acting with the covariant derivative $\mathcal{D}_{-\frac{3}{2}}$, obtaining

$$\delta e^{\Phi} = \frac{\tau_2 e^{-2\pi S_{cl}}}{16\pi^2 \sqrt{2\tau_2 \mathbf{p} \cdot \mathbf{t}^2}} \mathcal{D}_{-\frac{3}{2}} \sum_{\mu \in \Lambda^*/\Lambda} h_{\mathbf{p},\mu}(\tau) \overline{\theta_{\mathbf{p},\mu}(\tau, \mathbf{t}, \mathbf{b}, \mathbf{c})} + \text{c.c.} \qquad (4.14)$$

The action of $\mathcal{D}_{-\frac{3}{2}}$ on $h_{\mathbf{p},\mu}(\tau) \overline{\theta_{\mathbf{p},\mu}(\tau, \mathbf{t}, \mathbf{b}, \mathbf{c})}$ raises the modular weight from $(-\frac{3}{2}, \frac{1}{2})$ to $(\frac{1}{2}, \frac{1}{2})$, while the overall factor of $\tau_2$ reduces this to $(-\frac{1}{2}, -\frac{1}{2})$ (recall that the combination $\tau_2 \mathbf{p} \cdot \mathbf{t}^2$ is modular invariant). Therefore, the correction $\delta e^{\Phi}$ transforms as required in (4.4).

## 4.3 Instanton corrections to Darboux coordinates and period integrals

We now turn to the instanton corrections to the Darboux coordinates. Unlike the contact potential, which is modular covariant, it will turn out that the Darboux coordinates have anomalous modular transformations, due to the fact that the contour $\ell_{\gamma}$ is not invariant. However, we shall be able to give a precise characterization of this modular anomaly, by rewriting the Penrose-type integral over $z'$ as an Eichler integral.
For simplicity we start from the last term in $\hat{\delta}_{-\alpha'}$ (4.7). It is given by a Gaussian integral in $1/z'$ which can be easily evaluated. The result is

$$i\tau_2 z(p \cdot t^2) \sum_{q\Lambda} \int_{\ell_{-\gamma}} \frac{dz'}{(z')^2} H_{-\gamma} = -\frac{iZ}{8\pi^2} \sqrt{2\tau_2 \mathbf{p} \cdot \mathbf{t}^2} e^{-2\pi\bar{S}_{\text{cl}}} \sum_{\mu \in \Lambda^*/\Lambda} \overline{h_{\mathbf{p},\mu}(\tau)} \theta_{\mathbf{p},\mu}(\tau, \mathbf{t}, \mathbf{b}, \mathbf{c}). \quad (4.15)$$

It transforms as a modular function of weight $(0, -1)$ in full agreement with the required transformation properties (4.6).

All the other instanton corrections to Darboux coordinates in the large volume limit are determined by the function $J_p(z)$ (4.8). Therefore, our prime interest is to understand its modular properties. To this aim, let us consider the integral appearing in this function, namely

$$\mathcal{I}(z) = \int_{\ell_{\gamma}} \frac{dz'}{z' - z} \mathbf{E}(iQ_{\gamma}(z')). \quad (4.16)$$

By shifting the contour, this may be rewritten as

$$\mathcal{I}(z) = \int_{-\infty}^{+\infty} \frac{dz'}{z' - z - i\alpha} e^{-\beta^2 z'^2}, \quad \alpha = \frac{(k+b)_+}{\sqrt{\mathbf{p} \cdot \mathbf{t}^2}}, \quad \beta = \sqrt{2\pi\tau_2 \mathbf{p} \cdot \mathbf{t}^2}. \quad (4.17)$$

Since $z$ can be absorbed by a shift of $\alpha$, we shall first consider the value of $\mathcal{I}$ at $z = 0$. Using the identity

$$\int_{-\infty}^{\infty} \frac{dz'}{z' - i\alpha} e^{-\beta^2 z^2} = i\pi \operatorname{sgn}(\operatorname{Re}(\alpha)) e^{\alpha^2 \beta^2} \operatorname{Erfc}(\operatorname{sgn}(\operatorname{Re}(\alpha\beta))\alpha\beta), \quad (4.18)$$

valid for $\alpha, \beta \in \mathbb{C}$ with $\operatorname{Re}(\beta^2) > 0$ and $\operatorname{Re}(\alpha) \neq 0$, the integral representation

$$\operatorname{Erfc}(\sqrt{\pi} x) = \int_{x^2}^{\infty} du \, u^{-1/2} e^{-\pi u}, \quad \operatorname{Re}(x) \ge 0, \quad (4.19)$$

and changing variable from $u$ to $\bar{w} = \tau - iu/(\mathbf{k} + \mathbf{b})_+^2$, valued in the lower half plane, one may cast $\mathcal{I}(0)$ in the form of an Eichler integral (A.14)<fnref n="18" />

$$\mathcal{I}(0) = -\pi \int_{\bar{\tau}}^{-i\infty} \frac{d\bar{w}}{\sqrt{i(\bar{w} - \tau)}} (k+b)_+ \mathbf{E}\left(\frac{1}{2}(\mathbf{k}+\mathbf{b})_+^2(\bar{\tau}-\bar{w})\right). \quad (4.21)$$

$$\begin{aligned} \frac{1}{z' - i\alpha} &= i \operatorname{sgn}(\alpha) \int_{-\infty}^{\infty} d\omega \, e^{-\alpha \omega - i\omega z'} \eta(\operatorname{sgn}(\alpha)\omega) \\ e^{-\beta^2 z'^2} &= \frac{1}{2|\beta|\sqrt{\pi}} \int_{-\infty}^{\infty} d\omega' \, e^{-i\omega' z' - \omega'^2/(4\beta^2)}, \end{aligned} \quad (4.20)$$

where $\eta$ is the Heaviside step function, and carrying out the integral over $z', \omega, \omega'$. Thus, the integration variable $\bar{w}$ in (4.21) is Fourier dual to the twistor coordinate $z'$ in (4.16).

<footnote n="18">¹⁸In fact, the integral over $z'$ (4.18) can be rewritten as an integral over $\bar{w}$ without ever evaluating it in terms of the error function, upon representing both factors in the integrand in terms of their Fourier transforms</footnote>
Inserting the representation (4.21) into (4.8), restricting to $z = 0$ for simplicity, and carrying out the sum over $q_\Lambda$ in the same fashion as in section 3.2, we arrive at

$$ \mathcal{J}_p(0) = \frac{i e^{-2\pi S_{\text{cl}}}}{8\pi^2} \sum_{\mu \in \Lambda^*/\Lambda} h_{p,\mu}(\tau) \int_{\bar{\tau}}^{-i\infty} \frac{d\bar{w}}{\sqrt{i(\bar{w}-\tau)}} \\ \times \sum_{\mathbf{k} \in \Lambda^* + \mu + \frac{1}{2}\mathbf{p}} (-1)^{\mathbf{k} \cdot \mathbf{p}} (\mathbf{k}+\mathbf{b})_+ \mathbf{E} \left( -\frac{1}{2}(\mathbf{k}+\mathbf{b})_+^2 \bar{w} - \frac{1}{2}(\mathbf{k}+\mathbf{b})_-^2 \tau + \mathbf{c} \cdot (\mathbf{k}+\frac{1}{2}\mathbf{b}) \right). \quad (4.22) $$

The second line in this expression is recognized as the (complex conjugate of the) Siegel-Narain theta series (A.16) of weight $(\frac{3}{2}, \frac{1}{2}(b_2 - 1))$, analytically continued away from the slice $\bar{w} = \bar{\tau}$. Eq. (4.22) is thus an Eichler integral of weight $(\frac{b_2}{2}, 0)$, multiplied by the vector-valued modular form $h_{p,\mu}$ of weight $(-1 - \frac{b_2}{2}, 0)$. Thus, $\mathcal{J}_p(z = 0)$ transforms with modular weight $(-1, 0)$, except for a modular anomaly of the form (A.15) given by the period integral of the theta series (A.16).

More generally, using this type of manipulations, one may rewrite the full function $\mathcal{J}_p(z)$ away from $z = 0$ as

$$ \mathcal{J}_p(z) = \frac{i e^{-2\pi S_{\text{cl}}}}{8\pi^2} \sum_{\mu \in \Lambda^*/\Lambda} h_{p,\mu}(\tau) \int_{\bar{\tau}}^{-i\infty} \frac{\overline{\Upsilon_{\mu}(w, \bar{\tau}; \bar{z})} d\bar{w}}{\sqrt{i(\bar{w}-\tau)}} \quad (4.23) $$

where

$$ \overline{\Upsilon_{\mu}(w, \bar{\tau}; \bar{z})} = \mathbf{E} \left( i \tau_2 \mathbf{p} \cdot \mathbf{t}^2 \frac{\bar{\tau} - \bar{w}}{\tau - \bar{w}} z^2 \right) \sum_{\mathbf{k} \in \Lambda^* + \mu + \frac{1}{2} \mathbf{p}} (-1)^{\mathbf{k} \cdot \mathbf{p}} \left( (\mathbf{k} + \mathbf{b})_+ + \frac{2\tau_2 \sqrt{\mathbf{p} \cdot \mathbf{t}^2} z}{\bar{w} - \tau} \right) \\ \times \mathbf{E} \left( -\frac{1}{2} (\mathbf{k} + \mathbf{b})_+^2 \bar{w} - \frac{1}{2} (\mathbf{k} + \mathbf{b})_-^2 \tau + \mathbf{c} \cdot (\mathbf{k} + \frac{1}{2} \mathbf{b}) \right). \quad (4.24) $$

It is easy to see that the integral is identical to the complex conjugate of the generating function $\mathcal{G}_{p,\mu}^{\Phi}(y)$ (A.27) evaluated at $y = 2\tau_2 \sqrt{\mathbf{p} \cdot \mathbf{t}^2 \bar{z}}$, i.e.

$$ \mathcal{J}_p(z) = \frac{e^{-2\pi S_{\text{cl}}}}{8\pi^2} \sum_{\mu \in \Lambda^*/\Lambda} h_{p,\mu}(\tau) \overline{\mathcal{G}_{p,\mu}^{\Phi}(2\tau_2 \sqrt{\mathbf{p} \cdot \mathbf{t}^2 \bar{z}})}. \quad (4.25) $$

In appendix A it is shown that provided $y$ transforms with the modular weight $(0, -1)$, which is indeed the case for our identification between $y$ and $z$, the generating function $\mathcal{G}_{p,\mu}^{\Phi}(y)$ transforms as an Eichler integral of weight $(0, b_2/2)$. As a result, the full function (4.25) possesses the following transformation property

$$ \mathcal{J}_p(z) \mapsto (c\tau + d)^{-1} \left( \mathcal{J}_p(z) - \frac{i e^{-2\pi S_{\text{cl}}}}{8\pi^2} \sum_{\mu \in \Lambda^*/\Lambda} h_{p,\mu}(\tau) \int_{-d/c}^{i\infty} \frac{\overline{\Upsilon_{\mu}(w, \bar{\tau}; \bar{z})} d\bar{w}}{[i(\bar{w}-\tau)]^{1/2}} \right), \quad (4.26) $$

i.e. transforms with modular weight $(-1, 0)$ and an anomaly given by a period integral. Recalling the properties of the covariant derivative operators $\mathcal{D}_h, \mathcal{D}, \overline{\mathcal{D}}$ mentioned in footnote 17, this allows to conclude that the corrections $\delta\xi, \delta\tilde{\xi}', \delta_{\pm}\alpha'$ transform as required in (4.6), except for the modular anomaly (4.26), acted upon by the corresponding covariant derivatives.
## 4.4 Anomaly cancelation from mock theta series

Having expressed the corrections to the Darboux coordinates as Eichler integrals, or modular derivative thereof, it remains to show how the modular anomalies can be canceled by a suitable contact transformation.

As explained in appendix A, the modular anomaly of an Eichler integral can be canceled by adding to it a certain mock theta series. Typically it appears as a theta series with insertion of a difference of two sign functions defined by two Kähler moduli $t$ and $t'$, with one of them chosen to lie on the boundary of the Kähler cone, i.e. $p \cdot t'^2 = 0$. The simplest example is provided by (A.11) and (A.10), respectively, which describe the instanton corrections to $\mathcal{J}_p(0)$.

Similarly, the modular anomaly in (4.26) can be canceled by replacing the generating function $\mathcal{G}_{p,\mu}^{\Phi}$ in (4.25) by its modular completion $\mathcal{G}_{p,\mu}^{\Theta}$, where the second term is the generating function defined in (A.24), evaluated at $y = 2\tau_2\sqrt{p \cdot t^2 z}$. In this way, we find that the modular completion of $\mathcal{J}_p(z)$ is given by

$$ \hat{\mathcal{J}}_p = \mathcal{J}_p - H_{\text{anom}}, \qquad (4.27) $$

where

$$ H_{\text{anom}} = \frac{e^{-2\pi S_{\text{cl}}}}{8\pi^2} \sum_{\mu \in \Lambda^*/\Lambda} h_{p,\mu}(\tau) \overline{\mathcal{G}_{p,\mu}^{\Theta}(2\tau_2 \sqrt{p \cdot t^2 z})} . \qquad (4.28) $$

Using (A.26), this can be rewritten as

$$ H_{\text{anom}} = \frac{1}{8\pi^2} \sum_{\mu \in \Lambda^*/\Lambda} h_{p,\mu}(\xi^0) \qquad (4.29) \\ \times \sum_{k \in \Lambda + \mu + \frac{1}{2}p} (-1)^{k \cdot p} \left[ \operatorname{sgn}((k+b) \cdot t) - \operatorname{sgn}((k+b) \cdot t') \right] \mathbf{E}\left(p \cdot \tilde{\xi} - k \cdot \xi - \frac{1}{2} \xi^0 (k)^2\right), $$

which shows that miraculously, $H_{\text{anom}}$ is a holomorphic function of the Darboux coordinates. In fact, $H_{\text{anom}}$ is proportional to the holomorphic mock theta series (A.10) evaluated at $\tau = \xi^0$, $y = \xi$ (upon taking into account the identification between $y$ and $b, c$ mentioned in footnote 11).

Moreover, one can show that the corresponding modular completions of the Darboux coordinates $\delta\tilde{\xi}, \delta\tilde{\xi}'_0, \delta\alpha', \delta\alpha$, following from (4.5), (4.7) and obtained by substitution of $\mathcal{J}_p$ by $\hat{\mathcal{J}}_p$, have the following form

$$ \delta\xi - \partial_{\tilde{\xi}} H_{\text{anom}}, \quad \delta\tilde{\xi}'_{\Lambda} + \partial_{\xi^{\Lambda}} H_{\text{anom}}, \quad \delta\alpha' + (1 - \xi^{\Lambda})\partial_{\xi^{\Lambda}} H_{\text{anom}} \qquad (4.30) $$

and transform according to (2.20), without any further anomaly. Moreover, the modular completion (4.30) is recognized as a holomorphic contact transformation (2.13). It is interesting to note that the theta series (4.29) can be written as

$$ H_{\text{anom}} = \frac{1}{2} \sum_{q_{\Lambda}} \left[ \operatorname{sgn}((k+b) \cdot t) - \operatorname{sgn}((k+b) \cdot t') \right] H_{\gamma} \qquad (4.31) $$
and differs from the formal sum (3.24) only by an insertion of the two signs which makes the sum over charges convergent. As a result, the compensating contact transformation is generated by a proper subset of the original transition functions, and the modular covariant Darboux coordinates differ from the original type IIA Darboux coordinates by a sequence of symplectomorphisms associated to the BPS states for which the two signs are different. This mimics the situation in the D1-D(-1) sector [36].

Thus, we have demonstrated that the modular anomaly is canceled by performing the transformation (2.13) generated by the mock theta series (4.29). In fact, we have a continuous family of modular completions labeled by the parameter $t'$ on the boundary of the Kähler cone. It would be interesting if this ambiguity was fixed by some physical principle. This concludes the proof of the modular invariance of the HM moduli space corrected by D3-instantons in the large volume, one-instanton approximation.

# 5 Discussion

In this work, we investigated the modular invariance of D3-D1-D(-1)-instanton corrections to the hypermultiplet moduli space of type IIB string theory compactified on a CY threefold $\tilde{\mathbb{Q}}$. We focused on the large volume limit, where D5-NS5-instantons can be consistently ignored. Using similar arguments as the ones which enter in the proof of modular invariance of the partition function of D4-D2-D0 black holes in type IIA string theory compactified on the same threefold $\tilde{\mathbb{Q}}$, we showed that the DT invariants which govern D3-instanton corrections are expressible in terms of the Fourier coefficients of the elliptic genus of the MSW superconformal field theory, which we refer to as MSW invariants. Unlike the DT invariants, the MSW invariants are independent of the moduli and have simple modular properties. In the one-instanton approximation, we found that the D3-instanton corrections to the standard Darboux coordinates are expressible as Eichler integrals of the MSW elliptic genus, and modular derivatives thereof. Thus, they suffer from modular anomalies, which can however be absorbed by a local complex contact transformation. The generating function for this contact transformation was recognized as the holomorphic mock theta series of signature $(1, b_2 - 1)$ introduced in [40]. In this physical set-up, the Eichler integral which provides the modular completion of the mock theta series arises as a Penrose-type integral along the twistor fiber, or rather its Fourier transform.<fnref n="19" /> Unlike Darboux coordinates, the contact potential (also known as the four-dimensional dilaton) transforms covariantly, and is proportional to the (modular derivative of the) MSW elliptic genus.

While it is very satisfying to see modularity emerge in the large volume, one-instanton approximation, an outstanding problem is to extend the results of this paper beyond this regime. This can be in principle addressed by expanding the integral equations (2.38) to higher order in the MSW invariants, as indicated in section 3.2. There are two contributions at next-to-leading order, namely (i) the two-instanton correction in the usual iterative expansion of (2.38), with the DT invariant $\bar{\Omega}(\gamma; z)$ replaced by the MSW invariant $\bar{\Omega}_{p,\mu}$, and (ii) the usual one-instanton correction, with $\bar{\Omega}(\gamma; z)$ replaced by the

<footnote n="19">¹⁹See [65] for another example where the modular completion of a mock modular form arises naturally from physics.</footnote>
quadratic term in (3.22). The first contribution is weighted by $e^{-2\pi\tau_2(|Z(\gamma_1,z)|+|Z(\gamma_2,z)|)}$, whereas the second contribution is weighted by $e^{-2\pi\tau_2|Z(\gamma_1+\gamma_2,z)|}$. By construction, the sum of these contributions is continuous across walls of marginal stability, although they are separately discontinuous. We expect that the D3-instanton correction at two-instanton order will be modular invariant, and will be related to the two-center D4-brane partition function in the same fashion as at one-instanton order, with the two-center Siegel-Narain theta series replaced by an indefinite theta series. It is encouraging that the partition function for two-center D4-black holes, corresponding to the contribution of (i), indeed becomes modular invariant and continuous after adding a suitable non-holomorphic completion [38], which should arise from contributions of type (ii).

More ambitiously, it would be very interesting to show that S-duality invariance holds at the non-linear level. One way to achieve this would be to recast the standard type IIA twistorial construction into the manifestly invariant framework developed in [36]. A naive attempt using the standard representation of the MSW elliptic genus as a Poincaré series [42] fails, due to the necessity of regulating the Poincaré series (see appendix C). It is conceivable that this obstruction may be avoided by taking into account the constraints on the polar degeneracies from modular invariance. Eventually, we hope that it will be possible to formulate all D5-D3-D1-D(-1) and NS5-brane instanton corrections in a manifestly invariant S-duality fashion, going beyond the linear order analysis of [31] and providing a tight set of constraints on the generalized Donaldson-Thomas invariants on Calabi-Yau threefolds.

Finally, we expect that the structure uncovered in this paper in the context of the HM moduli space in type II string theories on a compact CY threefold will continue to exist in the rigid limit near singularities of $\hat{\mathfrak{g}}$. Specifically, the Coulomb branch of $\mathcal{N} = 2$ five-dimensional SU(2) gauge theories compactified to a two-torus [45], obtained by considering type IIA string theory on a non-compact CY threefold given by the anti-canonical bundle $\mathcal{O}(-K_S) \to S$ over a rational surface S [67], gives a family of hyperkähler manifolds parametrized by the modular parameter of the torus, which must be invariant under modular transformations. We expect this family of HK metrics to be described by a similar twistorial construction as in this paper, using the generalization of the QK/HK correspondence put forward in [36]. For such line bundles over rational surfaces, the DT invariants $\Omega(\gamma; z^a)$ with $p^0 = 0$ can be computed explicitly [68], and the analogue of the MSW CFT is a (0,4)-supersymmetric sigma model with target space given by the Atiyah-Hitchin moduli space of monopoles in three dimensions [45, 69]. An important difference between the rigid case and the assumptions in this paper is that the generating function $h_{p,\mu}(\tau)$ of DT invariants for rational surfaces is mock modular [66, 70]. It is natural to expect that its non-holomorphic modular completion will arise from multi-instanton corrections. Finally, by the general logic of the QK/HK correspondence, this family of HK metrics will be naturally endowed with a rank two modular invariant hyperholomorphic line bundle analogous to the rank one hyperholomorphic line bundle which arises in 4D gauge theories [30, 71], whose physical role remains to be understood.
# Acknowledgments

We would like to thank Daniel Persson for valuable comments on the draft.

# A Indefinite theta series and period integrals

In this appendix, we review some aspects of indefinite theta series with Lorentzian signature $(1, n-1)$, which are essential for describing D3-instanton corrections.

## A.1 Vignéras' theorem

Let $Q(\mathbf{x}) \equiv \mathbf{x}^2$ be a quadratic form on $\mathbb{R}^n$ with signature $(1, n-1)$, and $\Lambda$ an $n$-dimensional lattice such that $Q(\mathbf{k}) \in \mathbb{Z}$ for $\mathbf{k} \in \Lambda$. Let $\mathcal{P}(\mathbf{x})$ be a function on $\mathbb{R}^n$ such that $\mathcal{P}(\mathbf{x}) e^{\pi \mathbf{x}^2}$ is integrable. Let $\mathbf{p} \in \Lambda$ be a characteristic vector (such that $\mathbf{k}^2 + \mathbf{k} \cdot \mathbf{p} \in 2\mathbb{Z}, \forall \mathbf{k} \in \Lambda$), $\mu \in \Lambda^*/\Lambda$ a glue vector, and $\lambda$ an arbitrary integer. Following [72], with some changes of notations, we construct the family of theta series

$$ \vartheta_{\mathbf{p},\mu}(\mathcal{P}, \lambda; \tau; \mathbf{b}, \mathbf{c}) = \tau_2^{-\lambda/2} \sum_{\mathbf{k} \in \Lambda + \mu + \frac{1}{2}\mathbf{p}} (-1)^{\mathbf{k} \cdot \mathbf{p}} \mathcal{P}(\sqrt{2\tau_2}(\mathbf{k}+\mathbf{b})) \bar{q}^{-\frac{1}{2}(\mathbf{k}+\mathbf{b})^2} \mathbf{E}\left(-\mathbf{c} \cdot \left(\mathbf{k}+\frac{1}{2}\mathbf{b}\right)\right), \quad (A.1) $$

where $q = e^{2\pi i \tau}$ and $\mathbf{b}, \mathbf{c} \in \Lambda \otimes \mathbb{R}$. Irrespective of the choice of $\mathcal{P}$ and $\lambda$, (A.1) satisfies the elliptic transformation properties

$$ \begin{aligned} \vartheta_{\mathbf{p},\mu}(\mathcal{P}, \lambda; \tau; \mathbf{b}+\mathbf{k}, \mathbf{c}) &= (-1)^{\mathbf{k} \cdot \mathbf{p}} \mathbf{E}\left(\frac{1}{2}\mathbf{c} \cdot \mathbf{k}\right) \vartheta_{\mathbf{p},\mu}(\mathcal{P}, \lambda; \tau; \mathbf{b}, \mathbf{c}), \\ \vartheta_{\mathbf{p},\mu}(\mathcal{P}, \lambda; \tau; \mathbf{b}, \mathbf{c}+\mathbf{k}) &= (-1)^{\mathbf{k} \cdot \mathbf{p}} \mathbf{E}\left(-\frac{1}{2}\mathbf{b} \cdot \mathbf{k}\right) \vartheta_{\mathbf{p},\mu}(\mathcal{P}, \lambda; \tau; \mathbf{b}, \mathbf{c}), \end{aligned} \quad (A.2) $$

for any $\mathbf{k} \in \Lambda$.

Now, let us assume that $\mathcal{P}(\mathbf{x}) e^{\pi \mathbf{x}^2}$ decays sufficiently fast$^{20}$ at infinity, and that $\mathcal{P}(\mathbf{x})$ is annihilated by the differential operator

$$ [\Delta + 2\pi(\mathbf{x} \cdot \partial_{\mathbf{x}} - \lambda)] \mathcal{P}(\mathbf{x}) = 0, \quad (A.3) $$

where $\Delta = \partial_{\mathbf{x}}^2$ is the Laplacian operator on $\mathbb{R}^n$. Then, using the same methods as in [72], one may show that the family of theta series (A.1), with $\mu$ running over all cosets in $\Lambda^*/\Lambda$, transforms as a vector-valued Jacobi form of weight $(0, \lambda + n/2)$ under the full modular group. This means that it satisfies the modular properties

$$ \vartheta_{\mathbf{p},\mu}(\mathcal{P}, \lambda; -1/\tau; \mathbf{c}, -\mathbf{b}) = \frac{1}{\sqrt{|\Lambda^*/\Lambda|}} (i\bar{\tau})^{\lambda+\frac{n}{2}} \mathbf{E}\left(-\frac{1}{4}\mathbf{p}^2\right) \sum_{\nu \in \Lambda^*/\Lambda} \mathbf{E}(-\boldsymbol{\mu} \cdot \boldsymbol{\nu}) \vartheta_{\mathbf{p},\nu}(\mathcal{P}, \lambda; \tau; \mathbf{b}, \mathbf{c}), $$

$$ \vartheta_{\mathbf{p},\mu}(\mathcal{P}, \lambda; \tau+1; \mathbf{b}, \mathbf{c}+\mathbf{b})) = \mathbf{E}\left(\frac{1}{2}\left(\boldsymbol{\mu}+\frac{1}{2}\mathbf{p}\right)^2\right) \vartheta_{\mathbf{p},\mu}(\mathcal{P}, \lambda; \tau; \mathbf{b}, \mathbf{c}), \quad (A.4) $$

on top of the elliptic properties (A.2). In the next subsections, we present the relevant instances of this general construction relevant for the present work.

<footnote>$^{20}$More precisely, $f(\mathbf{x}) \equiv \mathcal{P}(\mathbf{x}) e^{\pi \mathbf{x}^2}$ should be such that, for any $D(\mathbf{x})$ be any differential operator of order $\le 2$ and $R(\mathbf{x})$ any polynomial of degree $\le 2$, $f(\mathbf{x})$, $D(\mathbf{x})f(\mathbf{x})$ and $R(\mathbf{x})f(\mathbf{x})$ should be both integrable and square integrable on $\mathbb{R}^n$.</footnote>
## A.2 Siegel-Narain theta series

The simplest example arises for $\mathcal{P}(x) = e^{-\pi(x_+^{(t)})^2}$, $\lambda = -1$, where $x_+^{(t)}$ is the projection of $x$ along a fixed time-like vector $t$ in $\mathbb{R}^n$ ($t^2 > 0$):

$$x_+^{(t)} = \frac{x \cdot t}{\sqrt{t \cdot t}}, \qquad x_-^{(t)} = \frac{x \cdot t}{t \cdot t} \qquad t = x - x_-^{(t)} \qquad (A.5)$$

so that $(x_+^{(t)})^2 = (x_-^{(t)})^2 \ge 0$, $(x_-^{(t)})^2 \le 0$. In case no confusion arises, we write $x_+^{(t)} = x_+$. The corresponding theta series (A.1) is then, up to a power of $\tau_2$ and lattice shift, the standard Siegel-Narain theta series,

$$\begin{aligned} \theta_{p,\mu}(\tau, t, b, c) &\equiv \tau_2^{-1/2} \vartheta_{p,\mu} \left( e^{-\pi x_+^2}, -1; \tau; b, c \right) \\ &= \sum_{k \in \Lambda + \mu + \frac{1}{2} p} (-1)^{k \cdot p} q^{\frac{1}{2}(k+b)_+^2} \bar{q}^{-\frac{1}{2}(k+b)_-^2} \mathbf{E} \left( -c \cdot \left( k + \frac{1}{2} b \right) \right). \end{aligned} \qquad (A.6)$$

Thus, $\theta_{p,\mu}$ transforms as a vector-valued Jacobi form of weight $(\frac{1}{2}, \frac{n-1}{2})$.

## A.3 Zwegers’ mock theta series

The other prime example is Zwegers’ indefinite theta series of weight $(0, \frac{n}{2})$ [40] (based on earlier works [73, 74]),

$$\begin{aligned} \hat{\Theta}_{p,\mu}(\tau, t, t', b, c) &= \sum_{k \in \Lambda + \mu + \frac{1}{2} p} (-1)^{k \cdot p} \left[ \mathrm{Erf} \left( \sqrt{2\pi\tau_2}(k+b)_+^{(t)} \right) - \mathrm{Erf} \left( \sqrt{2\pi\tau_2}(k+b)_-^{(t')} \right) \right] \\ &\qquad \times \bar{q}^{-\frac{1}{2}(k+b)^2} \mathbf{E} \left( -c \cdot \left( k + \frac{b}{2} \right) \right), \end{aligned} \qquad (A.7)$$

where $t$ and $t'$ are two time-like vectors and $\mathrm{Erf}(\sqrt{\pi x}) = 2 \int_0^x e^{-\pi t^2} dt$ is the standard error function. This series again belongs to the class (A.1) with $\mathcal{P}(x) = \mathrm{Erf}(\sqrt{\pi x_+^{(t)}}) - \mathrm{Erf}(\sqrt{\pi x_-^{(t)}})$. Each of the two terms in $\mathcal{P}(x)$ satisfies the differential equation (A.3) for $\lambda = 0$, and the sum of the two terms satisfies the decay conditions, although this is not true for each term separately. Using

$$\mathrm{Erf}(\sqrt{\pi x}) = \mathrm{sgn}(x) (1 - \mathrm{Erfc}(\sqrt{\pi} |x|)), \qquad (A.8)$$

one may decompose (A.7) into a sum of three terms

$$\hat{\Theta}_{p,\mu}(\tau, t, t', b, c) = -\Phi_{p,\mu}(\tau, t, b, c) + \Theta_{p,\mu}(\tau, t, t', b, c) + \Phi_{p,\mu}(\tau, t', b, c), \qquad (A.9)$$

where the middle term is anti-holomorphic in $\tau$,

$$\Theta_{p,\mu}(\tau, t, t', b, c) = \sum_{k \in \Lambda + \mu + \frac{1}{2} p} (-1)^{k \cdot p} \left[ \mathrm{sgn}((k+b)_+^{(t)}) - \mathrm{sgn}((k+b)_+^{(t')}) \right] \bar{q}^{-\frac{1}{2}(k+b)^2} \mathbf{E} \left( -c \cdot \left( k + \frac{1}{2} b \right) \right), \qquad (A.10)$$
while the first and last term are given by

$$ \Phi_{p,\mu}(\tau, t, b, c) = \sum_{k \in \Lambda + \mu + \frac{1}{2} p} (-1)^{k \cdot p} \operatorname{sgn}((k+b)_{+}^{(t)}) \operatorname{Erfc}(\sqrt{2\pi\tau_2} |(k+b)_{+}^{(t)}|) \bar{q}^{-\frac{1}{2}(k+b)^2} \mathbf{E}\left(-c \cdot \left(k + \frac{1}{2}b\right)\right). \quad (A.11) $$

It is useful to note that both (A.10) and (A.11) are of the form (A.1) with a function $\mathcal{P}(x)$ which is square integrable$^{21}$ and obeys the differential equation (A.3) everywhere, except on the locus where $x_{+}^{(t)}$ vanishes. As a result, the three terms in (A.9) are not separately modular invariant, although their sum is.

The modular anomaly of (A.11) may be exposed by using the identity

$$ \operatorname{sgn}((k+b)_{+}^{(t)}) e^{2\pi\tau_2(k+b)_{+}^{(t)}} \operatorname{Erfc}(\sqrt{2\pi\tau_2} |(k+b)_{+}^{(t)}|) = -i \int_{\tau}^{i\infty} \mathbf{E}\left(\frac{1}{2}(k+b)_{+}^{2}(w-\tau)\right) \frac{(k+b)_{+}^{(t)} dw}{\sqrt{-i(w-\bar{\tau})}} \quad (A.12) $$

to rewrite (A.11) as a (generalized) Eichler integral,

$$ \Phi_{p,\mu}(\tau, t, b, c) = -i \int_{\tau}^{i\infty} \sum_{k \in \Lambda + \mu + \frac{1}{2} p} (-1)^{k \cdot p} q_{w}^{\frac{1}{2}(k+b)_{+}^{2}} \bar{q}^{-\frac{1}{2}(k+b)_{+}^{2}} \frac{(k+b)_{+}^{(t)} dw}{[-i(w-\bar{\tau})]^{1/2}} \mathbf{E}\left(-c \cdot \left(k + \frac{1}{2}b\right)\right), \quad (A.13) $$

where $q_w = \mathbf{E}(w)$. Recall that if $F(\tau, \bar{\tau})$ is an analytic modular form of weight $(\mathfrak{h}, \bar{\mathfrak{h}})$, and if $F(w, \bar{\tau})$ is its analytic continuation away from the slice $w = \tau$, the Eichler integral

$$ \Phi(\tau) = \int_{\tau}^{i\infty} \frac{F(w, \bar{\tau}) dw}{[-i(w - \bar{\tau})]^{2-\mathfrak{h}}} \quad (A.14) $$

transforms with modular weight $(0, \bar{\mathfrak{h}} + 2 - \mathfrak{h})$, up to modular anomaly given by a period integral,

$$ \Phi(\gamma\tau) = (c\bar{\tau} + d)^{\bar{\mathfrak{h}}+2-\mathfrak{h}} \left( \Phi(\tau) - \int_{-d/c}^{i\infty} \frac{F(w, \bar{\tau}) dw}{[-i(w-\bar{\tau})]^{2-\mathfrak{h}}} \right). \quad (A.15) $$

The function $F(\tau, \bar{\tau})$ is known as the shadow of the Eichler integral (A.14), and can be extracted from $\Phi(\tau)$ by acting with the operator $-(2\tau_2)^{2-\mathfrak{h}}\partial_\tau$.

Returning to (A.13), $\Phi_{p,\mu}(\tau, t, b, c)$ is then identified as an Eichler integral of weight $(0, \frac{n}{2})$, with shadow proportional to the theta series of weight $(\frac{3}{2}, \frac{n-1}{2})$,

$$ \begin{aligned} \tilde{\theta}_{p,\mu}(\tau, t, b, c) &\equiv \tau_2^{-3/2} \vartheta_{p,\mu} \left( (x_+/\sqrt{2}) e^{-\pi x_+^2}, -2; \tau; b, c \right) \\ &= \sum_{k \in \Lambda + \mu + \frac{1}{2} p} (-1)^{k \cdot p} (k+b)_+ q_+^{\frac{1}{2}(k+b)_+^2} \bar{q}^{-\frac{1}{2}(k+b)_+^2} \mathbf{E}\left(-c \cdot \left(k + \frac{1}{2}b\right)\right). \end{aligned} \quad (A.16) $$

Let us now consider what happens with (A.9) when one of the time-like vectors, say $t'$, approaches the boundary of the Kähler cone, i.e. becomes light-like $t'^2 = 0$. Then $(k+b)_{+}^{(t')}$ diverges and, since $\operatorname{Erfc}(|x|)$ is exponentially suppressed as $x \to \infty$, the last

<footnote>$^{21}$For the holomorphic theta series (A.10), this follows from the fact that the difference of sign functions vanishes on all time-like vectors.</footnote>
term in (A.9) vanishes, leaving only the first two. Thus, for any choice of light-like vector $t'$, the holomorphic theta series $\Theta_{p,\mu}(\tau, t, t', b, c)$ in (A.10) gives a modular completion of the Eichler integral $\Phi_{p,\mu}(\tau, t, b, c)$ (or conversely, the Eichler integral gives a modular completion of the holomorphic theta series).

## A.4 An infinite sequence of mock theta series

Finally, let us describe an infinite sequence of indefinite theta series similar to (A.7), obtained by applying the projection $\bar{D}_+^{(t)}$ of the covariant derivative $\bar{D}$ (4.9) along a time-like vector $t$. This derivative acts on any Jacobi form of weight $(\mathfrak{h}, \bar{\mathfrak{h}})$ by changing its modular weight to $(\mathfrak{h}, \bar{\mathfrak{h}} + 1)$. In particular, it preserves the class (A.1) of theta series and acts on them in the following way

$$ \bar{D}_+^{(t)} \vartheta_{p,\mu}(\mathcal{P}, \lambda; \tau; \mathbf{b}, \mathbf{c}) = \vartheta_{p,\mu}(\partial_{(t)}\mathcal{P}, \lambda + 1; \tau; \mathbf{b}, \mathbf{c}), \quad \partial_{(t)}\mathcal{P}(\mathbf{x}) \equiv \left[ i \frac{\mathbf{t} \cdot (\partial_{\mathbf{x}} + 2\pi\mathbf{x})}{\sqrt{2\mathbf{t}^2}} \right] \mathcal{P}(\mathbf{x}). \quad (A.17) $$

Using this result as well as the identity

$$ \partial_{(t)}^{m} \operatorname{sgn}(x_{+}^{(t')}) = (\pi/2)^{m/2} H_{m}(i\sqrt{\pi} x_{+}^{(t)}) \operatorname{sgn}(x_{+}^{(t')}), \quad (A.18) $$

where $H_m$ are the Hermite polynomials, one finds that the m-th derivative of (A.10) is given by

$$ (\bar{D}_+^{(t)})^m \Theta_{p,\mu}(\tau, t, t', b, c) = \left(\frac{\pi}{2\tau_2}\right)^{m/2} \sum_{k \in \Lambda + \mu + \frac{1}{2}p} (-1)^{k \cdot p} \left[\operatorname{sgn}((k+b)_+^{(t)}) - \operatorname{sgn}((k+b)_+^{(t')})\right] \\ \times H_m\left(i\sqrt{2\pi\tau_2}(k+b)_+^{(t)}\right) \bar{q}^{-\frac{1}{2}(k+b)^2} \mathbf{E}\left(-c \cdot \left(k + \frac{1}{2}b\right)\right). \quad (A.19) $$

Similarly, the m-th derivative of (A.11) is found to be

$$ (\bar{D}_+^{(t)})^m \Phi_{p,\mu}(\tau, t, b, c) = \tau_2^{-m/2} \sum_{k \in \Lambda + \mu + \frac{1}{2}p} (-1)^{k \cdot p} S_m\left(\sqrt{2\tau_2} |(k+b)_+^{(t)}|\right) \bar{q}^{-\frac{1}{2}(k+b)^2} \mathbf{E}\left(-c \cdot \left(k + \frac{1}{2}b\right)\right), \quad (A.20) $$

where we introduced the function

$$ \begin{aligned} S_m(x) &= \partial_{(t)}^m \left( \operatorname{sgn}(x_+^{(t)}) \operatorname{Ercf}(\sqrt{\pi}|x_+|) \right) \\ &= \frac{2}{i^m \sqrt{\pi}} m! (2\pi)^{m/2} [\operatorname{sgn}(x_+)]^{m+1} H_{-m-1}(\sqrt{\pi}|x_+|) e^{-\pi x_+^2}. \end{aligned} \quad (A.21) $$

The modular anomaly of (A.20) can be exposed by writing it as an Eichler integral similar to (A.13) using the integral representation of $S_m$

$$ e^{2\pi i \tau_2 (k+b)_+^2} S_m \left( \sqrt{2\tau_2} |(k+b)_+| \right) = -im! \int_{\tau}^{i\infty} \mathbf{E} \left( -\frac{1}{2} (k+b)_+^2 (\tau - w) \right) \times \begin{cases} \frac{1}{(\frac{m}{2})!} \left( -\frac{\pi}{2} \frac{w-\tau}{w-\bar{\tau}} \right)^{\frac{m}{2}} \frac{(k+b)_+ \, dw}{[-i(w-\bar{\tau})]^{1/2}}, & m \text{ even} \\ \frac{1}{(\frac{m-1}{2})!} \left( -\frac{\pi}{2} \frac{w-\tau}{w-\bar{\tau}} \right)^{\frac{m-1}{2}} \frac{-i \sqrt{\tau_2} \, dw}{[-i(w-\bar{\tau})]^{3/2}}, & m \text{ odd} \end{cases} \quad (A.22) $$
In this way, we find

$$ (\bar{D}_{+}^{(t)})^m \Phi_{p,\mu} = -i \bar{\tau}_2^{-m/2} m! \int_{\tau}^{i\infty} \sum_{k \in \Lambda+\mu+\frac{1}{2}p} (-1)^{k \cdot p} q_w^{\frac{1}{2}(k+b)_+^2} \bar{q}^{-\frac{1}{2}(k+b)_-^2} \mathbf{E}\left(-c \cdot \left(k+\frac{1}{2}b\right)\right) \times \begin{cases} \frac{1}{\left(\frac{m}{2}\right)!} \left(-\frac{\pi}{2} \frac{w-\tau}{w-\bar{\tau}}\right)^{\frac{m}{2}} \frac{(k+b)_+ dw}{[-i(w-\bar{\tau})]^{1/2}}, & m \text{ even} \\ \frac{1}{\left(\frac{m-1}{2}\right)!} \left(-\frac{\pi}{2} \frac{w-\tau}{w-\bar{\tau}}\right)^{\frac{m-1}{2}} \frac{-i\sqrt{\tau_2} dw}{[-i(w-\bar{\tau})]^{3/2}}, & m \text{ odd} \end{cases} \quad (A.23) $$

The two theta series (A.19) and (A.20) have anomalous modular transformations, but their difference, provided the vector $t'$ belongs to the boundary of the Kähler cone, transforms as a modular function of weight $(0, \frac{n}{2} + m)$.

The infinite set of derivatives of the theta series constructed above occurs in the analysis of instanton corrections to Darboux coordinates in section 4.4 through their generating functions

$$ \mathcal{G}_{p,\mu}^{\Theta}(y) = \sum_{m=0}^{\infty} \frac{y^m}{m!} (\bar{D}_+^{(t)})^m \Theta_{p,\mu}, \qquad \mathcal{G}_{p,\mu}^{\Phi}(y) = \sum_{m=0}^{\infty} \frac{y^m}{m!} (\bar{D}_+^{(t)})^m \Phi_{p,\mu}. \quad (A.24) $$

Using

$$ e^{2xy-y^2} = \sum_{m=0}^{\infty} H_m(x) \frac{y^m}{m!}, \quad (A.25) $$

one finds that the first generating function is given by

$$ \mathcal{G}_{p,\mu}^{\Theta}(y) = \sum_{k \in \Lambda+\mu+\frac{1}{2}p} (-1)^{k \cdot p} \left[ \operatorname{sgn}((k+b)_+^{(t)}) - \operatorname{sgn}((k+b)_+^{(t')}) \right] \times \mathbf{E} \left( (k+b)_+^{(t)} y + \frac{i y^2}{4\tau_2} \right) \bar{q}^{-\frac{1}{2}(k+b)_+^2} \mathbf{E} \left( -c \cdot \left( k + \frac{1}{2}b \right) \right), \quad (A.26) $$

while the second generating function can be easily found from (A.23),

$$ \mathcal{G}_{p,\mu}^{\Phi}(y) = -i \int_{\tau}^{i\infty} \frac{dw}{[-i(w-\bar{\tau})]^{1/2}} \mathbf{E}\left(\frac{i y^2}{4\tau_2} \frac{w-\tau}{w-\bar{\tau}}\right) \times \sum_{k \in \Lambda+\mu+\frac{1}{2}p} (-1)^{k \cdot p} \left((k+b)_+ + \frac{y}{w-\bar{\tau}}\right) q_w^{\frac{1}{2}(k+b)_+^2} \bar{q}^{-\frac{1}{2}(k+b)_-^2} \mathbf{E}\left(-c \cdot \left(k+\frac{1}{2}b\right)\right). \quad (A.27) $$

Assuming that the generating parameter $y$ transforms under SL(2, $\mathbb{Z}$) with weight $(0, -1)$, it follows that the difference $\mathcal{G}_{p,\mu}^{\Phi}(y) - \mathcal{G}_{p,\mu}^{\Theta}(y)$ is a non-anomalous modular form, with the same weight as that of the original theta series (A.9), i.e. $(0, \frac{n}{2})$.

# B Instanton corrections in the large volume limit

## B.1 S-duality and mirror map

To establish the modularity of the type IIA construction of D-instantons, we have to find instanton corrections to the classical mirror map (2.6) such that the Darboux coordinates
on the twistor space expressed in terms of the type IIB fields transform as in (2.20). For this purpose, it will be useful to borrow some methods from the work [36] where a manifestly S-duality invariant twistorial construction of a QK manifold with two commuting isometries was provided. This is despite the fact that the Poincaré series representation is not immediately applicable to our framework, as further discussed in appendix C.

One of the main insights of the construction in [36] was that the kernel $\frac{dt'}{t'} \frac{t'+t}{t'-t}$ entering the integral equations (2.38), which transforms in complicated way under S-duality, can be replaced by an invariant kernel

$$ K(t, t') \frac{dt'}{t'} \equiv \frac{1}{2} \left( \frac{t' + t}{t' - t} + \frac{1/t' - t'}{1/t' + t'} \right) \frac{dt'}{t'} = \frac{1}{2} \frac{z' + z}{z' - z} \frac{dz'}{z'} \quad (B.1) $$

It differs from the original one by a t-independent term which can be absorbed into a redefinition of the coordinates parametrizing the HM moduli space $\zeta^\Lambda, \tilde{\zeta}_\Lambda, \sigma$. Essentially this redefinition provides a substantial part of quantum corrections to the mirror map.

However, the kernel (B.1) is still not convenient for the study of the large volume limit because the additional t-independent term gives a divergent contribution in this limit (recall that the integrals over $t'$ are localized at $t' = \pm i$). Fortunately, there is a way to cure this problem. To this end, let us note that the invariant kernel (B.1) is not unique. In particular, two other natural choices suggest themselves,

$$ K^+(t, t') \frac{dt'}{t'} = \frac{dt'}{t' - t} \frac{1 + it}{1 + it'} = \frac{dz'}{z' - z}, \qquad K^-(t, t') \frac{dt'}{t'} = \frac{dt'}{t' - t} \frac{1 - it}{1 - it'} = \frac{z}{z'} \frac{dz'}{z' - z}. \quad (B.2) $$

Both are S-duality invariant, differ from the original one by a t-independent term, and moreover are finite in the limit where $t' \to \mp i$, respectively. The crucial difference between them and (B.1) is that the latter is invariant under the combined action of the antipodal map $\zeta : t \mapsto -1/\bar{t}$ and complex conjugation, whereas the kernels (B.2) are mapped into each other

$$ \zeta \left[ K^+(t, t') \frac{dt'}{t'} \right] = K^-(t, t') \frac{dt'}{t'}. \quad (B.3) $$

This plays an important role in ensuring the reality conditions on the Darboux coordinates

$$ \zeta[\xi_{[i]}^{\Lambda}] = \xi_{[i]}^{\Lambda}, \qquad \zeta[\tilde{\xi}_{\Lambda}^{[i]}] = \tilde{\xi}_{\Lambda}^{[i]}, \qquad \zeta[\alpha^{[i]}] = \alpha^{[i]}, \quad (B.4) $$

where $U_i$ is the image of the patch $U_i$ under the antipodal map. Therefore, the new kernels can be used to generalize the construction of modular invariant QK manifolds in [36] as follows:

Let $\mathcal{Z}$ be the $2n + 1$-complex dimensional contact manifold defined by the infinite covering

$$ \mathcal{Z} = U_+ \cup U_- \cup U_0 \cup (U'_{m,n} U_{m,n}^+) \cup (U'_{m,n} U_{m,n}^-), \quad (B.5) $$

and transition functions

$$ H^{[+0]} = F^{\mathrm{cl}}(\xi_{[+]}^{\Lambda}), \qquad H^{-[0]} = \bar{F}^{\mathrm{cl}}(\xi_{[-]}^{\Lambda}), \qquad H^{[(m,n)^{\pm}0]} = G_{m,n}^{\pm}(\xi^0, \xi_{[m,n]}^a, \tilde{\xi}_{a}^{[0]}), \quad (B.6) $$

where $F^{\mathrm{cl}}(X) = -\kappa_{abc} \frac{X^a X^b X^c}{6X^0}$ is an arbitrary cubic prepotential, $\Lambda = (0, a) = 0, 1, \dots, n-1$. Here $U_\pm$ are the usual patches around the poles of $\mathbb{P}^1$, $U_{m,n}^\pm$ are two sets
of patches which are mapped to each other under SL(2, $\mathbb{Z}$)-transformations, and $U_0$ covers the rest. They must be chosen so that $U_0$ is mapped to itself under the antipodal map and S-duality, whereas $U_{m,n}$ are mapped to each other according to

$$ \varsigma [U_{m,n}^{\pm}] = U_{-m,-n}^{\mp}, \quad U_{m,n}^{\pm} \mapsto U_{m',n'}^{\mp}, \quad \begin{pmatrix} m' \\ n' \end{pmatrix} = \begin{pmatrix} a & c \\ b & d \end{pmatrix} \begin{pmatrix} m \\ n \end{pmatrix}. \quad (B.7) $$

The holomorphic functions $G_{m,n}^{\pm}$ are assumed to transform as$^{22}$

$$ \overline{\varsigma [G_{m,n}^{\pm}]} = G_{m,n}^{\mp}, \quad G_{m,n}^{\pm} \mapsto \frac{G_{m',n'}^{\pm}}{c\xi^0 + d} + \text{non-linear terms} + \text{reg.} \quad (B.8) $$

where +reg. denotes equality up to terms which are regular in $U_{m',n'}^{\pm}$.

Given these conditions, the associated QK manifold $\mathcal{M}$ can be shown to carry an isometric action of SL(2, $\mathbb{Z}$). The only difference with [36] is the presence of two sets of twistorial data, labeled by + and –, which are mapped to each other by the antipodal map. Physically, they can be interpreted as contributions of branes and anti-branes. The Darboux coordinates in the patch $U_0$ then satisfy the following integral equations:

$$ \xi^0 = \xi^0 + \frac{\tau_2}{2} (t^{-1} - t), $$

$$ \xi_{[0]}^a = \xi_{cl}^a + t^{-1}Y^a - t\bar{Y}^a + \sum_{\epsilon=\pm} \sum_{m,n}' \oint_{C_{m,n}^{\epsilon}} \frac{dt'}{2\pi i t'} K^{\epsilon}(t,t') \partial_{\tilde{\xi}_a^{[0]}} G_{m,n}^{\epsilon}, $$

$$ \tilde{\xi}_{\Lambda}^{[0]} = \tilde{\zeta}_{\Lambda}^{\text{cl}} + t^{-1} F_{\Lambda}^{\text{cl}}(Y) - t \bar{F}_{\Lambda}^{\text{cl}}(\bar{Y}) - \sum_{\epsilon=\pm} \sum_{m,n}' \oint_{C_{m,n}^{\epsilon}} \frac{dt'}{2\pi i t'} K^{\epsilon}(t,t') \partial_{\xi_{[m,n]}^{\Lambda}} G_{m,n}^{\epsilon}, \quad (B.9) $$

$$ \alpha^{[0]} = -\frac{1}{2}(\tilde{\sigma} + \zeta^{\Lambda} \tilde{\zeta}_{\Lambda})^{\text{cl}} - (t^{-1} + t) (t^{-1} F^{\text{cl}}(Y) + t \bar{F}^{\text{cl}}(\bar{Y})) - \zeta_{\text{cl}}^{\Lambda} (t^{-1} F_{\Lambda}^{\text{cl}}(Y) - t \bar{F}_{\Lambda}^{\text{cl}}(\bar{Y})) \\ - \sum_{\epsilon=\pm} \sum_{m,n}' \oint_{C_{m,n}^{\epsilon}} \frac{dt'}{2\pi i t'} \left[ K^{\epsilon}(t,t') (1 - \xi_{[m,n]}^{\Lambda}(t') \partial_{\xi_{[m,n]}^{\Lambda}}) G_{m,n}^{\epsilon} \right. \\ \left. + (t^{-1} K^{\epsilon}(0,t') F_{a}^{\text{cl}}(Y) - t K^{\epsilon}(\infty,t') \bar{F}_{a}^{\text{cl}}(\bar{Y})) \partial_{\tilde{\xi}_{a}^{[0]}} G_{m,n}^{\epsilon} \right], $$

where $C_{m,n}^{\pm}$ are contours on $\mathbb{P}^1$ surrounding $U_{m,n}^{\pm}$ counter-clockwise and $(\tau_2, Y^a, \zeta^0, \zeta_{cl}^a, \tilde{\zeta}_{\Lambda}^{\text{cl}}, \tilde{\sigma}^{\text{cl}})$ are coordinates on $\mathcal{M}$.

The key to prove the presence of S-duality is to find expressions of the coordinates $(Y^a, \zeta_{cl}^a, \tilde{\zeta}_{\Lambda}^{\text{cl}}, \tilde{\sigma}^{\text{cl}})$ in terms of $(\tau, b^a, t^a, c^a, \tilde{c}_a, \psi)$ which ensure the proper transformations of the Darboux coordinates. Let us do this explicitly for the coordinates entering $\xi^a$. To this end, note that the derivative $\partial_{\tilde{\xi}_a^{[0]}} G_{m,n}(t')$ transforms, like the transition function (B.8), with an overall factor of $(c\xi^0(t') + d)^{-1}$. Using the property

$$ 1 - z^2 \mapsto \frac{c\xi^0 + d}{c\tau + d} (1 - z^2), \quad (B.10) $$

<footnote>$^{22}$We refrain from writing the full non-linear transformation of $G_{m,n}^{\pm}$, since we are interested only in the linear approximation in this paper. The transformation property required for modular invariance at the non-linear level can be found in [36].</footnote>
this factor can be converted into $(c\xi^0(t) + d)^{-1}$ by multiplying the kernel by $\frac{1-z'^2}{1-z^2}$. Put differently, the Darboux coordinate $\xi^a$ would transform as in (2.20) if it were equal to

$$ \xi^a_{[0]} = \tau b^a - c^a + \frac{2z\tau_2}{1-z^2} (t^a + izb^a) + \frac{1}{2\pi i} \sum'_{m,n} \left[ \oint_{C_{m,n}^+} \frac{dz'}{z'-z} \frac{1-z'^2}{1-z^2} \partial_{\tilde{\xi}_a} G_{m,n}^+ + \oint_{C_{m,n}^-} \frac{dz'}{z'-z} \frac{1-z'^2}{1-z^2} \frac{z^3}{(z')^3} \partial_{\tilde{\xi}_a} G_{m,n}^- \right]. \quad (B.11) $$

It is easy to verify that this equality can be achieved if one chooses

$$ Y^a = \frac{\tau_2}{2} (b^a + it^a) - \sum'_{m,n} \left[ \oint_{C_{m,n}^+} \frac{dz}{8\pi} (1-z) \partial_{\tilde{\xi}_a^{[0]}} G_{m,n}^+ - \oint_{C_{m,n}^-} \frac{dz}{8\pi z^3} (1-z) \partial_{\tilde{\xi}_a^{[0]}} G_{m,n}^- \right], \quad (B.12) $$

$$ \zeta_{\text{cl}}^a = -(c^a - \tau_1 b^a) - \sum'_{m,n} \left[ \oint_{C_{m,n}^+} \frac{z dz}{4\pi i} \partial_{\tilde{\xi}_a^{[0]}} G_{m,n}^+ - \oint_{C_{m,n}^-} \frac{dz}{4\pi i z^3} \partial_{\tilde{\xi}_a^{[0]}} G_{m,n}^- \right]. $$

We will leave the other relations undetermined because their derivation is more involved and they are not of interest for our purposes.

## B.2 Large volume limit

We shall now use the above results, in particular (B.2) and (B.12), as a guidance for finding the mirror map between type IIA and type IIB fields. To apply them to our situation, we replace $(C_{m,n}^{\pm}, G_{m,n}^{\pm})$ by $(\ell_{\pm\gamma}, H_{\pm\gamma})$ where $\gamma = (0, p^a, q'_a, q_0)$ with $p \cdot t^2 > 0$. After this replacement, the Darboux coordinates are given by the same integral equations (B.9) where $\zeta_{\text{cl}}^a, \tilde{\xi}_{\text{cl}}^a, \tilde{\sigma}_{\text{cl}}^a$ differ from the type IIA fields $\xi^a, \tilde{\xi}_{\text{cl}}^a, \tilde{\sigma}_{\text{cl}}^a$ by the terms coming from the redefinition of the kernel.<fnref n="23" /> Our aim here is to study their large volume limit $t^a \to \infty$.

In this limit we concentrate on the infinitely small region of the $\mathbb{P}^1$ fiber around the S-duality invariant point $z = 0$ such that the combination $zt^a$ stays finite. Moreover, all integrals along $\ell_{\pm\gamma}$ are dominated by a saddle point at $z' = 0$ for the set of charges $\gamma$ and at $z' = \infty$ for the set of charges $-\gamma$. Using this fact and the relations (B.12) (with the above replacements), the Darboux coordinates of the type IIA construction in the one-instanton, large volume approximation are given by (4.2) where the instanton contributions read as

$$ \begin{aligned} \delta\xi^a &= p^a \sum_{q\Lambda} \int_{\ell_\gamma} \frac{dz'}{z' - z} H_\gamma, \\ \delta\tilde{\xi}_a' &= \delta\tilde{\xi}_a' + \sum_{q\Lambda} \left[ \int_{\ell_\gamma} dz' \left( \frac{q'_a}{z' - z} - \frac{i}{2} \kappa_{abc} p^c t^b \right) H_\gamma + \frac{i}{2} \kappa_{abc} p^c t^b \int_{\ell_{-\gamma}} \frac{dz'}{(z')^2} H_{-\gamma} \right], \\ \delta\tilde{\xi}_0' &= \delta\tilde{\xi}_0' + \sum_{q\Lambda} \left[ \int_{\ell_\gamma} dz' \left( \frac{q'_0}{z' - z} + \frac{1}{4} \kappa_{abc} t^a t^b p^c (z' + 2z) + \frac{i}{2} \kappa_{abc} p^a t^b b^c \right) H_\gamma \right. \\ & \qquad \left. - \frac{1}{4} \kappa_{abc} t^b p^c \int_{\ell_{-\gamma}} \frac{dz'}{(z')^3} (2iz'b^a + t^a(1 + 2zz')) H_{-\gamma} \right], \end{aligned} \quad (B.13) $$

<footnote n="23">²³ $\tilde{\sigma}^{\text{cl}}$ also contains an additional classical term $\frac{\tau_2^3}{3} \kappa_{abc} b^a b^b b^c$.</footnote>
$$ \delta\alpha' = -\frac{1}{2}(\delta\sigma + \zeta^\Lambda\delta\tilde{\zeta}'_\Lambda) + \sum_{q_\Lambda} \left[ \int_{\ell_\gamma} \mathrm{d}z' \left( -\frac{\frac{1}{2\pi i} + q'_0\tau + q'_a(\tau b^a - c^a + 2\tau_2 t^a z')}{z' - z} - \frac{1}{2}\kappa_{abc}p^c \left( ic^a t^b + 2\tau_2 b^a t^b + \left(z(\tau_1 - 3i\tau_2) + \frac{z'}{2}(\tau_1 - 3i\tau_2)\right) t^a t^b \right) \right) H_\gamma \right. \\ \left. + \frac{1}{4}\kappa_{abc}t^b p^c \int_{\ell_{-\gamma}(z')^3} \frac{\mathrm{d}z'}{((2ic^a - 4\tau_2 b^a)z' + t^a(\tau_1(1+2zz') + i\tau_2(3+2zz')))} H_{-\gamma} \right]. $$

Here $\delta\tilde{\zeta}'_\Lambda$, $\delta\sigma$ denote instanton corrections to the classical mirror map (2.6) to be found from the condition of modularity.

To study the modular properties of (B.13), it is more convenient to replace the last three expressions by the combinations introduced in (4.5). Using the covariant derivative operators (4.9), they can be shown to be given by

$$ \delta\xi^a = 2\pi i p^a \mathcal{J}_p $$

$$ \hat{\delta}\tilde{\xi}'_a = \delta\tilde{\xi}'_a - D_a \mathcal{J}_p + \frac{i}{2} \kappa_{abc} t^b p^c \sum_{q_\Lambda} \left[ \int_{\ell_\gamma} \mathrm{d}z' H_\gamma + \int_{\ell_{-\gamma}} \frac{\mathrm{d}z'}{(z')^2} H_{-\gamma} \right], $$

$$ \hat{\delta}_{+} \alpha' = \tau \delta \tilde{\zeta}'_0 - \frac{1}{2} (\delta \sigma + \zeta^\Lambda \delta \tilde{\zeta}'_\Lambda) + \left[ \frac{\tau_2}{\pi} \kappa^{ab} D_a \bar{D}_b - 2 \right] \mathcal{J}_p \quad (B.14) $$

$$ + \frac{1}{2i} \kappa_{abc} t^b p^c \sum_{q_\Lambda} \left[ \int_{\ell_\gamma} \mathrm{d}z' (b^a(\tau_1 + 3i\tau_2) - c^a + 2\tau_2 t^a z') H_\gamma - \int_{\ell_{-\gamma}(z')^3} \frac{\mathrm{d}z'}{((c^a - \bar{\tau}b^a)z' + \tau_2 t^a) H_{-\gamma}} \right], $$

$$ \hat{\delta}_{-} \alpha' = \bar{\tau} \delta \tilde{\zeta}'_0 - \frac{1}{2} (\delta \sigma + \zeta^\Lambda \delta \tilde{\zeta}'_\Lambda) - [4\pi \tau_2 \mathcal{D}_{-1} + (c^a - \bar{\tau}b^a) D_a] \mathcal{J}_p + i\tau_2 z(p \cdot t^2) \sum_{q_\Lambda} \int \frac{\mathrm{d}z'}{(z')^2} H_{-\gamma} \\ + \frac{1}{2i} \kappa_{abc} t^b p^c \sum_{q_\Lambda} \left[ \int_{\ell_\gamma} \mathrm{d}z' (b^a \tau - c^a + \tau_2 t^a z') H_\gamma - \int_{\ell_{-\gamma}(z')^3} \frac{\mathrm{d}z'}{((c^a + (3i\tau_2 - \tau_1)b^a)z' + 2\tau_2 t^a) H_{-\gamma}} \right], $$

where we used the notation (4.8). All the terms independent on the $\mathbb{P}^1$ variable $z$ can be canceled by choosing appropriately the mirror map. This fixes the instanton corrections to the mirror map (2.6) in the large volume, one-instanton approximation to be

$$ \delta z^a = - \frac{1}{4\pi \tau_2} \sum_{q_\Lambda} \left[ \int_{\ell_\gamma} \mathrm{d}z (1-z) \partial_{\tilde{\xi}_a^{[0]}} H_\gamma - \int_{\ell_{-\gamma}} \frac{\mathrm{d}z}{z^3} (1-z) \partial_{\tilde{\xi}_a^{[0]}} H_{-\gamma} \right] \\ \delta \zeta^a = 0, \\ \delta \tilde{\zeta}_a' = - \frac{1}{2\pi} \kappa_{abc} t^b \sum_{q_\Lambda} \mathrm{Re} \left( \int_{\ell_\gamma} \mathrm{d}z \partial_{\tilde{\xi}_c} H_\gamma \right), \quad (B.15) $$

$$ \delta\tilde{\zeta}'_0 = \frac{1}{4\pi} \kappa_{abc} t^b \sum_{q_\Lambda} \mathrm{Re} \int_{\ell_\gamma} \mathrm{d}z (b^a - it^a z) \partial_{\tilde{\xi}_c} H_\gamma, \\ \delta\sigma = \frac{1}{4\pi} \kappa_{abc} t^b \sum_{q_\Lambda} \mathrm{Re} \int_{\ell_\gamma} \mathrm{d}z ((\tau_1 - 4i\tau_2)b^a - (i\tau_1 + 3\tau_2)t^a z) \partial_{\tilde{\xi}_c} H_\gamma. $$

Plugging these relations into (B.14), one arrives at the expressions (4.7) given in the main text. Note that the integrals over $\ell_\gamma$ are Gaussian and can be easily computed. It is worth
stressing that $\delta z^a$ gives a correction to the mirror map between the type IIA complex structure moduli $z^a$ and the type IIB Kähler moduli $b^a + it^a$. Such corrections do not arise for D1-D(-1)-instantons, but are in general necessary in the presence of D3-instantons [36].

### C Relation to the Poincaré series construction

In this section, we make a first attempt at recasting the type IIA twistorial construction into the manifestly S-duality invariant framework developed in [36]. The basic idea is to represent the partition function (3.19) as a Poincaré series, and assign each term in the sum over cosets to a different transition function $G_{m,n}$.

For this purpose, recall that the partition function of MSW invariants (3.21) is a vector-valued holomorphic modular form of negative weight $\mathfrak{h} = -b_2/2 - 1$, therefore the positive frequency Fourier coefficients can be expressed in terms of the polar (negative frequency) coefficients by the Rademacher formula [75]

$$ \bar{\Omega}_{\mathbf{p},\mu}(\hat{q}_0) = 2\pi i^{-\mathfrak{h}} \sum_{0 \le \hat{q}'_0 \le r\chi(\mathcal{D})/24} \bar{\Omega}_{\mathbf{p},\mu}(\hat{q}'_0) \sum_{c=1}^{\infty} c^{-1} K(\hat{q}_0, \hat{q}'_0, c) \left(\frac{-\hat{q}'_0}{\hat{q}_0}\right)^{\frac{1-\mathfrak{h}}{2}} I_{1-\mathfrak{h}}\left(\frac{4\pi}{c}\sqrt{-\hat{q}_0 \hat{q}'_0}\right), \quad (C.1) $$

where $K(\hat{q}_0, \hat{q}'_0, c)$ is the Kloosterman sum

$$ K(\hat{q}_0, \hat{q}'_0, c) = \sum_{-c \le d < 0, (c,d)=1} M^{-1} \begin{pmatrix} a & b \\ c & d \end{pmatrix} \mathbf{E} \begin{pmatrix} \hat{q}'_0 & a \\ c & \hat{q}_0 & d \end{pmatrix}, \quad (C.2) $$

Using this representation one can express the elliptic genus (3.19) as a Poincaré series [42]$^{24}$

$$ \mathcal{Z}(\tau, \mathbf{y}) = \frac{1}{2} \sum_{0 \le \hat{q}_0 \le r\chi(\mathcal{D})/24} \sum_{\mu \in \Lambda^*/\Lambda} \sum_{k \in \Lambda+\mu} + \frac{1}{2} \sum_{g \in \Gamma_\infty \setminus \Gamma} (c\tau + d)^{3/2} (c\bar{\tau} + d)^{-1/2} \bar{\Omega}_{\mathbf{p},\mu}(\hat{q}_0) (-1)^{k \cdot \mathbf{p}} \\ \times \mathbf{E} \left( - \left[ \hat{q}_0 + \frac{1}{2} \mathbf{k}^2 \right] \frac{a\tau + b}{c\tau + d} - \frac{\mathbf{k} \cdot \mathbf{y}}{c\tau + d} \right) R_{-1-\frac{b_2}{2}} \left( \frac{2\pi i \hat{q}_0}{c(c\tau + d)} \right), \quad (C.3) $$

where the factor

$$ R_{\mathfrak{h}}(x) = 1 - \frac{1}{\Gamma(1-\mathfrak{h})} \int_x^\infty e^{-z} z^{-\mathfrak{h}} dz \quad (C.4) $$

approaches 1 exponentially fast at $\mathrm{Re}(x) \to \infty$ and $R_{\mathfrak{h}}(x) \sim x^{1-\mathfrak{h}}/\Gamma(2-\mathfrak{h})$ at $x \to 0$. The group element $g = \begin{pmatrix} a & b \\ c & d \end{pmatrix}$ runs over the coset $\Gamma_\infty \backslash \mathrm{SL}(2, \mathbb{Z})$, i.e. $(c, d)$ run over pairs of coprime integers and $a, b$ are chosen such that $ad - bc = 1$.

Applying the same strategy to the formal theta series $H_{(1)}$ (3.25) on the twistor space, one arrives at a formal Poincaré series. This gives

$$ H_{(1)} = \sum_{0 \le \hat{q}_0 \le \frac{r\chi(\mathcal{D})}{24}} \sum_{\mu \in \Lambda^*/\Lambda} \sum_{k \in \Lambda+\mu} + \frac{1}{2} \sum_{g \in \Gamma_\infty \setminus \Gamma} G_{c,d;\hat{\gamma}} \quad (C.5) $$

<footnote>$^{24}$For simplicity, we assume that the constant term of (3.21) vanishes. Moreover, the sum over $c, d$ should be regulated to $1 \le c \le K$, $|d| \le K$, before sending $K$ to infinity.</footnote>
where $\hat{\gamma} = (\mathbf{p}, \mu, \mathbf{k}, \hat{q}_0)$,

$$ G_{c,d;\hat{\gamma}} = \frac{(-1)^{\mathbf{k}\cdot\mathbf{p}}}{8\pi^2} \bar{\Omega}_{\mathbf{p},\mu}(\hat{q}_0) (c\xi_0 + d) \mathbf{E} \left( \mathbf{p} \cdot g(\tilde{\xi}') - \left[ \hat{q}_0 + \frac{1}{2}\mathbf{k}^2 \right] g(\xi^0) - \mathbf{k} \cdot g(\xi) \right) \times R_{-1-\frac{b_2}{2}} \left( \frac{2\pi i \hat{q}_0}{c(c\xi^0 + d)} \right), \quad (C.6) $$

and the action of $g \in \Gamma_{\infty}\backslash\mathrm{SL}(2, \mathbb{Z})$ on $\xi^0, \xi$ and $\tilde{\xi}'$ is given by (2.20). Although the series (C.5) is divergent due to the sum over D1-brane charges $\mathbf{k}$, it formally transforms like a holomorphic modular form of weight $-1$.

The representation (C.5) suggests a natural Ansatz for the holomorphic transition functions (B.6) that enter the manifestly S-duality invariant twistorial construction outlined in section B.1, namely

$$ G_{m,n}^{\pm} = G_{m,n;\pm\hat{\gamma}}, \quad (C.7) $$

and choose the contours $C_{m,n}^{\pm}$ as the geodesic circles joining the two essential singularities of (C.6), namely the two roots $t_{m,n}^{\pm}$ of the quadratic polynomial $t(m\xi^0(t) + n)$. In particular, it is easy to check that the contact potential generated by these twistorial data in the large volume limit coincides with (4.14). Unfortunately, the transition functions (C.6) do not satisfy the transformation property (B.8) due to the presence of the $R$-factor (C.4) which transforms as a period integral. As a result, the SL(2, $\mathbb{Z}$) invariance of the construction is not guaranteed, and indeed the Darboux coordinates computed from (C.6) acquire a modular anomaly. This anomaly should however be cancelable by a similar holomorphic contact transformation as the one described in section 4.4. We hope to put this construction on a more solid basis in future work.

**Open Access.** This article is distributed under the terms of the Creative Commons Attribution License which permits any use, distribution and reproduction in any medium, provided the original author(s) and source are credited.

## References

[1] J. Bagger and E. Witten, Matter couplings in $N = 2$ supergravity, Nucl. Phys. B 222 (1983) 1 [INSPIRE].

[2] B. de Wit, P. Lauwers and A. Van Proeyen, Lagrangians of $N = 2$ supergravity-matter systems, Nucl. Phys. B 255 (1985) 569 [INSPIRE].

[3] S. Cecotti, S. Ferrara and L. Girardello, Geometry of type II superstrings and the moduli of superconformal field theories, Int. J. Mod. Phys. A 4 (1989) 2475 [INSPIRE].

[4] M. Bodner and A. Cadavid, Dimensional reduction of type IIB supergravity and exceptional quaternionic manifolds, Class. Quant. Grav. 7 (1990) 829 [INSPIRE].

[5] S. Ferrara and S. Sabharwal, Quaternionic manifolds for type II superstring vacua of Calabi-Yau spaces, Nucl. Phys. B 332 (1990) 317 [INSPIRE].

[6] I. Antoniadis, S. Ferrara, R. Minasian and K. Narain, $R^4$ couplings in $M$ and type-II theories on Calabi-Yau spaces, Nucl. Phys. B 507 (1997) 571 [hep-th/9707013] [INSPIRE].
[7] H. Günther, C. Herrmann and J. Louis, *Quantum corrections in the hypermultiplet moduli space*, Fortsch. Phys. **48** (2000) 119 [hep-th/9901137] [INSPIRE].

[8] I. Antoniadis, R. Minasian, S. Theisen and P. Vanhove, *String loop corrections to the universal hypermultiplet*, Class. Quant. Grav. **20** (2003) 5079 [hep-th/0307268] [INSPIRE].

[9] D. Robles-Llana, F. Saueressig and S. Vandoren, *String loop corrected hypermultiplet moduli spaces*, JHEP **03** (2006) 081 [hep-th/0602164] [INSPIRE].

[10] S. Alexandrov, *Quantum covariant c-map*, JHEP **05** (2007) 094 [hep-th/0702203] [INSPIRE].

[11] K. Becker, M. Becker and A. Strominger, *Five-branes, membranes and nonperturbative string theory*, Nucl. Phys. **B** **456** (1995) 130 [hep-th/9507158] [INSPIRE].

[12] K. Becker and M. Becker, *Instanton action for type-II hypermultiplets*, Nucl. Phys. **B** **551** (1999) 102 [hep-th/9901126] [INSPIRE].

[13] S.M. Salamon, *Quaternionic Kähler manifolds*, Invent. Math. **67** (1982) 143.

[14] A. Karlhede, U. Lindström and M. Roček, *Selfinteracting tensor multiplets in $N=2$ superspace*, Phys. Lett. **B** **147** (1984) 297 [INSPIRE].

[15] N.J. Hitchin, A. Karlhede, U. Lindström and M. Roček, *Hyperkähler metrics and supersymmetry*, Commun. Math. Phys. **108** (1987) 535 [INSPIRE].

[16] C. LeBrun, *Quaternionic-Kähler manifolds and conformal geometry*, Math. Ann. **284** (1989) 353.

[17] A. Swann, *Hyper-Kähler and quaternionic Kähler geometry*, Math. Ann. **289** (1991) 421.

[18] B. de Wit, M. Roček and S. Vandoren, *Hypermultiplets, hyperkähler cones and quaternion Kähler geometry*, JHEP **02** (2001) 039 [hep-th/0101161] [INSPIRE].

[19] U. Lindström and M. Roček, *Properties of hyperkähler manifolds and their twistor spaces*, Commun. Math. Phys. **293** (2010) 257 [arXiv:0807.1366] [INSPIRE].

[20] S. Alexandrov, B. Pioline, F. Saueressig and S. Vandoren, *Linear perturbations of quaternionic metrics*, Commun. Math. Phys. **296** (2010) 353 [arXiv:0810.1675] [INSPIRE].

[21] S. Alexandrov, B. Pioline, F. Saueressig and S. Vandoren, *Linear perturbations of hyperkähler metrics*, Lett. Math. Phys. **87** (2009) 225 [arXiv:0806.4620] [INSPIRE].

[22] D. Robles-Llana, M. Roček, F. Saueressig, U. Theis and S. Vandoren, *Nonperturbative corrections to 4D string theory effective actions from SL(2, $\mathbb{Z}$) duality and supersymmetry*, Phys. Rev. Lett. **98** (2007) 211602 [hep-th/0612027] [INSPIRE].

[23] S. Alexandrov, F. Saueressig and S. Vandoren, *Membrane and fivebrane instantons from quaternionic geometry*, JHEP **09** (2006) 040 [hep-th/0606259] [INSPIRE].

[24] D. Robles-Llana, F. Saueressig, U. Theis and S. Vandoren, *Membrane instantons from mirror symmetry*, Commun. Num. Theor. Phys. **1** (2007) 681 [arXiv:0707.0838] [INSPIRE].

[25] F. Saueressig and S. Vandoren, *Conifold singularities, resumming instantons and non-perturbative mirror symmetry*, JHEP **07** (2007) 018 [arXiv:0704.2229] [INSPIRE].

[26] D. Gaiotto, G.W. Moore and A. Neitzke, *Four-dimensional wall-crossing via three-dimensional field theory*, Commun. Math. Phys. **299** (2010) 163 [arXiv:0807.4723] [INSPIRE].

[27] S. Alexandrov, B. Pioline, F. Saueressig and S. Vandoren, *D-instantons and twistors*, JHEP **03** (2009) 044 [arXiv:0812.4219] [INSPIRE].
[28] S. Alexandrov, *D-instantons and twistors: some exact results*, *J. Phys. A* **42** (2009) 335402 [arXiv:0902.2761] [INSPIRE].

[29] A. Haydys, *Hyper-Kähler and quaternionic Kähler manifolds with $S^1$-symmetries*, *J. Geom. Phys.* **58** (2008) 293.

[30] S. Alexandrov, D. Persson and B. Pioline, *Wall-crossing, Rogers dilogarithm and the QK/HK correspondence*, *JHEP* **12** (2011) 027 [arXiv:1110.0466] [INSPIRE].

[31] S. Alexandrov, D. Persson and B. Pioline, *Fivebrane instantons, topological wave functions and hypermultiplet moduli spaces*, *JHEP* **03** (2011) 111 [arXiv:1010.5792] [INSPIRE].

[32] B. Pioline and D. Persson, *The automorphic $NS5$-brane, Commun. Num. Theor. Phys.* **3** (2009) 697 [arXiv:0902.3274] [INSPIRE].

[33] L. Bao, A. Kleinschmidt, B.E. Nilsson, D. Persson and B. Pioline, *Instanton corrections to the universal hypermultiplet and automorphic forms on SU(2, 1), Commun. Num. Theor. Phys.* **4** (2010) 187 [arXiv:0909.4299] [INSPIRE].

[34] S. Alexandrov, D. Persson and B. Pioline, *On the topology of the hypermultiplet moduli space in type-II/CY string vacua*, *Phys. Rev. D* **83** (2011) 026001 [arXiv:1009.3026] [INSPIRE].

[35] S. Alexandrov and F. Saueressig, *Quantum mirror symmetry and twistors*, *JHEP* **09** (2009) 108 [arXiv:0906.3743] [INSPIRE].

[36] S. Alexandrov and B. Pioline, *S-duality in twistor space*, *JHEP* **08** (2012) 112 [arXiv:1206.1341] [INSPIRE].

[37] J.M. Maldacena, A. Strominger and E. Witten, *Black hole entropy in M-theory*, *JHEP* **12** (1997) 002 [hep-th/9711053] [INSPIRE].

[38] J. Manschot, *Stability and duality in $N = 2$ supergravity*, *Commun. Math. Phys.* **299** (2010) 651 [arXiv:0906.1767] [INSPIRE].

[39] J. Manschot, *Wall-crossing of D4-branes using flow trees*, *Adv. Theor. Math. Phys.* **15** (2011) 1 [arXiv:1003.1570] [INSPIRE].

[40] S. Zwegers, *Mock theta functions*, Ph.D. dissertation, Utrecht The Netherlands (2002).

[41] R. Dijkgraaf, J.M. Maldacena, G.W. Moore and E.P. Verlinde, *A black hole Farey tail*, *hep-th/0005003* [INSPIRE].

[42] J. Manschot and G.W. Moore, *A modern Farey tail*, *Commun. Num. Theor. Phys.* **4** (2010) 103 [arXiv:0712.0573] [INSPIRE].

[43] S. Hosono, A. Klemm, S. Theisen and S.-T. Yau, *Mirror symmetry, mirror map and applications to Calabi-Yau hypersurfaces*, *Commun. Math. Phys.* **167** (1995) 301 [hep-th/9308122] [INSPIRE].

[44] R. Böhm, H. Günther, C. Herrmann and J. Louis, *Compactification of type IIB string theory on Calabi-Yau threefolds*, *Nucl. Phys. B* **569** (2000) 229 [hep-th/9908007] [INSPIRE].

[45] B. Haghighat and S. Vandoren, *Five-dimensional gauge theory and compactification on a torus*, *JHEP* **09** (2011) 060 [arXiv:1107.2847] [INSPIRE].

[46] S. Alexandrov, *Twistor approach to string compactifications: a review*, *Phys. Rept.* **522** (2013) 1 [arXiv:1111.2892] [INSPIRE].

[47] A. Neitzke, B. Pioline and S. Vandoren, *Twistors and black holes*, *JHEP* **04** (2007) 038 [hep-th/0701214] [INSPIRE].
[48] M. Kontsevich and Y. Soibelman, Stability structures, motivic Donaldson-Thomas invariants and cluster transformations, arXiv:0811.2435 [inSPIRE].

[49] S. Alexandrov and P. Roche, TBA for non-perturbative moduli spaces, JHEP 06 (2010) 066 [arXiv:1003.3964] [inSPIRE].

[50] D. Gaiotto, A. Strominger and X. Yin, From $AdS_3/CFT_2$ to black holes/topological strings, JHEP 09 (2007) 050 [hep-th/0602046] [inSPIRE].

[51] D. Gaiotto, A. Strominger and X. Yin, The $M5$-brane elliptic genus: modularity and BPS states, JHEP 08 (2007) 070 [hep-th/0607010] [inSPIRE].

[52] J. de Boer, M.C. Cheng, R. Dijkgraaf, J. Manschot and E. Verlinde, A Farey tail for attractor black holes, JHEP 11 (2006) 024 [hep-th/0608059] [inSPIRE].

[53] F. Denef and G.W. Moore, Split states, entropy enigmas, holes and halos, JHEP 11 (2011) 129 [hep-th/0702146] [inSPIRE].

[54] M.R. Douglas, $D$-branes, categories and $N=1$ supersymmetry, J. Math. Phys. 42 (2001) 2818 [hep-th/0011017] [inSPIRE].

[55] P.S. Aspinwall, $D$-branes on Calabi-Yau manifolds, hep-th/0403166 [inSPIRE].

[56] A. Dabholkar, F. Denef, G.W. Moore and B. Pioline, Precision counting of small black holes, JHEP 10 (2005) 096 [hep-th/0507014] [inSPIRE].

[57] E.R. Sharpe, $D$-branes, derived categories and Grothendieck groups, Nucl. Phys. B 561 (1999) 433 [hep-th/9902116] [inSPIRE].

[58] R. Minasian and G.W. Moore, $K$ theory and Ramond-Ramond charge, JHEP 11 (1997) 002 [hep-th/9710230] [inSPIRE].

[59] M.R. Douglas, R. Reinbacher and S.-T. Yau, Branes, bundles and attractors: Bogomolov and beyond, math/0604597 [inSPIRE].

[60] E. Diaconescu and G.W. Moore, Crossing the wall: branes versus bundles, Adv. Theor. Math. Phys. 14 (2010) [arXiv:0706.3193] [inSPIRE].

[61] D. Joyce and Y. Song, A theory of generalized Donaldson-Thomas invariants, arXiv:0810.5645 [inSPIRE].

[62] J. Manschot, B. Pioline and A. Sen, Wall crossing from Boltzmann black hole halos, JHEP 07 (2011) 059 [arXiv:1011.1258] [inSPIRE].

[63] J. de Boer, J. Manschot, K. Papadodimas and E. Verlinde, The chiral ring of $AdS_3/CFT_2$ and the attractor mechanism, JHEP 03 (2009) 030 [arXiv:0809.0507] [inSPIRE].

[64] J. de Boer, F. Denef, S. El-Showk, I. Messamah and D. Van den Bleeken, Black hole bound states in $AdS_3 \times S^2$, JHEP 11 (2008) 050 [arXiv:0802.2257] [inSPIRE].

[65] J. Troost, The non-compact elliptic genus: mock or modular, JHEP 06 (2010) 104 [arXiv:1004.3649] [inSPIRE].

[66] C. Vafa and E. Witten, A strong coupling test of $S$ duality, Nucl. Phys. B 431 (1994) 3 [hep-th/9408074] [inSPIRE].

[67] D.R. Morrison and N. Seiberg, Extremal transitions and five-dimensional supersymmetric field theories, Nucl. Phys. B 483 (1997) 229 [hep-th/9609070] [inSPIRE].

[68] J. Manschot, BPS invariants of semi-stable sheaves on rational surfaces, arXiv:1109.4861 [inSPIRE].
[69] B. Haghighat, J. Manschot and S. Vandoren, *A 5d/2d/4d correspondence*, submitted to JHEP (2013) [arXiv:1211.0513] [INSPIRE].

[70] J. Manschot, *BPS invariants of $N = 4$ gauge theory on a surface, Commun. Num. Theor. Phys. **6** (2012) 497 [arXiv:1103.0012] [INSPIRE].

[71] A. Neitzke, *On a hyperholomorphic line bundle over the Coulomb branch*, arXiv:1110.1619 [INSPIRE].

[72] M.-F. Vignéras, *Séries thêta des formes quadratiques indéfinies* (in French), Springer Lect. Notes **627** (1977) 227.

[73] L. Göttsche and D. Zagier, *Jacobi forms and the structure of Donaldson invariants for 4-manifolds with $b_+ = 1$, Selecta Math. (N.S.) **4** (1998) 69 [alg-geom/9612020].

[74] L. Göttsche, *Theta functions and Hodge numbers of moduli spaces of sheaves on rational surfaces, Commun. Math. Phys. **206** (1999) 105 [INSPIRE].

[75] T. Apostol, *Modular functions and Dirichlet series in number theory*, Graduate Texts in Mathematics, Springer-Verlag, Germany (1976).