Two-dimensional categorified Hall algebras

In the present paper, we introduce two-dimensional categorified Hall algebras of smooth curves and smooth surfaces. A categorified Hall algebra is an associative monoidal structure on the stable $\infty$-category $\mathsf{Coh}^{\mathsf{b}}(\mathbb{R}\mathsf{M})$ of complexes of sheaves with bounded coherent cohomology on a derived moduli stack $\mathbb{R}\mathsf{M}$. In the surface case, $\mathbb{R}\mathsf{M}$ is a suitable derived enhancement of the moduli stack $\mathsf{M}$ of coherent sheaves on the surface. This construction categorifies the K-theoretical and cohomological Hall algebras of coherent sheaves on a surface of Zhao and Kapranov-Vasserot. In the curve case, we define three categorified Hall algebras associated with suitable derived enhancements of the moduli stack of Higgs sheaves on a curve $X$, the moduli stack of vector bundles with flat connections on $X$, and the moduli stack of finite-dimensional local systems on $X$, respectively. In the Higgs sheaves case we obtain a categorification of the K-theoretical and cohomological Hall algebras of Higgs sheaves on a curve of Minets and Sala-Schiffmann, while in the other two cases our construction yields, by passing to $\mathsf K_0$, new K-theoretical Hall algebras, and by passing to $\mathsf H_\ast^{\mathsf{BM}}$, new cohomological Hall algebras. Finally, we show that the Riemann-Hilbert and the non-abelian Hodge correspondences can be lifted to the level of our categorified Hall algebras of a curve.


INTRODUCTION
In this work we introduce two-dimensional categorified Hall algebras of smooth curves and smooth surfaces. A categorified Hall algebra is an associative monoidal structure "à la Hall" on the dg-category Coh b (RM) 1 on a derived moduli stack RM. In the surface case, RM is a suitable derived enhancement of the moduli stack M of coherent sheaves on the surface. This construction categorifies the K-theoretical Hall algebra of zero-dimensional coherent sheaves on a surface S [Zha19] and the K-theoretical and cohomological Hall algebras of coherent sheaves on S [KV19]. In the curve case, we define three categorified Hall algebras associated with suitable derived enhancements of the moduli stack of Higgs sheaves on a curve X, the moduli stack of flat vector bundles on X, and the moduli stack of local systems on X, respectively. In the Higgs sheaves case, we obtain a categorification of the K-theoretical and cohomological Hall algebras of Higgs sheaves on a curve [Min18,SS20], while in the other two cases we obtain, as a by-product, the construction of the corresponding K-theoretical and cohomological Hall algebras. While the underlying K-theoretical and cohomological Hall algebras can also be obtained via perfect obstruction theories and are insensitive to the derived enhancements we use here, our categorified versions depend in a substantial way on the existence of a sufficiently natural derived enhancement. To the best of our knowledge, it is not possible to obtain such categorifications using perfect obstruction theories.
Before providing precise statements of our results, we shall briefly recall the literature about K-theoretical and cohomological Hall algebras.
1.1. Review of the Hall convolution product. Let A be an abelian category and denote by M A the corresponding moduli stack of objects: M A is a geometric derived stack over C parameterizing families of objects in A. In particular, its groupoid of C-points M A (C) coincides with the groupoid of objects of A. Similarly, we can consider the moduli stack M ext A parameterizing families of short exact sequences in A and form the following diagram: When the maps p and q are sufficiently well behaved, passing to (an oriented) Borel-Moore homology 2 yields a product map , which can then been proven to be associative. In what follows, we refer to the above multiplicative structure as a "cohomological Hall algebra" (CoHA for short) attached to A.
The existence of the above product does not come for free. Typically, one needs a certain level of regularity for p (e.g. smooth or lci). In turn, this imposes severe restrictions on the abelian category A. For instance, if A has cohomological dimension one, then p is smooth, but this is typically false when A has cohomological dimension two. Quite recently, there has been an increasing amount of research around two-dimensional CoHAs (see e.g. [SV13a, SV13b, SV20, SV17, YZ18a, YZ18b, KV19]). We will give a thorough review of the historical development in §1.4, but for the moment let us say that the first goal of this paper is to provide an approach to the construction of the convolution productà la Hall that can work uniformly in the two-dimensional setting. The key of our method is to consider a suitable natural derived enhancements RM A and RM ext A of the moduli stacks M A and M ext A , respectively. The use of derived geometry is both natural and expected, and made an early explicit appearance in [Neg17]. The effectiveness of this method can be easily understood via the following two properties: 1 We mean the bounded derived category of complexes of sheaves with coherent cohomology. A more classical notation would be D b coh (RM). In the main body of the paper we will construct directly stable ∞-categories, without passing through explicit dg-enhancements. Moreover, associative monoidal structure is to be technically understood as E 1 -monoidal structure.
2 Examples of oriented Borel-Moore homology theories are the G 0 -theory (i.e., the Grothendieck group of coherent sheaves), Chow groups, elliptic cohomology.
(2) There is a natural diagram of stable E 1 -monoidal ∞-categories and monoidal functors Finally, if in addition X is toric, similar results holds in the equivariant setting. Now, let X be a smooth projective complex curve. Our techniques provide a categorification of the Dolbeault K-theoretical Hall algebra of X [Min18,SS20]: Proposition 1.9. Let X be a smooth projective complex curve. There exists an algebra isomorphism between π 0 K(Coh b pro, C * (Coh(X Dol )) and the K-theoretical Hall algebra of Higgs sheaves on X introduced in [SS20,Min18]. Thus, the CoHA tensor structure on the stable ∞-category Coh b pro, C * (Coh(X Dol )) is a categorification of the latter.
One of the consequences of our construction is the categorification 5 of a positive nilpotent part of the quantum toroidal algebra U + q,t (gl 1 ). This is also known as the elliptic Hall algebra of Burban and Schiffmann [BSc12]. Proposition 1.10. There exists a Z[q, t]-algebra isomorphism π 0 K(Coh b pro, C * ×C * (Coh 0 prop (C 2 ))) ≃ U + q,t (gl 1 ) . Here, the C * × C * -action on Coh 0 prop (C 2 ) is induced by the torus action on C 2 .
In the Betti case, Davison [Dav17] defined the Betti cohomological Hall algebra of X by using the Kontsevich-Soibelman CoHA formalism and a suitable choice of a quiver with potential. In [Pad19], the author generalizes such a formalism in the G-theory case. Thus, by combining the two one obtains a Betti K-theoretical Hall algebra. We expect that this is equivalent to our realization of the Betti K-theoretical Hall algebra. Finally, our approach defines the de Rham K-theoretical Hall algebra of X.
By using the formalism of Borel-Moore homology of higher stacks developed in [KV19] and their construction of the Hall product via perfect obstruction theories, we obtain equivalent realizations of the COHA of a surface [KV19] and of the Dolbeault CoHA of a curve [SS20,Min18]. Moreover, we define the de Rham cohomological Hall algebra of a curve.
1.3. DG-Coherent categorification. At this stage, we would like to clarify what kind of "categorification" we provide and compare our approach to the other approaches to categorification known in the literature.
Let us start by recalling two well-known categorifications of the quantum group U q (n Q ), where n Q is the positive nilpotent part of a simply laced Kac-Moody algebra g Q and Q is the corresponding quiver. The first one is provided by Lusztig in [Lus90,Lus91], and we shall call it the perverse categorification of U q (n Q ). Denote by Rep(Q, d) the moduli stack of representations of the quiver Q of dimension d. Then, -in modern terms -Lusztig introduced a graded additive subcategory C(Rep(Q, d)) of the bounded derived category D b (Rep(Q, d)) of constructible complexes whose split Grothendieck group is isomorphic to the d-weight subspace of U q (n Q ). By using a diagrammatic approach, KL09,KL10a,KL10b] and Rouquier [Rou08] provided another categorification U q (n Q ), which is a 2-category: we call this the diagrammatic categorification of U q (n Q ). In addition, they showed that U q (n Q ) is the Grothendieck group of the monoidal category of all projective graded modules over the quiver-Hecke algebra R of Q. A relation between these two categorifications of the same quantum group was established by Rouquier [Rou12] and Varagnolo-Vasserot [VV11]: they proved that there exists an equivalence of additive graded monoidal categories between ⊕ d C(Rep(Q, d)) and the category of all finitely generated graded projective R-modules.
Let Q be the affine Dynkin quiver A (1) 1 . In [SVV19], the authors constructed another categorification of the quantum group U q (n Q ), which they call the coherent categorification of it. They 5 A categorification of U + q,t (gl 1 ) has been also obtained by Neguţ. In [Neg18b], by means of (smooth) Hecke correspondences, he defined functors on the bounded derived category of the smooth moduli space of Gieseker-stable sheaves on a smooth projective surface, which after passing to G-theory, give rise to an action of the elliptic Hall algebra on the K-theory of such smooth moduli spaces.
showed that there exists a monoidal structure on the homotopy category of the C * -equivariant dg-category Coh b C * (Rep(Π A 1 )), where Π A 1 is the so-called preprojective algebra of the finite Dynkin quiver A 1 and Rep(Π A 1 ) is a suitable derived enhancement of the moduli stack Rep(Π A 1 ) of finite-dimensional representations of Π A 1 . Here, there is a canonical C * -action on Rep(Π A 1 ) which lifts to the derived enhancement. By passing to the G-theory we obtain another realization of the algebra U q (n Q ). In loc.cit. the authors started to investigate the relation between the perverse categorification and the coherent categorification of U q (n Q ) when Q = A 1 .
Since in our paper we do not work with monoidal structures on triangulated categories, but rather with E 1 -monoidal structures on dg-categories, our construction provides the dg-coherent categorification of the K-theoretical Hall algebras of surfaces [Zha19,KV19], of the K-theoretical Hall algebras of Higgs sheaves on curves [Min18,SS20], and of the de Rham and Betti K-theoretical Hall algebras of curves. At this point, one can wonder if there are perverse categorifications of these K-theoretical Hall algebras.
Since in general there is no clear guess on what moduli stack to consider on the perverse side, it is not clear how to define the Lusztig's category. 6 The only known case so far is the perverse categorification of U + q,t (gl 1 ), i.e., of the K-theoretical Hall algebra of zero-dimensional sheaves on C 2 , due to Schiffmann. The latter is isomorphic to the K-theoretical Hall algebra of the preprojective algebra Π one-loop of the one-loop quiver -see §1.4.
In [Sch06], Schiffmann constructed perverse categorifications of certain quantum loop and toroidal algebras, in particular of U + q,t (gl 1 ). In this case, he defined the Lusztig's category C(Coh(X)) for the bounded derived category D b (Coh(X)) of constructible complexes on the moduli stack Coh(X) of coherent sheaves on an elliptic curve and he proved that the split Grothendieck group of C(Coh(X)) is isomorphic to U + q,t (gl 1 ). Thus, for this quantum group we have both a perverse and a dg-coherent categorification. Although, it would be natural to ask what is the relation between them, it seems that the question is not well-posed since the former categorification comes from an additive category, while the latter from a dg-category.
A viewpoint which can help us to correctly formulate a question about these two different categorifications is somehow provided by [SV12]. In that paper, the authors pointed out how the two different realizations of U + q,t (gl 1 ) should be reinterpreted as a G-theory version of the geometric Langlands correspondence (see e.g. [AG15] and references therein): 7 QCoh(Bun(X, n) dR ) ≃ IndCoh Nilp Glob (Bun(X dR , n)) , where the Lusztig's category arises from the left-hand side, while a K-theoretical Hall algebra arises from the right-hand side. Here, X is a smooth projective complex curve and n a nonnegative integer. 8 By interpreting [SV12] as a decategorified version of what we are looking for, we may speculate the following: Conjecture 1.11. Let X be a smooth projective complex curve. Then there exist an E 1 -monoidal structure on the dg-category Coh b (Bun(X) dR ) and an E 1 -monoidal equivalence between Coh b (Bun(X) dR ) and the categorified Hall algebra 9 Coh b (Coh(X dR )). 6 Note that in the case treated in [SVV19], the moduli stack considered on the perverse side is Rep(A (1) 1 ), while on the coherent side is Rep(Π A 1 ). One evident relation between these two stacks is that the quiver appearing on the former stack is the affinization of the quiver on the latter stack.
7 One usually expects on the left-hand-side D-mod(Bun(X, n)), but this is indeed by definition QCoh(Bun(X, n) dR ). 8 One may notice that the K-theoretical Hall algebra considered in [SV12] is the one associated with Π one-loop while our construction provides a de Rham K-theoretical Hall algebra of X: the relation between them should arise from the observation that the moduli stack of finite-dimensional representations of Π one-loop is some sort of "formal neighborhood" of the trivial D-module in Bun(X dR ). 9 Or a version of it in which the complexes have fixed singular supports -see [AG15] for the definition of singular support in this context. It follows that the right "dg-enhancement" of Lusztig's construction should be Coh b (Bun(X) dR ). In addition, one should expect that, when X is an elliptic curve, by passing to the G-theory one recovers U + q,t (gl 1 ). Finally, one may wonder if there is a diagrammatic description of our categorified Hall algebras in the spirit of Khovanov-Lauda and Rouquier. Let Y be either a smooth proper complex scheme S of dimension ≤ 2 or one of the Simpson's shapes of a smooth projective complex curve X. Then Coh(Y) admits a stratification such that the Hall product is graded with respect to it, where Λ is the numerical Grothendieck group of S in the first case and of X in the second case. Now, we define 10 the following (∞, 2)-category U : it is the subcategory inside the (∞, 2)category of dg-categories such that • its objects are the dg-categories Coh b (Coh(Y, v)), • the 1-morphisms between Coh b (Coh(Y, v)) and Coh b (Coh(Y, v ′ )) are the functors of the form Here, ⋆ denotes the Hall tensor product.
The study of 2-morphisms in U should lead to an analogue of KLR algebras in this setting, which will be investigated in a future work.

