3cm3cm1cm2cm

#  $p$-adic equidistribution of modular geodesics and of Heegner points on
Shimura curves

Patricio Pérez-Piña  Pontificia Universidad Católica de Chile
<EMAIL_ADDRESS>
###### Abstract.

We propose a $p$-adic version of Duke’s Theorem on the equidistribution of
closed geodesics on modular curves. Our approach concerns quadratic fields
split at $p$ as well as a $p$-adic covering of the modular curve. We also
prove an equidistribution result of Heegner points in the $p$-adic space
attached to Shimura curves.

##  1\. Introduction

In [Duk88], W. Duke proves the equidistribution, inside the complex points of
the modular curve endowed with the hyperbolic measure, of arithmetic objects
attached to orders in quadratic extensions of $\mathbb{Q}$. The nature of
these objects depends on the behavior at infinity of the extension. For
quadratic imaginary fields these objects are Galois orbits of CM points and in
the case of real quadratic fields his equidistribution theorem concerns
packets of closed geodesics.

Let $p$ be a rational prime. Since CM points are defined over number fields,
their Galois orbits can be naturally embedded inside the $p$-adic space of
$\mathbb{C}_{p}$-points of the modular curve. In [HMRL20] and [HMRL20], the
authors studied the distribution of such Galois orbits obtaining $p$-adic
analogues to Duke’s theorem in the case of imaginary quadratic fields. In
contrast with Duke’s result, different limit measures can appear, depending on
the discriminants of the orders involved in the sequence of CM points.

The aim of this article is to state and prove a $p$-adic version of Duke’s
theorem on the equidistribution of packets of closed geodesics. Also, we prove
a $p$-adic version of the equidistribution of Galois orbits of Heegner points
on Shimura curves, when the prime $p$ divides the discriminant of the
underlying quaternion algebra. The complex version of the latter result is
another extension of Duke’s theorem for which we refer to section 6 in [HM06]
or to [Zha05].

We recall Duke’s result following section 2 of [ELMV12]. Let $\mathcal{H}$ be
the complex upper half plane and denote by $Y_{0}$ the modular curve of level
$1$. Then we have an identification between the quotient space
$\mathrm{PSL}_{2}(\mathbb{Z})\backslash\mathcal{H}$ and $Y_{0}(\mathbb{C})$.
Moreover, the quotient space
$\mathrm{PSL}_{2}(\mathbb{Z})\backslash\mathrm{PGL}_{2}(\mathbb{R})^{+}$ is
identified with $T^{1}(Y_{0}(\mathbb{C}))$, the unit tangent bundle of
$Y_{0}(\mathbb{C})$. Here and elsewhere, the superscript + indicates that we
consider matrices of positive determinant. Suppose that $\tau$ is a real
quadratic irrational. We can view $\tau$ as an element in the boundary of
$\mathcal{H}$ and we can consider the geodesic $\gamma_{\tau}$ in
$\mathcal{H}$ connecting $\tau$ and its Galois conjugate. The projection of
$\gamma_{\tau}$ to ${\mathrm{PSL}_{2}(\mathbb{Z})}\backslash{\mathcal{H}}$ is
a closed geodesic. We lift this closed geodesic to a compact geodesic orbit
$\widetilde{\gamma}_{\tau}$ in $T^{1}(Y_{0}(\mathbb{C}))$ that depends only on
the $\mathrm{PSL}_{2}(\mathbb{Z})$-orbit of $\tau$. Also, we denote by
$\mathcal{O}_{\tau}$ the ring of matrices in $M_{2}(\mathbb{Z})$ having the
column $(\tau\,\,\,1)^{t}$ as an eigenvector. For $K$ a real quadratic field,
we denote by $RQ(K)$ the set of $\tau$ as before such that
$\mathcal{O}_{\tau}$ is isomorphic to the maximal order $\mathcal{O}_{K}$. The
set $\mathrm{PSL}_{2}(\mathbb{Z})\backslash RQ(K)$ is finite and its
cardinality equals the class number $h_{K}$ of $K$. We put
$\mathcal{G}_{K}=\bigcup_{\tau}\widetilde{\gamma}_{\tau}$, with $\tau$ running
through representatives of $\mathrm{PSL}_{2}(\mathbb{Z})\backslash RQ(K)$.
Define by $\mu_{K}$ the unique probability measure in
$T^{1}(Y_{0}(\mathbb{C}))$ supported on $\mathcal{G}_{K}$ that is invariant
under the geodesic flow. Endow $T^{1}(Y_{0}(\mathbb{C}))$ with the unique
probability measure $\mu_{L}$ coming from a Haar measure on
$\mathrm{PGL}_{2}^{+}(\mathbb{R})$ and a counting measure on
$\mathrm{PSL}_{2}(\mathbb{Z})$.

######  Theorem 1.1 (Duke).

As $disc(K)\to\infty$, the sequence $\mu_{K}$ converges to $\mu_{L}$ in the
weak-* topology. In other words, the collection $\mathcal{G}_{K}$ of $h_{K}$
closed geodesics becomes equidistributed in $T^{1}(Y_{0}(\mathbb{C}))$ with
respect to the measure $\mu_{L}$.

We proceed to explain our main result on geodesics. As we have seen, in the
complex case, geodesics appear when dealing with real quadratic fields or in
other words when the infinite place is split in the extension. Following this
point of view, we exchange the role of $\infty$ and $p$ and we focus on
quadratic extensions such that $p$ splits. The role played by
$\mathrm{PSL}_{2}(\mathbb{Z})$ and $\mathrm{PGL}_{2}^{+}(\mathbb{R})$ will be
held by $\Gamma^{+}\colonequals\mathrm{PGL}^{+}_{2}(\mathbb{Z}[1/p])$ and
$\mathrm{PGL}_{2}(\mathbb{R}\times\mathbb{Q}_{p})$, respectively. Let
$\mathcal{H}^{\prime}$ be the set of points $\tau$ in $\mathcal{H}$ such that
$\tau$ generates an imaginary quadratic extension over $\mathbb{Q}$ in which
$p$ splits. The quotient $\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma^{+}$}\big{\backslash}\raise
2.15277pt\hbox{$\mathcal{H}^{\prime}$}}}{\Gamma^{+}\,\backslash\,\mathcal{H}^{\prime}}{\Gamma^{+}\,\backslash\,\mathcal{H}^{\prime}}{\Gamma^{+}\,\backslash\,\mathcal{H}^{\prime}}$
was studied by Ihara who showed that it is related to the special fiber of the
modular curve $X_{0}(p)$.

######  Theorem 1.2 (Chapter 5, Theorem 1 in [Iha08]).

Fix $\mathfrak{P}$, a prime above $p$ in $\overline{\mathbb{Z}}$, the integral
closure of $\mathbb{Z}$ in $\overline{\mathbb{Q}}$. Identify
$\overline{\mathbb{Z}}/\mathfrak{P}$ with $\overline{\mathbb{F}_{p}}$ and
recall that by the Theory of Complex Multiplication, for any
$\tau\in\mathcal{H}^{\prime}$, we have $j(\tau)\in\overline{\mathbb{Z}}$. The
assignment

$\Gamma^{+}\tau\mapsto\mathrm{Gal}(\overline{\mathbb{F}_{p}}/\mathbb{F}_{p})\cdot(j(\tau)\mod\mathfrak{P})$

defines a bijection between $\Gamma^{+}\backslash\mathcal{H}^{\prime}$ and
Galois orbits in $\overline{\mathbb{F}_{p}}-SS$, where $SS$ is the set of
supersingular $j$-invariants.

The $p$-adic covering of $Y_{0}(\mathbb{C})$ that we consider is the locally
compact space

$T^{(p)}(Y_{0}(\mathbb{C}))\colonequals\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma^{+}$}\big{\backslash}\raise
2.15277pt\hbox{$(\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p}))$}}}{\Gamma^{+}\,\backslash\,(\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p}))}{\Gamma^{+}\,\backslash\,(\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p}))}{\Gamma^{+}\,\backslash\,(\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p}))}.$

The natural projection $T^{(p)}(Y_{0}(\mathbb{C}))\to Y_{0}(\mathbb{C})$ is
given by taking a right quotient by $\mathrm{PGL}_{2}(\mathbb{Z}_{p})$ (see
section 5). Let $\mathcal{T}_{p}$ denote the Bruhat-Tits tree of
$\mathrm{PGL}_{2}(\mathbb{Q}_{p})$. After identifying the boundary of the tree
$\mathcal{T}_{p}$ with $\mathbb{P}^{1}(\mathbb{Q}_{p})$, the splitness
condition on $p$ allows us to see $\mathcal{H}^{\prime}$ as boundary elements
of $\mathcal{T}_{p}$. For $\tau$ in $\mathcal{H}^{\prime}$, we define in
Section 5 a cycle $\Delta_{\tau}$ inside the space
$T^{(p)}(Y_{0}(\mathbb{C}))$ than depends only on the $\Gamma^{+}$-orbit of
$\tau$. The projection of $\Delta_{\tau}$ on $\Gamma^{+}\backslash\mathcal{H}$
is just $\Gamma^{+}\tau$. The fiber over $\Gamma^{+}\tau$ under the natural
projection $\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma^{+}$}\big{\backslash}\raise
2.15277pt\hbox{$(\mathcal{H}^{\prime}\times\mathcal{T}_{p})$}}}{\Gamma^{+}\,\backslash\,(\mathcal{H}^{\prime}\times\mathcal{T}_{p})}{\Gamma^{+}\,\backslash\,(\mathcal{H}^{\prime}\times\mathcal{T}_{p})}{\Gamma^{+}\,\backslash\,(\mathcal{H}^{\prime}\times\mathcal{T}_{p})}\to\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma^{+}$}\big{\backslash}\raise
2.15277pt\hbox{$\mathcal{H}^{\prime}$}}}{\Gamma^{+}\,\backslash\,\mathcal{H}^{\prime}}{\Gamma^{+}\,\backslash\,\mathcal{H}^{\prime}}{\Gamma^{+}\,\backslash\,\mathcal{H}^{\prime}}$
is $\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma^{+}$}\big{\backslash}\raise
2.15277pt\hbox{$(\Gamma^{+}\tau\times\mathcal{T}_{p})$}}}{\Gamma^{+}\,\backslash\,(\Gamma^{+}\tau\times\mathcal{T}_{p})}{\Gamma^{+}\,\backslash\,(\Gamma^{+}\tau\times\mathcal{T}_{p})}{\Gamma^{+}\,\backslash\,(\Gamma^{+}\tau\times\mathcal{T}_{p})}$.
This is a graph having the structure of a $(p+1)$-volcano, that can be
identified with the $p$-isogeny graph attached to any elliptic curve coming
from a $\mathrm{PSL}_{2}(\mathbb{Z})$-orbit in $\Gamma^{+}\tau$. The
projection of $\Delta_{\tau}$ to this graph is its unique closed loop (known
as its rim). Observe that there’s a bijection between
$\mathchoice{\text{\lower 2.15277pt\hbox{$\Gamma^{+}$}\big{\backslash}\raise
2.15277pt\hbox{$(\Gamma^{+}\tau\times\mathcal{T}_{p})$}}}{\Gamma^{+}\,\backslash\,(\Gamma^{+}\tau\times\mathcal{T}_{p})}{\Gamma^{+}\,\backslash\,(\Gamma^{+}\tau\times\mathcal{T}_{p})}{\Gamma^{+}\,\backslash\,(\Gamma^{+}\tau\times\mathcal{T}_{p})}$
and $\\{\tau\\}\times\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma^{+}_{\tau}$}\big{\backslash}\raise
2.15277pt\hbox{$\mathcal{T}_{p}$}}}{\Gamma^{+}_{\tau}\,\backslash\,\mathcal{T}_{p}}{\Gamma^{+}_{\tau}\,\backslash\,\mathcal{T}_{p}}{\Gamma^{+}_{\tau}\,\backslash\,\mathcal{T}_{p}}$,
where $\Gamma^{+}_{\tau}$ denotes the stabilizer of $\tau$ in $\Gamma^{+}$.
The aforementioned loop is formed by taking the unique geodesic in
$\mathcal{T}_{p}$ joining $\tau$ and its Galois conjugate and projecting it to
$\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma^{+}_{\tau}$}\big{\backslash}\raise
2.15277pt\hbox{$\mathcal{T}_{p}$}}}{\Gamma^{+}_{\tau}\,\backslash\,\mathcal{T}_{p}}{\Gamma^{+}_{\tau}\,\backslash\,\mathcal{T}_{p}}{\Gamma^{+}_{\tau}\,\backslash\,\mathcal{T}_{p}}$.
This resembles the complex case where the closed geodesics on
$Y_{0}(\mathbb{C})$ are projections of geodesics in $\mathcal{H}$ joining two
real quadratic numbers that are conjugated. In [BDIS02], such loops in
$\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma^{+}_{\tau}$}\big{\backslash}\raise
2.15277pt\hbox{$\mathcal{T}_{p}$}}}{\Gamma^{+}_{\tau}\,\backslash\,\mathcal{T}_{p}}{\Gamma^{+}_{\tau}\,\backslash\,\mathcal{T}_{p}}{\Gamma^{+}_{\tau}\,\backslash\,\mathcal{T}_{p}}$
are called Shintani-cycles, for that reason we refer to $\Delta_{\tau}$ as the
Ihara-Shintani cycle attached to $\Gamma^{+}\tau$. In this way, we think of
the cycles $\Delta_{\tau}$ as the $p$-adic analogues to the compact geodesic
orbits on the modular surface and the space $T^{(p)}(Y_{0}(\mathbb{C}))$ as a
$p$-adic unit tangent bundle of $Y_{0}(\mathbb{C})$.

For $\tau\in\mathcal{H}^{\prime}$, we denote by $\mathcal{O}_{\tau}$ the ring
formed by the elements in $M_{2}(\mathbb{Z}[1/p])$ having the column
$(\tau\,\,\,1)^{t}$ as an eigenvector. Let $K$ be a quadratic imaginary field
at which $p$ splits and let $\mathcal{O}$ be a $\mathbb{Z}[1/p]$-order inside
$K$. We denote by $IS(\mathcal{O})$ the collection of $\Gamma^{+}$-orbits of
those $\tau\in\mathcal{H}^{\prime}$ for which $\mathbb{Q}(\tau)=K$ and
$\mathcal{O}_{\tau}$ is isomorphic to the order $\mathcal{O}$. The group
$Pic(\mathcal{O})$ act simply transitive on $IS(\mathcal{O})$ and so this set
is finite. Let $A$ be the diagonal group of $\mathrm{PGL}_{2}$. The cycle
$\Delta_{\tau}$ comes equipped with a unique $A(\mathbb{Q}_{p})$-right
invariant probability measure $\nu_{\tau}$. Denote by $\mu_{\mathcal{O}}$ the
unique probability measure proportional to $\sum_{\Gamma^{+}\tau\in
IS(\mathcal{O})}\nu_{\tau}$.

Equip $T^{(p)}(Y_{0}(\mathbb{C}))$ with the unique probability measure coming
from a Haar measure on $\mathrm{PGL}_{2}(\mathbb{R}\times\mathbb{Q}_{p})$ and
the counting measure in $\Gamma$. Denote this measure by $\mu$. Our $p$-adic
analogue to Duke’s theorem on the equidistribution of closed geodesics is the
following statement.

######  Theorem A.

As $disc(\mathcal{O})\to-\infty$, the sequence $\mu_{\mathcal{O}}$ converges
to $\mu$ in the weak-* topology. In other words, for every continous and
compactly supported function $f\colon
T^{(p)}(Y_{0}(\mathbb{C}))\to\mathbb{C}$,

$\lim_{disc(\mathcal{O})\to-\infty}\int fd\mu_{\mathcal{O}}\to\int fd\mu.$

Now we discuss our result on Heegner points on Shimura curves. Fix
$\mathcal{B}$ a non-split indefinite quaternion algebra defined over
$\mathbb{Q}$ whose discriminant $N^{-}$ is divisible by $p$. Also fix
$\mathcal{R}$ an Eichler-order in $\mathcal{B}$ of level $N^{+}$. Let $X$ be
the Shimura curve attached to $(\mathcal{B},\mathcal{R})$ as in section 6. Let
$\mathbb{Q}_{p^{2}}$ be the unique quadratic unramified extension of
$\mathbb{Q}_{p}$. The compact space $X(\mathbb{Q}_{p^{2}})$ admits a
uniformization by $\mathrm{PGL}_{2}(\mathbb{Q}_{p})$ due to Cerednik and
Drinfeld. Pushing a Haar measure of $\mathrm{PGL}_{2}(\mathbb{Q}_{p})$ we can
endow $X(\mathbb{Q}_{p^{2}})$ with a natural probability measure $\mu_{X}$.
Let $\mathcal{O}$ be an order in a quadratic imaginary field in which $p$ is
inert and whose discriminant is coprime to $pN^{-}N^{+}$. Let
$Heeg(\mathcal{O})$ denote the collection of Heegner points in
$X(\mathbb{Q}_{p^{2}})$ with endomorphism ring isomorphic to $\mathcal{O}$
defined in Section 6. We obtain the following equidistribution theorem.

######  Theorem B.

As $disc(\mathcal{O})\to-\infty$, the collection $Heeg(\mathcal{O})$ becomes
equidistributed on $X(\mathbb{Q}_{p^{2}})$ with respect to the measure
$\mu_{X}$. In other words, for every continuous function $f\colon
X(\mathbb{Q}_{p^{2}})\to\mathbb{C}$,

