$f^{(m,n)}(x):=f(x\cdot p^{m}({fr}^{s})^{n})$ is an acceptable function for
sufficiently large $m,n$.

Write $\operatorname{Groth}(G(\mathbb{A}_{f}^{p})\times
J_{b}(\mathbb{Q}_{p}))$ for the Grothendieck group of admissible
representations of $G(\mathbb{A}_{f}^{p})\times J_{b}(\mathbb{Q}_{p})$.

######  Lemma 4.1.6 (cf. [Shi09, Lemma 6.4]).

If $\Pi_{1},\Pi_{2}\in\operatorname{Groth}(G(\mathbb{A}_{f}^{p})\times
J_{b}(\mathbb{Q}_{p}))$ satisfy
$\operatorname{tr}(f\mid\Pi_{1})=\operatorname{tr}(f\mid\Pi_{2})$ for all
acceptable functions $f$, then $\Pi_{1}=\Pi_{2}$ as elements of the
Grothendieck group.

###  4.2 Preliminary Point-Counting

Let $f$ be an acceptable function; our goal is a preliminary formula for
$\operatorname{tr}(f\mid
H_{c}({\operatorname{Ig}}_{\Sigma},\mathscr{L}_{\xi}))$. We assume for the
moment that $f$ is of the form $\mathbb{1}_{UgU}$ (for $U=U^{p}\times
U_{p}(m)$) and satisfies condition 2 of Definition 4.1.3. Combining (4.1.1)
and (4.1.4), we find

$\operatorname{tr}(\mathbb{1}_{UgU}\mid
H_{c}({\operatorname{Ig}}_{\Sigma},\mathscr{L}_{\xi}))=\operatorname{vol}(U)\sum_{x\in\operatorname{Fix}(UgU)}\operatorname{tr}([UgU]\mid(\mathscr{L}_{\xi})_{x}).$
(4.2.1)

We proceed to analyze the set $\operatorname{Fix}(UgU)$ (Definition 4.1.2)
parametrizing the sum.

From Theorem 3.6.2 we see that for any compact open $U\subset
G(\mathbb{A}_{f}^{p})\times J_{b}(\mathbb{Q}_{p})$ we have a bijection

${\operatorname{Ig}}_{\Sigma}(\overline{\mathbb{F}}_{p})/U\overset{\sim}{\longrightarrow}\coprod_{[\phi]}I_{\phi}(\mathbb{Q})\backslash
G(\mathbb{A}_{f}^{p})\times J_{b}(\mathbb{Q}_{p})/U,$ (4.2.2)

where $[\phi]$ ranges over conjugacy classes of $\mathbf{b}$-admissible
morphisms, and with the action of $I_{\phi}(\mathbb{Q})$ possibly twisted by a
tori-rational element $\tau\in\Gamma(\mathcal{H})_{0}$. Recall from 3.5 that
we can lift $\tau(\phi)\in\mathcal{H}(\phi)$ to an element of $I_{\phi}^{\rm
ad}(\mathbb{A}_{f}^{p})$, which we will also call $\tau(\phi)$ by abuse of
notation.

Consider $X=G(\mathbb{A}_{f}^{p})\times J_{b}(\mathbb{Q}_{p})/U$ and
$Y=G(\mathbb{A}_{f}^{p})\times J_{b}(\mathbb{Q}_{p})/(U\cap gUg^{-1})$ sets
with action by $I=I_{\phi}(\mathbb{Q})$, and maps $a,b:X\to Y$ given by
$a:x\mapsto x\operatorname{mod}U$ and $b:x\mapsto xg\operatorname{mod}U$. Then
the set $(I\backslash Y)^{a=b}$ on which the maps $a,b:I\backslash Y\to
I\backslash X$ agree is on the one hand

$\\{x\in I_{\phi}(\mathbb{Q})\backslash G(\mathbb{A}_{f}^{p})\times
J_{b}(\mathbb{Q}_{p})/(U\cap gUg^{-1}):x=xg\operatorname{mod}U\\},$

the $[\phi]$-component of $\operatorname{Fix}(UgU)$ as in (4.2.2); and on the
other hand

$\coprod_{\varepsilon}I_{\phi,\varepsilon}(\mathbb{Q})\backslash\\{x\in
G(\mathbb{A}_{f}^{p})\times J_{b}(\mathbb{Q}_{p})/(U\cap gUg^{-1}):\varepsilon
x=xg\operatorname{mod}U\\}$

by applying Milne’s combinatorial lemma [Mil92, Lemma 5.3] in the setup above
(here we are taking $C={1}$ in the notation of [Mil92, Lemma 5.3], which
satisfies the necessary hypotheses by Lemmas 4.2.5 and 4.2.6).

Thus we can write

$\displaystyle\begin{split}&\operatorname{Fix}(UgU)=\\\
&\coprod_{[\phi]}\coprod_{\varepsilon}I_{\phi,\varepsilon}(\mathbb{Q})\backslash\\{x\in
G(\mathbb{A}_{f}^{p})\times J_{b}(\mathbb{Q}_{p})/(U\cap gUg^{-1}):\varepsilon
x=xg\operatorname{mod}U\\}.\end{split}$ (4.2.3)

Proceeding as in [Shi09, Lemma 7.4], we obtain the first form of the counting
point formula.

######  Proposition 4.2.4.

Let $\tau\in\Gamma(\mathcal{H})_{0}$ a tori-rational element satisfying
Theorem 3.6.2, which we may lift to a tori-rational element of
$\Gamma(\mathfrak{E}^{p})_{0}$ (still called $\tau$ by abuse of notation). For
any acceptable function $f\in C_{c}^{\infty}(G(\mathbb{A}_{f}^{p})\times
J_{b}(\mathbb{Q}_{p}))$, we have

$\operatorname{tr}(f\mid
H_{c}({\operatorname{Ig}}_{\Sigma},\mathscr{L}_{\xi}))=\sum_{[\phi]}\sum_{\varepsilon}\frac{\operatorname{vol}\left(I^{\circ}_{\phi,\varepsilon}(\mathbb{Q})\backslash
G_{b,\gamma\times\delta}^{\circ}\right)}{[I_{\phi,\varepsilon}(\mathbb{Q}):I^{\circ}_{\phi,\varepsilon}(\mathbb{Q})]}O_{\gamma\times\delta}^{G(\mathbb{A}_{f}^{p})\times
J_{b}(\mathbb{Q}_{p})}(f)\operatorname{tr}(\xi(\varepsilon)),$

where $\phi$ ranges over conjugacy classes of $\mathbf{b}$-admissible
morphisms $\phi:\mathfrak{Q}\to\mathfrak{G}_{G}$ and $\varepsilon$ ranges over
conjugacy classes in $I_{\phi}(\mathbb{Q})$, and $\gamma\times\delta$ is the
image of $\operatorname{Int}(\tau(\phi))\varepsilon$ in
$G(\mathbb{A}_{f}^{p})\times J_{b}(\mathbb{Q}_{p})$.

The remainder of the section consists of technical results deferred from
earlier in the section.

######  Lemma 4.2.5.

For $U$ a sufficiently small compact open subgroup of
$G(\mathbb{A}_{f}^{p})\times J_{b}(\mathbb{Q}_{p})$ and $\phi$ an admissible
morphism, the stabilizer in $I_{\phi}(\mathbb{Q})$ of any element of
$G(\mathbb{A}_{f}^{p})\times J_{b}(\mathbb{Q}_{p})/U$ is
$Z_{G}(\mathbb{Q})\cap U$. The same is true if the action of
$I_{\phi}(\mathbb{Q})$ is twisted by an element $\tau(\phi)\in I_{\phi}^{\rm
ad}(\mathbb{A}_{f}^{p})$.

###### Proof.

The proof of [KSZ21, Lemma 3.7.2(i)] carries over to our case, the only
difference being the component at $p$—and in our case $\varepsilon\in
I_{\phi}(\mathbb{Q})$ stabilizing an element $\varepsilon
x_{p}=x_{p}\operatorname{mod}U_{p}$ implies that $\varepsilon$ is contained in
the compact subgroup $x_{p}U_{p}x_{p}^{-1}$ of $J_{b}(\mathbb{Q}_{p})$ (or of
$G(\overline{\mathbb{Q}}_{p})$ via the embedding $J_{b}\to G$ over
$\overline{\mathbb{Q}}_{p}$), providing the necessary ingredient for the
proof. ∎

######  Lemma 4.2.6.

For a sufficiently small compact open subgroup $U\subset
G(\mathbb{A}_{f}^{p})\times J_{b}(\mathbb{Q}_{p})$ we have
$Z_{G}(\mathbb{Q})\cap U=\\{1\\}$.

###### Proof.

Since $G$ is part of a Shimura datum of Hodge type, $Z_{G}^{\circ}$ satisfies
the Serre condition—this is (equivalent to) the condition that $Z_{G}^{\circ}$
is isogenous over $\mathbb{Q}$ to a torus $T^{+}\times T^{-}$ where $T^{+}$ is
split over $\mathbb{Q}$ and $T^{-}$ is compact over $\mathbb{R}$. This implies
that $Z_{G}^{\circ}(\mathbb{Q})$ is discrete in
$Z_{G}^{\circ}(\mathbb{A}_{f})$ (e.g. [KSZ21, Lemma 1.5.5]), and via

$Z_{G}^{\circ}(\mathbb{A}_{f})\hookrightarrow G(\mathbb{A}_{f}^{p})\times
J_{b}(\mathbb{Q}_{p})$

we see $Z_{G}^{\circ}(\mathbb{Q})$ is discrete in $G(\mathbb{A}_{f}^{p})\times
J_{b}(\mathbb{Q}_{p})$ (the embedding $Z_{G}\hookrightarrow J_{b}$ coming from
the fact that $J_{b}$ is an inner form of a Levi subgroup of $G$). Since
$[Z_{G}(\mathbb{Q}):Z_{G}^{\circ}(\mathbb{Q})]$ is finite, $Z_{G}(\mathbb{Q})$
is also discrete in $G(\mathbb{A}_{f}^{p})\times J_{b}(\mathbb{Q}_{p})$. Thus
any sufficiently small compact open subgroup $U$ will intersect
$Z_{G}(\mathbb{Q})$ trivially. ∎

###  4.3 LR Pairs and Kottwitz Parameters

######  Definition 4.3.1.

An _LR pair_ is a pair $(\phi,\varepsilon)$ where
$\phi:\mathfrak{Q}\to\mathfrak{G}_{G}$ is a morphism of Galois gerbs and
$\varepsilon\in I_{\phi}(\mathbb{Q})$. The element $\varepsilon$ can also be
regarded as an element of $G(\overline{\mathbb{Q}})$ via
$I_{\phi}(\mathbb{Q})\subset G(\overline{\mathbb{Q}})$. Two LR pairs
$(\phi_{1},\varepsilon_{1})$ and $(\phi_{2},\varepsilon_{2})$ are _conjugate_
if there is an element $g\in G(\overline{\mathbb{Q}})$ which conjugates
$\phi_{1}$ to $\phi_{2}$ and $\varepsilon_{1}$ to $\varepsilon_{2}$.

An LR pair $(\phi,\varepsilon)$ is _semi-admissible_ if $\phi$ is admissible,
and _$\mathbf{b}$ -admissible_ if $\phi$ is $\mathbf{b}$-admissible. We denote
the set of LR pairs by $\mathcal{LRP}$, the subset of semi-admissible pairs by
$\mathcal{LRP}_{\rm sa}$, and the subset of $\mathbf{b}$-admissible pairs by
$\mathcal{LRP}_{\mathbf{b}\text{-adm}}$.

Note that if $(\phi,\varepsilon)$ is a semi-admissible LR pair then
$\varepsilon$ is semi-simple, as $I_{\phi}/Z_{G}$ is compact over $\mathbb{R}$
(cf. [KSZ21, 3.1.2]).

#### 4.3.1.1