Historical background on CoHAs.
For completeness, we include a review of the literature around two-dimensional CoHAs. The first instances 11 of two-dimensional CoHAs can be traced back to the works of Schiffmann and Vasserot [SV13a,SV12]. Seeking for a "geometric Langlands dual algebra" of the (classical) Hall algebra of a curve 12 , the authors were lead to introduce a convolution algebra structure on the (equivariant) G 0 -theory of the cotangent stack T * Rep(Q g ). Here Rep(Q g ) is the stack of finite-dimensional representations of the quiver Q g with one vertex and g loops. When g = 1, the corresponding associative algebra is isomorphic to a positive part of the elliptic Hall algebra. A study of the representation theory of the elliptic Hall algebra by using its CoHA description was initiated in [SV13a] and pursued by Neguţ [Neg18a] in connection with gauge theory and deformed vertex algebras.
The extension of this construction to any quiver and, at the same time, to Borel-Moore homology theory and more generally to any oriented Borel-Moore homology theory was shown e.g. in [YZ18a]. Note that T * Rep(Q) is equivalent to the stack of finite-dimensional representations of the preprojective algebra Π Q of Q. For this reason, sometimes this CoHA is called the CoHA of the preprojective algebra of Q.
In the Borel-Moore homology case, Schiffmann and Vasserot gave a characterization of the generators of the CoHA of the preprojective algebra of Q in [SV20], while a relation with the (Maulik-Okounkov) Yangian was established in [SV17, DM16,YZ18b]. Again, when Q = Q 1 , a connection between the corresponding two-dimensional CoHA and vertex algebras was provided in [SV13b,Neg16] (see also [RSYZ18]). 10 We thank Andrea Appel for helping us spelling out the description of U . 11 To the best of the authors' knowledge, the first circle of ideas around two-dimensional CoHAs can be found in an unpublished manuscript by Grojnowski [Groj94].
12 By the (classical) Hall algebra of a curve we mean the Hall algebra associated with the abelian category of coherent sheaves on a smooth projective curve defined over a finite field. As explained in [Sch12], conjecturally this algebra can be realized by using the Lusztig's category (such a conjecture is true in the genus zero and one case, for example).
In [KS11], Kontsevich and Soibelman introduced another CoHA, in order to provide a mathematical definition of Harvey and Moore's algebra of BPS states [HM98]. It goes under the name of three-dimensional CoHA since it is associated with Calabi-Yau categories of global dimension three (such as the category of representations of the Jacobi algebra of a quiver with potential, the category of coherent sheaves on a CY 3-fold, etc.). As shown by Davison in [RS17, Appendix] (see also [YZ16]), using a dimensional reduction argument, the CoHA of the preprojective algebra of a quiver described above can be realized as a Kontsevich-Soibelman one.
For certain choices of the quiver Q, the cotangent stack T * Rep(Q) is a stack parameterizing coherent sheaves on a surface. Thus the corresponding algebra can be seen as an example of a CoHA associated to a surface. This is the case when the quiver is the one-loop quiver Q 1 : indeed, T * Rep(Q 1 ) coincides with the stack Coh 0 (C 2 ) parameterizing zero-dimensional sheaves on the complex plane C 2 . In particular, the elliptic Hall algebra can be seen as an algebra attached to zero-dimensional sheaves on C 2 .
Another example of two-dimensional CoHA is the Dolbeault CoHA of a curve. Let X be a smooth projective curve and let Higgs(X) be the stack 13 of Higgs sheaves on X. Then the Borel-Moore homology of the stack Higgs(X) of Higgs sheaves on X is endowed with the structure of a convolution algebra. Such an algebra has been introduced by the second-named author and Schiffmann in [SS20]. In [Min18], independently Minets has introduced the Dolbeault CoHA in the rank zero case. Thanks to the Beauville-Narasimhan-Ramanan correspondence, the Dolbeault CoHA can be interpreted as the CoHA of torsion sheaves on T * X such that their support is proper over X. In particular, Minets' algebra is an algebra attached to zero-dimensional sheaves on T * X. Such an algebra coincides with Neguţ's shuffle algebra [Neg17] of a surface S when S = T * X.
Neguţ's algebra of a smooth surface S is defined by means of Hecke correspondences depending on zero-dimensional sheaves on S, and its construction comes from a generalization of the realization of the elliptic Hall algebra in [SV13a] via Hecke correspondences. Zhao [Zha19] constructed the cohomological Hall algebra of the moduli stack of zero-dimensional sheaves on a smooth surface S and fully established the relation between this CoHA and Neguţ's algebra of S. A stronger, independently obtained result is due to Kapranov and Vasserot [KV19], who defined the CoHA associated to a category of coherent sheaves on a smooth surface S with proper support of a fixed dimension.
1.5. Outline. In §2 we introduce our derived enhancement of the classical stack of coherent sheaves on a smooth complex scheme. We also define derived moduli stacks of coherent sheaves on the Betti, de Rham, and Dolbeault shapes of a smooth scheme. In §3 we introduce the derived enhancement of the classical stack of extensions of coherent sheaves on both a smooth complex scheme and on a Simpson's shape of a smooth complex scheme. In addition, we define the convolution diagram (1.2) and provide the tor-amplitude estimates for the map p. §4 is devoted to the construction of the categorified Hall algebra associated with the moduli stack of coherent sheaves on either a smooth scheme or a Simpson's shape of a smooth scheme: in §4.1 we endow such a stack of the structure of a 2-Segal spaceà la Dyckerhoff-Kapranov, while in §4.2 by applying the functor Coh b pro , we obtain one of our main results, i.e., an E 1 -monoidal structure on Coh b pro (Coh(Y)) when Y is either a smooth curve or surface, or a Simpson's shape of a smooth curve; finally, §4.3 is devoted to the equivariant case of the construction of the categorified Hall algebra. In §5, we show how our approach provides equivalent realizations of the known Ktheoretical Hall algebras of surfaces and of Higgs sheaves on a curve. In §6 and §7 we discuss Cat-HA versions of the non-abelian Hodge correspondence and of the Riemann-Hilbert correspondence, respectively. In particular, in §7 we develop the construction of the categorified Hall algebra in the analytic setting and we compare the two resulting categorified Hall algebras. Finally, Appendix A is devoted to the study of the G-theory of non-quasi-compact stacks and the construction of Coh b pro .
13 Note that the truncation of the derived stack Coh(X Dol ) is isomorphic to Higgs(X).
Acknowledgements. First, we would like to thank Mattia Talpo for suggesting us to discuss about the use of derived algebraic geometry in the theory of cohomological Hall algebras. This was the starting point of our collaboration. Part of this work was developed while the second-named author was visiting the Université de Strasbourg and was completed while the first-named author was visiting Kavli IPMU. We are grateful to both institutions for their hospitality and wonderful working conditions. We would like to thank Andrea Appel, Kevin Costello, Ben Davison, Adeel Khan, Olivier Schiffmann, Philippe Eyssidieux, Tony Pantev and Bertrand Toën for enlightening conversations. We especially thank Andrea Gagna and Ivan Di Liberti for discussions about the correct 2-categorical notion of the Ind-construction. Finally, we thank the anonymous referee for useful suggestions and comments.
The results of the present paper have been presented by the second-named author at the Workshop "Cohomological Hall algebras in Mathematics and Physics" (Perimeter Institute for Theoretical Physics, Canada; February 2019). The second-named author is grateful to the organizers of this event for the invitation to speak.
1.6. Notations and convention. In this paper we freely use the language of ∞-categories. Although the discussion is often independent of the chosen model for ∞-categories, whenever needed we identify them with quasi-categories and refer to [Lur09] for the necessary foundational material.
The notations S and Cat ∞ are reserved for the ∞-categories of spaces and of ∞-categories, respectively. If C ∈ Cat ∞ we denote by C ≃ the maximal ∞-groupoid contained in C. We let Cat st ∞ denote the ∞-category of stable ∞-categories with exact functors between them. We also let Pr L denote the ∞-category of presentable ∞-categories with left adjoints between them. We let Pr L,ω the ∞-category of compactly generated presentable ∞-categories with morphisms given by left adjoints that commute with compact objects. Similarly, we let Pr L st (resp. Pr L,ω st ) denote the ∞categories of stably presentable ∞-categories with left adjoints between them (resp. left adjoints that commute with compact objects). Finally, we set . Given an ∞-category C we denote by PSh(C) the ∞-category of S-valued presheaves. We follow the conventions introduced in [PY16, §2.4] for ∞-categories of sheaves on an ∞-site.
Since we only work over the field of complex numbers C, we reserve the notation CAlg for the ∞-category of simplicial commutative rings over the field of complex numbers C. We often refer to objects in CAlg simply as derived commutative rings. We denote its opposite by dAff, and we refer to it as the ∞-category of affine derived schemes.
In [Lur18, Definition 1.2.3.1] it is shown that theétale topology defines a Grothendieck topology on dAff. We denote by dSt := Sh(dAff, τé t ) ∧ the hypercompletion of the ∞-topos of sheaves on this site. We refer to this ∞-category as the ∞-category of derived stacks. For the notion of derived geometric stacks, we refer to [PY16, Definition 2.8].
Let A ∈ CAlg be a derived commutative ring. We let A-Mod denote the stable ∞-category of A-modules, equipped with its canonical symmetric monoidal structure provided by [Lur17, Theorem 3.3.3.9]. Furthermore, we equip it with the canonical t-structure whose connective part is its smallest full subcategory closed under colimits and extensions and containing A. Such a t-structure exists in virtue of [Lur17,Proposition 1.4.4.11]. Notice that there is a canonical equivalence of abelian categories A-Mod ♥ ≃ π 0 (A)-Mod ♥ .
We say that an A-module M ∈ A-Mod is perfect if it is a compact object in A-Mod. We denote by Perf(A) the full subcategory of A-Mod spanned by perfect complexes 14 . On the other hand, we say that an A-module M ∈ A-Mod is almost perfect 15 if π i (M) = 0 for i ≪ 0 and for every n ∈ Z the object τ ≤n (M) is compact in A-Mod ≤n . We denote by APerf(A) the full subcategory of A-Mod spanned by sheaves of almost perfect modules.
Given a morphism f : A → B in CAlg we obtain an ∞-functor f * : A-Mod −→ B-Mod, which preserves (almost) perfect modules. We can assemble these data into an ∞-functor Since the functor f * preserves (almost) perfect modules, we obtain well defined subfunctors Given a derived stack X ∈ dSt, we denote by QCoh(X), APerf(X) and Perf(X) the stable ∞categories of quasi coherent, almost perfect, and perfect complexes respectively. One has APerf(Spec(A)) , and The ∞-category QCoh(X) is presentable. In particular, using [Lur17, Proposition 1.4.4.11] we can endow QCoh(X) with a canonical t-structure.
Let X ∈ dSt. We denote by Coh(X) the full subcategory of O X -Mod spanned by F ∈ O X -Mod for which there exists an atlas { f i : U i → X} i∈I such that for every i ∈ I, n ∈ Z, the O U i -modules π n ( f * i F ) are coherent sheaves. We denote by Coh ♥ (X) (resp. Coh b (X), Coh + (X), and Coh − (X)) the full subcategory of Coh(X) spanned by objects cohomologically concentrated in degree 0 (resp. locally cohomologically bounded, bounded below, bounded above).

