Regularized inner products and errors of modularity

We develop a regularization for Petersson inner products of arbitrary weakly holomorphic modular forms, generalizing several known regularizations. As one application, we extend work of Duke, Imamoglu, and Toth on regularized inner products of weakly holomorphic modular forms of weights $0$ and $3/2$. These regularized inner products can be evaluated in terms of the coefficients of holomorphic parts of harmonic Maass forms of dual weights. Moreover, we study the errors of modularity of the holomorphic parts of such a harmonic Maass forms and show that they induce cocyles in the first parabolic cohomology group introduced by Bruggeman, Choie, and the second author. This provides explicit representatives of the cohomology classes constructed abstractly and in a very general setting in their work.


Introduction and statement of results
Some of the most fundamental techniques towards arithmetic and geometric applications of cusp forms are based on the Hilbert space structure induced by the Petersson inner product. Recall that for holomorphic cusp forms f, g of weight k ∈ R for SL 2 (Z), this is defined as (1.1) f, g :=ˆS where throughout τ = u+ iv. The integral converges absolutely if f g is a cusp form. There are ways to regularize the integral in many cases beyond cusp forms, as for example, observed by Petersson [24]. Extensions and variants of his idea have been used by Harvey and Moore [19], Borcherds [3], and Bruinier [10] to regularize theta lifts of weakly holomorphic modular forms and harmonic Maass forms. More recently, Duke, Imamoḡlu and Tóth [16] used regularized inner products to obtain interesting arithmetic information about elements of the space M ! 0 of weakly holomorphic modular forms of weight 0 for the full modular group. To state their beautiful formula, for m ∈ N, let f m be the unique modular function for SL 2 (Z) with a Fourier expansion of the form (q := e 2πiτ ) where the sum only runs over those d (mod c) that are coprime to c and d denotes the multiplicative inverse of d (mod c). In Theorem 1 of [16] it was shown that f m , f n can be regularized for m = n such that the regularized value equals (1.3) f m , f n = −8π 2 √ mn c≥1 K(m, n; c) c F 4π √ mn c .
Here, F (x) := πY 1 (x) + 2 x J 0 (x) with J s the Bessel function of the first kind and Y s the Bessel function of the second kind.
In this paper we answer an open problem from [16], namely to regularize f m , f n in the case if m = n and to find a closed formula for this quantity. To achieve this goal, we find a general regularization which works for all half-integral weight weakly holomorphic modular forms. To explain this, recall that for every weakly holomorphic modular form f ∈ M ! k , there exists a harmonic Maass form F of weight 2 − k with ξ 2−k (F ) = f , where ξ 2−k is the differential operator introduced by Bruinier and Funke [13] (1.4) ξ 2−k (f )(τ ) := 2iv 2−k ∂ ∂τ f (τ ).
The Fourier expansion of a harmonic Maass form can be decomposed into a holomorphic and a non-holomorphic part. We write c f (n) for the n-th Fourier coefficient of f and c + F (n) for the n-th Fourier coefficient of the holomorphic part of F . The following theorem summarizes our first main result in the case of the full modular group. It is a generalization of Proposition 3.5 in [13] to the space of weakly holomorphic modular forms. Note that we work with vector-valued modular forms of integral and half-integral weight in the main body of the paper (see Theorems 3.2 and 4.1 for the general results). Remark. The extension of the Petersson inner product is often degenerate and also not positive in general. Thus, strictly speaking, it is not an inner product. Nevertheless, as is common in the literature (see e.g. [16]), we refer to it as a regularized inner product. It follows from Theorem 1.1 that the subspace of weakly holomorphic forms f ∈ M ! k with f, g = 0 for all g ∈ M ! k is given by all ξ 2−k (F ), where F is a harmonic Maass form of weight 2 − k with vanishing holomorphic part F + .
A first application of Theorem 1.1 is A second application of our regularization concerns the case of weight 3/2 modular forms discussed in [15]. For every d ∈ N there exists a unique form g d ∈ M ! 3/2 , the space of weakly holomorphic weight 3/2 modular forms satisfying Kohnen's plus space condition, with Fourier expansion It was shown by Zagier [26] that the coefficients B d (n) are integers given by (twisted) traces of singular moduli. Duke, Imamoḡlu, and Tóth proved in Theorem 2 of [15] that for positive fundamental discriminants d = d ′ , the regularized inner product g d , g d ′ can be expressed in terms of certain cycle integrals of the j-invariant. As a consequence of our regularization, we are able to include the case d = d ′ , which was not covered in [15]. In particular, we obtain the following result. Theorem 1.3. We have where ψ(τ ) := Γ ′ (τ )/Γ(τ ) denotes the Digamma function and J := f 1 − 24. Remarks.
(i) The proof uses our extension of the regularization, the relation to Fourier coefficients of harmonic Maass forms as explained below, and Theorem 1.2 of [11]. (ii) In Section 6, we recall the definition of L-functions for weakly holomorphic modular forms. Theorem 1.3 can also be stated as the identity g 1 , g 1 = 3 4π L * f 1 (0), which is quite striking. (iii) A generalization of Theorem 1.3 to all d ∈ N can be obtained by an extension of Theorem 1.2 in [11] to twisted cycle integrals (which can be treated in a similar way as in [1]).
We next further understand the role of the holomorphic part F + of a harmonic Maass form F of weight 2 − k by providing a cohomological interpretation for its error of modularity Here, k ∈ − 1 2 N 0 , S := 0 −1 1 0 , I := ( 1 0 0 1 ), and | 2−k is the usual action of SL 2 (Z) which we extend linearly to C[SL 2 (Z)] (see also Section 2). Note that for these considerations we concentrate on weakly holomorphic forms of non-positive weight. Such forms have been studied less than their positive weight counterparts.
The error of modularity induces a cocycle in the cohomology group H 1 par (SL 2 (Z), D) studied in [7]. This cohomology group characterizes the space A k (SL 2 (Z)) of all holomorphic functions on H, without any growth conditions, that are invariant under the | k -action of SL 2 (Z). This characterization (cf. Theorem E of [7]) is encoded in an isomorphism E k : A k (SL 2 (Z)) −→ H 1 par (SL 2 (Z), D) and it fits into a program begun by Bruggeman, Lewis, and Zagier [8,9] concerned with Eichler-Shimura-type theorems for very broad classes of automorphic objects. Furthermore, we show that the cohomology class induced by the error of modularity is a much more central object than one might think at first; in fact, it coincides with E k (ξ 2−k (F )). In the special case of integral weight, the result is Theorem 1.4. For k ∈ −N let f ∈ M ! k and let F be a weight 2 − k harmonic Maass form such that ξ 2−k (F ) = f . The cohomology class of E k (f ) in H 1 par (SL 2 (Z), D) equals the cohomology class of the cocycle induced by the error of modularity F S . Theorem 1.3 also shows that F S provides explicit representatives of the cohomology classes constructed abstractly and in a very general setting in [7]. How to find examples of such explicit representatives was an interesting open question once the general results of [7] were established.
Finally, we prove that the non-singular part G k (τ ) (defined by (6.2)) of the cocycle induced by F S encodes further arithmetic information.

