Resurgence analysis of 2d Yang-Mills theory on a torus

We study the large $N$ 't Hooft expansion of the partition function of 2d $U(N)$ Yang-Mills theory on a torus. We compute the $1/N$ genus expansion of both the chiral and the full partition function of 2d Yang-Mills using the recursion relation found by Kaneko and Zagier with a slight modification. Then we study the large order behavior of this genus expansion, from which we extract the non-perturbative correction using the resurgence relation. It turns out that the genus expansion is not Borel summable and the coefficient of 1-instanton correction, the so-called Stokes parameter, is pure imaginary. We find that the non-perturbative correction obtained from the resurgence is reproduced from a certain analytic continuation of the grand partition function of a system of non-relativistic fermions on a circle. Our analytic continuation is different from that considered in hep-th/0504221.


Introduction
The holographic large N duality between certain Yang-Mills theory and string theory provides us with an important clue for understanding the still mysterious quantum gravity and the behavior of spacetime at the Planck scale. In particular, in a certain situation some quantities on the Yang-Mills side can be computed exactly at finite N and we expect that one can extract some interesting quantum gravity effects on the string theory side from the analysis of Yang-Mills side.
As discussed in [1], this expectation is realized in a concrete example of the equality between the partition function Z N of 2d U (N ) Yang-Mills theory on a torus and that of four dimensional BPS black holes. The black holes in question appear as bound states of Dbranes wrapping some cycles in a certain local Calabi-Yau threefold. The partition function of the field theory on the branes reduces to that of the 2d Yang-Mills theory due to the supersymmetric localization [1], which in turn is related to the norm-squared |ψ top | 2 of the topological string partition function ψ top according to the OSV conjecture [2]. It is argued in [1] that the factorized structure Z N = |ψ top | 2 of the OSV relation has a natural interpretation as the chiral factorization of 2d Yang-Mills studied by Gross and Taylor [3][4][5] 1 . This factorized structure is also consistent with the existence of two boundaries of AdS 2 spacetime in the near horizon AdS 2 × S 2 geometry of BPS black hole. Also, this factorized structure naturally arises in the free fermion representation of the partition function of 2d Yang-Mills [8], where the two chiral factors correspond to the positive and negative Fermi levels.
It is further argued [1] that this factorization is valid only in the perturbative 1/N expansion and if we include the non-perturbative O(e −N ) effects the exact factorization no longer holds. In the free fermion picture, this corresponds to the entanglement of two Fermi levels at finite N . In [9] an interesting spacetime picture for this failure of factorization was put forward: the non-perturbative O(e −N ) corrections come from multi-center black holes and the 2d Yang-Mills theory is actually dual to a coherent ensemble of black holes. This in particular implies that the partition function of 2d Yang-Mills includes the effect of creation of baby universes on the dual gravity side.
In this paper, we will revisit this problem from the viewpoint of resurgence. According to the theory of resurgence, non-perturbative corrections are encoded in the large order behavior of the perturbative series and one can "decode" the non-perturbative effects from the information of perturbative computation alone (see e.g. [10][11][12] for review of resurgence). For this purpose, we will compute the genus g free energy F g (t) of 2d Yang-Mills theory on T 2 in the large N limit with fixed 't Hooft coupling t. We will consider the 1/N expansion of both the chiral part and the full partition function of 2d Yang-Mills theory on T 2 .
The chiral part of free energy F g (t) is identified as the genus g topological string free energy counting the holomorphic maps from genus g Riemann surface to T 2 , and it has interesting mathematical properties. In particular, as shown in [13,14], F g (t) is a quasimodular form of weight 6g − 6 given by a combination of Eisenstein series. After the first computation of genus-one free energy in [3], F g (t) has been computed up to g = 2 by Douglas in 1993 [15] and up to g = 8 by Rudd in 1994 [16].
In this paper, we have computed F g (t) up to g = 60 using the recursion relation found by Kaneko and Zagier [13] with a slight modification. It turns out that the 1/N expansion of 2d Yang-Mills on T 2 is not Borel summable and there is a pole on the positive real axis on the Borel plane when t > 0. From the large genus behavior of F g (t) we find that the nonperturbative correction scales as e −A(t)/gs where g s denotes the topological string coupling and the "instanton action" A(t) is given by A(t) = t 2 /2. 2 We also find that after including the fluctuation around the 1-instanton e −A(t)/gs n f n (t)g n s , it is proportional to ψ top (t + g s ), i.e., the 1-instanton correction is given by the topological string partition function ψ top (t) with a shift of 't Hooft coupling t → t + g s . 3 Moreover, it turns out that the overall coefficient of 1-1 See e.g. [6,7] for a review of 2d Yang-Mills theory and its large N limit. 2 See also [17][18][19][20] for the study of nonperturbative O(e −N ) effects in 2d Yang-Mills theory. 3 Note that such a shift of t naturally appears as an effect of D-brane insertion [21,22]. instanton, the so-called Stokes parameter, is pure imaginary and this imaginary contribution is exactly canceled by the imaginary part of Borel resummation coming from the contour deformation to avoid the pole on the positive real axis of the Borel plane. Interestingly, we find that the 1-instanton correction obtained from this resurgence analysis is reproduced from a certain analytic continuation of the grand partition function of fermions.
We also study the genus expansion of the full partition function Z N when the topological θ-angle of 2d Yang-Mills is zero. We derive a set of recursion relations that determine the O(g 2n s ) term in the genus expansion and elucidate its modular properties. We then obtain the 1-instanton correction of full partition function from the large order behavior of genus expansion, which we have computed up to n = 60. This is again reproduced from our prescription of the analytic continuation. We find that there appear two types of partition functions in the instanton expansion of Z N at θ = 0, which we denote as Z full (t) and Z full (t). It turns out that Z full (t) is the perturbative part of the 1/N expansion of Z N , while Z full (t) corresponds to the perturbative part of another partition function, Z N . The difference between Z N and Z N is the boundary condition of N free fermions on a circle: these fermions obey periodic boundary condition in Z N , while in Z N they obey anti-periodic boundary condition. In the large N expansion of Z N , on top of the perturbative part Z full (t), we find that Z N receives a 1-instanton correction proportional to Z full (t + g s /2). On the other hand, in the large N expansion of Z N this relation is reversed: Z full (t) is the perturbative part and Z full (t + g s /2) appears as a 1-instanton correction.
In [9] a similar analytic continuation of the grand partition function of fermions was considered in order to rewrite the partition function in the form of a sum of binary branching trees, which was interpreted as the creation of baby universes. Our analytic continuation is different from that in [9]. In particular, the pure imaginary Stokes parameter naturally arises in our prescription and this imaginary contribution is necessary for the cancellation of the non-perturbative ambiguity of Borel resummation. On the other hand, there is no such imaginary contribution in the analytic continuation considered in [9]. We should stress that our prescription of analytic continuation is strongly supported by the explicit computation of the genus expansion up to very high genera and the resurgence analysis of the large genus behavior.
This paper is organized as follows. In section 2, we first review the fact that the partition function of 2d U (N ) Yang-Mills on T 2 is identified as a system of N non-relativistic fermions on a circle. Then we argue that the non-perturbative corrections to the large N expansion of the partition function can be systematically obtained by a certain analytic continuation of the grand partition function of non-relativistic fermions. Along the way, we propose a non-perturbative completion of ψ top . In section 3, we compute the genus expansion of both the chiral partition function ψ top and the full partition function Z N when the θ-angle is zero. We find that the recursion relation of Kaneko and Zagier can be slightly modified so that the modular properties of F g (t) become more transparent. We also write down the recursion relations for the genus expansion of full partition functions Z full and Z full . In section 4, we study the large order behavior of genus expansion numerically, and we extract the 1-instanton correction from this large genus behavior. We find that the 1-instanton correction obtained in this way is consistent with our prescription of analytic continuation considered in section 2. In section 5, we consider the Borel-Padé resummation of the genus expansion. It turns out that the genus expansion is not Borel summable and the imaginary part of lateral Borel resummation is precisely canceled by the imaginary contribution coming from the 1instanton correction. In section 6, we briefly comment on the case of non-zero θ-angle. We show that when θ = π the full partition function is equal to the chiral partition function up to a rescaling of the coupling. We conclude in section 7 with some discussion for future directions. In appendix A we summarize our convention of Jacobi theta functions. In appendix B we present a proof of some nontrivial identities used in the main text. Let us first review the partition function of 2d Yang-Mills on a torus and its connection to topological string. As explained in [1], the worldvolume theory on N D4-branes in the Type IIA theory on a local Calabi-Yau threefold X reduces to the 2d U (N ) Yang-Mills on T 2 thanks to the supersymmetric localization. The N D4-branes in question are wrapping around the total space of O(−m) → T 2 with m being a positive integer. The D4-branes with gauge fluxes threading the worldvolume can be thought of as a bound state of D4, D2, and D0-branes, which in turn can be seen as a black hole in the 4-dimensional spacetime after a compactification of Type IIA theory on the 6-dimensional space X in (2.1). Then the partition function Z N of U (N ) Yang-Mills on T 2 is identified as the partition function Z BH of black hole microstates, which is further related to the partition function ψ top of topological string on X via the OSV conjecture [2] Z N = Z BH = |ψ top | 2 . (2. 2) The topological string coupling g s and the 2d Yang-Mills coupling g YM are related by where A is the area of the torus. It is well-known that the 2d Yang-Mills partition function is given by a sum over U (N ) representations R [23,24] where C 1 (R) and C 2 (R) denote the first and second Casimir of R, respectively, and q is given by q := e −gs . (2.5) The partition function (2.4) has a nice interpretation as a system of N non-relativistic free fermions on a circle [8]. The Casimirs C 1 (R) and C 2 (R) correspond to the total momentum and total energy of N fermions, respectively. A single fermion with momentum p has an energy E = 1 2 p 2 , and the momentum p is quantized by the condition This quantization condition of p has a simple physical interpretation [8]: when a fermion is transported once around the circle it passes through other N − 1 fermions and picks up N − 1 minus signs. This condition (2.6) implies that p is half-integer for even N and integer for odd N . This free fermion picture allows us to write down the partition function as (2.7) In this paper we will assume N is even for simplicity. When N is even, p runs over the half-integers and (2.7) is rewritten as where ϑ 2 denotes the Jacobi theta function (see appendix A for our definition of theta functions). For instance, the partition function of U (2) Yang-Mills is given by We are interested in the behavior of Z N in the large N 't Hooft limit Then the OSV relation (2.2) is expected to hold at least perturbatively in 1/N expansion under the identification of t as the Kähler parameter of the base T 2 of X. The topological string free energy F = log ψ top has a genus expansion in the small g s limit (2.11) and the first two terms are given by Here η(Q) := Q In the relation Z N = ψ top ψ top (2.2), the anti-topological partition function ψ top is obtained from ψ top by reversing the sign of θ in (2.10): (2.14) In this paper we will be mostly focusing on the θ = 0 case, in which the 't Hooft coupling t reduces to We will briefly comment on the non-zero θ case in section 6. The partition function ψ top (t) of topological string also has a simple expression in the free fermion picture. It is given by a formal power series [15] where p runs over positive half-integers and F cl (t) is a polynomial of t From the expression (2.16), we can easily find the small Q expansion of ψ top (t) from which one can extract the Gromov-Witten and Gopakumar-Vafa invariants of X. As observed in [1], the OSV relation Z N = |ψ top | 2 has a natural interpretation as the chiral factorization of the 2d Yang-Mills theory studied by Gross and Taylor [3,4]. This norm-squared form Z N = |ψ top | 2 is in accord with the interpretation of the topological string partition function as a wavefunction [25,26]. Moreover, this is consistent with the black hole picture [1]: the near horizon geometry of 4d charged black hole is AdS 2 × S 2 , and the two boundaries of Lorentzian AdS 2 naturally correspond to the two factors ψ top and ψ top .
However, this relation (2.2) is only schematic; we have to sum over the U (1) charge of representation R Z N = l∈Z ψ top (t + g s l)ψ top (t − g s l) (2.20) which corresponds to the sum over RR fluxes on the topological string side [1]. In [9] it is further argued that this is not the end of the story: the chiral factorization is valid only approximately and if we include the non-perturbative O(e −N ) effects the expansion (2.20) is modified to where C n denotes the Catalan number and ψ top N + in (2.21) is equal to the topological string partition function ψ top (t) with the identification t = N + g s This expansion (2.21) is interpreted in [9] as the creation of baby universes and the Catalan number counts the number of ways that the baby universes are created. This seems to be also consistent with the black hole picture that there is a quantum tunneling from single-center to multi-center black holes [27] due to a peculiar nature of AdS 2 spacetime [28,29]. However, it is not obvious in what sense the expansion (2.21) holds. The Yang-Mills partition function Z N on the left hand side (LHS) of (2.21) is non-perturbatively well-defined while the topological string partition function ψ top on the right hand side (RHS) of (2.21) is only defined perturbatively, and the non-perturbative completion of ψ top still remains as a problem.
In this paper we will propose a non-perturbative completion of ψ top which makes sense at finite N . We will also show that our non-perturbative definition of ψ top is consistent with the large genus behavior of free energy F g (t) and the resurgence analysis.

