{'fraction_non_alphanumeric': 0.041630915451125336, 'fraction_numerical': 0.016286053725826678, 'mean_word_length': 4.174165457184325, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Three Avatars of Mock Modularity

Mock theta functions were introduced by Ramanujan in 1920 but a proper understanding of mock modularity has emerged only recently with the work of Zwegers in 2002. In these lectures we describe three manifestations of this apparently exotic mathematics in three important physical contexts of holography, topology and duality where mock modularity has come to play an important role.


Introduction
In Ramanujan's famous last letter to Hardy in 1920, he gave 17 examples (without any definition) of mock theta functions that he found very interesting [1]. For example, This function may seem unremarkable to the uninitiated, but Ramanujan had reasons to believe that it was very similar to an ordinary theta function with hints of a 'mock' or 'hidden' symmetry under the modular group SL(2, Z). Despite much work by many eminent mathematicians, this fascinating mock modular symmetry remained mysterious for a century until the thesis of Zwegers in 2002 [2,3]. As we will see, the essence of mock modularity is an incompatibility between holomorphy and modularity. For example, the function f (τ ) above, which is holomorphic in τ , has no obvious modular properties. However, it is possible to add to it a non-holomorphic 'correction' term such that the sum is indeed modular but at the expense of being nonholomorphic. One can either have modularity or holomorphy but not both.
It is useful to keep a geometric analogy in mind. The property of being modular can be likened to being circular. A modular form is a function with high degree of symmetry under the modular group SL(2, Z) much like a circle which is a geometric figure with a high degree of symmetry under the rotation group O (2). Similarly, the property of being holomorphic can be likened to the property of being blue. In this analogy, a holomorphic mock modular form is like a blue geometric figure which is not circular but can be made circular by adding a non-blue piece to it. One can either have circularity or blueness but not both.
Even though mock modular forms have a rich and interesting mathematical history, it was not clear if this exotic mathematics has any relevance to physics. A marvelous essay titled 'A walk through Ramanujan's Garden' by Freeman Dyson [4] on the occasion of the Ramanujan Centenary Conference in 1987 gives a glimpse of the history of these intriguing functions and ends with a prescient remark about possible physics applications: "My dream is that I will live to see the day when our young physicists, struggling to bring the predictions of superstring theory into correspondence with the facts of nature, will be led to enlarge their analytic machinery to include not only theta-functions but mock theta-functions . . . But before this can happen, the purely mathematical exploration of the mock-modular forms and their mock-symmetries must be carried a great deal further." True to the hope expressed by Dyson, over the past decade, mock modular forms have made their appearance in diverse physical contexts connecting to deep and important physical concepts such as holography and duality even if not directly to facts of nature. The purpose of these lectures is to introduce the basic notions about mock modular forms and then outline their applications in three physical contexts: supersymmetric sigma models with non-compact target, counting of black hole degeneracies, and 4-dimensional Vafa-Witten topological gauge theory. We leave uncovered some other topics where mock modularity plays an important role, in particular, umbral moonshine [5] and quantum 3-manifold invariants [6][7][8]. For other reviews of applications of (mock) modularity see for example [9,10].

Modular Forms
We first review modular and Jacobi forms and their appearance in the context of black hole physics and holography, topology, and duality. For more details see [11]

Definitions
Let IH be the upper half plane, i.e., the set of complex numbers τ whose imaginary part satisfies Im(τ ) > 0. Let SL(2, Z) be the group of matrices a b c d with integer entries such that ad − bc = 1.
A modular form f (τ ) of weight k on SL(2, Z) is a holomorphic function on IH that transforms as for an integer k (necessarily even if f ≡ 0) and is bounded as Im(τ ) → ∞. It follows from the definition that f (τ ) is periodic under τ → τ + 1 and can be written as a Fourier series a(n) q n q := e 2πiτ .

(2.2)
A holomorphic modular form must have non-negative weight (strictly positive weight if the form is not a constant). If a(0) = 0, then the modular form vanishes at infinity and is called a cusp form. In the other direction, one may weaken the growth condition as Im(τ ) → ∞ from f (τ ) = O(1) to f (τ ) = O(q −N ) for some N ≥ 0; then f has a Fourier expansion containing finitely many negative powers of q. Such a function is called a weakly holomorphic modular form. The weight of weakly holomorphic modular forms can be negative.
We denote the vector space over C of holomorphic modular forms of weight k on SL(2, Z) by M k , while the space of cusp forms of weight k and the space of weakly holomorphic modular forms of weight k are denoted by S k and M ! k respectively. We thus have the inclusions 3) The growth condition at Im(τ ) → ∞ is related to the growth properties of the Fourier coefficients a(n) as n → ∞: f ∈ S k ⇒ a n = O(n k/2 ) as n → ∞ ; (2.4) f ∈ M k ⇒ a n = O(n k−1 ) as n → ∞ ; (2.5) f ∈ M ! k ⇒ a n = O(e C √ n ) as n → ∞ (2.6) The exponential growth of a(n) for f ∈ M ! k can be recognized as the Cardy formula in conformal field theory as we explain below in an example.

The Ring of Modular Forms
It is clear from the definition that the product f 1 (τ )f 2 (τ ) of two modular forms f 1 (τ ) and f 2 (τ ) of weights k 1 and k 2 respectively is also a modular form of weight k 1 + k 2 . With these operation of usual pointwise addition and multiplication, modular forms form a ring. An important theorem in the theory of modular forms states that the ring of (holomorphic) modular forms is generated by the two Eisenstein series E 4 (τ ) and E 6 (τ ) defined by E 4 (τ ) = 1 + 240 ∞ n=1 n 3 q n 1 − q n = 1 + 240q + 2160q 2 + · · · , (2.7) E 6 (τ ) = 1 − 504 ∞ n=1 n 5 q n 1 − q n = 1 − 504q − 16632q 2 − · · · .
(2. 8) In other words, any holomorphic modular form can be expressed as a linear combination of products of E 4 and E 6 of appropriate weight. This important theorem reveals the power of modularity. A priori, to determine an arbitrary translation invariant function, one needs to know all its infinite Fourier coefficients {a(n)} in the q-expansion (2.2). Thanks to the theorem stated above, for a modular form, it suffices to know just the first few Fourier coefficients which can be determined by comparison with (2.7). For example, a weight 12 modular form must be a linear combination of the form for some numerical complex coefficients a and b which can be readily determined knowing the first two Fourier coefficients.
Exercise 1. Show that (up to normalization) there is a unique cusp form of weight 12 and express it in terms of E 4 and E 6 . This is an important example of a cusp form known as the discriminant function and denoted by ∆(τ ).
The cusp form ∆(τ ) admits a product representation: The Fourier coefficients of the discriminant function, usually denoted by τ (n), play an important in number theory. Because ∆(τ ) is a cusp form, τ (n) grow very slowly as n → ∞.
In physics applications, one encounters not the cusp form but rather its inverse is the Dedekind η function. This inverse of the cusp form is clearly a weakly holomorphic modular form, and arises, for example, as the partition function of 24 left-moving bosons of the light-cone bosonic string. In number theory, the partition function above is well-known in the context of the problem of partitions of integers. One can identify where p 24 (I) is the number of colored partitions of a positive integer I using integers of 24 different colors, which is the same combinatoric problem of dividing energy I among 24 transverse oscillators. Now, the Fourier coefficients grow exponentially in accordance with (2.4) 14) and is related to the Cardy formula d(n) ∼ exp 2π nc 6 (2.15) with c = 24 which the central charge of 24 left-moving bosons.

