S-duality and the prepotential in N=2* theories (II): the non-simply laced algebras

We derive a modular anomaly equation satisfied by the prepotential of the N=2* supersymmetric theories with non-simply laced gauge algebras, including the classical B and C infinite series and the exceptional F4 and G2 cases. This equation determines the exact prepotential recursively in an expansion for small mass in terms of quasi-modular forms of the S-duality group. We also discuss the behaviour of these theories under S-duality and show that the prepotential of the SO(2r+1) theory is mapped to that of the Sp(2r) theory and viceversa, while the exceptional F4 and G2 theories are mapped into themselves (up to a rotation of the roots) in analogy with what happens for the N=4 supersymmetric theories. These results extend the analysis for the simply laced groups presented in a companion paper.


Introduction
In a companion paper [1] we have studied N = 2 ⋆ super Yang-Mills theories with gauge groups of ADE type, generalizing and extending results that were previously obtained for SU (2) and SU(N ) gauge groups [2] - [6]. The N = 2 ⋆ theories possess eight supercharges and interpolate between the N = 4 and the pure N = 2 super Yang-Mills theories. Their low-energy effective dynamics is encoded in the prepotential F which can be conveniently organized as an expansion in even powers of the mass m of the matter hypermultiplet.
Given that F has mass-dimension two and that the only other dimensionful parameter available in the model is the vacuum expectation value a of the scalar field in the gauge vector multiplet, each term of the prepotential at order 2n in the mass must be accompanied by a function of a with mass-dimension (2 − 2n). These functions of a turn out to be nicely written as sums over the root lattice of the gauge algebra. Thus the prepotential always maintains the same form for all ADE algebras since what changes from case to case is only the explicit expression of the roots. The coefficients in front of these lattice sums are universal functions of the gauge coupling constant and receive both perturbative contributions at 1-loop and non-perturbative corrections due to instantons. Actually, all these contributions can be resummed into exact functions of the gauge coupling that are built out of the Eisenstein series, including the second Eisenstein series E 2 which has an "anomalous" behaviour under the modular transformations of Sl (2, Z). The presence of E 2 leads to a modular anomaly equation which can be put in the form of a recursion relation for the coefficients of the mass expansion of the prepotential and encodes all information implied by S-duality [1] 1 .
In this paper we extend and generalize these results to N = 2 ⋆ theories with non-simply laced gauge algebras g ∈ {B r , C r , F 4 , G 2 }. The presence of long and short roots in these algebras implies several important differences with respect to the ADE case, even if the overall picture remains similar. In particular, the notion of S-duality, originally formulated in [8] - [13] for the N = 4 theories, can be also extended to the N = 2 ⋆ models with non-simply laced gauge algebras where the strong/weak coupling symmetry requirement takes the form of a relation between the S-dual prepotential and the Legendre transform of its dual [14,4,3]. However, differently from the ADE case, one finds that S-duality is not a true symmetry since it maps a theory with gauge algebra g to a theory with a dual gauge algebra g ∨ , obtained by exchanging (and rescaling) the long and short roots [9]. This property leads to very severe constraints on the prepotential coefficients, and it is a quite remarkable fact that they can be satisfied by imposing again a modular anomaly equation similar to that of the ADE theories.
Another important difference with respect to the ADE case is that the modular group of the non-simply laced theories is not Sl(2, Z) but its congruence subgroup Γ 0 (n g ) [15,16], where n g is the ratio between the norm squared of the long and short roots of g. Consequently, the prepotential coefficients are expressed as quasi-modular forms of this subgroup, which include other modular functions besides the standard Eisenstein series. Such functions as well as the Eisenstein series have a simple behaviour also under the Sduality transformation which lies outside Γ 0 (n g ). Exploiting this fact together with the S-duality transformation properties of the root lattices mentioned above, it is possible to verify that the modular anomaly equation implies the expected strong/weak coupling relation between the prepotentials of N = 2 ⋆ theories with dual gauge algebras.
The plan of the paper is the following: In Section 2 we discuss the S-duality action on the gauge theories with non-simply laced algebras and derive the modular anomaly equation and the recursion relation satisfied by the quantum prepotential. In Section 3 we present the microscopic computation of the instanton corrections for theories with gauge algebras in the classical B r and C r series using the equivariant localization methods [17] - [20]. This is necessary in order to have explicit "microscopic" data on the multi-instanton corrections which can then be used in order to prove S-duality or compared with the Sduality predictions. In Section 4 we derive exact formulas written in terms of modular forms for the first few coefficients in the mass expansion of the prepotential for theories with orthogonal or symplectic gauge algebras, while in Section 5 we repeat the analysis for the exceptional algebras G 2 and F 4 . By Taylor expanding the modular forms, one can obtain the whole series of multi-instanton corrections to the prepotential. While for the classical algebras these can be checked against the microscopic computations, for G 2 and F 4 they are a prediction since the ADHM construction is not known for the exceptional gauge algebras. Finally, in Section 6 we present our conclusions and perspectives. Several details about the root systems of the non-simply laced algebras and about the modular forms are contained in two technical appendices.

