1 Introduction, summary and plan

The role of topological quantum field theory in modern physics and mathematics is unambiguously important. One example is Donaldson–Witten (DW) theory, which is a topological formulation of the \({\mathcal {N}}=2\) supersymmetric Yang–Mills theory on an oriented smooth four-manifold X. Its equivalent IR (long distance) counterpart is an abelian theory where Seiberg–Witten (SW) geometry dictates the physics [1]. Due to an electric–magnetic duality in the IR, characteristic functions of the theory enjoy powerful modular properties [2]. In the seminal paper [3], the solution of the IR theory was derived using the technique of lattice reduction for simply connected X. In the same paper, the famous relation

$$\begin{aligned} Z_{\mathrm{DW}} = Z_{u} + Z_{\mathrm{SW}} \end{aligned}$$
(1)

was found, where \(Z_{\mathrm{SW}}\) denotes the generating function of SW invariants of the four-manifold [4], while \(Z_u\) denotes the contribution to \(Z_{\mathrm{DW}}\) from the Coulomb branch of the low-energy effective U(1) theory, the so-called u-plane. The u-plane and its contribution to the path integral were studied in detail in [3, 5,6,7]. The u-plane integral \(Z_u\) is of particular interest since it is non-vanishing only for four-manifolds with \(b_2^+(X) \in \{0,1\}\). In turn, such four-manifolds are of particular interest since they are the only candidate topologies that probe the Coulomb branch \({\mathcal {B}}\) of the theory.

Recently, interest in DW theory and in particular the u-plane integral was revived due to observations relating the latter for special four-manifolds to the theory of mock theta functions and harmonic Maass forms [8, 9]. For more generic, but simply connected, compact four-manifolds it was later reformulated in terms of the modular completion of a mock modular form [10,11,12]. In this series of papers, the possibility to add \({\mathcal {Q}}\)-exact operators to the action without affecting the correlation functions was studied in detail. In particular, a specific new \({\mathcal {Q}}\)-exact operator related to the 2-cycles of the background geometry was added to the action of the low-energy U(1) theory, which makes the connection to mock modular forms apparent and elegant [10, 12]. This technique circumvents the cumbersome method of lattice reduction and allows to evaluate correlation functions efficiently. To the best of our knowledge, all of the recent results relating \(Z_u\) and mock modular forms are restricted to the case where the low-energy U(1) theory is formulated on simply connected four-manifolds.

Taking inspiration from [7], we ask the natural question how these recent results carry over to the case when the four-manifold X has a non-trivial fundamental group and nonzero first Betti number \(b_1(X)\). When the four-manifold is non-simply connected, the theory is more complicated. This is due to the fact that the manifold now admits more structures, in the form of 1-form fields and 1- and 3-cycles, which are not present in the simply connected case. These cycles give rise to further contact terms in the low-energy U(1) action [5, 7]. As a result, we consider more general \({\mathcal {Q}}\)-exact operators related to these cycles. Below, we give a summary of the paper highlighting our results.

Summary of the paper

In this paper, we present a natural extension of the recent results [10, 12] to the case of non-simply connected four-manifolds with \(b_2^+=1\). Specifically, we introduce a number of new \({\mathcal {Q}}\)-exact operators in the low-energy effective U(1) theory that allow us to express the integrand of the u-plane integral elegantly as the non-holomorphic completion of a mock modular form. This further allows us to derive a closed-form expression for the u-plane integral for any such four-manifold and for arbitrary period point J, as is evident from the result of this paper, Eq. (52). This solution depends on \(H_1(X)\), a fact that is easily seen in the case of product ruled surfaces where it manifests as a genus dependence, while when \(H_1(X)\) is trivial, (52) reduces to Eq. (4.10) of [10]. As a byproduct of our computations, we present a complete classification of all \({\mathcal {Q}}\)-exact operators that the theory admits.

DW theory on product ruled surfaces \(X={\mathbb {C}}{\mathbb {P}}^1\times \Sigma _g\), with \(\Sigma _g\) a genus g Riemann surface, has been argued to be equivalent to a 2d topological A-model on \({\mathbb {C}}{\mathbb {P}}^1\) in the limit of vanishing volume for \(\Sigma _g\) [5, 13, 14]. In this paper, we present a concrete derivation of this equivalence and in turn show that due to the relation between DW theory and its low-energy U(1) effective theory as given by Eq. (1), a connection between Gromov–Witten (GW) theory (realised physically by the A-model) and mock modular forms (appearing in the low-energy effective action) exists, such that one can compute GW invariants using modular data originating from the 4d theory, thereby deriving results in enumerative geometry from number theory. As an example, we make concrete numerical predictions of the genus zero GW invariants of the moduli space of flat SU(2)-connections on \(\Sigma _2\) via their relation to an indefinite theta function. The GW invariants studied here involve local and non-local operators which, as far as we know, have not been studied.

Plan of the paper

The plan of the paper is as follows. In Sect. 2, we review the effective DW theory and the low-energy SW geometry. We further discuss the new specific \({\mathcal {Q}}\)-exact operators that we add to the action.

In Sect. 3, we rederive the u-plane integral \(Z_u\) by including the \({\mathcal {Q}}\)-exact operators and show how \(Z_u\) can be written in terms of a mock modular form.

In Sect. 4, we apply our results to the two possible reductions of the product ruled surfaces \(X=\mathbb {CP}^1 \times \Sigma _g\) and check them towards existing literature [7, 15]. The second reduction, where the volume of \(\Sigma _g\) shrinks, will be related to the genus zero GW invariants realised by the correlation functions of the A-model on \(\mathbb {CP}^1\).

In Sect. 5, we discuss the A-model on \(\mathbb {CP}^1\), and perform the computations that produce the generating function of GW invariants. Together with the findings of Sect. 4, we make concrete numerical predictions of the genus zero GW invariants of the moduli space of flat SU(2)-connections on \(\Sigma _2\) via modular data.

In Sect. 6, we conclude our paper, where useful appendices follow thereafter.

2 Effective DW theory

DW theory is the topologically twisted formulation of the pure \({\mathcal {N}}=2\) supersymmetric Yang–Mills theory with gauge group G of rank \(r_G=1\) on a smooth four-manifold X [1]. In the IR, the theory becomes a U(1) gauge theory that depends on the complexified effective gauge coupling \( \tau =\frac{\theta }{\pi } +\frac{8\pi i}{g^2} \in {\mathbb {H}}\), where \({\mathbb {H}}\) denotes the Poincaré half-plane. DW theory contains a scalar fermionic BRST operator \({\mathcal {Q}}:=\epsilon ^{\dot{A}\dot{B}}{\overline{{\mathcal {Q}}}}_{\dot{A}\dot{B}}\) that obeys \({\mathcal {Q}}^2 =0\).Footnote 1 The field content of the theory is a collection of bosonic and fermionic degree 0, 1 and 2 operator valued differential forms on X, where the degree of the differential form is equal to the ghost number of the physical operator. In Table 1 we summarise the field content of the DW theory.

Table 1 Field content of DW theory. The \(a,{{\bar{a}}}\) fields originate from the vacuum expectation value of the scalar field of the UV theory. The D field is an auxiliary field

The BRST transformations on these fields are

$$\begin{aligned} \begin{aligned} {[}{\mathcal {Q}},A]&=\psi ,\qquad \quad [{\mathcal {Q}},\psi ]=4\sqrt{2}{\mathrm {d}}a,\\ {[}{\mathcal {Q}},a]&=0,\qquad \quad [{\mathcal {Q}},{{\bar{a}}}]=\sqrt{2}\mathring{\imath }\eta ,\\ {[}{\mathcal {Q}},\eta ]&=0,\qquad \quad [{\mathcal {Q}},\chi ]=\mathring{\imath }(F_+-D_+),\\ {[}{\mathcal {Q}},D]&=({\mathrm {d}}\psi )_+. \end{aligned} \end{aligned}$$
(2)

The physical observables of the theory belong to the \({\mathcal {Q}}\)-cohomology. We are interested in computing the path integral of the theory, the u-plane integral or Coulomb branch integral, when evaluated on a non-simply connected four-manifold. To this end, let us first introduce some notation.

Let \(b_j:=b_j(X) = \mathrm{dim}\, H^j(X)\) be the Betti numbers of the smooth, closed and oriented four-manifold X with \(b_2(X)= b_2^+(X) + b_2^{-}(X)\), where the first (second) summand corresponds to the number of positive (negative) eigenvalues of the quadratic form Q of X. For \(a\in H^i(X)\) and \(b\in H^{4-i}(X)\) we define

$$\begin{aligned} B(a,b) = \int _X a\wedge b. \end{aligned}$$
(3)

For \(a \in H^2(X)\) the quadratic form Q of X corresponds to

$$\begin{aligned} Q(a) := B(a,a). \end{aligned}$$
(4)

Furthermore, the signature of X is defined as \(\sigma (X)= b_{2}^+(X)-b_{2}^{-}(X)\). Hereafter we consider four-manifolds with \(b_2^+(X)=1\). By Poincaré duality, we have that \(b_0=b_4\), \(b_1=b_3\). We can assume \(b_1\) to be even, since the correlation function of the theory are known to vanish unless \(1-b_1+b_2^+\) is even [3].

The Coulomb branch integral is the path integral of the low-energy U(1) theory with the insertion of the observables arising from the descent formalism as well as contact terms and \({\mathcal {Q}}\)-exact operators. It takes the form