$\lim_{disc(\mathcal{O})\to-\infty}\frac{1}{\\#Heeg(\mathcal{O})}\sum_{P\in
Heeg(\mathcal{O})}f(P)\to\int_{X(\mathbb{Q}_{p^{2}})}fd\mu_{X}.$

A related result by Disegni [Dis22] concerns the case where the power of $p$
in the conductor of the Heegner points tends to infinity. In such a situation
there is no accumulation measure on $X(\mathbb{C}_{p})$ describing the
asymptotic distribution of their Galois orbits

The main tool for our purposes is Theorem 4.6 in [ELMV11]. In consequence, our
strategy is to describe the previous objects and ambient spaces in an
$S$-arithmetic and adelic context. In doing so we will appeal to the language
of (oriented) optimal embeddings to parametrize our packets as orbits under
certain Pic groups which will lead to a description of these as toric orbits
inside a homogeneous space. In section 2 we cover the basics about the Bruhat-
Tits tree of $\mathrm{PGL}_{2}$ making special emphasis on how quadratic
algebras act on it. In section 3 we recall the language of adelic and
$S$-arithmetic homogeneous spaces as presented for instance in [ELMV11]. In
section 4 we elaborate on the definition of cycles $\Delta_{\psi}$ in a
general setting, where $\psi$ runs over embeddings of quadratic extension to a
quaternion algebra. More specifically, in section 4.1 and 4.2 we discuss the
structure of Eichler orders and oriented optimal embeddings respectively. In
section 4.3 we show how the group $Pic(\mathcal{O})$ acts simply and
transitively on the set of oriented optimal embeddings (with respect to
$\mathcal{O}$), showing that the cycles $\Delta_{\psi}$ defined in section 4.4
are finite and they can be recovered from a single oriented optimal embedding.
Section 5 is a specialization of the previous sections and it is where we
properly define the cycles $\Delta_{\tau}$ for $\tau$ in
$\Gamma^{+}\backslash\mathcal{H}^{\prime}$ and discuss the analogies with the
geodesics in Duke’s theorem. Section 6 deals with the different specialization
related to Heegner points on the $p$-adic points of indefinite Shimura curves.
Finally, section 7 presents Theorem 4.6 in [ELMV11]. We explain how to apply
it to show the equidistribution of the objects defined in sections 5 and 6,
proving in particular Theorem A and Theorem B.

## Acknowledgments

I would like to thank my advisor Ricardo Menares for trusting me with this
project and for his support throughout this work. I also would like to thank
Philippe Michel and the Analytic Number Theory group at EPFL. I was very lucky
to enjoy their hospitality during the academic period 2022-2023. This work was
supported by ANID Doctorado Nacional No 21200911 and by the Bourse
d’excellence de la Confédération suisse No. 2022.0414.

##  2\. Dynamics of tori acting on the Bruhat-Tits tree

Our main references for this section are [Ser03], [Voi21] and [Cas14]. Let
$\ell$ be a rational prime. Let $\mathcal{T}_{\ell}$ be the Bruhat-Tits tree
of $\mathrm{PGL}_{2}(\mathbb{Q}_{\ell})$. Its set of vertices
$\mathcal{V}(\mathcal{T}_{\ell})$ corresponds to homothety classes of
$\mathbb{Z}_{\ell}$-lattices in $\mathbb{Q}_{\ell}^{2}$. The class of a
lattice $\Lambda$ is denoted by $[\Lambda]$ and for $n\in\mathbb{Z}$ we set
$v_{n}\colonequals[\ell^{n}\mathbb{Z}_{\ell}\times\mathbb{Z}_{\ell}]$. Two
vertices are connected by an edge if they admit representatives $\Lambda$ and
$\Lambda^{\prime}$ such that
$\ell\Lambda\subseteq\Lambda^{\prime}\subseteq\Lambda$ and
$\Lambda/\Lambda^{\prime}$ is cyclic of order $\ell$. With these definitions,
$\mathcal{T}_{\ell}$ is a $(\ell+1)$-regular tree.

If $e$ is an edge connecting two vertices, the choice of one of them as its
source (denoted $s(e)$) and the other one as its target (denoted $t(e)$) make
$e$ an oriented edge. We denote by
$\overrightarrow{\mathcal{E}}(\mathcal{T}_{\ell})$ the set of oriented edges.
Let $e_{\infty}$ be the oriented edge such that $s(e_{\infty})=v_{0}$ and
$t(e_{\infty})=v_{-1}$. The group $\mathrm{PGL}_{2}(\mathbb{Q}_{\ell})$ acts
transitively on $\mathcal{V}(\mathcal{T}_{\ell})$ and
$\overrightarrow{\mathcal{E}}(\mathcal{T}_{\ell})$. The subgroups
$\mathrm{PGL}_{2}(\mathbb{Z}_{\ell})$ and

$\Gamma_{0}(\ell\mathbb{Z}_{\ell})=\left\\{\begin{pmatrix}a&b\\\
c&d\end{pmatrix}\in\mathrm{PGL}_{2}(\mathbb{Z}_{\ell}):\ell\mid c\right\\}$

are the stabilizer of $v_{0}$ and $e_{\infty}$ respectively. Consequently, we
have identifications

$\mathcal{V}(\mathcal{T}_{\ell})=\mathrm{PGL}_{2}(\mathbb{Q}_{\ell})/\mathrm{PGL}_{2}(\mathbb{Z}_{\ell})\mbox{
and
}\overrightarrow{\mathcal{E}}(\mathcal{T}_{\ell})=\mathrm{PGL}_{2}(\mathbb{Q}_{\ell})/\Gamma_{0}(\ell\mathbb{Z}_{\ell}).$

A path of length $n\geq 0$ in $\mathcal{T}_{\ell}$ is sequence of $n$ adjacent
vertices without backtracking. Paths of length $n$ starting from $v_{0}$ are
identified with $\mathbb{P}^{1}(\mathbb{Z}/\ell^{n}\mathbb{Z})$: To give such
a path is equivalent to give a vertex $v$ at distance $n$ from $v_{0}$. The
group $\mathrm{PGL}_{2}(\mathbb{Z}_{\ell})$ acts transitively on such vertices
and one such vertex is $v_{-n}$. Its stabilizer in
$\mathrm{PGL}_{2}(\mathbb{Z}_{\ell})$ is

$\Gamma_{0}(\ell^{n}\mathbb{Z}_{\ell})=\left\\{\begin{pmatrix}a&b\\\
c&d\end{pmatrix}\in\mathrm{PGL}_{2}(\mathbb{Z}_{\ell}):\ell^{n}\mid
c\right\\}.$

Therefore we have $\mathrm{PGL}_{2}(\mathbb{Z}_{\ell})$-equivariant
identifications between

(2.1)
$\mathrm{PGL}_{2}(\mathbb{Z}_{\ell})/\Gamma_{0}(\ell^{n}\mathbb{Z}_{\ell})\cong\mathbb{P}^{1}(\mathbb{Z}/\ell^{n}\mathbb{Z}),$

and paths of length $n$ starting from $v_{0}$ such that the path ending at
$v_{-n}$ corresponds to $\infty$. The action of
$\mathrm{PGL}_{2}(\mathbb{Z}_{\ell})$ on the right hand side of (2.1) is by
fractional linear transformations.

A branch in $\mathcal{T}_{\ell}$ is a sequence of adjacent vertices without
backtracking. Two branches are equivalent if they differ by a finite initial
sequence. An equivalence class of branches is called an end of
$\mathcal{T}_{\ell}$ and we denote the set of ends by
$\partial\mathcal{T}_{\ell}$. We can see $\partial\mathcal{T}_{\ell}$ as the
boundary of the tree and identify it with $\mathbb{P}^{1}(\mathbb{Q}_{\ell})$:
The group $PGL_{2}(\mathbb{Q}_{\ell})$ acts transitively on the set of ends
and the stabilizer of the end coming from the branch $\\{v_{-n}\\}_{n\geq 0}$
is the subgroup
$B(\mathbb{Q}_{\ell})\subseteq\mathrm{PGL}_{2}(\mathbb{Q}_{\ell})$ of upper
triangular elements. We have $\mathrm{PGL}_{2}(\mathbb{Q}_{\ell})$-equivariant
identifications

(2.2)
$\partial\mathcal{T}_{\ell}\cong\mathrm{PGL}_{2}(\mathbb{Q}_{\ell})/B(\mathbb{Q}_{\ell})\cong\mathrm{PGL}_{2}(\mathbb{Z}_{\ell})/B(\mathbb{Z}_{\ell})\cong\mathbb{P}^{1}(\mathbb{Z}_{\ell})=\mathbb{P}^{1}(\mathbb{Q}_{\ell}),$

such that that the branch coming from $\\{v_{-n}\\}_{n\geq 0}$ corresponds to
$\infty$. As before, under this identification the action of
$\mathrm{PGL}_{2}(\mathbb{Q}_{\ell})$ on $\mathbb{P}^{1}(\mathbb{Q}_{\ell})$
corresponds to the action by fractional linear transformations.

A geodesic is the path without backtracking in the tree connecting two
different points in the boundary. The geodesic joining the points $0$ and
$\infty$ is given by the vertices $\\{v_{n}\\}_{n\in\mathbb{Z}}$ and we denote
it by $\mathcal{G}$. In general $\mathcal{G}_{x}^{y}$ denotes the geodesic
joining $x$ and $y$.

Let $v$ and $v^{\prime}$ be two vertices in $\mathcal{T}_{\ell}$. Being
$\mathcal{T}_{\ell}$ a tree, there exists a unique finite path connecting $v$
and $v^{\prime}$. The distance $d(v,v^{\prime})$ between $v$ and $v^{\prime}$
is the length of this path. For instance, two vertices are at distance $1$ if
they are connected by an edge. Let $e$ an edge and $\eta$ a path (no
necessarily of finite length) in the tree. The distance $d(v,\eta)$ between
$v$ and $\eta$ is $\min_{w\in\eta}d(v,w)$ and the distance $d(e,\eta)$ between
$e$ and $\eta$ is $\max_{w\in e}{d(w,\eta)}$.

We denote by $A\subseteq PGL_{2}(\mathbb{Q}_{\ell})$ the subgroup of diagonal
elements.

######  Proposition 2.1.

The following hold

  1. (1)

The group $A$ fixes the points $0$ and $\infty$ in
$\partial\mathcal{T}_{\ell}$. For every $n\geq 0$, it acts transitively on the
set of vertices $v$ with $d(v,\mathcal{G})=n$.

  2. (2)

The group $\mathrm{PGL}_{2}(\mathbb{Z}_{\ell})$ has $v_{0}$ as a unique fixed
vertex and for every $n\geq 0$ it acts transitively on the sets of vertices
$v$ with $d(v,v_{0})=n$.

  3. (3)

The group $\left\langle\Gamma_{0}(\ell\mathbb{Z}_{\ell}),\begin{pmatrix}0&1\\\
\ell&0\end{pmatrix}\right\rangle$ has a unique fixed edge
$e_{\infty}=\\{v_{0},v_{-1}\\}$. For every $n\geq 0$, it acts transitively on
the set of edges $e$ with $d(e,e_{\infty})=n$.

###### Proof.

See chapter I, sections 3-5 in [Cas14]. ∎

Let $\mathcal{K}\subseteq M_{2}(\mathbb{Q}_{\ell})$ be a quadratic
$\mathbb{Q}_{\ell}$-algebra. We denote by $\mathcal{O}_{\mathcal{K}}$ the
maximal compact and open subring of $\mathcal{K}$. The order of conductor
$\ell^{n}$ is $\mathbb{Z}_{\ell}+\ell^{n}\mathcal{O}_{\mathcal{K}}$. We set
$\mathfrak{m}_{\mathcal{K}}\colonequals\ell\mathcal{O}_{\mathcal{K}}$,
$\mathcal{O}_{\mathcal{K}}^{(0)}=\mathcal{O}_{\mathcal{K}}^{\times}$ and for
$n\geq 1$ we define
$\mathcal{O}_{\mathcal{K}}^{(n)}=1+\mathfrak{m}_{\mathcal{K}}^{n}$, the $n$-th
principal subgroup of units.

######  Corollary 2.2.

Let $\mathcal{K}\subseteq M_{2}(\mathbb{Q}_{\ell})$ be a quadratic
$\mathbb{Q}_{\ell}$-algebra. Consider the action of
$\overline{\mathcal{K}}^{\times}\colonequals\mathcal{K}^{\times}/\mathbb{Q}_{\ell}^{*}$
on $\mathcal{T}_{\ell}$ through the embedding
$\mathcal{K}^{\times}/\mathbb{Q}_{\ell}^{*}\subseteq
PGL_{2}(\mathbb{Q}_{\ell})$.

  1. (1)

If $\mathcal{K}/\mathbb{Q}_{\ell}$ splits, then
$\overline{\mathcal{K}}^{\times}$ fixes two points
$x,y\in\partial\mathcal{T}_{\ell}$. For $n\geq 0$,
$\overline{\mathcal{K}}^{\times}$ acts transitively on the sets of vertices
$w$ with $d(w,\mathcal{G}_{x}^{y})=n$. Moreover, the stabilizer of $w$ is the
image in $\overline{\mathcal{K}}^{\times}$ of the order of conductor
$\ell^{n}$ in $\mathcal{K}$ where $d(v,\mathcal{G}_{x}^{y})=n$.

  2. (2)

If $\mathcal{K}/\mathbb{Q}_{\ell}$ is an unramified field extension, then
$\overline{\mathcal{K}}^{\times}$ has a unique fixed vertex $v$ and for $n\geq
0$, it acts transitively on the sets of vertices $v^{\prime}$ with
$d(v^{\prime},v)=n$. Moreover, if $d(v^{\prime},v)=n$, the stabilizer of
$v^{\prime}$ is the image in $\overline{\mathcal{K}}^{\times}$ of
$\mathcal{O}_{\mathcal{K}}^{(n)}$.

  3. (3)

If $\mathcal{K}/\mathbb{Q}_{\ell}$ is a ramified field extension, then
$\overline{\mathcal{K}}^{\times}$ has a unique fixed edge $e$ and for $n\geq
0$, it acts transitively on the set of edges $e^{\prime}$ with
$d(e,e^{\prime})=n$. Moreover, if $d(e^{\prime},e)=n$, the stabilizer of
$e^{\prime}$ is the image of the subgroup $\mathcal{O}_{\mathcal{K}}^{(2n)}$.

###### Proof.

The first item follows directly from Proposition 2.1 since there exists $g\in
PGL_{2}(\mathbb{Q}_{\ell})$ such that
$\overline{\mathcal{K}}^{\times}=gAg^{-1}$ and in particular
$\mathcal{G}_{x}^{y}=g\mathcal{G}$. Also working up to conjugation, for $(2)$
and $(3)$ it is enough to prove it for the algebra $\mathcal{K}$ (isomorphic
to $\mathbb{Q}_{\ell}(\sqrt{d})$) given by elements of the form
$\begin{pmatrix}x&y\\\ dy&x\end{pmatrix}$ where $d\in\mathbb{Z}$ is a non-zero
square mod $\ell$ in case (2) and for case (3) $\ell\mid\mid d$. Now we need
to observe that in case (2) (resp. case (3)) $\overline{\mathcal{K}}^{\times}$
is contained in $\mathrm{PGL}_{2}(\mathbb{Z}_{\ell})$ (resp.
$\left\langle\Gamma_{0}(\ell\mathbb{Z}_{\ell}),\begin{pmatrix}0&1\\\
\ell&0\end{pmatrix}\right\rangle$). The statement about the fixed elements
follows immediately from Proposition 2.1.

In case (2), transitivity follows since $\overline{\mathcal{K}}^{\times}$ acts
transitively on $\mathbb{P}^{1}(\mathbb{Z}/\ell^{n}\mathbb{Z})$ for every $n$.
For (3) one can assume $\ell\mid\mid d$ and note that $\begin{pmatrix}0&1\\\
d&0\end{pmatrix}$ preserves $e_{\infty}$ by interchanching $v_{0}$ and
$v_{-1}$. Therefore, it is enough to show that
$\overline{\mathcal{K}}^{\times}\cap\Gamma_{0}(\ell\mathbb{Z}_{\ell})$ acts
transitively on the vertices in the connected component of
$\mathcal{T}_{\ell}-e_{\infty}$ connected to $v_{-1}$ and at a given distance
to $v_{-1}$. Now for $\begin{pmatrix}x&y\\\ dy&x\end{pmatrix}$ in the given
intersection, $x\in\mathbb{Z}_{\ell}^{\times}$ and its action on
$(1\,\,\,0)^{t}$ is given by $(1\,\,\,\,dyx^{-1})^{t}$. Hence this orbit in
$\mathbb{P}^{1}(\mathbb{Z}/\ell^{n+1}\mathbb{Z})$, which corresponds to the
orbit of $v_{-(n+1)}$ in $\mathcal{T}_{\ell}-e_{\infty}$, has $\ell^{n}$
distinct elements which is exactly the number of vertices at distance $n$ from
$v_{-1}$ in this component.