S-duality
In this section we investigate the S-duality transformation properties of N = 2 ⋆ theories with non-simply laced gauge algebras g ∈ {B r , C r , F 4 , G 2 }. In particular, we will show that the symmetry requirement under S-duality determines the modular behaviour of the quantum prepotential and implies the emergence of a modular anomaly equation in the form of a recursion relation for the coefficients of its mass expansion.
In order to treat all cases simultaneously, we introduce the convenient notation where α L and α S denote, respectively, the long and the short roots of the algebra g. In Appendix A we give our conventions on the root systems, from which one can see that n g = 2 for g = B r , C r and F 4 , n g = 3 for g = G 2 . (2.2) Using this notation, we can write the prepotential for a theory with gauge algebra g as where the first term represents the classical contribution. Here we have introduced the usual complex combination of the Yang-Mills coupling g and the θ-angle and denoted by a the vacuum expectation value of the scalar field ϕ in the gauge vector multiplet ϕ = a = diag(a 1 , a 2 , · · · , a r ) . (2.5) Like in the ADE case [1], also the non-simply laced quantum prepotential f (g) can be conveniently expanded in the mass m of the adjoint hypermultiplet, namely n are functions of the coupling τ through the instanton counting parameter q = e 2πiτ . On dimensional grounds, they are also homogeneous functions of degree (2 − 2n) of the vacuum expectation values a: On the contrary, f 1 is independent of τ and is entirely given by the 1-loop contribution where Λ is the dynamically generated scale.
Since we are interested in the S-duality transformation of the prepotential (2.3), we have to define how S-duality acts on the gauge coupling τ and on the vacuum expectation values a. As discussed for example in [11] - [13], in the non-simply laced theories one has which replaces the usual τ → −1/τ transformation of the ADE models. Furthermore, S-duality maps a theory with a gauge algebra g to a theory with a gauge algebra g ∨ defined from g by exchanging (and suitably rescaling) the long and the short roots [9]. The correspondence between g and g ∨ is given in Tab. 1, where for F 4 and G 2 , the ′ in the second column means that the dual root systems are equivalent to the original ones up to a rotation. Note that according to this definition, which is simply the N = 2 version Table 1: The correspondence between a non-simply laced algebra g and its GNO dual g ∨ .
of the N = 4 S-duality rule [8] - [13], the electric variables of the g theory are dual to the magnetic variables of the g ∨ theory. Moreover, using the roots given in Appendix A, from (2.8) it is easy to check that, up to a-independent terms 2 , (a, Λ) . (2.10) To define how S-duality acts on a, we have first to introduce the dual variables a D . These are defined as the a-derivatives of the prepotential of the dual g ∨ -theory, namely where, for later convenience, we introduce δ = 6 πiτ . (2.12) The S-duality transformation (2.9) is represented by the Sl(2, R) element [11,13] which, when acting on the periods, exchanges a and a D ; indeed (2.14) Thus we have (2.15) Using (2.9) and (2.15), the S-dual prepotential is therefore where the modular transformation property of the scale Λ will be determined shortly. In analogy with the ADE case [1], one can constrain the form of the prepotential by requiring that S F (g) be the Legendre transform of the prepotential of the dual theory, namely As it is clear from (2.17), S-duality is not a symmetry of the non-simply laced theories since it relates a theory with gauge algebra g to a theory with gauge algebra g ∨ or viceversa. Nevertheless, it is powerful enough to constrain the structure of the prepotential. In order to enforce (2.17), several conditions have to be satisfied. First of all, like in the ADE theories [1], we will see that also here the prepotential coefficients f (g) n (with n ≥ 2) must depend on τ through quasi-modular forms. However, differently from the ADE models, the modular group is now a subgroup of Γ = Sl(2, Z); more precisely it is the congruence subgroup Γ 0 (n g ) defined as 3 If we denote byŜ = ( 0 −1 1 0 ) andT = ( 1 1 0 1 ) the generators of Γ, then Γ 0 (n g ) is generated bŷ T andŜT ngŜ . The (quasi-)modular forms of Γ 0 (n g ) are known (see for instance [15,16]; 3 Note that the S-duality transformation (2.9) lies outside this subgroup. see also [21] for a catalog and Appendix B of [22] for a nice compendium). They form a ring generated by the basic elements E 2 (τ ), H 2 (τ ), E 4 (τ ), E 6 (τ ) for n g = 2 , where E 2 , E 4 and E 6 are the Eisenstein series of weight 2, 4 and 6 respectively, and H 2 and K 2 are modular forms of weight 2 defined by where the θ's are the Jacobi θ-functions and η is the Dedekind η-function. We refer to Appendix B for a summary of the main properties of these modular functions and the Eisenstein series. Here we simply recall that all elements of the basis (2.20) are modular forms of Γ 0 (n g ), except for E 2 which is quasi-modular. Also under the transformation (2.9), which does not belong to Γ 0 (n g ), all basis elements transform covariantly up to a factor of √ n g τ w where w is their modular weight, except for E 2 which behaves as follows 3τ 2 E 2 (τ ) + δ + 2K 2 (τ ) for n g = 3 , where δ is given in (2.12). This implies that under S-duality, up to the prefactors of √ n g τ 2 and the modular forms H 2 or K 2 , any occurrence of E 2 is replaced by E 2 + δ.
Since this "anomalous" shift plays a crucial rôle in the following, we will explicitly exhibit the E 2 -dependence of the prepotential coefficients f n by writing, for n ≥ 2, On the other hand we leave implicit the dependence on the other modular forms to avoid clutter in the formulas. Guided by the experience with the ADE theories [1], after some simple algebra one can realize that in order to enforce (2.17) it is necessary that the coefficients f n behave as for n ≥ 2. The prefactor ( √ n g τ ) 2n−2 in the right hand side is precisely the one that the (quasi-)modular forms of Γ 0 (n g ) of weight (2n − 2) acquire under the S-duality transformation (2.9). Thus, we conclude that f (g) n must be a (quasi-)modular form of Γ 0 (n g ) with weight (2n − 2). Thanks to the homogeneity property (2.7), it is possible to rewrite (2.24) as For n = 1, instead, we simply have to require that which, in view of (2.10), implies Eq.s (2.25) and (2.26) can be combined together into We are now in the position of computing the S-dual prepotential. We have The second line is the S-dual of the classical prepotential, while the third line gives the S-dual of the quantum prepotential f (g) which has been expressed in terms of f (g ∨ ) using (2.28). Taylor expanding the right hand side (2.29) with respect to δ, we get The first line in the right hand side reproduces the Legendre transform of the dual prepotential (2.18), so in order to enforce the relation (2.17) the δ-dependent terms should vanish. The cancellation of the term linear in δ implies We have written this modular anomaly equation for the g ∨ -theory, but it clearly holds also for the dual g-theory. The cancellation of the δ 2 -term follows from differentiating (2.31) with respect to E 2 . By taking further E 2 derivatives of this differential equation one can check that also the higher order terms in the δ-expansion vanish.
Summarizing, the S-duality symmetry relation (2.17) requires that the mass expansion coefficients f (g) n of the quantum prepotential are quasi-modular forms of the congruence subgroup Γ 0 (n g ) ⊂ Sl(2, Z) with weight (2n − 2) satisfying the recursion relations Moreover, since the S-duality map (2.25) exchanges the algebras g and g ∨ , the prepotential coefficients f (g) n should depend on the vacuum expectation values a through the long and short roots of g in a way that is compatible with (2.28). This is a highly non-trivial requirement. However, as we will see later on, the explicit evaluation of the first few instanton corrections in the B r and C r theories reveals that the a-dependent part to the prepotential can be written in terms of the following two basic sums where we have denoted by Ψ L and Ψ S , respectively, the sets of long and short roots of g, and defined for any root α with α ∨ denoting the coroot of α (see Appendix A for details). The sums (2.33) are a generalization for the non-simply laced groups of the sums C n;m 1 ··· introduced in [1] for the ADE series. With an abuse of language, we will often refer to L n;m 1 ··· and S n;m 1 ··· as the "long" and "short" sums, respectively, since the first factors in the denominators involve long and short roots. Using the properties of the root systems (see Appendix A) it is not difficult to show that These are precisely the desired maps. Showing that all this construction can be explicitly realized and proved will be the subject of the remainder of this paper.

