We first state and explain the formal uniformization theorem of the
supersingular locus $\mathcal{H}_{\mathbb{F}_{p}}^{ss}$ of
$\mathcal{H}_{\mathbb{F}_{p}}$. We use
$\hat{\mathcal{H}}/_{(\mathcal{H}_{\mathbb{F}_{p}}^{ss})}$ to denote the
completion of $\mathcal{H}$ along the closed substack
$\mathcal{H}_{\mathbb{F}_{p}}^{ss}$.

######  Theorem 5.3.1.

There is an isomorphism of formal stacks over $W$

(17)
$\hat{\mathcal{H}}/_{(\mathcal{H}_{\mathbb{F}_{p}}^{ss})}\underset{\sim}{\stackrel{{\scriptstyle\Theta_{\mathcal{H}}}}{{\longrightarrow}}}B^{\times}(\mathbb{Q})_{0}^{2}\backslash[\mathcal{N}\times\textup{GL}_{2}(\mathbb{A}_{f}^{p})^{2}/\textup{GL}_{2}(\hat{\mathbb{Z}}^{p})^{2}],$

where $B^{\times}(\mathbb{Q})_{0}$ is the subgroup of $B^{\times}(\mathbb{Q})$
consisting of elements whose norm has $p$-adic valuation 0.

Theorem 5.3.1 is proved by Rapoport and Zink [RZ96, Theorem 6.24]. Here we
only describe the isomorphism, especially the group action on the right hand
side of (17). Let
$\eta_{0}^{p}:V^{p}(\mathbb{E})\stackrel{{\scriptstyle\sim}}{{\rightarrow}}(\mathbb{A}_{f}^{p})^{2}$
be a prime-to-$p$ level structure of $\mathbb{E}$. Let $\tilde{\mathbb{E}}$ be
a deformation of $\mathbb{E}$ to $W$, and let
$\tilde{\mathbb{X}}\coloneqq\tilde{\mathbb{E}}[p^{\infty}]$ be the
corresponding deformation of $\mathbb{X}$ to $W$. For some object
$S\in\textup{Nilp}_{W}$, we pick an object
$((X,\rho,\lambda),(X^{\prime},\rho^{\prime},\lambda^{\prime}),(g,g^{\prime}))\in\mathcal{N}(S)\times\textup{GL}_{2}(\mathbb{A}_{f}^{p})^{2}$.
The quasi-isogeny $\rho$ (resp. $\rho^{\prime}$) gives rise to a quasi-isogeny
$\tilde{\rho}:\tilde{\mathbb{X}}_{S}\rightarrow X$ (resp.
$\tilde{\rho^{\prime}}:\tilde{\mathbb{X}}_{S}\rightarrow X^{\prime}$). Then
there exists an elliptic curve $E$ (resp. $E^{\prime}$) up to prime-to-$p$
isogeny over $S$ and a quasi-isogeny
$\rho_{E}:\tilde{\mathbb{E}}_{S}\rightarrow E$ (resp.
$\rho_{E^{\prime}}:\tilde{\mathbb{E}}_{S}\rightarrow E^{\prime}$), such that
$E[p^{\infty}]\simeq X$ (resp. $E^{\prime}[p^{\infty}]\simeq X^{\prime}$) and
$\rho_{E}$ (resp. $\rho_{E^{\prime}}$) induces $\tilde{\rho}$ (resp.
$\tilde{\rho^{\prime}}$) under this isomorphism. The object
$((X,\rho,\lambda),(X^{\prime},\rho^{\prime},\lambda^{\prime}),(g,g^{\prime}))$
is mapped to

$((E,E^{\prime}),(\overline{g^{-1}\eta_{0}^{p}\circ
V^{p}(\rho_{E}^{-1})},\overline{g^{\prime-1}\eta_{0}^{p}\circ
V^{p}(\rho_{E^{\prime}}^{-1})}))\in\mathcal{H}(S).$

The group action is given as follows, for a pair of elements
$(b,b^{\prime})\in B^{\times}(\mathbb{Q})_{0}\times
B^{\times}(\mathbb{Q})_{0}$, by the following map,

$B(\mathbb{Q})\rightarrow
B(\mathbb{Q}_{p})\simeq\textup{End}^{0}(\mathbb{X})\stackrel{{\scriptstyle\rho^{*}}}{{\longrightarrow}}\textup{End}^{0}(X)\textup{
(resp.
$\stackrel{{\scriptstyle\rho^{\prime*}}}{{\longrightarrow}}\textup{End}^{0}(X^{\prime})$)},$

and a fixed isomorphism
$B(\mathbb{A}_{f}^{p})\simeq\textup{GL}_{2}(\mathbb{A}_{f}^{p})$. We obtain
another triple

$(b,b^{\prime})_{\ast}(((X,\rho,\lambda),(X^{\prime},\rho^{\prime},\lambda^{\prime}),(g,g^{\prime})))\coloneqq((X,\rho\circ
b^{-1},\lambda),(X^{\prime},\rho^{\prime}\circ
b^{\prime-1},\lambda^{\prime}),(bg,b^{\prime}g^{\prime})).$

Now let $\mathcal{X}_{0}(N)_{\mathbb{F}_{p}}^{ss}$ (resp.
$\mathcal{Y}_{0}(N)_{\mathbb{F}_{p}}^{ss}$) be the supersingular locus of
$\mathcal{X}_{0}(N)_{\mathbb{F}_{p}}$ (resp.
$\mathcal{Y}_{0}(N)_{\mathbb{F}_{p}}$). Let
$\hat{\mathcal{X}}_{0}(N)/_{(\mathcal{X}_{0}(N)_{\mathbb{F}_{p}}^{ss})}$
(resp.
$\hat{\mathcal{Y}}_{0}(N)/_{(\mathcal{Y}_{0}(N)_{\mathbb{F}_{p}}^{ss})}$) be
the completion of $\mathcal{X}_{0}(N)$ (resp. $\mathcal{Y}_{0}(N)$) along the
closed substack $\mathcal{X}_{0}(N)_{\mathbb{F}_{p}}^{ss}$ (resp.
$\mathcal{Y}_{0}(N)_{\mathbb{F}_{p}}^{ss}$). By the definition of
$\mathcal{X}_{0}(N)$, we have
$\mathcal{X}_{0}(N)_{\mathbb{F}_{p}}^{ss}=\mathcal{Y}_{0}(N)_{\mathbb{F}_{p}}^{ss}$
and therefore
$\hat{\mathcal{X}}_{0}(N)/_{(\mathcal{X}_{0}(N)_{\mathbb{F}_{p}}^{ss})}\simeq\hat{\mathcal{Y}}_{0}(N)/_{(\mathcal{Y}_{0}(N)_{\mathbb{F}_{p}}^{ss})}$.

######  Proposition 5.3.2.

There is an isomorphism of formal stacks over $W$,

(18)
$\hat{\mathcal{X}}_{0}(N)/_{(\mathcal{X}_{0}(N)_{\mathbb{F}_{p}}^{ss})}\underset{\sim}{\stackrel{{\scriptstyle\Theta_{\mathcal{X}_{0}(N)}}}{{\longrightarrow}}}B^{\times}(\mathbb{Q})_{0}\backslash[\mathcal{N}_{0}(N)\times\textup{GL}_{2}(\mathbb{A}_{f}^{p})/\Gamma_{0}(N)(\hat{\mathbb{Z}}^{p})],$

where $B^{\times}(\mathbb{Q})_{0}$ is the subgroup of $B^{\times}(\mathbb{Q})$
consisting of elements whose norm has $p$-adic valuation 0.

###### Proof.

The following diagram is Cartesian with all arrows closed immersions.

$\textstyle{\mathcal{Y}_{0}(N)_{\mathbb{F}_{p}}^{ss}\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{\mathcal{H}_{\mathbb{F}_{p}}^{ss}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{\mathcal{Y}_{0}(N)\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{\mathcal{H}.}$

this diagram gives a closed immersion
$i:\hat{\mathcal{X}}_{0}(N)/_{(\mathcal{X}_{0}(N)_{\mathbb{F}_{p}}^{ss})}\simeq\hat{\mathcal{Y}}_{0}(N)/_{(\mathcal{Y}_{0}(N)_{\mathbb{F}_{p}}^{ss})}\rightarrow\hat{\mathcal{H}}/_{(\mathcal{H}_{\mathbb{F}_{p}}^{ss})}$.

Recall that we have the following isomorphism,

$\hat{\mathcal{H}}/_{(\mathcal{H}_{\mathbb{F}_{p}}^{ss})}\underset{\sim}{\stackrel{{\scriptstyle\Theta_{\mathcal{H}}}}{{\longrightarrow}}}B^{\times}(\mathbb{Q})_{0}^{2}\backslash[\mathcal{N}\times\textup{GL}_{2}(\mathbb{A}_{f}^{p})^{2}/\textup{GL}_{2}(\hat{\mathbb{Z}}^{p})^{2}].$

Let $S$ be an object in $\textup{Nilp}_{W}$, let
$(z,(g,g^{\prime}))\in\mathcal{N}(S)\times\textup{GL}_{2}(\mathbb{A}_{f}^{p})^{2}$
be a point in the closed formal substack
$\mathcal{Y}_{0}(N)_{\mathbb{F}_{p}}^{ss}$, then clearly
$z\in\mathcal{N}_{0}(N)(S)$. Suppose $z$ corresponds to a cyclic isogeny
$E\stackrel{{\scriptstyle\pi}}{{\longrightarrow}}E^{\prime}$ by our
description of the isomorphism $\Theta_{\mathcal{H}}$, then $g^{\prime}$ is
determined by $g$ by the following diagram,

(19) $\begin{split}\lx@xy@svg{\hbox{\raise 0.0pt\hbox{\kern
18.3046pt\hbox{\ignorespaces\ignorespaces\ignorespaces\hbox{\vtop{\kern
0.0pt\offinterlineskip\halign{\entry@#!@&&\entry<EMAIL_ADDRESS>0.0pt\hbox{\hbox{\kern 0.0pt\raise 0.0pt\hbox{\hbox{\kern 3.0pt\raise
0.0pt\hbox{$\textstyle{V^{p}(E_{\overline{s}})\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$}}}}}}}\ignorespaces\ignorespaces\ignorespaces\ignorespaces{}{\hbox{\lx@xy@droprule}}\ignorespaces\ignorespaces\ignorespaces{\hbox{\kern
0.0pt\raise-21.16888pt\hbox{{}\hbox{\kern 0.0pt\raise 0.0pt\hbox{\hbox{\kern
3.0pt\hbox{\hbox{\kern
0.0pt\raise-1.94722pt\hbox{$\scriptstyle{V^{p}(\pi)}$}}}\kern
3.0pt}}}}}}\ignorespaces{\hbox{\kern 0.0pt\raise-30.9489pt\hbox{\hbox{\kern
0.0pt\raise
0.0pt\hbox{\lx@xy@tip{1}\lx@xy@tip{-1}}}}}}{\hbox{\lx@xy@droprule}}{\hbox{\lx@xy@droprule}}\ignorespaces\ignorespaces\ignorespaces\ignorespaces{}{\hbox{\lx@xy@droprule}}\ignorespaces\ignorespaces\ignorespaces{\hbox{\kern
37.8037pt\raise 6.69722pt\hbox{{}\hbox{\kern 0.0pt\raise
0.0pt\hbox{\hbox{\kern 3.0pt\hbox{\hbox{\kern
0.0pt\raise-1.94722pt\hbox{$\scriptstyle{g^{-1}\eta_{0}^{p}\circ
V^{p}(\rho_{E}^{-1})}$}}}\kern 3.0pt}}}}}}\ignorespaces{\hbox{\kern
103.69348pt\raise 0.0pt\hbox{\hbox{\kern 0.0pt\raise
0.0pt\hbox{\lx@xy@tip{1}\lx@xy@tip{-1}}}}}}{\hbox{\lx@xy@droprule}}{\hbox{\lx@xy@droprule}}{\hbox{\kern
42.3046pt\raise 0.0pt\hbox{\hbox{\kern 0.0pt\raise 0.0pt\hbox{\hbox{\kern
3.0pt\raise 0.0pt\hbox{$\textstyle{}$}}}}}}}{\hbox{\kern 72.3046pt\raise
0.0pt\hbox{\hbox{\kern 0.0pt\raise 0.0pt\hbox{\hbox{\kern 3.0pt\raise
0.0pt\hbox{$\textstyle{}$}}}}}}}{\hbox{\kern 103.69348pt\raise
0.0pt\hbox{\hbox{\kern 0.0pt\raise 0.0pt\hbox{\hbox{\kern 3.0pt\raise
0.0pt\hbox{$\textstyle{(\mathbb{A}_{f}^{p})^{2}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$}}}}}}}\ignorespaces\ignorespaces\ignorespaces\ignorespaces{}{\hbox{\lx@xy@droprule}}\ignorespaces\ignorespaces\ignorespaces{\hbox{\kern
117.40462pt\raise-21.16888pt\hbox{{}\hbox{\kern 0.0pt\raise
0.0pt\hbox{\hbox{\kern 3.0pt\hbox{\hbox{\kern
0.0pt\raise-0.82361pt\hbox{$\scriptstyle{w_{N}}$}}}\kern
3.0pt}}}}}}\ignorespaces{\hbox{\kern
117.40462pt\raise-30.03333pt\hbox{\hbox{\kern 0.0pt\raise
0.0pt\hbox{\lx@xy@tip{1}\lx@xy@tip{-1}}}}}}{\hbox{\lx@xy@droprule}}{\hbox{\lx<EMAIL_ADDRESS>0.0pt\raise 0.0pt\hbox{\hbox{\kern 3.0pt\raise
0.0pt\hbox{$\textstyle{V^{p}(E_{\overline{s}}^{\prime})\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$}}}}}}}\ignorespaces\ignorespaces\ignorespaces\ignorespaces{}{\hbox{\lx@xy@droprule}}\ignorespaces\ignorespaces\ignorespaces{\hbox{\kern
36.8137pt\raise-35.60999pt\hbox{{}\hbox{\kern 0.0pt\raise
0.0pt\hbox{\hbox{\kern 3.0pt\hbox{\hbox{\kern
0.0pt\raise-1.91667pt\hbox{$\scriptstyle{g^{\prime-1}\eta_{0}^{p}\circ
V^{p}(\rho_{E^{\prime}}^{-1})}$}}}\kern 3.0pt}}}}}}\ignorespaces{\hbox{\kern
102.3046pt\raise-42.33777pt\hbox{\hbox{\kern 0.0pt\raise
0.0pt\hbox{\lx@xy@tip{1}\lx@xy@tip{-1}}}}}}{\hbox{\lx@xy@droprule}}{\hbox{\lx@xy@droprule}}{\hbox{\kern
42.3046pt\raise-42.33777pt\hbox{\hbox{\kern 0.0pt\raise 0.0pt\hbox{\hbox{\kern
3.0pt\raise 0.0pt\hbox{$\textstyle{}$}}}}}}}{\hbox{\kern
72.3046pt\raise-42.33777pt\hbox{\hbox{\kern 0.0pt\raise 0.0pt\hbox{\hbox{\kern
3.0pt\raise 0.0pt\hbox{$\textstyle{}$}}}}}}}{\hbox{\kern
102.3046pt\raise-42.33777pt\hbox{\hbox{\kern 0.0pt\raise
0.0pt\hbox{\hbox{\kern 3.0pt\raise
0.0pt\hbox{$\textstyle{(\mathbb{A}_{f}^{p})^{2}.}$}}}}}}}\ignorespaces}}}}\ignorespaces\end{split}$

thus we only focus on the pair
$(z,g)\in\mathcal{N}_{0}(N)(S)\times\textup{GL}_{2}(\mathbb{A}_{f}^{p})$.
Consider the following morphism

$\displaystyle\Theta:\mathcal{N}_{0}(N)\times\textup{GL}_{2}(\mathbb{A}_{f}^{p})$
$\displaystyle\longrightarrow\hat{\mathcal{H}}/_{(\mathcal{H}_{\mathbb{F}_{p}}^{ss})},$
$\displaystyle(z,g)$
$\displaystyle\longmapsto\Theta_{\mathcal{H}}^{-1}(z,(g,g^{\prime})).$

the image of $\Theta$ lies in the closed formal substack
$\hat{\mathcal{X}}_{0}(N)/_{(\mathcal{X}_{0}(N)_{\mathbb{F}_{p}}^{ss})}$.

Let $(z_{1},g_{1})$,
$(z_{2},g_{2})\in\mathcal{N}_{0}(N)(S)\times\textup{GL}_{2}(\mathbb{A}_{f}^{p})$
be two points, then $\Theta(z_{1},g_{1})=\Theta(z_{2},g_{2})$ if and only if
there exists $b,b^{\prime}\in B^{\times}(\mathbb{Q})_{0}$ and
$k_{1},k_{1}^{\prime}\in\textup{GL}_{2}(\hat{\mathbb{Z}}^{p})$ such that
$(z_{2},(g_{2},g_{2}^{\prime}))=((b,b^{\prime})_{\ast}z_{1},(bg_{1}k_{1},b^{\prime}g_{1}^{\prime}k_{1}^{\prime}))$.
We still use $E\stackrel{{\scriptstyle\pi}}{{\longrightarrow}}E^{\prime}$ to
denote the corresponding point of $z_{2}$ under $\Theta_{\mathcal{H}}$. Notice
that
$(z_{2},(g_{2},g_{2}^{\prime}))=(z_{2},(bg_{1},b^{\prime}g_{1}^{\prime}))$ in
the quotient stack
$[\mathcal{N}\times\textup{GL}_{2}(\mathbb{A}_{f}^{p})^{2}/\textup{GL}_{2}(\hat{\mathbb{Z}}^{p})^{2}]$,
therefore $\Theta_{\mathcal{H}}(z_{2},(g_{2},g_{2}^{\prime}))=$
$\linebreak\Theta_{\mathcal{H}}(z_{2},(bg_{1},b^{\prime}g_{1}^{\prime}))$
$\in\hat{\mathcal{X}}_{0}(N)/_{(\mathcal{X}_{0}(N)_{\mathbb{F}_{p}}^{ss})}(S)$,
hence both
$(g_{2}=bg_{1}k_{1},g_{2}^{\prime}=b^{\prime}g_{1}^{\prime}k_{1}^{\prime})$
and $(bg_{1},b^{\prime}g_{1}^{\prime})$ satisfy the commutative diagram (19),
then

$k_{1}^{\prime}=w_{N}k_{1}w_{N}^{-1},$

since both $k_{1}$ and $k_{1}^{\prime}$ belongs to
$\textup{GL}_{2}(\hat{\mathbb{Z}}^{p})\coloneqq\prod\limits_{v\neq\infty,p}\textup{GL}_{2}(\mathbb{Z}_{v})$,
there exists $a,b,c,d\in\hat{\mathbb{Z}}^{p}$ such that

$k_{1}=\begin{pmatrix}a&b\\\
Nc&d\end{pmatrix}\in\Gamma_{0}(N)(\hat{\mathbb{Z}}^{p}).$

Moreover, the element $b^{\prime}$ is also determined by $b$ by the diagram
(19). Therefore $\Theta(z_{1},g_{1})=\Theta(z_{2},g_{2})$ if and only if there
exists $b\in B^{\times}(\mathbb{Q})_{0}$ and
$k\in\Gamma_{0}(N)(\hat{\mathbb{Z}}^{p})$ such that
$(z_{2},g_{2})=(b_{\ast}z_{1},bg_{1}k)$. ∎

Let $\hat{\mathcal{Z}}^{ss}(T,\boldsymbol{\varphi})$ be the completion of
$\mathcal{Z}(T,\boldsymbol{\varphi})$ along its supersingular locus
$\mathcal{Z}^{ss}(T,\boldsymbol{\varphi})\coloneqq$$\linebreak\mathcal{Z}(T,\boldsymbol{\varphi})\times_{\mathcal{X}_{0}(N)}\mathcal{X}_{0}(N)_{\mathbb{F}_{p}}^{ss}$.
Let $\Delta(N)^{(p)}$ be the unique quadratic space over $\mathbb{Q}$ (up to
isometry) such that: 1. It is positive definite at $\infty$; 2. For finite
prime $l\neq p$, $\Delta(N)^{(p)}\otimes\mathbb{Q}_{l}$ is isometric to
$\delta_{l}(N)\otimes\mathbb{Q}_{l}$; 3.
$\Delta(N)^{(p)}\otimes\mathbb{Q}_{p}$ is isometric to $\mathbb{W}$. As a
corollary of the formal uniformization of the supersingular locus of
$\mathcal{X}_{0}(N)$ (cf. Proposition 5.3.2), we have the following formal
uniformization of the special cycles on $\mathcal{X}_{0}(N)$.

######  Corollary 5.3.3.

Let $T\in\textup{Sym}_{2}(\mathbb{Q})$ be a nonsingular symmetric matrix, and
$\textup{Diff}(T,\Delta(N))=\\{p\\}$. Let
$\boldsymbol{\varphi}\in\mathscr{S}(\mathbb{V}_{f}^{2})$ be a $T$-admissible
Schwartz function. Let
$K_{0}^{\prime}(\hat{\mathcal{X}}_{0}(N)/_{(\mathcal{X}_{0}(N)_{\mathbb{F}_{p}}^{ss})})$
be the Grothendieck group of coherent sheaves of
$\mathcal{O}_{\hat{\mathcal{X}}_{0}(N)/_{(\mathcal{X}_{0}(N)_{\mathbb{F}_{p}}^{ss})}}$-modules.
Then we have the following identity in
$K_{0}^{\prime}(\hat{\mathcal{X}}_{0}(N)/_{(\mathcal{X}_{0}(N)_{\mathbb{F}_{p}}^{ss})})$,

$\hat{\mathcal{Z}}^{ss}(T,\boldsymbol{\varphi})=\sum\limits_{\begin{subarray}{c}\boldsymbol{x}\in
B^{\times}(\mathbb{Q})_{0}\backslash(\Delta(N)^{(p)})^{2}\\\
T(\boldsymbol{x})=T\end{subarray}}\sum\limits_{g\in
B^{\times}_{\boldsymbol{x}}(\mathbb{Q})_{0}\backslash\textup{GL}_{2}(\mathbb{A}_{f}^{p})/\Gamma_{0}(N)(\hat{\mathbb{Z}}^{p})}\boldsymbol{\varphi}(g^{-1}\boldsymbol{x})\cdot\Theta_{\mathcal{X}_{0}(N)}^{-1}(\mathcal{Z}(\boldsymbol{x}),g),$

where $B^{\times}_{\boldsymbol{x}}\subset B^{\times}$ is the stabilizer of
$\boldsymbol{x}\in(\Delta(N)^{(p)})^{2}$.

###### Proof.

We only need to prove the corollary when $\boldsymbol{\varphi}$ is the
characteristic function of some open compact subset $\boldsymbol{\omega}$ of
$\mathbb{V}_{f}^{2}$. Let $S$ be an object in $\textup{Nilp}_{W}$. Suppose
$\Theta_{\mathcal{X}_{0}(N)}^{-1}(z,g)\in\hat{\mathcal{Z}}^{ss}(T,\boldsymbol{\varphi})(S)$
for some $z\in\mathcal{N}_{0}(N)(S)$, then $z$ gives rise to a cyclic isogeny
$E\stackrel{{\scriptstyle\pi}}{{\longrightarrow}}E^{\prime}$, along with two
isogenies $x_{1},x_{2}\in\textup{Hom}(E,E^{\prime})_{(p)}$ such that

$T=(\frac{1}{2}(x_{i},x_{j})),\,\,\textup{and}\,\,(x_{1},\pi)=(x_{2},\pi)=0.$

then $x_{1},x_{2}$ and $\pi$ induce endomorphisms of the correponding
$p$-divisible groups, and hence endomorphims of $\mathbb{X}$. We still use
$x_{1},x_{2}$ to denote the endomorphisms of $\mathbb{X}$, let
$T(\boldsymbol{x})\coloneqq(\frac{1}{2}(x_{i},x_{j}))$ be the inner product
matrix of $\boldsymbol{x}=(x_{1},x_{2}))$, we have