Once transitivity is proven, the fact about stabilizers follows since these
algebras are commutative and by a counting argument:
$\\#\mathchoice{\text{\raise
2.15277pt\hbox{$(\mathcal{O}_{\mathcal{K}}^{\times}/\mathcal{O}_{\mathcal{K}}^{(n)})$}\big{/}\lower
2.15277pt\hbox{$(\mathbb{Z}_{\ell}^{*}/\mathbb{Z}_{\ell}^{(n)})$}}}{(\mathcal{O}_{\mathcal{K}}^{\times}/\mathcal{O}_{\mathcal{K}}^{(n)})\,/\,(\mathbb{Z}_{\ell}^{*}/\mathbb{Z}_{\ell}^{(n)})}{(\mathcal{O}_{\mathcal{K}}^{\times}/\mathcal{O}_{\mathcal{K}}^{(n)})\,/\,(\mathbb{Z}_{\ell}^{*}/\mathbb{Z}_{\ell}^{(n)})}{(\mathcal{O}_{\mathcal{K}}^{\times}/\mathcal{O}_{\mathcal{K}}^{(n)})\,/\,(\mathbb{Z}_{\ell}^{*}/\mathbb{Z}_{\ell}^{(n)})}=\ell^{n-1}(\ell+1)$
in case (2):

$\mathcal{O}_{\mathcal{K}}^{\times}/\mathcal{O}_{\mathcal{K}}^{(n)}\cong\mathbb{F}_{\ell^{2}}^{*}\times\mathcal{O}_{\mathcal{K}}^{(1)}/\mathcal{O}_{\mathcal{K}}^{(n)}$

which has cardinality $(\ell^{2}-1)\ell^{2(n-1)}$. Then the quotient
$\\#\mathchoice{\text{\raise
2.15277pt\hbox{$(\mathcal{O}_{\mathcal{K}}^{\times}/\mathbb{Z}_{\ell}^{\times})$}\big{/}\lower
2.15277pt\hbox{$(\mathcal{O}_{\mathcal{K}}^{(n)}/\mathbb{Z}_{\ell}^{(n)})$}}}{(\mathcal{O}_{\mathcal{K}}^{\times}/\mathbb{Z}_{\ell}^{\times})\,/\,(\mathcal{O}_{\mathcal{K}}^{(n)}/\mathbb{Z}_{\ell}^{(n)})}{(\mathcal{O}_{\mathcal{K}}^{\times}/\mathbb{Z}_{\ell}^{\times})\,/\,(\mathcal{O}_{\mathcal{K}}^{(n)}/\mathbb{Z}_{\ell}^{(n)})}{(\mathcal{O}_{\mathcal{K}}^{\times}/\mathbb{Z}_{\ell}^{\times})\,/\,(\mathcal{O}_{\mathcal{K}}^{(n)}/\mathbb{Z}_{\ell}^{(n)})}$
has cardinality
$(\ell^{2}-1)\ell^{2(n-1)}/(\ell-1)\ell^{n-1}=(\ell+1)\ell^{n-1},$ the number
of points at distance $n$ from $v_{0}$.

In case (3),

$(\mathcal{O}_{\mathcal{K}}^{\times}/\mathcal{O}_{\mathcal{K}}^{(2n)})\cong\mathbb{F}_{\ell}^{*}\times\mathcal{O}_{\mathcal{K}}^{(1)}/\mathcal{O}_{\mathcal{K}}^{(2n)},$

which has cardinality $(\ell-1)\ell^{2n-1}$. Then

$(\mathcal{O}_{\mathcal{K}}^{(1)}/\mathbb{Z}_{\ell}^{(1)})/(\mathcal{O}_{\mathcal{K}}^{(2n)}/\mathbb{Z}_{\ell}^{(n)})=(\mathcal{O}_{\mathcal{K}}^{(1)}/\mathcal{O}_{\mathcal{K}}^{(2n)})/(\mathbb{Z}_{\ell}^{(1)}/\mathbb{Z}_{\ell}^{(n)}),$

has cardinality $\ell^{2n-1}/\ell^{n-1}=\ell^{n}$, the number of vertices in
the connected component of $v_{-1}$ and at distance $n$ to it. ∎

##  3\. Adelic and $S$-arithmetic homogeneous spaces

Fix $p$ be a rational prime. Let $\mathbb{A}$ be the ring of adeles over
$\mathbb{Q}$. Let $B$ be a quaternion algebra over $\mathbb{Q}$ that splits
over $p$. Denote by $\boldsymbol{G}$ the algebraic group
$PB^{\times}\colonequals B^{\times}/\mathbb{G}_{m}$ of projectivized units of
$B$. We use $\widetilde{\boldsymbol{G}}$ for the algebraic group $B^{1}$ of
units of reduced norm $1$ in $B$.