Multi-instanton calculations for the B r and C r theories
In this section we discuss multi-instanton calculations in N = 2 ⋆ theories with the classical gauge algebras B r and C r , using the methods of equivariant localization [17] - [20]. This is necessary to obtain explicit expressions for the prepotential coefficients f n , order by order in the instanton expansion, and verify that indeed they can be resummed into quasimodular forms of Γ 0 (2) as anticipated in the previous section. Even if some multi-instanton calculations for orthogonal and symplectic theories with adjoint matter have already been considered in the literature (see for example [23,24]), we present a brief discussion here in order to be as self-contained as possible, and also to fix some details and subtleties that have been overlooked, but which are important for the explicit calculations.
We recall that the instanton moduli space for theories with orthogonal and symplectic gauge groups can be engineered using systems of N D3 branes and k D(-1) branes living on top on an orientifold O3 plane in Type IIB string theory [20]. In this set-up the instanton moduli are realised in terms of the lowest modes of open strings with at least an endpoint on a D(-1) brane [25] - [29], whose spectrum can be obtained from that of the parent U(N ) × U(k) theory after an orientifold projection.

Multi-instantons for the B r = so(2r + 1) theories
The moduli space of the SO(2r + 1) gauge theory can be found from that of the U(2r + 1) theory by quotienting it with Ω I, where Ω is the parity operator that changes the open string orientation, and I is the operator that reflects those fields transforming as anti-chiral spinors, namely in the fundamental representation of the left-moving SU (2) L subgroup of the Lorentz group. As a result of this projection, keeping only the antisymmetric combinations, the symmetry group of the D3/D(-1) brane system reduces to SO(2r + 1) × Sp(2k), see for example [20]. The invariant components under Ω I are listed in Tab. 2. Table 2: Instanton moduli for the SO(2r + 1) gauge theory. The columns display, respectively, the moduli in a ADHM-like notation organized as supersymmetric pairs, their statistics, their transformation properties with respect to the gauge and instanton symmetry groups and finally Q 2 -eigenvalues λ φ , where Q is the supersymmetry charge used in the localization approach. See also [30] where similar tables have been given for other brane systems.
The most relevant information is contained in the last column of the above table: there the χ i 's (with i = 1, · · · , k) are the unpaired bosonic moduli representing the D(-1) positions, ϕ u 's (with u = 1, · · · , r) are the D3 positions and are related to the vacuum expectation values a u ; the notation χ ij stands for χ i − χ j , and finally ǫ 1,2,3,4 are the deformation parameters of the SO(4) × SO(4) symmetry. Collecting all eigenvalues λ φ , one finds that the k-instanton partition function is given by The integrals in (3.1) are computed by closing the contours in the upper-half complex χ i -planes after giving the deformation parameters an imaginary part with the following prescription This choice allows us to unambiguously compute all integrals in (3.1) and to obtain the instanton partition function where q = e 2πiτ . At the end of the computation, we have to set in order to express the result in terms of the vacuum expectation values a u and the adjoint hypermultiplet mass m in the normalization used in the previous section. Finally, the instanton prepotential of the N = 2 ⋆ theory is given by