DERIVED MODULI STACKS OF COHERENT SHEAVES
Our goal in this section is to define derived enhancements of the classical stacks of coherent sheaves on a proper complex algebraic variety X, of Higgs sheaves on X, of vector bundles with flat connections on X, and of finite-dimensional representations of the fundamental group π 1 (X) of X.
2.1. Relative flatness. We start by defining the objects that this derived enhancement will classify.
Definition 2.1. Let f : X → S be a morphism of derived stacks. We say that a quasi-coherent sheaf F ∈ QCoh(X) has tor-amplitude within [a, b] relative to S (resp. tor-amplitude ≤ n relative to S) if for every G ∈ QCoh ♥ (S) one has We let QCoh ≤n S (X) (resp. APerf ≤n S (X)) denote the full subcategory of QCoh(X) spanned by those quasi-coherent sheaves (resp. sheaves of almost perfect modules) F on X having tor-amplitude ≤ n relative to S. We write S (X) , and we refer to Coh S (X) as the ∞-category of flat families of coherent sheaves on X relative to S. ⊘ 15 Suppose that A is almost of finite presentation over C. In other words, suppose that π 0 (A) is of finite presentation in the sense of classical commutative algebra and that each π i (A) is coherent over π 0 (A). Then [Lur17,Proposition 7.2.4.17] shows that an A-module M is almost perfect if and only if π i (M) = 0 for i ≪ 0 and each π i (M) is coherent over π 0 (A).
Remark 2.2. The ∞-category Coh S (X × S) is not stable. This is because in general the cofiber of a map between sheaves of almost perfect modules in tor-amplitude ≤ 0 is only in tor-amplitude [1, 0]. When S is underived, the cofiber sequences F ′ → F → F ′′ in APerf(X × S) whose three terms are all coherent correspond to short exact sequences of coherent sheaves. In particular, the map F ′ → F is a monomorphism and the map F → F ′′ is an epimorphism. △ Proof. Let F ∈ QCoh(X) be a quasi-coherent sheaf of tor-amplitude within [a, b] relative to S and let G ∈ QCoh ♥ (T). Since g is representable by affine schemes, so does g ′ . Therefore, [PS20, Proposition 2.3.4] implies that g ′ * is t-exact and conservative. Therefore, Propositions 2.3.4-(1) and 2.3.6-(2)], we see that and using [PS20, Proposition 2.3.4-(2)] we can rewrite the last term as Since g * is t-exact, we have g * (G) ∈ QCoh ♥ (S). The conclusion now follows from the fact that F has tor-amplitude within [a, b].
Construction 2.5. Let X ∈ dSt and consider the derived stack APerf(X) : dAff op −→ S sending an affine derived scheme S ∈ dAff to the maximal ∞-groupoid APerf(X × S) ≃ contained in the stable ∞-category APerf(X × S) of almost perfect modules over X × S. Lemma 2.4 implies that the assignment sending S ∈ dAff to the full subspace Coh S (X × S) ≃ of APerf(X × S) ≃ spanned by flat families of coherent sheaves on X relative to S defines a substack Coh(X) : dAff op −→ S of APerf(X). We refer to Coh(X) as the derived stack of coherent sheaves on X.
In this paper we are mostly interested in this construction when X is a scheme or one of its Simpson's shapes X B , X dR or X Dol . We provide the following useful criterion to recognize coherent sheaves: Lemma 2.6. Let f : X → S be a morphism in dSt. Assume that there exists a flat effective epimorphism u : U → X. Then F ∈ QCoh(X) has tor-amplitude within [a, b] relative to S if and only if u * (F ) has tor-amplitude within [a, b] relative to S.
Proof. Let G ∈ QCoh ♥ (S). Then since u is a flat effective epimorphism, we see that the pullback functor is t-exact and conservative. Therefore The conclusion follows.
As a consequence, we see that, for morphisms of geometric derived stacks, the notion of toramplitude within [a, b] relative to the base introduced in Definition 2.1 coincides with the most natural one: Lemma 2.7. Let X be a geometric derived stack, let S = Spec(A) ∈ dAff and let f : X → S be a morphism in dSt. Then F ∈ QCoh(X) has tor-amplitude within [a, b] relative to S if and only if there exists a smooth affine covering {u i : Proof. Applying Lemma 2.6, we can restrict ourselves to the case where X = Spec(B) is affine. In this case, we first observe that f * : QCoh(X) → QCoh(S) is t-exact and conservative. Therefore, and therefore the conclusion follows.
2.2. Deformation theory of coherent sheaves. Let X be a derived stack. We study the deformation theory of the stack Coh(X). Since we are also interested in the case where X is one of Simpson's shapes, we first recall the following definition: (1) it is an effective epimorphism, i.e. the map π 0 (U) → π 0 (X) is an epimorphism of discrete sheaves; (2) it is flat, i.e. the pullback functor u * : QCoh(X) → QCoh(U) is t-exact.
We have the following stability property: Lemma 2.9. Let X → S be a morphism in dSt and let U → X be a flat effective epimorphism. If T → S is representable by affine derived schemes, then U × S T → X × S T is a flat effective epimorphism.
(1) If X is a geometric derived stack and u : U → X is a smooth atlas, then u is a flat effective epimorphism.
(2) Let X be a connected C-scheme of finite type and let x : Spec(C) → X be a closed point. Then the induced map Spec(C) → X B is a flat effective epimorphism. See [PS20, Proposition 3.1.1-(3)].
(4) Let X be a geometric derived stack.
is a pullback square.
Proof. We have to prove that for every S ∈ dAff, a sheaf of almost perfect modules F ∈ APerf(X × S) is flat relative to S if and only if its pullback to U × S has the same property. Since u : U → X is a flat effective epimorphism, so is S × U → S × X by Lemma 2.9. At this point, the conclusion follows from Lemma 2.6.
Since Example 2.10 contains our main applications, we will always work under the assumption that there exists a flat effective epimorphism U → X, where U is a geometric derived stack locally almost of finite type. The above lemma allows us therefore to carry out the main verifications in the case where X itself is geometric and locally almost of finite type.
We start with infinitesimal cohesiveness and nilcompleteness. Recall that APerf(X) is infinitesimally cohesive and nilcomplete for every derived stack X ∈ dSt: Lemma 2.12. Let X ∈ dSt be a derived stack. Then APerf(X) is infinitesimally cohesive and nilcomplete.
In virtue of the above lemma, our task is reduced to proving that the map Coh(X) → APerf(X) is infinitesimally cohesive and nilcomplete. Thanks to Lemma 2.11, the essential case is when X is affine: where d 0 denotes the zero derivation. Since the maximal ∞-groupoid functor (−) ≃ : Cat ∞ → S commutes with limits, it is enough to prove that the square Since p is affine, p * is t-exact, and therefore the modules p * ϕ * (F ) and p * ϕ * 0 (F ) are eventually connective. The conclusion now follows from [Lur18, Proposition 16.2.3.1-(3)].
We now turn to nilcompleteness. Let S ∈ dAff be an affine derived scheme and let S n := t ≤n (S) be its n-th truncation. We have to prove that the diagram is infinitesimally cohesive and nilcomplete. In particular, Coh(X) is infinitesimally cohesive and nilcomplete.
Proof. Combining [PS20, Propositions 2.2.3-(2) and 2.2.9-(3)], we see that infinitesimally cohesive and nilcomplete morphisms are stable under pullbacks. Therefore, the first statement is a consequence of Lemmas 2.11 and 2.13. The second statement follows from Lemma 2.12.
We now turn to study the existence of the cotangent complex of Coh(X). This is slightly trickier, because APerf(X) does not admit a (global) cotangent complex. Nevertheless, it is still useful to consider the natural map Coh(X) → APerf(X). Observe that it is (−1)-truncated by construction. In other words, for every S ∈ dAff, the induced map

Coh(X)(S) −→ APerf(X)(S)
is fully faithful. This is very close to asserting that the map is formallyétale, as the following lemma shows: Lemma 2.15. Let F → G be a morphism in dSt. Assume that: (1) for every S ∈ dAff the map F(S) → G(S) is fully faithful; (2) for every S ∈ dAff, the natural map induces a surjection at the level of π 0 .
Then F → G is formallyétale.
Proof. First, consider the square .
Assumption (1) implies that the vertical maps are (−1)-truncated, hence so is the map F(S) → F(S red ) × G(S red ) G(S) as well. Assumption (2) implies that it is also surjective on π 0 , hence it is an equivalence. In other words, the above square is a pullback. We now show that F → G is formallyétale. Let S = Spec(A) be an affine derived scheme. Let F ∈ QCoh ≤0 and let S[F ] := Spec(A ⊕ F ) be the split square-zero extension of S by F . Consider the lifting problem The solid arrows induce the following commutative square in S: .
To prove that F → G is formallyétale is equivalent to proving that the square is a pullback. Observe that the above square is part of the following naturally commutative cube: .
The horizontal arrows of the back square are equivalences, and therefore the back square is a pullback. The argument we gave at the beginning shows that the side squares are pullbacks. Therefore, the conclusion follows.
To check condition (1) of the above lemma for F = Coh(X) and G = APerf(X), we need the following variation of the local criterion of flatness.
Lemma 2.16. Let f : X → S be a morphism in dSt and let F ∈ APerf(X). Assume that: (1) S is an affine derived scheme; (2) there is a flat effective epimorphism u : U → X, where U is a geometric derived stack; (3) for every pullback square X s X where K is a field, j * s (F ) ∈ APerf(X s ) has tor-amplitude within [a, b] relative to Spec(K). Then F has tor-amplitude within [a, b] relative to S.
Proof. Let U s := Spec(K) × S U. Since u : U → X is a flat effective epimorphism, Lemma 2.9 implies that the same goes for u s : U s → X s . Therefore, Lemma 2.6 allows is to replace X by U. Applying this lemma one more time, we can further assume U is an affine derived scheme. At this point, the conclusion follows from the usual local criterion for flatness, see [Lur18, Proposition 6.1.4.5].
Corollary 2.17. Let X ∈ dSt be a derived stack and assume there exists a flat effective epimorphism u : U → X, where U is a geometric derived stack. Then the natural map Coh(X) → APerf(X) is formallyétale.
Proof. We apply Lemma 2.15. We already remarked that assumption (1) is satisfied, essentially by construction. Let now S ∈ dAff and let j : X × S red −→ X × S be the natural morphism. Let F ∈ APerf(X × S). Then Lemma 2.16 implies that F is flat relative to S if and only if j * (F ) is flat relative to S red . This implies that assumption (2) of Lemma 2.15 is satisfied as well, and the conclusion follows.
Since in many cases Perf(X) admits a global cotangent complex, it is useful to factor the map Coh(X) → APerf(X) through Perf(X). The following lemma provides a useful criterion to check when this is the case: Lemma 2.18. Let f : X → S be a morphism of derived stacks. Let F ∈ APerf(X) be an almost perfect complex and let a ≤ b be integers. Assume that: (1) S is an affine derived scheme; (2) there exists a flat effective epimorphism u : U → X, where U is a geometric derived stack locally almost of finite type; (3) for every ladder of pullback squares . Then u * (F ) ∈ APerf(U) has tor-amplitude within [a, b] and therefore F belongs to Perf(X).
Proof. Since u : U → X is a flat effective epimorphism, Lemmas 2.6 and 2.9 allow to replace X by U. In other words, we can assume X to be a geometric derived stack locally almost of finite type from the very beginning. Applying Lemma 2.6 a second time to an affine atlas of X, we can further assume X is an affine derived scheme, say X = Spec(B).
Given a geometric point x : Spec(K) → X, we let B (x) denote the localization where the colimit ranges over all the open Zariski neighborhoods of the image of x inside X. It is then enough to prove that for each such geometric point, Given x : Spec(K) → X let s := f • x : Spec(K) → S. By assumption j * s (F ) ∈ APerf(X s ) is in tor-amplitude [a, b]. Let x : Spec(K) → X s be the induced point. Then x = j s • x, and therefore Let κ denote the residue field of the local ring π 0 (B (x) ). Since the map κ → K is faithfully flat, we can assume without loss of generality that K = κ. In this way, we are reduced to the situation of Lemma 2.16 with X = S.
Finally, we remark that since u is an effective epimorphism, the diagram is a pullback square. Therefore, an almost perfect complex F ∈ APerf(X) is perfect if and only if u * (F) is. The proof is complete.
Corollary 2.19. Let X be a derived stack and assume there exists a flat effective epimorphism u : U → X, where U is a smooth geometric derived stack. Then for every S ∈ dAff, the subcategory Coh S (X × S) ⊆ APerf(X × S) is contained in Perf(X × S). In particular, the natural map Coh(X) → APerf(X) induces a formallyétale map Proof. Since u is a flat effective epimorphism, Lemmas 2.6 and 2.9 imply that it is enough to prove the corollary for U = X. In this case, we have to check that if F ∈ APerf(X × S) is flat relative to S, then it belongs to Perf(X × S). The question is local on X, and therefore we can further assume that X is affine and connected. As X is smooth, it is of pure dimension n for some integer n. It follows that every G ∈ Coh ♥ (X) has tor-amplitude ≤ n on X. At this point, the first statement follows directly from Lemma 2.18. As for the second statement, the existence of the factorization follows from what we have just discussed. Corollary 2.17 implies that Coh(X) → Perf(X) is formallyétale.
Corollary 2.20. Let X be a derived stack and let u : U → X be a flat effective epimorphism, where U is a smooth geometric derived stack. If Perf(X) admits a global cotangent complex, then so does Coh(X).
Proof. This is a direct consequence of Corollary 2.19.
We define Bun(X) as It is an open substack of Coh(X). We call it the derived stack of vector bundles on X.

Coherent sheaves on schemes.
We now specialize to the case where X is an underived complex scheme of finite type. Our goal is to prove that if X is proper, then Coh(X) is geometric, and provide some estimates on the tor-amplitude of its cotangent complex. Observe that in this case, X has universally finite cohomological dimension. Corollary 2.14 shows that Coh(X) is infinitesimally cohesive and nilcomplete. In virtue of Lurie's representability theorem [Lur18, Theorem 18.1.0.2], in order to prove that Coh(X) is geometric it is enough to check that it admits a global cotangent complex and that its truncation is geometric. Recall that if X is smooth and proper, then Perf(X) admits a global cotangent complex, see for instance [PS20, Corollary 2.3.28]. Therefore, Corollary 2.20 implies that under these assumptions the same is true for Coh(X). We can relax the smoothness by carrying out a more careful analysis as follows: Lemma 2.21. Let X be a proper, underived complex scheme. Then the derived stack Coh(X) admits a global cotangent complex.
Proof. Let S = Spec(A) be an affine derived scheme and let x : S → Coh(X) be a morphism. Let F ∈ Coh Spec(A) (X × Spec(A)) be the corresponding coherent complex on X × S relative to S. Let be the loop stack based at x and let δ x : S → F be the induced morphism. Since Coh(X) is infinitesimally cohesive thanks to Lemma 2.13, [PS20, Proposition 2.2.4] implies that Coh(X) admits a cotangent complex at x if and only if F admits a cotangent complex at δ x relative to S × S. We have to prove that the functor is representable by an eventually connective module. Here S[M] := Spec(A ⊕ M), and the fiber is taken at the point x. We observe that , the fiber being taken at the identity of F . Unraveling the definitions, we therefore see that where p : X × S → S is the canonical projection. Since QCoh(S) and QCoh(X × S) are presentable, the adjoint functor theorem shows that it is enough to show that the functor Der F (A; −) commutes with arbitrary limits. Since Map QCoh(X×S) (F , −) commutes with limits, it is enough to prove that the functor commutes with limits. Since X is quasi-compact and quasi-separated, we know that QCoh(X × S) is generated by a single perfect complex G ∈ Perf(X × S). Since S is affine, this implies that the functor is conservative. Since G is perfect, G ∨ ⊗ − commutes with arbitrary limits, and since p * ⊣ p * , the same holds for p * . Therefore, it is enough to prove that commutes with limits. Using the projection formula, we can rewrite this functor as It is therefore enough to prove that p * (G ∨ ⊗ F ) is a perfect A-module. Since p is proper, p * (G ∨ ⊗ F ) is almost perfect. In virtue of [Lur17, Proposition 7.2.4.23-(4)], it is therefore enough to prove that it has finite tor-amplitude. Observe that G ∨ ⊗ F has finite tor-amplitude relative to has uniformly bounded cohomological amplitude. Therefore, [PS20, Proposition 2.3.19] implies that p * (G ∨ ⊗ F ) has finite tor-amplitude over S. In conclusion, we deduce that there exists an object E ∈ A-Mod together with a natural equivalence is again eventually coconnective. In other words, for every eventually coconnective M, the Amodule Map A-Mod (E , M) is eventually coconnective. This implies that E must be eventually connective. As a consequence, E is a cotangent complex for F at δ x , and therefore Coh(X) admits a cotangent complex at the point x, given by E [−1].
We are left to prove that the cotangent complex is global. It is enough to prove that the cotangent complex of F is global, that is that for every map f : T := Spec(B) → Spec(A), the object f * (E ) represents the functor Der F (B; −). Consider the derived fiber product Then for any M ∈ B-Mod, we have The conclusion therefore follows from the Yoneda lemma.
Remark 2.22. In the setting of the above corollary, let x : Proof. Let S be an underived affine scheme. By definition, a morphism S → Coh(X) corresponds to an almost perfect complex F ∈ APerf(X × S) which furthermore has tor-amplitude ≤ 0 relative to S. As S is underived, having tor-amplitude ≤ 0 relative to S is equivalent to asserting that F belongs to APerf ♥ (X × S). The conclusion follows.
In other words, the derived stack Coh(X) provides a derived enhancement of the classical stack 17 of coherent sheaves. We therefore get: Proposition 2.24. Let X be a proper, underived complex scheme. Then the derived stack Coh(X) is geometric and locally of finite presentation. If furthermore X is smooth, then the canonical map Coh(X) → Perf(X) is representable byétale geometric 0-stacks. 18 Proof. Lemma 2.23 implies that Coh(X) cl coincides with the usual stack of coherent sheaves on X, which we know to be a geometric classical stack (cf. [LMB00, Théorème 4.6.2.1] or [Stacks, Tag 08WC]). On the other hand, combining Corollary 2.14 and Lemma 2.21 we see that Coh(X) is infinitesimally cohesive, nilcomplete and admits a global cotangent complex. Therefore the assumptions of Lurie's representability theorem [Lur18, Theorem 18.1.0.2] are satisfied and so we deduce that Coh(X) is geometric and locally of finite presentation. As for the second statement, we already know that Coh(X) → Perf(X) is formallyétale. As both stacks are of locally of finite type, it follows that this map isétale as well. Finally, since Coh(X) → Perf(X) is (−1)-truncated, we see that for every affine derived scheme S, the truncation of S × Perf(X) Coh(X) takes values in Set. The conclusion follows. 17 The construction of such a stack is described, e.g., in [LMB00, Chapitre 4], [Stacks, Tag 08KA]. 18 After the first version of the present paper was released, it appeared on the arXiv the second version of [HLP14] in which a similar statement was proved, cf. [HLP14, Theorem 5.2.2].
Remark 2.25. Let X be a smooth and proper complex scheme. In this case, the derived stack Coh(X) has been considered to some extent in [TVa07]. Indeed, in their work they provide a geometric derived stack M 1-rig Perf(X) classifying families of 1-rigid perfect complexes (see §3.4 in loc. cit. for the precise definition). There is a canonical map Coh(X) One can check that this map is formallyétale. Since it is a map between stacks locally almost of finite type, it follows that it is actuallyétale. Therefore, the derived structure of M 1-rig Perf(X) induces a canonical derived enhancement of Coh(X) cl . Unraveling the definitions, we can describe the functor of points of such derived enhancement as follows: it sends S ∈ dAff to the full subcategory of Perf(X × S) spanned by those F whose pullback to X × S cl is concentrated in cohomological degree 0. Remark 2.3 implies that it canonically coincides with our Coh(X). However, this method is somehow non-explicit, and heavily relies on the fact that X is a smooth and proper scheme. Our method provides instead an explicit description of the functor of points of this derived enhancement, and allows us to deal with a wider class of stacks X. △ Corollary 2.26. Let X be a smooth and proper complex scheme of dimension n. Then the cotangent complex L Coh(X) is perfect and has tor-amplitude within [−1, n − 1]. In particular, Coh(X) is smooth when X is a curve and derived lci when X is a surface.
Proof. It is enough to check that for every affine derived S = Spec(A) ∈ dAff and every point ) be the almost perfect complex classified by x and let p : X × Spec(A) → Spec(A) be the canonical projection. Since X is smooth, Corollary 2.19 implies that F is perfect. Moreover, Lemma 2.21 shows that Since p is proper and smooth, the pushforward p * preserves perfect complexes (see [Lur18, Theorem 6.1.3.2]). As End(F ) ≃ F ⊗ F ∨ is perfect, we conclude that x * T Coh(X) is perfect.
We are then left to check that it is in tor-amplitude [1 − n, 1]. Let j : (Spec(A) cl → Spec(A) be the canonical inclusion. It is enough to prove that j * x * T Coh(X) has tor-amplitude within [1 − n, 1]. In other words, we can assume Spec(A) to be underived. Using Lemma 2.18 we can further assume S is the spectrum of a field.
First note that for every pair of coherent sheaves G, G ′ ∈ Coh S (X), p * Hom X (G, G ′ ) is coconnective and has coherent cohomology. Since S is the spectrum of a field, it is therefore a perfect complex. By Grothendieck-Serre duality for smooth proper morphisms of relative pure dimension between Noetherian schemes (see [Con00,§3.4], [BBHR09, § C.1], and references therein), we have where ω X is the canonical bundle of X, and p X the projection from X × S to X. The right-hand side is n-coconnective. This implies that This shows that p * E nd(F ) has tor-amplitude within [−n, 0], and therefore that x * T Coh(X) has tor-amplitude within [1 − n, 1]. 19 2.3.1. Non-proper case. We can relax the properness assumption on X by working with perfect complexes with proper support: Definition 2.27. Let p : X → S be a morphism of derived schemes locally almost of finite presentation and let F ∈ APerf(X) be an almost perfect complex. We say that F has proper support relative to S if there exists a closed subscheme Z ֒→ X such that Z → S is proper and F | X Z ≃ 0. ⊘ Perfect complexes with proper support have the following property: Proposition 2.28. Let p : X → S be a morphism between quasi-compact, quasi-separated derived schemes locally almost of finite presentation and let F ∈ APerf(X) be an almost perfect complex. If F has proper support relative to S, then for every morphism T → S and every perfect complex G ∈ Perf(X × S T) one has In particular, if F has proper support then p * (F ) belongs to APerf(S).
The converse holds true provided that p is separated and F has finite cohomological amplitude and finite tor-amplitude relative to S.
Proof. To prove the first statement, it is enough to take T = S. Assume first that F has proper support relative to S. Let Z ֒→ X be a closed subscheme such that Z → S is proper and F | X Z ≃ 0. Then for every perfect complex G ∈ Perf(X), we have (G ∨ ⊗ F )| X Z ≃ 0, and therefore G ∨ ⊗ F has again proper support relative to S. It is therefore enough to prove the statement when G = O X . Let C be the full subcategory of APerf(X) spanned by those almost perfect complexes F such that p * (F ) belongs to APerf(S). We want to show that C contains all almost perfect complexes with proper support relative to S. Let F be such an object, and assume furthermore that . Then the question only concerns the classical truncations of X and S. In this case, there exists a nilthickening Z ′ of Z together with a map j : Z ′ → X cl , a coherent sheaf F ′ ∈ APerf ♥ (Z ′ ) and an isomorphism j * (F ′ ) ≃ F . We can therefore compute the pushforward of F along X → S as the pushforward of F ′ along Z ′ → S. As the latter map is again proper, we deduce that p * (F ) belongs to APerf(S). Since X is quasi-compact, it is straightforward to deduce from here that whenever F has bounded cohomological amplitude and proper support relative to S, then p * (F ) belongs to APerf(S). Finally, since X is quasi-compact and quasi-separated, we see that the functor p * has finite cohomological dimension. It is then possible to extend the result to the whole category of almost perfect complexes on X with proper support relative to S.
Assume now that p is separated and let F be a bounded almost perfect complex on X such that for every G ∈ Perf(X), one has p * (G ∨ ⊗ F ) ∈ APerf(S). We want to prove that it has proper support. Since F is cohomologically bounded, it is enough to prove that for every integer i ∈ Z, π i (F ) has proper support. Since π i (F ) belongs to APerf ♥ (X) ≃ APerf ♥ ( X cl ), we can assume that both X and S are underived, and that F is discrete. Let Z := supp(F ) and observe that since F is coherent, this is a closed subset of X. Since p is separated, it is enough to prove that the map Z → S is universally closed. Since the assumptions on F are stable under arbitrary base-change along T → S, we see that it is enough to prove that Z → S is closed. Let Z ′ ⊆ Z be a closed subset. Since F is coherent, Z is closed in X and so is Z ′ . Using [Tho], we can find a perfect complex G on X such that the support of G coincides exactly with Z ′ . It follows that G ∨ ⊗ F is again supported exactly on Z ′ , and furthermore p * (G ∨ ⊗ F ) is almost perfect. In particular, the support of p * (G ∨ ⊗ F ) is closed, and therefore it coincides with the image of the support of G ∨ ⊗ F , which was Z ′ . This completes the proof.
Let now X be a quasi-projective (underived) scheme and let Perf prop (X) be the derived moduli stack parameterizing families of perfect complexes on X with proper support. There is a natural map Perf prop (X) → Perf(X), and we set This derived stack is infinitesimally cohesive and nilcomplete. Furthermore, we have: Proposition 2.29. The derived stacks Perf prop (X) and Coh prop (X) admit a global cotangent complex.
Proof. It is enough to observe that in the proof of Lemma 2.21 one only needs to know that for every affine derived scheme S and every G ∈ Perf(X), the complex p * (G ∨ ⊗ F ) is almost perfect in QCoh(S). This is true in this setting thanks to Proposition 2.28.
We denote by Coh P (X) its canonical derived enhancement 20 . Similarly, we define Bun P (X). parameterizing families of H-semistable coherent sheaves on X with fixed reduced polynomial p; we denote by Coh ss, p (X) its canonical derived enhancement. Similarly, we define Bun ss, p (X).
Finally, let 0 ≤ d ≤ dim(X) be an integer and define Remark 2.32. Let X be a smooth projective complex curve. Then the assignment of a monic polynomial p(m) ∈ Q[m] of degree one is equivalent to the assignment of a slope µ ∈ Q. In addition, in the one-dimensional case we have Bun ss, µ (X) ≃ Coh ss, µ (X). △ Finally, assume that X is only quasi-projective. As above, we can define the derived moduli stack Coh d prop (X) of coherent sheaves on X with proper support and dimension of the support less or equal d. 20 The construction of such a derived enhancement follows from [

Coherent sheaves on Simpson's shapes.
Let X be a smooth and proper complex scheme. In this section, we introduce derived enhancements of the classical stacks of finite-dimensional representations of π 1 (X), of vector bundles with flat connections on X and of Higgs sheaves on X. In order to treat these three cases in a uniform way, we shall consider the Simpson's shapes X B , X dR , and X Dol and coherent sheaves on them (cf. [PS20] for a small compendium of the theory of Simpson's shapes).
2.4.1. Moduli of local systems. Let K ∈ S fin be a finite space. We let K B ∈ dSt be its Betti stack, that is, the constant stack The first result of this section is the following: Proposition 2.33. The derived stack Coh(K B ) is a geometric derived stack, locally of finite presentation.
For every n ≥ 0, set Lemma 2.34. The truncation of Bun n (K B ) corresponds to the classical stack of finite-dimensional representations of π 1 (K).

Lemma 2.35. The canonical map
is an equivalence.
Proof. We can view both Coh(K B ) and Bun(K B ) as full substacks of Perf(K B ). It is therefore enough to show that they coincide as substacks of Perf(K B ). Suppose first that K is discrete. Then it is equivalent to a disjoint union of finitely many points, and therefore In this case is therefore identified with an object in Fun(I, Perf(S)). Having tor-amplitude ≤ 0 with respect to S is equivalent of having tor-amplitude ≤ 0 on S I , and therefore the conclusion follows in this case. Using the equivalence S k+1 ≃ Σ(S k ), we deduce that the same statement is true when K is a sphere. We now observe that since K is a finite space, we can find a sequence of maps The conclusion therefore follows by induction.
Proof of Proposition 2.33. We can assume without loss of generality that K is connected. Let x : * → K be a point and let be the induced morphism. Then [PS20, Proposition 3.1.1-(3)] implies that u x is a flat effective epimorphism. Therefore, Corollary 2.14 implies that Coh(K B ) is infinitesimally cohesive and nilcomplete. Since Spec(C) is smooth, Corollary 2.20 implies that there is a formallyétale map , and in particular it admits a global cotangent complex. Therefore, so does Coh(K B ).
We are left to prove that its truncation is geometric. Recall that the classical stack of finitedimensional representations of π 1 (K) is geometric (cf. e.g. [Sim94b]). Thus, the geometricity of the truncation follows from Lemmas 2.34 and 2.35. Therefore, Lurie's representability theorem [Lur18, Theorem 18.1.0.2] applies. Now let X be a smooth and proper complex scheme. Define the stacks Lemma 2.35 supplies a canonical equivalence Coh B (X) ≃ Bun B (X) and Proposition 2.33 shows that they are locally geometric and locally of finite presentation. We refer to this stack as the derived Betti moduli stack of X. In addition, we shall call (1) Consider the case X = P 1 C . We have However, Bun n B (P 1 C ) has an interesting derived structure. To see this, let x : Spec(C) → Bun n B (P 1 C ) be the map classifying the constant sheaf C n P 1 C . This map factors through BGL n , and it classifies C n ∈ Mod C = QCoh(Spec(C)). The tangent complex of BGL n at this point is given by End C (C n )[1], and in particular it is concentrated in homological degree −1. On the other hand, [PS20, Corollary 3.1.4-(2)] shows that the tangent complex of Bun n In particular, Bun n B (P 1 C ) is not smooth (although it is lci), and therefore it does not coincide with BGL n .
(2) Assume more generally that X is a smooth projective complex curve. Then Bun n B (X) can be obtained as a quasi-Hamiltonian derived reduction 22 . Indeed, let X ′ be the topological space X top minus a disk D. Then one can easily see that X ′ deformation retracts onto a wedge of 2g X circles, where g X is the genus of X. We get 22 See [Saf16] for the notion of Hamiltonian reduction in the derived setting.
Since Bun n B (S 1 ) ≃ [GL n /GL n ] (see, e.g., [Cal14, Example 3.8]), and Bun n B (D) ≃ Bun n B (pt), we obtain Via [PS20, Proposition 3.1.1-(2)], we see thatx corresponds to an object L in Fun(X htop , Perf(S)). 23 On the other hand, [PS20, Proposition 3.1.3] allows one to further identify this ∞-category with the ∞-category of local systems on X an . Since X B is categorically proper (cf. [PS20, Proposition 3.1.1-(4)]), to check tor-amplitude of L Perf(X B ) at the pointx it is enough to assume that S is underived. In addition, since L arises from the point x, we see that it is discrete. Applying the characterization of the derived global sections of any F ∈ QCoh(X B ) in [PS20, Corollary 3.1.4], we finally deduce that As this computes the (shifted) singular cohomology of X an with coefficients in E nd(L), the conclusion follows.

2.4.2.
Moduli of flat bundles. Let X be a smooth, proper and connected scheme over C. The de Rham shape of X is the derived stack X dR ∈ dSt defined by X dR (S) := X( S cl red ) , for any S ∈ dAff (cf. [PS20, §4.1]). Here, we denote by T red the underlying reduced scheme of an affine scheme T ∈ Aff.
Define the stacks

Lemma 2.38. There is a natural equivalence
Proof. First, recall that there exists a canonical map λ X : We can see both derived stacks as full substacks of Map(X dR , Perf). Let S ∈ dAff and let x : S → Map(X dR , BGL n ). Then x classifies a perfect complex F ∈ Perf(X dR × S) such that G := (λ X × id S ) * (F ) ∈ Perf(X × S) has tor-amplitude ≤ 0 and rank n. Since the map X × S → S is flat, it follows that G has tor-amplitude ≤ 0 relative to S, and therefore that x determines a point in Coh dR (X).
Conversely, let x : S → Coh dR (X). Let F ∈ Perf(X dR × S) be the corresponding perfect complex and let G := (λ X × id S ) * (F ). Then by assumption G has tor-amplitude ≤ 0 relative to S. We wish to show that it has tor-amplitude ≤ 0 on X × S. Using Lemma 2.18, we see that it is enough to prove that for every geometric point s : Spec(K) → S, the perfect complex j * (G) ∈ Perf(X K ) has tor-amplitude ≤ 0. Here X K := Spec(K) × X and j : X K → X is the natural morphism. Consider the commutative diagram We therefore see that j * G comes from a K-point of Coh dR (X). By [HTT08, Theorem 1.4.10], j * G is a vector bundle on X, i.e. that it has tor-amplitude ≤ 0. The conclusion follows.
Proposition 2.39. The derived stack Coh(X dR ) is a geometric derived stack, locally of finite presentation.
We shall call Coh dR (X) the derived de Rham moduli stack of X.

2.4.3.
Moduli of Higgs sheaves. Let X be a smooth, proper and connected complex scheme. Let be the derived tangent bundle to X and let TX := X dR × (TX) dR TX be the formal completion of TX along the zero section. The natural commutative group structure of TX relative to X (seen as an associative one) lifts to TX. Thus, we define the Dolbeault shape X Dol of X as the relative classifying stack: while we define the nilpotent Dolbeault shape X nil Dol of X as:  ) coincides with the moduli stack of Higgs sheaves (resp. nilpotent Higgs sheaves) on X.
We denote by  X : Coh nil Dol (X) → Coh Dol (X) and  bun X : Bun nil Dol (X) → Bun Dol (X) the canonical maps induced by ı X : X Dol → X nil Dol . Remark 2.41. Let X be a smooth and proper complex scheme. Define the geometric derived stack There is a natural morphism which is an equivalence when X is a smooth and projective curve (see, e.g., [GiR18]). In higher dimension, this morphism is no longer an equivalence. This is due to the fact that in higher dimensions the symmetric algebra and the tensor algebra on T Coh(X) differ. △ Let X be a smooth projective complex scheme. For any monic polynomial p(m) ∈ Q[m], we set As shown by Simpson [Sim94a,Sim94b], the higher-dimensional analogue of the semistability condition for Higgs bundles on a curve (introduced, e.g., in [Nit91]) is an instance of the Gieseker stability condition for modules over a sheaf of rings of differential operators, when such a sheaf is induced by Ω 1 X with zero symbol (see [Sim94a,§2]

DERIVED MODULI STACK OF EXTENSIONS OF COHERENT SHEAVES
Our goal in this section is to introduce and study a derived enhancement of the moduli stack of extensions of coherent sheaves on a proper complex algebraic variety X. As usual, we also deal with the case of Higgs sheaves, vector bundles with flat connection and finite-dimensional representation of the fundamental group of X. We will see in Section 4 that the derived moduli stack of extensions of coherent sheaves is a particular case of a more fundamental construction, known as the Waldhausen construction. If on the one hand it is a certain property of the Waldhausen construction (namely, its being a 2-Segal object) the main responsible for the higher associativity of the Hall convolution product at the categorified level, at the same time the analysis carried out in this section of the stack of extensions of coherent sheaves yields a fundamental input for the overall construction. More specifically, we will show that when X is a surface, certain maps are derived lci, which is the key step in establishing the categorification we seek.
3.1. Extensions of almost perfect complexes. Let ∆ 1 be the 1-simplex, and define the functor We let APerf ext denote the full substack of APerf ∆ 1 ×∆ 1 whose Spec(A)-points corresponds to diagrams in APerf(A) which are pullbacks and where F 4 ≃ 0.
Observe that the natural map APerf ext → APerf ∆ 1 ×∆ 1 is representable by Zariski open immersions. There are three natural morphisms ev i : APerf ext −→ APerf , i = 1, 2, 3 , which at the level of functor of points send a fiber sequence F 1 −→ F 2 −→ F 3 to F 1 , F 2 and F 3 , respectively.
Let Y ∈ dSt be a derived stack. We define Once again, the morphism is representable by Zariski open immersions. Moreover, the morphism ev i induce a morphism APerf ext (Y) → APerf(Y), which we still denote ev i . Let now Y ∈ dSt be a derived stack. In § 2 we introduced the derived moduli stack Coh(Y), parameterizing coherent sheaves on Y. It is equipped with a natural map Coh(Y) → APerf(Y).
We define Coh ext (Y) as the pullback ev 1 ×ev 2 ×ev 3 . (3.1) and we refer to it as the derived moduli stack of extensions of coherent sheaves.
is a pullback, and the horizontal arrows are formallyétale. When there is a flat effective epimorphism u : U → Y from a smooth geometric derived stack U, Corollary 2.19 shows that the Similarly, we define Bun ext (Y) as the pullback with respect to a diagram of the form (3.1), with Coh(Y) ×3 replaced with Bun(Y) ×3 .

Explicit computations of cotangent complexes.
In this section we carry out the first key computation: we give explicit formulas for the cotangent complexes of the the stack Perf ext (Y) and of the map ev 3 × ev 1 : Perf ext (Y) → Perf(Y) × Perf(Y). We assume throughout this section that Y is a derived stack satisfying the following assumptions: (1) Y has finite local tor-amplitude, see [PS20, Definition 2.3.15].
(3) There exists an effective epimorphism u : U → Y, where U is a quasi-compact derived scheme.
These hypotheses guarantee in particular the following: for every S ∈ dAff let Proof. First of all, we consider the diagram Since (3.2) is a pullback, we see that the above square is a pullback. In particular, the top horizontal morphism is a Zariski open immersion. It is therefore enough to compute the cotangent complex of Perf ∆ 1 ×∆ 1 (Y) at the induced point, which we still denote by x : We therefore focus on the computation of δ * x L F . Given ( f , g) : T = Spec(B) → S × S, write f Y and g Y for the induced morphisms We can identify F(T) with the ∞-groupoid of commutative diagrams where α 1 , α 2 and α 3 are equivalences. In other words, F(T) fits in the following limit diagram: .
Here the mapping and isomorphism spaces are taken in Perf(Y × T). We have to represent the functor Write Y S := Y × S and let p S : Y S → S be the natural projection, so that . Unraveling the definitions, we can thus identify Der F (S; G) with the pullback diagram .
Since F 1 , F 2 and F 3 are perfect, they are dualizable. Moreover, [PS20, Proposition 2.3.27-(1)] guarantees the existence of a left adjoint p S+ for p * S . We can therefore rewrite the above diagram as where now the mapping spaces are computed in Perf(Y × S). Therefore, the Yoneda lemma implies that Der F (S; G) is representable by the colimit of the diagram (3.3) in Perf(Y × S). At this point, [PS20, Proposition 2.3.27-(2)] guarantees that Perf ext (Y) also admits a global cotangent complex.
Let x : Spec(A) → Perf ∆ 1 (Y) be the point corresponding to F 1 → F 2 . Then we have a canonical morphism [1] , which in general is not an equivalence. When the point y factors through the open substack Perf ext (Y), then the above morphism becomes an equivalence. △ Next, we compute the cotangent complex of ev 3 × ev 1 . We start with a couple of preliminary considerations: Definition 3.4 ([PS20, Definition A.2.1]). Let Y be a derived stack and let F ∈ Perf(Y) be a perfect complex on F . The linear stack 24 associated to F over Y is the derived stack V Y (F ) ∈ dSt /Y defined as In other words, for every f : Construction 3.5. Let Y ∈ dSt be a derived stack satisfying assumptions (1), (2), and (3). Let be the natural projections. Let F ∈ Perf(Y × Perf(Y)) be the universal family of perfect complexes on Y and for i = 1, 2 set Using [PS20, Corollary 2.3.29] we see that the functor admits a left adjoint q + . We can therefore consider the linear stack We have: Proposition 3.6. Let Y ∈ dSt be a derived stack satisfying assumptions (1), (2), and (3). Keeping the notation of the above construction, there is a natural commutative diagram where φ is furthermore an equivalence.
Proof. For any S ∈ dAff and any point x : S → Perf(Y) × Perf(Y), we can identify the fiber at x of the morphism with the mapping space Consider the pullback square The base change for the plus pushforward (cf. [PS20, Corollary 2.3.29-(2)]) allows us to rewrite Therefore, we have We therefore see that any choice of a fiber sequence . This provides us with a canonical map The conclusion follows.
Corollary 3.7. Let Y be a derived stack satisfying the same assumptions of Proposition 3.6. Then the cotangent complex of the map is computed as Proof. This is an immediate from Proposition 3.6 and [Lur17, Proposition 7.4.3.14].

X) is smooth when X is a curve and derived lci when X is a surface.
Remark 3.9. Notice that Perf ext (X) is not smooth, even if X is a smooth projective complex curve. △ Proof of Proposition 3.8. Let Spec(A) ∈ dAff and let x : Spec(A) → Coh ext (X) be a point. We have to check that x * T Coh ext (X) is perfect and in tor-amplitude [1 − n, 1]. Since the map Coh ext (X) → Perf ext (X) is formallyétale, we can use Proposition 3.2 to compute the cotangent complex, and hence the tangent one. Let be the fiber sequence in Perf(X × Spec(A)) corresponding to the point x. Let p : X × Spec(A) → Spec(A) be the canonical projection. Using Remark 3.3 we see that x * T Coh ext (X) fits in the pullback diagram .
Since X is smooth and proper, p * preserves perfect complexes. Therefore, x * T Coh ext (X) is perfect.
In order to check that it has tor-amplitude within [1 − n, 1], it is sufficient to check that its pullback to Spec(π 0 (A)) has tor-amplitude within [1 − n, 1]. In other words, we can suppose from the very beginning that A is discrete. In this case, F 1 , F 2 and F 3 are discrete as well and the map F 1 → F 2 is a monomorphism. Since X is an n-dimensional scheme, the functor p * has cohomological dimension n. It is therefore sufficient to check that π −n (x * T Coh ext (X) ) = 0. We have a long exact sequence By using Grothendieck-Serre duality (as in the second part of the proof of Corollary 2.26), one can show that We are thus left to check that the map is surjective. It is enough to prove that is surjective. We have a long exact sequence The same argument as above shows that E xt n+1 p (F 3 , F 2 ) = 0. The proof is therefore complete.

