it.

\[thm\_intro:Kottwitz\_conj\] Assume that the center $Z(G)$ of $G$ has same ranks over ${\mathbb Q}$ and ${\mathbb R}$.[^1] For every $f^p$ in the Hecke algebra $\mathcal{H}(G({\mathbb A}_f^p)/\!\!/ K^p)$, there exists $m(f^p)\in{\mathbb N}$, depending on $f^p$, such that for each $m\geq m(f^p)$, the Lefschetz number of $\Phi^m\times f^p$ is given by $$\sum_i (-1)^i \mathrm{tr}(\Phi^m\times f^p | H_c^i(Sh_K(G,X)_{{\overline{\mathbb Q}}},{\mathscr{F}}_K))=\sum_{\underline{H}\in \mathscr{E}_{\mathrm{ell}}(G)} \iota(G,\underline{H}) {\mathrm{ST}}_{{\mathrm{ell}}}^{H_1}(f^{H_1}),$$ where the right sum is over a set $\mathscr{E}_{\mathrm{ell}}(G)$ of representatives of the isomorphism classes of elliptic endoscopic data of $G$ with a choice of a $z$-pair $(H_1,\xi_1)$ for each $\underline{H}\in \mathscr{E}_{\mathrm{ell}}(G)$, and ${\mathrm{ST}}_{{\mathrm{ell}}}^{H_1}(f^{H_1})$ is the elliptic part of the geometric side of the stable trace formula for a suitable function $f^{H_1}$ on $H_1({\mathbb A})$, $\iota(G,\underline{H})$ is a certain constant depending only on the pair $(G,\underline{H})$.

Moreover, if the adjoint group $G^{{\mathrm{ad}}}$ is ${\mathbb Q}$-anisotropic or $f^p$ is the identity, we can take $m(f^p)$ to be $1$.

In particular, we obtain a formula for the local zeta functions of the same Shimura varieties. We refer to Thm. \[thm:EP\_GS\_STF\] for explanation of the objects appearing here. We remark that this formula is the first step in the Langlands’s program for establishing the celebrated conjecture that the Hasse-Weil zeta function of an 