Jacobi Forms
Jacobi forms are functions of two variables τ and z that transform nicely under the Jacobi transformations as defined below. One can regard τ as the complex-structure parameter of a 2-torus obtained by modding a complex plane with coordinate z by the lattice of points z = λτ + µ for all λ, µ ∈ Z. The Jacobi group is the group of Jacobi transformations as below generated by the modular transformations as well as the translations of z by lattice shifts.

Definitions
Consider a holomorphic function ϕ(τ, z) from IH × C to C which is "modular in τ and elliptic in z" in the sense that it transforms under the modular group as and under the translations of z by Zτ + Z as where k is an integer and m is a positive integer. These equations include the periodicities ϕ(τ + 1, z) = ϕ(τ, z) and ϕ(τ, z + 1) = ϕ(τ, z), so ϕ has a Fourier expansion ϕ(τ, z) = n,r c(n, r) q n y r , (q := e 2πiτ , y := e 2πiz ) . The function ϕ(τ, z) is called a holomorphic Jacobi form (or simply a Jacobi form) of weight k and index m if the coefficients C(∆, r) vanish for ∆ < 0, i.e. if c(n, r) = 0 unless 4mn ≥ r 2 . (3.5) It is called a Jacobi cusp form if it satisfies the stronger condition that C(∆, r) vanishes unless ∆ is strictly positive, i.e. c(n, r) = 0 unless 4mn > r 2 , (3.6) and it is called a weak Jacobi form if it satisfies the weaker condition c(n, r) = 0 unless n ≥ 0 (3.7) rather than (3.5), whereas a merely weakly holomorphic Jacobi form satisfies only the yet weaker condition that c(n, r) = 0 unless n ≥ n 0 for some possibly negative integer n 0 (or equivalently C(∆, r) = 0 unless ∆ ≥ ∆ 0 for some possibly negative integer ∆ 0 ). Finally, the quantity ∆ = 4mn − r 2 , which by virtue of the above discussion is the crucial invariant of a monomial q n y r occurring in the Fourier expansion of ϕ, will be referred to as its discriminant (not to be confused with the discriminant function (2.10) introduced earlier).

Theta Expansion
If ϕ(τ, z) is a Jacobi form, then the transformation property (3.2) implies its Fourier expansion with respect to z has the form where h (τ ) is periodic in with period 2m. In terms of the coefficients (3.4) we have Because of the periodicity property, equation (3.8) can be rewritten in the form where ϑ m, (τ, z) denotes the standard index m theta function (which is a Jacobi form of weight 1 2 and index m on some subgroup of SL(2, Z)). This is called the theta expansion of ϕ. The coefficiens h (τ ) are modular forms of weight k− 1 2 and are weakly holomorphic, holomorphic or cuspidal if ϕ is a weak Jacobi form, a Jacobi form or a Jacobi cusp form, respectively. More precisely, the vector h := (h 1 , . . . , h 2m ) transforms like a modular form of weight k − 1 2 under SL(2, Z). Jacobi forms, which are functions are two complex variables τ and z are thus equivalent to vector valued modular forms of a single complex variable τ .

The Ring of Jacobi Forms
Consider the two Jacobi forms defined below where {ϑ i (τ, z)} are the Jacobi theta functions. The ring of Jacobi forms of weight k and index m is generated by these two Jacobi forms with ordinary modular forms as coefficients. Index and weight both add when you multiply Jacobi forms and modular forms. Thus, as in the case of modular forms, a Jacobi form can be determined by knowing its weight and index and first few Fourier coefficients. For example, the most general holomorphic Jacobi form of weight 4 and index 2 must be of the form and hence is completely fixed by determining the three constants a, b, c.

Modularity in Physics
The modular group SL(2, Z) appears in physics in many different contexts as a physical symmetry. The most familiar occurrence is in conformal field theory. The modular group of a two-torus is the group of global diffeomorphisms of the 2-torus modulo the Weyl group. If one uses a coordinate invariant regulator then the path integral for the sigma model on a two-dimensional torus is diffeomorphism invariant. For a conformal sigma model it also Weyl invariant. Hence the path integral of a conformal field theory on a 2-torus is expected to be SL(2, Z)-invariant.
It is thus natural that modular forms, which transform nicely under this symmetry, have come to play an important role in physics. We focus on the following three contexts.

Topology
In general, the partition function of a conformal field theory will be a function of both τ and τ . However, certain indexed partition functions, which capture a topological subsector of the theory are functions of τ alone and are thus holomorphic by an argument due to Witten that we outline in §8.1. Consider a conformally invariant nonlinear sigma model with target space M with (2, 2) superconformal symmetry with left and right super Virasoro algebra and central charge 6m both for the left-movers and the right-movers. There is a U (1) L × U (1) R R-symmetry of the superconformal algebra. The U (1) L symmetry (and similarly the U (1) R symmetry ) is anomalous with anomaly coefficient m which by supersymmetry is related to the conformal anomaly governed by the central charge 6m. Let F R and F L be the charges associated with this symmetry. One can then define the elliptic genus as the following indexed partition function: (4.1) Elliptic genus thus defined is a Jacobi form weight 0 and index m. As argued above, it is modular invariant and hence has modular weight zero. The (2, 2) superconformal algebra has an additional symmetry called the spectral flow symmetry. If one bosonizes the left-moving U (1) L current, then the spectral flow symmetry corresponds to the shifts of this boson. Consequently, the path integral is elliptic with index m related to the anomaly in the U (1) L symmetry. Because, the R-symmetry acts on fermions alone, (−1) F R can be identified with the rightmoving fermion number. The indexed partition function defined above can thus be thought of as the Witten index for the right-moving sector that counts right-moving ground states which is a topological quantity called the elliptic genus.
The Fourier coefficients of the elliptic genus correspond the Dirac indices of an infinity family of Dirac-like (elliptic) operators. Jacobi forms thus appear naturally in topology in the context of elliptic genera of manifolds.
Exercise 2. Show that the modified elliptic genus of T 4 equals A(τ, z).
Exercise 3. Show that the elliptic genus of K3 equals B(τ, z).