Let $A$ be a ring. If $v$ a place of $\mathbb{Q}$, we denote by $A_{v}$ the
algebra $A\otimes\mathbb{Z}_{v}$ if $v$ is finite or $A\otimes\mathbb{R}$ if
$v=\infty$. Let $S$ be a finite set of places of $\mathbb{Q}$ containing the
place $p$. We use the notations $\mathbb{A}^{(S)}=\prod^{\prime}_{w\not\in
S}\mathbb{Q}_{w}$, $\mathbb{A}_{f}=\mathbb{A}^{(\infty)}$,
$\mathbb{A}_{\\#}=\mathbb{A}^{(p,\infty)}$ and $\mathbb{Q}_{S}=\prod_{v\in
S}\mathbb{Q}_{v}$. Anagolously , we use $\widehat{\mathbb{Z}}$,
$\widehat{\mathbb{Z}}_{\\#}$ to denote the closure of $\mathbb{Z}$ in
$\mathbb{A}_{f}$ and in $\mathbb{A}^{(p)}\subset\mathbb{A}_{\\#}$
respectively. In the same direction, $\widehat{A}$ and $\widehat{A}_{\\#}$
will denote $A\otimes\widehat{\mathbb{Z}}$ and
$A\otimes\widehat{\mathbb{Z}}_{\\#}$ respectively. Finally, if $t$ is an
adelic element in $\mathbb{A}$, $t_{f}$, $t_{\\#}$, $t_{S}$ and $t_{v}$ will
denote the respective projection of $t$ in $\mathbb{A}_{f}$,
$\mathbb{A}_{\\#}$, $\mathbb{Q}_{S}$ and $\mathbb{Q}_{v}$. Similarly for
$\mathbb{A}$-points over $\boldsymbol{G}$ and $\widetilde{\boldsymbol{G}}$.

The group $\widetilde{\boldsymbol{G}}$ satisfies the following strong
approximation theorem.

######  Theorem 3.1.

The subgroup
$\widetilde{\boldsymbol{G}}(\mathbb{Q})\widetilde{\boldsymbol{G}}(\mathbb{Q}_{p})$
is dense in $\widetilde{\boldsymbol{G}}(\mathbb{A})$.

###### Proof.

See [Vig80], Théoreme 4.3, p.81. ∎

In particular, if $W\subseteq\widetilde{\boldsymbol{G}}(\mathbb{A}^{(S)})$ is
an open subgroup, then
$\widetilde{\boldsymbol{G}}(\mathbb{A})=\widetilde{\boldsymbol{G}}(\mathbb{Q})\widetilde{\boldsymbol{G}}(\mathbb{Q}_{S})W$.

######  Corollary 3.2.

Let $H\subseteq B^{\times}(\mathbb{A}^{(S)})$ be an open subgroup such that
$\mathrm{nr}(B^{\times}(\mathbb{A}))=\mathrm{nr}(B^{\times}(\mathbb{Q})B^{\times}(\mathbb{Q}_{S})H)$.
Then we also have the decomposition
$B^{\times}(\mathbb{A})=B^{\times}(\mathbb{Q})B^{\times}(\mathbb{Q}_{S})H$. In
particular
$\boldsymbol{G}(\mathbb{A})=\boldsymbol{G}(\mathbb{Q})\boldsymbol{G}(\mathbb{Q}_{S})\overline{H}$
with $\overline{H}$ the image of $H$ in $\boldsymbol{G}(\mathbb{A}^{(S)})$.

###### Proof.

By the decomposition
$\mathrm{nr}(B^{\times}(\mathbb{A}))=\mathrm{nr}(B^{\times}(\mathbb{Q})B^{\times}(\mathbb{Q}_{S})H)$,
given $t\in\boldsymbol{G}(\mathbb{A})$, there exist $x_{\mathbb{Q}}\in
B^{\times}(\mathbb{Q})$, $x_{S}\in B^{\times}(\mathbb{Q}_{S})$ and $x_{H}\in
H$ such that
$x_{\mathbb{Q}}^{-1}tx_{H}^{-1}x_{S}^{-1}\in\widetilde{\boldsymbol{G}}(\mathbb{A})$.
We obtain

$B^{\times}(\mathbb{A})=B^{\times}(\mathbb{Q})\widetilde{\boldsymbol{G}}(\mathbb{A})B^{\times}(\mathbb{Q}_{S})H$

which allows us to conclude since

$\widetilde{\boldsymbol{G}}(\mathbb{A})=\widetilde{\boldsymbol{G}}(\mathbb{Q})\widetilde{\boldsymbol{G}}(\mathbb{Q}_{S})(H\cap\widetilde{\boldsymbol{G}}(\mathbb{A}^{(S)}))\subseteq
B^{\times}(\mathbb{Q})B^{\times}(\mathbb{Q}_{S})H.$

∎

Since $\boldsymbol{G}$ has no non-trivial $\mathbb{Q}$-characters, the
subgroup $\boldsymbol{G}(\mathbb{Q})$ is a lattice in
$\boldsymbol{G}(\mathbb{A})$ by Theorem 5.5 in [PR94]. We will use the
notation $[\boldsymbol{G}]$ for the locally compact space of finite measure
$\mathchoice{\text{\lower
2.15277pt\hbox{$\boldsymbol{G}(\mathbb{Q})$}\big{\backslash}\raise
2.15277pt\hbox{$\boldsymbol{G}(\mathbb{A})$}}}{\boldsymbol{G}(\mathbb{Q})\,\backslash\,\boldsymbol{G}(\mathbb{A})}{\boldsymbol{G}(\mathbb{Q})\,\backslash\,\boldsymbol{G}(\mathbb{A})}{\boldsymbol{G}(\mathbb{Q})\,\backslash\,\boldsymbol{G}(\mathbb{A})}$.
If $\boldsymbol{K}$ is a compact subgroup of $\boldsymbol{G}(\mathbb{A})$, we
use $[\boldsymbol{G}]_{\boldsymbol{K}}$ to denote the locally compact space
$\mathchoice{\text{\raise 2.15277pt\hbox{$[\boldsymbol{G}]$}\big{/}\lower
2.15277pt\hbox{$\boldsymbol{K}$}}}{[\boldsymbol{G}]\,/\,\boldsymbol{K}}{[\boldsymbol{G}]\,/\,\boldsymbol{K}}{[\boldsymbol{G}]\,/\,\boldsymbol{K}}$.
The symbol $[\cdot]_{\boldsymbol{K}}$ denotes the natural projection
$\boldsymbol{G}(\mathbb{A})\to[\boldsymbol{G}]_{\boldsymbol{K}}$ so that the
class of $g\in\boldsymbol{G}(\mathbb{A})$ in
$[\boldsymbol{G}]_{\boldsymbol{K}}$ is $[g]_{\boldsymbol{K}}$.

We denote by G the group $\boldsymbol{G}(\mathbb{Q}_{S})$. Assume that
$\boldsymbol{K}$ is the projection in $\boldsymbol{G}(\mathbb{A})$ from an
open subgroup $H\subseteq B^{\times}(\mathbb{A}^{(S)})$ satisfying the
hypothesis of Corollary 3.2 and set
$\Gamma=\boldsymbol{G}(\mathbb{Q})\cap\boldsymbol{K}\subseteq G$. By the
conclusion of the cited corollary, given $g\in\boldsymbol{G}(\mathbb{A})$
there exists $x\in\boldsymbol{G}(\mathbb{Q})$ such that
$xg_{\\#}\in\boldsymbol{K}$. Like this we obtain an identification

(3.1) $[\boldsymbol{G}]_{\boldsymbol{K}}\cong\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma$}\big{\backslash}\raise
2.15277pt\hbox{$G$}}}{\Gamma\,\backslash\,G}{\Gamma\,\backslash\,G}{\Gamma\,\backslash\,G},$

sending $[g]_{\boldsymbol{K}}$ to the $\Gamma$-orbit of $xg_{S}$ with $x$ as
before.

##  4\. The cycles

###  4.1. Eichler orders

Let $p$ and $B$ be as in the previous section and consider $N^{-}$ as the
product of the primes where $B$ ramifies and $N^{+}$ as a positive integer
coprime to $N^{-}p$. An Eichler $\mathbb{Z}[1/p]$-order $R$ in $B$ is the
intersection of two uniquely determined, not necessarily distinct, maximal
$\mathbb{Z}[1/p]$-orders in $B$. The level of $R$ is the index of $R$ inside
any of the two maximal orders that define it. By a local global-principle
(Theorem 9.1.1 in [Voi21]) $R$ is determined by its local components $R_{q}$
for $q\neq p$ so we focus on these local orders. Being also the intersection
of two uniquely determined, not necessarily distinct, maximal
$\mathbb{Z}_{q}$-orders in $B_{q}$ they are Eichler orders in $B_{q}$ and its
level is defined analogously.

If $q\nmid N^{-}$, $B$ splits at $q$ and we can use an identification
$B_{q}\cong M_{2}(\mathbb{Q}_{q})$ and the tree $\mathcal{T}_{q}$ to
understand these type of orders. Indeed, maximal orders in
$M_{2}(\mathbb{Q}_{q})$ are in bijection with $\mathcal{V}(\mathcal{T}_{q})$
by sending the class of a lattice $\Lambda$ to the order
$\mathrm{End}_{\mathbb{Z}_{q}}(\Lambda)\colonequals\\{x\in
M_{2}(\mathbb{Q}_{q})\mid x\Lambda\subseteq\Lambda\\}$. Consequently, the
Eichler order $R_{q}$ can be identified with a pair of vertices in
$\mathcal{T}_{q}$. If $R_{q}$ has level $q^{n}$, then the two corresponding
vertices are at distance $n$. In this fashion, we can identify Eichler orders
of level $q^{n}$ in $B_{q}$ with paths in $\mathcal{T}_{q}$ of length $n$. We
denote by $\eta_{R_{q}}$ the path that corresponds to $R_{q}$. Once given an
orientation to this path (select a source $s(\eta_{R_{q}})$ and target
$t(\eta_{R_{q}})$), the stabilizer in $\mathrm{PGL}_{2}(\mathbb{Q}_{q})\cong
PB_{q}^{\times}$ of this oriented path is $\overline{R}^{\times}_{q}$ (see
[Voi21] chapter 23). Since an Eichler order of level $1$ (resp. $q$)
correspond a vertex (resp. an edge), we denote in those special cases the
associated path as $v_{R_{q}}$ and $e_{R_{q}}$, respectively.

######  Remark 1.

All of this shows that the set of maximal $\mathbb{Z}[1/p]$-orders in $B_{q}$
($q\nmid N^{-}p$) forms the set of vertices of a tree which we also denote by
$\mathcal{T}_{q}$ by an abuse of notation. The action of the group
$PB_{q}^{\times}=B_{q}^{\times}/\mathbb{Q}_{q}^{\times}$ on $\mathcal{T}_{q}$
corresponds to conjugation.

###  4.2. Oriented optimal embeddings

Fix an Eichler $\mathbb{Z}[1/p]$-order $R$ in $B$. Let $K$ be a quadratic
field and $\mathcal{O}$ a $\mathbb{Z}[1/p]$-order in $K$. There exists a
unique integer $d$ with $p^{2}\nmid d$ such that
$\mathcal{O}=\mathcal{O}_{d}[1/p]$, where
$\mathcal{O}_{d}\colonequals\mathbb{Z}\left[\frac{d+\sqrt{d}}{2}\right]$, the
$\mathbb{Z}$-order of discriminant $d$. We assume that $(d,N^{-})=1$ and if
$\ell$ is a prime with $\ell^{2}\mid N^{+}$, then $(d,\ell)=1$. An algebra
embedding $\psi\colon K\to B$ is said to be optimal (with respect to
$\mathcal{O}$ and $R$) if $\psi(K)\cap R=\psi(\mathcal{O})$. Necessarily $K$
is inert at primes diving $N^{-}$, split at primes dividing $N^{+}$ and
imaginary in the case that $B$ is definite.

For $\ell$ a prime, note that $\psi$ induces a morphism (which we denote by
the same letter) $\psi\colon K_{\ell}\to B_{\ell}$ by tensoring with
$\mathbb{Q}_{\ell}$. For $\ell\nmid N^{-}$ the map $\psi$ induces an action of
$K_{\ell}^{\times}$ on $\mathcal{T}_{\ell}$ through composition with the
natural map $B_{\ell}^{\times}\to PB_{\ell}^{\times}$. If
$\overline{K}_{\ell}^{\times}$ denotes
$K^{\times}_{\ell}/\mathbb{Q}_{\ell}^{\times}$, there is also an induced
action of $\overline{K}_{\ell}^{\times}$. If $\ell\mid N^{+}$, since
$\psi(K_{\ell})$ is a split algebra over $\mathbb{Q}_{\ell}$, by Corollary 2.2
(1), the group $K_{\ell}^{\times}$ preserves a geodesic in
$\mathcal{T}_{\ell}$ that will be denoted by $\mathcal{G}_{\psi}$. In
addition, the optimality condition ensures that the stabilizer of
$\eta_{R_{\ell}}$ in $K_{\ell}^{\times}$ is
$\mathcal{O}_{\ell}^{\times}\mathbb{Q}_{\ell}^{\times}$.

An orientation of $R$ at $\ell\mid N^{-}$ is a ring morphism $\nu_{\ell}\colon
R_{\ell}\to\mathbb{F}_{\ell^{2}}$. There exist two of them and we fix one. An
orientation of $R$ at $\ell\mid N^{+}$ is the choice of a maximal order
$S_{\ell}$ in $B_{\ell}$ containing $R_{\ell}$. By the first paragraph, this
is equivalent to give an orientation to $\eta_{R_{\ell}}$. There are also two
possibilities and we fix one. We orient $\eta_{R_{\ell}}$ by declaring that
$s(\eta_{R_{\ell}})=v_{S_{\ell}}$.

For $\ell\mid N^{-}$, an orientation of $\mathcal{O}$ at $\ell$ is a ring
morphism $\mu_{\ell}\colon\mathcal{O}\to\mathbb{F}_{\ell^{2}}$. There are two
of them an we fix one. Let $\psi\colon K\to B$ an optimal embedding as before.
We say that $\psi$ is oriented at $\ell\mid N^{-}$ if it respects the
orientations of $\mathcal{O}$ and $R$ at $\ell$, i.e. if the diagram

${\mathcal{O}_{\ell}}$${R_{\ell}}$${\mathbb{F}_{\ell^{2}}}$$\scriptstyle{\psi}$$\scriptstyle{\mu_{\ell}}$$\scriptstyle{\nu_{\ell}}$

is commutative.

Take $\ell\mid N^{+}$ and assume that $\ell\nmid d$. An orientation of
$\mathcal{O}$ at $\ell$ is a group isomorphism $\mu_{\ell}\colon
K_{\ell}^{\times}/\mathcal{O}_{\ell}^{\times}\mathbb{Q}_{\ell}^{\times}\to\mathbb{Z}$.
There are two of them and we fix one. Since $\ell\nmid d$,
$\mathcal{O}_{\ell}$ is maximal and by Corollary 2.2 (1), the path
$\eta_{R_{\ell}}$ is contained in $\mathcal{G}_{\psi}$. The transformation
$T_{\psi}\colonequals\psi(\mu_{\ell}^{-1}(1))$ acts transitively on
$\mathcal{G}_{\psi}$ as a translation. We say that $\psi$ is oriented if
$T_{\psi}^{n}(v_{S_{\ell}})$ and $v_{S_{\ell}}$ are the two vertices connected
by $\eta_{R_{\ell}}$.

Keep the assumption that $\ell\mid N^{+}$ but assume now that $\ell\mid d$.
Since $K$ splits at $\ell$, the prime $\ell$ does not divides the square-free
part of $d$ so $\ell^{2n}\mid\mid d$ for some $n\geq 1$. Remember that by our
initial asumptions this implies that $\ell\mid\mid N^{+}$ so
$\eta_{R_{\ell}}=e_{R_{\ell}}$ is an edge with stabilizer in
$K_{\ell}^{\times}$ given by
$\mathcal{O}_{\ell}^{\times}\mathbb{Q}_{\ell}^{\times}=\mathcal{O}_{K_{\ell}}^{(n)}\mathbb{Q}_{\ell}^{\times}$.
Since $n\geq 1$, the edge $e_{R_{\ell}}$ is not contained in
$\mathcal{G}_{\psi}$. Its furthest vertex from $\mathcal{G}_{\psi}$ is located
at distance $n$ and by consequence the other extreme is located at distance
$n-1$. We will say that $\psi$ is oriented if the furthest vertex is
$v_{S_{\ell}}$.

######  Remark 2.

In simple words, for $\ell\mid N^{+}$ bud $\ell\nmid d$, $\psi$ is oriented if
$\eta_{R_{\ell}}$ is pointing in the same direction as the flow defined by the
transformation $T_{\psi}$ in $\mathcal{G}_{\psi}$. On the other hand, if
$\ell\mid d$, being oriented is equivalent to say that $e_{R_{\ell}}$ is
pointing towards $\mathcal{G}_{\psi}$.

######  Lemma 4.1.

The group $\overline{R}^{\times}$ respects orientations when acting by
conjugation on optimal embeddings.

###### Proof.

Let $\psi$ be an oriented optimal embedding. For $x\in\overline{R}^{\times}$,
clearly $x\psi x^{-1}$ still satisfies the optimality condition so we focus on
the orientations. For $\ell\mid N^{-}$, we show that $x\in PB^{\times}_{\ell}$
respects the orientations if and only if $x\in\overline{R}_{\ell}^{\times}$.
There exits some $j\in B_{\ell}$ such that
$B_{\ell}=\psi(K_{\ell})+j\psi(K_{\ell})$ with $j^{2}=p$ and $\alpha
j=j\alpha^{\prime}$ for every $\alpha\in\psi(K_{\ell})$, where we denote by
$\alpha^{\prime}$ the conjugate of $\alpha$ in $\psi_{\ell}(K_{\ell})$. Since
$(d,N^{-})=1$, $\mathcal{O}_{\ell}$ is maximal in $K_{\ell}$ and therefore
$R_{\ell}=\psi(\mathcal{O}_{\ell})+j\psi(\mathcal{O}_{\ell})$ with maximal
ideal $\mathfrak{m}=\psi(p\mathcal{O}_{\ell})+j\psi(\mathcal{O}_{\ell})$ (see
[Voi21] Theorem 13.3.11). Write $x$ in the form $x=\alpha+j\beta$ with
$\alpha$ and $\beta$ in $\psi(K_{\ell})$. Then
$\overline{x}=\alpha^{\prime}+j\beta$ and $\mathrm{nr}(x)=N(\alpha)-pN(\beta)$
with $N(\cdot)=N_{\psi(K_{\ell})/\mathbb{Q}_{\ell}}(\cdot)$. This allows us to
compute for $a\in\psi(\mathcal{O}_{\ell})$ the equality

$xax^{-1}=\frac{1}{N(\alpha)-pN(\beta)}(N(\alpha)a-pN(\beta)a^{\prime}+j\alpha^{\prime}\beta(a-a^{\prime})).$

From this we see that $xax^{-1}$ is congruent to $a$ mod $\mathfrak{m}$, if
$\alpha\in\psi(\mathcal{O}_{\ell})^{\times}$ and to $a^{\prime}$ if not. The
fact that $\alpha\in\psi(\mathcal{O}_{\ell})^{\times}$ occurs if and only if
$x$ belongs to $\overline{R}_{\ell}^{\times}$ allows us to conclude in this
case.

For $\ell\mid N^{+}$, we show that $x\in\overline{R}_{\ell}^{\times}$ respects
orientation. Note that $x{S_{\ell}}x^{-1}={S_{\ell}}$ since
$\overline{R}_{\ell}^{\times}\subseteq\overline{S}_{\ell}^{\times}$ so that
$xv_{S_{\ell}}=v_{S_{\ell}}$ and $x\eta_{R_{\ell}}=\eta_{R_{\ell}}$. Also note
that $\mathcal{G}_{x\psi x^{-1}}=x\mathcal{G}_{\psi}$. Since
$PB_{\ell}^{\times}$ preserves distances, these equalities are enough to show
that $x\psi x^{-1}$ is oriented noting that when $\ell\nmid d$, $T_{x\psi
x^{-1}}=xT_{\psi}x^{-1}$. ∎

###  4.3. The action of $Pic(\mathcal{O})$.

Keep the notations from the previous sections. If $q\mid N^{-}$, there exists
a unique maximal order in $B_{q}$ and therefore $R_{q}$ is maximal. Now
theorem 13.3.11 in [Voi21] implies that
$\mathrm{nr}(R_{q}^{\times})=\mathbb{Z}_{q}^{\times}$ since it contains a copy
of the ring of integers of the quadratic unramified extension of
$\mathbb{Q}_{q}$. Let $q\nmid N^{-}p$, then $B$ splits at $q$ and $q^{n}$ is
the level of $R_{q}$ if and only if $q^{n}\mid\mid N^{+}$. From Proposition
23.4.3 in [Voi21], after choosing an isomorphism of $B_{q}\cong
M_{2}(\mathbb{Q}_{q})$, $R_{q}$ is conjugate to the order
$\begin{pmatrix}\mathbb{Z}_{q}&\mathbb{Z}_{q}\\\
q^{n}\mathbb{Z}_{q}&\mathbb{Z}_{q}\end{pmatrix}$ so we also have
$\mathrm{nr}(R_{q}^{\times})=\mathbb{Z}_{q}^{\times}$ in this case.

From now on, $S$ will denote the finite set of places $\\{\infty,p\\}$ if $B$
is indefinite and the singleton $\\{p\\}$ otherwise. Let $\boldsymbol{K}$ to
be the image in $\boldsymbol{G}(\mathbb{A})$ of $\widehat{R}_{\\#}^{\times}$
if $B$ is indefinite or the image of
$\widehat{R}_{\\#}^{\times}B_{\infty}^{\times}$ otherwise. Since
$\mathrm{nr}(R_{q}^{\times})={\mathbb{Z}}_{q}^{\times}$ for $q\neq p$, the
open subgroup $\boldsymbol{K}$ satisfies the hypothesis in Corollary 3.2.
Indeed, we have the equalities
$\mathrm{nr}(B^{\times}(\mathbb{A}))=\mathbb{A}^{\times}$ or
$\mathrm{nr}(B^{\times}(\mathbb{A}))=\mathbb{A}_{f}^{\times}\times\mathbb{R}_{>0}$
in the indefinite or definite case respectively (Lemma 13.4.9 in [Voi21]).
Finally, the Hasse-Schilling theorem (Theorem 14.7.4 in [Voi21]) and the
decomposition
$\mathbb{A}^{\times}=\mathbb{Q}^{\times}\widehat{\mathbb{Z}}^{\times}\mathbb{R}^{\times}$
implies the claim.

Therefore, the identification (3.1) holds with
$\Gamma=\boldsymbol{G}(\mathbb{Q})\cap\boldsymbol{K}=\overline{R}^{\times}$
and we have

(4.1) $[\boldsymbol{G}]_{\boldsymbol{K}}\cong\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma$}\big{\backslash}\raise
2.15277pt\hbox{$\boldsymbol{G}(\mathbb{Q}_{S})$}}}{\Gamma\,\backslash\,\boldsymbol{G}(\mathbb{Q}_{S})}{\Gamma\,\backslash\,\boldsymbol{G}(\mathbb{Q}_{S})}{\Gamma\,\backslash\,\boldsymbol{G}(\mathbb{Q}_{S})}.$

We recall that the identification is given by sending $[g]_{\boldsymbol{K}}$
to the $\Gamma$-class of $xg_{S}$, where $x\in\boldsymbol{G}(\mathbb{Q})$ is
such that $xg_{\\#}\in\boldsymbol{K}$.

Let $\boldsymbol{T}_{K}$ be the algebraic torus
$\mathrm{res}_{K/\mathbb{Q}}\mathbb{G}_{m}/\mathbb{G}_{m}$. By the local-
global principle for lattices ([Voi21] Theorem 9.1.1) and using that $p$ is
invertible in $\mathcal{O}$, we can identify $Pic(\mathcal{O})$ as

$\mathchoice{\text{\lower
2.15277pt\hbox{$\boldsymbol{T}_{K}(\mathbb{Q})$}\big{\backslash}\raise
2.15277pt\hbox{$\boldsymbol{T}_{K}(\mathbb{A}_{f})$\\!}\big{/} \lower
2.15277pt\hbox{\\!\\!$\widehat{\mathcal{O}}^{\times}$}}}{\boldsymbol{T}_{K}(\mathbb{Q})\,\backslash\,\boldsymbol{T}_{K}(\mathbb{A}_{f})\,/\,\widehat{\mathcal{O}}^{\times}}{\boldsymbol{T}_{K}(\mathbb{Q})\,\backslash\,\boldsymbol{T}_{K}(\mathbb{A}_{f})\,/\,\widehat{\mathcal{O}}^{\times}}{\boldsymbol{T}_{K}(\mathbb{Q})\,\backslash\,\boldsymbol{T}_{K}(\mathbb{A}_{f})\,/\,\widehat{\mathcal{O}}^{\times}}=\mathchoice{\text{\lower
2.15277pt\hbox{$\boldsymbol{T}_{K}(\mathbb{Q})$}\big{\backslash}\raise
2.15277pt\hbox{$\boldsymbol{T}_{K}(\mathbb{A}_{\\#})$\\!}\big{/} \lower
2.15277pt\hbox{\\!\\!$\widehat{\mathcal{O}}^{\times}_{\\#}$}}}{\boldsymbol{T}_{K}(\mathbb{Q})\,\backslash\,\boldsymbol{T}_{K}(\mathbb{A}_{\\#})\,/\,\widehat{\mathcal{O}}^{\times}_{\\#}}{\boldsymbol{T}_{K}(\mathbb{Q})\,\backslash\,\boldsymbol{T}_{K}(\mathbb{A}_{\\#})\,/\,\widehat{\mathcal{O}}^{\times}_{\\#}}{\boldsymbol{T}_{K}(\mathbb{Q})\,\backslash\,\boldsymbol{T}_{K}(\mathbb{A}_{\\#})\,/\,\widehat{\mathcal{O}}^{\times}_{\\#}}=\mathchoice{\text{\lower
2.15277pt\hbox{$\boldsymbol{T}_{K}(\mathbb{Q})$}\big{\backslash}\raise
2.15277pt\hbox{$\boldsymbol{T}_{K}(\mathbb{A})$\\!}\big{/} \lower
2.15277pt\hbox{\\!\\!$\widehat{\mathcal{O}}^{\times}_{\\#}\boldsymbol{T}_{K}(\mathbb{Q}_{S})$}}}{\boldsymbol{T}_{K}(\mathbb{Q})\,\backslash\,\boldsymbol{T}_{K}(\mathbb{A})\,/\,\widehat{\mathcal{O}}^{\times}_{\\#}\boldsymbol{T}_{K}(\mathbb{Q}_{S})}{\boldsymbol{T}_{K}(\mathbb{Q})\,\backslash\,\boldsymbol{T}_{K}(\mathbb{A})\,/\,\widehat{\mathcal{O}}^{\times}_{\\#}\boldsymbol{T}_{K}(\mathbb{Q}_{S})}{\boldsymbol{T}_{K}(\mathbb{Q})\,\backslash\,\boldsymbol{T}_{K}(\mathbb{A})\,/\,\widehat{\mathcal{O}}^{\times}_{\\#}\boldsymbol{T}_{K}(\mathbb{Q}_{S})}.$

We denote by $\mathrm{opt}(\mathcal{O},R)$ the set of all oriented optimal
embeddings $K\to B$ and by $[\mathrm{opt}(\mathcal{O},R)]$ we mean the set of
$\overline{R}^{\times}$-conjugacy classes in $\mathrm{opt}(\mathcal{O},R)$.
The class of an embedding $\psi$ is denoted by $[\psi]$. Now we define an
action of $Pic(\mathcal{O})$ on $[\mathrm{opt}(\mathcal{O},R)]$. Let
$\mathfrak{a}\in Pic(\mathcal{O})$ and assume that it is related to the class
of $t\in\boldsymbol{T}_{K}(\mathbb{A})$. The embedding $\psi$ induces an
adelic map $K\otimes\mathbb{A}\to B\otimes\mathbb{A}$ which in turns induces
an injection

$\mathchoice{\text{\lower
2.15277pt\hbox{$\boldsymbol{T}_{K}(\mathbb{Q})$}\big{\backslash}\raise
2.15277pt\hbox{$\boldsymbol{T}_{K}(\mathbb{A})$\\!}\big{/} \lower
2.15277pt\hbox{\\!\\!$\widehat{\mathcal{O}}^{\times}_{\\#}$}}}{\boldsymbol{T}_{K}(\mathbb{Q})\,\backslash\,\boldsymbol{T}_{K}(\mathbb{A})\,/\,\widehat{\mathcal{O}}^{\times}_{\\#}}{\boldsymbol{T}_{K}(\mathbb{Q})\,\backslash\,\boldsymbol{T}_{K}(\mathbb{A})\,/\,\widehat{\mathcal{O}}^{\times}_{\\#}}{\boldsymbol{T}_{K}(\mathbb{Q})\,\backslash\,\boldsymbol{T}_{K}(\mathbb{A})\,/\,\widehat{\mathcal{O}}^{\times}_{\\#}}\to[\boldsymbol{G}]_{\boldsymbol{K}}=[G].$

Remembering the identification (4.1), the class of
$t\in\boldsymbol{T}_{K}(\mathbb{A})$ is sent to the $\Gamma$-class of
$x\psi(t_{S})$, where $x\in\boldsymbol{G}(\mathbb{Q})$ is such that
$x\psi(t_{\\#})\in\boldsymbol{K}$. We define the action of $\mathfrak{a}$ on
$[\psi]$ as $\mathfrak{a}\star[\psi]\colonequals[x\psi x^{-1}]$.

######  Lemma 4.2.

The action of $\mathfrak{a}$ on the class of $\psi$ is well defined and gives
rise to an action of $Pic(\mathcal{O})$ on $[\mathrm{opt}(\mathcal{O},R)]$

###### Proof.

It is well defined because the class of $\psi(t_{\\#})$ depends only on the
class of $\mathfrak{a}$ and on the other hand conjugating $\psi$ by an element
of $\gamma\in\Gamma$ changes $x$ by $x\gamma^{-1}$ since
$\gamma\in\boldsymbol{K}$. After conjugating $\gamma\psi\gamma^{-1}$ by
$x\gamma^{-1}\gamma$ we obtain again $x\psi x^{-1}$.

Since $x\in\boldsymbol{G}(\mathbb{Q})$, $x\psi x^{-1}$ is indeed a new
embedding that send $K\to B(\mathbb{Q})$. For the optimality it is enough to
show that for $q\neq p$ one has $x\psi(K_{q})x^{-1}\cap
R_{q}=x\psi(\mathcal{O}_{q})x^{-1}$. We know $\psi(K_{q})\cap
R_{q}=\psi(\mathcal{O}_{q})$ but since $\mathrm{im}(\psi)$ is commutative,
after conjugating by $x\psi(t_{q})$ we have
$x\psi(K_{q})x^{-1}\cap(x\psi(t_{q}))R_{q}(x\psi(t_{q}))^{-1}=x\psi(\mathcal{O}_{q})x^{-1}$
and now we use $(x\psi(t_{q}))R_{q}(x\psi(t_{q}))^{-1}=R_{q}$ since
$x\psi(t_{q})\in\overline{R}_{q}^{\times}$.

To see that $x\psi x^{-1}$ is oriented we have to check locally at $\ell\mid
N^{-}N^{+}$. If $\ell\mid N^{-}$,
$\psi(\overline{K}_{\ell})^{\times}\subseteq\overline{R}_{\ell}^{\times}$ so
$x\in\overline{R}_{\ell}^{\times}$ and therefore $x\psi x^{-1}$ is oriented.
If $\ell\mid N^{+}$, observe that
$\psi(t_{q})\mathcal{G}_{\psi}=\mathcal{G}_{\psi}$ by defintion of
$\mathcal{G}_{\psi}$. Also, we have
$x\psi(t_{\ell})\eta_{R_{\ell}}=\eta_{R_{\ell}}$ since
$x\psi(t_{\ell})\in\overline{R}_{\ell}^{\times}$. Then, since
$x\psi(t_{\ell})$ preserves distances, $\eta_{R_{\ell}}$ is at the same
distance to $x\mathcal{G}_{\psi}=\mathcal{G}_{x\psi x^{-1}}$. Since
$x\psi(t_{\ell})$ preserves the orientation of $\eta_{R_{\ell}}$, it follows
that $x\psi x^{-1}$ is oriented noting in the case $\ell\nmid d$ that
$\psi(t_{\ell})T_{\psi}\psi(t_{\ell})^{-1}=T_{\psi}$.

Suppose that $\mathfrak{a}$ and $\mathfrak{b}$ are related to the adelic
elements $t$ and $s$. Consider $x,y\in\boldsymbol{G}(\mathbb{Q})$ such that
$x\psi(s_{\\#}),yx\psi(t_{\\#})x^{-1}\in\boldsymbol{K}$. The equality
$yx\psi(t_{\\#}s_{\\#})=yx\psi(t_{\\#})x^{-1}x\psi(s_{\\#})\in\boldsymbol{K}$
shows that
$\mathfrak{a}\star(\mathfrak{b}\star[\psi])=\mathfrak{a}\mathfrak{b}\star[\psi]$.

∎

######  Proposition 4.3.

The group $Pic(\mathcal{O})$ acts simply transitively on
$[\mathrm{opt}(\mathcal{O},R)]$.

###### Proof.

To show that the action is simple take $\gamma\in\Gamma$ such that
$\gamma^{-1}x\psi(\gamma^{-1}x)^{-1}=\psi$. In particular $\gamma^{-1}x$
belongs to the normalizer of $\psi(K)^{\times}$ which is $\psi(K)^{\times}\cup
s\psi(K)^{\times}$ with any $s\in B^{\times}(\mathbb{Q})$ such that $s\psi
s^{-1}=\psi\circ\sigma$, where $\sigma$ is the non-trivial
$\mathbb{Q}$-automorphism of $K$. Since $\gamma^{-1}x$ normalized each value
of $\psi$ we must have $\gamma^{-1}x\in\psi(K)^{\times}$. See Corollaire 2.3,
p.6 in [Vig80].This implies $x=\gamma\psi(t)$ with $t\in K^{\times}$ and
therefore $\psi(tt_{\\#})\in\gamma\boldsymbol{K}=\boldsymbol{K}$. This shows
that $\mathfrak{a}$ is trivial in $Pic(\mathcal{O})$ and therefore the action
is simple.

Now we show the transitivity. Let $\psi$ and $\psi^{\prime}$ be two optimal
embeddings for $\mathcal{O}$. As a consequence of Skolem-Noether there exists
$x\in\boldsymbol{G}(\mathbb{Q})$ such that $\psi^{\prime}=x\psi x^{-1}$. To
prove transitivity we need to show that there exists an adelic element $t$
such that $x\psi(t_{\\#})\in\boldsymbol{K}$. Since both $\psi$ and
$\psi^{\prime}$ are optimal for $\mathcal{O}$, we have for $q\neq p$

(4.2) $\psi(\mathcal{O}_{q})=\psi(K_{q})\cap R_{q}=\psi(K_{q})\cap
x^{-1}R_{q}x.$

If $q\mid N^{-}$, we have
$\psi(K_{q})^{\times}\subseteq\overline{R}_{q}^{\times}$. Then the condition
$x\psi(t_{q})\in\overline{R}_{q}^{\times}$ is equivalent to
$x\in\overline{R}_{q}^{\times}$. Since $\psi^{\prime}=x\psi x^{-1}$ and $\psi$
and $\psi^{\prime}$ are oriented, we have indeed that
$x\in\overline{R}_{q}^{\times}$.

If $q\nmid N^{-}$ remember that $\psi$ induces an action of $K_{q}^{\times}$
on $\mathcal{T}_{q}$ and in this case $\psi(K_{q})$ is a split algebra over
$\mathbb{Q}_{q}$ so that there exists a unique geodesic $\mathcal{G}_{\psi}$
preserved by this action. The relation (4.2) shows that $\eta_{R_{q}}$ and
$x^{-1}\eta_{R_{q}}$ have the same stabilizer in $K_{q}^{\times}$ under this
action. If in addition $q\nmid N^{+}$, $\eta_{R_{q}}=v_{R_{q}}$ and
$x^{-1}\eta_{R_{q}}=x^{-1}v_{R_{q}}$ are actually vertices and Corollary 2.2
shows they are at the same distance to $\mathcal{G}_{\psi}$ (since same
stabilizer implies same distance) and then they are in the same orbit.
Therefore there exists some $t_{q}\in K_{q}^{\times}$ satisfying
$x\psi(t_{q})v_{R_{q}}=v_{R_{q}}$. This implies
$x\psi(t_{q})\in\overline{R}_{q}^{\times}$.

Now assume that $q^{n}\mid\mid N^{+}$ and $q\nmid d$. The relation (4.2) and
the fact that $\psi$ and $\psi^{\prime}$ are oriented implies that
$\eta_{R_{q}}$ and $x^{-1}\eta{R_{q}}$ are contained in $\mathcal{G}_{\psi}$
and they point in the same direction as the flow defined by $T_{\psi}$.
Therefore there exists some $n\in\mathbb{Z}$ such that
$xT_{\psi}^{n}\eta_{R_{q}}=\eta_{R_{q}}$ as an oriented path. Since
$T_{\psi}^{n}=\psi(\mu_{q}^{-1}(n))$ we have that
$x\psi(t_{q})\in\overline{R}_{q}^{\times}$ for any $t_{q}\in
K_{\ell}^{\times}$ lying in $\mu_{q}^{-1}(n)$ when taken mod
$\mathcal{O}_{q}^{\times}\mathbb{Q}_{q}^{\times}$.

Finally if $q\mid\mid N^{+}$ and $q\mid d$, again the condition of being
oriented embeddings and relation (4.2) implies that the edges
$\eta_{R_{q}}=e_{R_{q}}$ and $x^{-1}\eta_{R_{q}}=x^{-1}e_{R_{q}}$ are at the
same distance to $\mathcal{G}_{\psi}$ and pointing in the same direction
relative to $\mathcal{G}_{\psi}$. Corollary 2.2 (1) implies that they are in
the same orbit under the action of $K_{q}^{\times}$ and so there exists
$t_{q}\in K_{q}^{\times}$ such that $x\psi(t_{q})e_{R_{q}}=e_{R_{q}}$ as
oriented edges, implying that $x\psi(t_{q})\in\overline{R}_{q}^{\times}$. ∎

###  4.4. The cycles $\Delta_{\psi}$

Keep the previous notations and fix $H$ a subgroup of $G$ that is the image of
the units of an algebra in $B_{S}$ isomorphic to $K_{S}$. Let $\psi\in
opt(\mathcal{O},R)$, we denote by $\Delta_{\psi}$ the image in
$\mathchoice{\text{\lower 2.15277pt\hbox{$\Gamma$}\big{\backslash}\raise
2.15277pt\hbox{$G$}}}{\Gamma\,\backslash\,G}{\Gamma\,\backslash\,G}{\Gamma\,\backslash\,G}$
of a set of the form $\psi(K_{S})^{\times}g$ with $g\in G$ such that
$\psi(K_{S})^{\times}=gHg^{-1}$ (such $g$ exists by Skolem-Noether). Since $H$
has index $2^{\\#S}$ in its normalizer in $G$, there are only $2^{\\#S}$ such
sets and they depend only on the class of $\psi$ in $[opt(\mathcal{O},R)]$. In
the following sections we will make use of the action of $G$ on certain spaces
to select a single $\Delta_{\psi}$ among the $2^{\\#S}$ possibilities.

Let $h^{\prime}=h^{\prime}(\mathcal{O})$ be the cardinality of
$Pic(\mathcal{O})$ and consider $t_{1},...,t_{h^{\prime}}$ ideles in
$\widehat{K}^{\times}_{\\#}\subseteq\mathbb{A}_{K}^{\times}$ such that
$\widehat{K}^{\times}_{\\#}=\bigsqcup_{i=1}^{h^{\prime}}K^{*}t_{i}^{-1}\widehat{\mathcal{O}}^{\times}_{\\#}$.
Note that this is equivalent to ask for a full set of representatives for
$Pic(\mathcal{O})$ under its identification with $\mathchoice{\text{\lower
2.15277pt\hbox{$K^{\times}$}\big{\backslash}\raise
2.15277pt\hbox{$\widehat{K}^{\times}_{\\#}$\\!}\big{/} \lower
2.15277pt\hbox{\\!\\!$\widehat{\mathcal{O}}_{\\#}^{\times}$}}}{K^{\times}\,\backslash\,\widehat{K}^{\times}_{\\#}\,/\,\widehat{\mathcal{O}}_{\\#}^{\times}}{K^{\times}\,\backslash\,\widehat{K}^{\times}_{\\#}\,/\,\widehat{\mathcal{O}}_{\\#}^{\times}}{K^{\times}\,\backslash\,\widehat{K}^{\times}_{\\#}\,/\,\widehat{\mathcal{O}}_{\\#}^{\times}}$.

######  Proposition 4.4.

Fix $\psi_{0}\in opt(\mathcal{O},R)$. Then, the projection of
$\boldsymbol{T}_{\psi_{0}}g$ in
$[\boldsymbol{G}]_{\boldsymbol{K}}=\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma$}\big{\backslash}\raise
2.15277pt\hbox{$G$}}}{\Gamma\,\backslash\,G}{\Gamma\,\backslash\,G}{\Gamma\,\backslash\,G}$
is of the form $\bigsqcup_{\psi\in[opt(\mathcal{O},R)]}\Delta_{\psi}$.

###### Proof.

The image of $[\boldsymbol{T}_{K}]$ under $\psi_{0}$ in
$[\boldsymbol{G}]_{\boldsymbol{K}}$ factors through

$\mathchoice{\text{\lower 2.15277pt\hbox{$K^{\times}$}\big{\backslash}\raise
2.15277pt\hbox{$\mathbb{A}_{K}^{\times}$\\!}\big{/} \lower
2.15277pt\hbox{\\!\\!$\widehat{\mathcal{O}}^{\times}_{\\#}\mathbb{Q}_{S}^{*}$}}}{K^{\times}\,\backslash\,\mathbb{A}_{K}^{\times}\,/\,\widehat{\mathcal{O}}^{\times}_{\\#}\mathbb{Q}_{S}^{*}}{K^{\times}\,\backslash\,\mathbb{A}_{K}^{\times}\,/\,\widehat{\mathcal{O}}^{\times}_{\\#}\mathbb{Q}_{S}^{*}}{K^{\times}\,\backslash\,\mathbb{A}_{K}^{\times}\,/\,\widehat{\mathcal{O}}^{\times}_{\\#}\mathbb{Q}_{S}^{*}}=\bigsqcup_{i=1}^{h^{\prime}}K^{*}(t_{i}^{-1}\widehat{\mathcal{O}}^{\times}_{\\#}\times(K_{S})^{\times}).$

The image of
$t_{i}^{-1}\widehat{\mathcal{O}}^{\times}_{\\#}\times(K_{S})^{\times}$ under
$\psi_{0}$ in $[\boldsymbol{G}]_{\boldsymbol{K}}$ is
$\psi_{0}(t_{i}^{-1})\boldsymbol{K}\times(\psi_{0}(K_{S}))^{\times}$. Under
the identification in (4.1) this is

$\Gamma x_{i}\psi_{0}(K_{S})^{\times}g=\Gamma
x_{i}\psi_{0}(K_{S})^{\times}x_{i}^{-1}x_{i}g,$

where $x_{i}\in\boldsymbol{G}(\mathbb{Q})$ is such that
$x_{i}\psi_{0}(t_{i}^{-1})\in\boldsymbol{K}$. This finishes the proof since
Proposition 4.3 shows that the collection $x_{i}\psi_{0}x_{i}^{-1}$ runs over
a complete set of representatives for $[opt(\mathcal{O},R)]$. ∎

##  5\. Ihara-Shintani Cycles

In this section we specialize to the case $B=M_{2}(\mathbb{Q})$,
$S=\\{p,\infty\\}$, $R=M_{2}(\mathbb{Z}[1/p])$ and $K\subseteq\mathbb{C}$ is
imaginary and splits at $p$. In this case
$\boldsymbol{K}=\mathrm{PGL}_{2}(\widehat{\mathbb{Z}}_{\\#})$ and
$\Gamma=\mathrm{PGL}_{2}(\mathbb{Z}[1/p])$ so we have natural identifications

$[\boldsymbol{G}]_{\boldsymbol{K}\cdot{\mathrm{PSO}_{2}(\mathbb{R})}}\cong\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma$}\big{\backslash}\raise
2.15277pt\hbox{$(\mathbb{C}-\mathbb{R})\times\mathrm{PGL}_{2}(\mathbb{Q}_{p})$}}}{\Gamma\,\backslash\,(\mathbb{C}-\mathbb{R})\times\mathrm{PGL}_{2}(\mathbb{Q}_{p})}{\Gamma\,\backslash\,(\mathbb{C}-\mathbb{R})\times\mathrm{PGL}_{2}(\mathbb{Q}_{p})}{\Gamma\,\backslash\,(\mathbb{C}-\mathbb{R})\times\mathrm{PGL}_{2}(\mathbb{Q}_{p})}\cong\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma^{+}$}\big{\backslash}\raise
2.15277pt\hbox{$\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p})$}}}{\Gamma^{+}\,\backslash\,\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p})}{\Gamma^{+}\,\backslash\,\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p})}{\Gamma^{+}\,\backslash\,\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p})},$

where $\Gamma^{+}=\Gamma\cap\mathrm{PGL}_{2}^{+}(\mathbb{R})$.

Let $\mathfrak{P}$ be a prime above $p$ in $\overline{\mathbb{Z}}$, the
integral closure of $\mathbb{Z}$ in $\overline{\mathbb{Q}}$. This defines an
embedding $\overline{\mathbb{Q}}\hookrightarrow\mathbb{C}_{p}$ and in
particular $K\hookrightarrow\mathbb{Q}_{p}$.

As in section 4.2, let $\mathcal{O}$ denotes a $\mathbb{Z}[1/p]$ order in $K$.
For any $\psi\in opt(\mathcal{O},R)$, the torus $\psi(K_{\infty})^{\times}$
acts on $\mathbb{C}-\mathbb{R}$ by fractional linear transformations, having
two fixed points conjugate to each other. We denote by $\tau$ its fixed point
in $\mathcal{H}\subseteq\mathbb{C}-\mathbb{R}$. On the other hand, the group
$\psi(K_{p})^{\times}$ has two fixed points in
$\mathbb{P}^{1}(\mathbb{Q}_{p})$ (when identified with
$\partial\mathcal{T}_{p}$, these are the two end points of the geodesic
preserved by Corollary 2.2) which are also $\tau$ and its conjugate, since
$\psi(K)^{\times}$ fixes them.

Let $A$ denote the diagonal group of $\mathrm{PGL}_{2}$ and consider
$H=\mathrm{PSO}_{2}(\mathbb{R})\times A(\mathbb{Q}_{p})$. Let $g\in G$ be such
that $\psi(K_{S})^{\times}=gHg^{-1}$ (it exists by Skolem-Noether). It is
always the case that both $g_{\infty}\cdot i$ and $g_{p}\cdot 0$ assume the
value $\tau$ or $\tau^{\prime}$. If we multiply $g$ by some element in
$N_{G}(H)$, the normalizer of $H$ in $G$, we cover all $4=[N_{G}(H):H]$
possibilities. Then we normalize the choice of $\Delta_{\psi}$ in
$\Gamma\backslash G$ by requiring that $g_{\infty}\cdot i=\tau$ and
$g_{p}\cdot 0=\tau$.

For $\tau$ in $\mathcal{H}^{\prime}$, we take $K_{\tau}$ to be the
$\mathbb{Q}$-algebra of matrices $g\in M_{2}(\mathbb{Q})$ such that
$g\cdot\tau=\tau$, together with the zero matrix. The map sending
$g=\begin{pmatrix}A&B\\\ C&D\end{pmatrix}$ to its eigenvalue $C\tau+D$ (with
eigenvector $(\tau\,\,\,1)^{t}$) is an isomorphism onto $\mathbb{Q}(\tau)$.
Denote its inverse as $\psi_{\tau}$ and let $IS(\mathcal{O})$ be as in the
Introduction. If $\Gamma^{+}\tau$ belongs to $IS(\mathcal{O})$, the map
$\psi_{\tau}$ is an element in $opt(\mathcal{O},R)$ whose fixed point in
$\mathcal{H}$ is $\tau$. We could have also taken the embedding coming from
the eigenvalue $C\tau^{\prime}+D$ but this one is $\Gamma$-conjugate to
$\psi_{\tau}$ since there exists
$g\in\mathrm{PGL}_{2}(\mathbb{Z})\subset\Gamma$ taking $\tau$ to
$\tau^{\prime}$.

For $\tau$ in ${\mathcal{H}^{\prime}}$, we define the Ihara-Shintani cycle
$\Delta_{\tau}$ attacthed to $\Gamma^{+}\tau$ to be the projection of
$\Delta_{\psi_{\tau}}$ to $[\boldsymbol{G}]_{\boldsymbol{K}\cdot
PSO_{2}(\mathbb{R})}$. It corresponds to the $\Gamma^{+}$ orbit of
$\\{\tau\\}\times K_{\tau,p}^{\times}g$ in
$\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p})$. If $\Gamma^{+}\tau\in
IS(\mathcal{O})$, the map $K_{p}^{\times}\to\Delta_{\tau}$ sending $x$ to the
$\Gamma^{+}$-class of $(\tau,\psi_{\tau}(x)g)$ induces a uniformization
$\mathchoice{\text{\lower
2.15277pt\hbox{$\mathcal{O}^{\times}$}\big{\backslash}\raise
2.15277pt\hbox{$K_{p}^{\times}$\\!}\big{/} \lower
2.15277pt\hbox{\\!\\!$\mathbb{Q}_{p}^{\times}$}}}{\mathcal{O}^{\times}\,\backslash\,K_{p}^{\times}\,/\,\mathbb{Q}_{p}^{\times}}{\mathcal{O}^{\times}\,\backslash\,K_{p}^{\times}\,/\,\mathbb{Q}_{p}^{\times}}{\mathcal{O}^{\times}\,\backslash\,K_{p}^{\times}\,/\,\mathbb{Q}_{p}^{\times}}\cong\Delta_{\tau}$.
The measure $\nu_{\tau}$ from the introduction is the push-forward of a finite
measure in $\mathchoice{\text{\lower
2.15277pt\hbox{$\mathcal{O}^{\times}$}\big{\backslash}\raise
2.15277pt\hbox{$K_{p}^{\times}$\\!}\big{/} \lower
2.15277pt\hbox{\\!\\!$\mathbb{Q}_{p}^{\times}$}}}{\mathcal{O}^{\times}\,\backslash\,K_{p}^{\times}\,/\,\mathbb{Q}_{p}^{\times}}{\mathcal{O}^{\times}\,\backslash\,K_{p}^{\times}\,/\,\mathbb{Q}_{p}^{\times}}{\mathcal{O}^{\times}\,\backslash\,K_{p}^{\times}\,/\,\mathbb{Q}_{p}^{\times}}$
coming from a Haar measure in $K_{p}^{\times}$.

Let $d$ be as in section 4.2. Suppose that $\Gamma^{+}\tau\in
IS(\mathcal{O})$. Since $\tau\in\mathcal{H}^{\prime}$ and $K\cong K_{\tau}$ we
have that $p\nmid d$ and $p$ splits into two primes inside $\mathcal{O}_{d}$.
Both of these primes are proper so that they define elements in
$Cl(\mathcal{O}_{d})$. Let $k$ be the order of
$\mathfrak{p}=\mathfrak{P}\cap\mathcal{O}_{d}$ in this group so we can write
$\mathfrak{p}^{k}=u\mathcal{O}_{d}$ for some $u\in\mathcal{O}_{d}$.

######  Lemma 5.1.

We have $\mathcal{O}^{\times}=\langle\mathcal{O}_{d}^{\times},u,p\rangle$.

###### Proof.

Note that $x\in\mathcal{O}^{\times}$ if and only if $p^{n}x\in\mathcal{O}_{d}$
and $p^{m}\in x\mathcal{O}_{d}$ for some $n,m\geq 0$. Therefore, after
multiplying by a power of $p$, we can assume that $x\in\mathcal{O}_{d}$ and
$x\mathcal{O}_{d}$ is an ideal dividing $p^{m}\mathcal{O}_{d}$, so that it is
of the shape $\mathfrak{p}^{i}\mathfrak{p}^{\prime j}$ with $i,j\geq 0$ by
uniqueness of the prime decomposition (principal ideals are proper). Here
$\mathfrak{p}^{\prime}$ denotes the conjugate of $\mathfrak{p}$ under the non-
trivial automorphism of $K$. If $i,j\geq k$ we can divide $x$ by a power of
$u$ or $u^{\prime}$ in order to have $0\leq i,j<k$. If $i=j$ we see that $x$
differs from an element in $\mathcal{O}_{d}^{\times}$ by a power of $p$. If
this is not the case, after taking classes in $Cl(\mathcal{O}_{d})$ we obtain
a contradiction with the minimality of $k$. All of this proves that
$\mathcal{O}^{\times}=\langle\mathcal{O}_{d}^{\times},u,p\rangle$ since
$uu^{\prime}=p^{k}$. ∎

Denote the stabilizer of $\tau$ in $\Gamma^{+}$ as $\Gamma_{\tau}^{+}$. Then
$\Gamma_{\tau}^{+}=\mathcal{O}_{\tau}^{\times}$. Idenfity
$K_{\mathfrak{p}}=\mathbb{Q}_{p}$ and
$K_{p}\cong\mathbb{Q}_{p}\times\mathbb{Q}_{p}$ by sending $x\in K$ to
$(x,x^{\prime})$. When $\mathcal{O}_{d}^{\times}=\\{\pm 1\\}$, Lemma 5.1
allows us to see that $\Gamma_{\tau}^{+}$ is isomorphic to
$(u/u^{\prime})^{\mathbb{Z}}$ under $\psi_{\tau}$. Observe that
$\mathrm{ord}_{p}(u/u^{\prime})=\mathrm{ord}_{\mathfrak{p}}(u/u^{\prime})=\mathrm{ord}_{\mathfrak{p}}(u)=k>0$.

######  Proposition 5.2.

For $\tau\in\mathcal{H}^{\prime}$, the image of
$\\{\tau\\}\times\mathcal{T}_{p}$ in $\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma^{+}$}\big{\backslash}\raise
2.15277pt\hbox{$(\mathcal{H}\times\mathcal{T}_{p})$}}}{\Gamma^{+}\,\backslash\,(\mathcal{H}\times\mathcal{T}_{p})}{\Gamma^{+}\,\backslash\,(\mathcal{H}\times\mathcal{T}_{p})}{\Gamma^{+}\,\backslash\,(\mathcal{H}\times\mathcal{T}_{p})}$
has the structure of a $(p+1)$-volcano. It can be identified with the
$p$-isogeny graph of the elliptic curve with ordinary reduction associated
with $\mathrm{PSL}_{2}(\mathbb{Z})\tau$.

###### Proof.

Assume $\Gamma^{+}\tau\in IS(\mathcal{O})$. The image is
$\mathchoice{\text{\lower 2.15277pt\hbox{$\Gamma^{+}$}\big{\backslash}\raise
2.15277pt\hbox{$\Gamma^{+}(\\{\tau\\}\times\mathcal{T}_{p})$}}}{\Gamma^{+}\,\backslash\,\Gamma^{+}(\\{\tau\\}\times\mathcal{T}_{p})}{\Gamma^{+}\,\backslash\,\Gamma^{+}(\\{\tau\\}\times\mathcal{T}_{p})}{\Gamma^{+}\,\backslash\,\Gamma^{+}(\\{\tau\\}\times\mathcal{T}_{p})}\approx\\{\tau\\}\times\mathchoice{\text{\lower
2.15277pt\hbox{$\mathcal{O}_{\tau}^{\times}$}\big{\backslash}\raise
2.15277pt\hbox{$\mathcal{T}_{p}$}}}{\mathcal{O}_{\tau}^{\times}\,\backslash\,\mathcal{T}_{p}}{\mathcal{O}_{\tau}^{\times}\,\backslash\,\mathcal{T}_{p}}{\mathcal{O}_{\tau}^{\times}\,\backslash\,\mathcal{T}_{p}}$
and point (1) in Corollary 2.2 together with the previous paragraph implies
that $\mathchoice{\text{\lower
2.15277pt\hbox{$\mathcal{O}_{\tau}^{\times}$}\big{\backslash}\raise
2.15277pt\hbox{$\mathcal{T}_{p}$}}}{\mathcal{O}_{\tau}^{\times}\,\backslash\,\mathcal{T}_{p}}{\mathcal{O}_{\tau}^{\times}\,\backslash\,\mathcal{T}_{p}}{\mathcal{O}_{\tau}^{\times}\,\backslash\,\mathcal{T}_{p}}$
is a $(p+1)$-volcano with a cycle of lenght $k$ as a rim. This rim is the
projection of the geodesic preserved by $K_{p}^{\times}$ and the levels are
given by distance to the geodesic.

For the second claim we work first with the set of vertices. We have an
identification between $\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma^{+}$}\big{\backslash}\raise
2.15277pt\hbox{$(\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p}))$}}}{\Gamma^{+}\,\backslash\,(\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p}))}{\Gamma^{+}\,\backslash\,(\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p}))}{\Gamma^{+}\,\backslash\,(\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p}))}$
and $\mathchoice{\text{\lower
2.15277pt\hbox{$\mathrm{PSL}_{2}(\mathbb{Z})$}\big{\backslash}\raise
2.15277pt\hbox{$(\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Z}_{p}))$}}}{\mathrm{PSL}_{2}(\mathbb{Z})\,\backslash\,(\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Z}_{p}))}{\mathrm{PSL}_{2}(\mathbb{Z})\,\backslash\,(\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Z}_{p}))}{\mathrm{PSL}_{2}(\mathbb{Z})\,\backslash\,(\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Z}_{p}))}$
by sending $\Gamma^{+}(\tau,g)$ to
$\mathrm{PSL}_{2}(\mathbb{Z})(\gamma\tau,\gamma g)$, where
$\gamma\in\Gamma^{+}$ satisfies $\gamma g\in\mathrm{PGL}_{2}(\mathbb{Z}_{p})$.
Therefore we can also identify

(5.1) $\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma^{+}$}\big{\backslash}\raise
2.15277pt\hbox{$(\mathcal{H}\times\mathcal{V}(\mathcal{T}_{p}))$}}}{\Gamma^{+}\,\backslash\,(\mathcal{H}\times\mathcal{V}(\mathcal{T}_{p}))}{\Gamma^{+}\,\backslash\,(\mathcal{H}\times\mathcal{V}(\mathcal{T}_{p}))}{\Gamma^{+}\,\backslash\,(\mathcal{H}\times\mathcal{V}(\mathcal{T}_{p}))}\cong\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma^{+}$}\big{\backslash}\raise
2.15277pt\hbox{$(\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p}))$\\!}\big{/}
\lower
2.15277pt\hbox{\\!\\!$\mathrm{PGL}_{2}(\mathbb{Z}_{p})$}}}{\Gamma^{+}\,\backslash\,(\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p}))\,/\,\mathrm{PGL}_{2}(\mathbb{Z}_{p})}{\Gamma^{+}\,\backslash\,(\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p}))\,/\,\mathrm{PGL}_{2}(\mathbb{Z}_{p})}{\Gamma^{+}\,\backslash\,(\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p}))\,/\,\mathrm{PGL}_{2}(\mathbb{Z}_{p})}\cong\mathchoice{\text{\lower
2.15277pt\hbox{$\mathrm{PSL}_{2}(\mathbb{Z})$}\big{\backslash}\raise
2.15277pt\hbox{$\mathcal{H}$}}}{\mathrm{PSL}_{2}(\mathbb{Z})\,\backslash\,\mathcal{H}}{\mathrm{PSL}_{2}(\mathbb{Z})\,\backslash\,\mathcal{H}}{\mathrm{PSL}_{2}(\mathbb{Z})\,\backslash\,\mathcal{H}}.$

