J. Eur. Math. Soc. 28, 5113–5192 (2026)                                     DOI 10.4171/JEMS/1691
© 2025 European Mathematical Society
Published by EMS Press and licensed under a CC BY 4.0 license




Peter Humphries · Asbjørn Christian Nordentoft

Sparse equidistribution of geometric invariants of real
quadratic fields
Received 15 November 2022; revised 30 March 2025

Abstract. Duke, Imamoḡlu, and Tóth have recently constructed a new geometric invariant, a hyper-
bolic orbifold, associated to each narrow ideal class of a real quadratic field. Furthermore, they have
shown that the projection of these hyperbolic orbifolds onto the modular surface nH equidistrib-
utes on average over a genus of the narrow class group as the fundamental discriminant D of
the real quadratic field tends to infinity. We extend this construction of hyperbolic orbifolds to
allow for a level structure, akin to Heegner points and closed geodesics of level q. Additionally,
we refine this equidistribution result in several directions. First, we investigate sparse equidistribu-
tion in the level aspect, where we prove the equidistribution of level q hyperbolic orbifolds when
restricted to a translate of nH in 0 .q/nH, which presents some new interesting features. Second,
we explore sparse equidistribution in the subgroup aspect, namely equidistribution on average over
small subgroups of the narrow class group. Third, we prove small scale equidistribution and give
upper bounds for the discrepancy. Behind these refinements is a new interpretation of the Weyl
sums arising in these equidistribution problems in terms of adèlic period integrals, which in turn
are related to Rankin–Selberg L-functions via Waldspurger’s formula. The key remaining inputs
are hybrid subconvex bounds for these L-functions and a certain homological version of the sup-
norm problem.

Keywords: equidistribution, thin subgroup, hyperbolic orbifold, real quadratic field.



1. Introduction

1.1. Equidistribution of hyperbolic orbifolds
             p
Let E WD Q. D/ be a real quadratic number field, where D > 1 is a positive fundamental
                                                                                  C
discriminant. Associated to each narrow ideal class A of the narrow class group ClD of E
is a closed geodesic CA on the modular surface nH, where        WD SL2 .Z/ denotes the


Peter Humphries: Department of Mathematics, University of Virginia, 141 Cabell Drive, Kerchof
Hall, Charlottesville, VA 22904, USA; pclhumphries@gmail.com
Asbjørn Christian Nordentoft: Laboratoire de Mathématiques d’Orsay, Université Paris-Saclay,
307 Rue Michel Magat, 91405 Orsay Cedex, France; Department of Mathematical Sciences,
University of Copenhagen, Universitetsparken 5, 2100 Copenhagen, Denmark;
acnordentoft@outlook.com, nordentoft@math.ku.dk
Mathematics Subject Classification 2020: 11F12 (primary); 11E16, 11F67, 11R11 (secondary).
P. Humphries, A. C. Nordentoft                                                       5114


modular group. In [19], Duke, Imamoḡlu, and Tóth introduced a new geometric invariant
associated to each narrow ideal class A, a hyperbolic orbifold A nNA with boundary given
by the closed geodesic CA . The group A  PSL2 .Z/ is a Fuchsian group of the second
kind whose construction is given in terms of certain invariants of A, while NA  H is
the Nielsen region of A , namely the smallest nonempty A -invariant open convex subset
of H.
    Duke, Imamoḡlu, and Tóth additionally showed that these hyperbolic orbifolds equi-
distribute as D tends to infinity when projected onto the modular surface. For each posit-
ive fundamental discriminant D, one chooses a genus GD in the group of genera GenD WD
  C      C 2                               C 2                                         C
ClD  =.ClD / , so that GD is a coset C.ClD  / of narrow ideal classes for some C 2 ClD   ;
then for every continuity set B  nH,
                       P
                        A2GD vol.FA \ B/          vol.B/
                         P                     D              C oB .1/               (1.1)
                            A2GD   vol.FA /       vol.nH/

as D tends to infinity through fundamental discriminants [19, Theorem 2]. Here FA
denotes a canonical fundamental domain for A nNA , while the volume measure on the
upper half-plane H 3 z D x C iy is d.z/ D y 2 dx dy, so that vol.nH/ D 3 . This
equidistribution theorem can be viewed as an analogue of Duke’s celebrated result on the
equidistribution of closed geodesics and of Heegner points on the modular surface and
additionally of lattice points on the sphere [17].


