---
abstract: |
    In this article, we prove results about the cohomology of compact unitary group Shimura varieties at split places. In nonendoscopic cases, we are able to give a full description of the cohomology, after restricting to integral Hecke operators at $p$ on the automorphic side. We allow arbitrary ramification at $p$; even the PEL data may be ramified. This gives a description of the semisimple local Hasse-Weil zeta function in these cases.

    We also treat cases of nontrivial endoscopy. For this purpose, we give a general stabilization of the expression given in [@ScholzeDefSpaces], following the stabilization given by Kottwitz in [@KottwitzStabilization]. This introduces endoscopic transfers of the functions $\phi_{\tau,h}$ introduced in [@ScholzeDefSpaces]. We state a general conjecture relating these endoscopic transfers with Langlands parameters.

    We verify this conjecture in all cases of EL type, and deduce new results about the endoscopic part of the cohomology of Shimura varieties. This allows us to simplify the construction of Galois representations attached to conjugate self-dual regular algebraic cuspidal automorphic representations of ${\mathrm{GL}}_n$, as previously constructed by one of us, [@Shin11].
author:
- 'Peter Scholze, Sug Woo Shin'
bibliography:
- 'LKMethodStabilization.bib'
title: On the cohomology of compact unitary group Shimura varieties at ramified split places
---

Introduction
============

This paper deals with the problem of determining the Galois action on the cohomology of Shimura varieties, specifically at places of bad reduction. Let us first briefly recall the expected description, due to Langlands.

Let ${\mathrm{Sh}}_K$ be some Shimura variety associated to a reductive group ${\mathbf{G}}$ over ${\mathbb{Q}}$ and a compact open subgroup $K\subset {\mathbf{G}}({\mathbb{A}}_f)$, and some additional data. It is defined over a number field $E$, canonically embedded into ${\mathbb{C}}$. For definiteness, let us assume that the Shimura variety is compact, as we will only deal with this case; it is equivalent to requiring that ${\mathbf{G}}$ is anisotropic modulo center[^1]. Then one considers the etale cohomology groups $$H^i = \varinjlim_K H^i_{\mathrm{et}}(\mathrm{Sh}_K\otimes_E \bar{{\mathbb{Q}}},\bar{\mathbb{Q}}_\ell)\ ,$$ which carry an action of ${\mathbf{G}}({\mathbb{A}}_f)$ (via Hecke correspondences) and of ${\mathrm{Gal}}(\bar{{\mathbb{Q}}}/E)$. In the main body of the paper we consider the cohomology groups with coefficients in a local system associated to an algebraic representation $\xi$ of ${\mathbf{G}}$, where everything works without essential change. Let $H^\ast$ be the alternating sum of the $H^i$ in a suitable Grothendieck group; then one can write $$H^\ast = \sum_{\pi_f} \pi_f\otimes \sigma(\pi_f)\ ,$$ where $\pi_f$ runs through irreducible admissible representations of ${\mathbf{G}}({\mathbb{A}}_f)$, and $\sigma(\pi_f)$ is some virtual finite-dimensional representation of ${\mathrm{Gal}}(\bar{{\mathbb{Q}}}/E)$.

If one forgets about the action of ${\mathrm{Gal}}(\bar{{\mathbb{Q}}}/E)$ and is only interested in describing the ${\mathbf{G}}({\mathbb{A}}_f)$-action, then one can base-change to ${\mathbb{C}}$ and use Matsushima’s formula, which computes the cohomology as the real-analytic de Rham cohomology of ${\mathrm{Sh}}_K({\mathbb{C}})$. As ${\mathrm{Sh}}_K({\mathbb{C}})$ is a (finite disjoint union of) locally symmetric varieties for ${\mathbf{G}}({\mathbb{R}})$, automorphic forms for ${\mathbf{G}}$ enter the stage, and in particular one sees that if $\pi_f$ appears in $H^\ast$, then there is some $\pi_\infty$ such that $\pi_f\otimes \pi_\infty$ is an irreducible automorphic representation of ${\mathbf{G}}({\mathbb{A}})$. Using relative Lie algebra cohomology of $\pi_\infty$, one expresses the contribution of any automorphic representation $\pi_f\otimes \pi_\infty$ of ${\mathbf{G}}({\mathbb{A}})$ to $H^\ast$.

The situation becomes more complicated when one is trying to understand the Galois action. Let us recall the general recipe given in Kottwitz’ paper [@KottwitzStabilization]. Let us restrict to the contribution of tempered representations for simplicity. (The general case is similar, using $A$-parameters instead.) Let us remark that tempered representations should only show up in the middle degree cohomology, so that this really only gives part of the whole picture.

First, note that any irreducible automorphic representation $\pi$ of ${\mathbf{G}}({\mathbb{A}})$ should give rise to a global Langlands parameter, which should be some map $$\varphi_{\pi}: \mathcal{L}_{\mathbb{Q}}{\rightarrow}{}^L {\mathbf{G}}\ ,$$ where $\mathcal{L}_{\mathbb{Q}}$ is the conjectural global Langlands group, and ${}^L {\mathbf{G}}$ is the $L$-group of ${\mathbf{G}}$, which is the semidirect product of the dual group $\hat{{\mathbf{G}}}$ over ${\mathbb{C}}$ and ${\mathrm{Gal}}(\bar{{\mathbb{Q}}}/{\mathbb{Q}})$. The parameter $\varphi_{\pi}$ should be discrete due to our assumption on ${\mathbf{G}}$. Fix an isomorphism $\bar{\mathbb{Q}}_\ell\cong {\mathbb{C}}$. Henceforth the subscript $\ell$ for a complex group will designate the base change from ${\mathbb{C}}$ to $\ol{{\mathbb{Q}}}_l$. In the cases of interest here, such a parameter $\varphi_{\pi}$ should be closely related to an $\ell$-adic Galois representation $$\varphi_{\pi,\ell}: {\mathrm{Gal}}(\bar{{\mathbb{Q}}}/{\mathbb{Q}}){\rightarrow}{}^L {\mathbf{G}}_\ell \ .$$ [^2] A discrete tempered global Langlands parameter $$\varphi: \mathcal{L}_{\mathbb{Q}}{\rightarrow}{}^L {\mathbf{G}}\ ,$$ upon restriction to each place $v$ of ${\mathbb{Q}}$, should give rise to local $L$-packets $\Pi(\varphi_v)$, finite sets of isomorphism classes of representations of ${\mathbf{G}}({\mathbb{Q}}_v)$. We let $\Pi_f(\varphi)$ be the set of isomorphism classes of irreducible admissible representations $\pi_f$ of ${\mathbf{G}}({\mathbb{A}}_f)$ such that $\pi_p\in \Pi(\varphi_p)$ for all $p$.

On the other hand, the data defining the Shimura variety give rise to a natural representation $$r: {}^L ({\mathbf{G}}\otimes_{{\mathbb{Q}}} E){\rightarrow}{\mathrm{GL}}_N\ ,$$ for some integer $N$. In particular, one gets an $\ell$-adic Galois representation $r\circ \varphi_{\ell}|_{{\mathrm{Gal}}(\bar{{\mathbb{Q}}}/E)}$: $${\mathrm{Gal}}(\bar{{\mathbb{Q}}}/E)\buildrel {\varphi_{\ell}}\over{\rightarrow}{}^L ({\mathbf{G}}\otimes_{{\mathbb{Q}}} E)_\ell\buildrel r\over{\rightarrow}{\mathrm{GL}}_N(\bar{{\mathbb{Q}}}_\ell)\ .$$ A first approximation would be that the contribution of tempered representations to $H^\ast$ is given by (up to twists) $$\label{e:cohom-Sh-naive}
\sum_{\varphi} \sum_{\pi_f\in \Pi_f(\varphi)} m(\pi_f) \pi_f\otimes (r\circ \varphi_{\ell}|_{{\mathrm{Gal}}(\bar{{\mathbb{Q}}}/E)})\ .$$ Here $m(\pi_f)$ are certain (possibly negative) integers related to multiplicities of automorphic representations.

This approximation turns out to be correct in the situations where one can ignore endoscopy. A part of this paper will be restricted to such situations, but the construction of Galois representations requires working in a more general context.

The additional ingredient needed is the group $S_\varphi\subset \hat{{\mathbf{G}}}$ of self-equivalences of $\varphi$, i.e. the subgroup of $\hat{{\mathbf{G}}}$ which centralizes the image of $\varphi$ up to a locally trivial 1-cocycle of ${\mathcal{L}}_{{\mathbb{Q}}}$ into $Z(\hat{{\mathbf{G}}})$, cf. [@Kot84a], §11. Let $\mathfrak{S}_\varphi = S_\varphi / Z(\hat{{\mathbf{G}}})$, which is a finite abelian group in the cases of interest[^3]. If $\mathfrak{S}_\varphi$ is trivial, then the contribution of $\varphi$ to should be correct. Such $\varphi$ are called stable.

To give the general recipe, let us look at the corresponding $\ell$-adic version. We get an action of $S_{\varphi,\ell}$ on the Galois representation $r\circ \varphi_{\ell}|_{{\mathrm{Gal}}(\bar{{\mathbb{Q}}}/E)}$. One checks that the subgroup $Z(\hat{{\mathbf{G}}})_\ell$ acts by a certain fixed character $\mu_1$. Let $\nu$ be a character of $S_{\varphi,\ell}$ whose restriction to $Z(\hat{{\mathbf{G}}})_\ell$ is $\mu_1$, and denote by $(r\circ \varphi_{\ell}|_{{\mathrm{Gal}}(\bar{{\mathbb{Q}}}/E)})_\nu$ the direct summand of $r\circ \varphi_{\ell}|_{{\mathrm{Gal}}(\bar{{\mathbb{Q}}}/E)}$ on which $S_{\varphi,\ell}$ acts through the character $\nu$. Note that the set of such $\nu$ is a principal homogeneous space under the dual group of $\mathfrak{S}_\varphi$.

Now, the general contribution of tempered representations to $H^\ast$ should be (up to twists) $$\label{e:cohom-Sh}
\sum_\varphi \sum_{\pi_f\in \Pi_f(\varphi)} \sum_{\nu} m(\pi_f,\nu) \pi_f\otimes (r\circ \varphi_{\ell}|_{{\mathrm{Gal}}(\bar{{\mathbb{Q}}}/E)})_\nu\ .$$ Again, $m(\pi_f,\nu)$ are certain integers, whose general definition is somewhat subtle.

The object of this paper is to verify such a description in as many cases as possible. As even the ingredients in this formula remain largely conjectural, one has to be more specific about the precise statement one wants to prove. We fix a prime ${{\mathfrak p}}$ of $E$ above a rational prime $p\neq \ell$, and restrict the representation of ${\mathrm{Gal}}(\bar{{\mathbb{Q}}}/E)$ to the Weil group $W_{E_{{\mathfrak p}}}$ of $E_{{\mathfrak p}}$. Then $\pi_p$ has a local $L$-parameter, which gives a map $$\varphi_{\pi_p}: W_{{\mathbb{Q}}_p}{\rightarrow}{}^L {\mathbf{G}}_\ell\ .$$ One expects that if $\pi_f\in \Pi(\varphi)$, then $\varphi_{\pi_p}$ is the restriction of $\varphi_\ell$ to the local Weil group; this is known as the local-global compatibility. In particular, we have $$(r\circ \varphi_{\ell}|_{{\mathrm{Gal}}(\bar{{\mathbb{Q}}}/E)})|_{W_{E_{{\mathfrak p}}}} = r\circ \varphi_{\pi_p}|_{W_{E_{{\mathfrak p}}}}\ ,$$ so that the local Weil group representations are determined by the local components of the representation $\pi_f$. We want to prove that the contribution of tempered representations to $H^\ast$ is $$\label{e:cohom-Sh-local}
\sum_\varphi \sum_{\pi_f\in \Pi_f(\varphi)} \sum_{\nu} m(\pi_f,\nu) \pi_f\otimes (r\circ \varphi_{\pi_p}|_{W_{E_{{\mathfrak p}}}})_\nu$$ as a virtual ${\mathbf{G}}({\mathbb{A}}_f)\times W_{E_{{\mathfrak p}}}$-representation.

This still requires the existence of the local Langlands correspondence for the group ${\mathbf{G}}({\mathbb{Q}}_p)$. By [@HT01] and [@Hen00], it is known for general linear groups. It is in this setup that we prove our results. In other words, we start with a Shimura variety associated to a reductive group ${\mathbf{G}}$ over ${\mathbb{Q}}$ which is anisotropic modulo center, such that locally at $p$, ${\mathbf{G}}$ is a product of Weil restrictions of general linear groups. As ${\mathbf{G}}$ will be a unitary (similitude) group in this case, we use the term compact unitary group Shimura varieties, and the prime $p$ is called a split place.[^4] We note that we allow both the representation $\pi_p$ and the implicit CM field defining the unitary group ${\mathbf{G}}$ to be ramified at $p$.

Our first theorem is the following. Here, we allow coefficients given by a general irreducible algebraic representation $\xi$ of ${\mathbf{G}}$. The corresponding cohomology group is denoted $H^\ast_\xi$.

Assume that ${\mathrm{Sh}}$ is a compact unitary group Shimura variety, $p$ is a split place, and endoscopy is trivial, as in [@KottwitzLambdaAdic]. Then $$H^\ast_\xi = \sum_{\pi_f} a(\pi_f) \pi_f\otimes (r\circ \varphi_{\pi_p}|_{W_{E_{{\mathfrak p}}}})|\cdot|^{-\dim {\mathrm{Sh}}/2}$$ as a virtual ${\mathbf{G}}({\mathbb{A}}_f^p)\times {\mathbf{G}}({\mathbb{Z}}_p)\times W_{E_{{\mathfrak p}}}$-representation. Here $\pi_f$ runs through irreducible admissible representations of ${\mathbf{G}}({\mathbb{A}}_f)$, the integer $a(\pi_f)$ is as in [@KottwitzLambdaAdic], p. 657, and $\varphi_{\pi_p}$ is the local Langlands parameter associated to $\pi_p$. Also ${\mathbf{G}}({\mathbb{Z}}_p)$ is a certain maximal compact subgroup of ${\mathbf{G}}({\mathbb{Q}}_p)$.

The restriction of the ${\mathbf{G}}({\mathbb{Q}}_p)$-action to ${\mathbf{G}}({\mathbb{Z}}_p)$ is due to our method of proof. Let us remark that in the situation of the theorem, one expects that the $p$-component $\pi_p$ is determined by $\pi_f^p$. Granting this, the identity would extend to an identity of ${\mathbf{G}}({\mathbb{A}}_f)\times W_{E_{{\mathfrak p}}}$-representations. Unconditionally, the theorem gives a description of the semisimple Hasse-Weil zeta function.

In the situation of the theorem, let $K\subset {\mathbf{G}}({\mathbb{A}}_f)$ be any sufficiently small compact open subgroup. Then the semisimple local Hasse-Weil zeta function of ${\mathrm{Sh}}_K$ at the place ${{\mathfrak p}}|p$ of $E$ is given by $$\zeta_{{\mathfrak p}}^{\mathrm{ss}}({\mathrm{Sh}}_K,s) = \prod_{\pi_f} L^{\mathrm{ss}}(s-\dim {\mathrm{Sh}}/2, \pi_p, r)^{a(\pi_f)\dim \pi_f^K}\ .$$

We remark that in these nonendoscopic cases, no form of the fundamental lemma or related work is needed, except for the existence of base change transfers for ${\mathrm{GL}}_n$, as proved by Arthur-Clozel, [@ArthurClozel].

The second theorem is a description of the cohomology of compact unitary group Shimura varieties at split primes in endoscopic cases. In this case, the full machinery of endoscopy (for unitary groups) is used, and we have to make some additional assumptions concerning our data to establish unconditional results. Specifically, consider a unitary group ${\mathbf{G}}$ relative to a CM quadratic extension $F/F_0$ such that $F$ contains an imaginary quadratic field ${\mathcal{K}}$. We assume that $F_0\neq {\mathbb{Q}}$. Fix a rational prime $p$ split in ${\mathcal{K}}$ and a prime ${{\mathfrak p}}$ of the reflex field $E$ above $p$. We assume that ${\mathbf{G}}$ is quasisplit locally at all finite places but we do not fix the signature at infinity, except that ${\mathbf{G}}$ has a compact factor at one infinite place. The group ${\mathbf{G}}({\mathbb{A}}_{\mathcal{K}})$ admits an order 2 automorphism $\theta$ induced by the complex conjugation on ${\mathcal{K}}$. Let $\Pi$ be a $\theta$-stable automorphic representation of ${\mathbf{G}}({\mathbb{A}}_{\mathcal{K}})\cong {\mathrm{GL}}_1({\mathbb{A}}_{\mathcal{K}})\times {\mathrm{GL}}_n({\mathbb{A}}_F)$ which has infinite component determined by $\xi$. We define a virtual representation of ${\mathrm{Gal}}(\ol{{\mathbb{Q}}}/E)$ $$\label{e:H(pi_f)}
    H^*_\xi(\pi_f)=\operatorname{Hom}_{{\mathbf{G}}({\mathbb{A}}_f)} (\pi_f,H^*_\xi)$$ and also the $\Pi$-part $H^*_\xi(\Pi)$ of $H^*_\xi$. The latter is roughly the sum of $ H^*_\xi(\pi_f)$ over the set of $\pi_f$ whose base change is $\Pi_f$ (cf. ). We consider two cases, which are loosely described as:

-   (Case ST) $\Pi$ is cuspidal.

-   (Case END) $\Pi$ is induced from a $\theta$-stable cuspidal automorphic representation on a maximal proper Levi subgroup of ${\mathbf{G}}({\mathbb{A}}_{\mathcal{K}})$.

\[MainTheorem4\] The following hold up to an explicit constant (cf. ). In (Case ST) $$H^*_\xi(\Pi)|_{W_{E_{{{\mathfrak p}}}}}=
(r\circ \varphi_{\pi_p}|_{W_{E_{{{\mathfrak p}}}}})|\cdot|^{-\dim{\mathrm{Sh}}/2}\ .$$ In (Case END) there exists a natural decomposition $$r\circ \varphi_{\pi_p}|_{W_{E_{{{\mathfrak p}}}}} = (r\circ \varphi_{\pi_p}|_{W_{E_{{{\mathfrak p}}}}})_1 + (r\circ \varphi_{\pi_p}|_{W_{E_{{{\mathfrak p}}}}})_2$$ into two representations, and some $i\in \{1,2\}$ depending only on $\Pi$ such that $$H^*_\xi(\Pi)|_{W_{E_{{{\mathfrak p}}}}}= (r\circ \varphi_{\pi_p}|_{W_{E_{{{\mathfrak p}}}}})_i |\cdot|^{-\dim{\mathrm{Sh}}/2}\ .$$

As a corollary of this theorem, one can reprove the existence of Galois representations associated to regular algebraic conjugate selfdual cuspidal automorphic representations of ${\mathrm{GL}}_n$ over CM fields, as previously constructed by one of us, [@Shin11], cf. Theorem \[t:ExGalRepr\]. We can also reprove the Ramanujan-Petersson conjecture at unramified places, cf. [@ClozelPurity]:

Let $F$ be a CM field, and let $\Pi$ be a regular algebraic conjugate selfdual cuspidal automorphic representation for ${\mathrm{GL}}_n({\mathbb{A}}_F)$. Then for all finite places $v$ of $F$ lying above a rational prime $p$ above which $F$ and $\Pi$ are unramified, the component $\Pi_v$ is tempered.

Although our theorem gives information in the ramified case as well, we do not see a direct way of proving temperedness at ramified places, as done by Caraiani, [@Caraiani].

Let us explain the strategy of proof. This paper is a sequel to [@ScholzeDefSpaces]. We recall that under certain circumstances, the main theorem of [@ScholzeDefSpaces] gives an equality of the form $$\label{e:MT1}
{\operatorname*{tr}}(\tau\times hf^p | H^\ast_\xi) = \sum_{\substack{(\gamma_0;\gamma,\delta)\\ \alpha(\gamma_0;\gamma,\delta)=1}} c(\gamma_0;\gamma,\delta) O_\gamma(f^p)TO_{\delta\sigma}(\phi_{\tau,h}) {\operatorname*{tr}}\xi(\gamma_0)$$ for the trace of a Hecke operator $hf^p$ twisted with an element of the local Weil group $\tau$ at a prime ${{\mathfrak p}}|p$ of the reflex field $E$. We refer to Section \[s:proof-Thm1.2\], especially Theorem \[MainTheorem1\], for a precise statement. Here, $h\in C_c^\infty({\mathbf{G}}({\mathbb{Z}}_p))$ for a certain extension of ${\mathbf{G}}$ to a group scheme over ${\mathbb{Z}}_{(p)}$. There is no naive generalization of this theorem to general $h$, and for this reason our method only gives information about the ${\mathbf{G}}({\mathbb{A}}_f^p)\times {\mathbf{G}}({\mathbb{Z}}_p)\times W_{E_{{\mathfrak p}}}$-action.