$T=T(\boldsymbol{x}),\,\,\textup{and}\,\,(x_{1},x_{0})=(x_{2},x_{0})=0.$

i.e.,
$x_{1},x_{2}\in\\{x_{0}\\}^{\bot}=\mathbb{W}\simeq\Delta(N)^{(p)}\otimes_{\mathbb{Q}}\mathbb{Q}_{p}$.
We can also identify $x_{1}$ and $x_{2}$ as elements in
$\linebreak\Delta(N)^{(p)}\otimes\mathbb{A}_{f}^{p}$ via the level structures
$\eta_{0}^{p}\circ V^{p}(\rho_{E}^{-1})$ and $\eta_{0}^{p}\circ
V^{p}(\rho_{E^{\prime}}^{-1})$ of $E$ and $E^{\prime}$. The positivity
assumption on $T$ makes it embeddable into
$\Delta(N)^{(p)}\otimes_{\mathbb{Q}}\mathbb{R}$. By carefully choosing the
isometry $\mathbb{W}\simeq\Delta(N)^{(p)}\otimes_{\mathbb{Q}}\mathbb{Q}_{p}$,
we can find $\boldsymbol{x}\in(\Delta(N)^{(p)})^{2}$ which induces $x_{1}$ and
$x_{2}$ locally at every place of $\mathbb{Q}$.

Then the condition
$\Theta_{\mathcal{X}_{0}(N)}^{-1}(z,g)\in\hat{\mathcal{Z}}^{ss}(T,\boldsymbol{\varphi})(S)$
implies that

$z\in\mathcal{Z}(\boldsymbol{x})\,\,\textup{and}\,\,g^{-1}\boldsymbol{x}\in\boldsymbol{\omega}\,\,(\textup{here}\,\,g\in\textup{GL}_{2}(\mathbb{A}_{f})\,\,\textup{with}\,\,g_{p}=1).$

and this is exactly the meaning of the identity in the theorem. ∎

##  6\. Difference formula at the geometric side

###  6.1. $p$-divisible groups over adic noetherian rings

######  Definition 6.1.1.

A topological ring $R$ is an adic noetherian ring if it is noetherian as a
ring and it has a topological basis consisting of all translations of the
neighborhoods of zero of the form $I^{n}$ $(n>0)$ where $I\subset R$ is a
fixed ideal of $R$, and $R$ is Hausdorff and complete in that topology. A
choice of such an ideal is said to be the defining ideal of the topological
ring $R$.

######  Lemma 6.1.2.

Let $A$ be an adic noetherian local ring whose defining ideal is the maximal
ideal $\mathfrak{m}$, then any ideal $I\subset A$ is complete in the
topological ring $A$, i.e.,

$I=\bigcap\limits_{n}(I+\mathfrak{m}^{n}).$

Moreover, $A/I$ is an adic noetherian ring with defining ideal
$\mathfrak{m}/I$.

###### Proof.

Nakayama lemma implies that $\bigcap\limits_{n}\mathfrak{m}^{n}I=0$, then we
can apply [Stacks Project, Lemma 031B] to conclude that $I$ is
$\mathfrak{m}$-adically complete, i.e.,
$I\simeq\hat{I}\coloneqq\varprojlim\limits_{n}I/\mathfrak{m}^{n}I$.

We have the following exact sequence,

$0\longrightarrow I\longrightarrow A\longrightarrow A/I\longrightarrow 0.$

since $A$ is noetherian, after taking completion with respect to the maximal
ideal $\mathfrak{m}$, we get

$0\longrightarrow\hat{I}\longrightarrow\hat{A}\longrightarrow\widehat{A/I}\longrightarrow
0.$

However, $A=\hat{A}$ and $I=\hat{I}$, hence $\widehat{A/I}\simeq A/I$. We
conclude $A/I$ is an adic noetherian ring.

By definition, $\widehat{A/I}=\varprojlim\limits_{n}A/(I+\mathfrak{m}^{n})$,
hence $\widehat{A/I}\simeq A/I$ implies that
$I=\bigcap\limits_{n}(I+\mathfrak{m}^{n})$. ∎

######  Lemma 6.1.3.

Let $A$ be an adic noetherian ring whose defining ideal is $I$, then the
following functor

$\displaystyle\left\\{\textup{Category of $p$-divisible groups
over}\,\,\textup{Spec}\,A\right\\}$
$\displaystyle\rightarrow\left\\{\textup{Category of $p$-divisible groups
over}\,\,\textup{Spf}(A)\right\\},$ $\displaystyle G=(G_{n}/A)$
$\displaystyle\mapsto(G_{k}=(G_{k}(n)=G(n)\times_{A}A/I^{k}))_{k\geq 1}.$

is an equivalence.

###### Proof.

This is proved by de Jong in [deJ95, Lemma 2.4.4]. ∎

###  6.2. Difference Divisors on $\mathcal{N}$

Recall that for every nonzero integral $x\in\mathbb{B}$, we define the special
divisor $\mathcal{Z}^{\sharp}(x)$ on $\mathcal{N}$ as the closed formal
subscheme of $\mathcal{N}$ over where $x$ lifts to an isogeny (cf. Definition
5.2.1 and Proposition 5.2.3). It is cut out by an element $f_{x}\in
W[[t_{1},t_{2}]]$.

For any nonzero $x\in\mathbb{B}$ such that $\nu_{p}(x^{\vee}\circ x)\geq 2$,
there is a closed immersion:

$\displaystyle i:\mathcal{Z}^{\sharp}(p^{-1}x)$
$\displaystyle\longrightarrow\mathcal{Z}^{\sharp}(x),$

by composing every deformation of $p^{-1}x$ with the multiplication-by-$p$
morphism. Since $W[[t_{1},t_{2}]]$ is a unique factorization domain, we get
$f_{p^{-1}x}|f_{x}$. Define $d_{x}=f_{x}/f_{p^{-1}x}\in W[[t_{1},t_{2}]]$ when
$\nu_{p}(x^{\vee}\circ x)\geq 2$, $d_{x}=f_{x}$ when $\nu_{p}(x^{\vee}\circ
x)=0$ or $1$.

######  Definition 6.2.1.

Let $x\in\mathbb{B}$ be a nonzero and integral element. The difference divisor
associated to $x$ to be

$\mathcal{D}(x)=\textup{Spf}\,W[[t_{1},t_{2}]]/d_{x}.$

The notion of difference divisor is first introduced by Terstiege in [Ter11].
Proposition 5.2.3 implies that $p\nmid f_{x}$, hence $p\nmid d_{x}$, therefore
the difference divisor $\mathcal{D}(x)$ is flat over $\textup{Spf}\,W$. The
following theorem asserts that $\mathcal{D}(x)$ is regular.

######  Theorem 6.2.2.

Let $x\in\mathbb{B}$ be a nonzero and integral element,
$\mathfrak{m}=(p,t_{1},t_{2})$ is the maximal ideal of $W[[t_{1},t_{2}]]$,
then $d_{x}\in\mathfrak{m}\backslash\mathfrak{m}^{2}$, i.e., the difference
divisor $\mathcal{D}(x)$ is regular. Moreover, for any $i\geq 1$, $d_{x}$ and
$d_{p^{-i}x}$ are coprime to each other if $p^{-i}x$ is also integral.

###### Proof.

Let $n\geq 0$ be the $p$-adic valuation of $x^{\vee}\circ x$. We first prove
this result when $n=0$, in this case the result follows from the work of Li
and Zhu [LZ18, Lemma 3.2.2] ($p$ odd) and [Rap07, Lemma 3.1] ($p=2$), and
$W[[t_{1},t_{2}]]/f_{x}\simeq W[[t]]$ is even smooth over $W$.

Now we suppose $n\geq 1$, we can always find an element
$x^{\prime}\in\mathbb{B}$ such that $x^{\prime\vee}\circ x^{\prime}$ has
$p$-adic valuation 0, and $(x,x^{\prime})=0$. We consider the formal closed
subscheme
$\mathcal{Z}^{\sharp}(x)\times_{\mathcal{N}}\mathcal{Z}^{\sharp}(x^{\prime})$,
it is cut out by the ideal $(f_{x},f_{x^{\prime}})\subset\mathfrak{m}$; it is
also a formal closed subscheme of
$\mathcal{Z}^{\sharp}(x^{\prime})\simeq\textup{Spf}\,W[[t]]$ cut out by the
image $\tilde{f}_{x}$ of $f_{x}$ under the surjective map $A\rightarrow
W[[t]]$. By [GK93, (5.10)] (see also [LZ22, 5.1]), we have the following
decomposition of
$\mathcal{Z}^{\sharp}(x)\times_{\mathcal{N}}\mathcal{Z}^{\sharp}(x^{\prime})$
into Cartier divisors on $\mathcal{Z}^{\sharp}(x^{\prime})$,

(20)
$\mathcal{Z}^{\sharp}(x)\times_{\mathcal{N}}\mathcal{Z}^{\sharp}(x^{\prime})=\sum\limits_{i=0}^{[n/2]}\mathcal{Z}_{i},$

each $\mathcal{Z}_{i}\simeq\textup{Spf}\,\mathcal{O}_{\breve{K},i}$, where
$\mathcal{O}_{\breve{K},i}$ is the ring of integers of some nonarchimedean
local field, hence it is a regular local ring, and they are different from
each other. Let $d_{i}\in W[[t]]$ be the function defining the divisor
$\mathcal{Z}_{i}$ on $\mathcal{Z}^{\sharp}(x^{\prime})$. Then we have the
following identity,

(21) $\tilde{f}_{x}=(\textup{unit})\times\prod\limits_{i=0}^{[n/2]}d_{i}.$

the regularity of $\mathcal{O}_{\breve{K},i}$ implies that
$d_{i}\in(p,t)\backslash(p,t)^{2}$.

Let $\tilde{d}_{p^{-i}x}$ be the image of $d_{p^{-i}x}$ under the surjective
map $A\rightarrow A/(f_{x^{\prime}})\simeq W[[t]]$. By definition we have
$f_{x}=(\textup{unit})\times\prod\limits_{i=0}^{[n/2]}d_{p^{-i}x}$, therefore,

(22)
$\tilde{f}_{x}=(\textup{unit})\times\prod\limits_{i=0}^{[n/2]}\tilde{d}_{p^{-i}x}.$

We induct on $n$ to conclude that $\tilde{d}_{x}=(\textup{unit})\times
d_{[n/2]}\in(p,t)\backslash(p,t)^{2}$. When $n=1$, we simply get
$\tilde{d}_{x}=(\textup{unit})\times d_{0}\in(p,t)\backslash(p,t)^{2}$. Let’s
assume the claim is true for $n<m$ for some $m\geq 2$, we will prove the
result for $n=m$. For this, we just need to compare (21) and (22) for
$p^{-1}x$ and $x$.

Therefore we have proved that $A/(d_{x},f_{x^{\prime}})$ is a regular local
ring, hence we conclude that $d_{x}\in\mathfrak{m}\backslash\mathfrak{m}^{2}$,
and $\mathcal{D}(x)\simeq\textup{Spf}\,A/(d_{x})$ is regular. Moreover, since
every piece on the right hand side of (20) is different from each other, we
conclude that $d_{x}$ and $d_{p^{-i}x}$ are coprime to each other. ∎

Fix a $N$-isogeny $x_{0}\in\mathbb{B}$, recall that we have defined the
deformation functor $\mathcal{N}_{0}(N)$ in $\S$5.1.1. Compare the moduli
intepretations of $\mathcal{N}_{0}(N)$ and $\mathcal{Z}^{\sharp}(x_{0})$, we
have a natural functor,

$\displaystyle i:\mathcal{N}_{0}(N)$
$\displaystyle\longrightarrow\mathcal{Z}^{\sharp}(x_{0}),$
$\displaystyle(X\stackrel{{\scriptstyle
x\,\,\textup{cyclic}}}{{\longrightarrow}}X^{\prime},(\rho,\rho^{\prime}),(\lambda,\lambda^{\prime}))$
$\displaystyle\longmapsto(X\stackrel{{\scriptstyle
x}}{{\rightarrow}}X^{\prime},(\rho,\rho^{\prime}),(\lambda,\lambda^{\prime})).$

######  Theorem 6.2.3.

The natural functor $i$ is a closed immersion, and induces an isomorphism:

$\mathcal{N}_{0}(N)\stackrel{{\scriptstyle\sim}}{{\longrightarrow}}\mathcal{D}(x_{0}).$

###### Proof.

By Proposition 5.2.3, $\mathcal{Z}^{\sharp}(x_{0})$ is represented by
$\textup{Spf}\,W[[t_{1},t_{2}]]/f_{x_{0}}$. We consider the maximal ideal
$\mathfrak{m}=(p,t_{1},t_{2})$ of $W[[t_{1},t_{2}]]$ and a projective system
of rings $\varprojlim_{n}R_{n}$ where
$R_{n}=W[[t_{1},t_{2}]]/(f_{x_{0}}+\mathfrak{m}^{n})$. We use
$(X_{n}\stackrel{{\scriptstyle
x_{n}}}{{\rightarrow}}X^{\prime}_{n},(\rho_{n},\rho^{\prime}_{n}),(\lambda_{n},\lambda^{\prime}_{n}))$
to denote the corresponding object in $\mathcal{Z}^{\sharp}(x_{0})(R_{n})$ by
the natural morphism $W[[t_{1},t_{2}]]/f_{x_{0}}\rightarrow R_{n}$, which is
essentially the base change from $\mathcal{Z}^{\sharp}(x_{0})$ to
$\textup{Spec}\,R_{n}$ of the universal object
$(X^{\textup{univ}}\stackrel{{\scriptstyle
x_{0}^{\textup{univ}}}}{{\rightarrow}}X^{\prime\textup{univ}},(\rho^{\textup{univ}},\rho^{\prime\textup{univ}}),(\lambda^{\textup{univ}},\lambda^{\prime\textup{univ}}))$.
The following diagram is commutative,