Consider $\Gamma^{+}(\tau,v)\in\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma^{+}$}\big{\backslash}\raise
2.15277pt\hbox{$(\mathcal{H}^{\prime}\times\mathcal{V}(\mathcal{T}_{p}))$}}}{\Gamma^{+}\,\backslash\,(\mathcal{H}^{\prime}\times\mathcal{V}(\mathcal{T}_{p}))}{\Gamma^{+}\,\backslash\,(\mathcal{H}^{\prime}\times\mathcal{V}(\mathcal{T}_{p}))}{\Gamma^{+}\,\backslash\,(\mathcal{H}^{\prime}\times\mathcal{V}(\mathcal{T}_{p}))}$.
There exist $g\in\mathrm{PGL}_{2}(\mathbb{Q}_{p})$ such that $v=gv_{0}$. Under
the previous identifications this orbit corresponds to the elliptic curve
associated with $\mathrm{PSL}_{2}(\mathbb{Z})\gamma\tau$, where $\gamma
g\in\mathrm{PGL}_{2}(\mathbb{Z}_{p})$. Certainly this elliptic curve is
$p^{m}$-isogenous to the elliptic curve attached to
$\mathrm{PSL}_{2}(\mathbb{Z})\tau$, for some $m\geq 0$, and it has CM by
$\mathcal{O}_{dp^{2n}}$ for some $n\geq 0$. This is the case if
$\psi_{\gamma\tau}(K)\cap
M_{2}(\mathbb{Z})=\psi_{\gamma\tau}(\mathcal{O}_{dp^{2n}})$. But
$\psi_{\gamma\tau}=\gamma\psi_{\tau}\gamma^{-1}$ so this condition boils down
to
$\psi_{\tau}(K)\cap\gamma^{-1}M_{2}(\mathbb{Z})\gamma=\psi_{\tau}(\mathcal{O}_{dp^{2n}})$.
We can check this condition locally. Since
$\gamma\in\mathrm{PGL}_{2}(\mathbb{Z}_{q})$ for $q\neq p$, it is only
neccesary to check that
$\psi_{\tau}(K_{p})\cap\gamma^{-1}M_{2}(\mathbb{Z}_{p})\gamma=\psi_{\tau}(\mathcal{O}_{dp^{2n}}\otimes\mathbb{Z}_{p})$.
Since the projectivized units of $\gamma^{-1}M_{2}(\mathbb{Z}_{p})\gamma$ form
the stabilizer of $\gamma^{-1}v_{0}=gv_{0}$ and
$\mathcal{O}_{dp^{2n}}\otimes\mathbb{Z}_{p}$ is the order of conductor $p^{n}$
in $\mathcal{O}_{d}\otimes\mathbb{Z}_{p}$, by Corollary 2.2 this is equivalent
to $v=gv_{0}$ being at distance $n$ from the geodesic fixed by
$K_{p}^{\times}$.