Proposition 3.10. Let X be a smooth and proper complex scheme of dimension n. Then the relative cotangent complex of the map
is perfect and has tor-amplitude within [−1, n − 1]. In particular, it is smooth when X is a curve and derived lci when X is a surface.
Remark 3.11. When X is a curve, Corollary 2.26 and Proposition 3.8 imply that Coh ext (X) and Coh(X) are smooth. This immediately implies that ev 3 × ev 1 is derived lci, hence the above corollary improves this result. △ Proof of Proposition 3.10. Let S ∈ dAff and let x : S → Perf ext (X) be a point classifying a fiber sequence in Perf(X × S). If F 1 and F 3 have tor-amplitude ≤ 0 relative to S, then the same goes for F 2 . This implies that the diagram is a pullback square. Smooth and proper schemes are categorically proper and have finite local tor-amplitude, see [PS20, Example 2.3.1]. Therefore the assumptions of Proposition 3.6 are satisfied. Since the horizontal maps in the above diagram are formallyétale, we can therefore use Corollary 3.7 to compute the relative cotangent complex of the morphism (3.4). This immediately implies that this relative cotangent complex is perfect, and we are left to prove that it has tor-amplitude within [−1, n − 1]. For this reason, it is enough to prove that for any (underived) affine scheme S ∈ Aff and any point x : S → Coh ext (X), the perfect complex x * L ev 3 ×ev 1 has tor-amplitude within [−1, n − 1]. Let F 1 → F 2 → F 3 be the extension classified by x and let q S : Y × S → S be the canonical projection. Base change for the plus pushforward (see [PS20, Proposition 2.3.27-(2)]) reduces our task to computing the tor-amplitude of Moreover, since S is arbitrary, it is enough to prove that Since S is underived, F 1 and F 3 belong to QCoh ♥ (X × S). Since X has dimension n, it follows that E xt j q (F 3 , F 1 ) ≃ 0 for j > n. The conclusion follows. Proof. The assertion follows by noticing that the diagram Bun ext (X) Coh ext (X)