Remarks.
(i) It is of interest to compare this result with those of [5]. In both cases we characterize values of L-functions as "Taylor coefficients" of functions with cohomological interpretations. Also, in both papers the cocycles are errors of modularity of the holomorphic (resp. harmonic) part of explicit harmonic (resp. sesquiharmonic) forms. However, in [5], the L-values are associated to cusp forms, whereas here they are L-values of weakly holomorphic modular forms. Another difference is that the relevant coefficient module in [5] is characterized by the action of the ξ-operator, whereas the coefficient module here is defined by geometric means. Specifically, it is characterized by functions which are defined on a special type of domain. In this sense, the constructions here can be seen as a generalization of [5]. (ii) Finally, we note that Theorem 6.2 is reminiscent of the main result of [12]. In [12], a harmonic Maass form is shown to be a "generating function" of (in their case) central values and derivatives of quadratic twists of weight 2 modular L-functions.
The paper is organized as follows. In the next section we recall the definitions of and basic facts about the main objects which we study in the paper: vector-valued modular forms, harmonic Maass forms and also the special functions we require. In Section 3, we define the extension of the regularization of the Petersson inner product, and in Section 4 we prove some of its fundamental properties. In particular, we prove Theorem 4.1 and deduce several applications, including Theorems 1.2 and 1.3. In Section 5, we give a cohomological interpretation of the error of modularity of the holomorphic part of a harmonic Maass form. Finally, in Section 6, we give an extended version of the definition of L-functions of weakly holomorphic modular forms given in [6,18] and prove Theorem 1.5 about special values of such L-functions.