Non-perturbative completion of ψ top
The expression of ψ top (t) in (2.16) is not non-perturbatively complete per se, since it involves the power series in both q and q −1 and hence the infinite product in (2.16) is not convergent. Here we would like to propose a simple candidate of the non-perturbative completion of ψ top (t).
We start with the free fermion description of the partition function (2.8) where we have set θ = 0 for simplicity. The integrand of (2.24) can be thought of as a grand partition function of fermions Z(x, g s ) := One can naturally decompose this grand partition function into two parts according to the sign of momentum p p>0 (1 + xq 1 2 p 2 ) =: In other words, ψ N + is the canonical partition function of N + fermions with positive momentum, while ψ N − is the canonical partition function of N − fermions with negative momentum. When θ = 0, ψ k and ψ k are actually equal: ψ k = ψ k . If θ = 0 they are related by the sign flip of θ From the obvious relation it follows that the full partition function Z N is decomposed as We propose that ψ N + in (2.26) gives a natural non-perturbative completion of the topological string partition function ψ top N + in (2.23), in the sense that ψ N + is equal to ψ top N + in the asymptotic 1/N + expansion up to exponentially small corrections We should stress that our definition of ψ N + is well-defined at finite N + where ϑ 2 q = ϑ 2 1, q . For instance, the first few terms are given by To see that ψ N + is a non-perturbative completion of ψ top N + , we notice that ψ N + can be also written as which indeed becomes ψ top (t) in (2.16) in the large N + limit. We will also see in the next subsection that the difference between ψ N + and ψ top (t) is indeed exponentially small in the large N + limit. The identification t = N + g s in (2.23) is consistent with the definition of 't Hooft coupling in (2.15) since the sum (2.29) is peaked around N + = N − = 1 2 N and hence the two definition of the 't Hooft parameter agree: t = N + g s = 1 2 N g s . Some comments are in order here: (i) By our definition of ψ N + , the chiral factorization in (2.29) is exact. There are only bi-linear terms of ψ N + in (2.29); there are no multi-linear terms of ψ N + which appeared in the baby universe expansion (2.21) in [9].
(ii) In our expansion (2.29) both sides of the equation are well-defined at finite N .