Extensions of coherent sheaves on Simpson's shapes.
In this section, we carry out an analysis similar to the one of the previous section in the case where Y is one of the Simpson's shapes X B , X dR , and X Dol , where X is a smooth and proper scheme.
3.4.1. Betti shape. Let K be a finite connected space. By [PS20, Proposition 3.1.1-(4)], K B is categorically proper and it has finite local tor-amplitude. In addition, by [PS20, Proposition 3.1.1-(3)], the map Spec(C) ≃ * B −→ X B is an effective epimorphism. Thus, the assumptions of Corollary 3.7 are satisfied. Therefore, the relative cotangent complex of the map Here q S : K B × S → S is the natural projection. In particular, we obtain: Proposition 3.13. Suppose that K B has cohomological dimension ≤ m. The relative cotangent complex of the map (3.5) has tor-amplitude within [−1, m − 1]. Furthermore, if K is the space underlying a complex scheme X of complex dimension n, then we can take m = 2n.
Proof. It is enough to prove that for every unaffine derived scheme S ∈ Aff and every point  These stacks are geometric and locally of finite presentation since the stacks Perf ext (X dR ) and Perf ∆ 1 ×∆ 1 (X dR ) are so. Since X dR satisfies the assumptions of Proposition 3.2, we may use similar arguments as in the proof of Proposition 3.8, and we get that the cotangent complex L Coh ext dR (X) is perfect and has tor-amplitude within [−1, 2n − 1]. Finally, by Lemma 2.38 we get Coh ext dR (X) ≃ Bun ext dR (X). As in the case of the Betti shape, we deduce that the relative cotangent complex of the map at a point x : S → Coh ext (X dR ) classifying an extension F 1 → F → F 2 in Perf(X dR × S) is computed by the pullback along the projection S × Coh dR (X)×Coh dR (X) Coh ext dR (X) → S of Here q S : X dR × S → S is the natural projection. In particular, we obtain: Proposition 3.15. Suppose that X is connected and of dimension n. Then the relative cotangent complex of the map (3.6) has tor-amplitude within [−1, 2n − 1].
Proof. It is enough to prove that for every unaffine derived scheme S ∈ Aff and every point x : S → Coh ext dR (X) classifying an extension F 1 → F → F 2 in Perf dR (X × S) of perfect complexes of tor-amplitude ≤ 0 relative to S, the complex q S+ (Hom X dR ×S (F 1 , F 2 )[−1]) has cohomological amplitude within [−1, 2n − 1]. Unraveling the definitions, this is equivalent to check that the complex q S * (Hom X dR ×S (F 2 , F 1 )) has cohomological amplitude within [−2n, 0]. In other words, we have to check that These stacks are geometric and locally of finite presentation since Perf ext (X Dol ), Perf ∆ 1 ×∆ 1 (X Dol ) and Perf ext (X nil Dol ), Perf ∆ 1 ×∆ 1 (X nil Dol ) are so. Since X Dol and X nil Dol satisfy the assumptions of Proposition 3.2, we may use similar arguments as in the proof of Proposition 3.8, and we get that the cotangent complexes L Coh ext Dol (X) and L Coh nil, ext Dol (X) are perfect and have tor-amplitude within [−1, 2n − 1]. As in the case of the Betti and de Rham shapes, we thus deduce that the relative cotangent complex of the map at a point x : S → Coh ext Dol (X) classifying an extension F 1 → F → F 2 in Perf(X Dol × S) is computed by the pullback along the projection S × Coh Dol (X)×Coh Dol (X) Coh ext Dol (X) → S of q S+ Hom X Dol ×S (F 1 , F 2 )[−1] .
Here q S : X Dol × S → S is the natural projection. In particular, we obtain: Proposition 3.17. Suppose that X is connected and of dimension n. Then the relative cotangent complex of the map (3.7) has tor-amplitude within [−1, 2n − 1].
Corollary 3.18. If X is a smooth projective complex curve, then the map (3.7) is derived locally complete intersection.

TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS
4.1. Convolution algebra structure for the stack of perfect complexes. Most of the results in this section are due to T. Dyckerhoff and M. Kapranov [DK12]. For the convenience of the reader we briefly recall their constructions.
where ∆ is the simplicial category. We write T n instead of T([n]). Given any C-linear stable ∞-category C, we let S • C : ∆ op −→ Cat ∞ be the subfunctor of Fun(T(−), C) that sends [n] to the full subcategory S n C of C T n := Fun(T n , C) spanned by those functors F : T n → C satisfying the following two conditions: (1) F(i, i) ≃ 0 for every 0 ≤ i ≤ n; (2) for every 0 ≤ i, j ≤ n − 1, i ≤ j − 1, the square is a pullback in C.
We refer to S • C as the ∞-categorical Waldhausen construction on C. It follows from [DK12, Theorem 7.3.3] that S • C is a 2-Segal object in Cat ∞ . Consider the functor is again a 2-Segal object in dSt. The same construction can be performed using Perf instead of APerf: thus we obtain 2-Segal objects S • Perf and S • Perf(X) in dSt.
As in Section 3, we extract a full substack of coherent sheaves as follows. For every n ≥ 0, let N := n(n+1) 2 . Evaluation at (i, j) ∈ T n induces a well defined map S n APerf(X) → APerf(X) N . We define S n Coh(X) by the fiber product S n Coh(X) S n APerf(X) Notice that for n = 2 this construction yields a canonical identification S 2 Coh(X) ≃ Coh ext (X). We will prove We have the following commutative diagram: The bottom horizontal map is an equivalence. After evaluating on S ∈ dAff, we see that the vertical maps are induced by fully faithful functors. It is therefore enough to check that the top horizontal functor is essentially surjective. Unraveling the definitions, we have to check the following condition. Let F : T n → APerf(X × S) be a semigrid of length n and write F a,b for the image of (a, b) ∈ T n . Then if F a,b ∈ Coh S (X × S) for a, b ∈ {0, 1, . . . , i, j, j + 1, . . . , n} or for a, b ∈ {i, i + 1, . . . , j}, then F a,b ∈ Coh S (X × S) for all a, b. A simple induction argument reduces our task to proving the following statement: Suppose that is a pullback square in Perf(X × S). Assume that G 0 , G 2 and G 3 belong to Coh S (X × S). Then G 1 belongs to Coh S (X × S) as well. Since G 0 and G 3 have tor-amplitude ≤ 0 relative to S, we see that, locally on X, for every G ∈ Coh ♥ (S) one has π k (p * (G 1 ⊕ G 2 ) ⊗ G) ≃ 0 for k ≥ 1, where p : X × S → S is the canonical projection. However, π k (p * (G 2 ) ⊗ G) ≃ 0 because G 2 has tor-amplitude ≤ 0 relative to S. Therefore π k (p * (G 1 ) ⊗ G) ≃ 0 as well. The proof is therefore complete.
Recall now from [DK12, Theorem 11.1.6] that if T is a presentable ∞-category then there is a canonical functor Here Corr × (T ) denotes the (∞, 2)-category of correspondences equipped with the symmetric monoidal structure induced from the cartesian structure on T . See [GaR17a, §7.2.1 & §9.2.1]. As E 1 -monoid objects in correspondences play a significant role for us, we introduce the following terminology: Definition 4.2. Let T be an ∞-category with finite products. We define the ∞-category of E 1monoid objects in T as the ∞-category Alg E 1 (Corr × (T )). ⊘ Taking T = dSt, we therefore obtain the following result: Proposition 4.3. Let X ∈ dSt be a derived stack. The 2-Segal object S • APerf(X) (resp. S • Perf(X), S • Coh(X)) endows APerf(X) (resp. Perf(X), Coh(X)) with the structure of an E 1 -monoid object in dSt.
We conclude this section with an analysis of the geometricity of S n Coh(X). First, we observe that S n Perf canonically coincides with Toën-Vaquié's moduli of objects: To show that S n Perf is locally geometric and locally of finite presentation, we use the following two lemmas.
We will make use of the following notation: if C is an ∞-category, C ω denotes the full subcategory spanned by compact objects of C.
Lemma 4.4. Let C ∈ Pr L,ω C be a compactly generated C-linear stable ∞-category and let I be a finite category. Then: (1) The canonical map is an equivalence. 25 (2) Assume furthermore that the idempotent completion of I is finite. If C is of finite type (resp. proper), then so is Fun(I, C).
Proof. The canonical functor is fully faithful. [Lur09, Proposition 5.3.4.13] shows that it lands in the full subcategory Fun(I, C) ω of Fun(I, C) spanned by compact objects. Therefore, [Lur09, Proposition 5.3.5.11-(1)] shows that the induced map Ind(Fun(I, C ω )) → Fun(I, C) is fully faithful. We now observe that compact objects in Fun(I, C) coincide with Fun(I, C ω ). We already saw one inclusion. For the converse, for every i ∈ I consider the functor given by evaluation at i: Since C is presentable, we see that both left and right Kan extensions along {i} ֒→ I exist, providing a left adjoint L i and a right adjoint R i to ev i . Moreover, since I is finite, the functor R i is computed by a finite limit, and therefore R i commutes with filtered colimits. Equivalently, ev i preserves compact objects. This implies that every object in Fun(I, C) ω takes values in C ω . To complete the proof of statement (1), it is enough to prove that Fun(I, C) is compactly generated. Let F ∈ Fun(I, C) be a functor. Our goal is to prove that the canonical map colim is an equivalence. Since the functors ev i are jointly conservative and they commute with colimits, it is enough to check that for every i ∈ I the induced map colim is an equivalence. We can factor this map as colim Since C is compactly generated, the second map is an equivalence. Therefore, it is enough to prove that the functor is cofinal. Let α : X → F(i) be a morphism, with X ∈ C ω . We will prove that the ∞-category is filtered, hence contractible. Let J be a finite category and let A : J → E be a diagram. For every j ∈ J, we get a map Since ev i commutes with filtered colimits, L i commutes with compact objects, hence L i (X) is a compact object. Since J is a finite category and since compact objects are closed under finite colimits, we deduce that A factors through Fun(I, C) ω L i (X)//F . Applying ev i , we obtain the required extension J ⊲ → E of A. The proof of (1) is therefore complete.
To prove (2), we first observe that It is therefore enough to prove that Fun(I, C-Mod) is smooth and proper. Observe that the collection of objects {L i (C)} i∈I of Fun(I, C-Mod) are compact objects and they generate the category, because the evaluation functors ev i are jointly conservative. Since I is a finite category, the object We have Now, PSh(I) ω is the idempotent completion of I, which is finite by assumption. Therefore, it is a compact object in Cat ∞ , and we can rewrite the above expression as This shows that Fun(I, C-Mod) is compact, and the proof is thus complete.
Lemma 4.5. Let C be a C-linear stable ∞-category. If C is of finite type (resp. proper) then S n C is of finite type (resp. proper).
Proof. There is a natural inclusion ∆ n−1 ֒→ T n , sending [i] to the map (0, i + 1) : ∆ 1 → ∆ n . Left Kan extension along this map provides a canonical map Corollary 4.6. Let X be a derived stack and assume that: (1) there exists a flat effective epimorphism u : U → X, where U is a smooth geometric stack; (2) the derived stack Perf(X) is locally geometric and locally of finite presentation.
Then for every n ≥ 0, the derived stack S n Coh(X) is geometric and locally of finite presentation.