1.2. Sparse equidistribution in the level aspect
We generalise Duke, Imamoḡlu, and Tóth’s construction of hyperbolic orbifolds in the
level aspect. Let q be an odd prime that splits in E. In Section 3, we construct hyper-
bolic orbifolds of level q, denoted by A .q/nNA .q/, and a canonical fundamental domain
FA .q/  H. This extends the level 1 construction of the hyperbolic orbifolds A nNA
and their canonical fundamental domains FA introduced in [19]. These level q hyperbolic
orbifolds are analogous to Heegner points of level q [29, p. 499] and closed geodesics of
level q [29, p. 500] (cf. [14, Section 1]), but with several key new features. We refer to
Figures 2, 3, and 4 in Section 3 for some illustrative examples.
    The level q modular surface 0 .q/nH may be written as
                                              [
                             0 .q/nH D               !q 1 nH:
                                         !q 2= 0 .q/

This partitions 0 .q/nH into q C 1 translates of nH. We are interested in the hybrid
problem concerning the asymptotic behaviour of the volume of FA .q/ \ 0 .q/!q 1 nH
on average over a genus GD as both q and D tend to infinity; this is motivated by the
work of Liu, Masri, and Young on the analogous problem for Heegner points [49, The-
orem 1.4]. Since the volume of !q 1 nH is equal to that of nH, these translates are
small in comparison to the total volume of 0 .q/nH, so that as q grows, we are studying
the equidistribution of hyperbolic orbifolds in sets of shrinking volume.
Sparse equidistribution of geometric invariants of real quadratic fields                  5115

                          1
Theorem 1.1. Fix ı 2 Œ0; 36 /. For each positive squarefree fundamental discriminant D,
choose a genus GD in the group of genera GenD . For each odd prime q that splits in E
with q  D ı , choose !q 2 = 0 .q/. Then

          vol.0 .q/nH/ A2GD vol.FA .q/ \ 0 .q/!q 1 nH/
                         P
                                   P                             D 1 C oı .1/
             vol.nH/                A2GD vol.FA .q//

as qD tends to infinity. Assuming the generalised Lindelöf hypothesis, the same result
                                          1
holds for q  D ı for some fixed ı 2 Œ0; 12 /.
    The second author [54] recently studied the related problem of determining the distri-
bution of the homology classes of closed geodesics

                                    ŒCA .q/ 2 H1 .Y0 .q/; Z/;

where Y0 .q/ WD 0 .q/nH is the non-compact modular surface of level q and CA .q/ is the
                                                    C
oriented closed geodesic associated to A 2 ClD        . As discussed in [49], these results can
be viewed as an analogue of Linnik’s theorem. Linnik’s theorem, in its effective form,
states that there exists an absolute constant L > 1 such that given a positive integer q
and a reduced residue class a modulo q, there exists the expected number of primes,
              qL
.1 C o.1// '.q/  , that are less than q L and are congruent to a modulo q. Theorem 1.1 can be
viewed in a similar light: there exists an absolute constant ı > 0 such that given a prime q
and a translate !q 1 nH of nH in 0 .q/nH, there exists the expected proportion of
                                                                         1
mass of projections of hyperbolic orbifolds of discriminant D  q ı onto 0 .q/nH that
lie in the translate !q 1 nH.


1.3. Sparse equidistribution in the subgroup aspect
Our second refinement is to study the equidistribution of hyperbolic orbifolds averaged
                          C
over sparse subsets of ClD  . Previously, we averaged over a genus GD , which has car-
           1 !.D/ C            C
                                 WD jClDC
dinality 2       hD , where hD            j denotes the narrow class number and !.D/
denotes the number of distinct prime divisors of D. We instead consider an arbitrary
                                                  C                               C 2
subgroup H D HD of the narrow class group ClD        in place of the subgroup .ClD  / and
                                                         C 2
an arbitrary coset CH in place of a genus GD D C.ClD / . Whereas a genus GD satis-
                    C
fies jGD j " D " hD  for every " > 0, we allow for the possibility that the cardinality of
                                                C
a coset CH may be significantly smaller than hD   .
                           1
Theorem 1.2. Fix ı 2 Œ0; 2826 / and fix either q D 1 or q an odd prime. For each positive
fundamental discriminant D for which q splits in E if q > 1, choose a coset CH with
       C                                 C                         C
C 2 ClD   and H D HD a subgroup of ClD      satisfying jH j  D ı hD . Then for each fixed
continuity set B  0 .q/nH,
              P
                A2CH vol.FA .q/ \ 0 .q/B/            vol.B/
                  P                            D                 C oq;B;ı .1/        (1.2)
                    A2CH   vol.F A .q//           vol. 0 .q/nH/

as D tends to infinity. Assuming the generalised Lindelöf hypothesis, the same result holds
                  C
for jH j  D ı hD    for some fixed ı 2 Œ0; 41 /.
P. Humphries, A. C. Nordentoft                                                                5116


     Note that by taking H to be the trivial subgroup, Theorem 1.2 implies the equidistribu-
tion of individual hyperbolic orbifolds as D tends to infinity along fundamental discrim-
                       C                              1
inants for which hD       D ı for some fixed ı < 2826    0:00035 (cf. [57, Theorem 6.5.1]).
                                                        C
     At the other extreme, we may take H to be ClD        , so that (1.2) gives the equidistribu-
tion of hyperbolic orbifolds averaged over the whole narrow class group. For q D 1, such
a result is trivial, as observed by Duke, Imamoḡlu, and Tóth [19, Section 4]; as we discuss
in Section 8, however, this result is no longer trivial for q an odd prime.
     Theorem 1.2 is motivated by a conjecture of Michel and Venkatesh [53, Conjecture 1],
where the analogous statement for Heegner points is conjectured to hold for any fixed ı 2
Œ0; 12 /; it is noted that the generalised Lindelöf hypothesis implies such a conjecture in the
range ı 2 Œ0; 41 /. Harcos and Michel have proven this conjecture in the range ı 2 Œ0; 2826  1
                                                                                                /
[32, Theorem 1.2] (see additionally [31, Corollary 1.4]), while Venkatesh has studied this
problem in more general settings [61, Theorem 7.2].
     More recently, a toy model of this problem was resolved by the first author [37, The-
orem 1.5], namely the sparse equidistribution as q tends to infinity of the points
                         ° d d 0                                         ±
                               ;     2 T 2 W d 2 CH; d d 0  1 .mod q/
                             q q
in the torus T 2 D .R=Z/2 indexed by a coset CH of the group .Z=qZ/ with q a prime
and jH j  q ı for some fixed ı > 0. In this setting, it is shown that this sparse equidistribu-
tion result is a simple consequence of a deep result of Bourgain on cancellation in certain
exponential sums [11].

1.4. Small scale equidistribution and discrepancy bounds
The first author investigated a refinement of Duke, Imamoḡlu, and Tóth’s equidistribution
result in [36], namely small scale equidistribution, in which the continuity set B  nH
in (1.1) is chosen to be a ball BR .w/ whose radius R shrinks as D grows. One can think
of the fastest rate at which this radius can shrink with respect to the growth of D for which
equidistribution still holds as being the smallest scale of equidistribution. We prove the
following unconditional result in this regard.
Theorem 1.3. Fix ı 2 Œ0; 12 / and w 2 nH. For each positive squarefree fundamental
discriminant D, choose a genus GD in the group of genera GenD . Then for all R 2
ŒD ı ; 1, we have that
                             P
                  vol.nH/      A2GD vol.FA \ BR .w//
                                   P                   D 1 C oı .1/           (1.3)
                 vol.BR .w//        A2GD vol.FA /

as D tends to infinity.
    This improves upon [36, Theorem 1.24], where this result was proven under the
assumption of the generalised Lindelöf hypothesis.1 We use Theorem 1.3 to bound the

    1 As stated, [36, Theorem 1.24] claims that formula (1.3) holds for R  D ı for some fixed
         1
ı 2 Œ0; 12 / unconditionally and for some fixed ı 2 Œ0; 14 / under the assumption of the generalised
Sparse equidistribution of geometric invariants of real quadratic fields                     5117


discrepancy associated to this equidistribution result, which may be thought of as a quant-
itative way of measuring uniformly the rate of equidistribution.
Theorem 1.4. For each positive squarefree fundamental discriminant D, choose a genus
GD in the group of genera GenD . Then as D tends to infinity, we have that
                   ˇP
                   ˇ A2GD vol.FA \ BR .w// vol.BR .w// ˇ
                                                                 ˇ
                                                                           1
                                                                 ˇ " D 12   C"
           sup     ˇ      P                                                     ;
                           A2GD vol.FA /            vol.nH/
                   ˇ                                             ˇ
       BR .w/nH

where the supremum is over all injective geodesic balls in nH. Assuming the generalised
                                                1
Lindelöf hypothesis, the stronger bound O" .D 4 C" / holds for the discrepancy.
Remark 1.5. Recently, the second named author and Ser Peow Tan [55] gave a geo-
metric construction of the partial coverings studied in this paper and in [19] (i.e., the
image of the projection FA .q/ ! 0 .q/nH) applicable to any Fuchsian group of the
first kind. This construction circumvents any reference to thin subgroups. Furthermore,
[55, Theorem 1.1] shows that equidistribution of a sequence of collections of closed
geodesics implies equidistribution of the associated partial coverings, where in both set-
tings equidistribution is meant in the sense of smooth compactly supported functions.
The methods are quite different to the present paper and in particular do not yield effect-
ive error terms (outside of the co-compact case, which is not treated in the present paper)
and do not cover the case where the Fuchsian group is varying, as in Theorem 1.1.


1.5. A discussion on the proofs
1.5.1. Sparse equidistribution in the level aspect. Theorem 1.1 is proven via approximat-
ing the indicator function of !q 1 nH by a smooth function and spectrally expanding this
on 0 .q/nH. One then integrates this spectral expansion over the projection of FA .q/ onto
0 .q/nH and sums over A 2 GD . The main contribution comes from the constant func-
tion. It remains to bound the contributions from the cuspidal and continuous spectrum,
which involve Weyl sums. As is standard for equidistribution results of this form, these
Weyl sums can be expressed in terms of the twisted L-functions L. 21 ; f ˝ D1 /, where
D1 j D is a fundamental discriminant and D1 denotes the primitive quadratic Dirichlet
character modulo jD1 j. Unusually, there is additionally a new topological contribution
involving
(1) the twisted L-functions L. 21 ; h ˝ D1 / for h a holomorphic Hecke cusp form of
    weight 2 and level q;
(2) line integrals of f along sides of a fundamental polygon P .q/ of 0 .q/ (which are
    independent of D); and
(3) certain cap product pairings between homology and cohomology of the compactific-
    ation X0 .q/ of the modular surface 0 .q/nH (which are also independent of D).


Lindelöf hypothesis, though these conditions should in fact be the stronger conditions ı 2 Œ0; 61 /
and ı 2 Œ0; 21 /, respectively.
P. Humphries, A. C. Nordentoft                                                         5118


   A key step is to obtain strong bounds for certain moments of L-functions of the form
                      X          X           L. 12 ; f ˝ D1 /L. 12 ; f ˝ D2 /
                                                                                ;
                                                         L.1; ad f /
                   D1 D2 DD f 2B0 .0 .q//
                              T tf 2T


where B0 .0 .q// denotes an orthonormal basis of L2 .0 .q/nH/ consisting of Hecke–
Maaß cusp forms. Due the hybrid nature of Theorem 1.1, we require bounds for this
moment that are uniform in q and D, and similarly hybrid bounds for related moments of
L-functions associated to holomorphic Hecke cusp forms. Here we proceed via Hölder’s
inequality together with hybrid bounds for the third moments of L. 12 ; f ˝ D1 / and
L. 21 ; f ˝ D2 / due to Petrow and Young [56].
     What remains is to bound the contribution from the topological term. By a detailed
analysis of the structure of @FA .q/, the line integrals of f can be expressed in terms of
Voronoı̆ L-series (i.e., L-series of additive twists of f ), which can in turn be bounded on
average via the spectral large sieve. The bounding of the cap product pairing can be seen
as a homological instance of the sup-norm problem and has been bounded recently by
the second author [54] using a theta correspondence approach combined with techniques
from geometric coding to treat the counting problem that arises.

1.5.2. Sparse equidistribution in the subgroup aspect. We reduce the proof of Theo-
rem 1.2 to showing that for each fixed Hecke–Maaß cusp form f 2 B0 .0 .q//, the
quantity
                       jH j          1          X
                         C
                            P                        x /W;f
                                                    .C
                        hD A2CH vol.FA .q//       ?    2H

tends to zero as D tends to infinity, as well as an analogous result for f replaced by an
Eisenstein series. Here H ? denotes the annihilator of H , namely the set of characters 
     C
of ClD  that satisfy .A/ D 1 for all A 2 H , while the Weyl sum W;f is
                                    X          Z
                         W;f WD         .A/         f .z/ d.z/:                   (1.4)
                                        C            FA .q/
                                    A2ClD

    Following earlier work of Duke, Imamoḡlu, and Tóth [19, Proposition 1], we prove
a lower bound for the sums of volumes of the hyperbolic orbifolds of the form
                              X                           jH j 1 "
                                    vol.FA .q// q;"        C
                                                              D2 :
                             A2CH
                                                           hD
         ?       hC
Since jH     j D jHDj , equidistribution follows provided that we can show that there exists
an absolute constant ˛ > 0 such that
                                                    jH j 1 ˛
                                    W;f q;f         C
                                                        D2 :
                                                     hD
In this way, the proof of Theorem 1.2 is reduced to proving such bounds for Weyl sums.
Sparse equidistribution of geometric invariants of real quadratic fields               5119


    To bound these Weyl sums, we make explicit a version of Waldspurger’s formula [63]
in order to show that the square of the absolute value of a Weyl sum is essentially equal to
a special value of a Rankin–Selberg L-function. The proof is then completed upon invok-
ing subconvex bounds for Rankin–Selberg L-functions due to Harcos and Michel [32].

1.5.3. Small scale equidistribution and discrepancy bounds. The proof of Theorem 1.3
concerning small scale equidistribution follows in a similar manner to previous work of
Young [64, Theorem 2.1] on small scale equidistribution of Heegner points on nH and
of the first author and Radziwiłł [39, Theorem 1.5] on small scale equidistribution of
lattice points on the sphere. The chief idea is to approximate the indicator function of
a ball via a smooth function and spectrally expand this on nH. One then integrates this
spectral expansion over the projection of A nNA onto nH and sums over A 2 GD . The
main contribution comes from the constant function, and our goal becomes adequately
bounding the ensuing sum over the cuspidal spectrum and integral over the continuous
spectrum.
     We approach this via a dyadic subdivision together with an application of pre-existing
identities of Duke, Imamoḡlu, and Tóth relating Weyl sums to L-functions [19, Theor-
ems 3 and 4]. In this way, the problem is reduced to deducing strong bounds for the
quantities
                   X           X       L. 21 ; f ˝ D1 /L. 12 ; f ˝ D2 /
                                                                          ;
                                                   L.1; ad f /
                D1 D2 DD f 2B0 ./
                         T tf 2T
                           Z              ˇ L. 1 C i t;  /2 L. 1 C i t;  /2 ˇ2
                   X                      ˇ 2            D1      2        D2
                                                                              ˇ dt
                                                                              ˇ
                                                         .1 C 2i t /
                                          ˇ
                D1 D2 DD       T jt j2T


that are uniform in both T and D. For this, we can appeal to recent work of the first author
and Radziwiłł [39, Proposition 2.14]. The bounds for the discrepancy in Theorem 1.4 are
then readily deduced from Theorem 1.3.


1.6. Complications
The above discussion of the proofs of Theorems 1.1, 1.2, 1.3, and 1.4 glosses over two
key obstacles that we must overcome.

1.6.1. Hyperbolic orbifolds of level q. The first obstacle is defining the hyperbolic orbi-
folds of level q. For q D 1, Duke, Imamoḡlu, and Tóth [19] associate to a narrow ideal
class A of a real quadratic field a Fuchsian group of the second kind A  PSL2 .Z/
whose unique boundary component projects to the closed geodesic CA .1/  X0 .1/ asso-
ciated to A. In the higher level setting, however, it is not possible to define a subgroup
of 0 .q/ that is a Fuchsian group of the second kind whose boundary component projects
to CA .q/  X0 .q/. This is caused by the possibility of a topological obstruction in the
case of nontrivial genus. One can observe this intuitively by considering a loop around
P. Humphries, A. C. Nordentoft                                                            5120




                       Fig. 1. A loop around one of the holes of the torus.



one of the holes of a torus, as in Figure 1. This loop is not the boundary of a submanifold
of the torus, which is precisely due to the fact that the loop is nontrivial in the homology
of the torus. In other words, we must compensate for the nontrivial homology of CA .q/ in
a systematic way.
    In Section 3, we define a Fuchsian group of the second kind A .q/  PSL2 .Z/ (which
in general is not contained in 0 .q/) as well as an associated canonical fundamental
domain FA .q/  H of A .q/nNA .q/, where NA .q/ is the associated Nielsen region. The
equidistribution problem that we study concerns the image under the map FA .q/ ! X0 .q/
given by restricting the projection H  X0 .q/. The starting point for this construc-
tion is a special fundamental polygon P .q/ of 0 .q/ introduced by Kulkarni [46] and
studied recently by Doan, Kim, Lang, and Tan [15]. Pictorially, the boundary of the funda-
mental polygon @P .q/ defines a curve inside X0 .q/, and we compensate for the nontrivial
homology of CA .q/ by subsegments of @P .q/. The boundary @P .q/ contributes to the
topological terms in the Weyl sums alluded to above, which has not previously been
observed before in the context of Duke’s theorem. Notably, bounding these topological
contributions requires several new ideas that go beyond the work of Duke, Imamoḡlu, and
Tóth [19], namely averaged bounds for Voronoı̆ L-series and a homological version of
the sup-norm problem.

1.6.2. Weyl sums. The second obstacle is relating the Weyl sum (1.4) to a special value of
a Rankin–Selberg L-function. Let us first recall how this is done by Duke, Imamoḡlu, and
                                C 2
Tóth when q D 1 and H D .ClD      / . In this setting, a character  2 H ? is a genus character
associated to a pair of primitive quadratic Dirichlet characters D1 , D2 of conduct-
ors jD1 j, jD2 j, where D1 ; D2 2 Z are fundamental discriminants for which D1 D2 D D.
In [19, Theorem 4], it is shown that the Weyl sum W;f for this genus character  is
essentially equal to b.D1 /b.D2 /, where b.n/ denotes the n-th Fourier coefficient of
the Shintani lift of the Hecke–Maaß form f of weight zero, namely the Maaß form of
weight 21 associated to f via the Shimura–Shintani correspondence, as elucidated by
Katok and Sarnak [44]. One then uses Waldspurger’s formula [62, Théorème 1], in an
explicit form due to Baruch and Mao [5, Theorem 1.4], to relate jb.D1 /j2 and jb.D2 /j2
to the values at s D 12 of the L-functions L.s; f ˝ D1 / and L.s; f ˝ D2 /.
     This method breaks down, however, when  is not a genus character, for then there
is no explicit relation between the Weyl sum and the Fourier coefficients of the Shintani
lift. We show that nonetheless there is a relation between the square of the absolute value
Sparse equidistribution of geometric invariants of real quadratic fields                     5121


of the Weyl sum and the special value of an L-function. The key observation is that
[19, Lemma 1] identifies the Weyl sum with a weighted sum of cycle integrals, namely
integrals of an automorphic form along a closed geodesic. With a careful classical-to-
adèlic correspondence, we show that this weighted sum of cycle integrals can in turn be
viewed as an adèlic period integral P ./, where the integrand is the product of a distin-
guished automorphic form W GL2 .AQ / ! C lying in the automorphic representation f
associated to f and the Hecke character W E  nA1E ! C  associated to .
    It is known, going back to the work of Waldspurger [63], that jP ./j2 is essentially
equal to the value at s D 12 of the Rankin–Selberg L-function L.s; f ˝  /, where 
denotes the automorphic induction of  to an automorphic representation of GL2 .AQ /.
When  is the idèlic lift of a narrow class character , this L-function may in turn be
written as the Rankin–Selberg L-function L.s; f ˝ ‚ /, where ‚ denotes the theta
series on 0 .D/nH associated to .
    It is instructive to consider the case when the Hecke character W E  nA1E ! C 
factors through the norm map from A             
                                        E to AQ . When this occurs, the automorphic rep-
resentation  is noncuspidal; it is the isobaric sum of a pair of Hecke characters !1 ; !2 W
Q nA1Q ! C  and the vector space of automorphic forms associated to  consists
of Eisenstein series, so that the Rankin–Selberg L-function L.s; f ˝  / factorises as
L.s; f ˝ !1 /L.s; f ˝ !2 /. When  is additionally the adèlic lift of a narrow class
character , then necessarily  is a genus character associated to a pair of quadratic char-
acters D1 , D2 whose idèlic lifts are !1 , !2 , so that

       L.s; f ˝ !1 / D L.s; f ˝ D1 /          and    L.s; f ˝ !2 / D L.s; f ˝ D2 /:

In this way, our result encompasses that of Duke, Imamoḡlu, and Tóth.
     There is a caveat to our claim that jP ./j2 is essentially equal to L. 21 ; f ˝  /; this
is true only up to multiplication by a constant that depends sensitively on the automorphic
form . Thankfully, this constant has been explicitly evaluated for certain choices of auto-
morphic forms  by Martin and Whitehouse [50], and while the cases of interest required
in the proofs of our two main theorems do not quite fall under the umbrella of the cases
considered in [50], only mild modifications are needed.


2. Oriented closed geodesics of level q

We begin by recording several details relating oriented ideals and narrow ideal classes of
real quadratic fields, integral binary quadratic forms, embeddings of real quadratic fields
into spaces of matrices, and closed geodesics on the level q modular surface 0 .q/nH.
Useful references for this material include [29, Section 1], [14, Section 1], and [57,
Section 6]. We work throughout with a positive fundamental discriminant     p D > 1 and
a squarefree integer q for which every prime dividing q splits in E WD Q. D/. We also
fix once and for all a residue class r modulo 2q for which r 2  D .mod 4q/; the depend-
ence on the choice of r is briefly discussed in Section 2.5.
P. Humphries, A. C. Nordentoft                                                          5122


2.1. Oriented ideals
Let a be a nonzero fractional ideal of E. Let .˛1 ; ˛2 / 2 E 2 be generators over Z of a,
so that a D Z˛1 C Z˛2 . The (absolute) norm of a is
                                          j˛1  .˛2 / ˛2  .˛1 /j
                                 N.a/ D             p             ;
                                                      D
where  denotes the nontrivial Galois automorphism of E. The ideal a is said to be
oriented with respect to the ordered pair of generators .˛1 ; ˛2 / 2 E 2 if ˛1  .˛2 /
˛2  .˛1 / > 0 and to be of level q if
               N.˛1 /                             Tr.˛1  .˛2 //
                       0 .mod q/         and                     r .mod 2q/:
               N.a/                                  N.a/
We denote by ŒaI ˛1 ; ˛2  the oriented ideal a with respect to the generators .˛1 ; ˛2 /.
    The congruence subgroup 0 .q/ 3 acts on the set of such triples ŒaI ˛1 ; ˛2  by acting
trivially on the ideal a and mapping the ordered pair of generators .˛1 ; ˛2 / 2 E 2 , viewed
as a row vector, to .˛1 ; ˛2 / . This action preserves oriented ideals of level q.
    Let OE denote the ring of integers of E. The set

                    PEC WD ¹.˛/ D ˛OE  E W ˛ 2 E; ˛;  .˛/ > 0º

of totally positive principal fractional ideals – equivalently, the identity I in the narrow
               C
class group ClD   – acts on an oriented ideal ŒaI ˛1 ; ˛2  of level q via the map

                           .˛/  ŒaI ˛1 ; ˛2  WD Œ.˛/aI ˛˛1 ; ˛˛2 ;

and this action commutes with the action of 0 .q/.
                                                C
    In this way, each narrow ideal class of ClD    may be bijectively identified with equi-
valence classes of oriented ideals of level q modulo the action of 0 .q/ and PEC , where
we identify the identitypnarrow ideal
                                  p
                                      class I with the equivalence class of oriented ideals
                     r    D     r   D
containing ŒZq C Z 2 I q; 2  for each r 2 Z for which r 2  D .mod 4q/. The
                           C
narrow ideal class J 2 ClD              the different dpthen corresponds
                             containing p                    p         p to the equivalence
class of oriented ideals containing ŒZq D C Z D r2 D I q D; D r2 D .


2.2. Binary quadratic forms
For each trio of integers .a; b; c/ 2 Z3 having greatest common divisor equal to 1 and
satisfying b 2 4ac D D, a  0 .mod q/, and b  r .mod 2q/, we define the integral
binary quadratic form
                                            ! !
                                    a b       x
                Q.x; y/ D x y b 2                  D ax 2 C bxy C cy 2 ;          (2.1)
                                      2
                                          c    y

which is a primitive form of level q and discriminant b 2 4ac D D. We write Q D
Œa; b; c to denote this form and call such a form a Heegner form, following [14]; we denote
the set of such forms by QD .q/.
Sparse equidistribution of geometric invariants of real quadratic fields                5123


      The congruence subgroup 0 .q/ 3   acts on Heegner forms via
                                                                !  
                                       t
                                                    t     a b2    x
               .  Q/.x; y/ WD Q..x; y/ / D x y            b          ;
                                                           2
                                                              c    y

where t denotes the transpose of and we view .x; y/ as a row vector. Moreover, this
action preserves QD .q/.
    To each equivalence class PEC  ŒaI ˛1 ; ˛2  of oriented ideals of level q, we associate
the Heegner form Q D QP C ŒaI˛ ;˛  2 QD .q/ given by
                               E      1   2

                                                N.˛1 x C ˛2 y/
                                   Q.x; y/ WD                  :
                                                    N.a/
Conversely, associated to each Heegner form Q D Œa; b; c 2 QD .q/ as in (2.1) is the
equivalence class of oriented ideals of level q given by
       8                      p            p i
            C
               h          b     D      b     D
       <PE  Za C Z               I a;                                 if a > 0,
       ˆ
       ˆ
                              2          p2                   p                         (2.2)
       ˆ
            C
               h       p         D     b   D     p D b Di
       :P  Z. a D/ C Z
       ˆ
                                             I a D;                    if a < 0.
           E
                                       2                    2
This map is a bijection between QD .q/ and equivalence classes of oriented ideals of
level q. This association descends to a bijection between narrow ideal classes of the nar-
                    C
row class group ClD    and equivalence classes of primitive integral binary quadratic forms
of level q and discriminant D modulo the action of 0 .q/. In particular, for each r 2 Z for
which r 2  D .mod 4q/, the equivalence class of elements of QD .q/ modulo 0 .q/ that
                 2                                                              C
contains Œq; r; r 4qD  corresponds to the principal narrow ideal class I 2 ClD   , while the
                                         D r2
equivalence class containing Œ q; r; 4q  corresponds to the narrow ideal class J
containing the different d.


2.3. Oriented embeddings
Again, let .a; b; c/2Z3 have greatest common divisor equal to 1 and satisfy b 2 4ac D D,
a  0 .mod q/, and b  r .mod 2q/. We define an embedding ‰W E ,! Mat22 .Q/ by
                                 p
                                                             
                                            x C by      2cy
                         ‰.x C Dy/ WD                                               (2.3)
                                               2ay x by
for x; y 2 Q. This satisfies
                 ‰.E/ \ ¹g 2 Mat22 .Z/ W g2;1  0 .mod q/º D ‰.OE /I
that is, ‰ is an oriented optimal embedding of level q. Conversely, every oriented optimal
embedding of level q arises from such a trio of integers .a; b; c/ 2 Z3 .
    The congruence subgroup 0 .q/ acts on the set of optimal oriented embeddings of
level q by conjugation, namely
                                    p                      p
                         .  ‰/.x C Dy/ WD 1 ‰.x C Dy/
for    2 0 .q/, and this action preserves optimal oriented embeddings of level q.
P. Humphries, A. C. Nordentoft                                                         5124


    There is a natural bijection between oriented optimal embeddings ‰ of level q as
in (2.3) and Heegner forms Q D Œa; b; c as in (2.1), since these are both completed
determined by .a; b; c/ 2 Z3 ; in turn, there is a bijection with equivalence classes of
oriented ideals of level q as in (2.2). Again, this descends to a bijection between narrow
                                             C
ideal classes A of the narrow class group ClD   and equivalence classes of oriented optimal
embeddings of level q modulo the action of 0 .q/. In particular, the equivalence classes
of oriented ideals of level q corresponding to I and J contain the optimal embeddings of
level q given, respectively, by
                                    2
                                          !                                         2
                                                                                       !
           p            x C ry r 2qD y                   p            x C ry D2qr y
  ‰I .x C Dy/ WD                            ; ‰J .x C Dy/ WD                             :
                           2qy x ry                                     2qy     x ry


2.4. Closed geodesics
Associated to a Heegner form Q D Œa; b; c 2 QD .q/ aspin (2.1) is an p
                                                                      oriented geodesic SQ
in the upper half-plane connecting the two points b 2a D and bC     2a
                                                                        D
                                                                          , namely the Euc-
lidean semicircle
                       SQ WD ¹z 2 H W ajzj2 C b Re.z/ C c D 0º                         (2.4)
oriented anticlockwise if a > 0 and clockwise if a < 0.                            p
    Let D > 1 be the least unit with positive norm in OE , so that D D u C Dv
with u, v positive half-integers that satisfy Pell’s equation u2 Dv 2 D 1 and minimise v
among all such positive half-integral solutions. For the oriented optimal embedding ‰ of
level q as in (2.3) associated to Q, define the matrix
                                                           
                                           u C bv      2cv
                        Q WD  ‰. D / D                        2 0 .q/:            (2.5)
                                             2av u bv

Together with 01 01 , this generates the group of automorphs of Q,
                        

                          0 .q/Q WD ¹ 2 0 .q/ W    Q D Qº:
                                                         p
Note that Q is a hyperbolic matrix, as Tr. Q / D 2u D 2 1 C Dv 2 > 2.
   Let A be the narrow ideal class associated to the equivalence class of Heegner forms
modulo 0 .q/ that contains Q. We let CA .q/ WD 0 .q/Q nSQ denote the oriented closed
geodesic in 0 .q/nH corresponding to A, which we may view explicitly as the reduction
modulo 0 .q/ of the oriented geodesic segment from zQ to Q zQ , where
                         8         p
                             bCi D
                                          if a > 0,
                         ˆ
                         ˆ
                         <
                  zQ WD         2a
                                 p
                         :b C i D
                         ˆ
                                          if a < 0,
                         ˆ
                                2a                      p
                         8                                                         (2.6)
                         ˆ   b.u2 C Dv 2 / 2Duv C i D
                         ˆ
                         ˆ                                     if a > 0,
                         <          2a.u2 C Dv 2 /
                 Q zQ D                                p
                         ˆ b.u2 C Dv 2 / C 2Duv C i D
                                                               if a < 0.
                         ˆ
                         ˆ
                                    2a.u2 C Dv 2 /
                         :
Sparse equidistribution of geometric invariants of real quadratic fields                   5125


2.5. Atkin–Lehner operators
We return to our choice of r modulo 2q for which r 2  D .mod 4q/. There are 2!.q/
                                                                            C
such choices, and for each choice, there is an associated collection of hD     distinct ori-
ented closed geodesics in 0 .q/nH. Each of these collections of oriented closed geodesics
is permuted by the 2!.q/ Atkin–Lehner operators on 0 .q/. More precisely, for each
divisor q1 of q, so that q D q1 q2 , we let
                                       p
                                               pb
                                                    !
                                      a q1      q1
                          Wq1 WD         p     p       2 SL2 .R/                       (2.7)
                                     cq2 q1 d q1

be an Atkin–Lehner operator on 0 .q/ associated to q1 , where a; b; c; d 2 Z are such that
adq1 bcq2 D 1. Any two such Atkin–Lehner operators associated to q1 are equivalent
modulo 0 .q/. These operators are elements of the normaliser of 0 .q/ and permute the
cusps of 0 .q/nH. They act on oriented ideals, Heegner forms, oriented embeddings, and
oriented closed geodesics; an Atkin–Lehner operator Wq1 , where q1 q2 D q, has the effect
of replacing r 2 Z=2qZ with the element r 0 2 Z=2qZ that satisfies r 0  r .mod 2q1 /
and r 0  r .mod 2q2 /.


3. Hyperbolic orbifolds of level q

Let D > 1p  be a positive fundamental discriminant and let q be an odd prime2 that splits
in E D Q. D/; as in Section 2.4, we fix once and for all a residue class r modulo 2q for
which r 2  D .mod 4q/. Our goal for this section is to construct a hyperbolic orbifold
whose boundary is the closed geodesic on X0 .q/ associated to an element of the narrow
              C
class group ClD  . Due to the possibility of nontrivial genus, these orbifolds have some new
and interesting features that do not show up in the level 1 case.


3.1. Special fundamental domains
By the Kurosh subgroup theorem, any subgroup of

                                   PSL2 .Z/ Š Z=2Z  Z=3Z

is isomorphic to a free product of a number of copies of Z=2Z, Z=3Z, and Z. In par-
ticular, if 0 .q/ is a torsion-free Hecke congruence subgroup, then it is a free group
on rankZ 0 .q/ab generators. We now describe an explicit geometric way, following [46],
for constructing an independent generating set using so-called special fundamental poly-
gons of 0 .q/.



     2 Much of what we prove below generalises in a straightforward manner to squarefree level q

(at least when there is no 3-torsion), but we stick to the case of q prime for simplicity.
P. Humphries, A. C. Nordentoft                                                           5126


3.1.1. Farey symbols of level q. Here and below, we denote by g the genus of X0 .q/ (sup-
pressing q from the notation), and by e2 2 ¹0; 2º and e3 2 ¹0; 2º the number of conjugacy
classes of subgroups in 0 .q/ of order 2 and of order 3, respectively (see [40, (2.12)
and (2.13)]). We write                                    
                                    1 1               0     1
                           T WD           ; S WD
                                    0 1               1 0
for the standard generators of PSL2 .Z/.
Definition 3.1 ([46]). A Farey symbol of level q is a sequence of reduced fractions,
                         0   a0   a1         an 1   an  1
                           D    <    <  <      <    D ;
                         1   b0   b1         bn 1   bn  1
where n WD 4g C e2 C e3 , such that
   aiC1 bi   ai bi C1 D 1 for all i 2 ¹0; : : : ; nº,
   there are e2 even indices i such that

                                     bi2 C bi2C1  0 .mod q/;

   there are e3 odd indices i such that

                                 bi2 C bi bi C1 C bi2C1  0 .mod q/;

   for the remaining 4g free indices, there is a pairing i $ i  satisfying

                                 bi bi  C bi C1 bi  C1  0 .mod q/:

Here we consider the indices i above modulo n C 2 by setting a 1 D 1, b 1 D bnC1 D 0,
and anC1 D 1.
    Such a Farey symbol of level q always exists; moreover, one can even find one that
is symmetric around 21 , so that an i D 1 ai and bn i D bi for each index i [46,
Section 13]. Dooms, Jespers, and Konovalov [16] have described an algorithm for determ-
ining Farey symbols of arbitrary level.
    It is easily seen that any Farey symbol of level q satisfies the bound bi  e O.q/ for the
                                                                           p
denominators; on the other hand, we have the lower bound maxi jbi j  q. It has recently
been shown by Doan, Kim, Lang, and Tan that furthermore there exist Farey symbols of
prime level that are minimal in the sense that this lower bound is essentially sharp.
Theorem 3.2 ([15, Theorem 1.1]). Let q be an odd p prime. There exists a Farey symbol
of level q that is symmetric about 12 with bi  b 4q
                                                   3
                                                     c for each index i 2 ¹0; : : : ; nº,
and such that

                               bi2 C bi2C1 D q      for all even indices i ;
                   bi2 C bi bi C1 C bi2C1 D q       for all odd indices i , and
                    bi bi  C bi C1 bi  C1 D q     for all free indices i .
Sparse equidistribution of geometric invariants of real quadratic fields                   5127


   From here onward, we let q be an odd prime and fix a Farey symbol of level q as in
Theorem 3.2. Following [46, Section 2], we denote by P .q/ the hyperbolic polygon in H
with the following e2 C e3 C n C 2 vertices:
   1;
 the n C 1 fractions abii of the Farey symbol for each index i 2 ¹0; : : : ; nº;
                                   p                                                  a C1
 the e2 PGL2 .Z/-translates of        1 on the infinite geodesic connecting abii and bii C1
  for each even index i 2 ¹1; : : : ; n 1º; and
                                           p
   the e3 PGL2 .Z/-translates of 1Ci2 3 lying just below the infinite geodesic connect-
                 aiC1
    ing abii and biC1 for each odd index i 2 ¹1; : : : ; n 1º.
As in [46, Section 3], we define a side pairing on P .q/ by pairing the following edges:
   the two vertical geodesics sharing the cusp 1;
                                                                 a
   theptwo geodesic segments connecting abii and bii C1
                                                       C1
                                                           with the PGL2 .Z/-translate
    of    1 lying between them for each of the e2 even indices i ;
                                                             a
   theptwo geodesic segments connecting abii and bii C1
                                                      C1
                                                         with the PGL2 .Z/-translate of
    1C    3
       2
            lying between them for each of the e3 odd indices i ; and
                                                         a
   the infinite geodesic between the cusps abii and bii C1
                                                         C1
                                                            with the infinite geodesic between
                ai  C1   ai 
    the cusps b  and b  for each of the 4g free indices i .
                 i C1        i

Definition 3.3. We define a side of P .q/ to be a maximal geodesic segment on the bound-
ary of P .q/ (note that there is only one side for each even index). Given a side L of P .q/
that is paired with a corresponding side L0 (which might be L itself), we define the label
of L as the element ˛ of PSL2 .Z/ that maps L0 to L as defined by Kulkarni (see below).
The set of all labels is called the set of side pairing elements of P .q/.
    By Poincaré’s polygon theorem [51], the side pairing elements define a finite index
subgroup of PSL2 .Z/ that has P .q/ as a fundamental domain; by [46, Theorem 13.2],
this subgroup is the congruence subgroup 0 .q/. Furthermore, since P .q/ has a minimal
number of sides (which follows from [40, Proposition 2.6]), the labels define an inde-
pendent set of generators (upon forgetting inverses) of 0 .q/.
    We denote by

         ¹iy W y > 0º DW L1 ;       L2 ;   :::;    LN 1 ;        LN WD ¹1 C iy W y > 0º;

the N WD 4g C 2 C e2 C 2e3 oriented sides of P .q/ taken in the positive orientation
starting from the side containing 0 and 1. We refer to the vertex of Lj shared with Lj 1
as the left-most or first vertex of Lj (which is 1 for j D 1) and the vertex of Lj shared
with Lj C1 as the right-most or second vertex (which is 1 for j D N ).
    We denote by ˛j the label in 0 .q/ associated to the oriented side Lj of P .q/, so that
˛1 D T 1 and ˛N D T . From [46, Theorem 6.1], these labels are explicitly as follows:
   for a side Lj associated to an even index i ,

                                                              ai2 ai2C1
                                                                           
                              a b        Ca b
                      ˛j D i C12 i C1 2 i i                                   I
                                  bi C bi C1              ai C1 bi C1 ai bi
P. Humphries, A. C. Nordentoft                                                                        5128


   for a side Lj associated to an odd index i ,
                                                                                            ˙1
                                                                  ai2 ai ai C1 ai2C1
                 
                a b        C ai bi C1 C ai bi
           ˛j D i C12 i C1                                                                        ;
                   bi C bi bi C1 C bi2C1                      ai C1 bi C1 ai C1 bi ai bi
                                                                                            p
    where ˙ D C if abii is to the left of the associated PGL2 .Z/-translate of 1C 2             3
                                                                                                    , while
    ˙ D if abii is to the right;
   for a side Lj associated to a free index i ,
                                                                                     
                            a b         C a i  bi             ai ai  ai C1 ai  C1
                    ˛j D i C1 i C1                                                      :
                            bi bi C bi C1 bi  C1
                                                               ai C1 bi  C1 ai bi 

We say that a side Lj is hyperbolic, elliptic, or parabolic if the associated label ˛j is
a hyperbolic, elliptic, or parabolic matrix, respectively; in particular, sides associated to
                                                                           p
      podd indices are elliptic. We note that since 0  ai  bi and bi  q, the Frobenius
even or
norm Tr.˛j t ˛j / of any label ˛j of P .q/ is bounded by O.q/.
    Here and below, we consider the indices j of Lj and ˛j modulo N . By a slight abuse
of notation, we denote by W Z=N Z ! Z=N Z the side pairing, so that for j 2 Z=N Z,

                               ˛j Lj  D Lj ;          ˛j  Lj D Lj  :

3.1.2. Orbits of consecutive polygons. It is key for us to understand the orbits of the map
t W Z=N Z ! Z=N Z given by
                                    t .j / WD j  1:
To see why this map is relevant, let P0 , P1 , P2 be three consecutive 0 .q/-translates
of P .q/ that all contain some cusp b 2 P 1 .Q/ (ordered in positive orientation). Let ˛j1
be the label of the side of P0 shared with P1 and let ˛j2 be the label of the side of P1
shared with P2 . Then we have the equality

                                    j2 D j1          1 D t .j1 /:

In other words, the map t encodes labels of consecutive translates of P .q/.
Lemma 3.4. Let E  Z=N Z denote the subset of indices j for which ˛j is either elliptic
of order 3 or parabolic and additionally Lj is to the left of Lj  . The map t W Z=N Z !
Z=N Z has e3 C 2 orbits explicitly given by

                            ¹j º for each j 2 E and .Z=N Z/nE:

Furthermore, for any t -orbit   Z=N Z and for all j 2 , the element of 0 .q/, given by
                                    ˛j ˛ t .j /    ˛ t .jj 1/ .j / ;

is either elliptic or parabolic.
Proof. First of all, for j 2 E we have that t .j / D j C 1 1 D j . Next, consider the
orbit  of 12Z=N Z. Observe that for j 2 S , the second vertex of the side Lj of P .q/ is
Sparse equidistribution of geometric invariants of real quadratic fields                                     5129


cuspidal and not equal to 1. Pick an element j 2  and let b 2 P 1 .Q/ be the second
vertex of the side Lj . Then the element

                          ˛ WD ˛j ˛ t .j / ˛ t .t .j //    ˛ t .jj 1/ .j / 2 0 .q/

lies in the stabiliser of b as it maps the side Lj of P .q/ containing b to the side ˛Lj
of ˛P .q/ containing b (using here that t .jj/ .j / D j ). This implies that the width of the
cusp between Lj and ˛Lj is at least q (as this is the width of the cusp 0 in 0 .q/). On the
other hand, all of the cuspidal zones near b of

         ˛j P .q/;    ˛j ˛ t .j / P .q/;     :::;       ˛j ˛ t .j /    ˛ t .jj 2/ .j / P .q/;   ˛P .q/

are 0 .q/-inequivalent. Thus we conclude that ˛ is in fact a generator of the stabiliser of b
and furthermore that  must contain all indices not in E, as these are precisely the indices
whose associated side has second vertex equal to a cusp in the 0 .q/-orbit of 0.

    We note that the size of the orbit containing 1 2 Z=N Z is equal to 4g C e2 C e3 C 1.
In particular, it follows from the above that
                                                                         
                                                                     1 0
                           ˛1 ˛ t .1/    ˛ t .4gCe2 Ce3 / .1/ D          ;
                                                                      q 1
as the left-hand side is equal to the generator of the stabiliser in 0 .q/ of 0 and maps 1
to a negative rational. Here we recall that ˛ t .4gCe2 Ce3 C1/ .1/ D ˛1 D T 1 .
Lemma 3.5. For each j 2 ¹0; : : : ; 4g C e2 C e3 º, the Frobenius norm of the matrix

                                    ˛1 ˛ t .1/    ˛ t .j / .1/ 2 0 .q/;
                      3
is bounded by O.q 2 /.

Proof. Put
                                        j WD ˛1 ˛ t .1/    ˛ t .j / .1/ :                                 (3.1)
Then the fundamental domain j P .q/ contains the cusp 0. This means that
                                                        ai
                                                    j      D0                                                (3.2)
                                                        bi
for some vertex abii of P .q/. Since all the cuspidal zones near 0 of

                          ˛1 P .q/;        ˛1 ˛ t .1/ P .q/;       :::;        j P .q/

are 0 .q/-inequivalent, we see that j 2 0 .q/ is characterised as the element of 0 .q/
satisfying (3.2) for which j 1 is negative such that j j 1j is maximised. This means
explicitly that                                      
                                         bi        ai
                                  j D                   ;
                                         qx0 y0
where x0 2 N is the minimal positive solution to the congruence ai qx0                               1 .mod bi /
                                                              p
and y0 WD 1Cabiiqx0 . This gives the desired result since bi  q.
P. Humphries, A. C. Nordentoft                                                         5130


3.2. Orbifolds associated to real quadratic fields
Let D ac db 2 0 .q/ be a primitive hyperbolic matrix with axis
             


                      S WD ¹z 2 H W cjzj2 C .d           a/ Re.z/   b D 0º             (3.3)

oriented anticlockwise if c < 0 and clockwise if c > 0 and intersecting the fundamental
polygon P .q/ (which can always be arranged by conjugation). We denote by C .q/ the
corresponding oriented closed geodesic in 0 .q/nH, namely C .q/ WD 0 .q/ nS with
0 .q/ WD ¹ 0 2 0 .q/ W 0 1 0 D º the associated group of automorphs.
    Let ˛i.0/ be the label of the side containing the second intersection between S
and P .q/, ˛i.1/ the label of the side containing the second intersection between S and
˛i.0/ P .q/, and so on. As the projection of S onto P .q/ is a closed geodesic, this defines
a periodic sequence of side pairing elements (see, e.g., [43])

                                    ˛i.0/ ; ˛i.1/ ; ˛i.2/ ; : : :

Let m C 1 denote the period of this sequence. We then have the following representation
of in terms of the labels of P .q/, namely the Morse code of :

                                     D ˛i.0/ ˛i.1/    ˛i.m / :                      (3.4)

The representation of in terms of the side pairing elements of P .q/ is unique up to the
relation ˛j2 D ˛j  for the elliptic labels ˛j of order 3. We consider the index as a map
i W Z=.m C 1/Z ! Z=N Z. For i1 ; i2 2 Z=N Z, we denote by arc.i1 ; i2 / the indices that
lie on the positively oriented open arc strictly between i1 and i2 when Z=N Z is embedded
into the unit circle S 1 via the homomorphism defined by
                                                           2 i
                                     1 .mod N / 7! e N :

Thus if we view i1 ; i2 2 Z=N Z as positive integers in ¹1; : : : ; N º, then
                             8
                             <¹i1 C 1; : : : ; i2 1º
                             ˆ                                       if i1 < i2 ,
              arc.i1 ; i2 / D ;                                      if i1 D i2 ,
                             ˆ
                               ¹1; : : : ; i2 1; i1 C 1; : : : ; N º if i1 > i2 .
                             :

    Given an integer k 2 Z=N Z, we define k 2 PSL2 .Z/ by
                      8
                      <˛ k
                      ˆ                               if ˛k is elliptic,
               k WD                           1
                          a     ai     a      ai
                      : i C1
                      ˆ              S i C1           otherwise,
                          bi C1 bi      bi C1 bi

where the index i is such that the side Lk associated to ˛k is contained in the strip be-
               a C1
tween abii and bii C1 . Note that if i is a free index, then

                                                            ai2 ai2C1
                                                                         
                                ai C1 bi C1 C ai bi
                        k D                                                ;
                                    bi2 C bi2C1         ai C1 bi C1 ai bi
Sparse equidistribution of geometric invariants of real quadratic fields                         5131


which is not an element of 0 .q/ since by definition i is not an even index. Note also that
if i is a free or even index, then ˛k is a -rotation around Lk .
     We now construct a subgroup of PSL2 .Z/ from the Morse code of . Special care has
to be given to labels of order 3 since the geometry is different at the corresponding sides.
We define
                                 3
                                      D 1 and i.j / 2 arc.i.j /; i.j 1/ /,
                        ´
                          1 if ˛i.j /
             ıC .j / WD
                          0 otherwise,
                                 3
                                         D 1 and i.j 1/ 2 arc.i.j /; i.j 1/ /,
                        ´
                          1 if ˛i.j   1/
             ı .j /  WD
                          0 otherwise.
                                                               3
Let I3  ¹0; : : : ; m º denote the set of j such that ˛i.j         1/
                                                                        D 1, i.j       1/ 2 arc.i.j /;
        
i.j 1/ / and i.j 1/ ¤ i.j 2/. For j … I3 , we define

                 ;j .q/ WD ˛i.0/    ˛i.j 1/ k ˛i.j1 1/    ˛i.0/
                                                                     1
                            ®
                                                                        W
                                                                    1/
                                                                                  ¯
                                k 2 arc.i.j / C ıC .j /; i.j               ı .j // ;             (3.5)

and for j 2 I3 (in which case ı .j / D 1), we define

           ;j .q/ WD ˛i.0/    ˛i.j 1/ k ˛i.j1 1/    ˛i.0/
                                                               1
                      ®
                                                                  W
                          k 2 arc.i.j / C ıC .j /; i.j 1/ ı .j //
                                                                            ¯
                                                                                        1
                          [ ˛i.0/    ˛i.j 2/ ˛i.j 1/ k ˛i.j1 1/ ˛i.j1 2/    ˛i.0/
                            ®
                                                                                           W
                                                  
                                                               ¯
                              k 2 arc.i.j 1/ ; i.j 1// :                                         (3.6)

As we shall see in the next section, the additional set of matrices in the case j 2 I3
corresponds geometrically to “adding an extra copy of P .q/” necessary to ensuring that
the fundamental domain is convex.
    We put
                                           m
                                          [
                                 .q/  WD       ;j .q/
                                                  j D0

and define the following subgroup of PSL2 .Z/:

                                       .q/ WD h .q/; i:

We shall see in the next section that (outside of one exceptional case)  .q/ is a thin
subgroup of PSL2 .Z/, meaning Zariski dense and of infinite index. Note in particular
that  .q/ is nonempty since is hyperbolic. We denote by N .q/ the Nielsen region
(or convex core) for  .q/, namely the smallest nonempty  .q/-invariant open convex
subset of H. Notice that we have a well-defined map  .q/nN .q/ ! X0 .1/ arising
from the inclusion  .q/  PSL2 .Z/. We do not, however, have a canonical map from
 .q/nN .q/ to X0 .q/. In order to define such a map, we construct a canonical fun-
damental domain for  .q/nN .q/ inside H and then consider the projection of this
to X0 .q/.
P. Humphries, A. C. Nordentoft                                                               5132


3.2.1. A fundamental domain for  .q/nN .q/. We begin by constructing an explicit
fundamental domain for  .q/nH. This allows us to define a map  .q/nN .q/ ! X0 .q/
and furthermore to study the geometry of  .q/nN .q/. There are geometrical obstacles
    3
if ˛i.m  /
           D 1 and i.m / 2 arc.i.0/; i.m / /. By conjugation, we can always arrange so
that this is not the case unless there is 3-torsion and 2 ¹˛k1 ˛k2 ; ˛k2 ˛k1 º with 1 < k1 <
k2 < N and .Lk1 ; Lk1 C1 /, .Lk2 ; Lk2 C1 / the two pairs of sides of P .q/ with order 3
labels (this follows by a quick case study recalling that e3 2 ¹0; 2º). If the discriminant
D > 0 of ˛k1 ˛k2 is fundamental, we can exclude it from our considerations by changing
the sign of the orientation r modulo 2q as in Section 2 (i.e., r 2  D .mod 4q/). Thus
we will henceforth assume that 2 0 .q/ is primitive hyperbolic and non-exceptional,
                        3
meaning that either ˛i.m    /
                              ¤ 1 or i.m / … arc.i.0/; i.m / /.
    With this in mind, let Fz .q/ be the hyperbolic polygon bounded by the following
geodesic segments:
   the complete geodesics containing

                                     Li.m / ;       Li.m / ;

   for each j 2 ¹0; : : : ; m º and each k 2 arc.i.j /; i.j      1/ /, the geodesic segment

                                       ˛i.0/    ˛i.j 1/ Lk ;

   for each j 2 I3 , as defined above equation (3.5), and each k 2 arc.i.j      1/ ; i.j    1//,
    the geodesic segment
                                   ˛i.0/    ˛i.j 2/ ˛i.j 1/ Lk :
Note that all of the geodesic segments are disjoint by the assumption that is non-
exceptional. Moreover, Fz .q/ is convex by construction. If ˛k is hyperbolic, parabolic,
or elliptic of order 2, the geodesic segment ˛i.0/    ˛i.j 1/ Lk is mapped to itself by the
corresponding element of  ;j .q/, whereas if ˛k is of order 3, the corresponding element
of  ;j .q/ maps this side to
                                   ˛i.0/    ˛i.j 1/ Lk˙1 ;
where ˙ depends on whether Lk is the left-most or right-most side in the elliptic pair of
sides.
    From the above, we define the hyperbolic polygon

                              F .q/ WD Fz .q/ \ N .q/  H;                                   (3.7)

which we shall soon see is a fundamental domain for  .q/nN .q/, and in fact that
F .q/ D Fz .q/ n int.S /, where int.S /  H denotes the interior (relative to the orient-
ation) of the axis S of (see Figures 2 and 3).
Example 3.6. It is instructive to consider the case of q D 11. The genus of X0 .11/
is g D 1, while there are no conjugacy classes in 0 .11/ of order 2 or 3, so that e2 D
e3 D 0, and consequently

                  n D 4g C e2 C e3 D 4        and     N D n C e3 C 2 D 6:
Sparse equidistribution of geometric invariants of real quadratic fields                     5133




         0                          1             1            2                        1
                                    3             2            3



                                                                                       7 2 . The
                                                                                             
Fig. 2. The fundamental polygon F .11/ associated to the hyperbolic matrix D 11            3
boundary consists of 4 semicircles as well as two incomplete arcs connected by the closed geodesic
(thick) associated to .




         0                          1             1            2                        1
                                    3             2            3



Fig. 3. The fundamental polygon F .11/ associated to the hyperbolic matrix D 107           41
                                                                                              
                                                                                     154 59 . The
boundary consists of 9 semicircles (two of which are very small) as well as two incomplete geodesic
segments connected by the closed geodesic (thick) associated to .



Figure 4 shows a special fundamental domain P .11/ given by the hyperbolic polygon
with vertices 1, 0, 31 , 12 , 23 , 1 with corresponding labels
                                                                             
                    1        1                     3 2                     4    3
    ˛1 D T 1 D                     ;    ˛2 D              ;        ˛3 D             ;
                    0 1                           11 7                    11    8
                                                                               
             1      7          2                 1        8 3                  1 1
    ˛4 D ˛2 D                        ;  ˛5 D ˛3 D                ; ˛6 D T D           :
                   11          3                         11 4                  0 1

    Figure 2 gives an example of a surface F .11/ with of reduced word length 1 in the
free generators ¹T; ˛2 ; ˛3 º (cf. [19, Figures 2 and 4]). In this case, D ˛2 1 D 11
                                                                                  7 2
                                                                                     3
is equal to the matrix Q as in (2.5) associated to the Heegner form Q D Œ 11; 10; 2 2
Q12 .11/. With r D 10, Q corresponds to the narrow ideal class J 2 ClC   12 .
P. Humphries, A. C. Nordentoft                                                               5134




        0                          1            1            2                         1
                                   3            2            3



Fig. 4. The projection onto X0 .11/ of the fundamental polygon F .11/ associated to the hyperbolic
                                                                        C
matrix D 19      10
                    
              55 29 , which corresponds to the narrow ideal class J 2 Cl92 .




    Figure 3 gives an example of a surface F .11/ with of reduced word           length 3 in
                                                        1   1   1      107   41
the free generators ¹T; ˛2 ; ˛3 º. In this case, D ˛3 ˛2 ˛3 D 154 59 . Note that the
discriminant D D 2300 D 52  92 of this hyperbolic matrix is not a fundamental discrim-
inant. The boundary consists of 9 semicircles (two of which are very small) as well as two
incomplete geodesic segments connected by the closed geodesic associated to .
    We are interested in the projections of surfaces F .11/ to X0 .11/, where corres-
ponds top an ideal class in a real quadratic number field E such that 11 splits in E. Consider
E D Q. 92/, which has narrow class number 2 and wide class number 1.Figure 4 shows
the projection of F .11/ to P .11/, where D ˛3 ˛6 ˛2 ˛3 1 ˛6 D 19           10
                                                                         55 29 is equal to the
matrix Q as in (2.5) associated to the Heegner form Q D Œ 11; 2; 2 2 Q92 .11/. With
r D 2, this corresponds to the narrow ideal class J 2 ClC     92 (cf. [19, Figure 6]).

    We now show how to use these explicit fundamental domains to extract geometric
information about the hyperbolic orbifold  .q/nN .q/.
Proposition 3.7. Let 2 0 .q/ be a (non-exceptional) primitive hyperbolic matrix such
that the axis S given by (3.3) intersects the fundamental polygon P .q/.
(1) The polygon Fz .q/ is a fundamental domain for  .q/nH.
(2) The subgroup  .q/  PSL2 .Z/ is thin.
(3) The orbifold  .q/nN .q/ has genus 0, a unique cusp, and a unique boundary com-
    ponent, which projects to the oriented closed geodesic C .1/  X0 .1/. Furthermore,
    the corresponding geodesic segment on the boundary of F .q/ projects to C .q/ 
    X0 .q/.
Sparse equidistribution of geometric invariants of real quadratic fields                     5135


(4) We have that
                                                                     2
                            vol. .q/nN .q// D j .q/j                 e3; ;                (3.8)
                                                                      3
    where e3; denotes the number of conjugacy classes of order 3 subgroups in  .q/.
    By comparing formula (3.8) to [19, (3.3)], we see that the cardinality of  .q/ plays
the role of the length `A of the minus continuous fraction in the level 1 case in [19].

Proof of Proposition 3.7. It is a simple consequence of Poincaré’s polygon theorem [51]
that Fz .q/ is a fundamental domain for  .q/nH with side pairing elements  .q/ [
¹ ; 1 º. Since the volume of Fz .q/ is infinite and  .q/ contains two hyperbolic ele-
ments with different axes (e.g., and   1 for any  2  .q/), we conclude that it is
a thin subgroup of PSL2 .Z/.
    It follows from the explicit side pairing on Fz .q/ that there is a unique cusp and
that the genus is 0. Furthermore,  .q/nH has exactly one boundary circle, namely cor-
responding on Fz .q/ to the interval of P 1 .R/ between the right-most vertex v of (the
complete geodesic containing) Li.m / and v (which is the left-most vertex of the com-
plete geodesic containing Li.m / ). Notice here that v ¤ v since is hyperbolic.
Consider the oriented geodesic C connecting the intersections between the axis S  H
of with Li.m / and Li.m / , respectively. By construction, this is freely homotopic
to the boundary circle of  .q/nH. Since there is a unique closed geodesic with this
property, we conclude that (the projection of) C is exactly the boundary component of
 .q/nN .q/. In particular, the boundary component of the fundamental domain F .q/
equals the geodesic C which projects to C .q/  X0 .q/ by construction. From this, it
also follows that the boundary component of  .q/nN .q/ projects to C .1/  X0 .1/.
    As above, denote by e2; the number of elliptic points of order 2 of  .q/nN .q/ and
by e3; the number of elliptic points of order 3. Then clearly we have that

                                    j .q/j D e2; C 2e3; :

Thus the Gauß–Bonnet theorem [19, (2.8)] gives that
                                1          2                                  2
          vol. .q/nN .q// D 2 e2; C e3; D j .q/j                               e3; ;
                                   2        3                                    3
as desired.

    For    D    Q associated to a Heegner form Q 2 QD .q/, we write

Q .q/ WD  Q .q/;      FQ .q/ WD F Q .q/;       Q;j .q/ WD  Q ;j .q/;        Q .q/ WD  Q .q/:

Notice that different choices of 0 .q/-equivalent Heegner forms Q 2 QD .q/ (all corres-
                                               C
ponding to the same narrow ideal class A 2 ClD   ) give rise to subgroups Q .q/ of PSL2 .Z/
that are 0 .q/-conjugates; furthermore, the projection of FQ .q/ to X0 .q/ is independent
                          C
of this choice. For A 2 ClD , we denote by A .q/nNA .q/ any such orbifold Q .q/nNQ .q/
and by A .q/ and FA .q/ the corresponding set of matrices and fundamental domain.
P. Humphries, A. C. Nordentoft                                                         5136


As we are interested in the projection of FA .q/ to X0 .q/, we may use this abuse of nota-
tion with impunity.
Remark 3.8. Recall that Q D Œa; b; c 2 QD .q/ is such that .a; b; c/ D 1, a  0 .mod q/,
and b  r .mod 2q/, where r is a fixed choice of residue class modulo 2q for which
r 2  D .mod 4q/. As q is prime, there are two such possible choices of r .mod 2q/.
Thus there are two closed geodesics, and hence two hyperbolic orbifolds, associated to
                                 C
each narrow ideal class A 2 ClD    : one to each choice of r. By fixing r, we are thereby
fixing a choice of one of these two closed geodesics and one of these two hyperbolic
orbifolds associated to A. Since we regard r as being fixed, we suppress from the notation
the dependence of A .q/nNA .q/ and of FA .q/ on r.

3.2.2. A lower bound for the volume. In this section, we use formula (3.8) to obtain
a lower bound for the hyperbolic volume of FA .q/. In the level 1 setting, this was obtained
in [19] by relating the volume to minus continued fractions and using some explicit rela-
tions to the regulator log D , while in [55, Section 5.1], such a lower bound was obtained
using geometric considerations relying on equidistribution of the closed geodesics. In the
level q setting, on the other hand, such routes do not seem to be readily available. We in-
stead use a group-theoretic approach.
    For 2 0 .q/, let wl. / denote the word length of in the independent generators
defined from P .q/, namely the labels ˛1 ; : : : ; ˛N (forgetting inverses). Given a Heegner
form Q 2 QD .q/ with associated hyperbolic matrix Q , we first observe that the entries
of Q are bounded by q O.wl. Q // since the Frobenius norms of the labels ˛j are O.q/.
In particular, we have that

                                   Tr. Q /  q O.wl. Q // ;

which implies that
                                         log Tr. Q /   log D
                            wl. Q /                         :
                                            log q       log q
This is close to what we want. Alas, a lower bound for the word length does not quite give
a lower bound for jQ .q/j in general. For a generic hyperbolic matrix 2 0 .q/ of word
length tending to infinity, it is not hard to see that in fact j .q/j  q wl. /. Thus one
                                         C                                      C
might hope that for subgroups H  ClD      of sufficiently small index (say, ŒClD W H   Dı
for some small ı > 0), one has that
                               X
                                    vol.FA .q//  qjH j log D
                            A2CH
                     C
for any coset CH  ClD (cf. [19, Proposition 1]). We make progress towards by showing
the following.
                           C
Proposition 3.9. For A 2 ClD , we have that
                                                   log D
                                 vol.FA .q//             :                            (3.9)
                                                   log qD
Sparse equidistribution of geometric invariants of real quadratic fields                             5137

                                                                                    C
Proof. Let Q2QD .q/ be a Heegner form corresponding to the narrow ideal class A 2 ClD
with corresponding hyperbolic matrix Q 2 0 .q/ such that its axis SQ  H (i.e., the
infinite geodesic fixed by Q ) intersects P .q/. We start by bounding the word length
wl. Q / in terms of D. Recall from [46] that the special fundamental polygon P .q/ is
tiled by
                          °                               1±
                            z 2 H W jzj  1; 0  Re.z/ <     :                  (3.10)
                                                          2
The word length wl. Q / of Q with respect to the independent generators of 0 .q/
defined from P .q/ (forgetting inverses) is precisely the number of intersections between
the geodesic CA .q/ from zQ to Q zQ and the 0 .q/-translates of P .q/ and thus is
bounded by the number of intersections with (3.10). We shall now relate this intersec-
tion number to continued fractions.
     Consider the tessellation of H by the Farey triangle 4Far with vertices ¹0; 1; 1º.
Note that 4Far is tiled by six copies of triangle (3.10). As explained in [60, Theorem A
and Corollary 3.3.5], the left-right cutting sequence of the axis SQ of Q with respect
to this tessellation is periodic with period a1 C    C a`0 , where Œb0 ; : : : ; br ; a1 ; : : : ; a`0 
is the continued fraction expansion of the attracting endpoint of SQ , which is eventually
                         0
       p with period ` . Consider the fundamental domain F0 for PSL2 .Z/ with vertices
periodic
    1C     3
¹0; 2 ; 1º and side pairing elements ¹S; T S; S T 1 º. Note that 4Far is tiled by three
copies of F0 such that all the sides of 4Far correspond to the side of F0 containing 0
and 1 with label S . Furthermore, a “left” (resp. “right”) in the cutting sequence corres-
ponds, in terms of F0 , to the label S followed by either the label T S or twice its inverse
(resp. S T 1 or twice its inverse). Since .S T 1 /2 D T S , we conclude that the cutting
sequence uniquely determines the representation of Q 2 PSL2 .Z/ in terms of the inde-
pendent generators S , T S of PSL2 .Z/ of order two and three, respectively. In particular,
the minimal period of the cutting sequence of SQ is at most a third of the length of the
Morse code of Q with respect to F0 . Since F0 is tiled by two copies of triangle (3.10),
we conclude that
                                                                         3
                           wl. Q /  6.a1 C    C a`0 /  D 2                  (3.11)
                                     p
using the elementary bounds ai  D and `0  D, which follow from the classical
algorithm for continued fractions as described in [34].
    Let 0 < j.1/ <    < j.`/ < m C 1 be the nonzero indices in the Morse code (3.4)
of Q for which Q;j.k/ .q/ D ; with Q;j .q/ D  Q ;j .q/ as defined in (3.5) and (3.6).
Put j.0/ D 0 and j.` C 1/ D m C 1. We now argue that for all 0  k  `, the product

                                   ˇk WD ˛i.j.k//    ˛i.j.kC1/ 1/

can be written as ˛h ˛ t .h/    ˛ t .m/ .h/ for some h 2 Z=N Z and m  0. Assume first that
e3 D 0. Then Q;j .q/ D ; means exactly that i.j / D i.j 1/ 1 D t .i.j 1// and
the claim follows. In the presence of 3-torsion, Q;j .q/ D ; implies that

                            arc.i.j /; i.j     1/ /  ¹i.j      1/; i.j / º:
P. Humphries, A. C. Nordentoft                                                           5138


We need to consider the four possible geometric configurations corresponding to the
nonempty subsets of ¹i.j 1/; i.j / º. If arc.i.j /; i.j 1/ / D ;, we get as above
that i.j / D t .i.j 1//. Next, assume that arc.i.j /; i.j 1/ / D ¹i.j 1/º. Then since
                                 3
Q;j .q/ D ;, we conclude that ˛i.j  1/
                                        D 1, i.j 1/ < i.j 1/ and i.j / D i.j 1/ 1.
Furthermore, since j … I3 , we must that i.j 2/ D i.j 1/, implying that i.j 1/ D
t .i.j 2//. Since we have ˛i.j 2/ ˛i.j 1/ D ˛i.j 1/ , i.j 2/ 2 arc.i.j 2/; i.j 3/ /,
and i.j / D .i.j 1/ / 1 D t .i.j 1/ /, we see that we can alter the Morse code
to get the desired shape. The two final cases can be treated similarly, which yields the
claim.
     We conclude by Lemma 3.4 that we may write

                                      Q D ˇ0 ˇ1    ˇ` ;

where for all 0  k  ` either
(1) ˇk D ˛j is a label of P .q/, in which case the Frobenius norm is bounded by O.q/;
(2) ˇk D T n for some n 2 Z, in which case the Frobenius norm is bounded by O.jnj/;
    or
(3) we have that
                                                            n
                                                1       1   0
                                   ˇk D    j1                   j2 ;
                                                        q   1
    for some j1 ; j2 2 ¹1; : : : ; 4g C e2 C e3 C 1º (with ji defined as in (3.1)) and n 2 Z,
                                                             3          3
    in which case the Frobenius norm is bounded by O.q 2  qjnj  q 2 / via Lemma 3.5.
   Now clearly the power n of the parabolic elements appearing in ˇk satisfies
                                                                   3
                             jnj  wl.ˇk /  wl. Q /  D 2 ;

using bound (3.11). Thus the entries of    Q are bounded by

                                        q O.`/ D O.`/ :

By computing the trace, we see that
                                             log D
                                       `           :
                                             log qD
                                             jQ .q/j
Since trivially jQ .q/j  ` and e3; Q         2
                                                      , Proposition 3.7 gives the desired res-
ult.

Remark 3.10. If we consider an arbitrary special polygon P .q/ instead of the one con-
                                                                 p
structed based on Theorem 3.2, then in place of the bound bi  q for the denominators
in the Farey sequence of level q, we would only have that bi  e O.q/ . The above argument
yields in this case the weaker lower bound
                                                              log D
                            vol.Q .q/nNQ .q//                       :
                                                            q C log D
Sparse equidistribution of geometric invariants of real quadratic fields               5139


Remark 3.11. To prove a polynomial bound for wl. Q /, one might instead use the bound
wl. Q /  mA C `A , where mA is as in [19, (2.1)]. Via the identity mA D 2`A C `AJ [20,
(46) and (49)], this reduces the problem to bounding `A in terms of D. It is claimed in
[19, p. 968] that one can apply a general argument of Eichler [21] to show that `A  log D
                        C
uniformly for A 2 ClD     , which would yield the desired result. Unfortunately, however,
Eichler’s argument does not apply directly: Eichler’s result gives a method for determining
upper bounds for the word length of the geometric code of a closed geodesic (in the sense
of [43]), whereas `A is the word length of the arithmetic code of a closed geodesic (in the
sense of [43]), and in general these need not coincide [43, Theorem 1].


4. Adèlisation of Maaß cusp forms

We review some standard notions about Maaß cusp forms of weight k, level q, and
principal nebentypus, with an emphasis on forms of weight 0 and the action of raising
and lowering operators on such forms. We then describe the relation between such clas-
sical automorphic forms and adèlic automorphic forms, highlighting the correspondence
between Whittaker functions of representations of GL2 .R/ and GL2 .Qp /, the Whittaker
expansion of an adèlic automorphic form, and the Fourier expansion of a classical auto-
morphic form. This explicit correspondence is invaluable in Section 6, where we prove an
identity between integrals of Maaß forms over hyperbolic orbifolds and period integrals
of adèlic automorphic forms. Useful references for this material include [18, Section 4],
[27, Chapters 3 and 4], [58, 59].


4.1. Maaß cusp forms
Let k be an integer, q be a positive integer, and denote by Ck .0 .q// the vector sub-
space of L2 .0 .q/nH/ spanned by Maaß cusp forms of weight k, level q, and principal
nebentypus, in the sense of [18, Section 4]. Such a Maaß cusp form is a real analytic
function f W H ! C for which
   f is an eigenfunction of the weight k Laplacian
                                               @2         @2         @
                               k D      y2         2
                                                      C      2
                                                                C i ky ;
                                               @x         @y          @x

    so that k f .z/ D f f .z/ for some f 2 C (and necessarily f 2 Œ 14       7 2
                                                                               . 64 / ; 1/),
   f is automorphic, so that
                                    j .z/ k f . z/ D f .z/
    for all z 2 H and 2 0 .q/, where for g D ac db 2 GLC
                                                         
                                                           2 .R/, the space of 2  2
    matrices with real entries and positive determinant,
                                       az C b                     cz C d
                               gz WD          ;      jg .z/ WD             ;           (4.1)
                                       cz C d                    jcz C d j
P. Humphries, A. C. Nordentoft                                                                 5140


   f is of moderate growth, and
   f is cuspidal, so that for each cusp b of 0 .q/nH,
                                  Z 1
                                      jb .z/ k f .b z/ dx D 0
                                    0

    for all y > 0, where b 2 SL2 .R/ is a scaling matrix for b.

4.1.1. The Fourier expansion and Hecke eigenvalues of a Maaß cusp form. The Fourier
expansion at the cusp at infinity of a weight 0 Maaß cusp form f 2 C0 .0 .q// is
                                    1
                                    X
                        f .z/ D             f .n/W0;i tf .4jnjy/e.nx/;                       (4.2)
                                   nD 1
                                    n¤0
                                                                       7   7
where W˛;ˇ denotes the classical Whittaker function and tf 2 R [ i Œ 64  ; 64  is the spec-
                                    1     2
tral parameter of f , so that f D 4 C tf . If f is additionally a Hecke–Maaß newform,
namely an eigenfunction of the n-th Hecke operator Tn for all n 2 N as well as the
reflection operator X W C0 .0 .q// ! C0 .0 .q// given by .Xf /.z/ WD f . zx/, the Four-
ier coefficients f .n/ and Hecke eigenvalues f .n/ of f satisfy
                     p
 f .1/f .n/ D nf .n/ for n 2 N,
   f .n/ D f f . n/ for n 2 Z, where f 2 ¹1; 1º is the parity of f , so that Xf D f f ,
   for all m; n 2 N, the Hecke eigenvalues satisfy the multiplicativity relations
                          X        mn                   X              m  n 
        f .m/f .n/ D         f     2
                                        ; f .mn/ D             .d /f        f    ;
                                    d                                      d       d
                        d j.m;n/                                   d j.m;n/
                        .d;q/D1                                    .d;q/D1
                                                                       7                 7
   for each p − q, there exists ˛f .q/ 2 C satisfying p 64  j˛f .q/j  p 64 such that for
    all r  1,
                                          Xr
                                    r
                              f .p / D       ˛f .q/m ˛f 1 .q/r m ;                  (4.3)
                                              mD0
   for each p k q, there exists ˛f .q/ 2 ¹1; 1º such that for all r  1,
                                                         ˛f .q/r
                                           f .p r / D      r      ;                           (4.4)
                                                          p2
   for each prime p for which p 2 j q, we have that f .p r / D 0 for all r  1.
Furthermore, if f 2 C0 .0 .q// is a Hecke–Maaß newform and q is squarefree, then
the L2 -norm of f and the first Fourier coefficient f .1/ of f satisfy the relation [38,
Lemma 4.6]
                                              2qjf .1/j2 L.1; ad f /
                  Z
                            jf .z/j2 d.z/ D                          :             (4.5)
                   0 .q/nH                          cosh  tf
Here we note that the measure d.z/ D y 2 dx dy is such that
                                                                             Y         1
           vol.0 .q/nH/ D         .q/;      .q/ WD Œ W 0 .q/ D q              1C     :   (4.6)
                                 3                                                       p
                                                                              pjq
Sparse equidistribution of geometric invariants of real quadratic fields                                5141


4.1.2. Raising and lowering operators. The weight k raising operator
                           k            @    k       @        @ 
                     Rk WD C .z zx/       D C iy            i
                           2           @z    2        @x      @y
acts on Ck .0 .q// and raises the weight by 2; that is, its image lies in CkC2 .0 .q//.
Similarly, the weight k lowering operator
                            k             @     k        @       @ 
                   Lk WD         .z zx/     D        iy       Ci
                            2           @xz     2         @x     @y
maps Ck .0 .q// to Ck 2 .0 .q//. From [27, Proposition 3.9.13], if f 2 C0 .0 .q// is
a Hecke–Maaß newform of weight 0 and level q with Fourier expansion (4.2), then the
Fourier expansion of the weight k Maaß cusp form Fk 2 Ck .0 .q// defined by
                               8
                               <Rk 2    R0 f if k 2 2N,
                               ˆ
                         Fk WD f                 if k D 0,                        (4.7)
                               ˆ
                                 LkC2    L0 f if k 2 2N,
                               :

is given by
                                                                        1
              . kC1
                  2
                     C i tf /. kC1
                                 2
                                               i tf /                  X   f .jnj/
 Fk .z/ D                                               f f .1/                   W k ;i tf .4jnjy/e.nx/
                  . 12 C i tf /. 12
                                                                            p
                                           i tf /                     nD 1     jnj    2

                                1
                         k      X   f .n/
            C . 1/ 2 f .1/          p W k ;i tf .4 ny/e.nx/                                           (4.8)
                                nD1
                                        n  2



if k 2 2N [ ¹0º, while if k 2           2N, the Fourier expansion is
                                    1
                     k             X   f .jnj/
  Fk .z/ D . 1/ 2 f f .1/             p       W k ;i tf .4jnjy/e.nx/
                                  nD 1     jnj    2

                                                                       1
                  . 1 2 k C i tf /. 1 2 k         i tf /            X   f .n/
              C                                              f .1/        p W k ;i tf .4 ny/e.nx/:    (4.9)
                     . 21 C i tf /. 12       i tf /                 nD1
                                                                              n  2




4.1.3. Atkin–Lehner operators. Let q be squarefree. For each divisor q1 of q, such that
q D q1 q2 , we define an Atkin–Lehner operator Wq1 2 SL2 .R/ as in (2.7), namely
                                         p            !
                                        a q1      pb
                                                   q1
                              Wq1 WD      p       p      ;
                                       cq2 q1 d q1

where a; b; c; d 2 Z are such that adq1 bcq2 D 1. If f 2 Ck .0 .q// is a Hecke–Maaß
newform, then it is an eigenfunction of each Atkin–Lehner operator, in the sense that there
exists some constant f .q1 / 2 ¹1; 1º, dependent on f and q1 but not on a, b, c, d , such
that
                            jWq1 .z/ k f .Wq1 z/ D f .q1 /f .z/
for all z 2 H, where jg .z/ is as in (4.1).
P. Humphries, A. C. Nordentoft                                                                   5142


4.2. Eisenstein series
We recall that the Eisenstein series E.z; s/ for nH is given for Re.s/ > 1 by the abso-
lutely convergent series                     X
                               E.z; s/ WD         Im. z/s ;
                                                    21 n

                    1n
                          
where 1 WD ¹˙      0 1   W n 2 Zº is the stabiliser of the cusp at infinity. The Eisenstein series
                                                                                        1
extends meromorphically to C with a simple pole at s D 1 with residue vol.nH/                , inde-
pendently of z. It is an eigenfunction of the weight 0 Laplacian with eigenvalue s.1 s/
and is automorphic and of moderate growth, but it is not cuspidal.
    For s D 12 C i t , the Laplacian eigenvalue of E.z; 12 C i t / is 14 C t 2 , the parity is  D 1,
while the Fourier coefficients .n; t / and Hecke eigenvalues .n; t / satisfy
                        p
 .1; t /.n; t / D n.n; t / for n 2 N,
   .n; t / D . n; t / for n 2 Z,
   for all m; n 2 N, the Hecke eigenvalues satisfy the multiplicativity relations
                          X  mn                         X             m   n 
      .m; t /.n; t / D       2 ; t ; .mn; t / D              .d /      ;t  ;t ;
                                  d                                       d        d
                              d j.m;n/                                 d j.m;n/

   for all n 2 N, the Hecke eigenvalues are given explicitly by
                                              X
                                  .n; t / D      ai t b i t ;
                                                          abDn

   the first Fourier coefficient is given explicitly by
                                                              1
                                             .1; t / D                ;
                                                          .1 C 2i t /
                          s
    where .s/ WD        2   . 2s /.s/.
    The weight 0 raising and lowering operators act on E.; 12 C i t / and raise and lower
the weight by 2. The Fourier expansion of E.z; 12 C i t / reads
      1                                         1
                  1        .1 2i t / 1 i t    X
    E z; C i t D y 2 Ci t C              y2  C      .n; t /W0;i tf .4jnjy/e.nx/
        2                   .1 C 2i t /       nD 1
                                                                 n¤0
                          1    .1 2i t / 1 i t
                    D y 2 Ci t C           y2
                              .1 C 2i t /
                                       1
                            1         X    .jnj; t /
                      C                     p         W0;i tf .4jnjy/e.nx/;                    (4.10)
                        .1 C 2i t / nD 1      jnj
                                             n¤0

while the Fourier expansion of the weight 2 Eisenstein series .R0 E/.z; 21 C i t / is given by
               1       1       1         1                            .1  2i t / 1 i t
        .R0 E/ z; C i t D   C i t y 2 Ci t C                         it                 y2
                 2        2                   2                            .1 C 2i t /
Sparse equidistribution of geometric invariants of real quadratic fields                   5143

                                                    1
                                      . 14 C t 2 / X   .jnj; t /
                                 C                      p         W 1;i t .4jnjy/e.nx/
                                     .1 C 2i t / nD 1     jnj
                                                   1
                                         1        X   .n; t /
                                                       p W1;i tf .4 ny/e.nx/:            (4.11)
                                     .1 C 2i t / nD1    n

We additionally define

           e    1
                   2
                                1
       .R0 E/ z; C i t WD .R0 E/ z; C it
                                     2
                                            1
                                                   2
                                                                 1
                                                     C i t Im.z/ 2 Ci t
                            1        .1 2i t /         1
                                  it                Im.z/ 2 i t :                         (4.12)
                              2        .1 C 2i t /
This is square-integrable but no longer automorphic.
   Finally, we record here the following useful result concerning the behaviour of an
Eisenstein series at a cusp.
Lemma 4.1. Let q be squarefree. For a cusp b of 0 .q/nH with scaling matrix b 2
0 .q/ and for ` j q, we have that
                         @ ˇˇ               1           1
                                   E b .`z/; C i t q;t p :
                        @z zDxCiY            2
                            ˇ
                                                           Y
Proof. We begin by noting that E.`z; 12 C i t / may be written as a finite linear com-
bination of Eisenstein series Ea .z; 12 C i t / associated to cusps a of 0 .q/nH [65, The-
orem 7.1]. From [40, (6.18)], the Fourier expansion of Ea .b z; 12 C i t / is of the form
                       1              1
                                                      1         1
                Ea b z; C i t D ıa;b y 2 Ci t C 'a;b     C i t y 2 it
                        2            X                  2
                                C          a;b .n; t /W0;i t .4jnjy/e.nx/;              (4.13)
                                           nD 1
                                            n¤0

where 'a;b .s/ is an entry of the scattering matrix, while the Fourier coefficients a;b .n; t /
grow at most polynomially in jnj. The desired result now follows by differentiating term
by term.


4.3. Adèlic automorphic forms
4.3.1. The adèlic lift of a Maaß cusp form. Following [27, Sections 4.11 and 4.12], we
describe the adèlic lift of a Maaß cusp form f 2 Ck .0 .q//. We first lift f 2 Ck .0 .q//
to a function fzW GLC2 .R/ ! C defined via

                                     fz.g/ WD jg .i / k f .gi /:                          (4.14)

For all g 2 GLC
              2 .R/ and  2 Œ0; 2/, this satisfies
                                             
                        z       cos     sin 
                       f g                          D e i k fz.g/:
                                 sin  cos 
P. Humphries, A. C. Nordentoft                                                         5144


     Next, we lift fz to an adèlic automorphic form  D f on GL2 .AQ /, where AQ
denotes the ring of adèles of Q. To describe this lift, we first let K0 .q/ 3 k D .k1 ; k2 ;
k3 ; k5 ; : : :/ denote the congruence subgroup of GL2 .AQ / of the form
                      ²                                           
                                                           ap bp
          K0 .q/ WD k 2 GL2 .AQ / W k1 D 12 ; kp D                    2 GL2 .Zp /
                                                           cp dp
                                                                   ³
                                        with cp 2 p r Zp if p r k q :               (4.15)

Here 12 denotes the 2  2 identity matrix. We view GLC       2 .R/ 3 g1 as a subgroup of
GL2 .AQ / via the embedding g1 7! .g1 ; 12 ; 12 ; : : :/. Finally, we view GL2 .Q/ 3 as
a subgroup of GL2 .AQ / via the diagonal embedding 7! . ; ; ; : : :/. Then via the strong
approximation theorem,

                           GL2 .AQ / D GL2 .Q/ GLC
                                                 2 .R/K0 .q/;                        (4.16)

so that every g 2 GL2 .AQ / can be written (non-uniquely) as g D g1 k for some 2
GL2 .Q/, g1 2 GLC   2 .R/, and k 2 K0 .q/. The adèlic lift  D f of a Maaß cusp form
f 2 Ck .0 .q// is then given by

                                 .g/ D . g1 k/ WD fz.g1 /:                         (4.17)

This is well defined even though the decomposition g D g1 k is not unique. In particular,

                                        .g/ D f .x C iy/                            (4.18)
                  y x
for g D g1 D      0 1    2 GLC
                             2 .R/  GL2 .AQ / with y > 0 and x 2 R.


4.3.2. The Whittaker expansion of an adèlic automorphic form. Let W QnAQ ! C be
the standard adèlic additive character defined as in [27, Definition 1.7.1], such that .u/ D
          Q
  1 .u1 / p p .up / for u D .u1 ; u2 ; u3 ; : : :/ 2 AQ with 1 W R ! C the additive char-
acter 1 .u1 / WD e.u1 / WD e 2 i u1 and p W Qp ! C the standard unramified additive
character defined in [27, Definition 1.6.3]. The Whittaker function W W GL2 .AQ / ! C
of a cuspidal adèlic automorphic form  is
                                   Z                  
                                                  1 u
                        W .g/ WD                       g x .u/ du;
                                    QnAQ          0 1

which satisfies                               
                                        1    u
                              W                g D   .u/W .g/                      (4.19)
                                        0    1
for all u 2 AQ and g 2 GL2 .AQ /. The automorphic form  has the Whittaker expansion
                                                   
                                    X          ˛ 0
                          .g/ D         W          g :                      (4.20)
                                       
                                               0 1
                                            ˛2Q
Sparse equidistribution of geometric invariants of real quadratic fields                    5145


4.3.3. The Whittaker expansion of an adèlic lift. Let  D Fk be the adèlic lift of a Maaß
cusp form Fk 2 Ck .0 .q// of weight k associated via raising or lowering operators
to a Hecke–Maaß newform f 2 C0 .0 .q// of weight 0 as in (4.7). Then  is a pure
tensor lying in the vector space of a cuspidal automorphic representation  D f D
       N
1 ˝ p p of GL2 .AQ /, where each p is a generic irreducible admissible unitary
representation of GL2 .Qp / and 1 is a generic irreducible unitary Casselman–Wallach
representation of GL2 .R/. In particular, for g D .g1 ; g2 ; g3 ; : : :/ 2 GL2 .AQ /, we have
the factorisation
                                                  Y
                           W .g/ D c W1 .g1 /       Wp .gp /;                        (4.21)
                                                         p

where c is a constant independent of g, each Wp is a Whittaker function in the Whittaker
model W .p ; p / of p , and similarly W1 2 W .1 ; 1 /.
   We show in Lemma 4.2 that the Whittaker functions Wp are such that for ˛ 2 Q ,
                                      8
                                         .jnj/
                                    < fp
                                      ˆ           if ˛ D n 2 Z n ¹0º,
                  Y         ˛ 0
                      Wp           D        jnj
                   p
                            0 1       ˆ
                                        0         otherwise.
                                      :

In Lemma 4.3, we show that for n 2 Z n ¹0º and y > 0,
              8       k
              ˆ
              ˆ . 1/ 2 W k ;i t .4 ny/;                                   n 2 N; k 2 2N [¹0º;
              ˆ
              ˆ            2
                       kC1
                             C i t /. kC1
              ˆ
                   .                         it/
              ˆ
              ˆ
              ˆ         2                2
            ˆ
              ˆ
                 f        1            1
                                                  W k ;i t .4jnjy/;       n 2 N; k 2 2N [¹0º;
                      . 2 C i t /. 2 i t /
             ˆ                                          2
      ny 0
              <
W1          D
       0 1    ˆ
              ˆ . 1 2 k C i t /. 1 2 k i t /
              ˆ
              ˆ                                W k ;i t .4 ny/;           n 2 N; k 2     2N;
                   . 12 C i t /. 12 i t /
              ˆ
              ˆ                                  2
              ˆ
              ˆ
              ˆ
              : . 1/ k2 W k .4jnjy/;
              ˆ
                                                                           n2   N; k 2     2N:
              ˆ
                 f                ;i t
                                   2


From this, we see that the constant c in (4.21) is equal to f .1/ by taking g D g1 D
 y x        C
 0 1 2 GL2 .R/  GL2 .AQ / with y > 0 and x 2 R in (4.20), so that by (4.18) and (4.19),
                                                                            
                                         X              ˛y   0 Y      ˛      0
          Fk .x C iy/ D .g/ D c              W1                Wp              e.˛x/;
                                                         0   1 p      0      1
                                        ˛2Q

and comparing this adèlic Whittaker expansion to the classical Fourier expansion at the
cusp at infinity (4.8) and (4.9).

4.3.4. Nonarchimedean Whittaker functions. Let  D Fk be the adèlic lift of a Maaß
cusp form Fk 2 Ck .0 .q// associated to a Hecke–Maaß newform f 2 C0 .0 .q// as in
definition (4.7) with q squarefree. For each prime p, the local Whittaker functions Wp 2
W .p ; p / are of a distinguished form. One    can explicitly describe the values of the
Whittaker function Wp .gp / for gp D a0 10 with a 2 Qp ; see [59, Section 2.4].
                                           
P. Humphries, A. C. Nordentoft                                                          5146


Lemma 4.2. (1) For p − q, the representation p is a spherical principal series repres-
                                                                                      7
   entation !p  !p 1 , where !p is an unramified character of Qp satisfying p 64 
                  7
   j!p .q/jp  p 64 and j  jp denotes the p-adic absolute value normalised such that
   jpjp D p 1 . This character is such that !p .q/ is equal to ˛f .q/ as in (4.3). For
   a 2 Qp , let v.a/ 2 Z be such that jajp D p v.a/ . There is a distinguished Whit-
   taker function, the spherical Whittaker function, that is right GL2 .Zp /-invariant and
   satisfies
                   8
                     v.a/
                                                     1
               ˆ    X
                          !p .q/m !p 1 .q/v.a/ m jajp2 if 0 < jajp  1, so that v.a/  0,
                  ˆ
         a 0
                   <
   Wp           D mD0
         0 1       ˆ
                   ˆ
                     0                                 if jajp  p, so that v.a/  1.
                   :

(2) For p j q, the representation p is a special representation !p Stp , where !p is an
    unramified unitary character of Qp , so that !p .q/ 2 ¹1; 1º. This character is such
    that !p .q/ is equal to ˛f .q/ as in (4.4). There is a distinguished Whittaker func-
    tion, the Whittaker newform, that is right-invariant  under the congruence subgroup
    of GL2 .Zp / consisting of elements ac db for which c 2 pZp and satisfies
                                             

                          ´
                                 !p .a/jajp if 0 < jajp  1, so that v.a/  0,
                  
                    a 0
              Wp            D
                    0 1          0           if jajp  p, so that v.a/  1.

4.3.5. Archimedean Whittaker functions. Let  D Fk be the adèlic lift of a Maaß cusp
form Fk 2 Ck .0 .q// associated to a Hecke–Maaß newform f 2 C0 .0 .q// as in (4.7).
The local Whittaker function
                                       k
                                 W1 D W1 2 W .1 ;       1/

is again of a distinguished form. Since f has weight 0, the representation 1 is a principal
series representation of the form sgn j  ji1t  sgn j  j1i t with
                                                                  h 7 7i
                      D f 2 ¹0; 1º and t D tf 2 R [ i                 ;
                                                                      64 64
such that . 1/f D f is the parity of f and tf is the spectral parameter of f , so that
1
4
   C tf2 D f is the Laplacian eigenvalue of f . Here j  j1 D j  j is the usual archimedean
absolute value on R.
    The following claims are essentially implicit (albeit with some typographical errors)
in the seminal work of Jacquet and Langlands [42, Section 2.5], as further detailed by
Godement [26, Sections 2.3–2.6]; see also [58]. For the sake of completeness, we give
explicit proofs.
                                                                                 k
Lemma 4.3. (1) For each k 2 2Z, there exists a distinguished Whittaker function W1  2
                                     it            it
   W .1 ; 1 /, where 1 D sgn j  j1  sgn j  j1 , that is of weight k, so that for
   all g1 2 GL2 .R/ and  2 Œ0; 2/, it satisfies
                                              
                      k         cos      sin 
                    W1 g1                                    k
                                                   D e i k W1 .g1 /:
                                 sin  cos 
Sparse equidistribution of geometric invariants of real quadratic fields               5147


(2) For all a 2 R , this distinguished Whittaker function satisfies
                      8        k
                      ˆ. 1/ 2 W k ;i t .4a/;
                      ˆ                                        a > 0; k 2 2N [ ¹0º;
                      ˆ
                      ˆ            2
                      ˆ
                                 . kC1    C i t /. kC1   it/
                      ˆ
                      ˆ
                                     2                2
                      ˆ
                        .   1/
                      ˆ
                      ˆ
                      ˆ                  1           1
                      ˆ
                      ˆ
                      ˆ            . 2 C i t /. 2 i t /
                      ˆ
                ˆ   ˆ        W k ;i t .4jaj/;              a < 0; k 2 2N [ ¹0º;
        k a 0
                      <
                                     2
     W1           D                                                                 (4.22)
            0 1       ˆ  . 1 k
                                  C  i t /.   1 k
                                                     i t /
                      ˆ
                      ˆ
                      ˆ       2                 2
                            . 12 C i t /. 12 i t /
                      ˆ
                      ˆ
                      ˆ
                      ˆ
                      ˆ
                               W k ;i t .4a/;                a > 0; k 2 2N;
                      ˆ
                      ˆ
                      ˆ
                                   2
                      ˆ
                      ˆ
                      ˆ
                      :. 1/C k2 W k .4jaj/;
                      ˆ
                                                               a < 0; k 2 2N:
                      ˆ
                                          2;i t

(3) For    0
                2 ¹0; 1º and Re.s/  21 , we have that
       Z             
                 20       a
                          0        1
                W1    sgn .a/jajs 2 d  a
         R       1       0
            8        s C 1 C it  s C 1 it 
            < 2 s 
            ˆ                                 if    0 C 1 .mod 2/;
          D                2              2                                         (4.23)
            : 1 s  s s C it  s it
                                         
                                               if    0 .mod 2/;
            ˆ
              2               2           2
    where d  a WD jaj 1 da denotes the multiplicative Haar measure on R .
(4) We have that
           Z ˇ                    ˇ2      1      1      1
                ˇ 2 a            0 ˇˇ                                       
                ˇW
                ˇ 1 0                  d aD    C t2    C it              it :      (4.24)
                 R              1  ˇ        4        2        2

Proof. (1) Let 1 D sgn j  jt1 1
                                     sgn j  jt1
                                                 2
                                                   be a principal series representation with
 2 ¹0; 1º and t1 ; t2 2 C. We initially assume that Re.t1 / > Re.t2 /. For each k 2 2Z and
.x1 ; x2 / 2 R2 , let
                                                              2   2
                 ˆk .x1 ; x2 / WD .x2 sgn.k/ix1 /jkj e .x1 Cx2 /
                                  8
                                  <.x2 ix1 /k e .x12 Cx22 /   if k 2 2N [ ¹0º,
                                D                      2    2
                                  :.x C ix / k e .x1 Cx2 / if k 2 2N.
                                      2       1

                             k
Define the Godement section '1 W GL2 .R/ ! C by
                                                Z
                jkj                           1
    k                                   t1 C 2
   '1 .g1 / WD  sgn .det g1 /jdet g1 j
                 2                                jyjt2 t1 1 ˆk ..0; y 1 /g1 / d  y:
                                                         R

This Godement section converges absolutely and defines an element of the induced model
of 1 of weight k; that is,
                           
            k     a b                            1                 1
           '1               g1 D sgn .a/jajt1 C 2 sgn .d /jd jt2 2 '1
                                                                      k
                                                                        .g1 /;   (4.25)
                  0 d
P. Humphries, A. C. Nordentoft                                                                      5148


and
                                                              
                         k                   cos       sin 
                        '1       g1                                            k
                                                                     D e i k '1 .g1 /             (4.26)
                                              sin      cos 
for all a; d 2 R , b 2 R, g1 2 GL2 .R/, and  2 Œ0; 2/. Taking g1 to be the identity,
we have the normalisation
                                              1 C jkj C t
                      k   1 0        1Ct1 t2
                                                            1  t2 
                     '1         D      2                          :           (4.27)
                          0 1                            2
The Jacquet integral
                                     Z                      
                  k                           k     0   u  1  1
                 W1 .g1 / WD                 '1              g1 e. u/ du                           (4.28)
                                R                   1   1 0   0
                                                                 Z
                                jkj                            1
                             D  2 sgn .det g1 /jdet g1 jt1 C 2     jyjt2 t1
                                                                  R
                                 Z
                                      k      1           2 iyu
                                   ˆ ..y ; u/g1 /e              du d  y                          (4.29)
                                             R

converges absolutely and defines an element of the Whittaker model W .1 ; 1 / of 1
of weight k. By the Iwasawa decomposition, every g1 2 GL2 .R/ can be written in the
form                                                         
                           z 0     1 x      a 0      cos     sin 
                  g1 D
                           0 z     0 1      0 1        sin  cos 
with x 2 R, a; z 2 R , and  2 Œ0; 2/. From (4.25), (4.26), and the change of variables
u 7! u x, we see that for this value of g1 ,
                                                               
                         k                               k a 0
                     W1    .g1 / D jzjt1 Ct2 e.x/e i k W1        :
                                                             0 1
                                 k
The Whittaker function W1           extends holomorphically as a function of the complex vari-
                                                               7 7
ables t1 ; t2 2 C to .t1 ; t2 / D .i t; i t / with t 2 R [ i Œ 64 ; 64 . This holomorphic extension
defines a weight k element of the Whittaker model W .1 ; 1 / of 1 D sgn j  ji1t 
sgn j  j1it .
   (2) We again let 1 D sgn j  jt1
                                    1
                                       sgn j  jt1
                                                   2
                                                     and initially assume that Re.t1 / >
Re.t2 /. Since
                                0 1                        10 r u         r 1
                                                                                   1
                                    r             ru                  2          2
                                        2               2            u         u
                                                a 1C u2 C B a 1C a2         1C 2 C
                     
     0      1  1 u    a 0       B 1C ua2                                       a
                            D@                        a
                                                           AB     1
                                                                                   C;
     1 0       0 1    0 1                                                 ru
                                              q             @                      A
                                                       u 2     r
                                      0     a 1 C a2             1C u2
                                                                         a 1C  u2
                                                                                         a2   a2

we have by (4.25)–(4.28), and the change of variables u 7! au that
                                           1 C jkj C t
         k a 0               k    1Ct1 t2
                                                         1  t2              1
       W1           D . 1/ 2        2                          sgn.a/ jaj 2 Ct2
             0 1                                      2
                         Z
                                       1 kCt1 t2           1CkCt1 t2
                        .1 C i u/          2    .1 i u/        2    e. au/ du:
                                 R
Sparse equidistribution of geometric invariants of real quadratic fields                  5149


From [28, 3.384.9], this integral is equal to
                             1Ct1   t2         1 t1 Ct2
                               2        jaj      2
                                                          Wsgn.a/ k ; t1 t2 .4jaj/:
                          . 1Csgn.a/kCt
                                    2
                                         1 t2
                                              /                   2       2



Analytically continuing to t1 D i t and t2 D                i t, we obtain (4.22).
                    
  (3) For a 2 R , we have that
                                   Z            Z
   k a 0        jkj                1
 W1         D  2 sgn .a/jaji t C 2      jyj 2i t ˆk .y 1 a; u/e 2 iyu du d  y (4.30)
      0 1                              R           R

                                              2
from (4.29). We insert identity (4.30) for W1    into the left-hand side of (4.23), make the
change of variables a 7! ya and u 7! u C i a, then shift the contour of integration back
to the line Im.u/ D 0, yielding
  Z                      Z                           Z
              0                    0                             2
     sgnC .a/jajsCi t    sgnC .y/jyjs i t e 2ya u2 e u e 2 i.yCa/u du d  y d  a:
   R                        R                                       R

The innermost integral may be evaluated via integration by parts, leading to
 1
   Z                                     Z
               0                   2                   0               2
       sgnC .a/jajsCi t e a d  a           sgnC .y/jyjs i t e y d  y
 2 R                                       R
        Z                                       Z
                 C 0       sCi t   a 2                   0                  2
            sgn       .a/jaj      e       d a       sgnC .y/jyjsC2 i t e y d  y
                                                  
        ZR                                       R
                                                   Z
                 C 0       sC2Ci t    a2                   0                2
            sgn       .a/jaj        e        d a        sgnC .y/jyjs i t e y d  y
         R                                         R
         Z                                             Z
                  C 0 C1         sC1Ci t    a2                 0                    2
      2      sgn          .a/jaj          e      d a       sgnC C1 .y/jyjsC1 i t e y d  y:
            R                                                  R
                                                     0
The first three expressions vanish if    C 1 .mod 2/, while the last vanishes if    0
.mod 2/. The result then follows via the recurrence relation .s C 1/ D s.s/.
    (4) The left-hand side of (4.24) is
                  Z 1                   1      2               da
                         W1;i t .4a/2 C    C t 2 W 1;i t .4a/2
                    0                     4                         a
                                                                                  a
from (4.22). The desired identity then follows from the change of variables a 7! 4
together with [28, 7.611.4, 8.365.1, and 8.365.8].


5. The boundary of FA .q/

We turn our attention to the boundary of the canonical fundamental domain FA .q/ of
the hyperbolic orbifold A .q/nNA .q/. We give an explicit description of the boundary
in terms of the homology of X0 .q/, which relies crucially on the fact that P .q/ has
a minimal number of sides. For related arguments in the case of a general fundamental
P. Humphries, A. C. Nordentoft                                                           5150


polygon, see [55, Section 3]. Furthermore, we introduce the notion of regularised integrals
of Eisenstein series along geodesics. These two concepts are key in understanding the
topological terms in the Weyl sums for our equidistribution problem.
    Recall that the boundary of FA .q/ consists of two parts: the closed geodesic CA .q/ and
certain 0 .q/-translates of the sides of P .q/. When considering the boundary of FA .q/
modulo 0 .q/, the sides of P .q/ that are paired together are indistinguishable. With this
in mind, we let
                              C1 ; : : : ; C2gC1Ce2 Ce3  @P .q/                       (5.1)
be a sequence of edges of P .q/ such that for each pair of 0 .q/-equivalent edges L, L0
of P .q/ with L to the left of L0 , we have Ci D L for some 1  i  2g C 1 C e2 C e3
and such that C1 ; : : : ; C2g are hyperbolic sides. Note that Ci for 1  i  2g define closed
curves on X0 .q/ since the endpoints are all 0 .q/-equivalent to the cusp 0.


5.1. Homology of modular curves
Let q be an odd prime. The closed modular surface X0 .q/ of level q is a compact Riemann
                       q
surface of genus g D 12  C O.1/. The associated integral singular homology and cohomo-
logy groups H1 .X0 .q/; Z/ and H 1 .X0 .q/; Z/ are free abelian groups of rank 2g that sit
as lattices inside H1 .X0 .q/; R/ and H 1 .X0 .q/; R/, respectively. By general principles,
we have the cap product pairing between homology and cohomology

                      h; icap W H1 .X0 .q/; R/  H 1 .X0 .q/; R/ ! R;                 (5.2)

which is a perfect pairing [33, Section 3.3]. The cap product pairing identifies the homo-
logy group with the (linear) dual of the cohomology group and vice versa. Furthermore,
the Hecke operators as well as the Atkin–Lehner operator Wq are self-adjoint with respect
to the cap product pairing (see, e.g., [54, Section 3.2.1] for explicit formulæ for the action
of Hecke and Atkin–Lehner operators on homology and cohomology).
    Given a closed curve C inside X0 .q/, we denote by

                          ŒC  2 H1 .X0 .q/; Z/  H1 .X0 .q/; R/

the associated homology class. Recall that H1 .X0 .q/; Z/ is generated as an abelian group
by such classes [33, Chapter 2]. If h is a holomorphic cusp form of weight 2 and level q,
then h.z/ dz and h.z/ dz define complex-valued harmonic 1-forms on X0 .q/ and such
1-forms span the entire space of harmonic 1-forms. Given any harmonic 1-form !, we get
an associated (complex-valued) cohomology class:
                                               Z
                                       ŒC  7!   !;
                                                 C

for all closed curves C . By theorems of de Rham and Hodge, this association yields an
isomorphism between the real cohomology group H 1 .X0 .q/; R/ and the space of real-
valued harmonic 1-forms.
    We consider two bases for the homology and cohomology groups.
Sparse equidistribution of geometric invariants of real quadratic fields                   5151


5.1.1. The Hecke basis. Let B2hol .0 .q// be the orthogonal basis of weight 2 and level q
holomorphic cusp forms of level q consisting of Hecke eigenforms normalised so that the
first Fourier coefficient of each cusp form is 1; note that these are all newforms since there
are no cusp forms of weight 2 and level 1. For each h 2 B2hol .0 .q//,
                                   1 11
                                     i 2 .h.z/ dz ˙ h.z/ dz/                              (5.3)
                                   2
defines a real-valued closed 1-form. We denote by !h˙ 2 H 1 .X0 .q/; R/ the associated
cohomology class. It follows by dimensional considerations that

                              ¹!h W h 2 B2hol .0 .q//;  2 ¹C; ºº                       (5.4)

is a basis for H 1 .X0 .q/; R/. We denote by

                              ¹vh W h 2 B2hol .0 .q//;  2 ¹C; ºº

the basis of H1 .X0 .q/; R/ that is dual to (5.4) with respect to the cap product pairing (5.2);
by this, we mean that for h1 ; h2 2 B2hol .0 .q// and 1 ; 2 2 ¹C; º,
                                         ´
                         1   2           1 if h1 D h2 and 1 D 2 ,
                      hvh1 ; !h2 icap D
                                           0 otherwise.

5.1.2. The special basis. By general principles (since H is contractible), we have a se-
quence of surjective maps

      0 .q/  Conj.0 .q//  0 .q/ab  H1 .Y0 .q/; Z/  H1 .X0 .q/; Z/;                 (5.5)

where the composition 0 .q/  H1 .X0 .q/; Z/ is given by

                                               7! ŒC ;

with C any piecewise geodesic curve connecting z with z, where z 2 H [ Q [ ¹1º
(as the homology class is independent of these choices). The surjectivity of the first two
maps is evident and the composition of all of the maps can be thought of as the map
from the orbifold fundamental group 1orb .Y0 .p// Š 0 .p/ (using that H is the uni-
versal orbifold covering space of the orbifold Y0 .p/) to the orbifold homology group
H1orb .Y0 .p/; Z/ Š 0 .p/ab composed with the surjective map from H1orb .Y0 .p/; Z/ to
the homology of the underlying topological space of X0 .p/ (see, e.g., [13, Section 2.2]).
Now one sees directly that the kernel of the last map contains images of the parabolic
and elliptic conjugacy classes in 0 .q/ and furthermore by dimension considerations that
these classes even generate the kernel. Thus we conclude that the images of the hyperbolic
labels ˛j of P .q/ under (5.5) generate the lattice H1 .X0 .q/; Z/ and so, in particular, span
H1 .X0 .q/; R/.
Lemma 5.1. The cohomology classes ŒC1 ; : : : ; ŒC2g  define an integral basis for the
lattice H1 .X0 .q/; Z/.
P. Humphries, A. C. Nordentoft                                                               5152


Proof. We start by noticing that the homology class associated to a hyperbolic label ˛j
with j > j  can be written as         X
                                           ŒLk ;                                 (5.6)
                                             j  <k<j

where ŒLk  denotes the homology class of the side Lk of P .q/. To see this, observe that
the left-most vertex of the side Lj is equal to ˛j v, where v is the right-most vertex of Lj  .
Thus if j  < j , we see that the concatenation of the sides

                                   Lj  C1 ; Lj  C2 ; : : : ; Lj 1

defines a curve connecting v and ˛j v, which gives the claimed expression (5.6).
    This shows that the homology class associated to a hyperbolic label ˛j lies in the Z-
span of ¹ŒCi  W 1  i  2g C 1 C e2 C e3 º. Since the classes associated to the hyperbolic
labels via map (5.5) generate the lattice H1 .X0 .q/; Z/ and the classes of parabolic and
elliptic sides vanish, we get the desired conclusion by dimension considerations.

    We denote by

                       !1 ; : : : ; !2g 2 H 1 .X0 .q/; Z/  H 1 .X0 .q/; R/                 (5.7)

the dual basis of ŒC1 ; : : : ; ŒC2g  with respect to the cap product pairing. We refer to these
bases as the special basis of homology and cohomology, respectively.


5.2. A homological description of the boundary
In studying the projection of FA .q/ to the closed modular surface X0 .q/, we need to
understand the boundary of this projection. Unlike the level 1 case, this is not simply the
geodesic CA .q/, for CA .q/ may be nontrivial in homology (which corresponds to the fact
that A .q/ need not be contained in 0 .q/).
    First of all, denote by @FA .q/ the image of the oriented boundary of FA .q/ under the
projection to X0 .q/. Formally, this is nothing but a singular 1-chain (as in the theory of
singular homology [33, Chapter 2]), which is to say an element of

                              ZŒ¹'W Œ0; 1 ! X0 .q/ W continuousº:

We write
                                                 2gC1Ce
                                                     [2 Ce3
                        @FA .q/ D CA .q/ [                     mi .A; q/Ci ;
                                                        i D1

where mi .A; q/ 2 Z is the multiplicity of the edge Ci in FA .q/, namely the signed number
of times the boundary of FA .q/ contains (0 .q/-translates of) the two oriented edges
of P .q/ corresponding to Ci . Explicitly, this means that for a compactly supported 1-
form ! on X0 .q/,
                   Z               Z              2gC1Ce
                                                     X2 Ce3                Z
                              !D             !C                mi .A; q/            !:
                    @FA .q/         CA .q/              i D1                   Ci
Sparse equidistribution of geometric invariants of real quadratic fields                 5153


Lemma 5.2 (Cf. [55, Lemma 3.1]). Let Ci be an elliptic or parabolic edge of P .q/. Then
we have that
                                  mi .A; q/ D 0:

Proof. Consider the boundary of the special fundamental polygon P .q/ as a (cyclic)
graph with 4g C 2 C 2e2 C 2e3 vertices with its natural action of 0 .q/, and denote by

                                       G .q/ WD @P .q/= 0 .q/

the quotient graph. The graph G .q/ has 2 C e2 C e3 vertices and 2g C 1 C e2 C e3 edges.
The vertices corresponding to the cusp 1 and the elliptic points all have a single edge
connected to the vertex corresponding to the cusp 0, and the vertex 0 has 2g self-edges
(i.e., the degree of the vertex 0 is 4g C 1 C e2 C e3 ).
     The oriented boundary of FA .q/ can be described as a weighted version of G .q/;
for an edge E of G .q/ corresponding to Ci , we associated the weight mi .A; q/ 2 Z.
The key observation is now that by construction these weights are all obtained by taking
a cycle in the signed graph and recording the signed number of times the cycle crosses
each edge. The claim now follows since the vertices of G .q/ corresponding to 1 and
elliptic points have degree 1 (i.e., there is only one way to go to the elliptic points and
to 1).

    Lemma 5.2 shows that the oriented boundary of FA .q/, when projected to X0 .q/,
consists only of hyperbolic sides of P .q/. This means that we can rewrite the boundary
solely in terms of the hyperbolic sides C1 ; : : : ; C2g defined above:
                                                     2g
                                                     [
                              @FA .q/ D CA .q/ [            mi .A; q/Ci :
                                                     i D1

Lemma 5.3. For i 2 ¹1; : : : ; 2gº, we have that

                                   mi .A; q/ D   hŒCA .q/; !i icap ;

where !1 ; : : : ; !2g 2 H 1 .X0 .q/; Z/ is the special basis of cohomology defined in (5.7).

Proof. We observe that in homology, we have that
                           2g
                           X
              ŒCA .q/ C          mi .A; q/ŒCi  D Œ@FA .q/ D 0 2 H1 .X0 .q/; Z/;
                           i D1

since FA .q/  H and H is contractible. Now the claim follows since the coefficient of
the basis element ŒCi  in the expansion of ŒCA .q/ with respect to the special basis from
Lemma 5.1 is exactly
                                     hŒCA .q/; !i icap ;
by the definition of the dual basis.
P. Humphries, A. C. Nordentoft                                                        5154


5.3. Regularised integrals
For a cusp b 2 P 1 .Q/ and Y > 0, we define the cuspidal zone

                 Fb .Y / WD ¹z 2 H W 0 < Re.b 1 z/ < 1; Im.b 1 z/  Y º;            (5.8)

where b 2  is a scaling matrix for b, so that b 1 D b; note that Fb .Y / is independ-
ent of the choice of such a scaling matrix. One can readily check that for 2 , this
satisfies
                                   Fb .Y / D F b .Y /:                              (5.9)
Furthermore, for ` 2 N with corresponding matrix
                                    p       !
                                     ` 0
                            g` WD         1   2 SL2 .R/;
                                    0    p
                                                   `

we have that
                                                   .`; den.b//2    
                             g` Fb .Y / D Fg` b                    Y ;              (5.10)
                                                         `
where den.b/ denotes the denominator of b 2 P 1 .Q/ written in reduced form, with the
convention that
                         den.0/ WD 1 and den.1/ WD 0:
Lemma 5.4 (Cf. [8, Appendix]). Let C  H [ P 1 .Q/ be a geodesic with endpoints
b1 ; b2 2 P 1 .Q/ with b1 ¤ b2 . Then the limit
                Z         1         dz
                    .R0 E/ z; C i t
                 C           2         Im.z/
                             Z                         1        dz
                     WD lim                     .R0 E/ z; C i t          (5.11)
                        Y !1 C n.F .Y /[F .Y //
                                    b1      b2
                                                         2       Im.z/

exists.
    We may think of limit (5.11) as a regularised integral, akin to Zagier’s regularisation
of integrals on nH [66].

Proof of Lemma 5.4. We let b1 2  be a scaling matrix for b1 . Upon making the change
of variables z 7! b11 z and recalling (5.9), we may reduce to the case that b1 D 1
and b2 D ab with a 2 Z, b 2 N, and .a; b/ D 1. For sufficiently large Y > 0, we may
write
     Z                             1        dz
                            .R0 E/ z; C i t
       Cn.F1 .Y /[Fb2 .Y //          2       Im.z/
               Z a CiY          1        dz     Z aC i        1        dz
                 b                                   b b
          D              .R0 E/ z; C i t        C        .R0 E/ z; C i t        :
                a i
                bCb
                                  2       Im.z/    a
                                                   bC 2
                                                       i          2       Im.z/
                                                             b Y
Sparse equidistribution of geometric invariants of real quadratic fields                  5155


Let b2 2  be a scaling matrix for b2 ; in particular, we may choose b2 D 01 01 if
                                                                                   

                                              x 2 Z such that ax
a D 0, while if a ¤ 1, then there exists some a                a  1 .mod b/, in which
case we may take                                    !
                                           a axab 1
                                   b2 D              :
                                           b     x
                                                 a
Making the change of variables z 7! b21 z in the second integral above, we see that the
right-hand side is equal to
         Z a CiY                                         x
                                                         a
                                                         b CiY
             b
                          1        dz            Z                    1        dz
                   .R0 E/ z; C i t                               .R0 E/ z; C i t
           a i
           bCb
                            2       Im.z/               x
                                                        a i
                                                        bCb
                                                                          2       Im.z/

if a ¤ 0, while the same holds for a D 0 with a x replaced by 0. Now we insert the Fourier
expansion (4.11). Since the constant terms cancel, we see that the limit exists as Y tends
to infinity due the rapid decay of the Whittaker function, namely W˙1;i t .4y/  ye 2y
as y tends to infinity.

Corollary 5.5. Let ` 2 N be squarefree. Let C be the geodesic connecting b1 and b2 ,
where b1 ; b2 2 P 1 .Q/ are 0 .`/-equivalent. Then the limit
                                                          1    dz
                         Z                         
                    lim                     .R0 E/ `z; C i t                 (5.12)
                   Y !1 C n.F .Y /[F .Y //
                               b1      b2
                                                          2    Im.z/

exists and is equal to           Z          1       dz
                                    .R0 E/ `z; C i t        :
                                  C           2       Im.z/
Proof. This follows directly from Lemma 5.4 combined with (5.10) since ab11 ; ab22 2 P 1 .Q/
are 0 .`/-equivalent precisely when .b1 ; `/ D .b2 ; `/.


6. Weyl sums

6.1. Weyl sums for newforms and L-functions
Let q be a positive squarefree integer for which every prime dividing q splits in E, let
f 2 C0 .0 .q// be a Hecke–Maaß newform, and let  be a narrow class character of E.
Our goal is to relate the Weyl sum
                                   X         Z
                          W;f WD       .A/        f .z/ d.z/                    (6.1)
                                           C           FA .q/
                                       A2ClD

to a special value of the Rankin–Selberg L-function L.s; f ˝ ‚ /, where ‚ denotes the
theta series associated to , as in [38, Appendix A.1], which is a newform of weight 0,
level D, nebentypus D , Laplacian eigenvalue ‚ D 14 , and parity ‚ D .J / 2 ¹1; 1º.
The automorphic form ‚ is a cusp form if and only if  is complex; otherwise ‚ is an
Eisenstein series and  is a genus character.
P. Humphries, A. C. Nordentoft                                                                                         5156


Proposition 6.1. Let q be either 1 or a prime that splits in E, let f 2 C0 .0 .q// be
a Hecke–Maaß newform normalised such that
                            Z
                                     jf .z/j2 d.z/ D 1;
                                      0 .q/nH

and let  be a narrow class character of E. Then there exist constants c;f 2 C and
 ˙
c;h 2 C for each h 2 B2hol .0 .q// such that
                                  1         2g Z
               L. 12 ; f ˝ ‚ / 2           X                          dz               X          X
W;f D c;f                  1
                                      C                  .R0 f /.z/                                 hvh˙ ; !j icap
                 L.1; ad f / 2                                        Im.z/
                                           j D1 Cj                            h2B2hol .0 .q// ˙
                                                              1                 12               1                  12 
                                                      C
                                                    c;h L          ; h ˝ ‚x          ˙ c;h L            ; h ˝ ‚            :
                                                                 2                                      2
Here the sum over j is empty if q D 1 (so that g D 0), C1 ; : : : ; C2g are the hyperbolic
sides of P .q/ as in (5.1), and !1 ; : : : ; !2g is the special basis of cohomology as in (5.7).
                                       ˙
Moreover, the constants c;f and c;h        satisfy
                                                   p          it                           i tf 2
                        2        .1       f .J // D . 43 C 2f /2 . 34                    2
                                                                                               /
                 jc;f j D                                                                          ;
                               q. 14 C tf2 /2                  . 12 C i tf /. 12        i tf /
                                  p
                    ˙ 2               D
                  jc;h j D         1
                                              ;
                            16 . 4 C tf2 /2
                                2

                      7
where tf 2 R [ i Œ      ; 7  denotes the spectral parameter and f
                      64 64
                                                                                            2 ¹1; 1º denotes the
parity of f .
Remark 6.2. In terms of the completed L-functions
                                                   s C j       j C i tf 2  s C jf  j                     i tf 2
                                                           f
 ƒ.s; f ˝ ‚ / WD  2.sCjf            j/
                                                                             
                                                               2                         2
                    L.s; f ˝ ‚ /;
                      3s
                           s        s  s                             
     ƒ.s; ad f / WD  2      C i tf                                i tf L.s; ad f /;
                            2          2    2
where f ;  2 ¹0; 1º are such that . 1/f D f and . 1/ D ‚ D .J /, we have that
                                                           p
                    2
                      L. 12 ; f ˝ ‚ /   .1 f .J // 2 D ƒ. 12 ; f ˝ ‚ /
             jc;f j                   D                                    :
                       L.1; ad f /          q. 14 C tf2 /2   ƒ.1; ad f /

Remark 6.3. Stirling’s formula implies that
                             1        1                   3                   1
                                                                 ˙
                c;f  D 4 q          2   .1 C jtf j/ 2 ;       c;h  D 2 .1 C jtf j/ 2 :                             (6.2)

Remark 6.4. It is instructive to consider the case of q D 1 and  a genus character
associated to the pair of primitive quadratic Dirichlet characters D1 and D2 mod-
ulo jD1 j and jD2 j, respectively, where D1 and D2 are fundamental discriminants for
Sparse equidistribution of geometric invariants of real quadratic fields                 5157


which D1 D2 D D. Then ‚ is the Eisenstein newform associated to D1 and D2 , as
described in [65], and so L.s; f ˝ ‚ / D L.s; f ˝ D1 /L.s; f ˝ D2 /. Since D > 1,
either D1 ; D2 > 0 or D1 ; D2 < 0; in the former case, we have that .J / D 1, while
.J / D 1 in the latter case. Proposition 6.1 then gives the identity
                                            p          it            i tf 2
                        2   .1 f .J // D . 34 C 2f /2 . 34         2
                                                                         /
                jW;f j D          1    2 2        1            1
                                q. 4 C tf /     . 2 C i tf /. 2 i tf /
                                     L. 12 ; f ˝ D1 /L. 12 ; f ˝ D2 /
                                                                       :               (6.3)
                                                 L.1; ad f /
We see that the Weyl sum W;f vanishes if f is even and D1 ; D2 > 0 or if f is odd and
D1 ; D2 < 0; additionally, W;f vanishes if f is odd and D1 ; D2 > 0, for then the root
numbers of f ˝ D1 and f ˝ D2 are both equal to 1 [38, Lemma A.2], and hence
L.s; f ˝ D1 / and L.s; f ˝ D2 / both vanish at s D 12 . These vanishing results and
identity (6.3) when f is even and D1 ; D2 < 0 are in exact accordance with the work of
Duke, Imamoḡlu, and Tóth [19, Theorem 4 and (5.17)].
   Similarly, letting E.z; s/ denote the Eisenstein series on nH, which has parity 1,
we relate the Weyl sum
                               X         Z       1        
                      W;t WD       .A/      E z; C i t d.z/                   (6.4)
                                  C       FA        2
                                     A2ClD

to a special value of L.s; ‚ / D L.s; /.
Proposition 6.5. Let  be a narrow class character of E. For t 2 R, we have that
                                              1   it
                            .1       .J //D 4 C 2 . 34 C i2t /2 L. 21 C i t; ‚ /
                  W;t D              1
                                                                                    :
                                      4
                                        C t2       . 12 C i t / .1 C 2i t /

Remark 6.6. This is
                                                  1    it
                              .1      .J //D 4 C 2 ƒ. 21 C i t; ‚ /
                                       1
                                       4
                                         C t2         .1 C 2i t /
in terms of the completed L-functions
                                                 s C 1 2
                           ƒ.s; ‚ / WD  s 1             L.s; ‚ /;
                                                     2
                                          s
                                               s 
                                .s/ WD  2        .s/:
                                                2
     The proofs of Propositions 6.1 and 6.5 are given in Section 6.6. Our method is to
first prove identities relating certain adèlic period integrals to L-functions, then show that
these adèlic period integrals are equal to integrals over closed geodesics, and finally relate
these integrals over closed geodesics to integrals over hyperbolic orbifolds.
     In Section 6.7, we extend Propositions 6.1 and 6.5 to oldforms; note that if q > 1 is
squarefree, every Eisenstein series is an oldform [65].
P. Humphries, A. C. Nordentoft                                                         5158


6.2. Adèlic period integrals and choices of test vectors
The first step towards proving Proposition 6.1 is to apply a formula due to Martin and
Whitehouse [50], extending work of Waldspurger [63], relating certain adèlic period
integrals to a ratio of special values of L-functions. We now describe in some detail how
the results of Martin and Whitehouse apply in our specific case.

6.2.1. Waldspurger-type formulæ. Following the pioneering work of Waldspurger [63],
there has been considerable work in obtaining explicit formulæ relating adèlic period
integrals and central values of Rankin–Selberg L-functions, as in work of Gross [30],
Zhang [67], Jacquet and Chen [41], Martin and Whitehouse [50], and File, Martin, and
Pitale [24], among others. The setting is as follows: let  be an automorphic representation
of GL2 .AF / for some number field F , let E be a quadratic extension of F embedded
in a quaternion algebra D defined over F , let W E  nA             
                                                               E ! C be a unitary Hecke
character for which jAF is equal to the central character of , and let  be a test vector
in the automorphic representation  D of D .AF / corresponding to  via the Jacquet–
Langlands correspondence. We then define the adèlic period integral
                                     Z
                         PD ./ WD               .x/ 1 .x/ dx:
                                     A    
                                      F E nAE

                                                                         
Note that implicitly this depends on a choice of embedding A    E ,! D .AF /, which is
suppressed in the notation, as well as a choice of normalisation of the measure dx.
   A remarkable result of Waldspurger [63] is the formula

                            jPD ./j
                                      2       ƒ. 1 ; E ˝ /
                                        D c; 2             ;                         (6.5)
                              h; i           ƒ.1; ad /
where  is any nonzero test vector in  D and c; is a finite product of local factors.
Here E denotes the base change of  to an automorphic representation of GL2 .AE /;
alternatively, we may write

                             ƒ.s; E ˝ / D ƒ.s;  ˝  /;

where  denotes the automorphic induction of the Hecke character  to an automorphic
representation of GL2 .AF /.

6.2.2. An explicit formula. For applications in analytic number theory, it is essential that
we have at our disposal a completely explicit form of Waldspurger’s formula (6.5). Build-
ing on the work of Jacquet and Chen [41], Martin and Whitehouse [50, Theorem 4.1]
provide such a formula for a specific choice of test vector  2  D (under some local
assumptions, which were slightly relaxed by File, Martin, and Pitale [24]). For this spe-
cific choice of test vector, the local factors (whose product we denoted by c; in (6.5))
are described in [50, Section 4.2].                                          p
    For our application, we can restrict to the case where F D Q, E D Q. D/ with D
                                                          N
a positive fundamental discriminant,  D f D 1 ˝ p p is a cuspidal automorphic
Sparse equidistribution of geometric invariants of real quadratic fields             5159


representation of GL2 .AQ / associated to a Hecke–Maaß newform f 2 C0 .0 .q// of
weight 0, principal nebentypus, and squarefree level q for which every prime diving q
splits in E, and  is the idèlic lift of a narrow class character ; later, we specialise
to q either equal to 1 or equal to an odd prime. With this choice of data, the quaternion
algebra D is simply the matrix algebra Mat22 , so that  D D . We shorten notation and
write P ./ WD PD   ./ in this case.
     The choice of test vector  2  used in [50] is characterised by some local compatib-
ilities with the Hecke character  and thus implicitly depends on the choice of embedding
‰AQ W AE ,! D.AQ /. The properties that characterise the local test vectors p and 1
are described in [50, p. 172] and are as follows.
   At a nonarchimedean place p, Martin and Whitehouse pick p 2 p to be nonzero
    and invariant under the units R of a certain order R in the local quaternion algebra
    (which determines p up to scaling). In our setting, R is simply the Eichler order
    in GL2 .Qp / of reduced discriminant p c.p / such that

                                     R \ ‰p .Ep / D ‰p .OEp /;

    where c.p / denotes the conductor exponent of p and Ep WD E ˝ Qp .
   At the archimedean place, we let K1 Š O.2/ be a maximal compact subgroup of
                                      
    GL2 .R/ such that K1 \ ‰1 .E1       / Š .Z=2Z/2 is a maximal compact subgroup of
           
    ‰1 .E1   / Š .R /2 , where E1 WD E ˝ R Š R2 . Martin and Whitehouse pick 1
                                                                              
    such that K1 \ ‰1 .E1     / acts (via ) on 1 in the same way as 1 W E1     ! C
    and 1 lies in the minimal such K1 -type in the sense of Popa [58, Theorem 1] (which
    also uniquely determines 1 up to scaling).
In our application, we slightly modify the choice of test vector 1 .
    In order to obtain an explicit formula, we must now specify an embedding ‰AQ W
AE ,! Mat22 .AQ / and then determine which choice of local test vectors p the above
described conditions imply.

6.2.3. A specific test vector. We construct an embedding ‰AQ using an oriented optimal
embedding ‰W E ,! Mat22 .Q/ of level q as described in (2.3) associated to a Heegner
form Q D Œa; b; c 2 QD .q/ as in (2.1). By tensoring with AQ , we get an embedding

                   ‰AQ D .‰1 ; ‰2 ; ‰3 ; ‰5 ; : : :/W AE ,! Mat22 .AQ /:

    Since ‰ is an optimal embedding, the Eichler order R is exactly the standard order of
level p c.p / for each prime p, so that
                                      Y
                                         R D K0 .q/;
                                         p

where K0 .q/  GL2 .AQ / is the congruence subgroup of level q as in (4.15). This means
that we can choose the local component of  at each prime to be the same as those of the
adèlisation F2 of our Maaß cusp form F2 D R0 f .
P. Humphries, A. C. Nordentoft                                                         5160


    At the archimedean place, there is the slight complication that ‰1 W E1 ,! Mat22 .R/
is not the diagonal embedding. If, however, we conjugate ‰1 by the matrix 1 2 GLC   2 .R/
given by                    8          p           p 
                                   b      D b         D
                                                            if a > 0,
                            ˆ
                            ˆ
                                     2a             2a
                            ˆ
                            <
                       1 WD          p            p 
                            ˆ bC D b                 D
                                                            if a < 0,
                            ˆ
                            ˆ
                                     2a           2a
                            :

where .a; b; c/ 2 Z3 are associated to ‰ as in Section 2.3, then we obtain the diagonal
embedding, namely
                    p           p                       p          p
    . 1  ‰1 /.x C Dy; x          Dy/ WD 11 ‰1 .x C Dy; x            Dy/ 1
                                                 p                  !
                                             x C Dy            0
                                                               p
                                        D                             :            (6.6)
                                                 0        x      Dy

Note that 1 i D zQ and ‰1 .D ; D1 / 1 i D Q zQ , where zQ and Q zQ are as in (2.6).
    With this in mind, Martin and Whitehouse choose the local component of  at the
archimedean place to be
                 ´
                   1 . 1 /F0 ;1                   if f D .J /,
                   1 . 1 /F2 ;1    1 . 1 /F 2 ;1     if f D   .J /,
where F0 ;1 , F2 ;1 , and F 2 ;1 are the local components of the adèlisations F0 , F2 ,
and F 2 of F0 D f , F2 D R0 f , and F 2 D L0 f , respectively. We instead merely take
the local component of  at the archimedean place to be 1 . 1 /F2 ;1 .
    Altogether, the above discussion implies that when using the embedding ‰AQ W AE ,!
Mat22 .AQ /, our test vector is
                                      D . 1 /F2 ;
                       C
where we view    1 2 GL2 .R/ as an element of GL2 .AQ /.



6.3. A formula for certain adèlic period integrals
Let F2 W GL2 .AQ / ! C denote the adèlic lift of F2 WD R0 f 2 C2 .0 .q//, which is

                 2
an element of the cuspidal automorphic representation  D f of GL2 .AQ / associated
to f . Let  2 E  nA1E be the idèlic lift of , so that  is a unitary Hecke character
that is unramified at every nonarchimedean place of E and has local components at
the two archimedean places of E of the form .sgn ; sgn / with  2 ¹0; 1º such that
. 1/ D .J /. We study the adèlic period integral
                                Z
             P .. 1 /F2 / WD               F2 .‰AQ .x/ 1 / 1 .x/ dx:         (6.7)
                                    A    
                                     Q E nAE

The measure dx is normalised such that A       
                                        Q E nAE has volume 2ƒ.1; D / D 2L.1; D /,
where                                         s 
                                          s
                          ƒ.s; D / WD  2        L.s; D /:
                                               2
Sparse equidistribution of geometric invariants of real quadratic fields                           5161


Lemma 6.7. We have that
                                                       it             i tf 2
                          2     1    f .J / . 43 C 2f /2 . 34       2
                                                                          / L. 12 ; f ˝ ‚ /
      jP .. 1 /F2 /j D            p                                                         :
                                    q D        . 21 C i tf /. 12    i tf /   L.1; ad f /
                                                            p
Proof. We apply [50, Theorem 4.1] with F D Q, E D Q. D/, ' D . 1 /F2 (so that
 D f ), and  as above. With this choice of data, we have that S 0 ./ D S./ D ;,
Ram./ D ¹p W p j qº, F D 1, E D D, c./ D 1, and †1         F D ¹1º in the notation of
[50, Theorem 4.1].
    There is a slight caveat; [50, Theorem 4.1] does not quite apply since although the
automorphic form F2 has the same local Whittaker functions Wp 2 W .p ; p / at every
nonarchimedean place to that appearing in [50, Theorem 4.1] (compare Lemma 4.2 to
                                                     2
[50, Section 2]), the local Whittaker function W1      2 W .1 ; 1 / at the archimedean
place, as described in Lemma 4.3, has a slightly different form than that appearing in
[50, Theorem 4.1]. This issue is readily circumvented: we replace the term C1 .E; ; /
appearing in [50, Theorem 4.1] with its definition in [50, Section 4.2.2] in terms of local
archimedean L-functions and Jz1 .f1 /, where now
                                    ˇ  W 2 a 0 sgn .a/ d  aˇ2
                                    ˇR                           ˇ
                                            1  0 1
                      Jz1 .f1 / D     R
                                                                    :
                                              ˇW 2 a 0 ˇ2 d  a
                                         R ˇ             ˇ
                                          R     1   0 1

This local distribution is just as in [50, Section 3.3] except that we have projected onto
                                  2
the local Whittaker function W1      2 W .1 ; 1 / associated to F2 instead of the local
Whittaker function W1 2 W .1 ; 1 / for which the numerator is equal to the local
archimedean L-function and additionally satisfying
                                                              
                                 a 0                        a 0
                          W1             D . 1/ W1
                                 0 1                       0 1
for all a 2 R .
    With this minor modification at the archimedean place, we deduce from [50, The-
orem 4.1] that
                                   Y     1            L. 1 ;  ˝  /
            jP .. 1 /F2 /j2 D p            z1 .f1 / 2 f
                                              J
                                2 D pjq 1 p 1             L.1; ad f /
                                  Z
                                                  jF2 .g/j2 dg;                                  (6.8)
                                         Z.AQ / GL2 .Q/n GL2 .AQ /

where Z.AQ / denotes the centre of GL2 .AQ / and the measure dg is normalised to be the
Tamagawa measure multiplied by  q .2/, where
                                    s
                                        s      Y       1 
                        q .s/ WD  2      .s/     1       ;
                                         2               ps
                                                         pjq

so that
                                                                      Y        1 
              vol.Z.AQ / GL2 .Q/n GL2 .AQ // D 2 q .2/ D                 1         ;              (6.9)
                                                                     3           p2
                                                                       pjq
P. Humphries, A. C. Nordentoft                                                           5162


since the Tamagawa number of PGL2 is 2. From (4.23) and (4.24) with  D f ,  0 D  ,
t D tf , and s D 12 ,
               8
                                    it          i tf 2
               ˆ        4   . 34 C 2f /2 . 43   2
                                                    /
                                                       if f   C 1 .mod 2/,
               ˆ
               <
                      1          1            1
                          2
  Jz1 .f1 / D . 4 C tf / . 2 C i tf /. 2 itf /                               (6.10)
               ˆ
               ˆ
               :0                                      if    .mod 2/.
                                                                 f      

Furthermore,
                Z
                                                jF2 .g/j2 dg
                    Z.AQ / GL2 .Q/n GL2 .AQ /
                          1 Y           1
                                            Z
                        D       1                      j.R0 f /.z/j2 d.z/
                          q              p 0 .q/nH
                            pjq
                          1 Y           1  1       Z
                        D       1               C tf2             jf .z/j2 d.z/;      (6.11)
                          q              p 4             0 .q/nH
                              pjq

where the first equality holds via the strong approximation theorem, (4.16), while the
second equality follows from [18, (4.38)]; to check that the normalisation of measures in
the first equality is correct, we replace F2 with the constant function 1 and recall (6.9)
and (4.6). We obtain the result upon combining (6.8), (6.10), and (6.11) and noting that
L.s; f ˝  / D L.s; f ˝ ‚ / and L.s; ad f / D L.s; ad f /, and finally that
                                       ´
                                         2 if f   C 1 .mod 2/,
                       1 f .J / D
                                         0 if f   .mod 2/.


6.4. From adèlic period integrals to cycle integrals
We relate the adèlic period integral (6.7) to a certain sum of cycle integrals over ori-
ented geodesics in 0 .q/nH indexed by narrow ideal classes. We first define these cycle
integrals and show that they are well defined. Given f 2 C0 .0 .q// and a Heegner form
Q 2 QD .q/, we consider the cycle integral
                                Z Q zQ
                                                    dz
                                        .R0 f /.z/       ;                        (6.12)
                                 zQ                Im.z/

where zQ and Q zQ are as in (2.6) and the contour of integration is the geodesic segment
between these two points.
Lemma 6.8. For all          2 0 .q/, the cycle integral (6.12) is invariant under replacing Q
by  Q.
                                                               dz
                                              R
    For this reason, we may write (6.12) as CA .q/ .R0 f /.z/ Im.z/ without ambiguity,
where CA .q/ denotes the oriented geodesic in 0 .q/nH associated to a narrow ideal
class A corresponding to Q as in Section 2.4, since this cycle integral is independent
of the choice of Heegner form Q associated to A.
Sparse equidistribution of geometric invariants of real quadratic fields                5163


Proof of Lemma 6.8. Suppose that Q0 D  Q for some 2 0 .q/. We make the change
of variables z 7! 1 z in (6.12). The integrand remains unchanged since
                                                       d         Im. z/
              .R0 f /. z/ D j .z/2 .R0 f /.z/;            . z/ D        j .z/ 2 :
                                                       dz         Im.z/
                             1
It is easily checked that       Q D Q0 , and so the new contour of integration is the
geodesic segment from zQ to Q0 zQ on semicircle (2.4) associated to Q0 . Further
changes of variables by powers of Q0 rotate the contour of integration along this semi-
circle while leaving the integrand intact, and so there is an appropriate power of Q0 for
which the resulting geodesic segment intersects nontrivially with the geodesic segment
from zQ0 to Q0 zQ0 . We then break up the integral into two parts, and for the part that does
not intersect this geodesic segment, we make one last change of variables by either Q0
or Q10 as appropriate; recombining, we obtain (6.12) with Q0 in place of Q.

    With this in hand, we now write the adèlic period integral P .. 1 /F2 / defined
in (6.7) as a geodesic cycle integral.
Lemma 6.9. We have that
                                    x ‰/ X
                                  i .A                              dz
                                                 Z
         P .. 1 /F2 / D          p       x
                                            .A/         .R0 f /.z/       ;           (6.13)
                                      D   C       CA .q/            Im.z/
                                            A2ClD

                 C
where A‰ 2 ClD      is the element of the narrow class group associated to the oriented
optimal embedding ‰. In particular, P .. 1 /F2 / is independent of the choice of ori-
ented optimal embedding ‰ of level q within an equivalence class of embeddings modulo
the action of 0 .q/.
    A related result is proven by Popa in [57, Section 6], namely the identity

                              i k .A
                                  x ‰/ X
                                                    Z
            P .. 1 // D         k 1
                                               x
                                              .A/          g.z/Q.z; 1/k 1 dz:
                                D 2         C        CA .q/
                                            A2ClD

Here g is a holomorphic Hecke newform of weight k, level q, and trivial nebentypus
and  is the adèlic lift of g. Popa additionally proves an identity relating jP .. 1 //j2
to L. 12 ; g ˝ ‚ / akin to Lemma 6.7 via the theta correspondence [57, Theorem 5.4.1].
The proof of Lemma 6.9 given below closely follows that of Popa in [57, Section 6].

Proof of Lemma 6.9. Since  is the idèlic lift of a narrow class character, it is trivial
on both O y  and A . Furthermore, we have the inclusion ‰A .O y  /  K0 .q/ since ‰
           E       Q                                         Q   E
is an optimal embedding. As the newform f has level q, it follows that both . 1 /F2
                                                        y          y
and  are well defined on the double quotient A   
                                               Q E nAE =OE . Since OE has measure 1,
we deduce that
                               Z
             P .. 1 /F2 / D                 F2 .‰AQ .x/ 1 / 1 .x/ dx:
                                     A     y
                                      Q E nAE =OE
P. Humphries, A. C. Nordentoft                                                             5164


   Via the strong approximation theorem, we have the decomposition
                                            G
                                   y
                        A
                         Q E 
                               nA E = OE Š            Z
                                                 A  D   1
                                                        nE1 ;
                                                    C
                                                A2ClD

where A D .Av / 2 A  E runs through a set of finite idèle representatives of the narrow class
         C
group ClD  (so that Av D 1 if v is an archimedean place of E), which we freely identify
with elements of the narrow class group, while E1      1 WD
                                                             ¹.t; t 1 / 2 E1 W t > 0º Š R  C,
                                      
which we view as a subgroup of AE via the embedding .t; t 1 / 7! .t; t 1 ; 1; 1; : : :/, and
          m                                                           y
 Z WD
D     ¹.D ; Dm / 2 E1 W m 2 Zº. Thus every x 2 A            
                                                            Q E nAE =OE can be written as
            1
x D A.t; t ; 1; 1; : : :/ with t 2 Œ1; D /. From this, we may write
                                               Z D
                              2 X
      P .. 1 /F2 / D p                x
                                        .A/        F2 .‰AQ .A/‰1 .t; t 1 / 1 / d  t:
                              D       C         1
                                 A2ClD

We can check that the normalisation of measures here is correct by replacing . 1 /F2
with the constant function 1 and taking  to be the     p trivial character, noting that
                                            C
vol.AQ E 
            nA 
               E / is 2L.1; D /, whereas  hD log D D     DL.1; D / by the narrow class
number formula.
    Let gA denote the inverse of the GLC 2 .R/ component g1 of the representation g1 k
                           
of the idèle ‰AQ .A/ 2 AQ , as in (4.16). By definition (4.17) and (4.14) of the adèlic lift
together with the fact that det 1 > 0, we have that
                                         Z D
                         2 X
   P .. 1 /F2 / D p              x
                                    .A/      jg 1 ‰1 .t;t 1 / 1 .i / 2
                          D       C       1     A
                              A2ClD
                                                .R0 f /.gA 1 ‰1 .t; t 1 / 1 i / d  t:   (6.14)
    We make the change of variables z D gA 1 ‰1 .t; t 1 / 1 i D gA 1 1 .i t 2 /; the con-
tour of integration in (6.14) then becomes the oriented geodesic segment from gA 1 1 i D
gA 1 zQ to gA 1 Q zQ parametrised by gA 1 ‰1 .t; t 1 /zQ , where zQ and Q zQ are as
in (2.6) with Q D Q‰ D Œa; b; c the Heegner form associated to the optimal embed-
ding ‰. We have that
                                        i               dz
                               d t D     j 1 .z/ 2          ;
                                        2 1 gA         Im.z/
since t 2 D   i 11 gA z and
                                 d         Im.gz/
                                    .gz/ D        jg .z/ 2
                                 dz         Im.z/
for any g 2 GL2 .R/, while the cocycle relation jg1 g2 .z/ D jg2 .z/jg1 .g2 z/ implies that
               jg 1 ‰1 .t;t 1 / 1 .i /j 11 gA .z/ D j 11 ‰1 .t;t 1 / 1 .i / D 1;
                  A

where the last equality follows upon recalling (4.1) and (6.6). We deduce that (6.14) is
equal to
                                       Z g 1 Q zQ
                         i   X            A                    dz
                       p          x
                                  .A/             .R0 f /.z/       :
                          D     C
                                           1
                                        gA zQ                 Im.z/
                              A2ClD
Sparse equidistribution of geometric invariants of real quadratic fields                    5165


    It is shown in [57, Theorem 6.2.2 (i)] that as A runs through the narrow class group
  C
ClD , gA 1 ‰gA runs through a set of representatives of equivalence classes of oriented
optimal embeddings of level q modulo the action of 0 .q/. Furthermore, letting Q0 denote
the Heegner form of level q associated to the oriented optimal embedding gA 1 ‰gA ,
we have that the contour of integration from gA 1 zQ and gA 1 Q zQ D Q0 gA 1 zQ is a geo-
desic segment of length 2 log D of semicircle (2.4) associated to Q0 , and hence
                     Z g 1 Q zQ
                                                 dz                               dz
                                                          Z
                         A
                                     .R0 f /.z/       D             .R0 f /.z/
                       gA   1z
                                 Q
                                                Im.z/     CA0 .q/                Im.z/
                                               C
by the proof of Lemma 6.8, where A0 2 ClD        is the element of the narrow class group
associated to Q0 . It remains to note that by [57, Theorem 6.2.2 (ii)], the oriented optimal
                                                   C                                  C
embedding gA 1 ‰gA is associated to AA‰ 2 ClD        , where A‰ is the element of ClD    cor-
responding to ‰.


6.5. From cycle integrals to Weyl sums for newforms
Having shown in Lemma 6.9 that the adèlic period integral P .. 1 /F2 / defined in
(6.7) may be reexpressed as a geodesic cycle integral defined in (6.13), we now show that
this integral of a Maaß cusp form over a closed geodesic CA .q/ is related to an integral
over the hyperbolic orbifold A .q/nNA .q/ plus a certain topological contribution. Fur-
thermore, we show that a similar relation holds for Eisenstein series, with a much simpler
proof. It is at this point that we specialise to the setting of q being either equal to 1 or
equal to an odd prime.
Lemma 6.10 (Cf. [19, Lemmata 1 and 2]). Let f 2 C0 .0 .q// be a Maaß cusp form p of
weight 0, level q, where either q D 1 or q is an odd prime that splits in E D Q. D/,
                                                             C
and Laplacian eigenvalue f D 41 C tf2 . Then for each A 2 ClD , we have that
                                              Z
                                        1                            dz
             Z
                        f .z/ d.z/ D 1    2
                                                        .R0 f /.z/
                 FA .q/               4
                                        C tf     CA .q/            Im.z/
                                        2g                                           
                                                              dz
                                        X   Z
                                     C          .R0 f /.z/         hŒCA .q/; !j icap :
                                             Cj             Im.z/
                                           j D1


Similarly, let E.z; 21 C i t / be the Eisenstein series on nH with Laplacian eigenvalue
1
4
  C t 2 , where t 2 R. Then for ` j q, we have that
                                            Z
                1                      1                            1        dz
Z                                                            
         E `z; C i t d.z/ D 1                         .R 0 E/  `z;   C i t
  FA .q/        2                    4
                                       C t2     CA .q/              2        Im.z/
                                       2g
                                       X                                                      
                                                             1       dz
                                          Z             
                                    C          .R0 E/ `z; C i t              hŒCA .q/; !j icap ;
                                            Cj               2        Im.z/
                                           j D1
        R
where   Cj denotes the regularised integral defined in (5.12).
P. Humphries, A. C. Nordentoft                                                             5166


Proof. We show this for q prime; the case of q D 1 follows in the same way except that
g D 0, so that the sum over j is empty. Let FA .q/  H be the fundamental domain for
A .q/nNA .q/ defined in (3.7). For each vertex v of FA .q/ and for Y > 1, let Fv .Y /
denote the cuspidal zone defined in (5.8). Let  be either a Hecke–Maaß cusp form or an
Eisenstein series as above and denote by  the associated Laplace eigenvalue. By Stokes’
theorem, we have that for all Y sufficiently large,
                                 @2
             Z
                                      .z/ dz d zx
                                 z @z
              FA .q/n v Fv .Y / @x
                     S

                                              @
                        Z
                   D                             .z/ dz
                                  S
                          @FA .q/n v Fv .Y / @z
                        nC2                                          
                                                @ ˇˇ
                                       Z
                        X                                    ai ai 1
                            ni .A; q/                                 z dx:       (6.15)
                                        Ii .q/ @z zDxCiY      bi bi 1
                                                   ˇ
                           i D1

Here ni .A; q/ is the multiplicity in FA .q/ of the cuspidal zone F ai .Y / around the
                                                                        b
vertex abii (which is some number independent of Y ), while Ii .q/  R isithe horocycle in-
terval at height Y around the vertex abii of P .q/ defined by
                        1
              ai ai 1
                            P .q/ \ ¹x C iY W x 2 Rº D ¹x C iY W x 2 Ii .q/º:
               bi bi 1
   Since
                    @2       1  @2     @2 
                          D         2
                                      C 2 ; dz d zx D 2iy 2 d.z/;
                    z @z
                   @x        4 @x      @y
the left-hand side of (6.15) is
                              i 
                                   Z
                                                    .z/ d.z/:
                                2 FA .q/nSv Fv .Y /
As Y tends to infinity, this converges to
                                  i 
                                       Z
                                             .z/ d.z/:
                                    2 FA .q/
   The first term on the right-hand side of (6.15) is equal to
                                   N
                                  2
               @                                                     @
      Z                           X                  Z
                 .z/ dz                 mj .A; q/                     .z/ dz
       CA .q/ @z                                         S
                                                     Cj n v Fv .Y / @z
                                  j D1
                                               N
                                               2
            i                         dz     i X                                       dz
                Z                                          Z
          D                .R0 /.z/       C     mj .A; q/                  .R0 /.z/       ;
            2       CA .q/           Im.z/   2                   S
                                                             Cj n v Fv .Y /           Im.z/
                                                     j D1

where mj .A; q/ denotes the multiplicity of the side Cj of P .q/ in A .q/nNA .q/ as
defined in Section 5.2. The second term on the right-hand side of (6.15) converges to zero
as Y tends to infinity; for  cuspidal, this follows from the rapid decay at each cusp b,
while for Eisenstein series, this follows from Lemma 4.1. Thus upon taking the limit as Y
tends to infinity, we obtain the desired identity by Lemmata 5.2 and 5.3.
Sparse equidistribution of geometric invariants of real quadratic fields                            5167


6.6. Proofs of Propositions 6.1 and 6.5
We are finally in a position to prove Proposition 6.1.

Proof of Proposition 6.1. Lemmata 6.9 and 6.10 imply that the Weyl sum W;f defined
in (6.1) satisfies the identity
                               p
                        x ‰/ D
                      i .A
          W;f D         1
                                    P .. 1 /F2 /
                         4
                           C tf2
                                2g Z
                          1 X                       dz X
                    C 1                .R 0 f /.z/         .A/hŒCA .q/; !j icap :
                       4
                         C tf2 j D1 Cj             Im.z/ C
                                                              A2ClD

Expressing the class ŒCA .q/ 2 H1 .X0 .q/; R/ in terms of the Hecke basis defined in Sec-
tion 5.1.1 and recalling definition (5.3) gives
  X
       .A/hŒCA .q/; !j icap
    C
A2ClD

        1                                            Z
                 X        X 11               X                                       Z               
   D                       i 2 hvh˙ ; !j icap   .A/                      h.z/ dz ˙            h.z/ dz :
        2                                                        CA .q/               CA .q/
            h2B2hol .0 .q// ˙                     C
                                               A2ClD

Combining this, the result follows from Lemma 6.7 as well as the explicit form of Wald-
spurger’s formula for h 2 B2hol .q/ due to Popa [58, Theorem 6.3.1], namely
                                                ˇ2  p
                                                      D 1
                 ˇ X           Z                                       
                         .A/           h.z/ dz ˇ D      L   ; h ˝ ‚    :
                 ˇ                              ˇ
                                                                     
                                                                     x
                                                    4 2   2
                 ˇ
                       C         CA .q/
                       A2ClD

   The proof of Proposition 6.5 is a little simpler, since we can circumvent the adèlic
formulation of this Weyl sum.

Proof of Proposition 6.5. From [19, (7.3)], we have that
                                                              sC1 2
                                       dz                s .    / L.s; /
          X          Z
                                                               2
               .A/      .R0 E/.z; s/       D .1 .J //D 2
             C        CA              Im.z/                 .s/ .2s/
            A2ClD

for Re.s/ > 1. Via analytic continuation, this identity extends to s D 21 C i t . The result
then follows via Lemma 6.10.


6.7. Weyl sums for oldforms
Finally, we show that Weyl sums for oldforms are essentially equal to Weyl sums for the
associated newform of lower level. We define for a Hecke–Maaß newform f of weight 0
and level 1 and a narrow class character ,
                                             Z
                          `;q
                                  X
                        W;f WD         .A/       f .`z/ d.z/                  (6.16)
                                          C          FA .q/
                                      A2ClD
P. Humphries, A. C. Nordentoft                                                                     5168


and similarly for the Eisenstein series E.; 12 C i t / for nH,
                                                           1
                                         Z                      
                      `;q
                              X
                    W;t  WD        .A/         E `z; C i t d.z/:                               (6.17)
                                  C       FA .q/           2
                                       A2ClD

               1;q
We also write W;f D W;f for f a Hecke–Maaß newform of level q.
Lemma 6.11. Let q be an odd prime and let g denote the genus of X0 .q/. Let ` j q and
           C
let Al 2 ClD denote the narrow ideal class containing the oriented ideal
                                             p i
                                   h      r    D
                                    lI `;          :                            (6.18)
                                             2
Then for a Hecke–Maaß newform f of weight 0 and level 1 and a narrow class charac-
ter ,
                                 Z
         `;q
                       X
       W;f D .Al /       .A/      f .z/ d.z/
                                   C            FA
                               A2ClD
                               2g Z
                               X                        dz X
                  C ı`;q                 .R0 f /.`z/           .A/hŒCA .q/; !j icap :           (6.19)
                                                       Im.z/
                               j D1 Cj                       C
                                                              A2ClD

Similarly, for the Eisenstein series E.z; 21 C i t / for nH,
                               Z       1         
     `;q
                    X
  W;t   D .Al /        .A/       E z; C i t d.z/
                       C        FA       2
                        A2ClD
                        2g Z 
                        X                  1       dz X
           C ı`;q                 .R0 E/ `z; C i t          .A/hŒCA .q/; !j icap : (6.20)
                               Cj           2       Im.z/
                        j D1                              C
                                                                   A2ClD

    Note that although r is only defined modulo 2q, the oriented ideal (6.18) is well
defined since it contains ` and hence also q.

Proof of Lemma 6.11. We give the proof for (6.19); the same method yields (6.20). Let
QD Œa; b; c2QD .q/ be a Heegner form associated to the oriented closed geodesic CA .q/.
Since CA .q/ is the reduction modulo 0 .q/ of the geodesic segment from zQ to Q zQ , as
in (2.6), Lemma 6.10 together with the change of variables
                                                 p       !
                            1                      ` 0
                    z 7! g` z; where g` WD             1    2 SL2 .R/;
                                                  0   p
                                                                         `

implies that
                                                           Z g` Q zQ
                                              1                                  dz
 X         Z                                       X
     .A/               f .`z/ d.z/ D 1         2
                                                      .A/           .R0 f /.z/
    C          FA .q/                       4
                                              C tf  C       g` zQ               Im.z/
A2ClD                                                A2ClD
                                                2g Z
                                                X                        dz X
                                            C             .R0 f /.`z/           .A/hŒCA .q/; !j icap :
                                                                        Im.z/
                                                j D1 Cj                       C
                                                                              A2ClD
Sparse equidistribution of geometric invariants of real quadratic fields                 5169


The Heegner form associated to the geodesic segment from g` zQ to g` Q zQ , as in Sec-
tion 2.4, is Q` WD Œ a` ; b; c` 2 QD . q` /. We claim that the narrow ideal class associated
to Q` is Al 1 A, from which (6.19) follows. From (2.2), this is implied by the fact that
               a               p                  p                   p
                           b      D              r     D              b      D
               Z CZ                   Z` C Z                D Za C Z
                  `            2                     2                    2
if a > 0, and similarly
     ap                       p                      p                               p
              D                b D        r             D       p       D            b D
    Z    D CZ                        Z` C Z                 D Z. a D/ C Z
       `                       2                        2                              2
if a < 0. Finally, if ` D 1, then the fact that Cj is fixed by an order 2 matrix in  implies
that
                                                   dz
                                  Z
                                      .R0 f /.z/         D 0:
                                   Cj            Im.z/


7. Sparse equidistribution in the level aspect

7.1. Explicit orthonormal bases
In order to prove Theorem 1.1, we require the spectral decomposition of L2 .0 .q/nH/.
This decomposition involves three parts: the residual spectrum, consisting of the constant
function; the cuspidal spectrum, spanned by Hecke–Maaß cusp forms; and the continuous
spectrum, spanned by incomplete Eisenstein series.
    For the cuspidal spectrum, we may choose an orthonormal basis of this subspace
consisting of certain linear combinations of oldforms and newforms.
Lemma 7.1 ([38, Lemma 3.1]). Let q be squarefree. An orthonormal basis of C0 .0 .q//
with respect to the inner product
                                        Z
                         hf1 ; f2 iq WD   f1 .z/f2 .z/ d.z/
                                             0 .q/nH

is given by
                    ¹f` 2 C0 .0 .q// W f 2 B0 .0 .q1 //; q1 q2 D q; ` j q2 º;
where B0 .0 .q1 // denotes an orthonormal basis of Hecke–Maaß newforms f of weight 0
and level q1 with respect to the inner product h; iq1 , while f` is associated to f 2
B0 .0 .q1 // by
                                      '.`/  12 X .v/ .w/f .w/
              f` .z/ WD L` .1; ad f /                      p       f .vz/:
                                      `.q2 /       v        w
                                                     vwD`

Here for ` − q1 ,
                                   Y                        1
                L` .s; ad f / WD                                                   :
                                         1   f .p 2 /p s C f .p 2 /p 2s   p 3s
                                   pj`
P. Humphries, A. C. Nordentoft                                                            5170


   A similar construction is valid for the continuous spectrum by choosing an orthonor-
mal set of Eisenstein series.
Lemma 7.2 ([65, Section 8.4]). Let q be squarefree. An orthonormal basis of the vector
space of Eisenstein series of weight 0 and level q is given by
                                 °  1                  ±
                                  E` ; C i t W ` j q ;
                                        2
where
   1           .1 C 2i t / .1
                  `            `              2i t /  21 X .v/ .w/.w; t /    1     
E` z; C i t WD                                                      p        E vz; C i t :
      2                   .q/                               v        w           2
                                                             vwD`

Here
                                                   Y           1
                                       ` .s/ WD                    :
                                                         1      p s
                                                   pj`



7.2. Averaged bounds for regularised integrals
We require bounds in terms of q for the integrals of both Maaß cusp forms and Eisenstein
series over the sides of P .q/. In order to bound the regularised integrals that show up in
the Weyl sums, we start by showing a useful lemma: all the hyperbolic sides of P .q/ can
be brought to a standard form under the action of the Atkin–Lehner operator

                                                   p1
                                                       !
                                             0       q
                                   Wq D p                ;
                                              q    0

as in (2.7), and 0 .q/.
                                                                                     a
Lemma 7.3. Let L be a hyperbolic side of P .q/ with endpoints abii and bii C1
                                                                           C1
                                                                              . There exists
a unique element L 2 0 .q/ such that
                                     °                  v±
                          L Wq L D z 2 H W Re.z/ D
                                                        q
for v 2 ¹1; : : : ; q   1º satisfying vbi C1  bi .mod q/. Moreover, v uniquely determines L.

Proof. Let v 2 ¹1; : : : ; q    1º be such that vbi C1  bi .mod q/ (note that .bi C1 ; q/ D 1)
and define
                                                         biC1 v bi
                                                                     !
                                    ai C1 v       ai         q
                             L WD                                        2 0 .q/:
                                        ai C1 q              bi C1
Then the fact that ai C1 bi      ai bi C1 D 1 implies that
                                       ai C1                         ai  v
                                L Wq         D 1;             L Wq      D ;
                                       bi C1                         bi  q
as desired.
Sparse equidistribution of geometric invariants of real quadratic fields                   5171

                                                                            a
    To show uniqueness, we suppose that L     0                  C1
                                                Wq also maps bii C1 to 1 and abii to qv .
        0    1                   0   1
Then L L 1 D 1,       so that0 L1 vL 2 1 , and hence there exists some n 20 Z such
      0    1     1 n
that L L D 0 1 . Since L L q 2 .0; 1/, we must have that n D 0, so that L D L .
    Finally, if we have two hyperbolic sides L and L0 such that
                                                           0     0
                                             L Wq L D      L Wq L ;

then by applying Wq 1 and using that Wq normalises 0 .q/, we conclude that L and L0
are 0 .q/-equivalent. This implies that bi bi  C1  bi C1 bi  .mod q/. But we also have
bi bi   biC1 bi  C1 .mod q/, which implies bi2 C bi2C1  0 .mod q/, and thus L D L0
is an even side, contrary to the assumption.

    We start by bounding the cuspidal case.
Lemma 7.4. Let q be an odd prime and let L be a hyperbolic side of P .q/. Then for
q1 q2 D q, we have that
                 1      X    ˇZ               dz ˇˇ2
                             ˇ .R0 f /.q2 z/       ˇ " q " T 3C" :          (7.1)
                             ˇ
                q2             L            Im.z/
                          f 2B0 .0 .q1 //
                             jtf jT


Proof. We make the change of variables z 7! Wq 1 L1 z, where L 2 0 .q/ is as in
Lemma 7.3. As gq2 Wq 1 Wq1 2 0 .q1 /, we have via Lemma 7.3 that
                                                             Z i1
                                         dz                                       dz
                    Z
                          .R0 f /.q2 z/       D f .q1 /            .R0 f /.z/         ;
                        L               Im.z/                  v
                                                               q
                                                                                 Im.z/

where f .q1 / 2 ¹1; 1º is the Atkin–Lehner eigenvalue of f under the action of Wq1 .
So upon defining
                                      Z i1
                         v        1                        1  dz
                  ƒ s; f;    WD q s 2      .R0 f /.z/ Im.z/s 2
                          q            v
                                       q
                                                               Im.z/

for s 2 C and recalling Lemma 7.1, we deduce that the left-hand side of (7.1) is equal to
                           1       X      ˇ 1       v ˇˇ2
                                          ˇƒ ; f;        ˇ :                        (7.2)
                                          ˇ
                           q2      
                                               2     q
                                        f 2B0 .0 .q1 //
                                           jtf jT

    Let vx 2 ¹1; : : : ; q    1º be such that vxv  1 .mod q/. Then
                                    v     iy            vx      i 
                             .R0 f /   C        D .R0 f /      C
                                     q      q                q    qy

via the automorphy of R0 f , namely .R0 f /. z/ D j .z/2 .R0 f /.z/ with

                         v vxvq 1
                                  !
                                                           vx     i
                    D               2 0 .q/ and z D          C     :
                         q     vx                          q     qy
P. Humphries, A. C. Nordentoft                                                                         5172


This yields the functional equation
                      Z 1                                                   vx
             v                    v      iy  s             1                   iy  1 s  dy
     ƒ s; f;      Di         .R0 f /     C      y              2     .R0 f /     C     y2
              q        1              q      q                                q     q         y
                                    vx 
                  D ƒ 1 s; f;             ;                                                            (7.3)
                                     q
noting that the integral represents an entire function. Moreover, for Re.s/ > 1, we may
insert the Fourier expansion (4.8) for R0 f in order to see that
                                               1
               v                                 f .n/  nv  1                                 dy
                                                              Z
                                          1   X                                               1
       ƒ s; f;    D        if .1/q s     2
                                                     s
                                                        e         W1;i tf .4y/y s            2
               q                              nD1
                                                    n      q    0                                 y
                                         1
                                         X  f .n/  nv 
                                               1
                        C i f f .1/q s       2    e
                                        nD1
                                              ns        q
                             Z 1
                                  1                        1 dy
                                   C tf2 W 1;i tf .4y/y s 2    :                                     (7.4)
                              0   4                           y
From (4.22) and (4.23), the first integral above is
      s C 1 C it  s C 1 it  1                  1  s  s C i tf   s i tf 
                  f                   f
  s                                    C    s                              ; (7.5)
             2                  2            2      2          2           2
while the second is
        s C 1 C it  s C 1 it                   1          1  s  s C i tf   s i tf 
                    f          f
  s                                                s                                   : (7.6)
              2             2                      2           2          2           2
   With this in hand, we derive the approximate functional equation for ƒ. 12 ; f; qv /,
namely the identity
                              1
  1    v  if .1/ X    11 X  .n/  
                                 f        nv     nxv   n 
 ƒ ; f;    D p        f 2      p    e ˙      Ce       V˙ ; tf ; (7.7)
   2    q                   nD1
                                   n      q         q       q
                            ˙

                                      7
where for x > 0, t 2 R [ i Œ            ; 7 , and  > 0,
                                      64 64
                       Z  Ci 1            
                 1                     s s2   s    3  it   s      3 it 
  V˙ .x; t / WD                   x     e      C C            C
                2 i     i1                  2    4  2       2     4   2
                                                                               
                                              s   s  1    it     s   1 i t  ds
                                           ˙        C C             C            : (7.8)
                                              2 2     4     2       2   4  2     s
To see this, consider
         Z Ci1                                                    Ci 1
     1                1         v  s 2 ds           1                       1         v  s 2 ds
                                                           Z
                  ƒ     C s; f;    e                                        ƒ   C s; f;    e           (7.9)
   2 i  i1          2         q       s           2 i            i1       2         q        s

with  > 21 . This is equal to the left-hand side of (7.7) simply by shifting the first contour
of integration from Re.s/ D  to Re.s/ D  , which picks up a residue at s D 0 equal to
ƒ. 21 ; f; qv /. On the other hand, this is equal to the right-hand side of (7.7) by first using
Sparse equidistribution of geometric invariants of real quadratic fields                 5173


the functional equation (7.3) for the second integral and making the change of variables
s 7! s, and then inserting expression (7.4) for ƒ. 12 C s; f; qv / and ƒ. 12 C s; f; qvx /,
interchanging the order of summation and integration, and recalling (7.5) and (7.6).
    Next, we note that by (4.5) and Stirling’s formula, we have that for any A > 0,
                              8 1
                              <q 2 C" .1 C jtf j/ 12 C"        for x  1 C jtf j,
                                 1
         f .1/V˙ .x; tf / "      1
                              : 2 C"                  1
                                q1     .1 C jtf j/AC 2 C" x A for x  1 C jtf j.

Here we have used the fact that

                                L.1; ad f / " .q1 .1 C jtf j// " I
                                                                         25
additionally, for x  1 C jtf j, we have shifted the contour to Re.s/ D 64  C ", while we
have shifted the contour to Re.s/ D A for x  1 C jtf j. This bound shows that the portion
of the sum over n 2 N in (7.7) for which n  .q.1 C jtf j//1C" is negligibly small.
    The result now follows by inserting the approximate functional equation (7.7)
into (7.2), dividing the sum over n 2 N in (7.7) into dyadic ranges, and applying the
spectral large sieve, namely the well-known bound
                X        ˇX              ˇ2                            X
                                an f .n/ˇ " .q1 T N /" .q1 T 2 C N /    jan j2 :
                         ˇ               ˇ
                         ˇ
            f 2B0 .0 .q1 // nN                                          nN
               jtf jT

    An analogous result holds for Eisenstein series.
Lemma 7.5. Let q be an odd prime and let L be a hyperbolic side of P .q/. Then we
have that
             1 T ˇˇ               1      dz ˇ2
               Z     Z        
                        .R0 E/ qz; C i t         ˇ dt " q " T 3C" :
                                                 ˇ
            q T L                  2
                   ˇ
                                           Im.z/
Proof. For Re.s/ > 1, we define

                                                 e
                                         Z i1
                        v          1
                                                       1                 1    dz
              ƒ s; E t ;    WD q s   2          .R0 E/ z; C i t Im.z/s     2         ;
                         q                v
                                          q
                                                         2                     Im.z/

         e
where .R0 E/.z; 21 C i t / is as in (4.12). The automorphy of .R0 E/.z; 12 C i t / implies the
functional equation

                                     e
                         Z 1
                v                      v        iy 1           1
      ƒ s; E t ;    Di           .R0 E/       C ; C i t ys 2
                 q         1               q        q  2
                                     e
                                   .R0 E/
                                           vx
                                               q
                                                      iy 1       1  dy
                                                   C ; C it y 2 s
                                                       q 2                y
                            X 1           .1 ˙ 2i t / 1  1                1       
                      Ci             ˙ it                 q 2 i t
                                   2         .1 C 2i t /          s ˙ it   1 s ˙ it
                              ˙
                                           vx 
                    D ƒ 1 s; E t ;               :
                                            q
P. Humphries, A. C. Nordentoft                                                            5174


Note that the first integral is entire, while the second term, which arises from the constant
terms in the Fourier expansion of .R0 E/.z; 12 C i t /, is meromorphic with simple poles at
s D 1 ˙ i t and s D i t and a zero at s D 12 . Furthermore, for Re.s/ > 1, we have that
                                   1       1
                 v            qs 2          .n; t /  nv  1                       dy
                                                           Z
                                          X                                      1
      ƒ s; E t ;    D    i                           e         W1;i t .4y/y s   2
                 q           .1 C 2i t / nD1 ns        q    0                       y
                                 1       1
                              qs 2      X   .n; t/  nv 
                        Ci                          e
                           .1 C 2i t / nD1 ns          q
                            Z 1
                                  1                        1 dy
                                    C t 2 W 1;i t .4y/y s 2    I
                             0    4                            y
these integrals are explicitly calculated in (7.5) and (7.6). Finally, the approximate func-
tional equation in this setting reads
 1                              1
         v        i         X X    .n; t /   nv     nxv   n 
ƒ ; Et ;    Dp                      p        e ˙     Ce       V˙ ; t ;
  2      q     .1 C 2i t /    nD1
                                       n          q        q       q
                                     ˙

where V˙ .x; t / is as in (7.8). This follows by the same method as for Hecke–Maaß
newforms, namely considering integral (7.9) with f replaced by E t ; although there are
additional poles of the integrand at s D 21 ˙ i t and s D 12  i t , these ultimately can-
cel out.
    The same approach as for the Hecke–Maaß form case shows that the left-hand side
of (7.1) is equal to
                                1 T ˇˇ  1         v ˇˇ2
                                  Z
                                       ˇƒ ; E t ;      ˇ dt:
                                q T        2       q
The result once more follows from the spectral large sieve, which states that
               Z T ˇX                ˇ2                         X
                          an .n; t /ˇ dt " .T N /" .T 2 C N /     jan j2 :
                   ˇ                 ˇ
                   ˇ
                  T   nN                                        nN



7.3. Proof of Theorem 1.1
Proof of Theorem 1.1. Let uW H ! R be a smooth compactly supported function such that
no two points of the support of u are -equivalent. This gives rise to a smooth compactly
supported function U.z/W nH ! R given by
                                            X
                                   U.z/ WD      u. z/:
                                               2

For each odd prime q, choose !q 2 = 0 .q/ and define
                                            ´
                           X                  U.z/ if z 2 !q 1 nH,
                Uq .z/ WD        u.!q z/ D
                          2 .q/
                                              0      otherwise.
                                 0
Sparse equidistribution of geometric invariants of real quadratic fields                             5175


Via Lemmata 7.1 and 7.2, the spectral expansion of Uq .z/ reads
                 1
                          Z                       X X              X
  Uq .z/ D                      U.z/ d.z/ C                                    hUq ; f` iq f` .z/
           vol.0 .q/nH/ nH                    q1 q2 Dq `jq2 f 2B  .0 .q1 //
                                                                  0

              1 X 1D               1                1
                     Z                      E                   
           C               Uq ; E` ; C i t E` z; C i t dt:
             4        1              2        q         2
                        `jq

Then by character orthogonality and Lemma 6.11, the quantity
                       vol.0 .q/nH/    X Z
                    P                               Uq .z/ d.z/;
                       A2GD vol.FA .q//      FA .q/     A2GD

               C 2                              C
where GD D C.ClD / 2 GenD is a genus with C 2 ClD , is equal to the sum of the
contribution from the residual spectrum,
                                    Z
                                                        U.z/ d.z/;
                                                  nH

the contribution from the cuspidal spectrum,
                                                                           p
    vol.0 .q/nH/         1                  X              X          X    '.`1 `2 /.`1 /.`2 /f .`2 /
                                                  .C /
                                              b
                        !.D/ 1                                                      3
 P
    A2GD vol.F A .q// 2                                 q1 q2 Dq `1 `2 jq2
                                                                                        p
                                                                                  `12 `2 .q2 /
                                           2GenD
                               q
                                                                     `1 ;q
                 X
                                  L`1 `2 .1; ad f /hUq ; f`1 `2 iq W;f   ;
           f 2B0 .0 .q1 //

and the contribution from the continuous spectrum,
                vol.0 .q/nH/       1                   X               X .`1 /.`2 /.`2 ; t /
                                                               .C /
                                                         b
                                  !.D/ 1
             P                                                                  p
                A2GD vol.FA .q// 2                                     ` ` jq
                                                                              `1 `2 .q/
                                                     2GenD            1 2
                               Z 1
                       1                                 D            1      E
                                                                                   `1 ;q
                                    j`1 `2 .1 C 2i t /j Uq ; E`1 `2 ; C i t W;t      dt:
                      4           1                                    2        q

      1
Here GenD is the group of genus characters, namely characters that are trivial on .ClD C 2
                                                                                        / ,
                        `;q         `;q
while the Weyl sums W;f and W;t are as in (6.16) and (6.17).
    We fix " > 0 and break up the contributions from the cuspidal and continuous spectra
into two parts: the contributions for which jtf j; jt j  D " and their complements. These
complementary contributions are negligibly small, since for any nonnegative integer A,
we have that
                                        D        1        E
    hUq ; f` iq U;A .1 C jtf j/ A ;     Uq ; E` ; C i t       U;A .1 C jt j/ A ;  (7.10)
                                                   2          q

which follows by repeated integration by parts (see, for example [49, (6.1)]). Thus from
the Cauchy–Schwarz inequality,
         ˇ vol. .q/nH/        X Z                          Z                 ˇ2
                  0
                                            Uq .z/ d.z/         U.z/ d.z/ˇ
         ˇ                                                                    ˇ
         ˇP
            A2GD  vol.FA .q//        FA .q/                  nH
                                           A2GD
P. Humphries, A. C. Nordentoft                                                             5176


is bounded by the sum of two terms plus a negligibly small term. These two terms are
those for which jtf j  D " and jt j  D " . By Bessel’s inequality, these two terms are
                          vol. .q/nH/ 2 X X                              1 `;q 2
                                 0
                                                                   X
  " D " q " jhU; U i1 j2 P                                                  jW j (7.11)
                           A2GD  vol.F A .q//
                                                             b     
                                                                            ` ;f
                                                         2GenD q1 `jq f 2B0 .0 .q1 //
                                                                          jtf jD "

and
                           vol. .q/nH/ 2 X X 1 Z D "
                                 0
   " D " q " jhU; U i1 j2 P                            jW `;q j2 dt;                     (7.12)
                            A2GD vol.FA .q//
                                                   b
                                                ` D " ;t
                                                             2GenD   `jq



                                                   1
respectively.
    We recall that the set of genus characters  2 G en is indexed by ordered pairs of
                                                                      D
fundamental discriminants .D1 ; D2 / such that D1 D2 D D; each genus character  is
then associated to the pair of primitive quadratic Dirichlet characters D1 and D2 modulo
jD1 j and jD2 j, respectively. Note that ‚ is an Eisenstein series, so that L.s; f ˝ ‚ / D
L.s; f ˝ D1 /L.s; f ˝ D2 / and L.s; ‚ / D L.s; D1 /L.s; D2 /.
    For `q1 j q and f 2 B0 .0 .q1 //, we deduce from Proposition 6.1 and Stirling’s for-
mula (6.2) applied to the geodesic term, as well as the Cauchy–Schwarz inequality applied
to the topological terms, that
                                  p
                   `;q 2            D        L. 12 ; f ˝ D1 /L. 21 ; f ˝ D2 /
              jW;f j "
                             q1 .1 C jtf j/3              L.1; ad f /
                                        p           2g
                                           D                               dz ˇˇ2
                                                   Xˇ  ˇ Z
                          C ıq1 `;q                           .R0 f /.`z/
                                    .1 C jtf j/4
                                                       ˇ                        ˇ
                                                           Cj             Im.z/
                                                      j D1
                                 2g
                                 X         X             X
                                                             jhvh˙ ; !j icap j2
                                 j D1 h2B hol .0 .q//   ˙
                                         2
                                      X              1         1        
                                                   L ; h ˝ D1 L ; h ˝ D2 ;             (7.13)
                                                      2           2
                                 h2B2hol .0 .q//

and similarly
                                 p
                  `;q 2        D ˇˇ L. 21 C i t; D1 /L. 12 C i t; D2 / ˇˇ2
                jW;t j "
                          .1 C jt j/3             .1 C 2i t /
                                      ˇ                                   ˇ
                                      2g ˇ Z
                               p X                       1        dz ˇ2
                         C ı`;q D              .R0 E/ `z; C i t
                                         ˇ                                  ˇ
                                                          2
                                         ˇ                                  ˇ
                                            Cj                      Im.z/
                                         j D1
                                 2g
                                 X         X             X
                                                             jhvh˙ ; !j icap j2
                                 j D1 h2B hol .0 .q// ˙
                                           2
                                      X              1         1        
                                                   L ; h ˝ D1 L ; h ˝ D2 :             (7.14)
                                                      2           2
                                 h2B2hol .0 .q//
Sparse equidistribution of geometric invariants of real quadratic fields                5177


    We first bound the portions of (7.11) and (7.12) coming from the first terms on the
right-hand sides of (7.13) and (7.14), namely the geodesic terms. We use Hölder’s inequal-
ity with exponents .3; 3; 3/ together with the Weyl law upper bound
                                       X
                                               1  T 2 q1
                                      f 2B0 .0 .q1 //
                                         jtf jT

and with the third moment bounds
                             X              L. 21 ; f ˝ D /3
                                                              " D 1C" q11C" T 1C" ;   (7.15)
                                              L.1; ad f /
                       f 2B0 .0 .q1 //
                        T 1jtf jT
                  Z            ˇ L. 1 C i t;  /3 ˇ2
                               ˇ 2            D ˇ
                                                  ˇ dt " D 1C" T 1C" :                (7.16)
                                   .1 C 2i t /
                               ˇ
                    T 1jt jT

The sixth moment bound (7.16) is [64, Theorem 1]. The third moment bound (7.15) with
T 1C" replaced by T A for some unspecified large constant A was proven for holomorphic
cusp forms by Petrow and Young [56, Theorem 1]; it was then improved to form (7.15)

                                                                          1
in [4, Theorem 4.1] and in a more general form in [25, Theorem 11.1], which both also
recover bound (7.16). Combining this with the fact that jGenD j D 2!.D/ 1 " D " , and
that the lower bound for the volume vol.FA .q// coming from (3.9), we obtain the bounds
         1
O" .D 6 C" q 2C" / for these terms.
    We next bound the portions of (7.11) and (7.12) coming from the second terms on
the right-hand sides of (7.13) and (7.14), namely the topological terms. For the innermost
sum over h 2 B2hol .0 .q//, we use Hölder’s inequality with exponents .3; 3; 3/ together
with the dimension upper bound jB2hol .0 .q//j  q and the third moment bound
                              X                 1              3
                                            L        ; h ˝ D        " D 1C" q 1C"
                                                 2
                         h2B2hol .0 .q//

due to Petrow and Young [56, Theorem 1] (see also [25, Theorem 11.1]). Next, we want
to apply the L2 -bound for the cap product pairing derived by the second author [54, The-
orem 6.1] which applies to (dual bases of) basic bases of homology in the terminology
of [54]. These are bases of the vector space H1 .Y0 .q/; R/ consisting of classes contain-
ing the geodesic connecting z and z, where 2 0 .q/ and 1 D qv with 0 < v < q.
Lemma 7.3 implies that indeed

                                           Wq ŒC1 ; : : : ; Wq ŒC2g 

is the projection to the homology H1 .X0 .q/; R/ of a basic basis, where Wq denotes the
Atkin–Lehner involution acting on homology. Since Wq is self-adjoint with respect to the
cap product pairing and Wq h.z/ D h .q/h.z/, where h .q/ 2 ¹1; 1º is the Atkin–Lehner
eigenvalue of h 2 B2hol .0 .q//, we get

                               jhvh˙ ; !j icap j2 D jhvh˙ ; Wq !j icap j2 :
P. Humphries, A. C. Nordentoft                                                         5178


Since Wq commutes with taking dual bases (using that Wq is self-adjoint), we conclude
by [54, Theorem 6.1] the bound
                       2g
                       X         X       X
                                                jhvh˙ ; !j icap j2 " q 2C" :
                      j D1 h2B hol .0 .q// ˙
                                 2


As discussed in [54, Section 6], this should be viewed as a homological version of the
sup-norm problem.
    Finally, we apply Lemmata 7.4 and 7.5 to bound the remaining second moment of in-
                                                                               1
tegrals along the hyperbolic sides Cj . Combined, this yields the bounds O" .D 6 C" q 6C" /
for these terms.
    We deduce that
                       vol.0 .q/nH/      X Z
                    P                                  Uq .z/ d.z/
                      A2GD vol.FA .q// A2G      FA .q/
                                             D
                            Z
                                                            1
                         D         U.z/ d.z/ C OU;" .D 12 C" q 3C" /:             (7.17)
                                 nH

                                                        1
We improve the error term in (7.17) to O" .D 4 C" q 3C" / under the assumption of the
generalised Lindelöf hypothesis by invoking the conditional bounds

                   L. 12 ; f ˝ D1 /L. 12 ; f ˝ D2 /
                                                      " .Dq1 .1 C jtf j//" ;
                               L.1; ad f /
                     1            1             
                   L ; h ˝ D1 L ; h ˝ D2 " .Dq/" ;
                       2                 2
                ˇ L. 1 C i t;  /L. 1 C i t;  / ˇ2
                ˇ 2            D1    2         D2 ˇ
                                                  ˇ " .D.1 C jt j//" ;
                             .1 C 2i t /
                ˇ

and using the Weyl law instead of applying Hölder’s inequality.
    We are almost able to deduce Theorem 1.1 upon taking u.z/ to closely approximate
a fundamental domain of nH. There is one remaining obstacle, namely that we are
assuming that u is compactly supported, and so we have not precluded the possibility of
the escape of mass in this equidistribution problem.
    We circumvent this by performing a dyadic partition of unity and choosing u to be
a function of the form u.z/ WD ıRe.z/2Œ0;1 ‰. Im.z/
                                                 Y
                                                     /, with Y > 1 a large parameter and
‰W .0; 1/ ! R a smooth bump function equal to 1 on Œ1; 2 and vanishing outside Œ 12 ; 52 .
We use the same framework as above except that bounds (7.10) are replaced by
                                D         1       E          1
              hUq ; f` iq D 0;   Uq ; E` ; C i t       ‰ Y 2 .1 C jt j/ A
                                            2         q

for any A > 0. These follow by inserting the Fourier expansions (4.2) and (4.10): the cusp
form term vanishes since there is no constant term in the Fourier expansion, while for the
Eisenstein case, we make the change of variables y 7! Yy and then repeatedly integrate
by parts. Thus there is no contribution from the cuspidal spectrum, while we bound the
Sparse equidistribution of geometric invariants of real quadratic fields                5179


contribution from the continuous spectrum using the same bounds as above. In this way,
we find that
                     vol.0 .q/nH/     X Z
                  P                                 Uq .z/ d.z/
                    A2GD vol.FA .q// A2G     FA .q/
                                         D
                        Z
                                                            1    3
                     D        U.z/ d.z/ C OU;" .Y 1 D 12 C" q 2 C" /:
                             nH

This yields the desired result.

Remark 7.6. Instead of proceeding via Hölder’s inequality together with bounds for the
third moments of L-functions, it is tempting to try to directly bound the moments
                              X             L. 21 ; f ˝ D1 /L. 12 ; f ˝ D2 /
                                                                               ;
                                                        L.1; ad f /
                        f 2B0 .0 .q1 //
                           jtf jD "
                             X                 1           1        
                                           L      ; h ˝ D1 L ; h ˝ D2 ;
                                                2             2
                        h2B2hol .0 .q//
                        Z D" ˇ 1                   1
                             ˇ L. 2 C i t; D1 /L. 2 C i t; D2 / ˇ2
                                                                  ˇ
                                                                  ˇ dt;
                                          .1 C 2i t /
                             ˇ
                          D"

via approximate functional equations, the Kuznetsov and Petersson formulæ, and the
Voronoı̆ summation formula (or equivalently two applications of the Poisson summation
formula). Work of Holowinsky and Templier [35, Theorem 1] suggests that it should
                                                                            1
be possible via this approach to bound each of these by O" .q 1C" C D 2 C" / (cf. [38,
Remark 6.2]). Unfortunately, this falls just shy of being sufficient for our purposes; we
                                          1
instead require a bound of the form O.D 2 ı / for some ı > 0. This is a level-aspect ana-
logue of the obstacle discussed in [39, Section 8] connecting small-scale equidistribution
to sub-Weyl subconvexity.
Remark 7.7. Liu, Masri, and Young [49, Theorem 1.4] have proven the equidistribution
of level q Heegner points in translates !pq 1 nH for odd negative fundamental discrimin-
ants D and for primes q that split in Q. D/ as q. D/ tends to infinity under the proviso
                                        1
that q  . D/ı for some fixed ı < 20      . The method of proof of Theorem 1.1 may be used
to strengthen this result to relax the condition on q to be squarefree, D to be any negative
                                                                                          1
fundamental discriminant (not necessarily odd), and q  . D/ı for some fixed ı < 12         .
Moreover, an analogous result can also be shown to hold for the equidistribution of level
q closed geodesics. The input for this improvement is the usage of the Weyl-strength third
moment bounds (7.15) and (7.16) in place of Burgess-strength pointwise bounds
                               1                      3    1
                             L ; f ˝ D  tf ;" D 8 C" q 2 C" ;
                                 2
                               1                     3
                             L     C i t; D  t;" D 16 C" :
                                 2
P. Humphries, A. C. Nordentoft                                                            5180


8. Sparse equidistribution in the subgroup aspect

Proof of Theorem 1.2. Via the Weyl equidistribution criterion together with the lower
bound (3.9) for vol.FA .q// and the orthonormal bases for the cuspidal and continuous
spectra given in Lemmata 7.1 and 7.2, it suffices to show that for each q1 j q, ` j qq1 , and
f 2 B0 .0 .q1 //, and for each t 2 R,
                       X Z                                jH j pDL.1;  / 
                                                                         D
                                    f .`z/ d.z/ D oq;tf     C
                                                                               ;
                                                            hD    log D
                      A2CH FA .q/
             X Z                 1                    jH j pDL.1;  / 
                                                                        D
                           E `z; C i t d.z/ D oq;t C                        ;
                    FA .q/        2                       hD     log D
           A2CH

                                                           C
                                                                            p
where we have used the narrow class number formula hD        log D D           DL.1; D /. Via
character orthogonality, these expressions are respectively equal to
                     jH j X      `;q            jH j X      `;q
                       C
                             x /W;f
                             .C     ;            C
                                                        x /W;t
                                                        .C     ;
                      hD   ?
                                                 hD   ?
                          2H                         2H

                         `;q       `;q
where the Weyl sums W;f     and W;t  are as in (6.16) and (6.17). From Lemma 6.11 and
Propositions 6.1 and 6.5, we have that
   `;q 2
                p  1                     X  1                     1        
jW;f j q;tf D L ; f ˝ ‚ C                         L ; h ˝ ‚ C L ; h ˝ ‚x         ;
                         2                    hol
                                                        2                 2
                                           h2B2 .q/

  `;q 2
            p ˇˇ  1          ˇ2            X  1           1         
jW;t j q;t D ˇL     C i t; ‚ ˇ C               L ; h ˝ ‚ C L ; h ˝ ‚x     :
                                ˇ
                    2                         hol
                                                    2            2
                                           h2B2 .q/

                                                    1
Theorem 1.2 thereby holds unconditionally for ı < 2826  due to the subconvexity estimates
                          1                         1   1
                        L ; f ˝ ‚ q1 ;tf ;" D 2 1413 C" ;                          (8.1)
                           2
                          1                   1    1
                        L ; h ˝ ‚ q D 2 1057 ;                                     (8.2)
                            2
                          1                   1   1
                        L     C i t; ‚  t D 4 1889 ;                               (8.3)
                           2
                                      hC
combined with the fact that jH ? j D jHDj , and the (ineffective) Siegel bound L.1; D / "
D " . When  is not a genus character, so that ‚ is a cusp form, the first bound above
is due to Harcos and Michel [32, Theorem 1] (see additionally [31, Theorem 1.3]), the
second is due to Michel [52, Theorem 2], while the third is due to Blomer, Harcos, and
Michel [9, Theorem 2]. When  is a genus character, then stronger bounds are known via
the work of Petrow and Young [56, Theorem 1].
    We obtain Theorem 1.2 for ı < 14 under the assumption of the generalised Lindelöf
hypothesis, since this implies the stronger bounds
                  `;q 2                1                `;q 2           1
                jW;f j q;tf ;"  D 2 C"     and     jW;t j q;t;" D 2 C" :
Sparse equidistribution of geometric invariants of real quadratic fields               5181


Remark 8.1. Improvements of bound (8.3) exist in the literature (see, for example, [10,
Theorem 1] for D prime); the obstacles in unconditionally enlarging the range of ı in
Theorem 1.2 are improvements of bounds (8.1) and (8.2).
                                                                                        C
    In [19, Section 4], it is observed that Theorem 1.2 is trivial when q D 1 and H D ClD
is the whole narrow class group, for then for every fixed continuity set B  0 .q/nH,
we have the equality
                     P
                        A2CH vol.FA .q/ \ 0 .q/B/            vol.B/
                            P                         D                              (8.4)
                               A2CH  vol.F A .q//         vol. 0 .q/nH/

with no error term. Moreover, if
                                                              C 2
                                  qD1       and        H D .ClD / ;

so that CH 2 GenD is a genus, then we also have equality (8.4) if J lies in the principal
           C 2                          C
genus p.ClD  / 2 GenD , where J 2 ClD     is the narrow ideal class containing the different
                        2
d WD . D/, so that J is the principal narrow ideal class I ; this occurs if and only if D
is not divisible by a prime congruent to 3 modulo 4.
    The reason for the trivial equality (8.4) is simply due to the fact that the pair A nNA
and JA 1 .1/nNJA 1 .1/ are complementary, in the sense that their union covers nH
evenly and the images of their boundary geodesics are the same as sets but with opposite
orientations. As a consequence, we have the following result.
Corollary 8.2. Let q D 1 and let D be a positive fundamental discriminant. Let CH be
             C                         C            C
a coset of ClD with H a subgroup of ClD  and C 2 ClD  . Then we have equality (8.4) for
                                       2
every fixed continuity set B  nH if C J 2 H .

Proof. The oriented closed geodesics CA .1/ and CJA 1 .1/ are the same curve with oppos-
ite orientations, which means that A .1/nNA .1/ and JA 1 .1/nNJA 1 .1/ cover 0 .1/nH
evenly. Thus (8.4) holds if JA 1 2 CH for every A 2 CH . This condition is met precisely
when C 2 J 2 H .

   For q ¤ 1, on the other hand, it is no longer the case that A .q/nNA .q/ and JA 1 .q/n
NJA 1 .q/ are complementary. Indeed, if a narrow ideal class A is associated to a Heegner
form
             Q D Œa; b; c 2 QD .q/; where q > 1 and b  r .mod 2q/
for some fixed residue class r modulo 2q such that r 2  D .mod 4q/, then there does
not exist a Heegner form

                     Q0 D Œa0 ; b 0 ; c 0  2 QD .q/     with b 0  r .mod 2q/

such that Q .q/nNQ .q/ and Q0 .q/nNQ0 .q/ are complementary. Instead, the comple-
mentary Heegner form is Œ a; b; c 2 QD .q/, which is such that b  r .mod 2q/,
and hence does not correspond to a narrow ideal class A 2 CH appearing in the sums
                                                                                 C
in (8.4). As a notable consequence, Theorem 1.2 is nontrivial if q > 1 and H D ClD .
P. Humphries, A. C. Nordentoft                                                         5182


9. Small scale equidistribution and discrepancy bounds

9.1. Automorphic kernels and Selberg–Harish-Chandra transforms
For z; w 2 H, set
                    jz   x C jz
                         wj           wj                     jz wj2             .z; w/
   .z; w/ WD log                        ;   u.z; w/ WD                 D sinh2         :
                    jz   x
                         wj  jz       wj                  4 Im.z/ Im.w/            2
The function uW H  H ! Œ0; 1/ is a point-pair invariant for the symmetric space H Š
SL2 .R/= SO.2/; that is, u.gz; gw/ D u.z; w/ for all g 2 SL2 .R/ and z; w 2 H. From
this, a function kW Œ0; 1/ ! C gives rise to a point-pair invariant k.u.z; w// on H.
    We take k.u.z; w// D kR .u.z; w// to be equal to the indicator function of a ball of
radius R centred at a point w,
                                                 °                          R±
           BR .w/ WD ¹z 2 H W .z; w/  Rº D z 2 H W u.z; w/  sinh2            ;
                                                                             2
normalised by the volume of this ball,
                                                          R
                                  vol.BR / D 4 sinh2       ;
                                                          2
namely                                8
                                             1                            R
                                                     if u.z; w/  sinh2     ,
                                      ˆ
                                      <
                    kR .u.z; w// WD       vol.BR /                        2
                                      ˆ
                                      :0             otherwise.
We additionally consider the convolution
                                     Z
                       0
                  k  k .u.z; w// D      k.u.z; //k 0 .u.; w// d./
                                             H
                                  0
of two point-pair invariants k, k on H.
Lemma 9.1. For 0 <  < R, the convolution kR  k .u.z; w// is nonnegative, bounded
       1
by vol.B R/
            , and satisfies
                                    8
                                         1
                                    ˆ
                                    ˆ          if u.z; w/  sinh2 R2  ,
                                      vol.BR /
                                    <
                kR  k .u.z; w// D
                                                                  RC
                                               if u.z; w/  sinh2
                                    ˆ
                                    :0
                                    ˆ                                    ,
                                                                    2
so that
   vol.BR  /                                      vol.BRC /
              kR   k .u.z; w//  kR .u.z; w//             kRC  k .u.z; w//
    vol.BR /                                        vol.BR /
for all z; w 2 H.

Proof. This follows from the triangle inequality for the distance function .z; w/.
Sparse equidistribution of geometric invariants of real quadratic fields                  5183


    Given kW Œ0; 1/ ! C, we define the automorphic kernel KW nH  nH ! C by
                                        X
                           K.z; w/ WD       k.u. z; w//:
                                                   2

We write                                          X
                                KR .z; w/ WD            kR .u. z; w//:
                                                   2

This is the indicator function of an injective geodesic ball in nH provided that

                             kR .u. 1 z; w// D kR .u. 2 z; w// D 1

if and only if 1 D 2 .
    A necessary condition for this is the requirement that 2 ht.w/ sinh R  1, where
ht.w/ WD max 2 Im. w/. For 0 <  < R, we consider the convolution kernel
                                         X
                       KR  K .z; w/ WD     kR  k .u. z; w//:
                                                   2

Corollary 9.2. For 0 <  < R, the convolution kernel KR  K .z; w/ is nonnegative and
satisfies
     vol.BR  /                                vol.BRC /
                KR   K .z; w/  KR .z; w/             KRC  K .z; w/               (9.1)
      vol.BR /                                  vol.BR /
for all z; w 2 nH satisfying 2 ht.w/ sinh R  1.
    The spectral expansion for the convolution kernel KR˙  K involves a sum over
an orthonormal basis B0 ./ of the space of Maaß cusp forms (which we may choose to
consist of Hecke–Maaß eigenforms), where the inner product is
                                     Z
                           hf; gi WD       f .z/g.z/ d.z/;
                                             nH

and an integral over t 2 R indexing the Eisenstein series E.z; 12 C i t /. It also involves the
Selberg–Harish-Chandra transforms hR˙ of kR˙ and h of k . The Selberg–Harish-
Chandra transform takes sufficiently well-behaved functions kW Œ0; 1/ ! C to functions
hW R [ i Œ 21 ; 12  ! C via
                                 Z 1                         
                     h.t / WD 2     P 1 Ci t .cosh /k sinh2    sinh  d;
                                  0    2                      2

where P .z/ denotes the associated Legendre function. In particular,
                                             Z R
                                    2
                      hR .t / D                    P 1 Ci t .cosh / sinh  d:
                                  vol.BR /    0         2


The size of this transform is given by the following well-known bounds.
P. Humphries, A. C. Nordentoft                                                         5184


Lemma 9.3 ([39, Lemma 2.33]). Suppose that 0 < R  1" for some fixed " > 0. For t 2 R,
                                       8                         1
                                       <1
                                       ˆ               for jt j   ,
                           hR .t /                              R                     (9.2)
                                       :R 32 jt j 32             1
                                                       for jt j  .
                                       ˆ
                                                                 R
    The advantage of convolving is that it smooths the point-pair invariant and improves
the decay of the Selberg–Harish-Chandra transform, since the transform of the convo-
lution k1  k2 is the product h1 .t /h2 .t / of the individual Selberg–Harish-Chandra trans-
forms. This ensures that the convolution kernel has a spectral expansion on L2 .nH/ that
not only converges in L2 but uniformly.
Lemma 9.4 ([40, Theorems 1.14 and 7.4]). The automorphic kernel KR satisfies
                         Z                           i 
                                KR .z; w/ d.z/ D hR      D 1;
                          nH                         2
                    Z
                          f .z/KR .z; w/ d.z/ D hR .tf /f .w/;
                      nH
            Z       1                                    1      
                  E z; C i t KR .z; w/ d.z/ D hR .t /E w; C i t
              nH      2                                      2

for every f 2 B0 ./, t 2 R, and w 2 nH. Moreover, the convolved kernel KR˙  K
has the spectral expansion
                              1          X
  KR˙  K .z; w/ D                C           hR˙ .tf /h .tf /f .z/f .w/
                         vol.nH/
                                      f 2B0 ./
                                Z 1
                            1                         1            1      
                         C          hR˙ .t /h .t /E z; C i t E w; C i t dt; (9.3)
                           4 1                           2               2
which converges absolutely and uniformly.


9.2. Bounds for fractional moments of L-functions
The proofs of Theorems 1.3 and 1.4 require the following bounds for fractional moments
of certain L-functions.
Lemma 9.5. Let D1 and D2 be odd squarefree fundamental discriminants and let D1
and D2 be the primitive quadratic Dirichlet characters modulo jD1 j and jD2 j. Then for
T  1 and w 2 nH, we have that
                    s                                                     9
             X         L. 12 ; f ˝ D1 /L. 21 ; f ˝ D2 /                 >
                                                                          >
                                                          jf .w/j         >
                                                                          >
                                   L.1; ad f /
                                                                          >
                                                                          >
            f 2B0 ./
                                                                          =
            T tf 2T
                                                                              >
            Z              ˇ L. 1 C i t;  /L. 1 C i t;  / ˇˇ  1      ˇ >  >
                           ˇ 2            D1    2        D2
                                                                              >
                                                            ˇˇE w; C i t ˇ dt >
                                                            ˇ ˇ          ˇ    >
                                                                              ;
                                        .1 C 2i t /              2
                           ˇ
                T jt j2T
Sparse equidistribution of geometric invariants of real quadratic fields                        5185

                           8
                               3    1         1    1                               1
                                                     C"
                           < T 2 .T 2 C ht.w/ 2 /D 6                  if T  D 12 ;
                           ˆ
                           ˆ
                                  1   1              1       1             1           1
                      "     T 2 .T 2 C ht.w/ 2 /D 4 C"               if D 12  T  D 4 ;       (9.4)
                           : T 23 C" .T 12 C ht.w/ 21 /                            1
                           ˆ
                                                                      if T  D :
                           ˆ
                                                                                   4



Assuming the generalised Lindelöf hypothesis, we have the improved bounds
                   s                                                    9
             X         L. 12 ; f ˝ D1 /L. 21 ; f ˝ D2 /               >
                                                                        >
                                                          jf .w/j       >
                                                                        >
                                   L.1; ad f /
                                                                        >
                                                                        >
             f 2B0 ./
                                                                        =
             T tf 2T
                                                                               >
             Z              ˇ L. 1 C i t;  /L. 1 C i t;  / ˇˇ  1      ˇ >  >
                            ˇ 2            D1    2        D2
                                                                               >
                                                             ˇˇE w; C i t ˇ dt >
                                                             ˇ ˇ          ˇ    >
                                                                               ;
                                         .1 C 2i t /              2
                            ˇ
                 T jt j2T
                             3        1              1
                      " T 2 C" .T 2 C ht.w/ 2 /D "                                             (9.5)

for all T  1.

Proof. We apply the Cauchy–Schwarz inequality and use the local Weyl law [40, Propos-
ition 7.2]            X                     9
                            jf .w/j2        >
                                            >
                                            >
                     tf T
                                            =
                    Z T ˇ                     T 2 C T ht.w/
                                   1  ˇ 2  >
                           ˇE w; C i t ˇ dt >
                           ˇ           ˇ    >
                                            ;
                        T          2
and the bound
                                 L. 12 ; f ˝ D1 /L. 12 ; f ˝ D2 /
                                                                                            9
                      X                                                                     >
                                                                                            >
                                                                                            >
                                             L.1; ad f /                                    >
                                                                                            >
                  f 2B0 ./                                                                 =
                  T tf 2T
                  Z                  ˇ L. 1 C i t;  /2 L. 1 C i t;  /2 ˇ2 > >
                                                    D1               D2
                                     ˇ 2                                      >
                                                            2                 >
                       T  jt j  2T ˇ                                   ˇ dt >
                                                                         ˇ    ;
                                                    .1 C 2i t /
                             8
                                     1                  1
                                  2    C"
                             <T D3
                             ˆ
                             ˆ              if T  D 12 ;
                                      1                  1                1
                         "        D 2 C"        if D 12  T  D 4 ;                            (9.6)
                                                                  1
                                 ˆ
                                 : T 2C"
                                 ˆ
                                                 if T  D :       4



This is proven for D1 D 1 and D2 D D in [39, Proposition 2.14]. The same method of
proof yields the above bound, with the only notable difference being a slightly different
application of the Voronoı̆ summation formula for
                                          1
                                          X D ;D .m; 0/e. md
                                                 1       2    c
                                                                /
                                                                               ;
                                      mD1
                                                             ms
                            P
where D1 ;D2 .m; 0/ WD abDm D1 .a/D2 .b/, which is given in [47, Appendix A].
Assuming the generalised Lindelöf hypothesis, the Weyl law implies the improved bounds
O" .T 2C" D " / for all T  1 for (9.6).
P. Humphries, A. C. Nordentoft                                                         5186


9.3. Proofs of Theorems 1.3 and 1.4
Proof of Theorem 1.3. For w 2 nH, the difference
                                P
                      vol.nH/ A2GD vol.FA \ BR .w//
                                    P                                   1              (9.7)
                       vol.BR /       A2GD vol.FA /

is equal to                                  Z
                           vol.nH/
                        P                             KR .z; w/ d.z/   1:
                          A2GD vol.FA /          FA

By the upper bound (9.1), the spectral expansion (9.3), and character orthogonality, we see
that for any 0 <  < R, (9.7) is bounded from above by the sum of the three terms
        vol.BRC /
                      1;                                                               (9.8)
         vol.BR /
          vol.BRC / vol.nH/      1
                                 !.D/ 1
                P
        vol.BR / A2GD vol.FA / 2
                X             X
                     .GD /        hRC .tf /h .tf /f .w/W;f ;                      (9.9)
                  b
               2GenD            f 2B0 ./

          vol.BRC / vol.nH/      1
        vol.BR / A2GD vol.FA / 2!.D/ 1
                P
                                Z 1
                X             1                        1      
                     .GD /         hRC .t /h .t /E w; C i t W;t dt:             (9.10)
                  b
               2GenD
                             4 1                        2

Here the Weyl sums W;f and W;t are as in (6.1) and (6.4). Similarly, (9.7) is bounded
from below by the sum of the same three terms except with R C  replaced by R 
at each instance. Thus to prove Theorem 1.3, it suffices to show that for R > D ı with
ı < 21 , there exists some choice of  2 .0; R/ for which each of the three terms (9.8),
(9.9), and (9.10) is o.1/.
    Term (9.8) is O.R 1 / since vol.BR /  R2 . For terms (9.9) and (9.10), we begin
                                                           1
by recalling that the set of genus characters  2 GenD is indexed by ordered pairs of
fundamental discriminants .D1 ; D2 / such that D1 D2 D D; each genus character  is
then associated to the pair of primitive quadratic Dirichlet characters D1 and D2 mod-
ulo jD1 j and jD2 j, respectively. From Proposition 6.1 and Stirling’s formula, we deduce
that
                  p
          2          D      L. 12 ; f ˝ D1 /L. 12 ; f ˝ D2 /
  jW;f j                                                     ;
               .1 C jtf j/3             L.1; ad f /
                  p
          2         D L. 12 C i t; D1 /L. 21 i t; D1 /L. 12 C i t; D2 /L. 12 i t; D2 /
   jW;t j                                                                                :
               .1 C jt j/3                       .1 C 2i t /.1 2i t /
                                              1
We also use the bound A2GD vol.FA / " D 2 " [19, Proposition 1]. We then dyad-
                        P

ically divide up the sum over f 2 B0 ./ and the integral over t 2 R based on the size
Sparse equidistribution of geometric invariants of real quadratic fields                          5187


of tf ; jt j 2 ŒT; 2T  and employ bounds (9.2) for hR˙ and h and bounds (9.4) for the
ensuing fractional moment of L-functions. It remains to choose
                               8 1        1                     1
                               ˆ
                               ˆ
                               ˆ R 2 D 12       if R  D 12 ,
                               ˆ
                               ˆ        1                5            1
                               ˆRD 24           if D 12  R  D 12 ,
                               ˆ
                               ˆ
                               <
                           D 1 1           1           1           5
                               ˆ   R 2 D 4 if D 2  R  D 12 ,
                               ˆ
                               ˆ
                               ˆ 2
                               ˆ1R
                               ˆ
                               ˆ
                               ˆ                                  1
                               :                if 0 < R  D 2 .
                                 2
In this way, we find that
                                  P
                      ˇ vol.nH/ A2GD vol.FA \ BR .w//
                      ˇ                                               ˇ
                                                                      ˇ
                      ˇ
                      ˇ vol.B /          P                          1ˇˇ
                              R             A2GD   vol.F   A /
                                8 1           1               1
                                ˆ
                                ˆ R 2 D 12 C" if D 12  R  1,
                                <
                                       1                      5         1
                            " D 24 C"               if D 12  R  D 12 ,         (9.11)
                                ˆ
                                : 1
                                ˆ            1                    5
                                  R 2 D 4 C" if R  D 12 .

This is o.1/ provided that R  D ı for some ı < 21 .

Proof of Theorem 1.4. From (9.11) and the fact that vol.Br /  R2 for R  1, we have
that for any w 2 nH,
                                              8 3        1          1
ˇP                                            ˆ R 2 D 12 C" if D 12  R  1,
ˇ A2GD vol.FA \ BR .w//
                                         ˇ    ˆ
                               vol.BR / ˇˇ    <
                                                        1           5            1
ˇ      P                                   " R2 D 24 C" if D 12  R  D 12,
ˇ
          A2GD vol.FA /       vol.nH/   ˇ    ˆ
                                              : 3
                                              ˆ         1                5
                                                R 2 D 4 C" if R  D 12 .
In particular,
                       ˇP
                       ˇ A2GD vol.FA \ BR .w//
                                                                         ˇ
                                                               vol.BR / ˇˇ            1
                 sup   ˇ    P                                              " D       12 C"   :
          BR .w/nH
                       ˇ           vol.F /
                                  A2GD          A             vol.nH/ ˇ
   This result may be strengthened under the assumption of the generalised Lindelöf
hypothesis by conditionally improving bounds (9.11). Instead of using the unconditional
bounds (9.4), we use the conditional bounds (9.5). Choosing
                             81 1       1          1
                             < R 2 D 4 if D 2  R  1,
                             ˆ
                         D     2
                             :1R
                             ˆ
                                            if R  D 2 ,
                                                        1

                                2
we find that
              ˇP
              ˇ A2GD vol.FA \ BR .w//
                                                          ˇ
                                                vol.BR / ˇˇ      3   1
              ˇ     P                                       " R 2 D 4 C"
                       A2GD vol.FA /           vol.nH/
              ˇ                                           ˇ
                                                                  1
for all R  1, which yields the conditional bound O" .D           4 C"   / for the discrepancy.
P. Humphries, A. C. Nordentoft                                                           5188


10. Questions

We end by raising some natural follow-up questions beyond the results contained in this
paper.
Question 10.1. Can one prove Theorem 1.2 for ı D 0 using techniques purely from arith-
metic ergodic theory?
    This question was raised by Duke, Imamoḡlu, and Tóth [19, Section 4]. Indeed,
Duke’s theorems on the equidistribution of closed geodesics and of Heegner points on
the modular surface and additionally of lattice points on the sphere [17] were first proved
under the additional hypothesis of a splitting condition by Linnik [48] using techniques
from ergodic theory. Einsiedler, Lindenstrauss, Michel, and Venkatesh [23] showed that
in the case of closed geodesics, Linnik’s ergodic method is valid even without the splitting
condition hypothesis.
Question 10.2. (1) For any fixed ı > 0, does there exist a sequence of positive fun-
                                                  C
damental discriminants D and subsets H of ClD        that are not necessarily cosets with
jH j      ı
 C    D    for which the equidistribution result (1.2) in Theorem 1.2 fails to hold?
hD
    (2) Does the equidistribution result (1.2) in Theorem 1.2 hold for arbitrary subsets H
     C
of ClD  that are not necessarily cosets provided that jHCj log D tends to infinity with D?
                                                       hD
                                                C
    The condition that CH be a coset of ClD        in Theorem 1.2 may be thought of as
                                                                C
imposing the requirement that we restrict to a subset of ClD       with an algebraic struc-
ture. By comparing to related results on the sparse equidistribution of closed geodesics,
namely [1, Theorem 4.1] and [12, Theorem 1.8], we expect that such an algebraic con-
dition is necessary in order for equidistribution to hold if the cardinality of this subset is
          C
O.D ı hD    / for some ı > 0. On the other hand, analogous results for closed geodesics,
                                                                                            C
namely [1, Theorem 1.2], lead us to expect that Theorem 1.2 holds for subsets H of ClD
without any algebraic structure provided that jHCj log D tends to infinity with D.
                                                hD
Question 10.3. Does the joint equidistribution of hyperbolic orbifolds hold?
    Here, by joint equidistribution, we mean the following. For each positive fundamental
                                                                                         C
discriminant D, choose a genus GD in the group of genera GenD and choose C 2 ClD
such that the minimal norm of any integral ideal representing C tends to infinity as D
tends to infinity. Joint equidistribution of hyperbolic orbifolds is the statement that for
each fixed continuity set B  nH  nH,
          P
             A2GD vol.FA  FAC \ .  /B/                vol.B/
                  P                               D                      C oB .1/
                    A2GD   vol.FA   F AC /          vol.nH    nH/
as D tends to infinity. This is a natural analogue of the mixing conjecture of Michel
and Venkatesh [53] for Heegner points, which has been resolved by Khayutin [45, The-
orem 1.3] under the assumptions of a splitting hypothesis and of the nonexistence of
Landau–Siegel zeroes. The first author resolved a toy model of this problem in the much
simpler setting of modular inverses on the torus [37, Theorem 1.6].
Sparse equidistribution of geometric invariants of real quadratic fields                     5189


    Finally, we briefly mention that one can pose a closely related variant of joint equidis-
tribution, namely simultaneous
                        p         equidistribution. Associated to each narrow ideal class
of a quadratic field Q. D/ are geometric invariants for each quaternion algebra that is
unramified at each place that splits in E. Michel and Venkatesh [53] pose the question of
whether such geometric invariants equidistribute simultaneously in multiple different qua-
ternion algebras. For progress on this problem and variants thereof, we direct the reader
to [2, 3, 6, 7, 22].
Funding. The first author was supported by the National Science Foundation grant DMS-2302079
and the Simons Foundation (award 965056). The second author was supported by a grant from the
Independent Research Fund Denmark DFF (1025-00020B) and by a public grant from Fondation
Mathématique Jacques Hadamard.



References

 [1] Aka, M., Einsiedler, M.: Duke’s theorem for subcollections. Ergodic Theory Dynam. Systems
     36, 335–342 (2016) Zbl 1355.37004 MR 3503026
 [2] Aka, M., Einsiedler, M., Shapira, U.: Integer points on spheres and their orthogonal lattices.
     Invent. Math. 206, 379–396 (2016) Zbl 1410.11117 MR 3570295
 [3] Aka, M., Luethi, M., Michel, P., Wieser, A.: Simultaneous supersingular reductions of CM
     elliptic curves. J. Reine Angew. Math. 786, 1–43 (2022) Zbl 1536.11083 MR 4434745
 [4] Andersen, N., Wu, H.: Hybrid subconvexity and the partition function. J. Number Theory 242,
     154–180 (2023) Zbl 1506.11072 MR 4474855
 [5] Baruch, E. M., Mao, Z.: A generalized Kohnen–Zagier formula for Maass forms. J. Lond.
     Math. Soc. (2) 82, 1–16 (2010) Zbl 1217.11047 MR 2669637
 [6] Blomer, V., Brumley, F.: Simultaneous equidistribution of toric periods and fractional
     moments of L-functions. J. Eur. Math. Soc. (JEMS) 26, 2745–2796 (2024) Zbl 1552.11046
     MR 4756945
 [7] Blomer, V., Brumley, F., Khayutin, I.: The mixing conjecture under GRH.
     arXiv:2212.06280v1 (2022)
 [8] Blomer, V., Harcos, G.: A hybrid asymptotic formula for the second moment of Rankin–
     Selberg L-functions. Proc. Lond. Math. Soc. (3) 105, 473–505 (2012) Zbl 1294.11063
     MR 2974197
 [9] Blomer, V., Harcos, G., Michel, P.: Bounds for modular L-functions in the level aspect. Ann.
     Sci. École Norm. Sup. (4) 40, 697–740 (2007) Zbl 1185.11034 MR 2382859
[10] Blomer, V., Khan, R.: Uniform subconvexity and symmetry breaking reciprocity. J. Funct.
     Anal. 276, 2315–2358 (2019) Zbl 1492.11098 MR 3912807
[11] Bourgain, J.: Mordell’s exponential sum estimate revisited. J. Amer. Math. Soc. 18, 477–499
     (2005) Zbl 1072.11063 MR 2137982
[12] Bourgain, J., Kontorovich, A.: Beyond expansion II: low-lying fundamental geodesics. J. Eur.
     Math. Soc. (JEMS) 19, 1331–1359 (2017) Zbl 1403.11054 MR 3635355
[13] Caramello Jr., F. C.: Introduction to orbifolds. arXiv:1909.08699v6 (2022)
[14] Darmon, H.: Heegner points, Heegner cycles, and congruences. In: Elliptic curves and related
     topics, CRM Proc. Lecture Notes 4, American Mathematical Society, Providence, RI, 45–59
     (1994) Zbl 0813.11036 MR 1260954
[15] Doan, N. M., Kim, S.-h., Lang, M. L., Tan, S. P.: Optimal special polygons for the congruence
     subgroups 0 .p/ and 0 .pq/. J. Geom. Anal. 35, article no. 216 (2025) MR 4917150
P. Humphries, A. C. Nordentoft                                                                5190


[16] Dooms, A., Jespers, E., Konovalov, A.: From Farey symbols to generators for subgroups of
     finite index in integral group rings of finite groups. J. K-Theory 6, 263–283 (2010)
     Zbl 1209.16030 MR 2735087
[17] Duke, W.: Hyperbolic distribution problems and half-integral weight Maass forms. Invent.
     Math. 92, 73–90 (1988) Zbl 0628.10029 MR 931205
[18] Duke, W., Friedlander, J. B., Iwaniec, H.: The subconvexity problem for Artin L-functions.
     Invent. Math. 149, 489–577 (2002) Zbl 1056.11072 MR 1923476
[19] Duke, W., Imamoḡlu, Ö., Tóth, Á.: Geometric invariants for real quadratic fields. Ann. of
     Math. (2) 184, 949–990 (2016) Zbl 1372.11056 MR 3549627
[20] Duke, W., Imamoḡlu, Ö., Tóth, Á.: Kronecker’s first limit formula, revisited. Res. Math. Sci.
     5, article no. 20 (2018) Zbl 1441.11085 MR 3782448
[21] Eichler, M.: Grenzkreisgruppen und kettenbruchartige Algorithmen. Acta Arith. 11, 169–180
     (1965) Zbl 0148.32503 MR 228436
[22] Einsiedler, M., Lindenstrauss, E.: Joinings of higher rank torus actions on homogeneous
     spaces. Publ. Math. Inst. Hautes Études Sci. 129, 83–127 (2019) Zbl 1423.22014
     MR 3949028
[23] Einsiedler, M., Lindenstrauss, E., Michel, P., Venkatesh, A.: The distribution of closed
     geodesics on the modular surface, and Duke’s theorem. Enseign. Math. (2) 58, 249–313 (2012)
     Zbl 1312.37032 MR 3058601
[24] File, D., Martin, K., Pitale, A.: Test vectors and central L-values for GL.2/. Algebra Number
     Theory 11, 253–318 (2017) Zbl 1425.11104 MR 3641876
[25] Ganguly, S., Humphries, P., Lin, Y., Nunes, R.: Strong hybrid subconvexity for twisted selfdual
     GL3 L-functions. arXiv:2408.00596v1 (2024)
[26] Godement, R.: Notes on Jacquet–Langlands’ theory (with commentaries by Robert Langlands
     and Herve Jacquet). CTM. Class. Top. Math. 8, Higher Education Press, Beijing (2018)
     Zbl 1416.11002 MR 3889963
[27] Goldfeld, D., Hundley, J.: Automorphic representations and L-functions for the general linear
     group. Volume I. Cambridge Stud. Adv. Math. 129, Cambridge University Press, Cambridge
     (2011) Zbl 1247.11070 MR 2807433
[28] Gradshteyn, I. S., Ryzhik, I. M.: Table of integrals, series, and products. 8th ed., Elsevier,
     Amsterdam (2015) Zbl 1300.65001 MR 3307944
[29] Gross, B., Kohnen, W., Zagier, D.: Heegner points and derivatives of L-series. II. Math. Ann.
     278, 497–562 (1987) Zbl 0641.14013 MR 909238
[30] Gross, B. H.: Local orders, root numbers, and modular curves. Amer. J. Math. 110, 1153–1182
     (1988) Zbl 0675.12011 MR 970123
[31] Harcos, G.: Subconvex bounds for automorphic L-functions and applications. D. Sc. Thesis,
     Hungarian Academy of Sciences, https://www.renyi.hu/~gharcos/ertekezes.pdf, visited on
     21 August 2025 (2011)
[32] Harcos, G., Michel, P.: The subconvexity problem for Rankin–Selberg L-functions and
     equidistribution of Heegner points. II. Invent. Math. 163, 581–655 (2006) Zbl 1111.11027
     MR 2207235
[33] Hatcher, A.: Algebraic topology. Cambridge University Press, Cambridge (2002)
     Zbl 1044.55001 MR 1867354                                                       p
[34] Hickerson, D. R.: Length of period simple continued fraction expansion of d . Pacific J.
     Math. 46, 429–432 (1973) Zbl 0236.40003 MR 321881
[35] Holowinsky, R., Templier, N.: First moment of Rankin–Selberg central L-values and subcon-
     vexity in the level aspect. Ramanujan J. 33, 131–155 (2014) Zbl 1290.11085 MR 3142436
[36] Humphries, P.: Equidistribution in shrinking sets and L4 -norm bounds for automorphic forms.
     Math. Ann. 371, 1497–1543 (2018) Zbl 1448.11084 MR 3831279
[37] Humphries, P.: Distributing points on the torus via modular inverses. Q. J. Math. 73, 1–16
     (2022) Zbl 1503.11106 MR 4395069
Sparse equidistribution of geometric invariants of real quadratic fields                     5191


[38] Humphries, P., Khan, R.: On the random wave conjecture for dihedral Maaß forms. Geom.
     Funct. Anal. 30, 34–125 (2020) Zbl 1462.11041 MR 4081056
[39] Humphries, P., Radziwiłł, M.: Optimal small scale equidistribution of lattice points on the
     sphere, Heegner points, and closed geodesics. Comm. Pure Appl. Math. 75, 1936–1996 (2022)
     Zbl 1504.11084 MR 4465906
[40] Iwaniec, H.: Spectral methods of automorphic forms. 2nd ed., Grad. Stud. Math. 53, American
     Mathematical Society, Providence, RI (2002) Zbl 1006.11024 MR 1942691
[41] Jacquet, H., Chen, N.: Positivity of quadratic base change L-functions. Bull. Soc. Math.
     France 129, 33–90 (2001) Zbl 1069.11017 MR 1871978
[42] Jacquet, H., Langlands, R. P.: Automorphic forms on GL.2/. Lecture Notes in Math. 114,
     Springer, Berlin (1970) Zbl 0236.12010 MR 401654
[43] Katok, S.: Coding of closed geodesics after Gauss and Morse. Geom. Dedicata 63, 123–145
     (1996) Zbl 0884.20030 MR 1413625
[44] Katok, S., Sarnak, P.: Heegner points, cycles and Maass forms. Israel J. Math. 84, 193–227
     (1993) Zbl 0787.11016 MR 1244668
[45] Khayutin, I.: Joint equidistribution of CM points. Ann. of Math. (2) 189, 145–276 (2019)
     Zbl 1431.11080 MR 3898709
[46] Kulkarni, R. S.: An arithmetic-geometric method in the study of the subgroups of the modular
     group. Amer. J. Math. 113, 1053–1133 (1991) Zbl 0758.11024 MR 1137534
[47] Lau, Y.-K., Tsang, K.-M.: A mean square formula for central values of twisted automorphic
     L-functions. Acta Arith. 118, 231–262 (2005) Zbl 1081.11036 MR 2168765
[48] Linnik, Yu. V.: Ergodic properties of algebraic fields. Ergeb. Math. Grenzgeb. 45, Springer,
     New York (1968) Zbl 0162.06801 MR 238801
[49] Liu, S.-C., Masri, R., Young, M. P.: Subconvexity and equidistribution of Heegner points in
     the level aspect. Compos. Math. 149, 1150–1174 (2013) Zbl 1329.11046 MR 3078642
[50] Martin, K., Whitehouse, D.: Central L-values and toric periods for GL.2/. Int. Math. Res.
     Not. IMRN 2009, 141–191 (2009) Zbl 1193.11046 MR 2471298
[51] Maskit, B.: On Poincaré’s theorem for fundamental polygons. Adv. Math. 7, 219–230 (1971)
     Zbl 0223.30008 MR 297997
[52] Michel, P.: The subconvexity problem for Rankin–Selberg L-functions and equidistribution
     of Heegner points. Ann. of Math. (2) 160, 185–236 (2004) Zbl 1068.11033 MR 2119720
[53] Michel, P., Venkatesh, A.: Equidistribution, L-functions and ergodic theory: on some prob-
     lems of Yu. Linnik. In: International Congress of Mathematicians. Vol. II, European
     Mathematical Society, Zürich, 421–457 (2006) Zbl 1157.11019 MR 2275604
[54] Nordentoft, A. C.: Concentration of closed geodesics in the homology of modular curves.
     Forum Math. Sigma 11, article no. e91 (2023) Zbl 1540.11051 MR 4651628
[55] Nordentoft, A. C., Tan, S. P.: Equidistribution of partial coverings defined from closed
     geodesics. arXiv:2502.08472v1 (2025)
[56] Petrow, I., Young, M. P.: A generalized cubic moment and the Petersson formula for newforms.
     Math. Ann. 373, 287–353 (2019) Zbl 1446.11069 MR 3968874
[57] Popa, A. A.: Central values of Rankin L-series over real quadratic fields. Compos. Math. 142,
     811–866 (2006) Zbl 1144.11041 MR 2249532
[58] Popa, A. A.: Whittaker newforms for archimedean representations of GL.2/. J. Number The-
     ory 128, 1637–1645 (2008) Zbl 1146.11030 MR 2419183
[59] Schmidt, R.: Some remarks on local newforms for GL.2/. J. Ramanujan Math. Soc. 17, 115–
     147 (2002) Zbl 0997.11040 MR 1913897
[60] Series, C.: The modular surface and continued fractions. J. Lond. Math. Soc. (2) 31, 69–80
     (1985) Zbl 0545.30001 MR 810563
[61] Venkatesh, A.: Sparse equidistribution problems, period bounds and subconvexity. Ann. of
     Math. (2) 172, 989–1094 (2010) Zbl 1214.11051 MR 2680486
P. Humphries, A. C. Nordentoft                                                                5192


[62] Waldspurger, J.-L.: Sur les coefficients de Fourier des formes modulaires de poids demi-entier.
     J. Math. Pures Appl. (9) 60, 375–484 (1981) Zbl 0431.10015 MR 646366
[63] Waldspurger, J.-L.: Sur les valeurs de certaines fonctions L automorphes en leur centre de
     symétrie. Compos. Math. 54, 173–242 (1985) Zbl 0567.10021 MR 783511
[64] Young, M. P.: Weyl-type hybrid subconvexity bounds for twisted L-functions and Heegner
     points on shrinking sets. J. Eur. Math. Soc. (JEMS) 19, 1545–1576 (2017) Zbl 1430.11067
     MR 3635360
[65] Young, M. P.: Explicit calculations with Eisenstein series. J. Number Theory 199, 1–48 (2019)
     Zbl 1454.11083 MR 3926186
[66] Zagier, D.: The Rankin–Selberg method for automorphic functions which are not of rapid
     decay. J. Fac. Sci. Univ. Tokyo Sect. IA Math. 28, 415–437 (1981) Zbl 0505.10011
     MR 656029
[67] Zhang, S.-W.: Gross–Zagier formula for GL2 . Asian J. Math. 5, 183–290 (2001)
     Zbl 1111.11030 MR 1868935