For the edges, we remark that

$\mathchoice{\text{\lower 2.15277pt\hbox{$\Gamma^{+}$}\big{\backslash}\raise
2.15277pt\hbox{$(\mathcal{H}\times\overrightarrow{\mathcal{E}}(\mathcal{T}_{p}))$}}}{\Gamma^{+}\,\backslash\,(\mathcal{H}\times\overrightarrow{\mathcal{E}}(\mathcal{T}_{p}))}{\Gamma^{+}\,\backslash\,(\mathcal{H}\times\overrightarrow{\mathcal{E}}(\mathcal{T}_{p}))}{\Gamma^{+}\,\backslash\,(\mathcal{H}\times\overrightarrow{\mathcal{E}}(\mathcal{T}_{p}))}\cong\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma^{+}$}\big{\backslash}\raise
2.15277pt\hbox{$(\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p}))$\\!}\big{/}
\lower
2.15277pt\hbox{\\!\\!$\Gamma_{0}(p\mathbb{Z}_{p})$}}}{\Gamma^{+}\,\backslash\,(\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p}))\,/\,\Gamma_{0}(p\mathbb{Z}_{p})}{\Gamma^{+}\,\backslash\,(\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p}))\,/\,\Gamma_{0}(p\mathbb{Z}_{p})}{\Gamma^{+}\,\backslash\,(\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p}))\,/\,\Gamma_{0}(p\mathbb{Z}_{p})}\cong\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma_{0}(p)$}\big{\backslash}\raise
2.15277pt\hbox{$\mathcal{H}$}}}{\Gamma_{0}(p)\,\backslash\,\mathcal{H}}{\Gamma_{0}(p)\,\backslash\,\mathcal{H}}{\Gamma_{0}(p)\,\backslash\,\mathcal{H}}.$

This shows that two points in
$\Gamma^{+}\backslash(\Gamma^{+}\tau\times\mathcal{T}_{p})$ are connected by
an edge if and only if the respective elliptic curves are $p$-isogenous. This
ends the proof of the second claim. ∎