Categorified Hall algebras.
Having the 2-Segal object S • Coh(X) at our disposal, we now explain how to extract a categorified Hall algebra out of it. As a first step, we endow with the structure of a E 1 -monoid object. The main technical idea involved is the universal property of the (∞, 2)-category of correspondences proved in in [GaR17a, Theorem 7.3.2.2] and [Mac20, Theorem 4.4.6], which we will use below.
Since, we are mostly interested in obtaining a convolution algebra structure on the G-theory spectrum of Coh(X), we need to replace QCoh with Coh b . As the stack Coh(X) is typically not quasi-compact, it is important for us to work within the framework of Appendix A and to take some extra care in correctly defining the category of sheaves Coh b (Coh(X)).
Let Corr × (dSch qcqs ) be the symmetric monoidal (∞, 2)-category of correspondences on quasicompact and quasi-separated derived schemes. • it sends a derived geometric stack F ∈ Corr × (dGeom) to QCoh(F); • it sends a 1-morphism • the right-lax symmetric monoidal structure is given by Denoting by pr Z : Z × Y → Z and pr Y : Z × Y → Y the two natural projections, we have Let X be a derived stack. As shown in Proposition 4.3, the stack Coh(X) defines an E 1monoid object in Corr × (dSt), the algebra structure being canonically encoded in the 2-Segal object S • Coh(X). In the main examples considered in this paper, Coh(X) is furthermore geometric, see Propositions 2.24, 2.33, 2.39, and 2.40. In this case, we can apply QCoh and obtain a stably monoidal ∞-category Now, we would like to define an E 1 -monoidal structure on Coh b (Coh(X)). This will be achieved by restricting the functor QCoh to a right-lax monoidal functor Coh b from the category of correspondence. As said before, since Coh(X) is typically not quasi-compact, we need to work in the framework developed in Appendix A.
In Corollary A.2 we construct a fully faithful and limit-preserving embedding Since (−) ind commutes with limits, we see that the simplicial object is a 2-Segal object, and therefore defines an E 1 -monoidal structure on Coh(X) ind in Corr × (Ind(dGeom qc )). When the context is clear, we drop the subscript (−) ind in the above expression.
On the other hand, Corollary A.14 provides a right-lax symmetric monoidal functor QCoh pro : Corr × (Ind(dGeom qc )) rps,all −→ Pro(Cat st ∞ ) In particular, we obtain a refinement of (4.1), i.e., the stable pro-category "lim" acquires a canonical E 1 -monoidal structure. The colimit is taken over all quasi-compact open substacks of Coh(X) (but an easy cofinality argument shows that one can also employ a chosen quasi-compact exhaustion of Coh(X)).
Now, we see how to replace QCoh by Coh b .
Definition 4.7. A morphism f : X → Y in Ind(dGeom qc ) is said to be ind-derived lci if for every Z ∈ dGeom qc and any morphism Z → Y, the pullback X × Y Z is a quasi-compact derived geometric stack and the map X × Y Z → Z is derived lci. ⊘ Lemma 4.8. Let f : X → Y ∈ dGeom be a quasi-compact derived lci morphism. Then the induced morphism Proof. Using Lemma A.1-(1) we can choose an open Zariski exhaustion of Y, where each U α is a quasi-compact derived geometric stack. Set Since f is quasi-compact, the V α are quasi-compact derived stacks and they form an open Zariski exhaustion of X. Let f α : V α → U α be the induced morphism, which is lci. Therefore, Lemma A.1-(3) implies that and f ind ≃ "colim" f α . Let Z ∈ dGeom qc be a quasi-compact derived geometric stack and let g : Z → Y be a morphism. Using Lemma A.1-(2), we find an index α such that g factors through U α . In particular, the pullback Z × Y X fits in the following ladder: Since the morphism V α → U α is quasi-compact and derived lci, so is Z × Y X → Z. This completes the proof.
Consider now the subcategory Corr × (Ind(dGeom qc )) rps,lci of Corr × (Ind(dGeom qc )) rep,all where the horizontal arrows are taken to be ind-derived lci morphisms and the vertical arrows to be morphisms representable by proper schemes. Consider the restriction of QCoh to this subcategory:  Since each f α is representable by proper schemes, this functor restricts to a morphism Using [Toë12, Lemma 2.2], we similarly deduce that if f : X → Y is a morphism in Ind(dGeom qc ) which is ind-derived lci, then the pullback functor restricts to a morphism This implies that QCoh pro admits a right-lax monoidal subfunctor Applying the tor-amplitude estimates obtained in §3, we obtain the following result: Theorem 4.9. Let X be one of the following derived stacks: (1) a smooth proper complex scheme of dimension either one or two; (2) the Betti, de Rham or Dolbeault stack of a smooth projective curve.
Then the composition where the map on the right-hand side is induced by the 1-morphism in correspondences: (4.2) endows Coh b pro (Coh(X)) with the structure of an E 1 -monoidal stable ∞-pro-category.
Proof. By Proposition 4.3 we know that S • Coh(X) is a 2-Segal object in dSt. Using Corollary A.2, we see that (S • Coh(X)) ind is a 2-Segal object in Corr × (dSt), and therefore it defines an E 1 -monoid object in Corr × (Ind(dGeom qc )). Proposition 3.6 shows that the map p is quasi-compact. On the other hand Proposition 3.10 shows that p is lci when X is a smooth and proper complex scheme of dimension 1 or 2, while Corollaries 3.14, 3.16 and 3.18 show that the same is true when X is the Betti, de Rham or Dolbeault stack of a smooth projective curve. Therefore, Lemma 4.8 shows that in all these cases p ind is ind-derived lci. Moreover, the morphism q is representable by proper schemes: indeed, one can show that q is representable by Quot schemes 26 and it is known that these are proper schemes. The 2-Segal condition therefore guarantees that (S • Coh(X)) ind endows Coh(X) ind with the structure of an E 1 -monoid object in Corr × (Ind(dGeom qc )) rps,lci . Applying the right-lax monoidal functor Coh b pro : Corr × (Ind(dGeom qc )) rps,lci → Pro(Cat st ∞ ), we conclude that Coh b pro (Coh(X)) inherits the structure of an E 1 -monoid object in Pro(Cat st ∞ ).
Since E 1 -monoid objects in Pro(Cat st ∞ ) are (by definition) the same as E 1 -monoidal categories in Pro(Cat st ∞ ), we refer to the corresponding tensor structure as the CoHA tensor structure on Coh b pro (Coh(X)). We denote this monoidal structure by ⋆ .
Remark 4.10. Let X be a smooth projective complex scheme of dimension either one or two. Then the moduli stacks introduced in §2.3.2 are E 1 -monoid objects in Corr × (Ind(dGeom qc )) rps,lci . If X is quasi-projective, then Coh prop (X) (resp. Coh d prop (X)) is an E 1 -monoid object in Corr × (Ind(dGeom qc )) rps,lci (resp. for any integer d ≤ dim(X)).
Similarly, for the Dolbeault shape, a statement similar to that of Theorem 4.9 holds for all the moduli stacks introduced in §2.4.3. Let X ∈ dSt be a derived stack and let G ∈ Mon gp E 1 (dSt × ) be a grouplike E 1 -monoid in derived stacks acting on X. Typically, G will be an algebraic group. Since the monoidal structure on dSt is cartesian, we can use [Lur17, Proposition 4.2.2.9] to reformulate the datum of the G-action on X as a diagram satisfying the relative 1-Segal condition. Informally speaking, A G,X is the diagram which encodes at the same time the E 1 -structure on G and the action on X. We denote the geometric realization of the top simplicial object by [X/G], while it is customary to denote the geometric realization of the bottom one by BG. We now define We also write Perf G (X) for S 1 Perf G (X). Notice that We can therefore unpack the datum of the map S • Perf G (X) → BG by saying that G acts canonically on S • Perf(X). From this point of view, we have a canonical equivalence 27 As an immediate consequence we find that ) . The right-hand side is the G-equivariant stable ∞-category of bounded coherent complexes on Perf(X). Since the functor commutes with limits, we deduce: Assume now that G is geometric (e.g. an affine group scheme) and that there exists a geometric derived stack U equipped with the action of G and a G-equivariant, flat effective epimorphism u : U → X. Then the induced morphism [U/G] → [X/G] is an effective epimorphism which is flat relative to BG. We define S • Coh G (X) ∈ Fun(∆ op , dSt /BG ) as follows. Given an affine derived scheme S = Spec(A) and a morphism x : S → BG, we set We immediately obtain: Corollary 4.12. Let X be a geometric derived stack. Then the simplicial derived stack S • Coh G (X) : ∆ op → dSt /BG is a 2-Segal object.
The above 2-Segal object endows Coh(X) with the structure of a G-equivariant E 1 -convolution algebra in dSt.
Corollary 4.13. Let X ∈ dSt be a derived stack and let u : U → X be a flat effective epimorphism from a geometric derived stack U. Assume that the 2-Segal object S • Coh(X) endows Coh(X) with the structure of an E 1 -monoid object in Corr × (dSt) rps,lci . Let G be a smooth algebraic group acting on both U and X assume that u has a G-equivariant structure. Then the G-equivariant 2-Segal object S • Coh G (X) induces a E 1 -monoidal structure on Coh b pro (Coh G (X)) ≃ Coh b pro,G (Coh(X)).
Proof. Similarly to the proof of Theorem 4.9, all we need to check is that the map ev 3 × ev 1 : Coh ext G (X) −→ Coh G (X) × Coh G (X) is quasi-compact and derived lci and that the map is representable by proper schemes. Observe that for i = 1, 2, 3 the right and the outer squares in the commutative diagram are pullback squares. Therefore so is the left one. The conclusion now follows because Spec(k) → BG is a smooth atlas and from the analogous statements for Coh(X), which have been proven in the proof of Theorem 4.9.

DECATEGORIFICATION
Now, we investigate what happens to our construction when we decategorify, i.e., when we pass to the G-theory (introduced in §A.2). A first consequence of our Theorem 4.9 is the following: Proposition 5.1. Let Y be one of the following derived stacks: (1) a smooth proper complex scheme of dimension either one or two; (2) the Betti, de Rham or Dolbeault stack of a smooth projective curve.
The CoHA tensor structure on Coh b pro (Coh(Y)) endows G(Coh(Y)) with the structure of a E 1 -monoid object in Sp.
Remark 5.2. Up to our knowledge, the above result provides the first construction of a Hall algebra structure on the full G-theory spectrum of Coh(Y). Furthermore, the above results hold also for the stack Coh d prop (S), where S is a smooth (quasi-)projective complex surface and 0 ≤ d ≤ 2 is an integer. △ Taking π 0 of G(Coh(Y)), we obtain an associative algebra structure on G 0 (Coh(Y)). When Y is the de Rham shape of a curve, this is a K-theoretical Hall algebra associated to flat vector bundles on the curve, and it has not been previously considered in the literature. On the other hand, in [Zha19, KV19] and in [SS20] the authors considered the cases of Y being a surface or being the Dolbeault shape of a curve, respectively. Below, we briefly review the construction in [KV19] and prove that the two algebra structures on G 0 (Coh(Y)) obtained using our method or theirs agree.
Let S be a smooth (quasi-)projective complex surface and let 0 ≤ d ≤ 2 be an integer. To lighten the notation, write Proposition 3.6 implies that be the natural inclusion and let E 0 := i * (E ). Set