1-instanton
At k = 1 there is just one integral to compute and one can easily see that the poles of the integrand in (3.1) are located at Therefore the 1-instanton prepotential F k=1 can be written as Inserting these expressions in (3.8) and using (3.5), for the first few algebras of the B r series we obtain where the ellipses stand for terms with higher powers of the mass whose explicit expressions can be obtained from (3.8) in a straightforward way but rapidly become quite cumbersome. We have checked (up to B 5 ) that our 1-instanton results exactly match those derived long ago in [31] using very different methods.

Up to two instantons
At k = 2 one has to compute two integrals to obtain the instanton partition function and hence the prepotential F k=2 . The procedure we have outlined above is straightforward to implement, and with the prescription (3.3) no ambiguity arises. For B 1 and B 2 we obtain the following 2-instanton contributions where again the ellipses stand for higher order mass terms. We refrain from writing the explicit expressions of F k=2 for other orthogonal algebras since they are quite involved. However, if we use the "long" and "short" sums defined in (2.33), it is possible to write all the k = 1, 2 results in a very compact and simple way. Indeed, we have 4 (3.12) These formulas, which we have explicitly verified up to B 5 , clearly show the advantage of organize the multi-instanton results in terms of the "long" and "short" sums that fully exploit the algebraic properties of the root system of the gauge algebra.

Multi-instantons for the C r = sp(2r) theories
The above analysis can be easily extended to the symplectic series C r . The instanton moduli space of the N = 2 ⋆ Sp(2r) gauge theory is found from that of U(2r) after quotienting by Ω I. As a result of this projection, keeping only the symmetric combinations, the symmetry of the D3/D(-1) brane system reduces to Sp(2r) × SO(k) where k = 2K + ν with ν = 0 or 1 for k even or odd respectively [20]. The invariant components under Ω I are listed in Tab. 3. Collecting the eigenvalues λ φ from the last column of the above table, one finds Table 3: Instanton moduli for the N = 2 ⋆ Sp(2r) gauge theory. As before, the columns display, respectively, the moduli in a ADHM-like notation organized as supersymmetric pairs, their statistics, their transformation properties with respect to the gauge and instanton symmetry groups and finally Q 2 -eigenvalues λ φ , where Q is the supersymmetry charge used in the localization approach.
that the instanton partition function is now given by 4 We neglect again all a-independent terms, see footnote 2.
where z gauge with (3.14) The integrals in (3.13) are computed again by closing the contours in the upper-half complex χ i -planes with the prescription (3.3). At the end of the computation we should make the substitutions in order to write the result in terms of the physical parameters of the gauge theory in the normalizations of Section 2. From the partition function we can derive the instanton contributions of the prepotential along the same lines discussed for the orthogonal groups.

1-instanton
For k = 1, i.e. K = 0 and ν = 1, there is no integral to be done. The prepotential following from (3.13) in this case is simply (3. 16) In particular for the first few symplectic algebras, using (3.15) we find (3.17c) We have checked (up to C 5 ) that our 1-instanton results exactly match those derived in [31] using very different methods.

Up to four instantons
For the symplectic algebras one can push the calculation of the partition function and the prepotential to higher instanton numbers with relatively little effort. Indeed, for k = 2 and k = 3 one has to compute just one integral, while there are only two integrals to compute for k = 4 and k = 5. As an example, we now write the first multi-instanton terms of the prepotential for the Sp(4) theory that we have obtained with these methods: where the ellipses stand for terms with higher powers of m. Clearly the explicit formulas become more and more involved for symplectic groups of higher rank, and quickly cease to be useful. However, if we use the "long" and "short" sums (2.33), we can write quite compact expressions which are valid for all C r 's. Indeed, neglecting again the a-independent terms, we find where the ellipsis stand for higher mass terms. By inspecting these formulas, one realizes that the odd instanton contributions are simpler than the even instanton ones since the latter involve both the "long" sums L n;m 1 ··· and the "short" sums S n;m 1 ··· . This observation will turn out to be useful in the following.