$\textstyle{X_{n}\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{x_{n}}$$\textstyle{X_{n+1}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{x_{n+1}}$$\textstyle{X_{n}^{\prime}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\textstyle{X_{n+1}^{\prime}.}$

By [deJ95, Lemma 2.4.4], ${x_{n}}$ fits together to be an isogeny of
$p$-divisible groups $x_{0}^{\textup{univ}}:X^{\textup{univ}}\rightarrow
X^{\prime\textup{univ}}$ over $\textup{Spec}\,W[[t_{1},t_{2}]]/f_{x_{0}}$.

Now we apply Serre-Tate theorem (cf. [CS64]) to the projective system
$\varprojlim_{n}R_{n}$, we obtain a direct system of elliptic curves
$E_{n},E^{\prime}_{n}$ over $\textup{Spec}\,R_{n}$ and
$\tilde{x}_{n}\in\textup{End}_{R_{n}}(E_{n},E^{\prime}_{n})$ such that,
(i) There exist isomorphisms $i_{n}:E_{n}[p^{\infty}]\simeq X_{n}$ and
$i_{n}^{\prime}:E_{n}^{\prime}[p^{\infty}]\simeq X_{n}^{\prime}$,
(ii) $x_{n}=i_{n}^{\prime}\circ\tilde{x}_{n}[p^{\infty}]\circ i_{n}^{-1}$.

Since every elliptic curve is equipped with a canonical ample line bundle
given by the unit section, we can apply Grothendieck’s algebraization theorem
(cf. [Stacks Project, Theorem 089A, Lemma 0A42]) to obtain a triple
$(E^{\textup{univ}}\stackrel{{\scriptstyle\tilde{x}_{0}^{\textup{univ}}}}{{\rightarrow}}E^{\prime\textup{univ}},(\rho^{\textup{univ}},\rho^{\prime\textup{univ}}),(\lambda^{\textup{univ}},\lambda^{\prime\textup{univ}}))$
where $E^{\textup{univ}}$ and $E^{\prime\textup{univ}}$ are two elliptic
curves over $\textup{Spec}\,W[[t_{1},t_{2}]]/f_{x_{0}}$ with the following
isomorphisms

$i^{\textup{univ}}:E^{\textup{univ}}[p^{\infty}]\simeq
X^{\textup{univ}},\,\,i^{\prime\textup{univ}}:E^{\prime\textup{univ}}[p^{\infty}]\simeq
X^{\prime\textup{univ}}.$

and
$x_{0}^{\textup{univ}}=i^{\prime\textup{univ}}\circ\tilde{x}_{0}^{\textup{univ}}[p^{\infty}]\circ(i^{\textup{univ}})^{-1}$.
Then we have

$\textup{ker}(x_{0}^{\textup{univ}})\simeq\textup{ker}(\tilde{x}^{\textup{univ}}[p^{\infty}])=\textup{ker}(\tilde{x}_{0}^{\textup{univ}})[p^{\infty}]\hookrightarrow
E^{\textup{univ}}.$

Where $\textup{ker}(\tilde{x}_{0}^{\textup{univ}})[p^{\infty}]$ is the
$p$-torsion subgroup scheme of the finite locally free group scheme
$\textup{ker}(\tilde{x}_{0}^{\textup{univ}})$. Therefore the universal kernel
$\textup{ker}(x_{0}^{\textup{univ}})$ is embedded into an elliptic curve, we
can apply Proposition 4.1.4 and conclude that there is an ideal
$\mathcal{I}^{cyc}(x_{0})\subset W[[t_{1},t_{2}]]$ containing $f_{x_{0}}$ such
that for an object $(X\stackrel{{\scriptstyle
x}}{{\rightarrow}}X^{\prime},(\rho,\rho^{\prime}),(\lambda,\lambda^{\prime}))\in\mathcal{Z}^{\sharp}(x_{0})(S)$
where $S\in\textup{Nilp}_{W}$, the isogeny $x$ is a cyclic isogeny if and only
if the morphism $S\rightarrow\textup{Spf}\,W[[t_{1},t_{2}]]/f_{x_{0}}$ factors
through $\textup{Spf}\,W[[t_{1},t_{2}]]/\mathcal{I}^{cyc}(x_{0})$. We conclude
from here that $\mathcal{N}_{0}(N)$ is represented by the formal scheme
$\textup{Spf}\,W[[t_{1},t_{2}]]/\mathcal{I}^{cyc}(x_{0})$ and the natural
functor $i$ is a closed immersion.

Recall that we use $d_{x_{0}}$ to denote the equation that cuts out the
difference divisor $\mathcal{D}(x_{0})$. In the following we use $\mathcal{D}$
to denote the difference divisor $\mathcal{D}(x_{0})$. Let
$x_{\mathcal{D}}:X_{\mathcal{D}}\rightarrow X^{\prime}_{\mathcal{D}}$ be the
base change of $x_{0}^{\textup{univ}}:X^{\textup{univ}}\rightarrow
X^{\prime\textup{univ}}$ to $\mathcal{D}$. We first show that
$x_{\mathcal{D}}$ doesn’t factor through the multiplication-by-$p$ morphism of
$X_{\mathcal{D}}$. Let’s assume the converse, i.e., $x_{\mathcal{D}}=p\circ
x^{\prime}_{\mathcal{D}}$ where
$x^{\prime}_{\mathcal{D}}:X_{\mathcal{D}}\rightarrow X^{\prime}_{\mathcal{D}}$
is an isogeny. Let
$\mathcal{D}_{n}=\textup{Spec}\,W[[t_{1},t_{2}]]/(d_{x_{0}}+\mathfrak{m}^{n})$,
the base change of $x^{\prime}_{\mathcal{D}}$ from $\mathcal{D}$ to
$\mathcal{D}_{n}$ is a deformation of $p^{-1}x_{0}$, hence the natural
morphism $\mathcal{D}_{n}\rightarrow\mathcal{Z}^{\sharp}(x_{0})$ factors
through
$\mathcal{Z}^{\sharp}(p^{-1}x_{0})\simeq\textup{Spf}\,W[[t_{1},t_{2}]]/(f_{p^{-1}x_{0}})$.
Since
$W[[t_{1},t_{2}]]/(d_{x_{0}})\simeq\varprojlim\limits_{n}W[[t_{1},t_{2}]]/(d_{x_{0}}+\mathfrak{m}^{n})$
by Lemma 6.1.2, we get a ring homomorphism
$W[[t_{1},t_{2}]]/(f_{p^{-1}x_{0}})\rightarrow W[[t_{1},t_{2}]]/(d_{x_{0}})$.
However, $d_{x_{0}}$ is coprime to $f_{p^{-1}x_{0}}$ by Theorem 6.2.2, this is
a contradiction. Hence $x_{\mathcal{D}}$ doesn’t factor through the
multiplication-by-$p$ morphism of $X_{\mathcal{D}}$.

Lemma 4.1.5 and Corollary 4.1.6 imply that $\textup{ker}(x_{\mathcal{D}})$ is
a cyclic group scheme since $\mathcal{D}$ is an integral noetherian scheme
which is also separated and flat over $W$, hence there exists a natural
morphism from $\textup{Spec}\,W[[t_{1},t_{2}]]/d_{x_{0}}$ to
$\textup{Spec}\,W[[t_{1},t_{2}]]/\mathcal{I}^{cyc}(x_{0})$. Therefore we
conclude that $\mathcal{I}^{cyc}(x_{0})\subset(d_{x_{0}})\subset
W[[t_{1},t_{2}]]$. This shows that the closed immersion
$\mathcal{D}(x_{0})\rightarrow\mathcal{Z}^{\sharp}(x_{0})$ decomposes in the
following way:

$\mathcal{D}(x_{0})\rightarrow\mathcal{N}_{0}(N)\rightarrow\mathcal{Z}^{\sharp}(x_{0}).$

Therefore we have an inclusion of ideals,
$(f_{x_{0}})\subset\mathcal{I}^{cyc}(x_{0})\subset(d_{x_{0}})\in
W[[t_{1},t_{2}]]$. [KM85, Theorem 6.6.1] (see also Case II of 5.3.2.1 of
loc.cit) asserts that $W[[t_{1},t_{2}]]/\mathcal{I}^{cyc}(x_{0})$ is a
2-dimensional regular local ring. Recall that we have already proved in
Theorem 6.2.2 that $W[[t_{1},t_{2}]]/d_{x_{0}}$ is also a regular local ring,
hence we must have $\mathcal{I}^{cyc}(x_{0})=(d_{x_{0}})$, i.e.,
$\mathcal{D}(x_{0})\simeq\mathcal{N}_{0}(N)$. ∎

####  6.2.1. Special Fibers

In this part we use the identification
$\mathcal{N}_{0}(N)\stackrel{{\scriptstyle\sim}}{{\longrightarrow}}\mathcal{D}(x_{0})$
to explicitly describe the special fiber of the local ring
$\mathcal{N}_{0}(N)$. The main results of this part will not be used in the
following calculations, readers can skip on first reading.

Let $\mathfrak{a}=(t_{1},t_{2})\subset W[[t_{1},t_{2}]]$. Let
$\overline{\mathfrak{a}}$ be the image of $\mathfrak{a}$ in
$\mathbb{F}[[t_{1},t_{2}]]$. Let $A_{n}=W[[t_{1},t_{2}]]/\mathfrak{a}^{n}$ and
$R_{n}=\mathbb{F}[[t_{1},t_{2}]]/\overline{\mathfrak{a}}^{n}$. Let
$A_{0}=W[[t_{1},t_{2}]]$ and $R_{0}=\mathbb{F}[[t_{1},t_{2}]]$. Equip each
$A_{n}$ with a morphism $\sigma$ which extends the Frobenius morphism on $W$
and maps $t_{1}$ to $t_{1}^{p}$, $t_{2}$ to $t_{2}^{p}$. Then $A_{n}$ is a
frame for $R_{n}$ in the sense of [Zin01, Definition 1]. For any $n\geq 0$,
let $(M,M_{1},\Phi)$ be an $A_{n}$-window in the sense of [Zin01, Definition
2]. Since $\Phi(M_{1})\subset p\cdot M$ and $p$ is not a zero-divisor in
$A_{n}$, we define $\Phi_{1}:M_{1}\rightarrow M$ to be $p^{-1}\Phi$. The
morphism $\Phi_{1}$ is $\sigma$-linear and induces an isomorphism
$\Phi_{1}^{\sigma}:M_{1}^{\sigma}\rightarrow M$ because both sides are free
$A_{n}$-module of the same rank and $\Phi_{1}^{\sigma}$ is surjective by the
definition of windows ([Zin01, Definition 2(ii)]). Let $\alpha$ be the
following injective $A_{n}$-morphism,

$\alpha:M_{1}\hookrightarrow
M\stackrel{{\scriptstyle(\Phi_{1}^{\sigma})^{-1}}}{{\longrightarrow}}M_{1}^{\sigma}.$

######  Theorem 6.2.4.

For any $n\geq 0$, we have the following category equivalences,

$\left\\{\textup{$A_{n}$-window
$(M,M_{1},\Phi)$}\right\\}\stackrel{{\scriptstyle\sim}}{{\longleftrightarrow}}\left\\{\textup{formal
$p$-divisible groups over $R_{n}$}\right\\}$

Moreover, both these two categories are equivalent to the following category.

$\\{\textup{pairs $(M_{1},\alpha:M_{1}\rightarrow
M_{1}^{\sigma})$,}\,\,\textup{such that Coker($\alpha$) is a free
$R_{n}$-module.}\\}$

where the functor from $A_{n}$-window $(M,M_{1},\Phi)$ to pairs
$(M_{1},\alpha:M_{1}\rightarrow M_{1}^{\sigma})$ is given by the constructions
above.

###### Proof.

This is proved in [Zin01, Theorem 4]. ∎

Let
$((\overline{X},\overline{\rho},\overline{\lambda}),(\overline{X}^{\prime},\overline{\rho}^{\prime},\overline{\lambda}^{\prime}))$
be the universal object in $\mathcal{N}(\mathbb{F}[[t_{1},t_{2}]])$, i.e., the
base change of the universal object
$((X^{\textup{univ}},\rho^{\textup{univ}},\lambda^{\textup{univ}}),(X^{\prime\textup{univ}},\rho^{\prime\textup{univ}},\lambda^{\prime\textup{univ}}))$
over $W[[t_{1},t_{2}]]$ to $\mathbb{F}[[t_{1},t_{2}]]$. The corresponding
window can be described as follows, let $\mathbb{D}=W\cdot e+W\cdot f$ be the
Dieudonne module of $\mathbb{X}$, where $Fe=Ve=f$, $Ff=Vf=p\cdot e$ ($F$, $V$
are the Frobenius and Verschiebung morphisms on $\mathbb{D}$). Then we let
$M=\mathbb{D}\otimes_{W}W[[t]]$, and $M_{1}=(W\cdot f+pW\cdot
e)\otimes_{W}W[[t]]$. We still use $\sigma$ to denote the Frobenius action on
$W[[t]]$ which sends $t$ to $t^{p}$ and extends the Frobenius morphism on $W$.
Let $\Phi$ be the $\sigma$-linear map from $M$ to $M$ such that $\Phi(e\otimes
1)=t\cdot(e\otimes 1)+f\otimes 1,\Phi(f\otimes 1)=p\cdot(e\otimes 1)$. Then
$(M,M_{1},\Phi)$ is the $W[[t]]$-window corresponding to the universal
deformation of $\mathbb{X}$ over $\mathbb{F}[[t]]$ (cf. [Zin02, (86)]). Let
$(M^{\prime},M_{1}^{\prime},\Phi^{\prime})$ be the correpsonding window for
$\mathbb{X}^{\prime}$, then the $W[[t_{1},t_{2}]]$-window corresponding to the
universal deformation of $\mathbb{X}\times_{\mathbb{F}}\mathbb{X}^{\prime}$
over $\mathbb{F}[[t_{1},t_{2}]]$ is given by $(M\oplus M^{\prime},M_{1}\oplus
M_{1}^{\prime},\Phi\oplus\Phi^{\prime})$, or $(M_{1}\oplus
M_{1}^{\prime},\alpha)$ where under the basis $\\{p\cdot(e\otimes 1),f\otimes
1,p(e^{\prime}\otimes 1),f^{\prime}\otimes 1\\}$, the map $\alpha$ is given by
the following matrix

$\alpha=\begin{pmatrix}&1&&\\\ p&-t_{1}&&\\\ &&&1\\\ &&p&-t_{2}\end{pmatrix}.$

Any quasi-isogeny $x\in\mathbb{B}$ induces the following endomorphism of the
window $M_{1}\oplus M_{1}^{\prime}$ of
$\mathbb{X}\times_{\mathbb{F}}\mathbb{X}^{\prime}$ under the basis $\\{p\cdot
e,f,p\cdot e^{\prime},f^{\prime}\\}$,

$\mathbb{D}(x)=\begin{pmatrix}&&\sigma(a)&-\sigma(b)\\\ &&-p\cdot b&a\\\
a&\sigma(b)&&\\\ p\cdot b&\sigma(a)&&\end{pmatrix},$

where $a,b\in\mathbb{Q}_{p^{2}}$.

Let $M_{1}(n)=M_{1}\otimes_{A_{0}}A_{n}$,
$M_{1}^{\prime}(n)=M_{1}^{\prime}\otimes_{A_{0}}A_{n}$,
$\alpha(n)=\alpha\otimes_{A_{0}}A_{n}$. By Theorem 6.2.4, a quasi-isogeny $x$
lifts to an isogeny over $R_{n}$ if and only if there exists
$x(n)\in\textup{End}((M_{1}(n)\oplus M_{1}^{\prime}(n),\alpha(n)))$ such that
$x(1)=\mathbb{D}(x)$ and the following diagram commutes

$\textstyle{M_{1}(n)\oplus
M_{1}^{\prime}(n)\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{x(n)}$$\scriptstyle{\alpha(n)}$$\textstyle{M_{1}(n)^{\sigma}\oplus
M_{1}^{\prime}(n)^{\sigma}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{\sigma(x(n))}$$\textstyle{M_{1}(n)\oplus
M_{1}^{\prime}(n)\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{\alpha(n)}$$\textstyle{M_{1}(n)^{\sigma}\oplus
M_{1}^{\prime}(n)^{\sigma}.}$

Under the basis $\\{p\cdot(e\otimes 1),f\otimes 1,p(e^{\prime}\otimes
1),f^{\prime}\otimes 1\\}$, the morphism $x(n)$ has the following form

$x(n)=\begin{pmatrix}A(n)&Y(n)\\\ X(n)&B(n)\end{pmatrix}.$

where $X(n),Y(n),A(n),B(n)\in\textup{M}_{2}(A_{n})$ satisfy the following
equations,

$\displaystyle X(n)$
$\displaystyle=p^{-1}U^{\prime}(t_{2})\cdot\sigma(X(n))\cdot
U(t_{1}),\,\,\,Y(n)=p^{-1}U^{\prime}(t_{1})\cdot\sigma(Y(n))\cdot U(t_{2});$
$\displaystyle A(n)$
$\displaystyle=p^{-1}U^{\prime}(t_{1})\cdot\sigma(A(n))\cdot
U(t_{1}),\,\,\,B(n)=p^{-1}U^{\prime}(t_{2})\cdot\sigma(B(n))\cdot U(t_{2}).$

where $U(t)=\begin{pmatrix}&1\\\ p&-t\end{pmatrix}$ and
$U^{\prime}(t)=\begin{pmatrix}t&1\\\ p&\end{pmatrix}$. Since $A(1)=B(1)=0$, we
conclude (by comparing degrees of $t_{1}$ and $t_{2}$) that $A(n)=B(n)=0$.

For any $A\in\textup{M}_{2}(A_{n}\otimes_{\mathbb{Z}}\mathbb{Q})$, the matrix
$\sigma(A)$ is a well-defined element in
$\textup{M}_{2}(A_{pn}\otimes_{\mathbb{Z}}\mathbb{Q})$. Therefore, starting
from $X(1)$ and $Y(1)$, we can define successively

(23) $X(p^{l+1})=p^{-1}U^{\prime}(t_{2})\cdot\sigma(X(p^{l}))\cdot
U(t_{1}),\,\,\,Y(p^{l+1})=p^{-1}U^{\prime}(t_{1})\cdot\sigma(Y(p^{l}))\cdot
U(t_{2}).$

Since the local ring $\mathcal{O}_{\mathcal{Z}(x)}$ only depends (up to
noncanonical isomorphisms) on the valuation of $x$, we will take the following
specific choice of $x$ and $\mathbb{D}(x)$ in the following computations.
$\bullet$ When $\textup{ord}_{p}(x^{\vee}\circ x)=2k$ for some $k\geq 0$, we
take

$X(1)=Y(1)=\begin{pmatrix}p^{k}&\\\ &p^{k}\end{pmatrix}.$

By computation based on the recursion formula (23), it turns out that for any
$l\geq 1$,

$\displaystyle X(p^{l})$
$\displaystyle=\frac{1}{p^{l-k}}\left(\begin{pmatrix}0&(-1)^{l-1}(t_{1}t_{2})^{\frac{p^{l-1}-1}{p-1}}(t_{2}^{p^{l-1}}-t_{1}^{p^{l-1}})\\\
0&0\end{pmatrix}+p\cdot C\right);$ $\displaystyle Y(p^{l})$
$\displaystyle=\frac{1}{p^{l-k}}\left(\begin{pmatrix}0&(-1)^{l-1}(t_{1}t_{2})^{\frac{p^{l-1}-1}{p-1}}(t_{2}^{p^{l-1}}-t_{1}^{p^{l-1}})\\\
0&0\end{pmatrix}+p\cdot D\right).$

for some matrices $C,D\in\textup{M}_{2}(A_{p^{l}})$.

$\bullet$ When $\textup{ord}_{p}(x^{\vee}\circ x)=2k+1$ for some $k\geq 0$, we
take

$X(1)=-Y(1)=\begin{pmatrix}&p^{k}\\\ p^{k+1}&\end{pmatrix}.$

By computation based on the recursion formula (23), it turns out that for any
$l\geq 1$,

$\displaystyle X(p^{l})$
$\displaystyle=\frac{1}{p^{l-k}}\left(\begin{pmatrix}0&(-1)^{l}(t_{1}t_{2})^{\frac{p^{l}-1}{p-1}}\\\
0&0\end{pmatrix}+p\cdot C^{\prime}\right);$ $\displaystyle Y(p^{l})$
$\displaystyle=\frac{1}{p^{l-k}}\left(\begin{pmatrix}0&(-1)^{l-1}(t_{1}t_{2})^{\frac{p^{l}-1}{p-1}}\\\
0&0\end{pmatrix}+p\cdot D^{\prime}\right).$

for some matrices $C^{\prime},D^{\prime}\in\textup{M}_{2}(A_{p^{l}})$.

######  Proposition 6.2.5.

Let $x\in\mathbb{B}$ be an integral nonzero element which has valuation $n$
and induces $X(1)$ and $Y(1)$ as described above, let $f_{x}\in
W[[t_{1},t_{2}]]$ be the element cutting out $\mathcal{Z}(x)$, then

(24) $\overline{f}_{x}\coloneqq f_{x}\,\,\,\textup{mod
$p$}=(\textup{unit})\times\begin{cases}(t_{1}t_{2})^{\frac{p^{n/2}-1}{p-1}}(t_{2}^{p^{n/2}}-t_{1}^{p^{n/2}})\,\,\,\textup{mod
$(t_{1},t_{2})^{p^{n/2+1}}$}&\textup{when $n$ is even;}\\\
(t_{1}t_{2})^{\frac{p^{(n+1)/2}-1}{p-1}}\,\,\,\,\,\,\,\textup{mod
$(t_{1},t_{2})^{p^{(n+1)/2}}$}&\textup{when $n$ is odd.}\end{cases}$

###### Proof.

By the above formula for $X(p^{l})$ and $Y(p^{l})$, we can conclude that $x$
can be lifted to an isogeny over $R_{p^{[n/2]}}$ but not over
$R_{p^{[n/2]+1}}$. Then the formula for $X(p^{[n/2]+1})$ and $Y(p^{[n/2]+1})$
imply the equation above. ∎

######  Theorem 6.2.6.

Let $x\in\mathbb{B}$ be an integral nonzero element which has valuation $n$
and induces $X(1)$ and $Y(1)$ as described above, let $f_{x}\in
W[[t_{1},t_{2}]]$ be the element cutting out $\mathcal{Z}(x)$, then
$\overline{f}_{x}$ is divisible by

$t_{1}-t_{2}^{p^{a}},\,\,\,t_{1}^{p^{a}}-t_{2}\,\,\,\textup{for $0\leq a\leq
n$ and $a\equiv n$ mod $2$}.$

Moreover, $\overline{f}_{x}$ has no other irreducible factors and the
multiplicity of $t_{1}-t_{2}^{p^{a}},t_{1}^{p^{a}}-t_{2}$ in
$\overline{f}_{x}$ is $p^{(n-a)/2}$.

###### Proof.

We first prove that $t_{1}^{p^{k_{1}}}-t_{2}^{p^{k_{2}}}$ divides
$\overline{f}_{x}$, where $k_{1},k_{2}\geq 0$ and $k_{1}+k_{2}=n$. We will
prove this by showing that
$X(p^{l}),Y(p^{l})\,\,\textup{mod}\,(t_{1}^{p^{k_{1}}}-t_{2}^{p^{k_{2}}})\in\textup{M}_{2}(A_{p^{l}}/(t_{1}^{p^{k_{1}}}-t_{2}^{p^{k_{2}}}))$
for any $l\geq 0$.
$\bullet$ When $n=2k$ is even, the recursion formula (23) implies that,

$\displaystyle X(p^{l})$
$\displaystyle=p^{k-l}U^{\prime}(t_{2})U^{\prime}(t_{2}^{p})\cdot\cdot\cdot
U^{\prime}(t_{2}^{p^{l-1}})U(t_{1}^{p^{l-1}})\cdot\cdot\cdot
U(t_{1}^{p})U(t_{1});$ $\displaystyle Y(p^{l})$
$\displaystyle=p^{k-l}U^{\prime}(t_{1})U^{\prime}(t_{1}^{p})\cdot\cdot\cdot
U^{\prime}(t_{1}^{p^{l-1}})U(t_{2}^{p^{l-1}})\cdot\cdot\cdot
U(t_{2}^{p})U(t_{2}).$

Let’s assume $k_{1}\leq k_{2}$. For any $0\leq t\leq l-k_{1}$, we have the
relation $t_{2}^{p^{l-t}}=t_{1}^{p^{k_{2}-k_{1}+l-t}}$, hence
$U^{\prime}(t_{2}^{p^{l-t}})U(t_{1}^{p^{k_{2}-k_{1}+l-t}})=p\cdot I_{2}$.
Moreover, when $1\leq t\leq k_{2}-k_{1}$,
$t_{2}^{p^{l-t}}=t_{1}^{p^{k_{2}-k_{1}+l-t}}=0$, hence
$U(t_{2}^{p^{l-t}})=U(0)$.

$\displaystyle X(p^{l})$
$\displaystyle=U^{\prime}(t_{2})U^{\prime}(t_{2}^{p})\cdot\cdot\cdot
U^{\prime}(t_{2}^{p^{k_{2}-1}})U(t_{1}^{p^{k_{1}-1}})\cdot\cdot\cdot
U(t_{1}^{p})U(t_{1})\in\textup{M}_{2}(A_{p^{l}}/(t_{1}^{p^{k_{1}}}-t_{2}^{p^{k_{2}}}));$
$\displaystyle Y(p^{l})$
$\displaystyle=U^{\prime}(t_{1})U^{\prime}(t_{1}^{p})\cdot\cdot\cdot
U^{\prime}(t_{1}^{p^{k_{1}-1}})U(t_{2}^{p^{k_{2}-1}})\cdot\cdot\cdot
U(t_{2}^{p})U(t_{2})\in\textup{M}_{2}(A_{p^{l}}/(t_{1}^{p^{k_{1}}}-t_{2}^{p^{k_{2}}})).$

The proof of the case $k_{1}>k_{2}$ is similar and we get the same formula for
$X(p^{l})$ and $Y(p^{l})$ as above, therefore we conclude that
$t_{1}^{p^{k_{1}}}-t_{2}^{p^{k_{2}}}$ divides $\overline{f}_{x}$ when
$k_{1},k_{2}\geq 0$ and $k_{1}+k_{2}=2k$ by Theorem 6.2.4, hence
$\overline{f}_{x}$ is divisible by the following polynomial,

$(t_{1}-t_{2})^{p^{k}}\cdot\prod\limits_{a=1}^{k}\left((t_{1}-t_{2}^{p^{2a}})(t_{2}-t_{1}^{p^{2a}})\right)^{p^{k-a}}.$

We also know that
$(t_{1}-t_{2})^{p^{k}}\cdot\prod\limits_{a=1}^{k}\left((t_{1}-t_{2}^{p^{2a}})(t_{2}-t_{1}^{p^{2a}})\right)^{p^{k-a}}\equiv(t_{1}t_{2})^{\frac{p^{k}-1}{p-1}}\cdot(t_{2}^{p^{k}}-t_{1}^{p^{k}})$
mod $(t_{1},t_{2})^{p^{k+1}}$, the lemma follows by comparing this formula
with (24).
$\bullet$ When $n=2k+1$ is odd, the recursion formula (23) implies that,

$\displaystyle X(p^{l})$
$\displaystyle=p^{k-l}U^{\prime}(t_{2})U^{\prime}(t_{2}^{p})\cdot\cdot\cdot
U^{\prime}(t_{2}^{p^{l-1}})\begin{pmatrix}0&1\\\
p&0\end{pmatrix}U(t_{1}^{p^{l-1}})\cdot\cdot\cdot U(t_{1}^{p})U(t_{1});$
$\displaystyle Y(p^{l})$
$\displaystyle=p^{k-l}U^{\prime}(t_{1})U^{\prime}(t_{1}^{p})\cdot\cdot\cdot
U^{\prime}(t_{1}^{p^{l-1}})\begin{pmatrix}0&1\\\
p&0\end{pmatrix}U(t_{2}^{p^{l-1}})\cdot\cdot\cdot U(t_{2}^{p})U(t_{2}).$

Let’s assume $k_{1}<k_{2}$. For any $0\leq t\leq l-k_{1}$, we have the
relation $t_{2}^{p^{l-t}}=t_{1}^{p^{k_{2}-k_{1}+l-t}}$, hence
$U^{\prime}(t_{2}^{p^{l-t}})U(t_{1}^{p^{k_{2}-k_{1}+l-t}})=p\cdot I_{2}$.
Moreover, when $1\leq t\leq k_{2}-k_{1}$,
$t_{2}^{p^{l-t}}=t_{1}^{p^{k_{2}-k_{1}+l-t}}=0$, hence
$U(t_{2}^{p^{l-t}})=U(0)$.

$\displaystyle X(p^{l})$
$\displaystyle=U^{\prime}(t_{2})U^{\prime}(t_{2}^{p})\cdot\cdot\cdot
U^{\prime}(t_{2}^{p^{k_{2}-1}})U(t_{1}^{p^{k_{1}-1}})\cdot\cdot\cdot
U(t_{1}^{p})U(t_{1})\in\textup{M}_{2}(A_{p^{l}}/(t_{1}^{p^{k_{1}}}-t_{2}^{p^{k_{2}}}));$
$\displaystyle Y(p^{l})$
$\displaystyle=U^{\prime}(t_{1})U^{\prime}(t_{1}^{p})\cdot\cdot\cdot
U^{\prime}(t_{1}^{p^{k_{1}-1}})U(t_{2}^{p^{k_{2}-1}})\cdot\cdot\cdot
U(t_{2}^{p})U(t_{2})\in\textup{M}_{2}(A_{p^{l}}/(t_{1}^{p^{k_{1}}}-t_{2}^{p^{k_{2}}})).$

therefore we conclude that $t_{1}^{p^{k_{1}}}-t_{2}^{p^{k_{2}}}$ divides
$\overline{f}_{x}$ when $k_{1},k_{2}\geq 0$ and $k_{1}+k_{2}=2k+1$ by Theorem
6.2.4, hence $\overline{f}_{x}$ is divisible by the following polynomial,

$\prod\limits_{a=0}^{k}\left((t_{1}-t_{2}^{p^{2a+1}})(t_{2}-t_{1}^{p^{2a+1}})\right)^{p^{k-a}}.$

We also know that
$\prod\limits_{a=0}^{k}\left((t_{1}-t_{2}^{p^{2a+1}})(t_{2}-t_{1}^{p^{2a+1}})\right)^{p^{k-a}}\equiv(t_{1}t_{2})^{\frac{p^{k+1}-1}{p-1}}$
mod $(t_{1},t_{2})^{p^{k+1}}$, the lemma follows by comparing this formula
with (24). ∎

######  Corollary 6.2.7.

Let $x\in\mathbb{B}$ be an integral nonzero element which has valuation $n\geq
1$. Let $\mathcal{Z}(x)_{p}$ be special fiber of $\mathcal{Z}(x)$, then

$\mathcal{Z}(x)_{p}\simeq\textup{Spf}\,\mathbb{F}[[t_{1},t_{2}]]/\left(\prod\limits_{a+b=n\atop
a,b\geq 0}(t_{1}^{p^{a}}-t_{2}^{p^{b}})\right).$

Let $\mathcal{D}(x)_{p}$ (resp. $\mathcal{N}_{0}(N)_{p}$) be the base change
of $\mathcal{D}(x)$ (resp. $\mathcal{N}_{0}(N)$) to
$\mathbb{F}[[t_{1},t_{2}]]$, then

$\mathcal{N}_{0}(N)_{p}\simeq\mathcal{D}(x)_{p}\simeq\textup{Spf}\,\mathbb{F}[[t_{1},t_{2}]]/\left((t_{1}-t_{2}^{p^{n}})\cdot(t_{2}-t_{1}^{p^{n}})\cdot\prod\limits_{a+b=n\atop
a,b\geq 1}(t_{1}^{p^{a-1}}-t_{2}^{p^{b-1}})^{p-1}\right).$

###### Proof.

The statement for $\mathcal{Z}(x)_{p}$ follows from Theorem 6.2.6. The
statement for $\mathcal{D}(x)_{p}$ follows from the definition of difference
divisors. ∎

######  Remark 6.2.8.

The same formula has been proved in [KM85, Theorem 13.4.6, Theorem 13.4.7] by
a totally different method.

###  6.3. Local arithmetic intersection numbers

Now we give the definition of the local arithmetic intersection numbers.

######  Definition 6.3.1.

For any rank $3$ lattice $L\subset\mathbb{B}$, we choose a
$\mathbb{Z}_{p}$-basis $\\{x_{1},x_{2},x_{3}\\}$ of $L$. Let
$\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{i})}$ be the structure sheaf of the
special cycle $\mathcal{Z}^{\sharp}(x_{i})$. Let $\mathcal{O}_{\mathcal{N}}$
be the structure sheaf of the formal scheme $\mathcal{N}$. Let
$-\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}-$ be the derived tensor
product functor in the derived category of coherent sheaves on $\mathcal{N}$.
Define the local arithmetic intersection number of $L$ on $\mathcal{N}$ to be

$\textup{Int}^{\sharp}(L)=\chi(\mathcal{N},\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{1})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{2})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{3})}).$