Consider the commutative diagram
The right square is a pullback, by construction. Therefore, the diagram canonically commutes. Passing to G-theory, the functors i * and j * induce equivalences, thereby identifying p * et p * .
with the construction of the virtual pullback p 0 ! by Kapranov-Vasserot. In [KV19, §3.3], they take as additional input an explicit resolution of E 0 as a 3-terms complex is a derived pullback square. Therefore, we can factor p : As in loc.cit. the operation p ! 0 is defined as the composition , to compare the two constructions it is enough to verify that . This follows at once by unraveling the definition of s ! . Thus our construction of the Hall product on G 0 (Y) ≃ G 0 (Y 0 ) coincides with theirs, and we obtain: Theorem 5.3. Let S be a smooth (quasi-)projective complex surface and let 0 ≤ d ≤ 2 be an integer. There exists an algebra isomorphism between π 0 lim K(Coh b pro (Coh d prop (S))) and the K-theoretical Hall algebra of S as defined in [Zha19,KV19]. Thus, the CoHA tensor structure on the stable ∞-category Coh b pro (Coh d (S)) is a categorification of the latter. Finally, if in addition S is toric, similar results holds in the equivariant setting.
5.1. The equivariant case. Let Coh 0 (C 2 ) := Coh 0 prop (C 2 ) be the geometric derived stack of zerodimensional coherent sheaves on C 2 . Note that the natural C * × C * -action on C 2 lifts to an action on Coh 0 (C 2 ).
A convolution algebra structure on the Grothendieck group G C * ×C * 0 ( Coh 0 (C 2 ) cl ) of the truncation of Coh 0 (C 2 ) has been defined in [SV13a,SV12]. In those papers, the convolution product is defined by using an explicit presentation of Coh 0 (C 2 ) cl as disjoint union of quotient stacks. Moreover, as proved in those papers, the convolution algebra on G C * ×C * 0 ( Coh 0 (C 2 ) cl ) is isomorphic to a positive nilpotent part U + q,t (gl 1 ) of the elliptic Hall algebra U q,t (gl 1 ) of Burban and Schiffmann [BSc12].
In [KV19, Proposition 6.1.5], the authors showed that the convolution product defined by using virtual pullbacks coincides with the convolution product defined by using the explicit description of Coh 0 (C 2 ) cl in terms of quotient stacks. Thanks to this result (which holds also equivariantly), by arguing as in the previous section, one can show the following.
The Grothendieck group G C * 0 ( Higgs naïf (X) cl ) of the truncation of Higgs naïf (X) is endowed with a convolution algebra structure as constructed in [SS20] and in [Min18] for the rank zero case. In the rank zero case, the construction of the product follows the one in [SV13a,SV12] discussed above, while in the higher rank case one uses a local description of Higgs naïf (X) as a quotient stack; then the construction of the product is performed locally and one glues suitably to get a global convolution product. By similar arguments as above and thanks to Remark 2.41, we have the following.
Proposition 5.5. Let X be a smooth projective complex curve. There exists an algebra isomorphism between π 0 lim K(Coh b pro, C * (Coh(X Dol )) and the K-theoretical Hall algebra of Higgs sheaves on X introduced in [SS20,Min18]. Thus, the CoHA tensor structure on the stable ∞-category Coh b pro, C * (Coh(X Dol )) is a categorification of the latter.
Remark 5.6. The Betti K-theoretical Hall algebra of a smooth projective complex curve X can be defined by using a K-theoretic analog of the Kontsevich-Soibelman CoHA formalism due to Pȃdurariu in [Pad19] for the quiver with potential defined by Davison in [Dav17]. We expect that this algebra is isomorphic to our decategorification of the Betti Cat-HA. △ Finally, it is relevant to mention that our approach defines the de Rham K-theoretical Hall algebra of a smooth projective curve X. The nature of this algebra is at the moment mysterious. Note that [SV12] gives an indication that the algebra should at least contain the K-theoretical Hall algebra of the preprojective algebra of the g-loop quiver, where g is the genus of X.
Remark 5.7. By using the formalism of Borel-Moore homology of higher stacks developed in [KV19] and their construction of the Hall product via virtual pullbacks, we obtain equivalent realizations of the COHA of a surface by [KV19] and of the Dolbeault CoHA of a curve [SS20,Min18]. Moreover, we define the de Rham cohomological Hall algebra of a curve. △

A CAT-HA VERSION OF THE HODGE FILTRATION
In this section, we shall present a relation between the de Rham categorified Hall algebra and the Dolbeault categorified Hall algebra, which is induced by the Deligne categorified Hall algebra (Coh b C * (Coh(X Del )), ⋆ Del ). Deligne's λ-connections interpolate Higgs bundles with vector bundles with flat connections, and they were used by Simpson [Sim97] to prove the non-abelian Hodge correspondence. For this reason, the relation we prove in this section can be interpreted as a version of the Hodge filtration in the setting of categorified Hall algebras.
6.1. Categorical filtrations. We let The group structure on BG m endows Perf gr with a Künneth monoidal structure. The same holds for Perf filt . With respect to these monoidal structures, the above functors are symmetric monoidal.
Definition 6.1. Let C be a stable C-linear ∞-category. A lax filtered structure on C is the given of We refer to the datum (C, C • , Φ) as the datum of a lax filtered stable (C-linear) ∞-category. We say that a lax filtered ∞-category is filtered if Φ is an equivalence. ⊘ Definition 6.2. Let (C, C • , Φ) be a lax filtered stable ∞-category. A lax associated graded category is the given of an ∞-category G ∈ Perf gr -Mod(Cat st ∞ ) together with a morphism Ψ : C • ⊗ Perf filt Perf gr −→ G .
We say that (G, Ψ) is the associated graded if the morphism Ψ is an equivalence. ⊘ 6.2. Hodge filtration. Let X be a smooth projective complex curve. We will apply the formalism in the previous section with C = Coh b pro (Coh(X dR )) and G = Coh b pro, C * (Coh ss, 0 (X Dol )). Let X Del be the deformation to the normal bundle of the map X → X dR as constructed in [GaR17b,§9.2.4]. Then X Del admits a canonical G m -action and it is equipped with a canonical G m -equivariant map X Del → A 1 . We refer to X Del as Deligne's shape of X. Furthermore, we let be the quotient by the action of G m . We refer to X Del, G m as the equivariant Deligne shape of X. See also [PS20, §6.1] for a more in-depth treatment of the Deligne shape. We define Coh /A 1 (X Del ) as the functor We have canonical maps Coh /A 1 (X Del ) → A 1 and Unraveling the definitions, we see that We also consider the open substack Coh * /A 1 (X Del ) ⊂ Coh /A 1 (X Del ) for which the fiber at zero is the derived moduli stack Coh ss, 0 (X Dol ) of semistable Higgs bundles on X of degree zero (cf. [Sim09,§7]).
Similarly, we can define the derived moduli stacks of extensions of Deligne's λ-connections. Thus, we have the convolution diagram in dSt /A 1 : Because of Corollaries 3.16 and 3.18, it follows that the map p above is derived lci. A similar result holds when we restrict to the open substack Coh * /A 1 (X Del ) and the corresponding open substack of extensions. Following the same arguments as in §4, we can encode such convolution diagrams into 2-Segal objects, and obtain the following:

Proposition 6.4. Let X be a smooth projective complex curve. Then
• there is a 2-Segal object S • Coh /A 1 (X Del ) which endows Coh /A 1 (X Del ) with the structure of an E 1 -monoid object in Corr × dGeom /A 1 lci,rps ; A similar result holds for Coh * /A 1 (X Del ) and Coh * /[A 1 /G m ] (X Del, G m ).
Corollary 6.5. Coh b pro (Coh /A 1 (X Del )) and By combining the results above with (6.1), we get: Theorem 6.6. Let X be a smooth projective complex curve. Then ) is a module over Perf filt and we have E 1 -monoidal functors: Following Simpson [Sim09,§7], we expect the following to be true: Conjecture 6.7 (Cat-HA version of the non-abelian Hodge correspondence). The morphisms Φ * and Ψ * are equivalences, i.e., Coh b pro (Coh(X dR )) is filtered by Coh b pro, C * (Coh * /A 1 (X Del )) with associated graded Coh b pro, C * (Coh ss, 0 (X Dol )).

A CAT-HA VERSION OF THE RIEMANN-HILBERT CORRESPONDENCE
In this section we briefly consider a complex analytic analogue of the theory developed so far. Thanks to the foundational work on derived analytic geometry [Lur11c, PY16, Por15, HP18] most of the constructions and results obtained so far carry over in the analytic setting. After sketching how to define the derived analytic stack of coherent sheaves, we focus on two main results. The first, is the construction of a monoidal functor between the algebraic and the analytic categorified Hall algebras coming from nonabelian Hodge theory. The second is to provide an equivalence between the analytic categorified Betti algebra and the de Rham one. This equivalence is an instance of the Riemann-Hilbert correspondence, and it is indeed induced by the main results of [Por17,HP18].
7.1. The analytic stack of coherent sheaves. We refer to [HP18,§2] for a review of derived analytic geometry. Using the notations introduced there, we denote by AnPerf the complex analytic stack of perfect complexes (see §4 in loc. cit.). Similarly, given derived analytic stacks X and Y, we let AnMap(X, Y) be the derived analytic stack of morphisms between them.
Fix a derived geometric analytic stack X. We wish to define a substack of AnPerf(X) := AnMap(X, AnPerf) classifying families of coherent sheaves on X. The same ideas of §2 apply, but as usual some extra care to deal with the notion of flatness in analytic geometry is needed.
Definition 7.1. Let S be a derived Stein space and let f : X → S be a morphism of derived analytic stacks. We say that an almost perfect complex F ∈ APerf(X) has tor-amplitude within [a, b] relative to S (resp. tor-amplitude ≤ n relative to S) if for every G ∈ APerf ♥ (S) one has We let APerf ≤n S (X) denote the full subcategory of APerf(X) spanned by those sheaves of almost perfect modules F on X having tor-amplitude ≤ n relative to S. We write Coh S (X) := APerf ≤0 S (X) , and we refer to it as the ∞-category of flat families of coherent sheaves on X relative to Y. ⊘ The above definition differs from [PY18, Definitions 7.1 & 7.2]. We prove in Lemma 7.3 that they are equivalent.
Lemma 7.2. Let X be a derived analytic stack, let S ∈ dStn C and let f : X → S be a morphism in dAnSt. Assume that there exists a flat 28 effective epimorphism u : U → X. Then F ∈ APerf(X) has tor-amplitude within [a, b] relative to S if and only if u * (F ) has tor-amplitude within [a, b] relative to S.
Proof. Let G ∈ APerf ♥ (S). Then since u is a flat effective epimorphism, we see that the pullback functor is t-exact and conservative. Therefore The conclusion follows.