Duality
The hypothesis of S-duality asserts that N = 4 super Yang-Mills theory is invariant under the action of a large duality group (SL(2, Z) or a close relative, depending on the four-dimensional gauge group G) acting on τ ≡ τ 1 + iτ 2 = θ/2π + 4πi/g 2 ; here g and θ are the gauge coupling and theta angle; τ 1 and τ 2 denote the real and imaginary parts of τ . But S-duality is hard to test, because computations for strong coupling are difficult. One way to circumvent this difficulty is to consider a topologically twisted version of the theory in which localization can be used to perform computations for strong coupling.
A twist of particular interest is the Vafa-Witten twist introduced in [12]. With this twisting, a formal argument shows that the partition function on a compact four-manifold M 4 is holomorphic in τ or equivalently in q = exp(2πiτ ). Furthermore, if a certain curvature condition (eqn. (2.58) in [12]) is satisfied, the evaluation of the path integral can formally be argued to localize on the contribution of ordinary Yang-Mills instantons. The contribution to the path integral from the component of field space with instanton number 1 n is then a n q n , where a n is the Euler characteristic of the instanton number n moduli space M n . Thus the partition function after summing over bundles of all values of the instanton number is expected to be Z = n a n q n . (4. 2) The relevant curvature condition is highly restrictive, but there are a number of fourmanifolds that satisfy this condition and for which computations of the a n were available in the mathematical literature [13,14]. In particular, two important examples that we consider here are a K3 surface and CP 2 .
A four-dimensional gauge theory arises naturally as the low-energy worldvolume theory of N conincident D3-branes. In the Euclidean version one can consider Euclidean D3-branes wrapping a four-manifold M 4 . In the D-brane picture, instantons in the gauge theory correspond to D-instantons bound to the D3-branes. The Vafa-Witten partition function counts the number of such bound states. By T-duality in directions transverse to the branes, this is the same the number of D0-D4 or D1-D5 bound states which we will encounter in the context of black hole microstates.
In the simplest context of a single Euclidean D3 brane wrapping a K3 with m+1 point-like instantons 2 , one can heuristically think of them as m + 1 point particles moving on K3. The indexed partition function for each particle gives simply the ground states of the supersymmetric quantum mechanics of a super particle with K3 as the target, which is nothing but Euler 1 Here n is an integer for a simply-connected gauge group such as G = SU (2), but may have a fractional part if G is not simply-connected. The fractional part is determined by a two-dimensional cohomology class (for example, by the second Stieffel-Whitney class w 2 if G = SO(3)), and in the partition function n a n q n , it is natural to sum over all bundles keeping this class fixed. The values of n in the sum are then congruent to each other mod Z. A restriction on w 2 (and its analog for other groups) is assumed in eqn. (4.2).
2 In a U (1) gauge theory the instantons are singular but one can turn on a noncommmutativy parameter to make the problem better defined characteristic of K3 which is 24. The (m + 1) superparticles on K3 can be treated as identical bosonic particles and thus have as the target space symmetrized product of (m + 1) copies of K3. The indexed partition function which gives the coefficients a m+1 thus equal the orbifold Euler character χ(Sym m+1 (K3)) of the symmetric product of (m + 1) copies of K3-surface [12]. The generating function for the orbifold Euler character can be thought of the grand-canonical partition function for this quantum mechanical system of m + 1 identical bosons with fugacity p. This can be readily evaluated using Bose-Einstein distribution knowing the single-particle degenercies to obtain to obtain This is a modular form of weight −12, in fact the inverse of the cusp form that we have encountered earlier. Its modular properties are a consequence of S-duality of the gauge theory living on the D-brane worldvolume. Note that this partition function is the same as the one we encountered for 24 left-moving bosons of the heterotic string. This is not an accident. The heterotic string on a 4-torus T 4 is dual to Type-IIA string on K3 Duality requires that the number of BPS-states of a given charge must equal the number of BPS-states with the dual charge. The equality of the two partition functions (2.11) and (4.4) coming from two very different counting problems is consistent with this expectation. This fact was indeed one of the early indications of a possible duality between heterotic and Type-II strings [12].

Holography
In AdS 3 quantum gravity, the modular group SL(2, Z) is the group of global diffeomorphisms of the boundary. Quantum string theory in AdS 3 background is expected to be dual to a sigma model living on the boundary.
A well-studied special case of this duality is in the context of Type-IIB string theory compactified on K3 × S 1 . Consider Q 5 D5-branes wrapping K3 × S 1 and Q 1 D1-branes wrapping S 1 with Q 1 Q 5 ≡ m. The near horizon geometry of this brane system is AdS 3 × S 3 × K3. The sigma model dual to this theory has as target space symmetric product of m + 1 copies of K3 defines a (2, 2) superconformal symmetry (actually it has a larger (4, 4) symmetry but that is not relevant to our discussion) with left and right moving central charges 6(m + 1). The elliptic genus defined as above χ(τ, z|Sym m+1 K3) , (4.5) gives the indexed partition function of this boundary theory is a generalization of the Euler characteristic of symmetrized product that we encountered earlier. By general arguments reviewed earlier, this elliptic genus is a weak Jacobi form of weight 0 and index m + 1. Henceforth we will denote it simply by χ m+1 (τ, z). We thus see that Jacobi forms appear naturally in the context of AdS 3 /CF T 2 holographic duality.

Mock Modular Forms
We now review mock modular and mock Jacobi forms.

Definitions
We define a (weakly holomorphic) pure mock modular form of weight k ∈ 1 2 Z as the first member of a pair (h, g), where 1. h is a holomorphic function in IH with at most exponential growth at all cusps, 2. the function g(τ ), called the shadow of f , is a holomorphic 3 modular form of weight 2−k , and 3. the sum h := h + g * , called the completion of f , transforms like a holomorphic modular form of weight k, i.e. h(τ )/θ(τ ) 2k is invariant under τ → γτ for all τ ∈ IH and for all γ in some congruence subgroup of SL(2, Z).
Here g * (τ ), called the non-holomorphic Eichler integral, is a solution of the differential equation If g has the Fourier expansion g(τ ) = n≥0 b n q n , we fix the choice of g * by setting where τ 2 = Im(τ ) and denotes the incomplete gamma function. Note that the series in (5.2) converges despite the exponentially large factor q −n because . If we assume either that k > 1 or that b 0 = 0, then we can define g * alternatively by the integral

(The integral is independent of the path chosen because the integrand is holomorphic in z.)
Since h is holomorphic, (5.1) implies that the completion of h is related to its shadow by This 'holomorphic anomaly equation' captures the failure of holomorphy of the completion of the mock modular form, which is modular but not holomorphic. If one multiplies the mock modular form by a holomorphic modular form f (τ ) of weight k the holomorphic anomaly equation above simply gets multiplied by f (τ ) on both sides. One thus gets a mixed mock modular form f (τ )h(τ ) of weight k + k with completion f (τ )ĥ(τ ) and a mixed shadowf (τ )g(τ ) that is a product of a holomorphic and anti-holomorphic piece.