This number is finite and independent of the choice of the basis
$\\{x_{i}\\}_{i=1}^{3}$ of $L$ because of the following result.

######  Lemma 6.3.2.

Let $x,y\in\mathbb{B}$ be two linearly independent elements, then the tor
sheaves
$\linebreak\underline{\textup{Tor}}_{i}^{\mathcal{O}_{\mathcal{N}}}(\mathcal{O}_{\mathcal{Z}^{\sharp}(x)},\mathcal{O}_{\mathcal{Z}^{\sharp}(y)})$
vanish for all $i\geq 1$. In particular,

$\mathcal{O}_{\mathcal{Z}^{\sharp}(x)}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(y)}=\mathcal{O}_{\mathcal{Z}^{\sharp}(x)}\otimes_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(y)}.$

Moreover, the same formula holds if $\mathcal{Z}^{\sharp}(x)$ or
$\mathcal{Z}^{\sharp}(y)$ or both are replaced by $\mathcal{D}(x)$ resp.
$\mathcal{D}(y)$.

Let $L\subset\mathbb{B}$ be an integral quadratic lattice of rank 3 over
$\mathbb{Z}_{p}$ with basis $\\{x_{1},x_{2},x_{3}\\}$, then the derived tensor
product
$\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{1})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{2})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{3})}$
is independent of the choice of the basis.

###### Proof.

This is proved in [Ter11, Lemma 4.1, Proposition 4.2]. ∎

Now let’s come to the local arithmetic intersection numbers on
$\mathcal{N}_{0}(N)$. For a fixed $N$-isogeny $x_{0}$ of $\mathbb{X}$, recall
that we have defined the space of quasi-isogenies of $\mathbb{X}$ special to
$x_{0}$ (cf. Definition 5.2.4) to be those $x\in\mathbb{B}$ such that

$x\circ x_{0}^{\vee}+x_{0}\circ x^{\vee}=0.$

Recall that we use $\mathbb{W}$ to denote this space.

######  Definition 6.3.3.

For any rank $2$ lattice $M\subset\mathbb{W}$, we choose a
$\mathbb{Z}_{p}$-basis $\\{x_{1},x_{2}\\}$ of $M$. Let
$\mathcal{O}_{\mathcal{Z}(x_{i})}$ be the structure sheaf of the special cycle
$\mathcal{Z}(x_{i})$. Let $\mathcal{O}_{\mathcal{N}_{0}(N)}$ be the structure
sheaf of the formal scheme $\mathcal{N}_{0}(N)$. Let
$-\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}_{0}(N)}}-$ be the derived
tensor product functor in the derived category of coherent sheaves on
$\mathcal{N}_{0}(N)$. Define the local arithmetic intersection number of $M$
on $\mathcal{N}_{0}(N)$ to be

$\textup{Int}_{\mathcal{N}_{0}(N)}(M)=\chi(\mathcal{N}_{0}(N),\mathcal{O}_{\mathcal{Z}(x_{1})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}_{0}(N)}}\mathcal{O}_{\mathcal{Z}(x_{2})}).$

This number is independent of the choice of the basis $\\{x_{1},x_{2}\\}$ of
$M$ because of Lemma 6.3.2 and Theorem 6.2.3, we will relate it to the
derivative of the local density of the quadratic lattice $M$ with level $N$.
The following theorem is the starting point of our calculation.

######  Theorem 6.3.4.

For any prime number $p$, let $L\subset\mathbb{B}$ be a
$\mathbb{Z}_{p}$-lattice of rank 3, then

$\textup{Int}^{\sharp}(L)=\partial\textup{Den}^{+}(L).$

###### Proof.

In [GK93, $\S$4], the Gross-Keating invariants $(a_{1},a_{2},a_{3})$ of the
rank 3 quadratic lattice $L$ is defined, then the local arithmetic
intersection number $\textup{Int}^{\sharp}(L)$ is computed explicitly in terms
of these invariants (see also [Rap07, Theorem 1.1]). In [Wed07, $\S$2.11], the
local density $\textup{Den}^{+}(X,L)$ is also expressed explicitly in terms of
the Gross-Keating invariants $(a_{1},a_{2},a_{3})$, hence the derived local
density $\partial\textup{Den}^{+}(L)$, the theorem is proved by comparing the
expressions of both sides in terms of $(a_{1},a_{2},a_{3})$ (see [Wed07,
$\S$2.16]). The readers can also see [LZ22] for a recent new proof when $p$ is
odd. ∎

###  6.4. Difference formula of the local arithmetic intersection numbers

Fix a $N$-isogeny $x_{0}\in\textup{End}(\mathbb{X})$, recall that
$\mathbb{W}=\\{x_{0}\\}^{\bot}\rightarrow\mathbb{B}$.

######  Theorem 6.4.1.

For any rank 2 lattice $M\subset\mathbb{W}$, the following identity holds,

$\textup{Int}_{\mathcal{N}_{0}(N)}(M)=\textup{Int}^{\sharp}(M\obot\mathbb{Z}_{p}\cdot
x_{0})-\textup{Int}^{\sharp}(M\obot\mathbb{Z}_{p}\cdot p^{-1}x_{0}).$

###### Proof.

Let $\\{x_{1},x_{2}\\}$ be a basis of $M$. By Lemma 6.3.2 and the isomorphism
$\mathcal{D}(x_{0})\simeq\mathcal{N}_{0}(N)$, we have the following
isomorphism as complexes of coherent sheaves on $\mathcal{N}$,