Preliminaries
Unless stated otherwise, we have k ∈ 1 2 Z throughout. Also, we use the principal branch (denoted by Log) of the complex logarithm with the convention that, for x > 0, where log : R + → R is the natural logarithm. This convention extends to all (complex and real) powers, so that e.g.
We have the relations S 2 = (ST ) 3 = Z, where Z := −1 0 0 −1 , i is the standard generator of the center of Mp 2 (Z). Let ρ : Γ → Aut(V ) be a unitary, finite dimensional representation factoring through a quotient by a finite index subgroup of Γ on a complex vector space V with hermitian inner product (v 1 , v 2 ) V which we denote by v 1 · v 2 := (v 1 , v 2 ) V for v 1 , v 2 ∈ V . We write V for the complex conjugate of V and let ρ be the complex conjugate of ρ, which acts on V via ρ(A) v = ρ(A)v. Note that we obtain a C-bilinear pairing V × V → C via (v 1 , v 2 ) → (v 1 , v 2 ) V , which we simply denote by v 1 · v 2 . We let N ρ be the smallest positive integer, such that ρ(T ) Nρ acts trivially on V .
For (M, ϕ) ∈ Γ, we define the Petersson slash operator on functions f : As usual, we extend the action linearly to Remark.
Here and throughout, we use the notation a(x) = O(φ(x)) for functions a : We denote the space of harmonic Maass forms of weight k for ρ by H k,ρ . An element F ∈ H k,ρ has a Fourier expansion, with c F (n, v) ∈ V . The right hand side of (2.1) decomposes into a holomorphic and a nonholomorphic part. To accomplish this, for x ∈ R, set with E k the generalized exponential integral defined in Section 2.2. Note that our definition of W k slightly differs from the one made in [13], but this is only relevant for n > 0, which is not the main focus of their paper. In Section 2.2 we determine the exact difference and also clarify the relation to the choice made in [16] in the specific case of weight 2. Now the decomposition F = F + + F − for k = 1 is given by For k = 1, F − has to be replaced by The function F + is called the holomorphic part and F − the non-holomorphic part of the harmonic Maass form F . We call the Fourier polynomial P F (q) = P + F (q) = n<0 c + F (n)q n the (holomorphic) principal part of F . If F − is identically zero, then F is weakly holomorphic. The subspace of weakly holomorphic modular forms is denoted by M ! k,ρ and we write M k,ρ and S k,ρ for the spaces of holomorphic modular forms and cusp forms, respectively. If F ∈ M ! k,ρ , we simply write c F (n) for c + F (n). Recall the antilinear differential operator ξ k : H k,ρ → M ! 2−k,ρ , defined in (1.4). Here M ! 2−k,ρ is the space of weakly holomorphic modular forms of weight 2 − k with respect to the complex conjugate ρ of ρ. The kernel of ξ k equals M ! k,ρ and by Corollary 3.8 of [13], the sequence is exact (note that in [13], ρ is the Weil representation but the proof easily generalizes).
For k = 1, the first term is replaced by −c − F (0). From (2.6) we deduce two identities that we frequently use. Namely, . The following well known growth estimates for the Fourier coefficients of harmonic Maass forms can be proven as in Lemma 3.4. of [13].
Moreover, if ξ k (F ) is cuspidal, then we have the stronger estimate We next recall an important family of representations given by the Weil representation associated with a finite quadratic module. Let (A, Q) be a finite quadratic module (also called a finite quadratic form or discriminant form), that is, a pair consisting of a finite abelian group A together with a Q/Z-valued non-degenerate quadratic form Q on A. We denote the bilinear form corresponding to Q by (x, y) If the quadratic form is clear from the context, then we simply write A for the pair (A, Q). If L is an even lattice, then the quadratic form Q on L induces a Q/Z-valued quadratic form on the discriminant group L ′ /L of L. Here L ′ is the dual lattice of L, given by The pair (L ′ /L, Q) defines a finite quadratic module, the discriminant module of L. According to Theorem 1.3.2 of [21], any finite quadratic module can be obtained as the discriminant module of an even lattice.
where we set e(x) := e 2πix . We call sig(A) : We also let N be the level of A defined by The Weil representation ρ A associated with A is a unitary representation of Mp 2 (Z) on the group algebra C[A]. If we denote the standard basis of C[A] by (e a ) a∈A , then ρ A can be defined by the action of the generators S, T ∈ Mp 2 (Z) as follows (see also [3,10,25]): We write a · w to denote the standard hermitian inner product on C[A] given by e a · e b = δ a,b for a, b ∈ A.
We next give some examples that relate vector-valued and scalar-valued harmonic Maass forms in important cases.
, then the representation ρ A is the trivial representation and modular forms (and harmonic Maass forms) of weight k for ρ A coincide with scalar-valued modular forms (resp. harmonic Maass forms) for SL 2 (Z). We write S k ⊂ M k ⊂ M ! k ⊂ H k to denote the corresponding spaces of scalar-valued forms.
Under the assumptions made, the components of a vector-valued modular form are modular forms for a finite index subgroup of Mp 2 (Z). Thus, we can obtain such scalar-valued modular forms from a vector-valued form in various ways.
is a scalar-valued harmonic Maass form of level N , weight k, and certain character χ A . The map F → F is often neither injective nor surjective. However, it respects all analytic conditions, i.e., it preserves subspaces of cusp forms, modular forms, and weakly holomorphic modular forms.
We next give a concrete example of this correspondence. . Then, for F ∈ H k,ρ A , the function F defined in (2.10) is a harmonic Maass form for Γ 0 (4M ) in Kohnen's plus-space, i.e., c F (n) = 0 unless n is a square modulo 4M . For M = 1 or M = p prime and k = 2k ′ + 1/2 with k ′ ∈ Z, this map gives an isomorphism between the space H k,ρ A and the space of scalar-valued harmonic Maass forms satisfying the plus-space condition. For k = 2k ′ − 1/2, the same statement holds for ρ. In this case c F (n) = 0 unless −n is a square modulo 4p (and the space M k,ρ is isomorphic to the space of Jacobi forms of weight 2k ′ and index M ). See e.g. Example 2.4 of [3] and §5 of [17].
2.2. Some special functions. An important role in the construction of the regularized inner product is played by generalized exponential integrals and related functions. In this section, we recall their definitions and carefully consider the choices of their branches.
Recall the definition of the incomplete Gamma function initially given for Re(r) > 0 and z ∈ C. For r ∈ C and z ∈ C with Re(z) > 0, we define the generalized exponential integral E r (see This function is related to the incomplete Gamma function via (8.19.1) of [22]: which can be used to continue E r (z) analytically. In particular, for r ∈ 1 2 Z or r ∈ N, this can be done using the relation (see [22], 8.19.12) Indeed, for m ∈ Z and c ∈ R + , we obtain with ν := sgn(m) and µ := (1 + ν)/2 Here, the right-hand side should be interpreted as its analytic continuation, so that for negative m + c the poles of the Gamma function cancel or give zeroes. Thus, for c = 1 or c = 1/2, continuing E m+c is equivalent to analytically continuing E 1 and E 1/2 . We may do this for E 1 by the identity (see [22], 6.2.4): (2.14) where γ is the Euler-Mascheroni constant and Ein is the entire function given by To continue E 1/2 , we use identity 7.11.3 of [22] More generally, by selecting another branch of the logarithm in (2.14) (resp. of √ z in (2.15)), we may obtain a different analytic continuation of E r for r ∈ N (resp. r ∈ 1 2 Z). If the branch cut is given by the ray {xe iϕ |x ∈ R + 0 }, then we denote the corresponding continuation by E r,ϕ . We throughout use the abbreviation E r if ϕ ∈ πZ \ 2πZ, in which case the corresponding branch is the principal branch. We also require (see [22], 8.19.6), that for σ := Re(s) > 1 With the above notation, we can relate the functions W k in (2.3) to the special functions used in Section 3 of [13].
Remark. Bruinier and Funke [13] used the function shows that these two choices differ by an additive constant for x > 0. For x < 0, they agree since E k (−2x) is real in that case.
Remark. We also note that It is convenient to also use the W -notation for some complex arguments setting, for z ∈ C \ R − 0 , Furthermore, in order to relate our results to [16], we compare W k (v) to the function e 2πnv M n (v) used in [16] for k = 2. Recall the definition where M a,b and W a,b are the standard Whittaker functions given, for Re(b ± a + 1/2) > 0 and v > 0, by Proposition 2.5. For n ∈ N, we have Proof. For the first term of (2.25), we use the definition (2.22) of M(v). Following the proof of Proposition 1 of [16], we employ (2.23) to write, for Z ∈ {M, W }, Then we have We evaluate . To compute h M and h ′ M , we use integration by parts to obtain for σ ≫ 0 We next turn to the terms involving the derivatives h ′ M and h ′ W . We have This yields Similarly, This shows that the contribution from the derivatives of h ′ M and h ′ W to (2.22) is given by Combining the above yields We rewrite each integral by viewing it as limit of integrals we may identify. First, Integration by parts yields for the integral on the right-hand side Upon taking the limit as a → 1 − , this gives In the same way, The last integral may be decomposed as which, upon taking a → 1 + , gives by (2.14) Thus, adding (2.30) and (2.32), we obtain by (2.14) the contribution to (2.27) as claimed.
We require another special function, defined in equation (2.4) of [16] for v > 0 and n ∈ −N: where the second equality follows by 13.18.5 of [22] and Lemma 2.4. Finally, a straightforward calculation relates E 1/2 to the β-functions.
Lemma 2.6. We have, for x > 0, that

Regularized Petersson inner products
There are various ways to define regularized inner products. For instance, if f, g ∈ M ! k satisfy c f (n)c g (n) = 0 for n ≤ 0, then the inner product used in [16] is given by where F t := {τ ∈ F | v ≤ t} is the fundamental domain truncated at height t with F the standard fundamental domain for SL 2 (Z) on H. However, this definition does not include all cases, such as f, f .
In this paper, we define a generalization of the regularization that was used in [14]. Our generalization covers all weakly holomorphic forms. It builds upon the previously known methods but also deals with the cases where these fail.
In the following, we let k ∈ 1 2 Z, f, g ∈ M ! k,ρ , and s, w ∈ C. We set ζ := Re(w) and σ := Re(s) and define which certainly converges absolutely if ζ ≫ 0. The aim of this section is to show that, for every ϕ ∈ (π/2, 3π/2) \ {π}, the integral I(f, g; w, s) has an analytic continuation I ϕ (f, g; w, s) to U ϕ × C, where U ϕ ⊂ C is a certain open set described below. It seems then natural to define the regularized Petersson inner product as the value of I ϕ (f, g; w, s) at w = s = 0. However, we want the inner product to be hermitian, so that f, f is real. The problem now is that I(f, f ; 0, 0) is not real in general because of the presence of the generalized exponential integrals in (3.2) below. To overcome this, we take the real part of this expression as a definition, which turns out to be natural. For instance, it is independent of the choice of the analytic continuation. Another difficulty is that I ϕ (f, g; w, s) is not analytic in (0, 0) if f · g has a constant term. In this case we show that there is a natural way to define I ϕ (f, g; 0, s) and this function can be continued to a meromorphic function in s ∈ C. We then denote by CT s=0 (I ϕ (f, g; 0, s)) the constant term in the Laurent expansion of The main result of this section is the following.
Theorem 3.2. For each f, g ∈ M ! k,ρ the value f, g := f, g ϕ is independent of the choice of ϕ. It satisfies f, g = g, f and, in particular, f, f ∈ R.
In the region of convergence we have (3.3) I(f, g; w, s) = lim We insert the Fourier expansions of f and g and carry out the integration on u to obtain Using Lemma 2.3 and the asymptotic behavior of the incomplete Gamma function, we deduce that the limit of the second summand as t → ∞ converges absolutely and uniformly in w for ζ > −ε for some ε > 0. Since, in addition, the integral over F 1 in (3.3) defines an entire function in w, this implies that On the other hand, for σ, ζ ≫ 0 This is a finite sum and, for ϕ ∈ (π/2, 3π/2) \ {π}, can be analytically continued to C\R f,g (ϕ) to give the function n≥0 c f (−n) · c g (−n)E 2−k+s,ϕ (w − 4πn), implying the claim.
Remark. For σ ≫ 0, the only term in (3.2) which is not analytic at w = 0 is It has, however, a well-defined value at w = 0 as given in (2.16) which we use to define I ϕ (f, g; 0, s). The function s → I ϕ (f, g; 0, s) then has a meromorphic continuation to C since the first line in (3.2) (for w = 0) is entire and the function s → E 2−k+s (−4πn) is entire for n = 0. For n = 0 it has a simple pole at s = k − 1.
Proof of Theorem 3.2. The claim that f, g is well-defined follows by Proposition 3.3. The independence comes from the fact that the different branches of the generalized exponential integral differ by a real multiple of 2πi at the point −4πn. For k ∈ Z, this follows from (2.13) and (2.14) and for k ∈ 1/2 + Z it is a consequence of (2.13) and (2.20).

Relation to Fourier coefficients of harmonic Maass forms.
For F ∈ H k,ρ and G ∈ H 2−k,ρ , we define a bilinear pairing which is always a finite sum. The following theorem generalizes Proposition 3.5 of [13]. Remark. Existence of a G ∈ H 2−k,ρ with ξ 2−k (G) = g follows from the exactness of (2.5).
Proof. Using Definition 3.1 and (3.2), we can write We apply Stokes' theorem, as in the proof of Proposition 3.5 of [13], to the integral over F t , which gives (for k = 1) Since lim t→∞ W 2−k (2πnt) = 0 for n < 0, we obtain where we dropped ϕ since Re(E 2−k (−4πn)) is independent of it. Next, we use that for any t and n = 0, we have .
Then we substitute E 2−k+s (0) = 1 1−k+s (see (2.16)), which is valid for σ > k − 1. Finally, we use (2.7) again, implying the statement of the theorem in this case. For k = 1, the proof is completely analogous using that c g (0)´t 1 dv v = c − G (0) log(t) and CT s=0 E 1+s (0) = 0. The following corollary generalizes so-called Zagier duality between weakly holomorphic modular forms of weight k and 2 − k.
We next obtain information about the extent of non-degeneracy of our inner product. Before we accomplish this in Corollary 4.5, we state two lemmas. The first one is a modularity criterion for formal power series which is well-known (see, for instance, Theorem 3.1 of [4] or Proposition 4.3 of [14]).
Then f is the q-expansion of an element of M k,ρ if and only if {f, g} = 0 for all g ∈ M ! 2−k,ρ . Remarks.
(ii) Using the exactness of (2.5) and a variant of Theorem 3.1 of [4], the existence of harmonic Maass forms with prescribed principal parts can be shown as in Proposition 3.11 of [13].
Lemma 4.4. For every Fourier polynomial P (q) = n<0 c P (n)q n satisfying P | k T = P and P | k Z = P , there exists a harmonic Maass form F ∈ H k,ρ with ξ k (F ) ∈ S 2−k,ρ , such that P = P F .
Using these results, we obtain a precise description of the space on which the pairing is degenerate. Now assume that f, g = 0 for all g ∈ M ! k,ρ . This implies, in particular, that f, g = 0 for every g ∈ M k,ρ . Thus, {F, g} = 0 for every F ∈ H 2−k,ρ with ξ 2−k (F ) = f and every g ∈ M k,ρ by Theorem 4.1. By Lemma 4.4, we can assume that a F (n) = 0 for every n < 0 by subtracting, if necessary, a harmonic Maass form F with the same principal part as F and with ξ 2−k ( F ) ∈ S k,ρ . By Corollary 3.9 of [13], we must have that F is weakly holomorphic so that in fact ξ 2−k ( F ) = 0. However, {F + , g} = {F, g} = 0 for every g ∈ M ! k,ρ implies that F + is the q-expansion of a holomorphic modular form in M 2−k,ρ by Lemma 4.3. Thus, F − F + ∈ H k,ρ with ξ 2−k (F − F + ) = ξ 2−k (F ) = f has a vanishing holomorphic part. Now consider the subspace T := T 2−k,ρ ⊂ H 2−k,ρ spanned by all F ∈ H 2−k,ρ with F + ∈ M ! 2−k,ρ . The sesquilinear form ·, · induces a non-degenerate hermitian sesquilinear form on the quotient space M ! 2−k,ρ /ξ 2−k (T ). Remark. It can happen that ξ 2−k (T ) = M ! k,ρ ; for instance this is the case if ρ is the trivial representation and k = 2. In Proposition 5 of [16], the Fourier expansions of a basis of H 2 was determined. For the convenience of the reader, we state the result we need, using our notation. For m ∈ −N the basis elements F m of H 2 are weakly holomorphic, whereas for m ∈ N, F m has an expansion of the form For m ∈ N the basis elements F m ∈ H 2 and the basis elements f m ∈ M ! 0 , defined in (1.2) are linked by (see Proposition 5 of [16])  [11] and [15], we define for every discriminant d ∈ N and f ∈ M ! 0 the trace where Q d denotes the set of integral binary quadratic forms of discriminant d, Γ Q ⊂ Γ = SL 2 (Z) is the stabilizer of Q in Γ, and the cycle integral is regularized as in (1.10) of [11]. Note that a different regularization for these cycle integrals has been studied in [2]. Let ρ = ρ A be the Weil representation of Mp 2 (Z) as in Example 3 for N = 1, and let g d ∈ M ! 3/2,ρ be the unique weakly holomorphic modular form having a Fourier expansion of the form To compare our result with the one in [15] (and prove the statement of Theorem 1.3 in the introduction), let f, g ∈ M ! k (4) be weight k weakly holomorphic forms for Γ 0 (4) whose Fourier coefficients vanish unless (−1) k−1/2 n ≡ 0, 1 (mod 4). Moreover, let f , g ∈ M ! k,ρ be the corresponding vector-valued modular forms under the isomorphism given in Example 3. The map f → f gives c f (n/4) = c f (n). In [15], the regularized inner product of f and g is defined as whenever the limit exists. Suppose that c f (−n) · c g (−n) = 0 for all n ≥ 0. Then we have, for t ≥ 2, where F t (4) is a truncated fundamental domain for Γ 0 (4) as in [15] and the limit exists. That the limit exists and equals our regularized inner product follows from (3.5).
To show the first equality, let G be a harmonic Maass form with ξ 2−k (G) = g and similarly G ∈ H 2−k,ρ the corresponding vector-valued form (which satisfies ξ 2−k (G) = g). We have and similarly for f and f . Inserting Fourier expansions of f and G shows that Lemma 2 in [15] is equivalent to (for t ≥ 2) and in the limit we obtain (4.6). To see this, note that ρ(I, −1) = (−1) 2k since f (τ ) = (−1) 2k ρ(I, −1)f (τ ) for every f ∈ M ! k,ρ and so it is natural to make this assumption throughout.
Let f ∈ M ! k,ρ with Fourier expansion By (2.5), there exists an F ∈ H 2−k,ρ such that ξ 2−k (F ) = f . We first express F − as a nonholomorphic Eichler integral. For this, we let f c (τ ) := f (−τ ) for f : H → C. Using the same notation as in Section 2.2, we set Proof. With 8.8.13 of [22], we deduce that in particular G f is harmonic. To complete the proof, it thus suffices to show that G f has an expansion of the same type as that of (2.3). Indeed, we first see that as claimed. The remaining term of G f has the shape (2.3).
The next lemma justifies calling G f an Eichler integral. For w ∈ C with Re(w) ≫ 0, set Lemma 5.2. The function F τ (w), originally defined for Re(w) ≫ 0, can be analytically extended to C\(−∞, 2πM ], where M ∈ Q + is maximal such that c f (−M ) = 0. It can further be extended continuously from above to (−∞, 2πM ). For w ∈ C\(−∞, 2πM ] we have: and in particular Proof. We first note that, for Re(w) ≫ 0, We make the change of variables z = −τ + iz 1 w−2πn , to obtain 1, 2v(w − 2πn)).
With the choice of branch of the incomplete Gamma function in Section 2.2, this implies that the value at w = 0 of the continuous extension of Using Lemma 2.4, we deduce (5.3).
We are now ready to give a formula for the error of modularity of F + . This leads to a cohomological interpretation.
Proposition 5.3. With the notation of Lemma 5.1, we have, for τ ∈ H Proof. The functions in (5.1) are real-analytic. We slash the left-hand side of (5.1) by S −I. Writing v = (τ − τ ) 1 2i we can view the resulting function as a function in two independent variables, namely τ and τ . The identity and (2.21) imply that the left-hand side of the resulting equation is holomorphic and thus independent of τ . Therefore the same holds for its right hand side. So, using that Si = i and setting τ = −i, we obtain Using (5.8), this implies the result. To obtain the form of the last sum appearing in the statement of the proposition, we employ (2.7).

