Cuspidal cohomology of stacks of shtukas

Let $G$ be a connected split reductive group over a finite field ${\mathbb F}_q$ and $X$ a smooth projective geometrically connected curve over ${\mathbb F}_q$. The $\ell$-adic cohomology of stacks of $G$-shtukas is a generalization of the space of automorphic forms with compact support over the function field of $X$. In this paper, we construct a constant term morphism on the cohomology of stacks of shtukas which is a generalization of the constant term morphism for automorphic forms. We also define the cuspidal cohomology which generalizes the space of cuspidal automorphic forms. Then we show that the cuspidal cohomology has finite dimension and that it is equal to the (rationally) Hecke-finite cohomology defined by V. Lafforgue.


Introduction
Let X be a smooth projective geometrically connected curve over a finite field F q . We denote by F its function field, by A the ring of adèles of F and by O the ring of integral adèles.
Let G be a connected split reductive group over F q . For simplicity, we assume in the introduction that the center of G is finite.
We consider the space of automorphic forms C c (G(F )\G(A)/G(O), C). On the one hand, there is the notion of cuspidal automorphic form. An automorphic form is said to be cuspidal if its image under the constant term morphism along any proper parabolic subgroup of G is zero. A theorem of Harder ([Har74] Theorem 1.2.1) says that the space of cuspidal automorphic forms has finite dimension. The proof uses the Harder-Narasimhan truncations and the contractibility of deep enough strata.
On the other hand, the space of automophic forms is equipped with an action of the Hecke algebra C c (G(O)\G(A)/G(O), Q) by convolution on the right. An automorphic form is said to be (rationally) Hecke-finite if it belongs to a finitedimensional subspace that is stable under the action of the Hecke algebra.
In [Laf18] Proposition 8.23, V. Lafforgue proved that the space of cuspidal automorphic forms and the space of Hecke-finite automorphic forms are equal. In fact, the space of cuspidal automorphic forms is stable under the action of the Hecke algebra and is finite-dimensional, thus it is included in the space of Heckefinite automorphic forms. The converse direction follows from the following fact: any non zero image of the constant term morphism along a proper parabolic subgroup P with Levi quotient M is supported on the components indexed by a cone in the lattice of the cocharacters of the center of M. Hence it generates an infinite-dimensional vector space under the action of the Hecke algebra of M. 0.0.5. We fix a Borel subgroup B ⊂ G. By a parabolic subgroup we will mean a standard parabolic subgroup (i.e. a parabolic subgroup containing B), unless explicitly stated otherwise. 0.0.6. Let H be a connected split reductive group over F q with a fixed Borel subgroup. Let Λ H (resp. Λ H ) denote the weight (resp. coweight) lattice of H. denote the rational cones of Λ pos H and Λ + H . We use analogous notation for the weight lattice.
We will apply these notations to H = G, H = G ad or H = some Levi quotient M of G. 0.0.7. We denote by Γ G the set of simple roots of G and by Γ G the set of simple coroots. The standard parabolic subgroups of G are in bijection with the subsets of Γ G in the following way. To a parabolic subgroup P with Levi quotient M, we associate the subset Γ M in Γ G equal to the set of simple roots of M. Let H be an algebraic group over F q . We denote by H N the Weil restriction Res O N /Fq H. 0.0.9. If not specified, all schemes are defined over F q and all the fiber products are taken over F q . 0.0.10. For any scheme S over F q and x an S-point of X, we denote by Γ x ⊂ X × S the graph of x. 0.0.11. For any scheme S over F q , we denote by Frob S : S → S the Frobenius morphism over F q . For any G-bundle G on X × S, we denote by τ G the G-bundle (Id X × Fq Frob S ) * G. 0.0.12. We use Definition 3.1 and Definition 4.1 in [LMB99] for prestacks, stacks and algebraic stacks. 0.0.13. As in [LMB99] Section 18, [LO08] and [LO09], for X an algebraic stack locally of finite type over F q , we denote by D b c (X, Q ℓ ) the bounded derived category of constructible ℓ-adic sheaves on X. We have the notion of six operators and perverse sheaves.
If f : X 1 → X 2 is a morphism of finite type of schemes (resp. algebraic stacks) locally of finite type, we will denote by f ! , f * , f * , f ! the corresponding functors between D b c (X 1 , Q ℓ ) and D b c (X 2 , Q ℓ ), always understood in the derived sense. 0.0.14. We will work with étale cohomology. So for any stack (resp. scheme) (for example Cht G,N,I,W and Gr G,I,W ), we consider only the reduced substack (resp. subscheme) associated to it.
1.1.10. For (x i ) i∈I ∈ X I (S), d ∈ N, we denote by Γ dx i the closed subscheme of X × S whose ideal is generated by ( i∈I t i ) d locally for the Zariski topology, where t i is an equation of the graph Γ x i . We define Γ ∞x i := lim − →d Γ dx i to be the formal neighborhood of ∪ i∈I Γ x i in X × S.
A G-bundle on Γ ∞x i is a projective limit of G-bundles on Γ dx i as d → ∞.
Definition 1.1.11. We define the Beilinson-Drinfeld affine grassmannian Gr G,I to be the ind-scheme that associates to any affine scheme S over F q the set Gr G,I (S) classifying the following data: (i) (x i ) i∈I ∈ X I (S), (ii) G, G ′ two G-bundles on Γ ∞x i , (iii) an isomorphism of G-bundles φ : where the precise meaning is given in [Laf18] Notation 1.7, (iv) a trivialization θ : G ′ ∼ → G on Γ ∞x i .
1.1.12. We have the morphism of paws: Gr G,I → X I . The fiber over (x i ) i∈I ∈ X I Fq is y∈{x i |i∈I} Gr G,y , where Gr G,y is the usual affine grassmannian, i.e. the fpqc quotient G Ky /G Oy , where O y is the complete local ring on y and K y is its field of fractions.
Definition 1.1.13. (a) For any d ∈ N, we define G I,d to be the group scheme over X I that associates to any affine scheme S over F q the set consisting of pairs ((x i ) i∈I , f ), where (x i ) i∈I ∈ X I (S) and f is an automorphism of the trivial G-bundle on Γ dx i .
(b) We define the group scheme G I,∞ := lim ←− G I,d .
1.1.14. The fiber of G I,∞ over (x i ) i∈I ∈ X I Fq is y∈{x i |i∈I} G Oy . 1.1.15. The group scheme G I,∞ acts on Gr G,I by changing the trivialization θ. We denote by [G I,∞ \ Gr G,I ] the quotient prestack. For any affine scheme S over F q , [G I,∞ \ Gr G,I ](S) is the groupoid classifying the data (i), (ii) and (iii) in Definition 1.1.11. 1.1.16. We have a morphism of prestacks: Remark 1.1.17. The prestack [G I,∞ \ Gr G,I ] is not an inductive limit of algebraic stacks. But we can still use it for the construction in Sections 1.2 and 1.3. We will construct a variant of morphism (1.2) for algebraic stacks in 2.4.1.
The following definition will be used in Section 4.
Definition 1.1.18. (a) We define Bun G,N,I,d to be the prestack that associates to any affine scheme S over F q the groupoid classifying the following data: (i) (x i ) i∈I ∈ (X N) I (S), 1.2.6. Let X (resp. Y) be an (ind-)scheme over a base S that is equipped with an action of a group scheme A (resp. B) over S from the right. Let A → B be a morphism of group schemes over S. Let X → Y be a morphism of (ind-)schemes over S which is A-equivariant (where A acts on Y via A → B). This morphism induces a morphism of quotient prestacks [A\X] → [B\Y].
1.2.7. Applying 1.2.6 to i 0 : Gr P,I → Gr G,I and P I,∞ ֒→ G I,∞ , we obtain a morphism of prestacks: 1.3.1. Let Z G be the center of G as defined in 0.0.3. We have an action of Bun Z G on Bun G,N by twisting a G-bundle by a Z G -bundle, i.e. the action of T Z ∈ Bun Z G is given by G → (G × T Z )/Z G . Similarly, Bun Z G acts on [G I,∞ \ Gr G,I ], i.e. the action of T Z ∈ Bun Z G is given by For T Z ∈ Bun Z G (F q ), we have a canonical identification T Z ≃ τ T Z . Thus Bun Z G (F q ) acts on Cht G,N,I by twisting a G-bundle by a Z G -bundle, i.e. the action The group Ξ defined in 0.0.4 acts on Bun G,N , Cht G,N,I and [G I,∞ \ Gr G,I ] via Ξ → Z G (A) → Bun Z G (F q ).
1.3.2. Note that the morphism ǫ G,N,I,∞ defined in (1.2) is Ξ-equivariant. Now applying Definition 1.1.13 to Z G (resp. G ad ), we define a group scheme (Z G ) I,∞ (resp. G ad I,∞ ) over X I . We have G ad I,∞ = G I,∞ /(Z G ) I,∞ . The group scheme (Z G ) I,∞ acts trivially on Gr G,I , so the action of G I,∞ on Gr G,I factors through G ad I,∞ . We use this action to define the quotient prestack [G ad (1.7) ǫ Ξ G,N,I,∞ : Cht G,N,I /Ξ → [G ad I,∞ \Gr G,I ]. We will construct a variant of morphism (1.7) for algebraic stacks in 2.4.1.
1.3.3. Z G acts on a P -bundle via Z G ֒→ P . Just as in 1.3.1, we have an action of Bun Z G on Bun P,N by twisting a P -bundle by a Z G -bundle. This leads to an action of Ξ on Bun P,N , Cht P,N,I and [P I,∞ \Gr P, Using the morphism Z G ֒→ M, we similarly obtain an action of Ξ on Bun M,N , Cht M,N,I and [M I,∞ \Gr M,I ].
1.3.4. Applying Definition 1.1.13 to P := P/Z G (resp. M := M/Z G ), we define a group scheme P I,∞ (resp. M I,∞ ) over X I . We have P I,∞ = P I,∞ /(Z G ) I,∞ and The morphism ǫ P,N,I,∞ defined in 1.2.1 is Ξ-equivariant. Since the group scheme (Z G ) I,∞ acts trivially on Gr P,I , the action of P I,∞ on Gr P,I factors through P I,∞ . We denote by [P I,∞ \Gr P,I ] the resulting quotient prestack. The morphism P I,∞ ։ P I,∞ induces a morphism [P I,∞ \Gr P,I ] → [P I,∞ \Gr P,I ], which is Ξ-equivariant for the trivial action of Ξ on [P I,∞ \Gr P,I ]. Hence the composition of morphisms Cht P,N,I In the remaining part of Section 1, we introduce the Harder-Narasimhan stratification (compatible with the action of Ξ) for the parabolic induction diagram (1.4). In order to do so, we use the Harder-Narasimhan stratification for the parabolic induction diagram (1.3). From now on we work in the context of agebraic (ind-)stacks.
In Section 1.4, we recall the usual Harder-Narasimhan stratification Bun ≤ G µ G ⊂ Bun G and a variant Bun ≤ G ad µ G ⊂ Bun G which is compatible with the action by Ξ.
In Section 1.5, we introduce the Harder-Narasimhan stratification Bun ≤ G ad µ M ⊂ Bun M , which allows us to construct in Section 1.6 the truncated parabolic induction diagrams (1.26): In Section 1.7, we define the Harder-Narasimhan stratification on the stacks of shtukas using Sections 1.4-1.6.
1.4. Harder-Narasimhan stratification of Bun G . In 1.4.1-1.4.10, we recall the Harder-Narasimhan stratification of Bun G defined in [Sch15] and [DG15] Section 7. (In these papers, the group is reductive over an algebraically closed field. Since our group G is split over F q , we use Galois descent to obtain the stratification over F q .) In 1.4.11-1.4.17, we recall a variant of the Harder-Narasimhan stratification of Bun G which is compatible with the quotient by Ξ, as in [Var04] Section 2 and [Laf18] Section 1. Let Λ Q G,P := Λ G,P ⊗ Z Q. We denote by Λ pos G,P the image of Λ pos G in Λ G,P , and by Λ pos,Q G,P the image of Λ pos,Q G in Λ Q G,P . We introduce the partial order on Λ G,P by We define the slope map to be the composition We define pr P to be the composition (1.14) Definition 1.4.6. ([DG15] 7.3.3, 7.3.4) For any µ ∈ Λ +,Q G , we define Bun ≤ G µ G to be the stack that associates to any affine scheme S over F q the groupoid Remark 1.4.7. (a) By [Sch15] Lemma 3.3, the above Definition 1.4.6 is equivalent to (the argument repeats the proof in loc.cit. by replacing φ G (λ G ) by µ).
(b) By [Sch15] Proposition 3.2 and Remark 3.2.4, the definition of Bun ≤ G µ G in (a) is equivalent to the Tannakian description: where B λ is the line bundle associated to B and B → T λ − → G m . (c) The reason why we use Definition 1.4.6 (rather than its equivalent forms) is that it will be useful for non split groups in future works.
where pr P is defined in (1.14) and ι : The set {λ ∈ Λ +,Q G | λ ≤ G µ and Bun The above open substack Bun ≤ G µ G is not preserved by the action of Ξ on Bun G . Now we introduce open substacks which are preserved by the action of Ξ.
1.4.11. Applying 0.0.6 to group G ad , we define Definition 1.4.12. For any µ ∈ Λ +,Q G ad , we define Bun ≤ G ad µ G to be the stack that associates to any affine scheme S over F q the groupoid Bun ≤ G ad µ G (S) := {G ∈ Bun G (S)| for each geometric point s ∈ S, each parabolic subgroup P and each P -structure P on G s , we have Υ G • φ P • deg P (P) ≤ G ad µ}.
1.4.14. Just as in 1.4.10, for µ ∈ Λ +,Q G ad , we have We define the quotient (c) Bun G is the inductive limit of these open substacks: 1.5.13. We denote by Λ pos,Q Z M /Z G := pr ad P ( Λ pos,Q G ad ). We introduce the partial order > 0 and these pr ad P •Υ G (γ) are linearly independent. Thus for λ 1 , λ 2 ∈ Λ Q G ad and λ 1 ≤ G ad λ 2 , we have pr ad Lemma 1.5.14. Let µ ∈ Λ +,Q G ad . Then the stack Bun ≤ G ad µ, ν M is empty unless ν ∈ A M defined in 1.5.7 and ν ≤ G ad pr ad P (µ). Proof. The first condition follows from 1.5.7. To prove the second condition, note that for the set {λ ∈ Λ +,Q M | Υ G (λ) ≤ G ad µ, pr ad P •Υ G (λ) = ν} to be nonempty, by 1.5.13 we must have ν ≤ G ad pr ad P (µ).
We deduce from 1.4.10 (applied to M) that the set {λ ∈ Λ +,Q M is of finite type. From 1.5.12 we deduce the lemma.
1.5.20. By Lemma 1.5.14, the decomposition (1.17) is in fact indexed by a translated cone in Λ Q Z M /Z G : Definition 1.6.1. Let µ ∈ Λ +,Q G ad . We define Bun ≤ G ad µ P to be the inverse image of Proof. Let P ∈ Bun ≤ G ad µ P and let M be its image in Bun M . We will check that For any parabolic subgroup P ′ of M, let M ′ be its Levi quotient.
Let P ′ be a P ′ -structure of M and M ′ := P ′ P ′ × M ′ . By Definition 1.5.4, we need to prove that Lemma 2.5.8, we can define a P ′′ -bundle P ′′ := P × M P ′ . We have (1.25) The group Ξ acts on all these stacks. All the morphisms are Ξ-equivariant. Thus morphisms (1.25) induce morphisms:
Notation 1.7.1. In the remaining part of the paper, we will only use the truncations indexed by "≤ G ad " (rather than "≤ G "). To simplify the notation, from now on, "≤" means "≤ G ad ".
Definition 1.7.2. Let µ ∈ Λ +,Q G ad (resp. λ ∈ Λ +,Q G ). We define Cht ≤µ G,N,I (resp. Cht Similarly, we define Cht ≤µ M,N,I (resp. Cht ≤µ, ν M,N,I , Cht In Section 2.6 we define the cohomology of stacks of M-shtukas. Notation 2.0.1. Our results are of geometric nature, i.e. we will not consider the action of Gal(F q /F q ). From now on, we pass to the base change over F q . We keep the same notations X, Bun G,N , Cht G,N,I , Gr G,I , etc... but now everything is over F q and the fiber products are taken over F q .

2.1.
Reminder of a generalization of the geometric Satake equivalence. We denote by Perv G I,∞ (Gr G,I , Q ℓ ) the category of G I,∞ -equivariant perverse sheaves with Q ℓ -coefficients on Gr G,I (for the perverse normalization relative to X I ).
2.1.4. As in [Gai07] 2.5, we denote by P G,I the category of perverse sheaves with Q ℓ -coefficients on X I (for the perverse normalization relative to X I ) endowed with an extra structure given in loc.cit. 2.1.6. We denote by Rep Q ℓ ( G I ) the category of finite dimensional Q ℓ -linear representations of G I . We have a fully faithful functor Rep Q ℓ ( G I ) → P G,I : W → W ⊗ Q ℓX I . The composition of this functor and the inverse functor P G,I ∼ → Perv G I,∞ (Gr G,I , Q ℓ ) in Theorem 2.1.5 gives: Corollary 2.1.7. We have a canonical natural fully faithful Q ℓ -linear fiber functor: Sat G,I : Rep Q ℓ ( G I ) → Perv G I,∞ (Gr G,I , Q ℓ ).

2.4.2.
We denote by dim X I G I,d the relative dimension of G I,d over X I and by |I| the cardinal of I. We have dim X I G I,d = d · |I| · dim G.
We deduce from Proposition 2.4.3 that dim Cht G,N,I,W = dim Gr G,I,W . We refer to [Laf18] Proposition 2.11 for the fact that Cht G,N,I,W is locally isomorphic to Gr G,I,W for the étale topology. We will not use this result in this paper.
For any j ∈ Z, we define degree j cohomology sheaf (for the ordinary t-structure): 2.6. Cohomology of stacks of M-shtukas. Let P be a proper parabolic subgroup of G and let M be its Levi quotient.
2.6.1. Let M be the Langlands dual group of M over Q ℓ defined by the geometric Satake equivalence. The compatibility between the geometric Satake equivalence and the constant term functor along P (that we will recall in Theorem 3.2.6 below) induces a canonical inclusion M ֒→ G (compatible with pinning).
For any j ∈ Z, we define degree j cohomology sheaf This is a finite dimensional Q ℓ -vector space. We define We have an open immersion: (2.9) Cht ≤µ 1 M,N,I,W /Ξ ֒→ Cht ≤µ 2 M,N,I,W /Ξ. For any j, morphism (2.9) induces a morphism of vector spaces: as an inductive limit in the category of Q ℓ -vector spaces. Firstly, we will construct a commutative diagram where the morphism π is of finite type. Therefore the complex π ! i * F Ξ G,N,I,W on Cht M,N,I,W /Ξ is well defined in D b c (Cht M,N,I,W /Ξ, Q ℓ ) (in the context of 0.0.13). We will construct a canonical morphism of complexes on Cht M,N,I,W /Ξ: Secondly, the cohomological correspondence given by (3.1) and (3.2) will give a morphism from H j G,N,I,W to H j M,N,I,W .
3.1. Some geometry of the parabolic induction diagram. Recall that we have morphisms over X I in (1.5): where the inverse images are in the sense of reduced subschemes in Gr P,I .
Proof. It is enough to prove the inclusion for each fiber over X I . By 1.1.12, we reduce the case of the Beilinson-Drinfeld affine grassmannian with paws indexed by I to the case of the usual affine grassmannian When P = B, the statement follows from Theorem 3.2 of [MV07]. More concretely, for ω a dominant coweight of G, we denote by Gr G,ω the Zariski closure of the Schubert cell defined by ω in Gr G . For ν a coweight of T , we denote by Gr T,ν the component of Gr T (which is discrete) associated to ν. We denote by C ω the set of coweights of G which are W -conjugated to a dominant coweight ≤ ω (where the order is taken in the coweight lattice of G). By Theorem 3.2 of loc.cit. the subscheme For general P with Levi quotient M, we denote by B ′ the Borel subgroup of M. We use the following diagram, where the square is Cartesian: Since the square is Cartesian, we have For any dominant coweight λ of M, we denote by Gr M,λ the Zariski closure of the Schubert cell defined by λ in Gr M . Applying Theorem 3.2 of loc.cit. to so is a union of strata in Gr M . We deduce from (3.4) and (3.5) that Gr M,λ can be in 3.1.2. We define Gr P,I,W := (i 0 ) −1 (Gr G,I,W ). As a consequence of Proposition 3.1.1, morphisms (1.5) induce morphisms over X I : 3.1.3. We deduce from the commutative diagram (1.6) that where the inverse images are in the sense of reduced substacks in Cht P,N,I . We Remark 3.1.6. Note that Cht M,N,I,W depends on the choice of d. We do not write d in index to shorten the notation.
Definition 3.1.7. Let U be the unipotent radical of P . We have P/U = M. Applying Definition 1.1.13 to U, we define the group scheme U I,d over X I .
Lemma 3.1.8. The morphism π d is smooth of relative dimension dim X I U I,d .
The following proof is suggested to the author by a referee. Proof. Proposition 2.4.3 works also for P and M. So the morphism ǫ P,d is smooth of relative dimension dim X I P I,d and the morphism ǫ M,d (hence ǫ M,d ) is smooth of relative dimension dim X I M I,d . Thus to prove that π d is smooth, it is enough to show that it induces a surjective map between relative tangent spaces.
For any closed point . By the proof of Proposition 2.8 in [Laf18], we have a Cartesian square where b P 1 is a smooth morphism (which is the forgetful morphism of the level structure on d x i ) and b P 2 has zero differential (because it is the composition of the Frobenius morphism with some other morphism). We have T ǫ P,d (x P ) = T b p 1 (x P ) (see for example [Laf97] I. 2. Proposition 1). It is well-known that So it is surjective. We deduce also that the relative tangent space of π d is Lie(U d x i ).

3.2.
Compatibility of the geometric Satake equivalence and parabolic induction. The goal of this section is to recall (3.17) and deduce (3.20), which is the key ingredient for the next section.
3.2.1. We apply Definition 1.1.11 to G m and denote by Gr Gm,I the associated reduced ind-scheme. We denote by ρ G (resp. ρ M ) the half sum of positive roots of G (resp. M).
We have the decomposition as Z M representation: We have We define (Res G I M I ) n to be the composition of morphisms Rep Q ℓ ( G I ) 3.2.4. In morphism (3.13), Gr M,I,W θ is sent to θ, 2(ρ G − ρ M ) . We deduce that  (a) For any n ∈ Z, the complex Then there is a canonical isomorphism of fiber functors In other words, the following diagram of categories canonically commutes: Applying (3.15) to W and taking into account that S M,I,Wn = Sat M,I,n (W n ) and S G,I,W = Sat G,I (W ), we deduce (3.17).
3.2.9. For any n, denote by Gr n P,I,W = Gr n P,I ∩ Gr P,I,W . We have a commutative diagram, where the first line is induced by (3.6). is a U I,d -torsor. Since the group scheme U I,d is unipotent over X I , we deduce that Corollary 3.2.8 implies where M (ω i ) i∈I are finite dimensional Q ℓ -vector spaces, all but a finite number of them are zero. We have . The first and third equality follows from 3.2.12. The second isomorphism follows from (3.19) applied to n = 0.

Now we construct a morphism of complexes in
(3.23)   is a closed embedding. In particular, it is proper. Then we descend to level N. Note that i ′ is schematic (i.e. representable). This is implied by the well-known fact that Bun P → Bun G is schematic (a P -structure of a G-bundle G over X × S is a section of the fibration G/P → X × S).
3.5.5. Now consider the following commutative diagram: To simplify the notations, we denote by F Ξ G,N,Ω ≤µ, ν ,W the restriction of  to D b c (Ω ≤µ, ν , Q ℓ ) (all functors are considered as derived functors): where (a) is the adjunction morphism, (b) is induced by i ′ ! ∼ → i ′ * which is because that i ′ is schematic and proper (Proposition 3.5.3), (c) is induced by the commutativity of diagram (3.30).
3.5.8. We define a morphism: where H ′ j, ≤µ M,N,I,W is defined in Definition 3.4.9.
3.5.9. Let µ 1 , µ 2 ∈ Λ +,Q G ad with µ 1 ≤ µ 2 . By Lemma A.0.8, the commutative diagram of stacks It is equal to the composition of (3.39) and (3.41). In Lemma 5.3.4 below, we will prove that for µ large enough, H   This is a Q ℓ -vector subspace of H j G,N,I,W .

Contractibility of deep enough horospheres
In this section, let P be a parabolic subgroup of G and M its Levi quotient. The goal is to prove Proposition 4.6.4, which will be a consequence of where Bun  4.1.5. If λ ∈ S M (µ), λ ′ ∈ Λ +,Q G ad and λ ≤ λ ′ ≤ µ, then pr ad P (λ) = pr ad P (λ ′ ) = pr ad P (µ). This implies that λ ′ ∈ S M (µ). Using [DG15] Corollary 7.4.11, we deduce that: Proof. We need to verify that the image of Bun is reduced, it is enough to consider geometric points. Let P ∈ Bun Similarly, we define Cht  (2) Surjectivity is implied by Theorem 2.25 of [Var04].
(3) Universally injectivity is implied by the fact that Bun is an isomorphism for µ satisfying the assumption of Theorem 4.2.1 (see [DG15] Proposition 9.2.2) and the well-known fact that Gr P,I,W → Gr G,I,W is bijective. (More concretely, it is enough to prove that for any algebraically closed field k containing F q , the map Cht Choosing a trivialisation of P over Γ ∞x i , we deduce from the injectivity of Gr P,I,W (k) → Gr G,I,W (k) that φ P is unique.) 4.2.2. Now we consider the morphism π ′ S M (µ) . For all d large enough, similar to diagram (3.9), we have a commutative diagram  We now introduce a notation of unipotent group scheme (which should rather be called "elementary unipotent group scheme"). is an additive group scheme (i.e. isomorphic to G n a,S for some n locally for the étale topology) over S.
(b) A morphism of algebraic stacks f : X → Y is called unipotent if for any scheme S and any morphism S → Y, the fiber product S × Y X is locally for the smooth topology on S isomorphic to a quotient stack [H 1 /H 2 ], where H 1 and H 2 are unipotent group schemes over S and H 2 acts on H 1 as a group scheme over S acting on a scheme over S. We have the following commutative diagram, where the front and back Cartesian squares are defined in the proof of Proposition 2.8 in [Laf18] (replace G by P and M, respectively). We have already used these Cartesian squares in (3.11) and (3.12).
where b 1 (resp. b 2 ) is induced by b P 1 (resp. b P 2 ). Remark 4.3.4. By the proof of Proposition 2.8 in [Laf18], b P 1 (resp. b M 1 ) is the forgetful morphism of the level structure on I (thus smooth) and b P 2 (resp. b M 2 ) is the composition of the Frobenius morphism with some other morphism. We deduce that b 1 is smooth and b 2 has zero differential. Moreover, the morphism Bun P,N → Bun M,N is smooth, thus Y N is smooth over S. Similarly Y N,d is smooth over S. We deduce that Z is smooth over S. Note that the same argument without S M (µ) would give another proof of Lemma 3.1.8. Definition 4.4.3. Let S be an affine scheme over F q . Let A be a sheaf of groups on X × S. We denote by pr S : X × S → S the second projection.
(a) We define R 0 (pr S ) * A as the sheaf of groups on S: We define R 1 (pr S ) * A as the sheaf of sets on S associated to the presheaf: Indeed R 1 (pr S ) * A is a sheaf of pointed sets with a canonical section which corresponds to the trivial A-torsor.
Proposition 4.4.4. There exists a constant C(G, X) ∈ Q ≥0 , such that if µ, α > C(G, X) for all α ∈ Γ G − Γ M , then R 0 (pr S ) * U M is a unipotent group scheme over S and the fiber of Bun Proof. We denote by Y the fiber of Bun  The difficulty is that in general, U is not commutative. To prove Lemma 4.4.5, we will need to use a filtration of U where the graded are commutative groups. 4.4.7. We have a canonical filtration of U (see the proof of Proposition 11.1.4 (c) in [DG15] for more details): where U (j) is the subgroup generated by the root subgroups corresponding to the positive roots α of G, such that (Here coeff β (α) denotes the coefficient of α in simple root β.) For each j, the subgroup U (j+1) of U (j) is normal and the quotient is equipped with an isomorphism ϑ (j) : G n j a ∼ → U (j) /U (j+1) for some n j ∈ N.
4.4.8. The filtration (4.6) induces for every j ∈ {1, · · · , m+1} an exact sequence of groups: For every j, the subgroup U (j) of P is normal. Then P acts on U (j) by the adjoint action and M acts on U (j) via M ֒→ P . We deduce that M acts on U (j) /U (j+1) and U/U (j) .
We define the fiber spaces (U (j) /U (j+1) ) M := M × U (j) /U (j+1) /M, it is an additive group scheme over X × S. We define the fiber space (U/U (j) ) M := M × U/U (j) /M, it is a group scheme over X × S. (see [Xue17] C.2 for more details).
Proposition 4.4.9. There exists a constant C(G, X) such that for µ ∈ Λ +,Q G ad , if µ, α > C(G, X) for all α ∈ Γ G − Γ M , then for any M ∈ Bun (a) If the sheaf of pointed sets R 1 (pr S ) * A is trivial, then we have an exact sequence of sheaves of groups: (b) If moreover the sheaf of pointed sets R 1 (pr S ) * C is also trivial, then the sheaf of pointed sets R 1 (pr S ) * B is trivial.
(2) Now we add level structure on N × S + Γ dx i to the argument in (1), i.e. we describe the fiber of Bun . The isomorphism (4.11) induces an isomorphism of quotient stacks is the composition of the inverse of (4.12) and α. ).

The morphism (1) is induced by the composition of functors
defined in (3.32). By Theorem 4.2.1 and Lemma 4.6.5 below applied to i ′ S M (µ) , the morphism (1) is an isomorphism.
The morphism (2) is induced by the morphism   Proof. The proof consists of 4 steps.
(i) Using proper base change and the fact that f is smooth, we reduce to the case when Y = Spec k is a point, thus X = U 1 /U 2 is a quotient of unipotent group schemes U 1 and U 2 over k.
Indeed, to prove the lemma, it is enough to prove that for any geometric point i y : y → Y , the morphism (i y ) * f ! f ! → (i y ) * is an isomorphism. Form the following Cartesian square (4.14) f −1 (y) where the first isomorphism is the proper base change ([LO09] Theorem 12.1). Thus it is enough to prove that ( f ) ! ( f ) ! (i y ) * → (i y ) * is an isomorphism.
(ii) We denote by BU 2 the classifying stack of U 2 over k. Let f 1 : U 1 /U 2 → BU 2 and f 2 : BU 2 → Spec k be the canonical morphisms. Then f = f 2 • f 1 . We have a commutative diagram of functors: Thus it is enough to prove that the counit maps (f 1 ) ! (f 1 ) ! → Id and (f 2 ) ! (f 2 ) ! → Id are isomorphisms.
(iii) Note that f 1 is a U 1 -torsor over BU 2 . By Definition 4.2.3, we reduce to the case of A 1 -torsor. Using (i) again, we reduce to the case when f 1 is the map (iv) Let g 2 : Spec k → BU 2 be the canonical morphism. Then f 2 • g 2 ≃ Id. We have a commutative diagram of functors: We deduce that to prove that (f 2 ) ! (f 2 ) ! → Id is an isomorphism, it is enough to prove that (g 2 ) ! (g 2 ) ! → Id is an isomorphism. Note that g 2 is a U 2 -torsor over BU 2 . Just like in (iii), we prove that (g 2 ) ! (g 2 ) ! → Id is an isomorphism.
Remark 4.6.7. In fact, to prove that the morphism (2) in Proposition 4.6.4 is an isomorphism, it is enough to write π ′ S M (µ) d as the tower and prove that for each j, the morphism Co : (π d,j ) ! (π d,j ) ! → Id is an isomorphism. For this, we only need the statement of Theorem 4.2.4 for each π d,j (and replace unipotent group scheme by additive group scheme). The proof of such a statement still uses the three steps, but in step 2 Remark 4.4.6 we only need to consider the case of commutative groups.

Finiteness of the cuspidal cohomology
The goal of this section is to prove: Theorem 5.0.1. The Q ℓ -vector space H j, cusp G,N,I,W (defined in Definition 3.5.13) has finite dimension.
Theorem 5.0.1 will be a direct consequence of the following proposition. 5.1.1. We denote by R G ad the coroot lattice of G ad . We have R G ad ⊂ Λ G ad . Let R + G ad := Λ + G ad ∩ R G ad . For any r ∈ N, we have 1 We fix r such that 5.1.2. For any α ∈ Γ G , we denote byα ∈ Γ G the corresponding coroot, and vice versa. Let P α be the maximal parabolic subgroup with Levi quotient M α such that Γ G − Γ Mα = {α}.
In this section, for µ ∈ Λ +,Q G ad , we will write µ − 1 rα instead of µ − 1 r Υ G (α), where Υ G : Λ Q G → Λ Q G ad is defined in 1.15. 5.2.1. The only Levi subgroup of semisimple rank 0 is the maximal torus T . Then T ad is trivial and Λ + T ad = Λ T ad has only one element: 0. The algebraic stack Cht T /Ξ T is of finite type. There is only one term in the inductive limit H j T , which is of finite dimension. There is no constant term morphism for T . So we have H j, cusp where C(G, X, N, W ) is the constant defined in Definition 4.6.1. Then for this constant C 0 G Proposition 5.1.5 (a) is true for G. We need some preparations before the proof of Lemma 5.3.1.  r R + G ad |λ ≤ µ − 1 rα } and S 2 = {λ ∈ 1 r R + G ad |λ ≤ µ}. Then

Let
where S M (µ) is defined in Definition 4.1.1.
Proof. For any λ ∈ S 2 , we have µ − λ = γ∈ Γ G cγ rγ for some c γ ∈ Z ≥0 . Thus If moreover λ / ∈ S 1 , then in (5.2), there should be at least one coefficient strictly negative. So we must have c α − 1 < 0. Since c α ∈ Z ≥0 , we must have c α = 0. We deduce that By Definition 4.1.1, we have λ ∈ S M (µ). The point of the proof of this lemma is to replace the quotient by Ξ M in (5.3) by the quotient by Ξ G in (5.5). Proof. By Proposition 5.1.5 (c) for M, for any λ ∈ 1 r R + M ad satisfying λ, γ > C M for all γ ∈ Γ M , the morphism is injective, where everything is defined as in Section 2.5 by replacing G by M.
Lemma 5.3.6. If the property (a) of Proposition 5.1.5 is true for G, then the property (b) of Proposition 5.1.5 is true for G.
where ψ v (resp. ψ v ) is the level structure outside v (resp. on v). The G-bundle Similarly, Cht G,∞,I,W is equipped with an action of G(A).
6.1.4. Let P be a parabolic subgroup of G and M its Levi quotient. We define We have a morphism (6.2) Cht P,∞,I,W where G = P P × G and ψ G = ψ P P × G. It induces a morphism When we consider the action of the Hecke algebras in 6.2.4 in the next section, we will need some functoriality on K N . For this reason, we rewrite (6.5) in the following way. Note that K N is normal in G(O). The stabilizer of any P (O)-orbit in G(O)/K N is K P,N . We deduce from (6.5) that It is a gerbe for the finite q-group R 2 /R 1 . The counit morphism (which is equal to the trace map because q R 1 ,R 2 is smooth of dimension 0) Co(q R 1 ,R 2 ) : (q R 1 ,R 2 ) ! (q R 1 ,R 2 ) ! → Id is an isomorphism. Indeed, just as in the proof (i) of Lemma 4.6.6, by proper base change and the fact that q R 1 ,R 2 is smooth, we reduce to the case of Lemma 6.1.7 below with Γ = R 2 /R 1 . The morphism Co(q R 1 ,R 2 ) induces an isomorphism of cohomology groups We deduce an isomorphism of cohomology groups by the adjunction morphism.
In general, S = ⊔ α∈A α is a finite union of orbits, we define Lemma 6.1.7. Let Γ be a finite group over an algebraically closed field k over F q . We denote by BΓ the classifying stack of Γ over k. Let q : BΓ → Spec k be the structure morphism. Then the counit morphism (equal to the trace map) Co(q) : q ! q ! → Id of functors on D c (Spec k, Q ℓ ) is an isomorphism.
Proof. Co(q) is the dual of the adjunction morphism adj(q) : Id → q * q * . For any F ∈ D c (Spec k, Q ℓ ), q * F is a complex F of Γ-modules with trivial action of Γ. Since H j (BΓ, q * F) = H j (Γ, F ) (group cohomology), we have H 0 (BΓ, q * F) = F Γ = F and H j (BΓ, q * F) = 0 for j > 0. So adj(q) is an isomorphism. By duality, we deduce the lemma. Remark 6.1.11. In 6.1.10, we can also firstly define morphisms of cohomology groups for each orbit α: the adjunction morphism Id → (q M α ) * (q M α ) * induces a morphism where the orbit α (resp. f (α)) is considered as subset of S 1 (resp. S 2 ). The counit morphism (q Then taking sum over all the orbits, we obtain (6.22) and (6.23).
Similarly, in 6.1.12 below, we can firstly prove the statement for cohomology groups orbit by orbit, then take the sum over all the orbits. But the notations would be more complicated.
6.1.12. Any S 1 , S 2 ∈ D and f : S 1 → S 2 morphism in D induce a morphism q P f : Cht ′ P,S 1 ,I,W → Cht ′ P,S 2 ,I,W The adjunction morphism Id → (q P f ) * (q P f ) * induces a morphism adj(q P f ) : H ′ P,S 2 ,I,W → H ′ P,S 1 ,I,W The counit morphism (q P f ) ! (q P f ) ! → Id induces a morphism Co(q P f ) : H ′ P,S 1 ,I,W → H ′ because by [SGA4] XVIII Théorème 2.9, the trace morphism is compatible with composition.
Remark 6.1.13. When S 1 = G(A)/K N 1 and S 2 = G(A)/K N 2 with N 1 ⊃ N 2 , we have the projection f : G(A)/K N 1 ։ G(A)/K N 2 . We have Cht ′ M,N 1 ,I,W = Cht ′ M,S 1 ,R 1 ,I,W with R α 1 = K U,N 1 for each P (A)-orbit α in S 1 and Cht ′ M,N 2 ,I,W = Cht ′ M,S 2 ,R 2 ,I,W with R β 2 = K U,N 2 for each P (A)-orbit β in S 2 . Note that R α 1 = R f (α) 2 6.2. Compatibility of constant term morphisms and actions of Hecke algebras. We first recall the action of the local Hecke algebras. The goal of this subsection is Lemma 6.2.6 and Lemma 6.2.12.
6.2.1. Let v be a place in X. Let g ∈ G(F v ). By 6.1.3, the right action of g induces an isomorphism (6.33) Cht G,∞,I,W not be normal in G(O). Note that (6.38) depends only on the class K v gK v of g in G(F v ).
Lemma 6.2.5. Let K and g as in 6.2.1. The following diagram of cohomology groups commutes: (2) Applying 6.1.12 to S 1 = G(A)/ K, S 2 = G(A)/g −1 Kg and f the isomorphism (6.36), we deduce from (6.29) a commutative diagram Lemma 6.2.6. For any place v of X, any K and h ∈ C c (K v \G(F v )/K v , Q ℓ ) as in 6.2.2, the following diagram of cohomology groups commutes: where the horizontal morphisms are defined in 6.2.2 and 6.2.4, the vertical morphism are the constant term morphisms defined in (6.19).
6.2.7. From now on let N ⊂ X be a closed subscheme and v be a place in X N.
. Denote by dg (resp. dm, du, dk) the Haar measure on G(F v ) (resp M(F v ), U(F v ), G(O v )) such that the volume of G(O v ) (resp. M(O v ), U(O v ), G(O v )) is 1. We have dg = dmdudk. Taking the integral over G(F v ) of the product by h(g) of (6.44), we deduce that the action of T (h) on (Ind