Analytic continuation
One can systematically compute the non-perturbative O(e −N + ) correction in (2.30) using the technique of generating function as in [9]. For this purpose, we first rewrite the integral representation of ψ N + in (2.31) as Here we have multiplied the integrand of (2.31) by the factor p>0 (1+x −1 q − 1 2 p 2 ) and divided it by the same factor. On the other hand ψ top N + is written as [9] ψ top which can be formally inverted as By expanding the first factor of (2.34) we find that (2.34) becomes In the last equality we have used (2.23). However, the above expansion (2.37) of the denominator of (2.34) is merely a formal expression and φ k is not a well-defined function of q as it stands. We will argue below that we can define φ k by an analytic continuation. To do this, we rewrite (2.37) as For the physical value of string coupling g s > 0, the parameter q = e −gs satisfies |q| < 1, which implies |q −1 | > 1. However, the theta function ϑ 2 (q −1 ) is not well-defined in the region |q −1 | > 1 and it should be defined by a certain analytic continuation. We define ϑ 2 (q −1 ) by using the zeta-function regularization as follows: (2.40) Plugging the value of the zeta-function (2.41) Here, for definiteness we have chosen a branch of the square-root (−1) ζ(0) = i. We will see in section 5 that the existence of the other branch (−1) ζ(0) = −i is related to the Stokes phenomenon. Via this analytic continuation, φ k in (2.37) becomes a well-defined function of q In particular, φ 1 is imaginary and the expansion of ψ N + in (2.38) becomes The second term and the ellipses of (2.44) correspond to the non-perturbative O(e −N + ) correction in (2.30). This can be seen by taking the ratio of the two terms ψ top (t) and ψ top (t + g s ) where we approximated ψ top (t) and ψ top (t + g s ) by their leading terms e F cl (t) and e F cl (t+gs) with F cl (t) given by (2.17). One might think that the appearance of the imaginary term in (2.44) looks strange since ψ N + on the LHS of (2.44) is real. However, as we will see in section 5, the second term of (2.44) is precisely canceled by the imaginary part coming from the Borel resummation of ψ top (t) in accord with the theory of resurgence. A similar expansion of Z N is obtained by plugging the expansion (2.38) into (2.29) Here φ l is not the complex conjugate of φ l but it is defined by φ l (θ) = φ l (−θ). In particular, when θ = 0 they are equal: φ l = φ l . When θ = 0, we can write down another useful expansion of Z N . To do this, let us introduce the perturbative part Z full N of the full partition function Z N in the 1/N expansion Note that Z N can be thought of as a non-perturbative completion of Z full which is an analogue of the relation between ψ N + and ψ top N + in (2.30). One can also show that Z full (t) in (2.48) given by the product over half-integer p is the perturbative part of Z N for both even N and odd N , although it is not so obvious from the definition of Z N in (2.7) with θ = 0. To see this, we notice that Z N can also be written (for both even and odd N ) as where products are over half-integer p and we identify t = 1 2 N g s (i.e. Q = q N/2 ). This indeed becomes Z full (t) in (2.48) in the large N limit. In the rest of this section we will assume N is even for simplicity.
One can systematically compute the non-perturbative O(e −N ) corrections in (2.49) in a similar manner as the expansion of ψ N + in (2.38). It turns out that the non-perturbative corrections in (2.49) involve not only Z full N but also another type of partition function, which we denote by Z full (2.52) One might think that the introduction of Z full (t) seems ad hoc, but it actually has a clear physical interpretation as we mentioned in section 1: it can be regarded as the perturbative part of another partition function which is the partition function of N non-relativistic free fermions on a circle with anti-periodic boundary condition. Here, notice that p ∈ Z for even N and p ∈ Z + 1 2 for odd N . This is in contrast to the case of Z N , in which periodic boundary condition (2.6) is imposed. We should stress that Z full (t) in (2.52) is not the large N limit of Z N with odd N . Now we are ready to consider the expansion of Z N in (2.24). By rewriting (2.24) as (2.54) we find that Z N is written as where Φ k is the expansion coefficient of the first factor of (2.54) while W K comes from the second factor of (2.54) (2.57) As we anticipated, W K is equal to either Z full K or Z full K depending on the parity of K We present a proof of this relation in appendix B. As in the case of φ k appearing in (2.38), Φ k in (2.56) is merely a formal expression and thus we apply our prescription of the analytic continuation (2.41) Finally, the expansion of Z N in (2.55) becomes 4 More explicitly, the first two terms of this expansion read Again, the second term of (2.61) is imaginary but it is exactly canceled by the imaginary part coming from the Borel resummation of the first term of (2.61) as we will see in section 5.
In a similar manner as above, we can find the expansion of Z N . When N is even, (2.53) is written as and this can be expanded in a similar form as (2.55) where W K comes from the last factor of (2.62) (2.64) (2.65) 4 Here, the sum is divided merely for appearances' sake; it should be taken in ascending order of k.
which should be defined by a certain analytic continuation. We define ϑ 3 (q −1 ) by using the zeta-function regularization, in a similar manner as we did for ϑ 2 (q −1 ) in (2.40) Finally, the expansion of Z N in (2.63) becomes and the first two terms of this expansion read To summarize, Z full (t) and Z full (t) are the perturbative part of Z N and Z N , respectively, and Z full (t + k 2 g s ) and Z full (t + k 2 g s ) appear alternatingly as non-perturbative k-instanton corrections in the expansion of Z N (2.60) and Z N (2.69). In other words, each time one instanton is added, Z full and Z full are exchanged and t is shifted with a unit ∆t = g s /2. This reminds us of the effect of adding D-branes discussed in [21,22]. It would be interesting to understand this relation further.