$\displaystyle\mathcal{O}_{\mathcal{N}_{0}(N)}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{1})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{2})}$
$\displaystyle\simeq\mathcal{O}_{\mathcal{Z}(x_{1})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{2})}$
$\displaystyle\simeq\mathcal{O}_{\mathcal{Z}(x_{1})}\otimes_{\mathcal{O}_{\mathcal{N}_{0}(N)}}^{\mathbb{L}}\mathcal{O}_{\mathcal{D}(x_{0})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{2})}$
$\displaystyle\simeq\mathcal{O}_{\mathcal{Z}(x_{1})}\otimes_{\mathcal{O}_{\mathcal{N}_{0}(N)}}^{\mathbb{L}}\mathcal{O}_{\mathcal{Z}(x_{2})}.$

When $\nu_{p}(N)=0$ or $1$, the difference divisor $\mathcal{D}(x_{0})$ is
just $\mathcal{Z}^{\sharp}(x_{0})$, hence
$\textup{Int}_{\mathcal{N}_{0}(N)}(M)=\textup{Int}^{\sharp}(M\obot\mathbb{Z}_{p}\cdot
x_{0})$ and $\textup{Int}^{\sharp}(M\obot\mathbb{Z}_{p}\cdot p^{-1}x_{0})=0$
since $p^{-1}x_{0}$ is not integral, therefore
$\textup{Int}_{\mathcal{N}_{0}(N)}(M)=\textup{Int}^{\sharp}(M\obot\mathbb{Z}_{p}\cdot
x_{0})-\textup{Int}^{\sharp}(M\obot\mathbb{Z}_{p}\cdot p^{-1}x_{0})$.

When $\nu_{p}(N)\geq 2$, we have the following exact sequence,

$0\longrightarrow\mathcal{O}_{\mathcal{Z}^{\sharp}(p^{-1}x_{0})}\stackrel{{\scriptstyle\times
d_{x_{0}}}}{{\longrightarrow}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{0})}\longrightarrow\mathcal{O}_{\mathcal{D}(x_{0})}\simeq\mathcal{O}_{\mathcal{N}_{0}(N)}\longrightarrow
0.$

Tensoring the above exact sequence with the complex
$\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{1})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{2})}$
in the derived category of coherent sheaves on $\mathcal{N}$, we get an exact
triangle

$\displaystyle\mathcal{O}_{\mathcal{Z}^{\sharp}(p^{-1}x_{0})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{1})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{2})}$
$\displaystyle\rightarrow\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{0})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{1})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{2})}$
$\displaystyle\rightarrow\mathcal{O}_{\mathcal{N}_{0}(N)}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{1})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{2})}\rightarrow,$

hence the following identity,

$\displaystyle\chi(\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{0})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{1})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{2})})$
$\displaystyle=\chi(\mathcal{O}_{\mathcal{Z}^{\sharp}(p^{-1}x_{0})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{1})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{2})})$
$\displaystyle+\chi(\mathcal{O}_{\mathcal{N}_{0}(N)}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{1})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{2})}).$

We already know that
$\mathcal{O}_{\mathcal{N}_{0}(N)}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{1})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{2})}\simeq\mathcal{O}_{\mathcal{Z}(x_{1})}\otimes_{\mathcal{O}_{\mathcal{N}_{0}(N)}}^{\mathbb{L}}\mathcal{O}_{\mathcal{Z}(x_{2})}$
since $\mathcal{N}_{0}(N)\simeq\mathcal{D}(x_{0})$, hence

$\displaystyle\textup{Int}_{\mathcal{N}_{0}(N)}(M)$
$\displaystyle=\chi(\mathcal{O}_{\mathcal{Z}(x_{1})}\otimes_{\mathcal{O}_{\mathcal{D}(x_{0})}}^{\mathbb{L}}\mathcal{O}_{\mathcal{Z}(x_{2})})=\chi(\mathcal{O}_{\mathcal{N}_{0}(N)}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{1})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{2})})$
$\displaystyle=\chi(\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{0})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{1})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{2})})-\chi(\mathcal{O}_{\mathcal{Z}^{\sharp}(p^{-1}x_{0})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{1})}\otimes^{\mathbb{L}}_{\mathcal{O}_{\mathcal{N}}}\mathcal{O}_{\mathcal{Z}^{\sharp}(x_{2})})$
$\displaystyle=\textup{Int}^{\sharp}(M\obot\mathbb{Z}_{p}\cdot
x_{0})-\textup{Int}^{\sharp}(M\obot\mathbb{Z}_{p}\cdot p^{-1}x_{0}).$

∎

##  7\. Difference formula at the analytic side

Let $p$ be a prime number. Let $F$ be a nonarchimedean local field of residue
characteristic $p$, with ring of integers $\mathcal{O}_{F}$, residue field
$\kappa=\mathbb{F}_{q}$ of size $q$, and uniformizer $\pi$.

###  7.1. Primitive decomposition

Let $N\in F$, recall that we use $(\langle N\rangle,q_{\langle N\rangle})$ to
denote the rank 1 quadratic lattice over $\mathcal{O}_{F}$ with a
$\mathcal{O}_{F}$-generator $l_{N}$ such that $q_{\langle N\rangle}(l_{N})=N$,
then $\langle N\rangle$ is an integral quadratic lattice if and only if
$N\in\mathcal{O}_{F}$. Let $n=\nu_{\pi}(N)$, all the rank 1 integral quadratic
lattice $L^{\prime}$ containing $\langle N\rangle$ has the following form,

$L^{\prime}=\pi^{-i}\langle
N\rangle\simeq\langle\pi^{-2i}N\rangle,\,\,\textup{for
$i=0,1,\cdot\cdot\cdot,[\frac{n}{2}]$}.$

Let $H$ be a self-dual quadratic $\mathcal{O}_{F}$-lattice of finite rank.
Since $q_{H}(x)\in\mathcal{O}_{F}$ for every $x\in H$, Lemma 2.2.5 gives the
following decomposition,

$\displaystyle\textup{Rep}_{H,\langle N\rangle}(\mathcal{O}_{F})$
$\displaystyle=\bigsqcup_{i=0}^{[n/2]}\textup{PRep}_{H,\langle\pi^{-2i}N\rangle}(\mathcal{O}_{F}).$

Now for every $0\leq i\leq[\frac{n}{2}]$, we pick an arbitrary
$\phi\in\textup{PRep}_{H,\langle\pi^{-2i}N\rangle}(\mathcal{O}_{F})$ and
consider the following sub-lattice of $H$,

$H(\phi)\coloneqq\\{x\in H:(x,\phi(l_{N}))=0\\}.$

######  Lemma 7.1.1.

The isometric class of the quadratic lattice $H(\phi)$ is independent of the
choice of
$\phi\in\textup{PRep}_{H,\langle\pi^{-2i}N\rangle}(\mathcal{O}_{F})$.

###### Proof.

Let
$\phi^{\prime}\in\textup{PRep}_{H,\langle\pi^{-2i}N\rangle}(\mathcal{O}_{F})$
be another element. The homomorphims $\phi$ and $\phi^{\prime}$ are totally
determined by $x\coloneqq\phi(l_{\pi^{-2i}N})$ and
$x^{\prime}\coloneqq\phi^{\prime}(l_{\pi^{-2i}N})$. The fact that $\phi$ and
$\phi^{\prime}$ are primitive implies that $x\notin\pi\cdot H$ and
$x^{\prime}\notin\pi\cdot H$. Therefore,

$(x,H)=\mathcal{O}_{F},\,\,\,\,\,(x^{\prime},H)=\mathcal{O}_{F}.$

where we use $(\cdot,\cdot)$ to denote the associated bilinear form on $H$.
Since $H$ is self-dual, then by the work of Morin-Strom [Mor79, Theorem 5.3],
there exists $\varphi\in\textup{O}(H)(\mathcal{O}_{F})$ such that
$\varphi(x)=x^{\prime}$. The homomorphism $\varphi$ also induces an isometric
between $H(\phi)$ and $H(\phi^{\prime})$ because $H(\phi)=x^{\bot}\cap H$ and
$H(\phi^{\prime})=x^{\prime\bot}\cap H$. ∎

Let $N\in\mathcal{O}_{F}$ be an element of valuation $n$, for every $0\leq
i\leq[\frac{n}{2}]$ and
$\phi\in\textup{PRep}_{H,\langle\pi^{-2i}N\rangle}(\mathcal{O}_{F})$, we use
$H(N,i)$ to denote the quadratic lattice $H(\phi)$.

######  Example 7.1.2.

Let $N\in\mathcal{O}_{F}$ has valuation $n$. When $k>4$, we have an orthogonal
decomposition,

$H_{k}^{\varepsilon}\simeq H_{4}^{+}\,\obot\,H_{k-4}^{\varepsilon}.$

Recall that the symbol $H_{k}^{\varepsilon}$ is understood in the following
way: when $p$ is odd, $k$ can be any positive integer, and
$\varepsilon\in\\{\pm 1\\}$ is arbitrary; when $p=2$, $k$ is even and
$\varepsilon=+1$. The lattice $\textup{M}_{2}(\mathcal{O}_{F})$ is equipped
with the quadratic form induced by the determinant, it is self-dual and
$\chi_{F}(\textup{M}_{2}(\mathcal{O}_{F}))=1$, hence we can view
$\textup{M}_{2}(\mathcal{O}_{F})$ as a model lattice for $H_{4}^{+}$.

Let’s consider the following element
$\phi\in\textup{PRep}_{H_{k}^{\varepsilon},\langle\pi^{-2i}N\rangle}(\mathcal{O}_{F})$

$\displaystyle\phi_{i}:\langle\pi^{-2i}N\rangle$
$\displaystyle\longrightarrow\textup{M}_{2}(\mathcal{O}_{F})\simeq
H_{4}^{+}\hookrightarrow H_{k}^{\varepsilon},$ $\displaystyle l_{\pi^{-2i}N}$
$\displaystyle\longmapsto\begin{pmatrix}\pi^{-2i}N&0\\\ 0&1\end{pmatrix}.$

the corresponding element in $\textup{Rep}_{H_{k}^{\varepsilon},\langle
N\rangle}(\mathcal{O}_{F})$ sends $l_{N}$ to $\begin{pmatrix}\pi^{-i}N&0\\\
0&\pi^{i}\end{pmatrix}$.

Lemma 7.1.1 implies that the following quadratic lattices are isometric,

$H_{k}^{\varepsilon}(N,i)=H_{k}^{\varepsilon}(\phi_{i})\simeq\phi_{i}(l_{\pi^{-2i}N})^{\bot}\,\obot\,H_{k-4}^{\varepsilon},$

where $\phi_{i}(l_{\pi^{-2i}N})^{\bot}$ is the space of elements in
$\textup{M}_{2}(\mathcal{O}_{F})$ that are orthogonal to
$\phi_{i}(l_{\pi^{-2i}N})$, it can be described explicitly as follows,

$\phi_{i}(l_{\pi^{-2i}N})^{\bot}=\left\\{x=\begin{pmatrix}-\pi^{-2i}Na&b\\\
c&a\end{pmatrix}:\,\,a,b,c\in\mathcal{O}_{F}\right\\}.$

It is exactly the lattice $\delta_{F}(\pi^{-2i}N)$ we defined in Example
2.1.1, therefore
$H_{k}^{\varepsilon}(N,i)\simeq\delta_{F}(\pi^{-2i}N)\,\obot\,H_{k-4}^{\varepsilon}$.

###  7.2. Difference formula of local densities

######  Theorem 7.2.1.

Let $H$ be a self-dual quadratic $\mathcal{O}_{F}$-lattice of finite rank $k$.
Let $M$ be an integral quadratic $\mathcal{O}_{F}$-lattice of finite rank $r$.
Let $N\in\mathcal{O}_{F}$ be an element of valuation $n$, then

$\textup{Den}(H,M\obot\langle
N\rangle)=\sum\limits_{i=0}^{[n/2]}q^{(2-k+r)i}\cdot\textup{Pden}(H,\langle\pi^{-2i}N\rangle)\cdot\textup{Den}(H(N,i),M).$

The proof of this theorem is based on the following lemmas.

######  Lemma 7.2.2.

Let $H$ be a self-dual quadratic $\mathcal{O}_{F}$-lattice. Let
$N\in\mathcal{O}_{F}$ be an element of valuation $n$, then there is a
bijective map $D$ between the following sets when the positive integer $d$ is
large enough,

$D:\textup{Rep}_{H,\langle
N\rangle}(\mathcal{O}_{F}/\pi^{d})\stackrel{{\scriptstyle\sim}}{{\longrightarrow}}\bigsqcup_{i=0}^{[n/2]}\bigsqcup_{\overline{x}\in\mathcal{O}_{F}/\pi^{i}}\,\textup{PRep}_{H,\langle\pi^{-2i}N+\pi^{d-2i}x\rangle}(\mathcal{O}_{F}/\pi^{d-i}).$

###### Proof.

Let $l_{N}$ be a generator of the rank 1 $\mathcal{O}_{F}$-module $\langle
N\rangle$ such that $q_{\langle N\rangle}(l_{N})=N$. Any
$f\in\textup{Rep}_{H,\langle N\rangle}(\mathcal{O}_{F}/\pi^{d})$ is determined
by $f(\overline{l_{N}})\in H/\pi^{d}H$. There is a natural filtration on
$H/\pi^{d}H$ given as follows,

$0\subset\pi^{d-1}H/\pi^{d}H\subset\pi^{d-2}H/\pi^{d}H\subset\cdot\cdot\cdot\subset\pi^{2}H/\pi^{d}H\subset\pi
H/\pi^{d}H\subset H/\pi^{d}H.$

Let $i$ be the minimal integer such that
$f(\overline{l_{N}})\in\pi^{i}H/\pi^{d}H$, then $0\leq i\leq[\frac{n}{2}]$
since $\nu_{\pi}(N)=n$. Then there exists $l\in H$ such that
$f(\overline{l_{N}})=\overline{\pi^{i}l}\in\pi^{i}H/\pi^{d}H$, the image of
$l$ in $H/\pi^{d-i}H$ is uniquely determined by $f$. Let $q$ be the quadratic
form on $H$, then

$N\,\,\textup{mod}\,\,\pi^{d}=\overline{q_{\langle
N\rangle}}(\overline{l_{N}})=\overline{q}(f(\overline{l_{N}}))=\pi^{2i}\overline{q}(\overline{l})=\overline{\pi^{2i}q(l)},$

hence $\overline{\pi^{2i}q(l)}\equiv\pi^{-2i}N\,\,\textup{mod $\pi^{d-2i}$}$.
Therefore there exists $x\in\mathcal{O}_{F}$ such that
$q(l)=\pi^{-2i}N+\pi^{d-2i}x$. Next we show that
$\overline{x}\in\mathcal{O}_{F}/\pi^{i}$ is independent of the choice of $l\in
H$ when $d$ is large enough. Suppose $l^{\prime}$ is another element of $H$
such that $f(\overline{l_{N}})=\overline{\pi^{i}l^{\prime}}$, then there
exists $\delta\in H$ such that $l^{\prime}-l=\pi^{d-i}\delta$. Therefore when
$d$ is large enough,

$q(l^{\prime})=q(l+\pi^{d-i}\delta)=q(l)+\pi^{d-i}(l,\delta)+\pi^{2d-2i}q(\delta)\equiv
q(l)\,\,\textup{mod $\pi^{d-i}$}.$

Suppose $q(l^{\prime})=\pi^{-2i}N+\pi^{d-2i}x^{\prime}$ for some
$x^{\prime}\in\mathcal{O}_{F}$, the above congruence formula between $q(l)$
and $q(l^{\prime})$ implies that $x^{\prime}\equiv x\,\,\textup{mod
$\pi^{i}$}$. The above construction gives the following element $D(f)$ in
$\linebreak\textup{PRep}_{H,\langle\pi^{-2i}N+\pi^{d-2i}x\rangle}(\mathcal{O}_{F}/\pi^{d-i})$:
the homomrphism $D(f)$ sends the generator
$\overline{l_{\pi^{-2i}N+\pi^{d-2i}x}}$ of
$\linebreak\langle\pi^{-2i}N+\pi^{d-2i}x\rangle/\pi^{d-i}\langle\pi^{-2i}N+\pi^{d-2i}x\rangle$
to $\overline{l}\in H/\pi^{d-i}H$.

Now for any element
$\varphi\in\textup{PRep}_{H,\langle\pi^{-2i}N+\pi^{d-2i}x\rangle}(\mathcal{O}_{F}/\pi^{d-i})$,
we consider the following morphism,

$\displaystyle\tilde{\varphi}:\langle N\rangle/\pi^{d}\langle N\rangle$
$\displaystyle\longrightarrow H/\pi^{d}H,$ $\displaystyle\overline{l_{N}}$
$\displaystyle\longmapsto\pi^{i}\varphi(\overline{l_{\pi^{-2i}N+\pi^{d-2i}x}}).$

then $\tilde{\varphi}\in\textup{Rep}_{H,\langle
N\rangle}(\mathcal{O}_{F}/\pi^{d})$ because
$\overline{q}(\tilde{\varphi}(\overline{l_{N}}))=\overline{\pi^{2i}(\pi^{-2i}N+\pi^{d-2i}x)}=N\,\,\textup{mod
$\pi^{d}$}$. This construction gives the inverse map of $D$. ∎

Let $M$ be an integral quadratic $\mathcal{O}_{F}$-lattice of finite rank. Let
$N\in\mathcal{O}_{F}$ be an element of valuation $n$. Let
$M^{\sharp}=M\obot\langle N\rangle$ be a quadratic $\mathcal{O}_{F}$-lattice
of 1 rank higher than $M$, there is a natural restriction map as follows for
any positive integer $d$ and any self-dual quadratic $\mathcal{O}_{F}$-lattice
$H$,

$r:\textup{Rep}_{H,M^{\sharp}}(\mathcal{O}_{F}/\pi^{d})\rightarrow\textup{Rep}_{H,\langle
N\rangle}(\mathcal{O}_{F}/\pi^{d}),$

given by composing any element in the set
$\textup{Rep}_{H,M^{\sharp}}(\mathcal{O}_{F}/\pi^{d})$ with the natural
inclusion $\langle N\rangle/\pi^{d}\langle N\rangle\hookrightarrow
M^{\sharp}/\pi^{d}M^{\sharp}$. The next lemma describes the fiber of the map
$D\circ r$.

######  Lemma 7.2.3.

Let $H$ be a self-dual quadratic $\mathcal{O}_{F}$-lattice. Let $M$ be an
integral quadratic $\mathcal{O}_{F}$-lattice of finite rank $r$. Let
$N\in\mathcal{O}_{F}$ be an element of valuation $n$. Let
$M^{\sharp}=M\obot\langle N\rangle$ be a quadratic $\mathcal{O}_{F}$-lattice
of rank $r+1$. Let $0\leq i\leq[\frac{n}{2}]$ be an integer. Let
$\varphi\in\textup{PRep}_{H,\langle\pi^{-2i}N+\pi^{d-2i}x\rangle}(\mathcal{O}_{F}/\pi^{d-i})$,
then for $d$ large enough,

$\\#(D\circ
r)^{-1}(\varphi)=q^{ir}\cdot\\#\textup{Rep}_{H(N,i),M}(\mathcal{O}_{F}/\pi^{d}).$