Let $(\phi,\varepsilon)$ be a semi-admissible LR pair. As in 2.6.2.1, the
morphism $\phi(p)\circ\zeta_{p}:\mathfrak{G}_{p}\to\mathfrak{G}_{G}(p)$ is
conjugate by some $g\in G(\overline{\mathbb{Q}}_{p})$ to an unramified
morphism $\theta:\mathfrak{G}_{p}\to\mathfrak{G}_{G}(p)$, which defines an
element $b_{\theta}\in G(\mathbb{Q}_{p}^{\rm ur})$. Since $\varepsilon$
commutes with $\phi$, its conjugate $\varepsilon^{\prime}=g\varepsilon g^{-1}$
commutes with $\theta$. Then for any
$\rho\in\operatorname{Gal}(\overline{\mathbb{Q}}_{p}/\mathbb{Q}_{p}^{\rm ur})$
we have

$1\rtimes\rho=\theta(\rho)=\operatorname{Int}(\varepsilon^{\prime})\circ\theta(\rho)=\operatorname{Int}(\varepsilon^{\prime})(1\rtimes\rho)=\varepsilon^{\prime}\rho(\varepsilon^{\prime})^{-1}\rtimes\rho.$

This shows that $\varepsilon^{\prime}$ is fixed by all
$\rho\in\operatorname{Gal}(\overline{\mathbb{Q}}_{p}/\mathbb{Q}_{p}^{\rm
ur})$, and is therefore an element of $G(\mathbb{Q}_{p}^{\rm ur})$ (a priori
only being an element of $G(\overline{\mathbb{Q}}_{p})$). Furthermore, since
$\varepsilon^{\prime}$ commutes with $\theta^{\rm ur}$, it must
$\sigma$-centralize $b_{\theta}$, and we can regard it as an element of
$J_{b_{\theta}}(\mathbb{Q}_{p})$.

A pair $(b_{\theta},\varepsilon^{\prime})$ arising from $(\phi,\varepsilon)$
in this way is said to be a _$p$ -adic realization_ of $(\phi,\varepsilon)$.
(For comparison, the set of $p$-adic realizations is called
$\text{cls}_{p}(\phi,\varepsilon)$ in [KSZ21, 3.1.4]). Note that all $p$-adic
realizations of an LR pair are conjugate in the following sense: if
$g_{1},g_{2}\in G(\overline{\mathbb{Q}}_{p})$ give rise to $p$-adic
realizations $(b_{1},\varepsilon_{1})$ and $(b_{2},\varepsilon_{2})$
respectively, then

$b_{2}=(g_{2}g_{1}^{-1})b_{1}\sigma(g_{2}g_{1}^{-1})^{-1}$

and conjugation by $g_{2}g_{1}^{-1}$ gives an isomorphism $J_{b_{1}}\to
J_{b_{2}}$ sending $\varepsilon_{1}$ to $\varepsilon_{2}$.

######  Definition 4.3.2.

Let $(\phi,\varepsilon)$ be a semi-admissible LR pair with
$(b_{\theta},\varepsilon^{\prime})$ a $p$-adic realization. We can regard
$\varepsilon^{\prime}$ as an element of $J_{b_{\theta}}(\mathbb{Q}_{p})$.
Define $(\phi,\varepsilon)$ to be _acceptable_ if $\varepsilon^{\prime}$ is
acceptable as an element of $J_{b_{\theta}}(\mathbb{Q}_{p})$. Note that this
does not depend on the choice of $p$-adic realization, as in the paragraph
just above.

#### 4.3.2.1

A _special point datum_ is a triple $(T,h_{T},i)$ where

  * •

$T$ is a torus,

  * •

$h_{T}:\mathbb{S}\to T_{\mathbb{R}}$ is a morphism from the Deligne torus, and

  * •

$i:T\to G$ is an embedding realizing $T$ as a maximal torus of $G$ defined
over $\mathbb{Q}$, and sending $h_{T}$ into $X$.

A special point datum induces an LR pair in the following way. Recall from
2.6.1.1 that the quasi-motivic Galois gerb is equipped with a distinguished
morphism
$\psi:\mathfrak{Q}\to\mathfrak{G}_{\operatorname{Res}_{\overline{\mathbb{Q}}/\mathbb{Q}}\mathbb{G}_{m}}$.
Composing this with the map
$\mathfrak{G}_{\operatorname{Res}_{\overline{\mathbb{Q}}/\mathbb{Q}}\mathbb{G}_{m}}\to\mathfrak{G}_{T}$
induced by the cocharacter $\mu_{h_{T}}$ and the map
$\mathfrak{G}_{T}\to\mathfrak{G}_{G}$ induced by the inclusion $i$, we obtain
an admissible morphism
$\phi=i\circ\psi_{\mu_{h_{T}}}:\mathfrak{Q}\to\mathfrak{G}_{G}$.

Furthermore, in this setup $T(\mathbb{Q})$ as a subgroup of
$G(\overline{\mathbb{Q}})$ lies inside $I_{\phi}(\mathbb{Q})$, so any
$\varepsilon\in T(\mathbb{Q})$ makes a semi-admissible LR pair
$(\phi,\varepsilon)$. Such a pair is called _very special_ ; an LR pair
conjugate to a very special pair is called _special_.

It is a fact [KSZ21, 3.3.9] that every semi-admissible pair is special.

######  Definition 4.3.3.

An LR pair $(\phi,\varepsilon)$ is _gg_ (abbreviated from _günstig gelegen_ ,
German for “well-positioned”) if

  * •

$\phi^{\Delta}$ is defined over $\mathbb{Q}$;

  * •

$\varepsilon$ lies in $G(\mathbb{Q})$ (under the inclusion
$I_{\phi}(\mathbb{Q})\subset G(\overline{\mathbb{Q}})$) and is semi-simple and
elliptic in $G(\mathbb{R})$; and

  * •

for any $\rho\in\operatorname{Gal}(\overline{\mathbb{Q}}/\mathbb{Q})$, letting
$q_{\rho}\in\mathfrak{Q}$ a lift of $\rho$ and
$\phi(q_{\rho})=g_{\rho}\rtimes\rho$, we have $g_{\rho}\in
G_{\varepsilon}^{\circ}$.

Very special pairs are gg, and consequently every semi-admissible LR pair is
conjugate to a gg pair. We denote the set of gg LR pairs by
$\mathcal{LRP}^{\rm gg}\subset\mathcal{LRP}$.

The following definition is inspired by [Shi09, Def 10.1] and [KSZ21, Def
1.6.2].

######  Definition 4.3.4.

A _classical Kottwitz parameter_ of _type $\mathbf{b}$_ is a triple
$(\gamma_{0},\gamma,\delta)$ where

  * •

$\gamma_{0}\in G(\mathbb{Q})$ is semi-simple and elliptic in $G(\mathbb{R})$,

  * •

$\gamma=(\gamma_{\ell})_{\ell}\in G(\mathbb{A}_{f}^{p})$ such that
$\gamma_{\ell}$ is stably conjugate to $\gamma_{0}$ in $G(\mathbb{Q}_{\ell})$,
and

  * •

$\delta\in J_{b}(\mathbb{Q}_{p})$ is acceptable, and conjugate to $\gamma_{0}$
in $G(\overline{\mathbb{Q}}_{p})$ under the embedding
$J_{b}(\mathbb{Q}_{p})\to G(\overline{\mathbb{Q}}_{p})$.

We say that $(\gamma_{0},\gamma,\delta)$ and
$(\gamma_{0}^{\prime},\gamma^{\prime},\delta^{\prime})$ are _equivalent_ if
$\gamma_{0}$ is stably conjugate to $\gamma_{0}^{\prime}$ in $G(\mathbb{Q})$,
$\gamma$ is conjugate to $\gamma^{\prime}$ in $G(\mathbb{A}_{f}^{p})$, and
$\delta$ is conjugate to $\delta^{\prime}$ in $J_{b}(\mathbb{Q}_{p})$.

In order to handle the case that $G_{\rm der}$ is not simply connected, we
need a (closely related but) more abstract treatment.

######  Definition 4.3.5 (cf. [KSZ21, Def 1.6.4]).

A _Kottwitz parameter_ is a triple $\mathfrak{c}=(\gamma_{0},a,[b_{0}])$ where

  1. 1.

$\gamma_{0}\in G(\mathbb{Q})$ is semi-simple and elliptic in $G(\mathbb{R})$,
and we write $I_{0}=G_{\gamma_{0}}^{\circ}$;

  2. 2.

$a$ is an element of

$\mathfrak{D}(I_{0},G;\mathbb{A}_{f}^{p})=\ker\left(H^{1}(I_{0},\mathbb{A}_{f}^{p})\to
H^{1}(G,\mathbb{A}_{f}^{p})\right);$

  3. 3.

$[b_{0}]\in B(I_{0})$; and

  4. 4.

the image of $[b_{0}]$ under the Kottwitz map $B(I_{0})\to
B(G)\overset{\kappa}{\to}\pi_{1}(G)_{\Gamma_{p}}$ is equal to the image of
$\mu^{-1}$, where $\mu$ is the cocharacter induced by an(y) element of $X$.

#### 4.3.5.1

An isomorphism of Kottwitz parameters is essentially given by conjugation by
$G(\overline{\mathbb{Q}})$. We make this precise as follows. Let
$(\gamma_{0},a,[b_{0}])$ be a Kottwitz parameter,
$I_{0}=G_{\gamma_{0}}^{\circ}$, and $u\in G(\overline{\mathbb{Q}})$ an element
such that $\operatorname{Int}(u)\gamma_{0}=\gamma_{0}^{\prime}$ is again in
$G(\mathbb{Q})$ and $u^{-1}\rho(u)\in I_{0}$ for all
$\rho\in\operatorname{Gal}(\overline{\mathbb{Q}}/\mathbb{Q})$. Write
$I_{0}^{\prime}=G_{\gamma_{0}^{\prime}}^{\circ}$.

To relate the away-from-$p$ parts, we consider the bijection

$\displaystyle u_{*}:\mathfrak{D}(I_{0},G;\mathbb{A}_{f}^{p})$
$\displaystyle\to\mathfrak{D}(I_{0}^{\prime},G;\mathbb{A}_{f}^{p})$
$\displaystyle e_{\rho}$ $\displaystyle\mapsto ue_{\rho}\rho(u)^{-1}$

induced by the element $u$.

To relate the $p$-parts, we construct a bijection $u_{*}:B(I_{0})\to
B(I_{0}^{\prime})$. The cocycle $\rho\mapsto u^{-1}\rho(u)\in
Z^{1}(\mathbb{Q}_{p},I_{0})$ is trivial in
$H^{1}(\breve{\mathbb{Q}}_{p},I_{0})$ by the Steinberg vanishing theorem. That
is, we can find $d\in I_{0}(\overline{\breve{\mathbb{Q}}}_{p})$ so that
$u^{-1}\rho(u)=d^{-1}\rho(d)$ for all
$\rho\in\operatorname{Gal}(\overline{\breve{\mathbb{Q}}}_{p}/\breve{\mathbb{Q}}_{p})$.
Then we have $ud^{-1}=\rho(ud^{-1})$ for all such $\rho$, so $u_{0}:=ud^{-1}$
lies in $G(\breve{\mathbb{Q}}_{p})$.

Since $d$ commutes with $\gamma_{0}$, we have
$u_{0}\gamma_{0}u_{0}^{-1}=\gamma_{0}^{\prime}$, and thus $u_{0}$ induces a
bijection

$\displaystyle u_{*}:B(I_{0})$ $\displaystyle\to B(I_{0}^{\prime})$
$\displaystyle[b]$ $\displaystyle\mapsto[u_{0}b\sigma(u_{0})^{-1}].$

This bijection is independent of $d$ (and therefore deserves the name $u_{*}$)
because any other choice of $d$ is related by an element of
$I_{0}(\breve{\mathbb{Q}}_{p})$ and therefore its $\sigma$-conjugation of $b$
does not change the class in $B(I_{0})$.

Now with the above setup, an _isomorphism_ between Kottwitz parameters
$(\gamma_{0},a,[b_{0}])$ and
$(\gamma_{0}^{\prime},a^{\prime},[b_{0}^{\prime}])$ is an element $u\in
G(\overline{\mathbb{Q}})$ such that

  * •

$\operatorname{Int}(u)\gamma_{0}=\gamma_{0}^{\prime}$ and $u^{-1}\rho(u)\in
I_{0}$ for all $\rho\in\operatorname{Gal}(\overline{\mathbb{Q}}/\mathbb{Q})$
(i.e. $u$ stably conjugates $\gamma_{0}$ to $\gamma_{0}^{\prime}$),

  * •