We give a general stabilization of this expression, following the arguments of Kottwitz in [@KottwitzStabilization]. Write ${\mathcal{E}}_{{\mathrm{ell}}}({\mathbf{G}})$ for the set of isomorphism classes of elliptic endoscopic triples for ${\mathbf{G}}$. For $({\mathbf{H}},s,\eta)\in {\mathcal{E}}_{{\mathrm{ell}}}({\mathbf{G}})$, let $f^{{\mathbf{H}}}=f^{{\mathbf{H}},p}f^{{\mathbf{H}}}_{\tau,h} f^{{\mathbf{H}}}_\xi$ be the function on ${\mathbf{H}}({\mathbb{A}})$ obtained from $f^p$, $\phi_{\tau,h}$ and $\xi$. Here $f^{{\mathbf{H}},p}$ is the usual transfer of $f^p$, whereas $f^{{\mathbf{H}}}_{\tau,h}$ is a twisted transfer of $\phi_{\tau,h}$ relative to a suitable $L$-morphism. The function $ f^{{\mathbf{H}}}_\xi$ at infinity is an explicit linear combination of pseudo-coefficients for discrete series. Let $ST^{{\mathbf{H}}}_{{\mathrm{ell}}}$ denote the stable distribution on ${\mathbf{H}}({\mathbb{A}})$ given as the sum of stable orbital integrals on elliptic semisimple elements of ${\mathbf{H}}({\mathbb{Q}})$.

\[MainTheorem2\] The formula is stabilized as follows, where the sum runs over ${\mathcal{E}}_{{\mathrm{ell}}}({\mathbf{G}})$. $${\operatorname*{tr}}(\tau\times h f^p|H^{\ast}_{\xi}) = \sum_{({\mathbf{H}},s,\eta)} \iota({\mathbf{G}},{\mathbf{H}}) ST^{{\mathbf{H}}}_{{\mathrm{ell}}} (f^{{\mathbf{H}}})$$

To apply Theorem \[MainTheorem2\], it is essential to understand character identities satisfied by $f^{{\mathbf{H}}}_{\tau,h}$. We are able to formulate a precise conjecture, cf. Conjecture \[c:char-id\] and Conjecture \[c:char-id-st-Bernstein\], which is purely local in nature and may be thought of as a common generalization of the identities [@ScholzeLLC Thm 1.2.(a)] and [@KottwitzStabilization (9.7)]. As explained in the introduction of [@ScholzeDefSpaces], it is also related to a conjecture of Kottwitz about similar functions arising via the bad reduction of Shimura varieties of parahoric type, and related ideas were expressed recently by Haines.

The conjecture relates (the endoscopic transfers of) the functions $\phi_{\tau,h}$ arising from deformation spaces of $p$-divisible groups with the local Langlands Correspondence. In this sense it is similar in spirit to the conjectures that describe the cohomology of Rapoport-Zink spaces in terms of the local Langlands Correspondence; the precise relation between the two points of view remains to be clarified. Let us only mention here that our conjecture has the advantage that all Langlands parameters of ${\mathbf{H}}$ occur in the same way, as was the case in [@ScholzeLLC], Theorem 1.2.

As evidence we verify the conjecture when all data are unramified, cf. Lemma \[l:conj-unramified\]. More importantly, we prove the conjecture in all cases of EL type, cf. Corollary \[c:conj-GLn\]. This extends the result of [@ScholzeLLC], Theorem 1.2, to arbitrary signature. We stress here that we allow ramified EL data.

Granting this conjecture, we follow the arguments of [@KottwitzStabilization] and verify that for any compact PEL type Shimura variety of type A or C one gets the expected description of the cohomology, assuming some additional hypotheses on the global $A$-packet classification and the stable trace formula, as in [@KottwitzStabilization]. This justifies the general form of the conjecture.

Knowing the general character identities satisfied by (the endoscopic transfers of) the test function $\phi_{\tau,h}$, our main theorems follow from Theorem \[MainTheorem2\] and applications of suitable trace formulas.

We remark on one more application of our arguments in the nonendoscopic case. Namely, we prove that for certain compact unitary group Shimura varieties without endoscopy, all Newton strata are nonempty at “split” places in the above sense, cf. Corollary \[cor:AllPDivGroupsOccur\] and Corollary \[cor:NewtonNonempty\]. In particular, this proves that the deformation spaces considered in [@ScholzeDefSpaces] are algebraizable in all cases of EL type, cf. Corollary \[cor:ELAlg\].

Let us summarize the content of the different sections. In the first sections, we give the stabilization leading to Theorem \[MainTheorem2\]. We also explain the process of pseudostabilization in the nonendoscopic case, cf. Section \[s:pseudostab\]. Afterwards, we state the conjecture about the character identitites satisfied by the endoscopic transfers $f_{\tau,h}^{\mathbf{H}}$ of $\phi_{\tau,h}$ in Section \[s:char-id\]. This will involve the theory of the stable Bernstein center, which we recall in Section \[s:stBernstein\]. We go on by proving the conjecture in cases of EL type in Section \[s:prove-conj\]. The last sections apply this result to prove our main theorems. We note that a reader only interested in our results in the nonendoscopic case finds the argument in Section \[s:pseudostab\], the first half of Section \[s:prove-conj\], and Section \[s:lgc\].

[**Acknowledgments.**]{} This work was started as a result of a discussion at the IAS in Princeton during the special year on Galois representations and automorphic forms. The authors want to thank this institution for the hospitality, and also thank T. Haines for related discussions. The first-named author wants to thank R. Taylor for the invitation to speak there. Moreover, he thanks M. Rapoport for his constant encouragement and help. The second-named author wishes to thank D. Kazhdan and D. Vogan for answering his questions. This work was written while the first-named author was a Clay Research Fellow. The second-named author’s work was supported by the National Science Foundation during his stay at the Institute for Advanced Study under agreement No. DMS-0635607.[^5]