###### Proof.

Let $f$ be an element in
$\textup{Rep}_{H,M^{\sharp}}(\mathcal{O}_{F}/\pi^{d})$ such that $D\circ
r(f)=\varphi$, by the proof of Lemma 7.2.2, there exists $l_{N}^{\prime}\in
H\backslash\pi H$ such that
$f(\overline{l_{N}})=\overline{\pi^{i}l^{\prime}_{N}}$, and
$q(l_{N}^{\prime})=\pi^{-2i}N$ when $d$ is large enough.

Let $\\{e_{i}\\}_{i=1}^{r}$ be an $\mathcal{O}_{F}$-basis of $M$, then $f$ is
determined by $\\{x_{i}\coloneqq f(\overline{e_{i}})\in
H/\pi^{d}H\\}_{i=1}^{r}$. Therefore $(D\circ r)^{-1}(\varphi)$ can be
described by the following set,

(25) $\displaystyle(D\circ
r)^{-1}(\varphi)=\big{\\{}(x_{1},\cdot\cdot\cdot,x_{r})\in(H/\pi^{d}H)^{r}:(x_{i},\overline{\pi^{i}l^{\prime}_{N}})=0$
$\displaystyle,\,\,(x_{i},x_{j})=(\overline{e_{i}},\overline{e_{j}})\,\,\text{for
$i\neq j$,}$
$\displaystyle\text{and\,\,\,}\overline{q}(x_{i})=\overline{q_{M}}(\overline{e_{i}})\,\,\text{for
every $i$.}\big{\\}}.$

Let $L$ be the rank 1 sub-lattice of $H$ generated by $l_{N}^{\prime}$. We
have the following exact sequence,

$0\longrightarrow L\oplus
H(N,i)\stackrel{{\scriptstyle\theta}}{{\longrightarrow}}H\longrightarrow
Q\coloneqq H/L\oplus H(N,i)\longrightarrow 0.$

where $\theta$ is the natural inclusion map. After tensoring the above exact
sequence with $\mathcal{O}_{F}/\pi^{d}$, we get the following exact sequence
by the flatness of $H$ over $\mathcal{O}_{F}$,

(26)
$0\longrightarrow\textup{Tor}_{\mathcal{O}_{F}}^{1}(Q,\mathcal{O}_{F}/\pi^{d})\longrightarrow
L/\pi^{d}L\,\oplus\,H(N,i)/\pi^{d}H(N,i)\stackrel{{\scriptstyle\overline{\theta}}}{{\longrightarrow}}H/\pi^{d}H\longrightarrow
Q/\pi^{d}Q\longrightarrow 0.$

Claim: Let $K=\left\\{x\in
H/\pi^{d}H:(x,\overline{\pi^{i}l^{\prime}_{N}})=0\right\\}$. When $d$ is large
enough, for every $\overline{x}\in K$, there exists $x^{\prime}\in L$ and
$x^{\prime\prime}\in H(N,i)$ such that the image of
$\overline{x^{\prime}}+\overline{x^{\prime\prime}}\in
L/\pi^{d}L\,\oplus\,H(N,i)/\pi^{d}H(N,i)$ under $\overline{\theta}$ in
$H/\pi^{d}H$ is $\overline{x}$.

Proof of the claim: We have the following decomposition in the quadratic space
$V=H\otimes_{\mathcal{O}_{F}}F$,

$x=x^{\prime}+x^{\prime\prime},$

where $x^{\prime}\in L_{F}\coloneqq L\otimes_{\mathcal{O}_{F}}F$ and
$x^{\prime\prime}\in(L_{F})^{\bot}\subset V$.

The fact that $\overline{x}\in K$ implies that
$(x^{\prime},l_{N})=(x,l_{N})\in(\pi^{d})$, therefore
$x^{\prime}\in(\pi^{d-n})\cdot l_{N}\in L_{F}$. It turns out that
$x^{\prime}\in L\subset H$ when $d$ is large enough, hence
$x^{\prime}=x-x^{\prime}\in H\cap\\{l_{N}\\}^{\bot}=H(N,i)$.

We get the following description of the inverse image of the set $(D\circ
r)^{-1}(\varphi)$ under
$\Theta\coloneqq\overline{\theta}\times\cdot\cdot\cdot\times\overline{\theta}$
by (25)

(27) $\Theta^{-1}((D\circ
r)^{-1}(\varphi))=(\pi^{d+i-n}L/\pi^{d}L)^{r}\times\textup{Rep}_{H(N,i),M}(\mathcal{O}_{F}/\pi^{d}).$

and the claim implies that the map $\Theta^{-1}((D\circ
r)^{-1}(\varphi))\stackrel{{\scriptstyle\Theta}}{{\longrightarrow}}(D\circ
r)^{-1}(\varphi)$ is surjective.

Now we compute $\\#\textup{ker}(\Theta)$, which equlas
$(\\#\textup{ker}(\theta))^{r}$ by definition. By the exact sequence (26),
$\\#\textup{ker}(\overline{\theta})=\\#\textup{Tor}_{\mathcal{O}_{F}}^{1}(Q,\mathcal{O}_{F}/\pi^{d})=\\#Q/\pi^{d}Q$.
Therefore when $d$ is large enough, $Q/\pi^{d}Q=Q$. Since
$l_{N}^{\prime}\notin\pi H$, there exists $y\in H$ such that
$(l_{N}^{\prime},y)=1$. The existence of $y$ implies the following exact
sequence,

$\displaystyle 0\longrightarrow
H(N,i)\stackrel{{\scriptstyle\theta}}{{\longrightarrow}}H$
$\displaystyle\longrightarrow L^{\vee}\longrightarrow 0,$ $\displaystyle x$
$\displaystyle\longmapsto l(x):v\in L\mapsto(x,v).$

Therefore $H\simeq L^{\vee}\oplus H(N,i)$ as $\mathcal{O}_{F}$-modules, and
$Q\simeq L^{\vee}/L\simeq\pi^{2i-n}L/L$. Then by (27)

$\\#(D\circ
r)^{-1}(\varphi)=\frac{q^{r(n-i)}}{q^{r(n-2i)}}\cdot\\#\textup{Rep}_{H(N,i),M}(\mathcal{O}_{F}/\pi^{d})=q^{ir}\cdot\\#\textup{Rep}_{H(N,i),M}(\mathcal{O}_{F}/\pi^{d}).$

∎

Proof of Theorem 7.2.1: By Lemma 7.2.2 and Lemma 7.2.3, we only need to know
the size of the set
$\textup{PRep}_{H,\langle\pi^{-2i}N+\pi^{d-2i}x\rangle}(\mathcal{O}_{F}/\pi^{d-i})$
when $x\in\mathcal{O}_{F}$. We first show that when $d$ is large enough, the
following identity holds for any $x\in\mathcal{O}_{F}$,

$\\#\textup{PRep}_{H,\langle\pi^{-2i}N+\pi^{d-2i}x\rangle}(\mathcal{O}_{F}/\pi^{d-i})=\\#\textup{PRep}_{H,\langle\pi^{-2i}N\rangle}(\mathcal{O}_{F}/\pi^{d-i}).$

Because when $d$ is large enough, for any $x\in\mathcal{O}_{F}$, we could find
$c_{x}\in\mathcal{O}_{F}^{\times}$ such that $c_{x}^{-2}=1+\pi^{d}N^{-1}x$ mod
$\pi^{d-i}$, then for any element
$l\in\textup{PRep}_{H,\langle\pi^{-2i}N+\pi^{d-2i}x\rangle}(\mathcal{O}_{F}/\pi^{d-i})$,
$c_{x}\cdot
l\in\textup{PRep}_{H,\langle\pi^{-2i}N\rangle}(\mathcal{O}_{F}/\pi^{d-i})$.
Let $M^{\sharp}=M\obot\langle N\rangle$, we have