the bijection
$u_{*}:\mathfrak{D}(I_{0},G;\mathbb{A}_{f}^{p})\to\mathfrak{D}(I_{0}^{\prime},G;\mathbb{A}_{f}^{p})$
sends $a$ to $a^{\prime}$, and

  * •

the bijection $u_{*}:B(I_{0})\to B(I_{0}^{\prime})$ sends $[b_{0}]$ to
$[b_{0}^{\prime}]$.

#### 4.3.5.2

A Kottwitz parameter $(\gamma_{0},a,[b_{0}])$ is _$\mathbf{b}$ -admissible_ if
the map $B(I_{0})\to B(G)$ sends $[b_{0}]$ to $\mathbf{b}$. Note that we have
fixed $\mathbf{b}$ in $B(G,\mu^{-1})$, so a $\mathbf{b}$-admissible Kottwitz
parameter automatically satisfies item 4 of Definition 4.3.5.

To define acceptable, let $(\gamma_{0},a,[b_{0}])$ be a Kottwitz parameter.
Since $b_{0}$ (any representative of $[b_{0}]$) lies in
$I_{0}=G_{\gamma_{0}}^{\circ}$, we see that $\gamma_{0}$ centralizes $b_{0}$;
since $\gamma_{0}$ is rational, we see that $\gamma_{0}$ furthermore
$\sigma$-centralizes $b_{0}$, so we can regard $\gamma_{0}$ as an element of
$J_{b_{0}}(\mathbb{Q}_{p})$.

Say that $(\gamma_{0},a,[b_{0}])$ is _acceptable_ if $\gamma_{0}$ is
acceptable as an element of $J_{b_{0}}(\mathbb{Q}_{p})$. This does not depend
on the choice of representative $b_{0}$ of $[b_{0}]$, as a different
representative $b_{0}^{\prime}$—being $\sigma$-conjugate to $b_{0}$—will admit
an isomorphism $J_{b_{0}}\overset{\sim}{\to}J_{b_{0}^{\prime}}$ sending
$\gamma_{0}$ to a conjugate, and acceptability is insensitive to conjugation.

#### 4.3.5.3

Let $\mathfrak{c}=(\gamma_{0},a,[b_{0}])$ be a Kottwitz parameter,
$I_{0}=G_{\gamma_{0}}^{\circ}$, and consider the group

$\mathfrak{E}(I_{0},G;\mathbb{A}/\mathbb{Q})=\operatorname{coker}\Big{(}H^{0}_{\rm
ab}(\mathbb{A},G)\to H^{0}_{\rm ab}(\mathbb{A}/\mathbb{Q},I_{0}\to G)\Big{)}$

where $H^{0}_{\rm ab}$ is the abelianized Galois cohomology of [Lab99]. We
write $\alpha(\mathfrak{c})\in\mathfrak{E}(I_{0},G;\mathbb{A}/\mathbb{Q})$ for
the _Kottwitz invariant_ of $\mathfrak{c}$ as defined in [KSZ21, 1.7].

#### 4.3.5.4

We now define a map from LR pairs to Kottwitz parameters, following [KSZ21,
3.5.1].

Let $(\phi,\varepsilon)$ be a semi-admissible LR pair, and $\tau(\phi)\in
I_{\phi}^{\rm ad}(\mathbb{A}_{f}^{p})$. After conjugation by an element of
$G(\overline{\mathbb{A}}_{f}^{p})$ we may assume that $(\phi,\varepsilon)$ is
gg—we verify in Lemma 4.3.7 that the result is insensitive to this
conjugation. We will define a Kottwitz parameter
$\mathbf{t}(\phi,\varepsilon,\tau(\phi))=(\gamma_{0},a,[b_{0}])$ associated to
$(\phi,\varepsilon)$ and $\tau(\phi)$.

Define $\gamma_{0}=\varepsilon$. By the gg condition, $\varepsilon$ is
contained in $G(\mathbb{Q})$ and is semi-simple and elliptic in
$G(\mathbb{R})$, verifying the requirements for $\gamma_{0}$ in Definition
4.3.5. We write $I_{0}=G_{\gamma_{0}}^{\circ}=G_{\varepsilon}^{\circ}$.

Next we consider $a$. Recall the cocycles $\zeta_{\phi}^{p,\infty}$ and
$\zeta_{\phi,\ell}$ of 2.6.5.1. The gg condition

$\phi(q_{\rho})=g_{\rho}\rtimes\rho\text{ has }g_{\rho}\in
G_{\varepsilon}^{\circ}=I_{0}\text{ for }q_{\rho}\text{ any lift of
}\rho\in\operatorname{Gal}(\overline{\mathbb{Q}}/\mathbb{Q})$ (4.3.6)

implies that $\zeta_{\phi}^{p,\infty}$ is valued in
$I_{0}(\overline{\mathbb{A}}_{f}^{p})$.

Choose a lift $\tilde{\tau}\in I_{\phi}(\overline{\mathbb{A}}_{f}^{p})$ of
$\tau(\phi)$, and define a cocycle
$A:\operatorname{Gal}(\overline{\mathbb{Q}}/\mathbb{Q})\to
I_{0}(\overline{\mathbb{A}}_{f}^{p})$ by

$A(\rho)=t_{\rho}\zeta_{\phi}^{p,\infty}(\rho)$

where $t_{\rho}=\tilde{\tau}^{-1}\rho(\tilde{\tau})\in
Z_{I_{\phi}}(\overline{\mathbb{A}}_{f}^{p})$, acting by $\rho$ via the
$\mathbb{Q}$-structure of $I_{\phi}$—we can regard $t_{\rho}$ as an element of
$I_{0}(\overline{\mathbb{A}}_{f}^{p})$ because the natural embedding
$Z_{I_{\phi}}\to G$ factors through $I_{0}$.

The cocycle $A$ splits over $G(\overline{\mathbb{A}}_{f}^{p})$. To see this,
we write $\tilde{\tau}_{G}$ for the image of $\tilde{\tau}$ in $G$—we
distinguish these because $\tilde{\tau}$ is subject to the Galois action given
by the $\mathbb{Q}$-structure on $I_{0}$, while $\tilde{\tau}_{G}$ is subject
to that given by the $\mathbb{Q}$-structure on $G$. With respect to the Galois
action on $G$, the element $\rho(\tilde{\tau})$ becomes
$\zeta_{\phi}^{p,\infty}(\rho)\rho(\tilde{\tau}_{G})\zeta_{\phi}^{p,\infty}(\rho)^{-1}$,
and so

$\displaystyle A(\rho)$
$\displaystyle=\tilde{\tau}^{-1}\rho(\tilde{\tau})\zeta_{\phi}^{p,\infty}(\rho)$
$\displaystyle=\tilde{\tau}_{G}^{-1}\zeta_{\phi}^{p,\infty}(\rho)\rho(\tilde{\tau}_{G})\zeta_{\phi}^{p,\infty}(\rho)^{-1}\zeta_{\phi}^{p,\infty}(\rho)$
$\displaystyle=\tilde{\tau}_{G}^{-1}\zeta_{\phi}^{p,\infty}(\rho)\rho(\tilde{\tau}_{G}).$

Combined with the fact that $\zeta_{\phi}^{p,\infty}$ splits in
$G(\overline{\mathbb{A}}_{f}^{p})$ (realized as $\rho\mapsto x\rho(x)^{-1}$
for $x\in X^{p}(\phi)$), this shows that $A$ splits in
$G(\overline{\mathbb{A}}_{f}^{p})$ as well.

We define $a\in\mathfrak{D}(I_{0},G;\mathbb{A}_{f}^{p})$ in our Kottwitz
parameter to be the class defined by the image of $A$. This does not depend on
the choice of lift $\tilde{\tau}$, because two choices differ by an element of
$Z_{I_{\phi}}(\overline{\mathbb{A}}_{f}^{p})$ which commutes with
$\zeta_{\phi}^{p,\infty}$.

Finally we construct $[b_{0}]$. The same gg condition (4.3.6) above implies
that $\phi$ factors

$\phi:\mathfrak{Q}\overset{\phi_{0}}{\longrightarrow}\mathfrak{G}_{I_{0}}\to\mathfrak{G}_{G}.$

Then $(\phi_{0},\varepsilon)$ is again an LR pair, and taking a $p$-adic
realization $(b_{\theta},\varepsilon^{\prime})$ produces a class
$[b_{0}]=[b_{\theta}]\in B(I_{0})$ (independent of the choice of $p$-adic
realization, as different choices of $b_{\theta}$ will still be
$\sigma$-conjugate in $I_{0}$). This finishes the construction of
$\mathbf{t}(\phi,\varepsilon,\tau(\phi))=(\gamma_{0},a,[b_{0}])$.