Prepotential and recursion relations for the B r and C r theories
In this section we show that the instanton corrections to the prepotential can be resummed into (quasi-)modular forms of Γ 0 (2) along the lines discussed in Section 2. To do so we write the quantum prepotential f as an expansion in the hypermultiplet mass m, namely with f n ∼ m 2n . The perturbative 1-loop term can be compactly written as (see for example [32]) where α is an element of the root system Ψ of the gauge algebra. Expanding f 1−loop for small values of m, all odd powers cancel upon summing over positive and negative roots and in the end, neglecting all a-independent terms, we find The instanton part of the prepotential can be determined from the recursion relation (2.32) which for the B r and C r series reads since n g = 2 in these cases. The starting point of the recursion is f 1 which, as we have seen in the previous section, just receives a contribution at 1-loop: (4.5) Starting from this, we will recursively determine the exact q-dependence of the prepotential order by order in m 2 . It is important to realize that the recursion relation (4.4) only fixes the E 2 -dependence of f n at a given order. The E 2 -independent contributions will be determined instead by comparing with the perturbative expansion (4.3) and the microscopic multi-instanton computations described in the previous section.

The C r theories
We begin our analysis from the N = 2 ⋆ C r theories for which explicit multi-instanton calculations can be performed with relatively little effort up to high values of k as we have seen in Section 3.2. The results up to 4-instantons are given in (3.19). Collecting the various powers of m 2n and adding the 1-loop contribution (4.3), we can rewrite the prepotential coefficients in the following suggestive form f 3 = − m 6 120 1 + 720q 2 + 3840q 3 + 10800q 4 + · · · L 4 + m 6 2 q + 6q 2 + 12q 3 + 28q 4 + · · · L 2;11 − m 6 120 1 + 720q 4 + · · · S 4 + m 6 2 q 2 + 6q 4 + · · · S 2;11 , (4.6c) + m 8 6q 2 + 48q 3 + 180q 4 + · · · L 4;2 + m 8 q 2 + 8q 3 + 34q 4 + · · · L 3;3 + m 8 24 q + 12q 2 + 36q 3 + 112q 4 + · · · L 2;1111 − m 8 336 1 − 840q 4 + · · · S 6 + m 8 6q 4 + · · · S 4;2 + m 8 2 q 4 + · · · S 3;3 + m 8 24 q 2 + 12q 4 + · · · S 2;1111 . (4.6d) As discussed in Section 2, S-duality requires that the q-dependent functions in front of the various sums organize into quasi-modular forms of Γ 0 (2) which is the modular group for the C r theories. In Tab. 4 we display a basis for such modular forms up to weight 12. There E 4 and E 6 are the usual Eisenstein series (see also Appendix B), while H 2 is the modular form of weight 2 defined in (2.21). Combining them with the second Eisenstein series E 2 , one finds two quasi-modular forms of weight 2, namely {H 2 , E 2 }, four quasi-modular forms of weight 4, namely {H 2 2 , E 4 , E 2 2 , E 2 H 2 }, and so on. In principle one can use the q-expansion of these forms and fit the 1-loop and instanton results (3.19) for the first few n's. For instance, using and comparing with (4.6b), one finds Similarly, from (4.6c), (4.7) and  Table 4: A basis of modular forms of Γ 0 (2) up to weight 12. The number n w of modular forms of weight w can be obtained by expanding the generating function 1+x 2 +x 4 (1−x 4 )(1−x 6 ) = w n w x w = 1 + x 2 + 2x 4 + 2x 6 + 3x 8 + 3x 10 + 4x 12 + · · · . one gets (4.10) This method can be used to find the higher prepotential coefficients f n even if, when n increases, the number of quasi-modular forms that become available increases as well, thus requiring more and more microscopic multi-instanton data to fix all coefficients. It is therefore much more efficient to exploit the modular anomaly equation (4.4). For f 2 we have where in the last step we used the fact that only the terms with α = ±β contribute to the sum since L 1;1 = S 1;1 = 0 5 . Integrating over E 2 , we find where the E 2 -independent term has been added in order to match the 1-loop and the 1-instanton contributions in (4.6b). Notice that only the 1-instanton result is used for this; thus the perfect matching of the higher order coefficients in the q-expansion of (4.12) with the explicit multi-instanton results (4.6b) has to be regarded as a very strong and highly non-trivial consistency check. Furthermore, using the duplication formulas of the Eisenstein series given in (B.10), one can easily check that the two expressions for f 2 given in (4.10) and (4.12) coincide. Proceeding in a similar way for the m 6 terms, we get 6 (4.13) Integrating over E 2 and matching the perturbative and the first instanton terms against (4.6c) leads to Using the duplication formula (B.10), one can show that (4.10) and (4.14) are the same. We stress again that this result is exact in τ and that by expanding it in powers of q one can obtain the contributions at any instanton number and check that they perfectly agree with those computed with the multi-instanton calculus.
Using the recursion relation we have determined also f 4 . We now collect our results on the prepotential coefficients for the C r theories: It is interesting to observe that the combinations of Eisenstein series appearing in f 2 , f 3 and in the first two lines of f 4 in front of the "long" sums are exactly the same that appear also in the prepotential coefficients f 2 , f 3 and f 4 of the ADE theories studied in [1]. Moreover, using the duplication formulas (B.10), one can show that the combinations of Eisenstein series of the last three lines of f 4 in (4.15d) become identical to the ones of the first two lines, but evaluated in 2τ instead of τ , similarly to what happens in f 2 and f 3 . Finally we observe that for r = 1, i.e. for C 1 = sp (2), there are only two long roots, ±2, and thus only the sums of the type L n are non zero. In this case the quantum prepotential f drastically simplifies and reduces to (4. 16) This exactly coincides with the prepotential of the SU(2) N = 2 ⋆ theory [1], as it should be since Sp(2) ≃ SU(2).