Examples
Apart from the examples introduced by Ramanujan, a particularly interesting example is the Zagier mock modular form which will play a role in our later discussions. The Fourier coefficients of this mock modular form give the Hurwitz-Kronecker class numbers, denoted by H(N ) for N ∈ Z.
These class numbers are defined for N > 0 as the number of P SL(2, Z)-equivalence classes of integral binary quadratic forms of discriminant −N , weighted by the reciprocal of the number of their automorphisms (if −N is the discriminant of an imaginary quadratic field K other than The Zagier mock modular form [15] is the generating function for these class numbers: It is a 'pure mock modular form' of weight 3/2 on Γ 0 (4) and shadow the classical theta function ϑ(τ ) = q n 2 . See [3,16] for the definition and further discussion. We see from the q-expansion of H(τ ) that it has no poles at q = 0 and hence is strongly holomorphic. Consequently, its Fourier coefficients grow very slowly. This is exceptional. In fact, up to minor variations the Zagier mock modular form is essentially the only known non-trivial example of a strongly holomorphic pure mock modular form.

Mock Jacobi Forms
A mock Jacobi form is a new mathematical object defined in [16] as a mock generalization of a Jacobi form. It has the same elliptic symmetry properties as a Jacobi form and hence does admit a theta expansion using this symmetry. However, the theta-coefficients are not vector-valued modular forms but rather vector-valued mock modular forms.

Definitions
By a (pure) mock Jacobi form (resp. weak mock Jacobi form) of weight k and index m we will mean [16] a holomorphic function ϕ on H × C that satisfies the elliptic transformation property (3.2), and hence has a Fourier expansion as in (3.3) with the periodicity property (3.4) and a theta expansion as in (3.10), and that also satisfies the same cusp conditions (3.5) (resp. (3.7)) as in the classical case, but in which the modularity property with respect to the action of SL(2, Z) is weakened: the coefficients h (τ ) in (3.10) are now mock modular forms rather than modular forms of weight k − 1 2 , and the modularity property of ϕ is that the completed function rather than ϕ itself, transforms according to (3.1). If g denotes the shadow of h , then we have with g * as in (5.2) and hence, by (5.1), = indicates an omitted constant.)

Example
Using the class numbers introduced earlier one can define with τ = τ 1 + iτ 2 and which equals the complementary error function up to normalization and can be easily related to the incomplete Gamma function introduced earlier.
The functions { h (τ )} are not purely holomorphic because of the second term in (6.3) and satisfy the holomorphic anomaly equation: transforms as a vector valued modular form with weight 3/2 under the modular group Γ 0 (4). In particular, Using the definitions introduced earlier, the holomorphic parts are components of a vector-valued pure mock modular form h(τ ) with a holomorphic shadow g(τ ) with components where c = 1 16πi is the overall normalization for which there is no standard convention. The vector h(τ ) is holomorphic but not modular whereas the vectorĥ(τ ) is modular but not holomorphic.
The components {h } are most naturally regarded as the vector of theta coefficients of a mock Jacobi form H(τ, z) defined by Following the definition in above, one can check that H(τ, z) is a mock Jacobi form of weight 2 and index 1 with holomorphic anomaly (up to normalization)

Black Holes and Mock Modularity
Consider Type-IIB theory compactified on K3 × T 2 which results in a four-dimensional theory with N = 4 supersymmetry. A dyonic state is specified by the with charge vector electric charge vector Q and magnetic charge vector P . There are three T-duality invariants 4 that given by

Black Holes, Poles, and Walls
The indexed degeneracies of such dyonic states are given by [17][18][19][20] the Fourier coefficients of a meromorphic Jacobi form ψ m (τ, z) of weight −10 and index m: This poses a puzzle. The counting function has a double pole at z = 0: and at all the lattice images z = λτ + µ. Because of the factor A(z, τ ) in the denominator, ψ m is a meromorphic Jacobi form with a double pole at z = 0 and its images under elliptic transformations, thus at all points z = λτ + µ. This would mean that the answer for different contours is different and the degeneracies are not uniquely defined. How is this possible? A physical resolution of this puzzle involves what is known as the wall-crossing phenomenon. The moduli space of the theory is divided into chambers separated by walls, or codimension one surfaces. The quantum degeneracies jump upon crossing walls and therefore indeed are not uniquely defined. This non-uniqueness is related precisely to the ambiguity in choosing the contour to obtain the Fourier coefficients.
One obtains a beautifully consistent picture. The choice of the contour C(µ) depends on the moduli µ. Crossing a wall in the moduli space corresponds to crossing a pole. Changing the moduli deforms the contour but as long as one does not encounter a pole, one remains in a given chamber in the moduli space and the degeneracies do not change. Upon crossing a pole, the degeneracies jump corresponding to the jump upon crossing a wall. This jump in the degeneracies is given by the residue at the pole encountered.

Multi-Centered Black Holes and the Appel-Lerch Sum
The wall-crossing phenomenon however raises another puzzle. One of the main reasons for studying black hole microstates is that these microstates is an intrinsic property of the black hole horizon. One believes that therefore one can learn something about the short-distance structure of the theory from studying these microstates. If this is the case, then the quantum degeneracy of a black hole should not depend on asymptotic moduli. How come then we get a different answer depending on which region of the moduli space we are in?
The resolution of this puzzle involves multi-centered black hole solutions. For fixed value of the magnetic charge, the partition function ψ m (τ, z) contains all the information about the asymptotic quantum degeneracies. The indexed degeneracies receive contributions both from single centered black holes as well as the multi-centered black holes. The multi-centered black holes are in a bound state at fixed distance from each other which is determined by the asymptotic moduli. As the moduli are varied, this distance varies. In particular, the distance goes to infinity as a wall is approached, which means that on the other side of the wall these bound states no longer exit and hence these multi-centered black holes no longer contribute to the indexed degeneracies. Thus, even though the degeneracy of a black hole is indeed a property of its horizon, the degeneracies of multi-centered black holes which are bound states can jump upon crossing walls in moduli space depending on whether a stable bound state exists or not.
This poses an interesting question whether one can define a counting function whose Fourier coefficients give directly the degeneracies of the horizons of the single-centered black holes without the polluting contributions from the multi-centered black holes. After all, the degrees of freedom of the horizon is the quantity of real interest in the explorations of quantum gravity. It turns out that one can in fact remove this ambiguity in Fourier expansion by subtracting the contribution of the various multi-centered black holes which is captured by the function which is simply the 'elliptic average' over the lattice Zτ + Z of the simplest wall-crossing at z = 0 given by The function ψ P m is called the polar part of ψ m because it has identical poles in the complex z plane. It is convenient to define where A 2,m (τ, z) is known as the Appel-Lerch sum which is simply the elliptic average of 1/z 2 defined by One can now obtain the horizon degeneracies of single-centered black holes simply by subtracting this contribution from the partition function ψ m (τ, z) which counts all degeneracies. This physical observation corresponds to the following decomposition theorem which also connects this problem with mock modularity.