Note that we have taken $\tau(\phi)\in I_{\phi}^{\rm ad}(\mathbb{A}_{f}^{p})$,
but by [KSZ21, Prop 3.5.2] this construction only depends on its image in
$\mathfrak{E}^{p}(\phi)=I_{\phi}(\mathbb{A}_{f}^{p})\backslash I_{\phi}^{\rm
ad}(\mathbb{A}_{f}^{p})$, so we have a well-defined Kottwitz parameter
$\mathbf{t}(\phi,\varepsilon,\tau(\phi)$ associated to a semi-admissible pair
$(\phi,\varepsilon)$ and an element $\tau\in\Gamma(\mathfrak{E}^{p})$.

We want to show that this construction only depends on the conjugacy class of
the LR pair. In particular, after conjugating we have worked in the case that
our LR pair is gg, so we want to show that if two gg pairs are conjugate then
the resulting Kottwitz parameters are isomorphic. For this we need to assume
that the $\tau$-twists are well-behaved under conjugation as well.

######  Lemma 4.3.7.

Let $(\phi,\varepsilon)$ and $(\phi^{\prime},\varepsilon^{\prime})$ be gg LR
pairs, and $\tau\in\Gamma(\mathfrak{E}^{p})_{1}$. Write
$\mathbf{t}(\phi,\varepsilon,\tau(\phi))=(\gamma_{0},a,[b_{0}])$ and
$\mathbf{t}(\phi^{\prime},\varepsilon^{\prime},\tau(\phi^{\prime}))=(\gamma_{0}^{\prime},a^{\prime},[b_{0}^{\prime}])$
for the associated Kottwitz parameters. If $u\in G(\overline{\mathbb{Q}})$
conjugates $(\phi,\varepsilon)$ to $(\phi^{\prime},\varepsilon^{\prime})$,
then

  1. 1.

$u\rho(u)^{-1}\in G_{\varepsilon^{\prime}}^{\circ}$ for all
$\rho\in\operatorname{Gal}(\overline{\mathbb{Q}}/\mathbb{Q})$, and

  2. 2.

$u$ gives an isomorphism
$(\gamma_{0},a,[b_{0}])\cong(\gamma_{0}^{\prime},a^{\prime},[b_{0}^{\prime}])$.

The proof is essentially the same as in [KSZ21, Prop 3.5.3].

Thus for any $\tau\in\Gamma(\mathfrak{E}^{p})_{1}$ we have a well-defined map

$\displaystyle\mathbf{t}:\mathcal{LRP}_{\rm sa}/\text{conj.}$
$\displaystyle\to\mathcal{KP}/\text{isom.}$ $\displaystyle(\phi,\varepsilon)$
$\displaystyle\mapsto\mathbf{t}(\phi,\varepsilon,\tau(\phi))=(\gamma_{0},a,[b_{0}]).$

######  Lemma 4.3.8.

Let $(\phi,\varepsilon)$ a semi-admissible pair, $\tau(\phi)\in I_{\phi}^{\rm
ad}(\mathbb{A}_{f}^{p})$, and let
$\mathbf{t}(\phi,\varepsilon,\tau(\phi))=(\gamma_{0},a,[b_{0}])$ be the
associated Kottwitz parameter.

  1. 1.

$(\gamma_{0},a,[b_{0}])$ is $\mathbf{b}$-admissible if and only if
$(\phi,\varepsilon)$ is $\mathbf{b}$-admissible.

  2. 2.

$(\gamma_{0},a,[b_{0}])$ is acceptable if and only if $(\phi,\varepsilon)$ is
acceptable.

###### Proof.

For the first claim, recall that a semi-admissible pair $(\phi,\varepsilon)$
is $\mathbf{b}$-admissible if
$\phi(p)\circ\zeta_{p}:\mathfrak{G}_{p}\to\mathfrak{G}_{G}(p)$ is conjugate to
an unramified morphism $\theta$ with $b_{\theta}\in\mathbf{b}$. On the other
hand, $[b_{0}]$ is the class (in $B(I_{0})$) defined by precisely such a
$b_{\theta}$, and $(\gamma_{0},a,[b_{0}])$ is defined to be
$\mathbf{b}$-admissible if $[b_{0}]$ maps to the class $\mathbf{b}$ under
$B(I_{0})\to B(G)$. These conditions are manifestly equivalent.

For the second claim, by conjugation we may assume that $(\phi,\varepsilon)$
is gg (as acceptability only depends on the conjugacy or isomorphism class).
Recall that $(\phi,\varepsilon)$ is acceptable if for one (hence any) $p$-adic
realization $(b_{\theta},\varepsilon^{\prime})$ we have $\varepsilon^{\prime}$
acceptable in $J_{b_{\theta}}(\mathbb{Q}_{p})$; and that
$(\gamma_{0},a,[b_{0}])$ is acceptable if $\gamma_{0}$ is acceptable in
$J_{b_{0}}(\mathbb{Q}_{p})$. Thus it suffices to show that
$(b_{0},\gamma_{0})$ is a $p$-adic realization of $(\phi,\varepsilon)$. This
follows from the fact that $b_{0}$ is defined by an
$I_{0}(\overline{\mathbb{Q}}_{p})$-conjugate of $\phi(p)\circ\zeta_{p}$, which
commutes with $\gamma_{0}=\varepsilon$. ∎

#### 4.3.8.1

We can also associate a classical Kottwitz parameter
$(\gamma_{0},\gamma,\delta)$ to an LR pair. Let $(\phi,\varepsilon)$ be a gg
acceptable $\mathbf{b}$-admissible LR pair and $\tau(\phi)\in
I_{\phi}(\overline{\mathbb{A}}_{f}^{p})$. By the gg condition, $\varepsilon$
lies in $G(\mathbb{Q})$, so we can let $\gamma_{0}=\varepsilon$. Then we
define $\gamma$ and $\delta$ as the image of
$\operatorname{Int}(\tau(\phi))\varepsilon$ in $G(\mathbb{A}_{f}^{p})$ and
$J_{b}(\mathbb{Q}_{p})$ respectively.

#### 4.3.8.2

Next we associate a classical Kottwitz parameter to a Kottwitz parameter. Let
$(\gamma_{0},a,[b_{0}])$ be an acceptable $\mathbf{b}$-admissible Kottwitz
parameter. We let $\gamma_{0}=\gamma_{0}$, i.e. the element $\gamma_{0}$ of
our classical Kottwitz parameter we choose to be the element $\gamma_{0}$ of
our Kottwitz parameter. The class $a$ determines a conjugacy class in
$G(\mathbb{A}_{f}^{p})$ stably conjugate to $\gamma_{0}$, and we choose
$\gamma$ to be an arbitrary element of this class. Finally, as our Kottwitz
parameter is acceptable and $\mathbf{b}$-admissible, $\gamma_{0}$ can be
considered as an element of $J_{b}(\mathbb{Q}_{p})$, and we set
$\delta=\gamma_{0}$.

######  Lemma 4.3.9.

Let $(\phi,\varepsilon)$ a gg acceptable $\mathbf{b}$-admissible pair,
$\tau(\phi)\in I_{\phi}(\overline{\mathbb{A}}_{f}^{p})$, and
$\mathbf{t}(\phi,\varepsilon,\tau(\phi))=(\gamma_{0},a,[b_{0}])$ the
associated Kottwitz parameter. Let $(\gamma_{0},\gamma,\delta)$ be the
classical Kottwitz parameter associated to $(\gamma_{0},a,[b_{0}])$, and
$(\gamma_{0}^{\prime},\gamma^{\prime},\delta^{\prime})$ the classical Kottwitz
parameter associated to $(\phi,\varepsilon)$ and $\tau(\phi)$. Then
$(\gamma_{0},\gamma,\delta)$ and
$(\gamma_{0}^{\prime},\gamma^{\prime},\delta^{\prime})$ are equivalent.

###### Proof.

By construction we have $\gamma_{0}^{\prime}=\varepsilon=\gamma_{0}$—in
particular $\gamma_{0}$ is stably conjugate to $\gamma_{0}^{\prime}$, which
verifies the first condition of equivalence. Examining the cocycle

$A(\rho)=\tau(\phi)^{-1}\rho(\tau(\phi))\zeta_{\phi}^{p,\infty}(\rho)$

defining $a$, and noting that $\zeta_{\phi}^{p,\infty}$ commutes with
$\varepsilon=\gamma_{0}$, we see that the conjugacy class of $\gamma$ is the
conjugacy class of $\operatorname{Int}(\tau(\phi))$, which shows that $\gamma$
and $\gamma^{\prime}$ are conjugate in $G(\mathbb{A}_{f}^{p})$. By
construction, $\delta$ and $\delta^{\prime}$ are conjugate as well. ∎

###  4.4 The Image of the Map $\mathcal{LRP}\to\mathcal{KP}$

Recall from §4.3 we have defined a map $\mathbf{t}:\mathcal{LRP}_{\rm
sa}/\text{conj.}\to\mathcal{KP}/\text{isom.}$ for any
$\tau\in\Gamma(\mathfrak{E}^{p})_{1}$. The main result of this section is that
the image of the set of acceptable $\mathbf{b}$-admissible LR pairs is the set
of acceptable $\mathbf{b}$-admissible Kottwitz parameters with trivial
Kottwitz invariant.

We begin by observing that the image of acceptable $\mathbf{b}$-admissible LR
pairs lies in the set of acceptable $\mathbf{b}$-admissible Kottwitz
parameters with trivial Kottwitz invariant. Let $(\phi,\varepsilon)$ an
acceptable $\mathbf{b}$-admissible LR pair and
$\tau\in\Gamma(\mathfrak{E}^{p})$ a tori-rational element. By Lemma 4.3.8, its
image $\mathbf{t}(\phi,\varepsilon,\tau(\phi))$ is also acceptable and
$\mathbf{b}$-admissible. The following lemma tells us that its image also has
trivial Kottwitz invariant.

######  Lemma 4.4.1 ([KSZ21, Prop. 3.6.3]).

Let $(\phi,\varepsilon)$ be a semi-admissible LR pair,
$\tau\in\Gamma(\mathfrak{E}^{p})_{1}$ a tori-rational element, and
$\mathfrak{c}=\mathbf{t}(\phi,\varepsilon,\tau(\phi))$ the associated Kottwitz
parameter. Then the Kottwitz invariant $\alpha(\mathfrak{c})$ is zero.

#### 4.4.1.1

Now we want to show that given an acceptable $\mathbf{b}$-admissible Kottwitz
parameter $(\gamma_{0},a,[b_{0}])$ and $\tau\in\Gamma(\mathfrak{E}^{p})_{0}$
tori-rational, we can find an acceptable $\mathbf{b}$-admissible LR pair
$(\phi,\varepsilon)$ such that
$\mathbf{t}(\phi,\varepsilon,\tau(\phi))=(\gamma_{0},a,[b_{0}])$.

If $\mu$ is a cocharacter of an algebraic group $H$, over $\mathbb{Q}_{p}$, we
define $[b_{\rm bas}(\mu)]\in B(H)$ to be the unique basic class in
$B(H,\mu)$.

######  Lemma 4.4.2.

Let $(\gamma_{0},a,[b_{0}])$ be an acceptable $\mathbf{b}$-admissible Kottwitz
parameter, and write $I_{0}=G_{\gamma_{0}}^{\circ}$. Then there exists a
maximal torus $T\subset I_{0}$ over $\mathbb{Q}$ and $x\in X$ such that
$h_{x}$ factors through $T_{\mathbb{R}}$ (so $\mu_{x}\in X_{*}(T)$) and
$[b_{\rm bas}(\mu_{x}^{-1})]\in B(T)$ maps to $[b_{0}]$ in $B(I_{0})$.

This lemma and its proof are directly inspired from [KMS, Prop 1.2.5].

###### Proof.

Since $\gamma_{0}$ is acceptable with respect to $[b_{0}]$, we have
$I_{0}\subset M_{b_{0}}$ by Lemma 2.2.2. This implies that $I_{0}$ centralizes
the slope homomorphism of $[b_{0}]$, i.e. $[b_{0}]$ is basic in $B(I_{0})$.
Let $J_{b_{0}}^{I_{0}}$ be the inner form of $I_{0}$ defined by $[b_{0}]$.

Recall we can consider $\gamma_{0}$ as an element of
$J_{b_{0}}(\mathbb{Q}_{p})$. The group $J_{b_{0}}^{I_{0}}$ is the connected
centralizer of $\gamma_{0}$ in $J_{b_{0}}$. Choose an elliptic maximal torus
$T^{\prime}\subset J_{b_{0}}$ containing $\gamma_{0}$. Then $T^{\prime}$ is
contained in $J_{b_{0}}^{I_{0}}$, and being elliptic, transfers to a torus
$T^{\prime}\overset{\sim}{\to}T_{p}\subset I_{0}$ over $\mathbb{Q}_{p}$.

By [KMS, Cor 1.1.17], there is a representative $\mu_{p}\in X_{*}(T_{p})$ of
$\\{\mu_{X}\\}$ (the conjugacy class of cocharacters induced by the Shimura
datum $(G,X)$) such that $[b_{\rm bas}(\mu_{p}^{-1})]\in B(T_{p})$ maps to
$[b_{0}]$ in $B(I_{0})$ (note that hypothesis (1.1.3.1) of that Corollary is
satisfied because $[b_{0}]$ is basic in $B(I_{0})$, and $[b_{0}]$ is
$\mu^{-1}$-admissible because it maps to $\mathbf{b}\in B(G,\mu^{-1})$).

Choose a maximal torus $T_{\infty}\subset G_{\mathbb{R}}$ containing
$\gamma_{0}$, so in particular $T_{\infty}\subset I_{0,\mathbb{R}}$. Since
every element of $X$ factors through an elliptic maximal torus of
$G_{\mathbb{R}}$ and all such tori are $G(\mathbb{R})$-conjugate, we can
choose $x\in X$ such that $h_{x}$ factors through $T_{\infty}$.

Having produced $T_{p}\subset I_{0,\mathbb{Q}_{p}}$ and $T_{\infty}\subset
I_{0,\mathbb{R}}$ with the necessary properties, the rest of the proof can be
read verbatim from the proof of [KMS, Prop 1.2.5], replacing their $G$ by our
$I_{0}$. ∎

######  Proposition 4.4.3.

Let $(\gamma_{0},a,[b_{0}])$ be an acceptable $\mathbf{b}$-admissible Kottwitz
parameter. Then there is an admissible morphism $\phi_{0}$ which forms a gg
acceptable $\mathbf{b}$-admissible LR pair $(\phi_{0},\gamma_{0})$.

###### Proof.

By Lemma 4.4.2, there exists a maximal torus $T\subset I_{0}$ over
$\mathbb{Q}$ and $x\in X$ such that $h_{x}$ factors through $T_{\mathbb{R}}$
and $[b_{\rm bas}(\mu_{x}^{-1})]\in B(T)$ maps to $[b_{0}]\in B(I_{0})$. In
particular, $(T,h=h_{x})$ forms a special point datum.

Let $\phi_{0}=i\circ\psi_{\mu_{h}}$ be the admissible morphism induced from
the special point datum $(T,h)$ as in 4.3.2.1. Since $T\subset I_{0}$ is
maximal and $\gamma_{0}$ is central in $I_{0}$, we have $\gamma_{0}\in T$, so
we can form the LR pair $(\phi_{0},\gamma_{0})$. By construction it is very
special and in particular gg. It remains to show that this LR pair is
acceptable and $\mathbf{b}$-admissible.

We check $\mathbf{b}$-admissibility first. Consider
$\psi_{\mu_{h}}:\mathfrak{Q}\to\mathfrak{G}_{T}$ and its $p$-part
$\psi_{\mu_{h}}(p)\circ\zeta_{p}:\mathfrak{G}_{p}\to\mathfrak{G}_{T}(p)$. As
in 2.6.2.1, the latter is conjugate by some element $y\in
T(\overline{\mathbb{Q}}_{p})$ to an unramified morphism
$\theta:\mathfrak{G}_{p}\to\mathfrak{G}_{T}(p)$ which gives rise to an element
$[b_{\theta}]\in B(T)$.

By [KSZ21, Lemma 2.2.10], the image $\kappa_{T}(b_{\theta})\in
X_{*}(T)_{\Gamma_{p}}$ of $[b_{\theta}]$ under the Kottwitz map is equal to
the image of $\mu_{h}^{-1}\in X_{*}(T)$. Since the Kottwitz map is a bijection
in the case of a torus, we conclude that $[b_{\theta}]=[b_{\rm
bas}(\mu_{h}^{-1})]$ in $B(T)$, as the latter also maps to $\mu_{h}^{-1}$. By
our conclusions from Lemma 4.4.2 above we find that $[b_{\theta}]\in B(T)$
maps to $[b_{0}]\in B(I_{0})$ and therefore to $\mathbf{b}\in B(G)$ (by
$\mathbf{b}$-admissibility of our Kottwitz parameter).

Now conjugating
$\phi_{0}(p)\circ\zeta_{p}=i\circ\psi_{\mu_{h}}(p)\circ\zeta_{p}$ by the same
element $y\in T(\overline{\mathbb{Q}}_{p})$ produces the unramified morphism
$i\circ\theta$, and the associated class $[b_{i\circ\theta}]\in B(G)$ is the
image of the class $[b_{\theta}]\in B(T)$. Thus we have
$[b_{i\circ\theta}]=\mathbf{b}$, and this verifies that
$(\phi_{0},\gamma_{0})$ is $\mathbf{b}$-admissible.

Now we check acceptability. Note that we conjugated by an element $y\in
T(\overline{\mathbb{Q}}_{p})$ to produce the unramified morphism
$i\circ\theta$. In particular $y$ commutes with $\gamma_{0}$, so
$(b_{i\circ\theta},\gamma_{0})$ is a $p$-adic realization of
$(\phi_{0},\gamma_{0})$. We have assumed that $\gamma_{0}$ is acceptable with
respect to $[b_{0}]$, and shown that $[b_{0}]=[b_{\theta}]$ in $B(I_{0})$.
This shows that $\gamma_{0}$ is acceptable with respect to
$[b_{i\circ\theta}]$, and $(\phi_{0},\gamma_{0})$ is acceptable. ∎

######  Lemma 4.4.4.

Let $(\phi,\varepsilon)$ be an acceptable LR pair, and suppose that
$\phi^{\Delta}$ is defined over $\mathbb{Q}$ and $\varepsilon\in
G(\mathbb{Q})$ (in particular, this applies to any acceptable gg pair). Then
the inclusion $I_{\phi,\varepsilon}\hookrightarrow G_{\varepsilon}$ over
$\overline{\mathbb{Q}}$ is an isomorphism.

###### Proof.

Recall from 2.6.1 that $I_{\phi,\overline{\mathbb{Q}}}$ is the centralizer of
(the image of) $\phi^{\Delta}$ in $G_{\overline{\mathbb{Q}}}$, so our goal is
to show that any element commuting with $\varepsilon$ must commute with
$\phi^{\Delta}$.

We begin by showing that any element commuting with $\varepsilon$ must commute
with $\phi^{\Delta}\circ\nu(p)$ and $\phi^{\Delta}\circ\nu(\infty)$.

At $p$: let $g\in G(\overline{\mathbb{Q}}_{p})$ such that
$\theta=\operatorname{Int}(g)\circ\phi(p)\circ\zeta_{p}$ is unramified, and
let $b_{\theta}\in G(\mathbb{Q}_{p}^{\rm ur})$ defined by
$\theta(d_{\sigma})=b_{\theta}\rtimes\sigma$. Write
$\varepsilon^{\prime}=\operatorname{Int}(g)\varepsilon$. By Lemma 2.6.3 we
have

$\operatorname{Int}(g)\circ\phi^{\Delta}\circ\nu(p)=(\operatorname{Int}(g)\circ\phi(p)\circ\zeta_{p})^{\Delta}=-\nu_{b_{\theta}},$

so the centralizer of $\operatorname{Int}(g)\circ\phi^{\Delta}\circ\nu(p)$ is
$M_{b_{\theta}}$. On the other hand, $(b_{\theta},\varepsilon^{\prime})$ is a
$p$-adic realization of our acceptable pair $(\phi,\varepsilon)$—in
particular, we can apply Lemma 2.2.2 to conclude that
$G_{\varepsilon^{\prime}}\subset M_{b_{\theta}}$.

Since the centralizer of $\operatorname{Int}(g)\circ\phi^{\Delta}\circ\nu(p)$
is $M_{b_{\theta}}$ we see the centralizer of $\phi^{\Delta}\circ\nu(p)$ is
$\operatorname{Int}(g^{-1})M_{b_{\theta}}$, and likewise we have
$G_{\varepsilon}=\operatorname{Int}(g^{-1})G_{\varepsilon^{\prime}}$. The
above analysis then shows that
$\operatorname{Int}(g^{-1})G_{\varepsilon^{\prime}}=\operatorname{Int}(g^{-1})M_{b_{\theta}}$,
which is to say that the centralizer of $\varepsilon$ is contained in the
centralizer of $\phi^{\Delta}\circ\nu(p)$, as desired.

At $\infty$: as in the proof of [KSZ21, Lemma 3.1.9], the fact is that
$\phi^{\Delta}\circ\nu(\infty)$ is central in $G$, and therefore any element
commuting with $\varepsilon$ trivially commutes with
$\phi^{\Delta}\circ\nu(\infty)$.

Now, suppose that $g\in G(\overline{\mathbb{Q}})$ commutes with $\varepsilon$,
and we want to see that $g$ commutes with $\phi^{\Delta}$.

Recall that $\phi^{\Delta}$ is a morphism $Q\to G$ where
$Q=\varprojlim_{L}Q^{L}$ is the kernel of $\mathfrak{Q}$. For each finite
Galois $L/\mathbb{Q}$, the torus $Q^{L}$ is generated by the
$\operatorname{Gal}(L/\mathbb{Q})$-conjugates of the images of $\nu(p)^{L}$
and $\nu(\infty)^{L}$. Thus $Q$ is generated by the
$\operatorname{Gal}(\overline{\mathbb{Q}}/\mathbb{Q})$-conjugates of the
images of $\nu(p)$ and $\nu(\infty)$.

For any $\rho\in\operatorname{Gal}(\overline{\mathbb{Q}}/\mathbb{Q})$, the
conjugate $\rho(g)$ again commutes with $\varepsilon$ by our hypothesis that
$\varepsilon$ is rational, and therefore by the above arguments $\rho(g)$
commutes with $\phi^{\Delta}\circ\nu(v)$ for $v=p,\infty$. Applying
$\rho^{-1}$ and using our hypothesis that $\phi^{\Delta}$ is defined over
$\mathbb{Q}$, we see that $g$ commutes with
$\phi^{\Delta}\circ\rho^{-1}(\nu(v))$ for $v=p,\infty$. Since $\rho$ was
arbitrary and the
$\operatorname{Gal}(\overline{\mathbb{Q}}/\mathbb{Q})$-conjugates of the
images of $\nu(v)$ generate $Q$, this implies that $g$ commutes with
$\phi^{\Delta}$, as desired. ∎

#### 4.4.4.1

Let $(\phi,\varepsilon)$ be a gg acceptable pair, so that letting
$q_{\rho}\in\mathfrak{Q}$ a lift of
$\rho\in\operatorname{Gal}(\overline{\mathbb{Q}}/\mathbb{Q})$, we have
$\phi(q_{\rho})=g_{\rho}\rtimes\rho$ with $g_{\rho}\in
G_{\varepsilon}^{\circ}$.

The group $I_{\phi}$ is defined as an inner form of $Z_{G}(\phi^{\Delta})$ by
the cocycle

$\rho\mapsto\operatorname{Int}(g_{\rho})\in\operatorname{Aut}((G_{\varepsilon}^{\circ})_{\overline{\mathbb{Q}}})\qquad\rho\in\operatorname{Gal}(\overline{\mathbb{Q}}/\mathbb{Q}).$

In view of the isomorphism of Lemma 4.4.4, this produces—for any gg acceptable
LR pair $(\phi,\varepsilon)$—compatible inner twists

$\displaystyle(I_{\phi,\varepsilon}^{\circ})_{\overline{\mathbb{Q}}}$
$\displaystyle\overset{\sim}{\longrightarrow}(G_{\varepsilon}^{\circ})_{\overline{\mathbb{Q}}},$
$\displaystyle(I_{\phi,\varepsilon})_{\overline{\mathbb{Q}}}$
$\displaystyle\overset{\sim}{\longrightarrow}(G_{\varepsilon})_{\overline{\mathbb{Q}}}$

defined by the same cocycle.

######  Lemma 4.4.5.

Let $(\gamma_{0},a,[b_{0}])$ and $(\gamma_{0},a^{\prime},[b_{1}])$ be
acceptable $\mathbf{b}$-admissible Kottwitz parameters with the same element
$\gamma_{0}$. Then $\nu_{b_{0}}=\nu_{b_{1}}$.

###### Proof.

Both Kottwitz parameters are assumed to be $\mathbf{b}$-admissible, so
$[b_{0}]$ and $[b_{1}]$ both map to $\mathbf{b}$ in $B(G)$. In particular,
$b_{0}$ and $b_{1}$ are $\sigma$-conjugate in $G(L)$. Furthermore, the semi-
simple element $\gamma_{0}$ as an element of $G(L)$ lies in both
$J_{b_{0}}(\mathbb{Q}_{p})$ and $J_{b_{1}}(\mathbb{Q}_{p})$, and is acceptable
with respect to both. Thus we are in the situation of Lemma 2.2.3, and we
conclude that $\nu_{b_{0}}=\nu_{b_{1}}$. ∎

######  Proposition 4.4.6.

Let $(\gamma_{0},a,[b_{0}])$ be an acceptable $\mathbf{b}$-admissible Kottwitz
parameter with trivial Kottwitz invariant, and suppose there is a gg
acceptable $\mathbf{b}$-admissible pair $(\phi_{0},\gamma_{0})$. Then there is
a gg acceptable $\mathbf{b}$-admissible pair $(\phi_{1},\varepsilon_{1})$ with

$\mathbf{t}(\phi_{1},\varepsilon_{1},1)=(\gamma_{0},a,[b_{0}]).$

This is Theorem 3.5.9 of [KSZ21], except that their “$p^{n}$-admissible”
hypothesis has been replaced by our “acceptable $\mathbf{b}$-admissible”
hypothesis. We briefly sketch how their proof carries over to our case.

###### Proof.

Write
$\mathbf{t}(\phi_{0},\gamma_{0},1)=(\gamma_{0},a^{\prime},[b_{0}^{\prime}])$,
and $I_{0}=G_{\gamma_{0}}^{\circ}$. By Lemma 4.3.8, our hypothesis that
$(\phi_{0},\gamma_{0})$ is acceptable and $\mathbf{b}$-admissible implies that
$(\gamma_{0},a^{\prime},[b_{0}^{\prime}])$ is acceptable and
$\mathbf{b}$-admissible.

Since $\gamma_{0}$ is acceptable with respect to $[b_{0}^{\prime}]$, by Lemma
2.2.2 we have $I_{0}\subset M_{b_{0}^{\prime}}$, and therefore
$\nu_{b_{0}^{\prime}}$ is central in $I_{0}$. This is the first ingredient; we
also need the fact from Lemma 4.4.5 that $\nu_{b_{0}}=\nu_{b_{0}^{\prime}}$;
and the fact from 4.4.4.1 of a canonical inner twisting
$(I_{\phi_{0},\gamma_{0}}^{\circ})_{\overline{\mathbb{Q}}}\overset{\sim}{\to}I_{0,\overline{\mathbb{Q}}}$.

In the presence of these three ingredients, the proof of [KSZ21, Thm 3.5.9]
carries over without modification to show the existence of a gg semi-
admissible LR pair $(\phi_{1},\varepsilon_{1})$ with
$\mathbf{t}(\phi_{1},\varepsilon_{1},1)=(\gamma_{0},a,[b_{0}])$. By Lemma
4.3.8, $(\phi_{1},\varepsilon_{1})$ is acceptable and $\mathbf{b}$-admissible.
∎

The last step is to incorporate $\tau$-twists. We collect the full result in
the following proposition.

######  Proposition 4.4.7.

Let $(\gamma_{0},a,[b_{0}])$ be an acceptable $\mathbf{b}$-admissible Kottwitz
parameter with trivial Kottwitz invariant, and
$\tau\in\Gamma(\mathfrak{E}^{p})_{0}$ a tori-rational element. Then there is a
gg acceptable $\mathbf{b}$-admissible LR pair $(\phi,\varepsilon)$ such that

$\mathbf{t}(\phi,\varepsilon,\tau(\phi))=(\gamma_{0},a,[b_{0}]).$

###### Proof.

This is our analogue of [KSZ21, Prop 3.6.5]. The proof in their case applies
equally well here, with our Propositions 4.4.3 and 4.4.6 replacing their and
Propositions 3.4.8 and 3.5.9 respectively.

The resulting LR pair $(\phi,\varepsilon)$ is furthermore acceptable and
$\mathbf{b}$-admissible by Lemma 4.3.8. ∎

#### 4.4.7.1

Having completed this result, and combining it with the discussion at the
beginning of this section, we conclude that under the map (for
$\tau\in\Gamma(\mathfrak{E}^{p})_{0}$ tori-rational)

$\mathbf{t}:\mathcal{LRP}_{\rm sa}/\text{conj.}\to\mathcal{KP}/\text{isom.}$

the image of the set of acceptable $\mathbf{b}$-admissible LR pairs is the set
of acceptable $\mathbf{b}$-admissible Kottwitz parameters with trivial
Kottwitz invariant.

###  4.5 Point-Counting Formula

Recall the result of our preliminary point counting as summarized in
Proposition 4.2.4, updated to the language of LR pairs. Let
$\tau\in\Gamma(\mathcal{H})_{0}$ a tori rational element satisfying Theorem
3.6.2, which we may lift to a tori-rational element of
$\Gamma(\mathfrak{E}^{p})_{0}$ (still called $\tau$ by abuse of notation). For
any acceptable function $f\in C^{\infty}_{c}(G(\mathbb{A}_{f}^{p})\times
J_{b}(\mathbb{Q}_{p}))$ we have

$\operatorname{tr}(f\mid
H_{c}({\operatorname{Ig}}_{\Sigma},\mathscr{L}_{\xi}))=\sum_{(\phi,\varepsilon)}\frac{\operatorname{vol}\left(I^{\circ}_{\phi,\varepsilon}(\mathbb{Q})\backslash
G_{b,\gamma\times\delta}^{\circ}\right)}{[I_{\phi,\varepsilon}(\mathbb{Q}):I^{\circ}_{\phi,\varepsilon}(\mathbb{Q})]}O_{\gamma\times\delta}^{G(\mathbb{A}_{f}^{p})\times
J_{b}(\mathbb{Q}_{p})}(f)\operatorname{tr}(\xi(\varepsilon)),$ (4.5.1)

where $(\phi,\varepsilon)$ ranges over conjugacy classes of
$\mathbf{b}$-admissible LR pairs, and $\gamma,\delta$ are the elements
appearing in the classical Kottwitz parameter associated to
$(\phi,\varepsilon)$ and $\tau(\phi)$. In fact, as a first modification, we
can restrict the sum to pairs $(\phi,\varepsilon)$ which are furthermore
acceptable: since an acceptable function $f$ is supported on acceptable
elements of $J_{b}(\mathbb{Q}_{p})$, the orbital integral will be zero unless
$(\phi,\varepsilon)$ is acceptable.

#### 4.5.1.1

Let $\mathfrak{c}=(\gamma_{0},a,[b_{0}])$ be a Kottwitz parameter with
$[b_{0}]\in B(I_{0})$ basic, and with trivial Kottwitz parameter (note these
hypotheses are satisfied by any Kottwitz parameter arising from an LR pair).
We can define an inner form $I_{\mathfrak{c}}$ of
$I_{0}=G_{\gamma_{0}}^{\circ}$ as follows. Writing $a=(a_{\ell})_{\ell\neq
p,\infty}$, let $I_{\ell}$ be the inner form of $I_{0}$ over
$\mathbb{Q}_{\ell}$ defined by $a_{\ell}$ (or to be precise, the image of
$a_{\ell}$ in $H^{1}(\mathbb{Q}_{\ell},I_{0}^{\rm ad})$). At $p$, let
$I_{p}=J_{b_{0}}^{I_{0}}$ be the inner form of $I_{0}$ over $\mathbb{Q}_{p}$
defined by the basic class $[b_{0}]\in B(I_{0})$. At $\infty$, let
$I_{\infty}$ be the inner form of $I_{0}$ over $\mathbb{R}$ which is compact
modulo $Z_{G}$. By [KSZ21, Prop 1.7.12], these local components determine a
unique inner form $I_{c}$ of $I_{0}$ over $\mathbb{Q}$ such that
$I_{\mathfrak{c}}\otimes\mathbb{Q}_{v}\cong I_{v}$ for all places $v$ of
$\mathbb{Q}$.

This is the group that will replace $I_{\phi,\varepsilon}$ in the volume term.

#### 4.5.1.2

Next we examine the orbital integral terms. Recall that in the setting of our
preliminary formula 4.5.1 we have defined $\gamma\times\delta\in
G_{b}=G(\mathbb{A}_{f}^{p})\times J_{b}(\mathbb{Q}_{p})$ to be the image of
$\operatorname{Int}(\tau(\phi))\varepsilon$; or in the language of 4.3.8.1,
$\gamma,\delta$ come from the classical Kottwitz parameter
$(\gamma_{0},\gamma,\delta)$ associated to $(\phi,\varepsilon)$ and
$\tau(\phi)$. If
$\mathbf{t}(\phi,\varepsilon,\tau(\phi))=(\gamma_{0},a,[b_{0}])$ is the
Kottwitz parameter associated to our LR pair, then as in 4.3.8.2 we can
construct a classical Kottwitz parameter from $(\gamma_{0},a,[b_{0}])$, and by
Lemma 4.3.9 this classical Kottwitz parameter produces the same elements
$\gamma,\delta$ (up conjugacy in $G(\mathbb{A}_{f}^{p})$ or
$J_{b}(\mathbb{Q}_{p})$ respectively). Thus, orbital integrals defined in
terms of classical Kottwitz parameters on both sides will agree.

Define

$T_{\xi}^{f}(\phi,\varepsilon,\tau(\phi))=\operatorname{vol}\left(I^{\circ}_{\phi,\varepsilon}(\mathbb{Q})\backslash
G_{b,\gamma\times\delta}^{\circ}\right)O_{\gamma\times\delta}^{G(\mathbb{A}_{f}^{p})\times
J_{b}(\mathbb{Q}_{p})}(f)\operatorname{tr}(\xi(\varepsilon))$

where $\gamma,\delta$ are the elements in the classical Kottwitz parameter
associated to $(\phi,\varepsilon)$ and $\tau(\phi)$; and

$T_{\xi}^{f}(\gamma_{0},a,[b_{0}])=\operatorname{vol}\left(I^{\circ}_{\mathfrak{c}}(\mathbb{Q})\backslash
I^{\circ}_{\mathfrak{c}}(\mathbb{A}_{f})\right)O_{\gamma\times\delta}^{G(\mathbb{A}_{f}^{p})\times
J_{b}(\mathbb{Q}_{p})}(f)\operatorname{tr}(\xi(\gamma_{0}))$

where $\gamma,\delta$ are the elements in the classical Kottwitz parameter
associated to $(\gamma_{0},a,[b_{0}])$, and $I_{\mathfrak{c}}$ is the group
associated to $\mathfrak{c}=(\gamma_{0},a,[b_{0}])$ as in 4.5.1.1.

Our discussions thus far have demonstrated the following Lemma.

######  Lemma 4.5.2.

Let $(\phi,\varepsilon)$ be a gg acceptable $\mathbf{b}$-admissible LR pair,
$\tau(\phi)\in I_{\phi}^{\rm ad}(\mathbb{A}_{f}^{p})$, and
$\mathbf{t}(\phi,\varepsilon,\tau(\phi))=(\gamma_{0},a,[b_{0}])$ the
associated Kottwitz parameter. Then

$T_{\xi}^{f}(\phi,\varepsilon,\tau(\phi))=T_{\xi}^{f}(\gamma_{0},a,[b_{0}]).$

#### 4.5.2.1

We now return to our study of the map
$\mathbf{t}:\mathcal{LRP}/\text{conj.}\to\mathcal{KP}/\text{isom}$. We showed
in §4.4 that the image of the set of acceptable $\mathbf{b}$-admissible LR
pairs is the set of acceptable $\mathbf{b}$-admissible Kottwitz parameters
with trivial Kottwitz invariant. Our next goal is to examine the fibers of
this map; we will understand them in terms of cohomological twists.

Recall from 2.6.1 that we can twist a morphism
$\phi:\mathfrak{Q}\to\mathfrak{G}_{G}$ by a cocycle $e\in
Z^{1}(\mathbb{Q},I_{\phi})$ to get another morphism $e\phi$. We saw in 2.6.5
that if $\phi$ is admissible, then $e\phi$ is again admissible exactly when
$e$ lies in ${}_{G}^{p,\infty}(\mathbb{Q},I_{\phi})$.

We now consider twisting LR pairs. For an LR pair $(\phi,\varepsilon)$ and
cocycle $e\in Z^{1}(\mathbb{Q},I_{\phi,\varepsilon})\subset
Z^{1}(\mathbb{Q},I_{\phi})$, we can define a twist by simply twisting the
morphism $(e\phi,\varepsilon)$. By [KSZ21, Lemma 3.2.5] this is again an LR
pair—essentially we need to take a cocycle in $I_{\phi,\varepsilon}$ rather
than $I_{\phi}$ to ensure that $\varepsilon$ still lies in $I_{\phi}$. As in
the case of twisting morphisms, two twists $(e\phi,\varepsilon)$ and
$(e^{\prime}\phi,\varepsilon)$ are conjugate by $G(\overline{\mathbb{Q}})$
exactly when $e,e^{\prime}$ define the same class in
$H^{1}(\mathbb{Q},I_{\phi,\varepsilon})$ ([KSZ21, Lemma 3.2.6]).

Now, suppose that $(\phi,\varepsilon)$ is gg. Then [KSZ21, Lemma 3.2.5] also
tells us that if $e\in Z^{1}(\mathbb{Q},I_{\phi,\varepsilon}^{\circ})\subset
Z^{1}(\mathbb{Q},I_{\phi,\varepsilon})$ then the twist $(e\phi,\varepsilon)$
is again gg. This gives us, for any gg pair $(\phi,\varepsilon)$, a map

$Z^{1}(\mathbb{Q},I_{\phi,\varepsilon}^{\circ})\to\mathcal{LRP}^{\rm gg}.$

If we only consider LR pairs up to conjugacy then this map factors through
$H^{1}(\mathbb{Q},I_{\phi,\varepsilon}^{\circ})$, giving

$H^{1}(\mathbb{Q},I_{\phi,\varepsilon}^{\circ})\to\mathcal{LRP}^{\rm
gg}/\text{conj}.$

The point of all this is that each fiber of the map $\mathbf{t}$ is contained
in the image of one such map—that is, two elements in the same fiber are
always related by an $H^{1}$-twist. In order to show this, we need some
preparatory lemmas.

######  Lemma 4.5.3.

Let $(\phi,\varepsilon)$ a gg acceptable LR pair, and
$\operatorname{Int}(g)\varepsilon\in G(\mathbb{Q})$ a rational element stably
conjugate to $\varepsilon$, i.e. $g\in G(\overline{\mathbb{Q}})$ and
$g^{-1}\rho(g)\in G_{\varepsilon}^{\circ}$ for
$\rho\in\operatorname{Gal}(\overline{\mathbb{Q}}/\mathbb{Q})$. Then the
conjugate $(\operatorname{Int}(g)\circ\phi,\operatorname{Int}(g)\varepsilon)$
is again gg and acceptable.

###### Proof.

Acceptability is insensitive to conjugacy, so
$(\operatorname{Int}(g)\circ\phi,\operatorname{Int}(g)\varepsilon)$ is
acceptable. That it is also gg is proven as in [KSZ21, Lemma 3.6.4], with our
4.4.4.1 replacing their 3.2.14. ∎

######  Lemma 4.5.4.

Let $(\phi,\varepsilon)$ and $(\phi^{\prime},\varepsilon)$ be gg acceptable
$\mathbf{b}$-admissible LR pairs with the same element $\varepsilon\in
G(\mathbb{Q})$. Then $\phi^{\Delta}=\phi^{\prime\Delta}$.

###### Proof.

By the same reasoning as the last paragraphs of the proof of Lemma 4.4.4, it
suffices to show that
$\phi^{\Delta}\circ\nu(v)=\phi^{\prime\Delta}\circ\nu(v)$ for $v=p,\infty$
(this implies that $\phi^{\Delta}$ and $\phi^{\prime\Delta}$ agree on a
generating set for $\mathfrak{Q}^{\Delta}=Q$, and being morphisms they must
then agree everywhere).

At $\infty$: by [KSZ21, Lemma 3.1.9], simply the fact that both $\phi$ and
$\phi^{\prime}$ are admissible implies that
$\phi^{\Delta}\circ\nu(\infty)=\phi^{\prime\Delta}\circ\nu(\infty)$.

At $p$: since $(\phi,\varepsilon)$ is gg, we can factor

$\phi:\mathfrak{Q}\to\mathfrak{G}_{G_{\varepsilon}^{\circ}}\to\mathfrak{G}_{G},$

and therefore we can conjugate $\phi(p)\circ\zeta_{p}$ to an unramified
morphism $\theta$ by an element $u\in
G_{\varepsilon}^{\circ}(\overline{\mathbb{Q}})$. Let $b_{\theta}\in
G_{\varepsilon}^{\circ}(\mathbb{Q}_{p}^{\rm ur})$ be the corresponding element
as in 2.6.2. In the same way we can conjugate $\phi^{\prime}(p)\circ\zeta_{p}$
by an element $u^{\prime}\in G_{\varepsilon}^{\circ}(\overline{\mathbb{Q}})$
and produce an element $b_{\theta}^{\prime}\in
G_{\varepsilon}^{\circ}(\mathbb{Q}_{p}^{\rm ur})$. Then
$(b_{\theta},\varepsilon)$ is a $p$-adic realization of $(\phi,\varepsilon)$,
and $(b_{\theta}^{\prime},\varepsilon)$ is a $p$-adic realization of
$(\phi^{\prime},\varepsilon)$.

We have assumed that our LR pairs are acceptable and $\mathbf{b}$-admissible,
which implies that $b_{\theta},b_{\theta}^{\prime}$ and $\varepsilon$ satisfy
the hypotheses of Lemma 2.2.3, and we conclude that
$\nu_{b_{\theta}}=\nu_{b_{\theta}^{\prime}}$.

On the other hand, we have

$\displaystyle\operatorname{Int}(u)\circ\phi^{\Delta}\circ\nu(p)$
$\displaystyle=(\operatorname{Int}(u)\circ\phi(p)\circ\zeta_{p})^{\Delta}\overset{*}{=}-\nu_{b_{\theta}}$
$\displaystyle=-\nu_{b_{\theta}^{\prime}}\overset{*}{=}(\operatorname{Int}(u^{\prime})\circ\phi^{\prime}(p)\circ\zeta_{p})^{\Delta}=\operatorname{Int}(u^{\prime})\circ\phi^{\prime\Delta}\circ\nu(p)$

where the starred equalities are given by Lemma 2.6.3. By our acceptable
hypothesis, we can apply Lemma 2.2.2 to see that $G_{\varepsilon}$ commutes
with $\nu_{b_{\theta}}=\nu_{b_{\theta}^{\prime}}$. But the above equation
demonstrates that $\phi^{\Delta}\circ\nu(p)$ and $-\nu_{b_{\theta}}$ and
$-\nu_{b_{\theta}^{\prime}}$ and $\phi^{\prime\Delta}\circ\nu(p)$ are all
conjugate by $G_{\varepsilon}^{\circ}(\overline{\mathbb{Q}})$, so they must
all be equal, and in particular
$\phi^{\Delta}\circ\nu(p)=\phi^{\prime\Delta}\circ\nu(p)$. ∎

Now we are prepared to show that points in the same fiber of $\mathbf{t}$ are
related by an $H^{1}$-twist.

######  Lemma 4.5.5.

Suppose that $(\phi,\varepsilon)$ and $(\phi^{\prime},\varepsilon^{\prime})$
are gg acceptable $\mathbf{b}$-admissible LR pairs which give rise to
isomorphic Kottwitz parameters. Then the conjugacy classes of
$(\phi,\varepsilon)$ and $(\phi^{\prime},\varepsilon^{\prime})$ are related by
twisting by an element of $H^{1}(\mathbb{Q},I_{\phi,\varepsilon}^{\circ})$.

###### Proof.

In fact we only need to assume that the rational elements, say $\gamma_{0}$
and $\gamma_{0}^{\prime}$, appearing in the two Kottwitz parameters are stably
conjugate (which follows from the isomorphism of Kottwitz parameters)—this
justifies our neglect of $\tau$-twists in the statement, as $\tau$-twists do
not affect the rational element $\gamma_{0}$ of the Kottwitz parameter.

So our hypothesis implies that $\varepsilon$ and $\varepsilon^{\prime}$ are
stably conjugate, and by Lemma 4.5.3 we can conjugate
$(\phi^{\prime},\varepsilon^{\prime})$ to a gg pair $(\phi_{0},\varepsilon)$
which is again acceptable and $\mathbf{b}$-admissible.

By Lemma 4.5.4 we have $\phi^{\Delta}=\phi_{0}^{\Delta}$. As in Lemma 2.6.1 we
can choose $e\in Z^{1}(\mathbb{Q},I_{\phi})$ so that $\phi_{0}=e\phi$. Now
write

$\phi(q_{\rho})=g_{\rho}\rtimes\rho,\qquad\qquad\phi_{0}(q_{\rho})=e\phi(q_{\rho})=e_{\rho}g_{\rho}\rtimes\rho$

where as usual $\rho\in\operatorname{Gal}(\overline{\mathbb{Q}}/\mathbb{Q})$
and $q_{\rho}\in\mathfrak{Q}$ is a lift of $\rho$. Since our LR pairs are gg,
we have $g_{\rho}\in G_{\varepsilon}^{\circ}$ and $e_{\rho}g_{\rho}\in
G_{\varepsilon}^{\circ}$, so we conclude that $e_{\rho}\in
G_{\varepsilon}^{\circ}$. By 4.4.4 this shows that in fact $e\in
Z^{1}(\mathbb{Q},I_{\phi,\varepsilon}^{\circ})$, demonstrating that the
conjugacy classes of $(\phi,\varepsilon)$ and
$(\phi^{\prime},\varepsilon^{\prime})$ are related by twisting by
$H^{1}(\mathbb{Q},I_{\phi,\varepsilon}^{\circ})$. ∎

We also have an analogue of Proposition 2.6.5 characterizing which twists of a
semi-admissible LR pair are semi-admissible.

######  Proposition 4.5.6 ([KSZ21, Prop 3.2.19]).

If $(\phi,\varepsilon)$ is gg and semi-admissible and $e\in
Z^{1}(\mathbb{Q},I_{\phi,\varepsilon}^{\circ})$, then the twist
$(e\phi,\varepsilon)$ is gg and semi-admissible exactly when $e$ lies in
${}_{G}^{\infty}(\mathbb{Q},I_{\phi,\varepsilon}^{\circ})$.

Combining Proposition 4.5.6 with the discussion of 4.5.2.1, we have for each
gg acceptable $\mathbf{b}$-admissible pair $(\phi,\varepsilon)$ a map

$\eta_{\phi,\varepsilon}:{}_{G}^{\infty}(\mathbb{Q},I_{\phi,\varepsilon}^{\circ})\to\mathcal{LRP}^{\rm
gg}_{\rm sa}/\text{conj.}$

and by Lemma 4.5.5 any two such LR pairs giving rise to isomorphic Kottwitz
parameters must both lie in the image of one such map
$\eta_{\phi,\varepsilon}$.

#### 4.5.6.1

Let $\tau\in\Gamma(\mathfrak{E}^{p})_{0}$ tori-rational, and
$(\gamma_{0},a,[b_{0}])$ an acceptable $\mathbf{b}$-admissible Kottwitz
parameter with trivial Kottwitz invariant. By 4.4.7, there is a gg acceptable
$\mathbf{b}$-admissible LR pair $(\phi_{0},\gamma_{0})$ such that
$\mathbf{t}(\phi_{0},\gamma_{0},\tau(\phi_{0}))=(\gamma_{0},a,[b_{0}])$.
Furthermore combining Proposition 4.5.6 and Lemma 4.5.5, we see that every gg
acceptable $\mathbf{b}$-admissible LR pair $(\phi,\varepsilon)$ satisfying
$\mathbf{t}(\phi,\varepsilon,\tau(\phi))\cong(\gamma_{0},a,[b_{0}])$ is
contained in the image of the map $\eta_{\phi_{0},\gamma_{0}}$, i.e. is
related to $(\phi_{0},\gamma_{0})$ by twisting by
${}_{G}^{\infty}(\mathbb{Q},I_{\phi_{0},\gamma_{0}}^{\circ})$. Let
$D(\phi_{0},\gamma_{0})\subset{}_{G}^{\infty}(\mathbb{Q},I_{\phi_{0},\gamma_{0}}^{\circ})$
be the subset of classes $e$ such that

$\mathbf{t}(e\phi_{0},\gamma_{0},\tau(e\phi_{0}))\cong\mathbf{t}(\phi_{0},\gamma_{0},\tau(\phi_{0}))=(\gamma_{0},a,[b_{0}]),$

i.e. twists that do not change the Kottwitz parameter (up to isomorphism).
Then the map

$D(\phi_{0},\gamma_{0})\hookrightarrow{}_{G}^{\infty}(\mathbb{Q},I_{\phi_{0},\gamma_{0}}^{\circ})\overset{\eta_{\phi_{0},\gamma_{0}}}{\longrightarrow}\mathcal{LRP}^{\rm
gg}_{\rm sa}/\text{conj.}$

is a surjection onto the set of conjugacy classes of LR pairs whose associated
Kottwitz parameter is isomorphic to $(\gamma_{0},a,[b_{0}])$. Note that it may
not be a bijection, i.e. for each $e\in D(\phi_{0},\gamma_{0})$ we must
account for the number of other elements of $D(\phi_{0},\gamma_{0})$ which
give rise to the same conjugacy class of LR pairs, which number is
$\\#\\{\text{fiber of $\eta_{\phi_{0},\gamma_{0}}$ containing $e$}\\}$. We
proceed to count these sets, which is the final step en route to our final
formula.

######  Lemma 4.5.7.

In the setting of 4.5.6.1, we have

$\\#\\{\text{fiber of $\eta_{\phi_{0},\gamma_{0}}$ containing
$e$}\\}=\frac{\lvert(I_{e\phi_{0},\gamma_{0}}/I_{e\phi_{0},\gamma_{0}}^{\circ})(\mathbb{Q})\rvert}{[I_{e\phi_{0},\gamma_{0}}(\mathbb{Q}):I_{e\phi_{0},\gamma_{0}}^{\circ}(\mathbb{Q})]}.$