1-instanton
Given the previous results, it is possible to write a very compact expression for the 1instanton contribution to the prepotential. Indeed, the only terms which have a 1-instanton part are those proportional to L 2;11··· (as is clear also from (3.19a)), and one finds where the intermediate step follows from the definition (2.33) of the "long" sums L 2;11··· . The number of factors in the product above is given by the dimension of Ψ(α) which, when α is a long root of C r , is 2r − 2 (see Appendix A). Thus, in (4.17) the highest power of the mass is m 2r+2 . This is precisely the only term which survives in the decoupling limit q → 0 and m → ∞ with m 2r+2 q = Λ 2r+2 fixed , (4.18) when the N = 2 ⋆ theory reduces to the pure N = 2 SYM theory 7 . In this case the 1-instanton prepotential is This expression perfectly coincides with the known results present in the literature (see for example [33,31,23,24] and in particular [34]), while (4.17) is the generalization thereof to the N = 2 ⋆ symplectic theories.

The B r theories
The N = 2 ⋆ theories with non-simply laced orthogonal gauge groups can be treated exactly as described above. Indeed, the modular group is again Γ 0 (2), and the recursive relation, the 1-loop and the 1-instanton microscopic data have exactly the same form as in the C r theories and differ only in the explicit expression for the roots. Thus, the results for the B r models become very similar to those of the symplectic ones with the only differences arising from the different relations among the root sums. Skipping the intermediate steps, the prepotential for the so(2r + 1) theory turns out to be where the first few f n 's are By expanding the above expressions in powers of q, one can obtain the multi-instanton contributions to the prepotential. At the 1-instanton level one finds exactly the same expression (3.19a) or (4.17), simply with the roots of C r replaced by those of B r . At the 2instanton level one finds complete agreement with the expressions obtained in Section 3.1.
For higher k the above formulas can be used to efficiently determine the higher instanton contributions to the prepotential, which instead are technically difficult to compute with the localization methods. Notice that the expressions in (4.21) are similar but not identical to those of (4.15) since there are a few differences in f 4 .
For B 1 , i.e. for so (3), there are just two short roots, ± √ 2, so that only the sums of the type S n are non-vanishing. In this case the quantum prepotential becomes which, after using the duplication formulas (B.10), takes the form (4.22) The fact that only modular forms evaluated at 2τ appear means that f (B 1 ) admits an expansion in powers of q 2 ; in other words only the even instantons contribute. The prepotential (4.22) perfectly matches that of the SU(2) theory (see also (4.16)) provided a → √ 2a and q 2 SO(3) = q SU (2) . (4.23) The above identification of the coupling constants, which practically amounts to replace 2τ with τ in (4.22), is consistent with the fact that SU(2) is the double cover of SO(3), i.e. SU(2)/Z 2 ≃ SO(3).

Relations between the B r and C r theories
The similarity of the results (4.21) and (4.15) for the prepotential of the B r and C r theories is not surprising since, as discussed in Section 2, they are related by a strong/weak-coupling S-duality. Here we check explicitly this relation exploiting the properties of the quasimodular forms and of the "long" and "short" sums. The first observation is that H 2 , E 2 , E 4 and E 6 have simple properties under indeed, one can check (see Appendix B) that 8 We recall again that the transformation (4.24) does not belong to the modular group Γ 0 (2) but it is a generator of the S-duality group, which is a discrete subgroup of Sl(2, R).
The second observation is that the root systems of B r and C r can be mapped into each other by exchanging (and suitably rescaling) long and short roots. As a consequence of this fact, the "long" and "short" sums in the two theories are related in the following way (see (2.35)): n;m 1 ···m ℓ . (4.26) Combining (4.25) and (4.26) with the expressions of the prepotential coefficients in the orthogonal and symplectic theories, we can check how they are non-perturbatively related with each other. In order to display these relations in a transparent way, we explicitly indicate the dependence on the coupling constant τ , on the vacuum expectation values a (through the root lattice sums) and on the quasi-modular form E 2 by writing f (Br) n (τ, a, E 2 (τ )) and f (Cr) n (τ, a, E 2 (τ )). Then, from (4.21b) and (4.15b), it is not difficult to show that where δ = 6 πiτ as before. More generally one can prove that This is precisely the type of duality relation discussed in Section 2 (see in particular (2.25)).
Using it together with the recurrence relations, we can therefore verify that as we anticipated. Of course, also the reverse relation is true. These relations, which are an extension of the ones described in [1] for the ADE theories provide a highly non-trivial test of the S-duality.