5.2.
Cohomology. In this section we show that the error of modularity F S has a cohomological interpretation. The space it belongs to was introduced in Definition 1.13 of [7], which we now recall. Note that we reverse the roles of the upper-and lower-half-plane in comparison to [7]. The two formalisms are equivalent via the involution ι given by ι(f )(τ ) := f (τ ). For the remainder of this section we fix k ∈ − 1 2 N 0 . We first define the spaces of excised semi-analytic vectors. Let a ∈ P 1 (Q) := Q ∪ {i∞} be a cusp of SL 2 (Z) (here cusps are not assumed to be necessarily SL 2 (Z)-inequivalent). Suppose that M (i∞) = a for some M ∈ SL 2 (Z). For a, ε ∈ R + , set where H − is the lower half-plane. For E a finite set of cusps of SL 2 (Z) a set Ω ⊂ P 1 (C) is called an E-excised neighborhood of H ∪ P 1 (R) if there exists a neighborhood U of H ∪ P 1 (R) and pairs of positive reals (a a , ε a ) (a ∈ E) such that U \ a∈E V a (a a , ε a ) ⊂ Ω. An example is shown in Figure 1. Figure 1. An {i∞, a 1 , a 2 }-excised neighborhood.
We also recall the map prj 2−k , used in Section 1.5 of [7] to move between the projective model and the plane model. For any open subset U ⊂ P 1 (C) not containing −i, this map sends a function f : U → C to prj 2−k (f ) : U → C defined by For an open subset U ⊂ P 1 (C), we let O(U ) be the space of holomorphic functions U → C and define the space of excised semi-analytic vectors associated with a finite set {a 1 , a 2 , . . . , a n } of cusps as D 2−k,ρ [a 1 , a 2 , . . . , a n ] := prj −1 where Ω runs over all {a 1 , a 2 , . . . , a n }-excised neighborhoods.
Example 4 (Special case k ∈ −N 0 ). An element of the space D 2−k,ρ [a 1 , a 2 , . . . , a n ] is (represented by) a function f with the following properties: (i) It is defined on some neighborhood U of H ∪ P 1 (R) from which we have truncated some "wedges" V a1 , . . . , V an . (ii) It is holomorphic in U unless the neighborhood contains i∞ in which case we allow poles of order at most 2 − k at i∞.
The main coefficient module we use is defined as the inductive limit where {a 1 , a 2 , . . . , a n } ranges over all finite sets of cusps of SL 2 (Z).
To illustrate the definition, assume again that k ∈ −N 0 . Then an element of D 2−k,ρ is (represented by) a function f with the following properties: (i) It is defined on some neighborhood U of H ∪ P 1 (R) from which we have truncated some "wedge" V a j for each cusp in some set of cusps {a 1 , . . . , a n }. (ii) It is holomorphic in U unless the neighborhood contains i∞. In the latter case we allow poles of order at most 2 − k at i∞. In Proposition 1.14 of [7], it is proved that D 2−k,ρ is a SL 2 (Z)-module via | 2−k,ρ . The following Proposition is crucial for the cohomological interpretation of the error of modularity.
Proposition 5.4. The function F S belongs to D 2−k,ρ .
Proof. The holomorphicity of F s on H follows by definition since F + is holomorphic.
On the other hand, since f o (z) = c + O(e −αy ), as y → ∞, for some c ∈ C and α > 0, the integral on the right hand side of (5.7) defines a function which can be extended to a holomorphic function everywhere except for the negative imaginary axis (corresponding to the possible poles of the integrand). To examine the terms involving the W 2−k -function we first note that, if u = 0, then −πin(τ + i) and −πin(i − 1 τ ) do not lie on the real line. Thus the terms involving W 2−k extend holomorphically to C \ i[0, −∞). Using Proposition 5.3, we deduce that F S is a holomorphic function on some neighborhood of H ∪ P 1 (R) not containing −i and with the sectors V 0 and V i∞ excised. Therefore, F S ∈ D 2−k,ρ [0, i∞] and, thus, by definition, it is in D 2−k,ρ .
To state our next theorem we recall the definition of parabolic cohomology groups. Note that since F + is invariant under T , F S satisfies the period relations, i.e., it is annihilated in terms of the action of | 2−k,ρ by S + I and U 2 + U + I where U := T S. Thus the map M → F + | 2−k,ρ (M − I) induces a parabolic 1-cocycle, hence, by Proposition 5.4, a cohomology class.
Theorem 5.6. The map σ : SL 2 (Z) → D 2−k,ρ defined via induces a cohomology class in H 1 par (SL 2 (Z), D 2−k,ρ ). We next show that the cohomology class of Theorem 5.6 coincides with the cohomology class attached to f under one of the Eichler-Shimura isomorphisms given in [7]. In particular, this implies that the cohomology class of Theorem 5.6 is not trivial.
Proposition 5.7 (Theorem E(i)(a) of [7]). Let k ∈ R \ N ≥2 , and let A k,ρ denote the space of holomorphic functions f on H satisfying f | k,ρ M = f for all M ∈ SL 2 (Z). Furthermore, for τ 0 ∈ H fixed, let E k be the map assigning to f ∈ A k,ρ the map Then E k induces an isomorphism between A k,ρ and H 1 par (SL 2 (Z), D 2−k,ρ ).
Remark. The image of E k (f ) in H 1 par (SL 2 (Z), D 2−k,ρ ) is independent of τ 0 . In order to prove that the cohomology class of σ in fact coincides with the cohomology class of E k (f c ), we need the following explicit formula.
Proposition 5.8. Suppose that 2 − k = m + b with m ∈ N and b ∈ {1/2, 1}. Then, for each τ ∈ H with u > 0, we have Proof. Lemma 5.2 yields that n∈Q + c f (−n) (−2πn) k−1 q n equals the value at w = 0 of the continuation of the function of w: If 2 − k = m + b with b = 1/2 or b = 1 and m ∈ N, then (2.13) implies that (5.11) equals As a function of τ this is holomorphic for w = 0 since Im(2πn(iτ − 1)) = 2πnu > 0. Substituting this into (5.10) and taking the limit as w → 0 + , we obtain the double sum in (5.9). The remaining terms are obtained directly from (5.10).
Finally, we are ready to state the main theorem of this section.
Theorem 5.9. We assume the notation of Proposition 5.7. Then the cohomology class of E k (f c ) in H 1 par (SL 2 (Z), D 2−k,ρ ) equals the cohomology class of the cocycle σ. Proof. The statement of the theorem is equivalent to (5.12) E k (f c ) − σ ∈ B 1 (SL 2 (Z), D 2−k,ρ ).
To prove (5.12), we need to show that there exists a ∈ D 2−k,ρ such that, for each M ∈ SL 2 (Z), The formulas for E k (f c )(M ) and σ(M ) imply that this is equivalent to for all τ in some excised neighborhood of H ∪ P 1 (R).
We next find an a ∈ D 2−k,ρ satisfying (5.15). With the definitions of m and b as above, we let Recall, from Section 2, that E b,0 denotes the branch of E b with the cut on the non-negative real axis. We denote the logarithm branch used in the definition of E b,0 by Log − . Then (5.16) E b (2πn(iτ − 1)) = E b,0 (2πn(iτ − 1)).
First, in Theorem 5.4, it is shown that F + | 2−k,ρ (M − I) is in D 2−k,ρ , i.e., it is holomorphic on such a domain. Next, according to Lemma 5.1. of [7] and Proposition 5. is also in D 2−k,ρ and thus holomorphic on a domain of the same kind. Finally, G f is also holomorphic on such a domain since: · τ → E b,0 (2πn(iτ − 1)) is holomorphic everywhere except for (−i)[1, ∞) since the cut of E b,0 is [0, ∞), ·´i ∞ i f c (z)(z + τ ) k−2 dz is holomorphic everywhere except for a line joining −i to −i∞, · all other terms in the formula of G f are holomorphic everywhere (except for −i).
Thus, we have proved that the three terms appearing in (5.17) are analytic in a neighborhood of H ∪ P 1 (R) that does not contain −i and from which we have excised some sectors V 0 , V i∞ , M −1 V i∞ . Hence, by uniqueness, (5.17) holds for all τ in such an excised neighborhood of H ∪ P 1 (R).
The holomorphicity of G f on an excised region just proved shows further that for some a ∈ D 2−k,ρ for all M ∈ SL 2 (Z), i.e., the cohomology classes of σ and E k (f c ) coincide.
A direct consequence of Theorem 5.9 is that the cocycle σ is not cohomologically trivial. does not vanish in H 1 par (SL 2 (Z), D 2−k,ρ ). Proof. By Theorem 5.9, the cohomology class of σ equals that of E k (f c ). However, Theorem 5.7 asserts that the map induced by E k is an isomorphism. Since f c is non-trivial, we deduce the non-vanishing of our cohomology class.

Connections to L-values
For simplicity, we consider only integral weight k in this section and also assume that ρ is trivial. In [6,18] L-functions for weakly holomorphic modular forms with vanishing constant Fourier coefficient were investigated. We briefly recall them in the slightly more general context that includes weight 0 and weakly holomorphic modular forms with non-vanishing constant term.

Remarks.
(i) The growth estimates of Lemma 2.3 imply that the two series are convergent.
(ii) One can show that this definition is independent of t 0 .
(iii) For weight 0, the value L * g (0) agrees with the definition made in (1.10) of [11] for the "central value" of the L-function of a weakly holomorphic modular form of weight 0 with vanishing constant term.
The main result of this section concerns where f := f c o − c f (0). We note that the first term has a well defined value as τ goes to 0 from within H. Therefore, by Proposition 5.3, the function G k can be thought of as the part of F S which