Comparison with Dijkgraaf-Gopakumar-Ooguri-Vafa [9]
Let us compare our expansion (2.46) with the baby universe expansion (2.21) in [9]. In [9], the expansion (2.21) of Z N was obtained starting from the following relation where Z(x, g s ) is defined in (2.25) and ψ top (x) and ψ top (x) are given by (2.72) In [9] it is argued that under a certain analytic continuation Z(x −1 , −g s ) can be identified with Z(x, g s ) (2.73) Solving this relation iteratively, Z N is written as (2.21) and it was interpreted as creation of baby universes in [9]. However, our resurgence analysis suggests that we should consider different analytic continuation (2.41) in order to cancel the non-perturbative ambiguity (imaginary part) in the Borel resummation of ψ top . Our analytic continuation (2.41) is different from that in [9] Z (2.76) In our approach, Z(x −1 , −g s ) corresponds to the denominator appeared in (2.56) which leads to the expansion (2.46). We think that there is no clear justification for the analytic continuation (2.73) used in [9]. On the other hand, our analytic continuation (2.75) is supported by the resurgence analysis as we will see in the rest of this paper.

Genus expansion of partition function
In this section we consider the genus expansion of ψ top , Z full , and Z full . In subsection 3.1 we study the genus expansion of ψ top following the approach of Kaneko and Zagier in [13] with a slight modification. In subsection 3.2 we consider the genus expansion of Z full and Z full . We derive two different methods for obtaining the genus expansion: by using the chiral factorization relation (2.20) or by using recursion relations similar to that of Kaneko and Zagier. We also elucidate the modular properties of Z full and Z full .

Genus expansion of ψ top
We first consider the genus expansion of topological string partition function ψ top (2.11). On general grounds, one can in principle compute the genus g free energy F g (t) recursively by solving the holomorphic anomaly equation [30], up to a holomorphic ambiguity. The holomorphic anomaly equation in the case of 2d Yang-Mills on T 2 was studied in [14,31] 5 . However, it turns out that to compute the genus expansion of ψ top it is more efficient to use a different recursion relation found by Kaneko and Zagier [13]. Their relation determines the higher genus amplitudes completely without holomorphic ambiguity. We also find a slight modification of the recursion relation of [13], which makes the modular property of F g (t) more transparent than the original one in [13].
In this section, we will often use the rescaled topological string partition function ψ(t) and ψ(t) defined by removing the genus-zero (and genus-one) part from ψ top (t) where In other words, ψ(t) and ψ(t) are given by the sum of F g (t) for g ≥ 1 and g ≥ 2, respectively , Now we want to find the genus expansion of ψ(t) From the definition (3.3), one can see that Z top 0 (t) = 1. As we will show below, starting from Z top 0 (t) = 1 we can compute Z top n (t) recursively. Once we know Z top n (t), the genus g free energy F g (t) is obtained from the relation which is easily derived by taking the g s -derivative of the both sides of (3.4). Let us first recall the approach in [13]. By dropping the genus-zero part of ψ top in (2.16), ψ(t) is written as As shown in [13], H(q, Q, z) is related to ψ(t) as Expanding the both sides of (3.8) in g s , it is proved in [13] that F g (t) is a quasi-modular form of weight 6g − 6 for Γ = P SL(2, Z). The relation obtained from (3.8) by expanding in g s can be thought of as a recursion relation for Z top n (t). However, this relation involves the quasi-modular forms of both Γ and Γ 0 (2), 7 and it is not straightforward to see that Z top n (t) is a quasi-modular form of Γ.
It turns out that we can modify the relation (3.8) in such a way that it becomes manifest that Z top n (t) is a quasi-modular form of weight 6n for Γ. To see this, let us introduce a new generating function Ξ(q, Q, z) which is related to ψ(t) as This is just a rescaled version of the original relation (3.8) in [13]. The above relation (3.10) leads to infinitely many relations when expanded in terms of the chemical potential µ = − log z. Here we focus on the linear term in the small µ expansion where K(q, Q) is given by By comparing the small g s expansion of the both sides of (3.12), we can write down a recursion relation for Z top n . Let us first consider the LHS of (3.12). It turns out that it is useful to normalize K(q, Q) by As we will see below, this function plays an important role in the recursion relation of Z top n . Let us introduce h top n and e l as the coefficients in the small g s expansion of K(q, Q) (3.14) Here we suppressed the argument of K(q, Q) for brevity. As we will show below, e l is given by the derivative of Eisenstein series Here B 2k denotes the Bernoulli number and the Eisenstein series E 2k (Q) of weight 2k is defined by and D in (3.15) is a differential operator defined by The derivation of (3.15) is almost parallel to the similar computation of H(q, Q, z) in [13]. Taking the log of K in (3.12)