$\displaystyle\textup{Den}(H,M\obot\langle N\rangle)$
$\displaystyle=\lim\limits_{d\rightarrow\infty}\frac{\\#\textup{Rep}_{H,M^{\sharp}}(\mathcal{O}_{F}/\pi^{d})}{q^{d(k(r+1)-(r+1)(r+2)/2)}}$
$\displaystyle=\lim\limits_{d\rightarrow\infty}\sum\limits_{i=0}^{[n/2]}q^{i}\cdot\frac{\\#\textup{PRep}_{H,\langle\pi^{-2i}N\rangle}(\mathcal{O}_{F}/\pi^{d-i})}{q^{(d-i)(k-1)}}\cdot\frac{q^{ir}}{q^{i(k-1)}}\cdot\frac{\\#\textup{Rep}_{H(N,i),M}(\mathcal{O}_{F}/\pi^{d})}{q^{d((k-1)r-r(r+1)/2)}}$
$\displaystyle=\sum\limits_{i=0}^{[n/2]}q^{(2-k+r)i}\cdot\textup{Pden}(H,\langle\pi^{-2i}N\rangle)\cdot\textup{Den}(H(N,i),M).$

$\hfill\qed$

######  Remark 7.2.4.

When $p$ odd, it has been calculated explicitly that for any
$N\in\mathcal{O}_{F}$ (cf. [LZ22, (3.3.2.1)]),

(28) $\textup{Pden}(H_{k}^{\varepsilon},\langle
N\rangle)=\begin{cases}1-q^{1-k},&\textup{when $k$ is odd and $\pi\,|\,N$;}\\\
1+\varepsilon\chi_{F}(N)q^{(1-k)/2},&\textup{when $k$ is odd and $\pi\nmid
N$;}\\\ (1-\varepsilon q^{-k/2})(1+\varepsilon q^{1-k/2}),&\textup{when $k$ is
even and $\pi\,|\,N$;}\\\ 1-\varepsilon q^{-k/2},&\textup{when $k$ is even and
$\pi\nmid N$.}\end{cases}$

When $p=2$, the same formula makes sense and holds true only in the case that
$k$ is even and $\varepsilon=+1$.

######  Definition 7.2.5.

Let $M$ be a quadratic lattice of rank $r$ over $\mathcal{O}_{F}$. Let
$N\in\mathcal{O}_{F}$. When $p$ is odd, we define the local density of $M$
with level $N$ to be a polynomial
$\textup{Den}^{\varepsilon}_{\Delta(N)}(X,M)$ satisfying

$\textup{Den}^{\varepsilon}_{\Delta(N)}(X,M)\,\big{|}_{X=q^{-m}}=\left\\{\begin{aligned}
&\frac{\textup{Den}(\delta_{F}(N)\obot
H_{2m+r-2}^{\varepsilon},M)}{\textup{Nor}^{\varepsilon}(q^{-m},r-1)},&\textup{When
$\pi\,|\,N$};\\\ &\frac{\textup{Den}(\delta_{F}(N)\obot
H_{2m+r-2}^{\varepsilon},M)}{\textup{Nor}^{\varepsilon\chi_{F}(N)}(q^{-m},r)},&\textup{When
$\pi\nmid N$}.\end{aligned}\right.$

for $m\geq 0$. When $p=2$, $r$ is even and $\varepsilon=+1$, the local density
of $M$ with level $N$ is the polynomial $\textup{Den}^{+}_{\Delta(N)}(X,M)$
with the same evaluation formula at $X=q^{-m}$ ($m\geq 0$) as above.

We define the derived local density of $M$ with level $N$ to be

$\partial\textup{Den}^{\varepsilon}_{\Delta(N)}(M)=-\frac{\textup{d}}{\textup{d}X}\bigg{|}_{X=1}\textup{Den}^{\varepsilon}_{\Delta(N)}(X,M).$

######  Theorem 7.2.6.

Let $M$ be a quadratic $\mathcal{O}_{F}$-lattice of finite rank $r$. Let
$N\in\mathcal{O}_{F}$, then when $p$ is odd,

$\textup{Den}^{\varepsilon}_{\Delta(N)}(X,M)=\textup{Den}^{\varepsilon}(X,M\obot\langle
N\rangle)-X^{2}\cdot\textup{Den}^{\varepsilon}(X,M\obot\langle\pi^{-2}N\rangle).$

When $p=2$ and $r$ is even, the same formula for $\varepsilon=+1$ holds.

Moreover, if $M\obot\langle N\rangle$ can’t be isometrically embedded into the
quadratic space $H_{r+2}^{\varepsilon}\otimes_{\mathcal{O}_{F}}F$, then

$\partial\textup{Den}^{\varepsilon}_{\Delta(N)}(M)=\partial\textup{Den}^{\varepsilon}(M\obot\langle
N\rangle)-\partial\textup{Den}^{\varepsilon}(M\obot\langle\pi^{-2}N\rangle).$

When $p=2$ and $r$ is even, the same formula for $\varepsilon=+1$ holds.

###### Proof.

Recall the definition of the polynomial $\textup{Nor}^{\varepsilon}(X,n)$ in
Definition 2.2.6, we can verify immediately by formula (28) that, for any
$x\in\mathcal{O}_{F}$,

$\displaystyle\textup{Nor}^{\varepsilon}(q^{-m},r+1)$
$\displaystyle=\textup{Pden}(H_{2m+r+2}^{\varepsilon},\langle
x\rangle)\cdot\textup{Nor}^{\varepsilon\chi_{F}(x)}(q^{-m},r),\,\,\,\text{when
$\pi\nmid x$;}$ $\displaystyle\textup{Nor}^{\varepsilon}(q^{-m},r+1)$
$\displaystyle=\textup{Pden}(H_{2m+r+2}^{\varepsilon},\langle
x\rangle)\cdot\textup{Nor}^{\varepsilon}(q^{-m},r-1),\,\,\,\text{when
$\pi\,|\,x$.}$

Note that when $p=2$, the above formulas only make sense for $r$ is even and
$\varepsilon=+1$. Let $n=\nu_{\pi}(N)$, Theorem 7.2.1 and Example 7.1.2 imply
the following decomposition,

$\displaystyle\textup{Den}(H_{2m+r+2}^{\varepsilon},M\obot\langle N\rangle)$
$\displaystyle=\sum\limits_{i=0}^{[n/2]}q^{-2mi}\cdot\textup{Pden}(H_{2m+r+2}^{\varepsilon},\langle\pi^{-2i}N\rangle)\cdot\textup{Den}(H_{2m+r+2}^{\varepsilon}(N,i),M)$
$\displaystyle=\sum\limits_{i=0}^{[n/2]}q^{-2mi}\cdot\textup{Pden}(H_{2m+r+2}^{\varepsilon},\langle\pi^{-2i}N\rangle)\cdot\textup{Den}(\delta_{F}(\pi^{-2i}N)\obot
H_{2m+r-2}^{\varepsilon},M).$

By Definition 7.2.5, when $p$ is odd, the following formula holds

(29) $\textup{Den}^{\varepsilon}(X,M\obot\langle
N\rangle)=\sum\limits_{i=0}^{[n/2]}X^{2i}\cdot\textup{Den}^{\varepsilon}_{\Delta(\pi^{-2i}N)}(X,M).$

when $p=2$ and $r$ is even, formula (29) for $\varepsilon=+1$ holds.

When $n=0$ or $1$, $\textup{Den}^{\varepsilon}(X,M\obot\langle
N\rangle)=\textup{Den}^{\varepsilon}_{\Delta(N)}(X,M)$ and
$\textup{Den}^{\varepsilon}(X,M\obot\langle\pi^{-2}N\rangle)=0$ since
$\pi^{-2}N$ is not in $\mathcal{O}_{F}$, therefore
$\textup{Den}_{\Delta(N)}^{\varepsilon}(X,M)=\textup{Den}^{\varepsilon}(X,M\obot\langle
N\rangle)-X^{2}\cdot\textup{Den}^{\varepsilon}(X,M\obot\langle\pi^{-2}N\rangle)$.
When $n\geq 2$,
$\textup{Den}_{\Delta(N)}^{\varepsilon}(X,M)=\textup{Den}^{\varepsilon}(X,M\obot\langle
N\rangle)-X^{2}\cdot\textup{Den}^{\varepsilon}(X,M\obot\langle\pi^{-2}N\rangle)$
follows from the formula (29).

The fact that the lattice $M\obot\langle N\rangle$ can’t be isometrically
embedded into the quadratic space
$H_{r+2}^{\varepsilon}\otimes_{\mathcal{O}_{F}}F$ implies that
$\textup{Den}^{\varepsilon}(1,M\obot\langle
N\rangle)=\textup{Den}^{\varepsilon}(1,M\obot\langle\pi^{-2}N\rangle)=0$, the
second formula in the theorem follows from the first one and the definitions
of the symbols $\partial\textup{Den}^{\varepsilon}_{\Delta(N)}$ and
$\partial\textup{Den}^{\varepsilon}$. ∎

Now we apply Theorem 7.2.6 to the case that we are interested, i.e.,
$F=\mathbb{Q}_{p}$, $\epsilon=+1$ and $r=2$, Let $N\in\mathbb{Z}_{p}$, we get
the following difference formula of local density functions,

(30) $\textup{Den}^{+}_{\Delta(N)}(X,M)=\textup{Den}^{+}(X,M\obot\langle
N\rangle)-X^{2}\cdot\textup{Den}^{+}(X,M\obot\langle p^{-2}N\rangle).$

Note that the lattice $M\obot\langle N\rangle$ is a sub-lattice of
$\mathbb{B}\simeq\textup{End}^{0}(\mathbb{X})$ which is the unique division
quaternion algebra over $\mathbb{Q}_{p}$, hence the lattice $M\obot\langle
N\rangle$ can’t be isometrically embedded into the quadratic space
$H_{4}^{+}\otimes\mathbb{Q}_{p}\simeq\textup{M}_{2}(\mathbb{Q}_{p})$,
therefore Theorem 7.2.6 implies the following difference formula of the
derivatives of local densities,

(31)
$\partial\textup{Den}_{\Delta(N)}^{+}(M)=\partial\textup{Den}^{+}(M\obot\langle
N\rangle)-\partial\textup{Den}^{+}(M\obot\langle p^{-2}N\rangle).$

###  7.3. Induction formula

In this section, we assume $p$ is odd. Let $N_{k}=\pi^{2k}N_{0}$ where
$N_{0}\in\mathcal{O}_{F}$ has valuation 0 or 1. Next we show that when $k$ is
sufficiently large, $\textup{Den}^{\varepsilon}_{\Delta(N_{k})}(X,M)$ is
independent of $k$, i.e., it will become a constant polynomial.

######  Proposition 7.3.1.

Let $M$ be a quadratic lattice of rank $r\geq 2$ over $\mathcal{O}_{F}$ which
is $\textup{GL}_{2}(\mathcal{O}_{F})$-equivalent to
$\textup{diag}\\{\varepsilon_{1}\pi^{a_{1}},\varepsilon_{2}\pi^{a_{2}},\cdot\cdot\cdot,\varepsilon_{r}\pi^{r}\\}$,
where $\varepsilon_{i}\in\mathcal{O}_{F}^{\times}$, $a_{i}\in\mathbb{N}$ and
$a_{1}\leq a_{2}\leq\cdot\cdot\cdot\leq a_{r}$. Let $N_{k}=\pi^{2k}N_{0}$
where $N_{0}\in\mathcal{O}_{F}$ has valuation 0 or 1. Then when
$k>\frac{a_{r}-\nu_{\pi}(N_{0})}{2}$,

$\textup{Den}^{\varepsilon}_{\Delta(N_{k})}(X,M)=(1-\varepsilon\chi_{F}(M)X)^{-1}(1-X^{2})\cdot\textup{Den}^{\flat\varepsilon}(X,M).$

Moreover, if $M\obot\langle N_{0}\rangle$ can’t be isometrically embedded into
the quadratic space $H_{r+2}^{\varepsilon}\otimes_{\mathcal{O}_{F}}F$, then

$\partial\textup{Den}^{\varepsilon}_{\Delta(N_{k})}(M)=\begin{cases}-\varepsilon\chi_{F}(M)\cdot\textup{Den}^{\flat\varepsilon}(1,M),&\textup{if
$\chi_{F}(M)\neq 0$;}\\\
2\cdot\textup{Den}^{\flat\varepsilon}(1,M),&\textup{if $\chi_{F}(M)=0$.}\\\
\end{cases}$

###### Proof.

Proposition 7.2.6 implies that for any $k\geq 1$,

$\textup{Den}^{\varepsilon}(X,M\obot\langle
N_{k}\rangle)-X^{2}\cdot\textup{Den}^{\varepsilon}(X,M\obot\langle
N_{k-1}\rangle)=\textup{Den}^{\varepsilon}_{\Delta(N_{k})}(X,M).$

Lemma 2.2.8 implies the following induction formula for
$k>\frac{a_{r}-\nu_{\pi}(N_{0})}{2}$,

$\textup{Den}^{\varepsilon}(X,M\obot\langle
N_{k}\rangle)-X^{2}\cdot\textup{Den}^{\varepsilon}(X,M\obot\langle
N_{k-1}\rangle)=(1-\varepsilon\chi_{F}(M)X)^{-1}(1-X^{2})\cdot\textup{Den}^{\flat\varepsilon}(X,M).$

therefore we obtain the first formula, the second formula follows from the
first one by applying $-\frac{\textup{d}}{\textup{d}X}\big{|}_{X=1}$. ∎

###  7.4. Examples

In this section, we assume $p$ is odd. We will compare our formulas with known
formulas given in [Wed07] and [SSY22].

######  Example 7.4.1.

When $\nu_{p}(N)=1$, the above formula implies that
$\textup{Den}^{+}(X,M\obot\langle N\rangle)=$
$\linebreak\textup{Den}^{+}_{\Delta(N)}(X,M)$, suppose
$M\hookrightarrow\mathbb{W}$ is $\textup{GL}_{2}(\mathbb{Z}_{p})$-equivalent
to the matrix $\textup{diag}\\{\varepsilon_{1}p^{a},\varepsilon_{2}p^{b}\\}$
where $\varepsilon_{1},\varepsilon_{2}\in\mathbb{Z}_{p}^{\times}$ and $1\leq
a\leq b$.
$\bullet$ When $a$ is even, by [Wed07, $\S$2.11],

$\displaystyle\textup{Den}^{+}(X,M\obot\langle
N\rangle)=\sum\limits_{i=0}^{a/2}p^{i}X^{2i}+\sum\limits_{i=1}^{a/2}p^{i}X^{2i-1}-\sum\limits_{i=0}^{a/2}p^{i}X^{a+b+1-2i}-\sum\limits_{i=1}^{a/2}p^{i}X^{a+b+2-2i}.$

we compare this formula with the formula appeared in [SSY22, Proposition 3.6],
it computes $\textup{Den}^{+}_{\Delta(N)}(X,M)$ in the following way,

$\textup{Den}^{+}_{\Delta(N)}(X,M)=\frac{\alpha_{p}(X,M,\delta_{p}(N))}{1-p^{-1}X},$

where
$\alpha_{p}(X,M,\delta_{p}(N))=X^{-2}(p\cdot\alpha(X)+(X-p)(R_{1}(X)+1+p^{-1}X))$,
and

$\alpha(X)=(1-p^{-2}X^{2})\left(\sum\limits_{i=0}^{a/2}p^{i}(X^{2i}-X^{a+b+2-2i})\right),\,\,\,R_{1}(X)=-1-p^{a/2}X^{b+2}+(1+p^{-1}X^{2})\sum\limits_{i=0}^{a/2}p^{i}X^{2i},$

then

$\displaystyle\frac{\alpha_{p}(X,M,\delta_{p}(N))}{1-p^{-1}X}$
$\displaystyle=pX^{-2}\left((1+p^{-1}X)\left(\sum\limits_{i=0}^{a/2}p^{i}(X^{2i}-X^{a+b+2-2i})\right)-p^{-1}X+p^{a/2}X^{b+2}-(1-p^{-1}X^{2})\sum\limits_{i=0}^{a/2}p^{i}X^{2i}\right)$
$\displaystyle=(pX^{-2}+X^{-1})\left(\sum\limits_{i=0}^{a/2}p^{i}(X^{2i}-X^{a+b+2-2i})\right)-X^{-1}+p^{a/2+1}X^{b}+(1-pX^{-2})\sum\limits_{i=0}^{a/2}p^{i}X^{2i}$
$\displaystyle=\sum\limits_{i=0}^{a/2}p^{i+1}X^{2i-2}+\sum\limits_{i=0}^{a/2}p^{i}X^{2i-1}-\sum\limits_{i=0}^{a/2}p^{i+1}X^{a+b-2i}-\sum\limits_{i=0}^{a/2}p^{i}X^{a+b+1-2i}+\sum\limits_{i=0}^{a/2}p^{i}X^{2i}$
$\displaystyle-\sum\limits_{i=0}^{a/2}p^{i+1}X^{2i-2}+p^{a/2+1}X^{b}-X^{-1}=\textup{Den}^{+}(X,M\obot\langle
N\rangle).$

$\bullet$ When $a$ is odd, again by [Wed07, $\S$2.11] (note that $b$ must be
even since $M$ is anisotropic),

$\displaystyle\textup{Den}^{+}(X,M\obot\langle N\rangle)=$
$\displaystyle\sum\limits_{i=0}^{(a-1)/2}p^{i}X^{2i}+\sum\limits_{i=1}^{(a-1)/2}p^{i}X^{2i-1}-\sum\limits_{i=0}^{(a-1)/2}p^{i}X^{a+b+1-2i}$
$\displaystyle-\sum\limits_{i=1}^{(a-1)/2}p^{i}X^{a+b+2-2i}-p^{(a+1)/2}(X^{b+1}-X^{a}).$

we also compare this with the formula appeared in [SSY22, Proposition 3.6], it
computes $\textup{Den}^{+}_{\Delta(N)}(X,M)$ in the following way,

$\textup{Den}_{\Delta(N)}^{+}(X,M)=\frac{\alpha_{p}(X,M,\delta_{p}(N))}{1-p^{-1}X}.$

where
$\alpha_{p}(X,M,\delta_{p}(N))=X^{-2}(p\cdot\alpha(X)+(X-p)(R_{1}(X)+1+p^{-1}X))$,
and

$\displaystyle\alpha(X)$
$\displaystyle=(1-p^{-2}X^{2})\left(\sum\limits_{i=0}^{(a-1)/2}p^{i}(X^{2i}-X^{a+b+2-2i})+p^{(a+1)/2}\sum\limits_{i=a+1}^{b+1}(-X)^{k}\right),$
$\displaystyle R_{1}(X)$
$\displaystyle=(1-p^{-2})\sum\limits_{i=1}^{(a+1)/2}p^{i}X^{2i}+p^{(a+1)/2}(1+p^{-1}X)\sum\limits_{i=a+2}^{b+1}(-X)^{k}.$

then

$\displaystyle\frac{\alpha_{p}(X,M,\delta_{p}(N))}{1-p^{-1}X}=(pX^{-2}+X^{-1})\left(\sum\limits_{i=0}^{(a-1)/2}p^{i}(X^{2i}-X^{a+b+2-2i})+p^{(a+1)/2}\sum\limits_{i=a+1}^{b+1}(-X)^{k}\right)$
$\displaystyle-(pX^{-2}-p^{-1}X^{-2})\sum\limits_{i=1}^{(a+1)/2}p^{i}X^{2i}-p^{(a+3)/2}(1+p^{-1}X)\sum\limits_{i=a+2}^{b+1}(-X)^{k-2}-pX^{-2}-X^{-1}$
$\displaystyle=\sum\limits_{i=1}^{(a+1)/2}p^{i}X^{2i-4}+\sum\limits_{i=0}^{(a-1)/2}p^{i}X^{2i-1}-\sum\limits_{i=1}^{(a+1)/2}p^{i}X^{a+b+2-2i}-\sum\limits_{i=0}^{(a-1)/2}p^{i}X^{a+b+1-2i}$
$\displaystyle-\sum\limits_{i=2}^{(a+3)/2}p^{i}X^{2i-4}+\sum\limits_{i=0}^{(a-1)/2}p^{i}X^{2i}-pX^{-2}-X^{-1}+p^{(a+3)/2}X^{a-1}+p^{(a+1)/2}X^{a}$
$\displaystyle=\textup{Den}^{+}(X,M\obot\langle N\rangle).$

therefore we see that our computation result of
$\textup{Den}^{+}_{\Delta(N)}(X,M)$ coincides with the computation in [SSY22],
but our method is different: we embed $M$ and $\delta_{p}(N)$ into a higher
rank self-dual quadratic lattice and do all the computations in the self-dual
lattice.

######  Example 7.4.2.

We give examples for higher $n$ when $M\hookrightarrow\mathbb{W}$ is
$\textup{GL}_{2}(\mathbb{Z}_{p})$-equivalent to the matrix
$\textup{diag}\\{\varepsilon_{1}p,\varepsilon_{2}p^{2}\\}$ where
$\varepsilon_{1},\varepsilon_{2}\in\mathbb{Z}_{p}^{\times}$. Let
$N_{k}=p^{2k}N_{0}$ where $N_{0}$ is a positive integer with
$\nu_{p}(N_{0})=0$ or $1$ and $k\geq 1$ is an integer. By the formula in
[Wed07, $\S$2.11], $\textup{Den}^{+}(X,M\obot\langle N_{0}\rangle)=1-X^{3}$
when $\nu_{p}(N_{0})=0$, $\textup{Den}^{+}(X,M\obot\langle N_{0}\rangle)=1+pX-
pX^{3}-X^{4}$ when $\nu_{p}(N_{0})=1$, and

$\textup{Den}^{+}(X,M\obot\langle
N_{k}\rangle)=1+pX+pX^{2}-pX^{2k+1+\nu_{p}(N_{0})}-pX^{2k+2+\nu_{p}(N_{0})}-X^{2k+3+\nu_{p}(N_{0})},\,\,\,\textup{when
$k\geq 1$.}$

therefore we get

$\textup{Den}^{+}_{\Delta(N_{k})}(X,M)=1+pX+(p-1)X^{2}-pX^{3}-pX^{4}.$

when $k\geq 1$, and
$\textup{Den}^{+}_{\Delta(N_{0})}(X,M)=\textup{Den}^{+}(X,M\obot\langle
N_{0}\rangle)=1-X^{3}$ or $1+pX-pX^{3}-X^{4}$ depending on $\nu_{p}(N_{0})=0$
or $1$.

Therefore $\partial\textup{Den}^{+}_{\Delta(N_{0})}(M)=3$ or $2p+4$ depending
on $\nu_{p}(N_{0})=0$ or $1$, and

$\partial\textup{Den}^{+}_{\Delta(N_{k})}(M)=-\frac{\textup{d}}{\textup{d}X}\bigg{|}_{X=1}\textup{Den}^{+}_{\Delta(N_{k})}(X,M)=4p+2.$

when $k\geq 1$.

We will double check our results by comparing it with the formulas of local
density given in [Yn98, Theorem 7.1]. The theorem implies that for
sufficiently large positive integer $m$,

$\textup{Den}(\delta_{p}(N_{k})\obot
H_{2m}^{+},M)=1+R_{1,k}(X)+R_{2,k}(X)\,\big{|}_{X=p^{-m}},$

where $R_{1,k}(X)=\sum\limits_{i=1}^{8}I_{1,i,k}(X)$ and
$R_{2,k}(X)=(1-p^{-1})\sum\limits_{i=1}^{8}I_{2,i,k}(X)+p^{-1}I_{2,6,k}(X)$.
$I_{1,i,k}(X)$ and $I_{2,i,k}(X)$ are explicitly constructed polynomials in
the beginning of section 7 of [Yn98]. In our case, when $k\geq 1$,

$I_{1,1,k}(X)=(p-p^{-1})X,\,\,I_{1,2,k}(X)=-X^{2},\,\,I_{1,3,k}(X)=0,\,\,I_{1,4,k}=-pX^{3}.$
$I_{2,1,k}(X)=I_{2,3,k}(X)=I_{2,5,k}(X)=I_{2,7,k}(X)=0.$
$I_{2,2,k}(X)=-X^{2},\,\,I_{2,4,k}(X)=-pX^{4},\,\,I_{2,6,k}(X)=X^{5},\,\,I_{2,8,k}(X)=pX^{2}.$

therefore when $m$ is sufficiently large,

$\textup{Den}(\delta_{p}(N_{k})\obot
H_{2m}^{+},M)=1+(p-p^{-1})X+(p-2)X^{2}-(p+1-p^{-1})X^{3}+(1-p)X^{4}+X^{5}\,\big{|}_{X=p^{-m}}.$

By Definition 7.2.5, when $k\geq 1$,

$\textup{Den}^{+}_{\Delta(N_{k})}(X,M)\,\big{|}_{X=p^{-m}}=\frac{\textup{Den}(\delta_{p}(N_{k})\obot
H_{2m}^{+},M)}{1-p^{-m-1}}=1+pX+(p-1)X^{2}-pX^{3}-pX^{4}\,\big{|}_{X=p^{-m}}.$

hence $\textup{Den}^{+}_{\Delta(N_{k})}(X,M)=1+pX+(p-1)X^{2}-pX^{3}-pX^{4}$
when $k\geq 1$, this agrees with our previous calculations.

######  Example 7.4.3.

We give another examples for higher $n$ when $M\hookrightarrow\mathbb{W}$ is
$\textup{GL}_{2}(\mathbb{Z}_{p})$-equivalent to the matrix
$\textup{diag}\\{\varepsilon_{1}p^{2},\varepsilon_{2}p^{3}\\}$ where
$\varepsilon_{1},\varepsilon_{2}\in\mathbb{Z}_{p}^{\times}$. Let
$N_{k}=p^{2k}N_{0}$ where $N_{0}$ is a positive integer with
$\nu_{p}(N_{0})=0$ or $1$ and $k\geq 1$ is an integer. By the formula in
[Wed07, $\S$2.11],

$\displaystyle\textup{Den}^{+}(X,M\obot\langle N_{k}\rangle)=$ $\displaystyle
1+pX+(p+p^{2})X^{2}+p^{2}X^{3}+p^{2}X^{4}-p^{2}X^{2k+1+\nu_{p}(N_{0})}-p^{2}X^{2k+2+\nu_{p}(N_{0})}$
$\displaystyle-(p+p^{2})X^{2k+3+\nu_{p}(N_{0})}-pX^{2k+4+\nu_{p}(N_{0})}-X^{2k+5+\nu_{p}(N_{0})},\,\,\,\textup{when
$k\geq 3$.}$

the formula (30) implies when $k\geq 3$,

$\textup{Den}^{+}_{\Delta(N_{k})}(X,M)=1+pX+(p^{2}+p-1)X^{2}+(p^{2}-p)X^{3}-pX^{4}-p^{2}X^{4}-p^{2}X^{5}-p^{2}X^{6}.$

when $k\geq 3$. Therefore
$\partial\textup{Den}^{+}_{\Delta(N_{0})}(M)=2+4p+6p^{2}$ when $k\geq 3$.

We will double check our results by comparing it with the formulas of local
density given in [Yn98, Theorem 7.1]. The theorem implies that for
sufficiently large positive integer $m$,

$\textup{Den}(\delta_{p}(N_{k})\obot
H_{2m}^{+},M)=1+R_{1,k}(X)+R_{2,k}(X)\,\big{|}_{X=p^{-m}}.$

where $R_{1,k}(X)=\sum\limits_{i=1}^{8}I_{1,i,k}(X)$ and
$R_{2,k}(X)=(1-p^{-1})\sum\limits_{i=1}^{8}I_{2,i,k}(X)+p^{-1}I_{2,6,k}(X)$.
$I_{1,i,k}(X)$ and $I_{2,i,k}(X)$ are explicitly constructed polynomials in
the beginning of section 7 of [Yn98]. In our case, when $k\geq 3$,

$I_{1,1,k}(X)=(p-p^{-1})X+(p^{2}-1)X^{2},\,\,I_{1,2,k}(X)=-X^{3},\,\,I_{1,3,k}(X)=0,\,\,I_{1,4,k}=-p^{2}X^{4}.$
$I_{2,1,k}(X)=(p^{2}-1)X^{3},\,\,I_{2,3,k}(X)=I_{2,5,k}(X)=I_{2,7,k}(X)=0.$
$I_{2,2,k}(X)=-pX^{4}-pX^{5},\,\,I_{2,4,k}(X)=-p^{2}X^{5}-p^{2}X^{6},\,\,I_{2,6,k}(X)=pX^{7},\,\,I_{2,8,k}(X)=pX^{2}+p^{2}X^{4}.$

therefore when $m$ is sufficiently large,

$\displaystyle\textup{Den}(\delta_{p}(N_{k})\obot H_{2m}^{+},M)$
$\displaystyle=1+(p-p^{-1})X+(p^{2}+p-2)X^{2}+(p^{2}-2p+p^{-1}-1)X^{3}$
$\displaystyle-(2p-1)X^{4}+(1-p^{2})X^{5}+(p-p^{2})X^{6}+pX^{7}\,\big{|}_{X=p^{-m}}.$

By Definition 7.2.5, when $k\geq 3$,

$\displaystyle\textup{Den}^{+}_{\Delta(N_{k})}(X,M)\,\big{|}_{X=p^{-m}}=\frac{\textup{Den}(\delta_{p}(N_{k})\obot
H_{2m}^{+},M)}{1-p^{-m-1}}$
$\displaystyle=1+pX+(p^{2}+p-1)X^{2}+(p^{2}-p)X^{3}-pX^{4}-p^{2}X^{4}-p^{2}X^{5}-p^{2}X^{6}\,\big{|}_{X=p^{-m}}.$

hence
$\textup{Den}^{+}_{\Delta(N_{k})}(X,M)=1+pX+(p^{2}+p-1)X^{2}+(p^{2}-p)X^{3}-pX^{4}-p^{2}X^{4}-p^{2}X^{5}-p^{2}X^{6}$
when $k\geq 3$, this agrees with our previous calculations.

##  8\. Proof of Arithmetic Siegel-Weil formula on $\mathcal{X}_{0}(N)$

###  8.1. Local arithmetic Siegel-Weil formula with level $N$

Let $p$ be a prime number. The difference formulas at the analytic side and
the geometric side are combined together to prove the following theorem.

######  Theorem 8.1.1.

Let $M\subset\mathbb{W}$ be a $\mathbb{Z}_{p}$-lattice of rank 2. Then

(32)
$\textup{Int}_{\mathcal{N}_{0}(N)}(M)=\partial\textup{Den}^{+}_{\Delta(N)}(M).$

###### Proof.

Theorem 6.4.1 gives the following difference formula of local arithmetic
intersection numbers,

$\textup{Int}_{\mathcal{N}_{0}(N)}(M)=\textup{Int}^{\sharp}(M\obot\mathbb{Z}_{p}\cdot
x_{0})-\textup{Int}^{\sharp}(M\obot\mathbb{Z}_{p}\cdot p^{-1}x_{0}).$

We also have the difference formula of the derived local densities (cf.(31)),

$\partial\textup{Den}^{+}_{\Delta(N)}(M)=\partial\textup{Den}^{+}(M\obot\mathbb{Z}_{p}\cdot
x_{0})-\partial\textup{Den}^{+}(M\obot\mathbb{Z}_{p}\cdot p^{-1}x_{0}).$

Theorem 6.3.4 implies that
$\textup{Int}^{\sharp}(L)=\partial\textup{Den}^{+}(L)$ for any rank 3 lattice
$L\subset\mathbb{B}$. Therefore
$\linebreak\textup{Int}_{\mathcal{N}_{0}(N)}(M)=\partial\textup{Den}^{+}_{\Delta(N)}(M)$
holds by combining the above two difference formulas. ∎

###  8.2. Intersection Numbers and Whittaker functions

Let $p$ be a prime number.

######  Proposition 8.2.1.

Let $M\subset\mathbb{W}$ be a $\mathbb{Z}_{p}$-lattice of rank 2. Then

(33)
$W_{T}^{\prime}(1,0,1_{\delta_{p}(N)^{2}})=c_{p}\cdot\textup{Int}_{\mathcal{N}_{0}(N)}(M)\cdot\textup{log}(p)$

where the constant $c_{p}$ is given as follows

$c_{p}=\begin{cases}(1-p^{-1})\cdot(N,-1)_{p}\cdot|N|_{p}\cdot|2|_{p}^{3/2}&\textup{when
$p\,|\,N$;}\\\
(1-p^{-2})\cdot(N,-1)_{p}\cdot|N|_{p}\cdot|2|_{p}^{3/2}&\textup{when $p\nmid
N$.}\end{cases}$

###### Proof.

Recall that
$\delta_{p}(N)^{\vee}/\delta_{p}(N)\simeq\mathbb{Z}_{p}/2N\mathbb{Z}_{p}$ (cf.
Example 2.1.1). By Proposition 3.3.1 and the explicit formula given by Rao in
the appendix of [Rao93],

$\displaystyle W_{T}(1,k,1_{\delta_{p}(N)^{2}})$
$\displaystyle=|2N|_{p}\cdot\gamma(\delta_{p}(N)\otimes\mathbb{Q}_{p})^{2}\cdot|2|_{p}^{1/2}\cdot\textup{Den}(\delta_{p}(N)\oplus
H_{2k}^{+},M)$ (34)
$\displaystyle=|N|_{p}\cdot(N,-1)_{p}\cdot|2|_{p}^{3/2}\cdot\textup{Den}(\delta_{p}(N)\oplus
H_{2k}^{+},M).$

Taking derivatives of both sides of (34),

$W_{T}^{\prime}(1,0,1_{\delta_{p}(N)^{2}})=c_{p}\cdot\partial\textup{Den}^{+}_{\Delta(N)}(M)\cdot\textup{log}(p).$

The formula (33) follows from Theorem 32. ∎

###  8.3. Proof of the main theorem

######  Proposition 8.3.1.

Let $T\in\textup{Sym}_{2}(\mathbb{Q})$ be a positive definite symmetric
matrix. Let $\boldsymbol{\varphi}\in\mathscr{S}(\mathbb{V}_{f}^{2})$ be a
$T$-admissible Schwartz function. Suppose
$\boldsymbol{\varphi}=\varphi_{1}\times\varphi_{2}$ where
$\varphi_{i}\in\mathscr{S}(\mathbb{V}_{f})$, then for any
$\mathsf{y}\in\textup{Sym}_{2}(\mathbb{R})_{>0}$, we have

$\widehat{\textup{deg}}(\widehat{\mathcal{Z}}(T,\mathsf{y},\boldsymbol{\varphi}))=\begin{cases}\chi(\mathcal{Z}(T,\boldsymbol{\varphi}),\mathcal{O}_{\mathcal{Z}(t_{1},\varphi_{1})}\otimes^{\mathbb{L}}\mathcal{O}_{\mathcal{Z}(t_{2},\varphi_{2})})\cdot\textup{log}(p),&\textup{when
$\text{Diff}(T,\Delta(N))=\\{p\\}$;}\\\ 0,&\textup{when
$\\#\text{Diff}(T,\Delta(N))\neq 1$.}\end{cases}$

###### Proof.

By definition (cf. (16)), the arithmetic special cycle
$\widehat{\mathcal{Z}}(T,\mathsf{y},\boldsymbol{\varphi})=([\mathcal{Z}(T,\boldsymbol{\varphi})],0)$,
therefore
$\widehat{\textup{deg}}(\widehat{\mathcal{Z}}(T,\mathsf{y},\boldsymbol{\varphi}))$
is independent of $\mathsf{y}$. We can assume
$\textup{Diff}(T,\Delta(N))=\\{p\\}$ for some prime number $p$ since otherwise
both sides are 0 since $\mathcal{Z}(T,\boldsymbol{\varphi})$ would be an empty
stack.

Let $x\in\mathcal{Z}(T,\boldsymbol{\varphi})(\overline{\mathbb{F}}_{p})$ be a
geometric point, it is contained in $\mathcal{Y}_{0}(N)$ by Corollary 4.3.8,
hence the special divisors $\mathcal{Z}(t_{1},\varphi_{1})$ and
$\mathcal{Z}(t_{2},\varphi_{2})$ intersect properly at $x$ because $T$ is
nonsingular. Then
$\chi(\mathcal{Z}(T,\boldsymbol{\varphi}),\mathcal{O}_{\mathcal{Z}(t_{1},\varphi_{1})}\otimes^{\mathbb{L}}\mathcal{O}_{\mathcal{Z}(t_{2},\varphi_{2})})\cdot\textup{log}(p)$
is the sum of the length of local rings $\mathcal{O}_{\mathcal{X}_{0}(N),x}$
cut out by these two divisors times $\textup{log}\,(p)$, which is exactly
$\widehat{\textup{deg}}(\widehat{\mathcal{Z}}(T,\mathsf{y},\boldsymbol{\varphi}))$
by the definition of the degree homomorphism. ∎

Proof of Theorem 4.4.1: We first consider the case that $T$ is positive
definite. By Proposition 4.3.9, we only need to consider the case
$\textup{Diff}(T,\Delta(N))=\\{p\\}$ for some prime number $p$ because
otherwise both sides are 0. The same proposition and Corollary 4.3.8 imply
that the special cycle $\mathcal{Z}(T,\boldsymbol{\varphi})$ lies in the
supersingular locus of $\mathcal{X}_{0}(N)_{\mathbb{F}_{p}}$. Then by the
definition of special cycles and the formal uniformization of the special
cycle $\mathcal{Z}(T,\boldsymbol{\varphi})$ (cf. Corollary 5.3.3),

$\displaystyle\chi(\mathcal{Z}(T,\boldsymbol{\varphi}),\mathcal{O}_{\mathcal{Z}(t_{1},\varphi_{1})}\otimes^{\mathbb{L}}\mathcal{O}_{\mathcal{Z}(t_{2},\varphi_{2})})\cdot\textup{log}(p)=$
$\displaystyle\sum\limits_{\begin{subarray}{c}\boldsymbol{x}\in
B^{\times}(\mathbb{Q})_{0}\backslash(\Delta(N)^{(p)})^{2}\\\
T(\boldsymbol{x})=T\end{subarray}}\sum\limits_{g\in
B^{\times}_{\boldsymbol{x}}(\mathbb{Q})_{0}\backslash\textup{GL}_{2}(\mathbb{A}_{f}^{p})/\Gamma_{0}(N)(\hat{\mathbb{Z}}^{p})}$
$\displaystyle\boldsymbol{\varphi}(g^{-1}\boldsymbol{x})\cdot\textup{Int}_{\mathcal{N}_{0}(N)}(\boldsymbol{x})\cdot\textup{log}(p).$

we already know that (cf. (33))

$W_{T}^{\prime}(1,0,1_{\delta_{p}(N)^{2}})=c_{p}\cdot\textup{Int}_{\mathcal{N}_{0}(N)}(\boldsymbol{x})\cdot\textup{log}(p).$

with constants $c_{p}$ given by (8.2.1).

There exists a Haar measure on $\textup{GL}_{2}(\mathbb{A}_{f}^{p})$ such that

$\sum\limits_{\begin{subarray}{c}\boldsymbol{x}\in
B^{\times}(\mathbb{Q})_{0}\backslash(\Delta(N)^{(p)})^{2}\\\
T(\boldsymbol{x})=T\end{subarray}}\sum\limits_{g\in
B^{\times}_{\boldsymbol{x}}(\mathbb{Q})_{0}\backslash\textup{GL}_{2}(\mathbb{A}_{f}^{p})/\Gamma_{0}(N)(\hat{\mathbb{Z}}^{p})}\boldsymbol{\varphi}(g^{-1}\boldsymbol{x})=\frac{1}{\textup{vol}(\Gamma_{0}(N)(\hat{\mathbb{Z}}^{p}))}\cdot\int_{\textup{SO}(\Delta(N)^{(p)})(\mathbb{A}_{f}^{p})}\boldsymbol{\varphi}^{p}(g^{-1}\boldsymbol{x})\textup{d}g.$

By definition, the last integral is a product of “local” integrals

$\displaystyle\int_{\textup{SO}(\Delta(N)^{(p)})(\mathbb{A}_{f}^{p})}\boldsymbol{\varphi}^{p}(g^{-1}\boldsymbol{x})\textup{d}g=\prod\limits_{v\neq
p,\infty}\int_{\textup{SO}(\delta_{v}(N))(\mathbb{Q}_{v})}\boldsymbol{\varphi}_{v}(g_{v}^{-1}\boldsymbol{x})\textup{d}g_{v}.$

By the classical local Siegel-Weil formula which is made explicit in the work
of Kudla, Rapoport and Yang [KRY06, Proposition 5.3.3], for every place $v$ of
$\mathbb{Q}$, there exists a number $d_{v}\in\mathbb{R}^{\times}$ such that

$\int_{\textup{SO}(\delta_{v}(N))(\mathbb{Q}_{v})}\boldsymbol{\varphi}_{v}(g_{v}^{-1}\boldsymbol{x})\textup{d}g_{v}=d_{v}\cdot
W_{T,v}(1,0,\boldsymbol{\varphi}_{v}),$

with $\prod\limits_{v\leq\infty}d_{v}=1$. Moreover, [KRY06, Lemma 5.3.9]
implies the following,

$\textup{vol}(\Gamma_{0}(N)_{v},dg_{v})=d_{v}\cdot\gamma(\delta_{v}(N))^{2}\cdot|2|_{v}^{3/2}\cdot\begin{cases}(1-v^{-2}),&\textup{when
$v\nmid N$};\\\ |N|_{v}^{-1}(1+v^{-1})&\textup{when $v|N$}.\end{cases}$

then it can be checked immediately that

$\textup{vol}(\Gamma_{0}(N)(\hat{\mathbb{Z}}^{p}))\cdot d_{p}d_{\infty}\cdot
c_{p}=2^{-1/2}\psi(N)^{-1}\cdot\frac{3}{\pi^{2}}.$

Suppose $\mathsf{z}=\mathsf{x}+i\mathsf{y}$, it’s a classical result that

$W_{T,\infty}(g_{\mathsf{z}},0,\Phi_{\infty}^{3/2})=-2^{7/2}\pi^{2}\cdot\textup{det}(\mathsf{y})^{3/4}q^{T}.$

Combining these together with the definitions made in previous sections (cf.
(6) and (8)) and Proposition 8.3.1, we get the formula stated in the theorem.

When $T$ is not positive definite, the equality follows from [SSY22, $\S$4.2]
and our computations of the volume of
$\textup{vol}(\Gamma_{0}(N)(\hat{\mathbb{Z}}))=\prod\limits_{v<\infty}\textup{vol}(\Gamma_{0}(N)_{v},dg_{v})$
above. $\hfill\qed$

## References

  * [BY21] Jan Hendrik Bruinier and Tonghai Yang. Arithmetic degrees of special cycles and derivatives of Siegel Eisenstein series. J. Eur. Math. Soc. (JEMS), 23(5):1613–1674.
  * [Ces17] Kestutis Cesnavicius. A modular description of $\mathscr{X}_{0}(N)$. Algebra $\&$ Number Theory, Mathematical Sciences Publishers 2017, 11 (9):2001-2089.
  * [CS64] Pierre Colmez and Jean-Pierre Serre. Correspondance Serre–Tate, SMF 2015, 2:854, comments on Tate’s letter from Jan.10, 1964.
  * [CY20] Sungmun Cho and Takuya Yamauchi. A reformulation of the Siegel series and intersection numbers. Math. Ann., 377 (2020): 1757-1826.
  * [deJ95] A. J. de Jong, Crystalline Dieudonné module theory via formal and rigid geometry. Publications Mathématiques de l’IHÉS, 82:5-96, 1995.
  * [DY19] Tuoping Du and Tonghai Yang. Arithmetic Siegel-Weil formula on $X_{0}(N)$. Adv. Math., 345:702–755, 2019\. 17.
  * [Fu98] Willam Fulton. Intersection Theory. Second edition. A Series of Modern Surveys in Mathematics, vol. 2 (Springer, Berlin, 1998).
  * [Gil82] Henri Gillet. Intersection theory on algebraic stacks and Q-varieties. Journal of Pure and Applied Algebra, 34 (1984): 193-240.
  * [Gil09] Henri Gillet. Arithmetic Intersection Theory on Deligne-Mumford Stacks. arXiv e-prints, page arXiv:0904.1424v2, Apr 2009.
  * [GK93] Benedict H. Gross and Kevin Keating. On the intersection of modular correspondences. Invent. Math., 112(2):225–245, 1993.
  * [GS19] Luis E. Garcia and Siddarth Sankaran. Green forms and the arithmetic Siegel–Weil formula. Invent. Math., 215(3):863–975, 2019.
  * [GS87] Henri Gillet and Christophe Soulé. Intersection theory using Adams operations. Invent. Math., 90:243–277, 1987.
  * [GS90] Henri Gillet and Christophe Soulé. Arithmetic intersection theory. Publications Mathématiques de l’IHÉS, 72:93-174, 1990.
  * [HM20] Benjamin Howard and Keerthi Madapusi Pera. Arithmetic of Borcherds products, Astérisque, (421):187–297, 2020. in Arithmetic divisors on orthogonal and unitary Shimura varieties.
  * [HM22] Benjamin Howard and Keerthi Madapusi Pera. Kudla’s modularity conjecture on integral models of orthogonal Shimura varieties. arXiv e-prints, page arXiv:2211.05108, Nov 2022.
  * [HP17] Benjamin Howard and Georgios Pappas. Rapoport–Zink spaces for spinor groups. Compos. Math., 153(5):1050-1118.
  * [Kim18] Wansu Kim. Rapoport-Zink uniformization of Hodge-type Shimura varieties. Forum Math. Sigma, 6:e16, 36, 2018.
  * [Kis10] Mark Kisin. Integral models for Shimura varieties of abelian type. J. Amer. Math. Soc., 23(4):967–1012, 2010. 4.
  * [KM85] Nicholas M. Katz and Barry Mazur. Arithmetic Moduli of Elliptic Curves. (AM-108). Princeton University Press, 1985.
  * [KR99] Stephen S. Kudla and Michael Rapoport. Arithmetic Hirzebruch-Zagier cycles. J. Reine Angew. Math., 515:155–244, 1999.
  * [KRY06] Stephen S. Kudla, Michael Rapoport, and Tonghai Yang. Modular Forms and Special Cycles on Shimura Curves. (AM-161), Princeton: Princeton University Press, 2006.
  * [Kud97] Stephen S. Kudla. Central Derivatives of Eisenstein Series and Height Pairings. Ann. of Math., (2), 146(3):545–646, 1997.
  * [Lan13] Kai-Wen Lan. Arithmetic Compactifications of PEL-Type Shimura Varieties, Princeton: Princeton University Press, 2013.
  * [LZ18] Chao Li and Yihang Zhu. Arithmetic intersection on GSpin Rapoport-Zink spaces. Compos. Math., 154(7):1407–1440, 2018.
  * [LZ22] Chao Li and Wei Zhang. On the arithmetic Siegel–Weil formula for GSpin Shimura varieties. Invent. Math. (2022).
  * [Mad16] Keerthi Madapusi Pera. Integral canonical models for Spin Shimura varieties. Compos. Math., 152(4):769-824.
  * [MF82] David Mumford and John Fogarty. Geometric invariant theory. Second edition. Ergebnisse der Mathematik und ihrer Grenzgebiete (2) 34, Springer-Verlag (1965/1982).
  * [Mor79] Karl A. Morin-Strom. Witt’s Theorem for Modular Lattices. Amer. J. Math., 101(6):1181–92, 1979.
  * [Oki20] Yasuhiro Oki, Notes on Rapoport–Zink spaces of Hodge type with parahoric level structure. arXiv e-prints, page arXiv:2012.07076, Dec 2020.
  * [Ols16] A. M. Olsson Huber. Algebraic Spaces and Stacks. Jahresber. Dtsch. Math. Ver. 120, 143–146 (2018).
  * [Rao93] R. Ranga Rao. On some explicit formulas in the theory of Weil representation. Pacific J. Math., 157(2) 335-371, 1993.
  * [Rap07] Michael Rapoport. Deformations of isogenies of formal groups. Astérisque, (312):139–169, 2007. in Argos Seminar on Intersections of Modular Correspondences.
  * [RZ96] Michael Rapoport and Thomas Zink. Period Spaces for $p$-Divisible Groups. (AM-141). Princeton University Press, 1996.
  * [SSY22] Siddarth Sankaran, Yousheng Shi, and Tonghai Yang. A genus two arithmetic Siegel-Weil formula on $X_{0}(N)$. arXiv e-prints, page arXiv:2206.05823, June 2022.
  * [Ter11] Ulrich Terstiege. Intersections of arithmetic Hirzebruch–Zagier cycles. Math. Ann., 349:161–213, 2011.
  * [Stacks Project] The Stacks Project Authors. Stacks Project, https://stacks.math.columbia.edu.
  * [Wed07] Torsten Wedhorn. Calculation of representation densities. Astérisque, (312):179–190, 2007. in Argos Seminar on Intersections of Modular Correspondences.
  * [Yn98] Tonghai Yang. An Explicit Formula for Local Densities of Quadratic Forms, J. Number Theory, 72:309-356, 1998.
  * [Zin01] Thomas Zink. Windows for displays of $p$-divisible groups. In: Moduli of Abelian Varieties (Text 1999), Prog. in Math., (195):491–518. Birkhäuser, Basel (2001).
  * [Zin02] Thomas Zink. The display of a formal $p$-divisible group. In: Cohomologies $p$-Adiques et Application Arithmétiques I. Astérisque, (278):127–248. Soc. Math. France, Paris (2002)