Lemma 7.3. Let f : X → S be a morphism of derived analytic stacks. Assume that X is geometric and that S is a derived Stein space. Then F ∈ QCoh(X) has tor-amplitude within [a, b] relative to S if and only if there exists a smooth Stein covering {u
Proof. Using Lemma 7.2, we can reduce ourselves to the case where X is a derived Stein space. Notice that F ⊗ O X f * G ∈ APerf(X). Therefore, Cartan's theorem B applies and shows that When G = O S this morphism is obviously an equivalence. We claim that it is an equivalence for any G ∈ APerf(S). In this case, we see that since η F ,G is an equivalence when G = O S , it is also an equivalence whenever M (and hence G) is perfect. In the general case, we use [Lur17,7.2.4.11(5)] to find a simplicial object P • ∈ Fun(∆ op , APerf(A S )) such that

This question is local on S. Write
and proving that η F ,G is an equivalence is reduced to checking that f * preserves the above colimit. Since the above diagram as well as its colimit takes values in APerf(X), we can apply Cartan's theorem B. The descent spectral sequence degenerates, and therefore the conclusion follows.
28 A morphism f : U → X of derived analytic stacks is said to be flat if the pullback functor f * : APerf(X) → APerf(U) is t-exact. Corollary 7.4. Let f : X → S be a morphism as in the previous lemma. Let j : S cl → S be the canonical morphism and consider the pullback diagram Then an almost perfect complex F ∈ APerf(X) has tor-amplitude within [a, b] relative to S if and only if i * F has tor-amplitude within [a, b] relative to S cl .
Proof. The map j is a closed immersion and therefore so is i. In particular, for any G ∈ APerf( S cl ) the canonical map is an equivalence. 29 Moreover, the projection formula holds for i and i * is t-exact. Suppose that F has tor-amplitude within [a, b] relative to S. Let G ∈ APerf ♥ ( S cl ). Then Since j * is t-exact, j * G ∈ APerf ♥ (S), and therefore the above tensor product is concentrated in homological degree [a, b]. In other words, i * F has tor-amplitude within [a, b] relative to S cl . For the converse, it is enough to observe that j * induces an equivalence APerf ♥ ( S cl ) ≃ APerf ♥ (S).
Definition 7.5. Let S ∈ dStn C and let f : X → S be a morphism in dAnSt. A morphism u : U → X is said to be universally flat relative to S if for every derived Stein space S ′ ∈ dSt and every morphism S ′ → S the induced map S ′ × S U → S ′ × S X is flat. We say that a morphism u : U → X is universally flat if it is universally flat relative to Spec(C). ⊘ Remark 7.6. Let S be an affine derived scheme and let f : X → S and u : U → X be morphisms of derived stacks. If f is flat, then for every morphism S ′ → S of affine derived schemes, the morphism S ′ × S U → S ′ × S X is flat.
Proof. Since u : U → X is universally flat, the morphism U × S → X × S and U × S ′ → X × S ′ are flat. Therefore Lemma 7.2 shows that we can restrict ourselves to the case X = U. Using Corollary 7.4, we can reduce the problem to the case where S and S ′ are underived. Since the question is local on X, we can furthermore assume that X is a Stein space. At this point, the conclusion follows directly from [Dou66, §8.3, Proposition 3].
Using the above corollary, we can therefore define a derived analytic stack AnCoh(X), which is a substack of AnPerf(X).
In what follows, we will often restrict ourselves to the study of AnCoh(X an ), where now X is an algebraic variety. Combining [HP18, Proposition 5.2 & Theorem 5.5] we see that if X is a proper complex scheme, then there is a natural equivalence 30 Perf(X) an ≃ AnPerf(X an ) . (7.1) We wish to extend this result to Coh(X) an and AnCoh(X an ). Let us start by constructing the map between them. The map Perf(X) an → AnPerf(X an ) is obtained by adjunction from the map which, for S ∈ dAff afp , is induced by applying (−) ≃ : Cat ∞ → S to the analytification functor It is therefore enough to check that this functor respects the two subcategories of families of coherent sheaves relative to S and S an , respectively.
Lemma 7.8. Let f : X → S be a morphism of derived complex stacks locally almost of finite presentation. Suppose that X is geometric and that S is affine. Then F ∈ APerf(S) has tor-amplitude within [a, b] relative to S if and only if F an ∈ APerf(X an ) has tor-amplitude within [a, b] relative to S an .
Proof. Suppose first that F an has tor-amplitude within [a, b] relative to S an . Let G ∈ APerf ♥ (S).
Then we have to check that As the analytification functor (−) an is t-exact and conservative, this is equivalent to checking that we have There is a natural analytification functor relative to U is an equivalence for every H ∈ APerf(X).
Fix now G ∈ APerf(S an ). If G ≃ ( G) an for some G ∈ APerf ♥ (S), then the equivalence (7.2) shows that π i (F an ⊗ O X an f an * (G)) = 0 30 The derived analytification functor has been firstly introduced in [ Here ε * V i is the functor introduced in [HP18, §4.2]. At this point, we observe that Lemma 2.4 guarantees that b * U (F ) has tor-amplitude within [a, b] relative to Spec(A U ). The conclusion then follows from the argument given in the first case.
As a consequence, we find a morphism Coh(X) −→ AnCoh(X an ) • (−) an , which by adjunction induces µ X : Coh(X) an −→ AnCoh(X an ) , which is compatible with the morphism Perf(X) an → AnPerf(X an ). Proposition 7.9. If X is a proper complex scheme, the natural transformation is an equivalence.
Proof. Reasoning as in the proof of the equivalence (7.1) in [HP18, Proposition 5.2], we reduce ourselves to check that for every derived Stein space U ∈ dStn C and every compact derived Stein subspace K of U, the natural morphism Here the colimit is taken over the family of open Stein neighborhoods V of K inside U. Using [HP18, Lemma 5.13] we see that for every V, the functor is fully faithful. The conclusion now follows by combining [HP18, Proposition 5.15] and the "only if" direction of Lemma 7.8. 7.2. Categorical Hall algebras in the C-analytic setting. Let X ∈ dAnSt be a derived analytic stack. In the previous section, we have introduced the analytic stack AnCoh(X) parameterizing families of sheaves of almost perfect modules over X of tor-amplitude ≤ 0 relative to the base. Similarly, we can define the derived analytic stacks AnPerf ext , AnPerf ext (X), and AnCoh ext (X). We deal directly with the Waldhausen construction.
We define the simplicial derived analytic stack S • AnPerf : dStn op C −→ Fun(∆ op , S) by sending an object [n] ∈ ∆ and a derived Stein space S to the full subcategory of 31 S n Perf(S) ֒→ Fun(T n , Perf(S)) .
Since each T n is a finite category, [ in Fun(∆ op , dSt). By adjunction, we therefore find a morphism of simplicial objects (S • Coh(X)) an −→ S • AnCoh(X an ) .
Remark 7.11. Suppose that X is such that each S n Coh(X) is geometric. Then [HP18, Proposition 7.3] implies that (S • Coh(X)) an is a 2-Segal object in dAnSt. △ Let Y ∈ dAnSt be a derived analytic stack and let u : U → Y be a flat effective epimorphism from an underived geometric analytic stack U. As above, we are able to define the derived stack AnCoh(Y). Notice that AnCoh(Y) only depends on Y and not on U. However, as in the algebraic case, the proof of the functoriality of AnCoh(Y) relies on the existence of U and on Lemma 7.7. In addition, we have This is the analytic counterpart of Lemma 2.11.
Similarly, we can define AnCoh ext (Y) and AnBun ext (Y) and more generally their Waldhausen analogues S • AnCoh(Y) and S • AnBun(Y). We immediately obtain: Proposition 7.12. Let Y ∈ dAnSt be a derived analytic stack and let u : U → Y be a flat effective epimorphism from an underived geometric analytic stack U. Then S • AnCoh(Y) is a 2-Segal object and it endows AnCoh(Y) with the structure of an E 1 -monoid object in dAnSt.
As a particular case, let X be a smooth proper connected analytic space. Simpson's shapes X B , X dR , X Dol , and X Del also exist in derived analytic geometry (as introduced e.g. in [HP18, § 5.2]). We have the following analytic analog of Proposition 4.3.
Corollary 7.13. Let X ∈ dAnSt be a derived geometric analytic stack and let Y be one of the following stacks: X B , X dR , or X Dol . Then S • AnCoh(Y) is a 2-Segal object in dAnSt, and therefore it endows the derived analytic stack AnCoh(Y) with the structure of an E 1 -monoid object.
Our next step is to construct the categorified Hall algebras in the analytic setting. The lack of quasi-coherent sheaves in analytic geometry forces us to consider a variation of the construction considered in §4.2. We start with the following construction: Construction 7.14. Let T disc (C) be the full subcategory of Sch C spanned by finite dimensional affine spaces A n C . Given an ∞-topos X , sheaves on X with values in CAlg C can be canonically identified with product preserving functors T disc (C) → X . We let R Top(T disc (C)) denote the ∞category of ∞-topoi equipped with a sheaf of derived commutative C-algebras. The construction performed in [Lur11b, Notation 2.2.1] provides us with a functor Equipping both ∞-categories with the cocartesian monoidal structure, we see that Γ can be upgraded to a right-lax symmetric monoidal structure. Composing with the symmetric monoidal functor QCoh : CAlg C → Cat st ∞ we therefore obtain a right-lax symmetric monoidal functor We denote the sheafification of this functor with respect to theétale topology on R Top(T disc (C)) (see [Lur11b, Definition 2.3.1]) by Observe that O-Mod is canonically endowed with a right-lax symmetric monoidal structure.
Equipping both ∞-categories with the cartesian monoidal structure, we see that (−) alg can be upgraded to a left-lax monoidal functor. We still denote by O-Mod the composition which canonically inherits the structure of a right-lax monoidal functor. Given X ∈ dAn C , we denote by O X -Mod its image via this functor. This functor admits a canonical subfunctor APerf : dAn op C −→ Cat st ∞ , which sends a derived C-analytic space to the full subcategory of O X -Mod spanned by sheaves of almost perfect modules. Observe that sheaves of almost perfect modules are closed under exterior product, and therefore APerf inherits the structure of a right-lax monoidal functor. Moreover, if f : X → Y is proper, then [Por15, Theorem 6.5] implies that the functor which is right adjoint to f * .
is vertically right adjointable.
Proof. We adapt the proof of [PY18, Theorem 6.8] to the complex analytic setting. The key input is unramifiedness for the pregeometry T an (C), proven in [Lur11c, Proposition 11.6], which has as a consequence Proposition 11.12(3) in loc. cit. In turn, this implies that the statement of this lemma holds true when g is a closed immersion. Knowing this, Steps 1 and 2 of the proof of [PY18, Theorem 6.8] apply without changes.
Step 3 applies as well, with the difference that in the C-analytic setting we can reduce to the case where Y ′ = Sp(C) is the C-analytic space associated to a point. In particular, the map Y ′ = Sp(C) → Y is now automatically a closed immersion, and therefore the conclusion follows.
Let dAn sep C denote the full subcategory of dAn C spanned by derived C-analytic spaces whose truncation is a separated analytic space. Lemma 7.15 shows that the assumptions of [ Here rps denotes the class of 1-morphisms representable by proper derived C-analytic spaces.
Given a derived C-analytic space X, we denote by Coh b (X) the full subcategory of APerf(X) spanned by locally cohomologically bounded sheaves of almost perfect modules.
Lemma 7.16. Let f : X → Y be a morphism of derived geometric analytic stacks. If f is lci 32 then it has finite tor-amplitude and in particular it induces a functor Proof. The argument of [PY20, Corollary 2.9] applies.
As a consequence, we obtain a right-lax monoidal functor Finally, we want to restrict ourselves to derived geometric analytic stacks. In particular, we need that AnCoh(Y) and the corresponding 2-Segal space to be geometric. So, first note that if Y ∈ dSt is a derived stack, then we obtain as before a natural transformation Let X be a smooth and proper complex scheme. By [HP18, Proposition 5.2], AnPerf(X) is equivalent to the analytification Perf(X) an of the derived stack Perf(X) = Map(X, Perf). Thus, AnPerf(X) is a locally geometric derived stack, locally of finite presentation.
Lemma 7.17. The map (7.3) induces an equivalence (S • Coh(X)) an ≃ S • AnCoh(X an ). In particular, for each n ≥ 0 the derived analytic stack S n AnCoh(X an ) is locally geometric and locally of finite presentation.
Proof. When n = 1, this is exactly the statement of Proposition 7.9. The proof of the general case is similar, and there are no additional subtleties.
Let X be a smooth proper connected complex scheme. As proved in [HP18, §5.2], the analytification functor commutes with Simpson's shape functor, i.e., we have the following canonical equivalences: (X dR ) an ≃ (X an ) dR , (X B ) an ≃ (X B ) an , (X Dol ) an ≃ (X an ) Dol .
Proof. The proof of Proposition 7.9 applies, with the following caveat: rather than invoking [HP18, Lemma 5.13 & Proposition 5.15], we instead use Propositions 5.26 (for the de Rham case), 5.28 (for the Betti case) and 5.32 (for the Dolbeault case) in [HP18].
Finally, we are able to give the analytic counterpart of Theorem 4.9: Theorem 7.19. Let Y be one of the following derived stacks: (1) a smooth proper complex scheme of dimension either one or two; 32 In this setting, it means that the analytic cotangent complex L an X/Y introduced in [PY17] is perfect and has toramplitude within [0, 1].
(2) the Betti, de Rham or Dolbeault stack of a smooth projective curve.

Then the composition
where the map on the right-hand side is induced by the 1-morphism in correspondences: Proof. The only main point to emphasize is how to use the tor-amplitude estimates for the map p in the algebraic case (i.e., Proposition 3.10 and Corollaries 3.14, 3.16, and 3.18) in the analytic setting. First of all, we use Lemmas 7.17 and 7.18 to identify the 2-Segal object S • AnCoh(Y an ) with (S • Coh(Y)) an . Then it remains to check that p an is derived lci, where now p is the map appearing in (4.2). This follows by combining Lemma 7.8 and [PY17, Theorem 5.21].
Corollary 7.20. Let Y be as in Theorem 7.19. Then the derived analytification functor induces a morphism in Proof. By using Lemmas 7.17 and 7.18, we have Coh b (Coh(Y) an ) ≃ Coh b (AnCoh(Y an )) as E 1monoid objects. The analytification functor (−) an promotes to a symmetric monoidal functor The analytification functor for coherent sheaves induces a natural transformation of right-lax symmetric monoidal functors Here both functors are considered as functors dSt → Cat ∞ . Using the universal property of the category of correspondences, we can extend this natural transformation of right-lax symmetric monoidal functors defined over the category of correspondences. The key point is to verify that if p : X → Y is a proper morphism of geometric derived stacks locally almost of finite presentation, then the diagram commutes. This is a particular case of [Por15, Theorem 7.1]. The conclusion follows.
7.3. The derived Riemann-Hilbert correspondence. Let X be a smooth proper connected complex scheme. In [Por17,§3] there is constructed a natural transformation η RH : X an dR −→ X an B , which induces for every derived analytic stack Y ∈ dAnSt a morphism η * RH : AnMap(X an dR , Y) −→ AnMap(X an B , Y) .
Proof. Fix a derived Stein space S ∈ dStn C . Then [Por17, Theorem 6.11] provides an equivalence of stable ∞-categories Perf(X an dR × S) ≃ Perf(X an B × S) . Therefore, for every n ≥ 0 we obtain an equivalence S n AnPerf(X an dR )(S) ≃ Fun(T n , Perf(X an dR × S)) ≃ Fun(T n , Perf(X an B × S)) ≃ S n AnPerf(X an B )(S) .
The first statement follows at once. The second statement follows automatically given the commutativity of the natural diagram X an X an dR X an B . λ X η RH Theorem 7.22 (CoHA version of the derived Riemann-Hilbert correspondence). There is an equivalence of stable E 1 -monoidal ∞-categories (Coh b (AnCoh dR (X)), ⋆ an dR ) ≃ (Coh b (AnCoh B (X)), ⋆ an B ) .
Remark 7.23. In the algebraic setting we considered the finer invariant Coh b pro , which is more adapted to the study of non-quasi-compact stacks. Among its features, there is the fact that for every derived stack Y there is a canonical equivalence (cf. Proposition A.5) In the C-analytic setting, a similar treatment is possible, but it is more technically involved. In the algebraic setting, the construction of Coh b pro relies on the machinery developed in §A, which provides a canonical way of organizing exhaustion by quasi-compact substacks into a canonical ind-object. In the C-analytic setting, one cannot proceed verbatim, because quasi-compact Canalytic substacks are extremely rare and it is not true that every geometric derived analytic stack admits an open exhaustion by quasi-compact ones. Rather, one would have to use compact Stein subsets, see [HP18, Definition 2.14]. Combining [Lur18, Corollary 4.5.1.10] and [HP18,Theorem 4.13], it would then be possible to compare the K-theory of the resulting pro-category of bounded coherent sheaves on a derived analytic stack Y with the one of the classical trucation Y cl . We will not develop the full details here.

APPENDIX A. IND QUASI-COMPACT STACKS
The main object of study of the paper is the derived stack Coh(S) of coherent sheaves on S, where S is a smooth and proper scheme or one of Simpson's shapes of a smooth and proper scheme. This stack is typically not quasi-compact, and this requires some care when studying its invariants, such as the G-theory. For example, when X is a quasi-compact geometric derived stack, the inclusion i : X cl ֒→ X induces a canonical equivalence This relies on Quillen's theorem of the heart and the equivalence Coh ♥ ( X cl ) ≃ Coh ♥ (X) induced by i * . In particular, one needs quasi-compactness of X to ensure that the t-structure on Coh b (X) is (globally) bounded. In this appendix, we set up a general framework to deal with geometric derived stacks that are not necessarily quasi-compact.
A.1. Open exhaustions. Let j : dGeom qc ֒→ dSt be the inclusion of the full subcategory of dSt spanned by quasi-compact geometric derived stacks. Left Kan extension along j induces a functor Ψ : dSt −→ PSh(dGeom qc ) .
(2) Let Y ∈ dGeom qc be a quasi-compact geometric derived stack. For any exhaustion of X by quasicompact Zariski open substacks of X as in the previous point, the canonical morphism is an equivalence.
Proof. Let V → X be a smooth atlas, where V is a scheme. Let V ′ ֒→ V be the inclusion of a quasi-compact open Zariski subset. Let be theČech nerve of V ′ → X and set U ′ := |V ′ • | . The canonical map U ′ → X is representable by open Zariski immersions, and U ′ is a quasicompact stack. Since this construction is obviously functorial in V ′ , we see that any exhaustion of V by quasi-compact Zariski open subschemes induces a similar exhaustion of X, thus completing the proof of point (1).
We now prove point (2). Fix an exhaustion of X by quasi-compact Zariski open substacks of X as in point (1). For every index α, the map U α → U α+1 is an open immersion and therefore it is (−1)-truncated in dSt. Using [Lur09, Proposition 5.5.6.16], we see that is (−1)-truncated as well. The same goes for the maps Map dSt (Y, U α ) → Map dSt (Y, X). As a consequence, the map is (−1)-truncated. To prove that it is an equivalence, we are left to check that it is surjective on π 0 . Let f : Y → X be a morphism. Write Y α := U α × X Y. Then the sequence {Y α } is an open exhaustion of Y, and since Y is quasi-compact there must exist an index α such that Y α = Y. This implies that f factors through U α , and therefore the proof of (2) is achieved.
A.2. G-theory of non-quasi-compact stacks. As a consequence, when X is a locally geometric derived stack, we can canonically promote Coh b (X) to a pro-category In particular, we can give the following definition: Definition A.3. Let X ∈ dGeom be a locally geometric derived stack. The pro-spectrum of Gtheory of X is G pro (X) := K(Coh b pro (X)) ∈ Pro(Sp) . The spectrum of G-theory of X is the realization of G pro (X): G(X) := lim G pro (X) ∈ Sp . ⊘ Remark A.4. If X is quasi-compact, then X ind is equivalent to a constant ind-object. As a consequence, both Coh b pro (X) and G pro (X) are equivalent to constant pro-objects and G(X) simply coincides with the spectrum K(Coh b (X)). △ Proposition A.5. Let X ∈ dGeom be a locally geometric derived stack. The inclusion i : X cl ֒→ X induces a canonical equivalence and therefore an equivalence Proof. Choose an exhaustion {U α } of X by quasi-compact open Zariski subsets as in Lemma A.1-(1). Then { U cl α } is an exhaustion of X cl , and the map i * : G pro ( X cl ) → G pro (X) can be computed as Since each U α is quasi-compact, this is a level-wise equivalence. Therefore, it is also an equivalence at the level of pro-objects. The second statement follows by passing to realizations. Definition A.6. Let X ∈ dGeom be a locally geometric derived stack. We define G 0 (X) := π 0 G(X) . ⊘ Remark A.7. In [SS20,KV19], the authors defined G 0 of a non-quasi-compact geometric classical stack Y as the limit of the G 0 (V α ) for an exhaustion {V α } of Y by quasi-compact Zariski open substacks. The relation between the above two definitions is given as follows. Let X ∈ dGeom be a locally geometric derived stack and let {U α } be an exhaustion of X by quasi-compact Zariski open substacks. Then there exists a short exact sequence in the abelian category of abelian groups. △ Remark A.8. Now, we discuss the quasi-compactness of the moduli stacks of coherent sheaves we deal with in the main body of the paper. Coh k 0 (Y) .
By using the explicit description of the U k n 's, one can show that Coh k 0 (Y) cl is a quasi-compact quotient stack, hence the stack Coh k 0 (Y) is quasi-compact. Now, let Y be a smooth projective complex curve. The moduli stack Coh Dol (Y) is not quasicompact. On the other hand, the moduli stacks Bun n B (Y) and Bun n dR (Y) are quasi-compact quotient stacks. The truncations of these stacks are quotients by the Betti and de Rham representation spaces respectively (cf. [Sim94b]). The derived stacks are quotients by the derived versions of these representation spaces (see e.g. [PT19, §1.2]). △ A.3. Correspondences. We finish this section by providing a formal extension of Gaitsgory-Rozenblyum correspondence machine in the setting of not necessarily quasi-compact stacks. Let S be an (∞, 2)-category, seen as an (∞, 1)-category weakly enriched in Cat ∞ , in the sense of [GH15,Hin20]. We write Cat (2) ∞ for Cat ∞ thought as weakly enriched over itself in the natural way (i.e. for the (∞, 2)-category of (∞, 1)-categories). Consider the 2-categorical Yoneda embedding y : S −→ 2-Fun S 1-op , Cat   Proof. Let f : X → Y be a morphism in Ind(C). Choose a representation Y ≃ "colim" α Y α , where the transition maps belong to C horiz . For every index α, we let and we let f α : X α → Y α be the induced morphism. By definition of Ind(C) vert , X α belongs to C and f α is a morphism in C vert . The morphisms admit a left adjoint Φ ! ( f α ). Since Φ horiz satisfies the right Beck-Chevalley property with respect to C vert , the morphisms Φ ! ( f α ) assemble into a morphism ∞ ). The triangular identities for the adjunction Φ ! ( f α ) ⊣ Φ( f α ) induce triangular identities exhibiting Φ ! ( f ) as a left adjoint to Φ( f ) in the (∞, 2)-category 2-Pro(Cat (2) ∞ ). For every morphism Z → Y in Ind(C) horiz , we let Z α := Y α × Y Z. The induced morphism Z α → Y α belongs to C horiz by definition. In this way, we can describe the Beck-Chevalley transformation for the diagram in terms of the Beck-Chevalley transformation for the diagram , which holds by assumption.
Proof. Take C = dSch qc and D = dGeom qc . For C, we take horiz = all and adm = vert = proper. Observe that condition (5)