18)
e l is given by Comparing this with the definition of Eisenstein series in (3.16), we arrive at the expression of e l in (3.15).
On the other hand, the g s -expansion of the RHS of (3.11) is given by RHS of (3.11) = where we have used the identity to even l + m, since the contribution of odd l + m vanishes by the cancellation between p and −p. (3.20) can be further simplified as follows. Introducing the notation D k by and using the relation we can formally perform the summation in (3.20) RHS of (3.11) = η(Q) 2 (3.24) Here it should be understood that D −1 and D 3 act on ψ and 1, respectively. From (3.14) and (3.24), we arrive at our "master equation" for the genus expansion of ψ Finally, comparing the O(g 2n s ) term of (3.25), we arrive at the desired recursion relation of Z top n (t) The explicit form of h top n is obtained from e l in (3.15) by expanding the exponential in (3.14). Now one can easily compute Z top n using our recursion relation (3.26) with the initial condition Z top 0 = 1. We emphasize that our recursion relation (3.26) determines Z top n unambiguously. This is in contrast to the case of the holomorphic anomaly equation that determines the derivative of Z top n : there is an ambiguity in the integration constant which should be fixed by some other conditions. 8 We also note that the g s -expansion of (3.8) originally considered in [13] involves E 2k (Q) and E 2k (Q 1/2 ), while in our case the expansion (3.14) of K involves E 2k (Q) only and E 2k (Q 1/2 ) does not show up. This is the advantage of the use of K over the original H(q, Q, z) in [13] and it is clear from our recursion relation (3.26) that Z top n is written as a combination of E 2k (Q) only.
As is well known, E 2k (Q) (k ≥ 2) is a modular form for Γ of weight 2k in τ = 1 2πi ln Q and thus can be expressed as a polynomial of E 4 (Q) and E 6 (Q). This can be done easily by using the recursion relation (3.29) From our recursion relation (3.26) it is manifest that Z top n is a quasi-modular form of weight 6n for Γ, i.e. it can be expressed as a polynomial of E 2 (Q), E 4 (Q), and E 6 (Q). 8 From the O(µ 0 ) term of (3.10), one can write another relation. After a similar computation as above, we find 0 = Using the relation (D−1 + 1 3 D3)Z top n · 1 = DZ top n , we find the recursion relation without the inhomogeneous term h top n (3.26) which determines the derivative DZ top n . This recursion relation was also considered in [34].
Using the recursion relation (3.26), we have computed Z top n up to n = 60. 9 The first few terms read where we abbreviated E 2k = E 2k (Q). One can check that the genus-g free energy F g (t) obtained from (3.5) reproduces the known result in [15,16].

Genus expansion of Z full and Z full
In this subsection we will compute the genus expansion of the full partition functions Z full (t) (2.48) and Z full (t) (2.52). Throughout this subsection we set θ = 0 for simplicity. We can define the genus-g free energies F g (t), F g (t) of Z full (t), Z full (t) in the usual way The first few terms are found as (3.33) The genus-one free energy in (3.32) can be obtained by setting q = 1 in (2.48) and (2.52). The appearance of Θ, Θ can be also understood from the relation in (2.20), as we will see shortly.
It is convenient to introduce the rescaled partition functions Z(t), Z(t), Z(t), Z(t) by stripping off the genus-zero (and genus-one) pieces in the same way as ψ top in (3.1). More 9 The data of Z top n (n = 1, . . . , 60) are available upon request to the authors. specifically, the rescaled partition functions are given by (see (2.48) and (2.52)) (3.34) We would like to find the g s -expansion of free energy (3.31) as well as the g s -expansion of partition function itself Note that from the definition of Z(t) and Z(t), the O(g 0 s ) term is unity: Z 0 (t) = Z 0 (t) = 1. One way to find the above expansion is to make use of the factorization relation (2.20), which holds exactly at the perturbative level and also the data of Z top n obtained in the last subsection. Note that there is no distinction between ψ top and ψ top when θ = 0. We can rewrite the relation (3.36) in terms of Z(t) and ψ(t) by removing the genus-zero part. By using the relation where D (i) act on the i-th factor of ψ · ψ · Θ. As advertised, Θ in (3.33) naturally arises from the sum over U (1) charges (3.36). We can further rewrite (3.38) by performing the conjugation with respect to the genus-one part where D −1 is defined in (3.22) and D Θ is given by Finally, the coefficient Z n in the g s -expansion of Z in (3.35) is given by We find that Z has a similar expansion as Z Z = (3.42) The O(g 2n s ) term Z n in the g s -expansion (3.35) is then given by where D Θ is defined by There is another way to find Z n and Z n , which is based on a set of recursion relations similar to (3.26). This method also elucidates the modular properties of Z n and Z n . To see this, let us first point out that Z n and Z n have an interesting structure: they are expressed as Z n = X n + (D ln Θ)Y n , Z n = X n + (D ln Θ)Y n , (3.45) with X n , Y n being quasi-modular forms in τ = 1 2πi ln Q of weight 6n, 6n − 2, respectively, for Γ = P SL(2, Z). We will prove this after deriving a set of recursion relations for X n , Y n . Note here that D ln Θ and D ln Θ are not quasi-modular forms for Γ, but rather for the subgroup Γ 0 (4) of Γ. 10 This can be seen directly from their expression appearing in (3.40) and (3.44). Alternatively, one can rewrite them as This expression clarifies the modular anomaly: E 2 is a quasi-modular form (i.e. anomalous) for Γ while Θ 4 and Θ 4 are modular forms (i.e. non-anomalous) for Γ 0 (4). All these are of weight two. Consequently, Z n and Z n are quasi-modular forms of weight 6n for Γ 0 (4). Let us now derive the recursion relations for X n and Y n . We start with the relation between the generating function Ξ in (3.9) and the rescaled partition functions Z, Z in (3.34) This is analogous to (3.10) and is derived in the same way as (3.10) from the definitions of Ξ, Z, and Z. Recall that Ξ is expanded in the chemical potential µ = − log z as Ξ = µK + O(µ 2 ), so that where K is given by (3.12). From these one obtains where K is defined in (3.13).
Let us now plug (3.45) into the above relations and compare the O(g 2n s ) parts. After a bit of algebra, one obtains where we have introduced

