As in the proof of <cit.>, there exists a finite Galois extension $E/\Q$ such that the actions of $\Gamma$ on $K$, $\pi_1(I)$, and $\pi_1(G)$ all factor through $\Gal(E/\Q)$ and such that

\begin{align*}
\mathcal A_{\Q}(K) & = \tatecoh^{-1}(\Gal(E/\Q), K), \\  \mathcal A_{\Q}(\pi_1(I)) & = \tatecoh^{-1} (\Gal(E/\Q) , \pi_1(I)).
\end{align*}
Thus the first group in the lemma is equal to the kernel of

$$ \tatecoh^{-1}(\Gal(E/\Q), K) \To \tatecoh^{-1} (\Gal(E/\Q), \pi_1(I)). $$

From this, it is clear that the first and third groups in the lemma are both canonically identified with the cokernel of
$$\tatecoh^{-2}(\Gal(E/\Q), \pi_1(I))  \To  \tatecoh^{-2}(\Gal(E/\Q), \pi_1(G)).$$
The lemma follows.

Assume that $I$ contains a maximal torus in $G$. Then the abelian group $ \E(I, G ; \adele/\Q)$ is canonically identified with
$$ \frac{  K_{\Gamma ,\tors}               }{ \bigoplus_v \ker( K_{\Gamma_v,\tors} \to \pi_1(I)_{\Gamma_v               })}.$$
Here $v$ runs through all the places of $\Q$, and the quotient is with respect to the natural maps $K_{\Gamma_v,\tors} \to K_{\Gamma, \tors}$. In particular, $\E(I, G ; \adele/\Q)$ is finite.

Under our assumption, the map $\pi_1(I) \to \pi_1(G)$ is surjective. Applying Proposition <ref> (ii), we know that $\E(I, G ; \adele/\Q)$ is canonically identified with the cokernel of

$$ \mathscr P(K): \ker \big(\mathcal B_\Q(K) \to \mathcal B_\Q(\pi_1(I)) \big ) \To \mathcal A_\Q(K).$$

By Lemma <ref>, we have

$$\ker \big(\mathcal B_\Q(K) \to \mathcal B_\Q(\pi_1(I)) \big ) = \bigoplus_v \ker( K_{\Gamma_v,\tors} \to \pi_1(I)_{\Gamma_v               }). $$
The corollary follows.

For any Hausdorff locally compact abelian group $H$, we denote by $H^D$ the Pontryagin dual. The following result is well known to experts, cf. <cit.>.
Under the assumption in Proposition <ref>, the abelian group $\E(I, G ; \adele/\Q)$ is canonically identified with $\mathfrak K (I/\Q)^D$, where $\mathfrak K (I/\Q)$ is defined in <cit.>.

We shall freely use the definitions and results in [63]. Recall that $\mathfrak K(I/\Q)$ is defined as the subgroup of $\pi_0 ([Z(\hat I) / Z(\hat G)] ^{\Gamma})$ consisting of those elements whose images in $\coh^1 (F, Z(\hat G)) $ are locally trivial.

Since $X^* (Z(\hat I)) \cong \pi_1(I)$ and $X^*(Z(\hat G)) \cong \pi_1(G)$, we have $ X^*( Z(\hat I) / Z(\hat G))  \cong  K$. Hence
$$X^*\bigg(\pi_0([Z(\hat I) / Z(\hat G)]^{\Gamma}) \bigg) \cong  K_{\Gamma,\tors}. $$

Also, for each place $v$, we have
$$X^*\bigg(\pi_0 (Z(\hat I) ^{\Gamma_v} ) \bigg) \cong \pi_1 (I) _{\Gamma_v,\tors}$$
$$  X^*\bigg(\pi_0 ([Z(\hat I) / Z(\hat G)] ^{\Gamma_v}) \bigg) \cong K_{\Gamma_v,\tors}. $$

By the exact sequence

$$ \pi_0 (Z(\hat I) ^{\Gamma_v}) \to \pi_0 ([Z(\hat I) / Z(\hat G)] ^{\Gamma_v}) \to \coh^1(F_v, Z (\hat G)),$$

we can identify $\mathfrak K (I/\Q)$ with the set of $x \in (K_{\Gamma , \tors})^D$ such that for each place $v$ the composite map $x_v: K_{\Gamma_v,\tors} \to K_{\Gamma,\tors}\xrightarrow{x} \CC^{\times}$ equals the composite map $K_{\Gamma_v, \tors} \to \pi_1(I)_{\Gamma_v,\tors} \xrightarrow{y_v} \CC^{\times}$, for some  $y_v \in (\pi_1(I)_{\Gamma_v, \tors})^D$.
By the exact sequence

$$ (\pi_1(I)_{\Gamma_v, \tors})^D \to (K_{\Gamma_v, \tors})^D \to \bigg(\ker( K_{\Gamma_v,\tors} \to \pi_1(I)_{\Gamma_v, \tors})\bigg)^D, $$

the last condition on $x_v$ is equivalent to requiring that $x$ kills the image of
$$\ker( K_{\Gamma_v,\tors} \to \pi_1(I)_{\Gamma_v, \tors})$$
in $K_{\Gamma,\tors}$. Comparing this description of $\mathfrak K (I/\Q)$ and Proposition <ref>, we see that $\mathfrak K(I/F) \cong \E(I, G; \adele_F/F)^D$.

We now keep the setting of <ref>.
Let $\fkc = (\gamma_0, a ,[b] )\in \KP$, and write $I_0$ for $I_0(\fkc) = G_{\gamma_0}^0$.  We now construct an element
$$\alpha(\fkc)  \in  \E(I_0, G; \adele/\QQ),$$
called the Kottwitz invariant of $\fkc$. This generalizes the construction in <cit.>.

We write $\beta^{p,\infty}(\fkc)$ for the element $a \in \D(I_0, G; \adele_f^p)$. As discussed in <ref>, the abelianization map induces an isomorphism $\D(I_0, G ;\adele_f^p) \cong \E(I_0, G;\adele_f^p) \subset \coh^1_{\ab}(\A_f^p, I_0)$. By Proposition <ref> (i), we have a canonical isomorphism
$$\coh^1_{\ab}(\A_f^p, I_0) \cong \bigoplus_{v \neq p,\infty} \pi_1(I_0)_{\Gamma_v, \tors}. $$
Hence we also view $\beta^{p,\infty}(\fkc)$ as an element of
$$\bigoplus_{v \neq p,\infty} \pi_1(I_0)_{\Gamma_v, \tors}. $$
For each place $v \notin \set{p, \infty}$, we write $\beta_v(\fkc) \in \pi_1(I_0)_{\Gamma_v, \tors }$ for the component of $\beta^{p,\infty}(\fkc)$ at $v$.
We pick a lift $\tilde \beta_v (\fkc) \in \pi_1(I_0)$ of $\beta_v(\fkc)$ that maps to zero in $\pi_1(G)$. Such a lift exists, since $\beta_v(\fkc)$ maps to zero in $\pi_1(G)_{\Gamma_v}$ and since the map $\pi_1(I_0) \to \pi_1(G)$ is surjective.
Since $\beta_v (\fkc) =0$ for almost all $v$, we may and shall assume that $\tilde \beta_v(\fkc) =0$ for almost all $v$.

Let $ \beta_p (\fkc) := \kappa_{I_{0}} ([b]) \in \pi_1(I_0)_{\Gamma_p}$. We pick a lift $\tilde\beta_p (\fkc) \in \pi_1( {I_0} )$ of $\beta_p(\fkc)$ that maps to $ - [\mu]_X\in \pi_1(G)$. Such a lift exists by condition KP0 in Definition <ref> and by the surjectivity of the map $\pi_1(I_0) \to \pi_1(G)$.

Now we take an elliptic maximal torus $T$ in $G_{\RR}$ such that $\gamma_0\in T(\RR)$. Then $T\subset I_{0,\RR}$. Since $T$ is elliptic, there exists $h\in X$ that factors through $T$. Let $\beta_\infty(\fkc)$ be the image of $\mu_h \in X_*(T)$ in $\pi_1(I_0)_{\Gamma_\infty}$. By <cit.>, we know that  the image of $\mu_h$ in $X_*(T)_{\Gamma_\infty}$ is independent of the choice of $h$. Moreover, since all elliptic maximal tori in $I_{0,\RR}$ are conjugate under $I_0(\RR)$, the element $\beta_\infty(\fkc)$ is independent of the choice of $(T,h)$ as above. (For more details see <cit.>.) We pick a lift $\tilde\beta_\infty (\fkc) \in \pi_1( I_0)$ of $\beta_\infty(\fkc)$ that maps to $[\mu]_X \in \pi_1(G)$.
Such a lift exists, since the image of $\beta_{\infty}(\fkc)$ under $\pi_1(I_0)_{\Gamma_{\infty}} \to \pi_1(G)_{\Gamma_{\infty}}$ equals the image of $[\mu]_X$, and since the map $\pi_1(I_0) \to \pi_1(G)$ is surjective.

$K$ for $\ker(\pi_1(I_0) \to \pi_1(G))$. By the above construction, we have an element
$\tilde \beta_v(\fkc) \in K$ for each place $v \notin \set{p, \infty}$, as well as an element $ \tilde \beta_p (\fkc)+ \tilde \beta_\infty (\fkc) \in K$.
We define
$$ \tilde \beta(\fkc) : = \sum_{v} \tilde \beta_v (\fkc) \in K. $$
Here the summation is over all places $v$ of $\QQ$, and only finitely many terms are non-zero.

Note that $K_{\Gamma_{\infty}}$ is torsion. Indeed, if we take an $\RR$-elliptic maximal torus $T$ in $I_{0,\RR}$ and let $\widetilde T$ and $\widetilde S$ be the inverse images of $T$ in $G_{\sconn,\RR}$ and $I_{0, \sconn, \RR}$ respectively, then $K \cong X_*(\widetilde T)/X_*(\widetilde S)$. Since $\widetilde T$ is anisotropic over $\RR$, we know that $X_*(\widetilde T) _{\Gamma_{\infty}}$ is torsion. It follows that $K_{\Gamma_{\infty}}$ is torsion. In particular,  $K_{\Gamma}$ is torsion. Hence $\tilde \beta(\fkc)$ gives rise to an element $\alpha(\fkc) \in \E(I_0, G ; \A/\QQ)$, by Proposition <ref>. Note that the ambiguity in $\tilde\beta(\fkc)$ caused by the choices of $\tilde\beta_v(\fkc)$ always comes from $ \bigoplus_{v} \ker(K \to \pi_1(I_0)_{\Gamma_v}).$ Hence $\alpha(\fkc)$ is well defined.

It is convenient to have the definition of local components of Kottwitz invariants when $\gamma_0$ is not $\Q$-rational for the stabilization of the trace formula.
Suppose $\gamma_0$ is a semi-simple element of $G(\A_f^p)$. We have $I_0 = G_{\gamma_0}^0$ over $\A_f^p$, and
we define the pointed set $\fkD(I_0,G;\A_f^p)$ to be the restricted product $\prod'_v \D(I_0, G; \Q_v)$ with respect to the trivial elements. (The cohomology of $\Gamma$ acting on $I_0(\bar \A_f^p)$ no longer makes sense.) If we are given an element $a \in \D(I_0, G; \A_f^p)$, we will also write $\beta^{p,\infty}(\gamma_0,a)$ for $a$, generalizing the notation $\beta^{p,\infty}(\fkc)$ in <ref>. Similarly, given $\gamma_0\in G(\Q_p)_{\semi}$ and given $[b]\in \B((G_{\Q_p})_{\gamma_0}^0)$ satisfying KP0 in Definition <ref>, we have $\beta_p(\gamma_0,[b])$ and $\tilde \beta_p(\gamma_0,[b])$ (the latter involving an extra choice), generalizing $\beta_p(\fkc)$ and $\tilde \beta_p(\fkc)$ in <ref>. Finally, starting from a semi-simple $\RR$-elliptic element $\gamma_0\in G(\R)$,  we can define $\beta_\infty(\gamma_0)$ and $\tilde \beta_\infty(\gamma_0)$ (the latter involving an extra choice) in the same way as in <ref>, generalizing $\beta_{\infty}(\fkc)$ and $\tilde \beta_\infty (\fkc)$.

Let us check that our definition of Kottwitz invariants coincides with Kottwitz's definition in <cit.>, when $G_{\der}$ is simply connected. This verification allows us to freely import results from [65] during the stabilization process.

Under the identification $\pi_1(G) \cong X^*(Z(\widehat G))$, we view $[\mu]_X \in \pi_1(G)$ as a character on $Z(\widehat{G})$. Under the current assumption on $G_{\der}$, recall that Kottwitz attaches an invariant $\alpha(\fkk)\in\fkK(I_0/\Q)^D$ to a classical Kottwitz parameter $\fkk=(\gamma_0,\gamma,\delta)$ of degree $n$. The outline is as follows. Let $I_0 : = G_{\gamma_0}$, which is connected by the assumption on $G_{\der}$. Kottwitz first defines $\alpha_v(\fkk)\in \pi_1(I_0)_{\Gamma_v} \cong X^*(Z(\widehat I_0)^{\Gamma_v})$ at every place $v$. Then the character $\alpha_v(\fkk)$ on $Z(\hat{I_0})^{\Gamma_v}$ can be extended to a character $\beta'_v(\fkk)$ on $Z(\hat{I_0})^{\Gamma_v} Z(\hat G)$, uniquely by the requirement that $\beta'_v(\fkk)$ is either trivial or equal to $-[\mu]$ or
$[\mu]$ on $Z(\hat G),$ according as $v\notin \set{p,\infty}$ or $v=p$ or $v=\infty$, respectively.
[We write $\beta'$ for Kottwitz's $\beta$ to avoid conflict with our own notation.] Thereby one obtains a character $\beta(\fkk):=\prod_v \beta'_v(\fkk)$ on $\bigcap_v Z(\hat{I_0})^{\Gamma_v} Z(\hat G)$. Since $\beta(\fkk)$ is trivial on $Z(\hat G)$ by construction, it gives rise to a character $\alpha(\fkk)$ on $\left(\bigcap_v Z(\hat{I_0})^{\Gamma_v} Z(\hat G)\right)/Z(\hat G)$. The last group is canonically isomorphic to $\fkK(I_0/\Q)$ if $\gamma_0$ is elliptic in $G(\Q)$, which is true since $\gamma_0$ is $\RR$-elliptic. We note that the canonical map from $K=\ker(\pi_1(I_0)\ra \pi_1(G))$ to the character group of $\cap_v Z(\hat{I_0})^{\Gamma_v} Z(\hat G)$ is compatible with the canonical map from $K$ to $\fkE(I_0,G,\A/\Q)$ via the isomorphisms

$$ \fkE(I_0,G;\A/\Q) \cong \fkK(I_0/\Q)^D \cong \left(\frac{\cap_v Z(\hat{I_0})^{\Gamma_v} Z(\hat G)}{Z(\hat G)}\right)^D$$

as can be seen from the proof of Corollary <ref>.

When $G_{\der}$ is simply connected, we remarked in <ref> that we have a bijection  $\KP_{\adm}(p^n)/{\cong} \to \KP_{\clsc}(p^n)/{\sim}$. Suppose $\fkc=(\gamma_0,a,[b])\in \KP_{\adm}(p^n) $ corresponds to $\fkk=(\gamma_0,\gamma,\delta) \in \KP_{\clsc}(p^n)$. We defined $\beta_v(\fkc)$ and $\tilde \beta_v(\fkc)$ in <ref>, for each place $v$. For $v\in \{p,\infty\}$, note that $\tilde \beta_v(\fkc)$ is a character on $Z(\hat I_0)$, extending the character $\beta_{v}(\fkc)$ on $Z(\hat I_0)^{\Gamma_v}$. Inspecting the definition we see that

$$\beta_v(\fkc) =  \alpha_v(\fkk),\quad \forall v,$$

\left.\tilde \beta_v(\fkc)\right|_{Z(\hat{I_0})^{\Gamma_v} Z(\hat G)} = \beta'_v(\fkk),\quad  \forall v.$$

Therefore the product $ \prod_v \tilde\beta_v(\fkc)$ gives the element $\alpha(\fkc)\in \fkK(I_0/\Q)^D$. Comparing with the definition of $\alpha(\fkc)$ in <ref>, we conclude that

From now on we return to the general setting, i.e., we do not assume that $G_{\der}$ is simply connected.