The Decomposition Theorem
The decomposition theorem [16] states that subtracting ψ P m leaves us with the finite part ψ F m , which, as we saw above is exactly the attractor partition function: By separating part of the function ψ m , we have of course broken modularity, and ψ F m (τ, z) is not a Jacobi form any more. However, ψ F m still has a very special modular behavior, in that it is a mock Jacobi form. It is convenient to define as in (7.6) a function ϕ F m (τ ) by The nontrivial part of the decomposition theorem is that ϕ F m is a mock Jacobi form and hence admits a completion ϕ F m . The mock behavior can be summarized by the following partial differential equation which is obeyed by its completion: Thus, puzzles concerning the degeneracies of supersymmetric quantum black holes in string theory naturally lead to the mathematics of mock Jacobi forms.

Topology and Mock Modularity
As we explained earlier, the elliptic genus can be thought of as the right-moving Witten index, formally treatingτ as the right-moving inverse temperature. As a result, naively, this quantity is expected to be independent ofτ and is indeed so for a compact theory. The naive argument fails in a non-compact conformal field theory, see e.g. [21][22][23][24][25][26]. The holomorphic anomaly captures this 'anomalousτ dependence' of the elliptic genus. To understand the physical origin of mock modularity, one would like to understand how precisely the holomorphic anomaly is related to the noncompactness of the underlying conformal field theory.
To appreciate the essence of this phenomenon, one can consider a simpler problem about the Witten index of a noncompact quantum mechanical system. In this context, the anomalous τ dependence that we are interested in can be related to the anomalous β dependence of the Witten index where β is the inverse temperature.

Witten Index
For a supersymmetric quantum field theory in a d-dimensional spacetime, the Witten index [27] is defined by where H is the Hamiltonian, F is the fermion number and H is the Hilbert space of the theory. As usual, this trace can be related to a supersymmetric Euclidean path integral over a d-dimensional Euclidean base space Σ with periodic boundary conditions for all fields schematically denoted by φ in the Euclidean time direction where the path integral is over superfield configurations that are periodic in Euclidean time with period β, so the Euclidean base space Σ is a circle of radius β times the spatical manifold.
If the quantum field theory is compact in the sense that the spectrum of the Hamiltonian is discrete, then the Witten index is independent of the inverse temperature β: This follows from the observation that the states with nonzero energy come in Bose-Fermi pairs and do not contribute to the Witten index [27]. Only the zero energy states graded by (−1) F contribute and consequently, the Witten index is a topological invariant. This is the case, for example, for a supersymmetric sigma model with a compact target space.
By an appropriate choice of the sigma model, the Witten index in the zero temperature (β → ∞) limit can be related to some of the classic topological invariants such as the Euler character or the Dirac index of the target manifold. Using temperature independence of the index, one can evaluate it in the much simpler high temperature (β → 0) limit using the heat kernel expansion to prove the Atiyah-Singer index theorem [28]. Evaluating the path integral corresponding to the Witten index in this high-temperature semiclassical limit gives another derivation of the index theorem [29,30].

Noncompact Witten Index
If the field space is noncompact and the spectrum is continuous, then the above argument can fail because now instead of a discrete indexed sum, one has an integral over a continuum of scattering states. To define the noncompact Witten index properly, one needs a framework to incorporate the non-normalizable scattering states into the trace. One can address this issue and give a suitable definition using the formalism of Gel'fand triplet [31].
In general, the bosonic density of states in this continuum may not precisely cancel the fermionic density of states, and the noncompact Witten index can be temperature dependent. In other words, the equation (8.3) above can have an 'anomaly' in that the naive expectation expressed by (8.3) can fail. It is possible to compute the temperature dependence using localization of the supersymmetric path integral. The temperature dependent piece is no longer topological but is nevertheless 'semi-topological' in that it is independent of any deformations that do not change the asymptotics.
Some of the essential points about a noncompact path integral can be illustrated by a 'worldpoint' path integral where the base space Σ is a point and the target space X is a the real line −∞ < u < ∞. We discuss this example first before proceeding to localization. The supersymmetric worldpoint action is given by The path integral is now just an ordinary superintegral with flat measure 5 A particularly interesting special case is for real λ. Integrating out the fermions and the auxiliary field F gives One can change variables As u goes from −∞ to ∞, y(u) is monotonically increasing or decreasing depending on if λ is positive or negative; the inverse function u(y) is single-valued, and the integral reduces to The error function which appears naturally in this integral, has already made its appearance in the definition of the completion (5.2) of a mock modular form in the guise of an incomplete Gamma function. Note that with a change of variable y 2 = t, the integral √ can be written as which we recognize as the lower incomplete gamma function γ( 1 2 , β 2 λ 2 ) related to the upper incomplete gamma function (5.3) by γ(s, x) + Γ(s, x) = Γ(s).
The noncompact Witten index is thus not temperature independent. The anomalous temperature dependence is captured by the equation which is a close analog of the holomorphic anomaly equation (5.5). Similar expressions appear in the path integral derivation of the holomorphic anomaly equation of mock modular forms encountered in gauge theory [32].
The worldpoint integral illustrates a number of important points.
1. Without the fermionic integrations, the integral has a volume divergence because h (u) is bounded above for large |u|. Inclusion of fermions effectively limits the integrand to the region close to the origin where h (u) varies, and makes the integral finite. 2. The answer depends only the asymptotic behavior of h (u) at ±∞ and is independent of any deformations that do not change the asymptotics. In particular, one would obtain the same result in the limit a → ∞ in (8.7), when h (u) can be expressed in terms of the Heaviside step function: 3. The appearance of the incomplete Gamma function in this context is not a coincidence. The two turn out to be related through a path integral which localizes precisely onto the ordinary superintegral considered above. For this reason, this example is particularly important for understanding the connection between noncompactness and mock modularity.

Holomorphic Anomaly in Gauge Theories
In [12] Vafa and Witten considered a topologically twisted version of maximally supersymmetric (N = 4) Yang-Mills theory in four dimensions. The partition function is naively expected to be a holomorphic function of the coupling constant τ and S-duality invariant. However, the naive holomorphic partition function by itself is not S-duality invariant and there is in fact a holomorphic anomaly as we describe below.