55)
and h n in (3.53) is obtained from e l in (3.15) by the relation (3.56) The above relations, together with the initial data We are now in a position to prove that X n , Y n are quasi-modular forms for Γ. First, it is obvious from the relation (3.56) that h n is a quasi-modular form of weight 6n. Next, notice that a i,j can also be obtained from the relation

(3.58)
From this it is clear that a i,j is a quasi-modular form of weight 2i + 2j − 2. Third, if A n is a quasi-modular form of weight n, D −2 A n = (D − 1 12 E 2 )A n is a quasi-modular form of weight n + 2. Hence, the recursion relations (3.53), (3.54) ensure that X n , Y n are quasi-modular forms of weight 6n, 6n − 2, respectively. First few h n and a i,j read Note that by definition a i,j = −a j,i . Then, first few of X n , Y n are obtained as We have computed X n and Y n up to n = 60. Plugging these into (3.45) one obtains corresponding Z n and Z n . Once we know Z n and Z n , the genus g free energies F g and F g are obtained from the relation similar to (3.5).

Large order behavior
In this section we will study the large order behavior of the genus expansion coefficients Z top n , Z n and Z n . According to the theory of resurgence, non-perturbative corrections are encoded in the large order behavior of the perturbative series. This means that one can "decode" the non-perturbative effects from the information of perturbative computation alone. We will first perform this analysis using the exact forms of Z top n , Z n and Z n up to n = 60 obtained in the last section. On the other hand, by adopting a certain analytic continuation we have obtained in section 2 the all-order instanton corrections to the perturbative partition functions ψ top , Z full and Z full . Based on these results, it is in fact possible to derive analytically the large order behavior of Z top n , Z n and Z n . We will also do this and make a comparison with the results of the former analysis.
Let us first consider the large order behavior of Z top n studied in section 3.1. 11 Following [35], we write the partition function with 1-instanton contribution as For a genus expansion of closed string theory, it is expected that the 1-instanton correction takes the form We can set f 0 (t) = 1 without loss of generality. Here we have removed the contribution of genus-zero and genus-one pieces ψ 01 (t) in (3.2) since we are considering the asymptotic behavior of Z top n in the g s -expansion of ψ in (3.4). As argued in [35], 1-instanton correction is encoded in the large order behavior of the perturbative part Following the procedure in [35], one can extract b, A(t), µ(t), f n (t) by constructing some sequence. In the first step, we consider the following sequence , (m = 1, 2, . . .).
(4.4) 11 In this paper we study the large order behavior of Z top n rather than that of the free energy Fg, simply because the analysis of the former is simpler. One could study the latter in the same way.

From the asymptotic behavior of Z top m (t) in (4.3), one can see that A m (t) approaches A(t) as m increases
A m (t) = A(t) + O(m −1 ), (4.5) and A(t) can be determined from the large m behavior of A m (t). Once we obtain A(t), we next define the sequence from which we obtain the constant b. Then one can extract µ(t) from the sequence In the same way, one can extract f n (t) by successively defining some sequence. More specifically, given the forms of b, A(t), µ(t) and f k (t) with k < n, one can extract f n (t) from the sequence In the numerical study of the asymptotic behavior of a sequence, such as A m (t) in (4.4), one can use the standard technique of Richardson extrapolation which accelerates the convergence of sequence towards the leading asymptotics. Given a sequence {S m } m=1,2,... By the above described method with the data of Z top m (m ≤ 60), we find (4.11) As shown in Figure 1, the data of A 59 (t) and µ 60 (t) are already accurate enough to estimate the analytic forms. The value of b is also easily determined by the first Richardson transforms     of b m (t). Figure 2 shows the plots of sequences A m , b m , µ m and their Richardson transforms at fixed t (we set t = 1). As one can see, the Richardson transform drastically improves the convergence of the sequence. In fact, we have computed the tenth Richardson transforms A 50 (t) for t = 1, 2, 3, 4, 5, 6 and verified that their deviations from the analytic forms (4.11) are within ±10 −10 %.
Since A(t) in (4.11) is positive for t > 0, the asymptotic behavior of Z top m (t) in (4.3) is non-alternating, i.e. there is no alternating sign (−1) m in the large m behavior of Z top m (t). It follows that the genus expansion of ψ top (t) is not Borel summable and the instanton action A(t) appears as a pole on the positive real axis of the Borel plane. We can avoid the pole by the so-called the lateral Borel resummation, which will be studied in the next section.
In section 2 we have obtained the all-order instanton corrections to the perturbative partition function ψ top (t) by adopting a certain analytic continuation. That is, we actually know the 1-instanton amplitude and hence from this we can derive the exact forms of b, A(t), µ(t), f n (t). Comparing (4.1) with (2.44) we expect that 1-instanton correction for ψ top (t) is given by where we have evaluated ϑ 2 (q) at the leading order in the small g s expansion, discarding the non-perturbative O(e −2π 2 /gs ) terms Then ψ 1-inst (t) in (4.2) becomes (4.14) Let us take a closer look at the ratio of ψ 01 in (4.14). For the genus-zero part, using the expression of F 0 (t) = −t 3 /6 in (2.12) we find (4.15) One can already see the appearance of the instanton factor e −A(t)/gs with the instanton action A(t) = t 2 /2 obtained numerically in (4.11). Including the contribution of genus-one part F 1 (t) in (2.12), the ratio of ψ 01 becomes 12 Finally, plugging the expansion (3.4) into the last factor ψ(t + g s ) of (4.14), ψ 1-inst (t) becomes Comparing (4.2) and (4.18), one can indeed derive analytically the explicit forms of b, A(t) and µ(t) that we have previously estimated numerically in (4.11)! Moreover, the analytic form of f n (t) is found from  Using the relation we find that f n is written as Namely, the fluctuation coefficient f n around the 1-instanton factor e −A(t)/gs in (4.2) is completely determined by the information of perturbative part Z top n . From (4.22), one can easily compute the analytic form of f n and the first few terms read (4.23) We have numerically verified the above obtained exact forms of f n against the sequences f n,m in (4.8) based on the data of Z top m . As one can see in Figure 3, the analytic expressions of f n (t) (n = 1, 2, 3) are in good agreement with the asymptotic sequences f n,60 (t) and their first Richardson transforms. In Figure 4, we plot the absolute value of the relative deviation of f n,m and set m = 58. The deviation grows as n increases, but the error at n = 40 is still within ±0.4%, ±0.04% for t = 4, 5 respectively. These results give a strong support for our proposal of the nonperturbative completion of the topological string partition function as well as the prescription of analytic continuation we adopted in section 2.
Next, let us consider the large order behavior of Z m (t). We expect that Z m (t) for large m behave as In the same way as above, we can numerically determine A(t), b and m(t) from the asymptotic behavior of some sequence, such as (4.4) with Z top m (t) replaced by Z m (t). The result of this numerical analysis is This is again derived analytically from the expansion (2.61) using the approximation of ϑ 2 (q) in (4.13). The analytic form of the 1-instanton correction obtained from (2.61) is given by For instance, one can see that the instanton action A(t) is reproduced from the genus-zero part F 0 (t) = F 0 (t) = −t 3 /3 in (3.32) (4.28) One can also show that m(t) is reproduced from (4.27) after including the contribution of genus-one part in (3.32). Moreover, the analytic form of f n is also obtained from (4.27) where we have absorbed the last term −g s /24 of (4.28) into η 1/24 defined in (4.17), as we did for ψ 1-inst in (4.18). More explicitly, f n is written as where D Θ is given by (3.44) and D −2,1/24 is defined in (4.21). We have also checked numerically that (4.30) is consistent with the large order behavior of Z m (t) in (4.25). We can repeat the same analysis for the large order behavior of Z m (t) and compare with the analytic expression of 1-instanton in (2.70). The result is similar to the case of Z m (t) above, so we will be brief. We find that the large m behavior of Z m (t) is given by 32) and the fluctuation coefficientf n around 1-instanton is given by (t + g s /2) 2 From thisf n is written as where D Θ is defined in (3.40).