$$\begin{aligned} \begin{aligned} Z_u(p,\gamma ,S,Y)&= \int [{\mathcal {D}}\Phi ] \nu (\tau ) e^{-\int _X {\mathcal {L}}'+I(S,Y)+I_{\mathcal {O}}+I_\cap }, \end{aligned} \end{aligned}$$
(5)

where \(\Phi =\{a,{{\bar{a}}}, A,\eta ,\psi ,\chi ,D\}\) is the collection of fields of the theory (as in Table 1).

Below, Sects. 2.12.5 are devoted to reviewing and explaining in detail all the ingredients of the u-plane integral (5). Finally, in Sect. 2.6 we introduce the new \({\mathcal {Q}}\)-exact operators \(I_S\) following [10] as well as its generalisation I(SY) that will allow us to reformulate \(Z_u\) as an integral over a mock modular form.

2.1 Seiberg–Witten geometry

In the seminal papers [2, 16], Seiberg and Witten found the exact low-energy solution of \({\mathcal {N}}=2\) supersymmetric Yang–Mills with gauge group SU(2). The \({\mathcal {N}}=2\) vector multiplet consists of a gauge field A, a scalar \(\phi \) and Weyl fermions \(\lambda \) and \(\psi \), all in the adjoint representation. The potential of the theory is \(V(\phi )=\tfrac{1}{g^2}\text {Tr}[\phi ,\phi ^\dagger ]^2\) and we are interested in the moduli space of flat directions. These are found by setting \(\phi =a\sigma ^3\), with \(\sigma ^3\) the third Pauli matrix and a a complex parameter. However, note that the Weyl group of SU(2) acts on a by \(a\mapsto -a\). We can then construct a gauge invariant parameter as

$$\begin{aligned} u=\frac{1}{16\pi ^2}\langle \text {Tr}\phi ^2\rangle . \end{aligned}$$
(6)

This serves as a good coordinate on the moduli space.

There are two strong coupling singularities in the gauge theory, located at \(u=\pm \Lambda ^2\), where a monopole and a dyon become massless, respectively [2]. Here, \(\Lambda \) is the dynamical scale of the theory, which is generated by the renormalisation group flow. This will be set equal to one later in the paper. The central charge of a dyonic state with electric and magnetic charges \((n_e, n_m)\) is given by

$$\begin{aligned} Z=n_e a+n_m a_D, \end{aligned}$$
(7)

where \(a_D\) is the magnetic dual of a, \(a_D=\frac{\partial {\mathcal {F}}}{\partial a}\), with \({\mathcal {F}}\) the prepotential of the theory.

The quantum moduli space of the gauge theory can be described in terms of a certain family of elliptic curves, the so-called Seiberg–Witten (SW) curves,

$$\begin{aligned} y^2=x^3-ux^2+\tfrac{1}{4}\Lambda ^4 x. \end{aligned}$$
(8)

The complex structure of the curve is identified with the complex coupling \(\tau \) of the gauge theory. The fields a and \(a_D\) can be determined from the SW differential \(\lambda _{\text {SW}}\) as

$$\begin{aligned} a=\int _A \lambda _{\text {SW}},\qquad a_D=\int _B \lambda _{\text {SW}}, \end{aligned}$$
(9)

where A and B are the canonical basis of homology cycles on the elliptic curve.

By relating the j-invariant of the SW curve (8) to that of the Weierstraß curve, we can solve for u in terms of Jacobi theta functions,

$$\begin{aligned} \frac{u(\tau )}{\Lambda ^2}=\frac{\vartheta _2(\tau )^4+\vartheta _3(\tau )^4}{2\vartheta _2(\tau )^2 \vartheta _3(\tau )^2}=\tfrac{1}{8}q^{-1/4}+\tfrac{5}{2} q^{1/4}-\tfrac{31}{4}q^{3/4}+{\mathcal {O}}(q^{5/4}), \end{aligned}$$
(10)

where \(q=e^{2\pi \mathring{\imath }\tau }\). See Appendix A for the definitions of the theta functions. Using this formula it is straightforward to show that u is a modular function for the congruence subgroup \(\Gamma ^0(4)\subset \mathrm {SL}(2,{\mathbb {Z}})\). The fundamental domain of this group is shown in Fig. 1. The cusp at \(\tau =\mathring{\imath }\infty \) corresponds to weak coupling, while the cusps at \(\tau =0\) and \(\tau =2\) correspond to the monopole and dyon singularities, respectively.

From the curve (8) we can directly find other quantities that will be important for the analysis in the paper, such as \(\frac{{\mathrm {d}}u}{{\mathrm {d}}a}\) or \(\frac{{\mathrm {d}}u}{{\mathrm {d}}\tau }\). See for example [17] for a more detailed discussion on how these quantities can be retrieved from the curve. These expressions and their transformation properties under \(\Gamma ^0(4)\) are collected in Appendix A.2.

Fig. 1
figure 1

Fundamental domain \(\Gamma ^0(4)\backslash {\mathbb {H}}\) of the congruence subgroup \(\Gamma ^0(4)\), the duality group of the pure SW theory. It consists of six images of the key-hole fundamental domain \({\mathcal {F}}\) of \(\text {SL}(2,{\mathbb {Z}})\). The cusp at \(\tau =\mathring{\imath }\infty \) corresponds to weak coupling, while the cusps at \(\tau =0\) and 2 correspond to the monopole and dyon points

The u-plane integral can also be formulated for theories other than pure \({\mathcal {N}}=2\) SYM with gauge group SU(2). For pure \({\mathcal {N}}=2\) SYM with gauge group SU(N) and \(N>2\), integrals over the respective Coulomb branches have been performed in [18]. The modular structure for those theories is, however, much more involved, as was recently elaborated in [19]. More tractable Coulomb branches are rank one theories with matter hypermultiplets, such as \({\mathcal {N}}=2^*\) (with one adjoint hypermultiplet) and \({\mathcal {N}}=2\) supersymmetric QCD (with \(N_f\le 4\) fundamental hypermultiplets), both with gauge group SU(2) [16]. Rank 1 Argyres-Douglas theories are non-Lagrangian examples of \({\mathcal {N}}=2\) theories with 1-dimensional Coulomb branches [20, 21]. The partition function has been studied only for the simplest of those, the \((A_1,A_2)\) theory [22]. The extension of such Coulomb branch integrals to manifolds with \(b_1(X)>0\) is interesting because the ghost number selection rule admits the possibility of an infinite number of non-vanishing correlation functions, in sharp contrast to the case \(b_1(X)=0\). The u-plane integral for \({\mathcal {N}}=2^*\) theory has been formulated in [23] and evaluated in [24], based on the Coulomb branch geometry found in [25]. The modular structure of \({\mathcal {N}}=2\) QCD on the other hand has been established much more recently [17]. Integration over those Coulomb branches has yet to be completed [26].

2.2 Effective Lagrangian

The low-energy U(1) effective Lagrangian \({\mathcal {L}}\) of the twisted theory is given in [3, (2.15)]. The \({\mathcal {Q}}\)-exact terms as well as the kinetic terms do not contribute since the zero modes are constant in DW theory on a four-manifold X with \(b_2^+(X)=1\). For such manifolds there is a useful fact stating that for any \(\beta _1,\beta _2, \beta _3,\beta _4\in H^1(X,{\mathbb {Z}})\), we have [27]

$$\begin{aligned} \beta _1\wedge \beta _2\wedge \beta _3\wedge \beta _4=0. \end{aligned}$$
(11)

We will make extensive use of this fact below.

Let us define \({\mathcal {L}}'\) as the part of the zero-mode low-energy U(1) effective Lagrangian that contributes to the u-plane integral. It is given by [3]

$$\begin{aligned} \begin{aligned} {\mathcal {L}}'=\,&\pi \mathring{\imath }{\bar{\tau }} k_+^2+\pi \mathring{\imath }\tau k_-^2-\frac{y}{8\pi } D\wedge *D +\frac{\mathring{\imath }\sqrt{2}}{16\pi }\frac{{\mathrm {d}}{\bar{\tau }}}{{\mathrm {d}}{{\bar{a}}}}\,\eta \chi \wedge (F_++D)\\&-\frac{\mathring{\imath }\sqrt{2}}{2^7\pi } \frac{{\mathrm {d}}\tau }{{\mathrm {d}}a}\psi \wedge \psi \wedge (F_-+D), \end{aligned} \end{aligned}$$
(12)

where \(F_\pm =4\pi k_\pm \) and for any two-form x we abbreviate \(B(x,x)=x^2\) as defined in Eq. (3). In \({\mathcal {L}}'\), we disregard any summands of \({\mathcal {L}}\) containing \({\mathcal {Q}}\)-exact terms, exact differential forms and \(\wedge \)-products of four 1-forms. Here and throughout the rest of the paper we use units where the dynamical scale \(\Lambda \) of the low-energy effective U(1) theory is equal to one. The gravitational contributions to \({\mathcal {L}}'\) are described in the following section.

2.3 Measure factors

Assuming X is connected, the (holomorphic) measure factor [3, 28] is

$$\begin{aligned} \nu (\tau ) :=- \left( 2^{7/2}\pi \right) ^{\frac{b_1}{2}}\frac{2^{\frac{3\sigma (X)}{4}+1}}{\pi }(u^2-1)^{\frac{\sigma (X)}{8}}\left( \frac{{\mathrm {da}}}{{\mathrm {du}}}\right) ^{\frac{\sigma (X)}{2} +b_1-2}. \end{aligned}$$
(13)

Here we used \(\chi (X)+\sigma (X)=4-2b_1\) to eliminate the Euler character of X, \(\chi (X)\). This expression reduces to Eq. (2.9) in [10] if we take \(b_1=0\). For the simply connected theory one can use the microscopic definition of the theory to determine the effective gravitational couplings (e.g. by considering expansions of the Nekrasov partition function) [29, 30].

The zero modes of the one-forms \(\psi \) live in the tangent space of a \(b_1\)-dimensional torus \({\mathbb {T}}^{b_1}=H^1(X,{\mathbb {R}})/H^1(X,{\mathbb {Z}}) = H^1(X, {\mathcal {O}}^*_X)\) which corresponds to isomorphism classes of invertible sheaves (for X a smooth complex variety that is holomorphic line bundles) on X which are topologically trivial. We can expand \(\psi \) in zero modes as \(\psi =\sum _{i=1}^{b_1} c_i\beta _i\) with \(\beta _i\) an integral basis of harmonic one-forms, and \(c_i\) Grassmann variables. We then have the measure

$$\begin{aligned} \prod _{i=1}^{b_1}\frac{dc_i}{\sqrt{y}}=y^{-\frac{b_1}{2}}\prod _{i=1}^{b_1}dc_i. \end{aligned}$$
(14)

The photon partition function will also include an integration over \(b_1\) zero modes of the gauge field corresponding to flat connections [7]. These zero modes span the tangent space of \({\mathbb {T}}^{b_1}\). As a consequence of this, the photon partition function will have an overall factor of \(y^{\frac{1}{2}(b_1-1)}\) [31]. Combining this with the measure factor (14) we see that in the end there will only be a factor of \(y^{-1/2}\) surviving.

We can also consider the \(c_j\) in the expansion of \(\psi \) as a basis of one-forms \(\beta _j^{\#}\in H^1({\mathbb {T}}^{b_1},{\mathbb {Z}})\), dual to \(\beta _j\), such that

$$\begin{aligned} \psi = \sum _{j=1}^{b_1}\beta _j\otimes \beta ^{\#}_j. \end{aligned}$$
(15)

A useful fact about four-manifolds with \(b_2^+=1\) is that the image of the map

$$\begin{aligned} \wedge :\quad H^1(X,{\mathbb {Z}})\otimes H^1(X,{\mathbb {Z}})\rightarrow H^2(X,{\mathbb {Z}}) \end{aligned}$$
(16)

is generated by a single rational cohomology class, which we denote as W [27].Footnote 2 This means that we can write \(\beta _i\wedge \beta _j=a_{ij}W\), \(i,j=1,\dots ,b_1\), where \(a_{ij}\) is an anti-symmetric matrix. This further implies that the two-form on \({\mathbb {T}}^{b_1}\) can be written as

$$\begin{aligned} \Omega = \sum _{i<j}a_{ij}\beta _i^{\#}\wedge \beta _j^{\#}, \end{aligned}$$
(17)

where \(\beta _i^{\#}\in H^1({\mathbb {T}}^{b_1},{\mathbb {Z}})\), such that

$$\begin{aligned} \text {vol}({\mathbb {T}}^{b_1})=\int _{{\mathbb {T}}^{b_1}}\frac{\Omega ^{b_1/2}}{(b_1/2)!}. \end{aligned}$$
(18)

Below, we will study four-manifolds of the type \(X={\mathbb {C}}{\mathbb {P}}^1\times \Sigma _g\) with \(\Sigma _g\) a genus g Riemann surface. For these manifolds we have that \(W=[{\mathbb {C}}{\mathbb {P}}^1]\) and \(\text {vol}({\mathbb {T}}^{b_1})=1\) [7].

Using the analysis above we can now write \(\psi \wedge \psi = 2(W\otimes \Omega )\) [7]. This will be very useful later on when we want to perform the integral over \({\mathbb {T}}^{b_1}\) for the product ruled surfaces.

2.4 Observables

\({\mathcal {Q}}\)-invariant observables can be constructed using the celebrated descent formalism. By starting with the zero-form operator \({\mathcal {O}}^{(0)}=2u\), we find all k-form valued observables \({\mathcal {O}}^{(k)}\) for \(k=1,2,3,4\) that are \({\mathcal {Q}}\)-invariant modulo exact forms by solving the descent equations

$$\begin{aligned} {\mathrm {d}}{\mathcal {Q}}^{(j)}=\{{\mathcal {Q}},{\mathcal {O}}^{(j+1)}\} \end{aligned}$$
(19)

inductively. This ensures that for a k-cycle \(\Sigma ^{(k)}\in H_k(X)\) in X, the integrals \(\int _{\Sigma ^{(k)}}{\mathcal {O}}^{(k)}\) are \({\mathcal {Q}}\)-invariant and only depend on \(\Sigma ^{(k)}\). Fortunately, there is a canonical solution to the descent equations: Due to the fact that the translation generator is \({\mathcal {Q}}\)-exact, there is the one-form valued descent operator K, which satisfies \({\mathrm {d}}=\{{\mathcal {Q}},K\}\) [3]. This implies that (19) can be solved by \({\mathcal {O}}^{(j)}=K^j {\mathcal {O}}^{(0)}\), where the iterated (anti)-commutators are implicit. The action of the operator K can be inferred from the BRST transformations (2) as [3]

$$\begin{aligned} \begin{aligned}&{[}K,a]=\frac{1}{4\sqrt{2}}\psi , \quad [K,{{\bar{a}}}]=0, \quad {[}K,\psi ]=-2(F_-+D), \quad [K,A]=-2\mathring{\imath }\chi ,\\&{[}K,\eta ]=-\frac{\mathring{\imath }}{\sqrt{2}}{\mathrm {d}}{{\bar{a}}}, \quad {[}K,\chi ]=-\frac{3\sqrt{2}\mathring{\imath }}{4}*{\mathrm {d}}{{\bar{a}}}, \quad {[}K,D]=\frac{3\mathring{\imath }}{4}\left( 2{\mathrm {d}}\chi -*{\mathrm {d}}\eta \right) . \end{aligned}\nonumber \\ \end{aligned}$$
(20)

Let us study the insertion of all possible observables. For ease of notation, let us denote \(p=\Sigma ^{(0)}\) a point class, \(\gamma =\Sigma ^{(1)}\) a 1-cycle, \(S=\Sigma ^{(2)}\) a 2-cycle and \(Y=\Sigma ^{(3)}\) a 3-cycle. The cycles \(\gamma \), S and Y can be expanded in formal sums as

$$\begin{aligned} \gamma =\sum _{i=1}^{b_1}\zeta _i\gamma _i,\qquad S=\sum _{i=1}^{b_2}\lambda _iS_i\qquad Y=\sum _{i=1}^{b_3}\theta _i Y_i, \end{aligned}$$
(21)

where \(\gamma _i\), \(S_i\) and \(Y_i\) are a basis of one-, two- and three-cycles, respectively, \(\lambda _i\) are complex numbers, while \(\zeta _i\) and \(\theta _i\) are Grassmann variables. By the common abuse of notation, we use the same notation for the 3-, 2- and 1-forms Poincaré dual to the cycles and use the convention

$$\begin{aligned} \int _\gamma \omega _1=\int _X \omega _1\wedge \gamma ,\qquad \int _S\omega _2=\int _X\omega _2\wedge S, \qquad \int _Y \omega _3=\int _X \omega _3\wedge Y. \end{aligned}$$
(22)

The most general \({\mathcal {Q}}\)-invariant observable we can add is then

$$\begin{aligned} I_{{\mathcal {O}}}=2pu+ a_1\int _\gamma Ku+a_2\int _S K^2u+a_3 \int _Y K^3u, \end{aligned}$$
(23)

where \(a_2=\frac{\mathring{\imath }}{\sqrt{2}\pi }\) is fixed from matching with the mathematical literature [3] andFootnote 3

$$\begin{aligned} \begin{aligned} Ku&=\frac{1}{4\sqrt{2}}\frac{{\mathrm {du}}}{{\mathrm {da}}}\psi ,\\ K^2u&=\frac{1}{32}\frac{{\mathrm {d}}^2u}{{\mathrm {d}}a^2}\psi \wedge \psi -\frac{\sqrt{2}}{4} \frac{{\mathrm {du}}}{{\mathrm {da}}}(F_-+D),\\ K^3u&=\frac{1}{2^7\sqrt{2}}\frac{{\mathrm {d}}^3u}{{\mathrm {d}}a^3}\psi \wedge \psi \wedge \psi -\frac{3}{16}\frac{{\mathrm {d}}^2u}{{\mathrm {d}}a^2}\psi \wedge (F_-+D)-\frac{3\sqrt{2}\mathring{\imath }}{16} \frac{{\mathrm {du}}}{{\mathrm {da}}}(2{\mathrm {d}}\chi -*{\mathrm {d}}\eta ). \end{aligned}\nonumber \\ \end{aligned}$$
(24)

2.5 Contact terms

The existence of the canonical solution to the descent equations allows to map an observable of the UV theory to the low-energy U(1) effective theory on the u-plane. For instance, the operator \(I(S)=\int _S K^2 u\) of the UV theory is mapped to the same observable \({\tilde{I}}(S)=\int _S K^2u\) in the IR. This is not quite true for products \(I(S_1)I(S_2)\cdots I(S_n)\) of such operators for distinct Riemann surfaces \(S_i\in H_2(X,{\mathbb {Z}})\). At the intersection of the surfaces, contact terms will appear [3, 5]. When mapping a product of surface operators to the IR, the product is corrected by a sum over the intersection points. Due to the \({\mathcal {Q}}\)-invariance, the inserted operator is holomorphic and the point at which it is inserted is irrelevant.

Such contact terms appear for all cycles in X that can intersect. They have been classified and the corresponding contact terms have been found in [7, Equations (2.8)–(2.12)],

$$\begin{aligned} \begin{aligned} I_\cap&= \int _{S\cap S}T + a_{13} \int _{Y \cap \gamma }T+ a_{32} \int _{Y\cap S} K T + a_{33}\int _{Y \cap Y} K^2 T \\&\quad + a_{332}\int _{S \cap Y \cap Y} \frac{\partial ^3 {\mathcal {F}}}{\partial \tau _0^3} + a_{333} \int _{Y \cap Y \cap Y} K \frac{\partial ^3 {\mathcal {F}}}{\partial \tau _0^3} + a_{3333}\int _{Y \cap Y \cap Y \cap Y}\frac{\partial ^4 {\mathcal {F}}}{\partial \tau _0^4}. \end{aligned}\qquad \end{aligned}$$
(25)

Here \(\tau _0\) is the deformation parameter of the prepotential, related to the dynamical scale by \(\Lambda ^4=e^{\pi \mathring{\imath }\tau _0}\). The coefficient functions can all be expressed as quasi-modular functions on the u-plane. For instance, the contact term for \(S\cap S\) is

$$\begin{aligned} T=\frac{u}{2}-\frac{a}{4}\frac{{\mathrm {du}}}{{\mathrm {da}}}=\frac{\vartheta _2^4+\vartheta _3^4-E_2}{6 \vartheta _2^2 \vartheta _3^2}. \end{aligned}$$
(26)

In terms of the prepotential \({\mathcal {F}}\), it is given by \(T(\tau )=\frac{4}{\pi \mathring{\imath }}\frac{\partial ^2{\mathcal {F}}}{\partial \tau _0^2}\) [32]. It furthermore satisfies the identities [7]

$$\begin{aligned} \begin{aligned} 4\pi \mathring{\imath }\frac{{\mathrm {d}}T}{{\mathrm {d}}a}&=\left( \frac{{\mathrm {d}}^2u}{{\mathrm {d}}a^2}\right) ^2\frac{{\mathrm {d}}a}{{\mathrm {d}}\tau } +\pi \mathring{\imath }\frac{{\mathrm {d}}u}{{\mathrm {d}}a}, \\ \frac{{\mathrm {d}}T}{{\mathrm {d}}a}&=\frac{1}{4}\left( \frac{{\mathrm {d}}u}{{\mathrm {d}}a}-a\frac{{\mathrm {d}}^2u}{{\mathrm {d}}a^2}\right) , \\ \frac{{\mathrm {d}}^2T}{{\mathrm {d}}a^2}&=-\frac{a}{4} \frac{{\mathrm {d}}^3u}{{\mathrm {d}}a^3}, \\ \frac{\partial ^3{\mathcal {F}}}{\partial \tau _0^3}&=-\frac{\pi ^2}{2^4}\left( 2T-a\frac{{\mathrm {d}}T}{{\mathrm {d}}a}\right) . \end{aligned}\end{aligned}$$
(27)

We can use the action (20) to find

$$\begin{aligned} \begin{aligned} KT&= \frac{1}{4\sqrt{2}}\frac{{\mathrm {d}}T}{{\mathrm {d}}a}\psi , \\ K^2T&=\frac{1}{32}\frac{{\mathrm {d}}^2T}{{\mathrm {d}}a^2}\psi \wedge \psi -\frac{1}{2\sqrt{2}} \frac{{\mathrm {d}}T}{{\mathrm {d}}a}(F_-+D). \end{aligned} \end{aligned}$$
(28)

The intersection constants can be obtained from duality invariance [7]

$$\begin{aligned} \begin{aligned}&a_1=\pi ^{-\frac{1}{2}}2^{\frac{3}{4}}e^{-\frac{\pi \mathring{\imath }}{4}},&a_3 =\pi ^{-\frac{3}{2}}2^{\frac{1}{4}}e^{\frac{\pi \mathring{\imath }}{4}}/6, \\&a_{13}=-6\pi ^2 a_1a_3,\quad&a_{32}=-6\sqrt{2} \pi \mathring{\imath }a_3, \quad&a_{33}=-9\pi ^2 a_3^2, \\&a_{332}=-72\sqrt{2} \pi \mathring{\imath }a_3^2, \quad&a_{333}=36\pi ^2 \mathring{\imath }a_3^3, \quad&a_{3333}=-(6\pi )^3 \mathring{\imath }a_3^4. \end{aligned} \end{aligned}$$
(29)

Due to the identity (11), the two last terms in (25) vanish and we can disregard them. Thus, from (25) and (28) we see that all terms in \(I_\cap \) except for one are only integrated over \(\psi \) and \(\tau \), which we do in a later step. The remaining term

$$\begin{aligned} -\frac{\sqrt{2}a_{33}}{4}\frac{{\mathrm {d}}T}{{\mathrm {da}}}B(F_-+D,Y\wedge Y). \end{aligned}$$
(30)

is to be integrated over D, \(\chi \) and \(\eta \).

2.6 \({\mathcal {Q}}\)-exact operators

As we will later see, the photon path integral combines with the insertion of the surface observable to a Siegel–Narain theta function \(\Psi _\mu ^J(\tau ,z)\). See (47) for the definition. This function can be expressed as a total derivative to a non-holomorphic modular completion of an indefinite theta function, as has been previously shown in the simply connected case [10, 12]. To facilitate the calculation further the authors of those papers add the \({\mathcal {Q}}\)-exact operator \(I_S\).Footnote 4 In this section we will generalise this operator insertion to simplify the calculations also in the case of non-simply connected manifolds. This then allows us to evaluate correlation functions efficiently using mock modular forms [10,11,12].

Since our computations should be valid for any \(b_1\ge 0\) and in particular \(b_1=0\), this suggests that it is instructive to add the same \({\mathcal {Q}}\)-exact operator [10, (2.11) and (2.12)]

$$\begin{aligned} \begin{aligned} I_S&=-\frac{1}{4\pi }\int _S\left\{ {\mathcal {Q}},\frac{{\mathrm {d}}{{\bar{u}}}}{{\mathrm {d}}{{\bar{a}}}}\chi \right\} \\&=-\frac{\sqrt{2}\mathring{\imath }}{4\pi } \frac{{\mathrm {d}}^2{\bar{u}}}{{\mathrm {d}}{\bar{a}}^2} \int _S \eta \chi - \frac{\mathring{\imath }}{4\pi }\frac{{\mathrm {d}}{\bar{u}}}{{\mathrm {d}}{\bar{a}}}\int _S (F_+ - D). \end{aligned} \end{aligned}$$
(31)

The u-plane integrand (5) with \(I_S\) inserted can also in the case where \(b_1\ne 0\) be written as an anti-holomorphic derivative. However, it does not give the same kind of Siegel–Narain theta function as in the simply connected case. The reason is that the putative elliptic argument z of \(\Psi _\mu ^J\) does not couple to \(H^2_-(X)\) symmetrically to how its conjugate \({{\bar{z}}}\) couples to \(H^2_+(X)\). The insertion of \(I_S\) in the case \(b_1=0\) can be viewed as the unique correction to the path integral that symmetrises the couplings to \(H^2_\pm (X)\). Without such an insertion, the resulting theta functions are not symmetric, see for instance [3, Equation (3.18)].

As we demonstrate below, for \(b_1\ne 0\) this issue can be cured by introducing additional \({\mathcal {Q}}\)-exact operators. More precisely, the new observables and related contact terms require three new \({\mathcal {Q}}\)-exact terms. The first two

$$\begin{aligned} \begin{aligned} I_Y&=-\frac{3\mathring{\imath }{{\bar{a}}}_3}{16}\int _Y \left[ {\mathcal {Q}},\frac{{\mathrm {d}}^2{{\bar{u}}}}{{\mathrm {d}}{{\bar{a}}}^2}\chi \wedge \psi \right] +\frac{\sqrt{2}}{2^7\pi }\int _X \left\{ {\mathcal {Q}},\frac{{\mathrm {d}}{\bar{\tau }}}{{\mathrm {d}}{{\bar{a}}}}\chi \wedge \psi \wedge \psi \right\} \\&=\frac{3\sqrt{2} {{\bar{a}}}_3}{2^4}\frac{{\mathrm {d}}^3{{\bar{u}}}}{{\mathrm {d}}{{\bar{a}}}^3} B(\eta \chi ,\psi \wedge Y) +\frac{3{{\bar{a}}}_3}{2^4}\frac{{\mathrm {d}}^2{{\bar{u}}} }{{\mathrm {d}}{{\bar{a}}}^2}B(F_+-D,\psi \wedge Y) \\&\quad \,\,\,+\frac{\mathring{\imath }}{2^6\pi }\frac{{\mathrm {d}}^2{\bar{\tau }}}{{\mathrm {d}}{{\bar{a}}}^2} B(\eta \chi ,\psi \wedge \psi ) +\frac{\sqrt{2}\mathring{\imath }}{2^7\pi }\frac{{\mathrm {d}}{\bar{\tau }}}{{\mathrm {d}}{{\bar{a}}}}B(F_+-D,\psi \wedge \psi ) \end{aligned} \end{aligned}$$
(32)

compensate the observables (23). From the collection of contact terms (25), only the one from the intersection \(Y\cap Y\) gives a term (30) that is integrated over D, \(\eta \) and \(\chi \). This term requires the addition of the \({\mathcal {Q}}\)-exact operator

$$\begin{aligned} \begin{aligned} I_{Y\cap Y}&=-\frac{\sqrt{2}\mathring{\imath }{{\bar{a}}}_{33}}{4}\int _{Y\cap Y} \left\{ {\mathcal {Q}},\frac{{\mathrm {d}}{{\bar{T}}}}{{\mathrm {d}}{{\bar{a}}}}\chi \right\} \\&=\frac{{{\bar{a}}}_{33}}{2}\frac{{\mathrm {d}}^2{{\bar{T}}}}{{\mathrm {d}}{{\bar{a}}}^2}B (\eta \chi ,Y\wedge Y)+\frac{\sqrt{2} {{\bar{a}}}_{33}}{4}\frac{{\mathrm {d}}{{\bar{T}}}}{{\mathrm {d}}{{\bar{a}}}}B(F_+-D,Y\wedge Y). \end{aligned} \end{aligned}$$
(33)

We can note that, according to (29), \({{\bar{a}}}_{33}=-a_{33}\). The sum of these additional \({\mathcal {Q}}\)-exact terms can be compactly written as

$$\begin{aligned} I_Y+ I_{Y\cap Y} =-\sqrt{2} \eta B(\chi , \partial _{{{\bar{a}}}} (y{\bar{\omega }}))-y B(F_+-D, {\bar{\omega }}), \end{aligned}$$
(34)

where we introduced the 2-form

$$\begin{aligned} \omega :=\frac{\sqrt{2}\mathring{\imath }}{2^7\pi y}\frac{{\mathrm {d}}\tau }{{\mathrm {d}}a}\psi \wedge \psi -\frac{3a_3}{2^4 y}\frac{{\mathrm {d}}^2u}{{\mathrm {d}}a^2}\psi \wedge Y-\frac{\sqrt{2} a_{33}}{4y}\frac{{\mathrm {d}}T}{{\mathrm {d}}a} Y\wedge Y. \end{aligned}$$
(35)

This 2-form has the property that \(y\omega \) is holomorphic and thus \(y{\bar{\omega }}\) is anti-holomorphic. The form of (32) is derived in Appendix C, where we furthermore show that its one-point function evaluates to zero, such that it is safe to include it into the path integral, following the analysis in [11, 12]. We furthermore find it useful to follow [10] and introduce the notation

$$\begin{aligned} \begin{aligned} \rho = \frac{ S}{2\pi } \frac{{\mathrm {du}}}{{\mathrm {da}}}, \qquad b = \frac{\mathrm{Im}(\rho )}{y}. \end{aligned} \end{aligned}$$
(36)

Anticipating the result as a Siegel–Narain theta function, the elliptic variable will turn out to be \(z=\rho +2\mathring{\imath }y \omega \), which is a 2-form with holomorphic coefficients. In terms of this variable, the sum of all \({\mathcal {Q}}\)-exact insertions (31), (32) and (33) combine nicely as

$$\begin{aligned} \begin{aligned} I(S,Y)&:=I_S+ I_Y+ I_{Y\cap Y}\\&=-\frac{\mathring{\imath }}{2}\left( \sqrt{2} B(\eta \chi ,\partial _{{{\bar{a}}}}{{\bar{z}}})+B(F_+-D,{{\bar{z}}})\right) . \end{aligned} \end{aligned}$$
(37)

It is clear that this is purely anti-holomorphic. The operator I(SY) is then included into the path integral, as in (5).

3 The u-plane integral for \(\pi _1(X) \ne 0\)

The u-plane integral (5) can be expressed as

$$\begin{aligned} Z_u(p,\gamma ,S,Y)=\int [{\mathrm {d}}a{\mathrm {d}}{{\bar{a}}} {\mathrm {d}}\eta {\mathrm {d}}\chi {\mathrm {d}}D]\int _{\mathrm{Pic}(X)}{\mathrm {d}}\psi \, \nu (\tau )\frac{1}{\sqrt{y}} e^{-\int _X{\mathcal {L}}'+I_{\mathcal {O}}+I_\cap +I(S,Y)},\nonumber \\ \end{aligned}$$
(38)

where \(\int _{\mathrm{Pic}(X)}\) denotes a sum over isomorphism classes of line bundles, equivalent to a sum over \(H^2(X,{\mathbb {Z}})\), followed by an integration over \({\mathbb {T}}^{b_1}\).Footnote 5 The \(\psi \) zero modes are tangent to \(\mathrm {Pic}(X)\), so the integral over these modes is understood as the integral of a differential form on \(\mathrm {Pic}(X)\) [3]. At this point let us make a remark. The \({\mathcal {Q}}\)-exact operator I(SY) is not strictly required in order to derive our end result (52). As a matter of fact, as shown in [12] this operator can be added freely as \(\alpha I(S,Y)\), with \(\alpha \) any number.Footnote 6 However, the case of \(\alpha =1\) makes the analysis simpler and more elegant, why we choose to include it.

Let us perform the integrals above in steps, using an economical notation. We integrate first over the auxiliary field D, and then over the fermionic 0- and 2-forms, \(\eta \) and \(\chi \).

3.1 Integration over D, \(\eta \) and \(\chi \)

Using (35) and (36), we can expand the terms in the exponential of (38) that are affected by the integrals over D, \(\eta \) and \(\chi \) as (ignoring the remaining terms for now)

$$\begin{aligned}&-\int _X ({\mathcal {L}}'+a_2K^2u+a_3K^3u)+I(S,Y)-\frac{\sqrt{2}a_{33}}{4} \frac{{\mathrm {d}}T}{{\mathrm {da}}}B(F_-+D,Y\wedge Y)\nonumber \\&\quad =-\pi \mathring{\imath }{\bar{\tau }} k_+^2-\pi \mathring{\imath }\tau k_-^2+\frac{y}{8\pi } D^2-\frac{\sqrt{2}\mathring{\imath }}{4}\frac{{\mathrm {d}}{\bar{\tau }}}{{\mathrm {d}}{{\bar{a}}}}B(\eta \chi ,k_+) -\frac{\sqrt{2}\mathring{\imath }}{16\pi }\frac{{\mathrm {d}}{\bar{\tau }}}{{\mathrm {d}}{{\bar{a}}}}B(\eta \chi ,D) \nonumber \\&\qquad -\frac{\mathring{\imath }}{\sqrt{2}}B(\eta \chi ,\frac{{\mathrm {d}}{\bar{\rho }}}{{\mathrm {d}}{{\bar{a}}}})-2\pi \mathring{\imath }B(k_-,\rho )-2\pi \mathring{\imath }B(k_+,{\bar{\rho }})+y B(D,b_+)\nonumber \\&\qquad +\frac{\sqrt{2}\mathring{\imath }}{2^5} B(\psi \wedge \psi ,\tfrac{{\mathrm {d}}\rho }{{\mathrm {d}}a})-\sqrt{2} \eta B(\chi , \partial _{{{\bar{a}}}} (y{\bar{\omega }}))+4\pi y B(k_-,\omega _-)\nonumber \\&\qquad -4\pi yB(k_+,{\bar{\omega }})\nonumber \\&\qquad +y B(D,\omega _+)+y B(D,{\bar{\omega }}_+). \end{aligned}$$
(39)

At any point we discard terms that vanish identically, such as 4-fermion terms or any instance of (11) such as \(\psi \wedge \psi \wedge \psi \wedge \psi \), \(\psi \wedge \psi \wedge \psi \wedge Y\) or \(\omega \wedge \omega \). The exponential (39) is Gaussian in D with saddle point

$$\begin{aligned} D=\frac{\sqrt{2}\mathring{\imath }}{4y}\frac{{\mathrm {d}}{\bar{\tau }}}{{\mathrm {d}}{{\bar{a}}}}\eta \chi -4\pi (b_++\omega _++{\bar{\omega }}_+). \end{aligned}$$
(40)

This can be found by differentiating (39) with respect to D and setting it to zero. Inserting D in (39) givesFootnote 7

$$\begin{aligned}&+\frac{\sqrt{2}\mathring{\imath }}{2^5} B(\psi \wedge \psi ,\tfrac{{\mathrm {d}}\rho }{{\mathrm {d}}a})-2\pi y (b_++\omega _++{\bar{\omega }}_+)^2-\pi \mathring{\imath }{\bar{\tau }} k_+^2-\pi \mathring{\imath }\tau k_-^2 \nonumber \\&\quad -2\pi \mathring{\imath }B(k_-,\rho )-2\pi \mathring{\imath }B(k_+,{\bar{\rho }})+4\pi y B(k_-,\omega ) -4\pi yB(k_+,{\bar{\omega }}) \nonumber \\&\quad -\frac{\sqrt{2}\mathring{\imath }}{4}\frac{{\mathrm {d}}{\bar{\tau }}}{{\mathrm {d}}{{\bar{a}}}}B(\eta \chi ,k_+-b_+-\omega _+-{\bar{\omega }}_+)-\frac{\mathring{\imath }}{\sqrt{2}}B(\eta \chi , \tfrac{{\mathrm {d}}{\bar{\rho }}_+}{{\mathrm {d}}{{\bar{a}}}}) \nonumber \\&\quad -\sqrt{2} \eta B(\chi , \partial _{{{\bar{a}}}} (y{\bar{\omega }})). \end{aligned}$$
(41)

The third line are the only terms involving \(\eta \) and \(\chi \), which we will integrate over next. Before, we can combine those terms in the expression

$$\begin{aligned} -\frac{\sqrt{2}\mathring{\imath }}{4}\frac{{\mathrm {d}}{\bar{\tau }}}{{\mathrm {d}}{{\bar{a}}}}B\left( \eta \chi ,k-b -\omega +{\bar{\omega }}-4\mathring{\imath }y\partial _{{\bar{\tau }}}{\bar{\omega }}+2\partial _{{\bar{\tau }}}{\bar{\rho }}\right) . \end{aligned}$$
(42)

Integrating over \(\eta \) and \(\chi \), we can rewrite this in a compact way as a total anti-holomorphic derivative times an overall factor that, as we discuss below, cancels with contributions from the rest of the measure,

$$\begin{aligned}&\frac{\sqrt{2}\mathring{\imath }}{4}\frac{{\mathrm {d}}{\bar{\tau }}}{{\mathrm {d}}{{\bar{a}}}}B\left( k-b-\omega +{\bar{\omega }}-4\mathring{\imath }y\partial _{{\bar{\tau }}}{\bar{\omega }}+2\partial _{{\bar{\tau }}}{\bar{\rho }}, {\underline{J}}\right) \nonumber \\&\quad = \sqrt{y} \frac{{\mathrm {d}}{\bar{\tau }}}{{\mathrm {d}}{{\bar{a}}}}\partial _{{\bar{\tau }}} \sqrt{2y}B(k+b+\omega +{\bar{\omega }},{\underline{J}}), \end{aligned}$$
(43)

where \(\partial _{{\bar{\tau }}}\) acts on everything to its right and \({\underline{J}} = J/\sqrt{Q(J)}\in H^2_+(X)\) is the normalised self-dual harmonic form on X. This result follows directly from the identities

$$\begin{aligned} \partial _{{\bar{\tau }}} y=\frac{\mathring{\imath }}{2}, \quad \partial _{{\bar{\tau }}}\sqrt{2y} =\frac{\sqrt{2}\mathring{\imath }}{4\sqrt{y}}, \quad \partial _{{\bar{\tau }}}\frac{1}{y}=\frac{1}{2\mathring{\imath }y^2}, \quad \partial _{{\bar{\tau }}}b=\frac{b-\partial _{{\bar{\tau }}} {\bar{\rho }}}{2\mathring{\imath }y},\quad \partial _{{\bar{\tau }}}\omega =\frac{1}{2\mathring{\imath }y}\omega .\nonumber \\ \end{aligned}$$
(44)

As previously discussed, the photon path integral together with the measure for the zero modes of \(\psi \) contains a sum over all fluxes times a factor of \(1/\sqrt{y}\) and additionally contributes \((-1)^{B(k,K)}\), where K is the canonical class of X [31]. The \(1/\sqrt{y}\) factor is thus absorbed by the \(\sqrt{y}\) on the rhs of (43).

Using the change of variables

$$\begin{aligned} u: \Gamma ^0(4)\backslash \overline{{\mathbb {H}}}\xrightarrow {\sim } \mathbb {CP}^1 \end{aligned}$$
(45)

provided by (10), we can further integrate over \({\mathrm {d}}\tau \wedge {\mathrm {d}}{\bar{\tau }}\) rather than over \({\mathrm {d}}a\wedge {\mathrm {d}}{{\bar{a}}}\). This motivates the definition of the transformed measure

$$\begin{aligned} {\tilde{\nu }} = \nu \frac{{\mathrm {d}}a}{{\mathrm {d}}\tau }, \end{aligned}$$
(46)

such that \({\mathrm {d}}a\wedge {\mathrm {d}}{{\bar{a}}}\,\nu ={\mathrm {d}}\tau \wedge {\mathrm {d}}{\bar{\tau }} \frac{{\mathrm {d}}{{\bar{a}}}}{{\mathrm {d}}{\bar{\tau }}}\,{\tilde{\nu }}\). The factor \(\frac{{\mathrm {d}}{{\bar{a}}}}{{\mathrm {d}}{\bar{\tau }}}\) cancels with the \(\frac{{\mathrm {d}}{\bar{\tau }}}{{\mathrm {d}}{{\bar{a}}}}\) of (43).

3.2 Siegel–Narain theta function

Let us demonstrate that the u-plane integrand for \(\pi _1(X)\ne 0\), as in the simply connected case [10], evaluates to a Siegel–Narain theta function. To this end, let us define

$$\begin{aligned} \begin{aligned} \Psi _{\mu }^J(\tau ,z)=&\,\,e^{-2\pi y\beta ^2_+} \sum _{k\in L+\mu } \partial _{\bar{\tau }}\left( \sqrt{2y}B( k+\beta ,{\underline{J}})\right) \\&\,\, \times (-1)^{B(k,K)} q^{-k_-^2/2}{{\bar{q}}}^{k_+^2/2} e^{-2\pi \mathring{\imath }B(z,k_-)-2\pi \mathring{\imath }B({{\bar{z}}}, k_+)} \end{aligned} \end{aligned}$$
(47)

with \(q=e^{2\pi \mathring{\imath }\tau }\) and \(\beta =\frac{\text {Im}z}{y}\in L\otimes {\mathbb {R}}\), where \(L=H^2(X,{\mathbb {Z}})\).

For the elliptic variable \(z=\rho +2\mathring{\imath }y \omega \), we have \(\beta =b+\omega +{\bar{\omega }}\) (here, we use that \(y\omega \) is holomorphic). Both variables appear naturally in (41) and (43). In fact, we can combine everything to find

$$\begin{aligned} \begin{aligned} Z_u(p,\gamma ,S,Y)=\int \limits _{\Gamma ^0(4)\backslash {\mathbb {H}}} \!\!\!\!\!{\mathrm {d}}\tau \wedge {\mathrm {d}}{\bar{\tau }} \!\!\int \limits _{{\mathbb {T}}^{b_1}}\!\![{\mathrm {d}}\psi ] \,{\tilde{\nu }} \,\Psi _{\mu }^J(\tau ,\rho +2\mathring{\imath }y \omega )e^{I_{\mathcal {O}}'+I_\cap '}. \end{aligned} \end{aligned}$$
(48)

Here,

$$\begin{aligned} I_\cap '=\int _{S\cap S}T+a_{13}\int _{Y\cap \gamma }T+a_{332}\int _{S\cap Y\cap Y}\frac{\partial ^3{\mathcal {F}}}{\partial \tau _0^3}+\frac{a_{32}}{4\sqrt{2}}\frac{{\mathrm {d}}T}{{\mathrm {da}}} \int _{Y\cap S}\psi \end{aligned}$$
(49)

and

$$\begin{aligned} I_{\mathcal {O}}'=2pu+\frac{\sqrt{2}a_1}{8}\frac{{\mathrm {du}}}{{\mathrm {da}}}\int _\gamma \psi +\frac{\sqrt{2}\mathring{\imath }}{2^6\pi }\frac{{\mathrm {d}}^2u}{{\mathrm {d}}a^2}\int _S\psi \wedge \psi , \end{aligned}$$
(50)

are the (holomorphic) remainders of the collections of \(0,\dots ,3\)-form observables and their contact terms that has not yet been integrated over, and we eliminated all terms that do not contribute.

Let us check that (48) is indeed true from the computations in Sect. 3.1. Aside from the \(\psi \wedge \psi \) term, the exponential of the first two lines in (41) immediately combine into the definition (47) with said parameters, \(z=\rho +2\mathring{\imath }y \omega \) and \({{\bar{z}}}={\bar{\rho }}-2\mathring{\imath }y{\bar{\omega }}\). Everything not exponentiated is given by the \({\bar{\tau }}\) derivative term in (43), which precisely gives the derivative term in (47). This proves (48).

The expression (48) generalises the result of the u-plane integral [12, (4.32)] to four-manifolds X with \(b_1(X)>0\) by giving a decomposition of the integrand into a holomorphic and metric-independent measure \({\tilde{\nu }}\, e^{I_{\mathcal {O}}'+I_\cap '}\) and a metric-dependent, non-holomorphic component \(\Psi _{\mu }^J(\tau ,z)\). Therefore, the evaluation techniques of [12] apply. Namely, we can express the integrand of the u-plane integral as an anti-holomorphic derivative,

$$\begin{aligned} \frac{{\mathrm {d}}}{{\mathrm {d}}{\bar{\tau }}}{\widehat{{\mathcal {H}}}}_\mu ^J(\tau ,{\bar{\tau }})={\tilde{\nu }} \,\Psi _{\mu }^J(\tau ,z)e^{I_{\mathcal {O}}'+I_\cap '}. \end{aligned}$$
(51)

The holomorphic exponential \(e^{I_{\mathcal {O}}'+I_\cap '}\) does not affect the anti-holomorphic derivative, and thus, the extension to \(\pi _1(X)\ne 0\) is simply through the elliptic argument \(z=\rho +2\mathring{\imath }y\omega \).

Once \(\widehat{{\mathcal {H}}}_\mu ^J(\tau ,{\bar{\tau }})\) is found, we can use coset representatives of \(\mathrm {SL}(2,{\mathbb {Z}})/ \Gamma ^0(4)\) to map the six images of \({\mathcal {F}}=\mathrm {SL}(2,{\mathbb {Z}})\backslash {\mathbb {H}}\) back to \({\mathcal {F}}\) (see Fig. 1). The regularisation and renormalisation of such integrals originating from insertions of \({\mathcal {Q}}\)-exact operators has been rigorously established in [11], and we review it in Appendix B. This then allows to evaluate the partition function as

$$\begin{aligned} Z_u(p, \gamma ,S,Y)=4\,{\mathcal {I}}_\mu (\tau )\big \vert _{q^0}+{\mathcal {I}}_\mu (-\tfrac{1}{\tau }) \big \vert _{q^0} + {\mathcal {I}}_\mu \left( \tfrac{2\tau -1}{\tau }\right) \big \vert _{q^0}, \end{aligned}$$
(52)

where by \({}\vert _{q^0}\) we denote the \(q^0\) coefficient of the resulting Fourier expansion, and the \(\tau \)-integrand of (48) is given byFootnote 8

$$\begin{aligned} {\mathcal {I}}_\mu (\tau )=\int \limits _{{\mathbb {T}}^{b_1}}[{\mathrm {d}}\psi ] {\widehat{{\mathcal {H}}}}_\mu ^J(\tau ,{\bar{\tau }}). \end{aligned}$$
(53)

The prefactors in (52) can be recognised as the widths of the cusps \(\mathring{\imath }\infty \), 0 and 1 of the modular curve \(\Gamma ^0(4)\backslash {\mathbb {H}}\).

To derive a suitable anti-derivative \(\widehat{{\mathcal {H}}}_\mu ^J(\tau ,{\bar{\tau }})\), it is auxiliary to choose a convenient period point J. The u-plane integral for a different choice \(J'\) is then related to the one for J by a wall-crossing formula, given explicitly in [7]. It is shown in [12] that for convenient choices of J, \(\Psi _\mu ^J(\tau ,z)\) factors into holomorphic and anti-holomorphic terms, and the anti-derivative \({\widehat{{\mathcal {H}}}}_\mu ^J\) can be found for both L even and odd. Furthermore, the u-plane integral can be evaluated using mock modular forms for point observables \(p\in H_0(X)\) and Appell–Lerch sums for surface observables \(z\in H_2(X)\) [12].

In [11] it is furthermore shown that in the above mentioned renormalisation, any \({\mathcal {Q}}\)-exact operator (such as I(SY)) decouples in DW theory. However, it is clear that the insertion of I(SY) crucially changes the integrand, making the Siegel–Narain theta function symmetric. Instead of inserting I(SY), we can contemplate adding \(\alpha I(S,Y)\) for an arbitrary constant \(\alpha \). It was noticed in [12] that the Siegel–Narain theta function \(\Psi _{{\varvec{\mu }},\alpha }^J\) for \(b_1=0\) with the insertion \(\alpha I_S\) remains finite at weak coupling \((\text {Im} \tau \rightarrow \infty )\) if and only if \(\alpha =1\). This can be seen from the exponential prefactor in (47), whose exponent is negative definite if and only if \({{\bar{z}}}\) (which we suppress in the notation) is the complex conjugate of z.

3.3 Single-valuedness of the integrand

An essential requirement, for the consistency of the theory, is that the path integral (48) is single-valued. For this it is advantageous to first change variables in the \(\psi \)-integral as

$$\begin{aligned} \psi '=\psi +\frac{12\pi \mathring{\imath }a_3}{\sqrt{2}}\frac{{\mathrm {d}}a}{{\mathrm {d}}\tau }\frac{{\mathrm {d}}^2u}{{\mathrm {d}}a^2}Y. \end{aligned}$$
(54)

This is because the coefficient function of \(\psi \wedge \psi \) in \(y\omega \) is modular, while the \(\psi \wedge Y\) and \(Y\wedge Y\) coefficients of \(y\omega \) are only quasi-modular. Such shifts (54) leave the measure of \(\int [{\mathrm {d}}\psi ]\) invariant, as \({\mathrm {d}}\psi ={\mathrm {d}}\psi '\). Due to the order of integration in (48), the change of variables (54) is well-defined. Since Y is also Grassmann-odd, \(\psi \) and Y \(\wedge \)-commute. Using (29) and (27), this gives

$$\begin{aligned} \omega =\frac{\sqrt{2}\mathring{\imath }}{2^7\pi y}\frac{{\mathrm {d}}\tau }{{\mathrm {d}}a}\psi '\wedge \psi '+\frac{9\sqrt{2} \pi ^2a_3^2}{16y}\frac{{\mathrm {d}}u}{{\mathrm {d}}a}Y\wedge Y. \end{aligned}$$
(55)

Let us use the notation of Appendix A.2. It is argued in [7] that \(\psi '\) transforms as \((-1,1)^{(1,0)}\). Using (112), one then finds that \(y\omega =(-1,1)^{(-1,0)}\) transforms precisely as \(\rho =(-1,1)^{(-1,0)}\), such that \(z=\rho +2\mathring{\imath }y \omega =(-1,1)^{(-1,0)}\) is a modular form and transforms exactly as in the \(\pi _1(X)=0\) case.

Furthermore, it is auxiliary to define [7, (2.14)]

$$\begin{aligned} S'=S+4\pi \mathring{\imath }y \frac{{\mathrm {da}}}{{\mathrm {du}}}\omega . \end{aligned}$$
(56)

It is well-defined, as \(S'=(1,1)^{(0,0)}\) is fully invariant. In contrast to (54), this is not a change of variables or a redefinition, but rather a substitution to simplify some expressions. For instance, the elliptic variable now reads

$$\begin{aligned} z=\frac{S'}{2\pi }\frac{{\mathrm {du}}}{{\mathrm {da}}}, \end{aligned}$$
(57)

which takes the same form (36) as in the simply connected case.

By incorporating the shift of \(\psi \rightarrow \psi '\) together with (56), we find that the contact terms and observables in (49) and (50) can be written as

$$\begin{aligned} I_{{\mathcal {O}}+\cap }= & {} 2pu+S'^2 T+\frac{\sqrt{2} a_1}{8}\frac{{\mathrm {du}}}{{\mathrm {da}}} \int _\gamma \psi '-3\pi ^2a_1a_3 u\int _\gamma Y+\frac{\sqrt{2} }{32} \frac{{\mathrm {d}}\tau }{{\mathrm {d}}u}u\int _{S'}\psi '\wedge \psi '\nonumber \\&-\frac{3\pi \mathring{\imath }}{8}a_3\frac{{\mathrm {d}}u}{{\mathrm {d}}a}\int _Y S'\wedge \psi '+\frac{3\sqrt{2}}{4}\mathring{\imath }\pi ^3a_3^2\, u \int _{S'}Y\wedge Y. \end{aligned}$$
(58)

All terms but \(S'^2T\) are modular functions with trivial multipliers. Due to (57), the quasi-modular shift of T combines precisely with the one of \(\Psi (\tau ,z)\).

3.3.1 Measure factor

Since \(\Delta \propto \frac{\vartheta _4^8}{\vartheta _2^4\vartheta _3^4}\), \(\frac{{\mathrm {d}}a}{{\mathrm {d}}\tau }=\frac{\pi }{8\mathring{\imath }}\frac{\vartheta _4^8}{\vartheta _2\vartheta _3}\) and \(\frac{{\mathrm {d}}a}{{\mathrm {d}}u}=\frac{1}{2}\vartheta _2\vartheta _3\), from (13) we have that \( \nu \propto \frac{\vartheta _4^\sigma }{(\vartheta _2\vartheta _3)^{2-b_1}}\) and therefore

$$\begin{aligned} {\tilde{\nu }}\propto \frac{\vartheta _4^{8+\sigma }}{(\vartheta _2\vartheta _3)^{3-b_1}}. \end{aligned}$$
(59)

We find that under the generators of \(\Gamma ^0(4)\), \({\tilde{\nu }}=(-1,e^{-\pi \mathring{\imath }\sigma /4})^{(2-\frac{b_2}{2}+b_1,0)}\). For this we have used that \(\sigma +b_2=2\) and that \(b_1\) is even.

We also need to consider the fermion measure. As we have discussed earlier, this comes with an overall factor of \(y^{-\frac{b_1}{2}}\) which gets absorbed by a similar factor coming from the photon partition function. This leaves us with \(\prod _{i=1}^{b_1}dc_i\), which has weight \((-b_1,0)\), since \(\psi \) has weight (1, 0) [31]. So after the integration over D, \(\eta \) and \(\chi \), and after changing integration variables from \(da\wedge d{{\bar{a}}}\) to \({\mathrm {d}}\tau \wedge {\mathrm {d}}{\bar{\tau }}\), the measure of the integral will have weight \((-2-b_1,-2)\), and we thus need the rest of the integrand to have weight \((2+b_1,2)\). Finally, the transformations of the Siegel–Narain theta function \(\Psi _\mu ^J(\tau ,z)\) can be found in Appendix A.3.

The integrand of the u-plane integral (48) reads

$$\begin{aligned} {\mathcal {J}}_\mu ^J={\mathrm {d}}\tau \wedge {\mathrm {d}}{\bar{\tau }} \!\!\int \limits _{{\mathbb {T}}^{b_1}}\!\![{\mathrm {d}}\psi ] \,{\tilde{\nu }} \,\Psi _{\mu }^J(\tau ,z)e^{I_{\mathcal {O}}'+I_\cap '}. \end{aligned}$$
(60)

Since it is integrated over the fundamental domain of \(\Gamma ^0(4)\), in order to check whether the integral is well-defined \({\mathcal {J}}_\mu ^J\) must transform as a modular function for \(\Gamma ^0(4)\) with no phases. In Table 2 we collect the phases and weights of the individual factors as discussed above. This shows that the integral is indeed well-defined.

Table 2 Modular weights and phases of the u-plane integrand (60) under \(\Gamma ^0(4)\) transformations. This proves that \({\mathcal {J}}_\mu ^J(\gamma \tau )={\mathcal {J}}_\mu ^J(\tau )\) for any \(\gamma \in \Gamma ^0(4)\)

4 Computation for product ruled surfaces

As an interesting application of our results we can study the u-plane integral for a four-manifold of the type \(X={\mathbb {C}}{\mathbb {P}}^1\times \Sigma _g\), where \(\Sigma _g\) is a genus g Riemann surface. This is a product ruled surface with \(b_2^+(X)=1\) (see Appendix D.1).Footnote 9 The DW theory for these manifolds was worked out in [7, 15] and we can use these results as a check of our formula. By shrinking the size of the Riemann surface \(\Sigma _g\) we get a topological \(\sigma \)-model, more specifically the topological A-model, on \({\mathbb {C}}{\mathbb {P}}^1\) [13]. By calculating certain correlation functions on both sides, we will be able to make an indirect connection between mock modular forms and the topological \(\sigma \)-model on \({\mathbb {C}}{\mathbb {P}}^1\) in Sect. 5.

The product ruled surfaces that we consider have \(b_1=2g\), \(b_2=2\), \(b_2^+=1\), \(K_X=0\), which in turn means that \(\sigma =0\) and \(\chi =4(1-g)\) [7]. We consider a general period point

$$\begin{aligned} J(\theta )=\frac{1}{\sqrt{2}}\left( e^\theta {[}{\mathbb {C}}{\mathbb {P}}^1]+e^{-\theta }[\Sigma _g]\right) , \end{aligned}$$
(61)

where \([{\mathbb {C}}{\mathbb {P}}^1]\) and \([\Sigma _g]\) are the cohomology classes that generate \(H^2(X,{\mathbb {Z}})\) [7].Footnote 10 For these manifolds we further have that the rational cohomology class W, discussed in Sect. 2.3, is simply given by \(W=[{\mathbb {C}}{\mathbb {P}}^1]\) [27]. The intersection matrix is

$$\begin{aligned} Q=\begin{pmatrix}0&{}1\\ 1&{}0\end{pmatrix}, \end{aligned}$$
(62)

such that indeed \(J(\theta )^2=1\). Natural representatives of \([{\mathbb {C}}{\mathbb {P}}^1]\) and \([\Sigma _g]\) are found by choosing coordinates \(z\in {\mathbb {C}}\) for \([{\mathbb {C}}{\mathbb {P}}^1]\) and representing \([\Sigma _g]\) (for \(g>1\)) as a quotient of the Poincaré disk, \({\mathcal {D}}=\{w: \vert w\vert <1\}\) with a Fuchsian group. This gives [7]

$$\begin{aligned} \begin{aligned} {[}{\mathbb {C}}{\mathbb {P}}^1]&=\frac{\mathring{\imath }}{2\pi }\frac{{\mathrm {d}}z\wedge {\mathrm {d}}{{\bar{z}}}}{(1+\vert z\vert ^2)^2},\\ {[}\Sigma _g]&=\frac{\mathring{\imath }}{2\pi (g-1)}\frac{{\mathrm {d}}w\wedge {\mathrm {d}}{{\bar{w}}}}{(1-\vert w\vert ^2)^2}. \end{aligned} \end{aligned}$$
(63)

The scalar curvature for this metric is \(8\pi (e^\theta -e^{-\theta }(g-1))\). We see that this is positive for \(e^{2\theta }>g-1\), such that we do not get any contributions from the Seiberg–Witten invariants in these chambers. In particular, this is true when the volume of \({\mathbb {C}}{\mathbb {P}}^1\) is small, since this has \(\theta \) large and positive.

The connection to the topological \(\sigma \)-model is made in the chamber where we shrink the volume of \(\Sigma _g\) [13]. For completeness, we will calculate the u-plane integral in both chambers, where either of the factors shrink. The calculations are similar in both cases and we will start with the chamber where the volume of \({\mathbb {C}}{\mathbb {P}}^1\) is small.

From Eq. (13) we find that the measure factor for these manifolds simplifies to

$$\begin{aligned} {\tilde{\nu }} =-\frac{2}{\pi }(2^{7/2}\pi )^{g} \left( \frac{{\mathrm {d}}a}{{\mathrm {d}}u}\right) ^{2(g-1)}\frac{{\mathrm {d}}a}{{\mathrm {d}}\tau }. \end{aligned}$$
(64)

For these manifolds we also have that the \(\Psi _\mu ^J\) of (48) can be written as a total derivative

$$\begin{aligned} \Psi _\mu ^J(\tau ,z)=\partial _{{\bar{\tau }}}{\widehat{\Theta }}_\mu ^{JJ'}, \end{aligned}$$
(65)

of the indefinite theta function [34]

$$\begin{aligned} \begin{aligned} \widehat{\Theta }_{\mu }^{JJ'}(\tau ,z) =&\sum _{k\in L +\mu } \frac{1}{2} \left[ E(\sqrt{2y}B(k+\beta ,{\underline{J}}))-\text {sgn}( \sqrt{2y}B(k+\beta ,J'))\right] \\&\times (-1)^{B(k,K)}q^{-k^2/2}e^{-2\pi \mathring{\imath }B(z,k)}, \end{aligned} \end{aligned}$$
(66)

where \(k^2 = k_+^2+k_-^2\), \(J'\) is a reference vectorFootnote 11 lying in the negative cone such that \(Q(J')<0\), and

$$\begin{aligned} E: {\mathbb {R}}\rightarrow (-1,1), \quad t\mapsto 2\int _0^te^{-\pi x^2}{\mathrm {d}}x \end{aligned}$$
(67)

is a reparametrisation of the error function. See also Appendix A.4 for more details on these indefinite theta functions. This means that we can take as \(\widehat{{\mathcal {H}}}_\mu ^J(\tau ,{\bar{\tau }})\) in (53)

$$\begin{aligned} \widehat{{\mathcal {H}}}_\mu ^J(\tau ,{\bar{\tau }})={\tilde{\nu }} \widehat{\Theta }_{\mu }^{JJ'}(\tau ,z)e^{I'_{\mathcal {O}}+I'_\cap }. \end{aligned}$$
(68)

For the evaluation of the u-plane integral using this \({\widehat{{\mathcal {H}}}}_\mu ^J\), one may replace \({\widehat{\Theta }}_\mu ^{JJ'}\) in (68) after the modular transformations as in (52) with the mock modular form \(\Theta _\mu ^{JJ'}\) defined in Appendix  A.4. This is also in line with the approach in [10].

4.1 Shrinking \({\mathbb {C}}{\mathbb {P}}^1\)

Let us start by analysing the chamber where the volume of \({\mathbb {C}}{\mathbb {P}}^1\) is small. In this chamber we fix the primitive null vector to be \(J'=[{\mathbb {C}}{\mathbb {P}}^1]=W\). Due to (62), with this choice we have that \(B(\psi \wedge \psi ,J' )=0\), and in particular \(B(S',J')= B(S,W)\). As above, we denote \(z=\rho +2\mathring{\imath }y\omega \) and \(\beta =b+\omega +{\bar{\omega }}\). We can introduce the split \(k = m+nW\), with m chosen such that

$$\begin{aligned} \frac{B(m+\beta ,J)}{B(W,J)}\in [0,1). \end{aligned}$$
(69)

With this split the mock modular form \(\Theta _\mu ^{JJ'}\) coming from (68) can be written as

$$\begin{aligned}&\Theta ^{JW}_{\mu }(\tau ,z)=\sum _{n\in {\mathbb {Z}}}\sum _{\begin{array}{c} m\in L+\mu \\ \tfrac{B(m+\beta ,J)}{B(W,J)}\in [0,1) \end{array}}q^{-\frac{m^2}{2}}e^{-2\pi \mathring{\imath }B(z,m)}q^{-nB(W,m)}e^{-2\pi \mathring{\imath }nB(\rho ,W)}\nonumber \\&\qquad \times \frac{1}{2} \left[ \text {sgn}\left( \sqrt{2y}(B(m+\beta ,J)+nB(W,J)\right) -\text {sgn} \left( \sqrt{2y}B(m+\beta ,W)\right) \right] \nonumber \\&\quad =\sum _{\begin{array}{c} m\in L+\mu \\ \tfrac{B(m+b,J)}{B(W,J)}\in [0,1) \end{array}}\frac{q^{-\frac{m^2}{2}}e^{-2\pi \mathring{\imath }B(z,m)}}{1-q^{-B(W,m)}e^{-2\pi \mathring{\imath }B(\rho , W)}}, \end{aligned}$$
(70)

where, in the second equality, we performed the sum over n. This is an Appell–Lerch sum [34]. The u-plane vanishes in chambers where \(w_2(E)\cdot [{\mathbb {C}}{\mathbb {P}}^1]\ne 0\) [3]. This means that we only have solutions for \(w_2(E)=0\) or \(w_2(E)=W\), implying that \(B(\mu ,W)\in {\mathbb {Z}}\). The only solutions for the conditions on m are then \(m=0\) for \(w_2(E)=0\) and \(m=\frac{1}{2} W\) for \(w_2(E)=W\), this means that the contributions from the theta function are

$$\begin{aligned} \begin{aligned} \Theta ^{JW}_0(\tau ,z)=&\frac{1}{1-e^{-2\pi \mathring{\imath }B(\rho ,W)}}, \\ \Theta ^{JW}_{W}(\tau ,z)=&-\frac{e^{-\pi \mathring{\imath }B(\rho ,W)}}{1-e^{-2\pi \mathring{\imath }B(\rho ,W)}}. \end{aligned} \end{aligned}$$
(71)

We note that these are independent of \(\psi \). The u-plane integral in this chamber can now be written as

$$\begin{aligned} Z_{u,\mu }(p,\gamma ,S,Y)=4\left[ \left( \int _{{\mathbb {T}}^{b_1}}[{\mathrm {d}}\psi ]e^{I'_{\mathcal {O}}+I'_\cap } \right) {\tilde{\nu }} \Theta ^{JW}_\mu (\tau ,\rho )\right] _{q^0}, \end{aligned}$$
(72)

with \(\Theta _\mu ^{JW}\) as above. If we only include point and surface observables it is straightforward to do the integral over the torus. The final result is

$$\begin{aligned} Z_{u,\mu }(p,S)={\left\{ \begin{array}{ll}&{}4\left[ \left( \frac{\sqrt{2}\mathring{\imath }}{2^5\pi }\frac{{\mathrm {d}}^2u}{{\mathrm {d}}a^2}s\right) ^ge^{2pu+2stT}{\tilde{\nu }} \frac{1}{1-e^{-\mathring{\imath }\frac{{\mathrm {du}}}{{\mathrm {da}}}s}} \right] _{q^0},\qquad \text {for }\mu =0,\\ -&{}4\left[ \left( \frac{\sqrt{2}\mathring{\imath }}{2^5\pi }\frac{{\mathrm {d}}^2u}{{\mathrm {d}}a^2}s\right) ^ge^{2pu+2stT} {\tilde{\nu }} \frac{e^{-\frac{\mathring{\imath }}{2}\frac{{\mathrm {du}}}{{\mathrm {da}}}{{\mathrm {da}}}s}}{1-e^{-\mathring{\imath }\frac{{\mathrm {du}}}{{\mathrm {da}}}s}}\right] _{q^0},\qquad \text {for }\mu =W, \end{array}\right. }\nonumber \\ \end{aligned}$$
(73)

where we also defined \(S=s[\Sigma _g]+t[{\mathbb {C}}{\mathbb {P}}^1]\).Footnote 12

4.2 Shrinking \(\Sigma _g\)

We now go on to discuss the chamber where we instead shrink the volume of \(\Sigma _g\). For this chamber we pick the primitive null vector to be \(J'=[\Sigma _g]\). The procedure is similar to the above. However, note that now \(B(\psi \wedge \psi ,J')\ne 0\). We start as before by splitting \(k=m+n\Sigma _g\) with m chosen such that

$$\begin{aligned} \frac{B(m+\beta ,J)}{B(\Sigma _g,J)}\in [0,1). \end{aligned}$$
(74)

Let us start by looking at the contribution from infinity. After performing the sum over n we find that the indefinite theta function becomes

$$\begin{aligned} \Theta ^{J,[\Sigma _g]}(\tau ,z)=\sum _{\begin{array}{c} m\in L+\mu \\ \tfrac{B(m+\beta ,J)}{B(\Sigma _g,J)}\in [0,1) \end{array}}\frac{q^{-m^2/2}e^{-2\pi \mathring{\imath }B(z,m)}}{1-q^{-B(\Sigma _g,m)}e^{-2\pi \mathring{\imath }B(z,\Sigma _g)}}. \end{aligned}$$
(75)

This is again an Appell–Lerch sum [34]. Following [15] we now pick \(\omega _2(E)=[{\mathbb {C}}{\mathbb {P}}^1]+\epsilon [\Sigma _g]\), with \(\epsilon =0,1\). For this flux there is no contribution from infinity, as can be seen from the above by realising that there are now no solutions to the conditions on m. We therefore turn to the other cusps.

For the monopole cusp at \(\tau =0\) we can use the formulas in the appendix to define the dual indefinite theta function as

$$\begin{aligned} \Theta ^{J,[\Sigma _g]}_{\mu ,D}(\tau _D,z_D):= & {} \tau ^{-1}e^{\pi \mathring{\imath }\frac{z^2_D}{\tau _D}}\Theta _{\mu }^{J,[\Sigma _g]}(-1/\tau ,z/\tau )\nonumber \\= & {} \Theta _0^{J,[\Sigma _g]}(\tau _D,z_D-\mu ,{{\bar{z}}}-\mu ), \end{aligned}$$
(76)

where we used that \(K_X=0\) and \(b_2(X)=2\) together with the transformation formulas of the appendix. Following the procedure from above, splitting and summing over n, and simplifying by only including point and surface observables, we eventually find that

$$\begin{aligned}&\Theta _0^{J,[\Sigma _g]}(\tau _D,z_D-\mu ,{{\bar{z}}}_D-\mu )=\frac{1}{1-e^{-2 \pi \mathring{\imath }B(z_D-\mu ,\Sigma _g)}}\nonumber \\&\quad =\left( 1+\exp \left[ -2\pi \mathring{\imath }\left( B(\rho _D,\Sigma _g)-\frac{\sqrt{2}}{2^5\pi } \left( \frac{{\mathrm {d}}\tau }{{\mathrm {d}}a}\right) _D\Omega \right) \right] \right) ^{-1}. \end{aligned}$$
(77)

Here we have used that \(B(\mu ,\Sigma _g)=\frac{1}{2}\) and that \(\psi \wedge \psi =2W\otimes \Omega \) together with the explicit expressions for \(\omega \) when only including points and surfaces as observables. We also continue to denote dual functions with a subscript D. The explicit expressions for these are given in the appendix, Eq. (115).

Next, we want to integrate over the torus. If we only write down the parts that are actually dependent on \(\psi \), or equivalently \(\Omega \), the integral over the torus is

$$\begin{aligned} \begin{aligned}&\int _{{\mathbb {T}}^{b_1}}{\mathrm {d}}\psi \exp \left[ \frac{\sqrt{2\mathring{\imath }}}{2^5\pi }\left( \frac{{\mathrm {d}}^2u}{{\mathrm {d}}a^2}\right) _DW\wedge S\otimes \Omega \right] \\&\quad \left( 1+\exp \left[ -2\pi \mathring{\imath }\left( B(\rho _D,\Sigma _g)-\frac{\sqrt{2}}{2^5\pi } \left( \frac{{\mathrm {d}}\tau }{{\mathrm {d}}a}\right) _D\Omega \right) \right] \right) ^{-1}. \end{aligned} \end{aligned}$$
(78)

A neat trick we can use is to realise that

$$\begin{aligned} \frac{1}{1+e^{t+x}}=\frac{1}{1+e^t}+\sum _{n\ge 1}\text {Li}_{-n}(-e^t)\frac{x^n}{n!}, \end{aligned}$$
(79)

where \(\text {Li}_{n}(y)\) is the polylogarithm [15]. Using this and again splitting \(S=s[\Sigma _g]+t[{\mathbb {C}}{\mathbb {P}}^1]\) we find that the integral over the torus evaluates to

$$\begin{aligned} \begin{aligned} \sum _{n=1}^g\left( {\begin{array}{c}g\\ n\end{array}}\right) \text {Li}_{-n}\left( -\exp \left[ -it\left( \frac{{\mathrm {d}}u}{{\mathrm {d}}a} \right) _D\right] \right) \left( \frac{\sqrt{2}\mathring{\imath }}{2^5\pi }\left( \frac{{\mathrm {d}}^2u}{{\mathrm {d}}a^2} \right) _Ds\right) ^{g-n}\left( \frac{\sqrt{2}\mathring{\imath }}{2^4}\left( \frac{{\mathrm {d}}\tau }{{\mathrm {d}}a}\right) _D \right) ^n \end{aligned}\nonumber \\ \end{aligned}$$
(80)

where we dropped the first term coming from (79) since this does not contribute to the u-plane integral (it will give a term whose q-series starts with a positive exponent). Combining this with the other terms in the u-plane integral, we find that the contribution from the cusp at \(\tau =0\) is given by

$$\begin{aligned} Z_{g,\tau =0}^\epsilon&=\Big [\frac{2}{\pi } e^{2pu_D+2st T_D} \sum _{n=1}^g\left( {\begin{array}{c}g\\ n\end{array}}\right) \text {Li}_{-n}\left( -\exp \left[ -it\left( \frac{{\mathrm {d}}u}{{\mathrm {d}}a}\right) _D\right] \right) \nonumber \\&\quad \left( -\frac{\mathring{\imath }}{2} \left( \frac{{\mathrm {d}}a}{{\mathrm {d}}u}\right) _D^2\left( \frac{{\mathrm {d}}^2u}{{\mathrm {d}}a^2} \right) _Ds\right) ^{g-n}\nonumber \\&\quad \times \left( -\mathring{\imath }\pi \left( \frac{{\mathrm {d}}a}{{\mathrm {d}}u}\right) ^2_D \left( \frac{{\mathrm {d}}\tau }{{\mathrm {d}}a}\right) _D \right) ^{n}\left( \frac{{\mathrm {d}}u}{{\mathrm {d}}a}\right) ^2_D\left( \frac{{\mathrm {d}}a}{{\mathrm {d}}\tau }\right) _D \Big ]_{q_D^0}. \end{aligned}$$
(81)

The contribution from the other cusp is easily calculated using the same procedure. The result is

$$\begin{aligned} \begin{aligned} Z_{g,\tau =2}^\epsilon&=\Big [\frac{2\mathring{\imath }}{\pi }(-1)^\epsilon e^{-2pu_D-2st T_D} \sum _{n=1}^g\left( {\begin{array}{c}g\\ n\end{array}}\right) \text {Li}_{-n}\left( -\exp \left[ -t\left( \frac{{\mathrm {d}}u}{{\mathrm {d}}a} \right) _D\right] \right) \\&\quad \left( \frac{\mathring{\imath }}{2} \left( \frac{{\mathrm {da}}}{{\mathrm {du}}}\right) _D^2 \left( \frac{{\mathrm {d}}^2u}{{\mathrm {d}}a^2}\right) _Ds\right) ^{g-n}\\&\quad \times \left( -\pi \left( \frac{{\mathrm {da}}}{{\mathrm {du}}}\right) ^2_D\left( \frac{{\mathrm {d}}\tau }{{\mathrm {da}}}\right) _D \right) ^{n}\left( \frac{{\mathrm {du}}}{{\mathrm {da}}}\right) ^2_D\left( \frac{{\mathrm {da}}}{{\mathrm {d}}\tau }\right) _D \Big ]_{q_D^0}. \end{aligned} \end{aligned}$$
(82)

The full u-plane integral in this chamber is then the sum of these two terms.Footnote 13

4.2.1 Genus one

For \(g=1\) the Seiberg–Witten contributions vanish and the only contributions comes from the u-plane integral [15]. The above expressions can be simplified to

$$\begin{aligned} Z_1^\epsilon :=Z_{1,\tau =0}^\epsilon +Z_{1,\tau =2}^\epsilon = 2\mathring{\imath }\left[ \frac{e^{\mathring{\imath }tf_D+2stT_D+2pu_D}}{\left( 1+e^{\mathring{\imath }tf_D}\right) ^2}+(-1)^\epsilon \frac{e^{tf_D-2stT_D-2pu_D}}{\left( 1+e^{tf_D} \right) ^2}\right] _{q^0},\nonumber \\ \end{aligned}$$
(83)

where we introduced \(f_D=\left( \tfrac{{\mathrm {du}}}{{\mathrm {da}}}\right) _D\) to keep the expressions shorter. We can make various expansions for this. For example, if \(s=t=0\) we get

$$\begin{aligned} \begin{aligned} Z_1^0(p)&=\mathring{\imath }\left( 1+2p^2+\frac{2}{3}p^4+\frac{4}{45}p^6+\frac{2}{315}p^8 +{\mathcal {O}}(p^9)\right) , \\ Z_1^1(p)&=2\mathring{\imath }\left( p+\frac{2}{3}p^3+\frac{2}{15}p^5+\frac{4}{315}p^7+{\mathcal {O}}(p^9)\right) . \end{aligned} \end{aligned}$$
(84)

For \(p=0\) we instead find (expanding in small t)

$$\begin{aligned} \begin{aligned} Z_1^0(s,t)&=\mathring{\imath }\left( 1+\frac{1}{2}s^2t^2-st^3+\frac{1}{24}(16+s^4)t^4 +\frac{1}{6}s^3t^5\right. \\&\quad \left. +\frac{1}{720}s^2(240+s^4)t^6+{\mathcal {O}}(t^7)\right) , \\ Z_1^1(s,t)&=\mathring{\imath }\left( st-t^2+\frac{1}{6}s^3t^3-\frac{1}{2}s^2t^4 +\frac{1}{120}s(80+s^4)t^5\right. \\&\quad \left. -\frac{1}{360}(136+15s^4)t^6+{\mathcal {O}}(t^7)\right) . \end{aligned} \end{aligned}$$
(85)

4.2.2 Genus two

For \(g=2\) we find

$$\begin{aligned} \begin{aligned} Z_2^\epsilon&=\frac{\pi \mathring{\imath }}{2}\Bigg [\left( \frac{{\mathrm {d}}\tau }{{\mathrm {da}}}\right) _D \left( \frac{{\mathrm {da}}}{{\mathrm {du}}}\right) _D^2e^{-2(stT_D+pu_D)} \\&\quad \times \Bigg (-e^{4stT_D+4pu_D}\sec ^2(tf_D/2)\left( a_Ds-\tan (tf_D/2)\right) \\&\quad +(-1)^\epsilon {{\,\mathrm{sech}\,}}^2(tf_D/2)\left( a_Ds-\tanh (tf_D/2)\right) \Bigg )\Bigg ]_{q^0}, \end{aligned} \end{aligned}$$
(86)

where by \(a_D\) we actually mean \(\frac{\mathring{\imath }}{\pi }\left( \frac{{\mathrm {da}}}{{\mathrm {d}}\tau }\right) _D\left( \frac{{\mathrm {d}}^2u}{{\mathrm {d}}a^2}\right) _D\), by use of the relation (114) [35]. For \(s=t=0\) we simply get zero, but for \(p=0\) we get

$$\begin{aligned} \begin{aligned} Z_1^0(s,t)&=\frac{1}{8}s^2t-\frac{1}{8}st^2+\frac{4+s^4}{48}t^3-\frac{1}{48}s^3t^4 +\frac{s^4-40}{960}s^2t^5+\frac{272-3s^4}{2880}st^6+{\mathcal {O}}(t^7), \\ Z_1^1(s,t)&=\frac{1}{8}s-\frac{1}{8}t+\frac{1}{16}s^3t^2-\frac{1}{16}s^2t^3 +\frac{1}{192}s^5t^4-\frac{1}{192}s^4t^5+\frac{s^4-160}{5760}s^3t^6+{\mathcal {O}}(t^7). \end{aligned}\nonumber \\ \end{aligned}$$
(87)

For \(g=2\) there will also be the Seiberg–Witten contributions given by [15, Eq.(3.33)],

$$\begin{aligned} Z_{\text {SW}}^{g=2}(p,s,t)=\frac{1}{32}(-1)^{\epsilon }\left( e^{-2p-st} \sin (2s-2t)-(-1)^{\epsilon }e^{2p+st}\sinh (2s-2t)\right) .\nonumber \\ \end{aligned}$$
(88)

The first few terms in the expansion for small s and t, and \(p=0\), are

$$\begin{aligned} \begin{aligned} Z_{\text {SW}}^{g=2,\epsilon =0}(s,t)&=\left( -\frac{s^3}{12}-\frac{s^7}{630} +{\mathcal {O}}(s^{8})\right) +\left( \frac{s^2}{8}-\frac{s^6}{180}+{\mathcal {O}}(s^8)\right) t\\&\quad +\left( -\frac{s}{8}+\frac{s^5}{120}+{\mathcal {O}}(s^8)\right) t^2+{\mathcal {O}}(t^3), \end{aligned} \end{aligned}$$
(89)

and

$$\begin{aligned} \begin{aligned} Z_{\text {SW}}^{g=2,\epsilon =1}(s,t)&=\left( -\frac{s}{8}-\frac{s^5}{60} +{\mathcal {O}}(s^{8})\right) +\left( \frac{1}{8}+{\mathcal {O}}(s^8)\right) t\\&\quad +\left( \frac{s^3}{48}-\frac{s^7}{2520}+{\mathcal {O}}(s^8)\right) t^2+{\mathcal {O}}(t^3). \end{aligned} \end{aligned}$$
(90)

5 Revisiting the A-model computations

The previous discussion is focused on the low-energy U(1) effective action of DW theory on a generic oriented and non-simply connected four-manifold X, i.e. the u-plane formalism. There were indications that for X a product ruled surface, the correlation functions calculated in the previous section are related to Gromov–Witten invariants [13,14,15, 36,37,38], that correspond to correlation functions of an \({\mathcal {N}}=(2,2)\) topological A-model in two dimensions, at the limit where the volume of one of the factors of X vanishes. The aim of this section is to obtain Gromov–Witten invariants, i.e., values of correlation functions of an \({\mathcal {N}}=(2,2)\) topological A-model in two dimensions, by direct comparison with results obtained from the previous section. There, an explicit calculation was carried out in the case of a product four-manifold, \(X={\mathbb {C}}{\mathbb {P}}^1\times \Sigma _g\) with \(g=2\), where both the u-plane and Seiberg–Witten terms contribute, shown in (87), (89) and (90). These expressions are the ones we shall use to obtain Gromov–Witten invariants.

Using the fact that the twisted \({\mathcal {N}}=2\) gauge theory is topological, we are free to shrink \(\Sigma _g\). We thus obtain an effective 2d theory on \({\mathbb {C}}{\mathbb {P}}^1\): the \({\mathcal {N}}=(2,2)\) topological A-model on worldsheet \({\mathbb {C}}{\mathbb {P}}^1\), with the target space being the moduli space \({\mathcal {M}}_{\mathrm{flat}}(\Sigma _g)\) of flat SU(2) connections on \(\Sigma _g\). As a consequence, flat SU(2) connections along the directions tangent to \(\Sigma _g\) are required to prevent the effective 2d action from blowing up when the limit of small \(\Sigma _g\) is taken. This result is rederived in Appendix E, following [13].

There is, however, a subtle point about the relation of the 2d A-model to both 4d theories, in that the relation should hold only within the limit of \(\Sigma _g \rightarrow 0\). More will be said about this further on. Nevertheless, what we can achieve with this relation are predictions for Gromov–Witten invariants via coefficients from the expansion of a 4d low-energy U(1) effective theory. This also offers an alternative approach in the calculation of Gromov–Witten invariants from 4d theories via physical principles, as illustrated in Fig. 2.

Fig. 2
figure 2

Schematic diagram of the relation between the 4d and 2d theories

We will now proceed to obtain Gromov–Witten invariants in a similar fashion to the steps in the previous sections in obtaining the u-plane integral. The \({\mathcal {N}}=(2,2)\) topologically twisted A-model has the action

$$\begin{aligned} \begin{aligned} S&= \frac{1}{e^2}\int _{ {\mathbb {C}}{\mathbb {P}}^1} \Bigg ( d^{2}z G_{i {\bar{j}}}\Big (\frac{1}{2}\partial _{z}\varphi ^{i} \partial _{{\bar{z}}}\varphi ^{{\bar{j}}} + \frac{1}{2}\partial _{{\bar{z}}}\varphi ^{i} \partial _{z}\varphi ^{{\bar{j}}} + \mathring{\imath }\rho ^{{\bar{j}}}_{z}\nabla _{{\bar{z}}}\chi ^{i} + \mathring{\imath }\rho ^{i}_{{\bar{z}}}\nabla _{z}\chi ^{{\bar{j}}}\Big )\\&\qquad - R_{i{\bar{j}}k{\bar{l}}}\rho ^{i}_{{\bar{z}}} \rho ^{{\bar{j}}}_{z}\chi ^{k}\chi ^{{\bar{l}}}\Bigg ) + \mathring{\imath }\theta \int _{ {\mathbb {C}}{\mathbb {P}}^1} \varphi ^{*}\omega , \end{aligned} \end{aligned}$$
(91)

with z, \({\bar{z}}\) as worldsheet coordinates and \(i, {\bar{i}}\) etc, are coordinates on \({\mathcal {M}}_{\mathrm{flat}}(\Sigma _g)\) for the map \(\varphi : {\mathbb {C}}{\mathbb {P}}^1\rightarrow {\mathcal {M}}_{\mathrm{flat}}(\Sigma _g)\). In Eq. (91), e denotes the gauge coupling and \(\theta \) the instanton theta angle. The last term is a pullback of a Kähler form \(\omega \) that directly descends from the instanton term of \(\int F \wedge F\) in 4d. The bosonic field is the worldsheet scalar \(\varphi \), and fermionic fields are the scalar \(\chi \) and 1-form \(\rho \). The covariant derivative on the worldsheet is defined as \(\nabla _{z}\chi ^{{\bar{i}}}=\partial _{z}\chi ^{{\bar{i}}}+\chi ^{{\bar{j}}} \Gamma _{{\bar{j}}{\bar{k}}}^{{\bar{i}}}\partial _{z}\varphi ^{{\bar{k}}}\) and \( R_{i{\bar{j}}k{\bar{l}}}\) is the Riemann curvature tensor on \({\mathcal {M}}_{\mathrm{flat}}(\Sigma _g)\). The BPS condition of the A-model localises (91) to a moduli space of holomorphic maps

$$\begin{aligned} {\mathcal {M}}_{\text {maps}}({\mathbb {C}}{\mathbb {P}}^1, \beta ) = \{ \varphi : {\mathbb {C}}{\mathbb {P}}^1 \rightarrow {\mathcal {M}}_{\text {flat}}(\Sigma _g) \mid \partial _{{\bar{z}}}\varphi ^{i}=0 \}, \end{aligned}$$
(92)

with the condition coming directly from that of the 4d theory, namely \(F^{+}=0\). Here, \(\beta \) is the homology class of the map \(\varphi \) into the moduli space of flat connections on \(\Sigma _g\):

$$\begin{aligned} \beta = \varphi _{*}[\mathbb {CP}^1] \in H_2\big ({\mathcal {M}}_{\mathrm{flat}}(\Sigma _g),{\mathbb {Z}}\big ). \end{aligned}$$
(93)

The class \(\beta \) can be further indexed as \(\beta _I\) according to the dimension of each stratum of \({\mathcal {M}}_{\mathrm{flat}}\) that is

$$\begin{aligned} \beta _I = \varphi _{*}[\mathbb {CP}^1] \in H_2\big ({\mathcal {M}}_{\mathrm{flat}}^{(I)}(\Sigma _g),{\mathbb {Z}}\big ), \end{aligned}$$
(94)

where \(I = \mathrm {dim}({\mathcal {M}}_{\mathrm{flat}})\).

Since we wish to obtain the Gromov–Witten invariants by comparison with coefficients from (87), (89) and (90) as obtained via calculations in the u-plane from the previous sections, only the dimensionally reduced version of the 4d surface operators on \(\Sigma _g \times {\mathbb {C}}{\mathbb {P}}^1\) as \(S=s[\Sigma _g]+t[{\mathbb {C}}{\mathbb {P}}^1]\) will be considered in this section. Note that surface operator insertions on \(\Sigma _g\) are non-local operators in 4d (on \(\Sigma _g\)), but get reduced to local point operators in 2d on \({\mathbb {C}}{\mathbb {P}}^1\) as \(\Sigma _g \rightarrow 0\).

The surface operator inserted is Tr\(\int _{s} (\psi _{\mu }\psi _{\nu }+\phi F_{\mu \nu }){\mathrm {d}}x^{\mu }\wedge {\mathrm {d}}x^{\nu }\). When inserted on \(S \in \Sigma _g\), it becomes a point operator on \({\mathbb {C}}{\mathbb {P}}^1\), as mentioned:

$$\begin{aligned} \begin{aligned} {\mathcal {O}}^{(0)}&=\text {Tr}\int _{S}\bigg (\psi _{w}\psi _{{\bar{w}}} +\phi F_{w{\bar{w}}} \bigg ){\mathrm {d}}w \wedge {\mathrm {d}}{{\bar{w}}}\\&= \omega _{i{\bar{j}}}\chi ^{i}\chi ^{{\bar{j}}} \in H^{0}({\mathbb {C}}{\mathbb {P}}^1)\otimes \Omega ^{2}({\mathcal {M}}_{\text {maps}}). \end{aligned} \end{aligned}$$
(95)

Here \(F_{w{\bar{w}}}=0\) was used, where w, \({\bar{w}}\) are complex coordinates on \(\Sigma _g\), and \(\omega _{ij}\) is the Kähler form (see Appendix E). Note that \({\mathcal {O}}^{(0)}\) is consistent with the features required for being a point operator on the worldsheet, since it does not contain worldsheet indices. The presence of worldsheet indices requires a contraction with the worldsheet metric \(g_{z{\bar{z}}}\), thereby making the operator \({\mathcal {Q}}\)-exact. Hence, this operator is indeed \({\mathcal {Q}}\)-closed. The ghost number of \({\mathcal {O}}^{(0)}\) is two, reflecting the fact that it is a 2-form on \({\mathcal {M}}_{\text {maps}}\).

On the other hand, when inserted into \(S' \in {\mathbb {C}}{\mathbb {P}}^1\), it remains as a surface operator:

$$\begin{aligned} \begin{aligned} {\mathcal {O}}^{(2)}&= \text {Tr}\int _{S'}\bigg (\psi _{z}\psi _{{\bar{z}}} +\phi F_{z{\bar{z}}} \bigg ){\mathrm {d}}z\wedge {\mathrm {d}}{{\bar{z}}}\\&= \text {Tr}\int _{S'}\bigg (\chi ^{i}\chi ^{{\bar{j}}}\Phi _{i{\bar{j}}}F_{z{\bar{z}}} \bigg ){\mathrm {d}}z\wedge {\mathrm {d}}{{\bar{z}}}\in H^{2}({\mathbb {C}}{\mathbb {P}}^1)\otimes \Omega ^{2}({\mathcal {M}}_{\text {maps}}). \end{aligned} \end{aligned}$$
(96)

Here the \(\psi _{z}, \psi _{{\bar{z}}}\) drop out since they do not survive the reduction, while \(F_{z{\bar{z}}}\) contains the components of the gauge field \(A_{z}\), \(A_{{\bar{z}}}\) on \({\mathbb {C}}{\mathbb {P}}^1\) which are auxiliary fields (see Eq. (187)). The fermionic parts of \(A_{z}\), \(A_{{\bar{z}}}\) do not contribute since there are no \(\rho \) zero modes, to be explained below). Using \(F_{\mu \nu }=\partial _{\mu }A_{\nu }-\partial _{\nu }A_{\mu }+[A_{\mu },A_{\nu }]\), \(F_{z{\bar{z}}}\) can then be written in terms of \(\varphi ^{i}, \varphi ^{{\bar{i}}}\).

Next, we have to look at which fermionic zero modes exist in the 2d theory after dimensional reduction. The self-dual 2-form fermions \(\chi _{\mu \nu }\) descend down to \(\rho ^{i}_{{\bar{z}}}\), \(\rho ^{{\bar{i}}}_{z}\), which are one-forms over \({\mathbb {C}}{\mathbb {P}}^1\). This dimensional reduction is coming from the high energy theory, in which the gauge group SU(2) is still left unbroken. Connections in this regime then remain irreducible and regular [1], and hence, we should not expect \(\rho \) zero modes. The only other fermionic zero modes are from the \(\chi \) fields from the vertex operators, which can be absorbed by the measure of the fermionic zero modes in the path integral. The path integral that generates the GW invariants takes the form

$$\begin{aligned} Z_{\mathrm{GW}}=\sum _{\beta \in H_2({\mathcal {M}}_{\mathrm{flat}})} \int _{\beta } [{\mathcal {D}}\Phi ]\; e^{-S}e^{{\mathcal {O}}^{(0)}+{\mathcal {O}}^{(2)}}, \end{aligned}$$
(97)

where \(\Phi \) represents all fields we integrate over and we also perform a discrete sum over \(\beta \). This is equivalent to summing over the 4d instanton numbers k.

In the evaluation of Eq. (97), all fields will have both zero and fluctuating modes. However, due to the independence of (97) on the coupling, we are free to take the weak coupling limit. The functional integral over the fluctuating modes in the action then equals \(\pm 1\) and zero modes for both bosons and fermions are annihilated in the kinetic terms in the action when we take the quadratic approximation. With this approximation, fluctuating modes in the operators \({\mathcal {O}}^{(0)}\) and \({\mathcal {O}}^{(2)}\) can be suppressed, and we are then left with fields in terms of zero modes only. These shall henceforth be labelled as \({\mathcal {O}}^{(0)}\) and \({\mathcal {O}}^{(2)}\) as well. It is necessary to have fields only in terms of zero modes since both bosonic and fermionic zero modes correspond to tangent vectors in \({\mathcal {M}}_{\text {maps}}\).

The resulting fields should then correspond to differential forms in this moduli space which, when combined together to obtain the correct index for the absorption of fermionic zero modes give us a top form on \( {\mathcal {M}}_{\text {maps}}\) to be integrated over. In particular, recall that the ghost numbers of \({\mathcal {O}}^{(0)}\) and \({\mathcal {O}}^{(2)}\) are two, reflecting their degree as differential forms in \({\mathcal {M}}_{\text {maps}}\). To achieve that, we expand the vertex operators in powers of \({\mathcal {O}}^{(i)}\) from the vertex to soak up the extra zero modes of \(\chi ^{i}\) and \(\chi ^{{\bar{i}}}\) in the measure. We then obtain correlation functions, for each \(\beta \), that localises on \({\mathcal {M}}_{\text {maps}}\). Only the terms which allow for the correct absorption of fermionic zero modes give a nonzero contribution to Eq. (97). In the end, we obtain the usual Gromov–Witten invariants associated with a 2d topological A-model. From the relation in dotted lines in Fig. 2, we are able to conclude, in the limit of small \(\Sigma _g\):

$$\begin{aligned} Z_{\mathrm{GW}}= Z_{u}+Z_{\mathrm{SW}} \end{aligned}$$
(98)

On both sides of Eq. (98), we have generating functions which contain terms that are graded by the instanton numbers. This is because the instanton term in the 4d action also descends down to a corresponding term in the 2d effective action. One can thus identify terms on both sides of (98) and we can then see that modular forms appearing in the u-plane integral can play an indirect (computation facilitating) role in Gromov–Witten invariants for holomorphic maps to the moduli space of flat connections on a Riemann surface.

With regard to wall-crossing, despite the condition of \(b_2^+=1\), where wall-crossing phenomena are expected in \(Z_{u}+Z_{\mathrm{SW}}\), we should not expect to see wall-crossing behaviour for \(Z_{\mathrm{GW}}\). This is due to the fact that in shrinking \(\Sigma _g\), we are restricting ourselves to the chamber of small \(\Sigma _g\) and we should not expect any walls within a chamber, by definition. Hence the relation (98) should only be understood to hold within this particular chamber.

We can make a further comparison of (98) in another way: looking at how the operators \({\mathcal {O}}^{(0)}\) and \({\mathcal {O}}^{(2)}\) in 2d were derived, we see that they come from dimensional reduction of the operators in the four-dimensional high-energy theory. As mentioned, we consider only surface operators on \(\Sigma _g \times {\mathbb {C}}{\mathbb {P}}^1\) as \(S=s[\Sigma _g]+t[{\mathbb {C}}{\mathbb {P}}^1]\). The Gromov–Witten generating functional Eq. (97) with only (4d) surface operators inserted will then be

$$\begin{aligned} Z_{\mathrm{GW}}=\sum _{\beta } \int _{{\mathcal {M}}_{\text {maps}}} [{\mathcal {D}}\Phi ]\; e^{-S_{0}}\;e^{-B(\omega ,\beta )}e^{s{\mathcal {O}}^{(0)}+ t{\mathcal {O}}^{(2)}}, \end{aligned}$$
(99)

where \(S=S_{0}+B(\omega ,\beta )\) and \(B(\omega ,\beta )\) as the instanton contribution to the action.

Expanding the generating function (99), we can then compare Gromov–Witten invariants with \( Z_{u}+Z_{\mathrm{SW}}\) for different powers of s and t. In the genus two caseFootnote 14 where we have \(\varphi : {\mathbb {C}}{\mathbb {P}}^1 \rightarrow {\mathcal {M}}_{\text {flat}}(\Sigma _2)\) and we have to include both the u-plane and Seiberg–Witten contributions, we can compare (99) with (87), (89) and (90). Performing the procedure mentioned above of taking the weak coupling limit and integrating out fluctuating modes in the action, we are left with \({\mathcal {O}}^{(0)}\) and \({\mathcal {O}}^{(2)}\) insertions in the path integral. The operators in the vertex will just be expanded and collected to match the different index numbers for the absorption of the correct number of fermionic zero modes. For example, for a map of index 0, where \(\mathcal {M_{\text {maps}}}={\mathcal {M}}_{\text {flat}}(\Sigma _{2})\), we can have an invariant with the usual point operators that are inserted at \(x_i\in \mathbb {CP}^1\). These are identified with the pullback of \(\omega _i\in H^{*}({\mathcal {M}}_{\text {flat}})\) by the evaluation map \(\text {ev}_i: {\mathcal {M}}_{\text {maps}} \rightarrow {\mathcal {M}}_{\text {flat}}\) at \(x_i\).

In the \(s^3\) term, we have

$$\begin{aligned} \begin{aligned} -\frac{1}{12}&= \int _{\mathcal {M_{\text {maps}}}}[{\mathcal {D}}\chi {\mathcal {D}} \varphi ] \, ({\mathcal {O}}^{(0)})^{3}e^{-B(\omega ,\beta _{6})} \\&= \int _{\mathcal {M_{\text {maps}}}}[{\mathcal {D}}\chi {\mathcal {D}} \varphi ] ( \omega _{i{\bar{j}}})^{3}\chi ^{6}e^{-B(\omega ,\beta _{6})}\\&= e^{-B(\omega ,\beta _{6})}\int _{\mathcal {M_{\text {maps}}}}\text {ev}_{1}^{*} \omega _{1}\wedge \text {ev}_{2}^{*}\omega _{2}\wedge \text {ev}_{3}^{*}\omega _{3} . \end{aligned} \end{aligned}$$
(100)

We can also look at the less commonly studied non-local surface operators. Collecting the \(s^{3}t^2\) terms, we require terms from (99) to have a total of index 10:

$$\begin{aligned} \begin{aligned} \frac{1}{12}&= \int _{\mathcal {M_{\text {maps}}}}[{\mathcal {D}}\chi {\mathcal {D}}\varphi ] \, ({\mathcal {O}}^{(0)})^{3}({\mathcal {O}}^{(2)})^{2}e^{-B(\omega ,\beta _{10})} \\&= \int _{\mathcal {M_{\text {maps}}}} [{\mathcal {D}}\chi {\mathcal {D}}\varphi ] \, \bigg [( \omega _{i{\bar{j}}})^{3}\bigg (\int _{S'}\Phi _{k{\bar{l}}} F_{z{\bar{z}}} {\mathrm {d}}z\wedge {\mathrm {d}}{\bar{z}}\bigg )^{2}\bigg ]\chi ^{10}e^{-B(\omega ,\beta _{10})} . \end{aligned} \end{aligned}$$
(101)

In (100) and (101), \(\beta _{6}\) and \(\beta _{10}\) are the homology classes for terms of index 6 and 10, respectively. We can identify \(\beta _I\) with d, the degree of the map. From [36, 37, 39], the given formula for the index \(I=\text {dim}({\mathcal {M}}_{\text {maps}})\) and degree \(d\ge 0\) of \(\varphi : {\mathbb {C}}{\mathbb {P}}^1 \rightarrow {\mathcal {M}}_{\text {maps}}(\Sigma _2)\) is \(I=6+4d\). This formula relates \(\text {dim}({\mathcal {M}}_{\text {maps}})\) to the instanton number (degree of the map). The example in (101) then corresponds to an invariant \((H^0_{{\mathbb {C}}{\mathbb {P}}^1})^{\otimes 3}\otimes (H^2_{{\mathbb {C}}{\mathbb {P}}^1})^{\otimes 2}\otimes \Omega ^{10}_{{\mathcal {M}}_{\text {maps}}}\) of a degree 1 map. The prescription for comparison is thus simple: since \({\mathcal {O}}^{(0)}\) and \({\mathcal {O}}^{(2)}\) are labelled by s and t, respectively, we just have to insert the relevant number of \({\mathcal {O}}^{(0)}\)’s and \({\mathcal {O}}^{(2)}\)’s based on the corresponding powers in the polynomial.

Hence, for an index 14 term, we can have

$$\begin{aligned} \begin{aligned} -\frac{1}{48}&= \int _{\mathcal {M_{\text {maps}}}} [{\mathcal {D}}\chi {\mathcal {D}}\varphi ] \, ({\mathcal {O}}^{(0)})^{3}({\mathcal {O}}^{(2)})^{4}e^{-B(\omega ,\beta _{14})}, \\ \end{aligned} \end{aligned}$$
(102)

of \((H^0_{{\mathbb {C}}{\mathbb {P}}^1})^{\otimes 3}\otimes (H^2_{{\mathbb {C}}{\mathbb {P}}^1})^{ \otimes 4}\otimes \Omega ^{14}_{{\mathcal {M}}_{\text {maps}}} \) of a degree 2 map. And an index 18 term as

$$\begin{aligned} \begin{aligned} \frac{1}{192}&= \int _{\mathcal {M_{\text {maps}}}} [{\mathcal {D}}\chi {\mathcal {D}}\varphi ] \, ({\mathcal {O}}^{(0)})^{5}({\mathcal {O}}^{(2)})^{4}e^{-B(\omega ,\beta _{18})} \\ \end{aligned} \end{aligned}$$
(103)

for \((H^0_{{\mathbb {C}}{\mathbb {P}}^1})^{\otimes 5}\otimes (H^2_{{\mathbb {C}}{\mathbb {P}}^1})^{\otimes 4}\otimes \Omega ^{18}_{{\mathcal {M}}_{\text {maps}}} \) of a degree 3 map. At first glance, the existence of a negative sign in (102) might be a surprise, since these numbers actually represent values of correlation functions between operators, i.e. scattering amplitudes. The A-model considered, however, is non-unitary [40], implying the existence of negative norm states.

As a consistency check, we can see that the lowest dimension of \(\mathcal {M_{\text {maps}}}\) is 6, which agrees with (87), (89) and (90) since the lowest combined power of s and t is cubic, which have an index of \(I=6\). This is because terms with \(I< 6\) (equivalently, maps of negative degree \(d<0\)) vanish. In fact, a quick examination of the combined powers of s and t of various terms in (87), (89) and (90) show that the index of all terms obey the formula. This thus provides further evidence of having a direct correspondence between values obtained via computations in the 4d low-energy regime from previous sections and that of the 2d A-model.

6 Conclusions

In this paper, we studied the low-energy U(1) path integral of DW theory evaluated on non-simply connected four-manifolds. Following the analysis of [10, 11], we derived the full solution for the correlation functions of the theory in terms of the modular completion of a mock modular form. The result can be readily extended to the case with surface defects [41] or theories with matter hypermultiplets [3, 5, 16, 17, 24, 26, 42, 43] and even class \({\mathcal {S}}\) theories [44, 45], although we leave this for future work.

We also presented a concrete reduction of the theory on \(\mathbb {CP}^1 \times \Sigma _g\) over \(\Sigma _g\), whence we obtained a topological A-model on \(\mathbb {CP}^1\), thereby demonstrating a novel connection between mock modular forms and genus zero Gromov–Witten invariants.

We can also consider four-manifolds of the form \(X=M_3\times M_1\) with suitable topological numbers that allow probing the Coulomb branch. We expect that the mock modular form reformulation of \(Z_u\) can be applied in this case too, whence relations between mock modular forms and topological invariants of 3-manifolds \(M_3\) can be precisely formulated, thereby allowing us to derive results in geometric topology from number theory. We will leave this for future work as well.