Vafa-Witten Partition Function
The topological twist is defined by identifying the SU (2) = Spin (3)  The (naive) argument for both (iii) and (iv) is based on the fact that one can write the action of the twisted 4d SYM in the form for some Λ, where Q is one of the unbroken supercharges. The first term in the right-hand side is holomorphic in τ and independent of metric. Then, denoting by Φ the collection of all fields, we have in particular The last equality follows from the fact that Q is a derivation on the space of fields, assuming there is no contribution from the boundary at infinity. Explicitly, if one introduces some coordinates Φ i on the space of fields (e.g. harmonics on M 4 ) and TrF ∧ F , modulo gauge transformations).
In one applies naively the formula (9.3) for M 4 = CP 2 [12-14, 33, 34]: where 6 f v (τ ), up to simple factors, are given by generating functions for Hurwitz class numbers H(n) that have already appeared in Section 6.2: It turns out, that unlike in the case M 4 = K3, the the property (ii) is not respected: but "almost". Namely, f v (τ ) transform as a vector valued modular form that has a nonholomorphic modular completion: where g v (τ,τ ) → 0 atτ → ∞ and, as follows from (6.5)-(6.6), Since the property (ii) is more fundamental than the property (iii), it is natural to guess that the modular completion above gives the full physical partition function. Its holomorphic anomaly is then determined by (9.9). In particular By now the appearance of mock-modular forms in instanton counting problems has already a long history: [35][36][37][38][39].

M-theory Realization
In this section we briefly review some prerequisite facts about 6d maximally supersymmetric conformal field theories and their topologically twisted compactification on 4-manifolds. Sixdimensional N = (2, 0) superconformal quantum field theories (QFTs) are known to be classified by Lie algebras of the form g = ⊕ i g i , where each g i = u(1) or simply-laced (i.e. of ADE type). In these lectures by defult we assume Euclidean signature of space-time metric. The 6d N = (2, 0) extension of spin-Poincare symmetry (non-including conformal transformations) has Spin(6) E × Z 2 Spin(5) R even subgroup, where Spin(6) E is the symmetry of the spacetime rotations and Spin(5) R is the R-symmetry. The extension has 16 supecharges transforming in the representation (4 + , 4).
Recall that Spin(n) group is the nontrival central extension of SO(n) by Z 2 : Note that when g = u(N ) or su(N ) the theory describes the worldwolume theory of N M5-branes (respectively with or without center of mass degrees of freedom included) in 11dimensional M-theory. The R-symmetry Spin(5) R then can be understood as the group of rotations of the 5 normal directions.
The 6d N = (0, 2) theories do not have a Lagrangian description, however their compactification on a circle or a torus can be described in terms of maximally supersymmetric Yang-Mills gauge theory. In particular, 6d N = (2, 0) theory corresponding to a Lie algebra g, compactified on a 2-torus T 2 = C/(Z + τ Z) is equivalent to a 4d N = 4 super-Yang-Mills (SYM) theory with gauge group G such that Lie(G) = g and the complexified coupling τ = 4πi g 2 + θ 2π equal to the complex structure of the torus.
Note that the choice of global structure of the gauge group G is determined by the finite choice of "sector" of the 6d theory, which is a relative QFT. It is similar to a 2d chiral Wess-Zumino-Witten conformal field theory (CFT), where one has to choose a conformal block.  where in the right hand side the pair of numbers denote the dimensions of the representations of SU (2) × SU (2) r and the index denotes the spin with respect to Spin(2) E .
Note that in the case when g = su(N ) and the 6d theory is the worldwolume theory of the stack of N fivebranes in M-theory the twist can be realized geometrically in the following setup: where Λ 2+ T M 4 is the rank 3 bundle of self-dual 2-forms over M 4 . This follows from (9.17) as the represenation (3, 1) can be realized by self-dual antisymmetric rank 2 tensors. From the result of the Exercise 4 it follows that the 6d theory twisted on M 4 has in general 2 unbroken supercharges. They both transform as right-moving spinors in the residual 2 dimensions.

The su(2) theory on the tensor branch
For g = su(2) the 6d theory is interacting and non-Lagrangian. However on the tensor branch it can be effectively decribed in term of a single tensor multiplet corresponding to the Cartan subalgebra u(1) ⊂ su(2) with extra interaction terms.
The tensor branch of the theory can be roughly understood as the phase where the scalar fields fluctuate over non-zero values. The non-compactness of the 6d theory can only arise in the directions corresponding to the large values of the scalar fields. Therefore to determine the holomorphic anomaly it should be enough to use the effective description of the theory on the tensor branch, which becomes asymptoticlly exact when the values of the scalar fields tend to infinity. In the M-theory setup the tensor branch corresponds to the phase when 2 fivebranes are separated in a normal direction.
The quantization conditions on the gauge transformations on the field B are rescaled compared to the previous case 7 : where the extra √ 2 factor is the length of the root in su(2) algebra. Consequently, the fields of the effective 2d theory will be the same as in the g = u(1) case, but with modified periodicity of the chiral scalars: where n i ± are quantized as before. In the description in terms of a lattice CFT, this means that the lattice is now √ 2H 2 (M 4 , Z). The 6d interaction term that will be relevant for us is [40,41]: Where η 4 is a 4-form that can be defined as follows. Let where ϕ a are the scalars of the tensor multiplet and A ab are the components of the background Spin(5) R connection 1-form valued in the so(5) algebra. Then where F R is the curvature of the R-symmetry connection A R . The interaction term above is written in the untwisted theory, on a flat spacetime, but with non-trivial background SO(5) R-symmetry gauge field. Note that the term (9.21) corresponds to the fact that skyrmionic strings are electrically charged with respect to the B field. In the dimensional reduction to 5d/4d gauge theory the corresponding term arises in 1-loop effective action on the Coulomb branch.

Path integral derivation of holomorphic anomaly
Our goal is to derive this holomorphic anomaly equation from the path integral. It is possible to do this from the path integral of the 4d SYM by calculating the non-vanishing boundary contribution in (9.2) [32]. However in these lectures we will use an alternative (but in many ways analogous) approach, also from [32].