Borel-Padé resummation
In this section, we consider the Borel resummation of the perturbative expansion of ψ top , Z full , and Z full . We will see that the result is consistent with our analytic continuation of ψ N + in (2.44), Z N in (2.61), and Z N in (2.70). Let us first consider the genus expansion of ψ top (t) As we have seen in the previous section, this expansion is not Borel summable and the Borel transform has a pole on the positive real axis on the Borel plane. However, we can avoid the pole by deforming the integration contour slightly above or below the real axis. This is known as the lateral Borel resummation S ± In the numerical analysis, the integrand can be approximated by the Padé approximation In the following analysis we set n max = 60. We expect that the lateral Borel resummation of ψ top (t = N g s ) is related to its nonperturbative completion ψ N via the relation (2.44) where we have used the approximation of ϑ 2 (q) in (4.13) in the last step. It turns out that the two branches of the square-root (−1) ζ(0) = ±i mentioned below (2.41) should be correlated with the two choices of the lateral Borel resummation S ± This ensures that the imaginary part of the RHS of (2.44) is canceled at the 1-instanton level Im S ± ψ top (t) ∓ i 2 ϑ 2 (q)S ± ψ top (t + g s ) = 0, (5.6) and in total the RHS of (2.44) becomes real. This should be the case since ψ N on the LHS of (2.44) is manifestly real for g s > 0. We can numerically evaluate S ± (ψ top ) on the LHS of (5.5) by the Borel-Padé approximation and see if it agrees with the RHS of (5.5). We numerically observed that most of the poles of the Padé approximant (5.3) are located on the real axis at x A(t) = t 2 /2 and there are few other poles away from the real axis. To avoid the poles on the real axis, we take the integration contour for S + as the union of two line segments: where ε is a small positive number. 13 From Figure 5, one can see that the lateral Borel resummation nicely reproduces not only the real part but also the imaginary part of (5.5), i.e. the 1-instanton contribution. Figure 6 shows the relative deviations 13 We set ε = 1/50 in the numerical integration in Figure 5, 7 and 9, but we observe that the results are rather insensitive to the value of ε as long as the integration contour does not hit the poles away from the real axis.
at g s = 1. As one can see, the relative deviation of the real part |∆ Re | decreases exponentially as N increases. On the other hand, the relative deviation of the imaginary part |∆ Im | decreases for small N but it no longer decreases for N > 7. One may also notice an "inflection point" at N = 7, 6 in the plots of |∆ Re |, |∆ Im | respectively. Currently we do not understand why this happens, but we expect that this is merely an artifact of our numerical analysis. We can consider the lateral Borel resummation of full partition functions Z full and Z full  as well From the expansion of Z N in (2.61) and Z N in (2.70), we expect that at the 1-instanton level  the lateral Borel resummation of full partition function is approximately given by Again, we can test this relation by evaluating the LHS numerically using the Borel-Padé approximation. Figure 7 and Figure 9 show the real and the imaginary parts of S + (Z full ) and S + ( Z full ) at g s = 2, respectively, while Figure 8 and Figure 10 represent the relative deviation from the expected behavior on the RHS of (5.9). From these figures, one can clearly see that the lateral Borel resummation S + (Z full ) and S + ( Z full ) correctly reproduce the finite N result −p F p F + 1 p F Figure 11. Maya diagram for the ground state. The black nodes (|p| ≤ p F ) are occupied by fermions while the gray nodes (|p| > p F ) are empty. on the RHS of (5.9). This numerical result strongly supports our prescription of analytic continuation (2.61) and (2.70) for the full partition functions.

