Intersections of special cycles on Shimura curves and Siegel Maass forms Thanks: Research of all three authors is supported by the DFG Collaborative Research Centre TRR 326 “Geometry and Arithmetic of Uniformized Structures”, project number 444845124. Furthermore, the second author is supported by the Heisenberg Program, project number 539345613. Jan Hendrik Bruinier, Yingkun Li, Martin Möller Abstract . We show that the generating series of the number of pairs of geodesics on a compact Shimura curve with given discriminants and intersection angle are coefficients of a non-holomorphic Siegel modular form, a theta lift of the constant function. This retrieves and generalizes counting results of Rickards via the Siegel-Weil formula. More generally, we study the genus two theta lift of Maass forms on this Shimura curve and prove a Fourier-Taylor expansion in terms of some generalized Whittaker functions. We also provide a geometric interpretation of all Fourier coefficients of these theta lifts in terms of averages of geodesic Taylor coefficients over special cycles. 1. Introduction Computing the number of closed geodesics and of Heegner points of given discriminant on a Shimura curve and understanding the distribution of these subsets has a long history. An incomplete account starts for the modular curve with Siegel’s estimate [ 42 ] , continues with the equidistribution results by Linnik [ 30 ] and Duke [ 9 ] and includes numerous quantitative versions exploring subconvexity bounds, see e.g. the survey [ 32 ] . A key step in the latter approaches is to interpret the sum of the evaluations of a Maass form at Heegner points of discriminant D as the D -th Fourier coefficient of a Maass form of weight 1/2 , in fact a theta lift, following ideas of Maass and studied in detail in this non-holomorphic context by Katok-Sarnak [ 19 ] . Counting pairs of geodesics. Similar questions for the number and distribution of intersection points of two geodesic curves with given discriminant are much less explored. (For references to counting and equidistribution sorted by length see ‘Related results’ below.) One of the few results in this direction is the work of Rickards ( [ 40 ] , see also [ 39 ] for the case of the modular curve), who computed the number of intersection points by studying pairs of optimal embeddings of quadratic number fields into quaternion algebras. More precisely, under some ‘admissibility’ condition on the discriminants he showed that this number admits a nice expression (that we recall in Theorem 2.6 ) in terms of local factors. One of our motivations was to provide an expression in the general case together with an explanation for this factorization. Let B be an indefinite quaternion algebra over \mathbb{Q} which is not globally split. Fix an Eichler order \mathcal{O}_{\mathfrak{M}} of level \mathfrak{M} in B and consider the compact Shimura curve X=\Gamma_{\mathfrak{M}}\backslash\mathbb{H} where \Gamma_{\mathfrak{M}} are the units of norm one in \mathcal{O}_{\mathfrak{M}} . Our first main result is that the total number of intersection points of two geodesic curves on X of discriminants D_{1} and D_{2} with intersection angle \theta are essentially the coefficients of a Siegel Maass form G of genus two and weight 1/2 . More precisely, this number is encoded in the non-archimedian part of the Fourier coefficient G_{T} of index T given a positive definite matrix T=\left(\begin{smallmatrix}D_{1}&b\\ b&D_{2}\end{smallmatrix}\right) where b=\cos(\theta)\sqrt{D_{1}D_{2}} . What about the other Fourier coefficients of G ? Two non-intersecting geodesics have a unique common perpendicular, whose length is a parameter that can be taken as replacement for the intersection angle. Similarly, given one geodesic and a Heegner point there is unique perpendicular geodesic through the point. Finally, two Heegner points have a unique geodesic segment connecting them, see Figure 1 for pictures of these cases. There is one Siegel Maass form to count them all! \gamma_{1} \gamma_{2} x_{3} \gamma_{1} \gamma_{2} . . \gamma_{2} . x_{1} x_{1} x_{2} Figure 1. Two geodesics intersecting (top left) or with a common perpendicular (top right). Geodesic through a point, perpendicular to a geodesic (bottom left) or through a second point (bottom right). Theorem 1.1 . Consider the Shimura curve X as above, and let \tau=u+iv be a variable in the Siegel upper half space \mathbb{H}_{2} of genus 2 . There is a Siegel Maass form G(\tau) of genus 2 and weight 1/2 with the following properties. The T -th Fourier coefficient G_{T}(v) for T=\left(\begin{smallmatrix}D_{1}&b\\ b&D_{2}\end{smallmatrix}\right) is the product |R_{T}|\cdot W_{T,\infty}(v) where W_{T,\infty}(v) is some explicit archimedian Whittaker function given in ( 5.1 ) and where R_{T} is respectively i) if T is positive definite: the set of intersection points of geodesics \gamma_{i} of discriminant D_{i} with intersection angle \cos(\theta)=b/\sqrt{D_{1}D_{2}} ii) if T is indefinite with D_{1},D_{2}>0 : the set of pairs of geodesics \gamma_{i} of discriminant D_{i} with common perpendicular \gamma with \cosh(\ell_{\mathrm{hyp}}(\gamma))=b/\sqrt{D_{1}D_{2}} iii) if T is indefinite with D_{1}>0>D_{2} : the set of pairs consisting of a geodesic \gamma_{1} of discriminant D_{1} and a Heegner point x_{2} of discriminant D_{2} such that the segment \gamma orthogonal to \gamma_{1} and through x_{2} satisfies \sinh(\ell_{\mathrm{hyp}}(\gamma))=b/\sqrt{-D_{1}D_{2}} iv) if T is indefinite with 0>D_{1},D_{2} : the set of Heegner points x_{i} of discriminant D_{i} such that the connecting geodesic segment \gamma satisfies \cosh(\ell_{\mathrm{hyp}}(\gamma))=b/\sqrt{D_{1}D_{2}} on the curve X . The number |R_{T}| is a product of local factors, explicitly for \gcd(D_{1},D_{2},D_{1}D_{2}-b^{2})=1 given in Theorem 2.6 and in the general case in Theorem 5.10 together with Theorem 5.11 . Note that the Whittaker function satisfies the transformation law (1.1) \displaystyle W_{T,\infty}(av\,{}^{t}a) \displaystyle\;=\;\det(a)^{3/2}\cdot W_{{}^{t}aTa,\infty}(v) for a\in\operatorname{GL}_{2}^{+}(\mathbb{R}) , and for v in the positive definite (2\times 2) -matrices, see ( 5.2 ). Hence, the index T can always be reduced to a diagonal matrix with diagonal entries \pm 1 . A theta lift. To prove the theorem we consider the rational quadratic space V given by the trace zero elements of B equipped with the negative of the reduced norm as a quadratic form. The signature of V is (2,1) and its general spin group \operatorname{GSpin}(V) is isomorphic to the group B^{\times} of invertible elements of B . The intersection L\;=\;V\cap\mathcal{O}_{\mathfrak{M}} defines an even lattice. The Siegel theta function \theta_{L}^{(2)}(\tau,z) of genus 2 associated with the lattice L (and the standard Gaussian on V(\mathbb{R}) ) is a non-holomorphic automorphic form which is invariant under \Gamma_{\mathfrak{M}} in the ‘orthogonal’ variable z\in\mathbb{H} and a modular form of weight 1/2 in the ‘metaplectic’ variable \tau\in\mathbb{H}_{2} for a congruence subgroup \widetilde{\Gamma} of the metaplectic group of genus 2 . For a Maass form f of weight 0 for the group \Gamma_{\mathfrak{M}} with Laplace eigenvalue \lambda we consider the theta integral (1.2) \displaystyle I(\tau,f)\;=\;\int_{\Gamma_{\mathfrak{M}}\backslash\mathbb{H}}f(z)\theta_{L}^{(2)}(\tau,z)\,d\mu(z), where d\mu(z) denotes the usual invariant measure on \mathbb{H} . It defines a Siegel Maass form of weight 1/2 for the group \widetilde{\Gamma} , whose infinitesimal character we determine in Proposition 3.1 . Theorem 1.1 will be proved by carefully analyzing the theta integral in the special case when f is constant. In fact, the Maass form G is given by the theta integral I(\tau,1) , which is just the average of the theta function over the Shimura curve X and can be evaluated by means of the Siegel-Weil formula. In this way G can be identified with a specific Siegel Eisenstein series of weight 1/2 and genus 2 , see Theorem 5.1 . Its Fourier coefficients can be computed in terms of local Whittaker functions, and the quantity R_{T} arises as a products of local non-archimedian Whittaker functions in Theorem 5.2 . Employing explicit formulas for these due to Kudla and Yang [ 26 , 47 ] we derive the result of Rickards. Moreover, this approach allows for a generalization to more general level structures. General input and generalized Whittaker functions. However, this argument involving the Siegel-Weil formula is limited to the case when f is constant. The main part of Section 3 is devoted to the case of a general Maass form f . This will also lead to a second proof of (large part of) Theorem 1.1 . We now turn to a description of our main result in the general case. It turns out that it requires a finer analysis of the coefficients F_{T}(v) in the Fourier expansion F(\tau)\;=\;\sum_{T\in\operatorname{Sym}_{2}(\mathbb{Q})}F_{T}(v)\,\mathbf{e}(\operatorname{tr}(Tu)) of a Siegel Maass form F of genus 2 . For simplicity, in this exposition we only consider the case when the index matrix T is positive definite, referring to Section 3.1 for general regular T . The special orthogonal group \operatorname{SO}(T) of the positive definite quadratic form T acts on the space of smooth functions h:\mathbb{H}_{2}\to\mathbb{C} satisfying h(\tau+b)=\mathbf{e}(\operatorname{tr}(Tb))h(\tau) and having a fixed infinitesimal character. Consequently, the Fourier coefficient F_{T}(v) has an expansion in terms of the characters of the compact abelian group \operatorname{SO}(T) . Fix a matrix B\in\operatorname{GL}_{2}(\mathbb{R}) with T={}^{t}BB . This determines an isomorphism \operatorname{SO}_{2}(\mathbb{R})\to\operatorname{SO}(T) , a\mapsto{}^{t}\!Ba\,{}^{t}\!B^{-1} , and an isomorphism of the character group of \operatorname{SO}(T) with \mathbb{Z} . We obtain an expansion F_{T}(v)\;=\;\sum_{n\in\mathbb{Z}}F_{T,n}(v), where F_{T,n}(v) transforms according to the n -th character of \operatorname{SO}(T)/\{\pm 1\} , see ( 3.6 ). In particular, the T -th Fourier coefficient I_{T}(v,f) of our theta integral ( 1.2 ) possesses such an expansion, whose coefficients we denote by I_{T,n}(v,f) . In Section 3.4 we construct an explicit Whittaker function \mathcal{W}^{+,+}_{B,n}(v,s) for v a positive definite (2\times 2) -matrix and s\in\mathbb{C} . Here the superscript refers to the case the T has two positive eigenvalues. In the body of the text, where we consider general T , there will be further cases depending on the signature of T . Under right translation by a\in\operatorname{GL}_{2}(\mathbb{R}) the function \mathcal{W}^{+,+}_{B,n}(v,s) satisfies the transformation law \mathcal{W}^{+,+}_{Ba,n}(v,s)\;=\;\det(a)^{-1}\mathcal{W}^{+,+}_{B,n}(av\,{}^{t}a,s), analogous to ( 1.1 ). Under left translation of B by \operatorname{SO}_{2}(\mathbb{R}) it transforms with the character of index n , see Remark 3.13 . Moreover, it is holomorphic in s and invariant under the transformation s\mapsto 1-s . The function \mathcal{W}^{+,+}_{B,n}(v,s)\mathbf{e}(\operatorname{tr}(Tu)) is an eigenfunction of the invariant differential operators on Siegel Maass forms of weight 1/2 induced by the Casimir elements of the symplectic group. Similar Whittaker functions were studied by Niwa in weight zero for positive definite T and by Moriyama for integral weights and general T , see e.g. [ 34 ] , [ 33 ] . We prove that the coefficient I_{T,n}(v,f) of the theta integral is a constant multiple of \mathcal{W}^{+,+}_{B,n}(v,s) , where we have written the Laplace eigenvalue of f as \lambda=s(1-s) . We show that the constant of proportionality can be described in terms of geodesic Taylor coefficients of f at the intersection points of geodesics on X with characteristic matrix as in Theorem 1.1 . Geodesic Taylor expansion. To describe this in more detail, recall that the Cartan decomposition of \operatorname{SL}_{2}(\mathbb{R}) implies that any z\in\mathbb{H} can be written in the form z=k_{\theta}a_{t}i , where a_{t}\;=\;\begin{pmatrix}e^{t/2}&0\\ 0&e^{-t/2}\end{pmatrix},\qquad k_{\theta}\;=\;\begin{pmatrix}\cos\theta&\sin\theta\\ -\sin\theta&\cos\theta\end{pmatrix} with t\in\mathbb{R}_{\geq 0} and \theta\in[0,\pi) . The pair (t,\theta) defines the standard geodesic polar coordinates of z centered at i , where t is the geodesic distance from z to i , and 2\theta the angle determined by the geodesic ray i\mathbb{R}_{\geq 1} and the geodesic ray from i to z . The Maass form f has a geodesic Taylor expansion at the point z_{0}=i of the form f(z)\;=\;\sum_{n\in\mathbb{Z}}f_{n}(z_{0})P^{-|n|}_{-s}(\cosh(t))\cdot e^{2in\theta}, where P^{-\mu}_{\nu}(x) denotes the classical Legendre function, and the n -th coefficient f_{n}(z_{0}) at z_{0} is given by Proposition 3.10 , see also [ 11 ] . More generally, if z_{1}\in\mathbb{H} is any point, we choose a translation matrix g\in\operatorname{SL}_{2}(\mathbb{R}) such that z_{1}=gi . We obtain geodesic polar coordinates centered at z_{1} by writing z=gk_{\theta}a_{t}i . Then t denotes again the hyperbolic distance from z to z_{1} , and 2\theta the angle determined by the geodesic ray g(i\mathbb{R}_{\geq 1}) and the geodesic ray from z_{1} to z . Note that the angle actually depends on the choice of g , not only on z_{1} . The geodesic Taylor expansion of f at the point z_{1} (with respect to g ) is defined as the geodesic Taylor expansion of f\mid g at i . The corresponding Taylor coefficients are denoted by f_{n}(z_{1}) . Our main result for positive definite T is now as follows. Theorem 1.2 . Let the notation be as above. The n -th coefficient of I_{T}(v,f) is given by \displaystyle I_{T,n}(v,f) \displaystyle\;=\;\mathcal{W}^{+,+}_{B,n}(v,s)\cdot\sum_{x\in R_{T}}f_{-2n}(z_{x}). Here, for every x\in R_{T} we have written z_{x} for the Heegner point determined by the intersection of the two geodesics defined by x . Moreover, the geodesic polar coordinates at z_{x} are defined with respect to a specific translation matrix g_{x} (depending on the choice of B ), see Theorem 3.14 for details. In particular, the 0 -th coefficient is given by the average value \displaystyle I_{T,0}(v,f) \displaystyle\;=\;\mathcal{W}^{+,+}_{B,0}(v,s)\cdot\sum_{x\in R_{T}}f(z_{x}). Remark 1.3 . i) An analogous result also holds in the case when T is indefinite, corresponding to the cases (ii)–(iv) of Theorem 1.1 . Then the appropriate coordinates are given by the distance of a point z\in\mathbb{H} from the geodesic \gamma appearing in these cases, and the intersection point of \gamma with the geodesic defining the distance. The quotient of \gamma by its stabilizer in \Gamma_{\mathfrak{M}} is isomorphic to S^{1} , and consequently there is again an expansion of f in terms of the corresponding characters with coefficients depending on the distance. The analogue of Theorem 1.2 involves twisted cycle integrals of f over the image of \gamma in X and an archimedian Whittaker function \mathcal{W}^{+,-}_{B,n}(v,s) , see Theorem 3.19 for details. ii) The coefficients I_{T}(v,f) for singular T turn out to be given by the average values of f over Heegner points or geodesic cycles of fixed discriminant (determined by the trace of T ), see Theorems 3.23 and 3.24 . In this way we recover the modularity result for such averages due to Katok–Sarnak [ 19 ] . iii) In the special case when f=1 , we have s=0 and the Whittaker function \mathcal{W}^{+,+}_{B,0}(v,0) reduces to the Whittaker function W_{T,\infty}(v) of Theorem 1.1 . The geodesic Taylor coefficients f_{n}(z) vanish for all n\neq 0 , and f_{0}(z)=1 at all points z\in\mathbb{H} . Hence, we recover the modularity assertion of Theorem 1.1 . However, this does not give the explicit formula for R_{T} in terms of non-archimedian local Whittaker functions. To prove the theorem, we decompose the Fourier coefficient I_{T}(v,f) into orbital integrals and expand these with respect to the characters of \operatorname{SO}(T) . It turns out that the corresponding integrals also make sense if f is replaced by a spherical function on \mathbb{H} . We employ this fact, together with properties of the Weil representation, to construct the Whittaker functions \mathcal{W}^{+,+}_{B,n}(v,s) in Theorem 3.12 . Next we use the fact that the group \operatorname{SO}(T) is naturally embedded into both, the Levi factor of \operatorname{Sp}_{2}(\mathbb{R}) and the orthogonal group \operatorname{SO}(V)(\mathbb{R}) , and that the corresponding actions on V(\mathbb{R})^{2} are compatible, see Lemma 3.7 . With these preparations, the orbital integrals can be computed in terms of the geodesic Taylor expansions of f . Hecke action. Let p be an odd prime which is coprime to the discriminant of B and the level of the Eichler order. If f is an eigenform of the Hecke operator T_{p} , then the theta integral I(\tau,f) will again be a Hecke eigenform, now for the two non-trivial Hecke operators \widehat{T}_{p,0}^{(2)},\widehat{T}_{p,1}^{(2)} that we have in genus two. In Proposition 4.4 we give the explicit relation of these Hecke operators on I(\tau,f) with the action of T_{p} on f . The proof is an application of the method of Rallis, extended by Zhuravlev to include the metaplectic case. In fact, Zhuravlev gives maps that intertwine the action of Hecke operators on theta functions with the Hecke action on the Schwarz functions via the Weil representation. Moreover the Rallis-Zhuravlev map intertwines the symplectic and orthogonal Hecke operators inside the Weil representation. In Section 4 we combine these ideas to ready-to-use formulas and cross-check them with the genus one theta lift via the Siegel- \Phi -operator, see Proposition 4.6 . Related results. We remark that all the above questions on counting of closed geodesics on any compact Riemann surface according to length have been intensely studied, too, starting with Sarnak’s work [ 41 ] . There is no analog of special points like Heegner points in this context, though. Analogous questions on counting and equidistribution of intersection points have been investigated in [ 27 ] , [ 28 ] , and also [ 44 ] , however without taking any properties of the intersection angle into account. Most recently, these type of results have been upgraded to give explicit error terms in [ 43 ] and also in [ 20 ] . Since it is difficult to compare discriminant and length on Shimura curves, we make no attempt to directly relate the two kinds of results. The distribution of intersection angles has been studied by Pollicott–Sharp [ 35 ] and Herrera [ 15 ] in the general hyperbolic context and by Jung–Sardari [ 18 ] in the arithmetic context (in fact: the modular surface case), solving the distribution conjecture from [ 39 ] . An old theorem of Birkhoff identifies the number of intersection points of two geodesics with the linking numbers of the links formed by the geodesic and its time reverse. This fact is employed by Duke, Imamoglu and Toth in [ 8 ] to compute linking numbers of modular knots in terms of generalized Dedekind symbols. The latter are related to geodesic cycle integrals of weakly holomorphic modular functions on the modular curve \operatorname{SL}_{2}(\mathbb{Z})\backslash\mathbb{H} . Generating series of such cycle integrals were studied earlier in [ 7 ] , where the main result can be viewed as an analogue of [ 19 ] for weakly holomorphic modular forms. It states that the simultaneous generating series of cycles integrals and CM values of a given weakly holomorphic cusp form of weight zero is a harmonic Maass form of weight 1/2 . See also [ 3 ] for an approach via the regularized theta correspondence. It is an interesting question whether the results of the present paper admit a generalization to meromorphic (or, in the modular curve case, weakly holomorphic) modular forms. One motivation for the work of Rickards came from the work of Darmon and Vonk on a real quadratic analogue of singular moduli. Rickards stresses in [ 40 , Section 2.5] the analogy of his formula for the (unsigned) total intersection number of geodesics cycles of positive discriminants D_{1} and D_{2} with the formula of Gross-Zagier for the norms of differences of singular moduli [ 14 ] of negative discriminants. In particular, both have in common a decomposition according to ‘ b -linking’. In the Gross-Zagier case the contribution of the b -linked part is determined by the arithmetic degree of a special 0 -cycle Z(T) , where T=\left(\begin{smallmatrix}D_{1}&b\\ b&D_{2}\end{smallmatrix}\right) , on the arithmetic surface given by the modular curve X(1) over \operatorname{Spec}(\mathbb{Z}) , which in turn can be expressed as the T -th Fourier coefficient of the derivative of an incoherent genus 2 Siegel Eisenstein series of weight 3/2 . In our interpretation of Rickards’ result (see Theorem 5.2 ), the contribution of the b -linked part is given by the degree of a special 0 -cycle Z(T) on the complex Shimura curve associated to B , which in turn can be expressed as the T -th Fourier coefficient of the value of a coherent genus 2 Siegel Eisenstein series of weight 1/2 . Darmon-Vonk propose that a real quadratic analogue of the differences of singular moduli is given by the evaluation of rigid meromorphic cocycles for the group \operatorname{SL}_{2}(\mathbb{Z}[1/p]) at real multiplication points. They show that the valuations at primes q are related to certain signed intersection numbers of geodesic cycles on Shimura curves. It would be interesting to investigate whether there is a variant of our theta correspondence approach involving signed intersections that could lead to a connection between the conjectural arithmetic intersection numbers of [ 5 , Conjecture 3.27] and (derivatives of incoherent) Siegel Eisenstein series of genus 2 . Acknowledgments. This work was initiated while discussing with James Rickards at the CIRM conference “Renormalization, computation and visualization in Geometry, Number Theory and Dynamics”. The authors moreover thank Valentin Blomer, Jens Funke, Özlem Imamoglu, Paul Nelson, Rebekka Strathausen, and Tonghai Yang for helpful comments and suggestions. 2. Geodesic cycles and Heegner points 2.1. The setup Let B be an indefinite quaternion algebra over \mathbb{Q} . Let D(B) be the discriminant of B , that is, the product of all primes p for which B_{p}=B\otimes_{\mathbb{Q}}\mathbb{Q}_{p} is a division algebra. For x\in B we denote by \operatorname{tr}(x)\in\mathbb{Q} the reduced trace and by \operatorname{N}(x)\in\mathbb{Q} the reduced norm. The vector space (2.1) \displaystyle V\;=\;\left\{x\in B\mid\;\operatorname{tr}(x)=0\right\} together with the quadratic form Q(x)=-\operatorname{N}(x)=x^{2} is a rational quadratic space of signature (2,1) . It is anisotropic if and only if D(B)\neq 1 . The corresponding bilinear form is (x,y)=\operatorname{tr}(xy) . We view the group H=B^{\times} as an algebraic group over \mathbb{Q} . The action of H on V by conjugation induces an isomorphism H\cong\operatorname{GSpin}(V,Q) . Over \mathbb{R} , the space V(\mathbb{R}) is given by the real 2\times 2 matrices of trace 0 , and Q(x)=-\det(x) . Moreover, we have H(\mathbb{R})=\operatorname{GSpin}(V,Q)(\mathbb{R})\cong\operatorname{GL}_{2}(\mathbb{R}) . For any subfield F\subset\mathbb{R} , we write H(F)^{+}\;=\;\{h\in H(F)\mid\;\det(h)>0\}. The hermitian symmetric space associated with H can be realized as the Grassmannian \mathcal{D}\;=\;\{z\subset V(\mathbb{R})\mid\;\text{$\dim(z)=1$ and $Q\mid_{z}<0$}\} of negative lines in V(\mathbb{R}) . It is isomorphic to the complex upper half plane \mathbb{H} via (2.2) \mathbb{H}\ni z=x+iy\,\mapsto\,\mathbb{R}\cdot\frac{1}{y}\left(\begin{matrix}-x&|z|^{2}\\ -1&x\end{matrix}\right)\in\mathcal{D}\,. Here the natural action of H(\mathbb{R})^{+} on \mathcal{D} is identified with the action on \mathbb{H} by fractional linear transformations. To describe the action of the full group H(\mathbb{R}) on \mathbb{H} , we consider the involution \sigma:\mathbb{H}\to\mathbb{H} , z\mapsto-\bar{z} . The subgroup of order 2 in H(\mathbb{R}) generated by the element \left(\begin{smallmatrix}1&0\\ 0&-1\end{smallmatrix}\right) acts on H(\mathbb{R})^{+} by conjugation, giving rise to an isomorphism H(\mathbb{R})\cong H(\mathbb{R})^{+}\ltimes\left\langle\left(\begin{smallmatrix}1&0\\ 0&-1\end{smallmatrix}\right)\right\rangle. Hence we may define an action of H(\mathbb{R}) on \mathbb{H} by letting H(\mathbb{R})^{+} act via fractional linear transformations and \left(\begin{smallmatrix}1&0\\ 0&-1\end{smallmatrix}\right) via \sigma . This action corresponds to the natural action on \mathcal{D} . Let \mathcal{O}_{B} be a maximal order in B or more generally, let \mathcal{O}_{\mathfrak{M}} be an Eichler order of level \mathfrak{M}\in\mathbb{N} . Then L_{\mathfrak{M}}:=\mathcal{O}_{\mathfrak{M}}\cap V is an even lattice in V . Locally, we can describe L_{\mathfrak{M},p}:=L_{\mathfrak{M}}\otimes\mathbb{Z}_{p} as (2.3) L_{\mathfrak{M},p}\cong\begin{cases}(\mathcal{R}_{p}\cap V)\oplus\mathcal{R}_{p}j_{p}&p\mid D(B),\\ \{\left(\begin{smallmatrix}a&b\\ c&-a\end{smallmatrix}\right)\in M_{2}(\mathbb{Z}_{p}):c\in\mathfrak{M}\mathbb{Z}_{p}\}&p\nmid D(B),\end{cases} where \mathcal{R}_{p} is the ring of integers of the unique unramified quadratic extension of \mathbb{Q}_{p} and j_{p}^{2}=p , see [ 45 , Theorem 13.3.11(b)] . When p=2\mid D(B) , it is more convenient to represent L_{\mathfrak{M},2} as \mathbb{Z}_{2}i\oplus\mathbb{Z}_{2}j\oplus\mathbb{Z}_{2}k with k=ij and i^{2}=j^{2}=k^{2}=-1 . From this description, it is easy to check that (2.4) |L_{\mathfrak{M},p}^{\vee}/L_{\mathfrak{M},p}|\;=\;\begin{cases}2^{1+2(1-D\bmod 2)+2\nu_{p}(\mathfrak{M})}&p=2,\\ p^{2\nu_{p}(D(B)\mathfrak{M})}&p\neq 2.\end{cases} The subgroup (2.5) \begin{split}\Gamma_{\mathfrak{M}}&:=H(\mathbb{Q})^{+}\cap K_{\mathfrak{M}}\subset H(\mathbb{Q}),\quad K_{\mathfrak{M}}=\prod_{p<\infty}K_{\mathfrak{M},p}\subset H(\hat{\mathbb{Q}}),\\ K_{\mathfrak{M},p}&:=\begin{cases}\mathcal{O}_{B,p}^{\times},&p\mid D(B),\\ \{\left(\begin{smallmatrix}a&b\\ c&d\end{smallmatrix}\right)\in\operatorname{GL}_{2}(\mathbb{Z}_{p}):c\in\mathfrak{M}\mathbb{Z}_{p}\},&p\nmid D(B),\end{cases}\end{split} stabilizes L_{\mathfrak{M}} . The quotient (2.6) \displaystyle X_{\mathfrak{M}}\;=\;\Gamma_{\mathfrak{M}}\backslash\mathcal{D}\,\cong\,\Gamma_{\mathfrak{M}}\backslash\mathbb{H}\cong X_{K_{\mathfrak{M}}}\;=\;H(\mathbb{Q})^{+}\backslash(\mathcal{D}\times H(\hat{\mathbb{Q}})/K_{\mathfrak{M}}) is a Shimura curve (compact if D(B)\neq 1 ). Note that the double quotient above is connected, since the image of H(\mathbb{Q})^{+}\backslash H(\hat{\mathbb{Q}})/K_{\mathfrak{M}} under the spinor norm is \mathbb{Q}_{>0}\backslash\hat{\mathbb{Q}}^{\times}/\hat{\mathbb{Z}}^{\times} , which is trivial. In particular, the group \Gamma_{\mathfrak{M}}=\mathcal{O}^{1}_{\mathfrak{M}}\subset H(\mathbb{Q})^{+} consists of all elements of reduced norm one. If we equip the upper half plane with the Haar measure normalized as dxdy/y^{2} , then the volume of the Shimura curve is (see e.g. [ 45 , Theorem 39.1.13] ) (2.7) \operatorname{vol}(X_{\mathfrak{M}})\;=\;\frac{\pi}{3}\,D(B)\prod_{p|D(B)}\Big(1-\frac{1}{p}\Big)\cdot\mathfrak{M}\prod_{p|\mathfrak{M}}\Big(1+\frac{1}{p}\Big), where the second product is over all distinct primes dividing \mathfrak{M} . 2.2. Geodesic cycles A vector x\in L_{\mathfrak{M}} (or more generally a vector x\in V ) whose length Q(x)>0 is positive defines a geodesic c_{x}\;=\;\{z\in\mathcal{D}:z\perp x\}\,\subset\,\mathcal{D}\,. Under the condition that L_{\mathfrak{M}} is anisotropic (or more generally if x^{\perp}\subset V is anisotropic) the geodesic c_{x} descends to closed geodesic in X_{\mathfrak{M}} . In fact, (2.8) L_{\mathfrak{M},~x^{\perp}}\,:=\,L_{\mathfrak{M}}\cap x^{\perp}\,\subset\,x^{\perp} is a sublattice in a quadratic space V_{x^{\perp}}\,:=\,V\cap x^{\perp} of signature (1,1) . Multiplicativity of the determinant implies that Anisotropic implies that D is not a square and the positive units provides the required non-trivial stabilizer of c_{x} . We want to relate primitive lattice vectors to two other notions giving rise to closed geodesics in X_{\mathfrak{M}} . Let \mathcal{O}_{D}\subset\mathbb{Q}(\sqrt{D}) be the order of discriminant D . An optimal embedding is a ring homomorphism \phi:\mathcal{O}_{D}\to\mathcal{O}_{\mathfrak{M}} that cannot be extended to an order \mathcal{O}_{D}^{\prime}\subset\mathbb{Q}(\sqrt{D}) properly containing \mathcal{O}_{D} . Note that the conjugation of B fixes the image of an optimal embedding (since otherwise B would have a commutative subring of rank \geq 3 ) and thus restricts to the Galois conjugation of \mathcal{O}_{D} . In particular an optimal embedding takes the norm form on K to the reduced norm on B . Last, a primitive hyperbolic element \gamma\in\Gamma_{\mathfrak{M}} specifies a unique geodesic in \mathcal{D} fixed by \gamma and conversely, to any geodesic we associate the primitive hyperbolic element \gamma\in\Gamma_{\mathfrak{M}} , unique up to inverse, that stabilizes the geodesic. To establish the correspondence between lattice vectors and geodesics we define the sublattice (2.9) L\,:=\,2L_{\mathfrak{M}}\cup\bigl\{\lambda\in L_{\mathfrak{M}}:\tfrac{1+\lambda}{2}\in\mathcal{O}_{\mathfrak{M}}\bigr\}\quad\subset L_{\mathfrak{M}} of index four. Concretely, L is the lattice with localizations (2.10) L_{p}\;=\;\begin{cases}L_{\mathfrak{M},p}&p\neq 2,\\ \{\left(\begin{smallmatrix}a&2b\\ 2^{e+1}c&-a\end{smallmatrix}\right):a,b,c\in\mathbb{Z}_{2}\}&p=2\nmid D(B)\\ \mathbb{Z}_{2}(2i-2k)\oplus\mathbb{Z}_{2}(2j-2k)\oplus\mathbb{Z}_{2}(i+j+k)&p=2\mid D(B),\end{cases} where e=\nu_{p}(\mathfrak{M}) . Note that Q(x)\equiv 0,1\bmod{4} for all x\in L . The conjugation action of the group \Gamma_{\mathfrak{M}} stabilizes L\subset L_{\mathfrak{M}} , and thus acts on primitive elements in L , acts on images in \mathcal{O}_{\mathfrak{M}} of optimal embeddings and on primitive hyperbolic elements. It also acts on geodesics in \mathcal{D} by left translation. Proposition 2.1 . There is a \Gamma_{\mathfrak{M}} -equivariant bijection between i) primitive vectors x\in{L}/\{\pm 1\} of length D>0 , ii) optimal embeddings \phi:\mathcal{O}_{D}\to\mathcal{O}_{\mathfrak{M}} of a real quadratic order up to Galois conjugation, iii) primitive hyperbolic elements in \Gamma_{\mathfrak{M}} up to inversion. that commutes with taking the associated geodesic in \mathcal{D} . The bijection between i) and ii) takes the length of x into four times the discriminant of the order. We say that a geodesic is of discriminant D , if it corresponds to an optimal embedding of an order of discriminant D . Proof. We first give all the maps. For the map from i) to ii), given x\in{L} primitive, let D=Q(x) and if x\not\in 2L_{\mathfrak{M}} let \phi(\mathcal{O}_{D})=\langle 1,\tfrac{1+x}{2}\rangle . If x\in 2L_{\mathfrak{M}} , then let \phi(\mathcal{O}_{D})=\langle 1,\tfrac{x}{2}\rangle . Conversely for ii) to i), given \phi , let x=\pm\phi(\sqrt{D}) . For the map from ii) to iii) fix a generator \epsilon_{D} of the totally positive units in \mathcal{O}_{D} . Then \phi(\epsilon_{D})\in\Gamma_{\mathfrak{M}} since \phi preserves norms, hyperbolic since of infinite order, and primitive since we took a generator. Conversely for iii) to ii), take the order generated by \mathbb{Z} and the given hyperbolic element \gamma\in\Gamma_{\mathfrak{M}} and extend it to a optimal embedding. The \Gamma_{\mathfrak{M}} -equivariance of all four maps is obvious. It remains the check the properties implicit in the definition of the maps. The images \phi(\mathcal{O}_{D}) are contained in \mathcal{O}_{\mathfrak{M}} since \tfrac{1+\lambda}{2}\in\mathcal{O}_{\mathfrak{M}} and they are indeed rings, since (\tfrac{1+x}{2})^{2}=\tfrac{Q(x)+1}{4}+\tfrac{x}{2}\in\tfrac{1+x}{2}+\mathbb{Z} for x\not\in 2L_{\mathfrak{M}} , and since x^{2}=Q(x)\in 4\mathbb{Z} in the other case x\in 2L_{\mathfrak{M}} . The congruence D=0\mod 4 if x\in 2L_{\mathfrak{M}} and D=1\mod 4 otherwise implies that the ring \mathcal{O}_{D} is indeed an order of discriminant D , as suggested by the notation. Conversely, since \phi preserves traces, x has trace zero. If D=0\mod 4 , then x/2\in\phi(\mathcal{O}_{D})\subset\mathcal{O} , hence x\in 2L_{\mathfrak{M}}\subset L . If D=1\mod 4 , then \tfrac{1+x}{2}\in\phi(\mathcal{O}_{D})\subset\mathcal{O}_{\mathfrak{M}} and again x\in L . This also shows that the maps between i) and ii) are inverses to each other. The independence of \pm 1 resp. Galois conjugation is obvious from definition. Back to the map i) to ii), given x\in{L} primitive, we check that that \phi(\mathcal{O}_{D}) cannot be extended to a larger order of \mathbb{Q}(\sqrt{D}) in \mathcal{O} . If x\not\in 2L_{\mathfrak{M}} , hence D=1\mod 4 , the larger orders are of the form \langle 1,\tfrac{1}{2}+\tfrac{x}{2p}\rangle for some p|D , hence p odd. This implies x/p\in{L} , contradicting primitivity. If x\in 2L_{\mathfrak{M}} , hence D=0\mod 4 , we have to consider two kinds of superorders. Superorders of the form \langle 1,\tfrac{x}{2p}\rangle are impossible for any p by the primitivity hypothesis. If D/4=1\mod 4 , there is the superorder \langle 1,\tfrac{1}{2}+\tfrac{x}{4}\rangle , but if this is contained in \mathcal{O}_{\mathfrak{M}} , we arrive at the contradiction x/2\in{L} . Conversely, investigating the map ii) to i), to show that x is primitive, suppose first that x is divisible in {L} by an odd prime p . If x\in 2L_{\mathfrak{M}} , then also x/p\in 2L_{\mathfrak{M}} , hence Q(x/2p)\in\mathbb{Z} and hence \langle 1,x/2p\rangle\subset\mathcal{O}_{\mathfrak{M}} is a subring by the preceding proof, contradicting the optimality. If x\not\in 2L_{\mathfrak{M}} , then also x/p\not\in 2L_{\mathfrak{M}} , hence 4Q(x/p)=1\mod 4 , and hence \langle 1,\tfrac{1}{2}+\tfrac{x}{2p}\rangle\subset\mathcal{O}_{\mathfrak{M}} is a subring, contradicting again optimality. Concerning p=2 , observe that elements in {L}\setminus 2L_{\mathfrak{M}} are never 2 -divisible in {L} . It remains to consider x\in 2L_{\mathfrak{M}} , which implies D=0\mod 4 . If x/2\in 2L_{\mathfrak{M}} , then the same argument as in the odd case contradicts optimality. If x/2\in L\setminus L_{\mathfrak{M}} , then 1/2+x/4\in\mathcal{O}_{\mathfrak{M}} , hence \langle 1,\tfrac{1}{2}+\frac{x}{4}\rangle is a superorder that contradicts optimality. To show that the correspondence commutes with taking the associated geodesic it suffices to observe that L_{x^{\perp}} (and thus the subspaces in \mathcal{D} contained in there) is invariant under the conjugation action of all of the order \phi(\mathcal{O}_{D}) that we associated to x , and consequently also under \phi(\epsilon_{D}) . To see this, we may conjugate the order so that x=i (e.g. [ 40 , Corollary 22] ), so (L_{x^{\perp}})_{\mathbb{Q}}=\langle j,k\rangle_{\mathbb{Q}} and observe that this is stable under \langle 1,i\rangle_{\mathbb{Q}} . ∎ 2.3. Heegner points A vector x\in L whose length Q(x)<0 defines a point in \mathcal{D} , a Heegner point . In coordinates, under the correspondence ( 2.2 ) x\;=\;\left(\begin{matrix}B&C\\ -A&-B\end{matrix}\right)\in V(\mathbb{R})\quad\text{the Heegner point is }\quad P_{x}\;=\;\frac{-B+i\sqrt{-D}}{A}\quad\in\mathbb{H}\,. With the same proof as in the case of positive vectors one shows: Proposition 2.2 . There is a bijection between i) primitive vectors x\in{L}/\{\pm 1\} of length D/4<0 , ii) optimal embeddings \mathcal{O}_{D}\to\mathcal{O}_{\mathfrak{M}} of an imaginary quadratic order up to Galois conjugation . The bijection between takes the length of x into four times the discriminant of the order. 2.4. Two vectors in L : a case discussion Given a pair of vectors x=(x_{1},x_{2})\in L_{\mathfrak{M}}^{2} we let T\;=\;Q(x)\coloneqq\frac{1}{2}((x_{i},x_{j})_{i,j=1,2})\,=:\left(\begin{matrix}D_{1}&b\\ b&D_{2}\end{matrix}\right) be the corresponding inner product matrix. We summarize the geometry of geodesics and Heegner points associated with x according to the sign of the entries of T , see Figure 2 , which is the lattice vector translation via Proposition 2.1 and 2.2 of Figure 1 x_{1} x_{2} x_{3} x_{1} x_{3} x_{2} . . x_{2} x_{3} x{{}_{1}}^{\prime} . x_{1} x_{1} x_{2} Figure 2. Geometry of two lattice vectors: (A) two positive vectors, intersecting (top left), (B) non-intersecting (top right), (C) a pair of a positive and a negative vector (bottom left), (D) two negative vectors (bottom right). (A) The positive definite case This implies that D_{1}>0 and D_{2}>0 and that x_{1},x_{2}\in L define two geodesics c_{i}=c_{x_{i}} . The two geodesics are called b -linked if b=(x_{1},x_{2})/2 . For comparison with [ 40 ] we also consider two optimal embeddings \phi_{i}:\mathcal{O}_{D_{i}}\to\mathcal{O}_{\mathfrak{M}} for i=1,2 . The optimal embeddings are said to be b -linked if b=\operatorname{tr}(\phi_{1}(\sqrt{D_{1}})\phi_{2}(\sqrt{D_{2}}))/2 . See [ 2 , 8 ] and [ 39 , Section 2.3] for the relation to linking numbers, which serves here only as justification for the name but will not used in the sequel. The two notions of b -linked agree under the correspondence in Proposition 2.1 . In fact, if x_{i}=\phi_{i}(\sqrt{D_{i}}) , then b\;=\;(x_{1},x_{2})/2\;=\;\operatorname{tr}(\sqrt{D_{1}}\cdot\sqrt{D_{2}})/2\,. We summarize [ 39 , Proposition 1.10] and [ 40 , Proposition 6] : Proposition 2.3 . The geodesics stabilized by the hyperbolic elements associated with two b -linked optimal embeddings intersect in X_{\Gamma} if and only if b^{2}0 and D_{2}>0 we still have a pair of b -linked geodesics c_{x_{i}} that now do not intersect according to Proposition 2.3 . We aim for a geometric interpretation of b in this case. Let x_{3} be a primitive vector spanning \langle x_{1},x_{2}\rangle^{\perp} . Since \langle x_{1},x_{2}\rangle has signature (1,1) , we deduce that D_{3}:=Q(x_{3})>0 . This vector thus determines a geodesic c_{x_{3}} , whose linking number with both c_{x_{1}} and c_{x_{2}} is zero. Consequently, c_{x_{3}} intersects these geodesics perpendicularly: c_{x_{3}} is the common perpendicular to c_{x_{1}} and c_{x_{2}} . Standard hyperbolic geometry (e.g. [ 38 , Theorem 3.2.8] ) implies: Proposition 2.4 . If two b -linked geodesics c_{x_{i}} of discriminant D_{i} do not intersect in X_{\Gamma} , i.e., if b^{2}\geq D_{1}D_{2} , then their hyperbolic distance is given by (2.12) \cosh(d_{\mathrm{hyp}}(c_{x_{1}},c_{x_{2}}))\;=\;\frac{b}{\sqrt{D_{1}D_{2}}}\,. (C) The indefinite case with one negative diagonal entry Suppose now that D_{1}<0 and D_{2}>0 . Now x_{1} determines a Heegner point P_{1} and x_{2} determines a geodesic c_{x_{2}} and by abuse of notation we still call this pair b -linked. The geometric meaning is rather as follows, see [ 38 , Theorem 3.2.12] ). Proposition 2.5 . For a given b -linked pair of a Heegner point P_{1} and a geodesics c_{x_{2}} of discriminants D_{i} respectively their hyperbolic distance is given by (2.13) \sinh(d_{\mathrm{hyp}}(P_{1},c_{x_{2}}))\;=\;\frac{b}{\sqrt{-D_{1}D_{2}}}\,. (D) The indefinite case with two negative diagonal entries Finally suppose that D_{1},D_{2}<0 , so that both x_{i} determine Heegner points P_{i} . Then (2.14) \cosh(d_{\mathrm{hyp}}(P_{1},P_{2}))\;=\;\frac{b}{\sqrt{D_{1}D_{2}}} by definition of the hyperbolic distance in the Minkowski model (see e.g. [ 38 , Equation (3.2.1)] ). 2.5. The (unsigned) counting result We restate the main result of Rickards [ 40 , Theorem 63] on unsigned counting intersection points. His two standing hypothesis allow to state it with moderate amount of case distinctions. We will reprove this as a consequence of our main result in Section 5 . Recall that the level \mathfrak{M} of an Eichler order is always coprime to D(B) since division algebras over local fields have a unique order of given level. Theorem 2.6 . Suppose that D_{1}>0 and D_{2}>0 and that b\in\mathbb{Z} with b\equiv D_{1}D_{2}\mod 2 . Suppose moreover that \gcd(D_{1},D_{2},D_{1}D_{2}-b^{2})=1 . 1 1 1 In [ 40 ] these hypothesis are called admissible and nice respectively. Then the (unsigned) number of intersection points of a primitive geodesic of discriminant D_{1} with a primitive geodesic of discriminant D_{2} that are b -linked is equal to 2^{s}\prod_{p\geq 2}N_{p} , where the local factors N_{p} are given for any prime p as follows. 0) If p\nmid\det(T/4) , then N_{p}=1 if also p\nmid D(B)\mathfrak{M} , but N_{p}=0 otherwise. Else, suppose without loss of generality that p\nmid D_{1} and then: i) Suppose (D_{1},p)_{p}=-1 and p\nmid D(B) and \nu_{p}(\det(T/4)) is even. If \nu_{p}(D_{2})\geq 2 or p|\mathfrak{M} , then N_{p}=0 , and otherwise N_{p}=1 . ii) Suppose (D_{1},p)_{p}=-1 and p\nmid D(B) . If \nu_{p}(\det(T/4)) is odd, then N_{p}=0 . iii) Suppose (D_{1},p)_{p}=-1 and p\mid D(B) and \nu_{p}(\det(T/4)) is odd. If \nu_{p}(D_{2})\geq 2 then N_{p}=0 and otherwise N_{p}=1 . iv) Suppose (D_{1},p)_{p}=-1 and p\mid D(B) . If \nu_{p}(\det(T/4)) is even, then N_{p}=0 . v) If (D_{1},p)_{p}=+1 and p\mid D(B) then N_{p}=0 . vi) Suppose (D_{1},p)_{p}=+1 and p\nmid D(B) . If \nu_{p}(D_{2})\leq 1 , then N_{p}=\max\{\nu_{p}(\det(T/4))+1{-\nu_{p}(\mathfrak{M})},0\} . If \nu_{p}(D_{2})\geq 2 , then N_{p}=2 unless \nu_{p}(\mathfrak{M})=\nu_{p}(\det(T/4)) , in which case N_{p}=1 . The exponent of the prefactor is s=\omega(\mathfrak{M}D(B))+1 , i.e., s-1 is the number of prime factors of \mathfrak{M}D(B) . 3. Theta lifts of Maass forms Here we recall some facts on Siegel Maass forms in genus 2 and their Fourier expansions with a focus on the case of half-integral weight. Then we construct such forms as theta lifts of Maass forms on Shimura curves and describe their Fourier expansions in terms of goedesic Taylor coefficients and twisted cycle integrals. 3.1. Siegel Maass forms Let \mathbb{H}_{2} be the Siegel upper half space in genus 2 . We denote by \operatorname{Mp}_{2,\mathbb{R}} the metaplectic extension of the symplectic group \operatorname{Sp}_{2}(\mathbb{R}) of genus 2 , realized by the two possible choices of a holomorphic square root of the automorphy factor \det(c\tau+d) for \tau\in\mathbb{H}_{2} and \left(\begin{smallmatrix}a&b\\ c&d\end{smallmatrix}\right)\in\operatorname{Sp}_{2}(\mathbb{R}) . That is, an element of \operatorname{Mp}_{2,\mathbb{R}} is given by a pair \widetilde{g}=(g,\phi) , where g=\left(\begin{smallmatrix}a&b\\ c&d\end{smallmatrix}\right)\in\operatorname{Sp}_{2}(\mathbb{R}) and \phi:\mathbb{H}_{2}\to\mathbb{C} is a holomorphic function with \phi^{2}=\det(c\tau+d) . The group \operatorname{Mp}_{2,\mathbb{R}} acts on \mathbb{H}_{2} by fractional linear transformations through the covering map (3.1) \operatorname{pr}:\operatorname{Mp}_{2,\mathbb{R}}\to\operatorname{Sp}_{2}(\mathbb{R}),\quad(g,\phi)\mapsto g. For k\in\frac{1}{2}\mathbb{Z} , this group also acts on functions on \mathbb{H}_{2} via the usual Petersson slash operator in weight k . Let \widetilde{\Gamma}\subset\operatorname{Mp}_{2,\mathbb{R}} be an arithmetic subgroup which maps to a finite index subgroup of \Gamma_{0}(4)\subset\operatorname{Sp}_{2}(\mathbb{Z}) under \operatorname{pr} , and let \xi:\widetilde{\Gamma}\to\mathbb{C}^{1} be a character. We call a C^{\infty} -function F:\mathbb{H}_{2}\to\mathbb{C} a weak modular form of weight k for \widetilde{\Gamma} and \xi , if it satisfies the transformation law (3.2) \displaystyle(F\mid_{k}(\gamma,\phi))(\tau):=\phi^{-2k}\cdot F(\gamma\tau)\;=\;\xi(\gamma)\cdot F(\tau) for all (\gamma,\phi)\in\widetilde{\Gamma} . We denote by A_{k}(\widetilde{\Gamma},\xi) the \mathbb{C} vector space of all weak modular forms of weight k for \widetilde{\Gamma} . As \mathbb{H}_{2} is the symmetric space of \operatorname{Mp}_{2}(\mathbb{R}) , we can also view F as a function \widetilde{F} on \operatorname{Mp}_{2}(\mathbb{R}) . In that case, the slash operator corresponds to the right action on \widetilde{F} via left multiplication on its argument. The center \mathcal{C} of the universal enveloping algebra of the Lie algebra of \operatorname{Sp}_{2}(\mathbb{R}) is a free \mathbb{R} -algebra of rank 2 . It is generated by the Casimir element C_{1} (which has degree 2 ) and an element C_{2} of degree 4 . We use throughout the normalization given in ( A.6 ) in Appendix A . The action of \operatorname{Mp}_{2,\mathbb{R}} via the Petersson slash operator in weight k induces an action of \mathcal{C} on functions on \mathbb{H}_{2} . We denote by D_{1,k} , D_{2,k} the differential operators induced by C_{1} and C_{2} . These operators take the space A_{k}(\widetilde{\Gamma},\xi) to itself. A Siegel Maass form of weight k for the group \widetilde{\Gamma} and character \xi is a function F in A_{k}(\widetilde{\Gamma},\xi) which is a simultaneous eigenform of D_{1,k} and D_{2,k} and which has moderate growth at all rational boundary components of \widetilde{\Gamma} , see e.g. [ 16 ] . We recall some facts on the Fourier expansion of Siegel Maass forms, loosely following [ 33 ] . Let N be the unipotent radical N=\{\left(\begin{smallmatrix}1&*\\ 0&1\end{smallmatrix}\right)\} of the Siegel parabolic subgroup of \operatorname{Sp}_{2}(\mathbb{R}) . We will also view it a subgroup of \operatorname{Mp}_{2,\mathbb{R}} via the homomorphism n\mapsto(n,1) . The discrete subgroup \widetilde{\Gamma}_{N}=\widetilde{\Gamma}\cap N acts on \mathbb{H}_{2} by translations by a lattice. Throughout we assume that \xi is trivial on this group. Then the transformation behavior ( 3.2 ) under \widetilde{\Gamma}_{N} implies that any Siegel Maass form F of weight k for \widetilde{\Gamma} and \xi has a Fourier expansion of the form (3.3) \displaystyle F(\tau)\;=\;\sum_{T\in\operatorname{Sym}_{2}(\mathbb{Q})}F_{T}(v)\,\mathbf{e}(\operatorname{tr}(Tu)), that is, an expansion with respect to the characters of the compact abelian group N/\widetilde{\Gamma}_{N} . Here we have written \tau=u+iv for the decomposition of \tau into its real part u and imaginary part v . The coefficients F_{T}(v) vanish unless T is contained in the dual with respect to the trace form of the translation lattice of \widetilde{\Gamma}_{N} . The fact that F is an eigenform of D_{1,k} and D_{2,k} translates into two partial differential equations satisfied by the coefficients F_{T}(v) . For a\in\operatorname{GL}_{2}(\mathbb{R}) we put (3.4) m(a)\;=\;\begin{pmatrix}a&0\\ 0&{}^{t}a^{-1}\end{pmatrix}\in\operatorname{Sp}_{2}(\mathbb{R}),\quad\widetilde{m}(a)\;=\;\left(m(a),\sqrt{\det(a^{-1})}\right)\in\operatorname{Mp}_{2,\mathbb{R}}, where we use the principal branch of the square root. Fix an invertible T\in\operatorname{Sym}_{2}(\mathbb{Q}) . We consider the abelian subgroup \operatorname{SO}(T)\;=\;\{a\in\operatorname{SL}_{2}(\mathbb{R})\mid\;aT\,{}^{t}a=T\} and use the map a\mapsto\widetilde{m}(a) to regard it as a subgroup \operatorname{SO}(T)\subset\operatorname{Mp}_{2,\mathbb{R}} , in fact inside the Levi factor of the Siegel parabolic of this metaplectic group. The group \widetilde{\Gamma}_{T}=\widetilde{\Gamma}\cap{\operatorname{SO}}(T) is a discrete subgroup with compact quotient {\operatorname{SO}}(T)/\widetilde{\Gamma}_{T} . If T is definite, then {\operatorname{SO}}(T) is compact, and hence \widetilde{\Gamma}_{T} is finite. If T is indefinite, then {\operatorname{SO}}(T)\cong\mathbb{R}^{\times} and \widetilde{\Gamma}_{T} is either isomorphic to \mathbb{Z} or to \mathbb{Z}\times(\mathbb{Z}/2\mathbb{Z}) . The group {\operatorname{SO}}(T) acts on the space of smooth functions h:\mathbb{H}_{2}\to\mathbb{C} satisfying h(\tau+b)=\mathbf{e}(\operatorname{tr}(Tb))h(\tau) by (a.h)(\tau)\;=\;h\mid_{k}\widetilde{m}\left({}^{t}a\right)(\tau)=h({}^{t}a\tau a) for a\in\operatorname{SO}(T) . If h(\tau)=F_{T}(v)\mathbf{e}(\operatorname{tr}Tu) is the T -th Fourier coefficient of a Siegel Maass form F for \widetilde{\Gamma} as in ( 3.3 ), then h is invariant under the action of the subgroup \widetilde{\Gamma}_{T} . Consequently, F_{T} has a convergent expansion (3.5) \displaystyle F_{T}(v) \displaystyle=\;\sum_{\chi}F_{T,\chi}(v) with respect to the characters \chi of {\operatorname{SO}}(T)/\widetilde{\Gamma}_{T} , where F_{T,\chi}(v)\;=\;\frac{1}{\operatorname{vol}({\operatorname{SO}}(T)/\widetilde{\Gamma}_{T})}\int_{{\operatorname{SO}}(T)/\widetilde{\Gamma}_{T}}F_{T}({}^{t}ava)\chi(a)^{-1}da, and da denotes the Haar measure on {\operatorname{SO}}(T) . The coefficient F_{T,\chi}(v) is a Whittaker function 2 2 2 Such a function is called a generalized Whittaker function for \operatorname{Sp}_{2}(\mathbb{R}) in [ 34 ] and [ 33 ] . Since no other Whittaker functions appear in the present paper, we will drop the attribute generalized in the present paper. of index (T,\chi) and weight k , that is, it has moderate growth, transforms under {\operatorname{SO}}(T)/\widetilde{\Gamma}_{T} according to \chi , and F_{T,\chi}(v)\mathbf{e}(\operatorname{tr}Tu) is and eigenfunction of D_{i,k} with the same eigenvalues as F for i=1,2 . To describe the expansion ( 3.5 ) in more detail we distinguish cases according to the signature of T . 3.1.1. The case of definite T If T is positive definite, let B\in\operatorname{GL}_{2}(\mathbb{R}) such that T={}^{t}\!BB . Then there is an isomorphism \operatorname{SO}(1_{2})\to\operatorname{SO}(T),\quad a\mapsto{}^{t}\!Ba\,{}^{t}\!B^{-1}, and the characters of \operatorname{SO}(T)/\{\pm 1\} can be parameterized as \chi_{T,n}:\operatorname{SO}(T)\to\mathbb{C}^{\times},\quad{}^{t}\!Bk_{\theta}\,{}^{t}\!B^{-1}\mapsto e^{2in\theta} for n\in\mathbb{Z} . Here we have written k_{\theta}=\left(\begin{smallmatrix}\cos\theta&\sin\theta\\ -\sin\theta&\cos\theta\end{smallmatrix}\right) . Consequently, the Fourier coefficient F_{T}(v) of any Siegel Maass form F of weight k for \widetilde{\Gamma} as in ( 3.3 ) has an expansion of the form (3.6) \displaystyle F_{T}(v)\;=\;\sum_{n\in\mathbb{Z}}F_{T,n}(v), where (3.7) \displaystyle F_{T,n}(v)\;=\;\frac{1}{\pi}\int_{0}^{\pi}F_{T}\left((B^{-1}\,{}^{t}\!k_{\theta}B)\,v\,({}^{t}\!Bk_{\theta}\,{}^{t}\!B^{-1})\right)e^{-2in\theta}\,d\theta. For given v there exist an \alpha\in\mathbb{R} and a diagonal matrix \delta=\left(\begin{smallmatrix}\delta_{1}&0\\ 0&\delta_{2}\end{smallmatrix}\right) such that (3.8) \displaystyle Bv\,{}^{t}\!B\;=\;{}^{t}k_{\alpha}\delta k_{\alpha}. Here \delta_{1},\delta_{2}\in\mathbb{R}_{>0} are the eigenvalues of the real symmetric matrix Bv\,{}^{t}B . The expansion ( 3.6 ) then implies that F_{T}(v)\;=\;\sum_{n\in\mathbb{Z}}F_{T,n}(B^{-1}\delta\,{}^{t}\!B^{-1})e^{2in\alpha}. If T is negative definite, the Fourier coefficient F_{T}(v) can be described in the same way. We omit the details here, since this case will not be relevant for our purposes. 3.1.2. The case of indefinite T For indefinite T , let B\in\operatorname{GL}_{2}(\mathbb{R}) such that T={}^{t}B\!\left(\begin{smallmatrix}1&\\ &-1\end{smallmatrix}\right)B . Then there are isomorphisms (3.9) \begin{split}\mathbb{R}\cong\operatorname{SO}(\left(\begin{smallmatrix}1&\\ &-1\end{smallmatrix}\right))/\{\pm 1\},\quad b&\mapsto\pm\rho_{b},~\rho_{b}:=\begin{pmatrix}\cosh b&\sinh b\\ \sinh b&\cosh b\end{pmatrix},\\ \operatorname{SO}(\left(\begin{smallmatrix}1&\\ &-1\end{smallmatrix}\right))\to\operatorname{SO}(T),\quad a&\mapsto{}^{t}\!Ba\,{}^{t}\!B^{-1},\end{split} and the unitary characters of \operatorname{SO}(T)/\{\pm 1\} , can be parameterized as \chi_{T,s}:\operatorname{SO}(T)/\{\pm 1\}\to\mathbb{C}^{\times},\quad\pm{}^{t}\!B\rho_{b}\,{}^{t}\!B^{-1}\mapsto\mathbf{e}(bs) for s\in\mathbb{R} . When F is modular of weight k with respect to \widetilde{\Gamma}\subset\operatorname{Mp}_{2,\mathbb{R}} , the subgroup \Gamma_{T}:=\operatorname{pr}(\widetilde{\Gamma})\cap\operatorname{SO}(T)/\{\pm 1\} is isomorphic to \mathbb{Z}\cdot b_{0}\subset\mathbb{R} for a unique b_{0}>0 via the first isomorphism above. By ( 3.5 ), the Fourier coefficient F_{T}(v) as in ( 3.3 ) has an expansion of the form (3.10) \displaystyle F_{T}(v)\;=\;\sum_{n\in\mathbb{Z}}F_{T,n}(v),~ where (3.11) \displaystyle F_{T,n}(v)\;=\;F_{T,\chi_{T,n/b_{0}}}(v)\;=\;\frac{1}{b_{0}}\int_{0}^{b_{0}}F_{T}\left((B^{-1}\rho_{b}B)\,v\,({}^{t}B\rho_{b}\,{}^{t}B^{-1})\right)\mathbf{e}(-nb/b_{0})\,db. For given a symmetric matrix M and w\in\mathbb{R}^{2} , we denote M[w]:={}^{t}wMw\in\mathbb{R} . For positive definite v , we denote (3.12) \beta:=-\frac{1}{4}\log\frac{(Bv{}^{t}B)[\binom{1}{-1}]}{(Bv{}^{t}B)[\binom{1}{1}]}\in\mathbb{R}. Then (3.13) \displaystyle Bv\,{}^{t}B\;=\;\rho_{\beta}\delta\rho_{\beta}\,. Here \delta=\left(\begin{smallmatrix}\delta_{1}&\\ &\delta_{2}\end{smallmatrix}\right) , where \delta_{1},\delta_{2}\in\mathbb{R}_{>0} are the eigenvalues of the real symmetric matrix Bv\,{}^{t}B . The expansion ( 3.10 ) then implies that F_{T}(v)\;=\;\sum_{n\in\mathbb{Z}}F_{T,n}(B^{-1}\delta\,{}^{t}B^{-1})\mathbf{e}(n\beta/b_{0}). 3.2. The Weil representation and Siegel theta functions We begin by recalling some facts on the metaplectic group and the Weil representation over local fields and the adeles. Basic references are [ 26 , Section 1] , [ 24 , Chapter 8.5] , and [ 37 ] . Let r\in\mathbb{N} denote the genus. Almost exclusively we work with r=2 , rarely we will compare to the case r=1 . Let \mathbb{A} be the ring of adeles of \mathbb{Q} and denote by \psi the standard additive character of \mathbb{A}/\mathbb{Q} such that \psi_{\infty}(x)=e^{2\pi ix} . Let F be a local field \mathbb{Q}_{p} for a place p\leq\infty or the ring of adeles \mathbb{A} . Denote by \operatorname{Sp}_{r}(F)\subset\operatorname{GL}_{2r}(F) the symplectic group of genus r , and let P=NM be its standard Siegel parabolic subgroup, where \displaystyle M=\left\{m(a)=\begin{pmatrix}a&\\ &{}^{t}a^{-1}\end{pmatrix}\mid\;a\in\operatorname{GL}_{r}(F)\right\},\quad N=\left\{n(b)=\begin{pmatrix}1&b\\ &1\end{pmatrix}\mid\;b\in\operatorname{Sym}_{r}(F)\right\}. We write \operatorname{Mp}_{r,F} for the two-fold metaplectic cover of \operatorname{Sp}_{r}(F) , given by the nontrivial extension of topological groups 1\longrightarrow\{\pm 1\}\longrightarrow\operatorname{Mp}_{r,F}\longrightarrow\operatorname{Sp}_{r}(F)\longrightarrow 1. We will frequently use the identification of \operatorname{Mp}_{r,F} with \operatorname{Sp}_{r}(F)\times\{\pm 1\} via the normalized Rao cocycle c_{R}(g_{1},g_{2})\in\{\pm 1\} given in [ 37 ] , written with tuples in square brackets, such that [g_{1},z_{1}]\cdot[g_{2},z_{2}]\;=\;[g_{1}g_{2},z_{1}z_{2}c_{R}(g_{1},g_{2})]. In particular, for g_{1}=n(b_{1})m(a_{1}) and g_{2}=n(b_{2})m(a_{2}) in P the Rao cocylce is given in terms of the Hilbert symbol by c_{R}(g_{1},g_{2})=(\det(a_{1}),\det(a_{2}))_{F}. Slightly abusing notation we will often briefly write g for the element [g,1]\in\operatorname{Mp}_{r,F} . Recall that there is a unique splitting homomorphism \operatorname{Sp}_{r}(\mathbb{Q})\to\operatorname{Mp}_{r,\mathbb{A}} . Throughout this paper we write V(F)=V\otimes_{\mathbb{Q}}F for the base change to F of the quadratic space V of dimension 3 in ( 2.1 ). Recall that there is a Weil representation \omega=\omega_{V,\psi} of \operatorname{Mp}_{r,F} on the space of Schwartz-Bruhat functions S(V^{r}(F)) given by [ 25 , Page 400] . It is determined by \displaystyle\omega(n(b))\phi(x) \displaystyle\;=\;\psi(\operatorname{tr}(Q(x)b))\phi(x), \displaystyle\omega(m(a))\phi(x) \displaystyle\;=\;\chi_{V}(\det a)\gamma(\det a,\frac{1}{2}\psi)^{-3}(\det a,-1)_{F}|\det a|^{\frac{3}{2}}\phi(xa), \displaystyle\omega(w)\phi(x) \displaystyle\;=\;\gamma(V^{r}(F))\int_{V^{r}(F)}\phi(y)\psi(-\operatorname{tr}(x,y))d_{\psi}y,\quad\text{where}\quad w\;=\;\left(\begin{smallmatrix}0&-I_{r}\\ I_{r}&0\end{smallmatrix}\right)\,, and d_{\psi}y is the self-dual Haar measure on V^{r}(F) with respect to \psi , and \gamma(V(F)^{r})=\gamma(\psi\circ\det Q)^{-r} . Here \gamma(\psi) and \gamma(a,\psi) (for a\in F^{\times} ) are the local Weil indices defined in [ 37 , Appendix] , and \det Q\;=\;\det(\frac{1}{2}(e_{i},e_{j}))\in F^{\times}/(F^{\times})^{2}, for an F -basis e_{1},e_{2},e_{3} of V(F) . Finally, (3.14) \displaystyle\chi_{V}(a)\;=\;(a,-\det V)_{F} is the quadratic character associated to V . Recall that a non-degenerate quadratic space V over a non-archimedian local field F is determined up to isomorphism by its dimension, its quadratic character \chi_{V} , and its Hasse invariant \epsilon(V) . We denote the Weil representation by \omega_{p} for F=\mathbb{Q}_{p} with p\leq\infty and by \omega_{\mathbb{A}} for F=\mathbb{A} , if we want to distinguish those cases. Furthermore, the action of \operatorname{Mp}_{r,F} commutes with the linear action by the group H(F) on S(V^{r}(F) , which we also use \omega to denote. Next we recall basic facts on Siegel theta functions. We begin by introducing explicit coordinates on V(\mathbb{R}) and pick as a base point z_{0}\in\mathcal{D} the negative line generated by (3.15) e_{3}\;=\;\begin{pmatrix}0&-1\\ 1&0\end{pmatrix}. The stabilizer of e_{3} in H(\mathbb{R})\cong\operatorname{GL}_{2}(\mathbb{R}) is equal to \operatorname{SO}_{2}(\mathbb{R})\times\mathbb{R}^{\times} , where \mathbb{R}^{\times} is embedded in the center of H(\mathbb{R}) . We also put (3.16) e_{1}\;=\;\begin{pmatrix}1&0\\ 0&-1\end{pmatrix},\qquad e_{2}\;=\;\begin{pmatrix}0&1\\ 1&0\end{pmatrix}. Then e=(e_{1},e_{2}) is an orthogonal basis of the real quadratic space z_{0}^{\perp} , and e_{1},e_{2},e_{3} is an orthogonal basis of V(\mathbb{R}) with (e_{1},e_{1})=(e_{2},e_{2})=-(e_{3},e_{3})=2 . At the archimedian place we consider the Schwartz function (3.17) \varphi_{\infty}(x)\;=\;\exp\left(-2\pi\operatorname{tr}(Q(x_{z_{0}^{\perp}})-Q(x_{z_{0}}))\right)\in S(V^{r}(\mathbb{R})). At the finite places we consider the characteristic function \varphi_{L}\;=\;\operatorname{char}(\widehat{L}^{r})\in S(V^{r}(\mathbb{A}_{f})) associated with the completion \widehat{L}=L\otimes_{\mathbb{Z}}\widehat{\mathbb{Z}} of the lattice L=L_{\mathfrak{M}}\subset V . For g\in\operatorname{Mp}_{r,\mathbb{A}} and h\in H(\mathbb{A}) , we let (3.18) \theta^{(r)}(g,h,\varphi_{L}\otimes\varphi_{\infty})=\sum_{x=(x_{1},\dots,x_{r})\in V^{r}(\mathbb{Q})}(\omega(g,h)\varphi_{L}\otimes\varphi_{\infty})(x) be the associated theta function on \operatorname{Mp}_{r,\mathbb{A}}\times H(\mathbb{A}) . It is invariant under left translations by \operatorname{Mp}_{r,\mathbb{Q}}\times H(\mathbb{Q}) . Since the Gaussian \varphi_{\infty} transforms in weight 1/2 under the action of the standard maximal compact subgroup of \operatorname{Mp}_{r,\mathbb{R}} , we obtain a classical theta function as follows. For a point \tau=u+iv\in\mathbb{H}_{r} in the Siegel upper half space in genus r we choose a\in\operatorname{GL}_{r}^{+}(\mathbb{R}) with a\,{}^{t}a=v . Then, using the above notation, the element g_{\tau}\;=\;n(u)m(a)\in\operatorname{Mp}_{r,\mathbb{R}} has the property g_{\tau}(i1_{r})=\tau . Similarly, for z\in\mathcal{D} we take h_{z}\in H(\mathbb{R})^{+} such that h_{z}z_{0}=z . The function (3.19) \theta_{L}^{(r)}(\tau,z)\,:=\,(\det v)^{-1/4}\theta^{(r)}(g_{\tau},h_{z},\varphi_{L}\otimes\varphi_{\infty}) is a classical theta function on \mathbb{H}_{r}\times\mathcal{D} associated with the even lattice L . As a function in z it is invariant under \Gamma=\Gamma_{\mathfrak{M}}\subset H(\mathbb{Q})^{+} . In the variable \tau it transforms as a non-holomorphic Siegel modular form of weight 1/2 , genus r , and level determined by the level of L_{\mathfrak{M}} . Using the formulas for the Weil representation, a quick computation shows that \displaystyle(\omega(g_{\tau},h_{z})\varphi_{\infty})(x) \displaystyle\;=\;\mathbf{e}(\operatorname{tr}Q(x)u)(\det a)^{3/2}\varphi_{\infty}(h_{z}^{-1}xa) \displaystyle\;=\;(\det v)^{3/4}\mathbf{e}\big(\operatorname{tr}(Q(x_{z^{\perp}})\tau)+\operatorname{tr}(Q(x_{z})\bar{\tau})\big). Consequently, \displaystyle\theta_{L}^{(r)}(\tau,z) \displaystyle\;=\;(\det v)^{1/2}\sum_{x\in L^{r}}\mathbf{e}\big(\operatorname{tr}(Q(x_{z^{\perp}})\tau)+\operatorname{tr}(Q(x_{z})\bar{\tau})\big) \displaystyle\;=\;(\det v)^{1/2}\sum_{x\in L^{r}}e^{-4\pi\operatorname{tr}(Q(x_{z^{\perp}})v)}\cdot\mathbf{e}\big(\operatorname{tr}(Q(x)\bar{\tau})\big). 3.3. The theta integral Let f be a Maass form of weight 0 for the group \Gamma with eigenvalue \lambda under the hyperbolic Laplace operator (3.20) \displaystyle\Delta=-y^{2}\left(\frac{\partial^{2}}{\partial x^{2}}+\frac{\partial^{2}}{\partial y^{2}}\right). We consider the theta integral (3.21) \displaystyle I^{(r)}(\tau,f)=\int_{\Gamma\backslash\mathcal{D}}f(z)\theta_{L}^{(r)}(\tau,z)\,d\mu(z), where d\mu(z)=\frac{dx\,dy}{y^{2}} denotes the invariant measure on \mathcal{D} . For r=1 this theta integral was considered by Katok and Sarnak [ 19 ] . For our purposes, we will be almost always interested in the case r=2 . In that case, we omit the superscript (r) from the notation. From now on we assume that D(B)\neq 1 so that \Gamma\backslash\mathcal{D} is compact. Then the integral converges absolutely and defines a Siegel Maass form of genus 2 and weight 1/2 for a congruence subgroup \widetilde{\Gamma} of \operatorname{Mp}_{2,\mathbb{R}} . The theta integral is also an eigenform for the invariant differential operators on \Gamma\backslash\mathcal{D} . To compute the eigenvalues we need to fix generators of the algebra of invariant differential operators. For this purpose we consider the Casimir elements C_{1},C_{2} for the symplectic group normalized as in ( A.6 ). Since elements in the center of the universal enveloping algebra preserve K -types, these descend to invariant differential operators in weight 1/2 , which we denote abbreviate as D_{1}:=D_{1,1/2} and D_{2}:=D_{2,1/2} . Proposition 3.1 . Let f be a Maass form as above with eigenvalue \lambda=s(1-s) . Then D_{i}I(\tau,f)\;=\;\lambda_{i}I(\tau,f), where \lambda_{1}\;=\;4\lambda-25,\qquad\lambda_{2}\;=\;8\lambda^{2}+58\lambda-\frac{627}{4}\,. Proof. Thanks to the definition ( 3.19 ) we can rewrite the theta integral as an integral of \theta^{(2)}(g_{\tau},h_{z},\varphi_{L}\otimes\varphi_{\infty}) against f on \Gamma\backslash\operatorname{PSL}_{2}(\mathbb{R}) . Since the element 1 in the Fock space corresponds to the standard Gaussian ( 3.17 ) and since \theta^{(2)} is given as a summation of translates under the Weil representation, we can compute the action of C_{i} using the infinitesimal Weil representation on the element 1 . We can now use ( A.8 ) of the appendix. ∎ Since L is an even lattice, the theta integral has a Fourier expansion of the form (3.22) \displaystyle I(\tau,f)\;=\;\sum_{T\in\operatorname{Sym}_{2}(\mathbb{Z})^{\vee}}I_{T}(v,f)\cdot\mathbf{e}(\operatorname{tr}Tu), where \operatorname{Sym}_{2}(\mathbb{Z})^{\vee} denotes the lattice of half integral symmetric 2\times 2 matrices, that is, the dual of \operatorname{Sym}_{2}(\mathbb{Z}) with respect to the trace form. The Fourier coefficients are given by I_{T}(v,f)\;=\;\int_{u\in\operatorname{Sym}_{2}(\mathbb{R})/\operatorname{Sym}_{2}(\mathbb{Z})}I(\tau,f)\cdot\mathbf{e}(-\operatorname{tr}Tu)\,du. Inserting the definition of the theta integral, we find \displaystyle I_{T}(v,f) \displaystyle=\int_{\Gamma\backslash\mathcal{D}}f(z)\int_{u\in\operatorname{Sym}_{2}(\mathbb{R})/\operatorname{Sym}_{2}(\mathbb{Z})}\theta_{L}^{(2)}(\tau,z)\cdot\mathbf{e}(-\operatorname{tr}Tu)\,du\,d\mu(z) \displaystyle=(\det v)^{1/2}e^{2\pi\operatorname{tr}Tv}\int_{\Gamma\backslash\mathcal{D}}f(z)\sum_{\begin{subarray}{c}x\in L^{2}\\ Q(x)=T\end{subarray}}e^{-4\pi\operatorname{tr}(Q(x_{z^{\perp}})v)}\,d\mu(z). For x\in L^{2} we define the orbital integral (3.23) \displaystyle I(x,v,f) \displaystyle=\;\int_{\Gamma_{x}\backslash\mathcal{D}}f(z)e^{-4\pi\operatorname{tr}(Q(x_{z^{\perp}})v)}\,d\mu(z), where \Gamma_{x} denotes the stabilizer of x in \Gamma . Then, by the usual unfolding argument, we obtain (3.24) I_{T}(v,f)\;=\;(\det v)^{1/2}e^{2\pi\operatorname{tr}Tv}\sum_{\begin{subarray}{c}x\in R_{T}\end{subarray}}I(x,v,f), where (3.25) R_{T}\;=\;\{x\in L^{2}\mid\;Q(x)\;=\;T\}/\Gamma is a set of representatives for the \Gamma -orbits of x\in L^{2} with Q(x)=T . Since V is anisotropic, by reduction theory, for all T\in\operatorname{Sym}_{2}(\mathbb{Z})^{\vee} the set R_{T} is finite. If T is invertible, then for all x\in L^{2} with Q(x)=T , the space x^{\perp}\subset V is of dimension one. Hence the stabilizer of x is given by \Gamma_{x}=\{\pm 1\} . The following result can be proved in the same way as Proposition 3.1 . Proposition 3.2 . Let x\in L^{2} . Let f:\mathcal{D}\to\mathbb{C} be a smooth function which is invariant under \Gamma_{x} and which is an eigenfunction of \Delta with eigenvalue \lambda=s(1-s) . Assume that the function f(z)e^{-4\pi\operatorname{tr}(Q(x_{z^{\perp}})v)} is of rapid decay on \Gamma_{x}\backslash\mathcal{D} . Then the orbital integral ( 3.23 ) of f converges and \displaystyle(\det v)^{1/2}\mathbf{e}(\operatorname{tr}Q(x)\bar{\tau})I(x,v,f) is an eigenfunction of D_{1} and D_{2} with eigenvalues as in Proposition 3.1 . We state some basic properties of orbital integrals, which will be used for the computation of the Fourier coefficients of the theta integral. The group \operatorname{GL}_{2}(\mathbb{R}) acts on V(\mathbb{R})^{2} (viewed as row vectors) by multiplication from the right, that is, (3.26) \displaystyle x\mapsto xa\;=\;(x_{1},x_{2})a for x=(x_{1},x_{2})\in V(\mathbb{R})^{2} and a\in\operatorname{GL}_{2}(\mathbb{R}) . Moreover, this group acts on positive definite 2\times 2 matrices by v\mapsto av\,{}^{t}a. The group H(\mathbb{R}) acts on V(\mathbb{R})^{2} by conjugation, that is, (3.27) \displaystyle x\mapsto g\cdot x\;=\;(gx_{1}g^{-1},gx_{2}g^{-1}) for g\in H(\mathbb{R}) . Moreover, it acts on smooth functions f:\mathcal{D}\to\mathbb{C} by the slash action (pull-back) f\mapsto f\mid g. For these actions, the following relations are easily verified. Proposition 3.3 . Using the above notation we have (3.28) \displaystyle I(xa,v,f) \displaystyle\;=\;I(x,av\,{}^{t}a,f), (3.29) \displaystyle I(h.x,v,f) \displaystyle\;=\;I(x,v,f\mid h) for a\in\operatorname{GL}_{2}(\mathbb{R}) and h\in H(\mathbb{R}) . 3.3.1. The Siegel- \Phi operator Holomorphic Siegel modular forms posses a Fourier expansion around the maximal dimensional cusp of the Siegel spaces and the constant terms of this Fourier expansion is obtained by the classical Siegel- \Phi -operator, taking plainly the limit of the Siegel modular form along the block matrices \left(\begin{smallmatrix}\tau_{1}&0\\ 0&iv_{2}\end{smallmatrix}\right)\in\mathbb{H}^{r-1}\times\mathbb{H}\subset\mathbb{H}^{r} as v_{2}\to\infty . It sends Siegel modular forms of genus r to Siegel modular forms of genus r-1 , and in fact Hecke eigenforms to Hecke eigenforms, see e.g. [ 21 , Section II.5] , [ 1 , Section 2.3.4 and 4.2.3] . In the general context of Siegel Maass forms we are not aware of a general definition of a Siegel operator. This is related to the interesting problem of computing an expansion as in Theorem 1.2 and determining the coefficient growth for any Siegel Maass form. Instead we give an ad hoc definition on the subspace consisting of theta integrals. In our setting, we define the Siegel- \Phi operator by (3.30) (\Phi\theta_{L}^{(r)})(\tau_{1},z):=\lim_{v_{2}\to\infty}v_{2}^{-1/2}\theta_{L}^{(r)}(\left(\begin{smallmatrix}\tau_{1}&0\\ 0&iv_{2}\end{smallmatrix}\right),z), where \left(\begin{smallmatrix}\tau_{1}&0\\ 0&iv_{2}\end{smallmatrix}\right)\in\mathbb{H}^{r-1}\times\mathbb{H}\subset\mathbb{H}^{r} . It is clear the limit eliminates all x\in L^{r} with the last coordinate non-zero, and the existence of the limit is justified by the explicit formula (3.31) (\Phi\theta^{(r)})(\tau_{1},z)\;=\;\lim_{v_{2}\to\infty}v_{2}^{-1/2}\theta_{L}^{(r)}(\left(\begin{smallmatrix}\tau_{1}&*\\ *&iv_{2}\end{smallmatrix}\right),z)\;=\;\theta_{L}^{(r-1)}(\tau_{1},z) for any r\geq 1 . This also justifies our ad-hoc definition: Proposition 3.4 . The Siegel- \Phi -operator on theta integrals defined by (3.32) \Phi I^{(r)}(\tau_{1},f)\,:=\,\lim_{v_{2}\to\infty}v_{2}^{-1/2}I^{(r)}(\left(\begin{smallmatrix}\tau_{1}&*\\ *&iv_{2}\end{smallmatrix}\right),f) converges and satisfies (3.33) \Phi I^{(r)}(\tau_{1},f)\;=\;\Phi I^{(r-1)}(\tau_{1},f) for any Maass form f of weight 0 . 3.4. Fourier coefficients for positive definite T Assume that T is postive definite in this subsection. According to ( 3.6 ) the Fourier coefficients of the theta integral I(\tau,f) have a further expansion in terms of the characters of {\operatorname{SO}}(T)/\{\pm 1\} as (3.34) \displaystyle I_{T}(v,f)\;=\;\sum_{n\in\mathbb{Z}}I_{T,n}(v,f), where (3.35) \displaystyle I_{T,n}(v,f)\;=\;\frac{1}{\pi}\int_{0}^{\pi}I_{T}\left((B^{-1}\,{}^{t}k_{\theta}B)\,v\,({}^{t}Bk_{\theta}\,{}^{t}B^{-1}),f\right)e^{-2in\theta}\,d\theta. Similarly as in ( 3.24 ) these coefficients decompose into contributions coming from the orbital integrals, that is, (3.36) \displaystyle I_{T,n}(v,f) \displaystyle=\;(\det v)^{1/2}e^{2\pi\operatorname{tr}Tv}\sum_{x\in R_{T}}I_{n}(x,v,f), where (3.37) \displaystyle I_{n}(x,v,f) \displaystyle=\;\frac{1}{\pi}\int_{0}^{\pi}I\left(x,(B^{-1}\,{}^{t}k_{\theta}B)\,v\,({}^{t}Bk_{\theta}\,{}^{t}B^{-1}),f\right)e^{-2in\theta}\,d\theta. Remark 3.5 . Let x\in L^{2} with Q(x)=T and let f:\mathcal{D}\to\mathbb{C} be an eigenfunction of \Delta with eigenvalue \lambda=s(1-s) . Assume that the function f(z)e^{-4\pi\operatorname{tr}(Q(x_{z^{\perp}})v)} is of rapid decay on \mathcal{D} . Then Proposition 3.2 implies that (\det v)^{1/2}e^{2\pi\operatorname{tr}Tv}I_{n}(x,v,f) is a Whittaker function of index (T,n) in the sense of Section 3.1 . Remark 3.6 . For a matrix M=\left(\begin{smallmatrix}a&b\\ c&d\end{smallmatrix}\right) we put M^{*}=\left(\begin{smallmatrix}a&-b\\ -c&d\end{smallmatrix}\right) . It is easily seen that the coefficients I_{T,n}(v,f) possess the symmetry I_{T,n}(v,f)\;=\;I_{T^{*},-n}(v^{*},f). The group \operatorname{O}_{2}(\mathbb{R}) acts on the set of orthonormal bases of z_{0}^{\perp} via the inclusion into \operatorname{GL}_{2}(\mathbb{R}) and ( 3.26 ). It also acts on this set via the inclusion into H(\mathbb{R}) and ( 3.27 ). The following lemma gives a compatibility for these actions. We call an orthonormal basis x=(x_{1},x_{2}) of z_{0}^{\perp} positively oriented if there is a k\in\operatorname{SO}_{2}(\mathbb{R}) such that x=2^{-1/2}ek . Note that either x or (x_{1},-x_{2}) is positively oriented. Lemma 3.7 . If x=(x_{1},x_{2}) is an oriented orthonormal basis of z_{0}^{\perp} and k\in\operatorname{SO}_{2}(\mathbb{R}) , then k\cdot x\;=\;xk^{2}. Proof. Since \operatorname{SO}_{2}(\mathbb{R}) acts transitively on the set of positively oriented orthonormal bases of z_{0}^{\perp} , it suffices to check that the actions agree on the orthogonal basis e , that is, \displaystyle(ke_{1}k^{-1},ke_{2}k^{-1}) \displaystyle\;=\;(e_{1},e_{2})k^{2}. This is verified by a straightforward computation. ∎ Proposition 3.8 . For any smooth and bounded function f on \mathcal{D} and for k\in\operatorname{SO}_{2}(\mathbb{R}) the orbital integral satisfies (3.38) I(e,k^{2}v\,{}^{t}k^{2},f)\;=\;I(e,v,f\mid k). Proof. We compute \displaystyle I(e,k^{2}v\,{}^{t}k^{2},f)=I(ek^{2},v,f)=I(k\cdot e,v,f)=I(e,v,f\mid k), using Proposition 3.3 together with Lemma 3.7 . ∎ Note that the reflection \left(\begin{smallmatrix}1&0\\ 0&-1\end{smallmatrix}\right)\in\operatorname{O}_{2}(\mathbb{R}) satisfies \begin{pmatrix}1&0\\ 0&-1\end{pmatrix}\cdot e=e\begin{pmatrix}1&0\\ 0&-1\end{pmatrix}. Arguing as in the proof of Proposition 3.8 , we obtain the identities of orbital integrals (3.39) \displaystyle I(e,v^{*},f) \displaystyle\;=\;I(e,v,f\mid\sigma), (3.40) \displaystyle I_{n}(e,v^{*},f) \displaystyle\;=\;I_{-n}(e,v,f\mid\sigma). Lemma 3.9 . Let x,x^{\prime}\in V(\mathbb{R})^{2} such that Q(x)=Q(x^{\prime})\in\operatorname{Sym}_{2}(\mathbb{R}) is invertible. Then there exists a g_{1}\in H(\mathbb{R}) satisfying x=g_{1}x^{\prime} . It is unique up to multiplication by an element of the center of H(\mathbb{R}) . Proof. We denote by \langle x\rangle_{\mathbb{R}}=\mathbb{R}x_{1}+\mathbb{R}x_{2} the subspace of V(\mathbb{R}) generated by x=(x_{1},x_{2})\in V(\mathbb{R})^{2} . By assumption, x=(x_{1},x_{2}) and x^{\prime}=(x_{1}^{\prime},x_{2}^{\prime}) are pairs of linearly independent vectors. Let h be the linear map defined by h:\langle x^{\prime}\rangle_{\mathbb{R}}\to\langle x\rangle_{\mathbb{R}},\quad h(x_{1}^{\prime})\;=\;x_{1},\quad h(x_{2}^{\prime})\;=\;x_{2}. Since Q(x^{\prime})=Q(x) , this is an isometry of quadratic spaces. Since Q(x) is invertible, the quadratic spaces are non-degenerate. According to Witt’s Theorem there exists an element h_{1}\in\operatorname{O}(V)(\mathbb{R}) extending h , that is, h_{1}\mid_{\langle x^{\prime}\rangle_{\mathbb{R}}}=h . This element is unique up to multiplication from the left with the reflection \sigma that fixes \langle x\rangle_{\mathbb{R}} and acts by multiplication by -1 on the orthogonal complement. In particular, replacing h_{1} by \sigma\circ h_{1} if necessary, we may assume without loss of generality that h_{1}\in\operatorname{SO}(V)(\mathbb{R}) . Then h_{1} is the unique element of \operatorname{SO}(V)(\mathbb{R}) satisfying h_{1}\mid_{\langle x^{\prime}\rangle_{\mathbb{R}}}=h . Now any preimage g_{1}\in H(\mathbb{R}) of h_{1} under the natural surjective map H(\mathbb{R})\to\operatorname{SO}(V)(\mathbb{R}) has the required properties. ∎ Note that in Lemma 3.9 the reduced norm of g_{1} may be negative. For example, this is the case if x=(e_{1},e_{2}) and x^{\prime}=(e_{1},-e_{2}) , where g_{1} is a scalar multiple of \left(\begin{smallmatrix}1&0\\ 0&-1\end{smallmatrix}\right) . Since T is positive definite, there exists a B\in\operatorname{GL}_{2}(\mathbb{R}) such that T={}^{t}BB . If \widetilde{B}\in\operatorname{GL}_{2}(\mathbb{R}) is a second matrix with this property, then \widetilde{B}=kB with k\in\operatorname{O}_{2}(\mathbb{R}) . The pair \displaystyle x^{\prime}=(x_{1}^{\prime},x_{2}^{\prime})\;=\;(e_{1},e_{2})B\in V(\mathbb{R})^{2} satisfies Q(x^{\prime})=T . If x\in V(\mathbb{R})^{2} also satisfies Q(x)=T , then according to Lemma 3.9 there exists a g_{x}\in H(\mathbb{R}) such that x\;=\;g_{x}(e_{1},e_{2})B. 3.4.1. Geodesic Taylor expansion of a Maass form We will express the coefficients of the Fourier expansion of the theta integral in terms of geodesic Taylor coefficients of the Maass form f at Heegner points. Here we recall some facts on geodesic Taylor expansions, following [ 11 , Section 1] , see also e.g. [ 17 , Chapter 1.3] . Consider the group \operatorname{SL}_{2}(\mathbb{R})\subset H(\mathbb{R}) and its Cartan decomposition \operatorname{SL}_{2}(\mathbb{R})=KAK , where (3.41) A\;=\;\{a_{t}\mid\,t\in\mathbb{R}\}\quad\text{with}\quad a_{t}\;=\;\begin{pmatrix}e^{t/2}&0\\ 0&e^{-t/2}\end{pmatrix}, and K=\operatorname{SO}_{2}(\mathbb{R}) . The map (3.42) \displaystyle[0,\pi)\times(0,\infty)\to\mathbb{H},\quad(\theta,t)\mapsto k_{\theta}a_{t}i is injective and has as its image the upper half plane \mathbb{H} with the point i removed. Here k_{\theta}=\left(\begin{smallmatrix}\cos\theta&\sin\theta\\ -\sin\theta&\cos\theta\end{smallmatrix}\right)\in K as before. Hence any z\in\mathbb{H} can be written in the form z=k_{\theta}a_{t}i with t\in\mathbb{R}_{\geq 0} and \theta\in[0,\pi) . The pair (t,\theta) defines the standard geodesic polar coordinates of z centered at i , where t is the geodesic distance from z to i , and 2\theta the angle determined by the geodesic ray i\mathbb{R}_{\geq 1} and the geodesic ray from i to z . According to [ 17 , Chapter 1.3] , the invariant measure d\mu(z)=\frac{dx\,dy}{y^{2}} becomes in these coordinates d\mu(z)\;=\;(2\sinh t)d\theta\,dt. Moreover, the invariant Laplacian ( 3.20 ) is expressed as (3.43) \displaystyle\Delta\;=\;-\frac{\partial^{2}}{\partial t^{2}}-\frac{\cosh t}{\sinh t}\frac{\partial}{\partial t}-\frac{1}{(2\sinh t)^{2}}\frac{\partial^{2}}{\partial\theta^{2}}. By pull-back via ( 3.42 ), we may view any function f on \mathbb{H} as a function of t\in\mathbb{R}_{\geq 0} and \theta\in\mathbb{R} , which is \pi\mathbb{Z} -periodic in \theta . Hence it has a geodesic Taylor expansion at the point z_{0}=i of the form (3.44) f(k_{\theta}a_{t}z_{0})\;=\;\sum_{n\in\mathbb{Z}}f_{n,t}(z_{0})e^{2in\theta}, where the coefficients are given by (3.45) \displaystyle\qquad f_{n,t}(z_{0})\;=\;\frac{1}{\pi}\int_{0}^{\pi}f(k_{\theta}a_{t}z_{0})e^{-2in\theta}\,d\theta. The shape of the Fourier coefficients has for instance been determined by Fay. Recall from Appendix B the definition of Legendre’s P -function P^{-\mu}_{\nu}(u) , which we will use on the interval u\in(1,\infty) and for s\in\mathbb{C} . Proposition 3.10 . Suppose that f is an eigenfunction of the hyperbolic Laplacian \Delta with eigenvalue \lambda=s(1-s) . Then the standard geodesic Taylor expansion of f at z_{0}=i has the form (3.46) \displaystyle f(z)\;=\;\sum_{n\in\mathbb{Z}}f_{n}(z_{0})P^{-|n|}_{-s}(\cosh(t))\cdot e^{2in\theta}, where the f_{n}(z_{0}) are unique complex coefficients and P^{-\mu}_{\nu}(u) denotes Legendre’s P -function. Proof. Using the Laplacian in polar coordintes ( 3.43 ), the expansion ( 3.44 ), and the fact that f is an eigenfunction, we obtain for the coefficients f_{n,t}(z_{0}) the differential equation ( B.3 ) with u=\cosh(t) and parameters \nu=-s (or equivalently s-1 ), \mu=|n| . This implies that f_{n,t}(z_{0}) is a linear combination of the Legendre P -function and the Legendre Q -function. Since the Q -function is not regular at t=0 , the coefficient of Q -function vanishes. Hence f_{n,t}(z_{0})\;=\;f_{n}(z_{0})P^{-|n|}_{-s}(\cosh(t)) for a unique coefficient f_{n}(z_{0}) . ∎ More generally, if z_{1}\in\mathbb{H} is any point, we choose a translation matrix g\in\operatorname{SL}_{2}(\mathbb{R}) such that z_{1}=gi . We obtain geodesic polar coordinates centered at z_{1} by writing z=gk_{\theta}a_{t}i . Then t denotes again the hyperbolic distance from z to z_{1} , and 2\theta the angle determined by the geodesic ray g(i\mathbb{R}_{\geq 1}) and the geodesic ray from z_{1} to z . Note that the angle actually depends on the choice of g , not only on z_{1} . The geodesic Taylor expansion of f at the point z_{1} (with respect to g ) is defined as the geodesic Taylor expansion of f\mid g at z_{0}=i . The corresponding Taylor coefficients are denoted by f_{n,g}(z_{1})=(f\mid g)_{n}(z_{0}) , or simply by f_{n}(z_{1}) if the choice of g is clear from the context. Hence, we have the expansion (3.47) \displaystyle f(z)\;=\;\sum_{n\in\mathbb{Z}}f_{n,g}(z_{1})P^{-|n|}_{-s}(\cosh(t))\cdot e^{2in\theta}, where f_{n,g}(z_{1})P^{-|n|}_{-s}(\cosh(t))=\frac{1}{\pi}\int_{0}^{\pi}f(gk_{\theta}a_{t}i)e^{-2in\theta}\,d\theta, and t denotes the hyperbolic distance from z to z_{1} and 2\theta the angle as described above. Remark 3.11 . i) Let the notation be as above. For \alpha\in\mathbb{R} , we have z_{1}=gi=gk_{\alpha}i . The corresponding geodesic Taylor coefficients of f satisfy f_{n,gk_{\alpha}}(z_{1})\;=\;e^{2in\alpha}f_{n,g}(z_{1}). ii) The geodesic Taylor coefficients can also be computed using differential operators, see e.g. [ 11 , Theorem 1.2] . 3.4.2. Computation of the Whittaker coefficients We are now ready to compute the Whittaker coefficients I_{T,n}(v,f) in ( 3.34 ). According to ( 3.36 ) it suffices to determine the analogous coefficients I_{n}(x,v,f) of the orbital integrals for x\in R_{T} . Using the coordinates of Section 3.4.1 , we consider the function h(k_{\theta}a_{t}z_{0})=P^{-|2n|}_{-s}(\cosh(t))e^{-4in\theta} on \mathcal{D} . It is an eigenfunction of \Delta with eigenvalue s(1-s) . In view of Remark 3.5 , we may use the orbital integral I_{n}(e,v,h) to construct a Whittaker function on \mathbb{H}_{2} . Theorem 3.12 . Let n\in\mathbb{Z} . The function (3.48) \displaystyle\mathcal{W}^{+,+}_{n}(v,s)\,:=\,\det(v)^{1/2}e^{2\pi\operatorname{tr}(v)}\cdot I_{n}(e,v,P^{-|2n|}_{-s}(\cosh(t))e^{-4in\theta}) is a Whittaker function of index (1,n) and weight 1/2 . More precisely, it has the following properties: (i) it has moderate growth, (ii) it satisfies D_{i}\left(\mathcal{W}^{+,+}_{n}(v,s)\mathbf{e}(\operatorname{tr}u)\right)\;=\;\lambda_{i}\cdot\mathcal{W}^{+,+}_{n}(v,s)\mathbf{e}(\operatorname{tr}u) with eigenvalues \lambda_{i} as in Proposition 3.1 , (iii) it satisfies \mathcal{W}^{+,+}_{n}({}^{t}k_{\theta}vk_{\theta},s)=e^{2in\theta}\mathcal{W}^{+,+}_{n}(v,s) for k_{\theta}\in\operatorname{SO}_{2}(\mathbb{R}) , (iv) and \mathcal{W}^{+,+}_{n}(v^{*},s)=\mathcal{W}^{+,+}_{-n}(v,s) . Furthermore, it has the integral representations (3.49) \displaystyle\mathcal{W}^{+,+}_{n}(v,s) \displaystyle=\;2(\det v)^{1/2}e^{2\pi\operatorname{tr}(v)}\int\limits_{t>0}\int\limits_{0}^{\pi}\!\sinh(t)P^{-|2n|}_{-s}(\cosh{t}) \displaystyle\times\exp(-4in\alpha)\,\exp(-4\pi\operatorname{tr}(Q((a_{t}^{-1}k_{\alpha}^{-1}e)_{z_{0}^{\perp}})v))\,d\alpha\,dt\,. The argument of the second exponential factor can be computed and will be abbreviated by (3.50) \displaystyle\Upsilon \displaystyle:=\,\Upsilon_{t,\alpha}(v):=\operatorname{tr}(Q((a_{t}^{-1}k_{\alpha}^{-1}e)_{z_{0}^{\perp}})v)) \displaystyle=\;v_{1}^{2}((c^{2}-s^{2})^{2}+4c^{2}s^{2}\cosh(t)^{2})+v_{2}^{2}((c^{2}-s^{2})^{2}c^{2}s^{2}+4\cosh(t)^{2}) \displaystyle=\;4\cosh(t)^{2}(v_{1}^{2}c^{2}s^{2}+v_{2}^{2})+(c^{2}-s^{2})^{2}(v_{1}^{2}+v_{2}^{2}c^{2}s^{2}) where c=\cos(\alpha) and s=\sin(\alpha) . Proof of Theorem 3.12 . The properties (i)–(iii) follow immediately from Proposition 3.2 and Remark 3.5 . Property (iv) is a consequence of ( 3.40 ). It remains to prove the integral representation. In fact, we will show slightly more generally, that if f:\mathcal{D}\to\mathbb{C} is any smooth eigenfunction of \Delta with eigenvalue \lambda=s(1-s) , then (3.51) \displaystyle I_{n}(e,v,f) \displaystyle=2f_{-2n}(z_{0})\int\limits_{t>0}\int\limits_{0}^{\pi}P^{-|2n|}_{-s}(\cosh{t})e^{-4in\alpha}\,e^{-4\pi\Upsilon}\sinh(t)\,d\alpha\,dt. The assertion then follows by specializing f to the function P^{-|2n|}_{-s}(\cosh(t))e^{-4in\theta} . To show ( 3.51 ), we deduce by ( 3.37 ) and Proposition 3.8 that \displaystyle I_{n}(e,v,f) \displaystyle\;=\;\frac{1}{2\pi}\int_{0}^{2\pi}I\left(e,{}^{t}k_{\theta}vk_{\theta},f\right)e^{-2in\theta}\,d\theta \displaystyle\;=\;\frac{1}{2\pi}\int_{0}^{2\pi}I\left(e,v,f\mid k_{-\theta/2}\right)e^{-2in\theta}\,d\theta \displaystyle\;=\;\frac{1}{\pi}\int_{0}^{\pi}I\left(e,v,f\mid k_{\theta}\right)e^{4in\theta}\,d\theta. We use the geodesic polar coordinates ( 3.42 ) around z_{0} to express I(e,v,f) as follows: \displaystyle I(e,v,f) \displaystyle\;=\;\int_{\mathbb{H}}f(z)e^{-4\pi\operatorname{tr}(Q(e_{z^{\perp}})v)}\,d\mu(z), \displaystyle\;=\;2\int_{t>0}\int_{\alpha=0}^{\pi}f(k_{\alpha}a_{t}z_{0})e^{-4\pi\Upsilon}\,\sinh(t)\,d\alpha\,dt. Putting this into the integral for I_{n}(e,v,f) we get \displaystyle I_{n}(e,v,f) \displaystyle\;=\;\frac{2}{\pi}\int_{\theta=0}^{\pi}\int_{t>0}\int_{\alpha=0}^{\pi}f(k_{\theta}k_{\alpha}a_{t}z_{0})e^{-4\pi\Upsilon}\sinh(t)\,d\alpha\,dt\,e^{4in\theta}d\theta \displaystyle\;=\;\frac{2}{\pi}\int_{t>0}\int_{\alpha=0}^{\pi}\int_{\theta=0}^{\pi}f(k_{\theta+\alpha}a_{t}z_{0})e^{4in\theta}\,d\theta\,e^{-4\pi\Upsilon}\sinh(t)\,d\alpha\,dt. By means of Proposition 3.10 we find that \displaystyle\frac{1}{\pi}\int_{0}^{\pi}f(k_{\theta+\alpha}a_{t}z_{0})e^{4in\theta}\,d\theta\;=\;f_{-2n}(z_{0})\cdot P^{-|2n|}_{-s}(\cosh{t})e^{-4in\alpha}. Consequently, \displaystyle I_{n}(e,v,f) \displaystyle\;=\;f_{-2n}(z_{0})\cdot 2\int\limits_{t>0}\int\limits_{0}^{\pi}P^{-|2n|}_{-s}(\cosh{t})e^{-4in\alpha}\,e^{-4\pi\Upsilon}\sinh(t)\,d\alpha\,dt. This concludes the proof of the theorem. ∎ Remark 3.13 . i) Let B\in\operatorname{GL}_{2}(\mathbb{R}) such that T={}^{t}BB as before. It follows that the function (3.52) \displaystyle\mathcal{W}^{+,+}_{B,n}(v,s)\,:=\,(\det B)^{-1}\,\mathcal{W}^{+,+}_{n}(Bv\,{}^{t}B,s) is a Whittaker function of index (T,n) and weight 1/2 with the same eigenvalues as in Theorem 3.12 (ii). ii) If k_{\theta}\in\operatorname{SO}_{2}(\mathbb{R}) , then \displaystyle\mathcal{W}^{+,+}_{k_{\theta}B,n}(v,s)\;=\;e^{-2in\theta}\,\mathcal{W}^{+,+}_{B,n}(v,s). iii) Because of Theorem 3.12 (iv), we have \displaystyle\mathcal{W}^{+,+}_{\left(\begin{smallmatrix}1&0\\ 0&-1\end{smallmatrix}\right)B,n}(v,s)\;=\;\mathcal{W}^{+,+}_{B,-n}(v,s). iv) The functional equation P^{n}_{-s}(z)=P^{n}_{s-1}(z) of the Legendre function implies the functional equation \mathcal{W}^{+,+}_{B,n}(v,s)\;=\;\mathcal{W}^{+,+}_{B,n}(v,1-s) for the Whittaker function. Theorem 3.14 . Let B\in\operatorname{GL}_{2}(\mathbb{R}) such that T={}^{t}BB . Assume that f:\mathcal{D}\to\mathbb{C} is a smooth eigenfunction of \Delta with eigenvalue \lambda=s(1-s) . Then the n -th coefficient of I_{T}(v,f) is given by (3.53) \displaystyle I_{T,n}(v,f) \displaystyle\;=\;\mathcal{W}^{+,+}_{B,n}(v,s)\cdot\sum_{x\in R_{T}}f_{-2n,g_{x}}(z_{x}). Here, for every x\in R_{T} we have fixed g_{x}\in H(\mathbb{R}) such that x=g_{x}(e_{1},e_{2})B , and z_{x}=g_{x}z_{0}=x^{\perp}\in\mathcal{D} denotes the corresponding Heegner point. Moreover, f_{-2n,g_{x}}(z_{x}) denotes a geodesic Taylor coefficient at z_{x} as in ( 3.47 ), and \mathcal{W}^{+,+}_{B,n}(v,s) the Whittaker function ( 3.52 ). In particular, the 0 -th coefficient is given by \displaystyle I_{T,0}(v,f) \displaystyle\;=\;\mathcal{W}^{+,+}_{B,0}(v,s)\cdot\sum_{x\in R_{T}}f(z_{x}). Proof of Theorem 3.14 . According to ( 3.36 ), we need to compute the summands of (3.54) \displaystyle I_{T,n}(v,f) \displaystyle=(\det v)^{1/2}e^{2\pi\operatorname{tr}Tv}\sum_{x\in R_{T}}I_{n}(x,v,f), where \displaystyle I_{n}(x,v,f) \displaystyle=\frac{1}{\pi}\int_{0}^{\pi}I\left(x,(B^{-1}\,{}^{t}k_{\theta}B)\,v\,({}^{t}Bk_{\theta}\,{}^{t}B^{-1}),f\right)e^{-2in\theta}\,d\theta. From the identity x=g_{x}(e_{1},e_{2})B we deduce by Proposition 3.3 that \displaystyle I\left(x,(B^{-1}\,{}^{t}k_{\theta}B)\,v\,({}^{t}Bk_{\theta}\,{}^{t}B^{-1}),f\right) \displaystyle=I\left(g_{x}eB,(B^{-1}\,{}^{t}k_{\theta}B)\,v\,({}^{t}Bk_{\theta}\,{}^{t}B^{-1}),f\right) \displaystyle=I\left(g_{x}e,{}^{t}k_{\theta}B\,v\,{}^{t}Bk_{\theta},f\right) \displaystyle=I\left(e,{}^{t}k_{\theta}B\,v\,{}^{t}Bk_{\theta},f\mid g_{x}\right). This implies (3.55) \displaystyle I_{n}(x,v,f) \displaystyle\;=\;I_{n}(e,Bv\,{}^{t}B,f\mid g_{x}), an identity which reduces our computation to the case x=e , T=1 , and B=1 . We infer by Theorem 3.12 and ( 3.51 ) that \displaystyle I_{n}(x,v,f) \displaystyle\;=\;(f\mid g_{x})_{-2n}(z_{0})\cdot I_{n}(e,Bv\,{}^{t}B,P^{-|2n|}_{-s}(\cosh(t))e^{-4in\theta}). Inserting this into ( 3.54 ) and using ( 3.48 ), we obtain \displaystyle I_{T,n}(v,f) \displaystyle\;=\;\sum_{x\in R_{T}}(f\mid g_{x})_{-2n}(z_{0})\cdot(\det B)^{-1}\mathcal{W}_{n}(Bv\,{}^{t}B,s). Now the first assertion follows from ( 3.52 ) and the fact that (f\mid g_{x})_{-2n}(z_{0})=f_{-2n,g_{x}}(z_{x}) . For the second we use in addition that f_{0,g_{x}}(z_{x}) is just the value of f at z_{x}=g_{x}z_{0} . ∎ Remark 3.15 . i) If we replace in Theorem 3.14 the matrix B by B^{\prime}=k_{\theta}B with k_{\theta}\in\operatorname{SO}_{2}(\mathbb{R}) , the Whittaker function changes by \mathcal{W}^{+,+}_{k_{\theta}B,n}(v,s)\;=\;e^{-2in\theta}\cdot\mathcal{W}^{+,+}_{B,n}(v,s). Then we also have to replace the g_{x}\in H(\mathbb{R}) by g_{x}^{\prime}=g_{x}k_{-\theta/2} . It is easily seen that (f\mid g_{x}^{\prime})_{-2n}(z_{0})\;=\;e^{2in\theta}\cdot(f\mid g_{x})_{-2n}(z_{0}), and hence the right hand side of ( 3.53 ) remains unchanged. ii) The definition of the Whittaker function and Theorem 3.12 (iv) imply that \mathcal{W}_{B^{*},-n}(v^{*},s)=\mathcal{W}_{B,n}(v,s). 3.5. Fourier coefficients for indefinite T 3.5.1. Geodesic cartesian coordinate expansion of a Maass form In the so-called Flensted-Jensen coordinates, see Remark 1.3 i) for the geometric interpretation, we write g=a_{b}\rho_{t}k_{\theta}\in\operatorname{SL}_{2}(\mathbb{R}) with \rho_{t} defined in ( 3.9 ). This gives a decomposition \operatorname{SL}_{2}(\mathbb{R})=ARK with R=\{\rho_{t}:t\in\mathbb{R}\} . In these coordinates, the Laplacian \Delta and the Haar measure are (3.56) \Delta\;=\;-\frac{1}{4}\left(\partial_{t}^{2}+2\tanh(2t)\partial_{t}+\frac{4\partial_{b}^{2}}{(\cosh(2t))^{2}}\right),~d\mu(z)\;=\;\frac{dxdy}{y^{2}}\;=\;2(\cosh 2t)dtdb. Let f be a Maass cusp form on \Gamma\backslash\mathbb{H} with eigenvalue \lambda=s(1-s)=\frac{1}{4}+r^{2},r\geq 0 under \Delta . The subgroup A\cap\Gamma is infinite cyclic. Choose a generator a_{b_{0}} with b_{0}>0 . For n\in\mathbb{Z} , we are interested in understanding the function (3.57) C_{n,f}(g)\,:=\,\frac{1}{b_{0}}\int_{\mathbb{R}/\mathbb{Z}\cdot b_{0}}f((a_{b}g)\cdot i)\mathbf{e}(-nb/b_{0})db on \operatorname{SL}_{2}(\mathbb{R}) . Since a_{b+b^{\prime}}=a_{b}\cdot a_{b^{\prime}} , this function can be decomposed as C_{n,f}(a_{b^{\prime}}g)\;=\;\mathbf{e}(nb^{\prime}/b_{0})C_{n,f}(g) for all b^{\prime}\in\mathbb{R} . Also, C_{n,f} is right \operatorname{SO}_{2}(\mathbb{R}) -invariant. So we define the following function (3.58) c_{n,f}(t)\,:=\,\mathbf{e}(-nb/b_{0})C_{n,f}(a_{b}\rho_{t}k_{\theta})\;=\;\frac{1}{b_{0}}\int_{\mathbb{R}/\mathbb{Z}\cdot b_{0}}f((a_{b}\rho_{t})\cdot i)\mathbf{e}(-nb/b_{0})db. Notice that (3.59) \begin{split}c_{n,f}(-t)&\;=\;C_{n,f}(\rho_{-t}k_{\theta})\;=\;C_{n,f}(\left(\begin{smallmatrix}1&\\ &-1\end{smallmatrix}\right)\rho_{{t}}k_{-\theta}\left(\begin{smallmatrix}1&\\ &-1\end{smallmatrix}\right))\;=\;c_{n,\sigma(f)}(t),\end{split} where \sigma(f)(z)=f(-\overline{z}) . For an even Maass form f , i.e. if \sigma(f)=f , the function c_{n,f}(t) is even in t for all n\in\mathbb{Z} . Using (\Delta-\lambda)f=0 , we see that c_{n,f} satisfies the differential equation (3.60) \left(\partial_{t}^{2}+2\tanh(2t)\partial_{t}+\frac{-4(2\pi n/b_{0})^{2}}{(\cosh(2t))^{2}}+4\lambda\right)c_{n,f}(t)\;=\;0. We make a substitution u=\tanh(2t) , which implies e^{4t}=\frac{1+u}{1-u} , and set \widetilde{c}_{n,f}(u)\,:=\,\cosh(2t)^{1/2}c_{n,f}(t). This turns the equation above into the Legendre differential equation ( B.3 ) with parameters \mu=\pm ir=\pm(s-\frac{1}{2}) and \nu=-\frac{1}{2}\pm 2n\pi i/b_{0} . In particular, we define (3.61) \begin{split}\mathbb{P}_{n,s}^{\pm}(x)&\,:=\,\frac{1}{C^{\pm}}\left((P^{\mu}_{\nu}(x)+P^{-\mu}_{\nu}(x))\pm(P^{\mu}_{\nu}(-x)+P^{-\mu}_{\nu}(-x))\right),\\ C^{+}&\;=\;2(P^{\mu}_{\nu}(0)+P^{-\mu}_{\nu}(0)),~\quad C^{-}\;=\;2((P^{\mu}_{\nu})^{\prime}(0)+(P^{-\mu}_{\nu})^{\prime}(0))\end{split} for -10}\int_{\alpha=0}^{\pi}f(k_{\alpha}a_{t}z_{0})e^{-4\pi Q((a_{t}^{-1}k_{\alpha}^{-1}e_{3})_{z_{0}^{\perp}})v_{1}}\,\sinh(t)\,d\alpha\,dt, where we have used geodesic polar coordinates around z_{0} as in the proof of Theorem 3.12 in the latter equality. It is easily seen that \displaystyle k_{\alpha}^{-1}e_{3} \displaystyle\;=\;e_{3}, \displaystyle a_{t}^{-1}e_{3} \displaystyle\;=\;\sinh(t)e_{2}+\cosh(t)e_{3}, and therefore (a_{t}^{-1}k_{\alpha}^{-1}e_{3})_{z_{0}^{\perp}})\;=\;\sinh(t)e_{2}. Inserting this, we obtain by means of ( 3.45 ) and Proposition 3.10 that \displaystyle\widetilde{I}((e_{3},0),v,f) \displaystyle\;=\;2\int_{t>0}\int_{\alpha=0}^{\pi}f(k_{\alpha}a_{t}z_{0})e^{-4\pi\sinh^{2}(t)v_{1}}\,\sinh(t)\,d\alpha\,dt \displaystyle\;=\;2\pi f(z_{0})\int_{t>0}P_{-s}^{0}(\cosh t)e^{-4\pi\sinh^{2}(t)v_{1}}\,\sinh(t)\,dt \displaystyle\;=\;\pi f(z_{0})\int_{w>0}P_{-s}^{0}(\sqrt{1+w})\frac{e^{-4\pi v_{1}w}}{\sqrt{1+w}}\,dw. Inserting ( B.7 ) we obtain ( 3.74 ), concluding the proof of the theorem. ∎ Remark 3.22 . Let B\in\operatorname{GL}_{2}(\mathbb{R}) such that T={}^{t}B\left(\begin{smallmatrix}-1&0\\ 0&0\end{smallmatrix}\right)B as before. It follows that the function (3.75) \displaystyle\mathcal{W}_{T}^{-,0}(v,s):=(\det B)^{-1}\,\mathcal{W}^{-,0}(Bv\,{}^{t}B,s) is a Whittaker function of index T and weight 1/2 with the same eigenvalues as in Theorem 3.21 (iii). This function is actually independent of the choice of B , justifying the notation. Theorem 3.23 . Let B\in\operatorname{GL}_{2}(\mathbb{R}) such that T={}^{t}\!B\left(\begin{smallmatrix}-1&0\\ 0&0\end{smallmatrix}\right)B . Let f be a Maass form of weight 0 for \Gamma with eigenvalue \lambda=s(1-s) . Then (3.76) \displaystyle I_{T}(v,f) \displaystyle\;=\;\mathcal{W}^{-,0}_{T}(v,s)\cdot\sum_{x\in R_{T}}\frac{2}{|\Gamma_{x}|}f(z_{x}), where z_{x}\in\mathcal{D} denotes the Heegner point determined by the negative line in V(\mathbb{R}) generated by x . Proof. In terms of orbital integrals we have \displaystyle I_{T}(v,f) \displaystyle\;=\;(\det v)^{1/2}e^{2\pi\operatorname{tr}Tv}\sum_{\begin{subarray}{c}x\in R_{T}\end{subarray}}I(x,v,f) \displaystyle\;=\;(\det v)^{1/2}e^{2\pi\operatorname{tr}Tv}\sum_{\begin{subarray}{c}x\in R_{T}\end{subarray}}\frac{2}{|\Gamma_{x}|}\widetilde{I}(x,v,f). We choose for x\in R_{T} an element g_{x}\in H(\mathbb{R}) such that x\;=\;g_{x}(e_{3},0)B. According to Proposition 3.3 , we have \displaystyle\widetilde{I}(x,v,f) \displaystyle\;=\;\widetilde{I}(g_{x}(e_{3},0)B,v,f)\;=\;\widetilde{I}((e_{3},0),Bv\,{}^{t}B,f\mid g_{x}). This reduces the computation of the orbital integrals to the case when Q(x)=\left(\begin{smallmatrix}-1&0\\ 0&0\end{smallmatrix}\right) . By means of Theorem 3.21 , we obtain \displaystyle I_{T}(v,f) \displaystyle\;=\;\sum_{\begin{subarray}{c}x\in R_{T}\end{subarray}}\frac{2}{|\Gamma_{x}|}(f\mid g_{x})(z_{0})\cdot\det(B)^{-1}\mathcal{W}^{-,0}(Bv\,{}^{t}B,s). Here we have also used the fact that the uppper left entry of Bv\,{}^{t}B is equal to -\operatorname{tr}Tv . Since (f\mid g_{x})(z_{0})=f(z_{x}) , this implies the assertion. ∎ 3.6.2. T positive semidefinite. For x=g_{x}(e_{1},0)B with g_{x}\in H(\mathbb{R}) and B\in\operatorname{GL}_{2}(\mathbb{R}) , we can write the stabilizer as \Gamma_{x}=\{g_{x}a_{b}g_{x}^{-1}:b\in\mathbb{Z}\cdot b_{0}\} with b_{0}\in\mathbb{R}_{>0} uniquely determined by x . Applying Proposition 3.3 gives us \displaystyle I(x,v,f) \displaystyle\;=\;I((e_{1},0),v^{\prime},f_{x})\;=\;\int_{\mathbb{R}}\int_{\mathbb{R}/\mathbb{Z}\cdot b_{0}}f_{x}(a_{b}\rho_{t}\cdot i)db~e^{-4\pi\cosh(2t)^{2}v^{\prime}_{1}}2\cosh(2t)dt \displaystyle\;=\;2b_{0}\int_{\mathbb{R}}c_{0,f_{x}}(t)e^{-4\pi\cosh(2t)^{2}v^{\prime}_{1}}\cosh(2t)dt \displaystyle\;=\;2b_{0}\gamma_{f_{x},0}\int_{\mathbb{R}}\mathbb{P}^{+}_{0,s}(\tanh(2t))e^{-4\pi\cosh(2t)^{2}v^{\prime}_{1}}(\cosh 2t)^{1/2}dt. where v^{\prime}:=Bv{}^{t}B=\left(\begin{smallmatrix}v^{\prime}_{1}&*\\ *&*\end{smallmatrix}\right) . Here we have used \operatorname{tr}(Q((e_{1},0)_{(a_{b}\rho_{t}\cdot i)^{\perp}})v)\;=\;Q((e_{1})_{(\rho_{t}\cdot i)^{\perp}})v_{1}\;=\;\cosh(2t)^{2}v_{1}, Proposition 3.16 , and the oddness of \mathbb{P}^{-}_{n,s} . The quantity \gamma_{f_{x},0} is defined in ( 3.64 ) and rewritten as cycle integral in Remark 3.20 . Using the integral formula \int_{\mathbb{R}}\mathbb{P}^{+}_{0,s}\left(\frac{u}{\sqrt{u^{2}+v^{\prime}}}\right)e^{-4\pi u^{2}}\frac{4du}{(1+u^{2}/v^{\prime})^{1/4}}\;=\;\frac{e^{2\pi v^{\prime}}}{(4\pi v^{\prime})^{1/4}}W_{1/4,1/4-s/2}(4\pi v^{\prime}) (which can be proven by checking that both sides satisfy the same differential equation and by computing the asymptotics v^{\prime}\to\infty by using dominated convergence to determine the proportionality constant) we obtain (3.77) I(x,v,f)\;=\;b_{0}\gamma_{f_{x},0}\frac{e^{-2\pi v_{1}}}{(4\pi)^{1/4}v_{1}^{3/4}}W_{1/4,1/4-s/2}(4\pi v_{1}). We define as in ( 3.75 ) the functions (3.78) \begin{split}\mathcal{W}^{+,0}(v,s)&:=\det(v)^{1/2}(v_{1})^{-3/4}(4\pi)^{-1/4}W_{1/4,1/4-s/2}(4\pi v_{1}),\\ \mathcal{W}^{+,0}_{T}(v,s)&:=(\det B)^{-1}\,\mathcal{W}^{+,0}(Bv\,{}^{t}B,s),\end{split} for T={}^{t}B\left(\begin{smallmatrix}1&0\\ 0&0\end{smallmatrix}\right)B . These are Whittaker functions of positive semi-definite index T and weight \frac{1}{2} satisfying the conditions in Theorem 3.21 . Furthermore they are independent of the choice of B . Summing Equation ( 3.77 ) over x\in R_{T} gives us the following analogue of Theorem 3.23 . Theorem 3.24 . Let f be a Maass form of weight 0 for \Gamma with eigenvalue \lambda=s(1-s) . Then (3.79) \displaystyle I_{T}(v,f) \displaystyle\;=\;\mathcal{W}^{+,0}_{T}(v,s)\cdot\sum_{x\in R_{T}}b_{0}f(C_{x}) where f(C_{x}) is the cycle integral from Remark 3.20 . 4. The action of the Hecke algebra The goal of this section is to show in Proposition 4.4 that the action of the Hecke operators on the theta integrals can be expressed in terms of the usual Hecke action on the Maass forms. As usual, we mainly focus on r=2 , but for comparison we also record the case r=1 and check compatibility under the Siegel operator. The method is an application of the strategy of Rallis-Zhuravlev. As in these sources we restrict throughout this section to primes p\nmid 2D(B)\cdot\mathfrak{M} . As guide to notation, straight letters \widehat{T}_{p,i},T_{p,i} denote Hecke operators expressed in global Hecke rings, whereas calligraphic letters \widehat{\mathcal{T}}_{p,i},\mathcal{T}_{p,i} denote Hecke operators expressed in local Hecke rings. Decorations by a hat denote Hecke operators on the metaplectic side, whereas undecorated T ’s denotes Hecke operators on the orthogonal side, making use of the fact that we do not need here Hecke operators for the symplectic group. 4.1. Structure results for Hecke algebras For a subgroup \Gamma\subset G together with a semigroup S\subset G such that (\Gamma,S) is a Hecke pair, we denote by D(\Gamma,S)=D_{\mathbb{C}}(\Gamma,S) the associated Hecke algebra [ 1 , Chapter 3, §1] . We are interested in the structure of some of its subalgebras when G is metaplectic covering group \operatorname{Mp}_{r,\mathbb{R}} and orthogonal group \operatorname{SO}(V) for a quadratic space V with odd dimension, such as the one in ( 2.1 ). 4.1.1. The metaplectic Hecke algebra We recall the structure of various Hecke algebras related to the metaplectic covering group \operatorname{Mp}_{r,\mathbb{R}} , following mainly [ 1 ] and [ 50 ] . There is a global version, which acts modular forms, and a local version, which acts on Schwartz functions. They are compatible, and we start with the former. For N\in 4\mathbb{N} and any prime p\nmid N , define (4.1) S_{0}:=\left\{\begin{pmatrix}A&B\\ C&D\end{pmatrix}\in\operatorname{Sp}_{r}(\mathbb{Z}[p^{-1}]):C\equiv 0\bmod N\right\} and let \Gamma_{0}=\Gamma^{r}_{0}(N):=S_{0}\cap\operatorname{Sp}_{r}(\mathbb{Z})\subset\operatorname{Sp}_{r}(\mathbb{Z}) be the congruence subgroup of level N . Both (\Gamma_{0},S_{0}) and their preimages (\widehat{\Gamma}_{0},\widehat{S}_{0}) in \operatorname{Mp}_{r,\mathbb{R}} under the map p in ( 3.1 ) form a Hecke pair. In the Hecke ring D(\widehat{\Gamma}_{0},\widehat{S}_{0}) we consider the subring \widehat{E}_{p}=\widehat{E}_{p}(N) generated by (4.2) \widehat{T}_{p,i}=\widehat{T}^{(r)}_{p,i}:=\widehat{\Gamma}_{0}\widehat{K}_{i}\widehat{\Gamma}_{0},~\widehat{K}_{i}:=(K_{i},p^{(r-i)/2}),\quad K_{i}:=\frac{1}{p}\mathrm{diag}(pE_{i},E_{r-i},pE_{i},p^{2}E_{r-i}) for 0\leq i\leq r [ 50 , § 8.3] , where E_{m}:=(1,\dots,1)\in\mathbb{Z}^{m} . The elements in this ring act on Siegel modular forms (or automorphic forms) in the usual way, which we denote using the slash operator. If we replace \mathbb{Z}\subset\mathbb{Z}[p^{-1}] in the definition of \Gamma_{0}\subset S_{0} by \mathbb{Z}_{p}\subset\mathbb{Q}_{p} , the corresponding pair in \operatorname{Sp}_{r}(\mathbb{Q}_{p}) , denoted by (\Gamma_{p},S_{p}) , is again a Hecke pair. We denote their preimages in \operatorname{Mp}_{r,\mathbb{Q}_{p}} by \widehat{\Gamma}_{p}\subset\widehat{S}_{p} , which also form a Hecke pair. The subalgebra \widehat{\mathcal{E}}_{p}\subset D(\widehat{\Gamma}_{p},\widehat{S}_{p}) generated by (4.3) \widehat{\mathcal{T}}_{p,i}\;=\;\widehat{\mathcal{T}}^{(r)}_{p,i}\,:=\,\widehat{\Gamma}_{p}\widehat{K}_{p,i}\widehat{\Gamma}_{p},\qquad\widehat{K}_{p,i}\,:=\,[K_{i},1]\in\operatorname{Mp}_{r,\mathbb{Q}_{p}} is a local Hecke algebra. Lemma 4.1 . In the notations above with p\nmid N\in 4\mathbb{N} , the map (4.4) \epsilon:\widehat{E}_{p}(N)\mapsto\widehat{\mathcal{E}}_{p},\qquad\widehat{T}_{p,i}\mapsto\widehat{\mathcal{T}}_{p,i} is an isomorphism. Furthermore, we have \theta^{(r)}(g,h,\varphi)\mid\widehat{T}=\theta^{(r)}(g,h,\omega_{p}(\epsilon(\widehat{T}))\varphi) for all \widehat{T}\in\widehat{E}_{p}(N) . Proof. For this isomorphism see the equation above (8.12) in [ 50 ] , but note that the factor \chi_{Q}(p^{n-i}) loc. cit. is not present since the slash operator in (8.2) of [ 50 ] differs from ours in ( 3.2 ) by an extra factor \chi_{Q}(M) . The second claim follows from Equations (8.6), (8.7) and (8.12) in [ 50 ] . ∎ We denote by C_{r}:=\mathbb{C}[x_{1}^{\pm 1},\ldots,x_{r}^{\pm 1}]_{W_{r}} the invariant ring of the action of the Weyl group W_{r}=W(\operatorname{Sp}_{r}) . Recall that this group is the semidirect product of the symmetric group (with its usual permutation action on the x_{i} ) with a group isomorphic to (\mathbb{Z}/2\mathbb{Z})^{r} consisting of an involution for each i (sending x_{i}\mapsto x_{i}^{-1} and fixing the other variables). This is identified with the local Hecke algebra \widehat{\mathcal{E}}_{p} via the following result. Proposition 4.2 (Theorem 8.1 in [ 50 ] ) . The Satake map (4.5) \widehat{\mathcal{S}}_{r}:\widehat{\mathcal{E}}_{p}\to C_{r} sending a coset representative in \widehat{\Gamma}_{p}(M,t)\in\operatorname{Mp}_{r,\mathbb{Q}_{p}} with M=\left(\begin{matrix}A&B\\ 0&D\end{matrix}\right)\quad\text{and}\quad D=\left(\begin{matrix}d_{1}&*&*\\ 0&\ddots&*\\ 0&0&d_{r}\end{matrix}\right)\quad\text{to}\quad t^{-1}\prod_{j=1}^{r}(x_{j}\cdot p^{-j})^{\nu_{p}(d_{j})}\ is an isomorphism Using the decomposition of \widehat{\mathcal{T}}_{p,i} in (8.10) of [ 50 ] , we obtain the following consequence of Proposition 4.2 . Proposition 4.3 . In the notations above, we have (4.6) \begin{split}\widehat{\mathcal{S}}_{1}(\widehat{\mathcal{T}}^{(1)}_{p,0})&=p(x_{1}+x_{1}^{-1}),\\ \widehat{\mathcal{S}}_{2}(\widehat{\mathcal{T}}^{(2)}_{p,0})&=p^{3}(x_{1}x_{2}+x_{1}^{-1}x_{2}+x_{1}x_{2}^{-1}+x_{1}^{-1}x_{2}^{-1})+p^{2}(p-1)+p(p-1)\varepsilon_{p}^{-m},\\ \widehat{\mathcal{S}}_{2}(\widehat{\mathcal{T}}^{(2)}_{p,1})&=p^{2}(x_{1}+x_{1}^{-1}+x_{2}+x_{2}^{-1}),\end{split} where m=\dim(V) and \varepsilon_{p}:=1 , resp. i , if p\equiv 1\bmod 4 , resp. -1\bmod 4 . Proof. We first express \widehat{\mathcal{T}}^{(r)}_{p,i} using coset representatives \widehat{M}_{a,b}(B_{0},S,V) as in (8.8)-(8.11) of [ 50 ] . For r=1,i=0 , there are three possibilities for (a,b) . When a=b=0 , the indices B_{0},S,V are all trivial, and the image of this coset under \widehat{\mathcal{S}}_{r} is px_{1}^{-1} . When a=0,b=1 , the indices B_{0},V are trivial and S\in\mathbb{Z}/p^{2}\mathbb{Z} . Their images under \widehat{\mathcal{S}}_{r} gives px_{1} . When a=1,b=0 , the indices S,V are trivial and B_{0}\in(\mathbb{Z}/p\mathbb{Z})^{\times} . Its image under \widehat{\mathcal{S}}_{r} is (\varepsilon_{p}\frac{\det(Q)B_{0}}{p}) , and the sum is 0. This proves the first equation in ( 4.6 ). For r=2,i=0 , there are 6 cases for (a,b) . When a=b=0 , B_{0},S,V are trivial and we get p^{3}(x_{1}x_{2})^{-1} . Its symmetrization comes from the contribution of a=0,b=2 , where B_{0},V are trivial and S\in\mathrm{Sym}_{2}(\mathbb{Z}/p^{2}\mathbb{Z}) . When a=0,b=1 , B_{0} is trivial, S\in\mathbb{Z}/p^{2}\mathbb{Z} and V\in\left\{\begin{pmatrix}1&j\\ &1\end{pmatrix}:0\leq j\leq p^{2}-1\right\}\cup\left\{w\begin{pmatrix}1&pj\\ &1\end{pmatrix}:0\leq j\leq p-1\right\}\subset\operatorname{SL}_{2}(\mathbb{Z}) are representatives of \Gamma^{0}(p^{2})\backslash\operatorname{SL}_{2}(\mathbb{Z}) . The contribution is p^{3}(x_{1}x_{2}^{-1}+x_{1}^{-1}x_{2})+p^{2}(p-1) . When a=1 and b=0 or 1 , we have B_{0}\in(\mathbb{Z}/p\mathbb{Z})^{\times} and the contribution is 0 as in the case r=1,i=0,a=1,b=0 above. The last case with a=2,b=0 , we have S,V trivial and B_{0}\in\mathrm{Sym}_{2}(\mathbb{Z}/p\mathbb{Z}) non-singular. The contribution is \varepsilon_{p}\sum_{B_{0}}(\frac{\det B_{0}}{p}) , which can be evaluated as p(p-1)\varepsilon_{p} . The case r=2,i=1 is similar and we omit the proof. ∎ 4.1.2. The orthogonal Hecke algebra Let (V_{p},Q_{p}) be a \mathbb{Q}_{p} -vector space of odd dimension m and Witt index \nu=(m-1)/2 such that its discriminant has a representative in \mathbb{Z}_{p}^{\times} . Then there is a basis f_{1},\ldots,f_{m} such that the quadratic form has the shape (4.7) Q_{p}=\left(\begin{matrix}0&E_{\nu}&0\\ E_{\nu}&0&0\\ 0&0&\epsilon\end{matrix}\right) with respect to this basis for some \epsilon\in\mathbb{Z}_{p}^{\times} . Let L_{p}\subset V_{p} be a \mathbb{Z}_{p} -lattice generated by this basis. Then the pair U_{p}:=O(L_{p})\subset O_{p}:=O(V_{p}) is a Hecke pair and we now describe the structure of the local Hecke algebra D(U_{p},O_{p}) following [ 50 , Section 8.7] . Every operator \mathcal{T}\in D(U_{p},O_{p}) can be written as sum of U_{p} -left cosets of the form (see [ 50 , (8.23)] for details) \mathcal{T}=\sum_{M}U_{p}M,~M=\left(\begin{matrix}A&*&*\\ 0&D&0\\ 0&*&1\end{matrix}\right),~D=\left(\begin{matrix}d_{1}&&*\\ &\ddots&\\ 0&&d_{\nu}\end{matrix}\right). The Satake map \mathcal{S}:D(U_{p},O_{p})\to C_{\nu} defined by (4.8) \mathcal{S}(U_{p}M):=\prod_{i=1}^{\nu}|d_{i}|_{p}^{t_{i}+i-1/2},~x_{i}=p^{-t_{i}} is an isomorphism [ 50 , (8.24)] . For V as in ( 2.1 ) with lattice L=L_{\mathfrak{M}} and p\nmid 2D(B)\mathfrak{M} , we can take V_{p}=V(\mathbb{Q}_{p}) and an isometry L_{p}\cong M_{2}(\mathbb{Z}_{p})^{0} which identifies \operatorname{SO}(V_{p})\cong\mathrm{PGL}_{2}(\mathbb{Q}_{p}) and \mathrm{SO}(L_{p})\cong K_{p}:=\mathrm{PGL}_{2}(\mathbb{Z}_{p}) . With respect to the basis f_{1}=\left(\begin{smallmatrix}0&1\\ 0&0\end{smallmatrix}\right),f_{2}=\left(\begin{smallmatrix}0&0\\ 1&0\end{smallmatrix}\right),f_{3}=\left(\begin{smallmatrix}1&0\\ 0&-1\end{smallmatrix}\right) , the Hecke operator \mathcal{T}_{p}:=K_{p}\left(\begin{smallmatrix}p&\\ &1\end{smallmatrix}\right)K_{p}=K_{p}\left(\begin{smallmatrix}p&\\ &1\end{smallmatrix}\right)\cup_{j\in\mathbb{Z}/p\mathbb{Z}}K_{p}\left(\begin{smallmatrix}1&j\\ &p\end{smallmatrix}\right) can then be written as (4.9) \mathcal{T}_{p}\;=\;U_{p}\left(\begin{matrix}p&0&0\\ 0&p^{-1}&0\\ 0&0&1\end{matrix}\right)+\sum_{j\in\mathbb{Z}/p\mathbb{Z}}U_{p}\left(\begin{matrix}p^{-1}&-pj^{2}&-2j\\ 0&p&0\\ 0&pj&1\end{matrix}\right), and consequently by ( 4.8 ) (4.10) \mathcal{S}(\mathcal{T}_{p})\;=\;\sqrt{p}(x_{1}+x_{1}^{-1}). 4.2. The Rallis-Zhuravlev map The Rallis map is a surjection between symplectic and orthogonal Hecke-Algebras that intertwines the action on the Weil representation. It was computed by Rallis [ 36 ] for m even and extended by Zhuravlev to m odd in [ 49 ] (see also [ 50 , Section 8.9] ). We state here the case where r\geq\nu . Define the map (4.11) \widetilde{\mathrm{RZ}}_{r,\nu}:C_{r}\to C_{\nu} between Weyl group invariants of Laurent polynomials in r resp. \nu variables by x_{i}\mapsto x_{i},\quad(i=1,\ldots,\nu),\qquad x_{i}\mapsto p^{i-\frac{m}{2}},\quad(i=\nu+1,\ldots,r) and let {\mathrm{RZ}}_{r,\nu} be the induced map such that the diagram {\lx@inpgf@ignorespaces\widehat{\mathcal{E}}_{p}} {\lx@inpgf@ignorespaces D(U_{p},O_{p})} {\lx@inpgf@ignorespaces C_{r}} {\lx@inpgf@ignorespaces C_{\nu}} \scriptstyle{\lx@inpgf@ignorespaces{\mathrm{RZ}}_{r,\nu}} \scriptstyle{\lx@inpgf@ignorespaces\widehat{\mathcal{S}}_{r}} \scriptstyle{\lx@inpgf@ignorespaces\mathcal{S}} \scriptstyle{\lx@inpgf@ignorespaces\widetilde{\mathrm{RZ}}_{r,\nu}} commutes. We recall the conclusion from [ 49 , Theorem 1.1 and Section 8.4] or [ 50 , Theorem 8.2] . Proposition 4.4 . Let \theta^{(r)}(g,h,\varphi) be the theta function defined in ( 3.18 ) and \omega=\otimes_{p}\omega_{p} the Weil representation from Section 3.2 . Suppose that p\nmid 2D(B)\cdot\mathfrak{M} . Then (4.12) \theta^{(r)}(g,h,\omega_{p}(\mathcal{T})\varphi)\;=\;\theta^{(r)}(g,h,\omega_{p}(\mathrm{RZ}_{r,1}(\mathcal{T}))\varphi) for all \mathcal{T}\in\widehat{\mathcal{E}}_{p} . In particular, we have (4.13) \begin{split}p^{-3/2}\,\widehat{T}^{(1)}_{p,0}I^{(1)}(\tau,f)&\;=\;I^{(1)}(\tau,T_{p}f),\\ p^{-1}\,\widehat{T}^{(2)}_{p,0}I^{(2)}(\tau,f)&\;=\;I^{(2)}(\tau,(p^{2}(p+1)T_{p}+(p-1)(p+\varepsilon_{p}))f),\\ p^{-3/2}\,\widehat{T}^{(2)}_{p,1}I^{(2)}(\tau,f)&\;=\;I^{(2)}(\tau,(pT_{p}+p+1)f),\end{split} where T_{p} is the usual Hecke operator on modular forms normalized as in [ 22 , Chapter III, (5.15)] Remark 4.5 . On the orthogonal side, the Hecke operator \mathcal{T}_{p} on automorphic forms is p^{1-k} times the Hecke operator T_{p} on the associated modular forms (see (2.13) in [ 29 ] ). On the symplectic side for r=1 , the Hecke operator \widehat{T}_{0} is p^{3/2}T_{p^{2}} , where T_{p^{2}} is the usual Hecke operator on half integral weight modular forms as in [ 22 , Chapter IV, (3.3)] . Proof. Equation ( 4.12 ) follows from the definition of \mathrm{RZ}_{r,\nu} . By Proposition 4.3 and Equation ( 4.10 ) we have \mathrm{RZ}_{1,1}(\widehat{T}_{p,0})=\sqrt{p}\mathcal{T}_{p} and (4.14) \begin{split}\mathrm{RZ}_{2,1}(\widehat{T}_{p,0})=p^{2}(p+1)\mathcal{T}_{p}+p^{2}(p-1)+2p\varepsilon_{p},\quad\mathrm{RZ}_{2,1}(\widehat{T}_{p,1})=p^{3/2}(\mathcal{T}_{p}+(p+1)).\end{split} By a change of variable in the theta integral, we can move the action of \mathcal{T}_{p} on Schwartz function in the theta kernel to an action of \mathcal{T}_{p} on f . Then the isomorphism ( 4.4 ) and the first observation in Remark 4.5 finishes the proof. ∎ Lastly, we give the commutation relation between Hecke operators and the Siegel- \Phi operator. In the context of holomorphic Siegel modular forms this is also known as the Zharkovskaia commutation relation [ 1 , Chapter 4, Theorem 2.12] , which is compatible with Proposition 4.4 (see Remark 4.7 ). Proposition 4.6 . Let \Phi be the Siegel- \Phi operator and F(\tau):=I^{(2)}(\tau,f) a Siegel-Maass cusp form of weight \frac{1}{2} as in Proposition 4.4 . Then for p\nmid 2D(B)\mathfrak{M} , the following commutation relation between the Siegel \Phi -operator (as defined in ( 3.33 )) and the metaplectic Hecke operators hold: (4.15) \begin{split}\Phi\left(\widehat{T}^{(2)}_{p,0}F\right)&\;=\;p^{3/2}(p+1)\widehat{T}^{(1)}_{p,0}\Phi(F)+p(p-1)(p+\varepsilon_{p})\Phi(F),\\ \Phi\left(\widehat{T}^{(2)}_{p,1}F\right)&\;=\;p\widehat{T}^{(1)}_{p,0}\Phi(F)+p^{3/2}(p+1)\Phi(F).\end{split} Remark 4.7 . Using the action of the Siegel- \Phi -Operator on theta functions in ( 3.31 ) and the first equation in ( 4.13 ), we see that the relations in ( 4.15 ) are compatible with the last two equations in ( 4.13 ) as \displaystyle\Phi\left(p^{-1}\,\widehat{T}^{(2)}_{p,0}I^{(2)}(\tau,f)\right) \displaystyle\;=\;p^{-1}\Phi\left(\widehat{T}^{(2)}_{p,0}F\right)=p^{1/2}(p+1)\widehat{T}^{(1)}_{p,0}\Phi(F)+(p-1)(p+\varepsilon_{p})\Phi(F), \displaystyle=p^{1/2}(p+1)\widehat{T}^{(1)}_{p,0}I^{(1)}(\tau,f)+(p-1)(p+\varepsilon_{p})I^{(1)}(\tau,f), \displaystyle=I^{(1)}(\tau,(p^{2}(p+1)T_{p}+(p-1)(p+\varepsilon_{p}))f) \displaystyle=\Phi\left(I^{(2)}(\tau,(p^{2}(p+1)T_{p}+(p-1)(p+\varepsilon_{p}))f)\right). Proof. Denote F_{1}:=\Phi(F) . From definition (see Section 8 in [ 50 ] ), we can decompose the action of the genus one Hecke operator into the three terms have \displaystyle \displaystyle\left(\widehat{T}^{(1)}_{p,0}F_{1}\right)(\tau_{1})\;=\;C_{0}+C_{1}+C_{2}\,,\qquad\text{where} \displaystyle C_{0}:=p^{1/2}F_{1}(p^{2}\tau_{1}),\quad C_{1}:=\varepsilon_{p}^{-1}\sum_{B\in(\mathbb{Z}/p\mathbb{Z})^{\times}}\left(\frac{B}{p}\right)F_{1}\left(\tau_{1}+\frac{B}{p}\right),\quad C_{2}:=p^{-1/2}F_{1}(\tau_{1}/p^{2}). Using the definition of \Phi , we can directly check (see e.g. the proof of Theorem 2.12 in [ 1 ] on page 246) that (4.16) \Phi\left(F(m(A^{*})n(B)\cdot\tau)\right)\;=\;|a|\cdot F_{1}(m(A_{1}^{*})n(B_{1})\cdot\tau_{1}), when A=\left(\begin{smallmatrix}A_{1}&*\\ 0&a\end{smallmatrix}\right),B=\left(\begin{smallmatrix}B_{1}&*\\ *&*\end{smallmatrix}\right),\tau=\left(\begin{smallmatrix}\tau_{1}&*\\ *&*\end{smallmatrix}\right) , where A^{*}:={}^{t}A^{-1} . As in the proof of Proposition 4.3 , the coset decomposition of \widehat{T}^{(2)}_{p,0} has six cases according to the parameters a,b . One can use their descriptions in [ 50 , Section 8.3] and ( 4.16 ) to compute the corresponding contribution to \Phi\left(\widehat{T}^{(2)}_{p,0}F\right) . They are given by \begin{array}[]{|c|c|c|c|c|c|c|}\hline\cr&&&&&&\\[-6.0pt] (a,b)&(0,0&(1,0)&(0,1)&(2,0)&(1,1)&(0,2)\\[-6.0pt] &&&&&&\\ \hline\cr&&&&&&\\[-6.0pt] &p^{3/2}C_{0}&p^{3/2}C_{1}&p^{5/2}C_{0}+p^{3/2}C_{2}+p^{2}(p-1)F_{1}&p(p-1)\varepsilon_{p}F_{1}&p^{5/2}C_{1}&p^{5/2}C_{2}\\[-6.0pt] &&&&&&\\ \hline\cr\end{array} Adding them together produces the first identity in ( 4.15 ). The second is verified similarly. ∎ 5. A computation using the Siegel-Weil formula In this section we consider the theta integral I(\tau,f) for the constant function f=1 . Our general results of Section 3 imply in this case that the theta integral is a Siegel Maass form of weight 1/2 and that the cardinalities of the sets R_{T} occur as (non-archimedean parts of) its Fourier coefficients. We give a different proof of this fact by means of the Siegel-Weil formula. It identifies the theta integral as a specific Siegel Eisenstein series. We compute its Fourier coefficients using explicit formulas of Kudla and Yang for local Whittaker functions. This leads to a new proof and a generalization of the result of Rickards on the number of intersection points of b -linked geodesics, stated as Theorem 2.6 in Section 2.1 . 5.1. Siegel Eisenstein series We begin by recalling some facts about Siegel Eisenstein series following [ 24 ] and [ 4 ] , specialized to genus r=2 . Recall the notation set up for the Weil representation in Section 3.2 . In particular, F=\mathbb{Q}_{p} for a place p\leq\infty or the ring \mathbb{A} of adeles of \mathbb{Q} . For a character \chi of F^{\times} and s\in\mathbb{C} , let I(s,\chi) be the degenerate principal series representation of \operatorname{Mp}_{2,F} consisting of smooth functions \Phi(s) on \operatorname{Mp}_{2,F} satisfying \Phi([n(b)m(a),z]g,s)\;=\;z\,\chi(\det a)\gamma(\det a,\frac{1}{2}\psi)^{-1}|\det a|^{s+\rho_{2}}\Phi(g,s), where \rho_{2}\;=\;\frac{3}{2} and m(a),n(b)\in\operatorname{Sp}_{2}(F) are as in the beginning of Section 3.2 . Such a section \Phi is called standard, if its restriction to \widetilde{K}_{F} is independent of s . Here, for p<\infty , we denote by \widetilde{K}_{F} the preimage of \operatorname{Sp}(\mathbb{Z}_{p}) under the double covering map \operatorname{pr}:\operatorname{Mp}_{2,F}\to\operatorname{Sp}_{2}(F) , and for p=\infty the preimage of the maximal compact subgroup \operatorname{U}(2) , and the product of these if F=\mathbb{A} . If T\in\operatorname{Sym}_{2}(F) is a symmetric matrix, the Whittaker function of \Phi with respect to T is the function (5.1) W_{T}(g,s,\Phi)\;=\;\int_{\operatorname{Sym}_{2}(F)}\Phi(wn(b)g,s)\psi(-\operatorname{tr}(Tb))\,d_{\psi}b, on \operatorname{Mp}_{2,F} , where d_{\psi}b is the self-dual Haar measure on \operatorname{Sym}_{2}(F) with respect to the pairing (b_{1},b_{2})\mapsto\psi(\operatorname{tr}(b_{1}b_{2})) . It has the transformation behavior (5.2) \displaystyle W_{T}(n(b)m(a)g,s,\Phi) \displaystyle\;=\;\psi(\operatorname{tr}(Tb))\chi(a)^{-1}|a|^{\rho_{2}-s}\gamma(a,\frac{1}{2}\psi)\cdot W_{{}^{t}aTa}(g,s,\Phi). Here we have shortened \gamma(a,\frac{1}{2}\psi)=\gamma(\det a,\frac{1}{2}\psi) and similarly for \chi(a) . When F=\mathbb{R} and \det a>0 , then \gamma(a,\frac{1}{2}\psi)=1 . If F=\mathbb{Q}_{p} we usually write \Phi_{p} for sections of I(s,\chi) for p\leq\infty , and similarly write W_{T,p}(g,s,\Phi_{p}) for the corresponding Whittaker functions. We now define Eisenstein series on \operatorname{Mp}_{2,\mathbb{A}} . Recall that there is a unique splitting homomorphism \operatorname{Sp}_{2}(\mathbb{Q})\to\operatorname{Mp}_{2,\mathbb{A}} to the covering \operatorname{pr}:\operatorname{Mp}_{2,\mathbb{A}}\to\operatorname{Sp}_{2}(\mathbb{A}) . We denote its image by G_{\mathbb{Q}} and define P_{\mathbb{Q}}=\widetilde{P}_{\mathbb{A}}\cap G_{\mathbb{Q}} . Let \Phi=\prod_{p\leq\infty}\Phi_{p}\in I(s,\chi) be a standard factorizable section of the induced representation of \operatorname{Mp}_{2,\mathbb{A}} . The corresponding Eisenstein series is defined by (5.3) \displaystyle E(g,s,\Phi)\;=\;\sum_{\gamma\in P_{\mathbb{Q}}\backslash G_{\mathbb{Q}}}\Phi(\gamma g,s), where g\in\operatorname{Mp}_{2,\mathbb{A}} . It converges normally for \Re(s)>\rho_{2} and has a meromorphic continuation in s to the whole complex plane. Moreover, it satisfies a functional equation relating values at s and -s . The Eisenstein series has a Fourier expansion of the form (5.4) \displaystyle E(g,s,\Phi)\;=\;\sum_{T\in\operatorname{Sym}_{n}(\mathbb{Q})}E_{T}(g,s,\Phi). When T\in\operatorname{Sym}_{n}(\mathbb{Q}) is non-singular, the T -th Fourier coefficient factorizes, (5.5) \displaystyle E_{T}(g,s,\Phi)\;=\;\prod_{p\leq\infty}W_{T,p}(g_{p},s,\Phi_{p}), into a product of local Whittaker functions as in ( 5.1 ). 5.2. The Siegel-Weil formula We use the Siegel-Weil formula to compute the theta integral I(\tau,1) defined in ( 3.21 ) for the constant function 1 . Since V is anisotropic over \mathbb{Q} the theta integral converges. In this case its Fourier coefficients ( 3.24 ) can be written as (5.6) \displaystyle I_{T}(v,1) \displaystyle\;=\;(\det v)^{1/2}e^{2\pi\operatorname{tr}Tv}\sum_{\begin{subarray}{c}x\in R_{T}\end{subarray}}I(x,v,1) \displaystyle\;=\;(\det v)^{1/2}\sum_{\begin{subarray}{c}x\in R_{T}\end{subarray}}\int_{\mathcal{D}}e^{-2\pi\operatorname{tr}((Q(x_{z^{\perp}})-Q(x_{z}))v)}\,d\mu(z) \displaystyle\;=\;(\det v)^{1/2}\sum_{\begin{subarray}{c}x\in R_{T}\end{subarray}}\frac{2}{\pi}\int_{Z(\mathbb{R})\backslash H(\mathbb{R})^{+}}\varphi_{\infty}(v,h^{-1}x)dh, where \varphi_{\infty}(v,x):=e^{-2\pi\operatorname{tr}((Q(x_{z_{0}^{\perp}})-Q(x_{z_{0}}))v)} as in ( 3.17 ), and 2dh=d\mu(z)d\theta is normalized as in [ 26 ] . Here the factor \pi is the volume of \mathrm{PSO}_{2}(\mathbb{R})\subset\mathrm{PSL}_{2}(\mathbb{R})\cong Z(\mathbb{R})\backslash H(\mathbb{R})^{+} since \mathcal{D}\cong\mathrm{PSL}_{2}(\mathbb{R})/\mathrm{PSO}_{2}(\mathbb{R}) . We now construct the standard factorizable section used as input for the Eisenstein series. Recall that there is an \operatorname{Mp}_{2,F} -equivariant map (5.7) \displaystyle\lambda:S(V^{2}(F))\rightarrow I(0,\chi_{V}),\quad\lambda(\phi)(g)\;=\;\big(\omega(g)\phi\big)(0), from the space of Schwartz functions to the induced representation associated with the quadratic character \chi_{V} of V . We will also denote by \lambda(\phi) the associated standard section in I(s,\chi_{V}) with \lambda(\phi)(g,0)=\lambda(\phi)(g) . Let \widehat{L}=L\otimes_{\mathbb{Z}}\widehat{\mathbb{Z}} , and write \varphi_{L}=\operatorname{char}(\widehat{L}^{2})\in S(V^{2}(\mathbb{A}_{f})) for the characteristic function of \widehat{L}^{2} . Applying the intertwining operator \lambda , we obtain a corresponding section \lambda(\varphi_{L}) of the induced representation of \operatorname{Mp}_{2,\mathbb{A}_{f}} . At the archimedian place the Gaussian \varphi_{\infty}\in S(V^{2}(\mathbb{R})) transforms in weight 1/2 under K_{\infty} . Its image under the intertwining operator \lambda is the standard section \Phi_{\infty}^{1/2} of weight 1/2 in the induced representation of \operatorname{Mp}_{2,\mathbb{R}} (normalized such that \Phi_{\infty}^{1/2}(1)=1 ). The product \lambda(\varphi_{L})\otimes\Phi_{\infty}^{1/2} defines a factorizable standard section in the induced representation of \operatorname{Mp}_{2,\mathbb{A}} . We will often view the corresponding Siegel Eisenstein series E(g,s,\lambda(\varphi_{L})\otimes\Phi_{\infty}^{1/2}) on \operatorname{Mp}_{2,\mathbb{A}} as a function on the Siegel upper half space \mathbb{H}_{2} . To this end, for \tau=u+iv\in\mathbb{H}_{2} with real part u and imaginary part v , we choose a\in\operatorname{GL}_{2}^{+}(\mathbb{R}) with a\,{}^{t}a=v and let g_{\tau}=n(u)m(a)\in\operatorname{Sp}_{2,\mathbb{R}} . Then the Eisenstein series (5.8) \displaystyle E(\tau,s,\lambda(\varphi_{L})\otimes\Phi_{\infty}^{1/2})\;=\;(\det v)^{-\frac{1}{4}}\cdot E(g_{\tau},s,\lambda(\varphi_{L})\otimes\Phi_{\infty}^{1/2}) is a (non-holomorphic) Siegel modular form of weight 1/2 and genus 2 for a congruence subgroup of \operatorname{Mp}_{2,\mathbb{Q}} . The following result is now a consequence of the Siegel-Weil formula, see e.g. [ 23 ] , [ 46 ] . Theorem 5.1 . Suppose \Gamma=H(\mathbb{Q})^{+}\cap K\subset H(\mathbb{Q})^{+} is an arithmetic subgroup such that the image of the open compact subgroup K\subset H(\hat{\mathbb{Q}}) under the spinor norm is \hat{\mathbb{Z}}^{\times} . Let \operatorname{vol}(X_{\Gamma}) be the volume of X_{\Gamma} with respect to the measure d\mu(z) . The above Eisenstein series is holomorphic in s at s=0 . The theta integral I(\tau,1) is given by \frac{2}{\operatorname{vol}(X_{\Gamma})}I(\tau,1)=E(\tau,0,\lambda(\varphi_{L})\otimes\Phi_{\infty}^{1/2}). In particular, for the Fourier coefficients in ( 3.22 ) we have (5.9) \frac{2}{\operatorname{vol}(X_{\Gamma})}I_{T}(v,1)\;=\;(\det v)^{-\frac{1}{4}}W_{T,\infty}(m(a),0,\Phi_{\infty}^{1/2})\cdot\prod_{p<\infty}W_{T,p}(1,0,\lambda(\varphi_{L_{p}})). Using the local archimedean Siegel-Weil formula in [ 26 ] , we can express the size of the set R_{T} in ( 3.25 ) in terms of values of local Whittaker functions at non-archimedean places. Let K=K_{\mathfrak{M}}\subset H(\mathbb{A}_{f}) by the compact open subgroup defined in ( 2.5 ) and put \Gamma_{\mathfrak{M}}=H(\mathbb{Q})^{+}\cap K_{\mathfrak{M}} . Recall from ( 2.6 ) that the corresponding Shimura curve X_{\mathfrak{M}}=X_{K_{\mathfrak{M}}} is connected. Theorem 5.2 . Let T be invertible, and let R_{T} be the set of representatives defined in ( 3.25 ). Then (5.10) |R_{T}|\;=\;2^{3/2}\pi\operatorname{vol}(X_{\mathfrak{M}})\prod_{p<\infty}W_{T,p}(1,0,\lambda(\varphi_{L_{p}})). Proof. We employ the local Siegel-Weil formula, which expresses orbital integrals associated with Schwartz-Bruhat functions in terms of local Whittaker functions. According to [ 24 , Corollary 5.3.5] we have (5.11) \displaystyle\prod_{p<\infty}W_{T,p}(1,0,\lambda(\varphi_{L_{p}}))\;=\;C_{\infty}(V,\alpha,\beta,\psi)^{-1}\cdot\prod_{p<\infty}O_{T,p}(\varphi_{L,p})\,. Here the local orbital integral on the right hand side is defined by O_{T,p}(\varphi_{L,p})\;=\;\int_{\operatorname{SO}(V)(\mathbb{Q}_{p})}\varphi_{L_{p}}(h^{-1}x_{0})\,d_{p}h if there exists an x_{0}\in V^{2}(\mathbb{Q}) with Q(x_{0})=T , and by 0 if there exists no such x_{0} . Here we have used that \varphi_{L,p} is even, and therefore the \operatorname{SO}(V)(\mathbb{Q}_{p}) -orbital integral is equal to the \operatorname{O}(V)(\mathbb{Q}_{p}) -orbital integral. Finally the measures are normalized as in [ 24 , page 124] , and the constant C_{\infty}(V,\alpha,\beta,\psi) is defined in Proposition 5.3.3 of [ 24 ] . It is independent of T and of the choice of the Schwartz function in the argument. Let \bar{K}\subset\operatorname{SO}(V)(\mathbb{A}_{f}) be the compact open subgroup which is given by the image of K=K_{\mathfrak{M}}\subset H(\mathbb{A}_{f}) under the projection H(\mathbb{A}_{f})\to\operatorname{SO}(V)(\mathbb{A}_{f}) and put \bar{\Gamma}\,:=\,\operatorname{SO}(V)(\mathbb{Q})\cap(\operatorname{SO}(\mathbb{R})\times\bar{K})\;=\;\mathcal{O}_{\mathfrak{M}}^{\times}/\{\pm 1\}. Since \mathcal{O}_{\mathfrak{M}}^{\times} contains an element of reduced norm -1 , the group \Gamma_{\mathfrak{M}}/\{\pm 1\}=\mathcal{O}_{\mathfrak{M}}^{1}/\{\pm 1\} is a subgroup of \bar{\Gamma} of index 2 . Since \operatorname{SO}(V)(\mathbb{A}_{f})=\operatorname{SO}(\mathbb{Q})\bar{K} , [ 24 , Proposition 5.3.6] implies that \displaystyle\prod_{p<\infty}O_{T,p}(\varphi_{L,p}) \displaystyle\;=\;\operatorname{vol}(\bar{K})\cdot\sum_{\begin{subarray}{c}x\in V^{2}(\mathbb{Q})/\bar{\Gamma}\\ Q(x)=T\end{subarray}}\varphi_{L}(x) \displaystyle\;=\;\operatorname{vol}(\bar{K})\cdot\frac{1}{2}\sum_{\begin{subarray}{c}x\in L^{2}/(\Gamma_{\mathfrak{M}}/\{\pm 1\})\\ Q(x)=T\end{subarray}}1 \displaystyle\;=\;\frac{1}{2}\operatorname{vol}(\bar{K})\cdot\sum_{\begin{subarray}{c}x\in L^{2}/\Gamma_{\mathfrak{M}}\\ Q(x)=T\end{subarray}}1 \displaystyle\;=\;\frac{1}{2}\operatorname{vol}(\bar{K})\cdot|R_{T}|. Here we have also used that the stabilizer \operatorname{SO}(V)(\mathbb{Q})_{x} of any x\in V^{2}(\mathbb{Q}) with Q(x)=T is trivial and that \{\pm 1\}\subset\Gamma_{\mathfrak{M}} acts trivially on V(\mathbb{Q}) . Inserting the latter formula into ( 5.11 ), we obtain (5.12) \displaystyle\prod_{p<\infty}W_{T,p}(1,0,\lambda(\varphi_{L_{p}}))\;=\;\frac{\operatorname{vol}(\bar{K})}{2C_{\infty}(V,\alpha,\beta,\psi)}\cdot|R_{T}|. According to equations (5.3.46) and (5.2.11) of [ 24 ] , the constant on the right hand side is given by \displaystyle C_{\infty}(V,\alpha,\beta,\psi)\;=\;2^{-1}C_{\infty}(V)\;=\;2^{1/2}\gamma_{\infty}(V)^{2}D(B)^{2}. As our choice of w agrees with the one in [ 26 ] , the constant \gamma_{\infty}(V)^{2} here is 1, and differs from the one in [ 24 ] by a factor of -1 (see the paragraph above Theorem 5.2.7 on page 116 of [ 24 ] ). Moreover, by Lemma 5.3.9 (iii) of [ 24 ] and ( 2.7 ), we have \operatorname{vol}(\bar{K})\;=\;\pi^{-1}D(B)^{2}\operatorname{vol}(X_{\mathfrak{M}},d\mu)^{-1}. In fact, this is first seen if \mathfrak{M}=1 , and then a simple index argument shows that it also holds for general \mathfrak{M} . Consequently, we get \frac{C_{\infty}(V,\alpha,\beta,\psi)}{\operatorname{vol}(\bar{K})}\;=\;2^{1/2}\pi\operatorname{vol}(X_{\mathfrak{M}},d\mu). Putting this into ( 5.12 ) concludes the proof of the theorem. ∎ Remark 5.3 . The formula of Theorem 5.2 can also be deduced from the global Siegel-Weil formula, together with a comparison of asymptotics as v tends to infinity (in a suitable direction). Since this argument aligns nicely with the one given in [ 19 ] we briefly explain it here in the case when T is positive definite. Combining ( 3.24 ) and ( 5.9 ), we find \displaystyle\frac{2}{\operatorname{vol}(X_{\mathfrak{M}})}I_{T}(v,1) \displaystyle\;=\;\frac{2}{\operatorname{vol}(X_{\mathfrak{M}})}(\det v)^{1/2}e^{2\pi\operatorname{tr}Tv}\sum_{\begin{subarray}{c}x\in R_{T}\end{subarray}}I(x,v,1) \displaystyle\;=\;(\det v)^{-\frac{1}{4}}W_{T,\infty}(m(a),0,\Phi_{\infty}^{1/2})\cdot\prod_{p<\infty}W_{T,p}(1,0,\lambda(\varphi_{L_{p}})). We write T={}^{t}BB with B\in\operatorname{GL}_{2}^{+}(\mathbb{R}) as before and specialize to v=rB^{-1}\,{}^{t}\!B^{-1} with positive real r . In particular, we consider the archimedian Whittaker function at the argument m(\sqrt{r}B^{-1}) . Applying Proposition 3.3 , we find for x\in R_{T} that I(x,v,1)\;=\;I(x,rB^{-1}\,{}^{t}\!B^{-1},1)\;=\;I(e,r1_{2},1). On the other hand, by [ 4 , Lemma 4.2] , we have W_{T,\infty}(m(\sqrt{r}B^{-1}),0,\Phi_{\infty}^{1/2})\;=\;|B|^{-3/2}W_{1,\infty}(m(\sqrt{r}1_{2}),0,\Phi_{\infty}^{1/2}). Inserting these identities, we obtain (5.13) \displaystyle\phantom{\;=\;}\frac{2}{\operatorname{vol}(X_{\mathfrak{M}})}|R_{T}|e^{4\pi r}I(e,r1_{2},1) \displaystyle\;=\;r^{-3/2}\prod_{p<\infty}W_{T,p}(1,0,\lambda(\varphi_{L_{p}}))\cdot W_{1,\infty}(m(\sqrt{r}1_{2}),0,\Phi_{\infty}^{1/2}). From the definition of I(e,r1_{2},1) one can derive the asymptotic behavior (5.14) \displaystyle I(e,r1_{2},1)\;=\;\frac{1}{4r}e^{-8\pi r}(1+O(r^{-1})) as r\to\infty . Moreover, using similar arguments as in [ 4 , Section 4] , it can be shown that (5.15) \displaystyle W_{1,\infty}(m(\sqrt{r}1_{2}),0,\Phi_{\infty}^{1/2})\;=\;\sqrt{2}\pi\sqrt{r}e^{-4\pi r}(1+O(r^{-1})) as r\to\infty . Plugging ( 5.14 ) and ( 5.15 ) into ( 5.13 ) and taking the limit r\to\infty , we derive \frac{1}{2\operatorname{vol}(X_{\mathfrak{M}})}|R_{T}|\;=\;\sqrt{2}\pi\prod_{p<\infty}W_{T,p}(1,0,\lambda(\varphi_{L_{p}})), which yields the desired formula for |R_{T}| . 5.3. Non-archimedian Whittaker functions Let p be a finite prime and T\in\operatorname{Sym}_{2}(\mathbb{Z}_{p}) non-singular. For p odd, or for p=2 with \det(T)\in 2\mathbb{Z}_{2} and T/2\not\in\operatorname{Sym}_{2}(\mathbb{Z}_{2}) , the matrix T is \operatorname{GL}_{2}(\mathbb{Z}_{p}) -equivalent to an elementary divisor matrix of the form (5.16) T\sim\operatorname{diag}(\varepsilon_{1}p^{a_{1}},\varepsilon_{2}p^{a_{2}}) with 0\leq a_{1}\leq a_{2} and \varepsilon_{1},\varepsilon_{2}\in\mathbb{Z}_{p}^{\times} . The Hasse invariant of T is (5.17) \epsilon_{p}(T)\,:=\,(\varepsilon_{1}p^{a_{1}},\varepsilon_{2}p^{a_{2}})_{p}. For the computation of non-archimedian Whittaker functions, the following result of Kudla (see [ 26 , Proposition 1.3] ) will be useful. Proposition 5.4 . Let p be a finite prime and let \chi be a quadratic character of \mathbb{Q}_{p}^{\times} . For every T\in\operatorname{Sym}_{2}(\mathbb{Q}_{p}) with \det(T)\neq 0 , there exists an (up to isometry) unique quadratic space W over \mathbb{Q}_{p} of dimension 3 and quadratic character \chi_{W}=\chi such that W represents T . Its Hasse invariant is given by \epsilon_{p}(W)\;=\;\chi(\det T)\epsilon_{p}(T), where \epsilon_{p}(T) is the Hasse invariant of T . As before, let V be the quadratic space defined in ( 2.1 ) and let V_{p}=V\otimes_{\mathbb{Q}}\mathbb{Q}_{p} be its base change to \mathbb{Q}_{p} . Using the basis e_{1},e_{2},e_{3} of ( 3.16 ), it is easily seen that the quadratic character \chi_{V_{p}} is the trivial character and that \displaystyle\epsilon_{p}(V_{p})\;=\;\begin{cases}+1,&\text{if $p\nmid D(B)$,}\\ -1,&\text{if $p\mid D(B)$.}\end{cases} Corollary 5.5 . Let p be a finite prime and let T\in\operatorname{Sym}_{2}(\mathbb{Q}_{p}) with \det(T)\neq 0 . The space V_{p} represents T if and only if \displaystyle\epsilon_{p}(T)\;=\;\begin{cases}+1,&\text{if $p\nmid D(B)$,}\\ -1,&\text{if $p\mid D(B)$.}\end{cases} The first result on local Whittaker functions is the following. Proposition 5.6 . Let p be a finite prime and let T\in\operatorname{Sym}_{2}(\mathbb{Q}_{p}) with \det(T)\neq 0 . If T is not represented by V_{p} , then W_{T,p}(1,0,\lambda(\varphi))=0 for all Schwartz function \varphi on V_{p} . Proof. The assertion is special case of [ 26 , Proposition 1.4] . ∎ We now normalize W_{T,p} by the factor C_{p}(V)=\gamma_{p}(V)^{2}|D(B)|_{p}^{2}|2|_{p}^{3/2} and (1-p^{-2}) to define (5.18) \widetilde{W}_{T,p}(\varphi)\,:=\,\frac{W_{T,p}(1,0,\lambda(\varphi))}{C_{p}(V)(1-p^{-2})}. It is easy to see that \prod_{p<\infty}C_{p}(V)=C_{\infty}(V)^{-1} . When \varphi=\operatorname{char}(L_{p}) for a lattice L_{p}\subset V_{p} , Lemma 5.7.1 in [ 24 ] gives us (5.19) \widetilde{W}_{T,p}(\varphi)\;=\;|2|_{p}^{-1}\frac{|D(B)|_{p}^{-2}}{|L_{p}^{\vee}/L_{p}|}\frac{\alpha_{p}(T,L_{p})}{1-p^{-2}}, where \alpha_{p}(T,L_{p}) is the local density defined in Equation (1.3) in [ 47 ] . From now on, we will take L\subset L_{\mathfrak{M}} the lattice in ( 2.9 ), which has index 4 in L_{\mathfrak{M}}=V\cap\mathcal{O}_{\mathfrak{M}} for the Eichler order \mathcal{O}_{\mathfrak{M}} of level \mathfrak{M} , and denote L_{p}:=L\otimes\mathbb{Z}_{p} . As in [ 26 ] and [ 24 ] we employ results of Kitaoka and Yang to compute the non-archimedian local Whittaker functions more explicitly. Theorem 5.7 . Let p be a prime not dividing 2D(B)\mathfrak{M} , and let T\in\operatorname{Sym}_{2}(\mathbb{Q}_{p}) be invertible. (i) If T\notin\operatorname{Sym}_{2}(\mathbb{Z}_{p})^{\vee} , then W_{T,p}(1,s,\lambda(\varphi_{L_{p}}))=0 . (ii) Assume that T\in\operatorname{Sym}_{2}(\mathbb{Z}_{p})^{\vee} and denote its elementary divisors as in ( 5.16 ). If T is represented by V_{p} (which means \epsilon_{p}(T)=1 ), then \displaystyle\widetilde{W}_{T,p}(\varphi_{L_{p}}) \displaystyle\;=\;\begin{cases}2\sum_{j=0}^{\frac{a_{1}-1}{2}}p^{j}&\text{if $a_{1}$ is odd,}\\[4.30554pt] 2\sum_{j=0}^{\frac{a_{1}}{2}-1}p^{j}+p^{\frac{a_{1}}{2}}\sum_{j=0}^{a_{2}-a_{1}}(\varepsilon_{1},p)_{p}^{j}&\text{if $a_{1}$ is even.}\end{cases} (iii) If T\in\operatorname{Sym}_{2}(\mathbb{Z}_{p})^{\vee} is not represented by V_{p} (which means \epsilon_{p}(T)=-1 ), then W_{T,p}(1,0,\lambda(\varphi_{L_{p}}))\;=\;0. Proof. The assertion is a special case of [ 26 , Proposition 8.1] (see also [ 47 , Proposition 8.6] ) and [ 26 , Proposition A.6] , where we have to put \det(S)=\det(S_{0})=-1 , X=1 , and r=0 . ∎ Now we turn to the case of primes dividing the discriminant of B . Theorem 5.8 . Let p\mid D(B) be an odd prime and let T\in\operatorname{Sym}_{2}(\mathbb{Q}_{p}) be invertible. (i) If T\notin\operatorname{Sym}_{2}(\mathbb{Z}_{p})^{\vee} , then W_{T,p}(1,s,\lambda(\varphi_{L_{p}}))=0 . (ii) Assume that T\in\operatorname{Sym}_{2}(\mathbb{Z}_{p})^{\vee} . If T is represented by V_{p} (which means \epsilon_{p}(T)=-1 ), then \displaystyle\widetilde{W}_{T,p}(\varphi_{L_{p}}) \displaystyle\;=\;\frac{2p}{1-p^{-1}}. (iii) If T is not represented by V_{p} (which means \epsilon_{p}(T)=1 ), then \widetilde{W}_{T,p}(\varphi_{L_{p}})=0 . Proof. Since p is odd, we can use ( 2.4 ) and ( 2.10 ) to obtain |2|_{p}^{-1}\frac{|D|_{p}^{-2}}{|L_{p}^{\vee}/L_{p}|}=1 . Then applying Theorem 5.7.2 in [ 24 ] to \alpha_{p}(T,L_{p}) finishes the proof. ∎ Now for p\mid 2\mathfrak{M} , we define the following quantity (5.20) \beta_{p}(T):=\begin{cases}\frac{\widetilde{W}_{T,2}}{2^{3(1-(D\bmod 2))}}&p=2\nmid\mathfrak{M},\\ \frac{1+p^{-1}}{2}p^{e}\widetilde{W}_{T,p}(\varphi_{L_{p}})&\nu_{p}(M)=e\geq 1.\end{cases} This has the advantage of simplifying the expression for |R_{T}| in the following corollary. Corollary 5.9 . For integral, non-singular T the number of equivalence classes of lattice pairs with intersection matrix T is given by (5.21) |R_{T}|\;=\;2^{\omega(\mathfrak{M})+1-(D\bmod 2)}\prod_{2\neq p\mid D}(1-\epsilon_{p}(T))\prod_{p\mid 2\mathfrak{M}}\beta_{p}(T)\prod_{p\mid\det(T),~p\nmid 2D\mathfrak{M}}\widetilde{W}_{T,p}(\varphi_{L_{p}}). In particular, |R_{T}| is zero unless \epsilon_{p}(T)=-1 for all odd prime p\mid D . In that case, if the entries of T has no common odd factor, then 2\nmid\nu_{p}(\det(T)) and (\varepsilon_{1},p)_{p}=-1 for all odd p\mid D and we have (5.22) |R_{T}|\;=\;2^{\omega(D\mathfrak{M})}\prod_{p\mid 2\mathfrak{M}}\beta_{p}(T)\prod_{\begin{subarray}{c}p\mid\det(T)\\ p\nmid 2D\mathfrak{M}\end{subarray}}\sum_{j=0}^{\nu_{p}(\det(T))}(\varepsilon_{1},p)_{p}^{j}. Proof. Starting with ( 5.10 ), we substitute in the volume from ( 2.7 ) and the normalized \widetilde{W}_{T,p} in ( 5.18 ) to obtain (5.23) \begin{split}|R_{T}|&\;=\;\frac{\pi}{3}\,D(B)\prod_{p|D(B)}\Big(1-\frac{1}{p}\Big)\cdot\mathfrak{M}\prod_{p|\mathfrak{M}}\Big(1+\frac{1}{p}\Big)\frac{2^{1/2}\pi\gamma_{\infty}(V)^{2}}{C_{\infty}(V)\zeta(2)}\prod_{p<\infty}\widetilde{W}_{T,p}(\varphi_{L_{p}})\\ &\;=\;D(B)^{-1}\prod_{p|D(B)}\Big(1-\frac{1}{p}\Big)\cdot\mathfrak{M}\prod_{p|\mathfrak{M}}\Big(1+\frac{1}{p}\Big)\prod_{p<\infty}\widetilde{W}_{T,p}(\varphi_{L_{p}}).\end{split} If p\nmid 2D(B)\mathfrak{M}\det(T) , then T\in\operatorname{Sym}_{2}(\mathbb{Z}_{p}) is \operatorname{GL}_{2}(\mathbb{Z}_{p}) -equivalent to \operatorname{diag}(\varepsilon_{1},\varepsilon_{2})\in\operatorname{GL}_{2}(\mathbb{Z}_{p}) and Theorem 5.7 gives us \widetilde{W}_{T,p}(\varphi_{L_{p}})=1 . When 2\neq p\mid D(B) , Theorem 5.8 gives us \widetilde{W}_{T,p}(\varphi_{L_{p}})=(1-\epsilon_{p}(T))\frac{p}{1-p^{-1}} . Substituting these into ( 5.23 ) gives us ( 5.21 ). Let p be an odd prime. The condition that the entries of T have no common odd prime factor implies that T is \operatorname{GL}_{2}(\mathbb{Z}_{p}) -equivalent to \operatorname{diag}(\varepsilon_{1},\varepsilon_{2}p^{a}) for \varepsilon_{i}\in\mathbb{Z}_{p}^{\times} and t=\nu_{p}(\det(T)) . If p\mid D , then 1-\epsilon_{p}(T)=1-(\varepsilon_{1},p)_{p}^{t} is non-zero if and only if 2\nmid t and (\varepsilon_{1},p)_{p}=-1 . If p\nmid D , then Theorem 5.7 gives us \widetilde{W}_{T,p}(\varphi_{L_{p}})=\sum_{j=0}^{a}(\varepsilon_{1},p)_{p}^{j} . Putting these into ( 5.21 ) yields ( 5.22 ). ∎ Now we can use the formula for \alpha_{p} in [ 47 , 48 ] to give an explicit formula for \beta_{p} . Theorem 5.10 . For an odd prime p\mid\mathfrak{M} with e:=\nu_{p}(\mathfrak{M})\geq 1 and T=\left(\begin{smallmatrix}\varepsilon_{1}p^{a_{1}}&\\ &\varepsilon_{2}p^{a_{2}}\end{smallmatrix}\right)\in\operatorname{Sym}_{2}(\mathbb{Q}_{p}) non-singular with a_{2}\geq a_{1} , let \beta_{p}(T) be defined as in ( 5.20 ). If T\not\in\operatorname{Sym}_{2}(\mathbb{Z}_{p}) or \epsilon_{p}(T)=-1 , then \beta_{p}(T)=0 . Otherwise, we have (5.24) \beta_{p}(T)\;=\;\begin{cases}\frac{1+v_{0}}{4}p^{a_{1}/2}(p^{e_{0}}+p^{e-1-e_{0}})(a_{2}-a_{1})+\frac{p+1}{2}\sum_{j=0}^{a_{1}-e}p^{j_{0}+e-1}&2\mid a_{1},a_{1}\geq e-1,\\ \frac{1+v_{0}}{2}p^{a_{1}}\max(a_{2}-e+1,0)&2\mid a_{1},a_{1}\leq e-1,\\ \sum_{j=1}^{a_{1}-e+1}p^{j_{0}+e-1}&2\nmid a_{1},\end{cases} where v_{0}:=(\varepsilon_{1},p)_{p} , and a_{0}:=\lfloor a/2\rfloor for any a\in\mathbb{R} . Proof. Combining equations ( 2.4 ), ( 5.19 ), ( 5.20 ) and using that p\nmid D(B) , that p\mid\mathfrak{M} , and p\neq 2 , we obtain \beta_{p}(T)\;=\;\frac{p^{-e}}{2(1-p^{-1})}{\alpha_{p}(T,L_{p})}\,. From the formula for \alpha_{p} in [ 47 , Theorem 7.1] , we know that \beta_{p} is a polynomial in p^{i} for i\leq a_{1}+1 . Furthermore, each coefficient is a polynomial in a_{i},(\varepsilon_{i},p)_{p} and (-1,p)_{p} . We have programmed this formula. After substituting various p ’s, a_{i} ’s and \varepsilon_{i} ’s, we obtained ( 5.24 ). ∎ Theorem 5.11 . Let p=2 and T=\left(\begin{smallmatrix}\varepsilon_{1}&\\ &2^{t}\varepsilon_{2}\end{smallmatrix}\right) with \varepsilon_{i}\in\mathbb{Z}_{2}^{\times} and t\geq 1 . If \epsilon_{2}(T)=\epsilon_{2}(V_{2}) , then (5.25) \beta_{2}(T)\;=\;\begin{cases}\max(t-e-1,0)&\text{if }\varepsilon_{1}\equiv 1\bmod 8,\\ 1&\text{if }\varepsilon_{1}\equiv 5\bmod 8\text{ and }2\nmid\mathfrak{M},\end{cases} where e=\nu_{2}(\mathfrak{M})\geq 0 . Otherwise, \beta_{2}(T)=0 . Remark 5.12 . Note that D_{1}\equiv 1,5\bmod 8 as D_{1}\equiv 1\bmod 4 . Also we have \varepsilon_{1}\equiv D_{1}+2^{t}\bmod 8 . So when t\geq 2 , we have \epsilon_{2}(T)=-1 if and only if 2\nmid t and \varepsilon_{1}\equiv D_{1}\equiv 5\bmod 8 . Proof. Using equations ( 2.4 ), ( 2.10 ), ( 5.19 ) and ( 5.20 ) gives us \beta_{2}(T)=\alpha_{2}(T,L_{2})\cdot\begin{cases}2^{-2-3(1-(D\bmod 2))}3^{-1}&2\nmid\mathfrak{M},\\ 2^{-4-e}&2\mid\mathfrak{M}.\end{cases} Now as in the proof of Theorem 5.10 , we specialize Theorem 4.4 in [ 48 ] to get the result. ∎ Proof of Theorem 2.6 . Thanks to the correspondence in Proposition 2.1 our task is to translate between pairs of primitive lattice vectors in the lattice {L} and arbitrary pairs of vectors in the lattice L as counted by R_{T} . By hypothesis of the theorem, the entries of T have no common odd factor. The statement about |R_{T}| being zero in Corollary 5.9 implies Cases iv) and v) , and the N_{p}=0 part of Case 0) when p\mid D(B) . For p\mid\mathfrak{M} in Case 0), we get \beta_{p}(T)=0=N_{p} from Theorem 5.10 . For the N_{p}=1 part, this follows from Theorems 5.7 and 5.11 for odd and even p respectively. This finishes Case 0) . We may assume now that the prime p under consideration divides \det(T/4) . We may moreover assume that p\nmid D_{1} , i.e., that R_{T} only counts pairs x=(x_{1},x_{2}) with x_{1} primitive. Together with the condition p\mid\det(T) , we can locally conjugate T to \left(\begin{smallmatrix}\varepsilon_{1}&\\ &p^{t}\varepsilon_{2}\end{smallmatrix}\right) with \varepsilon_{i}\in\mathbb{Z}_{p}^{\times} , t\geq 1 for odd p and t\geq 3 for p=2 . In this case, we have (5.26) t\;=\;\nu_{p}(\det(T)),\quad\varepsilon_{1}\,\equiv\,D_{1}\bmod p^{r_{p}} for every prime p , where r_{p}=1 for p\neq 2 and r_{2}=3 . This in particular implies that (\varepsilon_{1},p)_{p}=(D_{1},p)_{p} for every prime p . Finally, since D_{1}\equiv 1\bmod 4 , we have (D_{1},2)_{2}=(\varepsilon_{1},2)_{2}=\pm 1 if and only if D_{1}\equiv\varepsilon_{1}\equiv 7\pm 2\bmod 8 . Before proceeding with the proof, notice that if \nu_{p}(D_{2})\geq 2 , then p|b , since p|\det(T/4) . Consider the matrix T^{\prime}\;=\;\left(\begin{matrix}D_{1}&b/p\\ b/p&D_{2}/p^{2}\end{matrix}\right)\,. Since \nu_{p}(\det T^{\prime})=t-2 , any (x_{1}^{\prime},x_{2}^{\prime}) contributing to R_{T^{\prime}} gives an element (x_{1}^{\prime},px_{2}^{\prime}) , contributing to R_{T} . Suppose e=\nu_{p}(\mathfrak{M})<\nu_{p}(\det(T/4))=t for odd p . Then \frac{\widetilde{W}_{T^{\prime},p}(\varphi_{L_{p}})}{\widetilde{W}_{T,p}(\varphi_{L_{p}})} of the pairs in R_{T} are imprimitive ones coming from R_{T^{\prime}} . For Case i) , suppose \nu_{p}(D_{2})\leq 1 . If p\nmid 2D(B)\mathfrak{M} , then \widetilde{W}_{T,p}(\varphi_{L_{p}})=1 by Theorem 5.7 , which gives N_{p}=1 . If p=2\nmid D(B)\mathfrak{M} , then (D_{1},2)_{2}=-1 gives \varepsilon_{2}\equiv 5\bmod 8 and Theorem 5.11 yields N_{2}=\beta_{2}=1 . If p\mid\mathfrak{M} , then N_{p}=\beta_{p}(T)=0 by Theorems 5.10 and 5.11 . Suppose \nu_{p}(D_{2})\geq 2 , then the above argument about primitive vectors show that N_{p}=0 . For Case ii) , \epsilon_{p}(T)=(\varepsilon_{1},p)_{p}=(D_{1},p)=-1 is different from \epsilon_{p}(V_{p})=1 as p\nmid D . Therefore, \widetilde{W}_{T,p} , hence \beta_{p}(T) , is 0 for p\nmid D by Theorems 5.7 , 5.10 and 5.11 . In Case iii) , those odd primes p|D are not explicitly listed in ( 5.23 ), thus gives a local factor 1 for (\varepsilon_{1},p)_{p}=-1 . Similarly for 2=p\mid D , the condition (\epsilon_{1},D_{1})_{2}=-1 implies \varepsilon_{1}\equiv D_{1}\equiv 5\bmod 8 , and Theorem 5.11 gives N_{p}=\beta_{p}(T)=1 . Reasoning by primitivity completes the situation for \nu_{p}(D_{2})\geq 2 . For Case vi) , the pairs with \nu_{p}(D_{2})\leq 1 must be primitive, so the claim is clear in that subcase for p\nmid 2\mathfrak{M} by Theorem 5.7 , for 2\neq p\mid\mathfrak{M} by Theorem 5.10 , and for p=2 by Theorem 5.11 . When \nu_{p}(D_{2})\geq 2 and e0}P_{\nu}^{0}(\sqrt{1+w})\frac{e^{-\beta w}}{\sqrt{1+w}}\,dw\;=\;\beta^{-3/4}e^{\beta/2}W_{-1/4,\nu/2+1/4}(\beta)\,. This integral is for instance evaluated in [ 13 , Chapter 7.146] (however citing incorrectly from [ 10 , Formula 180(8)] with index +1/4 ). The above formula leads to the correct asymptotic behavior.)