Kottwitz triples {#s:Kottwitz-triples}
================

The definitions of this section are group-theoretic and do not require any reference to Shimura varieties even though that is where the motivation comes from. Let ${\mathbf{G}}$ be a connected reductive group over ${\mathbb{Q}}$ with $A_{{\mathbf{G}}}$ the maximal split component of its center such that

1.  $({\mathbf{G}}/A_{{\mathbf{G}}})({\mathbb{R}})$ contains a compact maximal torus,

2.  ${\mathbf{G}}^{{\mathrm{der}}}$ is simply connected,

3.  ${\mathbf{G}}_{{\mathbb{Q}}_p}$ is quasisplit.

Condition (1) is indispensable. Both (2) and (3) are not essential, but are assumed to avoid complication.

Let ${\mathbf{h}}:{\mathrm{Res}}_{{\mathbb{C}}/{\mathbb{R}}}{\mathbb{G}}_m {\rightarrow}{\mathbf{G}}_{\mathbb{R}}$ be a group morphism. Taking the basechange to ${\mathbb{C}}$, this gives rise to a morphism ${\mathbb{G}}_m\times {\mathbb{G}}_m{\rightarrow}{\mathbf{G}}_{\mathbb{C}}$, and we denote the first factor by $\mu: {\mathbb{G}}_m{\rightarrow}{\mathbf{G}}_{\mathbb{C}}$. Choosing a maximal torus ${\mathbf{T}}$ of ${\mathbf{G}}$ over ${\mathbb{C}}$, one can replace $\mu$ by a conjugate which factors over ${\mathbf{T}}$; this induces by duality a cocharacter of $\hat{{\mathbf{T}}}$. Restricting this cocharacter to $Z(\hat{{\mathbf{G}}})$ gives an element $\mu_1\in X^\ast(Z(\hat{{\mathbf{G}}}))$ independent of all choices[^6].

The ${\mathbf{G}}({\mathbb{C}})$-conjugacy class $\ol{\mu}$ of $\mu$ has its field of definition $E\subset {\mathbb{C}}$, which is finite over ${\mathbb{Q}}$. We fix a prime ${{\mathfrak p}}$ of $E$ above $p$. Let $f({{\mathfrak p}})$ denote the inertia degree of $E_{{\mathfrak p}}$ over ${\mathbb{Q}}_p$.

Set $L$ to be the fraction field of $W(\ol{{\mathbb{F}}}_p)$. Write $B({\mathbf{G}}_{{\mathbb{Q}}_p})$ for the set of $\sigma$-conjugacy classes in ${\mathbf{G}}(L)$. Let $$\kappa_{{\mathbf{G}},p}:B({\mathbf{G}}_{{\mathbb{Q}}_p}){\rightarrow}X^*(Z(\hat{{\mathbf{G}}})^{\Gamma(p)})$$ denote the Kottwitz map, cf. [@KottwitzStabilization], Section 6. Here $\Gamma(p)$ denotes the absolute Galois group of ${\mathbb{Q}}_p$. Use ${\mathbf{G}}({\mathbb{Q}})_{{\mathrm{ss}}}$ to denote the set of semisimple elements in ${\mathbf{G}}({\mathbb{Q}})$.

Let $j\geq 1$ be an integer, and set $r=j f({{\mathfrak p}})$. A degree $j$ Kottwitz triple $(\gamma_0;\gamma,\delta)$ consists of $\gamma_0\in {\mathbf{G}}({\mathbb{Q}})_{{\mathrm{ss}}}$, $\gamma\in {\mathbf{G}}({\mathbb{A}}^p_f)$ and $\delta\in {\mathbf{G}}({\mathbb{Q}}_{p^{r}})$ such that

-   $\gamma_0$ is elliptic in ${\mathbf{G}}({\mathbb{R}})$,

-   $\gamma_0$ and $\gamma$ are stably conjugate in ${\mathbf{G}}({\mathbb{Q}}_v)$ for all $v\neq p,\infty$,

-   $\gamma_0$ and $N\delta=\delta \delta^{\sigma}\cdots \delta^{\sigma^{r-1}}$ are stably conjugate, i.e. conjugate in ${\mathbf{G}}(\ol{{\mathbb{Q}}}_p)$,

-   $\kappa_{{\mathbf{G}},p}(\delta)=-\mu_1$ in $X^*(Z(\hat{{\mathbf{G}}})^{\Gamma(p)})$.

Two triples $(\gamma_0;\gamma,\delta)$ and $(\gamma'_0;\gamma',\delta')$ are considered equivalent if $\gamma_0\sim_{{\mathrm{st}}} \gamma'_0$, $\delta\sim_{\sigma} \delta'$ and $\gamma_v\sim \gamma'_v$ for all $v\neq p,\infty$. Denote by ${\mathrm{KT}}_j$ (a set of representatives for) equivalence classes of degree $j$ Kottwitz triples.

Let $I_0$ be the centralizer of $\gamma_0$ in ${\mathbf{G}}$. Kottwitz defines an invariant $\beta_v(\gamma_0;\gamma,\delta)\in X^*(Z(\hat{I}_0)^{\Gamma(v)}Z(\hat{{\mathbf{G}}}))$ for each place $v$ of ${\mathbb{Q}}$ in [@KottwitzStabilization], Section 2. Set $\tilde{{{\mathfrak K}}}(I_0/{\mathbb{Q}})=\cap_v Z(\hat{I}_0)^{\Gamma(v)}Z(\hat{{\mathbf{G}}})$. The product $$\beta(\gamma_0;\gamma,\delta)=\prod_v \beta_v(\gamma_0;\gamma,\delta)|_{\tilde{{{\mathfrak K}}}(I_0/{\mathbb{Q}})}
  \in X^*(\tilde{{{\mathfrak K}}}(I_0/{\mathbb{Q}}))$$ is trivial on $Z(\hat{{\mathbf{G}}})$ by construction, hence defines a character $\alpha(\gamma_0;\gamma,\delta)$ of ${{\mathfrak K}}(I_0/{\mathbb{Q}})=(\cap_v Z(\hat{I}_0)^{\Gamma(v)}Z(\hat{{\mathbf{G}}}))/Z(\hat{{\mathbf{G}}})$.

Endoscopic transfer of test functions {#s:transfer}
=====================================

In this section we define the test functions needed to stabilize the formula given in Theorem \[MainTheorem1\] below, following Kottwitz.

First, we recollect some general facts about endoscopy. Let $F$ be a local or global field of characteristic 0. Let ${\mathbf{G}}$ be a connected reductive group over $F$. As in the last section, we assume for convenience that

-   ${\mathbf{G}}^{{\mathrm{der}}}$ is simply connected.

Let $({\mathbf{H}},s,\eta)\in {\mathcal{E}}({\mathbf{G}})$ be an endoscopic triple consisting of a quasi-split connected reductive group ${\mathbf{H}}$ over $F$, an element $s\in Z(\hat{{\mathbf{H}}})$ and an embedding of complex Lie groups $\eta:\hat{{\mathbf{H}}}{\rightarrow}\hat{{\mathbf{G}}}$ satisfying the conditions of [@Kot84a 7.4]. Such a triple is elliptic if $(Z(\hat{{\mathbf{H}}})^{\Gamma})^0\subset Z(\hat{{\mathbf{G}}})$. The notion of isomorphism for endoscopic triples is defined in [@Kot84a §7]. We use the Weil form of the $L$-group, and fix an $L$-morphism ${}^L {\mathbf{H}}{\rightarrow}{}^L {\mathbf{G}}$ extending $\eta$, which exists since ${\mathbf{G}}^{{\mathrm{der}}}$ is simply connected ([@Lan79 Prop 1]). The latter $L$-morphism is also denoted $\eta$ by abuse of notation. Write ${\mathcal{E}}({\mathbf{G}})$ (resp. ${\mathcal{E}}_{{\mathrm{ell}}}({\mathbf{G}})$) for the set of isomorphism classes of endoscopic (resp. elliptic endoscopic) triples for ${\mathbf{G}}$.

Places $v\neq p,\infty$: Untwisted endoscopy {#sub:fund-lemma}
--------------------------------------------

Now assume that $F$ is a local field. Langlands and Shelstad ([@LS87]) define a transfer factor $$\Delta:{\mathbf{H}}(F)_{{\mathrm{ss}},{({\mathbf{G}},{\mathbf{H}})\mbox{-}\mathrm{reg}}}\times {\mathbf{G}}(F)_{{\mathrm{ss}}} {\rightarrow}{\mathbb{C}},$$ which is canonical up to a nonzero constant. Some basic properties are that $\Delta(\gamma_{{\mathbf{H}}},\gamma)$ depends only on the stable conjugacy class of $\gamma_H$ and the ${\mathbf{G}}(F)$-conjugacy class of $\gamma$ and that $\Delta(\gamma_{{\mathbf{H}}},\gamma)=0$ unless $\gamma_{{\mathbf{H}}}$ is $({\mathbf{G}},{\mathbf{H}})$-regular and associated to $\gamma$. The fundamental lemma and the transfer conjecture, which are now theorems due to Ngô, Waldspurger and others (see [@Wal97], [@Ngo10] and references therein), assert

\[t:Fund-Lemma\] For each $f\in C^\infty_c({\mathbf{G}}(F))$, there exists a $f^{{\mathbf{H}}}\in  C^\infty_c({\mathbf{H}}(F))$ such that for every $\gamma_{{\mathbf{H}}}\in {\mathbf{H}}(F)_{{\mathrm{ss}},{({\mathbf{G}},{\mathbf{H}})\mbox{-}\mathrm{reg}}}$, $$SO^{{\mathbf{H}}(F)}_{\gamma_{{\mathbf{H}}}}(f^{{\mathbf{H}}})= \sum_{\gamma\in{\mathbf{G}}(F)_{{\mathrm{ss}}}/\sim }
   \Delta(\gamma_{{\mathbf{H}}},\gamma) e({\mathbf{G}}_\gamma) O^{{\mathbf{G}}(F)}_\gamma(f)$$ where $\gamma$ runs over the set of representatives for all conjugacy classes in ${\mathbf{G}}(F)_{{\mathrm{ss}}}$ and ${\mathbf{G}}_\gamma$ denotes the centralizer of $\gamma$ in ${\mathbf{G}}$. Now assume that ${\mathbf{H}}$, ${\mathbf{G}}$ and $\eta$ are unramified and that $f\in {\mathcal{H}}^{{\mathrm{ur}}}({\mathbf{G}}(F))$. Then $\Delta$ can be normalized such that $f^{{\mathbf{H}}}=\eta^*(f)$ satisfies the above formula, where $\eta^*: {\mathcal{H}}^{{\mathrm{ur}}}({\mathbf{G}}(F)){\rightarrow}{\mathcal{H}}^{{\mathrm{ur}}}({\mathbf{H}}(F))$ is the natural induced morphism of unramified Hecke algebras. In particular, if $f$ is the idempotent associated to a hyperspecial maximal compact subgroup, then one may take $f^{{\mathbf{H}}}$ as the idempotent of a hyperspecial maximal compact subgroup as well.

We will say that $f^{{\mathbf{H}}}$ as above is an ($\eta$-)transfer of $f$.

\[r:LS-normalization\] Our transfer factor follows the convention of [@LS87] and [@KS99], which are opposite to the one of [@KottwitzStabilization]. (See [@KottwitzStabilization p.178] and [@Mor10 p.201].) This introduces the sign change $s\mapsto s^{-1}$ when citing results from the latter.

Place $p$: Twisted endoscopy {#sub:tw-endos-at-p}
----------------------------

Let us recall the setup in which functions $\phi_{\tau,h}$ were defined in [@ScholzeDefSpaces]. In particular, we have a quasisplit reductive group ${\mathbf{G}}$ over ${\mathbb{Q}}_p$ and a conjugacy class $\overline{\mu}$ of cocharacters $\mu: \mathbb{G}_m{\rightarrow}{\mathbf{G}}_{\bar{{\mathbb{Q}}}_p}$ with field of definition $E\subset \bar{{\mathbb{Q}}}_p$.[^7] We get $\mu_1\in X^*(Z(\hat{{\mathbf{G}}}))$. Let $f$ be the inertial degree of the extension $E/{\mathbb{Q}}_p$, and let $r=jf$ for some $j\geq 1$. In [@ScholzeDefSpaces], certain functions $\phi_{\tau,h}\in C_c^\infty({\mathbf{G}}({\mathbb{Q}}_{p^r}))$ are defined, depending on $\tau$ in the Weil group of $E$, acting as the $j$-th power of geometric Frobenius on the residue field, and $h\in C_c^\infty({\mathbf{G}}({\mathbb{Z}}_p))$ for a suitable integral model of ${\mathbf{G}}$. One important property is that

-   $\phi_{\tau,h}(\delta) = 0$ unless $\kappa_{{\mathbf{G}}}(\delta) = - \mu_1$ in $X^\ast(Z(\hat{{\mathbf{G}}})^{\Gamma(p)})$.

Here $\kappa_{{\mathbf{G}}}: B({\mathbf{G}}){\rightarrow}X^*(Z(\hat{{\mathbf{G}}})^{\Gamma(p)})$ is the Kottwitz morphism as above.

We want to define the twisted endoscopic transfers of $\phi_{\tau,h}$. Let $({\mathbf{H}},s,\eta)\in {\mathcal{E}}({\mathbf{G}}_{{\mathbb{Q}}_p})$ be any endoscopic triple. First, we are going to give the construction of the endoscopic transfer $f^{{\mathbf{H}}}_{\tau,h}$ of the function $\phi_{\tau,h}$ when $s\in Z(\hat{{\mathbf{H}}})^{\Gamma(p)}$. It will be explained at the end of this subsection what to do in the general case where $s\in Z(\hat{{\mathbf{H}}})^{\Gamma(p)}Z(\hat{{\mathbf{G}}})$. Let $R_r={\mathrm{Res}}_{{\mathbb{Q}}_{p^r}/{\mathbb{Q}}_p} {\mathbf{G}}_{{\mathbb{Q}}_{p^r}}$, equipped with the obvious automorphism $\theta$ such that $R_r^{\theta}={\mathbf{G}}$. We have an identification $\hat{R}_r=\hat{{\mathbf{G}}}\times \cdots\times \hat{{\mathbf{G}}}$ ($r$ copies) on which any lift of the arithmetic Frobenius $\sigma$ acts by $(g_1,...,g_r)\mapsto (\sigma(g_2),...,\sigma(g_r),\sigma(g_1))$. In particular, there is a natural $L$-morphism $\xi: {}^L {\mathbf{G}}{\rightarrow}{}^L R_r$ sending $g\rtimes w\in {}^L {\mathbf{G}}$ to $(g,\ldots,g)\rtimes w\in {}^L R_r$. Choose elements $t_i\in Z(\hat{{\mathbf{H}}})^{\Gamma(p)}$ for $i=1,...,r$ such that $t_1t_2\cdots t_r=s$ and write $t=(t_1,...,t_r)$. Consider the $L$-morphism $$\label{e:L-morphism-at-p}
    \tilde{\eta}:{}^L {\mathbf{H}}{\rightarrow}{}^L R_r$$ defined by $\tilde{\eta}(h)= \xi(\eta(h))$ for $h\in \hat{{\mathbf{H}}}$ and $\tilde{\eta}(\tilde{\sigma})=t\xi(\eta(\tilde{\sigma}))$ for any lift $\tilde{\sigma}\in {}^L {\mathbf{H}}$ of $\sigma$. Then $({\mathbf{H}},t,\tilde{\eta})$ is a twisted endoscopic group for $(R_r,\theta)$.

Ngô and Waldspurger (see [@Wal08]) showed that the twisted endoscopic transfer exists. The implication in our situation is that there exists a function $f^{{\mathbf{H}}}_{\tau,h}\in C^\infty_c({\mathbf{H}}({\mathbb{Q}}_p))$ such that for all $({\mathbf{G}},{\mathbf{H}})$-regular semisimple $\gamma_{{\mathbf{H}}}\in {\mathbf{H}}({\mathbb{Q}}_p)$, $$\label{e:SO-p0}
SO^{{\mathbf{H}}({\mathbb{Q}}_p)}_{\gamma_{{\mathbf{H}}}}(f^{{\mathbf{H}}}_{\tau,h})= \sum_{\delta\in {\mathbf{G}}({\mathbb{Q}}_{p^r})/\sim_\sigma}
\Delta_p(\gamma_{{\mathbf{H}}},\delta)
  e({\mathbf{G}}_{\delta\sigma}) TO_{\delta\sigma}(\phi_{\tau,h}).$$ where $\Delta_p$ denotes the twisted transfer factor, which is nonzero exactly when the twisted conjugacy class of $\delta$ transfers to the stable conjugacy class of $\gamma_{{\mathbf{H}}}$, and ${\mathbf{G}}_{\delta\sigma}$ is the $\sigma$-centralizer of $\delta$ in ${\mathbf{G}}$.

As in our situation ${\mathbf{G}}$ is quasi-split over ${\mathbb{Q}}_p$, more can be said about the transfer factors. Kottwitz showed ([@Mor10 Appendix]) that if canonical transfer factors ([@Mor10 A.1.5]) are used then $$\label{e:twisted-trans-factor}
  \Delta_p(\gamma_{{\mathbf{H}}},\delta)= \lg \alpha(\gamma_0;\delta),s\rg^{-1}
  \Delta_p(\gamma_{{\mathbf{H}}},\gamma_0),$$ provided that $\gamma_0\in {\mathbf{G}}({\mathbb{Q}}_p)_{{\mathrm{ss}}}$ and $\gamma_{{\mathbf{H}}}$ have matching stable conjugacy classes. Such a $\gamma_0$ exists since ${\mathbf{G}}$ is quasi-split over ${\mathbb{Q}}_p$. Henceforth we will always choose $\Delta_p(\gamma_{{\mathbf{H}}},\delta)$ and $\Delta_p(\gamma_{{\mathbf{H}}},\gamma_0)$ to be canonical transfer factors.

For later use, we recall the definition of $ \alpha(\gamma_0;\delta)$ here, cf. [@KottwitzStabilization p.167]. Let us write $I_0$ for the centralizer of $\gamma_0$ in ${\mathbf{G}}$ over ${\mathbb{Q}}_p$. We have $I_0\subset {\mathbf{H}}$ since $\gamma_0$ is $({\mathbf{G}},{\mathbf{H}})$-regular. Recall that the set of $\sigma$-conjugacy classes in $I_0(L)$ is denoted $B(I_0)$. Using Steinberg’s theorem, choose any $d\in {\mathbf{G}}(L)$ such that $\delta \delta^{\sigma}\cdots \delta^{\sigma^{r-1}}
  = d \gamma_0 d^{-1}$. Then it turns out that $d^{-1}\delta d^{\sigma}$ belongs to $I_0(L)$ and yields a well-defined element of $B(I_0)$. The image of the latter element under the Kottwitz map $\kappa_{I_0}:B(I_0){\rightarrow}X^*(Z(\hat{I_0})^{\Gamma(p)})$ is called $\alpha(\gamma_0;\delta)$.

Putting this together, we get $$\label{e:SO-p}
SO^{{\mathbf{H}}({\mathbb{Q}}_p)}_{\gamma_{{\mathbf{H}}}}(f^{{\mathbf{H}}}_{\tau,h})= \sum_{\delta\in {\mathbf{G}}({\mathbb{Q}}_{p^r})/\sim_\sigma}
 \lg \alpha(\gamma_0;\delta),s\rg^{-1} \Delta_p(\gamma_{{\mathbf{H}}},\gamma_0)
  e({\mathbf{G}}_{\delta\sigma}) TO_{\delta\sigma}(\phi_{\tau,h}).$$

So far we treated the case where $s\in Z(\hat{{\mathbf{H}}})^{\Gamma(p)}$. In general, we may write $s=s_0 z$ for $s_0\in Z(\hat{{\mathbf{H}}})^{\Gamma(p)}$ and $z\in Z(\hat{{\mathbf{G}}})$. At this point, we remark that the twisted orbital integrals $TO_{\delta\sigma}(\phi_{\tau,h})$ vanish unless $\kappa_{{\mathbf{G}}}(\delta) = - \mu_1$ in $X^\ast(Z(\hat{{\mathbf{G}}})^{\Gamma(p)})$. This allows us to define $\beta(\gamma_0;\delta)
  \in X^*(Z(\hat{I_0})^{\Gamma(p)}Z(\hat{{\mathbf{G}}}))$ as the extension of $\alpha(\gamma_0;\delta)$ which is $-\mu_1$ on $Z(\hat{{\mathbf{G}}})$. Then $\lg \beta(\gamma_0;\delta),s\rg^{-1}
  = \mu_1(z)\lg \beta(\gamma_0;\delta),s_0\rg^{-1}$. We define $f^{{\mathbf{H}}}_{\tau,h}$ relative to $({\mathbf{H}},s,\eta)$ as $\mu_1(z)$ times the function $f^{{\mathbf{H}}}_{\tau,h}$ relative to $({\mathbf{H}},s_0,\eta)$ as constructed above, so that still holds if one restricts the sum to $\delta$ satisfying $\kappa_{{\mathbf{G}}}(\delta) = -\mu_1$ and replaces $\alpha(\gamma_0;\delta)$ by $\beta(\gamma_0;\delta)$.

Place $\infty$: Pseudocoefficients {#sub:construction-infty}
----------------------------------

In this subsection, we assume that $F={\mathbb{R}}$. Moreover, we fix an algebraic representation $\xi$ of ${\mathbf{G}}$ over ${\mathbb{C}}$. Assume that $({\mathbf{H}},s,\eta)$ is an elliptic endoscopic triple of ${\mathbf{G}}$. We recall a construction of Kottwitz based on Shelstad’s theory of real endoscopy.

For a discrete series representation $\pi_{\mathbf{H}}$ of ${\mathbf{H}}({\mathbb{R}})$, write $\phi_{\pi_{\mathbf{H}}}$ for its pseudo-coefficient. For any discrete $L$-parameter $\varphi_{\mathbf{H}}:W_{\mathbb{R}}{\rightarrow}{}^L {\mathbf{H}}$, write $\Pi^2(\varphi_{\mathbf{H}})$ for its associated $L$-packet. Set $\phi_{\varphi_{\mathbf{H}}}=|\Pi^2(\varphi_{\mathbf{H}})|^{-1} \sum_{\pi_{{\mathbf{H}}}\in \Pi^2(\varphi_{\mathbf{H}})}
  \phi_{\pi_{\mathbf{H}}}$. Write $\varphi_\xi:W_{\mathbb{R}}{\rightarrow}{}^L {\mathbf{G}}$ for the discrete $L$-parameter such that $\Pi^2(\varphi_\xi)$ consists of discrete series with the same central character and infinitesimal character as $\xi^\vee$. Define $\Phi_{{\mathbf{H}}}(\varphi_\xi)$ to be the set of discrete $\varphi_{\mathbf{H}}$ such that $\eta\varphi_{\mathbf{H}}$ and $\varphi_\xi$ are equivalent. Set $$f^{{\mathbf{H}}}_{\xi}=
  \lg \mu_{\mathbf{h}}, s \rg^{-1} \sum_{\varphi_{\mathbf{H}}\in\Phi_{{\mathbf{H}}}(\varphi_\xi)} (-1)^{q({\mathbf{G}})}\det(\omega_*(\varphi_{{\mathbf{H}}})) \phi_{\varphi_{\mathbf{H}}}$$ where $\det(\omega_*(\varphi_{{\mathbf{H}}}))$ is defined on pp.184-185 and $\lg \mu_{\mathbf{h}},s\rg^{-1}$ is defined on p.185 of [@KottwitzStabilization]. Kottwitz shows that for every $\gamma_{{\mathbf{H}}}\in {\mathbf{H}}({\mathbb{R}})_{{\mathrm{ss}},{({\mathbf{G}},{\mathbf{H}})\mbox{-}\mathrm{reg}}}$, $$\label{e:SO-infty}
  SO^{{\mathbf{H}}({\mathbb{R}})}_{\gamma_{{\mathbf{H}}}}(f^{{\mathbf{H}}}_{\xi})
  = \lg \beta_\infty(\gamma_0), s \rg^{-1}\Delta_\infty(\gamma_{{\mathbf{H}}},\gamma_0)
  e(I) {\operatorname*{tr}}\xi(\gamma_0) {\mathrm{vol}}(A_{{\mathbf{G}}}(\mathbb{R})^\circ{\backslash}I({\mathbb{R}}))^{-1}$$ if $\gamma_{{\mathbf{H}}}$ is elliptic and $SO^{{\mathbf{H}}({\mathbb{R}})}_{\gamma_{{\mathbf{H}}}}(f^{{\mathbf{H}}}_\infty)=0$ otherwise, cf. [@KottwitzStabilization (7.4), page 186]. Here $\Delta_\infty(\gamma_{{\mathbf{H}}},\gamma_0)$ is as on page 184 of [@KottwitzStabilization], and $I$ is the inner form of the centralizer $I_0$ of $\gamma_0$ in ${\mathbf{G}}$ that is anisotropic modulo center. Moreover Proposition 3.3.4 (cf. Remark 6.2.2) of [@Mor10] implies that $$\label{e:SO-infty-vanish}
  SO^{{\mathbf{H}}({\mathbb{R}})}_{\gamma_{{\mathbf{H}}}}(f^{{\mathbf{H}}}_{\xi}) = 0$$ if $\gamma_{{\mathbf{H}}}\in {\mathbf{H}}({\mathbb{R}})_{{\mathrm{ss}}}$ is not $({\mathbf{G}},{\mathbf{H}})$-regular.

Stabilization - proof of Theorem \[MainTheorem2\] {#s:proof-Thm1.2}
=================================================

Let us first briefly recall the main theorem from [@ScholzeDefSpaces].\
Let $B$ be a simple $\mathbb{Q}$-algebra with center $F$ and maximal $\mathbb{Z}_{(p)}$-order $\mathcal{O}_B$ that is stable under a positive involution $\ast$ on $B$. Let $V$ be a finitely generated left $B$-module with a nondegenerate $\ast$-hermitian form $(\, ,\, )$. We assume that there is an $\mathcal{O}_B$-stable selfdual $\mathbb{Z}_{(p)}$-lattice $\Lambda\subset V$, which we fix. Moreover, we let $F_0 = F^{\ast = 1}$, which is a totally real field. We assume that at all places above $p$, the extension $F/F_0$ is unramified and the $F$-algebra $B$ is split.

We let $C=\mathrm{End}_B(V)$, and $\mathcal{O}_C = \mathrm{End}_{\mathcal{O}_B}(\Lambda)$; both carry an involution $\ast$ induced from $(\, ,\, )$. We recall, cf. [@KottwitzPoints], p. 375, that over $\bar{\mathbb{Q}}$, the algebra $C$ together with the involution $\ast$ is of one of the following types:

1.  $M_n\times M_n^{\mathrm{opp}}$ with $(x,y)^\ast = (y,x)$,

2.  $M_{2n}$ with $x^\ast$ being the adjoint of $x$ with respect to a nondegenerate alternating form in $2n$ variables,

3.  $M_{2n}$ with $x^\ast$ being the adjoint of $x$ with respect to a nondegenerate symmetric form in $2n$ variables.

We assume that case $A$ or $C$ occurs. We get the reductive group $\mathbf{G}/\mathbb{Q}$ of $B$-linear similitudes of $V$; in fact, we can extend it to an algebraic group over $\mathbb{Z}_{(p)}$ as the group representing the functor $$\mathbf{G}(R) = \{g\in (\mathcal{O}_C\otimes_{\mathbb{Z}_p} R)^\times \mid gg^\ast\in R^\times\}\ .$$ Finally, we fix a homomorphism $\mathbf{h}_0: \mathbb{C}\rightarrow C\otimes \mathbb{R}$ such that $\mathbf{h}_0(\overline{z})=\mathbf{h}_0(z)^\ast$ for all $z\in \mathbb{C}$, and such that the symmetric real-valued bilinear form $(v,\mathbf{h}_0(i)w)$ on $V\otimes \mathbb{R}$ is positive definite.\
We write $\mathbf{h}$ for the map $\mathbb{S}\rightarrow \mathbf{G}\otimes \mathbb{R}$ from Deligne’s torus $\mathbb{S}$ (i.e., the algebraic torus over $\mathbb{R}$ with $\mathbb{S}(\mathbb{R}) = \mathbb{C}^\times$) that is given on $\mathbb{R}$-valued points by $\mathbf{h}(z) = \mathbf{h}_0(z)$, $z\in\mathbb{C}^\times$. Then one gets a tower $\mathrm{Sh}_K$, $K\subset \mathbf{G}(\mathbb{A}_f)$ running through compact open subgroups of the adelic points of $\mathbf{G}$, of Shimura varieties associated to the pair $(\mathbf{G},\mathbf{h}^{-1})$.

Of course, we get $\mu$ and the reflex field $E$ as before, and $\mathrm{Sh}_K$ has a canonical model defined over $E$. We fix a prime $\mathfrak{p}$ of $E$ above $p$.

Finally, fix an algebraic representation $\xi$ of ${\mathbf{G}}$, defined over a number field $L$, and let $\lambda$ be a place of $L$ lying over the rational prime $\ell\neq p$. This gives $\ell$-adic local systems $\mathcal{F}_{\xi,K}$ on $\mathrm{Sh}_K$ to which the action of the Hecke operators extend. Now we define $$H^\ast_{\xi} = \varinjlim_K H^\ast(\mathrm{Sh}_K\otimes \bar{\mathbb{Q}},\mathcal{F}_{K,\xi})$$ as a virtual representation of ${\mathrm{Gal}}(\bar{\mathbb{Q}}/E)\times {\mathbf{G}}({\mathbb{A}}_f)$.

We make the assumption that the integral models defined in [@ScholzeDefSpaces] are proper; in particular, the Shimura varieties themselves need to be proper, i.e. ${\mathbf{G}}$ needs to be anisotropic modulo center.

We choose Haar measures on various groups exactly as in [@Mor10 §5.1], cf. also [@KottwitzStabilization §3]. We merely remark that adelic groups are given the Tamagawa measure and that the local measures at nonarchimedean places assign rational numbers to open compact subgroups. Moreover, in our situation we have defined a model of our group over $\mathbb{Z}_p$, and require that $\mathbf{G}(\mathbb{Z}_p)$ and $\mathbf{G}(\mathbb{Z}_{p^r})$ get volume $1$.

Now we have the following theorem from [@ScholzeDefSpaces].

\[MainTheorem1\] Let $\tau\in W_{E_{{\mathfrak p}}}$ project to the $j$-th power of geometric Frobenius, for some $j\geq 1$. Let $h\in C_c^\infty({\mathbf{G}}({\mathbb{Z}}_p))$ and $f^p\in C_c^\infty({\mathbf{G}}({\mathbb{A}}_f^p))$. Then $${\operatorname*{tr}}(\tau\times hf^p|H^\ast_\xi) = \sum_{\substack{(\gamma_0;\gamma,\delta)\in {\mathrm{KT}}_j\\ \alpha(\gamma_0;\gamma,\delta) = 1}} c(\gamma_0;\gamma,\delta) O_\gamma(f^p) TO_{\delta\sigma}(\phi_{\tau,h}) {\operatorname*{tr}}\xi(\gamma_0)\ ,$$ where $c(\gamma_0;\gamma,\delta)$ is a volume constant defined as in [@KottwitzStabilization p. 172].

We remark that a priori these expressions are numbers in an algebraic closure of $L_\lambda$; we choose an isomorphism $\bar{L}_\lambda\cong {\mathbb{C}}$ and consider everything as ${\mathbb{C}}$-valued from now on.

Just as (4.2) was obtained from (3.1) in [@KottwitzStabilization], we derive from Theorem \[MainTheorem1\] that $\mathrm{tr}(\tau\times h f^p|H^\ast_\xi) $ is equal to $$\label{e:pre-stab}
\begin{aligned}\tau({\mathbf{G}}) \sum_{\gamma_0}\sum_{\kappa} \sum_{(\gamma,\delta)}
\lg \alpha(\gamma_0;\gamma,\delta),\kappa\rg^{-1} e(&\gamma,\delta) O_\gamma(f^p)TO_{\delta\sigma}(\phi_{\tau,h})\\
&{\operatorname*{tr}}\xi(\gamma_0) {\mathrm{vol}}(A_{{\mathbf{G}}}({\mathbb{R}})^\circ{\backslash}I(\infty)({\mathbb{R}}))^{-1},
\end{aligned}$$ where the inner sum runs over $(\gamma,\delta)$ such that $(\gamma_0;\gamma,\delta)\in {\mathrm{KT}}_j$. Again, $I(\infty)/{\mathbb{R}}$ is the compact modulo center inner form of the centralizer $I_0$ of $\gamma_0$ in ${\mathbf{G}}$. For every $\kappa$ in the sum, fix a lift $\tilde{\kappa}$ of $\kappa$ to $\tilde{{{\mathfrak K}}}(I_0/{\mathbb{Q}})$. Note $\lg \alpha(\gamma_0;\gamma,\delta),\kappa\rg =\lg \beta(\gamma_0;\gamma,\delta),\tilde{\kappa}\rg$.

Lemma 9.7 of [@Kot86] and the global hypothesis for transfer factors ([@LS87 §6.4]) may be summarized as follows.

\[l:transfer-conjugacy\] There exists a canonical map $$\mathcal{T}: \coprod_{({\mathbf{H}},s,\eta)\in {\mathcal{E}}_{{\mathrm{ell}}}({\mathbf{G}})} {\mathbf{H}}({\mathbb{Q}})_{{({\mathbf{G}},{\mathbf{H}})\mbox{-}\mathrm{reg}},{\mathrm{ss}}}/\sim_{{\mathrm{st}}}$$ $$\longrightarrow \{(\gamma_0,\kappa):
  \gamma_0\in {\mathbf{G}}({\mathbb{Q}})_{{\mathrm{ss}}}/\sim_{{\mathrm{st}}},~\kappa\in {{\mathfrak K}}(I_0/{\mathbb{Q}})\} \cup \{ \emptyset\}$$ such that

1.  $({\mathbf{H}},s,\eta,\gamma_{{\mathbf{H}}})\mapsto (\gamma_0,\kappa)$ if $\gamma_0$ and $\gamma_{{\mathbf{H}}}$ have matching stable conjugacy classes, $s$ lands in $\tilde{{{\mathfrak K}}}(I_0/{\mathbb{Q}})\subset Z(\hat{I}_0)$ via $ Z(\hat{I}_{\gamma_{{\mathbf{H}}}})\simeq Z(\hat{I}_0)$ and the image of $s$ maps to $\kappa\in {{\mathfrak K}}(I_0/{\mathbb{Q}})$ via projection.

2.  $({\mathbf{H}},s,\eta,\gamma_{{\mathbf{H}}})\mapsto \emptyset$ if $\gamma_{{\mathbf{H}}}$ does not transfer to ${\mathbf{G}}({\mathbb{Q}})$.

For any $(\gamma_0,\kappa)$, there is a unique elliptic endoscopic triple $({\mathbf{H}},s,\eta)\in {\mathcal{E}}_{{\mathrm{ell}}}({\mathbf{G}})$ containing a preimage of $(\gamma_0,\kappa)$; in that case, we have $$|\mathcal{T}^{-1}(\gamma_0,\kappa)|=|\mathrm{Out}(({\mathbf{H}},s,\eta))|.$$ Moreover, for each $({\mathbf{H}},s,\eta)\in {\mathcal{E}}_{{\mathrm{ell}}}({\mathbf{G}})$, the transfer factors $\Delta_v$ may be normalized globally such that the following holds: for all $ \gamma_0\in {\mathbf{G}}({\mathbb{Q}})_{{\mathrm{ss}}}$ and $\gamma_{{\mathbf{H}}}\in {\mathbf{H}}({\mathbb{Q}})_{{({\mathbf{G}},{\mathbf{H}})\mbox{-}\mathrm{reg}},{\mathrm{ss}}}$, $$\prod_v\Delta_v(\gamma_{{\mathbf{H}}},\gamma_0)=
  \left\{
  \begin{array}{cl}
 1, &
  \mbox{if}~\gamma_{{\mathbf{H}}}\mapsto\gamma_0,
   \\ 0, &
    \mbox{otherwise}\end{array} \right.$$

Thanks to the fundamental lemma (Theorem \[t:Fund-Lemma\]), we can find an $\eta$-transfer $f^{{\mathbf{H}},p}$ of $f^p$ such that for every $\gamma_{{\mathbf{H}}}\in {\mathbf{H}}({\mathbb{A}}^p_f)_{{\mathrm{ss}},{({\mathbf{G}},{\mathbf{H}})\mbox{-}\mathrm{reg}}}$, $$\label{e:SO-outside-p}
SO^{{\mathbf{H}}({\mathbb{A}}^p_f)}_{\gamma_{{\mathbf{H}}}}(f^{{\mathbf{H}},p})= \sum_{\gamma\in {\mathbf{G}}({\mathbb{A}}^p_f)_{{\mathrm{ss}}}/\sim}
  \Delta^p(\gamma_{{\mathbf{H}}},\gamma) e^p(\gamma) O_\gamma(f^p).$$ Kottwitz’s construction of $\beta_v$ at $v\neq p,\infty$ implies that (see the second last equality of [@KottwitzStabilization p.169], keeping Remark \[r:LS-normalization\] in mind) $$\label{e:trans-outside-p}
  \Delta^p(\gamma_{{\mathbf{H}}},\gamma)=
  \Delta^p(\gamma_{{\mathbf{H}}},\gamma_0)\frac{\Delta^p(\gamma_{{\mathbf{H}}},\gamma)}{\Delta^p(\gamma_{{\mathbf{H}}},\gamma_0)}
  = \Delta^p(\gamma_{{\mathbf{H}}},\gamma_0)\lg \beta^p(\gamma_0;\gamma,\delta),s\rg^{-1}.$$ We have defined $f^{{\mathbf{H}}}_{\tau,h}$ and $f^{{\mathbf{H}}}_\xi$ in the last section. Put $f^{{\mathbf{H}}}=f^{{\mathbf{H}},p}f^{{\mathbf{H}}}_{\tau,h}f^{{\mathbf{H}}}_\xi$. Lemma \[l:transfer-conjugacy\], formulas , , , , and imply (cf. argument on [@KottwitzStabilization p.188-189]) that the expression is equal to $$\sum_{({\mathbf{H}},s,\eta)\in {\mathcal{E}}_{{\mathrm{ell}}}({\mathbf{G}})}\tau({\mathbf{G}})|\mathrm{Out}(({\mathbf{H}},s,\eta))|^{-1}
 \sum_{\substack{\gamma_{{\mathbf{H}}}\in{\mathbf{H}}({\mathbb{Q}})_{{\mathrm{ss}}}/\sim_{{\mathrm{st}}}\\
 \mathrm{elliptic~in~}{\mathbf{H}}({\mathbb{R}})}} SO_{\gamma_H}(f^{{\mathbf{H}}})$$ $$=\sum_{({\mathbf{H}},s,\eta)} \iota({\mathbf{G}},{\mathbf{H}})\tau({\mathbf{H}}) \sum_{\substack{\gamma_{{\mathbf{H}}}\in{\mathbf{H}}({\mathbb{Q}})_{{\mathrm{ss}}}/\sim_{{\mathrm{st}}}\\
 \mathrm{elliptic~in~}{\mathbf{H}}({\mathbb{Q}})}} SO_{\gamma_H}(f^{{\mathbf{H}}})
= \sum_{({\mathbf{H}},s,\eta)} \iota({\mathbf{G}},{\mathbf{H}}) ST^{{\mathbf{H}}}_{{\mathrm{ell}}}(f^{{\mathbf{H}}}).$$ Here $\iota({\mathbf{G}},{\mathbf{H}})$ is by definition $\tau({\mathbf{G}})\tau({\mathbf{H}})^{-1}|\mathrm{Out}(({\mathbf{H}},s,\eta))|^{-1}$. The proof of Theorem \[MainTheorem2\] is complete.

\[r:dependence-on-triple\] The stable orbital integrals of the function $f^{{\mathbf{H}}}$ depend only on the isomorphism class of $({\mathbf{H}},s,\eta)$. For instance suppose that $({\mathbf{H}},s,\eta)$ is replaced with an isomorphic triple $({\mathbf{H}},sz,\eta)$ with $z\in Z(\hat{{\mathbf{G}}})$. Then $f^{{\mathbf{H}},p}$ does not change whereas $f^{{\mathbf{H}}}_{\tau,h}$ and $f^{{\mathbf{H}}}_\xi$ are multiplied by $\mu_1(z)$ and $\mu_1^{-1}(z)$, respectively.

Pseudostabilization {#s:pseudostab}
===================

In this section, we employ the easier process of pseudostabilization as in [@KottwitzLambdaAdic] that works for certain compact unitary group Shimura varieties with trivial endoscopy. It has the advantage that one can avoid mention of endoscopy almost completely.[^8]

We recall the setup, cf. [@KottwitzLambdaAdic] and Section 8.1.1.3 in [@Far04]. We start with a CM field $F$ with totally real subfield $F_0$. Let $D/F$ be a central division algebra of dimension $n^2$ with an involution $\ast$ that restricts to complex conjugation on $F$. We want to construct PEL data with $C=D$, compatible with $\ast$. First, we set $B=D^{\mathrm{op}}$, acting on $V=B$ from the left. In order to define the pairing on $V$, we choose some $b\in B^\times$ with $b^\ast = b$ such that the pairing $$(x,y) = \mathrm{tr}_B(xby^\ast)$$ gives a positive pairing on $B\otimes_{\mathbb{Q}}{\mathbb{R}}$; this is possible because the set of all $b\in B^{\ast=1}\otimes \mathbb{R}$ with this property is an open cone in $B^{\ast=1}$ by Lemma 2.8 in [@KottwitzPoints]. We endow $B$ with the involution $x\mapsto x^\sharp = bx^\ast b^{-1}$; the previous remarks show that this is a positive involution, as required. Now take some $\beta\in F$ with $\beta^\sharp = -\beta$, and endow $V$ with the inner product $$\lg x,y\rg = \mathrm{tr}_B(xb^{-1}\beta y^\sharp).$$ One checks that starting with $(B,\sharp)$, this makes $V$ a left $B$-module with a nondegenerate $\sharp$-hermitian form, and $C=\mathrm{End}_B(V)=D$, inducing the involution $\ast$ on $C=D$. Finally, we take some $\ast$-homomorphism ${\mathbf{h}}_0: {\mathbb{C}}{\rightarrow}D\otimes {\mathbb{R}}$ such that $\lg x,{\mathbf{h}}_0(i)y\rg$ is a positive pairing on $V$.

This defines global PEL data. Let $E$ be the associated reflex field, $p$ a prime satisfying our local assumptions; in particular, we have additional integral data at $p$, and the group ${\mathbf{G}}$, defined over ${\mathbb{Q}}$ by $${\mathbf{G}}(R) = \{ x\in D\otimes_{\mathbb{Q}}R\mid xx^\ast\in R^\times\}$$ has a model over $\mathbb{Z}_{(p)}$. Also, let ${{\mathfrak p}}$ be a place of $E$ above $p$, and let $\xi$ be an algebraic representation of ${\mathbf{G}}$ over a number field $L$; let $\lambda$ be a place of $L$ lying above $\ell\neq p$.

\[MainTheorem3\] Let $\tau$, $h$ and $f^p$ as usual. Then $$N {\operatorname*{tr}}(\tau\times hf^p | H^\ast_\xi) = {\operatorname*{tr}}(f_{\tau,h}^{{\mathbf{G}}} f^p | H^\ast_\xi)\ .$$ Here $N=|\Pi^2(\xi)|\cdot |\pi_0(G({\mathbb{R}})/Z(G)({\mathbb{R}}))|$, cf. [@KottwitzLambdaAdic], p. 659, and $f_{\tau,h}^{{\mathbf{G}}}$ is the endoscopic transfer of $\phi_{\tau,h}$ for the trivial endoscopic triple $({\mathbf{H}},s,\eta)=({\mathbf{G}},1,\mathrm{id})$.

This follows from following the arguments in [@KottwitzLambdaAdic]. The crucial point in comparison to the general case is that $\mathfrak{K}(I_0/\mathbb{Q})$ is trivial for all Kottwitz triples $(\gamma_0;\gamma,\delta)$. This makes the sum over $\kappa$ in superfluous, and one can factor everything into stable orbital integrals directly. The outcome is, cf. [@KottwitzLambdaAdic (5.2)], that the left-hand side equals $$N\tau({\mathbf{G}}) \sum_{\gamma_0} SO_{\gamma_0}(f_{\tau,h}^{{\mathbf{G}}} f^p f_\infty)\ ,$$ where $\gamma_0$ runs through stable conjugacy classes in ${\mathbf{G}}({\mathbb{Q}})$. Applying the trace formula (and Lemma 4.1 of [@KottwitzLambdaAdic]), this rewrites as $$N \sum_\pi m(\pi) {\operatorname*{tr}}\pi(f_{\tau,h}^{{\mathbf{G}}} f^p f_\infty)\ .$$ Now one applies Lemma 4.2 of [@KottwitzLambdaAdic] to rewrite this as $$\sum_{\pi_f} {\operatorname*{tr}}\pi_f(f_{\tau,h}^{{\mathbf{G}}} f^p) \sum_{\pi_\infty} m(\pi_f\otimes \pi_\infty) \mathrm{ep}(\pi_\infty\otimes \xi)\ ,$$ with the notation $\mathrm{ep}$ denoting the Euler-Poincaré characteristics of the Lie algebra cohomology as in [@KottwitzLambdaAdic], p. 660. Finally, one uses Matsushima’s formula, cf. [@KottwitzLambdaAdic], p. 655, to rewrite this as $${\operatorname*{tr}}(f_{\tau,h}^{{\mathbf{G}}} f^p | H^\ast_\xi)\ ,$$ as desired.

In general one would expect that the following statement is true at places $p$, such that all places of $F_0$ above $p$ are split in $F$: If $\pi_f$, $\pi_f^\prime$ are two irreducible admissible representations of ${\mathbf{G}}({\mathbb{A}}_f)$ such that the $\pi_f$-isotypic and $\pi^\prime_f$-isotypic components of $H^\ast_\xi$ are nonzero and the representations are isomorphic away from $p$, i.e. $\pi_f^p\cong \pi_f^{\prime p}$, then also $\pi_p\cong \pi_p^\prime$.

Under some extra conditions, this can deduced from results of Harris and Labesse, [@HarrisLabesse], which show the existence of a stable base change lift of automorphic representations $\pi$ of ${\mathbf{G}}$ to automorphic representations of ${\mathrm{GL}}_n$ over $F$, cf. [@Far04], Section A.3.

In particular, assume that $F$ is the composite of $F_0$ and an imaginary quadratic field ${\mathcal{K}}$. Note that if $q$ is a rational prime that splits in ${\mathcal{K}}$ as $w_0w_0^c$, there is a decomposition $${\mathbf{G}}({\mathbb{Q}}_p) = \prod_{v|w_0} {\mathrm{GL}}_n(F_v)\times {\mathbb{Q}}_p^\times\ ,$$ which induces a decomposition $$\pi_q = \bigotimes_{v|w_0} \pi_v \otimes \chi_{w_0}$$ for every irreducible admissible representation $\pi_q$ of ${\mathbf{G}}({\mathbb{Q}}_p)$.

\[t:cond-bc\] Assume that $F=F_0 {\mathcal{K}}$ is the composite of the totally real field $F_0$ and an imaginary quadratic field ${\mathcal{K}}$ in which $p$ splits. Assume that the division algebra $D$ is split at all places of $F_0$ which do not split in $F$, and at all nonarchimedean places either split or a division algebra. Let $\pi_f$ be an irreducible admissible representation of ${\mathbf{G}}({\mathbb{A}}_f)$ that occurs in $H^\ast_\xi$, and such that there is some rational prime $q=w_0w_0^c$ split in ${\mathcal{K}}$ such that in the decomposition $$\pi_q = \bigotimes_{v|w_0} \pi_v \otimes \chi_{w_0}\ ,$$ one component $\pi_v$ is supercuspidal.

Then there exists a cuspidal automorphic representation $\Pi$ of ${\mathrm{GL}}_n({\mathbb{A}}_F)$ and a Hecke character $\chi$ of ${\mathbb{A}}_{{\mathcal{K}}}^\times$ such that $\Pi_\infty$ is regular algebraic, $\Pi^\vee\cong \Pi\circ c$, where $c:F{\rightarrow}F$ is complex conjugation, and for all places $p=u_0u_0^c$ split in ${\mathcal{K}}$, the decomposition of $\pi_p$ from above is given by $$\pi_p = \bigotimes_{v|u_0} \Pi_v\otimes \chi_{u_0}\ .$$

A similar description holds true at unramified inert places.

This follows from Theorem A.3.1 in [@Far04].

\[cor:RigidAtp\] In the situation of the theorem, let $p\neq q$ be split in ${\mathcal{K}}$ and let $\pi_f^\prime$ be a second irreducible admissible representation of ${\mathbf{G}}({\mathbb{A}}_f)$ which occurs in $H^\ast_\xi$ and for which $\pi_f^{\prime p}\cong \pi_f^p$. Then $\pi_p\cong \pi_p^\prime$.

Use strong multiplicity $1$ for ${\mathrm{GL}}_n$ and the quadratic base change for ${\mathbf{G}}$ in the nonendoscopic case. cf. Corollary VI.2.3 of [@HT01].

Moreover, the results of Harris-Taylor, [@HarrisTaylor Theorem C], prove the existence of $\ell$-adic Galois representations associated to $\Pi$ that satisfy a local-global compatibility at all finite places not dividing $\ell$. We remark that for our purposes, the slightly weaker statement proven in [@ScholzeLLC] would suffice.

\[cor:ExGalRepr\] In the situation of the theorem, there is an $\ell$-adic Galois representation $$R_\ell(\Pi): {\mathrm{Gal}}(\bar{F}/F){\rightarrow}{\mathrm{GL}}_n(\bar{{\mathbb{Q}}}_\ell)$$ such that for all primes $v$ of $F$ not dividing $\ell$, the restriction $R_\ell(\Pi)|_{W_{F_v}}$ is given by $\sigma_\ell(\Pi_v^\vee)\otimes |\cdot|^{(1-n)/2}$, where $\sigma_\ell$ denotes the local Langlands correspondence for ${\mathrm{GL}}_n(F_v)$.$\hfill \Box$

The stable Bernstein center {#s:stBernstein}
===========================

The most convenient way to state our conjecture is to use the conjectural theory of the stable Bernstein center, cf. [@Vog93]. The importance of the stable Bernstein center in relation to test functions appearing in generalizations of the Langlands-Kottwitz method has also been emphasized recently by Haines.

Let us recall the main definitions. Let $G$ be a connected reductive group over a $p$-adic field $F$. In our convention varieties are not required to be of finite type or connected.

([@Ber84]) A supercuspidal pair for $G$ is a pair $(M,\sigma)$, where $M\subset G$ is a Levi subgroup of $G$, and $\sigma$ is a supercuspidal representation of $M(F)$. An irreducible smooth representation $\pi$ of $G(F)$ is said to have supercuspidal support $(M,\sigma)$, if it appears as a subquotient of the normalized parabolic induction of $\sigma$ to $G(F)$; for any $\pi$, there is a unique such $(M,\sigma)$ up to conjugation by $G(F)$.

The variety $\Omega(G)$ of all supercuspidal pairs $(M,\sigma)$ up to conjugation by $G(F)$ has a natural structure as the $\mathbb{C}$-valued points of an infinite disjoint union of algebraic varieties over $\mathbb{C}$, which are quotients of tori by finite group actions. Let $\mathcal{Z}(G)$ be the ring of regular functions on $\Omega(G)$, the Bernstein center of $G$. Then there is a natural $\mathcal{Z}(G)$-algebra structure on $C_c^\infty(G(F))$, given by a convolution map $$\mathcal{Z}(G)\times C_c^\infty(G(F))\rightarrow C_c^\infty(G(F))\ :\ (z,f)\mapsto z\ast f\ ,$$ such that for all $f\in C_c^\infty(G(F))$, all $z\in \mathcal{Z}(G)$ and any irreducible $\pi$ with supercuspidal support $(M,\sigma)$, we have $${\operatorname*{tr}}(z\ast f|\pi) = z(M,\sigma) {\operatorname*{tr}}(f|\pi)\ .$$

A semisimple $L$-parameter[^9] for $G$ is a homomorphism $\lambda: W_F{\rightarrow}{}^L G$ from the Weil group $W_F$ of $F$ into the $L$-group of $G$ that commutes with the projection maps to the Galois group of $F$, and such that $\lambda(W_F)$ consists of semisimple elements.

The variety $\Omega^{{\mathrm{st}}}(G)$ of all semisimple $L$-parameters for $G$ up to $\hat{G}$-conjugation has a natural structure as an infinite disjoint union of algebraic varieties over $\mathbb{C}$, which are quotients of tori by finite group actions. Let $\mathcal{Z}^{\mathrm{st}}(G)$ be the ring of regular functions on $\Omega^{\mathrm{st}}(G)$, the stable Bernstein center of $G$.

Now assume for motivation that the local Langlands conjecture is known. In that case, any irreducible $\pi$ has an associated $L$-parameter $\varphi_\pi: W_F\times {\mathrm{SL}}_2({\mathbb{C}}){\rightarrow}{}^L G$, and the restriction $\varphi_\pi|_{W_F}$ defines a semisimple $L$-parameter $\lambda_\pi$. Here, we embed $W_F$ into $W_F\times {\mathrm{SL}}_2({\mathbb{C}})$ by using the identity map on the first factor, and the map $$w\mapsto \left(\begin{array}{cc}|w|_F^{1/2} & 0 \\ 0 & |w|_F^{-1/2}\end{array}\right)$$ from $W_F$ to ${\mathrm{SL}}_2({\mathbb{C}})$, using the norm character $|\cdot|_F:W_F{\rightarrow}{\mathbb{R}}^\times_{>0}$. Conjecturally, cf. Conjecture 7.18 in [@Vog93], this induces a finite map of algebraic varieties $$\Omega(G){\rightarrow}\Omega^{\mathrm{st}}(G)\ :\ (M,\sigma)\mapsto \lambda(M,\sigma)$$ such that whenever $\pi$ has supercuspidal support $(M,\sigma)$, then $\lambda_\pi = \lambda(M,\sigma)$.

We will use the following form of the local Langlands conjecture. cf. Remark \[r:Kazhdan\] below.

\[conj:st-Bernstein\] There is a natural finite map of algebraic varieties $$\Omega(G){\rightarrow}\Omega^{\mathrm{st}}(G)\ .$$ The induced map $\mathcal{Z}^{\mathrm{st}}(G){\rightarrow}\mathcal{Z}(G)$ has the following property: If $f\in C_c^\infty(G(F))$ has vanishing stable orbital integrals then for any $z^{\mathrm{st}}\in \mathcal{Z}^{\mathrm{st}}(G)$ with image $z\in \mathcal{Z}(G)$, the convolution $z\ast f\in C_c^\infty(G(F))$ has vanishing stable orbital integrals.

The conjecture is true for (products of Weil restrictions of) ${\mathrm{GL}}_n$, by [@HT01], [@Hen00]. In the case of $GL_n$ one of us essentially constructed the map $\mathcal{Z}^{\mathrm{st}}(G){\rightarrow}\mathcal{Z}(G)$ directly from Lubin-Tate towers in [@ScholzeGLn].

Moreover, let us recall some statements from [@Vog93] about stable characters. Here we only explain the case where $G$ is quasisplit and refer the reader to [@Vog93] or [@Art06] for general $G$. The easiest case is the case of tempered $L$-parameters; so let $$\varphi: W_F\times {\mathrm{SL}}_2({\mathbb{C}}){\rightarrow}{}^L G$$ be a tempered $L$-parameter. Let $S_\varphi$ be the group of $g\in \hat{G}$ centralizing the image of $\varphi$ up to a 1-coboundary of $W_F$ valued in $Z(\hat{G})$. Define ${{\mathfrak S}}_{\varphi}=\pi_0(S_{\varphi}/Z(\hat{G}))$. It is expected that there exists a bijection $\pi\mapsto r_\pi$ from the $L$-packet $\Pi(\varphi)$ to the set of irreducible finite dimensional representations of ${{\mathfrak S}}_{\varphi}$. Moreover, one expects that the distribution $$S\Theta_{\varphi}=\sum_{\pi\in \Pi(\varphi)} \dim r_\pi {\operatorname*{tr}}\pi$$ is stable. The bijection $\pi\mapsto r_\pi$ is supposed to be canonical up to twist by a character, so that the stable character is independent of all choices.

In particular, in this case, a suitable linear combination of the characters of the representations in the $L$-packet induces a stable character. In general, this will not be the case, and one has to include some representations from other $L$-packets, as in the example of $A$-packets. However, all representations appearing will have the same [*semisimple*]{} $L$-parameter. Indeed, Vogan conjectures that there are many stable characters of the form $$\label{e:gen-st-char}
  S\Theta = \sum_{\pi} a(\pi) {\operatorname*{tr}}\pi\ ,$$ where $a(\pi)$ is nonzero for only finitely many $\pi$, and for all such $\pi$, the semisimple $L$-parameter $\lambda=\lambda_\pi$ is the same. Let $z^{\mathrm{st}}\in \mathcal{Z}^{\mathrm{st}}(G)$, with associated $z\in \mathcal{Z}(G)$. Then for all $f\in C_c^\infty(G(F))$, we have $$\label{e:factor-st-Bernstein}
  S\Theta(z\ast f) = z^{\mathrm{st}}(\lambda) S\Theta(f)\ .$$ Indeed, this is an immediate consequence of Conjecture \[conj:st-Bernstein\] and the formula for the action of the Bernstein center on the Hecke algebra.

\[r:Kazhdan\] The work of Kazhdan and Varshavsky [@KV06] suggests a harmonic analytic definition of the stable Bernstein center without reference to semisimple $L$-parameters.[^10] Recall that ${\mathcal{Z}}(G)$ can be viewed as the algebra of $G(F)$-invariant distributions $\alpha$ on $G(F)$ which preserve $C^\infty_c(G(F))$ under the convolution $*$. Define ${\mathcal{Y}}^{{\mathrm{st}}}(G)$ to be the subspace of ${\mathcal{Z}}(G)$ consisting of $\delta$ such that $\delta* f$ has vanishing stable orbital integrals for every $f\in C^\infty_c(G(F))$ whose stable orbital integrals vanish. It is clear that ${\mathcal{Y}}^{{\mathrm{st}}}(G)$ is a subalgebra of ${\mathcal{Z}}(G)$. In this optic Conjecture \[conj:st-Bernstein\] would hold true if the following are verified: ${\mathcal{Z}}(G)$ is a finitely generated ${\mathcal{Y}}^{{\mathrm{st}}}(G)$-module and there is a natural surjection ${\mathcal{Z}}^{{\mathrm{st}}}(G){\rightarrow}{\mathcal{Y}}^{\mathrm{st}}(G)$, which should be induced by an infinitesimal version of the local Langlands correspondence. If $G$ is quasisplit, then the map ${\mathcal{Z}}^{\mathrm{st}}(G){\rightarrow}{\mathcal{Y}}^{\mathrm{st}}(G)$ should be an isomorphism. This anticipated isomorphism justifies our terminology for ${\mathcal{Z}}^{{\mathrm{st}}}(G)$.

Character identities satisfied by $f^{{\mathbf{H}}}_{\tau,h}$: Conjectures {#s:char-id}
==========================================================================

The contents of this section are purely local in nature, and we go back to the local setting of [@ScholzeDefSpaces] and Subsection \[sub:tw-endos-at-p\]. Let $({\mathbf{H}},s,\eta)$ be an endoscopic triple for ${\mathbf{G}}$.

We will state two version of our conjecture. One relies on the local Langlands correspondence for ${\mathbf{H}}$, at least for tempered $L$-parameters. The other relies on Conjecture \[conj:st-Bernstein\] about the stable Bernstein center, and is stronger.

Recall that we have a conjugacy class $\ol{\mu}$ of cocharacters $\mu:{\mathbb{G}}_m{\rightarrow}{\mathbf{G}}_{\ol{{\mathbb{Q}}}_p}$ as defined in Subsection \[sub:tw-endos-at-p\]. Fix a maximal torus ${\mathbf{T}}$ of ${\mathbf{G}}$ over $\ol{{\mathbb{Q}}}_p$ with a set of positive roots. After conjugation we may assume that $\mu$ factors through ${\mathbf{T}}$ and is a dominant coweight. Write $\rho$ for the half sum of all positive roots. Up to isomorphism there exists a unique complex representation $r_{-\mu}$ of ${}^L {\mathbf{G}}$ characterized by [@Kot84b Lem 2.1.2]. In particular, $r_{-\mu}|_{\hat{{\mathbf{G}}}}$ is irreducible, with highest weight given by (the dominant representative of) $-\mu$. Let $\mathrm{Frob}$ denote a geometric Frobenius element in $W_E$.

\[c:char-id\] Let $\tau\in \mathrm{Frob}^j I_{E}$ for $j\ge 1$ and $h\in C^\infty_c({\mathbf{G}}({\mathbb{Z}}_p))$. Denote by $h^{{\mathbf{H}}}$ an $\eta$-transfer of $h$ from ${\mathbf{G}}$ to ${\mathbf{H}}$. For every tempered $L$-parameter $\varphi_{{\mathbf{H}}}$ of ${\mathbf{H}}$, with associated semisimple $L$-parameter $\lambda_{{\mathbf{H}}} = \varphi_{{\mathbf{H}}}|_{W_{{\mathbb{Q}}_p}}$, we have $$\label{e:char-id-for-f-tau-h}
    S\Theta_{\varphi_{{\mathbf{H}}}}(f^{{\mathbf{H}}}_{\tau,h})=
  {\operatorname*{tr}}(s^{-1}\tau|(r_{-\mu}\circ \eta\lambda_{{\mathbf{H}}}|_{W_E})|\cdot |_E^{-\lg \rho,\mu\rg}) S\Theta_{\varphi_{{\mathbf{H}}}}(h^{{\mathbf{H}}}).$$

Here is a simple consistency check. Let $z\in Z(\hat{{\mathbf{G}}})$. Suppose that $({\mathbf{H}},s,\eta)$ is replaced with $({\mathbf{H}},sz,\eta)$ and that $f^{{\mathbf{H}}}_{\tau,h}$ is constructed from the latter. Then both sides of are multiplied by $\mu_1(z)$ (cf. Remark \[r:dependence-on-triple\]).

It is expected that stable tempered characters are dense in the space of stable distributions, cf. [@Sha90], Conjecture 9.2. Namely for any stable distribution $\mathcal{D}$ on ${\mathbf{H}}({\mathbb{Q}}_p)$, the value of $\mathcal{D}(f^{{\mathbf{H}}}_{\tau,h})$ should be determined by for tempered $\varphi_{{\mathbf{H}}}$. In particular, there should be an analogue of for nontempered $\varphi_{{\mathbf{H}}}$. We feel that the best way to formulate this conjecture is to use the stable Bernstein center.

Let $z_\tau^{{\mathbf{H}},{\mathrm{st}}}\in \mathcal{Z}^{\mathrm{st}}({\mathbf{H}})$ be the function in the stable Bernstein center of ${\mathbf{H}}$ that takes each semisimple $L$-parameter $\lambda: W_{{\mathbb{Q}}_p}{\rightarrow}{}^L {\mathbf{H}}$ to $${\operatorname*{tr}}(s^{-1}\tau|(r_{-\mu}\circ \eta\lambda|_{W_E})|\cdot |_E^{-\lg \rho,\mu\rg})\ .$$ General requirements on the local Langlands correspondence ensure that this is a regular function on $\Omega^{\mathrm{st}}({\mathbf{H}})$. Let $z_\tau^{\mathbf{H}}\in \mathcal{Z}({\mathbf{H}})$ be its image.

\[c:char-id-st-Bernstein\] Let $\tau$ and $h$ be as above. Then for any $\eta$-endoscopic transfer $h^{{\mathbf{H}}}$ of $h$, the function $z_\tau^{\mathbf{H}}\ast h^{{\mathbf{H}}}$ is a twisted endoscopic $\tilde{\eta}$-transfer of $\phi_{\tau,h}$.

This conjecture says that the twisted endoscopic transfers of $\phi_{\tau,h}$ factor as a product of two factors, one depending only on $\tau$, the other depending only on $h$. This property by itself would be of great interest.

As a consequence of this conjecture, assume that $S\Theta$ is a stable distribution as in . Let $f_{\tau,h}^{\mathbf{H}}$ denote any transfer of $\phi_{\tau,h}$. Then $$\label{e:gen-char-id-for-f-tau-h}
  S\Theta(f_{\tau,h}^{\mathbf{H}}) =  {\operatorname*{tr}}(s^{-1}\tau|(r_{-\mu}\circ \eta\lambda|_{W_E})|\cdot |_E^{-\lg \rho,\mu\rg}) S\Theta(h^{{\mathbf{H}}})\ .$$ This generalizes , and should apply in particular to the stable characters associated to $A$-packets.

If ${\mathbf{G}}({\mathbb{Q}}_p)$ is a product of general linear groups over finite extensions of ${\mathbb{Q}}_p$, as happens in all cases of EL or quasi-EL type (cf. Remark \[r:quasi-EL\] below), then ${\mathbf{H}}({\mathbb{Q}}_p)$ is of the same type, and the relevant local Langlands conjecture is known by [@HT01] and [@Hen00]. In this case the statements of Conjecture \[c:char-id\] and Conjecture \[c:char-id-st-Bernstein\] do not rely on any unverified conjecture and simplify as stability issues do not arise. It is an easy exercise to verify that the two conjectures are equivalent. The conjecture was shown to be true by one of us, [@ScholzeGLn], in the Lubin-Tate case. In §\[s:prove-conj\] we will settle Conjecture \[c:char-id\] in all EL cases.

A version of this conjecture also makes sense in the unramified case without any assumption thanks to the unramified Langlands correspondence. Hence assume that we are in the case of unramified EL or PEL data. Given our assumptions, this amounts to the only additional requirement that $F$ is unramified. In particular, ${\mathbf{G}}$ is unramified over ${\mathbb{Q}}_p$. Suppose moreover that ${\mathbf{H}}$, $\eta:{}^L {\mathbf{H}}{\rightarrow}{}^L {\mathbf{G}}$, and $h$ are unramified; in particular (up to scalar) $h={{\mathbf{1}}}_{{\mathbf{G}}({\mathbb{Z}}_p)}$. If $\varphi_{{\mathbf{H}}}$ is unramified, then we write $\pi_{\varphi_{{\mathbf{H}}}}$ for the unramified representation corresponding to $\varphi_{{\mathbf{H}}}$. We define a character $S\Theta_{\varphi_{{\mathbf{H}}}}$ on ${\mathcal{H}}^{{\mathrm{ur}}}({\mathbf{H}}({\mathbb{Q}}_p))$, by setting $S\Theta_{\varphi_{{\mathbf{H}}}}$ equal to ${\operatorname*{tr}}\pi_{\varphi_{{\mathbf{H}}}}$ if $\varphi_{{\mathbf{H}}}$ is unramified and $0$ otherwise.

\[l:conj-unramified\] Assume that $F$ is unramified, and that $p\neq 2$ in the PEL case. One can choose $f_{\tau,h}^{\mathbf{H}},h^{{\mathbf{H}}}\in {\mathcal{H}}^{{\mathrm{ur}}}({\mathbf{H}}({\mathbb{Q}}_p))$, and for all $L$-parameters $\varphi_{{\mathbf{H}}}$ with semisimple $L$-parameter $\lambda_{{\mathbf{H}}}$, we have $$\label{e:unr-case}
 S\Theta_{\varphi_{{\mathbf{H}}}}(f_{\tau,h}^{{\mathbf{H}}}) =  {\operatorname*{tr}}(s^{-1}\tau|(r_{-\mu}\circ \eta\lambda_{{\mathbf{H}}}|_{W_E})|\cdot |_E^{-\lg \rho,\mu\rg}) S\Theta_{\varphi_{{\mathbf{H}}}}(h^{{\mathbf{H}}})\ .$$

The lemma shows that naturally extends the identity in the unramified case treated in [@KottwitzStabilization].

From Proposition 4.7 of [@ScholzeDefSpaces], we know that $\phi_{\tau,h}$ has the same twisted orbital integrals as Kottwitz’s $\phi_r$ on [@KottwitzStabilization p.173] when $h={{\mathbf{1}}}_{{\mathbf{G}}({\mathbb{Z}}_p)}$. We may thus work with $\phi_r$ instead. We note that $\phi_r$ lies in the unramified Hecke algebra ${\mathcal{H}}^{{\mathrm{ur}}}({\mathbf{G}}({\mathbb{Q}}_{p^r}))$.

The $L$-morphism gives rise to the transfer $\tilde{\eta}^*:{\mathcal{H}}^{{\mathrm{ur}}}({\mathbf{G}}({\mathbb{Q}}_{p^r})){\rightarrow}{\mathcal{H}}^{{\mathrm{ur}}}({\mathbf{H}}({\mathbb{Q}}_p))$ such that $\phi\mapsto \tilde{\eta}^*(\phi)$ is an $\tilde{\eta}$-transfer with respect to the canonical transfer factor of §\[sub:tw-endos-at-p\] (cf. [@Mor10 A.1.5]).

In particular, we can choose $f_{\tau,h}^{{\mathbf{H}}},h^{{\mathbf{H}}}\in {\mathcal{H}}^{{\mathrm{ur}}}({\mathbf{H}}({\mathbb{Q}}_p))$, as desired. Moreover, both sides of vanish unless $\varphi_{{\mathbf{H}}}$ is unramified.

Now assume that $\varphi_{{\mathbf{H}}}$ is unramified. Then the argument for (9.7) of [@KottwitzStabilization], which is based on the Satake transform (thus unconditional), shows that $$S\Theta_{\varphi_{{\mathbf{H}}}}(f^{{\mathbf{H}}}_{\tau,h})=
  p^{r\lg \rho,\mu\rg} {\operatorname*{tr}}(s^{-1}\tau|(r_{-\mu}\circ \eta\lambda_{{\mathbf{H}}}|_{W_E})),$$ which is equivalent to . Note that $\Delta_p(\psi_{{\mathbf{H}}},\pi_{\eta\varphi_{{\mathbf{H}}}})=1$ in (9.7) of [@KottwitzStabilization] since the above transfer factor is compatible with the algebra map of unramified Hecke algebras.

As the final topic of this section, and as further supporting evidence for the conjecture, we verify that it leads to the expected description of the cohomology. We switch back to global notation and assume that ${\mathbf{G}}$ is anisotropic over ${\mathbb{Q}}$ modulo center so that our Shimura varieties are compact.[^11]

The following are accepted on faith:

1.  the $A$-packet classification for discrete automorphic representations of ${\mathbf{G}}$ and its elliptic endoscopic groups over ${\mathbb{Q}}$, encompassing the multiplicity formula [@KottwitzStabilization (8.2)] and a product formula for spectral transfer factors [@KottwitzStabilization (9.6)],[^12]

2.  $ST^{{\mathbf{H}}}_{{\mathrm{ell}}}(f^{{\mathbf{H}}})=ST^{{\mathbf{H}}}_{{\mathrm{disc}}}(f^{{\mathbf{H}}})$ for all $({\mathbf{H}},s,\eta)\in {\mathcal{E}}_{{\mathrm{ell}}}({\mathbf{G}})$. (cf. [@KottwitzStabilization (10.1)])

Our argument copies the one in [@KottwitzStabilization §9-10] with changes occurring only at $p$. Therefore we will only indicate the changes without repeating the details. All references are made to Kottwitz’ article.

-   Use $f^{{\mathbf{H}},p}$, $f^{{\mathbf{H}}}_{\tau,h}$ and $f^{{\mathbf{H}}}_\xi$ in place of $h^p$, $h_p$ and $h_\infty$.

-   Drop the assumption that $\psi_p$ is unramified. Now (9.3) is equal to (9.7) if the latter is replaced by $$\sum_{\pi_p\in \Pi(\eta\psi_{{\mathbf{H}},p})} \Delta_p(\psi_{{\mathbf{H}}},\pi_p)
      {\operatorname*{tr}}(s^{-1}\tau|(r_{-\mu}\circ \eta\varphi_{{\mathbf{H}}}|_{W_{E_{{{\mathfrak p}}}}})|\cdot|_{{{\mathfrak p}}}^{-\dim {\mathrm{Sh}}/2}) {\operatorname*{tr}}\pi_p(h).$$ This key equality is justified by Conjecture \[c:char-id\], or more precisely its version for $A$-parameters.

-   On page 198, drop conditions (a) and (c).

-   (9.9) is valid if ${\operatorname*{tr}}\pi_f(f)$ is changed to ${\operatorname*{tr}}\pi_f^p(f^p)$ and the line below reads $$A(x,\pi_p)=(-1)^{q({\mathbf{G}})} {\operatorname*{tr}}(s^{-1}\tau|(r_{-\mu}\circ \varphi_{\pi_p}|_{W_{E_{{{\mathfrak p}}}}})|\cdot|_{{{\mathfrak p}}}^{-\dim {\mathrm{Sh}}/2})
      {\operatorname*{tr}}\pi_p(h).$$

-   (10.4) holds if ${\operatorname*{tr}}\pi_f(f)$ is replaced with ${\operatorname*{tr}}\pi_f^p(f^p)$ and we set in the line below $$A(\pi_p,\nu)=(-1)^{q({\mathbf{G}})} \nu(s_\psi){\operatorname*{tr}}(\tau|V_\nu|\cdot|_{{{\mathfrak p}}}^{-\dim {\mathrm{Sh}}/2})
       {\operatorname*{tr}}\pi_p(h).$$

-   From (10.4) we obtain (cf. (10.5)) that ${\operatorname*{tr}}(\tau\times hf^p|H^*_\xi)$ equals $$\sum_{[\psi]}\sum_{\pi_f} {\operatorname*{tr}}\pi_f(hf^p)\sum_{\nu}
      (-1)^{q({\mathbf{G}})} m(\pi_f,\nu)  \nu(s_\psi) {\operatorname*{tr}}(\tau|V(\psi,\nu)).$$

-   The above equality establishes that $$H^*_\xi=\sum_{[\psi]}\sum_{\pi_f} \sum_{\nu}
     (-1)^{q({\mathbf{G}})} m(\pi_f,\nu) \nu(s_\psi) (\pi_f\otimes V(\psi_p,\nu)).$$ as virtual ${\mathbf{G}}({\mathbb{A}}^p_f)\times {\mathbf{G}}({\mathbb{Z}}_p)\times W_{E_{{{\mathfrak p}}}}$-representations, as desired.

Of course, one would expect that this identity stays true as ${\mathbf{G}}({\mathbb{A}}_f)\times W_{E_{{\mathfrak p}}}$-representations. If ${\mathbf{G}}_{{\mathbb{Q}}_p}$ is a product of Weil restrictions of general linear groups, then $\pi_p$ should be determined by $\pi_f^p$, which easily implies that this identity extends to ${\mathbf{G}}({\mathbb{A}}_f)\times W_{E_{{\mathfrak p}}}$. In the general case, the first obstruction is that if $\pi_f$ and $\pi_f^\prime$ are two representations appearing in $H^\ast_\xi$ such that $\pi_f^p\cong \pi_f^{\prime p}$, then it is not clear that $\pi_p$ and $\pi_p^\prime$ belong to the same $A$-packet. Ignoring this obstacle, the question of whether one can isolate representations within a local $A$-packet by Hecke operators in ${\mathbf{G}}({\mathbb{Z}}_p)$ appears:

Let $G$ be a connected reductive group over a $p$-adic field $F$, and let $K\subset G(F)$ be a special maximal compact subgroup. Let $\psi$ be an $A$-parameter for $G$, with associated $A$-packet $\Pi(\psi)=\{\pi_1,\ldots,\pi_k\}$. Are $\pi_1|_K,\ldots,\pi_k|_K$ linearly independent in the Grothendieck group of admissible representations of $K$?

Character identities satisfied by $f^{{\mathbf{H}}}_{\tau,h}$: Proofs {#s:prove-conj}
=====================================================================

Let us keep the local notation of the last section (except that global notation will appear in the proof of Theorem \[t:conj-GLn\]). Recall that the local Langlands correspondence for (a product of) general linear groups over a $p$-adic field is known thanks to Harris-Taylor and Henniart ([@HT01], [@Hen00]). In what follows $\varphi_{\pi}$ denotes the $L$-parameter attached to an irreducible representation $\pi$ on such a group.

\[t:conj-GLn\] Conjecture \[c:char-id\] is true in all EL and quasi-EL cases for the trivial endoscopic triple $({\mathbf{H}},s,\eta)=({\mathbf{G}},1,\mathrm{id})$. In fact, for every irreducible representation $\pi$ of ${\mathbf{G}}({\mathbb{Q}}_p)$ with semisimple $L$-parameter $\lambda_\pi$, $$\label{e:conj-GLn} {\operatorname*{tr}}(f^{{\mathbf{G}}}_{\tau,h}|\pi)= {\operatorname*{tr}}(\tau|(r_{-\mu}\circ \lambda_{\pi}|_{W_E})
|\cdot |_E^{-\lg \rho,\mu\rg}) {\operatorname*{tr}}(h|\pi).$$

\[r:quasi-EL\] We recall that in [@ScholzeDefSpaces], quasi-EL data were defined as those PEL data where the field $F$ decomposes as $F_0\times F_0$ with the involution $\ast$ acting by $(x,y)^\ast = (y,x)$. We note that there is a bijection between EL data and quasi-EL data, and that quasi-EL data come about by localization of global PEL data of type A at a split place.

The conjectures in an EL case and the corresponding quasi-EL case are equivalent by Proposition 4.10 of [@ScholzeDefSpaces]. Moreover, the conjecture in the EL case reduces to the simple EL case by Proposition 4.9 of [@ScholzeDefSpaces]. By Morita equivalence, we may moreover assume that $V=B$ as left $B$-module, where $B$ is a matrix algebra over $F$.

Summarizing, we may assume that we are in the quasi-EL case corresponding to a simple EL case, where $B=B_0\times B_0$ is a matrix algebra over $F=F_0\times F_0$, following the notation for the quasi-EL case in [@ScholzeDefSpaces]. The involution on $B$ is given by $(x,y)^\ast = (y,x)$, and $V=B$ as left $B$-module.

For the proof we may fix $\tau$ and $h$. Also fix an algebraic representation $\xi$ of ${\mathbf{G}}$ of regular highest weight. As our proof will be global in nature, we will adopt global notation as needed. Let us globalize the local datum over ${\mathbb{Q}}_p$ to a global datum $(B,{\mathcal{O}}_B,F,V,\Lambda,C,{\mathcal{O}}_C,{\mathbf{h}})$ and a $*$-hermitian form on $V$ for a compact unitary Shimura variety with trivial endoscopy as in Section \[s:pseudostab\], satisfying the assumptions of Theorem \[t:cond-bc\] as done in [@Far04 Prop 8.1.3]. In particular $F$ is a CM field containing an imaginary quadratic field ${\mathcal{K}}$, $p$ splits in ${\mathcal{K}}$, $F$ decomposes as the product of its totally real subfield $F_0$ and ${\mathcal{K}}$, and $p$ is inert in $F_0$, with its local field $F_{0,p}$ being isomorphic to what was previously called $F_0$. After basechange from ${\mathbb{Q}}$ to ${\mathbb{Q}}_p$, we get the previous local PEL data and there exists a prime ${{\mathfrak p}}$ of the reflex field $E$ of the datum such that the completion $E_{{{\mathfrak p}}}$ is isomorphic to the local reflex field $E$ occuring in , compatible with the cocharacter $\mu$. Let ${\mathbf{G}}$ denote the reductive group over ${\mathbb{Z}}_{(p)}$ for the global datum, and $\pi_p$ denote $\pi$ of .

The first step is to verify assuming

-   $\pi_p$ appears as the $p$-component of an irreducible automorphic representation $\pi$ of ${\mathbf{G}}({\mathbb{A}})$ such that $\pi_\infty\in \Pi^2(\varphi_\xi)$ and $\pi_v$ is supercuspidal for some prime $q\neq p$ split in ${\mathcal{K}}$ and some place $v|q$ of $F$.

Let $$H^\ast_\xi(\pi_f) = \operatorname{Hom}_{{\mathbf{G}}({\mathbb{A}}_f)}(\pi_f,H^\ast_\xi).$$ Using Corollary \[cor:RigidAtp\], it follows from Theorem \[MainTheorem3\] that $$\label{e:global-trace}
  N {\operatorname*{tr}}(\tau | H^\ast_\xi(\pi_f)) {\operatorname*{tr}}(h|\pi_p) = \dim H^\ast_\xi(\pi_f) {\operatorname*{tr}}(f_{\tau,h}^{{\mathbf{G}}} | \pi_p).$$

If $\pi_p$ is unramified, one may take $h={{\mathbf{1}}}_{{\mathbf{G}}({\mathbb{Z}}_p)}$ and use Lemma \[l:conj-unramified\] to determine the restriction $H^\ast_\xi(\pi_f)|_{W_{E_{{\mathfrak p}}}}$, cf. Theorem 1 in [@KottwitzLambdaAdic]. This gives $$\label{e:local-global-compat}
 H^*_\xi(\pi_f)|_{W_{E_{{\mathfrak p}}}}=a(\pi_f) (r_{-\mu}\circ \lambda_{\pi_p}|_{W_{E_{{{\mathfrak p}}}}})|\cdot|_{{{\mathfrak p}}}^{-\dim{\mathrm{Sh}}/2}$$ for some integer $a(\pi_f)\in {\mathbb{Z}}$. This equation implies in particular that $N= \dim r_{-\mu}$ and $\dim H^\ast_\xi(\pi_f) = a(\pi_f) N$. We also recall that $\dim {\mathrm{Sh}}= \lg 2\rho,\mu\rg$. This argument works for any unramified split place $p$ (not only the one fixed in advance). Using Corollary \[cor:ExGalRepr\], one can build a representation of ${\mathrm{Gal}}(\bar{{\mathbb{Q}}}/E {\mathcal{K}})$ that agrees with $H^*_\xi(\pi_f)|_{{\mathrm{Gal}}(\bar{{\mathbb{Q}}}/E {\mathcal{K}})}$ at all unramified split places; we refer to the proof of [@Far04 Thm A.7.2] for the precise construction. From the Chebotarev density theorem, it follows that they agree everywhere, which shows that continues to hold at ramified split places, in particular at our given ${{\mathfrak p}}$.

Now one may combine with to deduce .

It remains to get rid of the hypothesis on $\pi_p$. Consider the two linear forms ${\mathcal{F}}_1$ (resp. ${\mathcal{F}}_2$) on the Grothendieck group of admissible representations of ${\mathbf{G}}({\mathbb{Q}}_p)$ mapping each irreducible $\pi_p$ to the value of the left (resp. right) hand side of . It is easy to see that both ${\mathcal{F}}_1$ and ${\mathcal{F}}_2$ are trace functions in the context of the trace Paley-Wiener theorem of [@BDK86]. (This is a tautology for ${\mathcal{F}}_1$.) Since [@Shin-Plan Thm 4.4] shows that a dense subset of the unitary dual of ${\mathbf{G}}({\mathbb{Q}}_p)$ satisfies the above hypothesis, we know that ${\mathcal{F}}_1={\mathcal{F}}_2$ on that dense subset. Since ${\mathcal{F}}_1$ and ${\mathcal{F}}_2$ are regular functions on (an infinite disjoint union of) algebraic varieties, we deduce that ${\mathcal{F}}_1(\pi_p)={\mathcal{F}}_2(\pi_p)$ for all $\pi_p$.

At this point, let us give a corollary of the proof. We note that the identities of Conjecture \[c:char-id\] determine the orbital integrals of $f_{\tau,h}^{\mathbf{G}}$ uniquely. On the other hand, the orbital integrals of $f_{\tau,h}^{\mathbf{G}}$ determine the twisted orbital integrals of $\phi_{\tau,h}$ uniquely. But, cf. the remarks after Theorem 5.7 of [@ScholzeDefSpaces], there was some freedom in the choice of $\phi_{\tau,h}$. This gives the following corollary.

\[cor:AllPDivGroupsOccur\] Let ${\mathrm{Sh}}$ be compact unitary group Shimura variety without endoscopy as in Section \[s:pseudostab\], satisfying the hypothesis of Theorem \[t:cond-bc\]. Let $p$ be a place split in ${\mathcal{K}}$, let ${{\mathfrak p}}|p$ a place of $E$ and let $\mathcal{M}_{K^p}/\mathcal{O}_{E_{{\mathfrak p}}}$ be the integral model of (a finite disjoint union of copies of) ${\mathrm{Sh}}_{{\mathbf{G}}({\mathbb{Z}}_p)K^p}$ over $\mathcal{O}_{E_{{\mathfrak p}}}$ defined in [@ScholzeDefSpaces].

Let $\mathcal{D}$ be the corresponding local data of quasi-EL type, associated to data $\mathcal{D}_0$ of EL type. Then any $p$-divisible group $\underline{\overline{H}}$ with $\mathcal{D}$-structure over $\bar{\mathbb{F}}_p$ which admits a deformation to characteristic $0$ occurs as the $p$-divisible group with $\mathcal{D}$-structure associated to some point over $\bar{\mathbb{F}}_p$ on $\mathcal{M}_{K^p}$, for some $K^p$.

Note that a $p$-divisible group $\underline{\overline{H}}$ with $\mathcal{D}$-structure which admits a deformation to characteristic $0$, i.e. such that $X_{\overline{\underline{H}}}\neq \emptyset$, is parametrized by some $\delta\in {\mathbf{G}}(W(\bar{{\mathbb{F}}}_p)[\frac 1p])$, cf. Proposition 3.10 of [@ScholzeDefSpaces].

We can define two functions $\phi_{\tau,h}^{(0)}$ and $\phi_{\tau,h}^{(1)}$, both satisfying the conditions after Theorem 5.7 of [@ScholzeDefSpaces], but such that $\phi_{\tau,h}^{(0)}$, resp. $\phi_{\tau,h}^{(1)}$, is $0$, resp. $1$, on all $\delta$ for which nothing is imposed by these conditions. We want to prove that $\phi_{\tau,h}^{(0)} = \phi_{\tau,h}^{(1)}$.

Now by what we have shown, necessarily all twisted orbital integrals of $\phi_{\tau,h}^{(1)} - \phi_{\tau,h}^{(0)}$ vanish. But this is the characteristic function of some open bounded subset, and it follows that this subset has to be trivial.

In the case that the local PEL data are unramified, this implies nonemptiness of Newton strata. Recall that the Newton stratification is a stratification of $\mathcal{M}_{K^p}\otimes \bar{\mathbb{F}}_p$ into locally closed subvarieties $\mathcal{M}_{K^p,b}$, $b\in B({\mathbf{G}}_{{\mathbb{Q}}_p},\mu)$, parametrized by a certain subset of $\sigma$-conjugacy classes $B({\mathbf{G}}_{{\mathbb{Q}}_p},\mu)\subset B({\mathbf{G}}_{{\mathbb{Q}}_p})$, cf. the work of Rapoport and Richartz, [@RapoportRichartz]. The question of nonemptiness of Newton strata is a deep question in the theory of the reduction of Shimura varieties. We refer to the survey article of Rapoport, [@RapoportGuide], for an extensive discussion of related work. Recently, Viehmann and Wedhorn, [@ViehmannWedhorn], have used local geometric methods to prove nonemptiness of Newton strata in many cases, including those that we handle here. Our method is entirely different, in that it uses global and automorphic arguments, similar to earlier work of Fargues, [@Far04], showing that the basic locus is nonempty.

\[cor:NewtonNonempty\] Assume that in the situation of Corollary \[cor:AllPDivGroupsOccur\], the field $F$ is unramified at $p$, so that ${\mathbf{G}}$ is unramified at $p$ and ${\mathbf{G}}({\mathbb{Z}}_p)$ is a hyperspecial maximal compact subgroup. Then for all $b\in B({\mathbf{G}}_{{\mathbb{Q}}_p},\mu)$, the Newton stratum $\mathcal{M}_{K^p,b}$ is nonempty.

We only have to show that there is some $p$-divisible group with $\mathcal{D}$-structure that has the correct Newton polygon. In the notation of [@RapoportGuide], this question is equivalent to the question $X(b,\mu)_K\neq \emptyset$ by Corollary 3.12 of [@RapoportGuide]. This is resolved by a theorem of Kottwitz and Rapoport in the case considered here, [@KottwitzRapoportExFCristals], cf. Theorem 5.5 in [@RapoportGuide].

Another interesting application of Corollary \[cor:AllPDivGroupsOccur\] is the following algebraization result that works in the ramified case, and seems to be hard to prove by other methods.

\[cor:ELAlg\] Let $\mathcal{D}$ be data of EL type, and let $\underline{\overline{H}}$ be any $p$-divisible group with $\mathcal{D}$-structure over $\bar{\mathbb{F}}_p$. Then the deformation spaces $X_{\underline{\overline{H}},K}/X_{\underline{\overline{H}}}$ defined in [@ScholzeDefSpaces] are algebraizable as in Theorem 2.9 of [@ScholzeDefSpaces].

It suffices to consider the case of simple EL data, as in the general case everything decomposes into a product. By Morita equivalence, we can assume that $V=B$ again. Changing to quasi-EL data, we may use Corollary \[cor:AllPDivGroupsOccur\] to embed the situation into a Shimura variety, which provides the desired algebraization.

Now we continue with the proof of Conjecture \[c:char-id\] in EL cases.

\[c:conj-GLn\] Conjecture \[c:char-id\] is true in all EL and quasi-EL cases for general endoscopic triples $({\mathbf{H}},s,\eta)$ of ${\mathbf{G}}$, i.e. for all irreducible representations $\pi_{{\mathbf{H}}}$ of ${\mathbf{H}}({\mathbb{Q}}_p)$ with semisimple $L$-parameter $\lambda_{\pi_{\mathbf{H}}}$, we have $${\operatorname*{tr}}(f^{{\mathbf{H}}}_{\tau,h}|\pi_{{\mathbf{H}}})=
  {\operatorname*{tr}}(s^{-1}\tau|(r_{-\mu}\circ \eta\lambda_{\pi_{\mathbf{H}}}|_{W_E})|\cdot |_E^{-\lg \rho,\mu\rg}) {\operatorname*{tr}}(h^{{\mathbf{H}}}|\pi_{{\mathbf{H}}})\ .$$

Let $K$ be a finite extension of ${\mathbb{Q}}_p$. It suffices to consider the case of simple EL data with $B=K$, $V=K^n$, where ${\mathbf{G}}\simeq {\mathrm{Res}}_{K/{\mathbb{Q}}_p} {\mathrm{GL}}_n$. In this case, any endoscopic triple $({\mathbf{H}},s,\eta)$ of ${\mathbf{G}}$ is of the form ${\mathbf{H}}\simeq {\mathrm{Res}}_{K/{\mathbb{Q}}_p} (\prod_i {\mathrm{GL}}_{n_i})$ for some $n_i\ge 1$ such that $\sum_i n_i=n$ and $$\eta:(\prod_i {\mathrm{GL}}_{n_i}({\mathbb{C}}))^{\operatorname{Hom}(K,\ol{{\mathbb{Q}}}_p)}\rtimes W_{{\mathbb{Q}}_p}
   {\rightarrow}{\mathrm{GL}}_n({\mathbb{C}})^{\operatorname{Hom}(K,\ol{{\mathbb{Q}}}_p)}\rtimes W_{{\mathbb{Q}}_p},$$ is the canonical Levi embedding, i.e. we identify ${\mathbf{H}}$ and $\hat{{\mathbf{H}}}$ with Levi subgroups of ${\mathbf{G}}$ and $\hat{{\mathbf{G}}}$ via block diagonal embeddings. Moreover we may assume that $s\in Z(\hat{{\mathbf{H}}})^{\Gamma(p)}$ as the general case is reduced to this case (cf. the last paragraph of §\[sub:tw-endos-at-p\]). Write $s=(s_i)_i\in Z(\hat{{\mathbf{H}}})^{\Gamma(p)}=\prod_i {\mathbb{C}}^\times$ (which embeds in the center of $(\prod_i {\mathrm{GL}}_{n_i}({\mathbb{C}}))^{\operatorname{Hom}(K,\ol{{\mathbb{Q}}}_p)}$ diagonally). Choose $t_0=(t_{0,i})_i\in Z(\hat{{\mathbf{H}}})^{\Gamma(p)}$ such that $t_0^r=s$. Let $c:W_{{\mathbb{Q}}_p}{\rightarrow}Z(\hat{{\mathbf{H}}})^{\Gamma(p)}$ be the cocycle $w\mapsto t_0^{-{\mathrm{ord}}(w)}$, where we normalize ${\mathrm{ord}}: W_E{\rightarrow}{\mathbb{Z}}$ by requiring that it sends a geometric Frobenius element to $1$. Define $\eta':{}^L {\mathbf{H}}{\rightarrow}{}^L {\mathbf{G}}$ by $\eta'(g\rtimes w)=c(w)\eta(g\rtimes w)$. Recall that $R_r$ and $\tilde{\eta}$ were defined in §\[sub:tw-endos-at-p\]. Write $\xi:{}^L G {\rightarrow}{}^L R_r$ for the base change $L$-morphism sending $g\rtimes w$ to $(g,g,...,g)\rtimes w$. Then it is straightforward to verify that $$\tilde{\eta}=\xi\circ \eta'.$$ The function $f^{{\mathbf{H}}}_{\tau,h}$ is a twisted transfer of $\phi_{\tau,h}$ relative to $\tilde{\eta}$. We claim that it is also an $\eta'$-transfer of $f_{\tau,h}^{\mathbf{G}}$ (denoted $(\eta')^*(f_{\tau,h}^{\mathbf{G}})$ below).

Let us accept the claim for now and finish the proof. Note that an $\eta$-transfer of $f_{\tau,h}^{\mathbf{G}}$, denoted $\eta^*(f_{\tau,h}^{\mathbf{G}})$, is given by the constant term along a parabolic subgroup with ${\mathbf{H}}$ as a Levi component. It satisfies a character identity $${\operatorname*{tr}}(\eta^*(f_{\tau,h}^{\mathbf{G}})|\pi_{{\mathbf{H}}})={\operatorname*{tr}}\left(f_{\tau,h}^{\mathbf{G}}\left|{{\rm n\textrm{-}ind}}^{{\mathbf{G}}({\mathbb{Q}}_p)}_{{\mathbf{H}}({\mathbb{Q}}_p)}(\pi_{{\mathbf{H}}})\right.\right)$$ for every irreducible admissible representation $\pi_{{\mathbf{H}}}$ of ${\mathbf{H}}({\mathbb{Q}}_p)$, where ${{\rm n\textrm{-}ind}}$ denotes the normalized parabolic induction (independent of the choice of parabolic). Let $\chi_c:H({\mathbb{Q}}_p){\rightarrow}{\mathbb{C}}^\times$ be the character corresponding to $c\in H^1(W_{{\mathbb{Q}}_p},
  Z(\hat{{\mathbf{H}}})^{\Gamma(p)})$.

Since $\eta'=\eta\cdot c$, one can show that $(\eta')^* f^{{\mathbf{G}}}_{\tau,h}$ may be given as $\chi^{-1}_c\cdot \eta^*(f_{\tau,h}^{\mathbf{G}})$. (The reason is that the Langlands-Shelstad transfer factor gets multiplied by $\chi^{-1}_c$ when $\eta$ is multiplied by $c$.) As we can take $f^{{\mathbf{H}}}_{\tau,h}=(\eta')^* f_{\tau,h}^{\mathbf{G}}$ by the claim above, $$f^{{\mathbf{H}}}_{\tau,h}(\gamma)=\eta^*(f_{\tau,h}^{\mathbf{G}})(\gamma)\chi^{-1}_c(\gamma), \quad\forall \gamma\in {\mathbf{H}}({\mathbb{Q}}_p).$$ To put it in an invariant way, $${\operatorname*{tr}}(f^{{\mathbf{H}}}_{\tau,h}|\pi_{{\mathbf{H}}})={\operatorname*{tr}}(\eta^*(f_{\tau,h}^{\mathbf{G}})|\pi_{{\mathbf{H}}}\otimes \chi_c)
  ={\operatorname*{tr}}\left(f_{\tau,h}^{\mathbf{G}}\left|{{\rm n\textrm{-}ind}}^{{\mathbf{G}}({\mathbb{Q}}_p)}_{{\mathbf{H}}({\mathbb{Q}}_p)}(\pi_{{\mathbf{H}}}\otimes \chi_c)\right.\right).$$ Note that all subquotients $\pi$ of ${{\rm n\textrm{-}ind}}^{{\mathbf{G}}({\mathbb{Q}}_p)}_{{\mathbf{H}}({\mathbb{Q}}_p)}(\pi_{{\mathbf{H}}}\otimes \chi_c)$ give rise to the same semisimple $L$-parameter $\lambda_\pi = \eta\lambda_{\pi_{{\mathbf{H}}}\otimes\chi_c}$. Hence, by the right hand side equals $${\operatorname*{tr}}(\tau|(r_{-\mu}\circ \eta\lambda_{\pi_{{\mathbf{H}}}\otimes\chi_c}|_{W_{E}})) {\operatorname*{tr}}\left(h\left|{{\rm n\textrm{-}ind}}^{{\mathbf{G}}({\mathbb{Q}}_p)}_{{\mathbf{H}}({\mathbb{Q}}_p)}(\pi_{{\mathbf{H}}}\otimes \chi_c)\right.\right)$$ $$={\operatorname*{tr}}(\tau|(r_{-\mu}\circ \eta\lambda_{\pi_{{\mathbf{H}}}\otimes \chi_c}|_{W_{E}})) {\operatorname*{tr}}(\eta^*(h)|\pi_{{\mathbf{H}}}\otimes \chi_c).$$ We recall that $c(\tau)=t_0^{-{\mathrm{ord}}(\tau)}=t_0^{-r}=s^{-1}$, from which it is not difficult to deduce that the twist by $\chi_c$ has the same effect as replacing $\tau$ by $s^{-1}\tau$: $${\operatorname*{tr}}(\tau|(r_{-\mu}\circ \eta\lambda_{\pi_{{\mathbf{H}}}\otimes \chi_c}|_{W_E}))
  = {\operatorname*{tr}}(s^{-1}\tau|(r_{-\mu}\circ \eta\lambda_{\pi_{{\mathbf{H}}}}|_{W_E})).$$ On the other hand, note that $${\operatorname*{tr}}(\eta^*(h)|\pi_{{\mathbf{H}}}\otimes \chi_c)= {\operatorname*{tr}}(\eta^*(h)|\pi_{{\mathbf{H}}}).$$ Indeed, the constant term $\eta^*(h)$ is supported only on the conjugacy classes of ${\mathbf{H}}({\mathbb{Q}}_p)$ meeting ${\mathbf{H}}({\mathbb{Z}}_p)$, since $h$ is supported on ${\mathbf{G}}({\mathbb{Z}}_p)$. Since the character $\chi_c$ is trivial on such conjugacy classes (because $c$ is an unramified cocycle), the identity follows.

Putting the above identities together, we conclude that $${\operatorname*{tr}}(f^{{\mathbf{H}}}_{\tau,h}|\pi_{{\mathbf{H}}})={\operatorname*{tr}}(s^{-1}\tau|(r_{-\mu}\circ \eta\lambda_{\pi_{{\mathbf{H}}}}|_{W_E})){\operatorname*{tr}}(\eta^*(h)|\pi_{{\mathbf{H}}}),$$ which is the equality to be proved.

It remains to justify the unproven claim that $f^{{\mathbf{H}}}_{\tau,h}$ is an $\eta'$-transfer of $f_{\tau,h}^{\mathbf{G}}$. For any $({\mathbf{G}},{\mathbf{H}})$-regular semisimple $\gamma_{{\mathbf{H}}}\in {\mathbf{H}}({\mathbb{Q}}_p)$, if $\gamma_{{\mathbf{H}}}$ is not a transfer of any twisted conjugacy class of $\delta\in {\mathbf{G}}({\mathbb{Q}}_{p^r})$ then $SO_{\gamma_{{\mathbf{H}}}}(f^{{\mathbf{H}}}_{\tau,h})=SO_{\gamma_{{\mathbf{H}}}}((\eta')^* f_{\tau,h}^{\mathbf{G}})=0$. From now on suppose that $\gamma_{{\mathbf{H}}}$ is a transfer of some $\delta$. We note that in the cases that occur here, taking a stable (twisted) orbital integral amounts to multiplying the usual (twisted) orbital integral by a sign, given as the Kottwitz sign attached to the (twisted) centralizer of the element considered. By , , $$SO^{{\mathbf{H}}({\mathbb{Q}}_p)}_{\gamma_{{\mathbf{H}}}}(f^{{\mathbf{H}}}_{\tau,h})= \Delta^{\eta}_p(\gamma_{{\mathbf{H}}},\gamma)
\lg \alpha(\gamma;\delta),s\rg^{-1}
  STO_{\delta\sigma}(\phi_{\tau,h}).$$ The superscript $\eta$ indicates that the transfer factor is relative to $\eta$. On the other hand, Theorem \[t:Fund-Lemma\] and its analogue for the base change relative to $\xi$ tell us that $$SO^{{\mathbf{H}}({\mathbb{Q}}_p)}_{\gamma_{{\mathbf{H}}}}((\eta')^* f_{\tau,h}^{\mathbf{G}})= \Delta^{\eta'}_p(\gamma_{{\mathbf{H}}},\gamma) SO^{{\mathbf{G}}({\mathbb{Q}}_p)}_{\gamma}(f_{\tau,h}^{\mathbf{G}})
= \Delta^{\eta'}_p(\gamma_{{\mathbf{H}}},\gamma) STO_{\delta\sigma}(\phi_{\tau,h}).$$

As we have noted above, $\Delta^{\eta'}_p(\gamma_{{\mathbf{H}}},\gamma)=
  \chi^{-1}_c(\gamma_{{\mathbf{H}}})\Delta^{\eta}_p(\gamma_{{\mathbf{H}}},\gamma)$. Hence the proof boils down to showing that $$\label{e:claim-conjGLn}\chi_c(\gamma_{{\mathbf{H}}})=\lg \alpha(\gamma;\delta),s\rg.$$

Define $R_r^{{\mathbf{H}}}={\mathrm{Res}}_{{\mathbb{Q}}_{p^r}/{\mathbb{Q}}_p} {\mathbf{H}}$. We can find a $\delta_{{\mathbf{H}}}\in R_r^{{\mathbf{H}}}({\mathbb{Q}}_p)={\mathbf{H}}({\mathbb{Q}}_{p^r})$ which is $\sigma$-conjugate to $\delta$ and transfers to $\gamma_{{\mathbf{H}}}$ via base change for ${\mathbf{H}}$. We write $\delta_{{\mathbf{H}}}=(\delta_{{\mathbf{H}},i})_i$ and $\gamma_{{\mathbf{H}}}=(\gamma_{{\mathbf{H}},i})_i$ with respect to ${\mathbf{H}}\simeq {\mathrm{Res}}_{K/{\mathbb{Q}}_p}(\prod_i GL_{n_i})$. As usual $v_p$ denotes the additive valuation on a $p$-adic field such that $v_p(p)=1$. It can be seen from the definition of $\chi_c$ that $$\chi_c(\gamma_{{\mathbf{H}}})=\prod_i t_{0,i}^{v_p(N_{K/{\mathbb{Q}}_p}\det \gamma_{{\mathbf{H}},i})}.$$ As $\gamma_{{\mathbf{H}},i}$ is a norm of $\delta_{{\mathbf{H}},i}$, we get $$\chi_c(\gamma_{{\mathbf{H}}})=\prod_i s_i^{v_p(N_{K/{\mathbb{Q}}_p}\det \delta_{{\mathbf{H}},i})}.$$

In order to evaluate the right hand side of , we begin by recalling the definition of $\alpha(\gamma;\delta)$. We are free to replace $\delta$ by a $\sigma$-conjugate, and hence we assume that $\delta=\delta_{{\mathbf{H}}}$. Let $L$ be the fraction field of $W(\bar{\mathbb{F}}_p)$. Using Steinberg’s theorem, one finds $d\in {\mathbf{G}}(L)$ such that $N\delta = d\gamma_{{\mathbf{H}}} d^{-1}$. In fact, it is possible to take $d\in {\mathbf{H}}(L)$, by choice of $\delta$, and as $\gamma_{{\mathbf{H}}}$ is a base-change transfer of $\delta_{{\mathbf{H}}}$. In general, $d^{-1}\delta d^\sigma\in I_0(L)$, where $I_0$ is the centralizer of $\gamma$ in ${\mathbf{G}}$, and $\alpha(\gamma;\delta)$ is defined as the image of $d^{-1}\delta d^\sigma$ under Kottwitz’ map $\kappa_{I_0}: B(I_0){\rightarrow}X^\ast(Z(\hat{I_0})^\Gamma)$.

The Kottwitz maps $\kappa_{I_0}$ and $\kappa_{{\mathbf{H}}}$ fit into a commutative diagram $$\xymatrix{ B(I_0) \ar[d]_-{\kappa_{I_0}} \ar[r] & B({\mathbf{H}}) \ar[d]_-{\kappa_{{\mathbf{H}}}}
  \ar@{=}[r] & \prod_i B({\mathrm{Res}}_{K/{\mathbb{Q}}_p} {\mathrm{GL}}_{n_i})\ar[d]_-{(\kappa_{{\mathrm{Res}}_{K/{\mathbb{Q}}_p} {\mathrm{GL}}_{n_i}})_i}   \\
  X^*(Z(\hat{I_0})^\Gamma) \ar[r]  & X^*(Z(\hat{{\mathbf{H}}})^\Gamma)
  \ar@{=}[r] & \prod_i X^*({\mathbb{C}}^\times)
  }$$ The image of $\alpha(\gamma;\delta)$ in $X^\ast(Z(\hat{{\mathbf{H}}})^\Gamma)$ is the image under $\kappa_{{\mathbf{H}}}$ of the $\sigma$-conjugacy class of $d^{-1} \delta_{{\mathbf{H}}} d^\sigma$, i.e. the $\sigma$-conjugacy class of $\delta_{{\mathbf{H}}}$, as $d\in {\mathbf{H}}(L)$.

Then $$\lg \alpha(\gamma;\delta),s\rg = \lg \kappa_{{\mathbf{H}}}(\delta_{{\mathbf{H}}}),s\rg
  = \prod_i \lg \kappa_{{\mathrm{Res}}_{K/{\mathbb{Q}}_p} {\mathrm{GL}}_{n_i}}(\delta_{{\mathbf{H}},i}),s_i\rg.$$ The right hand side is equal to $\prod_i s_i^{v_p(N_{K/{\mathbb{Q}}_p}\det \delta_{{\mathbf{H}},i})}$ thanks to Lemma \[l:Kottwitz-map\] below. We have finished the proof of .

The following well-known fact was used in the proof.

\[l:Kottwitz-map\] Let $G={\mathrm{Res}}_{K/{\mathbb{Q}}_p} {\mathrm{GL}}_n$ for a finite extension $K$ of ${\mathbb{Q}}_p$. Then the Kottwitz map $$B(G){\rightarrow}X^*(Z(\hat{G})^{\Gamma(p)})=X^*({\mathbb{C}}^\times)
\stackrel{\mathrm{canon.}}{\simeq} {\mathbb{Z}}$$ is induced by the map $g\mapsto v_p(N_{K/{\mathbb{Q}}_p}\det g)$ from $G(L)={\mathrm{GL}}_n(K\otimes_{{\mathbb{Q}}_p} L)$ to $ {\mathbb{Z}}$.

The functoriality of the Kottwitz map ([@Kot97 4.9]) with respect to $$\det:{\mathrm{Res}}_{K/{\mathbb{Q}}_p}{\mathrm{GL}}_n{\rightarrow}{\mathrm{Res}}_{K/{\mathbb{Q}}_p}{\mathrm{GL}}_1$$ reduces the proof to the case of $n=1$, where the assertion is standard, cf. [@Kot85 2.5].

Cohomology of Shimura varieties: Nonendoscopic case {#s:lgc}
===================================================

Consider a compact unitary group Shimura variety with trivial endoscopy as in Section \[s:pseudostab\].

\[t:nonendoscopic\] Assume that all places of $F_0$ above $p$ are split in $F$. Then we have an identity $$H^\ast_\xi = \sum_{\pi_f} a(\pi_f) \pi_f\otimes (r_{-\mu}\circ \varphi_{\pi_p}|_{W_{E_{{\mathfrak p}}}})|\cdot|^{-\dim {\mathrm{Sh}}/2}$$ as virtual ${\mathbf{G}}({\mathbb{A}}_f^p)\times {\mathbf{G}}({\mathbb{Z}}_p)\times W_{E_{{\mathfrak p}}}$-representations. Here $\pi_f$ runs through irreducible admissible representations of ${\mathbf{G}}({\mathbb{A}}_f)$, the integer $a(\pi_f)$ is as in [@KottwitzLambdaAdic], p. 657, and $\varphi_{\pi_p}$ is the local Langlands parameter associated to $\pi_p$.

First, we note that the assumption implies that Conjecture \[c:char-id\] is true in this case, by Theorem \[t:conj-GLn\]. Matsushima’s formula can be reformulated as the identity $$H^\ast_\xi = N \sum_{\pi_f} a(\pi_f) \pi_f$$ as ${\mathbf{G}}({\mathbb{A}}_f)$-representation, cf. Lemma 4.2 of [@Kot92b]. Now Theorem \[MainTheorem3\] and the identity from Conjecture \[c:char-id\] show that $$\begin{aligned}
{\operatorname*{tr}}(\tau\times hf^p|H^\ast_\xi) &= N^{-1} {\operatorname*{tr}}(f_{\tau,h}^{\mathbf{G}}f^p | H^\ast_\xi) \\
&= \sum_{\pi_f} a(\pi_f) {\operatorname*{tr}}(\tau|(r_{-\mu}\circ \varphi_{\pi_p}|_{W_{E_{{\mathfrak p}}}})|\cdot |^{-\dim {\mathrm{Sh}}/2}) {\operatorname*{tr}}(hf^p|\pi_f)\ .
\end{aligned}$$ This gives the desired identity.

\[c:hasse-weil\] In the situation of the theorem, let $K\subset {\mathbf{G}}({\mathbb{A}}_f)$ be any sufficiently small compact open subgroup. Then the semisimple local Hasse-Weil zeta function of ${\mathrm{Sh}}_K$ at the place ${{\mathfrak p}}$ of $E$ is given by $$\zeta_{{\mathfrak p}}^{\mathrm{ss}}({\mathrm{Sh}}_K,s) = \prod_{\pi_f} L^{\mathrm{ss}}(s-\dim {\mathrm{Sh}}/2, \pi_p, r_{-\mu})^{a(\pi_f)\dim \pi_f^K}\ .$$

One can assume that $K\subset {\mathbf{G}}({\mathbb{A}}_f^p)\times {\mathbf{G}}({\mathbb{Z}}_p)$. Now the corollary follows directly from the previous theorem and the definitions.

Cohomology of Shimura varieties: Endoscopic case {#s:compact}
================================================

In this section we proceed to study compact unitary group Shimura varieties at split places when endoscopy is nontrivial. We will work in the setup of [@Shin11 §5.1] to be recalled now. Suppose that

-   $B=F$ is a CM field with complex conjugation as the involution $*$, and

-   $F$ contains an imaginary quadratic field ${\mathcal{K}}$.

Fix a prime $p$ split in ${\mathcal{K}}$ and let ${{\mathfrak p}}$ be a prime of $E$ above $p$. We also fix a field isomorphism $\iota_\ell:\ol{{\mathbb{Q}}}_\ell\simeq {\mathbb{C}}$ throughout. Set $n=\dim_F V \ge 1$ and $F_0=F^{*=1}$. Let ${\mathrm{Spl}}_{F/F_0}$ denote the set of all rational primes $v$ such that every prime of $F_0$ above $v$ splits in $F$. We further assume

1.  $F_0\neq {\mathbb{Q}}$,

2.  if a prime $v$ is ramified in $F$ then $v\in {\mathrm{Spl}}_{F/F_0}$,

3.  ${\mathbf{G}}_{{\mathbb{Q}}_v}$ is quasi-split at all finite places $v$,

4.  the flat closure of the generic fibre in the integral models of [@ScholzeDefSpaces] is proper.

Condition (4) is necessary for our machinery. A sufficient condition for (4) is that the pairing $(~,~)$ on $V$ is positive or negative definite with respect to some complex embedding $F{\hookrightarrow}{\mathbb{C}}$, as proved by Kai-Wen Lan, [@Lan], Theorem 5.3.3.1, Remark 5.3.3.2, cf. also [@ScholzeDefSpaces], Theorem 5.8, for explanation.

Conditions (1) and (2) are imposed only to avoid issues with $L$-packets for unitary groups and will become unnecessary in due course. We remark that this situation is somewhat more general than in [@Shin11], as we allow general signatures at $\infty$.

Condition (3) contrasts the case considered in the previous section, and means that endoscopy is seen in its full strength. It implies that ${\mathbf{G}}({\mathbb{A}})$ admits an automorphic representation whose base change is $\Pi$, for any $\Pi$ as below. (If ${\mathbf{G}}_{{\mathbb{Q}}_v}$ is not quasi-split at a finite $v$ then there would be a local obstruction at $v$.)

Let $\Pi=\psi\otimes \Pi^1$ be an automorphic representation of ${\mathbf{G}}({\mathbb{A}}_{\mathcal{K}})\simeq {\mathrm{GL}}_1({\mathbb{A}}_{\mathcal{K}})\times {\mathrm{GL}}_n({\mathbb{A}}_F)$. Let $\theta$ denote the automorphism of ${\mathbf{G}}({\mathbb{A}}_{\mathcal{K}})$ induced by the nontrivial element $c$ of ${\mathrm{Gal}}({\mathcal{K}}/{\mathbb{Q}})$. Suppose that

-   $\Pi\simeq \Pi\circ \theta$ (such a $\Pi$ is called $\theta$-stable),

-   the $L$-parameter for $\Pi_\infty$ is the base change of $\varphi_\xi$,

-   $\Pi$ is ramified only at the places of $F$ above ${\mathrm{Spl}}_{F/F_0}$.

We will put ourselves in either (Case ST) or (Case END) of [@Shin11 §6.1], to be briefly recalled here. The first case refers to the case when $\Pi$ is cuspidal. In the second, $\Pi$ is required to be parabolically induced from a $\theta$-stable cuspidal automorphic representation on a maximal proper $\theta$-stable Levi subgroup which is isomorphic to a quadratic base change of an elliptic endoscopic group of ${\mathbf{G}}$. Such a Levi subgroup is isomorphic to ${\mathrm{GL}}_1({\mathbb{A}}_{\mathcal{K}})\times {\mathrm{GL}}_{m_1}({\mathbb{A}}_F)\times {\mathrm{GL}}_{m_2}({\mathbb{A}}_F)$ for some $m_1\ge m_2\ge 1$ such that $m_1+m_2=n$. It is isomorphic to a quadratic base change of a (necessarily unique up to isomorphism) elliptic endoscopic group $({\mathbf{H}},s,\eta)$ of ${\mathbf{G}}$ in all cases except when $m_1$, $m_2$ and $[F^+:{\mathbb{Q}}]$ are all odd. We may and do assume that $s^2=1$. Let $\pi_p$ be the irreducible smooth representation of ${\mathbf{G}}({\mathbb{Q}}_p)$ whose base change is isomorphic to $\Pi_p$. Similarly, in (Case END), we have a representation $\pi_{{\mathbf{H}},p}$ of ${\mathbf{H}}({\mathbb{Q}}_p)$; its $\eta$-transfer is $\pi_p$.

Fix a set of representatives for ${\mathcal{E}}_{{\mathrm{ell}}}({\mathbf{G}})$ once and for all as in [@Shin11 §3.2], by choosing a Hecke character $\varpi:{\mathbb{A}}^\times_{\mathcal{K}}/{\mathcal{K}}^\times {\rightarrow}{\mathbb{C}}^\times$ such that $\varpi|_{{\mathbb{A}}^\times/{\mathbb{Q}}^\times}$ corresponds to the quadratic character associated with ${\mathcal{K}}/{\mathbb{Q}}$ via class field theory, using Lemma 7.1 of [@Shin11]. Define $S$ to be the finite set of all primes which are either $p$ or a prime where any of $F$, $\Pi$ or $\varpi$ is ramified; our assumptions imply that $S\subset {\mathrm{Spl}}_{F/F_0}$. Define a virtual representation $H^*_\xi(\Pi)$ of ${\mathrm{Gal}}(\ol{E}/E)$ by $$\label{e:Pi-part}
H^*_\xi(\Pi)=\sum_{\pi_f} H^*_\xi(\pi_f)$$ where the sum runs over $\pi_f$ such that $H^*_\xi(\pi_f)\neq 0$, $\pi_f^S$ is unramified, $BC(\iota_\ell \pi_f^S)\simeq
\Pi^S$ and $BC(\iota_\ell \pi_{S})\simeq \Pi_S$; this is a finite sum. Here $BC$ denotes the local base change map, which makes sense as $\pi_f^S$ is unramified and $S\subset {\mathrm{Spl}}_{F/F_0}$ ([@Shin11 §4.2]).

We have the following proposition, which is not explicitly stated in [@Shin11].

Let $\pi_f$ be such that $H^*_\xi(\pi_f)\neq 0$, $\pi_f^S$ is unramified and $BC(\iota_\ell\pi_f^S)\simeq \Pi^S$. Then $BC(\iota_\ell \pi_S)\simeq \Pi_S$.

One can argue with the trace formula as in the proof of Corollary 6.5 (iv) of [@Shin11], which is similar to the proof of Theorem 6.1 of [@Shin11], but relies on the usual trace formula rather than the trace formula for Igusa varieties. One derives formulas just as (6.29) and (6.30) of [@Shin11]. Then the proposition follows from the strong multiplicity one theorem for general linear groups and the injectivity of local base change on $S$ (since $S\subset {\mathrm{Spl}}_{F/F_0}$; see [@Shin11], §4.2). (In (Case END), $\Pi$ is not cuspidal and it is implicitly used in the argument that the induced representation of an irreducible unitary representation is irreducible for general linear groups, cf. [@Shin11], (6.2), to ensure that not only the supercuspidal support of $\Pi_S$ but $\Pi_S$ itself is uniquely determined.)

Set $$\label{e:C} C_{{\mathbf{G}}}=(-1)^{\dim {\mathrm{Sh}}}\tau({\mathbf{G}}).$$ The following generalizes [@Shin11 Thm 6.4] to other compact unitary Shimura varieties.

\[t:cohom-Sh\] In (Case ST) $$H^*_\xi(\Pi)|_{W_{E_{{{\mathfrak p}}}}}= C_{{\mathbf{G}}}\cdot
(r_{-\mu}\circ \varphi_{\pi_p}|_{W_{E_{{{\mathfrak p}}}}})|\cdot|_{{{\mathfrak p}}}^{-\dim{\mathrm{Sh}}/2}.$$ In (Case END) there exists $e_{\Pi}\in \{\pm 1\}$ (independent of $p$ and ${{\mathfrak p}}$) such that $$H^*_\xi(\Pi)|_{W_{E_{{{\mathfrak p}}}}}= C_{{\mathbf{G}}}\cdot \frac{1}{2}\left(
(r_{-\mu}\circ \varphi_{\pi_p}|_{W_{E_{{{\mathfrak p}}}}})
+e_{\Pi}(r_{-\mu}\circ \eta\varphi_{\pi_{{\mathbf{H}},p}}|_{W_{E_{{{\mathfrak p}}}}})^s\right)|\cdot|_{{{\mathfrak p}}}^{-\dim{\mathrm{Sh}}/2}.$$ Here $(r_{-\mu}\circ \eta\varphi_{\pi_{{\mathbf{H}},p}}|_{W_{E_{{{\mathfrak p}}}}})^s$ is the virtual representation $V^+_{-\mu}-V^-_{-\mu}$ of $W_{E_{{{\mathfrak p}}}}$, where $V_{-\mu}=V^+_{-\mu} \oplus V^-_{-\mu}$ is the decomposition into $+1$ and $-1$ eigenspaces for the $s$-action on $r_{-\mu}\circ \eta\varphi_{\pi_{{\mathbf{H}},p}}$.

Even though $\eta\varphi_{\pi_{{\mathbf{H}},p}}$ is equivalent to $\varphi_{\pi_p}$, we keep the expression $\eta\varphi_{\pi_{{\mathbf{H}},p}}$ to remember how $s$ acts on the underlying vector space. Note that the assertion in (Case END) can be restated as $$\label{e:alternative}
 H^*_\xi(\Pi)|_{W_{E_{{{\mathfrak p}}}}}= \left\{\begin{array}{cc}
C_{{\mathbf{G}}} V^+_{-\mu}|\cdot|_{{{\mathfrak p}}}^{-\dim\mathrm{Sh}/2}, &\mbox{if}~e_\Pi=+1,\\
 C_{{\mathbf{G}}} V^-_{-\mu}|\cdot|_{{{\mathfrak p}}}^{-\dim\mathrm{Sh}/2}, &\mbox{if}~e_\Pi=-1.
  \end{array}
  \right.$$

We will first only prove this theorem up to sign. The sign will be determined later in Corollary \[cor:sign-correct\]. We adopt the strategy of proof as well as notation and convention (e.g. the choice of Haar measures, transfer factors and intertwining operators) from [@Shin11 Thm 6.1]. Once we begin with Theorem \[MainTheorem2\] (playing the role of Proposition 5.5 in that paper), basically the same argument works if suitable changes are made at $p$. As for the choice of test functions, explained at the start of proof of *loc. cit.*, it suffices to remark that $f^{{\mathbf{H}}}_{\tau,h}$ (replacing $\phi^{\vec{n}}_{\mathrm{Ig},p}$) is in the image of the base change transfer for each ${\mathbf{H}}$ since $p$ splits in ${\mathcal{K}}$ and that $f^{{\mathbf{H}}}_{\xi}$ is the same function as $\phi^{\vec{n}}_{\mathrm{Ig},\infty}$ by construction (when ${\mathbf{H}}=G_{\vec{n}}$). Let us write $\tilde{f}^{{\mathbf{H}}}$ (with sub or superscript) for the function on ${\mathbf{G}}\otimes_{\mathbb{Q}}{\mathcal{K}}$ whose base change transfer is $f^{{\mathbf{H}}}$. Hence our notation $f$ and $\tilde{f}$ correspond to $\phi$ and $f$ in [@Shin11], respectively.

Let ${\mathbf{G}}^*$ be a quasi-split inner form of ${\mathbf{G}}$, which is a principal endoscopic group. In (Case ST), (6.14) of [@Shin11] is supplanted by $$\begin{aligned}
  {\operatorname*{tr}}(\Pi_p(\tilde{f}^{{\mathbf{G}}^*}_p)A^0_{\Pi_p})&= {\operatorname*{tr}}\iota_l \pi_p (f^{{\mathbf{G}}^*}_{\tau,h}) \\
  &=  {\operatorname*{tr}}\left(\tau\left|(r_{-\mu}\circ \varphi_{\pi_p}|_{W_{E_{{{\mathfrak p}}}}})|\cdot|_{{{\mathfrak p}}}^{-\dim{\mathrm{Sh}}/2}\right.\right){\operatorname*{tr}}(h|\pi_p)\ ,
  \end{aligned}$$ where the last equality is justified by Theorem \[t:conj-GLn\]. In (Case END), the following is put in place of (6.19) of [@Shin11].[^13] $$\begin{aligned}
  {\operatorname*{tr}}(\Pi_{{\mathbf{H}},p}(\tilde{f}^{{\mathbf{H}}}_p)A^0_{\Pi_{{\mathbf{H}},p}})&={\operatorname*{tr}}\iota_l \pi_{{\mathbf{H}},p} (f^{{\mathbf{H}}}_{\tau,h})\\
  &= {\operatorname*{tr}}\left(s\tau\left|(r_{-\mu}\circ\eta\varphi_{\pi_{{\mathbf{H}},p}}|_{W_{E_{{{\mathfrak p}}}}})|\cdot|_{{{\mathfrak p}}}^{-\dim{\mathrm{Sh}}/2}\right.\right){\operatorname*{tr}}(h|\pi_p)
  \end{aligned}$$ This time the last equality comes from Corollary \[c:conj-GLn\]. The right hand side is equal to ${\operatorname*{tr}}(\tau|(r_{-\mu}\circ \eta\varphi_{\pi_{{\mathbf{H}},p}}|_{W_{E_{{{\mathfrak p}}}}})^s |\cdot|_{{{\mathfrak p}}}^{-\dim{\mathrm{Sh}}/2})$. Set $e_\Pi=e_1^{-1}e_2$. With these changes, the argument of [@Shin11] proves Theorem \[t:cohom-Sh\] up to sign.

The theorem implies the Ramanujan-Petersson conjecture for regular algebraic conjugate selfdual cuspidal automorphic representations of ${\mathrm{GL}}_n$. This was proved previously by Clozel and Caraiani, [@ClozelPurity], [@Caraiani]. We note that Caraiani’s result is stronger in that it works for all finite places.

Let $M$ be a CM field, and let $\Pi$ be a cuspidal automorphic representation of ${\mathrm{GL}}_n({\mathbb{A}}_M)$ such that $\Pi^\vee\cong \Pi\circ c$ and $\Pi_\infty$ is regular algebraic, i.e. has the same infinitesimal character as some algebraic representation of $R_{M/{\mathbb{Q}}} {\mathrm{GL}}_n$. Then $\Pi_v$ is tempered for all finite places $v$ of $M$ above rational primes $p$ above which $M$ and $\Pi$ are unramified.

In fact the proof shows that $\Pi_v$ is tempered at all ramified places as well unless $n$ is even and condition (3) of the theorem fails.

Fix the place $v$ of $M$, and let $p$ be the rational prime below $v$. We adjoin several quadratic extensions of ${\mathbb{Q}}$ which are split at $p$ to $M$ to make the following assumptions true:

-   $F^\prime=M$ is the composite of the totally real subfield $F_0^\prime$ and an imaginary quadratic field ${\mathcal{K}}$ in which $p$ splits,

-   $\Pi$ and $F^\prime$ are only ramified at places above ${\mathrm{Spl}}_{F^\prime/F_0^\prime}$,

-   $F_0^\prime\neq {\mathbb{Q}}$.

Note that the quadratic base change of $\Pi$ stays conjugate selfdual and $\Pi_\infty$ stays regular algebraic. If $\Pi$ is unramified at some place where the quadratic field ramifies, then it also stays cuspidal, cf. [@ArthurClozel]. Finally, we adjoin one more real quadratic extension of ${\mathbb{Q}}$, split at $p$, to $F_0^\prime$ and $F^\prime$, to get $F_0$ and $F$. One checks that all assumptions remain true for $F$ in place of $F^\prime$. Let $\Pi^\prime$ be the base-change of the original $\Pi$ to $F^\prime$, and let $\Pi$ be the further base-change to $F$.

Using Lemma 7.2 of [@Shin11], we arrive at a situation where the assumptions of (Case ST) are satisfied. Consider a PEL datum whose associated group ${\mathbf{G}}$ is quasi-split at all finite places and has as signature at infinity either

-   $(1,n-1)$, $(0,n)$, ..., $(0,n)$ or

-   $(1,n-1)$, $(1,n-1)$, $(0,n)$, ..., $(0,n)$.

In case (ii), we require that the two infinite places of $F_0$ with signature $(1,n-1)$ lie above one place of $F_0^\prime$. If $n$ is odd then there is no obstruction for choosing the signature. In general there is a parity obstruction but one can still find such a PEL datum with one of the two signatures. Note that all assumptions of this section are satisfied.

Let ${\mathrm{Sh}}$ denote the corresponding Shimura variety. Note that the reflex field $E$ is given by $F$ in case (i), and by $F^\prime$ in case (ii). In case (i), the proof of [@Shin11 Cor 6.5] (following the proof presented on page 207 of [@HT01]), can be combined with the Weil conjecture to imply that $\Pi$ is tempered at $v$. We note that this argument works even at ramified places. Let us explain the argument in the more subtle case (ii). Note that we have a place $v$ of $F^\prime$ and want to prove that $\Pi^\prime_v$ is tempered. We use the previous theorem at the place $v$ of $E=F^\prime$. The representation $r_{-\mu}\circ \varphi_{\pi_p}|_{W_{F^\prime_v}}$ is given by a unitary twist of $\varphi_{\Pi^\prime_v}^{\otimes 2}$. The classification of unitary generic representations shows that $\Pi^\prime_v$ is induced from a representation $$\bigotimes_i (\pi_i |\cdot|^{a_i}\otimes \pi_i |\cdot|^{-a_i})\otimes \bigotimes_j \pi_j\ ,$$ of a Levi subgroup, where $\pi_i$ are tempered representations of smaller ${\mathrm{GL}}_k$’s, and $0<a_i<\frac 12$ are real numbers. We want to prove that the first factor is trivial. Our assumptions ensure that this representation already occurs at an unramified level, for which there exists a smooth model of our Shimura variety. Thus, it follows from the Weil conjectures and the fact that $\varphi_{\Pi^\prime_v}^{\otimes 2}$ occurs in the cohomology of the Shimura variety that $4a_i\in \mathbb{Z}$, i.e. $a_i=\frac 14$ for all $i$. If the first factor is nonzero, then it follows that $\varphi_{\Pi^\prime_v}^{\otimes 2}$ contributes nontrivially to three consecutive degrees. On the other hand, the cohomology is an alternating sum, with consecutive degrees contributing different signs (which cannot cancel each other as they have different weights). This contradiction finishes the proof.

\[cor:sign-correct\] In both (Case ST) and (Case END), for any $\pi_f$ such that $H^*_\xi(\pi_f)\neq 0$, $\pi_f^S$ is unramified and $BC(\iota_\ell\pi_f^S)\simeq \Pi^S$, the $\pi_f$-isotypic component $H^i_\xi(\pi_f)$ is nonzero only for $i=\dim {\mathrm{Sh}}$. In particular, the sign in Theorem \[t:cohom-Sh\] is correct.

This is a direct application of the Weil conjectures.

We restricted ourselves to (Case ST) and (Case END) above for simplicity, as this is enough for the application of the next section. It should be possible to treat the case of general $\Pi$ once finer information becomes available about the terms in the twisted trace formula for ${\mathbf{G}}\otimes_{\mathbb{Q}}{\mathcal{K}}$. Such information would be obtained by carrying over the results of [@White] and [@ArthurEndoscopy] to the case of unitary similitude groups.

Construction of Galois representations {#s:Galois}
======================================

In this final section we remark that the approach used in this paper provides a shorter proof of the main result of [@Shin11], which was based on a generalization of the method of [@HT01]. In particular one can bypass the use of Igusa varieties, the Newton stratification, and the analogues of the first and second basic identities ([@HT01 Thm VI.2.9, V.5.4], cf. [@Shin11 Prop 5.2, Thm 6.1]) of Harris and Taylor.

\[t:ExGalRepr\]([@Shin11 Thm 1.2]) Let $F$ be any CM field. Let $\Pi$ be a cuspidal automorphic representation of ${\mathrm{GL}}_n({\mathbb{A}}_F)$ such that

1.  $\Pi^\vee\simeq \Pi\circ c$,

2.  $\Pi_\infty$ has the same infinitesimal character as some irreducible algebraic representation $\Xi^\vee$ of the restriction of scalars $R_{F/{\mathbb{Q}}} {\mathrm{GL}}_n$, and

3.  $\Xi$ is slightly regular, if $n$ is even.

Then for each prime $\ell$ and an isomorphism $\iota_\ell:\ol{{\mathbb{Q}}}_\ell\simeq {\mathbb{C}}$, there exists a continuous semisimple representation $R_{\ell,\iota_\ell}(\Pi):
  {\mathrm{Gal}}(\ol{F}/F)\rightarrow {\mathrm{GL}}_n(\ol{{\mathbb{Q}}}_\ell)$ such that for any place $y$ of $F$ not dividing $\ell$, the Frobenius semisimple Weil-Deligne representation associated to $R_{\ell,\iota_\ell}(\Pi)|_{{\mathrm{Gal}}(\ol{F}_y/F_y)}$ corresponds to $\iota_\ell^{-1}\Pi_y$ via (a suitably normalized) local Langlands correspondence, except possibly for the monodromy operator $N$.

See [@Shin11] for the meaning of (3) and a complete list of assertions regarding $R_{\ell,\iota_\ell}(\Pi)$. It is not difficult to extend the above theorem to the case where $\Pi^\vee\simeq \Pi\circ c$ holds up to a character twist or where $\Pi^\vee\simeq \Pi$ up to a character and $F$ is a totally real field. Moreover using the above theorem as a starting point, several mathematicians have strengthened it ([@CH], [@Caraiani], [@BLGGTa], [@BLGGTb]). For instance (3) has become unnecessary and a similar conclusion holds at $y$ dividing $\ell$.

In [@Shin11], the main theorems of section 7 follow from Theorem 6.4 (and its corollaries). Since our Theorem \[t:cohom-Sh\] reproves Theorem 6.4 (by a different method) when applied to the Shimura varieties of [@Shin11], the main results of that article can be derived from Theorem \[t:cohom-Sh\] by the same reasoning. (Our proof of Theorem \[t:cohom-Sh\] shows that the sign $e_\Pi$ is equal to $e^{-1}_1e_2$ of [@Shin11]. Hence it can be controlled by the choice of archimedean parameters as in Lemma 7.3 of that paper.) Note that as in [@Shin11] it is enough to consider Shimura varieties attached to unitary similitude groups in an odd number of variables with signature $(1,m-1)$, $(0,m)$, ..., $(0,m)$ at infinity where $m=n$ if $n$ is odd and $m=n+1$ if $n$ is even, even though Theorem \[t:cohom-Sh\] covers more general cases.

Finally, let us add one remark about the determination of the monodromy operator $N$, which is the most delicate extra assertion in [@Shin11 Thm 1.2]. One easily proves temperedness of $\Pi_v$ for all $v$, so it remains to verify the weight-monodromy conjecture for $R_{\ell,\iota_\ell}(\Pi)$, as in the paper of Taylor and Yoshida, [@TaylorYoshida], cf. [@Shin11], Section 7. The input that one needs is a description of the cohomology of each Newton stratum. This can be achieved by using the Langlands-Kottwitz method. First, one has to check that the arguments of [@ScholzeDefSpaces] compute the cohomology of the Newton stratum corresponding to the $\sigma$-conjugacy class $b\in B({\mathbf{G}})$ once $\phi_{\tau,h}$ is replaced by $\phi_{\tau,h}\chi_b$, where $\chi_b$ is the characteristic function of the $\sigma$-conjugacy class $b$, at least if $j$ is sufficiently large. Now one has to follow the arguments of this paper with $\phi_{\tau,h}\chi_b$ in place of $\phi_{\tau,h}$. Note that we have already determined the twisted orbital integrals of $\phi_{\tau,h}$, which in turn determine those of $\phi_{\tau,h}\chi_b$. This gives the desired description of the cohomology of each Newton stratum, which may then be used to determine $N$.

[^1]: In the general case, one considers the intersection cohomology groups of the Baily-Borel compactification, and similar results are expected. cf. [@Mor10].

[^2]: We refer to [@BuzzardGee] for a detailed discussion of this point. There is some subtle twisting issue which we ignore here.

[^3]: In fact, in most cases it is just a product of some copies of $\mathbb{Z}/2\mathbb{Z}$.

[^4]: A slightly unfortunate terminology, as it only implies that ${\mathbf{G}}_{{\mathbb{Q}}_p}$ is quasisplit, but not that it is split. A justification is that the primes above $p$ should be split between the totally real field and its CM quadratic extension defining the hermitian form for ${\mathbf{G}}$.

[^5]: Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.

[^6]: In particular, we revert back to the normalization used by Kottwitz, which is different from the one used in [@ScholzeDefSpaces].

[^7]: Here, we switch to Kottwitz’ normalization of $\mu$: Let $\mu_{RZ}$ denote the $\mu$ considered in [@ScholzeDefSpaces]; then the product $\mu\mu_{RZ}$ is to be the central morphism ${\mathbb{G}}_m{\rightarrow}{\mathbf{G}}$ that sends $t\in {\mathbb{G}}_m$ to multiplication by $t$ on $V$.

[^8]: In particular, all of our results in the nonendoscopic case are independent of recent work on the fundamental lemma. Only the base change fundamental lemma by Kottwitz, Clozel and Labesse is needed.

[^9]: Vogan named it an infinitesimal character in [@Vog93], which unfortunately conflicts with the common usage of the term as a character of $\mathcal{Z}(G)$, which Vogan refers to as a classical infinitesimal character.

[^10]: In fact our definition is not the same as the one in [@KV06]. Though the two definitions are supposed to be equivalent, and this is the case for $G=GL_n$, it is difficult to check in general. Our definition has the advantage that ${\mathcal{Y}}^{{\mathrm{st}}}(G)$ is easily seen to be a subalgebra of ${\mathcal{Z}}(G)$.

[^11]: We also assume that the flat closure of the generic fibre in the integral models defined in [@ScholzeDefSpaces] is proper.

[^12]: In particular, we assume that there is the global Langlands group. This should be avoidable in all PEL cases by using alternative global parameters as in [@ArthurEndoscopy].

[^13]: There are typos in (6.19) and (6.20) of [@Shin11]: $\Pi_p$ and $\Pi_\infty$ should read $\Pi_{{\mathbf{H}},p}$ and $\Pi_{{\mathbf{H}},\infty}$, resp.