By definition of $\Delta_{\tau}$, the vertex $gv_{0}$ belongs to the geodesic
preserved by $K_{p}^{\times}$ so we have that the second coordinate of
$\Delta_{\tau}$ projects to the rim of $\mathchoice{\text{\lower
2.15277pt\hbox{$\mathcal{O}_{\tau}^{\times}$}\big{\backslash}\raise
2.15277pt\hbox{$\mathcal{T}_{p}$}}}{\mathcal{O}_{\tau}^{\times}\,\backslash\,\mathcal{T}_{p}}{\mathcal{O}_{\tau}^{\times}\,\backslash\,\mathcal{T}_{p}}{\mathcal{O}_{\tau}^{\times}\,\backslash\,\mathcal{T}_{p}}$.
This closed cycle in the quotient of the tree is what the authors in [BDIS02]
refer to as a $p$-adic Shintani cycle. This justifies the name of
$\Delta_{\tau}$ and since the rim is a closed cycle we can think of it as a
discrete closed geodesic mimicking Duke’s geodesics in the archimedean case.
Note the following consequence of Proposition 5.2 and its proof.

######  Corollary 5.3.

The image of $\Delta_{\tau}$ in $\mathchoice{\text{\lower
2.15277pt\hbox{$\mathrm{PSL}_{2}(\mathbb{Z})$}\big{\backslash}\raise
2.15277pt\hbox{$\mathcal{H}$}}}{\mathrm{PSL}_{2}(\mathbb{Z})\,\backslash\,\mathcal{H}}{\mathrm{PSL}_{2}(\mathbb{Z})\,\backslash\,\mathcal{H}}{\mathrm{PSL}_{2}(\mathbb{Z})\,\backslash\,\mathcal{H}}$
under (5.1) corresponds to the $k$ elliptic curves with CM by
$\mathcal{O}_{d}$ and which are $p^{\infty}$-isogenous to the elliptic curve
associated with $\mathrm{PSL}_{2}(\mathbb{Z})\tau$.

The set of elliptic curves described in the above Corollary form a closed
orbit under the usual action of $\mathfrak{p}^{\mathbb{Z}}$ on the set of
elliptic curves with CM by $\mathcal{O}_{d}$. In this regard, just as Duke’s
geodesics form a closed orbit under the geodesic flow, the cycles
$\Delta_{\tau}$ are a closed orbit under a “flow ”defined by $p$.

##  6\. Heegner points on Shimura curves

In this section we focus on the cases where $B$ is a definite quaternion
algebra ramified at $N^{-}$ and $K$ is imaginary and inert at $p$. Remember
that $R$ is a $\mathbb{Z}[1/p]$-Eichler order of level $N^{+}$ and
$\Gamma=\overline{R}^{\times}$. Denote by $\Gamma^{+}$ the image in $\Gamma$
of $R_{1}$, the elements in $R$ with reduced norm equal to $1$.

Let $\mathcal{B}$ be the indefinite quaternion algebra over $\mathbb{Q}$
ramified at the primes dividing $N^{-}p$. Let $\mathcal{R}$ be an Eichler
order of level $N^{+}$ in $\mathcal{B}$. After fixing an isomorphism
$\iota_{\infty}\colon\mathcal{B}_{\infty}\cong M_{2}(\mathbb{R})$, the group
$\Gamma_{\infty}=\iota_{\infty}(\mathcal{R}^{\times})$ acts on
$\mathcal{H}_{\infty}\colonequals\mathbb{C}\smallsetminus\mathbb{R}$. The
space $\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma_{\infty}$}\big{\backslash}\raise
2.15277pt\hbox{$\mathcal{H}$}}}{\Gamma_{\infty}\,\backslash\,\mathcal{H}}{\Gamma_{\infty}\,\backslash\,\mathcal{H}}{\Gamma_{\infty}\,\backslash\,\mathcal{H}}_{\infty}$
is a compact Riemann surface that corresponds to the complex points of an
algebraic variety $X$ defined over $\mathbb{Q}$ i.e.
$X(\mathbb{C})=\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma_{\infty}$}\big{\backslash}\raise
2.15277pt\hbox{$\mathcal{H}$}}}{\Gamma_{\infty}\,\backslash\,\mathcal{H}}{\Gamma_{\infty}\,\backslash\,\mathcal{H}}{\Gamma_{\infty}\,\backslash\,\mathcal{H}}_{\infty}$.
We refer to $X$ as the Shimura curve attached to the data
$(\mathcal{B},\mathcal{R})$.

Let $\mathbb{Q}_{p^{2}}$ be the unique unramified quadratic extension of
$\mathbb{Q}_{p}$. The compact space $X(\mathbb{Q}_{p^{2}})$ admits the
following $p$-adic uniformization. Let
$\mathcal{H}_{p}\colonequals\mathbb{Q}_{p^{2}}-\mathbb{Q}_{p}$, the Drinfeld
upper-half plane. After fixing an isomorphism $B_{p}\cong
M_{2}(\mathbb{Q}_{p})$, $\Gamma$ acts on $\mathcal{H}_{p}$ by fractional
linear transformations.

######  Theorem 6.1 (Cerednik-Drinfeld).

The quotient space $\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma^{+}$}\big{\backslash}\raise
2.15277pt\hbox{$\mathcal{H}_{p}$}}}{\Gamma^{+}\,\backslash\,\mathcal{H}_{p}}{\Gamma^{+}\,\backslash\,\mathcal{H}_{p}}{\Gamma^{+}\,\backslash\,\mathcal{H}_{p}}$
corresponds to the space of $\mathbb{Q}_{p^{2}}$-points of the Shimura curve
$X$.

###### Proof.

See Theorem 4.7 in [BD98] or also [Cer76] or [Dd76]. ∎

Fix some
$u\in\mathbb{Z}_{p}^{\times}\smallsetminus(\mathbb{Z}_{p}^{\times})^{2}$ and
$\tau_{0}$ a square root of $u$ so that
$\mathbb{Q}_{p^{2}}=\mathbb{Q}_{p}(\tau_{0})$. The stabilizer $\mathbb{O}_{p}$
of $\tau_{0}$ in $PB^{\times}_{p}$ is compact (isomorphic to
$\mathbb{Q}_{p^{2}}^{\times}/\mathbb{Q}_{p}^{\times}$). Since
$\mathrm{PGL}_{2}(\mathbb{Q}_{p})$ acts transitively on $\mathcal{H}_{p}$, we
have the identification of locally compacts spaces

$[\boldsymbol{G}]_{\boldsymbol{K}\cdot\mathbb{O}_{p}}\cong\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma$}\big{\backslash}\raise
2.15277pt\hbox{$PB_{p}^{\times}$\\!}\big{/} \lower
2.15277pt\hbox{\\!\\!$\mathbb{O}_{p}$}}}{\Gamma\,\backslash\,PB_{p}^{\times}\,/\,\mathbb{O}_{p}}{\Gamma\,\backslash\,PB_{p}^{\times}\,/\,\mathbb{O}_{p}}{\Gamma\,\backslash\,PB_{p}^{\times}\,/\,\mathbb{O}_{p}}\cong\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma$}\big{\backslash}\raise
2.15277pt\hbox{$\mathcal{H}_{p}$}}}{\Gamma\,\backslash\,\mathcal{H}_{p}}{\Gamma\,\backslash\,\mathcal{H}_{p}}{\Gamma\,\backslash\,\mathcal{H}_{p}},$

as in (4.1).

Let $\omega$ be any element in $\Gamma-\Gamma^{+}$. Since
$[\Gamma:\Gamma^{+}]=2$, it follows that $\omega$ defines an involution on
$X(\mathbb{Q}_{p^{2}})$ and therefore $\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma$}\big{\backslash}\raise
2.15277pt\hbox{$\mathcal{H}_{p}$}}}{\Gamma\,\backslash\,\mathcal{H}_{p}}{\Gamma\,\backslash\,\mathcal{H}_{p}}{\Gamma\,\backslash\,\mathcal{H}_{p}}$
corresponds to pairs of points in $X(\mathbb{Q}_{p^{2}})$ connected by this
involution.

According to the moduli interpretation of $X$ (see section 4 in [BD98]), the
points in $X(\mathbb{Q}_{p^{2}})$ corresponds to abelian surfaces over
$\mathbb{Q}_{p^{2}}$ with quaternionic multiplication by $\mathcal{R}$ and a
$N^{+}$-level structure. Given $A$, one such abelian surface, we denote by
$\mathrm{End}(A)$ the algebra of endormophism of $A$ (over
$\overline{\mathbb{Q}}$) which commute with the quaternionic multiplication
and respect the $N^{+}$-level structure. A Heegner point in
$X(\mathbb{Q}_{p^{2}})$ is a point whose associated abelian surface $A$ has
$\mathrm{End}(A)$ isomorphic to an order in a quadratic imaginary field.

As in section 4.2, let $\mathcal{O}$ denotes a $\mathbb{Z}[1/p]$ order in $K$.
Let $\psi\in opt(\mathcal{O},R)$. Then $\psi(K_{p})^{\times}$ acts in
$\mathcal{H}_{p}$ with two fixed points $\tau$ and $\tau^{\prime}$. We assume
that $\tau$ is the fixed point satisfying that for every $x\in
K_{p}^{\times}$, $\psi(x)$ acts on the column vector $(\tau\,\,\,\,1)^{t}$ as
multiplication by $x$. This time we take $H=\mathbb{O}_{p}$ and
$\Delta_{\psi}$ equals the $\Gamma$-orbit of $\psi(K_{p})^{\times}g$ with
$g\in PB_{p}^{\times}$ such that $\psi(K_{p})^{\times}=g\mathbb{O}_{p}g^{-1}$.
We normalize the choice of $g$ by asking that $g\tau_{0}=\tau$. The projection
of $\Delta_{\psi}$ in $\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma$}\big{\backslash}\raise
2.15277pt\hbox{$\mathcal{H}_{p}$}}}{\Gamma\,\backslash\,\mathcal{H}_{p}}{\Gamma\,\backslash\,\mathcal{H}_{p}}{\Gamma\,\backslash\,\mathcal{H}_{p}}$
is $\Gamma\tau$. It corresponds to the pair of points in
$X(\mathbb{Q}_{p^{2}})$ associated with $\Gamma^{+}\tau$ and
$\Gamma^{+}\omega\tau$. Let $d$ be as in section 4.2.

######  Theorem 6.2.

Under the identification given by Theorem 6.1, the class of $\Gamma^{+}\tau$
corresponds to a Heegner point in $X(\mathbb{Q}_{p^{2}})$ whose associated
order is isomorphic to $\mathcal{O}_{d}$. As $\psi$ varies over
$[opt(\mathcal{O},R)]$, they are all different.

###### Proof.

Since $p$ is inert in $K$, $Pic(\mathcal{O})\cong Pic(\mathcal{O}_{d})$. Now
see Theorem 5.3 in [BD98]. ∎

The previous result justifies that we name by $\mathrm{Heeg}(\mathcal{O})$,
the collection of $\Gamma\tau$ in $\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma$}\big{\backslash}\raise
2.15277pt\hbox{$\mathcal{H}_{p}$}}}{\Gamma\,\backslash\,\mathcal{H}_{p}}{\Gamma\,\backslash\,\mathcal{H}_{p}}{\Gamma\,\backslash\,\mathcal{H}_{p}}$
as $\psi$ runs over $[opt(\mathcal{O},R)]$.

##  7\. Adelic methods

In this last section we prove Theorem A and Theorem B. They will be a direct
consequence of Proposition 7.4.

The group $\boldsymbol{G}(\mathbb{A})$ is unimodular (any left Haar measure is
also a right Haar measure) so there is a unique
$\boldsymbol{G}(\mathbb{A})$-invariant probability measure $dm$ in
$[\boldsymbol{G}]$ such that for any $f\in C_{c}(\boldsymbol{G}(\mathbb{A}))$,

(7.1)
$\int_{\boldsymbol{G}(\mathbb{A})}fdg=\int_{[\boldsymbol{G}]}\int_{\boldsymbol{G}(\mathbb{Q})}f(hg)dhdm(g),$

where $dh$ is the counting measure in $\boldsymbol{G}(\mathbb{Q})$ and $dg$ a
Haar measure on $\boldsymbol{G}(\mathbb{A})$.

######  Definition 1.

A homogeneous toral subset in $[\boldsymbol{G}]$ is a subset of the form
$Y=\boldsymbol{T}(\mathbb{Q})\backslash\boldsymbol{T}(\mathbb{A})g$, with
$g\in\boldsymbol{G}(\mathbb{A})$ and $\boldsymbol{T}\subseteq\boldsymbol{G}$ a
maximal torus anisotropic over $\mathbb{Q}$.

The pushforward of the Haar probability measure on
$\boldsymbol{T}(\mathbb{Q})\backslash\boldsymbol{T}(\mathbb{A})$ defines a
probability measure $\mu_{Y}$ on the homogeneous toral set
$Y=\boldsymbol{T}(\mathbb{Q})\backslash\boldsymbol{T}(\mathbb{A})g$.

Let $K$ be a quadratic field and let $\psi\colon K\to B(\mathbb{Q})$ be an
algebra embedding. Let $\boldsymbol{T}_{K}$ be the algebraic torus
$\mathrm{res}_{K/\mathbb{Q}}\mathbb{G}_{m}/\mathbb{G}_{m}$. Then $\psi$
induces a morphism (which we denote by the same letter)
$\psi\colon\boldsymbol{T}_{K}\to\boldsymbol{G}$. Denote by
$\boldsymbol{T}_{\psi}$ the image of $\boldsymbol{T}_{K}$ under $\psi$ in
$\boldsymbol{G}$. Then every maximal anisotropic torus
$\boldsymbol{T}\subseteq\boldsymbol{G}$ defined over $\mathbb{Q}$ is of the
form $\boldsymbol{T}_{\psi}$ for some embedding $\psi$. Now, we attach to
$\boldsymbol{T}_{\psi}$ an order in $K$. Fix a $\mathbb{Z}$-order $R$ in
$B(\mathbb{Q})$. Then define the local orders
$\Lambda_{\ell}=\psi(K_{\ell})\cap g_{\ell}R_{\ell}g_{\ell}^{-1}$. The order
$\Lambda_{\ell}$ is maximal for almost every $\ell$. Indeed, let $T$ be the
finite set of places such that $g_{\ell}\not\in\overline{R}_{\ell}^{\times}$,
where $\overline{R}_{\ell}^{\times}$ denotes the image of $R_{\ell}^{\times}$
in $PB_{\ell}^{\times}=B_{\ell}^{\times}/\mathbb{Q}_{\ell}^{\times}$. Then if
$\ell\not\in T$, the intersection $\psi(K_{\ell})\cap
g_{\ell}R_{\ell}g_{\ell}^{-1}$ is just $\psi(K_{\ell})\cap R_{\ell}$. But this
is the localization of the global order $\psi(K)\cap R$ and so it is maximal
outside a finite set of places. This shows that
$\Lambda=K\cap\prod\Lambda_{\ell}$ is a global order in $K$.

######  Definition 2 ([Kha19] section 2.4.4 or equivalently [ELMV11]).

The discriminant of a homogeneous toral set of the form
$Y=\boldsymbol{T}_{\psi}g$, with $\psi\colon K\to B(\mathbb{Q})$ an embeeding,
is the absolute value of the discriminant of the order $\Lambda$ attached to
it as in the previous paragraph.

######  Theorem 7.1.

Let $\\{Y_{i}\\}$ be a sequence of homogeneous toral sets whose discriminants
approach $\infty$ as $i\to\infty$. Then, any weak* accumulation point of the
sequence of measures $\mu_{Y_{i}}$ is a homogeneous probability measure on
$[\boldsymbol{G}]$, invariant under $\boldsymbol{G}(\mathbb{A})^{+}$, the
image of $\widetilde{\boldsymbol{G}}(\mathbb{A})$ in
$\boldsymbol{G}(\mathbb{A})$.

###### Proof.

Theorem 4.6 in [ELMV11] ∎

The defect of the limit measure in Theorem 7.1 being
$\boldsymbol{G}(\mathbb{A})$-invariant is solved in the following fashion.
Assume that $\\{\mu_{Y_{i}}\\}$ weak* converges to $\mu$. We want to prove
that for all $f$ in $C_{u}([\boldsymbol{G}])$, the space of bounded and
uniformly continuous functions, we have

(7.2) $\int_{[\boldsymbol{G}]}f(g)d\mu(g)=\int_{[\boldsymbol{G}]}f(g)dm(g).$

By the discussion made [ALMW22], sections 9 and 10, we are reduced to prove
(7.2) in the case of functions invariant under
$\boldsymbol{G}(\mathbb{A})^{+}$. Let $\boldsymbol{G}_{char}$ denote the
quotient $\mathchoice{\text{\raise
2.15277pt\hbox{$[\boldsymbol{G}]$}\big{/}\lower
2.15277pt\hbox{$\boldsymbol{G}(\mathbb{A})^{+}$}}}{[\boldsymbol{G}]\,/\,\boldsymbol{G}(\mathbb{A})^{+}}{[\boldsymbol{G}]\,/\,\boldsymbol{G}(\mathbb{A})^{+}}{[\boldsymbol{G}]\,/\,\boldsymbol{G}(\mathbb{A})^{+}}$.
The reduced norm induces a homeomorphism

$\boldsymbol{G}_{char}\cong\mathchoice{\text{\lower
2.15277pt\hbox{$\mathbb{Q}^{\times}$}\big{\backslash}\raise
2.15277pt\hbox{$\mathbb{A}^{\times}$\\!}\big{/} \lower
2.15277pt\hbox{\\!\\!$(\mathbb{A}^{\times})^{2}$}}}{\mathbb{Q}^{\times}\,\backslash\,\mathbb{A}^{\times}\,/\,(\mathbb{A}^{\times})^{2}}{\mathbb{Q}^{\times}\,\backslash\,\mathbb{A}^{\times}\,/\,(\mathbb{A}^{\times})^{2}}{\mathbb{Q}^{\times}\,\backslash\,\mathbb{A}^{\times}\,/\,(\mathbb{A}^{\times})^{2}},$