Note that $(e\phi_{0},\gamma_{0})$ is a gg acceptable pair (since its
corresponding Kottwitz parameter is acceptable), so we are in the situation of
4.4.4.1 and we can equally well replace $I_{e\phi_{0},\gamma_{0}}$ and
$I_{e\phi_{0},\gamma_{0}}^{\circ}$ by $G_{\gamma_{0}}$ and
$G_{\gamma_{0}}^{\circ}$, respectively.

###### Proof.

This is proven in the last paragraph of the proof of Lemma 3.7.6 in [KSZ21]
(in their notation,
$\iota_{H}(\varepsilon)=[H_{\varepsilon}(\mathbb{Q}):H_{\varepsilon}^{\circ}(\mathbb{Q})]$
and
$\overline{\iota}_{H}(\varepsilon)=\lvert(H_{\varepsilon}/H_{\varepsilon}^{\circ})(\mathbb{Q})\rvert$).
∎

######  Lemma 4.5.8.

In the setting of 4.5.6.1, we have

$\lvert
D(\phi_{0},\gamma_{0})\rvert=\sum_{(a^{\prime},[b_{0}^{\prime}])}\lvert{}_{G}(\mathbb{Q},I_{\phi_{0},\gamma_{0}}^{\circ})\rvert$

where the sum runs over pairs $(a^{\prime},[b_{0}^{\prime}])$ such that
$(\gamma_{0},a^{\prime},[b_{0}^{\prime}])$ is an acceptable
$\mathbf{b}$-admissible Kottwitz parameter with trivial Kottwitz invariant,
and G is defined as in 2.6.4.1.