Prepotential and recursion relations for the G 2 and F 4 theories
In this section we consider N = 2 ⋆ theories with G 2 and F 4 gauge algebras. Differently from the classical algebras B r and C r , the ADHM construction of the instanton moduli space is not known for the exceptional algebras and thus in these cases one cannot rely on the localization techniques to obtain explicit multi-instanton results. Nevertheless remarkable progress can be made using the methods described in the previous section. Let us start our discussion from the G 2 theory.

The G 2 theory
The prepotential for the G 2 theory can be written as with the first term describing the classical part and f n the mass expansion coefficients of the quantum prepotential. Now the modular group is Γ 0 (3) [11,12,13] and we assume as before that f n are quasi-modular forms of this group. For Γ 0 (3) the ring of quasi modular forms is generated by where K 2 , the modular form of weight 2 defined in (2.21). By building monomials of these basic elements one can construct a basis for the modular forms of Γ 0 (3) with higher weights, as indicated in Tab. 5 up to weight 12. Comparing with the table of the modular forms of Weight Modular forms of Γ 0 (3) Table 5: A basis of modular forms for the congruence subgroup Γ 0 (3) of the modular group up to weight 12. The number n w of modular forms of weight w can be obtained by expanding the generating function 1+x 2 +x 4 +x 6 (1−x 4 )(1−x 6 ) = w n w x w = 1 + x 2 + 2x 4 + 3x 6 + 3x 8 + 4x 10 + 5x 12 + · · · . Γ 0 (2), we see many similarities but also some differences. For example at weight 6 we now have three independent modular forms instead of two. Finally, there is another well-known feature of G 2 [9] that will play a crucial rôle in the following, namely the fact that by exchanging (and suitably rescaling) long and short roots we obtain an equivalent root system with the two axes interchanged. Thus, under this operation the G 2 theory is mapped into another theory with the same symmetry but with the two vacuum expectation values a 1 and a 2 interchanged. We call this "dual" algebra G ′ 2 .
The prepotential for the G 2 theory will be derived again from the recursion relation and the E 2 -independent terms will be determined by the perturbative 1-loop prepotential f 1−loop and the one-instanton result where the last step follows from the fact that there are only four factors in the product since dim Ψ(α L ) = 4 for G 2 (see Appendix A). Formula (5.3) was checked to be valid both for theories with ADE in [1] and BC gauge groups in the previous section, and will be assumed to be valid also for G 2 . This assumption is well justified not only by the fact that the 1-instanton contribution takes this form in all other groups considered so far, but also by the fact that the last term in (5.3), which is the one surviving in the pure N = 2 G 2 theory where the adjoint hypermultiplet is decoupled, exactly matches the 1-instanton result obtained long-ago in [35] from the Picard-Fuchs approach to the Seiberg-Witten curve of the G 2 theory, and more recently in [34] from coherent states of W-algebras. The recursion relation for G 2 reads Again the starting point is f 1 which has only the 1-loop part On the other hand, according to our working hypothesis, f 2 must be proportional to L 2 and S 2 , since it has to be homogeneous of degree −2 in the vacuum expectation values, with coefficients that are linear combinations of E 2 and K 2 , since it has to be a quasi-modular form of Γ 0 (3) with weight 2. Therefore, matching the 1-loop and 1-instanton terms we get where the last step is a consequence of the triplication formula The same result follows by solving the recursion relation (5.4) and matching with the perturbative and 1-instanton terms. By expanding f 2 in powers of q we can obtain all multi-instanton contributions to the prepotential that are proportional to m 4 . As we already remarked, for G 2 there is no known ADHM construction of the instanton moduli space and no explicit multi-instanton calculations can be performed. Thus, our result represents a prediction for the higher instanton terms. Applying the same method at order m 6 , it is quite straightforward to get where we suppressed the τ dependence in the right hand side to simplify the notation. It is interesting to observe that using the triplication formulas (5.7) the quasi-modular forms appearing in front of S 4 and S 2;11 can be written exactly like the ones appearing in front of L 4 and L 2;11 , respectively, but evaluated in 3τ instead of τ . The same triplication formulas allow us to show that under τ → − 1 3τ , (5.10) the Eisenstein series and K 2 have simple transformation properties, namely Furthermore, from the properties of the G 2 root lattice, it follows that where G 2 and G ′ 2 are dual to each other [9] as discussed above. Combining (5.12) with the transformation rules (5.11), one can check that both f 2 and f 3 satisfy the expected duality relations Using the recursion formula (5.4), imposing the duality relations (5.13) and matching with the 1-loop and the 1-instanton results, we managed to determine also the m 8 -terms of the prepotential. We now collect all our findings for the G 2 theory up to m 8 : We remark that the E 2 -dependence in f 4 is completely determined by the recursion relation (5.4) which, however, can not fix the combinations of the three independent modular forms of Γ 0 (3) with weight 6, namely E 6 , E 4 K 2 and K 3 2 , that appear in front of the various sums. To fix these combinations some extra information is therefore needed beside the 1-loop and 1-instanton data. In the absence of explicit multi-instanton results, we have used the duality relations (5.13). These impose very severe restrictions on the coefficients, and the fact that all resulting constraints are mutually compatible, thus allowing for a solution, is a very strong consistency check on our approach.
The previous formulas and their properties allow us to conclude that Of course also the reverse relation is true.