Comment on θ = 0
In the previous sections we have assumed θ = 0. In this section we will consider the partition function Z N with non-zero θ given by (2.8). As shown in (2.10), when θ is non-zero the 't Hooft coupling t becomes complex and θ appears as the imaginary part of t. For the general θ = 0 case, one can study the large N expansion of Z N using the free fermion picture where E and P denote the total energy and total momentum of N fermions From this expression (6.1) one can show that Z N is invariant under θ → −θ and θ → θ + 2π. As discussed around (2.18), the ground state corresponds to the configuration of fermions where the modes between p = −p F and p = +p F are occupied, with the "Fermi momentum" p F being Now it is convenient to use the so-called Maya diagram to represent the configuration of fermions, as shown in Figure 11 and Figure 12. In this diagram, the black nodes are occupied by fermions while the gray nodes are empty. The configuration in Figure 11 represents the ground state while Figure 12 is an example of excited states. The energy and the momentum of the states (a) and (b) in Figure 12 can be easily found as (a) : where E 0 is the ground state energy (2.18), and their contributions to the partition function are given by There are two more states with the same energy, obtained by changing the sign of momenta p i → −p i in Figure 12. In this manner, we can systematically find the expansion of partition function as Z N = q E 0 1 + (e iθ + e −iθ + e iN θ + e −iN θ )q N 2 + · · · . (6.6) where we assumed N = 2M is an even integer. When θ = π, the summation over is non-vanishing only for even . Then, by setting = 2k we find = ψ M (2g s , θ = 0). (6.10) Namely, the full partition function at θ = π is equal to the chiral partition function at θ = 0 with rescaled string coupling g s → 2g s . More generally, we expect that when θ/π is a rational number the partition function Z N (g s , θ) has a simple large N expansion. We leave the study of rational θ/π case as an interesting future problem.

Discussions
In this paper we have considered the non-perturbative O(e −N ) correction in the 1/N expansion of 2d Yang-Mills theory on T 2 , which in turn is related to the topological string on a local Calabi-Yau threefold X (2.1) via the OSV conjecture (2.2). We proposed a non-perturbative completion ψ N + of the topological string partition function ψ top (t), as a partition function of N + fermions with positive momentum. We emphasize that our non-perturbative completion ψ N + of ψ top (t) makes sense at finite N + . We have also studied the large genus behavior of the g s -expansion of ψ top (t) and confirmed that it is consistent with our analytic continuation of the formal expansion of ψ N + (2.44). In particular, the 1-instanton coefficient is imaginary and it is precisely canceled by the imaginary part coming from the Borel resummation of ψ top (t) in accord with the theory of resurgence. We have also studied the genus expansion of the full partition functions Z full in (2.48) and Z full in (2.52) when θ = 0. Again, it is consistent with our analytic continuation of the expansion of Z N in (2.61) andZ N in (2.70). We should stress that our analytic continuation is different from that in [9] and ours is supported by the resurgence analysis as we mentioned above. However, our analysis was limited to the 1-instanton level and it would be very interesting to study the higher instanton corrections.
There are several open questions. Of particular interest is the implication of our findings to the black hole physics. In [9] the expansion (2.21) of Yang-Mills partition function Z N was considered based on a certain analytic continuation (2.73), and it was interpreted as the creation of baby universes. However, our resurgent analysis strongly suggests that we should consider a different analytic continuation. Moreover, by our definition of non-perturbative completion of ψ top (t) the chiral factorization is exact (2.29). From these observations, it is tempting to conclude that the creation of baby universes is an artifact of the semi-classical expansion and in the full non-perturbative set-up such a process is not included in the partition function of 2d Yang-Mills theory. It is very important to confirm or refute this conjecture by a further analysis of 2d Yang-Mills theory or other models. For instance, it would be interesting to study the large N behavior of 2d Yang-Mills theory on higher genus Riemann surfaces, where the creation of baby universes is also argued to occur [36].
Another important problem is the more precise understanding of the OSV conjecture (2.2) in the case of 2d Yang-Mills on T 2 (see [37] for a review of the status of the OSV conjecture). It is expected that the black hole partition function in this case has the form where Ω(N, N 2 , N 0 ) denotes the number (or index) of BPS bound states with D4, D2, and D0 charges being (N, N 2 , N 0 ). We expect that log Ω(N, N 2 , N 0 ) reproduces the entropy of black hole made of the D-brane bound states. However, the exact Yang-Mills partition function Z N does not have this form (7.1). For instance, after performing the modular S-transformation of Jacobi theta functions, the exact partition function for N = 2 in (2.9) is rewritten as (7. 2) The factor e −θ 2 /gs is common for the two terms and it can be removed by the overall normalization of the partition function. However, the coefficient of the two terms in (7.2) have different power of g s which cannot be removed by a simple rescaling of Z 2 . This is not consistent with the expansion of black hole partition function (7.1) if we assume that Ω(N, N 2 , N 0 ) is a g s -independent pure number. In [38][39][40] it was proposed that only the first term of (7.2), or more generally ϑ 2 (e iθ , q) N term in Z N for general N , should be compared with the black hole partition function (7.1). However, it is not clear whether this definition of Z BH correctly reproduces the BPS degeneracy Ω(N, N 2 , N 0 ). It would be very interesting to clarify the precise dictionary between the Yang-Mills partition function Z N and the black hole partition function (7.1).
Also, it would be interesting to study the analytic structure of ψ top (t) as we change the phase of t. In this paper we mainly considered the case t > 0 and analyzed the Borel resummation of ψ top (t) assuming t > 0. In general, it is expected that the complex t-plane is divided into several sectors and the asymptotic expansion of ψ top (t) takes different form in each sector. Due to the quasi-modularity of F g (t), one can restrict τ = it/2π to be in the fundamental region of SL(2, Z) on the upper-half τ -plane. It would be very interesting to understand how this fundamental region of SL(2, Z) is divided into sectors with different asymptotic expansion of ψ top (t). authors (KO) at the Chubu Summer School 2017 supported by the Yukawa Institute for Theoretical Physics, and in the seminar at Rikkyo University on April 25, 2018. This work was supported in part by JSPS KAKENHI Grant Nos. 26400257 and 16K05316, and JSPS Japan-Russia Research Cooperative Program.