As in Lemma 4.5.7, we can equally well replace
$I_{\phi_{0},\gamma_{0}}^{\circ}$ by $G_{\gamma_{0}}^{\circ}$.

###### Proof.

Having fixed an LR pair $(\phi_{0},\gamma_{0})$ (and _not_ simply a conjugacy
class), [KSZ21, Prop 3.6.2(iii)] tells us that twisting by an element
$e\in{}_{G}^{\infty}(\mathbb{Q},I_{\phi_{0},\gamma_{0}}^{\circ})$ results in a
well-defined Kottwitz parameter
$\mathbf{t}(e\phi_{0},\gamma_{0},\tau(e\phi_{0}))$ (_not_ simply an
isomorphism class). Thus we can write

$D(\phi_{0},\gamma_{0})=\coprod_{(a^{\prime},[b_{0}^{\prime}])}D_{(a^{\prime},[b_{0}^{\prime}])}$

where $(a^{\prime},[b_{0}^{\prime}])$ runs over all pairs for which
$(\gamma_{0},a^{\prime},[b_{0}^{\prime}])$ forms a Kottwitz parameter
isomorphic to $(\gamma_{0},a,[b_{0}])$, and
$D_{(a^{\prime},[b_{0}^{\prime}])}\subset D(\phi_{0},\gamma_{0})$ is the
subset of twists giving rise to the Kottwitz parameter
$(\gamma_{0},a^{\prime},[b_{0}^{\prime}])$.