The F 4 theory
The N = 2 ⋆ theory with gauge group F 4 can be analysed in exactly the same way as discussed above. In this case the modular group is Γ 0 (2), like in the B r and C r theories. Again the recursive relation, the 1-loop and the 1-instanton microscopic data match those of B r and C r models and we have checked that the prepotential coefficients up to f 3 are given by exactly the same formulas (4.15a), (4.15b) and (4.15c), with the "long" and "short" sums written with the roots of F 4 , and that they satisfy the recursion relation (4.4). These properties imply and its reverse.

Conclusions
In this paper we have extended the results of [1] to N = 2 ⋆ theories with non simplylaced gauge algebras and in particular have studied their behaviour under S-duality. This extension is far from being trivial. From the analysis in N = 4 theories one expects that S-duality be a symmetry for ADE gauge groups. But this cannot be the case for the non-simply laced theories, since S-duality exchanges the B r and C r algebras and maps G 2 and F 4 into the rotated G ′ 2 and F ′ 4 algebras. All these features and constraints can be put into a consistent picture which allows the computation of the effective prepotential starting from a modular anomaly equation. The payoff of this approach is a conjecture for the prepotential of the G 2 and F 4 gauge theories for which a direct check is possible only at the 1-instanton level, since the microscopic multi-instanton computations are not available for the exceptional algebras. At the same time given the number of consistency checks which are passed by our proposal, we are confident about its validity.
It is amusing to observe that the modular anomaly equation by itself is not enough to completely determine the prepotential coefficients in the mass expansion which in general need the perturbative 1-loop and some microscopic instanton computations in order to be fixed. Nonetheless even if the latter are not available for the G 2 and F 4 cases our proposal stands at the same level of the computations for the classical orthogonal or symplectic algebras given that our results are written in a form that makes them independent of the details of the various root systems. One final remark: the results presented here overlook the contribution of the Ω-background. Such contributions could be easily incorporated by the means of the same methods employed in our companion paper [1] for the ADE theories. However, in order not to make the formulas too involved, we have preferred to omit them from our presentation.
Any long root α L ∈ Ψ L has length 2, while any short root α S ∈ Ψ S has length √ 2. Therefore we have n g = 2. It is easy to see that ord Ψ L = 2r 2 − 2r , ord Ψ S = 2r , (A.5) so that the total number of roots is 2r 2 which is indeed the order of Ψ. According to (A.1), we have It is not difficult to show that where h = 2r is the Coxeter number and h ∨ = 2r − 1 is the dual Coxeter number for B r .
The roots of C r For the symplectic algebra C r the long roots are given by where again {e i ; 1 ≤ i ≤ r} is the standard orthonormal basis in R r . The short roots are instead given by Ψ S = {±e i ± e j ; 1 ≤ i < j ≤ r} , (A.9) with all possible signs. Any long root α L ∈ Ψ L has length 2, while any short root α S ∈ Ψ S has length √ 2, like for the B r groups. Therefore also in this case we have n g = 2. Its easy to see that ord Ψ L = 2r , ord Ψ S = 2r 2 − 2r , (A.10) so that the total number of roots is 2r 2 which is the order of Ψ. According to (A.1), we have where h = 2r is the Coxeter number and h ∨ = r + 1 is the dual Coxeter number for C r .
As is well-known [9], there is a duality between the formulas for B r and those for C r under the exchange of long and short roots, which can be explicitly verified on the above results.
The roots of F 4 F 4 has forty-eight roots; half of them are long roots and half are short roots. Denoting by {e 1 , e 2 , e 3 , e 4 } the standard orthonormal basis in R 4 , the twenty-four long roots are Ψ L = ± √ 2 e i ± √ 2 e j ; 1 ≤ i < j ≤ 4 , (A. 13) while the twenty-four short roots are Ψ S = ± √ 2 e 1 , ± √ 2 e 2 , ± √ 2 e 3 , ± √ 2 e 4 , 1 √ 2 ± e 1 ± e 2 ± e 3 ± e 4 . (A.14) The long roots have length 2, while the short roots have length It is interesting to observe that by exchanging (and suitably rescaling) long and short roots, we obtain an equivalent root system; the algebra associated to this dual root system is called F ′ 4 .

The roots of G 2
For G 2 the six long roots are given by It is interesting to observe that by exchanging (and suitably rescaling) long and short roots, we obtain an equivalent root system in which e 1 and e 2 are exchanged. We call the algebra associated to this dual root system G ′ 2 . We summarize in the following

B. Modular forms
In this appendix we collect the main formulas for the modular functions used in the main text.