Reversing the order of compactification
Instead of considering the 4d theory on M 4 obtained by compactification of the 6d theory on T 2 one can reverse the order of compactification and work with the 2d theory, usually denoted as T g [M 4 ] obtained by compactification of the 6d theory on M 4 . The partition function of the Vafa-Witen theory on M 4 is equal to the partition function of this 2d theory on the torus T 2 with complex structure τ (with periodic-periodic boundary conditions on fermions). The latter can be also understood as a trace over the Hilbert space H of the 2d theory on a circle: ] has at least N = (0, 2) supersymmetry. Assuming the spectrum of the theory is discrete, the usual argument can be applied to show that the dependence onq in the trace above should drop out due to cancellation between femrionic and bosonic states withL 0 ≡ Q 2 = 0 (where Q is one of the right-moving supercharges). However, if the theory suffers from some sort of "non-compactness" and the spectrum is continuous, the canecellation can fail and the partition function can have an anomalous dependence onq. As we will see, this is indeed the case for T su(2) [CP 2 ].
To summarize, the computations of the holomorphic anomaly both in the 2d sigma model description and directly in the 4d gauge theory description give the same result on the right hand side of (9.9), but the various factors have different origins in the two regions. We now comment on the relation between the holomorphic anomaly and mock modularity. The naive holomorphic partition function of the twisted SO(3) super Yang-Mills theory on CP 2 is the holomorphic kernel of the anomaly equation (9.9) which receives contributions only from the instantons. It is holomorphic but not modular. The presence of the holomorphic anomaly implies that the physical partition function necessarily contains a nonholomorphic piece given by an Eichler integral of the anomaly [15] which receives contributions from the anti-instantons. In the modern terminology [2,3,16] discussed earlier, the holomorphic piece is a (vector valued) 'mixed mock modular form' whereas the anomaly is governed by its 'shadow'. The physical partition function satisfying the anomaly equation is the 'modular completion' and has good modular properties, as expected from duality.
These considerations extend naturally to other Kähler 4-manifolds with b + 2 = 1, b 1 = 0 and to other groups [32]. In general, when the configuration space of the twisted theory is noncompact, the partition function is modular but not holomorphic, and satisfies a holomorphic anomaly equation similar to (9.9). As we have seen, this incompatibility between holomorphy and modularity is the essence of mock modularity. The physical requirement of duality invariance of the path integral thus leads naturally to the mathematical formalism of mock modularity whenever the relevant configuration space is noncompact.
Before we proceed with the derivation of the holomorphic anomaly equation from the point of view of the effective 2d theory for g = su(2), consider first the case of g = u(1). The corresponding 6d theory is the free theory of N = (2, 0) tensor multiplet. It consists of the fields forming the following rerpresentations of Spin(6) E × Spin (5)  In what follows we will assume that M 4 is simply-connected (in particular b 1 = 0). Then H 2 (M 4 , Z) can be identified with subgroup of de Rham cohomology H 2 (M 4 , R) represented by 2-forms h such that a 2-cycle h ∈ Z. As usual, we will denote by b ± 2 the number of positive/negative eigenvalues of the bilinear form on H 2 (M 4 , Z) given by M 4 · ∧ ·.
The effictive 3d theory T u(1) [M 4 ] can be obtained by the standard Kaluza-Klein (KK) reduction, by counting harmonic forms on M 4 and taking into account the results of the Exercise 4 (cf. [42,43]): The result (c) can be seen as follows. The (massless) KK reduction of the field B is given by the following decomposition: where h ± i are the basis in the space of harmonic 2-forms on M 4 chosen such that From the self-duality dB = * 6d dB it then follows that * 2d dX i ± = ±dX i ± . Equivalently, using a complex coordinate z to parametrize the 2d spacetime, ∂X i + = 0,∂X i − = 0. From the large gauge transformations (10.2) it follows that X i ± are compact: where n i ± are quantized such that i,± n i ± h ± i ∈ H 2 (M 4 , Z). That is X i ± can be understood as components of a field valued in the b 2 -torus H 2 (M 4 , R)/2πH 2 (M 4 , Z).
The collection of field X i ± form what is usually called Narain's lattice CFT corresponding to the indefinite lattice H 2 (M 4 , Z) ∼ = H 2 (M 4 , Z) (for closed M 4 , as we assume, the lattice is self-dual) with the bilinear form M 4 · ∧ ·. Exercise 5. Show that when M 4 is (hyper-)Kähler, that is the holonomy is reduced to (SU (2)) U (2) ⊂ SO(4) E , there are (8) 4 unbroken supercharges, all right-moving in 2d.

Review of 2d N = (0, 1) sigma-models
For our purposes it is enough to consider N = (0, 1) sigma-models without left-moving fermions. The theories from such class are defined by the choice of a target manifold X equipped with Riemannian metric and a closed 3-form h ∈ Ω 3 (X ). The target manifold should satisfy certain topological constraints for theory to be well defined on the quantum level (w 1 (T X ) = 0, w 2 (T X ) = 0, 1 2 p 1 (T X ) = 0). Let Σ be the 2-dimensional spacetime (also known as source or worldsheet). The field content of the theory is then the following: where S + it the bundle of right-moving chiral spinors on Σ. Informally, the fermion fields can be understood as right-moving spinors valued in the tangent space of the target (pulled back to the 2d spacetime). In local coordinates on the target, and assuming that Σ is flat, the action reads [44][45][46]: where d 2 z := idzdz, Γ ijk are Christoffel symbols of the Levi-Cevita connection, and b ij are the components of a 2-form b ∈ Ω 2 (X ) such that h = db. The term containing the scalar fields and the 2-form b in the target is the Wess-Zumino term, which can be recast as where ∂Ξ 3 = Σ 2 . The supercharge acts on the fields as follows: The right-moving energy momentum-tensor and the supercurrent (i.e. the Noether current for the symmetry Q) are given by (cf. [47]) The path integral for partition function of the 2d theory (which we will denote as σ(X )) on a 2-torus with periodic-periodic boundary conditions on fermions localizes on constant maps to the target. If the target X is a closed manifold (∂X = 0) the result has an explicit formula 8 [48]: where R ∈ Ω 2 ⊗ so(dimX ) is the curvature 2-form on X and θ(u; τ ) := q .
The characteristic class of X in the right-hand side of (10.14) is known as elliptic genus.
16) where p i are Pontryagin classes of X and find the next term. The n-th term in the expansion is a characteristic class of degree 4n with coefficients in being quasi-modular forms of SL(2, Z) (i.e. polynomials in the Eisenstein series E 2k ) of weight 2n. Argue that when p 1 = 0 the dependence on E 2 drops out.
If X is non-compact, however, ∂Z σ(X ) ∂τ = 0 in general. Assuming that X asymptotically is of the form Y × R (informally ∂X = Y), it was argued in [49] that the anti-holomorphic derivative can be expressed in terms of a 1-point function of the supercurrent of in the sigma model with target Y. Namely where . . . T denotes a 1-point function in a theory T on T 2 . Below we present a sketch of the proof of this formula and address to [32,49] for details. Omitting numerical factors we have The last equality is the most non-trivial and can be argued as follows. A correlator of a Qinvariant observable on the torus localizes on the space of zero-modes, that is space of constant functions φ and ψ on T 2 : where f (φ 0 , ψ 0 ) is result of the integration over nonzero bosonic and fermions modes. The functions on the space of bosonic and femrmionic zero-modes are in 1-to-1 correspondence with forms on the target X . Namely, the components of the bosonic zero-modes can be identified with local coordinates φ i 0 on X and the components of the fermionic zero-modes can be identified with their differentials: where in the right-hand side f is understood as the corresponding element of Ω * (X ). Moreover, the supercharge (10.10) restricted to the space of zero modes can be indentified with the exterior derivative under this correspondence: Therefore f = dg where g corresponds toḠ in the way f corresponds toT and