If $D_{(a^{\prime},[b_{0}^{\prime}])}$ is non-empty, then by [KSZ21, Prop
3.6.2] it must be a coset of
${}_{G}(\mathbb{Q},I_{\phi_{0},\gamma_{0}}^{\circ})$ inside
${}_{G}^{\infty}(\mathbb{Q},I_{\phi_{0},\gamma_{0}}^{\circ})$ (note that that
proposition only uses their “$p^{n}$-admissible” hypothesis to show that
$[b_{0}]$ is basic, which we know by our “acceptable” hypothesis). The proof
that $D_{(a^{\prime},[b_{0}^{\prime}])}$ is indeed non-empty proceeds
precisely as in the proof of [KSZ21, Lemma 3.7.6] (where they call this set
$D_{i}$), replacing their Lemma 3.6.2 with our Lemma 4.5.3 and their
Proposition 3.6.1 with our Lemma 4.3.7. ∎

Combining Lemmas 4.5.2, 4.5.7, and 4.5.8, our point-counting formula is
transformed into its final form.

######  Theorem 4.5.9.

For any acceptable function $f\in C^{\infty}_{c}(G(\mathbb{A}_{f}^{p})\times
J_{b}(\mathbb{Q}_{p}))$, we have

$\displaystyle\operatorname{tr}(f\mid H_{c}({\operatorname{Ig}}_{\Sigma},$
$\displaystyle\mathscr{L}_{\xi}))=\sum_{\gamma_{0}\in\Sigma_{\mathbb{R}-{\rm
ell}}(G)\phantom{W}}\sum_{(a,[b_{0}])\in\mathcal{KP}(\gamma_{0})}$
$\displaystyle\frac{\lvert{}_{G}(\mathbb{Q},G_{\gamma_{0}}^{\circ})\rvert}{\lvert(G_{\gamma_{0}}/G_{\gamma_{0}}^{\circ})(\mathbb{Q})\rvert}\operatorname{vol}\left(I^{\circ}_{\mathfrak{c}}(\mathbb{Q})\backslash
I^{\circ}_{\mathfrak{c}}(\mathbb{A}_{f})\right)O_{\gamma\times\delta}^{G(\mathbb{A}_{f}^{p})\times
J_{b}(\mathbb{Q}_{p})}(f)\operatorname{tr}(\xi(\gamma_{0}))$