Let $\fkc = (\gamma_0,  a  , [b])$, $\fkc' =  (\gamma_0, a' , [b]) \in \KP$. Write $I_0$ for the group $I_0(\fkc)  =I_0(\fkc')$. The difference
$\alpha(\fkc)-\alpha(\fkc') \in \E(I_0, G ;\adele/\Q)$ is equal to the image of
$a- a'  \in \D (I_0, G ; \A_f^p)$
under the composite map

\begin{align}\label{eq:D to E(fkc)}
\D (I_0 , G ; \A_f^p) \cong \E (I_0 , G ; \A_f^p)  \hookrightarrow \E (I_0, G; \adele ) \to \E(I_0, G ;\adele/\QQ) .\end{align}

Write $K$ for $\ker(\pi_1(I_0) \to \pi_1(G))$. By Proposition <ref> (ii), the diagram

$$\xymatrix{ \coh^0_{\ab}(\adele, I_0 \to G) \ar[r] \ar[d] &  \coh^1(\A, I_0) \\
\coh^0_{\ab}(\A/\Q, I_0 \to G)} $$
is canonically isomorphic to the diagram

\begin{align}\label{diag:K} \xymatrix{\tatecoh^{-1}(\Gamma_\infty, K) \oplus  \bigoplus_{v \neq \infty} K_{\Gamma_v,\tors} \ar[r] \ar[d] & \tatecoh^{-1}(\Gamma_\infty, \pi_1(I_0))\oplus  \bigoplus_{v \neq \infty} \pi_1(I_0)_{\Gamma_v ,\tors } \\
K _{\Gamma, \tors} } 	\end{align}

For each place $v \notin \set{ p, \infty}$, we choose $\tilde \beta_v(\fkc)$ and $\tilde \beta_v (\fkc')$ in $K$ as in <ref>. The $\Gamma_v$-action on $\pi_1(G)$ factors through some finite quotient $\Gamma_v'$ of $\Gamma_v$, and we have an exact sequence $\coh_1(\Gamma_v', \pi_1(G)) \to K_{\Gamma_v} \to \pi_1(I_0)_{\Gamma_v}$.
Since the image of $\tilde \beta_v(\fkc)$ in $\pi_1(I_0)_{\Gamma_v}$ is the torsion element $\beta_v(\fkc)$, and since $\coh_1(\Gamma_v', \pi_1(G))$ is torsion, the image of $\tilde \beta_v(\fkc)$ in $K_{\Gamma_v}$ is torsion. We denote this image by $\bar \beta_v(\fkc) \in K_{\Gamma_v,\tors} .$ Similarly we define $\bar \beta_v(\fkc') \in K_{\Gamma_v, \tors} .$ Let
$$\Delta: = (\bar \beta_v(\fkc) - \bar \beta_v(\fkc'))_{v \neq p,\infty} \in  \bigoplus_{v \neq p, \infty} K_{\Gamma_v,\tors} . $$
Then $\Delta$ is sent to $a- a'$ by the horizontal map in (<ref>). By the above discussion, the image of $a- a'$ under (<ref>) is equal to the image of $\Delta$ under the composite map

$$ \bigoplus_{v\neq p,\infty} K_{\Gamma_v, \tors }  \to K_{\Gamma,\tors} \to \E(I_0, G ; \A/\Q),$$
where the last map is the quotient map as in Proposition <ref>. On the other hand, by the construction of the Kottwitz invariant, the image of $\Delta$ in $\E(I_0, G ; \A/\Q)$ is $\alpha(\fkc)  - \alpha(\fkc')$. Hence the image of $a- a'$ under (<ref>) is $\alpha(\fkc) - \alpha(\fkc')$.

Let $u : \fkc \isom \fkc'$ be an isomorphism between Kottwitz parameters. Then the isomorphism $\Int(u): I_0(\fkc)_{\Qbar} \isom I_0(\fkc')_{\Qbar}$ is an inner twisting, and in particular it induces an isomorphism of abelian groups

\begin{align}\label{eq:comparing Kott inv}
\E(I_0(\fkc), G ; \A/\Q) \isom \E(I_0(\fkc'), G; \A/\Q)
\end{align}
The following result justifies that the Kottwitz invariant is indeed an “invariant”.

The isomorphism (<ref>) takes $\alpha(\fkc )$ to $\alpha(\fkc')$.
We write $I_0$ and $I_0'$ for $I_0(\fkc)$ and $I_0(\fkc')$. Let $K = \ker(\pi_1(I_0) \to \pi_1(G))$ and $K' = \ker(\pi_1(I_0') \to \pi_1(G))$.  The inner twisting $\Int(u): I_{0,\Qbar} \isom I_{0,\Qbar}'$ induces a $\Gamma$-equivariant isomorphism $\pi_1(I_0) \isom \pi_1(I_0')$, which we denote by $f$. Then $f$ restricts to an isomorphism $K\isom K'$. Moreover, if we identify the two sides of (<ref>) with quotients of  $K_{\Gamma ,\tors}$ and $K'_{\Gamma ,\tors}$ respectively as in Proposition <ref>, then (<ref>) is induced by $f: K\isom K'$.

Let $\omega \in \D(I_0, G; \Q)$ be the class of the cocycle $(u^{-1} \lix^{\rho} u)_{\rho \in \Gamma}$. For each place $v$ of $\Q$, we denote by $\beta_v(\omega)$ the image of $\omega$ under the composite map

$$\coh^1(\Q, I_0) \to \coh^1(\Q_v, I_0)  \xrightarrow{\ab^1_{\Q_v}} \coh^1_{\ab}(\Q_v, I_0).$$
Using the isomorphism $\coh^1_{\ab}(\Q_v, I_0) \cong \cA_{\Q_v}(\pi_1(I_0)) \pi_1(I_0)_{\Gamma_v, \tors}$ in Proposition <ref>, we also view $\beta_v(\omega)$ as an element of  $\pi_1(I_0)_{\Gamma_v, \tors}$. We claim that for each place $v$, the image of $\beta_v(\fkc) + \beta_v(\omega)$ under the isomorphism $\pi_1(I_0)_{\Gamma_v} \isom \pi_1(I_0')_{\Gamma_v}$ induced by $f$ equals $\beta_v(\fkc')$.

Our claim for $v \notin \set{p,\infty}$ follows from the following commutative diagram, which is a special case of <cit.>

$$ \xymatrix { \D(I_0, G; \Q_v) \ar[rr]^{u_*}  \ar[d]^{\cong} _{\ab^1}& &  \D(I_0', G; \Q_v) \ar[d]^{\cong}_{\ab^1} \\ \E(I_0, G;\Q_v) \ar[r]^{c} & \E(I_0, G;\Q_v) \ar[r]^d_{\sim} &  \E(I_0', G;\Q_v) } $$

Here $u_*$ is the component at $v$ of the bijection (<ref>), $c$ is the translation map $x \mapsto x - \beta_v(\omega)$, and $d$ is the group isomorphism induced by the inner twisting $\Int(u) : I_{0, \Qbar} \isom I'_{0, \Qbar}$.

Similarly, the bijection $u_*: \B(I_{0,\Q_p}) \isom \B(I_{0,\Q_p}')$ as in (<ref>) fits in the commutative diagram

$$ \xymatrix { \B(I_{0,\Q_p}) \ar[rr]^{u_*}  \ar[d]_{\kappa_{I_0}}&&  \B(I_{0,\Q_p}') \ar[d]_{\kappa_{I_0'}} \\ \pi_1(I_0)_{\Gamma_p} \ar[r]^{c} &  \pi_1(I_0)_{\Gamma_p}  \ar[r]^f_{\sim} &  \pi_1(I_0')_{\Gamma_p} } $$

where $c$ is the translation map $x \mapsto x - \beta_p(\omega)$. To see this, we use the fact that if we choose $u_0$ as in <ref>, then the image of $u_0^{-1} \lix^\sigma u_0 \in I_0(\LL)$ in $\pi_1(I_0)_{\Gamma_p}$ under $\kappa_{I_0}$ equals $\beta_p(\omega)$; see <cit.> and <cit.>. Our claim for $v=p$ follows from the above commutative diagram.

Now we prove the claim for $v = \infty$. As in <ref>, we choose $(T,h)$ to define $\beta_\infty(\fkc)$ and choose $(T',h')$ to define $\beta_{\infty}(\fkc')$. Without loss of generality we may assume that $T' = \Int(k)(T)$ and $h= \Int(k) \circ h$ for some $k \in G(\RR)$. Since elliptic maximal tori transfer between inner forms, there exists $j \in I_0(\CC)$ such that the map $\Int(uj): T_{\CC} \to I'_{0,\CC}$ is defined over $\RR$ and has image $T'$. We have a commutative diagram

$$ \xymatrixcolsep{5pc} \xymatrix{ X_*(T) \ar[r]^{\Int(uj)}_{\sim } \ar[d] & X_*(T') \ar[d] \\ \pi_1(I_0) \ar[r]_{\sim}^f & \pi_1(I_0') },$$

where the vertical maps are the natural quotient maps. Let $n : = (uj)^{-1} k  \in G(\CC)$. Then $n$ is in the normalizer of $T$ in $G$, and $\Int(uj)^{-1} (\mu_{h'}) = \Int(n) (\mu_h)$. Let $\Delta_{\infty}$ be the image of $ \Int(n)(\mu_h) - \mu_h$ under $X_*(T) \to \pi_1(I_0)_{\Gamma_\infty}$. Then by the above discussion we know that the image of $\beta_\infty(\fkc) + \Delta_{\infty}$ under $f: \pi_1(I_0)_{\Gamma_\infty} \isom \pi_1(I_0')_{\Gamma_\infty}$ equals $\beta_{\infty} (\fkc')$. On the other hand, by <cit.>, we have $\Delta_\infty = \beta_{\infty}(\omega)$. Our claim for $v =\infty$ follows.

We have proved the claim. Now for each place $v$, since $\beta_v(\omega)$ maps to zero in $\pi_1(G)_{\Gamma_v}$, there exists $\tilde \beta_v(\omega) \in K$ lifting  $\beta_v(\omega)$. By the claim, we may choose the lifts $\tilde \beta_v(\fkc)$ and $\tilde \beta_v(\fkc')$ as in <ref>, in such a way that $\tilde \beta_v(\fkc) + \tilde \beta_v(\omega)$ maps to $\tilde \beta_v(\fkc')$ under $f: \pi_1(I_0) \isom \pi_1(I_0')$. To complete the proof, it remains to show that the element

$$\Omega: =  \sum_v \tilde \beta_v(\omega) \in K$$
is sent to zero under
$ K \to  K_{\Gamma} = K_{\Gamma,\tors} \to \E(I_0, G ; \A/\Q).$

In fact, we show that there is a way to choose $\tilde \beta_v(\omega)$ such that the image of $\Omega$ in $K_{\Gamma}$ is already zero. Pick an element $\Omega' \in \coh^0_{\ab}(\Q, I_0 \to G)$ whose image along the surjection $\coh^0_{\ab}(\Q, I_0 \to G) \to \E(I_0, G ; \Q) \cong \D(I_0,G;\Q)$ is $\omega$. Write $(\Omega'_v)_v$ for the image of $\Omega'$ under the composite map (see Proposition <ref>)

\begin{align}\label{eq:ab Q}
\coh^0_{\ab}(\Q, I_0 \to G) \to \coh^0_{\ab}(\A, I_0\to G) \cong \bigoplus_v \cA_{\Q_v} (K) \subset \bigoplus_v K_{\Gamma_v, \tors}.
\end{align}
Then for each $v$, $\Omega'_v \in K_{\Gamma_v, \tors}$ is a lift of $\beta_v(\omega) \in \pi_1(I_0)_{\Gamma_v}$. Thus we may and shall choose the lift $\tilde \beta_v(\omega) \in K$ of $\beta_v(\omega)$ such that $\tilde \beta_v(\omega)$ is a lift of $\Omega_v'$. In this case, to show that $\Omega$ is sent to zero in $K_{\Gamma}$, it suffices to note that the composition of (<ref>) with the natural map
$  \bigoplus_v K_{\Gamma_v, \tors} \to K_{\Gamma,\tors}$ is zero. Indeed, by Proposition <ref>,  this composition is identified with the composition

$$  \coh^0_{\ab}(\Q, I_0 \to G) \to \coh^0_{\ab}(\A, I_0\to G)  \to \coh^0_{\ab} (\A/\Q, I_0 \to G),$$
which is zero as desired.

Let $\fkc = (\gamma_0, a , [b])\in \KP$, and write $I_0$ for $I_0(\fkc)$. Assume that $[b] \in \B(I_{0,\Q_p})$ is basic. This is the case, for example, when $\fkc$ is $p^n$-admissible, by Corollary <ref>. Recall that the notion of inner forms and isomorphisms between inner forms are given in Definition <ref>. The image of $a$ in $\coh^1(\A_f^p, I_0^{\ad})$ determines an inner form $I_v$ of $I_{0}$ over $\Q_v$ up to isomorphism for each place $v \neq p, \infty$. The basic element $[b] \in \B(I_{0,\Q_p})$ determines an inner form $I_p$ of $I_0$ over $\Q_p$ up to isomorphism, namely $I_p : = J_b^{I_0}$ for a decent representative $b$ of $[b]$ (see <ref>). Finally, let $(T,h)$ be as in <ref>. Then $\Int(h(i)) $ induces a Cartan involution on $(I_0 / Z_G)_{\R}$, from which we obtain an inner form $I_{\infty}$ of $I_{0}$ over $\RR$ that is anisotropic modulo $Z_{G,\R}$. The isomorphism class of this inner form $I_\infty$ depends only on $\fkc$.

In the situation of <ref>, assume that the Kottwitz invariant $\alpha(\fkc)$ is zero. Then there exists an inner form $I = I(\fkc)$ of $I_0$ over $\QQ$, unique up to isomorphism between inner forms, such that its localization over $\QQ_v$ is isomorphic to $I_v$ as inner forms of $I_{0,\QQ_v}$ for each place $v$ .

The uniqueness follows from the Hasse principle for $I_0^{\ad}$. To prove the existence, for each place $v$ we denote by ${\eta}_v$ the cohomology class in $\coh^1(\QQ_v, I_0^{\ad})$ corresponding to the inner form $I_v$ (cf. Remark <ref>). By <cit.> (cf. <cit.>) we have an exact sequence of pointed sets

\begin{align*}
\coh^1(\QQ, I_0^{\ad}) \to \bigoplus_v \coh^1(\QQ_v, I_0^{\ad}) \xrightarrow{m} \pi_1(I_0^{\ad})_{\Gamma, \tors}.
\end{align*}

Here $m$ is defined as follows. For each place $v$, let $m_v$ be the composite

\begin{align*}
\coh^1(\QQ_v, I_0^{\ad}) \xrightarrow{\ab^1} \coh^1_{\ab}(\QQ_v, I_0^{\ad}) \cong \cA_{\Q_v}(\pi_1(I_0^{\ad})) \hookrightarrow \pi_1(I_0^{\ad})_{\Gamma_v, \tors},
\end{align*}
(note that these maps are all isomorphisms for $v$ finite)
and let $i_v$ be the natural map
$ \pi_1(I_0^{\ad})_{\Gamma_v, \tors} \to \pi_1(I_0^{\ad})_{\Gamma, \tors} .$ Then $m : = \sum_v i_v \circ m_v$.

We only need to prove that
$$\sum_v i_v \circ m_v( \eta_v) = 0. $$
For each $v$, we claim that $m_v(\eta_v)$ equals the image of $\beta_v(\fkc)$ under $\pi_1(I_0)_{\Gamma_v} \to \pi_1(I_0^{\ad}) _{\Gamma_v} = \pi_1(I_0^{\ad})_{\Gamma_v, \tors}$. Indeed, this statement is non-trivial only for $v \in \set{p,\infty}$. For $v =p$, there is a canonical bijection between $\coh^1(\Q_p, I_0^{\ad})$ and the set of basic elements of $\B(I_{0,\Q_p}^{\ad})$. If we identify $\coh^1(\Q_p, I_0^{\ad})$ with $\pi_1(I_0^{\ad})_{\Gamma_p} = \pi_1(I_0^{\ad})_{\Gamma_p, \tors}$, then this bijection is a section of the Kottwitz map $ \B(I_{0,\Q_p}^{\ad}) \to \pi_1(I_0^{\ad})_{\Gamma_p}$. Moreover, this bijection sends $\eta_p$ to the image of $[b]$ in $\B(I_{0,\Q_p}^{\ad})$. For more details see the end of <cit.>. The claim for $v = p$ follows. For $v = \infty$, let $(T,h)$ be as in <ref>, and let $\bar T: = T/Z_{G,\RR}$. Let $\bar h$ (resp. $\bar \mu_{h}$) be the composition of $h: \mathbb S \to T$ (resp. $\mu_h: \GG_m \to T_{\CC}$) with $T \to \bar T$. Since $\bar T$ is anisotropic, we have $\tatecoh^{-1}(\Gamma_\infty, X_*(\bar T)) = X_*(\bar T)_{\Gamma_\infty}$, and the Tate–Nakayama isomorphism $\tatecoh^{-1}(\Gamma_\infty, X_*(\bar T)) \isom \coh^1(\RR, \bar T)$ is induced by the map

\begin{align*}
X_*(\bar T) & \To Z^1(\RR, \bar T) \\
\lambda & \longmapsto (1\mapsto 1, \tau \mapsto \lambda(-1)),
\end{align*}

where $\tau$ denotes the complex conjugation. By definition, $\eta_\infty$ is represented by the cocycle $(1\mapsto 1, \tau \mapsto \bar h(i))$, whereas $\beta_{\infty}(\fkc)$ is represented by $\mu_h \in X_*(T)$. Thus to verify our claim it suffices to check that $ \bar h(i) = \bar \mu_{h}(-1)$. This follows from the equality $h(i) = \mu_h(-1) w_h(i)$, where $w_h$ is the weight cocharacter of $h$ and factors through $Z_{G,\RR}$.

Write $K$ for $\ker( \pi_1(I_0) \to \pi_1(G ))$.
By the above claim, $\sum_v i_v \circ m_v( \eta_v)$ is equal to the image of $\alpha(\fkc)$ under the composite map

\begin{align*}
\E(I_0,G;
\A/\Q)  \cong &\frac{K_{\Gamma,\tors}                }{ \bigoplus_v \ker( K_{\Gamma_v,\tors} \to \pi_1(I_0)_{\Gamma_v               })} \to \pi_1(I_0)_{\Gamma, \tors}  \to \pi_1(I_0^{\ad})_{\Gamma,\tors},
\end{align*}

where the first isomorphism is as in Proposition <ref>, and the second map is induced by the inclusion $K \hookrightarrow \pi_1(I_0)$. Since $\alpha(\fkc) =0$, we have $ \sum_v i_v \circ m_v( \eta_v) =0$, as desired.

§.§ Stating the point counting formula

Let $(G,X)$ be a Shimura datum, and let $p$ be a prime number. We assume that $G$ is unramified over $\Q_p$, and fix a  reductive model $\cG$ of $G_{\Q_p}$ over $\Z_p$. In the sequel we shall call such a quadruple $(G,X, p , \cG)$ an unramified Shimura datum. Let $E$ be the reflex field of $(G,X)$, and let $\fkp$ and $q=  p^r$ be as in <ref>. In the current case $E_{\fkp}$ is unramified over $\Q_p$, so we identify $E_{\fkp}$ with $\Q_{p^r}$. We write $K_p$ for the hyperspecial subgroup $\cG(\Z_p) \subset G(\Q_p)$.

We fix notations for Hecke algebras. 	For each compact open subgroup $K^p \subset G(\A_f^p)$,
$\cH(G(\A_f^p){\sslash} K^p)$ be the Hecke algebra of $\CC$-valued smooth compactly
supported $K^p$-bi-invariant distributions on $G(\A_f^p
)$. Let $\cH(G(\A_f^p){\sslash} K^p)_{\QQ}$ be the $\QQ$-subalgebra of $\cH(G(\A_f^p){\sslash} K^p)$ consisting of distributions that are rational on characteristic functions of compact open subgroups of $G(\A_f^p)$. Elements of $\cH(G(\A_f^p){\sslash} K^p)$  can be represented as $f^p dg^p$, where $f^p$ is a $\CC$-valued smooth compactly supported $K^p$-bi-invariant function on $G(\A_f^p)$, and $dg^p$ is a Haar measure on $G(\A_f^p)$ assigning rational volumes to compact open subgroups. Elements of $\cH(G(\A_f^p){\sslash} K^p)_{\QQ}$ can similarly be represented as $f^p dg^p$

Fix an irreducible algebraic representation $\xi$ of $G$ over $\ol \QQ$ that factors through $G^c$. Fix a prime number $\ell \neq p$, and view $\xi$ as a representation over $\ol \Q_{\ell}$. As explained in <ref>, we have the $\Gal(\ol E/E) \times G(\A_f)$-module

$$ \coh^i_c(\Sh_{\ol E}, \xi),$$
which is admissible as an $G(\A_f)$-module. For each compact open subgroup $K^p \subset G(\A_f^p)$, we have the induced action of $\cH(G(\A_f^p)\sslash K^p)_{\QQ}$ on the admissible $G(\A_f^p)$-module $\coh^i_c(\Sh_{\ol E}, \xi)^{K_p}$. Fix a decomposition subgroup $D_{\fkp} \subset \Gal(\overline E/E)$ at $\fkp$, and fix an element $\Phi_{\fkp} \in D_{\fkp}$ that lifts the geometric $q$-Frobenius.

For $m \in \ZZ_{\geq 1}$ and $f^p dg^p\in \mathcal H(G(\A_f^p){\sslash} K^p)_{\QQ}$, we define
$$T(\Phi_{\fkp}^m, f^pdg^p): = \sum_{i} (-1)^i \tr \bigg({\Phi}_{\mathfrak p}^m \times (f^p dg^p)  \mid \coh_c^i(\Sh_{\ol{E}},\xi)^{K_p} \bigg)  \in  \ol \Q_{\ell}. $$

Our goal in the rest of this subsection is to state a conjectural formula for the above quantity. In what follows we keep $f^pdg^p$ fixed.

Let $m \in \ZZ_{ \geq 1} $ and let $ n=mr$. Fix $\mathfrak c = (\gamma_0, a, [b]) \in \KP_{\adm}(p^n)$, satisfying $\alpha(\mathfrak c) = 0 $. As in <ref>, $\fkc$ gives rise to a classical Kottwitz parameter $(\gamma_0, \gamma, \delta) \in \KP_{\clsc}(p^n)$ of degree $n$, well defined up to equivalence. Let $I(\fkc)$ be the global inner form of $I_0(\fkc)$ as in Proposition <ref>. Let
$ R : = \Res_{\QQ_{p^n}/\QQ_p} G$, and we view $\delta$ as an element of $R(\Q_p)$. Let $\theta$ be the $\Q_p$-automorphism of $R$ corresponding to the arithmetic $p$-Frobenius $\sigma \in \Gal(\QQ_{p^n}/\QQ_p)$. Let $R_{\delta\rtimes \theta}$ denote the fixed subgroup of $R$ under the automorphism $\Int(\delta) \circ \theta$.

Note that the $\A_f^p$-group $G_{\gamma}^0$ is isomorphic to $I(\fkc)_{\A_f^p}$, and the $\Q_p$-group $R_{\delta\rtimes \theta}^0$ is isomorphic to $I(\fkc)_{\Q_p}$. Moreover, these isomorphisms are canonical up to inner automorphisms defined over $\A_f^p$ and $\Q_p$ respectively. Choose Haar measures $di^p$ on $I(\A_f^p)$ and $di_p$ on $I(\QQ_p)$. They can be transported to  $G_{\gamma}^0 (\A_f^p)$ and  $R_{\delta\rtimes \sigma}^0 (\QQ_p)$ respectively in an unambiguous way. We denote the resulting Haar measures on $G_{\gamma}^0 (\A_f^p)$ and  $R_{\delta\rtimes \sigma}^0 (\QQ_p)$ still by $di^p$ and $di_p$.

Since $r |n$, and since $G$ is quasi-split over $\Q_p$ (as it is unramified), the Hodge cocharacters $\mu_h$ of $h\in X$ determine a $G(\Q_{p^n})$-conjugacy class of cocharacters of $G_{\Q_{p^n}}$, cf. <cit.>. The negative of this conjugacy class of cocharacters (i.e., with all members replaced by their inverses) further determines a $\cG(\Z_{p^n})$-double coset in $G(\Q_{p^n})$ via the Cartan decomposition, and we denote the characteristic function of this double coset by $\phi_n : G(\Q_{p^n}) \to \set{0,1}$ (cf. <cit.>).
We define

\begin{align*}
O (\mathfrak c, m , f^p dg^p , di_p di^p) :=  O_{\gamma} (f^pdg^p)  TO_{\delta} (\phi_n) \in \CC, \end{align*}

where $O_{\gamma} (f^p dg^p)$ is the orbital integral

$$ \int\limits_{G_{\gamma} ^0 (\A_f^p) \backslash G(\A_f^p) } f^p(g^{-1} \gamma g ) \frac{dg^p}{di^p}, $$
and $TO_{\delta} (\phi_n)$ is the twisted orbital integral
$$  \int\limits_{R_{\delta\rtimes \theta}^0 (\QQ_p)  \backslash R(\QQ_p)} \phi_n( r^{-1 } \delta \theta (r) ) \frac{ dr_p} {di_p},$$
with $dr_p$ the Haar measure on $R(\Q_p) = G(\Q_{p^n})$ giving volume $1$ to $\cG(\ZZ_{p^n})$.

As the notation suggests, the dependence of $O(\fkc, m , f^p dg^p, di_p di^p)$ on the two Haar measures $di_p$ and $di^p$ is only via the product measure $di_p di^p$ on $I(\fkc)(\A_f)$. Moreover, if $di_pdi^p$ is rational on compact open subgroups, then $O(\fkc, m , f^p dg^p, di_p di^p)$ lies in $\QQ$. To see this, we may assume that $f^p = 1_{K^p a K^p}$ for a compact open subgroup $K^p \subset G(\A_f^p)$ and some $a\in G(\A_f^p)$, and that each of $dg^p, di_p, di^p$ is rational on compact open subgroups. We then know that $O_\gamma(f^pdg^p)$ lies in $\QQ$ by adapting <cit.> from the local setting to the adelic setting.[Our definition of the orbital integral equals $[G_{\gamma}(\A_f^p) : G_{\gamma}^0(\A_f^p)]$ times the adelic integral analogous to <cit.>.] Similarly, we have $TO_{\delta}(\phi_n) \in \QQ$ by a formula similar to <cit.>, cf. the proof of <cit.>.

Up to normalizations of the Haar measures on $G_{\gamma}^0(\A_f^p)$ and $R_{\delta \rtimes \theta} ^0 (\Q_p)$, the dependence of $O(\fkc, m , f^pdg^p, di_p di^p)$ on $\fkc$ is only via $(\gamma,\delta)$. However for later purposes it is important to normalize these Haar measures by choosing a Haar measure on $I(\fkc)(\A_f)$. Note that the classical Kottwitz parameter $(\gamma_0,\gamma,\delta)$ alone does not determine the global inner form $I(\fkc)$ of $G_{\gamma_0}^0$ (unless $G_{\der}$ is simply connected), so this way of normalization only makes sense with the presence of $\fkc$.

Let $I$ be a connected reductive group over $\Q$, and let $Z$ be a $\Q$-subgroup of $Z_I$. Assume that $I/Z$ is anisotropic over $\RR$. Then for any open subgroup $U \subset Z(\A_f)$, $I(\Q)U$ is a closed subgroup of $I(\A_f). $

We write $\bar I$ for $I/Z$.
Since $\bar I$ is anisotropic over $\RR$, and since $\bar I(\Q)$ is discrete in $\bar I(\A)$, we know that $\bar I(\Q)$ is a discrete (and hence closed) subgroup of $\bar I(\A_f)$. Let $f$ denote the map $I(\A_f) \to \bar I(\A_f)$. Let $V : = f^{-1} (\bar I(\Q) )$. Then $Z(\A_f) = f^{-1}(\set{1})$ is open in $V$, and $V$ is closed in $I(\A_f)$. Since $U$ is open in $Z(\A_f)$, it is open in $V$. Hence $I(\Q)U$ is an open subgroup of $V$, and therefore closed in $V$. We have seen that $V$ is closed in $I(\A_f)$, so $I(\Q) U$ is closed in $I(\A_f)$.

Keep the setting of <ref>. As in <ref>, for each compact open subgroup $K^p\subset G(\A_f)$ we write $Z_{K_pK^p}$ for $Z_G(\A_f) \cap K_p K^p$, and write $Z(\Q)_{K_pK^p}$ for $Z_G(\Q) \cap K_pK^p$. Since $Z: = Z_G$ and $I : = I(\fkc)$ satisfy the assumptions in Lemma <ref>, we know that $I(\fkc)(\Q)Z_{K_pK^p}$ is a closed subgroup of $I(\fkc)(\A_f)$. Recall from <cit.> that $I(\fkc)(\Q) \backslash I(\fkc)(\A_f)/U$ is finite for every compact open subgroup $U \subset I(\A_f)$. It follows that $I(\fkc)(\Q) Z_{K_pK^p} \backslash I(\fkc)(\A_f)$ is compact Hausdorff. We equip $I(\fkc)(\A_f)$ with the Haar measure $di_p di^p$, and equip $I(\fkc)(\Q)  Z_{K_pK^p}$ with the Haar measure that gives volume $1$ to its open subgroup $I(\fkc)(\Q) Z_{K_pK^p}$. Then $I(\fkc)(\Q) Z_{K_pK^p}\backslash I(\fkc)(\A_f)$ has finite volume under the quotient measure, and we denote this volume by
$$c_1(\fkc, K^p, di_p di^p). $$

We also define

$$ c_2(\fkc) = c_2 (\gamma_0):= \abs{\Sha_G(\QQ, G_{\gamma_0}^0)}. $$

Note that the product
$$ c_1(\fkc , K^p, di_p di^p) O(\fkc, m , f^p dg^p, di_p di^p)$$
is independent of $di_p di^p$. Combined with Remark <ref>, this implies that the above product lies in $\QQ$. In the sequel, we shall denote this product simply by

$$ c_1(\fkc , K^p ) O(\fkc, m , f^p dg^p) \in \QQ .$$

Let $\SigmaREllip(G)$ be the set of stable conjugacy classes of semi-simple, $\RR$-elliptic elements of $G(\QQ)$. (This is well defined, since $\RR$-elliptic maximal tori transfer between inner forms of reductive groups over $\RR$.) We fix a compact open subgroup $K^p \subset G(\A_f^p)$ such that $K_p K^p$ is neat and such that $f^p$ is $K^p$-bi-invariant. We fix a subset $\Sigma_{K^p}$ of $G(\Q)$ such that each $Z(\QQ) _{K_pK^p}$-translation-orbit in $\Sigma_{\RR \text{-} \el}(G)$ is represented by exactly one element of $\Sigma_{K^p}$.

For each $\gamma_0 \in \Sigma_{K^p}$, we write $\KP(\gamma_0)$ for the set of $\fkc \in \KP$ whose first component is $\gamma_0$.

For any reductive group $H$ over $\QQ$ and any $\epsilon \in H(\QQ)_{\semi}$, we know that $(H_{\epsilon}/ H_{\epsilon}^0)(\Qbar)$ is isomorphic to a subgroup of the abelian group $\pi_1(H_{\der})$ by <cit.>. It follows that $H_{\epsilon}/ H_{\epsilon}^0$ is a finite commutative algebraic group over $\QQ$. We define

\begin{align*}
\iota_H(\epsilon) & : = [H_{\epsilon} (\QQ) : H_{\epsilon} ^0 (\QQ)], \\
\bar \iota _H (\epsilon) &: = \abs{  (H_{\epsilon} / H_{\epsilon} ^0 )(\QQ)  }.
\end{align*}

For all sufficiently large integers $m$ (in a way depending on $f^pdg^p$), we have

\begin{multline}\label{pcf}
T(\Phi_{\fkp}^m, f^p dg^p) \\  =  \sum_{\gamma_0\in \Sigma_{K^p}}  \bar \iota_G (\gamma_0) ^{-1}  c_2(\gamma_0)  \tr \xi (\gamma_0)  \sum_{\substack{\fkc \in \KP(\gamma_0) \cap \KP_{\adm}(p^n) \\ \alpha(\fkc) = 0 }} c_1 (\fkc,K^p) O(\fkc, m , f^pdg^p). \end{multline}

On the right hand side of (<ref>), each summand indexed by $\gamma_0$ is of the form $\tr \xi (\gamma_0)$ (which lies in $\Qbar$) times a rational number, by the discussion at the end of <ref>. Hence the right hand side of (<ref>) in fact lies in the smallest number field containing $\set{\tr \xi (\gamma_0)\mid \gamma_0 \in \Sigma_{K^p}}$.
When $G_{\der}$ is simply connected and $Z_G$ is cuspidal, the right hand side of (<ref>) recovers the formula conjectured by Kottwitz in <cit.>. We have formulated the conjecture only for $m$ sufficiently large, in anticipation of the fact that the local terms in the Grothendieck–Lefschetz–Verdier formula are equal to the naive local terms (i.e., Deligne's conjecture) only for $m$ sufficiently large. For applications, it is important (and usually sufficient) to know that (<ref>) holds for all sufficiently large $m$, not just all sufficiently divisible $m$.

§ VARIANTS OF THE LANGLANDS–RAPOPORT CONJECTURE

§.§ The formalism of Galois gerbs

The Langlands–Rapoport Conjecture, in its original form in [91], is formulated using Galois gerbs.
In this subsection we recall the basic definitions in the formalism of Galois gerbs. We mainly follow <cit.>, while we make some corrections (see especially Remark <ref>) and provide some complementary explanations.

In the following, let $k'/k$ be a Galois extension of fields of characteristic zero.

By a $k'/k$-Galois gerb, we mean a pair $(G, \G)$, where $G$ is a connected linear algebraic group over $k'$, and $\G$ is an extension of topological groups
$$1 \to  (G(k'),\text{discrete topology}) \to  \G \to \Gal(k'/k)  \to 1  $$
satisfying the following conditions.

* For each $g \in \G$, there is a  $k'$-group isomorphism $g^{\alg} : \tau^* G \to G$, where $\tau$ is the image of $g$ in  $\Gal(k'/k)$, such that the conjugation action of $g$ on $G(k')$ is given by $G(k') \xrightarrow{\tau} (\tau^*G)(k')\xrightarrow{g^{\alg}} G(k')$.

* There exists a continuous group theoretic section of $\G \to \Gal(k'/k)$ defined on an open subgroup of $\Gal(k'/k)$.
We often write $\G$ for a $k'/k$-Galois gerb $(G,\G)$, and write $\G^{\Delta}$ for $G$, called the kernel of $\G$. 	A morphism between two $k'/k$-Galois gerbs $\G_1$ and $\G_2$ is a pair $(\phi^{\Delta}, \phi)$ consisting of a $k'$-homomorphism $\phi^{\Delta}: \G_1^{\Delta} \to \G_2^{\Delta}$ and a continuous homomorphism $\phi: \G_1 \to \G_2$ satisfying the following conditions.

(a)  $\phi$ commutes with the maps $\G_i \to \Gal(k'/k)$.

(b) The restriction of $\phi$ to $\G_1^{\Delta}(k')$ is given by  $\phi^{\Delta}$.
We write $\redgb(k'/k)$ for the category of $k'/k$-Galois gerbs.

The assumption in Definition <ref> that $G$ is connected is missing in <cit.>, and should be added. This assumption implies that $G(k')$ is Zariski dense in $G$ (see <cit.>). In particular, each $g\in \G$ uniquely determines the isomorphism $g^{\alg}$, which is vital for various constructions. Another consequence is that for a morphism  $(\phi^{\Delta}, \phi): \G_1 \to \G_2$ between $k'/k$-Galois gerbs, $\phi^{\Delta}$ is uniquely determined by $\phi$. For this reason we can view $\phi$ alone as a morphism $\G_1 \to \G_2$.

Let $\G \in \redgb(k'/k)$. Then all continuous group theoretic sections of $\G \to \Gal(k'/k)$ defined on open subgroups of $\Gal(k'/k)$ belong to the same germ. Moreover, this germ can be extended to a continuous set theoretic section of $\G \to \Gal(k'/k)$ defined on the whole $\Gal(k'/k)$.

Let $G$ be a connected linear algebraic group over $k$. Let $\G_G$ be the split extension $G(k')\rtimes \Gal(k'/k)$, where $\Gal(k'/k)$ acts naturally on $G(k')$. Then $(G_{k'}, \G_G) \in \redgb(k'/k)$, and it is called the neutral $k'/k$-Galois gerb associated with $G$.

Let $\G \in \redgb(k'/k)$. For each $g \in \G^{\Delta}(k')$, conjugation by $g$ induces an automorphism  $\Int(g)$ of $\G$. Let $\phi, \psi: \gH \to  \G$ be two morphisms in $\redgb(k'/k)$. We say that $\phi$ and $\psi$ are conjugate (or $\G^{\Delta}(k')$-conjugate, for clarity), if there exists $g\in \G^{\Delta}(k')$ such that $\phi = \Int(g) \circ \psi$.

Let $\phi: \gH \to \G$ be a morphism in $\redgb(k'/k)$. A $k$-algebraic group $I_{\phi}$ is defined in <cit.>[The assumption in <cit.> that the target of $\phi$ is a neutral gerb is not needed.]. We have a canonical identification between  $I_{\phi,k'}$ and the centralizer $\G^{\Delta}_{\phi^{\Delta}}$ of $\im(\phi^{\Delta})$ in $\G^{\Delta}$. Under this identification, $I_{\phi}(k)$ is the group of $g \in \G^{\Delta}(k')$ such that $\Int(g) \circ \phi = \phi$.
Moreover, if we choose a continuous set theoretic section $\Gal(k'/k) \to \gH, \tau \mapsto q_{\tau}$ of $\gH \to \Gal(k'/k)$, then the action of $\tau \in \Gal(k'/k)$ on $I_{\phi}(k') \cong \G^{\Delta}_{\phi^{\Delta}}(k')$ with respect to the $k$-form $I_{\phi}$ is induced by conjugation by $\phi(q_{\tau})$ inside $\gG$.

In fact, the axioms for $k'/k$-Galois-gerbs guarantee that the above  description of the $\Gal(k'/k)$-action on $\G^{\Delta}_{\phi^{\Delta}}(k')$ can be naturally upgraded to a $k'/k$-Galois descent datum that gives the $k$-form $I_{\phi}$ of the $k'$-group $\G^{\Delta}_{\phi^{\Delta}}$. We refer the reader to the proof of <cit.> for more details. Here we only remark that the cocycle condition for the descent datum amounts to the fact that for all $\tau, \rho \in \Gal(k'/k)$, $\phi(q_{\tau} q_{\rho} q_{\tau \rho}^{-1})$ lies in $(\im \phi^{\Delta} )(k')$, and hence lies in the center of $\G^{\Delta}_{\phi^{\Delta}}$.

If $\zeta: \mathfrak K \to \mathfrak H$ and $\phi : \gH \to \gG$ are two morphisms in $\redgb(k'/k)$, then the inclusion $ \G^{\Delta}_{\phi^{\Delta}} \hookrightarrow \G^{\Delta}_{(\phi \circ \zeta)^{\Delta}}$ induces an injective $k$-homomorphism

\begin{align}\label{eq:enlarge I}
I_{\phi} \hookrightarrow I_{\phi \circ \zeta} .
\end{align}

If $\phi:\gH \to \G_G$ is a morphism in $\redgb(k'/k)$ with $G$ a connected linear algebraic group over $k$, then $I_{\phi}$ contains $Z_G$ as a $k$-subgroup.

Let $\G \in \redgb(k'/k)$, and let $\phi$ be the identity $\G \to \G$. Then $I_{\phi}$ is a canonical $k$-form of $\G^{\Delta}_{\phi^{\Delta}} = Z_{\G^{\Delta}}$. In particular, if $\G^{\Delta}$ is a torus, then we have a canonical $k$-form of $\G^{\Delta}$.

Let $\phi : \gH \to \G_G$ be a morphism in $\redgb(k'/k)$, where the target is a neutral gerb associated with a reductive group $G$ over $k$. We assume that  $\gH^{\Delta}$ is a torus. In this situation we define $k$-groups $I_{\phi}^{\dagger}$ and $\tilde I_{\phi}$ that are closely related to $I_{\phi}$.

Let $M : = G_{k', \phi^{\Delta}}$. Then $M$ is a $k'$-subgroup of $G_{k'}$ whose base change to an algebraic closure of $k'$ becomes a Levi subgroup. Let $M^{\dagger} : = M \cap G_{\der, k'}$, and let $\tilde M$ be the inverse image of $M^{\dagger}$ in $G_{\sconn, k'}$. Then $M$, $M^{\dagger}$, and $\tilde M$ are reductive groups over $k'$, and the natural maps $\tilde M \to M^{\dagger} \to M$ induce isomorphisms between the respective adjoint groups.

The usual conjugation action of $G(k')$ on $ G_{\sconn}(k') $ together with the natural action of $\Gal(k'/k)$ on $G_{\sconn}(k')$ gives rise to an action of $\G_G = G(k')\rtimes \Gal(k'/k)$ on $G_{\sconn}(k')$, which we denote by $\Int_G^{G_{\sconn}}$. Choose a continuous set theoretic section $\Gal(k'/k) \to \gH, \tau \mapsto q_{\tau}$ of $\gH \to \Gal(k'/k)$. We define $\widetilde I_{\phi}$ to be the $k$-form of $\widetilde M$ corresponding to the following $\Gal(k'/k)$-action on $\widetilde M(k')$: Each $\tau \in \Gal(k'/k)$ acts by $\Int_G^{G_{\sconn}}(\phi(q_{\tau}))$. More precisely, just as the definition of $I_{\phi}$ via Galois descent discussed in <ref>, this Galois action can be naturally upgraded to a $k'/k$-Galois descent datum on $\widetilde M$. The cocycle condition in the current context amounts to the requirement that for all $\tau, \rho \in \Gal(k'/k)$, $\Int_{G}^{G_{\sconn}} (\phi(q_{\tau} q_{\rho} q_{\tau \rho}^{-1}))$ acts trivially on $\widetilde M$. This is indeed true, because $\phi(q_{\tau} q_{\rho} q_{\tau \rho}^{-1})$ lies in $Z_M$, and any element of $Z_M$ acts trivially on $\widetilde M$ via $\Int_G^{G_{\sconn}}$. Using the same principle, one sees that the Galois descent datum does not depend on the choice of $\tau \mapsto q_{\tau}$. Thus we obtain the $k$-group $\widetilde I_{\phi}$ canonically.

In the same way we define a $k$-form $I_{\phi}^{\dagger}$ of $M^{\dagger}$. The natural $k'$-homomorphism $\tilde M \to M^{\dagger} \hookrightarrow M $ induce $k$-homomorphisms $\tilde I_{\phi} \to I_{\phi}^{\dagger} \hookrightarrow  I_{\phi}$ between reductive groups.  Note that the composite $k'$-homomorphism $I_{\phi, k'} \hookrightarrow G_{k'} \to G^{\ab}_{k'}$ is defined over $k$, and its kernel is naturally identified with $I_{\phi}^{\dagger}$.

Let $l'/l$ be another Galois extension of fields of characteristic zero, equipped with compatible embeddings $k\hookrightarrow l$ and $k'\hookrightarrow l'$. In this situation we have the pull-back functor

\begin{align}\label{eq:gbBC}
\gbBC: \redgb(k'/k)  & \To \redgb (l'/l).
\end{align}

We explain its definition.

We first define $\gbBC$ of an object. Let $\G \in \redgb(k'/k)$, with kernel $G$. We have a short exact sequence

\begin{align*}
1 \to G(k') \to \G_{l'/l}^0 \to \Gal(l'/l) \to 1,\end{align*}
where $\G_{l'/l}^0$ is the fiber product $\G \times _{\Gal(k'/k)} \Gal(l'/l)$ in the category of topological groups. The above short exact sequence is in fact an extension of topological groups, which follows easily from Remark <ref>.

Given any $g \in \G_{l'/l}^0$ with image $\tau \in \Gal(l'/l)$, the conjugation action of $g$ on $G(k')$ is induced by a $k'$-isomorphism $(\tau|_{k'})^* G \isom G$ uniquely determined by $g$ (i.e., the isomorphism $h^{\alg}$, where $h$ is the image of $g$ in $\G$). The last $k'$-isomorphism induces an $l'$-isomorphism $u_g: \tau^* (G_{l'}) \isom G_{l'}$, and in particular an automorphism of $G(l')$ given by
$$G(l') = G_{l'}(l') \xrightarrow{\tau} (\tau^* G_{l'}) (l') \xrightarrow{u_g} G_{l'}(l') = G(l') . $$
In this way we obtain an action of $\G_{l'/l}^0$ on $G(l')$ via group automorphisms.

Let $\G_{l'/l}$ be the quotient group $(G(l') \rtimes \G_{l'/l}^0 )/  \set{ x \rtimes x^{-1} \mid x \in G(k')}$. We shall denote elements of $\G_{l'/l}$ by $[x, (u,\tau)]$, for $x \in G(l'), (u,\tau) \in \G_{l'/l}^0$. We have a short exact sequence

\begin{align}\label{eq:new ext}
1 \to G(l') \xrightarrow{x \mapsto [x, (1,1)]}  \G_{l'/l} \xrightarrow{[x,(u,\tau)] \mapsto \tau} \Gal(l'/l) \to 1.\end{align}

We equip $\G_{l'/l}$ with the quotient topology of the product topology on $G(l') \rtimes \G^0_{l'/l}$. (As always, $G(l')$ has the discrete topology.) Then $\G_{l'/l}$ is a topological group, and (<ref>) is an extension of topological groups. One checks that  $(G_{l'},\G_{l'/l}) \in \redgb(l'/l)$. We define $\gbBC(\G)$ to be $(G_{l'}, \G_{l'/l})$.

We now define $\gbBC$ of a morphism. Given any morphism $\phi: \G \to \gH$ in $\redgb(k'/k)$, we define $\gbBC(\phi)$ to be $ (\phi^{\Delta}, \phi_{l'/l}) : \gbBC(\gG) \to \gbBC(\gH)$, where $\phi_{l'/l}$ is given by

\begin{align*}
\phi_{l'/l}: \G_{l'/l} & \To \gH_{l'/l} \\
[x, (u,\tau)] & \longmapsto [\phi^{\Delta}(x), (\phi(u), \tau)], \quad x \in G(l'), (u,\tau) \in \G^0_{l'/l}.
\end{align*}
This concludes the definition of the functor $\gbBC$.

Note that for $\G \in \redgb(k'/k)$, there is a canonical group homomorphism

\begin{align*}
\varsigma_{\can}^{\G} : \Gal(l'/lk') \To \G_{l'/l}  , \quad
\tau \longmapsto [1, (1, \tau)],
\end{align*}

which is a section of $\G_{l'/l} \to \Gal(l'/l).$

Keep the setting of <ref>, and assume in addition that $l = k$. Let $\G, \mathfrak H \in \redgb(k'/k)$.
A morphism $\psi : \gbBC(\gG) \to \gbBC(\gH)$ is of the form $\gbBC(\phi)$ for some morphism $\phi : \G \to \mathfrak H$ if and only if $\psi \circ \varsigma_{\can}^{\G} = \varsigma_{\can}^{\mathfrak H}$. Moreover, when this is the case, $\phi$ is unique.

The “only if” part is trivial. We show the “if” part.

From the hypothesis on $\psi$, it follows that $\psi^{\Delta}$ is the base change to $l'$ of a $k'$-homomorphism $\phi^{\Delta}: \G^{\Delta} \to \gH^{\Delta}$, and that $\psi [1, (u,\tau)]$ is of the form
$[1, (\phi(u), \tau)]$ for some function $\phi : \G \to \mathfrak H$. We now check that $(\phi^{\Delta}, \phi)$ is a morphism in $\redgb(k'/k)$. In fact, only the continuity of $\phi$ is non-obvious. For this, we observe that the map $\gH^0_{l'/l} \to \gH^{\Delta}(l') \rtimes \gH^0_{l'/l}, (u,\tau) \mapsto (1, u,\tau)$ is continuous and open, since $\gH^{\Delta}(l')$ is discrete. Hence the induced injective map $\gH^0_{l'/l} \to \gH_{l'/l}$ is also continuous and open, i.e., a homeomorphism onto its image. It follows that the map $\G^0_{l'/l} \to \gH^0_{l'/l}, (u,\tau) \to (\phi(u),\tau)$ is continuous. The continuity of $\phi$ then follows from the openness of the map $\Gal(l'/l)  \to \Gal(k'/k)$.

Given that $(\phi^{\Delta}, \phi)$ is a morphism, it is clear that $\psi=\gbBC(\phi)$.

Finally, we show that if $\psi=\gbBC(\phi)$ then $\phi$ is unique. Suppose $\phi_1$ also satisfies the condition. Then

$$ \psi[1,(u,\tau)]  = [1, (\phi(u), \tau)]  = [1, (\phi_1(u),\tau)], $$
and in particular $\phi(u) = \phi_1(u)$, for all $(u,\tau) \in \G_{l'/l}^0$. Since the projection $\G_{l'/l}^0 \to \G, (u,\tau) \mapsto u$ is surjective, we have $\phi = \phi_1$.

Let $\proredgb(k'/k)$ be the category whose objects are projective systems $(\G_i)_{i\in I}$ in $\redgb(k'/k)$ indexed by directed sets $(I,\leq)$ and whose morphisms are given by

$$\Hom_{\proredgb(k'/k)}((\G_i)_{i\in I}, (\mathfrak H_j)_{j\in J}) : = \varprojlim_{j \in J} \varinjlim_{i\in I}  \Hom_{\redgb(k'/k)} (\G_i, \mathfrak H_j). $$
Objects of $\proredgb(k'/k)$ are called pro-$k'/k$-Galois gerbs. We view $\redgb(k'/k)$ naturally as a full subcategory of $\proredgb(k'/k)$. When we are in the situation of <ref>, the pull-back functor (<ref>) naturally extends to a functor $\proredgb(k'/k) \to \proredgb(l'/l)$, which we still call pull-back.

Let $\G = (\G_i)_{i\in I} \in \proredgb(k'/k)$. Then we can take the projective limit $\G^{\Delta} : = \varprojlim_{i} \G_i^{\Delta}$ in the category of affine $k'$-group schemes, and take the projective limit $\G^{\topo}: = \varprojlim_{i} \G_i$ in the category of topological groups.
If $\phi : \G \to \mathfrak H$ is a morphism in $\proredgb(k'/k)$, then $\phi$ naturally induces a homomorphism of affine $k'$-group schemes $\phi^{\Delta}: \G^{\Delta} \to \mathfrak H^{\Delta}$, and a continuous homomorphism $\phi^{\topo} : \G^{\topo} \to \mathfrak H^{\topo}$. In the sequel, if $d$ is an element of $\G^{\topo}$, we shall simply write $d\in \G$. Also, we shall simply write $\phi(d) \in \mathfrak H$ for $\phi^{\topo}(d) \in \mathfrak H^{\topo}$.

The following definition generalizes Definition <ref>.
Let $\gH = (\gH_i)_{i\in I} \in \proredgb(k'/k), \gG \in \redgb(k'/k)$, and let $\phi ,\psi  : \gH \to \G$ be two morphisms in $\proredgb(k'/k)$. We say that $\phi$ and $\psi$ are conjugate (or $\G^{\Delta}(k')$-conjugate) if there exists $g \in  \G^{\Delta}(k')$ such that $\psi = \Int(g) \circ \phi$ as morphisms in $\proredgb(k'/k)$.

Let $\gH= (\gH_i)_{i\in I} \in \proredgb(k'/k), \G \in \redgb(k'/k)$, and let $\phi : \gH \to \G$ be a morphism in $\proredgb(k'/k)$. We now define $I_{\phi}$, generalizing the definition in <ref>.

Choose $i_0 \in I$ such that $\phi$ is induced by a morphism $\phi_{i_0} : \gH_{i_0} \to \G$. For each $i \in I$ with $i \geq i_0$, let $\phi_i$ be the composition $\gH_i \to \gH_{i_0} \xrightarrow{\phi_{i_0}} \G$. For $ j  \geq i \geq i_0$, there is a natural $k$-homomorphism $I_{\phi_i} \to I_{\phi_j}$ as in (<ref>), whose base change to $k'$ is identified with the inclusion map $\G^{\Delta}_{\phi_i^{\Delta}} \to \G^{\Delta}_{\phi_j^{\Delta}}$. For sufficiently large $i$, the decreasing subgroups $\im(\phi_i^{\Delta})$ of $\G^{\Delta}$ stabilize, since $\G^{\Delta}$ is noetherian. Hence $\G^{\Delta}_{\phi_i^{\Delta}}$ and $I_{\phi_i}$ also stabilize. We can thus define

\begin{align*}
\im(\phi^{\Delta}) & : =  \im(\phi_i^\Delta) , \\
\G^{\Delta}_{\phi^{\Delta}} & : = \G^{\Delta}_{\phi^{\Delta}_i} , \\
I_{\phi} & : = I_{\phi_i},
\end{align*}
for $i\in I$ sufficiently large. Clearly these definitions are independent of the initial choices of $i_0$ and $\phi_{i_0}$.

By construction, $I_{\phi, k'}$ is canonically identified with $\G^{\Delta}_{\phi^{\Delta}}$. It is also easy to see that $I_{\phi}(k)$ precisely consists of those $g\in \G^{\Delta}(k')$ such that $\Int(g) \circ \phi = \phi$ (as morphisms in $\proredgb(k'/k)$).

If $\G = \G_G$ for some reductive group $G$ over $k$, and if $\gH^{\Delta}_i$ are tori for all $i\in I$, then we also extend the definitions of $I_{\phi}^{\dagger}$ and $\tilde I_{\phi}$ in <ref> to the present case, in the obvious way. In this case, each of $I_{\phi}, I_{\phi}^{\dagger}, \tilde I_{\phi}$ is a reductive group. The group $I_{\phi}$ has the same absolute rank as $G$, and contains $Z_G$ as a $\Q$-subgroup.

Let $\gH, \G, \phi$ be as at the beginning of <ref>. Given a continuous 1-cocycle $a = (a_{\rho}) \in Z^1(k'/k, I_{\phi}(k'))$, there is a morphism $a\phi : \gH \to \G$ defined as follows. Choose $i\in I$ such that $\phi$ is induced by some $\phi_i : \gH_i \to \G$ and such that $I_{\phi} = I_{\phi_i}$. Denote by $\pi$ the structural map $\gH_i \to \Gal(k'/k)$. We define

$$ a\phi_i : \gH_i \To \G, \quad g \longmapsto a_{\pi(g)} \phi_i(g). $$

Here, we view $a_{\pi(g)} \in I_{\phi}(k')$ as an element of $\G^{\Delta}(k') \subset \G$ via the canonical embedding $I_{\phi,k'} \hookrightarrow  \G^{\Delta}$. Then $a\phi_i$ is a morphism in $\redgb(k'/k)$, and we define $a\phi$ to be the morphism induced by $a\phi_i$. This definition is independent of choices.

In the setting of <ref>, the map $a \mapsto a \phi$ is a bijection from $Z^1(k'/k, I_{\phi}(k'))$ to the set of morphisms $\phi': \gH \to \G$ such that $\phi^{\prime, \Delta} = \phi^{\Delta}$. Moreover, for $a, a' \in Z^1(k'/k, I_{\phi}(k'))$, we have $a\phi$ is conjugate to $a'\phi$ if and only if $a $ is cohomologous to $a'$.

Since $\G^{\Delta}$ is finitely presented over $k'$, the natural map

$$ \varinjlim_{i} \Hom_{k'}(\gH_i^{\Delta} , G_{k'}) \To \Hom _{k'} (\gH^{\Delta} , G_{k'})$$
is a bijection. Here $\Hom_{k'}$ denotes the set of homomorphisms of $k'$-group schemes. The lemma then reduces to the case where $\gH$ is in $\redgb(k'/k)$. In this case the proof is exactly the same as the proof of part (2) of  <cit.>.

For $a$ and $\phi$ as in <ref>, we call $a\phi$ the twist of $\phi$ by $a$. Similarly, for a class $\beta \in \coh^1(k'/k, I_{\phi}(k'))$, we define the twist of $\phi$ by $\beta$, denoted by $\phi^{\beta}$, to be the conjugacy class of $a \phi$ where $a$ is any cocycle representing $\beta$. This is well defined by Lemma <ref>.[Since we define $\phi^{\beta}$ to be the whole conjugacy class, its members are not necessarily of the form $a\phi$ for any $a \in Z^1(k'/k, I_{\phi}(k'))$.] We shall sometimes also write $\phi^{\beta}$ for an unspecified member of this conjugacy class.

We explain how to obtain Galois gerbs from Reimann's explicit cocycle construction in <cit.>. We first sketch the idea behind the construction informally. Let $\G \in \redgb(k'/k)$. Suppose that there is a continuous set theoretic section $\varsigma : \Gal(k'/k) \to \G$ of $\G \to \Gal(k'/k)$ such that $\varsigma(\rho) \varsigma(\tau) \varsigma(\rho \tau)^{-1}$ lies in $Z_{\G^{\Delta}}(k')$ for all $\rho ,\tau \in \Gal(k'/k)$. Then the isomorphisms $(\varsigma(\tau))^{\alg} : \tau^* \G^{\Delta} \isom \G^{\Delta}$ for $\tau \in \Gal(k'/k)$ form a $k'/k$-Galois descent datum. Let $G$ be the corresponding $k$-form of $\G^{\Delta}$. Then the isomorphism class of $\G$ can be recovered from $G$ and the map $\Gal(k'/k) \times \Gal(k'/k) \to Z_G(k'), (\rho, \tau) \mapsto \varsigma(\rho) \varsigma(\tau) \varsigma(\rho \tau)^{-1}$, which is in fact a continuous $2$-cocycle.

We now give the formal construction. First we define a category $ \cR(k'/k)$. The objects are pairs $(G,z)$, where $G$ is a connected linear algebraic group over $k$, and $z = (z_{\rho,\tau})$ is a continuous $2$-cocycle $\Gal(k'/k) \times \Gal(k'/k) \to  Z_G(k')$ satisfying $z_{1,1} = 1$. A morphism $(G',z') \to (G,z)$ is a pair $(\phi^{\Delta}, f)$, where $\phi^{\Delta}: G'_{k'} \to G_{k'}$ is a homomorphism of $k'$-groups, and $f = (f_{\rho})$ is a continuous $1$-cochain $\Gal(k'/k) \to  G(k')$ satisfying

\begin{align*}
z_{\rho,\tau} f_\rho \lix^{\rho} f_{\tau} f_{\rho\tau}^{-1} &  = \phi^{\Delta}(z'_{\rho,\tau}), \\
\Int(f_{\rho}) \circ \rho^* (\phi^{\Delta}) & = \phi^{\Delta},
\end{align*}

for all $\rho ,\tau \in \Gal(k'/k)$. (In particular, $f_1 =1$.) The composition of morphisms is given by

$$(\phi^{\Delta}, f) \circ (\psi^{\Delta}, h) : =  (\phi^{\Delta} \circ \psi^{\Delta}, ( \phi^{\Delta}(h_{\rho}) f_{\rho}) _{\rho}). $$

We define a fully faithful functor

\begin{align}\label{eq:functor E}
\cE: \cR(k'/k) \To  \redgb(k'/k).	\end{align}

Let $(G,z) \in  \cR(k'/k)$. To define $\cE(G,z)$, we let $\G : = G(k') \times \Gal(k'/k)$, equipped with the product topology. Define a binary operation on $\G$ by

$$ (g ,\rho) \cdot (h, \tau) : = (g \rho(h) z_{\rho,\tau}, \rho \tau).$$
Then $(\G,\cdot)$ is a topological group, and the maps $G(k') \to \G, g \mapsto (g,1)$ and $\G \to \Gal(k'/k), (g,\rho) \mapsto \rho$ make $\G$ a topological group extension of $\Gal(k'/k)$ by $G(k')$. Then $(G_{k'}, \G) \in \redgb(k'/k)$. (To check condition (ii) in Definition <ref>, use that $z_{\rho,\tau} =1$ for all $\rho,\tau$ sufficiently close to $1$.) We define $\cE(G,z)$ to be $(G_{k'}, \G)$.

For a morphism $(\phi^{\Delta}, f): (G',z') \to (G,z)$ in $\cR(k'/k)$, we define

\begin{align*}
\cE(\phi^{\Delta}, f) : \cE(G',z')  = G'(k') \times \Gal(k'/k) & \To \cE(G,z) = G(k') \times \Gal(k'/k) \\
(g',\rho) & \longmapsto (\phi^{\Delta}(g') f_\rho, \rho).
\end{align*}
This completes the definition of the functor $\cE$. We omit the proof that $\cE$ is fully faithful, since this fact will not be used.

Analogous to Definition <ref>, we consider the category $\proR(k'/k)$ of pro-objects in $\cR(k'/k)$ indexed by directed sets. The functor (<ref>) naturally extends to a functor

\begin{align}\label{eq:functor E pro}
\cE : \proR(k'/k) \To \proredgb(k'/k)\end{align}

which is also fully faithful.

In <cit.>, various affine groupoids are defined, which are needed for the correct formulation of the Langlands–Rapoport Conjecture. There is a functor from $\proR(k'/k)$ to the category of affine $k'/k$-groupoids, and Reimann obtains the desired groupoids by constructing explicit objects in $\proR(k'/k)$ (for suitable $k'/k$). In the present paper, we shall not need affine groupoids, but we shall import Reimann's explicit constructions and obtain pro-Galois gerbs via the functor (<ref>). This is the same as the point of view taken in [53].

§.§ The Dieudonné gerb and the quasi-motivic gerb

Fix a prime $p$. We recall the definition of the Dieudonné gerb in terms of the functor (<ref>), cf. <cit.>. For each $n \in \Z_{\geq 1}$, let $\kappa_n : \Gal(\Q_p^{\ur}/\Q_p) \times \Gal(\Q_p^{\ur}/\Q_p) \to \ZZ$ be the unique continuous function satisfying

$$ \kappa_n (\sigma^i , \sigma^j) =
\lfloor i/n \rfloor + \lfloor j/n\rfloor - \lfloor (i+j)/n\rfloor, \quad \forall i,j \in \ZZ. $$
Here $\sigma$ denotes the arithmetic $p$-Frobenius as usual. Let $\mathcal D_n$ be the object in $\cR(\Q_p^{\ur}/\Q_p)$ given by
$(\GG_m, ( p^{\kappa_n(\rho,\tau)})_{\rho ,\tau } ).$ For $n , n
' \in \ZZ_{\geq 1}$ with $n|n'$, let $\lambda_{n,n'} : \Gal(\Q_p^{\ur}/\Q_p) \to \ZZ$ be the unique continuous function satisfying

$$\lambda_{n,n'} (\sigma ^i) = \lfloor i/n' \rfloor n'/n - \lfloor i/n \rfloor, \quad \forall i \in \ZZ. $$
Let $\delta_{n',n} : \mathcal D_{n'} \to \mathcal D_n$ be the morphism in $\cR(\Q_p^{\ur} / \Q_p)$ given by
$$(x \mapsto x^{n'/n} , (p^{\lambda_{n,n'}(\rho)})_{\rho}). $$
Then $(\mathcal D_n)_{n\in \ZZ_{\geq 1}}$ equipped with the transition morphisms $\delta_{n',n}$ is an object in $\proR(\Q_p^{\ur}/\Q_p)$.

Applying the functor (<ref>) to $(\mathcal D_n)_{n}$, we obtain an object $\D= (\D_n)_n = (\mathcal E(\mathcal D_n))_n $ in $\proredgb(\Q_p^{\ur}/\Q_p)$. This is called the Dieudonné gerb.

We denote by $\mathbb D$ the pro-torus $\varprojlim_{n \in \ZZ_{\geq 1}} \GG_{m}$ over $\Spec \ZZ$, where  for $n|n'$ the transition map from the $n'$-th $\GG_m$ to the $n$-th $\GG_m$ is $z \mapsto z^{n'/n}$. We have
$$\D^{\Delta} = \mathbb D_{\Q_p^{\ur}}. $$

Let $n \in \ZZ_{\geq 1}.$ By construction, the set underlying $\D_n$ is $ \GG_m(\Q_p^{\ur}) \times \Gal(\Q_p^{\ur}/\Q_p)$. Using this we define a canonical element
$$d_{\sigma,n} := (p^{-\lfloor 1/n \rfloor},\sigma) \in \D_n,$$
and a canonical map
$$\varsigma_{n} : \Gal(\Q_p^{\ur}/\Q_{p^n}) \To \D_n , \quad \rho \longmapsto (1,\rho), $$
which is a continuous section of $\D_n \to \Gal(\Q_p^{\ur}/\Q_p)$. Clearly $\kappa_n(\sigma^i , \sigma^j) = 0$ when $i,j$ are divisible by $n$, so  $\kappa_n$ vanishes on $\Gal(\Q_p^{\ur}/\Q_{p^n}) \times \Gal(\Q_p^{\ur}/\Q_{p^n})$ by continuity. It follows that $\varsigma_n$ is a group homomorphism. For future use, we compute:

\begin{align}\label{eq:power of d_sigma}
d_{\sigma, n}^n  = (p^{-\lfloor 1/n \rfloor}\prod_{i = 1}^{n-1} p^{\kappa_{n}(\sigma^i ,\sigma)} , \sigma^n) = (p^{-1}, \sigma^n) = p^{-1} \varsigma_{n} (\sigma^n), \quad \forall n  . \end{align}

\begin{align}
\label{eq:comp of d_sigma}
\mathcal E(\delta_{n,n'}) (d_{\sigma, n'})  = (p^{-\lfloor 1/n' \rfloor \lambda_{n,n'} (\sigma) }, \sigma) = (p^{-\lfloor 1/n \rfloor},\sigma) = d_{\sigma, n}, \quad \forall n|n' . \end{align}

\begin{align}
\label{eq:comp of varsigma_n}
\mathcal E(\delta_{n,n'}) (\varsigma_{n'}(\rho)) = (p^{\lambda_{n,n'} (\rho) } , \rho ) = (1,\rho) = \varsigma_{n} (\rho), \quad \forall n|n', \forall  \rho \in \Gal(\Q_p^{\ur}/\Q_{p^{n'}}).
\end{align}

By (<ref>), the system $(d_{\sigma , n})_n$ defines an element $d_{\sigma} \in \D^{\topo}$.

Let $\G_p \in \proredgb(\Qpbar/\Q_p)$ be the pull back of $\D$. For each $n \in \ZZ_{\geq 1}$, let $\G_{p,n} \in \proredgb(\Qpbar/\Q_p)$ be the pull back of $\D_n$.[In <cit.>, our $\G_{p,n}$ is denoted by $\tilde {\G}_p^{\QQ_{p^n}}$.] Thus $\G_p = (\G_{p,n})_n$.

Let $G$ be a connected linear algebraic group over $\Q_p$. Let $\G_G \in \redgb(\Qpbar/\Q_p)$ and $\G_G^{\ur} \in \redgb(\Q_p^{\ur}/\Q_p)$ be the associated neutral gerbs. A morphism $\theta: \G_{p} \to \G_G$ in $\proredgb(\Qpbar/\Q_p)$ is called unramified, if it is the pull-back of a morphism $\theta^{\ur}: \D \to \G_G^{\ur}$ in $\proredgb(\QQ_p^{\ur}/\QQ_p)$. By the obvious generalization of Lemma <ref>, $\theta^{\ur}$ is uniquely determined by $\theta$. For general $\theta$, we write $\mathcal{UR}(\theta)$ for the set of $g\in G(\Qpbar)$ such that $\Int(g^{-1}) \circ \theta$ is unramified.

Keep the notation of Definition <ref>. The following statements hold.

* For any morphism $\theta: \G_p \to \G_G$, the set $\mathcal{UR}(\theta)$ is a $G(\QQ_p^{\ur})$-torsor, where $G(\QQ_p^{\ur})$ multiplies on the right.

* Let $\phi: \D \to \G_G^{\ur}$ be a morphism. For sufficiently divisible $n$, we have $\phi(d_{\sigma})^n = \phi_n^{\Delta}(p^{-1}) \rtimes \sigma^n \in \G_G^{\ur}$, where $\phi_n$ is a morphism $\D_n\to \G_G^{\ur}$ inducing $\phi$.

By the discussion in <ref>, the fact that $\G_p$ is the pull-back of $\D$ gives rise to a canonical homomorphism $\varsigma: \Gamma_{p,0} = \Gal(\Qpbar/\Qpur) \to \G_p^{\topo}$, which is a section of $\G_p^{\topo} \to \Gamma_p$. By (the obvious generalization of) Lemma <ref>, a morphism $\theta : \G_p \to \G_G$ is unramified if and only if $\theta(\varsigma(\tau)) = 1 \rtimes \tau$ for all $\tau \in \Gamma_{p,0}$.

For part (i), we write $\theta(\varsigma(\tau)) = a_{\tau} \rtimes \tau \in \G_G$, for $\tau \in \Gamma_{p,0}$. Then $(a_{\tau})_{\tau} \in Z^1(\Qpbar/\Q_p^{\ur}, G(\Qpbar))$. By the previous paragraph, an element $g\in G(\Qpbar)$ lies in $\mathcal{UR}(\theta)$ if and only if $g^{-1} a_{\tau} \tau(g) = 1$ for all $\tau \in \Gamma_{p,0}$. By Steinberg's theorem, such a $g$ exists since $G$ is connected. It is then clear that $\mathcal{UR}(\theta)$ is a $G(\Q_p^{\ur})$-torsor.

We now show part (ii). First pick $n$ such that $\phi$ is induced by a morphism $\phi_n : \D_n \to \G_G^\ur$. Since $\phi_n$ is continuous, there exists an open subgroup $U$ of $\Gal(\Q_p^{\ur}/\Q_{p^n})$ such that $\phi_n (\varsigma_n (\rho)) = 1 \rtimes \rho$ for all $\rho \in U$. We may assume that $U = \Gal(\Q_p^{\ur}/\Q_{p^{n'}})$ for some $n'$ divisible by $n$. Using (<ref>), we may replace $n$ by $n'$ and assume that $n = n'$. We then have

$$ \phi(d_{\sigma})^n = \phi_n (d_{\sigma,n}^n) = \phi_n(p^{-1} \varsigma_n(\sigma^n)) = \phi_n^{\Delta}(p^{-1}) \rtimes \sigma^n,$$
where the second equality is by (<ref>).

Let $G$ be a connected linear algebraic group over $\Q_p$. For any unramified morphism $\theta: \G_{p} \to \G_G$, we define $b_{\theta} \in G(\Q_p^{\ur})$ by the formula $\theta^{\ur} (d_{\sigma}) = b_{\theta} \rtimes \sigma$.

Let $G$ be a reductive group over $\Q_p$, and let $\theta : \G_p \to \G_G$ be an unramified morphism. The following statements hold.

* Viewing $\theta ^{\ur, \Delta}: \mathbb D_{\Q_p^{\ur}} \to G_{\Q_p^{\ur}}$ as a fractional cocharacter of $G_{\Qpur}$, we have $\theta ^{\ur, \Delta} = - \nu_{b_{\theta}}$. Moreover $b_{\theta}$ is decent (see <ref>).

* There are natural $\QQ_p$-isomorphisms $J_{b_{\theta}} \cong I_{\theta^{\ur}} \cong I_{\theta}$.

* Let $\beta\in \coh^1(\QQ_p, I_{\theta})$. Then there is a member $\theta'$ of the conjugacy class $\theta^{\beta}$ (see Definition <ref>) satisfying the following conditions:

* The morphism $\theta' : \G_p \to \G_G$ is unramified.

* By part (ii), we view $\beta$ as an element of $\coh^1(\Q_p, J_{b_{\theta}})$. Then the $\sigma$-conjugacy class of $b_{\theta'}$ in $G(\Q_p^{\ur})$ is given by the twist of $b_{\theta}$ by $\beta$, as in <ref>.

(i) Choose $n\in \ZZ_{ \geq 1}$ such that $\theta^{\ur}$ is induced by a morphism  $\theta_n: \D_n \to \G_G^{\ur}$. Let $\nu_n : = \theta_n ^{\Delta}$. Then $\nu_n$ is a cocharacter of $G_{\Q_p^{\ur}}$, and $\theta^{\ur,\Delta} = n^{-1}\nu_n$. Up to enlarging $n$, we may assume that $\nu_n$ is defined over $\QQ_{p^n}$.

By Lemma <ref> (iii), up to enlarging $n$ we have

\begin{align*}
b_{\theta} \sigma(b_{\theta} ) \cdots \sigma^{n-1} (b_{\theta}) = \nu_n (p^{-1}) \in G(\QQ_p^{\ur}).
\end{align*}

We conclude that $\nu_{b_{\theta}} = -n^{-1}\nu_n = - \theta^{\ur, \Delta}$, and that $b_{\theta}$ is $n$-decent.

(ii)  As in <cit.>, the fact that $b_\theta$ is decent implies that

$$J_{b_{\theta}}(R) = \set { g \in G_{\Q_p^{\ur}, \nu_{b_{\theta}}}(R\otimes _{\QQ_p} \QQ_p ^{\ur} )\mid g b_\theta = b _{\theta} \sigma(g)},$$
for any $\QQ_p$-algebra $R$. In view of $G_{\Qpur , \nu _{b_\theta}}  =  G_{\Q_p^{\ur}, \theta^{\ur, \Delta}}$, the above description of $J_{b_{\theta}}$  agrees with the explicit description of $I_{\theta^{\ur}}$ as in <ref>. The natural isomorphism $I_{\theta^{\ur}} \cong I_{\theta}$ arises from the fact that they are the same $\Q_p$-form of $G_{\Q_p^{\ur}, \theta^{\ur, \Delta}}$.

(iii) By Steinberg's theorem, $\beta$ is represented by a cocycle
$$a =(a_{\rho})\in Z^1(\QQ_p^{\ur} / \QQ_p, J_b (\QQ_{p}^\ur)).$$
Viewing $a$ as in $Z^1(\Q_p, I_{\theta})$, we define $\theta': = a \theta$, which is in the conjugacy class $\theta^{\beta}$. Then $\theta'$ is unramified, and we have  $b_{\theta'} = a_{\sigma} b$, which implies condition (b).

Let $\cG$ be a reductive group scheme over $\ZZ_p$, with generic fiber $G$. Let $r \in \ZZ_{\geq 1}$, and let $\mu$ be a cocharacter of $\cG_{\ZZ_{p^r}}.$

For each morphism $\theta: \G_p \to \G_G$ in $\proredgb(\Qpbar/\Q_p)$, we recall the definition of a set $X_\mu(\theta)$ and a bijection $\Phi : X_\mu (\theta) \to X_\mu (\theta)$ as in <cit.>. For each $g\in \mathcal {UR}(\theta)$, we write $b_g$ for $b_{\Int(g^{-1}) \circ \theta} \in G(\Qpur)$. Define
$$Y_\mu(\theta) : = \set{  g\in \mathcal {UR}(\theta) \mid b_g\in \mathcal G(\ZZ_p^{\ur}) p^{\mu} \mathcal G(\ZZ_p^{\ur})  \subset G(\QQ_p^{\ur})}.$$
The group $ \mathcal G(\ZZ_p^{\ur})$ acts on $Y_\mu(\theta)$ via right multiplication, and we define

$$X_\mu(\theta) : = Y_\mu(\theta)/ \mathcal G(\ZZ_p^{\ur}). $$

By the Cartan decomposition, the subset $\cG(\Z_p^{\ur}) p^{\mu} \cG(\Z_p^{\ur}) \subset G(\Qpur)$ depends on $\mu$ only via the $\cG(\Z_{p^r})$-conjugacy class of $\mu$, and so the same holds for $Y_{\mu}(\theta)$ and $X_\mu(\theta)$.

Consider the map

\begin{align*}
\tilde \Phi : \mathcal {UR}(\theta) & \To \mathcal {UR}(\theta) \\
g & \longmapsto gb_{g} \sigma(b_{g}) \cdots \sigma^{r-1}(b_{g}).
\end{align*}

For $g\in \mathcal {UR} (\theta)$ we have $b_{\tilde \Phi(g)} = \sigma^r(b_g)$. It follows that $\tilde \Phi$ restricts to a map $Y_\mu (\theta) \to Y_{\mu}(\theta)$.
If we fix an element $g_0 \in \mathcal {UR}(\theta)$ and use it to identify the $G(\Qpur)$-torsor $\mathcal {UR}(\theta)$ with $G(\Qpur)$, then the map $\tilde \Phi$ becomes the map $G(\Qpur) \to G(\Qpur), g \mapsto b_{g_0} \sigma(b_{g_0}) \cdots \sigma^{r-1}(b_{g_0}) \sigma^r(g)$. This shows that $\tilde \Phi$ restricts to a $\cG(\Z_p^{\ur})$-equivariant bijection $Y_\mu(\theta) \to Y_\mu (\theta)$. Hence $\tilde \Phi$ induces a bijection
$$\Phi: X_\mu(\theta) \isom X_\mu(\theta),$$
which we call the  $p^r$-Frobenius.

The isomorphism class of the $\Phi^{\ZZ}$-set $X_\mu(\theta)$ depends on $\theta$ only through the conjugacy class of $\theta$. Moreover, after fixing an element $g_0\in \mathcal{UR}(\theta)$, from the previous paragraph we know that the map $G(\Qpbar) \to G(\Qpbar), g \mapsto g_0^{-1} g$ induces a bijection from $X_\mu (\theta)$ to the affine Deligne–Lusztig set

\begin{align}  \nonumber
X_{\mu}(b_{g_0}) & : =
\set{g\in G(\Qpur)/ \mathcal G(\ZZ_p^{\ur}) \mid  g^{-1} b_{g_0} \sigma(g) \in \mathcal G(\ZZ_p^{\ur}) p^\mu \mathcal G(\ZZ_p^{\ur})}
\\ \label{eq:ADLV to explain}  & \isom  \set{g\in G(\LL)/ \mathcal G(\breve \ZZ_p) \mid  g^{-1} b_{g_0} \sigma(g) \in \mathcal G(\breve \ZZ_p) p^\mu \mathcal G(\breve \ZZ_p)} ,
\end{align}
on which $\Phi$ acts by $g \mapsto b_{g_0} \sigma(b_{g_0}) \cdots \sigma^{r-1}(b_{g_0}) \sigma^r(g)$. The second line is the usual definition of an affine Deligne–Lusztig set found in the literature, and we have a natural map (<ref>) induced by the inclusion $G(\Qpur) \hookrightarrow G(\LL)$. That this map is a bijection follows from Lemma <ref> and the functoriality of the Cartan decomposition.

We keep fixing a prime $p$. For each finite prime $v \neq p$, let
$$\G_v : = \Gamma_v \in \redgb(\overline \Q_v/\Q_v). $$
$$\G_{\infty} \in \redgb(\CC/\RR)$$
be the Weil group of $\RR$, and let
$$\G_p \in \proredgb(\Qpbar/\Q_p)$$
be as in Definition <ref>.

Consider the pro-torus $\Res_{\overline \QQ/\QQ} \GG_m : = \varprojlim_{L}\Res_{L/\QQ} \GG_m$ over $\QQ$, where $L$ runs through the set of finite Galois extensions of $\QQ$ contained in $\overline \QQ$, ordered by inclusion, and the transition maps are the norm maps. The neutral gerbs $\G _{\Res_{L/\QQ} \GG_m } \in \redgb_{\QQ}$ for different $L$ form a projective system, i.e., an object in $\proredgb(\Qbar/\QQ)$. We denote this object by $\G_{\Res_{\overline \QQ/\QQ} \GG_m}$.

For each object $\G$ (resp. morphism $\phi$) in $\proredgb(\Qbar/\QQ)$, we denote its pull-back in $\proredgb(\ol \Q_v/ \Q_v)$ by $\G(v)$ (resp. $\phi(v)$), for each place $v$ of $\Q$. Here the pull-back functor is defined with respect to our fixed embedding $\overline \Q\to \overline \Q_v$.  Reimann <cit.> has constructed a quasi-motivic Galois gerb, which is an object
$$\gQ  \in \proredgb(\Qbar/\Q), $$
equipped with a morphism $\zeta_v : \G_v \to \Qf(v)$ in $\proredgb(\ol \Q_v/\Q_v)$ for each place $v$ of $\QQ$, and a morphism $\psi : \gQ \to \G_{\Res_{\overline \QQ/\QQ} \GG_m}$ in $\proredgb(\Qbar/\Q)$. More precisely, Reimann constructs in the proof of <cit.> versions of $\gQ$, $\zeta_v$, and $\psi$ in the categories $\proR(\overline \Q/\Q)$ and $\proR(\overline \Q_v/ \Q_v)$. We transport his constructions via the functors (<ref>). The unique characterization of the tuple $(\gQ , (\zeta_v)_v, \psi )$ is delicate to state. We omit this and refer the reader to loc. cit. and <cit.>.

By construction, $\gQ$ is given by a projective system $(\gQ^L)_L$ in $\redgb_{\QQ}$, indexed by the set of finite Galois extensions $L/\QQ$ contained in $\overline {\QQ}$, ordered by inclusion. For each $L$, we have $\gQ^{L,\Delta} = Q^L_{\overline \QQ}$, where $Q^L$ is a $\QQ$-torus explicitly described in <cit.>. (Here $Q^L$ agrees with the canonical $\QQ$-form of $\gQ^{L,\Delta}$ as in Remark <ref>.) If $L\subset L' \subset \overline \QQ$, then the transition morphism $\gQ^{L'} \to \gQ^L$ is surjective, and its kernel $ Q^{L'}_{\overline \Q} \to Q^L_{\overline \Q}$ is defined over $\Q$. We write $Q$ for the pro-torus $
(\varprojlim_{L} Q^L)$ over $\QQ$. Since the projective system $(\gQ^L)_L$ is indexed by a countable set and since the transition morphisms are surjective, we conclude that the projections $\gQ^{\topo} \to \gQ^L$ are surjective. (See <ref> for the notation $\Qf^{\topo}$.)

For $v \in \set{p,\infty},$ we denote the group scheme homomorphism $\zeta_v^{\Delta} : \G_v^{\Delta} \to \Qf(v)^{\Delta}$ (see <ref>) by $\nu(v)$. By construction, $\nu(v)$ is defined over $\Q_v$. Thus we have $\nu(p): \mathbb D_{\Q_p} \to  Q_{\QQ_p}$ and $\nu(\infty): \GG_{m,\RR} \to  Q_{\RR}$.

Let $T$ be a torus over $\Q$, and let $\mu \in X_*(T)$. Let $L/\Q$ be a finite Galois extension contained in $\Qbar$ such that $\mu$ is defined over $L$. Then $\mu$ induces a $\Q$-homomorphism
$$\mu_*: \Res_{L/\Q} \GG_m \xrightarrow{\Res_{L/\Q} \mu} \Res_{L/\Q} T \xrightarrow{\N_{L/\Q}}  T . $$
We obtain a morphism $\Psi_{T,\mu} : \Qf \to \G_T$ in $\proredgb(\Qbar/\Q)$ via the composition

$$ \Qf \xrightarrow{\psi} \G_{\Res_{\overline \QQ/\QQ} \GG_m} \to \G_{\Res_{L/\QQ} \GG_m} \xrightarrow{\mu_*} \G_T. $$
This is independent of the choice of $L$.

Let $\theta = \Psi_{T,\mu}(p) \circ \zeta_p : \G_p \to \G_T(p)$. Choose $g \in \mathcal {UR}(\theta)$, and let $[b] \in \B(T_{\Q_p})$ be the $\sigma$-conjugacy class of $b_{\Int(g^{-1}) \circ \theta} \in T(\Qpur)$ in $T(\LL)$ (which is well defined, by Lemma <ref> (i)). Then $\kappa_T([b])\in X_*(T)_{\Gamma_p}$ is equal to the image of $-\mu\in X_*(T)$.

The proof reduces to the “universal case”, where $T = \Res_{L/\Q}\GG_m$, and the map $\mu_*: \Res_{L/\Q}\GG_m \to T$ is the identity. In this case, $X_*(T)_{\Gamma_p} $ is torsion free, and therefore the homomorphism $\iota: X_*(T)_{\Gamma_p} \to X_*(T) \otimes \QQ$ induced by taking averages of $\Gamma_p$-orbits in $X_*(T)$ is injective. For each $[b'] \in \B(T_{\Q_p})$, we have $\iota(\kappa_T([b'])) =\nu_{b'}$ by <cit.>. Hence to prove the lemma it suffices to prove that $\iota(\mu) = -\nu_b$. By Proposition <ref> (i), we have $-\nu_b = (\Int(g^{-1})\circ \theta)^{\ur, \Delta} =  \theta^{\Delta}$. By  <cit.>, $\theta^{\Delta}$ is indeed equal to $\iota(\mu)$, as desired.[A similar argument is made in the proof of <cit.> in order to determine $\kappa_T([b])$ for $T = \Res_{L/\Q} \GG_m$. There $T$ is unramified over $\Q_p$, so the cited result <cit.> is valid. Our present argument does not need this unramifiedness assumption.]

§.§ Strictly monoidal categories

Let $G, H$ be two strictly monoidal  categories (which we always assume to be small). By a strictly monoidal functor $G \to H$, we mean a functor that strictly respects the monoidal structures. By a monoidal isomorphism between two strictly monoidal functors $\phi, \psi : G \to H$, we mean an isomorphism of functors $\cA : \phi \isom \psi$ such that for any two objects $g_1, g_2 \in G$ the following diagram commutes:

$$ \xymatrixcolsep{4pc} \xymatrix{ \phi(g_1 \otimes g_2) \ar[r]^{\cA (g_1 \otimes g_2)} \ar@{=}[d] & \psi(g_1 \otimes g_2) \ar@{=}[d]  \\ \phi(g_1) \otimes \phi(g_2) \ar[r]^{\cA(g_1) \otimes \cA(g_2)} & \psi(g_1 ) \otimes \psi(g_2) } $$

Every group can be naturally viewed as a strictly monoidal category, where the only morphisms are the identities. For two groups $G$ and $H$, the set of strictly monoidal functors $G\to H$ is the same as the set of group homomorphisms $G \to H$. More generally, each crossed module $(\tilde H \to H)$ also determines a strictly monoidal category denoted by $H/\tilde H$; see <cit.>.  When $(\tilde H \to H)$ is a crossed module, each element $h \in H$ induces via conjugation a strictly monoidal functor $\Int(h): H/\tilde H \to H/\tilde H$.

Now let $G$ be a group and $(\tilde H \xrightarrow{\varrho} H)$ be a crossed module. We denote the structural action of $H$ on $\tilde H$ by $\Int$. Consider two strictly monoidal functors $\phi, \psi  : G \to H/\tilde H$. If $\cA: \phi  \isom  \psi$ is an isomorphism of functors, then for each $q \in G$ the isomorphism $\cA(q) : \phi(q) \isom \psi(q)$ corresponds to an element $\cA(q) \in \tilde H$. Thus we may view $\cA$ as a function $G \to \tilde H$. In this way, there is a one-to-one correspondence between monoidal isomorphisms $\cA: \phi  \isom  \psi$ and functions $\cA : G \to \tilde H$ satisfying

\begin{align*}
\cA(qr) & = \cA(q) \cdot \Int(\phi(q)) (\cA(r)) , \\
\varrho(\cA(q) ) \cdot  \phi(q) & = \psi(q)  ,\quad \forall q,r \in G.
\end{align*}

When $G$ is equipped with a topology, we shall call a monoidal isomorphism $\cA : \phi \isom \psi$ continuous, if the corresponding function $\cA: G \to \tilde H$ is continuous with respect to the given topology on $G$ and the discrete topology on $\tilde H$.

Let $k$ be a field of characteristic zero, and let $\bar k$ be a fixed algebraic closure. Let $G$ be a reductive group over $k$, and let $\G_G$ be the associated neutral gerb in $\redgb(\bar k/k)$. As in <cit.>, we have a crossed module $G_{\sconn} (\bar k) \to \G_G$, and we denote the corresponding strictly monoidal category $\G_G/ G_{\sconn} (\bar k)$ by $\G_{G/G_{\sconn}}$. We have a canonical strictly monoidal functor $\G_G\to  \G_{G/G_{\sconn}}$.

Keep the setting and notation of
<ref>. Let $\gH  = (\gH_i)_{i\in I} $ be an object in $\proredgb(\bar k/k)$ such that the projections $\gH^{\topo} \to \gH_i$ are surjective and such that $\gH^{\Delta}_i$ are tori for all $i \in I$. Let $\phi : \gH \to \G_G$ be a morphism in $\proredgb(\bar k/ k)$. Let $a \in Z^1(k, I_{\phi})$ and let $\phi' = a \phi$ (see <ref>). Let $\phi_{\widetilde {\ab}}$ (resp. $\phi'_{\widetilde {\ab}}$) be the composite strictly monoidal functor

$$\gH^{\topo} \xrightarrow{\phi^{\topo} \text{ (resp.~$\phi^{\prime, \topo}$)}} \G_G \To \G_{G/G_{\sconn}}. $$

Then there exist $g \in G(\bar k)$ and a continuous monoidal isomorphism $\phi_{\widetilde {\ab}} \isom \Int(g) \circ \phi'_{\widetilde {\ab}}$, if and only if the class of $a$ in $\coh^1(k, I_{\phi})$ lies in the image of $ \coh^1(k, \tilde I_{\phi} ) \to \coh^1 (k , I_{\phi})$. Here $\tilde I_{\phi}$ is defined in <ref> and <ref>.

By the assumption that $\gH^{\topo} \to \gH_i$ are surjective, the lemma reduces to the case where $\gH \in \redgb(\bar k /k )$, which we now assume. Write $M$ for $G_{\bar k, \phi^{\Delta}}$. Let $\varrho$ denote the natural map $G_{\sconn} \to G$, and let $\tilde M := \varrho^{-1} (M) \subset G_{\sconn,\bar k}$. Write $\pi$ for the structural map $\gH \to \Gal(\bar k/k)$. For each $q \in \gH$, we write $\phi(q) = g_q \rtimes \pi(q)$, with $g_q \in G(\bar k)$.

Assume there exist $g\in G(\bar k)$ and a continuous monoidal isomorphism $\cA: \phi_{ \widetilde{\ab}} \isom \Int(g) \circ \phi_{ \widetilde{\ab}}'$.
As discussed in <ref>, $\cA$ can be viewed as a continuous function $\gH \to G_{\sconn} (\bar k)$

\begin{align}\label{eq:cA1}
\cA(qr) & = \cA(q) \cdot \Int(\phi(q)) (\cA(r)) , \\ \label{eq:cA2}
\varrho(\cA(q) ) \cdot  \phi(q) & = \Int(g) [ a_{\pi(q)}\phi(q) ] ,\quad \forall q,r \in \gH.
\end{align}

Decompose $g$ as $g= g' z$, with $g' \in G_{\der}(\bar k), z \in Z_G(\bar k)$.
Fix a lift $\tilde g \in G_{\sconn}(\bar k)$ of $g'$, and define a continuous map $\cB : \gH \to G_{\sconn} (\bar k)$ by
$$\cB(q) : = \tilde g^{-1} \cA(q) \cdot \Int(\phi(q)) (\tilde g)  \in G_{\sconn} (\bar k), \quad \forall q\in \gH. $$
Then by (<ref>), we have

\begin{align} \label{eq:cB1}
\cB(qr)  = \cB(q) \cdot \Int(\phi(q)) (\cB(r)) , \quad \forall q, r \in \gH.
\end{align}
By (<ref>), we have

\begin{multline*}
\varrho(\cB(q)) = (g')^{-1} \cdot  [\varrho(\cA(q)) \cdot \phi(q)] \cdot g' \phi(q)^{-1} \\  = z a_{\pi(q)} \phi(q) g^{-1} \cdot g' \phi(q)^{-1}  = z a_{\pi(q)} g_{q} \pi(q) z^{-1} \pi(q)^{-1} g_q^{-1},
\end{multline*}

\begin{align} \label{eq:cB2}
\varrho(\cB(q))  = z \lix^{{\pi(q)}} z^{-1} a_{\pi(q)}, \quad \forall q \in \gH.
\end{align}

From (<ref>), we see that

\begin{align}\label{eq:cB3}
\cB(q) \in \tilde M(\bar k), ~\forall q\in \gH  ;\\
\cB(q) \in Z_{G_{\sconn}} (\bar k), ~\forall q\in \gH^{\Delta}(\bar k)
. \end{align}
Using (<ref>) and (<ref>), we see that the map $\cB|_{\gH^{\Delta} (\bar k) }: \gH^{\Delta} (\bar k) \to Z_{G_{\sconn}} (\bar k)$ is a group homomorphism. Since $\gH^{\Delta} (\bar k)$ is a divisible abelian group and $Z_{G_{\sconn}} (\bar k)$ is finite, we have $\cB|_{\gH^{\Delta} (\bar k) } \equiv 1$. Combining the last fact with (<ref>), we see that $\cB(q)$ depends only on $\pi(q)$, i.e., $\cB = B \circ \pi$ for a continuous map $B : \Gal(\bar k/k)  \to \tilde M(\bar k)$. Now by the definition of the $k$-form $\tilde I_{\phi}$ of $\tilde M$, the relation (<ref>) precisely means that $B \in Z^1(k, \tilde I_{\phi})$. Note that the inclusion of $\bar k$-groups $Z_{G, \bar k} \hookrightarrow M$ induces an inclusion of $k$-groups $Z_G \to I_{\phi}$. Hence (<ref>) implies that the class of $a$ in $\coh^1(k, I_{\phi})$ equals the image of the class of $B$ in $\coh^1(k, \tilde I_{\phi})$.

Conversely, assume the class of $a$ in $\coh^1(k,I_{\phi})$ lies in the image of $\coh^1(k,\tilde I_{\phi})$. Then there exist $g \in I_{\phi} (\bar k)$ and $B\in Z^1(k, \tilde I_{\phi})$ such that

$$ a_{\tau} = g \cdot \varrho(B(\tau))\cdot \Int(g_{\tau})(\lix^{\tau} g^{-1}), \quad \forall \tau \in \Gal(\bar k/k).$$
Decompose $g$ as $g = \varrho(\tilde g) z^{-1}$, with $\tilde g\in \tilde M(\bar k)$ and $z \in Z_G(\bar k)$. Then we can absorb $\tilde g$ into $B$ by replacing each $B(\tau)$ with $\tilde g B(\tau) \Int(g_{\tau}) (\lix^{\tau} \tilde g^{-1})$. Hence we may assume that $g= z^{-1}$. Let $\cB : = B \circ \pi  : \gH \to \tilde M(\bar k)$. Then $\cB$ is continuous and satisfies (<ref>) and (<ref>). Note that the relation (<ref>) can also be written as

\begin{align}\label{eq:cB4}
\varrho(\cB(q)) \cdot \phi(q) = \Int(z)[a_{\pi(q)} \phi(q)]
\end{align}
(since $\lix^{{\pi(q)}} z = \Int(\phi(q)) (z)$). By (<ref>) and (<ref>), $\cB$ is a continuous monoidal isomorphism $\phi_{ \widetilde{\ab}} \isom \Int(z) \circ \phi'_{\widetilde{\ab}}$.

By the discussion in <ref>, the assumptions on $\mathfrak H$ in Lemma <ref> are satisfied by the quasi-motivic Galois gerb $\Qf \in \proredgb(\Qbar/\Q)$.

§.§ Admissible morphisms for an unramified Shimura datum

Let $(G,X, p , \cG)$ be an unramified Shimura datum as in <ref>. Let $E$ be the reflex field, and let $\fkp$ and $q= p^r$ be as in <ref>. We will use the following notation throughout the paper. For each field extension $F/E$ such that $G_F$ is quasi-split, the Hodge cocharacters $\mu_h$ attached to $h \in X$ determine a $G(F)$-conjugacy class of cocharacters of $G_F$. We denote this conjugacy class by $\dmu_X(F)$. Now inside $\dmu_X(\QQ_{p^r})$, there is a canonical $\cG(\Z_{p^r})$-conjugacy class consisting of those cocharacters in $\dmu_X(\QQ_{p^r})$ that extend to cocharacters of $\cG_{\Z_{p^r}}$. We denote this $\cG(\Z_{p^r})$-conjugacy class by $\dmu_X^{\cG}$.

A choice of $x\in X$ gives rise to a morphism
$$\xi_\infty: \G_\infty \To \G_{G}(\infty)$$
in $\redgb(\CC/\RR)$, whose conjugacy class depends only on $X$. See <cit.> for the explicit construction. For a finite prime $v$ unequal to $p$, let
$$\xi_v : \G_v = \Gamma_v \To \G_G(v) = G(\overline {\Q}_v) \rtimes \Gamma_v $$
be the natural section. Then $\xi_v$ is a morphism in $\redgb(\overline \Q_v /\Q_v)$.

Let $\phi : \Qf \to \G_G$ be a morphism in $\proredgb(\Qbar/\QQ)$. (Here $\Qf$ is defined with respect to the fixed $p$.) For each place $v$ of $\Q$ except $p$, we define

$$ X_v(\phi) : = \set{ g\in G( \overline \Q_v) \mid  \Int(g)\circ \xi_v = \phi(v)\circ \zeta_v } . $$
We define

$$X_p(\phi) := X_{-\mu}(\phi(p) \circ \zeta_p) $$
for $\mu \in \dmu_X^{\cG}$. Here the right hand side is as in <ref>, and it is independent of the choice of $\mu$. We have the $p^r$-Frobenius $\Phi: X_p(\phi) \isom X_p(\phi)$.

Keep the setting of <ref>.	A morphism $\phi: \Qf \to \G_G$ in $\proredgb(\Qbar/\Q)$ is called admissible, if the following conditions are satisfied.

* Let $\mu\in \dmu_X(\Qbar)$. Let $\psi_{\mu_{\widetilde{\ab}}}:  \Qf \To \G_{G/G_{\sconn}}$ be the associated strictly monoidal functor, defined in <cit.>. Let $\phi_{ \widetilde{\ab}}$ be the composite strictly monoidal functor $\Qf \xrightarrow{\phi} \G_G \to \G_{G/G_{\sconn}}$. We require that there exist $g \in G(\overline \QQ)$ and a continuous monoidal isomorphism $
\cA: \Int(g) \circ \psi_{\mu_{\widetilde{\ab}}} \isom \phi_{ \widetilde{\ab}}.$

* For each place $v$ of $\Q$, $X_v(\phi) \neq \emptyset$.

Condition (i) in Definition <ref> is a correction of condition (1) in <cit.> in that we add the requirement that $\cA$ should be continuous. The results on admissible morphisms in <cit.>, especially the statement and proof of <cit.>, are only correct with the present definition.

Given a morphism $\Qf \to \G_G$ in $\proredgb(\Qbar/\Q)$, whether it is admissible depends only on its conjugacy class. We may thus speak of admissible conjugacy classes of morphisms $\Qf \to \G_G$.

As is pointed out by Reimann <cit.>, the original construction of the quasi-motivic gerb $\gQ$ in [91] is incorrect. As such, the definitions and results in <cit.> about “admissible morphisms” do not directly apply to the objects defined in Definition <ref>. Nevertheless, most of the content of loc. cit. can be modified to suit the corrected definition of $\Qf$. In the sequel, we shall cite loc. cit. only for those technical results that are essentially independent of the actual construction of $\Qf$.

Let $\phi: \Qf \to \G_G$ be an arbitrary morphism in $\proredgb(\Qbar/\Q)$. By condition (ii) in <cit.>, there exists a continuous cocycle $\zzeta_\phi: \Gamma \to G(\bar \A_f^p)$ that induces the morphisms $\phi(l) \circ \zeta_l$ for all finite primes $l \neq p$, in the following sense. We have a canonical map $\bar \A_f^p = \A_f^p \otimes _{\QQ} \Qbar \to \Qlbar$ given by the projection $\A_f^p \to \Q_l$ and the fixed embedding $\Qbar \to \Qlbar$. Denote the composition
$$\Gamma_l \hookrightarrow \Gamma \xrightarrow{\zzeta_{\phi}} G(\bar \A_f^p) \to G(\Qlbar)$$
by $\zeta_{\phi,l}$. Then for each $\tau \in \G_l = \Gamma_l$ we have
$$(\phi(l) \circ \zeta_l) (\tau) = \zeta_{\phi,l}(\tau) \rtimes \tau  \in G(\overline {\Q}_l) \rtimes \Gamma_l.$$

If we choose an arbitrary $\ZZ$-structure on $G$, then for almost all primes $l \neq p$ the set $X_l(\phi)$ contains integral points in $G(\overline \Q_l)$ (and is a fortiori non-empty).	Indeed, for almost all $l$, the chosen $\Z$-structure on $G$ has connected smooth reduction at $l$, and $\zeta_{\phi,l}$ is induced by a continuous unramified cocycle $\Gal(\Q_l^{\ur}/\Q_l) \to G(\Z_l^{\ur})$. It is a standard result (see for instance <cit.>) that any such cocycle is a coboundary, and this precisely means that $X_l(\phi)$ contains integral points.

Let $\phi : \Qf \to \G_G$ be an admissible morphism. On choosing a $\ZZ$-structure on $G$, we form the restricted product
$$ X^p(\phi) : = \prod'_{l\notin \set{p,\infty}} X_l(\phi)$$
with respect to the subsets of integral elements of the $X_l(\phi)$ (cf. <ref>). Clearly $X^p(\phi)$ is independent of the choice of $\ZZ$-structure, and is a $G(\mathbb A^p_f)$-torsor under right multiplication. (It is non-empty since $\phi$ is admissible.) Equivalently, with the notation in <ref>, $X^p(\phi)$ is the right $G(\A_f^p)$-torsor consisting of $x \in G(\bar \A_f^p)$ such that
$$x^{-1} \cdot  \zeta_{\phi}^{p,\infty} (\tau) \cdot \lix^{\tau}x = 1, \quad  \forall \tau \in \Gamma. $$

We now define

$$ X(\phi) : = X_p (\phi) \times X^p(\phi),$$
which is equipped with the action of $\Phi^{\ZZ} \times G(\adele_f^p)$. We still call $\Phi$ the $q$-Frobenius on $X(\phi)$.

By definition, $X(\phi)$ is a subset of $G(\Qpbar)/ \cG(\Z_p^\ur) \times G(\bar \A_f^p)$. Under the canonical embedding $I_{\phi, \Qbar} \hookrightarrow G_{\Qbar}$, we let the group $I_{\phi}(\A_f)$  act on $G(\Qpbar)/ \cG(\Z_p^\ur) \times G(\bar \A_f^p)$ via left multiplication. This induces a left action of $I_{\phi}(\A_f)$ on $X(\phi)$. For each $\tau \in I_{\phi}^{\ad}(\A_f)$, we set
$$ S_{\tau}(\phi) : = \varprojlim_{K^p} I_\phi(\QQ)_{\tau}\backslash X(\phi)/ K^p,$$
where $K^p$ runs through the compact open subgroups of $G(\mathbb A^p_f)$, and $I_{\phi}(\QQ)_{\tau}$ denotes the image of

$$ I_{\phi}(\QQ) \hookrightarrow I_{\phi}(\A_f) \xrightarrow{\Int(\tau)} I_{\phi}(\A_f).$$
Then $S_{\tau}(\phi)$ inherits the action of $\Phi^{\ZZ} \times G(\adele_f^p)$. When $\tau =1$, we write $S(\phi)$ for $S_{\tau}(\phi)$.

§.§ Integral models and the Langlands–Rapoport Conjecture

Keep the setting and notation of <ref>. Let $K_p = \mathcal G(\ZZ_p)$, and let $\Sh_{K_p} =\Sh_{K_p}(G,X)$ be the inverse limit
$$\varprojlim_{K^p}\Sh_{K_pK^p}(G,X), $$
where $K^p$ runs through compact open subgroups of $G(\A_f^p)$. This inverse limit exists as an $E$-scheme, since the transition maps are finite. The right $G(\A_f^p)$-action on $\Sh_{K_p}$ induced by the $G(\A_f)$-action on $\Sh(G,X)$ is admissible in the sense of Definition <ref>.

By a smooth integral model of $\Sh_{K_p}$, we mean a scheme $\Shh_{K_p}$ over $\oo_{E,(\fkp)}$ extending $\Sh_{K_p}$, equipped with an admissible right $G(\A_f^p)$-action extending the $G(\A_f^p)$-action on $\Sh_{K_p}$.[The adjective “smooth” refers to the smoothness requirement in condition (ii) in Definition <ref> for the admissible $G(\A_f^p)$-action on $\Shh_{K_p}$. The scheme $\Shh_{K_p}$ is typically not locally of finite presentation over $\oo_{E, (\fkp)}$.] When $\Shh_{K_p}$ is given, we write $\Shh_{K_p K^p}$ for $\Shh_{K_p}/K^p$ for all sufficiently small compact open subgroups $K^p \subset G(\A_f^p)$.

The following theorem is proved in [52] for $p>2$, and in [54] for $p=2$.

If $(G,X)$ is of abelian type, then there exists a  smooth integral model of $\Sh_{K_p}$. This model is uniquely characterized by the extension property as detailed in <cit.>.

In [52] and  [54], it is not explicitly verified that the $G(\A_f^p)$-action on the integral model satisfies the separatedness in condition (ii) and condition (iii) in Definition <ref>. The former follows from the facts that the Siegel modular schemes at finite levels are separated over $\ZZ_{(p)}$, that normalization maps and closed immersions are separated, and that taking finite free quotients preserve separatedness. For the latter, see <cit.> for an explanation.

Now fix a prime $\ell \neq p$ and fix an irreducible $\overline \QQ_{\ell}$-representation $\xi$ of $G$ that factors through $G^c = G/Z_{ac}$, as in <ref>. Suppose a smooth integral model $\Shh_{K_p}$ is given. As explained in <ref>, for sufficiently small compact open subgroups $U^p \subset K^p \subset G(\A_f^p)$, the map $\Shh_{K_pU^p} \to \Shh_{K_p K^p}$ is finite étale Galois and the Galois group is identified with the maximal quotient of $K^p/U^p$ that acts faithfully on $\Shh_{K_pU^p}$. Since $\Sh_{K_pU^p}$ is dense in $\Shh_{K_pU^p}$, we see that the last group is identified with $\Gal(\Sh_{K_pU^p}/ \Sh_{K_pK^p})$. Thus by (<ref>), we have

$$ \Gal(\Shh_{K_pU^p}/ \Shh_{K_pK^p}) \cong K^p / U^p Z(\Q)_{K_p K^p}^{-, (p)},  $$
where $Z(\Q)_{K_pK^p}^{-, (p)}$ is the image of $Z(\Q)_{K_pK^p}^-$ under the projection $G(\A_f) \to G(\A_f^p)$. Hence $ \Gal(\Shh_{K_p}/ \Shh_{K_pK^p}) $ as defined in (<ref>) is the quotient of $K^p$ by the closure of $Z(\Q)_{K_pK^p}^{-, (p)}$ in $G(\A_f^p)$. (Actually $Z(\Q)_{K_pK^p}^{-, (p)}$ is already closed in $G(\A_f^p)$, because $Z(\Q)_{K_p K^p}^-$ is compact.) By Lemma <ref>, (the closure of) $Z(\Q)_{K_pK^p}^{-, (p)}$ is contained in $Z_{ac}(\A_f^p)$ when $K^p$ is sufficiently small. We now view $\xi$ as a continuous representation of $G(\A_f^p)$ via the projection $G(\A_f^p) \to G(\QQ_{\ell})$. Then for all sufficiently small $K^p$, the restriction $\xi|_{K^p}$ factors through $\Gal(\Shh_{K_p}/\Shh_{K_pK^p})$ by the above discussion. Thus as in <ref>, for each sufficiently small $K^p$ we obtain a lisse $\ol \QQ_{\ell}$-sheaf $\mL_{\xi, K^p}$ on $\Shh_{K_pK^p}$, and for each geometric point $x$ of $\Spec \oo_{E, (\fkp)}$ we have the admissible $G(\A_f^p)$-module

$$ \coh^i_c(\Shh_{K_p, x}, \xi) : = \varinjlim_{K^p} \coh^i_c(\Shh_{K_pK^p, x}, \mL_{\xi, K^p} ). $$

When $x = \Spec \ol E$, the above is identified with $\coh^i_c (\Sh_{\ol E}, \xi)^{K_p}$. Moreover, we have a canonical adjunction morphism

\begin{align}\label{eq:adjunction for coh}
\coh_c^i(\Shh_{K_p,\ol{\FF}_q},\xi) \To \coh_c^i(\Shh_{K_p,\ol E},\xi)  \cong \coh^i_c(\Sh_{\ol E}, \xi)^{K_p},
\end{align}
which is $\Gal(\ol {E_{\fkp}}/E_{\fkp}) \times G(\A_f^p)$-equivariant. Here  $\Gal(\ol {E_{\fkp}}/E_{\fkp})$ acts on the left via the quotient $\Gal(\ol \FF_q/ \FF_q)$, and acts on the right via the embedding into $\Gal(\ol E/E)$.

We say that $\Shh_{K_p}$ has well-behaved $\coh^*_c$, if (<ref>) is an isomorphism for all choices of $\ell \neq p$, $\xi$, and $i$.

The canonical smooth integral model in Theorem <ref> has well-behaved $\coh^*_c$.

Recall that for each admissible morphism $\phi : \Qf \to \G_G$, we have defined in <ref> a set $S(\phi)$ equipped with an action of $G(\A_f^p)$ and a $q$-Frobenius $\Phi$, where $q$ is the residue cardinality of $\fkp$.
There exists a smooth integral model $\Shh_{K_p}$ of $\Sh_{K_p}$ over $\oo_{E,(\fkp)}$ which has well-behaved $\coh^*_c$ and for which there is a bijection

\Shh_{K_p} (\overline \FF_q)  {} \isom \coprod_{\phi }   S(\phi)  $$

compatible with the actions of $G(\A_f^p)$ and the $q$-Frobenius $\Phi$. Here $\phi$ runs through a set of representatives for the conjugacy classes of admissible morphisms $\Qf \to \G_G$.

In the rest of this section, we formulate a variant of the above conjecture, which we call “the Langlands–Rapoport–$\tau$ Conjecture”.

§.§ Preparations for the Langlands–Rapoport–tau Conjecture

In this subsection we develop the prerequisites for our formulation of the Langlands–Rapoport–$\tau$ Conjecture.

Using that the projections $\gQ^{\topo} \to \gQ^L$ are surjective (see <ref>), for each $\tau \in \Gamma$ we can choose a lift $q_{\tau} \in \gQ^{\topo}$ of $\tau$. We fix such a choice in the sequel. We first study a “well-positioned” condition for morphisms from $\gQ$ to neutral gerbs. Let $G$ be an arbitrary reductive group over $\Q$. Recall from <ref> that $\gQ^{\Delta}$ has the canonical $\Q$-structure $Q$.

A morphism $\phi : \gQ \to \G_G$ in $\proredgb(\Qbar/\Q)$ is  called günstig gelegen (to be abbreviated as gg)[This terminology comes from Langlands–Rapoport <cit.>. However, the definition of günstig gelegen morphisms given by Langlands–Rapoport uses the elements $\delta_n$, which do not directly make sense with the corrected definition of $\gQ$.], if $\phi^{\Delta}: \gQ^{\Delta}  \to G_{\overline \Q}$ is defined over $\Q$.

Let $\phi : \gQ \to \G_G$ be a morphism in $\proredgb(\Qbar/\Q)$. For each $\tau \in \Gamma = \Gal(\Qbar /\QQ )$, write $\phi(q_{\tau}) = g_{\tau} \rtimes \tau$, with $g_{\tau} \in G(\overline \Q)$. Then $\phi$ is gg if and only if $g_{\tau}$ lies in $G_{\overline \Q, \phi^{\Delta}} (\overline \Q)$ for each $\tau \in \Gamma$. If $\phi$ is gg, then the canonical $\overline \Q$-isomorphism $I_{\phi,\overline \Q} \isom G_{\phi^{\Delta}, \Qbar}$ is an inner twistings between the underlying $\Q$-groups.

Assume that $\phi$ is induced by a morphism $\phi_0: \gQ^L \to \G_G$ in $\redgb(\ol \Q/\Q)$. Let $y \in Q^L(\Qbar) =  \gQ^{L,\Delta}(\overline \Q)$ and $\tau \in \Gamma$ be arbitrary. We denote the image of $q_{\tau} \in \gQ^{\topo}$ in $\gQ^L$ still by $q_{\tau}$. Then

\begin{align}\label{eq:phi_0 tau t}
\phi_0^{\Delta}(\lix^{\tau} y) = \phi_0(q_\tau y  q_{\tau}^{-1}) =  (g_{\tau} \rtimes \tau)  \phi_0^{\Delta}(y) (g_{\tau} \rtimes \tau) ^{-1} = g_{\tau} \lix^{\tau}[\phi_0^{\Delta}(y)] g_{\tau}^{-1}.\end{align}
Now $\phi^{\Delta}$ is defined over $\Q$ if and only if $\phi_0^{\Delta}$ is defined over $\Q$ (since the transition maps in the pro-torus $Q = \varprojlim_L Q^L$ are all surjective). By (<ref>), this is equivalent to the condition that each $g_{\tau}$ centralizes $\im (\phi_0^{\Delta})$. Since $\im(\phi_0^{\Delta}) = \im (\phi^{\Delta})$, the last condition is equivalent to the condition that each $g_{\tau}$ lies in $G _{\overline \Q, \phi^{\Delta}} (\overline \Q)$.

Now if $\phi$ is gg, then for each $\tau \in \Gamma$ the $\overline \Q$-isomorphism $I_{\phi,\overline \Q} \isom G_{\phi^{\Delta}, \Qbar}$ differs from its $\tau$-twist by composition with $\Int(g_{\tau})$. Since $g_{\tau} \in G_{\phi^{\Delta}}(\Qbar)$, this means that the $\Qbar$-isomorphism is an inner twisting.

Let $\phi : \gQ \to \G_G$ be a morphism in $\proredgb(\Qbar/\Q)$. By a $G$-rational maximal torus in $I_\phi$, we mean a maximal torus $T \subset I_{\phi}$ (defined over $\Q$) such that the composite embedding $T_{\overline \Q} \hookrightarrow I_{\phi,\overline \Q} \cong  G_{\overline \Q, \phi^{\Delta}}\ \hookrightarrow G_{\overline \Q}$ is  defined over $\Q$.

In Definition <ref>, $T$ is necessarily a maximal torus in $G$. This is because $\Qf^{\Delta}$ is a pro-torus, and as a result $I_{\phi}$ is a reductive group having the same absolute rank as $G$, cf. <ref>.

Let $\phi : \gQ \to \G_G$ be a morphism in $\proredgb(\Qbar/\Q)$ such that $I_{\phi}$ contains a $G$-rational maximal torus $T$. Then $\phi$ is gg. Moreover, let $f$ denote the $\Q$-embedding underlying $T_{\Qbar} \hookrightarrow I_{\phi,\Qbar} \cong G_{\Qbar, \phi^{\Delta}} \hookrightarrow G_{\Qbar}$. Then $\phi$ factors as $\Qf \xrightarrow{\phi_T} \G_T \xrightarrow{f} \G_G$.

For each $\tau \in \Gamma$, define $g_{\tau} \in G(\Qbar)$ as in Lemma <ref>. For   $t\in T(\overline \Q)$, we have

$$ f(\lix^{\tau} t ) = g_{\tau} \lix^{\tau} [f(t)] g_{\tau}^{-1},$$

by the definition of the $\Q$-structure of $I_\phi$; see <ref> and <ref>. Since $f$ is defined over $\Q$, we have $f(\lix^{\tau} t) = \lix^{\tau}[f(t)]$. Hence $g_{\tau}$ commutes with $f(T(\overline \Q))$. Since $f(T)$ is a maximal torus in $G$ (see Remark <ref>), we have $g_{\tau} \in f(T)(\Qbar)$. We conclude that $\phi$ is gg by Lemma <ref>. Moreover, since $Z_{I_{\phi}} \subset T$ and since $\phi^{\Delta}$ factors through the center of $G_{\phi^{\Delta}}$, we know that $\phi^{\Delta}$ factors through $f(T) \subset G$. We have already seen that each $g_{\tau}$ lies in $f(T)(\Qbar)$. It follows that $\phi$ factors through $f: \G_T \to \G_G$.

Let $\phi : \gQ \to \G_G$ be an admissible morphism. Then the $\RR$-group $I_{\phi(\infty) \circ \zeta_{\infty}}$ is an inner form of $G_{\RR}$. Moreover, the $\RR$-groups $(I_{\phi}/Z_G)_{\RR} = I_{\phi(\infty)}/ Z_{G,\RR}$ and $I_{\phi(\infty) \circ \zeta_{\infty}} / Z_{G,\RR}$ are both anisotropic.

As in (<ref>) we have an $\RR$-embedding $I_{\phi(\infty)} \hookrightarrow I_{\phi(\infty)\circ \zeta_{\infty}}$. Since $\phi$ is admissible, $\phi(\infty)\circ \zeta_{\infty}$ is conjugate to $\xi_{\infty}$. Hence there is an $\RR$-isomorphism $I_{\phi(\infty) \circ \zeta_{\infty}} \isom I_{\xi_{\infty}}$ induced by $\Int(g)$ for some $g \in G(\CC)$. As discussed in <cit.>, $I_{\xi_{\infty}}$ is the inner form of $G_{\RR}$ with anisotropic adjoint group. The lemma follows.

We now return to the setting of <ref>. Thus we have an unramified Shimura datum $(G,X, p ,\cG)$ and the notion of admissible morphisms $\Qf \to \G_G$.

Let $\phi : \gQ \to \G_G$ be an admissible morphism. For each maximal torus $T \subset I_\phi$ defined over $\Q$, there exists $g \in G(\overline \Q)$ such that $\Int(g) (T) $ is a $G$-rational maximal torus in $I_{\Int(g) \circ \phi}$.

This is essentially proved by Langlands–Rapoport, when they prove <cit.>. We sketch the argument, as the precise statement of the proposition is not explicit in [91].[The only information about $\Qf$ used in this argument is the fact that $\Qf^{\Delta}$ is a pro-torus with surjective transition maps. Hence the validity of this argument is unaffected by Reimann's correction of the definition of $\Qf$.]

Let	$\psi: G_{\overline \Q} \isom G^*_{\overline \Q}$ be an inner twisting from $G$ to a fixed quasi-split reductive group $G^*$ over $\Q$. Then the $G^*(\Qbar)$-conjugacy class of the composite embedding $\iota: T_{\Qbar} \hookrightarrow G_{\Qbar} \xrightarrow{\psi} G^*_{\Qbar}$ is stable under $\Gamma$. By <cit.>, we can modify $\psi$ by an inner automorphism to arrange that $\iota$ is defined over $\QQ$.

Let $T^* = \iota(T)$. Then $T^*$ is a maximal torus in $G^*$ defined over $\Q$, and we have a $\Q$-isomorphism $\iota: T\isom T^*$. We now check that $T^*$ transfers to $G$ locally at all places $v$, or equivalently, that some $G(\ol \QQ_v)$-conjugate of $T$ is a $\Q_v$-torus in $G_{\QQ_v}$. For $v =p$, this follows from the assumption that $G$ is unramified, and hence quasi-split, over $\QQ_p$. For $v = \infty$, this follows from the fact that $T^*/Z_{G^*} \cong T/Z_G$ is anisotropic over $\RR$ (Lemma <ref>). For $v \notin \set{\infty, p}$, pick $u_v \in G(\ol \Q_v)$ such that $\Int(u_v^{-1}) \circ \phi(v) \circ \zeta_v = \xi_v$, which exists since $\phi$ is admissible. Then the canonical embedding $I_{\Int(u_v) \circ \phi(v), \overline \Q_v} \hookrightarrow G_{\overline \Q_v}$ is defined over $\Q_v$, and hence $ \Int(u_v)(T_{\Q_v})$ is a $\Q_v$-maximal torus in $G_{\Q_v}$, as desired.

Since $T^*$ transfers to $G$ locally and is elliptic over $\RR$, it transfers globally to $G$ by <cit.>.   This means there exists $g\in G(\overline \Q)$ such that $\Int (g) (T)$ is a $\Q$-maximal torus in $G$ and such that the isomorphism $\Int(g) \circ \psi^{-1} : T^* \to \Int (g) (T)$ is defined over $\Q$. It follows that $\Int(g) (T) $ is a $G$-rational maximal torus in $I_{\Int(g) \circ \phi}$.

Every admissible morphism $\phi : \gQ \to \G_G$ is conjugate to a gg morphism.

By Proposition <ref>, $\phi$ is conjugate to a morphism $\phi' : \Qf \to \G_G$ such that $I_{\phi'}$ contains a $G$-rational maximal torus.
By Lemma <ref>, $\phi'$ is gg.

Let $\phi : \gQ \to \G_G$ be an admissible morphism. By Corollary <ref>, the set $\cW : = \set{g\in G(\overline \Q)\mid \Int g \circ \phi \text{ is gg}}$ is non-empty. Using Lemma <ref>, one checks that the canonical embedding $I_{\phi,\overline \Q} \to G_{\overline \Q}$ and $\cW$ together form an inner transfer datum from $I_{\phi}$ to $G$ (Definition <ref>). We thus obtain a canonical map

\begin{align}\label{eq:transfer I_phi}
\coh^1_{\ab}(\Q, I_{\phi}) \To \coh^1_{\ab}(\Q, G) ,\end{align}
and we define $\Sha_G^{\infty}(\Q, I_{\phi})\subset \coh^1(\Q, I_{\phi})$ as in <ref>.

Let $\phi : \gQ\to \G_G$ be an admissible morphism, and $\beta \in \coh^1(\Q, I_{\phi}).$ Then $\phi^{\beta}$ (see Definition <ref>) is admissible if and only if $\beta$ belongs to $\Sha_G^{\infty}(\Q, I_{\phi})$.

The “if” part is proved in <cit.>, under the assumption that $Z_G^0$ is cuspidal. Below we give complete proofs of both directions of the implication, taking into account the correction of the definition of admissible morphisms mentioned in Remark <ref>. Since the admissibility condition is invariant under conjugacy, we use Corollary <ref> to reduce to the case where $\phi$ is gg. We now assume that $\phi$ is gg and fix a cocycle $a \in Z^1(\Q, I_{\phi})$ representing $\beta$.

Step 1. We show that $\beta$ has zero image under the composite

\begin{align} \label{eq:coh pol}
\coh^1(\Q, I_\phi) \xrightarrow{\ab^1_\Q} \coh^1_{\ab} (\Q, I_\phi) \xrightarrow{(\ref{eq:transfer I_phi})} \coh^1_{\ab} (\Q, G)
\end{align}
if and only if there exist $h \in G(\overline \Q)$ and a continuous monoidal isomorphism $\Int(h) \circ \phi_{\tilde \ab} \isom (a\phi)_{\tilde \ab}$. (See Definition <ref> for the notation.) By Lemma <ref> and Remark <ref>, the latter condition is equivalent to asking that $\beta$ comes from $\coh^1(\Q, \tilde I_{\phi}).$ We have a natural exact sequence of pointed sets

$$ \coh^1(\Q, \tilde I_{\phi}) \to \coh^1(\Q, I_{\phi}) \to \coh^1(\Q, \tilde I_{\phi} \to I_{\phi}),$$
where $\coh^1(\Q, \tilde I_{\phi} \to I_{\phi})$ is the Galois cohomology of the crossed module $(\tilde I_{\phi} \to I_{\phi})$ of $\Q$-groups; see <cit.>. (The crossed module structure is the one inherited from the crossed module $G_{\sconn } \to G$.) The natural map $(Z_{G_{\sconn}} \to Z_G) \to (\tilde I_{\phi} \to I_{\phi})$ is a quasi-isomorphism of crossed modules, and therefore $\coh^1(\Q, \tilde I_{\phi} \to I_{\phi})$ is naturally isomorphic to $\coh^1_{\ab}(\Q, G)$. The composition $\coh^1(\Q, I_{\phi}) \to \coh^1(\Q, \tilde I_{\phi} \to I_\phi) \cong \coh^1_{\ab}(\Q, G)$ is equal to (<ref>). This proves the desired statement.

Step 2. We show that $\beta$ has trivial image in $\coh^1 (\RR, I_{\phi})$ if and only if $\phi(\infty)\circ \zeta_{\infty}$ is conjugate to $(a\phi)(\infty) \circ \zeta_{\infty}$. By Lemma <ref>, the latter condition is equivalent to the vanishing of the image of $\beta$ under
$$\coh^1(\QQ, I_{\phi}) \to \coh^1(\RR, I_{\phi})  = \coh^1(\RR, I_{\phi(\infty)}) \xrightarrow{\dagger} \coh^1(\RR, I_{\phi(\infty)\circ \zeta_{\infty}}),$$
where $\dagger$ is induced by the $\RR$-inclusion $I_{\phi(\infty)} \hookrightarrow I_{\phi(\infty) \circ \zeta_{\infty}}$. Thus the desired statement boils down to $\dagger$ having trivial kernel, which follows from Lemma <ref> and <cit.>.

Step 3. We show that if $\beta$ has zero image under (<ref>), then $\phi(l) \circ \zeta_l$ is conjugate to $(a\phi)(l) \circ \zeta_l$ for all finite primes $l \neq p$. For this, it suffices to show that $\beta$ has trivial image under the composite map

\begin{align}\label{eq:enlarge v}
\coh^1(\QQ, I_{\phi}) \to \coh^1(\Q_l, I_{\phi}) = \coh^1(\Q_l, I_{\phi (l)}) \to \coh^1(\Q_l, I_{\phi(l) \circ \zeta_l}).
\end{align}
Since $\phi$ is admissible, ${\phi(l) \circ \zeta_l}$ is conjugate to $\xi_l$. It follows that the canonical $\overline \Q_l$-embedding $I_{\phi(l) \circ\zeta_l , \overline \Q_l} \to G_{\overline \Q_l}$ is an inner twisting between $\Q_l$-groups. This induces a canonical isomorphism

\begin{align}\label{eq:v}
\coh^1_{\ab}(\Q_l, I_{\phi(l) \circ \zeta_l}) \isom \coh^1_{\ab}(\Q_l, G).
\end{align}

Now we have a commutative diagram

$$ \xymatrixcolsep{5pc} \xymatrix{\coh^1(\Q, I_{\phi}) \ar[r]^-{(\ref{eq:enlarge v})} \ar[d]^{(\ref{eq:coh pol})} &  \coh^1(\Q_l, I_{\phi(l) \circ \zeta_l}) \ar[r]^{\ab^1_{\Q_l}}_{\cong} &  \coh^1_{\ab}(\Q_l, I_{\phi(l) \circ \zeta_l}) \ar[d] ^{(\ref{eq:v})} _{\cong}  \\ \coh^1_{\ab}(\Q, G) \ar[rr]^{\text{localization}} &  & \coh^1_{\ab}(\Q_l, G) } $$
which implies the desired statement.

Step 4.  We show that if $\beta$ has zero image under (<ref>), then $X_p(a\phi) \neq \emptyset$. We fix $\mu \in \dmu_X^{\cG}$ as in <ref>. Let $\theta : = \phi(p) \circ \zeta_p$, and let $\theta ' : = (a\phi) (p) \circ \zeta_p$. By definition $X_p(\phi) = X_{-\mu}(\theta)$ and $X_p(a\phi) = X_{-\mu}(\theta')$.

Fix an arbitrary $g_0 \in \mathcal{UR}(\theta)$, and write $\theta_0$ for $\Int(g_0^{-1}) \theta$. Thus $\theta_0$ is unramified. Now $\Int(g_0^{-1})$ induces a $\Q_p$-isomorphism $I_{\theta} \isom I_{\theta_0}$. Let $\beta_0$ denote the image of $\beta$ under the composite

$$ \coh^1(\Q, I_{\phi}) \to \coh^1(\Q_p, I_{\phi})   \to \coh^1(\Q_p, I_{\theta}) \xrightarrow{\Int(g_0^{-1})} \coh^1(\Q_p, I_{\theta_0}). $$
Then $\theta'$ belongs to the conjugacy class of $\theta_0^{\beta_0}$.

By Proposition <ref> (iii), the conjugacy class $\theta_0^{\beta_0}$ contains an unramified member $\theta_0'$ such that $b' : = b_{\theta_0'}$ is obtained from $b: = b_{\theta_0}$ by twisting by $\beta_0$. Since $G$ is quasi-split over $\Q_p$, we can apply Proposition <ref> to conclude that $\nu_{b} = \nu_{b'}$, and that $\kappa_G(b') - \kappa_G(b)$ is the image of $\beta_0$ in $\pi_1(G)_{\Gamma_p, \tors}$. Our assumption on $\beta$ implies that the last image is zero.
Hence we have $[b] = [b'] $ in $\B(G_{\Q_p})$, by Kottwitz's classification  (see <ref>).

Since $\theta_0$ (resp. $\theta'_0$) is an unramified member in the conjugacy class of $\theta$ (resp. $\theta'$), by the discussion in <ref>, we have $X_{-\mu}(\theta)\cong X_{-\mu} (b)$, and $X_{-\mu}(\theta')\cong X_{-\mu}(b')$. Since $[b] = [b']$, we have $X_{-\mu} (b) \cong X_{-\mu} (b')$. Thus the non-emptiness of $X_{-\mu}(\theta)$ implies the non-emptiness of $X_{-\mu}(\theta')$.

The proof of the proposition is completed by combining the above four steps. (The “only if” part follows from Steps 1 and 2 alone.)

Let $\phi: \Qf \to \G_G$ be an admissible morphism. We define

\begin{align*}
\mathcal H(\phi) & : = \tauhome{\phi}, \\
\E^p (\phi) & : =  I_{\phi} (\A_f^p) \backslash I_{\phi} ^{\ad} (\A_f^p) .
\end{align*}

We have a natural map

$$\E^p (\phi) \To \mathcal H(\phi), $$
and it is surjective by weak approximation (see <cit.>) applied to $I_{\phi} ^{\ad}$.

The boundary map arising from the short exact sequence $1 \to Z_{I_{\phi} } \to I_{\phi} \to I_{\phi}^{\ad} \to 1$ induces an isomorphism of pointed sets $\E^p(\phi) \cong  \D (Z_{I_{\phi}}, I_{\phi} ;\A_f^p)$. Since $\D (Z_{I_{\phi}}, I_{\phi} ;\A_f^p)\cong \E (Z_{I_{\phi}}, I_{\phi} ;\A_f^p) $ is an abelian group, we have a canonical abelian group structure on $\E^p(\phi)$.

The surjection $\E^p(\phi) \to \mathcal H(\phi)$ induces an abelian group structure on $\mathcal H(\phi)$. Moreover, we have a commutative diagram

\begin{align}
\xymatrix{  \E^p (\phi) \ar[rr] \ar[d] && \E(Z_{I_\phi}, I_\phi ;\A_f^p) \ar[d] \\    \mathcal H(\phi) \ar[rr] &&  \E (Z_{I_\phi}, I_\phi; \A_f) /\D (Z_{I_{\phi,\sconn}} , I_{\phi, \sconn} ;\Q) }
\end{align}

where the rows are isomorphisms. Here the right vertical arrow is induced by the inclusion $\E(Z_{I_\phi}, I_\phi ;\A_f^p)  \to \E(Z_{I_\phi}, I_\phi ;\A_f)$, and the bottom arrow is induced by the boundary map $\delta: I_{\phi}^{\ad} (\A_f) \to \D(Z_{I_\phi}, I_{\phi}; \A_f) \cong \E(Z_{I_\phi}, I_{\phi}; \A_f)$ arising from the short exact sequence $1 \to Z_{I_\phi} \to I_\phi \to I_{\phi}^{\ad} \to 1$.

First note that $\D (Z_{I_{\phi,\sconn}} , I_{\phi, \sconn} ;\Q)$ is a subgroup of $\coh^1(\Q, Z_{I_{\phi,\sconn}} )$, so the quotient on the lower right corner of the diagram is defined. Now the boundary map $\delta$ induces a bijection $I_\phi (\A_f) \backslash I_\phi ^{\ad} (\A_f)\isom \E (Z_{I_\phi}, I _\phi ; \A_f)$, and maps $I_{\phi}^{\ad} (\Q) \subset I_{\phi}^{\ad}(\A_f)$ onto the image of $ \D (Z_{I_{\phi,\sconn}} , I_{\phi, \sconn} ;\Q) \to \E (Z_{I_\phi}, I_\phi; \A_f)$ (since we have a surjective boundary map $I_\phi^{\ad}(\Q) \to \D (Z_{I_{\phi,\sconn}},  I_{\phi, \sconn} ;\Q)$ associated with the short exact sequence $1 \to Z_{I_{\phi,\sconn}} \to I_{\phi,\sconn} \to I_{\phi}^{\ad} \to 1$). The lemma follows.

The subset $\D (Z_{I_{\phi,\sconn}} , I_{\phi, \sconn} ;\Q)$ of $\coh^1(\Q, Z_{I_{\phi,\sconn}} )$ (which is a subgroup) is equal to the kernel of the composite map of pointed sets
$$ \coh^1(\Q, Z_{I_{\phi, \sconn}}) \to  \coh^1(\RR, Z_{I_{\phi,\sconn}}) \to \coh^1(\RR, I_{\phi,\sconn} ).$$

By the Kneser–Harder–Chernousov Theorem (see <cit.>), the localization map $\coh^1(\QQ, I_{\sconn} ) \to \coh^1(\RR, I_{\sconn})$ is a bijection. The lemma follows.

Let $\AM = \AM(G,X, p ,\cG)$ be the set of all admissible morphisms $\Qf \to \G_G$.
On this set we define an equivalence relation $\approx$ by declaring $\phi_1 \approx \phi_2$ if and only if $\phi_1^{\Delta}$ is $G(\ol \QQ)$-conjugate to $\phi_2 ^{\Delta}$. Clearly $\approx$ is weaker than the equivalence relation defined by conjugacy among admissible morphisms. By Lemma <ref>, we know that $\phi_1 \approx \phi_2$ if and only if there exists a (necessarily unique) $\beta \in \coh^1(\Q, I_{\phi})$ such that $\phi_2$ belongs to the conjugacy class $\phi_1^{\beta}$. Moreover, when this is the case, we know that $\beta$ lies in $ \Sha_G^{\infty}(\Q, I_{\phi_1})$ by Proposition <ref>.

As a consequence of Lemma <ref> and Lemma <ref>, we know that for $\phi \in \AM$, the abelian group $\mathcal H(\phi)$ depends only on the groups $Z_{I_{\phi}}, Z_{I_{\phi, \sconn}}, I_{\phi ,\sconn ,\RR}$ and the maps between them. The same is true for the abelian group $\E^p (\phi) \cong \E(Z_{I_\phi}, I_\phi ; \A_f^p)$. Now if $\phi_1, \phi_2 \in \AM$ are such that $\phi_1 \approx \phi_2$, then for any $g \in G(\overline \Q)$ such that $\Int (g) \circ \phi_1^{\Delta} = \phi_2^{\Delta}$, the $\overline \Q$-isomorphism $\Int(g) : G_{\overline \Q, \phi_1^{\Delta}} \isom G_{\overline \Q, \phi_2^{\Delta}}$ induces an inner twisting $\comp_g:I_{\phi_1, \overline \Q} \isom I_{\phi_2, \overline \Q}$ between $\Q$-groups. Clearly the equivalence class (Definition <ref>) of the inner twisting $\comp_g$ is independent of the choice of $g$. It follows that $Z_{I_{\phi_1}}, Z_{I_{\phi_1, \sconn}}$ are canonically identified with $Z_{I_{\phi_2}}, Z_{I_{\phi_2, \sconn}}$ respectively. If we let $\comp_{g, \sconn} : I_{\phi_1, \sconn,\overline \Q} \isom I_{\phi_2, \sconn, \overline \Q}$ be the inner twisting induced by $\comp_g$, then the equivalence class of $\comp_{g,\sconn}$ is also independent of $g$. Moreover, $\comp_{g, \sconn} \otimes_{\overline \Q} \CC$ is the composition of an $\RR$-isomorphism with an inner automorphism defined over $\CC$. This is because if we let $\beta$ be the element of $\Sha_G^{\infty}(\Q, I_{\phi_1})$ such that $\phi_2 \in \phi_1^{\beta}$, then the class of $\comp_{g, \sconn}$ in $\coh^1(\Q, I_{\phi_1}^{\ad})$ is the image of $\beta$, and hence has trivial image in $\coh^1(\R, I_{\phi_1}^{\ad})$. Thus $I_{\phi_1 ,\sconn ,\RR}$ is canonically identified with $I_{\phi_2 ,\sconn ,\RR}$ up to inner automorphisms defined over $\R$.
From this analysis, we see that there are canonical abelian group isomorphisms

\begin{align*}
\comp _{\phi _1, \phi_2}: &~\mathcal H(\phi_1) \isom \mathcal H(\phi_2) \\ \comp ^{\E^p}  _{ \phi_1, \phi_2}: &~
\E^p(\phi_1) \isom \E^p (\phi_2)
\end{align*}
which depend only on $\phi_1$ and $\phi_2$. These maps commute with the natural surjections $\E^p(\phi_i) \to \cH(\phi_i)$. For any three $\phi_1, \phi _2, \phi_3 \in \AM$ such that $\phi_1 \approx \phi_2 \approx \phi_3$, we have the following cocycle relations

\begin{align*}
\comp_{\phi_2 , \phi _3}\circ \comp _{\phi_1 , \phi _2} & = \comp _{\phi_1, \phi_3}, \quad \comp _{\phi_1, \phi_1} = \id_{\mathcal H(\phi_1)} ; \\
\comp^{\E^p}_{\phi_2 , \phi _3}\circ  \comp ^{\E^p} _{\phi_1 , \phi _2} &=   \comp ^{\E^p} _{\phi_1, \phi_3} ,\quad  \comp ^{\E^p} _{\phi_1, \phi_1} =\id _{\E^p (\phi_1)}.
\end{align*}

We now view $\AM = \AM(G,X, p, \cG)$ as a discrete topological space, and define sheaves of abelian groups $\E^p = \E^p_{(G,X,p,\cG)}$ and $\cH = \cH_{(G,X,p,\cG)}$ on $\AM$ whose stalks at each $\phi \in \AM$ are $\E^p(\phi)$ and $\cH (\phi)$ respectively. We have a surjective homomorphism $\E^p \to \cH$. The above discussion implies that $\E^p$ and $ \cH$ are the pull-backs of unique (up to unique isomorphism) sheaves of abelian groups $\E^p_{\approx}$ and $ \cH_{\approx}$ on the quotient space $\AM/{\approx}$. The surjective homomorphism $\E^p \to \cH$ is the pull-back of a unique surjective homomorphism $\E^p_{\approx}\to \cH_{\approx}$.

The quotient map $\AM \to \AM/{\approx}$ factors through $ \AM/\mathrm{conj}$, the set of conjugacy classes of admissible morphisms.  We let $\cH_\mathrm{conj}$ (resp. $\E^p_{\mathrm{conj}}$) be the pull-back of $\cH_{\approx}$ (resp. $\E^p_{\approx}$) to $\AM/\mathrm{conj}$.

For $\cF \in \set{\E^p, \cH}$, we denote by  $\Gamma(\cF)$ the group of global sections of the sheaf $\cF$ on $\AM$. For $\dertau \in \Gamma(\cF)$, we write $\dertau(\phi) \in \cF(\phi)$ for the germ of $\dertau$ at each $\phi \in \AM$. We denote by $\Gamma(\cF)_0$ (resp. $\Gamma(\cF)_1$) the subgroup of $\Gamma(\cF)$  consisting of those global sections that descend to global sections of $\cF_{\approx}$ over $\AM/{\approx}$ (resp. global sections of $\cF_\mathrm{conj}$ over $\AM/\mathrm{conj}$). Thus $\Gamma(\cF)_0 \subset \Gamma(\cF)_1 \subset \Gamma(\cF)$.

Let $\phi\in \AM$. The boundary map $I_\phi (\A_f) \backslash I_{\phi}^{\ad}(\A_f) \to \coh^1(\A_f, Z_{I_\phi})$ arising from the short exact sequence $1 \to Z_{I_\phi} \to I_{\phi} \to I_{\phi}^{\ad} \to 1$ induces a map

\begin{align}\label{eq:second coh real'n of H(phi)}
\mathcal H(\phi) = \tauhome{\phi} \To  \tauhomecoh{\phi}.
\end{align}

Indeed, since $I_{\phi}^{\ad} (\RR)$ is compact (by Lemma <ref>), it is connected (see <cit.>). Hence the map $I_{\phi} (\RR) \to I_{\phi}^{\ad}(\RR)$ is onto, and the boundary map $I_{\phi} ^{\ad} (\RR) \to \coh^1(\RR, Z_{I_{\phi}})$ is trivial. In particular, the image of $I_{\phi} ^{\ad} (\QQ)$ in $\coh^1(\QQ, Z_{I_{\phi}})$ lies in $\Sha^{\infty} _{I_{\phi}} (\QQ, Z_{I_{\phi}})$, and it follows that (<ref>) is well defined. We have a commutative diagram:

\begin{align}\label{commdiag:1}\xymatrixcolsep{10pc}
\xymatrix{  \E^p (\phi) \ar[r] ^{\cong} \ar[d] & \E(Z_{I_{\phi}}, I_{\phi} ;\A_f^p) \ar[d] \\    \mathcal H(\phi) \ar[r]^{\mbox{(\ref{eq:second coh real'n of H(phi)})}} &   \tauhomecoh{\phi}}
\end{align}

where the left vertical arrow is the natural surjection and the right vertical arrow is induced by the inclusion $\coh^1(\A_f^p , Z_{I_{\phi}}) \to \coh ^1 (\A_f, Z_{I_{\phi}})$.

Let $\dertau  \in \Gamma(\cH)$, and $\underline \sigma \in \Gamma(\E^p)$.

* We say that $\dertau$ is tori-rational, if for each $\phi \in \AM$ and for each maximal torus $T\subset I_\phi$, the image of $\dertau (\phi)$ is trivial under the composite map

\begin{align}\label{eq:defn of tori rational}
\mathcal H( \phi) \xrightarrow{(\ref{eq:second coh real'n of H(phi)})} \tauhomecoh{\phi } \to \coh ^1 (\A_f, T) / \Sha _{G} ^{\infty} (\QQ, T).	\end{align}

* We say that $\underline \sigma$ is tori-rational, if for each $\phi \in \AM $ and for each maximal torus $T \subset I_{\phi}$, the image of $\underline \sigma  (\phi)$ is trivial under the composite map

$$\E^p (\phi)\cong  \E (Z_{I_{\phi}}, I_{\phi} ; \A_f^p) \subset \coh ^1 (\A_f^p, Z_{I_{\phi}}) \to \coh ^1 (\A_f^p , T)  \to \coh ^1 (\A_f^p , T) / \Sha_G^{\infty, p} (\Q, T). $$

In the above, $\Sha_G ^{\infty} (\QQ, T)$ denotes the kernel of the composite map $\Sha ^{\infty} (\QQ, T) \to \Sha ^{\infty} (\QQ, I_{\phi}) \to \Sha ^{\infty} (\QQ, G)$, and similarly for $\Sha_G^{\infty, p} (\QQ, T)$; see <ref> and <ref>.

The next lemma relates the two notions of tori-rationality for elements of $\Gamma(\cH)$ and of $\Gamma(\E^p)$.

Let $\dertau\in \Gamma(\cH)$. The following statements are equivalent.

* $\dertau$ is tori-rational.

* The section $\dertau$ has a lift $\underline \sigma \in \Gamma(\E^p)$ along the natural  surjection  $\Gamma(\E^p) \to \Gamma(\cH)$ such that $\underline \sigma$ is tori-rational.

* Every $\underline \sigma \in \Gamma(\E^p)$ lifting $\dertau $ is tori-rational.

The implication (ii) $\Rightarrow$ (i) follows from the commutative diagram (<ref>). Obviously (iii) $\Rightarrow$ (ii). It remains to show (i) $\Rightarrow$ (iii).

Let $\underline \sigma \in \Gamma(\E^p)$ be a lift of $\dertau$. For each $\phi \in \AM$, we have a natural surjection $ \E (Z_{I_\phi}, I_{\phi} ; \A_f) \to \cH(\phi)$ as in Lemma <ref>. Fix an element $\epsilon_{\phi} \in \E (Z_{I_\phi}, I_{\phi} ; \A_f)$ lifting $\dertau(\phi)$. Then the image of $\dertau(\phi)$ under (<ref>) is represented by $\epsilon_{\phi}$.

By the commutative diagram (<ref>), the image of $\underline \sigma (\phi)$ under $\coh^1(\A_f^p , Z_{I_{\phi}}) \to \coh ^1 (\A_f, Z_{I_{\phi}})$
equals the sum of $\epsilon_{\phi}$ and the image of some $\upsilon_{\phi}\in \Sha ^{\infty}_{I_{\phi}} (\QQ, Z_{I_{\phi}})$. For each maximal torus $T \subset I_{\phi}$, by tori-rationality of $\dertau$ there exists an element $\beta _{\phi ,T} \in \Sha ^{\infty} _G (\QQ, T)$ whose image in $\coh^1(\A_f, T)$ equals that of $\epsilon_{\phi}$. Let $\beta_{ \phi ,T}' \in \Sha ^{\infty} _G(\QQ, T)$ be the sum of $\beta _{\phi ,T}$ and the image of $\upsilon_{\phi}$ in $ \Sha ^{\infty} _{I_\phi} (\QQ, T) \subset \Sha _G^{\infty} (\QQ, T)$. Then the image of $\underline \sigma (\phi)$ under

$$\E (Z_{I_{\phi}}, I_\phi ; \A_f^p) \to \E (Z_{I_{\phi}}, I_\phi ; \A_f)   \to \coh ^1 (\A_f, T)$$
equals that of $\beta' _{\phi ,T}$. It follows that $\beta' _{\phi ,T} $ lies in $\Sha _G^{\infty, p} (\QQ, T)$, and that the image of $\underline \sigma (\phi)$ in $\coh^1(\A_f^p, T)/ \Sha_G^{\infty, p} (\Q, T)$ is trivial, as desired.

§.§ The Langlands–Rapoport–tau Conjecture

$(G,X, p ,\cG)$ be an unramified Shimura datum. Let $\dertau \in \Gamma(\cH)_1$ (Definition <ref>). For each admissible morphism $\phi: \Q_f \to \G_G$, we set

$$ S_{\dertau}(\phi) : = S_{\tilde{ \dertau}(\phi)} (\phi), $$
where $\tilde {\dertau} (\phi) \in I_{\phi}^{\ad}(\A_f)$ is any lift of $\dertau(\phi) \in \cH(\phi)$, and $S_{\tilde{ \dertau}(\phi)} (\phi)$ is defined as in <ref>. The isomorphism class of the $\Phi^\ZZ \times G(\adele_f^p)$-set $S_{\dertau}(\phi)$ is independent of the choice of $\tilde {\dertau} (\phi)$. Moreover, from the assumption that $\dertau \in \Gamma(
\cH)_1$, it follows that the isomorphism class of the $\Phi^\ZZ \times G(\adele_f^p)$-set $S_{\dertau}(\phi)$ depends on $\phi$ only via its conjugacy class.

We write
$\mathsf{LR} (G,X, p, \cG, \dertau) $ for the modification of Conjecture <ref> where each $S(\phi)$ is replaced by $S_{\dertau}(\phi)$.

Combined with Theorem <ref> and Theorem <ref>, the main result of [53] can be stated as follows.

Let $(G,X, p ,\cG)$ be an unramified Shimura datum such that $(G,X)$ is of abelian type. Assume $p>2$. Then there exists $\dertau \in \Gamma(\cH)_1$ such that the statement $\mathsf{LR} (G,X, p, \cG, \dertau)$ holds.

We refer the reader to Theorem <ref> below for a more precise version of the above theorem. There we will also explain that the assumption $p>2$ can be removed. In the following conjecture, we impose better control of $\dertau$ than the condition that $\dertau $ belongs to $\Gamma(\cH)_1$.
For each unramified Shimura datum $(G,X, p, \cG)$, there exists a tori-rational element $\dertau \in \Gamma(\cH)_0$ such that the statement $\mathsf{LR} (G,X, p, \cG, \dertau)$ holds.

Conjecture <ref> implies Conjecture <ref>.

We devote the next section to the proof of Theorem <ref>. Note that Conjecture <ref> is weaker than Conjecture <ref>, as the latter asserts that $\dertau$ can be taken to be trivial.
In view of Theorem <ref>, Conjecture <ref> is a viable substitute for Conjecture <ref> for  applications to computing zeta functions and $\ell$-adic cohomology.

Theorem <ref> is weaker than Conjecture <ref> in that no extra control of $\dertau \in  \Gamma(\cH)_1$ is provided. In Part <ref> we shall improve on Theorem <ref> and prove Conjecture <ref> in the case of abelian type.

§ LANGLANDS–RAPOPORT–TAU IMPLIES POINT COUNTING

Throughout <ref>, we fix an unramified Shimura datum $(G,X,p,\cG)$, and keep the notation $E, \fkp, q=p^r$ as in <ref>. Our goal is to prove Theorem <ref>.

§.§ Semi-admissible and admissible Langlands–Rapoport pairs

By a Langlands–Rapoport pair (LR pair), we mean a pair $(\phi,\epsilon)$, where $ \phi: \Qf \to \G_G$ is a morphism in $\proredgb_{\Q}$, and $\epsilon$ is an element of $I_{\phi}(\QQ).$
We call such a pair $(\phi,\epsilon)$ semi-admissible, if $\phi$ is admissible. We denote by $\wgp$ the set of all LR pairs, and by $\wgp_{\sa}$ the subset of semi-admissible LR pairs.

If $(\phi,\epsilon) \in \wgp_{\sa}$, then $\epsilon$ is semi-simple. This is because $(I_\phi/Z_G) (\RR)$ is anisotropic by Lemma <ref>.

The group $G({\overline {\QQ}})$ acts on the set $\wgp$ by conjugation in the following sense. If $(\phi, \epsilon) \in \wgp$ and $g\in G({\overline {\QQ}})$, then $\Int(g) (\phi,\epsilon) := (\Int( g) \circ \phi, \Int(g)\epsilon)$ is also an element of $\wgp$. We write
$$ \langle \wgp \rangle : = \wgp/G(\overline \Q)\text{-conjugacy}.$$
For $(\phi,\epsilon) \in \wgp$, we denote by

$$\langle \phi,\epsilon \rangle \in \langle \wgp \rangle $$
the $G(\overline \QQ)$-conjugacy class of $(\phi,\epsilon)$. The subset $\wgp_{\sa} \subset \wgp$ is stable under $G({\overline {\QQ}})$-conjugacy, and we write
$$\langle \wgp_{\sa} \rangle : =  \wgp_{\sa}/G(\overline \Q)\text{-conjugacy}. $$

Let $(\phi, \epsilon)\in \wgp_{\sa}$. Let $\theta = \phi(p)\circ \zeta_p  : \G_p\to \G_G(p)$, and choose $g\in\mathcal{UR} (\theta)$ (see Definition <ref> and Lemma <ref>). Let $b_g : = b_{\Int(g^{-1}) \circ \theta} \in G(\Q_p^{\ur})$ (see Definition <ref>), and let $\epsilon_g : = \Int(g^{-1}) (\epsilon) \in G(\overline \Q)$. Since $\epsilon$ is semi-simple (Remark <ref>), so is $\epsilon_g$.

We have $\epsilon_g \in I_{\Int(g)^{-1} \circ \theta} (\Q_p)$, and hence $\epsilon_g \in J_{b_g}(\Q_p)$ by Proposition <ref>. Also, by the same proposition, $b_g$ is decent. It then also follows that $\epsilon_g \in G(\Q_p^{\ur})$, as $J_{b_g}(\Q_p) \subset G(\Q_p^{\ur})$ (see <ref>). We let
$$\cls_p(\phi,\epsilon) : = \set{ (b_g, \epsilon_g) \mid g \in \mathcal{UR}(\theta)}. $$

Let $G(\Q_p^{\ur})$ act on $\cls_p(\phi,\epsilon)$ on the left by $h \cdot (b,\epsilon') : =  (h b \sigma (h)^{-1}, h \epsilon' h^{-1})$. Since $\mathcal {UR} (\theta)$ is a $G(\Q_p^\ur)$-torsor, the  $G(\Q_p^{\ur})$-action on $\cls_p(\phi,\epsilon)$ is transitive.

Fix a positive integer $m$, and let $n=mr$. (Recall that $q=p^r$ is the residue cardinality of $\fkp$.) We will define $q^m$-admissible LR pairs, which will serve to describe $\FF_{q^m}$-points of the Shimura variety.

Let $(\phi,\epsilon) \in \wgp_{\sa}$, and let $(b,  \epsilon')\in \cls_p(\phi,\epsilon)$. Recall from <ref> and <ref> that the set $X_p(\phi) $ is identified with the set $ X_{-\mu}(b )$, where $\mu \in \dmu_X^{\cG}$. The action of $\Phi$ on $ X_p(\phi)$ corresponds to the left multiplication by $\Phi_b:= (b\rtimes \sigma)^r$ on $X_{-\mu}(b)$. The action of $\epsilon$ on $X_p(\phi)$ corresponds to the left multiplication by $\epsilon'$ on $X_{-\mu_X}(b)$. Let
$$ X_p(\phi,\epsilon, q^m) : = \set{x\in X_p(\phi) \mid \epsilon x = \Phi^m x}.$$

Then we have an identification

\begin{align*}
X_p(\phi,\epsilon, q^m) \cong X_{-\mu}(b,\epsilon' ,q^m) := \set{x\in X_{-\mu}(b)\mid\epsilon' x = \Phi_b^m x   }.
\end{align*}

This motivates the following definition.

We say that an element $(\phi,\epsilon) \in \wgp_{\sa}$ is $q^m$-admissible, if for one (and hence every) element $(b,\epsilon')$ of $\cls_p(\phi,\epsilon)$, we have

$$ \set{x\in G(\LL)/ \cG(\breve \ZZ_p) \mid\epsilon' x = \Phi_b ^m x} \neq \emptyset.  $$
We denote by $\wgp_{\adm}(q^m)$ the set of $q^m$-admissible elements of $\wgp_{\sa}$. This subset is stable under $G(\overline \Q)$-conjugacy, and we write
$$ \lprod{\wgp_{\adm}(q^m)} : =  \wgp_{\adm}(q^m)/G(\overline \Q)\text{-conjugacy}. $$

Let $(\phi,\epsilon) \in \wgp_{\adm}(q^m)$, and let $(b, \epsilon') \in \cls_p(\phi,\epsilon)$. Then there exists $t \in \ZZ_{\geq 1}$ satisfying the following conditions.

* The fractional cocharacter $t\nu_b$ is a cocharacter of $G$ defined over $\QQ_{p^t}$.

* We have $\epsilon'^{t}= p^{nt\nu_b} k $, for $k$ lying in some conjugate of $\cG(\breve \ZZ_p)$ in $G(\LL)$.

We have seen in <ref> that $b$ is decent. Take $t$ such that $b$ is $t$-decent. Then condition (i) is already satisfied. Also by assumption there exists $x\in G(\LL)/ \cG(\breve \ZZ_p)$ such that
$$ \epsilon' x = \Phi_b^m x .  $$
Since $\epsilon'$ commutes with $\Phi_b = (b\rtimes \sigma)^r$, we have
$$ \epsilon'^{t} x = \Phi_b^{mt} x .$$
By Lemma <ref>, we can replace $t$ by a multiple, and assume that $ \sigma^t x = x.$ Let $s = tn =tmr$. Then
$$ \epsilon'^{t} x = \Phi_b^{mt} x = (b\rtimes \sigma)^{s} x =  b\leftidx{^\sigma} b\leftidx{^{\sigma^2}}b\cdots \leftidx{^{\sigma^{s-1} }} b x. $$

\begin{align}\label{epsilon and newton 2}