which gives to $\boldsymbol{G}_{char}$ the structure of a compact abelian
group. Since the group of characters is dense in the space of continuous
functions, by Weyl’s criterion we are reduced to the case when $f$ is a
character.

If $\chi$ is a character of $\mathchoice{\text{\lower
2.15277pt\hbox{$\mathbb{Q}^{\times}$}\big{\backslash}\raise
2.15277pt\hbox{$\mathbb{A}^{\times}$\\!}\big{/} \lower
2.15277pt\hbox{\\!\\!$(\mathbb{A}^{\times})^{2}$}}}{\mathbb{Q}^{\times}\,\backslash\,\mathbb{A}^{\times}\,/\,(\mathbb{A}^{\times})^{2}}{\mathbb{Q}^{\times}\,\backslash\,\mathbb{A}^{\times}\,/\,(\mathbb{A}^{\times})^{2}}{\mathbb{Q}^{\times}\,\backslash\,\mathbb{A}^{\times}\,/\,(\mathbb{A}^{\times})^{2}}$,
by continuity there exists some compact open group
$M\subseteq\mathbb{A}_{f}^{\times}$ such that $\chi\mid_{M}=1$ and therefore
we have a character of the group $\mathchoice{\text{\lower
2.15277pt\hbox{$\mathbb{Q}^{\times}$}\big{\backslash}\raise
2.15277pt\hbox{$\mathbb{A}^{\times}$\\!}\big{/} \lower
2.15277pt\hbox{\\!\\!$\mathbb{R}_{>0}M$}}}{\mathbb{Q}^{\times}\,\backslash\,\mathbb{A}^{\times}\,/\,\mathbb{R}_{>0}M}{\mathbb{Q}^{\times}\,\backslash\,\mathbb{A}^{\times}\,/\,\mathbb{R}_{>0}M}{\mathbb{Q}^{\times}\,\backslash\,\mathbb{A}^{\times}\,/\,\mathbb{R}_{>0}M}\cong(\mathbb{Z}/D\mathbb{Z})^{\times}$
for some $D\in\mathbb{Z}$ and trivial on squares. Therefore, if we assume $M$
maximal, we are in the presence of a primitive real Dirichlet character that
must be attached to some quadratic field $K_{\chi}$.

We have reduced the test function to be of the shape $\chi\circ\mathrm{nrd}$
where $\chi$ is a quadratic Hecke character.

######  Proposition 7.2.

Let $\chi$ be a non-trivial character of $\boldsymbol{G}_{char}$ and
$Y=\boldsymbol{T}_{\psi}g$ an homogeneous toral set with $\psi\colon K\to B$.
Then,

$\int_{Y}\chi(\mathrm{nrd}(t))d\mu_{Y}(t)=\chi(g)\int_{\boldsymbol{T}_{\psi}}\chi(N_{K/\mathbb{Q}}(t))d\mu_{\boldsymbol{T}_{\psi}}(t)=\begin{cases}\chi(g)&\mbox{,
if }K=K_{\chi}\\\ 0&\mbox{, if }K\neq K_{\chi}\end{cases}$

###### Proof.

Assume that $\chi$ is related to $K_{\chi}=\mathbb{Q}(\sqrt{D})$ in the sense
of the previous paragraph. If $L$ denotes $\mathbb{Q}(\zeta_{|D|})$, then
$K\subseteq L$ is a Galois extension and class field theory provides the
diagram

${\mathbb{A}_{K}^{\times}}$${\mathrm{Gal}(L/K)}$${\mathbb{A}_{\mathbb{Q}}^{\times}}$${\mathrm{Gal}(L/\mathbb{Q})}$${(\mathbb{Z}/D\mathbb{Z})^{\times}}$${\mathrm{Gal}(K/\mathbb{Q})}$${\\{\pm
1\\}.}$$\scriptstyle{N_{K/\mathbb{Q}}}$$\scriptstyle{rec}$$\scriptstyle{\sim}$$\scriptstyle{\chi}$$\scriptstyle{\sim}$

If $K=K_{\chi}$ and $t\in\boldsymbol{T}_{\boldsymbol{K}}$ the equality
$\chi\circ\mathrm{nrd}(\psi(t))=\chi(N_{K/\mathbb{Q}}(t))=\chi(N_{K_{\chi}/\mathbb{Q}}(t))=1$
follows from the previous diagram. When $K\neq K_{\chi}$ there exists a prime
$\ell$ split in $K$ and inert in $K_{\chi}$. Let $s$ be the idele
corresponding to the class of a prime $\mathfrak{l}$ above $\ell$ in $K$. Then
$\chi(\mathrm{nrd}(\psi(s)))=\chi(N_{K/\mathbb{Q}}(\mathfrak{l}))=\chi(p)=-1$
and so the substitution $t\mapsto ts$ shows that
$\int_{\boldsymbol{T}_{\psi}}\chi(\mathrm{nrd}(t))d\mu_{\boldsymbol{T}_{\psi}}(t)=0$.
∎

Let $M$ be a compact subgroup of $\boldsymbol{G}(\mathbb{A}_{f})$ with
$\mathrm{nrd}(M_{p})(\mathbb{Z}_{p}^{\times})^{2}=\mathbb{Z}_{p}^{\times}$ for
almost every $p$. Let $\mathcal{K}(M)$ be the finite set of quadratic fields
attached to the characters of the finite group $\mathchoice{\text{\lower
2.15277pt\hbox{$\mathbb{Q}^{\times}$}\big{\backslash}\raise
2.15277pt\hbox{$\mathbb{A}^{\times}$\\!}\big{/} \lower
2.15277pt\hbox{\\!\\!$(\mathbb{A}^{\times})^{2}\mathrm{nrd}(M)$}}}{\mathbb{Q}^{\times}\,\backslash\,\mathbb{A}^{\times}\,/\,(\mathbb{A}^{\times})^{2}\mathrm{nrd}(M)}{\mathbb{Q}^{\times}\,\backslash\,\mathbb{A}^{\times}\,/\,(\mathbb{A}^{\times})^{2}\mathrm{nrd}(M)}{\mathbb{Q}^{\times}\,\backslash\,\mathbb{A}^{\times}\,/\,(\mathbb{A}^{\times})^{2}\mathrm{nrd}(M)}$.
Equip $[\boldsymbol{G}]_{M}$ with $dm_{M}$ the pushforward of $dm$ under the
natural projection.

######  Proposition 7.3.

Let $\\{Y_{i}=\boldsymbol{T}_{\psi_{i}}g_{i}\\}$ be a sequence of homogeneous
toral sets with $\psi_{i}\colon K_{i}\to B$ such that
$K_{i}\notin\mathcal{K}(M)$. Assume also that its sequence of discriminants
approaches $\infty$ as $i\to\infty$. Then the projection of $Y_{i}$ to
$[\boldsymbol{G}]_{M}$ becomes equidistributed with respect to $dm_{M}$. In
other words, the sequence $\\{\mu_{{Y_{i}},M}\\}$ converges weak* to $dm_{M}$.

###### Proof.

In terms of functionals over $C([\boldsymbol{G}]_{M})$, the pushforward of
$\mu_{Y_{i}}$ corresponds to the restriction of $\mu_{Y_{i}}$ over the space
of $M$-right invariant functions over $[\boldsymbol{G}]$. Therefore, by
theorem 7.1 and its following discussion, to prove equidistribution we need to
check

$\int_{[\boldsymbol{G}]}f(g)d\mu(g)=\int_{[\boldsymbol{G}]}f(g)dm(g),$

with $\mu$ a weak* accumulation measure of $\mu_{Y_{i}}$ and $f$ of the form
$\chi\circ\mathrm{nrd}$ with an $M$-right invariant character $\chi$. This
last condition implies that $K_{\chi}\in\mathcal{K}(M)$ and now proposition
7.2 allows us to conclude since after taking a subsequence we can assume that
$\mu_{Y_{i}}$ weak* converges to $\mu$ and then
$\int_{[G]}f(g)d\mu(g)=\lim\int_{Y_{i}}f(g)d\mu_{Y_{i}}(g)$. ∎

The map $H\to\Delta_{\psi}$ sending $h$ to $\Gamma gh$ induces a
uniformization of $\Delta_{\psi}$ by $H/(H\cap g^{-1}\Gamma g)$. Using a Haar
measure in $H$, we equip $H/(H\cap g^{-1}\Gamma g)$ with a finite measure and
push it to a finite $H$-right invariant measure $\nu_{\psi}$ in
$\Delta_{\psi}$. We equip $\Omega_{\mathcal{O}}=\bigsqcup_{[\psi]\in
opt(\mathcal{O},R)}\Delta_{\psi}$ with the unique probability measure
$\mu_{\mathcal{O}}$ proportional to $\sum_{opt(\mathcal{O},R)}\nu_{\psi}$.
There exits a unique probability measure on the quotient
$\mathchoice{\text{\lower 2.15277pt\hbox{$\Gamma$}\big{\backslash}\raise
2.15277pt\hbox{$G$}}}{\Gamma\,\backslash\,G}{\Gamma\,\backslash\,G}{\Gamma\,\backslash\,G}$
induced by the counting measure on $\Gamma$ and a Haar measure on $G$
satisfying the property analogue to (7.1). It is the pushforward of the
measure $dm$ by means of the projection
$[\boldsymbol{G}]\to\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma$}\big{\backslash}\raise
2.15277pt\hbox{$G$}}}{\Gamma\,\backslash\,G}{\Gamma\,\backslash\,G}{\Gamma\,\backslash\,G}$
described in (4.1).

######  Proposition 7.4.

The collection $\Omega_{\mathcal{O}}$ becomes equidistributed on
$\mathchoice{\text{\lower 2.15277pt\hbox{$\Gamma$}\big{\backslash}\raise
2.15277pt\hbox{$G$}}}{\Gamma\,\backslash\,G}{\Gamma\,\backslash\,G}{\Gamma\,\backslash\,G}$
as $d\to-\infty$. In particular, the collection $Ih(\mathcal{O})$ becomes
equidistributed in $\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma^{+}$}\big{\backslash}\raise
2.15277pt\hbox{$\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p})$}}}{\Gamma^{+}\,\backslash\,\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p})}{\Gamma^{+}\,\backslash\,\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p})}{\Gamma^{+}\,\backslash\,\mathcal{H}\times\mathrm{PGL}_{2}(\mathbb{Q}_{p})}$
and $Heeg(\mathcal{O})$ becomes equidistributed in $\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma$}\big{\backslash}\raise
2.15277pt\hbox{$\mathcal{H}_{p}$}}}{\Gamma\,\backslash\,\mathcal{H}_{p}}{\Gamma\,\backslash\,\mathcal{H}_{p}}{\Gamma\,\backslash\,\mathcal{H}_{p}}$.

###### Proof.

Remember the identification
$[\boldsymbol{G}]_{\boldsymbol{K}}=\mathchoice{\text{\lower
2.15277pt\hbox{$\Gamma$}\big{\backslash}\raise
2.15277pt\hbox{$G$}}}{\Gamma\,\backslash\,G}{\Gamma\,\backslash\,G}{\Gamma\,\backslash\,G}$.
Fix $\psi_{0}\in opt(\mathcal{O},R)$ and let $Y_{\mathcal{O}}$ the homogeneous
toral set $\boldsymbol{T}_{\psi_{0}}g$ with $g$ as before. Since
$\det(\widehat{R}^{\times}_{\\#})=\widehat{\mathbb{Z}}_{\\#}^{\times}$, the
set $\mathcal{K}(\boldsymbol{K}_{f})$ consist only of quadratic fields
ramified at $p$, i.e $\mathbb{Q}(\sqrt{\pm p})$. But our sequence of tori
consider $K$ split or inert at $p$, so we will always be in the case
$K_{i}\neq K_{\chi}$ and therefore by Theorem 7.1 together with Proposition
7.3 there’s equidistribution of the image of $Y_{\mathcal{O}}$ in
$[\boldsymbol{G}]_{\boldsymbol{K}}$ if we show that the discriminant goes to
$\infty$. Note that Proposition 5.1 shows that $Y_{\mathcal{O}}$ projects onto
$\Omega_{\mathcal{O}}$.

Take $R$ an $\mathbb{Z}$-order in $B(\mathbb{Q})$ agreeing with $R$ outside
$p$. We know $\psi(K)\cap R=\psi(\mathcal{O}_{d}[1/p])$. Localizing at $q\neq
p$ we have $g_{q}=1$ which implies
$\Lambda_{q}=\mathcal{O}_{d}\otimes\mathbb{Z}_{q}$. Then the discriminant of
$Y_{\mathcal{O}}$ is the discriminant of $\mathcal{O}_{dp^{m}}$ for some
$m\geq 0$. Certainly this goes to infinity and we must have equidistribution.
∎

######  Remark 3.

In the indefinite case, since $g_{p}$ is chosen so that
$\psi(K_{p})^{\times}=g_{p}Ag_{p}^{-1}$ we have that $g_{p}v_{0}$ belongs to
the geodesic fixed by $\psi(K_{p})^{\times}$. This is equivalent to $gv_{0}$
having stabilizer by the maximal order of $\psi(K_{p})^{\times}$ which in turn
is equivalent to $\psi(K_{p})^{\times}\cap
g_{p}M_{2}(\mathbb{Z}_{p})g_{p}^{-1}$ being maximal. This shows that the
discriminant of $Y$ is exactly the discriminant of $\mathcal{O}_{d}$.

## References

  * [ALMW22] Menny Aka, Manuel Luethi, Philippe Michel, and Andreas Wieser.  Simultaneous supersingular reductions of CM elliptic curves.  Journal für die reine und angewandte Mathematik (Crelles Journal), 2022(786):1–43, feb 2022.
  * [BD98] Massimo Bertolini and Henri Darmon.  Heegner points, $p$-adic $L$-functions, and the Cerednik-Drinfeld uniformization.  Invent. Math., 131(3):453–491, 1998.
  * [BDIS02] Massimo Bertolini, Henri Darmon, Adrian Iovita, and Michael Spiess.  Teitelbaum’s exceptional zero conjecture in the anticyclotomic setting.  Amer. J. Math., 124(2):411–449, 2002.
  * [Cas14] B. Casselman.  The bruhat-tits tree of sl(2).  Available at https://ncatlab.org/nlab/files/CasselmanOnBruhatTitsTree2014.pdf, March 2014\.
  * [Cer76] I. V. Cerednik.  Uniformization of algebraic curves by discrete arithmetic subgroups of ${PGL}{2}(k{w})$ with compact quotient spaces.  Mat. Sb. (N.S.), 100(142)(1):59–88, 165, 1976.
  * [Dd76] V. G. Drinfel d.  Coverings of $p$-adic symmetric domains.  Funkcional. Anal. i Prilozen., 10(2):29–40, 1976.
  * [Dis22] Daniel Disegni.  $p$-adic equidistribution of CM points.  Comment. Math. Helv., 97(4):635–668, 2022.
  * [Duk88] W. Duke.  Hyperbolic distribution problems and half-integral weight Maass forms.  Invent. Math., 92(1):73–90, 1988.
  * [ELMV11] Manfred Einsiedler, Elon Lindenstrauss, Philippe Michel, and Akshay Venkatesh.  Distribution of periodic torus orbits and Duke’s theorem for cubic fields.  Ann. of Math. (2), 173(2):815–885, 2011.
  * [ELMV12] Manfred Einsiedler, Elon Lindenstrauss, Philippe Michel, and Akshay Venkatesh.  The distribution of closed geodesics on the modular surface, and Duke’s theorem.  Enseign. Math. (2), 58(3-4):249–313, 2012.
  * [HM06] Gergely Harcos and Philippe Michel.  The subconvexity problem for Rankin-Selberg $L$-functions and equidistribution of Heegner points. II.  Invent. Math., 163(3):581–655, 2006.
  * [HMRL20] Sebastián Herrero, Ricardo Menares, and Juan Rivera-Letelier.  $p$-adic distribution of CM points and Hecke orbits I: Convergence towards the Gauss point.  Algebra Number Theory, 14(5):1239–1290, 2020.
  * [Iha08] Yasutaka Ihara.  On congruence monodromy problems, volume 18 of MSJ Memoirs.  Mathematical Society of Japan, Tokyo, 2008.  Reproduction of the Lecture Notes: Volume 1 (1968) [MR0289518], Volume 2 (1969) [MR0289519] (University of Tokyo), with author’s notes (2008).
  * [Kha19] Ilya Khayutin.  Joint equidistribution of CM points.  Ann. of Math. (2), 189(1):145–276, 2019.
  * [PR94] Vladimir Platonov and Andrei Rapinchuk.  Algebraic groups and number theory, volume 139 of Pure and Applied Mathematics.  Academic Press, Inc., Boston, MA, 1994.  Translated from the 1991 Russian original by Rachel Rowen.
  * [Ser03] Jean-Pierre Serre.  Trees.  Springer Monographs in Mathematics. Springer-Verlag, Berlin, 2003.  Translated from the French original by John Stillwell, Corrected 2nd printing of the 1980 English translation.
  * [Vig80] Marie-France Vignéras.  Arithmétique des algèbres de quaternions, volume 800 of Lecture Notes in Mathematics.  Springer, Berlin, 1980.
  * [Voi21] John Voight.  Quaternion algebras, volume 288 of Graduate Texts in Mathematics.  Springer, Cham, [2021] ©2021.
  * [Zha05] Shou-Wu Zhang.  Equidistribution of CM-points on quaternion Shimura varieties.  Int. Math. Res. Not., (59):3657–3689, 2005.