<<

arXiv:1903.07253v3 [math.AG] 17 Feb 2021 itv WI,MX,Jpn yJP AEH rn ubrJP1 number Grant KAKENHI JSPS by JP18K13402. Japan, MEXT, (WPI), tiative mohsrae.ActgrfidHl ler sa associati an is algebra Hall categorified A surfaces. smooth h oko h eodnmdato sprilyspotdb supported partially is author second-named the of work The nti okw nrdc two-dimensional introduce we work this In .Introduction 1. 2010 stacks quasi-compact References Ind correspondence Riemann-Hilbert the A. of Appendix version Cat-HA A filtration Hodge the of version 7. Cat-HA A 6. Decategorification algebras 5. Hall sheaves categorified Two-dimensional coherent of extensions of 4. stack moduli Derived sheaves coherent of stacks 3. moduli Derived 2. e od n phrases. and words Key ahmtc ujc Classification. Subject og orsodne a elfe otelvlo u categ our of level R the the to that lifted show be can we correspondences Finally, Hodge algebras. Hall cohomological new et ftemdl tc fHgssevso curve a on sheaves on Higgs connections of flat stack ass moduli algebras Hall the categorified of surfac three ments define a we on case, sheaves curve coherent the of algebras Hall cohomological lerso ig hae nacreo iesadSala-Schif and to Minets passing of by K curve yields, the a construction of our on categorification sheaves a Higgs obtain of we algebras case sheaves Higgs the In eie ouistack moduli derived l stack uli uvsadsot ufcs aeoie alagbai an is algebra Hall categorified stable A surfaces. smooth and curves A BSTRACT ∞ -category M W-IESOA AEOIIDHL ALGEBRAS HALL CATEGORIFIED TWO-DIMENSIONAL ntepeetppr eitouetwo-dimensional introduce we paper, present the In . fchrn hae ntesrae hscntuto categ construction This surface. the on sheaves coherent of alagba,Hgsbnls a ude,lclsses c systems, local bundles, flat bundles, Higgs algebras, Hall Coh X n h ouisako nt-iesoa oa ytm on systems local finite-dimensional of stack moduli the and , R b M ( R ntesraecase, surface the In . M AR OT N RNEC SALA FRANCESCO AND PORTA MAURO ) fcmlxso hae ihbuddchrn ooooyon cohomology coherent bounded with sheaves of complexes of rmr:1A0 eodr:1B7 55P99. 17B37, Secondary: 14A20; Primary: .I 1. K 0 e -hoeia alagba,adb asn to passing by and algebras, Hall K-theoretical new , NTRODUCTION C ONTENTS R M aeoie alalgebras Hall categorified sasial eie nacmn ftemod- the of enhancement derived suitable a is X ol rme nentoa eerhCne Ini- Center Research International Premier World y h ouisako etrbnlswith bundles vector of stack moduli the , H69 n yJP AEH rn number Grant KAKENHI JSPS by and 7H06598 cae ihsial eie enhance- derived suitable with ociated rfidHl lerso curve. a of algebras Hall orified fZa n arnvVseo.In Kapranov-Vasserot. and Zhao of e soitv oodlsrcueo the on structure monoidal associative mn,wiei h te w cases two other the in while fmann, eanHletadtenon-abelian the and iemann-Hilbert tertcladchmlgclHall cohomological and -theoretical aeoie alalgebras Hall categorified emnia tutr ` aHall” la “`a structure monoidal ve rfisteKtertcland K-theoretical the orifies tgrfiain stable ategorification, fsot uvsand curves smooth of X respectively. , fsmooth of IPMU–19–0025 H BM ∗ ∞ -categories. a , 67 62 52 50 47 38 28 12 1 2 M. PORTA AND F. SALA on the dg-category Cohb(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 ob- struction 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 enhance- ment. 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 MA the corresponding moduli stack of objects: MA is a geometric derived stack over C parametriz- ing families of objects in A. In particular, its groupoid of C-points MA(C) coincides with the ext groupoid of objects of A. Similarly, we can consider the moduli stack MA parametrizing fami- lies of short exact sequences in A and form the following diagram: ext MA 0 → E1 → E → E2 → 0 p q , (1.1)

MA ×MA MA (E1, E2) E When the maps p and q are sufficiently well behaved, passing to (an oriented) Borel-Moore ho- mology2 yields a product map ∗ BM BM BM q∗ ◦ p : H∗ (MA) ⊗ H∗ (MA) −→ H∗ (MA) , which can after been proven to be associative. In what follows, we refer to the above multiplica- tive 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 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 2-dimensional CoHAs (seee.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 `ala Hall that can work uniformly in the 2-dimensional setting. The key of our method is to consider a suitable natural derived enhancements RMA and ext ext RMA of the moduli stacks MA and MA , respectively. The use of derived geometry is both natural and expected, and made an early explicit appear- ance in [Neg17]. The effectiveness of this method can be easily understood via the following two properties:

1We mean the bounded derived category of complexes of sheaves with coherent cohomology. A more classical nota- b ∞ tion would be Dcoh(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 E1-monoidal structure. 2 Examples of oriented Borel-Moore homology theories are the G0-theory (i.e., the Grothendieck of coherent sheaves), Chow groups, elliptic cohomology. TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 3

(1) the map ext Rp : RMA −→ RMA × RMA has better regularity properties than its underived counterpart. When A has cohomolog- ical dimension two, Rp is typically lci, while p is not. (2) Oriented Borel-Moore homology theories are insensitive to the derived structure, hence yielding natural isomorphisms3 BM BM H∗ (MA) ≃ H∗ (RMA) . These two properties constitute the main leitmotiv of the current paper. The upshot is that we can use the map Rp in order to construct the Hall product in a much more general setting. As announced at the beginning, the use of derived geometry has another pleasant conse- quence: it allows us to categorify the CoHAs considered above. The precise formulation of this construction, as well as the study of its first properties is the second goal of this work. More specifically, we show that the (derived) convolution diagram induces an associative monoidal structure b b b ⋆ Hall : Coh (RMA) ⊗ Coh (RMA) −→ Coh (RMA) on the dg-category of complexes of sheaves with bounded coherent cohomology on RMA. We refer to this monoidal dg-category as the two-dimensional categorified Hall algebra (Cat-HA in the following) of A. From the Cat-HA we can extract a certain number of CoHAs. Most notably, we recover a CoHA structure on the of G-theory. Notice that this would be impossible if we limited b ourselves to consider Coh (RMA) as a triangulated category — see e.g. [Schl02, TV04]. Asa closing remark, let us emphasize that, contrary to oriented Borel-Moore homology theories, our Cat-HA is very sensitive to the derived structure of RMA. In other words, property (2) above fails in the categorified setting: b b Coh (RMA) and Coh (MA) are no longer equivalent. Furthermore, the same difficulties encountered when trying to con- b struct the CoHA out of MA prevent, in an even harsher way, if one tries to endow Coh (MA) with an associative monoidal structure. Indeed, if one simply cares about the construction of the CoHA, it would be possible to bypass the use of derived geometry by using one of his shadows, i.e. perfect obstruction theories. However, the complexity of the higher coherences involved in the construction of the Cat-HA lead us to believe that an approach to categorification via perfect obstruction theories is highly unlikely.

1.2. Main results. We can summarize the main contributions of this paper as follows: on one hand, we construct many examples 2-dimensional categorified Hall algebras (Cat-HA) attached to curves and surfaces. On the other hand, we show that from these new Cat-HAs one can extract the known constructions of K-theoretical Hall algebras of surfaces and of Higgs sheaves on a curve. As a byproduct, our approach provides K-theoretical and cohomological Hall algebras associated to flat vector bundles and local systems on a curve.

Categorified Hall algebras. Let X be a smooth proper C-. In §2 we introduce a derived enhancement Coh(X) of the (classical) geometric derived stack of coherent sheaves on X. Infor- mally, its functor of points assigns to every affine derived C-scheme S the space of S-flat perfect complexes on X × S. We show in Proposition 2.23 that Coh(X) is a geometric derived stack which is locally of finite presentation.

3 This is best seen in the case of the G0-theory - cf. Proposition A.5. 4 M. PORTA AND F. SALA

Similarly, we introduce the derived stack Cohext(X) which, roughly speaking, parameterizes extensions of S-flat of perfect complexes on X × S. These derived stacks can be organized in the following convolution diagram

Cohext(X) p q (1.2)

Coh(X) × Coh(X) Coh(X) of the form (1.1). The main input to our construction is the computation of the tor-amplitude of the cotangent complex of p: ext Proposition 1.1 (see Proposition 3.10). The relative cotangent complex Lp of p : Coh (X) → Coh(X) has tor-amplitude [−1, n − 1], where n is the dimension of X.

When X is a surface, the cotangent complex of p has tor-amplitude [−1,1]. This is to say that p is derived lci, and in particular we obtain a well-defined functor ∗ b b b ⋆ := q∗ ◦ p : Coh (Coh(X)) ⊗ Coh (Coh(X)) −→ Coh (Coh(X)) . This implies: Theorem 1.2 (see Proposition 4.3). Let X be a smooth and proper complex surface. Then the functor ⋆ b can be promoted to an E1-monoidal structure on the stable ∞-category Coh (Coh(X)).

b We refer to Coh (Coh(X)) together with its E1-monoidal structure ⋆ as the categorified Hall algebra of the surface X. In a nutshell, the construction goes as follows. The convolution diagram considered above is part of a richer combinatorial structure that can be seen as a simplicial object in derived stacks

S•Coh(X) : ∆ −→ dSt .

In low dimension, the simplexes of S•Coh(X) can be described as follows: S S S ext 0Coh(X) ≃ Spec(C), 1Coh(X) ≃ Coh(X), 2Coh(X) ≃ Coh (X) , and the simplicial maps induce the maps p and q from above. The simplicial object S•Coh(X) is known as the Waldhausen construction of Coh(X), and one can summarize its main properties saying that it is a 2-Segal object in the sense of Dyckerhoff-Kapranov [DK12]. The relevance for us is that [DK12, Theorem 11.1.6] provides a canonical ∞-functor Seg dSt Alg Corr× dSt 2- ( ) −→ E1 ( ( )) . In other words, we can attach to every 2-Segal object an E1-algebra in the category of correspon- dences in derived stacks. In order to convert these data into the higher coherences of the Cat-HA, we make use of Gaitsgory-Rozenblyum correspondence machine[GaR17a]. Let × × (Corr (dGeom)rps,lci ֒→ Corr (dSt be the subcategory whose objects are derived geometric (i.e. higher Artin) stacks, and whose class of horizontal (resp. vertical) morphisms is the class of maps representable by proper schemes (resp. lci morphisms). Then the of the (∞,2)-category of correspondences of Gaitsgory-Rozenblyum provides us with a lax monoidal functor b × st Coh : Corr (dGeom)rps,lci −→ Cat∞ , with values in the ∞-category of stable ∞-categories. Being lax monoidal, this functor preserves E1-algebras, therefore delivering the Cat-HA. Remark 1.3. If X is projective and H is an ample divisor, similar results hold for the stack Cohss, p(m)(X) of Gieseker H-semistable coherent sheaves on X with reduced Hilbert polynomial equals a fixed monic polynomial p(m) ∈ Q[m]. Moreover, if X is quasi-projective, the results above hold for the 6d stack Cohprop(X) of coherent sheaves on X with proper support and dimension of the support TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 5 less or equals an integer d. Finally, if the surface is toric, minimal variations on our construction (discussed in §4.3) allow to consider the toric-equivariant setting. One can also extend the above construction to obtain Cat-HAs associated to derived moduli stacks of Simpson’s semistable properly supported sheaves with fixed reduced Hilbert polyno- mial on a smooth (quasi-)projective surface. An analysis of these Cat-HAs has been carried out in [DPS20] when the surface is the minimal resolution of the type A Kleinian singularity. △

As we said before, our second main source of examples are the two-dimensional Cat-HA that can be attached to smooth projective complex curves X. There are three type of such examples, coming respectively from local systems, flat vector bundles, and Higgs sheaves on X.4 A uniform treatment of these Cat-HAs is made possible by Simpson’s formalism of shapes. These are derived stacks attached to the curve X, written

XB , XdR , XDol . We refer to the compendium [PS20] for the precise definition of these derived stacks. However, let us say straight away that their usefulness lies in the fact that coherent sheaves on XB (resp. XdR, XDol) canonically coincide with local systems (resp. flat vector bundles, Higgs sheaves) on X. Using these shapes, we can easily make sense of the derived enhancements

Coh(XB) , Coh(XdR) , Coh(XDol) of the classical stacks of local systems, flat vector bundles and Higgs sheaves on X, respectively. The construction of the convolution diagram (and of the 2-Segal object) carries on in this set- ting without any additional difficulty. The key computation of the tor-amplitude of the map p in this context is discussed in §3.4. Every case has to be analyzed on its own, because the proof relies on specific features of the type of sheaves that are considered. From here, the same method discussed for surfaces yields:

Theorem 1.4 (see Theorem 4.9). Let X be a smooth projective complex curve. The convolution diagram induces an E1-monoidal structure on the stable ∞-categories b b b Coh (Coh(XB)) , Coh (Coh(XdR)) , Coh (Coh(XDol)) .

We refer to these E1-monoidal categories as the Betti, de Rham and Dolbeault Cat-HAs. We de- note their underlying tensor products as ⋆ B, ⋆ dR and ⋆ Dol, respectively. Our formalism allows ∗ ∗ as well to consider the natural C -action on Coh(XDol) ≃ T Coh(X) that “scales the fibers” and so we introduce the corresponding C∗-equivariant version of the Dolbeault Cat-HA (cf. §4.3). It is a natural question to try to relate these three Cat-HAs attached to a curve. Our first result in this direction, concerning the de Rham and the Betti Cat-HAs, takes place in the analytic world. It can be informally stated by saying that the Riemann-Hilbert correspondence respects the Hall convolution structure:

Theorem 1.5 (Cat-HA version of the derived Riemann-Hilbert correspondence). Let X be asmooth projective complex curve. Then: an an (1) the convolution diagrams for the analytifications Coh(XdR) and Coh(XB) induce an E1- b an b an monoidal structure on the stable ∞-categories Coh (Coh(XdR) ) and Coh (Coh(XB) ), writ- ten b an ⋆ an b an ⋆ an (Coh (Coh(XdR) ), dR) , (Coh (Coh(XB) ), B ) .

4 Ω1 O Recall that a Higgs is a pair (E, ϕ : E → X ⊗ E), where E is a coherent sheaf on X and ϕ a morphism of X- Ω1 modules, called a Higgs field. Here, X is the sheaf of 1-forms of X. On the other hand, by a flat we mean a vector bundle endowed with a flat connection. Finally, recall that a local system can be interpreted as a finite-dimensional representation of the fundamental group of X. 6 M. PORTA AND F. SALA

(2) There is a natural diagram of stable E1-monoidal ∞-categories and monoidal functors b b (Coh (Coh(XB)), ⋆ B)(Coh (Coh(XdR)), ⋆ dR) ,

b an ⋆ an b an ⋆ an (Coh (Coh(XB) ), B )(Coh (Coh(XdR) ), dR) where the vertical functors are induced by analytification and the horizontal functor is induced by an an the Riemann-Hilbert transformation ηRH : XdR → XB of [Por17]. Furthermore, the horizontal functor is an equivalence.

The new ingredient that appears in this theorem is the use of the framework of derived com- plex analytic geometry, first introduced by J. Lurie in [Lur11b] and further expanded by the first- named author in [Por15, PY17, HP18]. The key point is to prove that the Riemann-Hilbert corre- spondence of [Por17] can be lifted to the E1-monoidal setting, and this is achieved by the natural transformation ηRH already mentioned in the above statement. The relation between the de Rham and the Dolbeault categorified Hall algebras is more subtle. 1 In order to state it, one has to use another shape of Simpson, the Deligne shape XDel → A . Then the derived stack Coh/A1 (XDel) is the derived moduli stack of Deligne’s λ connections on X. Such a stack interpolates the de Rham moduli stack with the Dolbeault moduli stack: it naturally lives over A1 and one has

Coh/A1 (XDel) ×A1 {0} ≃ Coh(XDol) and Coh/A1 (XDel) ×A1 {1} ≃ Coh(XdR) . ∗ We restrict ourselves to the open substack Coh/A1 (XDel) ⊂ Coh/A1 (XDel) for which the fiber at ss,0 zero is the derived moduli stack Coh (XDol) of semistable Higgs bundles on X of degree zero. As before, this yields: Theorem 1.6 (Weak Cat-HA version of the non-abelian Hodge correspondence). Let X be asmooth ∞ Cohb ∗ E projective complex curve. Then the stable -category C∗ (Coh/A1 (XDel)) has a natural 1-monoidal filt 1 structure. In addition, it is a module over Perf := Perf([AC/Gm]) and we have monoidal functors: Φ Cohb ∗ Perf Cohb : C∗ (Coh/A1 (XDel)) ⊗Perffilt C −→ (Coh(XdR)) , Ψ Cohb ∗ Perfgr Cohb ss,0 : C∗ (Coh/A1 (XDel)) ⊗Perffilt −→ C∗ (Coh (XDol)) , gr where Perf := Perf(BGm). Conjecture 1.7 (Cat-HA version of the non-abelian Hodge correspondence). The morphisms Φ and Ψ are equivalences.

Decategorification. Now, we investigate what algebras we obtain after decategorifying our Cat- b HAs, i.e., after passing to the Grothendieck group. First, we introduce the finer invariant Cohpro, which is more adapted to the study of non-quasicompact stacks. Among its features, there is the fact that for every derived stack Y there is a canonical equivalence (cf. Proposition A.5) b b cl K(Cohpro(Y)) ≃ K(Cohpro( Y)), b b b a property that fails if we simply use Coh instead of Cohpro. The construction of Cohpro relies on the machinery developed in §A. First, our construction provides a categorification of the K-theoretical Hall algebras of surfaces [Zha19, KV19] and the K-theoretical Hall algebras of Higgs sheaves on curves [Min18, SS20] (see §1.4 for a review of these algebras). Theorem 1.8. Let X be a smooth quasi-projective complex surface. There exists an algebra isomorphism b 6d between π0K(Cohpro(Cohprop(X))) and the K-theoretical Hall algebra of X as defined in [Zha19, KV19]. b 6d Thus, the CoHA tensor structure on the stable ∞-category Cohpro(Coh (X)) is a categorification of the latter. TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 7

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 be- b tween π0K(Cohpro, C∗ (Coh(XDol)) and the K-theoretical Hall algebra of Higgs sheaves on X introduced ∞ b in [SS20, Min18]. Thus, the CoHA tensor structure on the stable -category Cohpro, C∗ (Coh(XDol)) is a categorification of the latter.

One of the consequences of our construction is the categorification5 of a positive nilpotent part + ¨ of the quantum toroidal algebra Uq,t(gl1). 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 b 60 2 + ¨ π0K(Cohpro, C∗×C∗ (Cohprop(C ))) ≃ Uq,t(gl1) . ∗ ∗ 60 2 2 Here, the C × C -action on Cohprop(C ) is induced by the torus action on C . 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 real- izations 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.

1.3. DG-Coherent categorification. At this stage, we would like to clarify what kind of “cate- gorification” 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 Uq(nQ), where nQ is the positive nilpotent part of a simply laced Kac-Moody algebra gQ 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 Uq(nQ). 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 addi- tive subcategory C(Rep(Q, d)) of the bounded derived category Db(Rep(Q, d)) of constructible complexes whose split Grothendieck group is isomorphic to the d-weight subspace of Uq(nQ). By using a diagrammatic approach, Khovanov-Lauda [Lau10, KL09, KL10a, KL10b] and Rouquier [Rou08] provided another categorification Uq(nQ), which is a 2-category: we call this the diagram- matic categorification of Uq(nQ). In addition, they showed that Uq(nQ) is the Grothendieck group of the monoidal category of all projective graded modules over the quiver-Hecke algebra R of Q. The 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. (1) Let Q be the affine Dynkin quiver A1 . In[SVV19], the authors constructed another categori- fication of the quantum group Uq(nQ), which they call the coherent categorification of it. They

5 + ¨ A categorification of Uq,t(gl1) has been also obtained by Negut. In [Neg18b], by means of (smooth) Hecke correspon- dences, he defined functors on the bounded derived category of the smooth 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. 8 M. PORTA AND F. SALA showed that there exists a monoidal structure on the homotopy category of the C∗-equivariant Cohb Π Π dg-category C∗ (Rep( A1 )), where A1 is the so-called preprojective algebra of the finite Π R Π Dynkin quiver A1 and Rep( A1 ) is a suitable derived enhancement of the moduli stack ep( A1 ) Π C∗ R Π of finite-dimensional representations of A1 . Here, there is a canonical -action on ep( A1 ) which lifts to the derived enhancement. By passing to the G-theory we obtain another realiza- tion of the algebra Uq(nQ). In loc.cit. the authors started to investigate the relation between the perverse categorification and the coherent categorification of Uq(nQ) when Q = A1. Since in our paper we do not work with monoidal structures on triangulated categories, but rather with E1-algebra structures on dg-categories, our construction provides the dg-coherent cat- egorification of the K-theoretical Hall algebras of surfaces[Zha19, KV19], 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 Luzstig’s category.6 The only known case so far is the + ¨ perverse categorification of Uq,t(gl1), i.e., of the K-theoretical Hall algebra of zero-dimensional sheaves on C2, 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 Uq,t(gl1). In this case, he defined the Luzstig’s category C(Coh(X)) for the bounded derived category Db(Coh(X)) of constructible complexes on the moduli stack Coh(X) of coherent sheaves on an elliptic curve and he obtained that the split Grothendieck + ¨ group of C(Coh(X)) is isomorphic to Uq,t(gl1). Thus, for this quantum group we have both a perverse and a dg-coherent categorifications. Although, it would be natural to ask what is the re- lation between them, it seems that the question is not well-posed since the former categorification comes from an additive category while the second one from a dg-category. A viewpoint which can help us to correctly formulate a question about these two different categorifications is somehow provided by the paper [SV12]. In this paper, the authors pointed + ¨ out how the two different realizations of Uq,t(gl1) should be reinterpreted as a G-theory version of the geometric Langlands correspondence (see e.g. [AG15] and references therein):7 QCoh IndCoh (Bun(X, n)dR) ≃ NilpGlob (Bun(XdR, n)) , where the Luzstig’s category arises from the left-hand-side, while K-theoretical Hall algebra arises from the right-hand-side. Here, X is a smooth projective complex curve and n a non- negative integer.8 By interpreting [SV12] as a decategorified version of what we are looking for, we may specu- late the following:

Conjecture 1.11. Let X be a smooth projective complex curve. Then there exist an E1-algebra structure b b on the dg-category Coh (Bun(X)dR) and an E1-monoidal equivalence between Coh (Bun(X)dR) and 9 b the categorified Hall algebra Coh (Coh(XdR)).

6 R (1) Note that in the case treated in [SVV19], the moduli stack considered on the perverse side is ep(A1 ), while on R Π the coherent side is ep( A1 ). 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(XdR). 9Or a version of it in which the complexes have fixed singular supports - see [AG15] for the definition of singular support in this context. TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 9

b Thus, the right “dg-enhancement” of Lusztig’s construction should be Coh (Bun(X)dR). In addition, one should expect that, when X is an elliptic curve, by passing to the G-theory one + ¨ recovers Uq,t(gl1). Finally, one may wonder if there is a diagrammatic description of our categorified Hall al- gebras in the spirit of Khovanov-Lauda e 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

Coh(Y) = G Coh(Y, v) v∈Λ 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 define10 the following (∞,2)-category U: it is the subcategory inside the (∞,2)- category of dg-categories such that • its objects are the dg-categories Cohb(Coh(Y, v)), • the 1-morphisms between Cohb(Coh(Y, v)) and Cohb(Coh(Y, v′)) are the functors of the form − ⋆ E ,

for E ∈ Cohb(Coh(Y, v′ − v)). 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.

1.4. Historical background on CoHAs. For completeness, we include a review of the literature around two-dimensional CoHAs. The first instances11 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 curve12, the authors were lead to introduce a convolution algebra structure ∗ on the (equivariant) G0-theory of the cotangent stack T Rep(Qg). Here Rep(Qg) is the stack of finite-dimensional representations of the quiver Qg 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 Negut [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 homol- ogy 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 = Q1, a connection between the corresponding two-dimensional CoHA and vertex algebras was pro- vided in [SV13b, Neg16] (see also [RSYZ18]).

10We thank Andrea Appel in helping us spelling out the description of U. 11To be best of the authors’ knowledge, the first circle of ideas around two-dimensional CoHAs can be found in an unpublished manuscript by Grojnowski [Groj94]. 12By (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). 10 M. PORTA AND F. SALA

In [KS11], Kontevich and Soibelman introduced another CoHA, in order to provide a mathe- matical 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 Q1: indeed, ∗R C 2 T ep(Q1) coincides with the stack oh0(C ) parameterizing zero-dimensional sheaves on the complex plane C2. In particular, the elliptic Hall algebra can be seen as an algebra attached to zero-dimensional sheaves on C2. 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 stack13 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 Negut’s shuffle algebra [Neg17] of a surface S when S = T∗X. Negut’s algebra of a smooth surface S is defined by means of Hecke correspondences depend- ing 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] con- structed 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 Negut’s algebra of S. A stronger, independently obtained result is due to Kapranov and Vasserot [KV19], who de- fined 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 convo- lution 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 `ala Dyckerhoff-Kapranov, while in §4.2 by applying the b b functor Cohpro, we obtain one of our main results, i.e., a E1-algebra structure on Cohpro(Coh(Y)) when either Y is 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 realization of the known K-theoretical Hall alge- bras 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 set- ting and we compare the two resulting categorified Hall algebras. Finally, there is one appendix: §A is devoted to the study of the G-theory of non-quasicompact stacks and the construction of b Cohpro.

13 Note that the truncation of the derived stack Coh(XDol) is isomorphic to Higgs(X). TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 11

Acknowledgements. First, we would like to thank Mattia Talpo for suggesting us to discuss about the use of derived 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 Univer- sit´ede 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 Schiff- mann, Philippe Eyssidieux, Tony Pantev and Bertrand To¨en for enlightening conversations. We also 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 Work- shop “Cohomological Hall algebras in Mathematics and Physics“ (Perimeter Institute for Theo- retical 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. Al- though 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 founda- tional material. The notations S and Cat∞ are reserved to denote the ∞-categories of spaces and of ∞-categories, ≃ st respectively. If C ∈ Cat∞ we denote by C the maximal ∞-groupoid contained in C. We let Cat∞ denote the ∞-category of stable ∞-categories with exact functors between them. We also let PrL denote the ∞-category of presentable ∞-categories with left adjoints between them. We let PrL,ω the ∞-category of compactly generated presentable ∞-categories with morphisms given by left L L,ω adjoints that commute with compact objects. Similarly, we let Prst (resp. Prst ) denote the ∞- categories of stably presentable ∞-categories with left adjoints between them (resp. left adjoints that commute with compact objects). Finally, we set

st, ⊗ st L, ⊗ L Cat∞ := CAlg(Cat∞) , Prst := CAlg(Prst) . 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 ´etale topology defines a Grothendieck topol- ∧ ogy on dAff. We denote by dSt := Sh(dAff, τ´et) the hypercompletion of the ∞- 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 complexes14. On the other hand,

14It is shown in [Lur17, Proposition 7.2.4.2] that an Perf(A) coincides with the smallest full stable subcategory of A-Mod closed under retracts and containing A. In particular, Perf(A) is a stable ∞-category which is furthermore idem- potent complete. 12 M. PORTA AND F. SALA

15 we say that an A-module M ∈ A-Mod is almost perfect 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 perfect and sheaves of almost perfect modules. We can assemble these data into an ∞-functor op L, ⊗ QCoh: dAff −→ Prst . Since the functors f ∗ preserve perfect and sheaves of almost perfect modules, we obtain well defined subfunctors op st, ⊗ Perf , APerf : dAff −→ Cat∞ . 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 QCoh( ) ≃ QCoh(Spec( )) APerf( ) ≃ APerf(Spec( )) X lim←− A , X lim←− A , and Spec(A)→X Spec(A)→X Perf( ) ≃ Perf(Spec( )) X lim←− A . Spec(A)→X 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 f : X → Y be a morphism in dSt. We say that f is flat if the induced functor f ∗ : QCoh(Y) → QCoh(X) is t-exact.

Let X ∈ dSt. We denote by Coh(X) the full subcategory of OX-Mod spanned by F ∈ OX-Mod Z O for which there exists an atlas { fi : Ui → X}i∈I such that for every i ∈ I, n ∈ , the Ui -modules ∗ ♥ b + − πn( fi F) are coherent sheaves. We denote by Coh (X) (resp. Coh (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).

2. 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 clas- sify. 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 [a, b] relative to S (resp. tor-amplitude ≤ n relative to S) if for every G ∈ QCoh♥(S) one has ∗ πi(F ⊗ f G) = 0 i ∈/ [a, b] (resp. i ∈/ [0, n]) . ≤n ≤n We let QCohS (X) (resp. APerfS (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 ≤0 CohS(X) := APerfS (X) , and we refer to CohS(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). TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 13

Remark 2.2. The ∞-category CohS(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 all three terms are 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. △

Remark 2.3. Let A ∈ CAlgC be a derived commutative ring and let M ∈ A-Mod. Then M has tor- amplitude ≤ n if and only if M ⊗A π0(A) has tor-amplitude ≤ n. In particular, if A is underived and M ∈ A-Mod♥, then M has tor-amplitude ≤ 0 if and only if M is flat in the sense of usual commutative algebra. △

We start by studying the functoriality of CohS(Y) in S: Lemma 2.4. Let

g′ XT X

f ′ f g T S be a pullback square in dSt. Assume that T and S are affine derived schemes. If F ∈ QCoh(X) has ′∗ tor-amplitude [a, b] relative S, then g (F) ∈ QCoh(XT) has tor-amplitude [a, b] relative to T.

Proof. Let F ∈ QCoh(X) be a quasi-coherent sheaf of tor-amplitude [a, b] relative to S and let G ∈ QCoh♥(T). Since g is representable by affine schemes, the same goes for g′. Therefore, [PS20, ′ ′∗ ′∗ Proposition 2.3.4] implies that g∗ is t-exact and conservative. Therefore, g (F) ⊗ f (G) is in ′ ′∗ ′∗ cohomological amplitude [a, b] if and only if g∗(g (F) ⊗ f (G)) is. Combining [PS20, Proposi- tions 2.3.4-(1) and 2.3.6-(2)], we see that ′ ′∗ ′∗ ′ ′∗ g∗(g (F) ⊗ f (G)) ≃ F ⊗ g∗( f (G)) , and using [PS20, Proposition 2.3.4-(2)] we can rewrite the last term as ′ ′∗ ∗ F ⊗ g∗( f (G)) ≃ F ⊗ f (g∗(G)) . ♥ Since g∗ is t-exact, we have g∗(G) ∈ QCoh (S). The conclusion now follows from the fact that F has tor-amplitude [a, b]. 

Construction 2.5. Let X ∈ dSt and consider the derived stack APerf(X) : dAffop −→ S sending an affine 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 CohS(X × S) of APerf(X × S)≃ spanned by flat families of coherent sheaves on X relative to S defines a substack Coh(X) : dAffop −→ 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 XB, XdR or XDol. We provide the following useful criterion to recognize coher- ent 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 [a, b] relative to S if and only if u∗(F) has tor- amplitude [a, b] relative to S. 14 M. PORTA AND F. SALA

Proof. Let G ∈ QCoh♥(S). Then since u is a flat effective epimorphism, we see that the pullback functor u∗ : QCoh(X) −→ QCoh(U) ∗ is t-exact and conservative. Therefore πi(F ⊗ f G) ≃ 0 if and only if ∗ ∗ ∗ ∗ ∗ u (πi(F ⊗ f G)) ≃ πi(u (F) ⊗ u f G) ≃ 0. The conclusion follows. 

As a consequence, we see that, for morphisms of geometric derived stacks, the notion of tor- amplitude [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 [a, b] relative to S if and only if there exists ∗ a smooth affine covering {ui : Ui = Spec(Bi) → X} such that fi∗ui (F) has tor-amplitude [a, b] as 16 A-module, where fi := f ◦ ui.

Proof. Applying Lemma 2.6, we can reduce 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, ∗ ∗ πi(F ⊗ f G) ≃ 0 if and only if πi( f∗(F ⊗ f G)) ≃ 0. The projection formula yields ∗ f∗(F ⊗ f G) ≃ f∗(F) ⊗ G , and therefore the conclusion follows. 

2.2. Deformation theory of coherent sheaves. Let X be a derived stack. We study the defor- mation 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: Definition 2.8. A morphism u : U → X in dSt is a flat effective epimorphism if:

(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.

Proof. It follows combining [Lur09, Proposition 6.2.3.5] and [PS20, Proposition 2.3.16-(2)].  Example 2.10. (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) → XB is a flat effective epimorphism. See [PS20, Propo- sition 3.1.1-(3)].

(3) Let X be a smooth C-scheme. The natural map λX : X → XdR is a flat effective epimor- phism. See [PS20, Proposition 4.1.1-(3) and -(4)].

(4) Let X be a geometric derived stack. The natural map κX : X → XDol is a flat effective epimorphism. See [PS20, Lemma 5.3.1]. △

16Cf. [Lur17, Definition 7.2.4.21] for the definition of tor-amplitude [a, b]. TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 15

Lemma 2.11. Let u : U → X be a flat effective epimorphism. Then the square

Coh(X) Coh(U)

APerf(X) APerf(U) 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, Lemma 2.9 implies that the same goes for S × U → S × X. At this point, the conclusion follows from Lemma 2.6. 

Since Example 2.10 contains our main applications, we will always work under the assump- tion 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 therefore to carry out the main verifica- tions 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 in- finitesimally 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.

Proof. Combine Propositions 2.2.3-(3) and 2.2.9-(4) with Theorem 2.2.10 in [PS20]. 

In virtue of the above lemma, we reduce ourselves to prove that the map Coh(X) → APerf(X) is infinitesimally cohesive and nilcomplete. Thanks to Lemma 2.11, the essential case to deal with is when X is affine: Lemma 2.13. Let X ∈ dAff be an affine derived scheme. Then the morphism Coh(X) −→ APerf(X) is infinitesimally cohesive and nilcomplete. As a consequence, Coh(X) is infinitesimally cohesive and nilcomplete.

Proof. We start dealing with infinitesimal cohesiveness. Let S = Spec(A) be an affine derived scheme and let M ∈ QCoh(S)≥1 be a quasi-coherent complex. Let S[M] := Spec(A ⊕ M) and let d : S[M] → S be a derivation. Finally, let Sd[M[−1]] be the pushout

S[M] d S

d0 f0 , f S Sd[M[−1]] ≃ where d0 denotes the zero derivation. Since the maximal ∞-groupoid functor (−) : Cat∞ → S commutes with limits, it is enough to prove that the square

Coh (X × S [M[−1]]) Coh (X × S) × Coh (X × S) Sd[M[−1]] d S CohS[M](X×S[M]) S

APerf(X × Sd[M[−1]]) APerf(X × S) ×APerf(X×S[M]) APerf(X × S) is a pullback. Using [Lur18, Theorem 16.2.0.1 and Proposition 16.2.3.1(6)], we see that the bot- tom horizontal map is an equivalence. As the vertical arrows are fully faithful, we deduce that the top horizontal morphism is fully faithful as well. It is therefore enough to check that the top horizontal functor is essentially surjective. Let ϕ, ϕ0 : X × S → X × Sd[M[−1]] be the two morphisms induced by f and f0, respectively. Let F ∈ APerf(X × Sd[M[−1]]) be such that 16 M. PORTA AND F. SALA

ϕ∗(F), ϕ∗(F) ∈ Coh (X × S). We want to prove that F belongs to Coh (X × S [M[−1]]). 0 S Sd[M[−1]] d This question is local on X, and we can therefore assume that X is affine. Let p : X × S → S and q : X × Sd[M[−1]] → Sd[M[−1]] be the natural projections. Then ∗ ∗ ∗ ∗ f q∗(F) ≃ p∗ ϕ (F) and f0 q∗(F) ≃ p∗ ϕ0(F) ∗ have tor-amplitude ≤ 0. 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, Proposi- tion 16.2.3.1-(3)].

We now turn to nilcompleteness. Let S ∈ dAff be an affine derived scheme and let Sn := t≤n(S) be its n-th truncation. We have to prove that the diagram

CohS(X) limn CohSn (X × Sn)

APerf(X) limn APerf(X × Sn) is a pullback. Combining [Lur18, Propositions 19.2.1.5 and 2.7.3.2-(c)] we see that the bottom horizontal map is an equivalence. As the vertical map are fully faithful, we deduce that the top horizontal map is fully faithful as well. We are therefore reduced to check that the top horizontal map is essentially surjective. Given F ∈ APerf(X × S) denote by Fn its image in APerf(X × Sn).

We wish to show that if each Fn belongs to CohSn (X × Sn) then F belongs to CohS(X × S). Since the squares

X × S X × Sn

S Sn are derived pullback, we can use the derived base change to reduce ourselves to check that the equivalence acn acn QCoh (S) −→ lim QCoh (Sn) n respects tor-amplitude ≤ 0, where QCohacn(Y) denotes the full subcategory of QCoh(Y) spanned by those quasi-coherent sheaves F such that πi(F) = 0 for i ≪ 0. This follows at once from [Lur18, Proposition 2.7.3.2-(c)].  Corollary 2.14. Let X ∈ dSt be a derived stack. Assume that there exists a flat effective epimorphism u : U → X, where U is a geometric derived stack. Then the map Coh(X) −→ APerf(X) is infinitesimally cohesive and nilcomplete. In particular, Coh(X) is infinitesimally cohesive and nilcom- plete.

Proof. Combining [PS20, Propositions 2.2.3-(2) and 2.2.9-(3)], we see that infinitesimally cohe- sive 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) doesn’t 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 ´etale, as the following lemma shows: Lemma 2.15. Let F → G be a morphism in dSt. Assume that: TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 17

(1) for every S ∈ dAff the map F(S) → G(S) is fully faithful; (2) for every S ∈ dAff, the natural map

F(S) −→ F(Sred) ×G(Sred) G(S)

induces a surjection at the level of π0. Then F → G is formally ´etale.

Proof. First, consider the square

F(S) F(Sred) .

G(S) G(Sred) Assumption (1) implies that the vertical maps are (−1)-truncated. Therefore the map F(S) →

F(Sred) ×G(Sred) G(S) is (−1)-truncated 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 ´etale. Let S = Spec(A) be a 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 S F . S[M] G The solid arrows induce the following commutative square in S:

F(S[M]) F(S) .

G(S[M]) G(S) To prove that F → G is formally ´etale is equivalent to prove that this square is a pullback. Observe that the above square is part of the following naturally commutative cube:

F((S[M])red) F(Sred)

F(S[M]) F(S) .

G((S[M])red) G(Sred)

G(S[M]) G(S) 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 a affine derived scheme; 18 M. PORTA AND F. SALA

(2) there is a flat effective epimorphism u : U → X, where U is a geometric derived stack; (3) for every pullback square

js Xs X , Spec(K) s S

∗ where K is a field, js (F) ∈ APerf(Xs) has tor-amplitude [a, b] relative to Spec(K). Then F has tor-amplitude [a, b] relative to S.

Proof. Let Us := Spec(K) ×S U. Since u : U → X is a flat effective epimorphism, Lemma 2.9 implies that the same goes for us : Us → Xs. Therefore, Lemma 2.6 allows to replace X by U. Applying this lemma one more time, we can further assume U to be an affine derived scheme. At this point, the conclusion follows from the usual local criterion for flatness, see [Lur18, Propo- sition 6.1.4.5]. 

Corollary 2.17. Let X ∈ dSt be a derived stack and assume the existence of a flat effective epimorphism u : U → X, where U is a geometric derived stack. Then the natural map Coh(X) → APerf(X) is formally ´etale.

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 × Sred −→ 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 Sred. 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 a 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

us Us Xs Spec(K) , is js s f Uu X S ∗ ∗ where K is a field, us js (F) ∈ APerf(Us) has tor-amplitude [a, b]. Then u∗(F) ∈ APerf(U) has tor-amplitude [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 to be a affine derived scheme, say X = Spec(B). TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 19

Given a geometric point x : Spec(K) → X, we let B(x) denote the localization O B(x) := colim X(U) , x∈U⊂X 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, F ⊗B B(x) is contained in tor-amplitude [a, b]. ∗ Given x : Spec(K) → X let s := f ◦ x : Spec(K) → S. By assumption js (F) ∈ APerf(Xs) is in tor-amplitude [a, b]. Let x : Spec(K) → Xs be the induced point. Then x = js ◦ x, and therefore ∗ ∗ ∗ x (F) ≃ x (js (F)) is in tor-amplitude [a, b]. 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 ∗ Perf(X) u Perf(U)

∗ APerf(X) u APerf(U) is a pullback square. Therefore, an almost perfect complex F ∈ APerf(X) is perfect if and only if u∗(F) is. The proof is achieved.  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 CohS(X × S) ⊆ APerf(X × S) is contained in Perf(X × S). In particular, the natural map Coh(X) → APerf(X) induces a formally ´etale map Coh(X) −→ Perf(X) .

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 just discussed. Corollary 2.17 implies that Coh(X) → Perf(X) is formally ´etale.  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 the same goes for Coh(X).

Proof. This is a direct consequence of Corollary 2.19. 

We define Bun(X) as

Bun(X) := ∐ Map(X, BGLn) . n≥0 It is an open substack of Coh(X). We call it the derived stack of vector bundles on X.

2.3. Coherent sheaves on schemes. We now specialize to the case where X is an underived com- plex 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 20 M. PORTA AND F. SALA 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 a affine derived scheme and let x : S → Coh(X) be a morphism. Let F ∈ CohSpec(A)(X × Spec(A)) be corresponding coherent complex on X × S relative to S. Let

F := S ×Coh(X) S 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. We have to prove that the functor

DerF(A; −) : A-Mod −→ S defined by

DerF(A; M) := fib(F(S[M]) → F(S)) 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 ∗ ∗ F(S[M]) ≃ fib(MapQCoh(X×S)(d0(F), d0(F)) → MapQCoh(X×S)(F, F)) , the fiber being taken at the identity of F. Unraveling the definitions, we therefore see that ∗ DerF(A; M) ≃ MapQCoh(X×S)(F, F ⊗ p M) , where p : X × S → S is the canonical projection. Since F ∈ Perf(X × S), we can rewrite the above mapping space as ∨ ∗ MapQCoh(X×S)(F ⊗ F , p M) . Finally, since X is proper and flat, [Lur18, Proposition 6.4.5.3] (see also [PS20, Proposition 2.3.27]) shows that the functor p∗ : QCoh(S) → QCoh(X × S) admits a left adjoint

p+ : QCoh(X × S) −→ QCoh(S) . Therefore, ∨ DerF(A; M) ≃ MapQCoh(S)(p+(F ⊗ F ), M) .

As a consequence, F admits a cotangent complex at δx, and therefore Coh(X) admits a cotangent complex at the point x, which is given by the formula ∨ LCoh(X),x ≃ p+(F ⊗ F )[1] . Finally, we see that Coh(X) admits a global cotangent complex: this is a straightforward conse- quence of the derived base change theorem for the functor p+ (see [Lur18, Proposition 6.4.5.4]). 

As for the truncation of Coh(X), we have:

Lemma 2.22. Let X be a proper, underived complex scheme. Then the truncation clCoh(X) coincides with the usual stack of coherent sheaves on X. TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 21

Proof. Let S be an unaffine derived scheme. By definition, a morphism S → Coh(X) corresponds to an almost perfect complex F ∈ APerf(X × S) which furthermore has tor-amplitude ≤ 0 rela- tive 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 stack17 of coherent sheaves. We therefore get: Proposition 2.23. Let X be a proper, underived complex scheme. Then the derived stack Coh(X) is geo- metric and locally of finite presentation. If furthermore X is smooth, then the canonical map Coh(X) → Perf(X) is representable by ´etale geometric 0-stacks.18

Proof. Lemma 2.22 implies that clCoh(X) coincides with the usual stack of coherent sheaves on X, which we know being a geometric derived stack (cf. [LMB00, Th´eor`eme 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 ´etale. As both stacks are of locally of finite type, it follows that this map is ´etale 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.  Remark 2.24. 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 1-rig geometric derived stack MPerf(X) classifying families of 1-rigid perfect complexes (see §3.4 in loc. cl cl 1-rig cit. for the precise definition). There is a canonical map Coh(X) → (MPerf(X)). One can check that this map is formally ´etale. Since it is a map between stacks locally almost of finite type, it 1-rig follows that it is actually ´etale. Therefore, the derived structure of MPerf(X) induces a canonical derived enhancement of clCoh(X). 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 × clS 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 to deal with a wider class of stacks X. △ Corollary 2.25. Let X be a smooth and proper complex scheme of dimension n. Then the cotangent complex LCoh(X) is perfect and has tor-amplitude [−1, n − 1]. In particular, Coh(X) is smooth when X is a curve and derived l.c.i. when X is a surface.

Proof. It is enough to check that for every affine derived S = Spec(A) ∈ dAff and every point ∗ x : S → Coh(X), x TCoh(X) is perfect and in tor-amplitude [1 − n,1]. Let F ∈ APerf(X × Spec(A)) 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 ∗ x TCoh(X) ≃ p∗End(F)[1] . Since p is proper and smooth, the pushforward p∗ preserves perfect complexes (see [Lur18, The- ∨ ∗ orem 6.1.3.2]). As End(F) ≃ F⊗F is perfect, we therefore can conclude that x TCoh(X) is perfect.

17The construction of such a stack is described, e.g., in [LMB00, Chapitre 4], [Stacks, Tag 08KA]. 18After 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]. 22 M. PORTA AND F. SALA

We are then left to check that it is in tor-amplitude [1 − n,1]. Let j : cl(Spec(A) → Spec(A) be ∗ ∗ the canonical inclusion. It is enough to prove that j x TCoh(X) has tor-amplitude [1 − n,1]. In other words, we can assume Spec(A) to be underived. Using Lemma 2.18 we can further assume S to be the spectrum of a field. ′ ′ First note that for every pair of coherent sheaves G, G ∈ CohS(X), p∗HomX(G, G ) is cocon- nective 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 dimen- sion between Noetherian schemes (see [Con00, §3.4], [BBHR09, § C.1], and references therein), we have ∨ ∗ (p∗End(F)) ≃ p∗Hom(F, F ⊗ pXωX[n]) , where ωX is the canonical bundle of X, and pX the projection from X × S to X. The right hand side is n-coconnective. This implies that ∨ πi((p∗End(F)) ) ≃ 0 for i < n. Since S is the spectrum of a field, πj(p∗(End(F))) is projective and ∨ ∨ π (p∗(End(F))) ≃ π (p∗End(F)) j  −j   ∗ This shows that p∗End(F) has tor-amplitude in [−n,0], and therefore that x TCoh(X) has tor- amplitude in [1 − n,1]. 19 

2.3.1. Other examples of moduli stacks. Let X be a smooth projective complex scheme and let H be a fixed ample divisor. Recall that for any polynomial P(m) ∈ Q[m] there exists an open substack clCohP(X) of clCoh(X) parameterizing flat families of coherent sheaves F on X with fixed Hilbert polynomial P, i.e., for n ≫ 0 0 dim H (X, F ⊗ OX(nH)) = P(n) . We denote by CohP(X) its canonical derived enhancement20. Similarly, we define BunP(X). For any nonzero polynomial P(m) ∈ Q[m] of degree d, we denote by P(m)red its reduced poly- nomial, which is given as P(m)/αd, where αd is the leading coefficient of P(m). Given a monic polynomial p, define Cohp(X) := ∐ CohP(X) and Bunp(X) := ∐ BunP(X) . Pred=p Pred=p

Assume that deg(p) = dim(X). Recall that the Gieseker H-semistability is an open property21. Thus there exists an open substack clCohss, p(X) of clCohp(X) parameterizing families of H- semistable coherent sheaves on X with fixed reduced polynomial p; we denote by Cohss, p(X) its canonical derived enhancement. Similarly, we define Bunss, p(X). Finally, let 0 ≤ d ≤ dim(X) be an integer and define Coh6d(X) := ∐ CohP(X) . deg(P)6d Remark 2.26. Let X be a smooth projective complex curve. Then the assignment of a monic poly- nomial 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 Bunss, µ(X) ≃ Cohss, µ(X). △

19This argument is borrowed from [HL2020, Example 2.2.3]. 20The construction of such a derived enhancement follows from [STV15, Proposition 2.1]. 21Cf. [HL10, Definition 1.2.4] for the definition of H-semistability of coherent sheaves on projective schemes and [HL10, Proposition 2.3.1] for the openness property in families of the H-semistability. TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 23

Assume that X is only quasi-projective. Let X¯ be a smooth projective complex scheme con- taining X an an open set. As shown in [Stacks, §106.4], there exists a geometric classical stack parameterizing families of coherent sheaves with proper support. Moreover, it is an open sub- cl stack of Coh(X¯ ). Thus, we denote by Cohprop(X) its canonical derived enhancement. 6d Finally, as above, we can define the derived moduli stack Cohprop(X) of coherent sheaves on X with proper support and dimension of the support less or equal d.

2.4. 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 XB, XdR, and XDol and coherent sheaves on them (cf. [PS20] for a small compendium of the theory of Simpson’s shapes).

fin 2.4.1. Moduli of local systems. Let K ∈ S be a finite space. We let KB ∈ dSt be its Betti stack, that is, the constant stack op KB : dSt −→ S associated to K (cf. [PS20, §3.1]). The first result of this section is the following:

Proposition 2.27. The derived stack Coh(KB) is a geometric derived stack, locally of finite presentation. To prove this statement, we will apply Lurie’s representability theorem [Lur18, Theorem 18.1.0.2]. We need some preliminary results. For every n ≥ 0, set n Bun (KB) := Map(KB, BGLn) , and introduce n Bun(KB) := ∐ Bun (KB) . n≥0 n Lemma 2.28. The truncation of Bun (KB) corresponds to the classical stack of finite-dimensional repre- sentations of π1(K).

Proof. This follows from [PS20, Proposition 3.1.1-(2) and Remark 3.1.2].  Lemma 2.29. The canonical map

Bun(KB) −→ Coh(KB) is an equivalence.

Proof. We can review both Coh(KB) and Bun(KB) as full substacks of Perf(KB). It is therefore enough to show that they coincide as substacks of Perf(KB). Suppose first that K is discrete. Then it is equivalent to a disjoint union of finitely many points, and therefore I KB ≃ Spec(C) ≃ Spec(C) ∐ Spec(C) ∐···∐ Spec(C) . In this case

Perf(KB) ≃ Perf × Perf ×···× Perf .

If S ∈ dAff, an S-point of Perf(KB) is therefore identified with an object in Fun(I, Perf(S)). Being of tor-amplitude ≤ 0 with respect to S is equivalent of being of tor-amplitude ≤ 0 on SI, and therefore the conclusion follows in this case. Using the equivalence Sk+1 ≃ Σ(Sk), 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

K0 = ∅ → K1 →···→ Kℓ = K , 24 M. PORTA AND F. SALA such that each map Ki → Ki+1 fits in a pushout diagram

Smi ∗ .

Ki Ki+1 The conclusion therefore follows by induction. 

Proof of Proposition 2.27. We can assume without loss of generality that K is connected. Let x : ∗→ K be a point and let

ux : Spec(C) ≃ ∗B −→ KB be the induced morphism. Then [PS20, Proposition 3.1.1-(3)] implies that ux is a flat effective epimorphism. Therefore, Corollary 2.14 implies that Coh(KB) is infinitesimally cohesive and nilcomplete. Since Spec(C) is smooth, Corollary 2.20 implies that there is a formally ´etale map

Coh(KB) −→ Perf(KB) .

Since K is a finite space, Perf(KB) is a geometric derived stack (cf. [PS20, §3.2]), and in particular it admits a global cotangent complex. Therefore, the same goes for Coh(KB). We are left to prove that its truncation is geometric. Recall that the classical stack of finite- dimensional representations of π1(K) is geometric (cf. e.g. [Sim94b]). Thus, the geometricity of the truncation follows from Lemmas 2.28 and 2.29. 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

CohB(X) := Coh(XB) and BunB(X) := Bun(XB) .

Lemma 2.29 supplies a canonical equivalence CohB(X) ≃ BunB(X) and Proposition 2.27 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 n BunB(X) := Map(XB, BGLn) the derived stack of of n-dimensional representations of the fundamental group π1(X) of X. The terminology is justified by Lemma 2.28. Example 2.30. 1 (1) Consider the case X = PC. We have cl n 1 BunB(PC) ≃ BGLn . n 1 However, BunB(PC) has an interesting derived structure. To see this, let n 1 x : Spec(C) → BunB(PC) n be the map classifying the constant sheaf C 1 . This map factors through BGLn, and it clas- PC n sifies C ∈ ModC = QCoh(Spec(C)). The tangent complex of BGLn at this point is given n by EndC(C )[1], and in particular it is concentrated in homological degree −1. On the other n 1 hand, [PS20, Corollary 3.1.4-(2)] shows that the tangent complex of BunB(PC) at x is com- puted by 2 n n n RΓ(S ; End(C 1 ))[1] ≃ End(C )[1] ⊕ End(C )[−1] . PC n 1 In particular, BunB(PC) is not smooth (although it is l.c.i.), and therefore it does not coincide with BGLn. TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 25

n (2) Assume more generally that X is a smooth projective complex curve. Then BunB(X) can be obtained as a quasi-Hamiltonian derived reduction22. Indeed, let X′ be the topological space Xtop minus a disk D. Then one can easily see that X′ deformation retracts onto a wedge of 2gX circles, where gX is the genus of X. We get n n ′ n Bun (X) ≃ Bun (X ) × n 1 Bun (D) . B B BunB(S ) B n 1 n n Since BunB(S ) ≃ [GLn/GLn] (see, e.g., [Cal14, Example 3.8]), and BunB(D) ≃ BunB(pt), we obtain n n ′ pt GL BunB(X) ≃ BunB(X ) ×[GLn/GLn] [ / n] . n n ′ Thus, BunB(X) is the quasi-Hamiltonian derived reduction of BunB(X ). By further using n ′ n 1 × 2gX n BunB(X ) ≃ BunB(S ) , the derived stack BunB(X) reduces to

n × 2gX BunB(X) ≃ [GLn ×GLn pt/GLn] . △

Generalizing the above example (1), we have: Corollary 2.31. Let X be a smooth and proper complex scheme of dimension n. Then the cotangent L complex CohB(X) is perfect and has tor-amplitude [−1,2n − 1]. In particular, CohB(X) is derived l.c.i. when X is a curve.

Proof. Recall that Corollary 2.20 provides a canonical formally ´etale map CohB(X) → Perf(XB). L dAff Thus, the cotangent complex CohB(X) at a point x : S → CohB(X), where S ∈ is a affine de- L rived scheme, is isomorphic to the cotangent complex Perf(XB) at the point x˜ : S → CohB(X) → Perf(XB). Via [PS20, Proposition 3.1.1-(2)], we see that x˜ corresponds to an object L in Fun(Xhtop, Perf(S)).23 On the other hand, [PS20, Proposition 3.1.3] allows to further identify this ∞-category with the an ∞-category of local systems on X . Since XB is categorically proper (cf. [PS20, Proposition 3.1.1- L (4)]), to check tor-amplitude of Perf(XB) at the point x˜ it is enough to assume S 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(XB) in [PS20, Corollary 3.1.4], we finally deduce that T RΓ an nd CohB(X),x ≃ (X ; E (L))[1] . As this computes the (shifted) singular cohomology of Xan with coefficients in End(L), the con- clusion 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 XdR ∈ dSt defined by cl XdR(S) := X( Sred) , for any S ∈ dAff (cf. [PS20, §4.1]). Here, we denote by Tred the underlying reduced scheme of an affine scheme T ∈ Aff. Define the stacks

CohdR(X) := Coh(XdR) and BundR(X) := Bun(XdR) . Lemma 2.32. There is a natural equivalence

CohdR(X) ≃ BundR(X) .

22Cf. [Saf16] for the notion of Hamiltonian reduction in the derived setting. 23Here, (−)htop : dSchlaft −→ S is the natural functor sending a (derived) C-scheme locally almost of finite type to the underlying homotopy type of its analytification. 26 M. PORTA AND F. SALA

Proof. First, recall that there exists a canonical map λX : X → XdR (see [PS20, §4.1]). We can see both derived stacks as full substacks of Map(XdR, Perf). Let S ∈ dAff and let x : S → Map(XdR, BGLn). Then x classifies a perfect complex F ∈ Perf(XdR × S) such that ∗ G :=(λX × idS) (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 CohdR(X). Vice-versa, let x : S → CohdR(X). Let F ∈ Perf(XdR × S) be the corresponding perfect com- ∗ plex and let G :=(λX × idS) (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(XK) has tor-amplitude ≤ 0. Here XK := Spec(K) × X and j : XK → X is the natural morphism. Consider the commutative diagram j XK X × S λ XK λX×idS . jdR (XK)dR XdR × S Then j∗G ≃ λ∗ j∗ F . s XK dR ∗ ∗ We therefore see that j G comes from a K-point of CohdR(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.33. The derived stack Coh(XdR) is a geometric derived stack, locally of finite presentation.

Proof. Consider the canonical map λX : X → XdR. Then, [PS20, Proposition 4.1.1-(3) and -(4)] show that λX is a flat effective epimorphism. Thus, Coh(XdR) fits into the pullback square (cf. Lemma 2.11 and Corollary 2.19)

Coh(XdR) Coh(X)

Perf(XdR) Perf(X) and since Perf(X) and Perf(XdR) are geometric (cf. [TVa07, Corollary 3.29] and [PS20, §4.2], respectively) and Coh(X) is geometric because of Proposition 2.23, we obtain that Coh(XdR) is geometric as well. 

We shall call CohdR(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 T Spec Sym L X := X( OX ( X)) T T be the derived tangent bundle to X and let X := XdR ×(TX)dR X be the formal completion of TX along the zero section. The natural commutativec group structure of TX relative to X (seen as an associative one) lifts to TX. Thus, we define the Dolbeault shape XDol of X as the relative classifying stack: c

XDol := BXTX , nil c while we define the nilpotent Dolbeault shape XDol of X as: nil XDol ≃BXTX . We define nil nil CohDol(X) := Coh(XDol) and CohDol(X) := Coh(XDol) , TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 27 and nil nil BunDol(X) := Bun(XDol) and BunDol(X) := Bun(XDol) . nil nil Proposition 2.34. The derived stacks CohDol(X), CohDol(X), BunDol(X), BunDol(X) are geometric and locally of finite presentation.

nil nil Proof. First, recall that there exist canonical maps κX : X → XDol and κX : X → XDol (cf. [PS20, §5.1]). nil By [PS20, Lemma 5.3.1], κX and κX are flat effective epimorphisms. Thanks to Lemma 2.11 nil and Corollary 2.19, we are left to check that Perf(XDol) and Perf(XDol) are geometric and locally of finite presentation (cf. [PS20, §5.4.2]). 

nil We call CohDol(X) the derived Dolbeault moduli stack of X, while CohDol(X) is the derived nilpo- cl cl nil tent Dolbeault moduli stack of X. The truncation CohDol(X) (resp. CohDol(X)) coincides with the moduli stack of Higgs sheaves (resp. nilpotent Higgs sheaves) on X. nil bun nil We denote by X : CohDol(X) → CohDol(X) and X : BunDol(X) → BunDol(X) the canonical nil maps induced by ıX : XDol → XDol. Remark 2.35. Let X be a smooth and proper complex scheme. Define the geometric derived stack Higgsna¨ıf(X) := T∗[0]Coh(X) = Spec Sym(T ) . Coh(X) Coh(X)  There is a natural morphism na¨ıf CohDol(X) −→ Higgs (X) , 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 the symmetric algebra and the tensor algebra on TCoh(X) differ. △

Let X be a smooth projective complex scheme. For any monic polynomial p(m) ∈ Q[m], we set p p CohDol(X) := Perf(XDol) ×Perf(X) Coh (X) , nil, p nil p CohDol (X) := Perf(XDol) ×Perf(X) Coh (X) , and p p BunDol(X) := Perf(XDol) ×Perf(X) Bun (X) , nil, p nil p BunDol (X) := Perf(XDol) ×Perf(X) Bun (X) , These are geometric derived stacks locally of finite presentation. 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 Ω1 is induced by X with zero symbol (see [Sim94a, §2] for details). This semistability condition is an open property for flat families (cf. [Sim94a, Lemma 3.7]). Thus, there exists an open substack cl ss, p cl p CohDol (X) of CohDol(X) parameterizing families of semistable Higgs sheaves on X with fixed reduced polynomial p(m); we denote by ss, p CohDol (X) nil, ss, p ss, p nil, ss, p its canonical derived enhancement. Similarly, we define CohDol (X), BunDol (X) and BunDol (X). These are geometric derived stacks locally of finite presentation. Finally, for any integer 0 ≤ d ≤ dim(X), set 6d 6d CohDol(X) := Perf(XDol) ×Perf(X) Coh (X) , 28 M. PORTA AND F. SALA

nil, 6d nil 6d CohDol (X) := Perf(XDol) ×Perf(X) Coh (X) . These are geometric derived stacks locally of finite presentation. Remark 2.36. Let X be a smooth projective complex curve and let µ ∈ Q (which corresponds ss, µ ss, µ to a choice of a reduced Hilbert polynomial). Then one has CohDol (X) ≃ BunDol (X) and nil, ss, µ nil, ss, µ CohDol (X) ≃ BunDol (X). △

3. 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 deal also 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 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 ∆1 ∆1 APerf × : dAffop −→ S by 1 1 APerf∆ ×∆ (Spec(A)) := Fun(∆1 × ∆1, APerf(A))≃ .

1 1 We let APerfext denote the full substack of APerf∆ ×∆ whose Spec(A)-points corresponds to diagrams

F1 F2

F4 F3 in APerf(A) which are pullbacks and where F4 ≃ 0. ∆1 ∆1 Observe that the natural map APerfext → APerf × is representable by Zariski open im- mersions. There are three natural morphisms ext evi : APerf −→ APerf , i = 1,2,3, which at the level of functor of points send a fiber sequence

F1 −→ F2 −→ F3 to F1, F2 and F3, respectively. Let Y ∈ dSt be a derived stack. We define ∆1 ∆1 ∆1 ∆1 APerf × (Y) := Map(Y, APerf × ) , and APerfext(Y) := Map(Y, APerfext) . Once again, the morphism 1 1 APerfext(Y) −→ APerf∆ ×∆ (Y) TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 29 is representable by Zariski open immersions. Moreover, the morphism evi induce a morphism ext APerf (Y) → APerf(Y), which we still denote evi. Let now Y ∈ dSt be a derived stack. In § 2 we introduced the derived moduli stack Coh(Y), parametrizing coherent sheaves on Y. It is equipped with a natural map Coh(Y) → APerf(Y). We define Cohext(Y) as the pullback

Cohext(Y) APerfext(Y)

ev1×ev2×ev3 . (3.1) Coh(Y)×3 APerf(Y)×3 and we refer to it as the derived moduli stack of extensions of coherent sheaves.

Remark 3.1. Let Y ∈ dSt be a derived stack. Assume there exists a flat effective epimorphism u : U → Y from a geometric derived stack U. Then Corollary 2.17 implies that the natural map Coh(Y) → APerf(Y) is formally ´etale. Since formally ´etale maps are stable under pullback, the very definition of Cohext(Y) shows that the natural map Cohext(Y) → APerfext(Y) is formally ´etale as well. △

Analogous considerations can be made for Perf(Y) instead of APerf(Y). In particular, there ∆1 ∆1 are well defined stacks Perf × (Y) and Perf ext(Y). The commutative diagram

Perf ext(Y) APerfext(Y) (3.2)

Perf(Y)×3 APerf(Y)×3 is a pullback, and the horizontal arrows are formally ´etale. When there is a flat effective epi- morphism u : U → Y from a smooth geometric derived stack U, Corollary 2.19 shows that the map Cohext(Y) → APerfext(Y) factors through Perf ext(Y), and that the map Cohext(Y) → Perf ext(Y) is formally ´etale as well. Similarly, we define Bunext(Y) as the pullback with respect to a diagram of the form (3.1), where we have substituted Coh(Y)×3 with Bun(Y)×3.

3.2. 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) ext and of the map ev3 × ev1 : Perf (X) → 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]. (2) Y is categorically proper, see [PS20, Definition 2.3.21]. (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

pS : Y × S −→ S be the natural projection. Then the pullback functor ∗ pS : Perf(S) −→ Perf(Y × S) admits a left adjoint, that will be denoted pS+. See[PS20, Proposition 2.3.27] for the construction and the main properties of this functor. 30 M. PORTA AND F. SALA

Proposition 3.2. Let Y ∈ dSt be a derived stack satisfying assumptions (1), (2), and (3). Then Perf ext(Y) admits a global cotangent complex. Furthermore, let S = Spec(A) ∈ dAff be an affine derived scheme and let x : S → Perfext(Y) be a morphism. Write

F1 −→ F2 −→ F3

∗ for the fiber sequence in Perf(Y × S) classified by x. Then x LPerfext(Y)[1] coincides with the colimit in Perf(S) of the diagram

∨ ∨ pS+(F2 ⊗ F3 ) pS+(F3 ⊗ F3 )

∨ ∨ . (3.3) pS+(F1 ⊗ F2 ) pS+(F2 ⊗ F2 )

∨ pS+(F1 ⊗ F1 )

Proof. First of all, we consider the diagram

1 1 Perf ext(Y) Perf∆ ×∆ (Y) .

1 1 APerfext(Y) APerf∆ ×∆ (Y)

Since (3.2) is a pullback, we see that the above square is a pullback. In particular, the top hori- zontal morphism is a Zariski open immersion. It is therefore enough to compute the cotangent 1 1 1 1 complex of Perf∆ ×∆ (Y) at the induced point, which we still denote by x : S → Perf∆ ×∆ (Y). Write

F := S × 1 1 S , Perf∆ ×∆ (Y) and let δx : S → F be the diagonal morphism induced by x. Using [PS20, Proposition 2.2.3-(1) ∆1 ∆1 ∆1 ∆1 ∆1 ∆1 and (3)] we see that Perf × and hence Perf × (Y) := Map(Y, Perf × ) are infinitesimally cohesive. Thus, [PS20, Proposition 2.2.4] guarantees that

∗ ∗ x L 1 1 ≃ δ L [−1] . Perf∆ ×∆ (Y) x F

∗ We therefore focus on the computation of δxLF. Given f : T = Spec(B) → S, write fY for the induced morphism

fY : Y × T −→ Y × S .

We can identify F(T) with the ∞-groupoid of commutative diagrams

∗ ∗ ∗ fYF1 fYF2 fYF3

α1 α2 α3 ∗ ∗ ∗ fYF1 fYF2 fYF3 TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 31 in Perf(Y × T), where α1, α2 and α3 are equivalences. In other words, F(T) fits in the following limit diagram:  ∗ F(T) Aut( fYF3)

 ∗ ∗ ∗ . Aut( fYF2) Map( fYF2, fYF3)

∗ ∗ ∗ Aut( fYF1) Map( fYF1, fYF2) Here the mapping and automorphism spaces are taken in Perf(Y × T). We have to represent the functor

DerF(S; −) : QCoh(S) −→ S which sends G ∈ QCoh(S) to the space

fibδx (F(S[G]) −→ F(S)) .

Write YS := Y × S and let pS : YS → S be the natural projection, so that ∗ (YS)[pSG] ≃ Y × S[G] . ∗ Let d0 : YS[pSG] → YS be the zero derivation. Observe now that {id } × Map( ∗F ∗F ) ≃ {id } × Aut( ∗F ) Fi Map(Fi,Fi) d0 i, d0 i Fi Map(Fi,Fi) d0 i . ∗ ∗ ∗ We are therefore free to replace Aut(d0Fi) by Map(d0Fi, d0Fi) in the diagram computing F(S[G]). Unraveling the definitions, we can thus identify DerF(S; G) with the pullback diagram  ∗ DerF(S; G) Map(F3, F3 ⊗ pSG)

 ∗ ∗ . Map(F2, F2 ⊗ pSG) Map(F2, F3 ⊗ pSG)

∗ ∗ Map(F1, F1 ⊗ pSG) Map(F1, F2 ⊗ pSG)

Since F1, F2 and F3 are perfect, they are dualizable. Moreover, [PS20, Proposition 2.3.27-(1)] ∗ guarantees the existence of a left adjoint pS+ for pS. We can therefore rewrite the above diagram as  ∨ DerF(S; G) Map(pS+(F3 ⊗ F3 ), G)

 ∨ ∨ Map(pS+(F2 ⊗ F2 ), G) Map(pS+(F2 ⊗ F3 ), G)

∨ ∨ Map(pS+(F1 ⊗ F1 ), G) Map(pS+(F1 ⊗ F2 ), G) where now the mapping spaces are computed in Perf(Y × S). Therefore, the Yoneda lemma implies that DerF(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) admits also a global cotangent complex.  Remark 3.3. There are two natural morphisms

1 fib, cofib: Perf∆ (Y) −→ Perfext(Y) , 32 M. PORTA AND F. SALA which send a morphism β : F → G to the fiber sequence fib(β) −→ F −→ G (resp. F −→ G −→ cofib(β)) . Applying [Lur09, Proposition 4.3.2.15] twice, we see that these morphisms are equivalences. 1 1 Let y : Spec(A) → Perf∆ ×∆ (Y) be a morphism classifying a diagram

F1 F2 .

0 F3

∆1 Let x : Spec(A) → Perf (Y) be the point corresponding to F1 → F2. Then we have a canonical morphism ∗ ∗ x L 1 [1] −→ y L 1 1 [1] , Perf∆ (Y) Perf∆ ×∆ (Y) which in general is not an equivalence. When the point y factors through the open substack Perfext(Y), then the above morphism becomes an equivalence. △

Next, we compute the cotangent complex of ev3 × ev1. 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 24 complex on F. The linear stack associated to F over Y is the derived stack VY(F) ∈ dSt/Y defined as

V Spec SymO Y(F) := Y( Y (F)) . ⊘

In other words, for every f : S = Spec(A) → Y, one has ∗ Map/Y(S, VY(F)) ≃ MapA-Mod( f (F), A) . Construction 3.5. Let Y ∈ dSt be a derived stack satisfying assumptions (1), (2), and (3). Let

Y × Perf(Y) × Perf(Y) pr pr 1 q 2

Y × Perf(Y) Perf(Y) × Perf(Y) Y × Perf(Y) be the natural projections. Let F ∈ Perf(Y × Perf(Y)) be the universal family of perfect com- plexes on Y and for i = 1, 2 set ∗ Fi := pri (F) ∈ Perf(Y × Perf(Y) × Perf(Y)) . We set

G := HomY×Perf(Y)×Perf(Y)(F2, F1)[−1] . Using [PS20, Corollary 2.3.29] we see that the functor q∗ : Perf(Perf(Y) × Perf(Y)) −→ Perf(Y × Perf(Y) × Perf(Y)) admits a left adjoint q+. We can therefore consider the linear stack

VPerf(Y)×Perf(Y)(q+G) , equipped with its natural projection π : VPerf(Y)×Perf(Y)(q+G) → Perf(Y) × Perf(Y).

We have:

24Note that sometimes in the literature this stack (rather its truncation) is also called cone stack. See e.g. [KV19, §2.1]. TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 33

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

ext φ Perf (Y) VPerf(Y)×Perf(Y)(q+G) , ev3×ev1 π Perf(Y) × Perf(Y) 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

MapdSt(S, VPerf(Y)×Perf(Y)(q+G)) −→ MapdSt(S, Perf(Y) × Perf(Y)) with the mapping space ∗ O MapPerf(S)(x q+(G), S) . Consider the pullback square y Y × S Y × Perf(Y) × Perf(Y)

qS q .

S x Perf(Y) × Perf(Y) The base change for the plus pushforward (cf. [PS20, Corollary 2.3.29-(2)]) allows us to rewrite ∗ ∗ x q+(G) ≃ qS+y (G) . Therefore, we have ∗ O ∗ O MapPerf(S)(x q+(G), S) ≃ MapPerf(S)(qS+y (G), S) ∗ O ≃ MapPerf(Y×S)(y (G), Y×S) O ∗ ∨ ≃ MapPerf(Y×S)( Y×S, y (G )) ∗ ∗ ≃ τ≥0Γ(Y × S, HomY×S(y F1, y F2)[1]) . We therefore see that any choice of a fiber sequence ∗ ∗ y F1 −→ F −→ y F2 in Perf(Y × S) gives rise to a point S → VPerf(Y)×Perf(Y)(q+G). This provides us with a canonical map ext Perf (Y) −→ VPerf(Y)×Perf(Y)(q+G) , which induces, for every point x : S → Perf(Y) × Perf(Y) an equivalence ext Map S, Perf (Y) ≃ Map S, V (q+G) . dSt/Perf(Y)×Perf(Y)  dStPerf(Y)×Perf(Y)  Perf(Y)×Perf(Y)  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 ext ev3 × ev1 : Perf (Y) −→ Perf(Y) × Perf(Y) is computed as ∗ (ev3 × ev1) q+ HomY×Perf(Y)×Perf(Y)(F2, F1)[−1] .

Proof. This is an immediate consequence of Proposition 3.6 and of [Lur17, Proposition 7.4.3.14].  34 M. PORTA AND F. SALA

3.3. Extensions of coherent sheaves on schemes. We now specify the constructions of the pre- vious section to the case where Y is a smooth and proper complex scheme. Assumptions (1), (2), and (3) are satisfied in this case, see [PS20, Example 2.3.1]. Our goal is to provide estimates on the ext ext tor-amplitude of the cotangent complexes of Coh (Y) and of the map ev3 × ev1 : Coh (Y) → Coh(Y) × Coh(Y): Proposition 3.8. Let X be a smooth and proper complex scheme of dimension n. Then the cotangent ext complex LCohext(X) is perfect and has tor-amplitude [−1, n − 1]. In particular, Coh (X) is smooth when X is a curve and derived lci when X is a surface. Remark 3.9. Notice that Perfext(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) → Cohext(X) be a point. We have ∗ ext to check that x TCohext(X) is perfect and in tor-amplitude [1 − n,1]. Since the map Coh (X) → Perfext(X) is formally ´etale, we can use Proposition 3.2 to compute the cotangent complex, and hence the tangent one. Let

F1 −→ F2 −→ F3 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 TCohext(X) fits in the pull- back diagram

∗ ∨ x TCohext(X) p∗(F2 ⊗ F2)[1] .

∨ ∨ p∗(F1 ⊗ F1)[1] p∗(F1 ⊗ F2)[1] ∗ Since X is smooth and proper, p∗ preserves perfect complexes. Therefore, x TCohext(X) is perfect. In order to check that it has tor-amplitude [1 − n,1], it is sufficient to check that its pullback to Spec(π0(A)) has tor-amplitude [1 − n,1]. In other words, we can suppose from the very be- ginning that A is discrete. In this case, F1, F2 and F3 are discrete as well and the map F1 → F2 is a monomorphism. Since X is an n-dimensional scheme, the functor p∗ has cohomological di- ∗ mension n. It is therefore sufficient to check that π−n(x TCohext(X)) = 0. We have a long exact sequence n n n Extp(F1, F1) ⊕Extp(F2, F2) →Extp(F1, F2) ∗ n+1 n+1 →π−n(x TCohext(X)) →Extp (F1, F1) ⊕Extp (F2, F2) . By using Grothendieck-Serre duality (as in the second part of the proof of Corollary 2.25), one can show that n+1 n+1 Extp (F1, F1) = 0 and Extp (F2, F2) = 0. We are thus left to check that the map n n n Extp(F1, F1) ⊕Extp(F2, F2) −→ Extp(F1, F2) is surjective. It is enough to prove that n n Extp(F2, F2) −→ Extp(F1, F2) is surjective. We have a long exact sequence n n n+1 Extp(F2, F2) −→ Extp(F1, F2) −→ Extp (F3, F2) . n+1 The same argument given above shows that Extp (F3, F2) = 0. The proof is therefore complete.  TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 35

Proposition 3.10. Let X be a smooth and proper complex scheme of dimension n. Then the relative cotangent complex of the map ext ev3 × ev1 : Coh (X) −→ Coh(X) × Coh(X) (3.4) is perfect and has tor-amplitude [−1, n − 1]. In particular, it is smooth when X is a curve and derived l.c.i. when X is a surface. Remark 3.11. When X is a curve, Corollary 2.25 and Proposition 3.8 imply that Cohext(X) and Coh(X) are smooth. This immediately implies that ev3 × ev1 is derived l.c.i., 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

F1 −→ F2 −→ F3 in Perf(X × S). If F1 and F3 have tor-amplitude ≤ 0 relative to S, then the same goes for F2. This implies that the diagram

Cohext(X) Perf ext(X)

ev3×ev1 ev3×ev1 Coh(X) × Coh(X) Perf(X) × Perf(X) is a pullback square. Smooth and proper schemes are categorically proper and have finite lo- cal 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 ´etale, we can therefore use Corollary 3.7 to compute the relative cotangent complex of the morphism (3.4). This im- mediately implies that this relative cotangent complex is perfect, and we are left to prove that it has tor-amplitude [−1, n − 1]. For this reason, it is enough to prove that for any (underived) ext ∗ affine scheme S ∈ Aff and any point x : S → Coh (X), the perfect complex x Lev3×ev1 has tor- amplitude [−1, n − 1]. Let F1 → F2 → F3 be the extension classified by x and let qS : Y × S → S be the canonical projection. The base change for the plus pushforward (see [PS20, Proposi- tion 2.3.27-(2)]) reduces us to compute the tor-amplitude of ∨ qS+(HomX×S(F3, F1)[−1]) ≃ (qS∗(HomX×S(F1, F3)[1])) . Moreover, since S is arbitrary, it is enough to prove that

πi(qS∗(HomX×S(F1, F3)[1])) ≃ 0 for i ≤ 1 − n. However −i+1 πi(qS∗(HomX×S(F1, F3)[1])) ≃Extq (F1, F3) . ♥ Since S is underived, F1 and F3 belong to QCoh (X × S). Since X has dimension n, it follows j that Extq(F1, F3) ≃ 0 for j > n. The conclusion follows.  Corollary 3.12. Let X be a smoothand proper complexscheme of dimension n. Then the relative cotangent complex of the map ext ev3 × ev1 : Bun (X) −→ Bun(X) × Bun(X) is perfect and has tor-amplitude [−1, n − 1].

Proof. The assertion follows by noticing that the diagram

Bunext(X) Cohext(X)

ev3×ev1 ev3×ev1 Bun(X) × Bun(X) Coh(X) × Coh(X) 36 M. PORTA AND F. SALA is a pullback square. 

3.4. Extensions of coherent sheaves on Simpson’s shapes. In this section, we carry out an anal- ysis similar to the one of the previous section in the case where Y is one of the Simpson’s shapes XB, XdR, and XDol, 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)], KB is categor- ically proper and it has finite local tor-amplitude. In addition, by [PS20, Proposition 3.1.1-(3)], the map Spec(C) ≃ ∗B −→ XB is an effective epimorphism. Thus, the assumptions of Corollary 3.7 are satisfied. Therefore, the relative cotangent complex of the map ext ev3 × ev1 : Coh (KB) −→ Coh(KB) × Coh(KB) (3.5) ext at a point S → Coh (KB) classifying an extension F1 →F→F2 in Perf(KB × S) is computed ext by the pullback along the projection S ×Coh(KB)×Coh(KB) Coh (KB) → S of q Hom (F , F )[−1] . S+ KB×S 2 1  Here qS : KB × S → S is the natural projection. In particular, we obtain:

Proposition 3.13. Suppose that KB has cohomological dimension ≤ m. The relative cotangent complex of the map (3.5) has tor-amplitude contained in [−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 ext x : S → Coh (KB, u) classifying an extension F1 →F→F2 in Perf(KB × S) of perfect com- plexes of tor-amplitude ≤ 0 relative to S, the complex qS+(HomKB×S(F2, F1)[−1]) is contained in cohomological amplitude [−1, m − 1]. Unraveling the definitions, this is equivalent to check that the complex qS∗(HomKB×S(F1, F2)) is contained in cohomological amplitude [−m,0]. This follows from the assumption on the cohomological dimension of KB and from Lemma 2.29.  Now let X be a smooth and proper complex scheme. Define the stacks ext ext top ext ext top CohB (X) := Coh (XB ) and BunB (X) := Bun (XB ) . ext top These stacks are geometric and locally of finite presentation since the stacks Perf (XB ) and ∆1×∆1 top Perf (XB ) are so. By using similar arguments as in the proof of Proposition 3.8, we get that the cotangent complex L ext is perfect and has tor-amplitude [−1,2n − 1]. Finally, by CohB (X) ext ext Lemma 2.29 we get CohB (X) ≃ BunB (X). Corollary 3.14. If X is a smooth projective complex curve and K := Xtop, then the map (3.5) is derived locally complete intersection.

3.4.2. De Rham shape. Let X be a smooth and proper complex scheme of dimension n. First note that, by [PS20, Proposition 4.1.1-(6)], XdR is categorically proper and it has finite local tor- amplitude. Moreover, by [PS20, Proposition 4.1.1-(3)], the canonical map λX : X → XdR is an effective epimorphism. Define the stacks ext ext ext ext CohdR (X) := Coh (XdR) and BundR (X) := Bun (XdR) . ext These stacks are geometric and locally of finite presentation since the stacks Perf (XdR) and ∆1×∆1 Perf (XdR) are so. Since XdR 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 ext is perfect and has CohdR (X) ext ext tor-amplitude [−1,2n − 1]. Finally, by Lemma 2.32 we get CohdR (X) ≃ BundR (X). As in the case of the Betti shape, we deduce that the relative cotangent complex of the map ext ev3 × ev1 : CohdR (X) −→ CohdR(X) × CohdR(X) (3.6) TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 37

ext at a point x : S → Coh (XdR) classifying an extension F1 →F →F2 in Perf(XdR × S) is ext computed by the pullback along the projection S ×CohdR(X)×CohdR(X) CohdR (X) → S of q Hom (F , F )[−1] . S+ XdR×S 2 1  Here qS : XdR × S → S is the natural projection. In particular, we obtain: Proposition 3.15. Suppose that X is connected and of dimension n. The the relative cotangent complex of the map (3.6) has tor-amplitude contained in [−1,2n − 1].

Proof. It is enough to prove that for every unaffine derived scheme S ∈ Aff and every point ext x : S → CohdR (X) classifying an extension F1 →F→F2 in PerfdR(X × S) of perfect complexes of tor-amplitude ≤ 0 relative to S, the complex qS+(HomXdR×S(F2, F1)[−1]) is contained in co- homological amplitude [−1,2n − 1]. Unraveling the definitions, this is equivalent to check that the complex qS∗(HomXdR×S(F1, F2)) is contained in cohomological amplitude [−2n,0]. In other words, we have to check that Exti (F , F ) = 0 XdR×S 1 2 for i > 2n. This follows from [HTT08, Theorem 2.6.11] and [Ber83, §11]. 

Corollary 3.16. If X is a smooth projective complex curve, then the map (3.6) is derived locally complete intersection.

3.4.3. Dolbeault shape. Let X be a smooth and proper complex scheme. By [PS20, Lemmas 5.3.2 nil and 5.3.3], XDol and XDol are categorically proper and they have finite local tor-amplitude. More- nil nil over, by [PS20, Lemma 5.3.1], the canonical maps κX : X → XDol and κX : X → XDol are effective epimorphisms. Define the stacks ext ext ext ext CohDol(X) := Coh (XDol) and BunDol(X) := Bun (XDol) , nil, ext ext nil nil, ext ext nil CohDol (X) := Coh (XDol) and BunDol (X) := Bun (XDol) . ext ∆1×∆1 These stacks are geometric and locally of finite presentation since Perf (XDol), Perf (XDol) ext nil ∆1×∆1 nil and Perf (XDol), Perf (XDol) are so. nil Since XDol and XDol satisfy the assumptions of Proposition 3.2, we may use similar argu- ments as in the proof of Proposition 3.8, and we get that the cotangent complexes L ext and CohDol(X) L nil, ext are perfect and have tor-amplitude [−1,2n − 1]. CohDol (X) As in the case of the Betti and de Rham shapes, we thus deduce that the relative cotangent complex of the map ext ev3 × ev1 : CohDol(X) −→ CohDol(X) × CohDol(X) (3.7) ext at a point x : S → CohDol(X) classifying an extension F1 →F →F2 in Perf(XDol × S) is ext computed by the pullback along the projection S ×CohDol(X)×CohDol(X) CohDol(X) → S of q Hom (F , F )[−1] . S+ XDol×S 2 1  Here qS : XDol × 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 in [−1,2n − 1].

Proof. It is enough to check that for every unaffine derived scheme S ∈ Aff and every point ext x : S → CohDol(X) classifying an extension F1 →F→F2 in Perf(XDol × S) of perfect complexes of tor-amplitude ≤ 0 relative to S, the complex qS+(HomXDol×S(F2, F1)[−1]) is contained in cohomological amplitude [−1,2n − 1]. Unraveling the definitions, this is equivalent to check that 38 M. PORTA AND F. SALA

the complex qS∗HomXDol×S(F1, F2) is contained in cohomological amplitude [−2n,0]. In other words, we have to check that Exti (F , F ) = 0 XDol×S 1 2 for i > 2n. This follows from the BNR correspondence [Sim94b, Lemma 6.8] (cf. also [GK05, §4] and [SS20, §2.3]).  Corollary 3.18. If X is a smooth projective complex curve, then the map (3.7) is derived locally complete intersection.

4. 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. Let

T := Hom∆([1], −) : ∆ −→ Cat∞ , where ∆ is the simplicial category. We write Tn instead of T([n]). Given any C-linear stable ∞-category C, we let op S•C : ∆ −→ Cat∞ T be the subfunctor of Fun(T(−), C) that sends [n] to the full subcategory SnC of C n := Fun(Tn, C) spanned by those functors F : Tn →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

F(i, j) F(i + 1, j)

F(i, j + 1) F(i + 1, j + 1) 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 isa2-Segal object in Cat∞. Consider the functor op op dAff × ∆ −→ Cat∞ defined by sending (Spec(A), [n]) to SnAPerf(A). We denote by op op S•APerf : ∆ −→ Fun(dAff , Cat∞) op the corresponding functor. Since limits are computed objectwise in Fun(dAff , Cat∞), we see that op ≃ S•APerf is a 2-Segal object in Fun(dAff , Cat∞). The maximal ∞-groupoid functor (−) : Cat∞ → S is a right adjoint, and in particular it commutes with limits. We let op S•APerf : ∆ −→ dSt be the functor obtained by S•APerf by applying the maximal ∞-groupoid functor. The above considerations show that S•APerf is a 2-Segal object in dSt. Let now X be a derived stack. The functor Map(X, −) : dSt → dSt commutes with limits, and therefore the simplicial derived stack

S•APerf(X) := Map(X, S•APerf) 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. TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 39

As in Section 3, we extract a full substack of coherent sheaves as follows. For every n ≥ 0, let n(n+1) N N := 2 . Evaluation at (i, j) ∈ Tn induce a well defined map SnAPerf(X) → APerf(X) . We define SnCoh(X) by the fiber product

SnCoh(X) SnAPerf(X) .

Coh(X)N APerf(X)N ext Notice that for n = 2 this construction yields a canonical identification S2Coh(X) ≃ Coh (X). We have:

Lemma 4.1. The simplicial object S•Coh(X) is a 2-Segal object.

Proof. Using [DK12, Proposition 2.3.2(3)], we are reduced to check that for every n ≥ 3 and every 0 ≤ i < j ≤ n, the natural morphism

S Coh(X) −→ S Coh(X) ×S S Coh(X) n n−j+i+1 1Coh(X) j−i is an equivalence. Here the morphism is induced by the maps [n − j + i + 1] → [n] and [j − i] → [n] corresponding to the inclusions {0,1,..., i, j, j + 1,..., n} ⊂ {0,..., n} and {i, i + 1,..., j} ⊂ {0,..., n} . We have the following commutative diagram:

S Coh(X) S Coh(X) ×S S Coh(X) n n−j+i+1 1Coh(X) j−i

S APerf(X) S APerf(X) ×S S APerf(X) n n−j+i+1 1APerf(X) j−i . 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 : Tn → APerf(X × S) be a semigrid of length n and write Fa,b for the image of (a, b) ∈ Tn. Then if Fa,b ∈ CohS(X × S) for a, b ∈ {0,1,..., i, j, j + 1,..., n} or for a, b ∈ {i, i + 1,..., j}, then Fa,b ∈ CohS(X × S) for all a, b. A simple induction argument reduces ourselves to the following statement: suppose that

G0 G1

G2 G3 is a pullback square in Perf(X × S). Assume that G0, G2 and G3 belong to CohS(X × S). Then G1 belongs to CohS(X × S) as well. Since G0 and G3 have tor-amplitude ≤ 0 relative to S, we see that, locally on X, for every G ∈ Coh♥(S) one has

πk(p∗(G1 ⊕ G2) ⊗ G) ≃ 0 for k ≥ 1, where p : X × S → S is the canonical projection. However, πk(p∗(G2) ⊗ G) ≃ 0 because G2 has tor-amplitude ≤ 0 relative to S. Therefore πk(p∗(G1) ⊗ 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 Seg Alg Corr× 2- (T ) −→ E1 ( (T )) . 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]. 40 M. PORTA AND F. SALA

As E1-algebras in correspondences play a significant role for us, we introduce the following terminology: Definition 4.2. Let T be an ∞-category with finite products and let O⊗ be an ∞-operad. We ⊗ × define the ∞-category of O -convolution algebras in T as the ∞-category AlgO⊗ (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 E1-convolution alge- bra in dSt.

We conclude this section with an analysis of the geometricity of SnCoh(X). First, we observe that SnPerf canonically coincides with To¨en-Vaqui´emoduli of object construction

SnPerf ≃MSnPerf .

To show that SnPerf 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 subcate- gory spanned by compact objects of C. P L,ω Lemma 4.4. Let C ∈ rC be a compactly generated C-linear stable ∞-category and let I be a finite category. Then: (1) The canonical map Ind(Fun(I, Cω)) −→ Fun(I, C) 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 Fun(I, Cω) −→ Fun(I, C) 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:

evi : Fun(I, C) −→ C . -Since C is presentable, we see that both left and right Kan extensions along {i} ֒→ I exist, pro viding a left adjoint Li and a right adjoint Ri to evi. Moreover, since I is finite the functor Ri is computed by a finite limit, and therefore Ri commutes with filtered colimits. Equivalently, evi 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 G −→ F ω G∈Fun(I,C)/F is an equivalence. Since the functors evi are jointly conservative and they commute with colimits, it’s enough to check that for every i ∈ I the induced map colim G(i) −→ F(i) ω G∈Fun(I,C)/F

25When I is a finite poset, this is a consequence of [Lur09, Proposition 5.3.5.15]. Notice that Warning 5.3.5.16 does not apply because for us I is a category, and not an arbitrary simplicial set. TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 41 is an equivalence. We can factor this map as colim G(i) −→ colim X −→ F(i) . ω ∈Cω G∈Fun(I,C)/F X /F(i) Since C is compactly generated, the second map is an equivalence. Therefore, it is enough to prove that the functor ω ω evi : Fun(I, C)/F −→ C/F(i) is cofinal. Let α : X → F(i) be a morphism, with X ∈Cω. We will prove that the ∞-category ω ω E := Fun(I, C) ×Cω (C ) /F /F(i) /F(i) α/ 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

X −→ Aj(i) −→ F(i) .

Since Li ⊣ evi, we see that A induces a diagram A : J → Fun(I, C)ω . Li(X)//F ⊲ e Let A : J → Fun(I, C) be the colimit extension of A. Since ev commutes with filtered Li(X)//F i colimits, Li commutes with compact objects, hence Li(X) ise 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) . Applying evi, we obtain the required extension J → E of A. The Li(X)//F proof of (1) is therefore achieved. To prove point (2), we first observe that Fun(I, C) ≃ FunR(PSh(I)op, C) ≃ PSh(I) ⊗C , where the last equivalence follows from [Lur17, Proposition 4.8.1.17]. We can further rewrite it as

PSh(I) ⊗ C ≃ (PSh(I) ⊗ C-Mod) ⊗C-Mod C ≃ Fun(I, C-Mod) ⊗C-Mod C . It is therefore enough to prove that Fun(I, C-Mod) is smooth and proper. Observe that the collec- tion of objects {Li(C)}i∈I of Fun(I, C-Mod) are compact objects and they generate the category, because the evaluation functors evi are jointly conservative. Since I is a finite category, the object C E := M Li( ) i∈I is a single compact generator for Fun(I, C-Mod). Moreover, the end formula for the mapping spaces in Fun(I, C-Mod) shows that for F, G ∈ Fun(I, C-Mod)ω ≃ Fun(I, Perf(C)), Map(F, G) is perfect. In other words, Fun(I, C-Mod) is proper. To prove that it is smooth as well, it’s enough to check that it’s of finite type, see [TVa07, Proposition 2.14]. Combining Lemma 2.11 and Corollary P L,ω 2.12 in loc. cit., we are reduced to show that it is a compact object in in rC . Let {Dα} be a filtered P L,ω diagram in rC and let D := colim Dα . α We have

MapP L,ω (Fun(I, C-Mod), colim Dα) ≃ MapPrL,ω (PSh(I), colim Dα) rC α α ω ω ≃ MapCat∞ (PSh(I) , colim D ). α α 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 ω MapP L,ω (Fun(I, C-Mod), colim Dα) ≃ colim MapCat∞ (I, Dα ) rC α α

≃ colim MapP L,ω (Fun(I, C-Mod), Dα) . α rC 42 M. PORTA AND F. SALA

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 k-linear ∞-category. If C is of finite type (resp. proper) then SnC is of finite type (resp. proper).

n−1 1 n Proof. There is a natural inclusion ∆ ֒→ Tn, sending [i] to the map (0, i + 1) : ∆ → ∆ . Left Kan extension along this map provides a canonical map

n−1 Fun(∆ , C) −→ Fun(Tn, C) , which factors through SnC. Proceeding by induction on n and applying [Lur09, Proposition 4.3.2.15] we see that the induced functor

n−1 Fun(∆ , C) −→ SnC is an equivalence. Since ∆n−1 is idempotent complete and finite, the conclusion follows from Lemma 4.4. 

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 SnCoh(X) is geometric and locally of finite presentation.

4.2. 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

QCoh(Coh(X)) with the structure of a E1-algebra. 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 Cohb. 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 Cohb(Coh(X)). Let Corr×(dSchqcqs) be the symmetric monoidal (∞,2)-category or correspondences on quasi- compact and quasi-separated derived schemes. Combining [To¨e12, Proposition 1.4] with [GaR17a, Theorem 7.3.2.2] we obtain a functor qcqs st QCoh: Corr(dSch ) −→ Cat∞ .

Using [Mac20, Theorem 4.4.6], we see that the above functor can be upgraded to a symmetric monoidal functor × qcqs st QCoh: Corr (dSch ) −→ Cat∞ . Finally, using [GaR17a, Proposition 9.2.3.4] we can extend this to a right-lax symmetric monoidal functor × st QCoh: Corr (dGeom)rep,all −→ Cat∞ , × × where Corr (dGeom)rep,all is the full subcategory of Corr (dGeom) where vertical morphisms are representable by derived schemes. Informally speaking, we can describe this functor as follows: • it sends a derived geometric stack F ∈ Corr×(dGeom) to QCoh(F); TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 43

• it sends a 1-morphism p X0 Y q

X1 to the composition ∗ p q∗ QCoh(X0) QCoh(Y) QCoh(X1) ; • the right-lax symmetric monoidal structure is given by ⊠: QCoh(Z) ⊗ QCoh(Y) −→ QCoh(Z × Y) .

Denoting by prZ : Z × Y → Z and prY : Z × Y → Y the two natural projections, then ∗ ∗ ⊠ O F G := prZF ⊗ Z×Y prYG .

Let X be a derived stack. As shown in Proposition 4.3, the stack Coh(X) defines an E1-algebra × 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 Proposi- tions 2.23, 2.27, 2.33, and 2.34. In this case, we can apply QCoh and obtain a stably monoidal ∞-category st QCoh(Coh(X)) ∈ Alg (Cat∞) . (4.1) E1 b Now, we would like to define an E1-algebra structure on Coh (Coh(X)). This will be achieved by restricting the functor QCoh to a right-lax monoidal functor Cohb from the category of corre- spondence. 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 qc (−)ind : dGeom −→ Ind(dGeom ) .

Since (−)ind commutes with limits, we see that the simplicial object ∆op qc (S•Coh(X))ind ∈ Fun( , Ind(dGeom )) × qc is a 2-Segal object, and therefore defines an E1-algebra structure on Coh(X)ind in Corr (Ind(dGeom )). When the context is clear, we drop the subscript (−)ind in the above expression. On the other hand, Corollary A.13 provides a right-lax symmetric monoidal functor × qc st QCohpro : Corr (Ind(dGeom ))rps,all −→ Pro(Cat∞) In particular, we obtain a refinement of (4.1), i.e., the stable pro-category st “lim” QCoh(U) ∈ Pro(Cat∞) U⋐Coh(X) acquires a canonical E1-algebra structure. The colimit is taken over all quasi-compact open sub- stacks 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 Cohb. Definition 4.7. A morphism f : X → Y in Ind(dGeomqc) is said to be ind-derived lci if for every Z ∈ qc dGeom 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

find : Xind → Yind is ind-derived lci. 44 M. PORTA AND F. SALA

Proof. Using Lemma A.1-(1) we can choose an open Zariski exhaustion

···→֒ U0 ֒→ U1 ֒→··· ֒→ Uα ֒→ Uα+1 = ∅ of Y, where each Uα is a quasi-compact derived geometric stack. Set

Vα := Uα ×Y X .

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

Xind ≃ “colim” Vα and Yind ≃ “colim” Uα , qc and find ≃ “colim” fα. Let Z ∈ dGeom 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:

Z ×Y X Vα X .

gα ZUα Y

Since the morphism Vα → Uα is quasi-compact and derived lci, the same goes for Z ×Y X → Z. This completes the proof. 

× qc × qc Consider now the subcategory Corr (Ind(dGeom ))rps,lci of Corr (Ind(dGeom ))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 subcate- gory: × qc st QCohpro : Corr (Ind(dGeom ))rps,lci −→ Pro(Cat∞) . Let f : X → Y be a morphism in Ind(dGeomqc) which is representable by proper schemes. Using Lemma A.1-(1), we can choose an open Zariski exhaustion

···→֒ U0 ֒→ U1 ֒→··· ֒→ Uα ֒→ Uα+1 = ∅ of Y, where each Uα is a quasi-compact derived stack. Let Vα := Uα ×Y X and let fα : Vα → Uα be the induced morphism. Since f is representable by proper schemes, Vα is again quasi-compact and therefore we obtain a compatible open Zariski exhaustion of X. Thanks to the derived base- st change, we can therefore compute the pushforward in Pro(Cat∞) by

f∗ := “lim” fα∗ : “lim” QCoh(Vα) −→ “lim” QCoh(Uα) . α α α

Since each fα is representable by proper schemes, this functor restricts to a morphism b b f∗ : “lim” Coh (Vα) −→ “lim” Coh (Uα) . α α Using [To¨e12, Lemma 2.2], we similarly deduce that if f : X → Y is a morphism in Ind(dGeomqc) which is ind-derived lci, then the pullback functor restricts to a morphism ∗ b b f : “lim” Coh (Uα) −→ “lim” Coh (Vα) . α α

This implies that QCohpro admits a right-lax monoidal subfunctor b × qc st Cohpro : Corr (Ind(dGeom ))rps,lci −→ Pro(Cat∞) . 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. TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 45

Then the composition ∗ b b ⊠ b q∗◦p b Cohpro(Coh(X)) × Cohpro(Coh(X)) −→ Cohpro(Coh(X) × Coh(X)) −−−→ Cohpro(Coh(X)) , where the map on the right-hand-side is induced by the 1-morphism in correspondences:

Cohext(X) p q , (4.2)

Coh(X) × Coh(X) Coh(X)

b endows Cohpro(Coh(X)) with the structure of an E1-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 E1-algebra in Corr×(Ind(dGeomqc)). 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 pind is ind-derived lci. Moreover, the morphism q is representable by proper schemes: indeed one can show that q is representable by Quot schemes26 and it is a known fact that these are proper schemes. The 2-Segal condition therefore guarantees that (S•Coh(X))ind × qc endows Coh(X)ind with the structure of an E1-algebra in Corr (Ind(dGeom ))rps,lci. Applying b × qc st the right-lax monoidal functor Cohpro : Corr (Ind(dGeom ))rps,lci → Pro(Cat∞), we conclude that b st Cohpro(Coh(X)) inherits the structure of an E1-algebra in Pro(Cat∞). 

st Since E1-algebras in Pro(Cat∞) are (by definition) the same as E1-monoidal categories in st b Pro(Cat∞), we refer to the corresponding tensor structure as the CoHA tensor structure on Cohpro(Coh(X)). We denote this monoidal structure by ⋆ . Remark 4.10. Let X be smooth projective complex scheme of dimension either one or two. Then × qc the moduli stacks introduced in §2.3.1 are E1-algebras in Corr (Ind(dGeom ))rps,lci. If X is quasi- 6d × qc projective, then Cohprop(X) is an E1-algebra in Corr (Ind(dGeom ))rps,lci 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. △ 4.3. The equivariant case. The main results of §4.1 and of §4.2 carry over without additional difficulties in the equivariant setting. Let us sketch how to modify the key constructions. Let X ∈ dSt be a derived stack and let G ∈ Mongp (dSt×) be a grouplike E -monoid in derived E1 1 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 ∆op 1 AG,X : × ∆ −→ dSt satisfying the relative 1-Segal condition. Informally speaking, AG,X is the diagram ··· G2 × X G × X X ,

··· G2 G Spec(k)

26In the de Rham and Dolbeault cases, one has to consider Quot schemes of Λ-modules `ala Simpson, cf. the proof of [Sim94a, Theorem 3.8]. To show the properness of q in the Betti case, one can either use the global quotient description of the Betti moduli stack, described e.g. in [PT19, §1.2], or apply the derived Riemann-Hilbert correspondence of [Por17] and use the invariance of properness under analytification. 46 M. PORTA AND F. SALA which encodes at the same time the E1-structure on G and the action on X. We denote the geomet- ric 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 ∆op S•PerfG(X) : −→ dSt/BG by setting

S•PerfG(X) := Map/BG([X/G], S•Perf × BG) .

We also write PerfG(X) for S1PerfG(X). Notice that

Spec(k) ×BG S•PerfG(X) ≃ Map(X, S•Perf) .

We can therefore unpack the datum of the map S•PerfG(X) → BG by saying that G acts canoni- 27 cally on S•Perf(X). From this point of view, we have a canonical equivalence

S•PerfG(X) ≃ [S•Perf(X)/G] . As an immediate consequence we find that b b Coh (PerfG(X)) ≃ CohG(Perf(X)) . The right hand side denotes the G-equivariant stable ∞-category of bounded coherent complexes on Perf(X). Since the functor

Map/BG([X/G], (−) × BG) : dSt −→ dSt/BG commutes with limits, we deduce: ∆op Proposition 4.11. The simplicial derived stack S•PerfG(X) : → dSt/BG is a 2-Segal object. 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 ∆op flat relative to BG. We define S•CohG(X) ∈ Fun( , dSt/BG) as follows. Given a affine derived scheme S = Spec(A) and a morphism x : S → BG, we set ≃ ∆op S Map/BG(S, S•CohG(X)) := (S•CohS(S ×BG [X/G])) ∈ Fun( , ) . We immediately obtain: ∆op Corollary 4.12. Let X be a geometric derived stack. Then the simplicial derived stack S•CohG(X) : → dSt/BG is a 2-Segal object.

The above 2-Segal object endows Coh(X) with the structure of a G-equivariant E1-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 E1-algebra 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•CohG(X) induces b b a E1-monoidal structure on Cohpro(CohG(X)) ≃ Cohpro,G(Coh(X)).

Proof. Similarly to the proof of Theorem 4.9, all we need to check is that the map ext ev3 × ev1 : CohG (X) −→ CohG(X) × CohG(X) is quasi-compact and derived lci and that the map ext ev2 : CohG (X) −→ CohG(X)

27This is nothing but a very special case of the for ∞-topoi, see [Lur09, Theorem 6.1.3.9 and Proposi- tion 6.1.3.10]. TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 47 is representable by proper schemes. Observe that for i = 1, 2, 3 the right and the outer squares in the commutative diagram ev Cohext(X) i Coh(X) Spec(k)

ext evi CohG (X) CohG(X) BG are pullback squares. Therefore the same goes for the left one. The conclusion now follows because Spec(k) → BG is a smooth atlas and the analogous statements for Coh(X), which have been proven in the proof of Theorem 4.9. 

5. 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. b The CoHA tensor structure on Cohpro(Coh(Y)) endows G(Coh(Y)) with the structure of a E1-algebra in Sp. Remark 5.2. Up to our knowledge, the above result provides the first construction of a Hall alge- bra structure on the full G-theory spectrum of Coh(Y). Furthermore, the above results hold also 6d for the stack Cohprop(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 G0(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 G0(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 ≤d ext ≤d,ext Y := Cohprop(S), Y := Cohprop (S) and cl ext cl ext Y0 := Y, Y0 := Y . Proposition 3.6 implies that ext ∨ = Spec (SymO (E )) Y Y×Y Y×Y , where E ∈ Perf(Y × Y) is a certain perfect complex on Y × Y. Let

i : Y0 × Y0 −→ Y × Y ∗ be the natural inclusion and let E0 := i (E). Set ext ∨ Y := SpecY ×Y (SymO (E )) . 0 0 Y0×Y0 0 e 48 M. PORTA AND F. SALA

Consider the commutative diagram

ext ι ext j ext Y0 Y Y e p p . p0 e i Y0 × Y0 Y × Y The right square is a pullback, by construction. Therefore, the diagram

j∗ Cohb(Yext) Cohb(Yext) e p∗ p∗ e b i∗ b Coh (Y0 × Y0) Coh (Y × Y) canonically commutes. Passing to G-theory, the functors i∗ and j∗ induce equivalences, thereby identifying p∗ et p∗. −1 ∗ ext We now comparee ι∗ ◦ p : G(Y0 × Y0) → G(Y0 ) with the construction of the virtual pullback p0! by Kapranov-Vasserot.e In [KV19, §3.3], they take as additional input an explicit resolution of E0 as a 3-terms complex 0 1 • −1 d 0 d 1 E0 := ··· −→ 0 −→ E0 −→E0 −→E0 −→ 0 −→ ··· . ≤0 −1 0 Let E0 be the 2-terms complex E0 →E0 and set ≤0 V ≤0 ∨ 1 V 1 ∨ E := Y0×Y0 ((E0 ) ) and E := Y0×Y0 ((E0 ) ) . ≤0 1 The canonical projection π : E → Y0 × Y0 is smooth and the differential d induces a section ≤0 ∗ 1 1 ≤0 s : E −→ π E := E ×Y0×Y0 E , such that Yext t E≤0 e t s

E≤0 0 π∗E1 ext is a derived pullback square. Therefore, we can factor p: Y → Y0 × Y0 as e e Yext t E≤0 e π . p e Y0 × Y0

! ! ∗ ext As in loc.cit. the operation p0 is defined as the composition s ◦ π : G0(Y0 × Y0) → G0(Y0 ), to compare the two constructions it is enough to verify that ! −1 ∗ s = ι∗ ◦ t ≤0 ext ! as functions G0(E ) → G0(Y0 ). This follows at once unraveling the definition of s . Thus our construction of the Hall product on G0(Y) ≃ G0(Y0) coincides with theirs. Therefore, 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 π lim K(Cohb (Coh6d (S))) 0 pro prop  and the K-theoretical Hall algebra of S as defined in [Zha19, KV19]. Thus, the CoHA tensor structure on b 6d the stable ∞-category Cohpro(Coh (S)) is a categorification of the latter. Finally, if in addition S is toric, similar results holds in the equivariant setting. TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 49

2 60 2 5.1. The equivariant case. Let Coh0(C ) := Cohprop(C ) be the geometric derived stack of zero- dimensional coherent sheaves on C2. Note that the natural C∗ × C∗-action on C2 lifts to an action 2 on Coh0(C ). C∗×C∗ cl 2 A convolution algebra structure on the Grothendieck group G0 ( Coh0(C )) of the trun- 2 cation of Coh0(C ) has been defined in [SV13a, SV12]. In loc. cit., the convolution product cl 2 is defined by using an explicit presentation of Coh0(C ) as disjoint union of quotient stacks. C∗×C∗ cl 2 Moreover, as proved in loc. cit., the convolution algebra on G0 ( Coh0(C )) is isomorphic to + ¨ ¨ a positive nilpotent part Uq,t(gl1) of the elliptic Hall algebra Uq,t(gl1) 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 cl 2 description of Coh0(C ) 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. Proposition 5.4. There exists a Z[q, t]-algebra isomorphism b 2 + ¨ π0K(Cohpro, C∗×C∗ (Coh0(C ))) ≃ Uq,t(gl1) .

b 2 + 2 60 2 Thus, Coh ∗ ∗ (Coh (C )), ⋆ is a categorification of U (gl¨ ). Here, Coh (C ) := Coh (C ). pro, C ×C 0  q,t 1 0 prop Let X a smooth projective complex curve and let Higgsna¨ıf(X) := T∗[0]Coh(X) (cf. Remark 2.35). Recall that C∗ acts by “scaling the Higgs fields”. C∗ cl na¨ıf na¨ıf The Grothendieck group G0 ( Higgs (X)) of the truncation of Higgs (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 Higgsna¨ıf(X) as a , then the construction of the product is performed locally and one glues suitably to get a global convolution product. For similar arguments as above and thanks to Remark 2.35, we have the following. Proposition 5.5. Let X be a smooth projective complex curve. There exists an algebra isomorphism between b π lim K(Coh ∗ (Coh(X )) 0 pro, C Dol  and the K-theoretical Hall algebra of Higgs sheaves on X introduced in [SS20, Min18]. Thus, the CoHA ∞ b tensor structure on the stable -category Cohpro, C∗ (Coh(XDol)) 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 Padurariu 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 define the de Rham K-theoretical Hall al- gebra 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. △ 50 M. PORTA AND F. SALA

6. ACAT-HA VERSIONOFTHE 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 alge- b ⋆ bra (CohC∗ (Coh(XDel)), 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 such a 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 filt 1 gr Perf := Perf([AC/Gm]) , Perf := Perf(BGm) . The two morphisms

j 1 i BGm [AC/Gm] Spec(C) ≃ [Gm/Gm] induce canonical morphisms j∗ : Perffilt −→ Perfgr , Perffilt −→ Perf . gr The group structure on BGm endows Perf with a Kunneth monoidal structure. The same goes for Perffilt. 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 • filt st an ∞-category C ∈ Perf -Mod(Cat∞) equipped with a functor Φ • : C ⊗Perffilt Perf −→ C . 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 gr st the given of an ∞-category G ∈ Perf -Mod(Cat∞) together with a morphism Ψ • gr : C ⊗Perffilt Perf −→ 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 b b ss,0 in the previous section with C = Cohpro(Coh(XdR)) and G = Cohpro, C∗ (Coh (XDol)). Let XDel be the deformation to the normal bundle of the map X → XdR as constructed in [GaR17b, §9.2.4]. Then XDel admits a canonical Gm-action and it is equipped with a canonical 1 Gm-equivariant map XDel → A . We refer to XDel as the Deligne’s shape of X. Furthermore, we let G XDel, Gm :=[XDel/ m] G be the quotient by the action of m. We refer to XDel, Gm 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/A1 (XDel) as the functor op (dAff/A1 ) −→ S 1 ≃ sending S → A to the maximal ∞-groupoid CohS(S ×A1 XDel) contained in the ∞-category of families of coherent sheaves on S ×A1 XDel that are flat relative to S. Similarly, we define 1 ( ) Coh/[A /Gm] XDel,Gm as the functor op (dAff 1 ) −→ S /[A /Gm] 1 ≃ → [A G ] ∞ Coh ( × 1 ) sending S / m to the maximal -groupoid S S [A /Gm] XDel,Gm contained in the ∞ × 1 -category of families of coherent sheaves on S [A /Gm] XDel,Gm that are flat relative to S. TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 51

1 ( ) 1 ( ) Proposition 6.3. The derived stack Coh/A XDel (resp. Coh/[A /Gm] XDel, Gm ) is a geometric de- dSt 1 dSt 1 rived stack, locally of finite presentation in /A (resp. /[A /Gm]). Proof. Given a morphism of derived stacks Y → S we write

Perf/S(Y) := Map/S(Y, Perf × S) . A1 A1 G The canonical map X × → XDel (resp. X × [ / m] → XDel, Gm ) is a flat effective epimor- 1 1 A [A G ] Coh 1 ( ) Coh 1 ( ) phism as a -map (resp. / m -map)(cf. [PS20, §6.1]). Thus, /A XDel and /[A /Gm] XDel, Gm fit into the pullback squares (cf. Lemma 2.11 and Corollary 2.19)

1 1 A Coh 1 (X ) Coh(X) × [A /G ] Coh/A1 (XDel) Coh(X) × /[A /Gm] Del, Gm m and .

1 1 Perf 1 ( ) Perf( ) × A Perf 1 ( ) Perf( ) × [A G ] /A XDel X /[A /Gm] XDel, Gm X / m

1 1 1 ( ) ( ) × A 1 ( ) ( ) × [A G ] Since Perf/A XDel and Perf X (resp. Perf/[A /Gm] XDel, Gm and Perf X / m ) 1 1 are geometric as derived stacks over A (resp. [A /Gm]) by [PS20, §6.1.1] and [TVa07, Corol- 1 1 lary 3.29] respectively, and Coh(X) × A (resp. Coh(X) × [A /Gm]) is geometric in dSt/A1 (resp. dSt 1 Coh 1 ( ) Coh 1 ( ) /[A /Gm]) because of Proposition 2.23, we obtain that /A XDel and /[A /Gm] XDel, Gm are geometric as well. 

1 1 1 ( ) → A 1 ( ) → [A G ] We have canonical maps Coh/A XDel and Coh/[A /Gm] XDel, Gm / m . Un- raveling the definitions, we see that

Coh/A1 (XDel) ×A1 {0} ≃ Coh(XDol) and Coh/A1 (XDel) ×A1 {1} ≃ Coh(XdR) , while G ∗ Coh/[A1/G ](XDel, Gm ) ×[A1/G ] B m ≃ CohC (XDol) m m (6.1) ( ) × 1 [G G ] ≃ ( ) × BG Coh XDel, Gm [A /Gm] m/ m Coh XdR m . ∗ We also consider the open substack Coh/A1 (XDel) ⊂ Coh/A1 (XDel) for which the fiber at zero ss,0 is the derived moduli stack Coh (XDol) 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/A1 : ext Coh/A1 (XDel) p q

Coh/A1 (XDel) ×A1 Coh/A1 (XDel) Coh/A1 (XDel)

dSt 1 and the convolution diagram in /[A /Gm]: ext Coh 1 (X ) /[A /Gm] Del, Gm p q

Coh 1 ( ) × 1 Coh 1 ( ) Coh 1 ( ) /[A /Gm] XDel, Gm [A /Gm] /[A /Gm] XDel, Gm /[A /Gm] XDel, Gm

Because of Corollaries 3.16 and 3.18, it follows that the map p above is derived locally complete ∗ intersection. A similar result holds when we restrict to the open substack Coh/A1 (XDel) 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: 52 M. PORTA AND F. SALA

Proposition 6.4. Let X be a smooth projective complex curve. Then

• there exists a 2-Segal object S•Coh/A1 (XDel) which endows Coh/A1 (XDel) with the structure × of an E -algebra in Corr dGeom 1 ; 1 /A lci,rps

• S 1 ( ) 1 ( ) there exists a 2-Segal object •Coh/[A /Gm] XDel, Gm which endows Coh/[A /Gm] XDel, Gm × with the structure of an E -algebra in Corr dGeom 1 . 1 /[A /Gm]lci,rps ∗ ∗ A similar result holds for Coh 1 (X ) and Coh 1 (X G ). /A Del /[A /Gm] Del, m b b st Corollary 6.5. Coh (Coh 1 ( )) Coh (Coh 1 ( )) E Pro(Cat ) pro /A XDel and pro /[A /Gm] XDel, Gm are 1-algebras in ∞ . ∗ ∗ A similar result holds for Coh 1 (X ) and Coh 1 (X ). /A Del /[A /Gm] Del, Gm By combining the results above with (6.1), we get: Theorem 6.6. Let X be a smooth projective complex curve. Then b (∗) b (∗) Coh C∗ (Coh 1 (XDel)) ≃ Coh (Coh 1 (XDel G )) pro, /A pro /[A /Gm] , m filt is a module over Perf and we have E1-algebra morphisms: (∗) b (∗) b Φ : Coh ∗ (Coh (X )) ⊗ filt Perf −→ Coh (Coh(X )) , pro, C /A1 Del Perf C dR (∗) b (∗) gr b (ss,0) Ψ : Coh ∗ (Coh (X )) ⊗ filt Perf −→ Coh ∗ (Coh (X )) . pro, C /A1 Del Perf C Dol 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 Φ∗ Ψ∗ Cohb Cohb ∗ and are equivalences, i.e., pro(Coh(XdR)) is filtered by pro, C∗ (Coh/A1 (XDel)) with associ- b ss,0 ated graded Cohpro, C∗ (Coh (XDol)).

7. ACAT-HA VERSIONOFTHE RIEMANN-HILBERTCORRESPONDENCE

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[Lur11b, 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 ana- lytic 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 [a, b] relative to S (resp. tor-amplitude ≤ n relative to S) if for every G ∈ APerf♥(S) one has ∗ πi(F ⊗ f G) ≃ 0 i ∈/ [a, b](resp. i > n) . TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 53

≤n We let APerfS (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 ≤0 CohS(X) := APerfS (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 coincide.

Lemma 7.2. Let X be a derived analytic stack, let S ∈ dStnC and let f : X → S be a morphism in dAnSt. Assume that there exists a flat28 effective epimorphism u : U → X. Then F ∈ APerf(X) has tor-amplitude [a, b] relative to S if and only if u∗(F) has tor-amplitude [a, b] relative to S.

Proof. Let G ∈ APerf♥(S). Then since u is a flat effective epimorphism, we see that the pullback functor u∗ : APerf(X) −→ APerf(U) ∗ is t-exact and conservative. Therefore πi(F ⊗ f G) ≃ 0 if and only if ∗ ∗ ∗ ∗ ∗ u (πi(F ⊗ f G)) ≃ πi(u (F) ⊗ u f G) ≃ 0. 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 [a, b] relative to S if and only Γ ∗ if there exists a smooth Stein covering {ui : Ui → X} such that (Ui; ui F) has tor-amplitude [a, b] as Γ Oalg (S; S )-module. Proof. Using Lemma 7.2, we can reduce ourselves to the case where X is a derived Stein space. O ∗ APerf Notice that F ⊗ X f G ∈ (X). Therefore, Cartan’s theorem B applies and shows that O ∗ O ∗ πi(F ⊗ X f G) = 0 if and only if πi( f∗(F ⊗ X f G)) = 0. Observe now that there is a canonical morphism ∗ O O ηF,G : f∗(F) ⊗ S G −→ f∗(F ⊗ X f G) . O When G = S this morphism is obviously an equivalence. We claim that it is an equivalence for any G ∈ APerf(S). Γ Oalg This question is local on S. Write AS := (S; S ). Using [HP18, Lemma 4.12] we can reduce ∗ ∗ O ourselves to the case where G ≃ εS(M) for some M ∈ APerf(AS). Here εS : AS-Mod → S-Mod is the functor introduced in [HP18, §4.2]. In this case, we see that since ηF,G is an equivalence when O G = S, it is also an equivalence whenever M (and hence G) is perfect. In the general case, we • ∆op use [Lur17, 7.2.4.11(5)] to find a simplicial object P ∈ Fun( , APerf(AS)) such that |P•| ≃ M . • ∗ • Write P := εS(P ). Reasoning as in [PY18, Corollary 3.5], we deduce that • ∗ |P | ≃ εS(M) ≃ G . It immediately follows that ∗ ∗ • O O F ⊗ X f G≃|F⊗ X f P | , and the question of proving that ηF,G is an equivalence is reduced to check that f∗ preserves the above colimit. Since the above diagram as well as its colimit takes values in APerf(X), we can ap- ply Cartan’s theorem B. The descent spectral sequence degenerates, and therefore the conclusion follows. 

28A 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. 54 M. PORTA AND F. SALA

Corollary 7.4. Let f : X → S be a morphism as in the previous lemma. Let j : clS → S be the canonical morphism and consider the pullback diagram

i X0 X

f0 f . j clS S

Then an almost perfect complex F ∈ APerf(X) has tor-amplitude [a, b] relative to S if and only if i∗F has tor-amplitude [a, b] relative tocl S.

Proof. The map j is a closed immersion and therefore the same goes for i. In particular, for any G ∈ APerf(clS) the canonical map ∗ ∗ f j∗(G) −→ i∗ f0 (G) 29 is an equivalence. Moreover, the projection formula holds for i and i∗ is t-exact. Suppose that F has tor-amplitude [a, b] relative to S. Let G ∈ APerf♥(clS). Then ∗ ∗ ∗ ∗ i∗(i F ⊗O f G) ≃ F ⊗O i∗ f G≃F⊗O f j∗G . X0 0 X 0 X ♥ 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 [a, b] relative to clS. For the ♥ cl ♥ vice-versa, it is enough to observe that j∗ induces an equivalence APerf ( S) ≃ APerf (S). 

Definition 7.5. Let S ∈ dStnC 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. See [PS20, Proposition 2.3.16]. In the analytic setting, it is difficult to prove a similar result, because it essentially relies on the base change for maps be- tween derived affine schemes (see [PS20, Proposition 2.3.4]), which is not available in the analytic setting. Corollary 7.7. Let X be a derived analytic stack and let S be a derived Stein space. Assume that there exists a universally flat effective epimorphism u : U → X where U is geometric and underived. Let f : S′ → S be a morphism of derived Stein spaces and consider the pullback g X × S′ X × S q p . f S′ S If F ∈ APerf(X × S) has tor-amplitude [0,0] relative to S, then g∗F has tor-amplitude [0,0] relative to S′.

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 reduce ourselves to the case X = U. Using Corollary 7.4, we can reduce ourselves to the case where S and S′ are underived. Since the question is local on X, we can furthermore assume X to be a Stein space. At this point, the conclusion follows directly from [Dou66, §8.3, Proposition 3]. 

29 Ultimately, this can be traced back to the unramifiedness of the analytic pregeometry Tan(C). See[PY18, Lemma 6.1] for an argument in the non-archimedean case. TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 55

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(Xan), 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 equivalence30 Perf(X)an ≃ AnPerf(Xan) . (7.1) We wish to extend this result to Coh(X)an and AnCoh(Xan). Let us start by constructing the map between them. The map Perf(X)an → AnPerf(Xan) is obtained by adjunction from the map Perf(X) −→ AnPerf(Xan) ◦ (−)an , afp ≃ which, for S ∈ dAff , is induced by applying (−) : Cat∞ → S to the analytification functor Perf(X × S) −→ Perf(Xan × San) . It is therefore enough to check that this functor respects the two subcategories of families of coherent sheaves relative to S and San, 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 [a, b] relative to S if and only if F an ∈ APerf(Xan) has tor-amplitude [a, b] relative to San.

Proof. Suppose first that F an has tor-amplitude [a, b] relative to San. Let G ∈ APerf♥(S). Then we O ∗ an have to check that πi(F ⊗ X f G) = 0 for i ∈/ [a, b]. As the analytification functor (−) is t-exact O ∗ an and conservative, this is equivalent to check that πi((F ⊗ X f G) ) = 0. On the other hand, ∗ an an an∗ an O O (F ⊗ X f G) ≃ F ⊗ Xan f (G ) . (7.2) The conclusion now follows from the fact that Gan ∈ APerf♥(San). Suppose now that F has tor-amplitude [a, b] relative to S = Spec(A). We can check that F an has tor-amplitude [a, b] relative to San locally on San. For every derived Stein open subspace an jU : U ⊂ S , write Γ Oalg AU := (U; San |U) .

Write aU : Spec(AU) → S for the morphism induced by the canonical map A → AU. Consider the two pullback squares

bU an iU an XU X XU X an fU f , an f . fU a U jU an Spec(AU) S U S There is a natural analytification functor relative to U an an (−)U : APerf(XU) −→ APerf(XU ) . Moreover, the canonical map ∗ an ∗ an iU(H ) −→ (bU(H))U is an equivalence for every H∈ APerf(X). Fix now G ∈ APerf(San). If G ≃ (G)an for some G ∈ APerf♥(S), then the equivalence (7.2) shows that e e an an∗ O πi(F ⊗ Xan f (G)) = 0

30The derived analytification functor has been firstly introduced in [Lur11b, Remark 12.26] and studied extensively in [Por15, §4]. For a review, see [HP18, §3.1]. 56 M. PORTA AND F. SALA

an for i ∈/ [a, b]. In the general case, we choose a double covering {Vi ⋐ Ui ⋐ S } by relatively com- an APerf pact derived Stein open subspaces of S . Using [HP18, Lemma 4.12]we canfind Gi ∈ (AVi ) such that G| ≃ ε∗ (G ). Here ε∗ is the functor introduced in [HP18, §4.2]. At thise point, we ob- Vi Vi i Vi e ∗ serve that Lemma 2.4 guarantees that bU(F) has tor-amplitude [a, b] relative to Spec(AU). The conclusion therefore follows from the argument given in the first case. 

As a consequence, we find a morphism Coh(X) −→ AnCoh(Xan) ◦ (−)an , which by adjunction induces an an µX : Coh(X) −→ AnCoh(X ) , which is compatible with the morphism Perf(X)an → AnPerf(Xan). Proposition 7.9. If X is a proper complex scheme, the natural transformation an an µX : Coh(X) → AnCoh(X ) 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 ∈ dStnC and every compact derived Stein subspace K of U, the natural morphism an “colim” CohSpec(A )(Spec(AV) × X) −→ “colim” CohV (V × X ) K⊂V⊂U V K⊂V⊂U st is an equivalence in Ind(Cat∞). Here the colimit is taken over the family of open Stein neighbor- hoods V of K inside U. Using [HP18, Lemma 5.13] we see that for every V, the functor Coh (Spec( ) × ) −→ Coh ( × an) Spec(AV) AV X V V X is fully faithful. The conclusion now follows 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 AnPerfext, AnPerfext(X), and AnCohext(X). We deal directly with the Waldhausen construction. We define the simplicial derived analytic stack op ∆op S•AnPerf : dStnC −→ Fun( , S) by sending an object [n] ∈ ∆ and a derived Stein space S to the full subcategory of31

. ((SnPerf(S) ֒→ Fun(Tn, Perf(S

Since each Tn is a finite category, [HP18, Corollary 7.2] and the flatness of the relative analytifica- tion proven in [PY17, Proposition 4.17] imply that the natural map an (S•Perf) −→ S•AnPerf is an equivalence. Moreover, [HP18, Proposition 7.3] implies that the analytification commutes with the limits appearing in the 2-Segal condition. We can therefore deduce that S•AnPerf isa2- Segal object in dAnSt. From here, we deduce immediately that for every derived analytic stack X, AnMap(X, S•AnPerf) is again a 2-Segal object. At this point, the same reasoning of Lemma 4.1 yields:

31See §4.1 for the notations used here. TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 57

Proposition 7.10. Let X ∈ dAnSt be a derived geometric analytic stack. Then S•AnCoh(X) is a 2-Segal object in dAnSt, and therefore it endows the derived analytic stack AnCoh(X) with the structure of an E1-convolution algebra. The morphism (7.2) can be naturally upgraded to a natural transformation an an S•Coh(X) −→ S•AnCoh(X ) ◦ (−) in Fun(∆op, dSt). By adjunction, we therefore find a morphism of simplicial objects an an (S•Coh(X)) −→ S•AnCoh(X ) .

Remark 7.11. Suppose that X is such that each SnCoh(X) is geometric. Then [HP18, Proposition an 7.3] implies that (S•Coh(X)) 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

AnCoh(Y) ≃ AnPerf(Y) ×AnPerf(U) AnCoh(U) . This is the analytic counterpart of Lemma 2.11. Similarly, we can define AnCohext(Y) and AnBunext(Y) and more generally their Wald- hausen 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 E1-convolution algebra in dAnSt. As a particular case, let X be a smooth proper connected analytic space. The Simpson’s shapes XB, XdR, XDol, and XDel exist also 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: XB,XdR,and XDol. 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 E1-convolution algebra. 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 Tdisc(C) be the full subcategory of SchC spanned by finite dimensional n affine spaces AC. Given an ∞-topos X , sheaves on X with values in CAlgC can be canonically R identified with product preserving functors Tdisc(C) → X . We let Top(Tdisc(C)) denote the ∞- category of ∞-topoi equipped with a sheaf of derived commutative C-algebras. The construction performed in [Lur11a, Notation 2.2.1] provides us with a functor op Γ : RTop(T (C)) −→ CAlg . disc  C Equipping both ∞-categories with the cocartesian monoidal structure, we see that Γ can be up- graded to a right-lax symmetric monoidal structure. Composing with the symmetric monoidal st functor QCoh: CAlgC → Cat∞ we therefore obtain a right-lax symmetric monoidal functor op RTop(T (C)) −→ Catst . disc  ∞ R We denote the sheafification of this functor with respect to the ´etale topology on Top(Tdisc(C)) (see [Lur11a, Definition 2.3.1]) by R op st O-Mod: ( Top(Tdisc(C))) −→ Cat∞ . Observe that O-Mod is canonically endowed with a right-lax symmetric monoidal structure. 58 M. PORTA AND F. SALA

Consider the natural forgetful functor alg R (−) : dAnC −→ Top(Tdisc(C)) . 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

alg op (−) R op O-Mod st (dAnC) ( Top(Tdisc(C))) Cat∞ , which canonically inherits the structure of a right-lax monoidal functor. Given X ∈ dAnC, we denote by OX-Mod its image via this functor. This functor admits a canonical subfunctor op st APerf : dAnC −→ Cat∞ , which sends a derived C-analytic space to the full subcategory of OX-Mod spanned by sheaves of almost perfect modules. Observe that sheaves of almost perfect modules are closed under exte- rior 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 O O f∗ : X-Mod −→ Y-Mod restricts to a functor

f∗ : APerf(X) −→ APerf(Y) , which is right adjoint to f ∗. We have: Lemma 7.15. Let X′ u X g f Y′ v Y ′ ′ be a pullback square in dAnC. Assume that the truncations of X, X , Y and Y are separated analytic spaces. If f is proper the commutative diagram

∗ APerf(Y) v APerf(Y′)

f ∗ g∗ ∗ APerf(X) u APerf(X′) 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 Tan(C), proven in [Lur11b, 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. 

sep Let dAnC denote the full subcategory of dAnC spanned by derived C-analytic spaces whose truncation is a separated analytic space. Lemma 7.15 shows that the assumptions of [GaR17a, Theorem 3.2.2(b)] are satisfied with horiz = all and vert = proper. As a consequence, we can extend APerf to a functor sep isom st APerf : Corr(dAnC )proper,all −→ Cat∞ . TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 59

Moreover, the considerations made in [GaR17a, § 3.3.1] show that this functor inherits a canonical right-lax monoidal structure. Using [GaR17a, Theorem 8.6.1.5] we obtain (via right Kan exten- sion) a right-lax monoidal functor isom st APerf : Corr(dAnSt)all,rps −→ Cat∞ . 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 Cohb(X) the full subcategory of APerf(X) spanned by locally cohomologically bounded sheaves of almost perfect modules. We have: Lemma 7.16. Let f : X → Y be a morphism of derived geometric analytic stacks. If f is lci32 then it has finite tor-amplitude and in particular it induces a functor f ∗ : Cohb(Y) −→ Cohb(X) .

Proof. The same argument of [PY20, Corollary 2.9] applies. 

As a consequence, we obtain a right-lax monoidal functor b × st Coh : Corr (dAnSt)rps,lci −→ Cat∞ . 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 an S•Coh(Y) −→ S•AnCoh(Y) (7.3) in Fun(∆op, dAnSt). 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. an an Lemma 7.17. The map (7.3) induces an equivalence (S•Coh(X)) ≃ S•AnCoh(X ). In particu- an lar, for each n ≥ 0 the derived analytic stack SnAnCoh(X ) 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 than the ones discussed there. 

Let X be a smooth proper connected complex scheme. As proved in [HP18, §5.2], the analytifi- cation functor commutes with the Simpson’s shape functor, i.e., we have the following canonical equivalences: an an an an an an (XdR) ≃ (X )dR , (XB) ≃ (XB) , (XDol) ≃ (X )Dol . an Lemma 7.18. Let ∗ ∈ {B, dR, Dol}. Then the map (7.3) induces an equivalence (S•Coh(X∗)) ≃ an an S•AnCoh((X )∗). In particular, for each n ≥ 0 the derived analytic stack SnAnCoh((X )∗) is locally geometric and locally of finite presentation.

Proof. The same proof of Proposition 7.9 applies, with only the following caveat: rather than invoking [HP18, Lemma 5.13 & Proposition 5.15], we should use instead Propositions 5.26 (for the de Rham case), 5.28 (for the Betti case) and 5.32 (for the Dolbeault case) in loc. cit. 

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 Lan In this setting, it means that the analytic cotangent complex X/Y introduced in [PY17] is perfect and has tor- amplitude [0, 1]. 60 M. PORTA AND F. SALA

(2) the Betti, de Rham or Dolbeault stack of a smooth projective curve. Then the composition ⊠ Cohb(AnCoh(Yan)) × Cohb(AnCoh(Yan)) −→ Cohb(AnCoh(Yan) × AnCoh(Yan))

∗ q∗◦p −−−→ Cohb(AnCoh(Yan)) , where the map on the right-hand-side is induced by the 1-morphism in correspondences:

AnCohext(Yan) p q ,

AnCoh(Yan) × AnCoh(Yan) AnCoh(Yan)

b endows Coh (AnCoh(Y)) with the structure of an E1-monoidal stable ∞-category.

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 an setting. First of all, we use Lemmas 7.17 and 7.18 to identify the 2-Segal object S•AnCoh(Y ) an an with (S•Coh(Y)) . Then we are reduced to check that p is derived lci, where now p is the map appearing in (4.2). This follows 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 Alg Catst in E1 ( ∞) Cohb(Coh(Y)) −→ Cohb(AnCoh(Yan)) .

b an b an Proof. By using Lemmas 7.17 and 7.18, we have Coh (Coh(Y) ) ≃ Coh (AnCoh(Y )) as E1- algebras. The analytification functor (−)an promotes to a symmetric monoidal functor (−)an : Corr×(dSt) −→ Corr×(dAnSt) . Combining Lemma 7.8 and [PY17, Theorem 5.21], we conclude that (−)an preserves lci mor- phisms. Moreover, [PY17, Lemma 3.1(3)] and [PY16, Proposition 6.3], we see that (−)an also preserves proper morphisms. Finally, using the derived GAGA theorems [Por15, Theorems 7.1 & 7.2] we see that (−)an takes morphisms which are representable by proper schemes to mor- phisms which are representable by proper analytic spaces33. Therefore, it restricts to a symmetric monoidal functor an × × (−) : Corr (dSt)rps,lci −→ Corr (dAnSt)rps,lci . The analytification functor for coherent sheaves induces a natural transformation of right-lax symmetric monoidal functors Cohb −→ Cohb ◦ (−)an .

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 (−)an Cohb(X) Cohb(Xan)

an p∗ p∗ (−)an Cohb(Y) Cohb(Yan)

33Using [PY16, Proposition 6.3] it is enough to prove that the analytification takes representable morphisms with geometric target to representable morphisms. This immediately follows from [PY16, Proposition 2.25]. TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 61 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 com- plex scheme. In [Por17, §3] it is constructed a natural transformation an an ηRH : XdR −→ XB , which induces for every derived analytic stack Y ∈ dAnSt a morphism ∗ an an ηRH : AnMap(XdR, Y) −→ AnMap(XB , Y) . It is then shown in [Por17, Theorem 6.11] that this map is an equivalence when Y = AnPerf.34 Taking Y = S•AnPerf, we see that ηRH induces a morphism of 2-Segal objects ∗ an an ηRH : S•AnPerf(XdR) −→ S•AnPerf(XB ) . Seg dAnSt Alg Corr× dAnSt By applying the functor 2- ( ) → E1 ( ( )), we therefore conclude that ∗ an an ηRH : AnPerf(XdR) −→ AnPerf(XB ) acquires a natural structure of morphism between E1-convolution algebras. We have: Proposition 7.21. The morphism ∗ an an ηRH : S•AnPerf(XdR) −→ S•AnPerf(XB ) is an equivalence. Moreover, it restricts to an equivalence ∗ S ηRH : S•AnCohdR(X) −→ AnCohB(X) .

Proof. Fix a derived Stein space S ∈ dStnC. Then [Por17, Theorem 6.11] provides an equivalence of stable ∞-categories an an Perf(XdR × S) ≃ Perf(XB × S) . Therefore, for every n ≥ 0 we obtain an equivalence an an an an SnAnPerf(XdR)(S) ≃ Fun(Tn, Perf(XdR × S)) ≃ Fun(Tn, Perf(XB × S)) ≃ SnAnPerf(XB )(S) .

The first statement follows at once. The second statement follows automatically given the com- mutativity of the natural diagram Xan λX

an ηRH an XdR XB . 

Theorem 7.22 (CoHA version of the derived Riemann-Hilbert correspondence). There is an equiv- alence of stable E1-monoidal ∞-categories b ⋆ an b ⋆ an (Coh (AnCohdR(X)), dR) ≃ (Coh (AnCohB(X)), B ) . b Remark 7.23. In the algebraic setting we considered the finer invariant Cohpro, which is more adapted to the study of non-quasicompact stacks. Among its features, there is the fact that for every derived stack Y there is a canonical equivalence (cf. Proposition A.5) b b cl K(Cohpro(Y)) ≃ K(Cohpro( Y)). In the C-analytic setting, a similar treatment is possible, but it is more technically involved. In b the algebraic setting, the construction of Cohpro relies on the machinery developed in §A, which provides a canonical way of organizing exhaustion by quasi-compact substacks into a canonical

34 See [HP18, Corollary 7.6] for a discussion of which other derived analytic stacks Y see ηRH as an equivalence. 62 M. PORTA AND F. SALA ind-object. In the C-analytic setting, one cannot proceed verbatim, because quasi-compact C- analytic 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 clY. 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 asks for 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 : clX ֒→ X induces a canonical equivalence cl ∼ i∗ : G( X) −→ G(X) . This relies on Quillen’s theorem of the heart and the equivalence Coh♥(clX) ≃ Coh♥(X) induced b by i∗. In particular, one needs quasi-compactness of X to ensure that the t-structure on Coh (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 : dGeomqc ֒→ 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(dGeomqc) . We have: Lemma A.1. Let X ∈ dGeom be a locally geometric derived stack. Then: (1) There exists a (possibly transfinite) sequence of quasi-compact Zariski open substacks of X

···→֒ U0 ֒→ U1 ֒→··· Uα ֒→ Uα+1 = ∅ whose colimit is X. (2) Let Y ∈ dGeomqc be a quasi-compact geometric derived stack. For any exhaustion of X by quasi- compact Zariski open substacks of X as in the previous point, the canonical morphism

colim MapdSt(Y, Uα) −→ MapdSt(Y, X) α is an equivalence. (3) The object Ψ(X) belongs to the full subcategory Ind(dGeomqc) of PSh(dGeomqc).

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 ′ ˇ ′ V• := C(V → X) be the Cechˇ nerve of V′ → X and set ′ ′ U := |V•| . The canonical map U′ → X is representable by open Zariski immersions, and U′ is a quasi- compact 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). TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 63

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

MapdSt(Y, Uα) −→ MapdSt(Y, Uα+1) is (−1)-truncated as well. The same goes for the maps MapdSt(Y, Uα) → MapdSt(Y, X). Asa consequence, we deduce that the map

colim MapdSt(Y, Uα) −→ MapdSt(Y, X) α 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. As for point (3), it is enough to prove that Ψ(X) commutes with finite limits in dGeomqc. This immediately follows from point (2) and the fact that filtered colimits commute with finite limits.  Corollary A.2. The functor Ψ restricts to a limit preserving functor qc (−)ind : dGeom −→ Ind(dGeom ) .

A.2. G-theory of non-quasicompact stacks. As a consequence, when X is a locally geometric derived stack, we can canonically promote Cohb(X) to a pro-category b b b st Coh (X) := Coh (Xind) ≃ “lim” Coh (Uα) ∈ Pro(Cat∞). pro α In particular, we can give the following definition: Definition A.3. Let X ∈ dGeom be a locally geometric derived stack. The pro-spectrum of G- theory of X is b Gpro(X) := K(Cohpro(X)) ∈ Pro(Sp) .

The spectrum of G-theory of X is the realization of Gpro(X):

G(X) := lim Gpro(X) ∈ Sp . ⊘

Remark A.4. If X is quasi-compact, then Xind is equivalent to a constant ind-object. As a con- b sequence, both Cohpro(X) and Gpro(X) are equivalent to constant pro-objects and G(X) simply coincides with the spectrum K(Cohb(X)). △ Proposition A.5. Let X ∈ dGeom be a locally geometric derived stack. The inclusion i : clX ֒→ X induces a canonical equivalence cl ∼ i∗ : Gpro( X) −→ Gpro(X) , and therefore an equivalence cl ∼ i∗ : G( X) −→ G(X) .

Proof. Choose an exhaustion {Uα} of X by quasi-compact open Zariski subsets as in Lemma A.1- cl cl cl (1). Then { U α} is an exhaustion of X, and the map i∗ : Gpro( X) → Gpro(X) can be computed as b cl b “lim” K(Coh ( U α)) −→ “lim” K(Coh (Uα)) . α α

Since each Uα is quasi-compact, this is a level-wise equivalence. Therefore, it is also an equiva- lence at the level of pro-objects. The second statement follows by passing to realizations.  64 M. PORTA AND F. SALA

Definition A.6. Let X ∈ dGeom be a locally geometric derived stack. We define

G0(X) := π0G(X) . ⊘

Remark A.7. In [SS20, KV19], the authors defined G0 of a non quasi-compact geometric classical stack Y as the limit of the G0(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 1 0 −→ lim π1G(Uα) −→ G0(X) −→ lim G0(Uα) −→ 0 α α 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. Let Y be a smooth projective complex variety. First, recall that the classical stack clCoh(Y) decomposes into the disjoint union cl cl P Coh(Y) = G Coh (Y) , P with respect to the Hilbert polynomials of coherent sheaves. Here, the stacks on the right-hand- side are introduced in § 2.3.1. We have a corresponding decomposition at the level of the derived enhancements P Coh(Y) = G Coh (Y) . (A.1) P Now, fix a polynomial P(m) ∈ Q[m]. As shown e.g. in the proof of [LMB00, Th´eor`eme 4.6.2.1], P P there exists an exhaustion {Un }n∈N of Coh (Y) by quasi-compact open substacks, such that cl P the truncation U n is a quotient stack by a certain open subset of a Quot scheme for any n. By [KV19, Proposition 4.1.1], a similar description holds for the moduli stack Cohprop(Y) of coherent sheaves with proper support on a smooth quasi-projective complex variety Y. Note that the ≤0 decomposition (A.1) for the stack Coh0(Y) := Cohprop(Y) reduces to k Coh0(Y) = G Coh0(Y) . k∈Z≥0 k cl k By using the explicit description of the Un’s, one can show that Coh0(Y) is a quasi-compact k quotient stack, hence the stack Coh0(Y) is quasi-compact. Now, let Y be a smooth projective complex curve. The moduli stack CohDol(Y) is not quasi- n n compact. On the other hand, the moduli stacks BunB(Y) and BundR(Y) are quasi-compact quo- tient 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 (2) [GH15, Hin20]. We write Cat∞ 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 embed- ding

1-op (2) y : S −→ 2-Fun(S , Cat∞ ) . TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 65

Then [Hin20, Corollary 6.2.7] guarantees that is 2-fully faithful. We let 2-Ind(S) be the full 2- 1-op subcategory of 2-Fun(S , Cat∞) spanned by those functors that commute with finite Cat∞- limits. The 1-category underlying 2-Ind(S) coincides with Ind(S1-cat).

We now equip C with three markings Choriz, Cvert and Cadm satisfying the conditions of [GaR17a, §7.1.1.1]. We define three markings Ind(C)horiz, Ind(C)vert and Ind(C)adm on Ind(C) by declaring that a morphism f : X → Y in Ind(C) belongs to Ind(C)horiz (resp. Ind(C)vert, Ind(C)adm) if it is representable by morphisms in Choriz (resp. Cvert, Cadm). It is then straightforward to check that the conditions of [GaR17a, §7.1.1.1] are again satisfied. Next, we let op Φ : C −→ Cat∞ op be a functor and let Φhoriz be its restriction to (Choriz) . Passing to ind-objects, we obtain a functor ind op Φ : Ind(C) −→ Pro(Cat∞) . Φind op We let horiz be its restriction to (Ind(C)horiz) . Before stating the next key proposition, we recall the definition of the bivariance property: op Definition A.9. A functor Φ : C Cat∞ is said to be Cvert-right bivariant if for every morphism f : X → Y in Cvert, the functor Φ( f ) : Φ(Y) → Φ(X) admit a right adjoint Φ∗( f ).A Cvert-right bivariant functor is said to have base change with respect to Choriz if for every pullback diagram g′ W X f ′ f g Z Y where f ∈Cvert and g ∈Choriz, the square Φ(g) Φ(Y) Φ(Z)

Φ( f ) Φ( f ′) Φ(g′) Φ(X) Φ(W) is vertically right adjointable. ⊘ Remark A.10. In [GaR17a, Chapter 7], the above property is not directly considered. It rather corresponds to the right Beck-Chevalley property (see Definition 7.3.2.2 in loc. cit.) for functors (2) 2-op with values in (Cat∞ ) . △ Proposition A.11. Keeping the above notation and assumptions, suppose furthermore that:

(1) Φ is Cvert-right bivariant and has base change with respect to Choriz. (2) Every object in Ind(C) can be represented as a filtered colimit whose transition maps belong to Choriz. Φind Then horiz is Ind(C)vert-right bivariant and has base change with respect to Ind(C)horiz.

Proof. Let f : X → Y be a morphism in Ind(C). Choose a representation Y ≃ “colim”α Yα, where the transition maps belong to Choriz. For every index α, we let

Xα := Yα ×Y X 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 Cvert. The morphisms

Φ( fα) : Φ(Yα) −→ Φ(Xα) admit a left adjoint Φ!( fα). Since Φhoriz satisfies the right Beck-Chevalley property with respect to Cvert, the morphisms Φ!( fα) assemble into a morphism

Φ!( f ) : “lim” Φ(Xα) −→ “lim” Φ(Yα) α α 66 M. PORTA AND F. SALA

(2) in 2-Pro(Cat∞ ). The triangular identities for the adjunction Φ!( fα) ⊣ Φ( fα) induce triangular (2) identities exhibiting Φ!( f ) as a left adjoint to Φ( f ) in the (∞,2)-category 2-Pro(Cat∞ ). For every morphism Z → Y in Ind(C)horiz, we let Zα := Yα ×Y Z. The induced morphism Zα → Yα belongs to Choriz by definition. In this way, we can describe the Beck-Chevalley transformation for the diagram Φ(Y) Φ(X)

Φ(Z) Φ(X ×Y Z) in terms of the Beck-Chevalley transformation for the diagram

Φ(Yα) Φ(Xα) , Φ Φ (Zα) (Xα ×Yα Zα) which holds by assumption. 

(2) Seeing Pro(Cat∞) as the underlying 1-category of 2-Pro(Cat∞ ), we obtain:

Corollary A.12. Keeping the above notation, assume Cvert ⊂ Choriz and Cvert = Cadm. Then under the same assumptions of Proposition A.11, the functor ind op Φ : Ind(C) −→ Pro(Cat∞) uniquely extends to a functor Φind vert (2) corr : Corr(Ind(C))vert,horiz −→ 2-Pro(Cat∞ ) , and its restriction to Corr(Ind(C))vert,horiz factors through the maximal (∞,1)-category Pro(Cat∞) of (2) 2-Pro(Cat∞ ).

Proof. It is enough to apply [GaR17a, Theorem 7.3.2.2-(b)] to the (∞,2)-category (2) 2-op S = 2-Pro(Cat∞ ) . See also [Mac20, Theorem 4.2.6].  Corollary A.13. There exists a uniquely defined right lax symmetric monoidal functor × qc QCohpro : Corr (Ind(dGeom ))rps,all −→ Pro(Cat∞) .

Proof. Take C = dSchqc and D = dGeomqc. For C, we take horiz = all and adm = vert = proper. Observe that condition (5) in [GaR17a, §7.1.1.1] is satisfied. Consider the functor qc op QCoh: (dSch ) −→ Cat∞ . Applying Corollary A.12, we obtain a functor QCoh Corr dSchqc proper Pro Cat(2) : ( )proper,all −→ 2- ( ∞ ) , which we restrict to a functor qc (2) QCoh: Corr(dSch )proper,all −→ 2-Pro(Cat∞ ) . For D we now take horiz = all and vert = rps (morphisms that are representable by proper schemes) and adm = isom. Then [GaR17a, Theorem 8.6.1.5] supplies an extension of QCoh as qc (2) QCohpro : Corr(dGeom )rps,all −→ 2-Pro(Cat∞ ) . Combining [Mac20, Theorem 4.4.6] and [GaR17a, Proposition 9.3.2.4] we conclude that we can upgrade these constructions to right lax symmetric monoidal functors.  TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 67

REFERENCES [AG15] D. Arinkin, and D. Gaitsgory, Singular support of coherent sheaves and the geometric Langlands conjecture, Selecta Math. (N.S.) 21 (2015), no. 1, 1–199. 8 [BBHR09] C. Bartocci, U. Bruzzo, and D. Hern´andez Ruip´erez, Fourier-Mukai and Nahm transforms in geometry and mathe- matical physics, Progress in Mathematics, 276, Birkh¨auser, 2009. 22 [Ber83] J. Bernstein, Algebraic theory of D-modules, lecture notes, available as. ps file at this link, 1983. 37 [BSc12] I. Burban and O. Schiffmann, On the Hall algebra of an elliptic curve, I, Duke Math. J. 161 (2012), no. 7, 1171–1231. 7, 49 [Cal14] D. Calaque, Three lectures on derived symplectic geometry and topological field theories, Indag. Math. (N.S.) 25 (2014), no. 5, 926–947. 25 [Con00] B. Conrad, Grothendieck duality and base change, Springer, Lecture Notes in Mathematics, Volume 1750 (2000). 22 [Dav17] B. Davison, The critical CoHA of a quiver with potential, Q. J. Math. 68 (2017), no. 2, 635–703. 7, 49 [DM16] B. Davison and S. Meinhardt, Cohomological Donaldson-Thomas theory of a quiver with potential and quantum enveloping algebras, Invent. Math. 221 (2020), no. 3, 777–871. 9 [DPS20] D.-E. Diaconescu, M. Porta, and F. Sala, McKay correspondence, cohomological Hall algebras and categorification, arXiv:2004.13685, 2020. 5 [Dou66] A. Douady, Le probleme des modules pour les sous-espaces analytiques compacts d’un espace analytique donne., Ph.D. thesis, Paris, 1966. 54 [DK12] T. Dyckerhoff and M. Kapranov, Higher Segal spaces I, Springer, Lecture Notes in Mathematics, Volume 2244 (2019). 4, 38, 39 [GaR17a] D. Gaitsgory and N. Rozenblyum, A study in derived algebraic geometry. Vol. I. Correspondences and duality, Math- ematical Surveys and Monographs, vol. 221, American Mathematical Society, Providence, RI, 2017. 4, 39, 42, 58, 59, 65, 66 [GaR17b] , A study in derived algebraic geometry. Vol. II. Deformations, Lie theory and formal geometry, Mathematical Surveys and Monographs, vol. 221, American Mathematical Society, Providence, RI, 2017. 50 [GH15] D. Gepner and R. Haugseng, Enriched ∞-categories via non-symmetric ∞-operads, Adv. Math. 279 (2015), 575–716. 64 [GiR18] V. Ginzburg and N. Rozenblyum, Gaiotto’s Lagrangian subvarieties via derived symplectic geometry, Algebr. Rep- resent. Theory 21 (2018), no. 5, 1003–1015. 27 [GK05] P. B. Gothen and A. D. King, Homological algebra of twisted quiver bundles, J. London Math. Soc. (2) 71 (2005), no. 1, 85–99. 38 [Groj94] I. Grojnowski, Affinizing quantum algebras: From D-modules to K-theory, unpublished manuscript of November 11, 1994, available at his webpage. 9 [HL2020] D. Halpern-Leistner, Derived Θ-stratifications and the D-equivalence conjecture, arXiv:2010.01127, 2020. 22 [HLP14] D. Halpern-Leistner and A. Preygel, Mapping stacks and categorical notions of properness, arXiv:1402.3204, 2014. 21 [HM98] J. A. Harvey and G. Moore, On the algebras of BPS states, Comm. Math. Phys. 197 (1998), no. 3, 489–519. 10 [Hin20] V. Hinich, Yoneda lemma for enriched ∞-categories, Adv. Math. 367 (2020), 107129, 119 pp. 64, 65 [HP18] J. Holstein and M. Porta, Analytification of mapping stacks, arXiv:1812.09300, 2018. 6, 52, 53, 55, 56, 57, 59, 61, 62 [HTT08] R. Hotta, K. Takeuchi, and T. Tanisaki, D-modules, perverse sheaves, and representation theory, Progress in Math- ematics, vol. 236, Birkh¨auser Boston, Inc., Boston, MA, 2008, Translated from the 1995 Japanese edition by Takeuchi. 26, 37 [HL10] D. Huybrechts and M. Lehn, The geometry of moduli spaces of sheaves, second ed., Cambridge Mathematical Library, Cambridge University Press, Cambridge, 2010. 22 [KV19] M. Kapranov and E. Vasserot, The cohomological Hall algebra of a surface and factorization cohomology, arXiv:1901.07641, 2019. 2, 6, 7, 8, 10, 32, 47, 48, 49, 64 [KL09] M. Khovanov and A. D. Lauda, A diagrammatic approach to categorification of quantum groups. I, Represent. The- ory 13 (2009), 309–347. 7 [KL10a] , A diagrammatic approach to categorification of quantum groups II, Trans. Amer. Math. Soc. 363 (2011), no. 5, 2685–2700. 7 [KL10b] , A categorification of quantum sl(n), Quantum Topol. 1 (2010), no. 1, 1–92. 7 [KS11] M. Kontsevich and Y. Soibelman, Cohomological Hall algebra, exponential Hodge structures and motivic Donaldson- Thomas invariants, Commun. Number Theory Phys. 5 (2011), no. 2, 231–352. 10 [Lau10] A. D. Lauda, A categorification of quantum sl(2), Adv. Math. 225 (2010), no. 6, 3327–3424. 7 [LMB00] G. Laumon and L. Moret-Bailly, Champs alg´ebriques, Ergebnisse der Mathematik und ihrer Grenzgebiete. 3. Folge. A Series of Modern Surveys in Mathematics [Results in Mathematics and Related Areas. 3rd Series. A Series of Modern Surveys in Mathematics], vol. 39, Springer-Verlag, Berlin, 2000. 21, 64 [Lur09] J. Lurie, Higher topos theory, Annals of Mathematics Studies, vol. 170, Princeton University Press, Princeton, NJ, 2009. 11, 14, 32, 40, 42, 46, 63 [Lur11a] , Derived Algebraic Geometry V: Structured Spaces, available at his webpage, 2011. 57 [Lur11b] , Derived Algebraic Geometry IX: Closed Immersions, available at his webpage, 2011. 6, 52, 55, 58 [Lur17] , Higher algebra, available at his webpage, 2017. 11, 12, 14, 33, 41, 45, 53 [Lur18] , Spectral algebraic geometry, available at his webpage, 2018. 11, 15, 16, 18, 19, 20, 21, 23, 24, 62 68 M. PORTA AND F. SALA

[Lus90] G. Lusztig, Canonical bases arising from quantized enveloping algebras, J. Amer. Math. Soc. 3 (1990), no. 2, 447–498. 7 [Lus91] , Quivers, perverse sheaves, and quantized enveloping algebras, J. Amer. Math. Soc. 4 (1991), no. 2, 365–421. 7 [Mac20] A. W. Macpherson, A bivariant Yoneda lemma and (∞, 2)-categories of correspondences, arXiv:2005.10496, 2020. 42, 66 [Min18] A. Minets, Cohomological Hall algebras for Higgs torsion sheaves, moduli of triples and Hilbert schemes on surfaces, Selecta Math. (N.S.) 26 (2020), no. 2, Paper No. 30, 67 pp. 2, 6, 7, 8, 10, 49 [Neg16] A. Negut¸, Exts and the AGT relations, Lett. Math. Phys. 106 (2016), no. 9, 1265–1316. 9 [Neg17] , Shuffle algebras associated to surfaces, Selecta Math. (N.S.) 25 (2019), no. 3, Art. 36, 57 pp. 2, 10 [Neg18a] , The q-AGT-W relations via shuffle algebras, Comm. Math. Phys. 358 (2018), no. 1, 101–170. 9 [Neg18b] , Hecke correspondences for smooth moduli spaces of sheaves, arXiv:1804.03645, 2018. 7 [Nit91] N. Nitsure, Moduli space of semistable pairs on a curve, Proc. London Math. Soc. (3) 62 (1991), no. 2, 275–300. 27 [Pad19] T. P˘adurariu, K-theoretic Hall algebras for quivers with potential, arXiv:1911.05526, 2019. 7, 49 [PT19] T. Pantev and B. To¨en, Poisson geometry of the moduli of local systems on smooth varieties, arXiv:1809.03536, 2018. 45, 64 [Por15] M. Porta, GAGA theorems in derived complex geometry, J. Algebraic Geom. 28 (2019), no. 3, 519–565. 6, 52, 55, 58, 60, 61 [Por17] , The derived Riemann-Hilbert correspondence, arXiv:1703.03907, 2017. 6, 45, 52, 61 [PS20] M. Porta and F. Sala, Simpson’s shapes of schemes and stacks, draft available at this link. 5, 13, 14, 15, 16, 20, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 50, 51, 54 [PY16] M. Porta and T. Y. Yu, Higher analytic stacks and GAGA theorems, Adv. Math. 302 (2016), 351–409. 11, 52, 60 [PY17] , Representability theorem in derived analytic geometry, arXiv:1704.01683, 2017. 6, 56, 59, 60 [PY18] , Derived Hom spaces in rigid analytic geometry, arXiv:1801.07730, 2018. 53, 54, 58 [PY20] , Non-archimedean quantum K-invariants, arXiv:2001.05515, 2020. 59 [SVV19] P. Shan, M. Varagnolo, and E. Vasserot, Coherent categorification of quantum loop algebras: the SL(2) case, arXiv:1912.03325, 2019. 7, 8 [RSYZ18] M. Rapˇc´ak, Y. Soibelman, Y. Yang, and G. Zhao, Cohomological Hall algebras, vertex algebras and instantons, Comm. Math. Phys. 376 (2020), no. 3, 1803–1873. 9 [RS17] J. Ren and Y. Soibelman, Cohomological Hall algebras, semicanonical bases and Donaldson-Thomas invariants for 2- dimensional Calabi-Yau categories (with an appendix by B. Davison), Algebra, geometry, and physics in the 21st century, Progr. Math., vol. 324, Birkh¨auser/Springer, Cham, 2017, pp. 261–293. 10 [Rou08] R. Rouquier, 2-Kac-Moody algebras, arXiv:0812.5023, 2008. 7 [Rou12] , Quiver Hecke algebras and 2-Lie algebras, Algebra Colloq. 19 (2012), no. 2, 359–410. 7 [Saf16] P. Safronov, Quasi-Hamiltonian reduction via classical Chern-Simons theory, Adv. Math. 287 (2016), 733–773. 25 [SS20] F. Sala and O. Schiffmann, Cohomological Hall algebra of Higgs sheaves on a curve, Algebr. Geom. 7 (2020), no. 3, 346–376. 2, 6, 7, 8, 10, 38, 47, 49, 64 [Sch06] O. Schiffmann, Canonical bases and moduli spaces of sheaves on curves, Invent. Math. 165 (2006), no. 3, 453–524. 8 [Sch12] , Lectures on canonical and crystal bases of Hall algebras, Geometric methods in representation theory. II, S´emin. Congr., vol. 24, Soc. Math. France, Paris, 2012, pp. 143–259. 9 [SV12] O. Schiffmann and E. Vasserot, Hall algebras of curves, commuting varieties and Langlands duality, Math. Ann. 353 (2012), no. 4, 1399–1451. 8, 9, 49 [SV13a] , The elliptic Hall algebra and the K-theory of the Hilbert scheme of A2, Duke Math. J. 162 (2013), no. 2, 279–366. 2, 9, 10, 49 [SV13b] , Cherednik algebras, W-algebras and the equivariant cohomology of the moduli space of instantons on A2, Publ. Math. Inst. Hautes Etudes´ Sci. 118 (2013), 213–342. 2, 9 [SV17] , On cohomological Hall algebras of quivers: Yangians, arXiv:1705.07491, 2017. 2, 9 [SV20] , On cohomological Hall algebras of quivers: generators, J. Reine Angew. Math. 760 (2020), 59–132. 2, 9 [Schl02] M. Schlichting, A note on K-theory and triangulated categories, Invent. Math. 150 (2002), no. 1, 111–116. 3 [STV15] T. Sch ¨urg, B. To¨en, and G. Vezzosi, Derived algebraic geometry, determinants of perfect complexes, and applications to obstruction theories for maps and complexes, J. Reine Angew. Math. 702 (2015), 1–40. 22 [Sim94a] C. T. Simpson, Moduli of representations of the fundamental group of a smooth projective variety. I, Inst. Hautes Etudes´ Sci. Publ. Math. (1994), no. 79, 47–129. 27, 45 [Sim94b] , Moduli of representations of the fundamental group of a smooth projective variety. II, Inst. Hautes Etudes´ Sci. Publ. Math. (1994), no. 80, 5–79 (1995). 24, 27, 38, 64 [Sim97] , The Hodge filtration on nonabelian cohomology, Algebraic geometry—Santa Cruz 1995, Proc. Sympos. Pure Math., vol. 62, Amer. Math. Soc., Providence, RI, 1997, pp. 217–281. 50 [Sim09] , Geometricity of the Hodge filtration on the ∞-stack of perfect complexes over XDR, Mosc. Math. J. 9 (2009), no. 3, 665–721, back matter. 51, 52 [Stacks] The Stacks Project Authors, Stacks Project, http://stacks.math.columbia.edu. 21, 23 [To¨e12] B. To¨en, Proper local complete intersection morphisms preserve perfect complexes, arXiv:1210.2827, 2012. 42, 44 [TVa07] B. To¨en and M. Vaqui´e, Moduli of objects in dg-categories, Ann. Sci. Ecole´ Norm. Sup. (4) 40 (2007), no. 3, 387–444. 21, 26, 41, 51 [TV04] B. To¨en and G. Vezzosi, A remark on K-theory and S-categories, Topology 43 (2004), no. 4, 765–791. TWO-DIMENSIONAL CATEGORIFIED HALL ALGEBRAS 69

[VV11] M. Varagnolo and E. Vasserot, Canonical bases and KLR-algebras, J. Reine Angew. Math. 659 (2011), 67–100. 3 [YZ16] Y. Yang and G. Zhao, On two cohomological Hall algebras, Proc. Roy. Soc. Edinburgh Sect. A 150 (2020), no. 3, 1581–1607. 7 10 [YZ18a] , The cohomological Hall algebra of a preprojective algebra, Proc. Lond. Math. Soc. (3) 116 (2018), no. 5, 1029–1074. 2, 9 [YZ18b] , Cohomological Hall algebras and affine quantum groups, Selecta Math. (N.S.) 24 (2018), no. 2, 1093–1119. 2, 9 [Zha19] Y. Zhao, On the K-theoretic Hall algebra of a surface, arXiv:1901.00831, 2019. 2, 6, 8, 10, 47, 48

(Mauro Porta) INSTITUT DE RECHERCHE MATHEMATIQUE´ AVANCEE´ (IRMA), UMR 7501, UNIVERSITE´ DE STRAS- BOURG, 7 RUE RENE´ -DESCARTES,67084 STRASBOURG CEDEX,FRANCE Email address: [email protected]

(Francesco Sala) UNIVERSITADI` PISA, DIPARTIMENTO DI MATEMATICA,LARGO BRUNO PONTECORVO 5, 56127PISA (PI), ITALY

KAVLI IPMU (WPI), UTIAS, THE UNIVERSITYOF TOKYO, KASHIWA, CHIBA 277-8583, JAPAN Email address: [email protected]