Holomorphic anomaly for CP 2
Consider now the particular case of M 4 = CP 2 . Although the final result is independent on the choice of metric, assume the standard Fubini-Studi metric (which is Kähler) for concreteness. The group H 2 (CP 2 , Z) has a single generator represented by the self-dual form h 1 + = ω equal to the Kähler form, satisfying CP 2 ω 2 = 1 (also CP 1 ω = 1). In particular b + 2 = 1 and b − 2 = 0. According to the general result, the field content of the effective 2d theory T su(2) [CP 2 ] on the tensor branch is then the following: This theory is a sigma-model with target X = R 3 × S 1 with the exception that the scalar field valued in S 1 is chiral right-moving. The missing left-moving component, however is not participating in supersymmetry tranformations anyway. Topologically this target space looks like S 2 × S 1 × R near infinity, where R is the radial direction of R 3 .
Exercise 8. Show that the 6d skyrmionic string term (9.21) reduces to a 2d Wess-Zumino term (10.9) with h = 3 · 8π 2 · vol S 2 ∧ vol S 1 (10.24) where vol S 2 and vol S 1 are the standard volume forms on S 2 and S 1 normalized so that the total volume is 1. Use the fact that one can always choose SO(5) R indices so that the 2d fields φ i , i = 1, 2, 3 arise as constant modes of ϕ a , a = 1, 2, 3. Then in the twisted theory F ab R = 0 unless (a, b) is a permutation of (4, 5), while F 45 R /(2π) is equal to (up to a sign) to the Ricci form, which is 3ω for CP 2 .
To calculate the holomorphic anomaly it is then enough to calculat the 1-point function of the supercurrent given by (10.12) in the sigma-model with target Y = S 2 × S 1 : One can argue that the first term in the correlator does not contribute, as it cannot saturate the integral over 3 fermionic zero-modes. The correlator of the second term, as before, localizes to the integral over zero-modes with an overall factor from the contribution of non-zero modes.
Ommitting non-essential numerical factors (for a careful calculation see [32]), the integral over zero-modes reads where we used again the correspondence between functions of zero-modes and forms on the target. The contribution from nonzero modes is where the first factor is the contribution of nonzero modes of 3 right-moving fermions, the second factor is the contribution of nonzero modes of 2 scalars valued in S 2 , and the final factor is the contribution of the chiral right-moving bosons of radius √ 2 (in the vacuum sector). Combining the contributions from zero-and nonzero modes together we arive at the desired formula for the holomorphic anomaly: The choice of the vacuum sector in the theory of chiral compact boson of radius √ 2 correponds to the choice of the gauge group G = SU (2) (equivalently, up to a factor, the sector of SO(3) gauge theory with CP 1 w 2 = 0). The other sector (out of 2 in total) of the chiral boson corresponds to the sector of SO(3) gauge theory with CP 1 w 2 = 1 and gives the result for the right-hand side of (9.9) for v = 1.

A Solutions
Exercise 1. A weight 12 modular form must be a linear combination of the form (2.9). For a cusp form, the q-expansion has no constant term. Hence we determine a = −b to prove that is the unique weight 12 cusp form, normalized so that the q-expansion starts with q.
Exercise 2. The SCFT with target space T 4 has four free bosons and four free fermions; hence the total central charge is 6. The path integral for the elliptic genus vanishes because the right-moving fermions with the periodic boundary condition in the Ramond sector have zero modes. To get a nonzero answer one can define a modified elliptic genus χ mod (τ, z|X ) with two insertions of the current J R in the trace (4.1) to soak up the four fermion zero modes. Since the current operator has conformal weight 1, now the path integral transforms with weight −2 rather than with weight 0. This implies that the elliptic genus should be a Jacobi form of index 1 and weight −2 and hence must be proportional to A(τ, z). It is easy to confirm this by an explicit computation for the free bosons and fermions using the product representation of the theta function which also fixes the overall normalization.
Exercise 3. The SCFT with target space K3 also has central charge 6. This is easy to see in the large volume limit where the curvarture can be ignored and one has four free bosons and four free fermions. This implies that the elliptic genus of K3 must be a Jacobi form of index 1 and weight 0; and hence must be proportional to B(τ, z). To fix the normalization, we use the fact that when z = 0 the elliptic genus reduces to the Witten index which gives the Euler number of K3 which is 24. Hence, the elliptic genus of K3 equals B(τ, z). This general conclusion can be verified by an explicit computation at a point in the moduli space where the SCFT is exactly solvable. For example, one can consider the point where the K3 is represented as an orbifold of a 4-torus T 4 /Z 2 where the Z 2 symmetry with generator R reflects the bosonic coordinates of the torus and their fermionic partners (see, for example, [50]). The elliptic genus (4.1) can then be written as a projected trace over untwisted (U) and twisted (T) sectors as χ(τ, z|K3) = (with all other operators implicitly in the trace as in (4.1)). The first term vanishes because of the fermionic zero modes as explained above. The second term gives the first term in (3.13). There are 16 fixed points of the orbifolding symmetry and in the twisted sector the fields are half-integer moded. Summing over the contributions from all fixed points, the third term gives the second term in (3.13) whereas the fourth term gives the third term in (3.13) as can be seen from the product representation of the theta functions.
Exercise 4. First we decompose the chiral spinor representation of Spin(6) E into a sum of tersor products of chiral spinor represntations of Spin(4) E = SU (2) × SU (2) r and Spin(2) E with respect to the standard emebedding Spin(4) E × Spin(2) E ⊂ Spin (6)  On a hyper-Kähler M 4 the group U (1) is reduced further to the trivial one, so that we have the following decomposition into representations of SU (2) r × Spin(2) E : (A.9) This indeed has 8 scalars on M 4 , all of which are right-moving on Σ.
Exercise 6. Acting by Q on the first term ofḠ and using (10.10) we have Similarly, action on the second term gives where we used closedness of the 3-form h. Combining these together we indeed arrive at (10.13).
Exercise 7. Recall the following identity: θ(u; τ ) η(τ ) 2 = u exp −2 k≥1 u 2k (2k)! E 2k (τ ) (A. 12) and the definitions of the Pontryagin classes in terms of the eigenvalues ±2πiλ i , i = 1, . . . , dim X /2 (when dim X is odd, one of the eigenvalues is zero and the elliptic genus vanishes identically) of the curvature 2-form R: . . . (A. 16) We then have When p 1 = 0 the dependence on E 2 (τ ) drops out because it always comes multiplied with p 1 , as it is clear from the second line of (A.17).