where $I_{\mathfrak{c}}$ is the inner form of $G_{\gamma_{0}}^{\circ}$
associated to the Kottwitz parameter $\mathfrak{c}=(\gamma_{0},a,[b_{0}])$ as
in 4.5.1.1, and $\gamma,\delta$ are the elements belonging to the classical
Kottwitz parameter $(\gamma_{0},\gamma,\delta)$ associated to $\mathfrak{c}$
as in 4.3.8.2.

## References

  * [BN21] Alexander Bertoloni Meli and Kieu Hieu Nguyen.  The Kottwitz conjecture for unitary PEL-type Rapoport–Zink spaces, 2021.
  * [BS] Alexander Bertoloni Meli and Sug Woo Shin.  A stable trace formula for Igusa varieties, II.  in preparation.
  * [CS17] Ana Caraiani and Peter Scholze.  On the generic part of the cohomology of compact unitary Shimura varieties.  Annals of Mathematics, 186(3):649–766, 2017.
  * [CS19] Ana Caraiani and Peter Scholze.  On the generic part of the cohomology of non-compact unitary Shimura varieties, 2019.
  * [Dem72] Michel Demazure.  Lectures on $p$-divisible groups.  Lecture Notes in Mathematics, Vol. 302. Springer-Verlag, Berlin-New York, 1972.
  * [Gro74] Alexandre Grothendieck.  Groupes de Barsotti-Tate et cristaux de Dieudonné.  Les Presses de l’Université de Montréal, Montreal, Que., 1974\.  Séminaire de Mathématiques Supérieures, No. 45 (Été, 1970).
  * [Ham19] Paul Hamacher.  The product structure of Newton strata in the good reduction of Shimura varieties of Hodge type.  J. Algebraic Geom., 28(4):721–749, 2019.
  * [HK19] Paul Hamacher and Wansu Kim.  $l$-adic étale cohomology of Shimura varieties of Hodge type with non-trivial coefficients.  Mathematische Annalen, 375, 12 2019.
  * [HT01] Michael Harris and Richard Taylor.  The geometry and cohomology of some simple Shimura varieties, volume 151 of Annals of Mathematics Studies.  Princeton University Press, Princeton, NJ, 2001.  With an appendix by Vladimir G. Berkovich.
  * [Kis10] Mark Kisin.  Integral models for Shimura varieties of abelian type.  J. Amer. Math. Soc., 23(4):967–1012, 2010.
  * [Kis17] Mark Kisin.  ${\rm mod}\,p$ points on Shimura varieties of abelian type.  J. Amer. Math. Soc., 30(3):819–914, 2017.
  * [KMS] Mark Kisin, Keerthi Madapusi Pera, and Sug Woo Shin.  Honda-Tate theory for Shimura varieties.  preprint.
  * [Kot85] Robert E. Kottwitz.  Isocrystals with additional structure.  Compositio Math., 56(2):201–220, 1985.
  * [Kot90] Robert E. Kottwitz.  Shimura varieties and $\lambda$-adic representations.  In Automorphic forms, Shimura varieties, and $L$-functions, Vol. I (Ann Arbor, MI, 1988), volume 10 of Perspect. Math., pages 161–209. Academic Press, Boston, MA, 1990.
  * [Kot92] Robert E. Kottwitz.  Points on some Shimura varieties over finite fields.  J. Amer. Math. Soc., 5(2):373–444, 1992.
  * [Kot97] Robert E. Kottwitz.  Isocrystals with additional structure. II.  Compositio Math., 109(3):255–339, 1997.
  * [KS21] Arno Kret and Sug Woo Shin.  ${H}^{0}$ of Igusa varieties via automorphic forms.  preprint, 2021.
  * [KSZ21] Mark Kisin, Sug Woo Shin, and Yihang Zhu.  The stable trace formula for Shimura varieties of abelian type.  preprint, 10 2021.
  * [Lab99] Jean-Pierre Labesse.  Cohomologie, stabilisation et changement de base.  In Cohomologie, stabilisation et changement de base, number 257 in Astérisque. Société mathématique de France, 1999.
  * [Lan73] R. P. Langlands.  Modular forms and $\ell$-adic representations.  In Modular functions of one variable, II (Proc. Internat. Summer School, Univ. Antwerp, Antwerp, 1972), pages 361–500. Lecture Notes in Math., Vol. 349, 1973.
  * [Lan76] R. P. Langlands.  Some contemporary problems with origins in the Jugendtraum.  In Mathematical developments arising from Hilbert problems (Proc. Sympos. Pure Math., Vol. XXVIII, Northern Illinois Univ., De Kalb, Ill., 1974), pages 401–418, 1976.
  * [Lan77] R. P. Langlands.  Shimura varieties and the Selberg trace formula.  Canadian Journal of Mathematics, 29(6):1292–1299, 1977.
  * [Lan79a] R. P. Langlands.  Automorphic representations, Shimura varieties, and motives. Ein Märchen.  In Automorphic forms, representations and $L$-functions (Proc. Sympos. Pure Math., Oregon State Univ., Corvallis, Ore., 1977), Part 2, Proc. Sympos. Pure Math., XXXIII, pages 205–246. Amer. Math. Soc., Providence, R.I., 1979.
  * [Lan79b] R. P. Langlands.  On the zeta-functions of some simple Shimura varieties.  Canadian Journal of Mathematics, 31(6):1121–1216, 1979.
  * [Lov17] T. Lovering.  Filtered F-crystals on Shimura varieties of abelian type.  ArXiv e-prints, February 2017.
  * [Man04] Elena Mantovan.  On certain unitary group Shimura varieties.  Astérisque, (291):201–331, 2004.  Variétés de Shimura, espaces de Rapoport-Zink et correspondances de Langlands locales.
  * [Man05] Elena Mantovan.  On the cohomology of certain PEL-type Shimura varieties.  Duke Math. J., 129(3):573–610, 2005.
  * [Man20] Elena Mantovan.  The newton stratification.  In Thomas Haines and Michael Harris, editors, Shimura Varieties, London Mathematical Society Lecture Note Series, page 166–191. Cambridge University Press, 2020.
  * [MC21] Sander Mack-Crane.  Counting points on Igusa varieties of Hodge type.  UC Berkeley thesis, 2021.
  * [Mil92] James S. Milne.  The points on a Shimura variety modulo a prime of good reduction.  In The zeta functions of Picard modular surfaces, pages 151–253. Univ. Montréal, Montreal, QC, 1992.
  * [OZ02] Frans Oort and Thomas Zink.  Families of $p$-divisible groups with constant Newton polygon.  Doc. Math., 7:183–201, 2002.
  * [RR96] M. Rapoport and M. Richartz.  On the classification and specialization of $F$-isocrystals with additional structure.  Compositio Math., 103(2):153–181, 1996.
  * [Shi09] Sug Woo Shin.  Counting points on Igusa varieties.  Duke Math. J., 146(3):509–568, 2009.
  * [Shi10] Sug Woo Shin.  A stable trace formula for Igusa varieties.  J. Inst. Math. Jussieu, 9(4):847–895, 2010.
  * [Shi11] Sug Woo Shin.  Galois representations arising from some compact Shimura varieties.  Annals of Mathematics, 173(3):1645–1741, 2011.
  * [Shi12] Sug Woo Shin.  On the cohomology of Rapoport-Zink spaces of EL-type.  American Journal of Mathematics, 134(2):407–452, 2012.
  * [Xu20] Yujie Xu.  Normalization in integral models of Shimura varieties of Hodge type, 2020.