Cohomological Donaldson–Thomas theory of a quiver with potential and quantum enveloping algebras

This paper concerns the cohomological aspects of Donaldson–Thomas theory for Jacobi algebras and the associated cohomological Hall algebra, introduced by Kontsevich and Soibelman. We prove the Hodge-theoretic categorification of the integrality conjecture and the wall crossing formula, and furthermore realise the isomorphism in both of these theorems as Poincaré–Birkhoff–Witt isomorphisms for the associated cohomological Hall algebra. We do this by defining a perverse filtration on the cohomological Hall algebra, a result of the “hidden properness” of the semisimplification map from the moduli stack of semistable representations of the Jacobi algebra to the coarse moduli space of polystable representations. This enables us to construct a degeneration of the cohomological Hall algebra, for generic stability condition and fixed slope, to a free supercommutative algebra generated by a mixed Hodge structure categorifying the BPS invariants. As a corollary of this construction we furthermore obtain a Lie algebra structure on this mixed Hodge structure—the Lie algebra of BPS invariants—for which the entire cohomological Hall algebra can be seen as the positive part of a Yangian-type quantum group.


Background
The critical cohomological Hall algebra H(A B,W ) associated to a noncommutative smooth algebra B and potential W ∈ B/ [B, B] vect was introduced by Kontsevich and Soibelman in [29] as a way of categorifying the theory of Donaldson-Thomas invariants. The meaning of "critical" here is that the Hall algebra is built out of the hypercohomology of the sheaf of vanishing cycles of the superpotential Tr(W ) on the stack of finite-dimensional B-modules. This sheaf is supported on the critical locus of Tr(W ), which is identified with the stack of representations of the Jacobi algebra associated to B and W . The critical cohomological Hall algebra can thus be thought of as the Hall algebra categorifying the Donaldson-Thomas theory of representations of this Jacobi algebra.
Donaldson-Thomas invariants, first introduced in [46], already have an extensive literature. We refer to the sequence of papers by Dominic Joyce [19][20][21][22][23] for a comprehensive account, or the book [24] by Joyce and Song, and also [27,28] for the more general and abstract account by Kontsevich and Soibelman using motivic vanishing cycles. In all of these treatments of Donaldson-Thomas theory, a key role is played by the integrality conjecture, as proven in [29] in the case of quivers with potential. In this paper we describe and prove the natural categorification of the integrality conjecture in the context of the cohomological Hall algebra for a quiver with potential, and explain how this gives rise to a mathematical definition of the Lie algebra of BPS states, for which the cohomological Hall algebra can be thought of as the positive half of an associated quantum group. See [17] for a Physics-oriented construction of Hall algebras of BPS states.
From now on we assume that B = CQ is the free path algebra of a quiver, that we are given a Bridgeland stability condition ζ on the category of CQmodules, and that μ ∈ (−∞, ∞] is a slope. We denote by Λ ζ μ ⊂ N Q 0 the union of the zero vector with the subset of dimension vectors of slope μ with respect to the stability condition ζ. Let M ζ -ss μ denote the stack of ζsemistable CQ-modules with dimension vector in Λ ζ μ . For full generality, we consider a locally closed substack M ζ -ss,S μ ⊂ M ζ -ss μ , the closed points of which correspond to ζ-semistable CQ-modules in a Serre subcategory S of the category of CQ-modules. When S is the entire full subcategory of finite dimensional CQ-modules, we will omit all superscripts S.
Via natural correspondences there is an algebra structure on the Λ ζ μ -graded Borel-Moore homology of the normalised vanishing cycle complex on M ζ -ss μ , restricted to M ζ -ss,S μ , that we denote as in [29]. These notions are properly defined and explained in Sect. 3. This algebra categorifies Donaldson-Thomas theory in the sense that Donaldson-Thomas invariants for the category of ζ-semistable modules in S are obtained by considering the class in the Grothendieck group of the Λ ζ μ -graded mixed Hodge structures (equipped with a monodromy action) of the underlying mixed Hodge structure of (1).
The main conclusion of this paper is that the introduction of the cohomological Hall algebra structure associated to a quiver, a potential and a Serre subcategory S should be seen as a first step towards forging a con-nection between the theory of refined Donaldson-Thomas invariants and the theory of quantum enveloping algebras, and that the proof of the integrality conjecture is the motivic shadow of a Poincaré-Birkhoff-Witt theorem for the associated quantum enveloping algebra. In fact we reach this conclusion by providing all of the remaining steps, proving this PBW type theorem, and defining the associated Lie algebra of BPS cohomology. This programme was already articulated in [29] but several components had yet to be found.
Firstly, a coproduct turning the algebra H(A ζ,S W,μ ) into a Hopf algebra had to be defined. A localised coproduct was found in the first author's paper [9], reinforcing the hope that H(A ζ,S W,μ ) could be turned into a quantum enveloping algebra. Meanwhile the integrality conjecture in the case of free path algebras of quivers with zero potential was reproven by the second author and Markus Reineke in [34]. We recall that, loosely speaking, the integrality theorem states that the class of H(A ζ,S 0,μ ) in the Grothendieck group of graded monodromic mixed Hodge structures is equal to that of the free supercommutative algebra generated by Sym H(BC * ) vir ⊗ for some element for which the graded pieces are finite-dimensional. This is of course much weaker than the claim that we have an isomorphism between these two objects, which in turn is weaker than the existence of a PBW isomorphism.
Nevertheless, the proof of [34] has the attractive feature of explicitly constructing , in terms of intersection complexes. This at least gives us a natural candidate for a choice of with which to try to upgrade equality in the Grothendieck group to a bona fide isomorphism. In addition, it is proven in [12] that due to formal properties of the vanishing cycle functor, the methods of [34] are enough to prove a very general version of the integrality conjecture, even in the presence of a nonzero potential. Similarly, the proof in [12] gives explicit formulae for the class of , and the construction lifts to cohomology, or mixed Hodge modules, which is the lift that we develop in this paper. The claim that there is an isomorphism in the category of Λ ζ μ -graded monodromic mixed Hodge structures between H(A ζ,S W,μ ) and Sym H(BC * ) vir ⊗ for some depending on W, μ, ζ, S is what we call the "cohomological integrality conjecture". The proof of the cohomological integrality conjecture, and the existence of a coproduct, are the main ingredients of our proof of the PBW theorem.

Absolute versus relative Donaldson-Thomas theory
For the Donaldson-Thomas theory and cohomological Hall algebras associated to quivers, a vital role is always played by the grading by N Q 0 , the semigroup of dimension vectors, which should be seen as a weight space decomposition in the language of Lie algebras and quantum groups. As an illustration, consider the case in which we forget about potentials and stability conditions, set S to be the category of all finite-dimensional CQ-modules, and consider the N Q 0 -graded vector space Considering the resulting cohomology as a N Q 0 × Z-graded vector space, where the extra Z factor keeps track of cohomological degree, each graded piece is finite-dimensional. The initial role of the N Q 0 grading is to break the above infinite-dimensional vector space into infinitely many manageable, finite-dimensional pieces. Moreover, the cohomological Hall algebra structure respects the N Q 0 × Z-grading, so that this grading provides a route to understanding this algebra. Choosing a bijection between the vertices Q 0 and the numbers {1, . . . , n}, motivic DT partition functions are expressed as formal power series in variables q 1/2 , x 1 , . . . , x n . For d = (d 1 , . . . , d n ) the coefficient of is a formal Laurent power series in q 1/2 , given by the characteristic function of the dth graded piece of the right hand side of (2)-for now q 1/2 records the cohomological degree. These power series may have finite order poles at q 1/2 = 0, due to the shifts appearing in (2). In the general case this formal Laurent power series is replaced by a formal Laurent power series recording the finite dimensions of the weight filtration of an infinite-dimensional N Q 0graded (monodromic) mixed Hodge structure associated to the quiver Q, a potential W and a stability condition ζ-in the final version of the theory, q 1/2 records weights.
In order to make the presentation in this paper conceptually uniform, we slightly change the perspective on the N Q 0 -grading. We consider N Q 0 -graded vector spaces (respectively, mixed Hodge structures) as sheaves of vector spaces (respectively, mixed Hodge modules) on the monoid N Q 0 , considered as a scheme with infinitely many components, each isomorphic to Spec(C). Then our main object of study (1) can be thought of as the direct image of the restriction to the stack of modules in S of where the map p ζ μ takes a CQ-module to its semisimplification in the category of ζ-semistable CQ-modules, i.e. the associated polystable object. Since Dim factors through p ζ μ , understanding the direct image along p ζ μ turns out to be the key to understanding the direct image along Dim.
We flag at the outset the curious role of the symbol H on the right hand side of (4). Firstly, its purpose is to make our lives simpler: we will not actually give a definition of the pushforward of IC ζ W,μ , nor indeed of IC ζ W,μ itself, and we only define the result of applying the total cohomology functor to this pushforward, i.e. we define the right hand side of (4) without defining its constituent pieces. This apparent bug turns out to be a feature; because of this extra H, taking the dual compactly supported hypercohomology of the right hand side of (4) does not produce something that is a priori isomorphic to the right hand side of (1), and the comparison between them turns out to be a central aspect of the paper. In brief: the compactly supported hypercohomology of the right hand side of (4) is the associated graded of the perverse filtration of H A ζ,S W,μ . This perverse filtration is one of the central structures that we introduce in order to understand the cohomological Hall algebra.
Here and elsewhere, if L ∈ D is an element of a triangulated category with a t-structure (for example the bounded derived category of an Abelian category A, such as the category of monodromic mixed Hodge modules on M ζ -ss μ ) then considered as an element in D with zero differential. If moreover D has infinite coproducts (for example, the unbounded derived category of A as above) then the natural functor from Z-graded objects in A to the essential image of the functor H is an embedding of categories; it is bijective on isomorphism classes of objects and faithful, but not full in general. Note that Dim ζ μ = dim ζ μ p ζ μ , where dim ζ μ : M ζ μ → Λ ζ μ is the natural map. We furthermore prove that there is an isomorphism of cohomologically graded monodromic mixed Hodge modules in Sect. 4, so that an understanding of (4) can indeed be used to gain an understanding of the left hand side of (5). As noted above, because of the second H on the right hand side of (5), this isomorphism would not follow directly from the usual six functor formalism for monodromic mixed Hodge modules on stacks, but instead relies essentially on the "hidden properness" of the morphism p ζ μ . The key observation is that p ζ μ , while not proper or representable, is in some sense approximated by proper maps of schemes (see Sect. 4.1).
Working over the base M ζ -ss μ instead of Λ ζ μ is what we mean by the relative theory. The payoff for working in the relative setting is that we obtain more refined results, which are nevertheless easier to prove, since in this relative setting, because of hidden properness, we are able to make extensive use of Morihiko Saito's version [39,41,42] of the famous decomposition theorem of Beilinson, Bernstein, Deligne and Gabber [3], as well as the rest of Saito's theory of mixed Hodge modules.
The idea of proving local results on M ζ -ss μ to deduce global results about Donaldson-Thomas invariants was already present in the work of Joyce and Song [24], and later the proof of the integrality conjecture for path algebras in the absence of a potential by the second author and Markus Reineke [34], which utilised Efimov's theorem [15] on free supercommutativity for cohomological Hall algebras without potentials to understand the local behaviour of the morphism p ζ μ .

Cohomological integrality
Now that we have introduced the relative version of Donaldson-Thomas theory, we can state the first main result of this paper, a cohomological refinement of the integrality conjecture.
Theorem A (Cohomological integrality theorem) Let Q, W be a quiver with potential, let μ ∈ (−∞, ∞] be a slope, and let ζ be a μ-generic stability condition. Let M ζ -ss,S μ be a locally closed substack of the stack of ζ-semistable CQ-representations, the closed points of which correspond to the representations in a Serre subcategory S of the category of CQ-representations. For d ∈ N Q 0 \{0} a nonzero dimension vector of slope μ, define the following ele-ment of MMHM(M ζ -ss d ), the category of monodromic 1 mixed Hodge modules on the coarse moduli space of ζ-semistable CQ-representations: and let BPS ζ W,μ be the direct sum of all the BPS ζ W,d for d of slope μ with respect to the stability condition ζ. Define where the superscript denotes the dual in the category of monodromic mixed Hodge modules, so in particular, in D(MMHM(Λ ζ μ )). Furthermore, working over the coarse moduli space of ζ-semistable representations M ζ -ss μ , there is an isomorphism The definition of H(BC * ) vir is given in Sect. 2.1. Requisite notions from the theory of representations of quivers, including the functors Sym ⊕ and Sym + , and the definition of M ζ -ss μ , are recalled in Sect. 3. The functor Sym + , via the correspondence between monodromic mixed Hodge modules on N Q 0 and N Q 0 -graded monodromic mixed Hodge structures, is the functor that sends an N Q 0 -graded monodromic mixed Hodge structure F satisfying F 0 = 0 to the N Q 0 -graded monodromic mixed Hodge structure given by taking the free N Q 0 -graded supercommutative algebra generated by F and then forgetting the algebra structure.
We briefly explain the relation to earlier, less "categorical", incarnations of the integrality conjecture in terms of generating functions of weight polynomials, as that is the language in which the integrality conjecture is perhaps most familiar. In the literature, this is most commonly referred to as "refined Donaldson-Thomas theory". Given an element L ∈ D b (MMHM(N Q 0 )), we define the formal power series where we have used the weight polynomial As in Theorem A we fix a quiver Q, potential W , stability condition ζ, and slope μ. Although the total cohomology H(A ζ,S W,μ ) (defined as in (1)) is not in the bounded derived category W,d ) will typically be nonzero in arbitrarily high cohomological degree, the partition function still makes sense as a formal power series in x 1 , . . . , x n , with coefficients given by Laurent series in q 1/2 . This is because for each d ∈ Λ ζ μ , and for each j ∈ Z, the element Gr W j (H i (A ζ,S W,d )) is nonzero for only finitely many values of i; we denote by D ≥,lf (MMHM(N Q 0 )) ⊂ D(MMHM(N Q 0 )) the full subcategory of monodromic mixed Hodge modules satisfying this condition and also the condition that for fixed d the element Gr W j (H(L d )) vanishes for j 0. Then one way to define the plethystic exponential EXP : where the subscript "+" on the left hand side signifies that we take the subgroup of elements d∈N Q 0 a d (q 1/2 )x d such that a 0 (q 1/2 ) = 0, is via the formula for L ∈ D ≥,lf (MMHM(N Q 0 \{0})): With the above conventions in place, we may finally state the integrality conjecture in refined DT theory. It is the statement that there exist Laurent The formal power series ζ,S W,d (q 1/2 ) are, by definition 2 , the refined Donaldson-Thomas/Bogomol'nyi-Prasad-Sommerfield 3 invariants for the slope μ, stability condition ζ, and Serre subcategory S. Note that and so we deduce from (6), (7) and Theorem A the equality where BPS ζ,S W,d are the cohomological invariants defined in Theorem A. Note also that since EXP is injective, one can always find formal Laurent power series ζ,S W,d (q 1/2 ) satisfying (7). The content of the integrality conjecture, as proved in [29], is that these formal power series are in fact polynomials.
We can deduce the refined integrality conjecture from Theorem A; since BPS ζ,S W,d is the hypercohomology of a bounded complex of monodromic mixed Hodge modules, its weight polynomial is a genuine Laurent polynomial instead 2 The substitution q 1/2 → q −1/2 arises from the fact that DT invariants are typically defined in terms of compactly supported cohomology, which is the dual to the cohomology theory we consider. 3 Some authors refer to the coefficients in the partition function on the left hand side of (7) as (refined) DT invariants, while some have reserved this term to refer to the ζ W,d (q 1/2 ) appearing on the right hand side. In order to establish some distinction between the two types of invariants, we will refer to the ζ W,d (q 1/2 ) exclusively as BPS invariants, and to the left hand side of (7) as the DT partition function. of a formal power series. However, the cohomological lift provided by Theorem A is much stronger than the integrality conjecture. It upgrades an equality in the Grothendieck (lambda-)ring of D ≥,lf (MMHM(N Q 0 )) to an isomorphism in that category. This is a surprising result even before introducing the extra structure of the cohomological Hall algebra, since it shows that there is an entire theory of "cohomologically refined" BPS invariants waiting to be explored. For early applications of this theory, we refer the reader to the first author's reproof of the Kac positivity conjecture [8] (originally proved by Hausel, Letellier and Villegas [18]) and proof of the quantum cluster positivity conjecture [10].

Cohomological wall-crossing
Our second main result is a (relative) cohomological lift of the following incarnation of the wall crossing formula, with denoting the Kontsevich-Soibelman integration map: This is an identity in the completed motivic quantum torus of finitedimensional modules of the Jacobi algebra for the pair (Q, W ). Instead of defining any of the terms in (8) we refer the reader to [22] and [27] for more details on motivic Hall algebras and integration maps in the general theory of motivic Donaldson-Thomas invariants, or [12] for the specific case of the motivic Hall algebra of representations of a Jacobi algebra. We define where M d is the stack of d-dimensional CQ-representations, and M d is the coarse moduli space of d-dimensional CQ-representations, the closed points of which are in bijection with d-dimensional semisimple CQ-representations.

Theorem B (Cohomological wall crossing theorem) There is an isomorphism
Note that in general, the individual terms in the tensor products on the right hand sides of (10) and (11) will depend on the stability condition, while the terms on the left hand side do not. The fact that very different sheaves can give rise to the same tensor product is explained by the fact that in contrast with the product ⊕ , the product tw ⊕ is not symmetric; this is the categorification of the fact that the quantum torus utilized in [27] as the target of the integration map from the motivic Hall algebra is generally not commutative.

The perverse filtration
An advantage of considering constructions relative to the base M ζ -ss μ instead of Λ ζ μ is that it leads naturally to the introduction of the perverse filtration on H(A ζ,S W,μ ). Let f ∈ N Q 0 be a framing vector, and let π ζ f,d : M ζ f,d → M ζ -ss d , be the forgetful map to the coarse moduli space of ζ-semistable Q-representations from the fine moduli space of f-framed ζ-semistable representations, and let T r (W ) ζ f,d : M ζ f,d → C be the induced function. We show that for fixed n, and sufficiently large framing vector f, there is a natural isomorphism in words, we can approximate the restricted vanishing cycle cohomology on the stack M(Q) ζ -ss d by considering restricted vanishing cycle compactly supported cohomology on the moduli scheme M ζ f,d . This may remind the reader of Totaro's construction [48] for calculating equivariant intersection theory, and indeed, in a sense that will become precise in Sect. 4.1, our setup is a relative compactification of Totaro's construction, over the base M ζ -ss d . In particular, since the maps π ζ f,d are proper, we can use the decomposition theorem along with fundamental properties of the vanishing cycles functor to deduce that which in turn implies that the hypercohomology of the right hand side (and hence the left hand side) of (12) carries a well-behaved perverse filtration.

Main results for cohomological Hall algebras
Assume that the stability condition ζ is generic. The object H(A ζ,S W,μ ) is a unital algebra in the category of Λ ζ μ -graded monodromic mixed Hodge structures, which corresponds to a monoid in the category D(MMHM(Λ ζ μ )). The monoidal product in this category is defined by where F G is the usual external tensor product, and + : N Q 0 × N Q 0 → N Q 0 is the addition map. A unital graded algebra structure is determined by a map satisfying the obvious associativity condition, along with a unit map Q {0} → F from the constant sheaf supported at the monoidal unit 0 ∈ N Q 0 . Although we prove theorems regarding this monoid, we do so via theorems regarding the monoid in the category of monodromic mixed Hodge modules on the coarse moduli space of ζ-semistable CQ-modules of slope μ. After restricting to M ζ -ss,S W and applying the monoidal functor obtained by taking the direct image along the map the monodromic mixed Hodge module (13) becomes isomorphic to the perverse associated graded version of the monoid (1). In symbols, there is an isomorphism of algebras All of our main results regarding H(A ζ,S W,μ ) and H(A ζ W,μ ) stem from the observation that all product and coproduct structures that we consider on H(A ζ,S W,μ ) and H(A ζ,S W,μ ) respect the perverse filtration, giving rise to the algebra structures on the right hand side of (14) that are much easier to describe-precisely, we prove that (in an appropriate sense) the algebras appearing in (14) are supercommutative degenerations of the CoHA H(A ζ,S W,μ ). To define this "appropriate sense", we must take some care over the signs in the symmetrizing morphism It was noted already in [29] that the cohomological Hall algebra on the graded vector space (2), while not commutative, becomes commutative after twisting by a simple system of signs. There are two related ways of expressing this idea, which we develop in tandem in this paper.
Firstly, the algebra is commutative, after replacing the usual symmetrizing morphism for the category in which we consider it (involving the Koszul sign rule) by a new one, which depends on N Q 0 -degree. We consider an adapted symmetrizing morphism τ sw for the categories of monodromic mixed Hodge modules on Λ ζ μ and M ζ -ss μ , with respect to which Theorems C and D are stated-see Sect. 6.1 for the provenance of these signs. At the level of elements, the rule is easy to state. Consider the form τ induced by where d and d are the N Q 0 -degrees of a and b respectively, and |a| and |b| are their cohomological degrees. In other words, we modify the usual Koszul sign rule by (−1) τ(d ,d ) . Now we describe the second approach to signs. As in [29, Sec.2.6] and [15] it is sometimes more convenient to modify the definition of the product in the CoHA H(A ζ,S W,μ ), so that the algebra (or in the context of this paper, its perverse associated graded algebra) becomes supercommutative with respect to the usual Koszul sign rule. The form τ vanishes on pairs d ⊗ d, and so there exists a bilinear form ψ on V such that We define the underlying graded monodromic mixed Hodge structure of H( ψ A ζ,S W,μ ) to be the same as that of H(A ζ,S W,μ ). We define the multiplication on H( ψ A ζ,S W,μ ) via where a ∈ H( ψ A ζ,S W,d ) and b ∈ H( ψ A ζ,S W,d ). Associativity of the twisted CoHA follows from associativity for the untwisted CoHA and bilinearity of ψ.
Our first main result concerning CoHAs is an upgrade of Theorem A. It states that the isomorphisms of Theorem A can be realised explicitly as PBW-type isomorphisms defined using the structure of the relative, or absolute CoHA, respectively.
Theorem C Let ζ be a μ-generic Bridgeland stability condition. The localised bialgebra structure on H(A ζ,S W,μ ) induces a (non-localised) Hopf algebra structure on Gr P (H(A ζ,S W,μ )), which is a free commutative algebra with respect to the symmetrizing morphism τ sw. There is a canonical PBW isomorphism in D ≥,lf (MMHM(M ζ -ss μ )): that is realized via a canonical embedding 4 H(BC * ) vir ⊗BPS ζ W,μ ⊂ H(A ζ W,μ ) and the relative cohomological Hall algebra multiplication. There is a similar canonical PBW isomorphism over the base Λ ζ μ : and the map is defined via the cohomological Hall algebra product on H(A ζ,S W,μ ). If ψ is a bilinear form as in (16), then Gr P (H( ψ A ζ,S W,μ )) is a free supercommutative algebra, and there are canonically defined PBW isomorphisms to the relative and absolute CoHAs with the ψ-twisted multiplication.
Note that we do not claim that in the "absolute" cases (18) and (20) the canonical isomorphisms of Theorem C are isomorphisms of algebras-in many interesting cases they will not be, hence the moniker "PBW theorem". We expect that the case of symmetric quivers with zero potential, for which it is proved by Efimov in [15] that the ψ-twisted cohomological Hall algebra is free supercommutative, is atypical.
Our final theorem is a more general PBW type statement for the whole CoHA. Just as Theorem C states that the integrality isomorphisms of Theorem A can be realised in terms of PBW-type isomorphisms in the relative CoHA, Theorem D states that the same is true of the combination of the integrality isomorphisms (for every slope) and the wall crossing isomorphism, for a generic stability condition.
Theorem D Let ζ be a generic stability condition for Q. Then there are embeddings 5 induced by the relative and absolute cohomological Hall algebra multiplications, respectively, are isomorphisms. Similarly, if ψ is a twist defined as in (16), then the morphisms induced by the same embeddings as above and the ψ-twisted relative and absolute cohomological Hall algebra multiplications are isomorphisms.
Theorems C and D together give a very general structural result on the relative and absolute CoHAs, namely that they are obtained by infinite extensions of algebras (indexed by descending slope) that are themselves noncommutative deformations of free supercommutative algebras, with characteristic functions determined by the cohomological BPS invariants.

The BPS Lie algebra
One of the main contributions of the current paper, and a direct corollary of the above structural theorems, is the definition of the BPS Lie algebra. This is a natural Lie algebra, for any choice of Q, W, μ, S, ψ and μ-generic stability condition ζ, the characteristic function of which recovers the (refined) BPS invariants for this data. Part of Theorem C states that Gr P (H( ψ A ζ,S W,μ )) is supercommutative. On the other hand, the perverse filtration on H( ψ A ζ,S W,μ ) begins in degree one, and in degree one is given precisely by a half Tate-twist of the cohomological BPS invariants. It follows that there is an inclusion of Lie algebras i.e. that the first perverse piece of the target is closed under the commutator Lie bracket (since this bracket becomes zero in the perverse associated graded algebra). We call the domain of (22) the BPS Lie algebra associated to the data (Q, W, ζ, μ, S, ψ). In a forthcoming paper the first author shows that for a specific choiceQ,W of quiver with potential depending on a given quiver Q, where g + Q re is the positive half of the Kac-Moody Lie algebra for Q re , the quiver obtained from Q by deleting all vertices for which there are loops, along with all arrows to or from these vertices. In particular, the BPS Lie bracket can be highly nontrivial.

Structure of the paper
The paper is broken roughly into three parts: there is the introduction above, a second part which goes up to Sect. 4.3, and then a third part. The purpose of the second part is to prove the cohomological integrality theorem (Theorem A) and the cohomological wall crossing theorem (Theorem B). For many applications of cohomological Donaldson-Thomas theory (especially positivity results) these two theorems are all one needs. In addition, there are a lot of added technicalities (coproducts, perverse associated graded algebras, modified symmetrizer isomorphisms etc.) that go into the proofs, and indeed the statements of Theorems C and D. Therefore the reader who is less interested in the algebraic structure underlying the integrality isomorphism, or the task of making the integrality isomorphism canonical, can safely treat this paper as ending with Sect. 4.3. We hope that this reduces the technical burden of the current paper for the "working mathematician".
The third part of the paper is dedicated to proving that these isomorphisms can be realised as PBW isomorphisms in the cohomological Hall algebra. Theorem C can be construed as a second proof of the integrality theorem (Theorem A) which is dependent on the first one. The conceptual payoff for reproving the theorem is that the second time we prove the theorem, we are able to make the isomorphism underlying the integrality theorem canonicalthis is a key step towards proving the integrality theorem for the category of coherent sheaves on a 3-Calabi-Yau variety, for example. That this category locally looks like the category of representations for a quiver with potential is an exercise in deformation theory if one works formally locally, and is proved rigorously by Toda in the analytic topology [47]. The key step in proving the integrality conjecture for coherent sheaves on a 3-Calabi-Yau variety, then, is to prove it locally in a sufficiently canonical manner that the proof glues naturally. This application will be the subject of a follow-up paper by the authors.

Monodromic mixed Hodge modules
Let X be a complex variety. Then we define as in [42,43] the category MHM(X ) of mixed Hodge modules on X . See [41] for an overview of the theory. There is an exact functor rat X : D(MHM(X )) → D(Perv(X )) which takes a complex of mixed Hodge modules F to its underlying complex of perverse sheaves, and commutes with f * , f ! , f * , f ! , D X and tensor product. If no remark is made to the contrary, and a non-derived target or domain category is not specified, all these functors, and indeed all functors for the entirety of this paper, will be considered as derived functors, even if their non-derived versions are well-defined.
Set B to be the full subcategory of mixed Hodge modules on A 1 containing those F ∈ Ob(MHM(A 1 )) such that (G m → A 1 ) * F is an admissible variation of mixed Hodge structure. Set C to be the full subcategory of B for which the objects are the admissible variations of mixed Hodge structure on A 1 . Then we define the category of monodromic mixed Hodge structures MMHS to be the Serre quotient B/C. Fix X and let B X be the full subcategory containing those F ∈ MHM(X × A 1 ) such that for each x ∈ X , the total cohomology of ({x} × G m → X × A 1 ) * F is an admissible variation of mixed Hodge structure on G m . Via Saito's description of MHM(X × A 1 ), the category B X ⊂ MHM(X × A 1 ) is the full subcategory, closed under extensions, and containing the following types of objects irreducible closed subvariety, and L is a pure weight n variation of Hodge structure on Y × G m , for Y an open dense subvariety of Y reg , and n ∈ Z.
for L a pure weight n variation of Hodge structure on Y ⊂ Y reg ⊂ X as above.
are the lifts of intersection complexes to mixed Hodge modules defined in [43,Thm.3.21]. By semisimplicity, any object P of type (1) splits into a direct sum P ∼ = P 1 ⊕P =1 , where for L 1 ⊂ L the maximal pure variation of Hodge structure to have trivial monodromy around Y × {0}, and L =1 its complement. Inside B X there is a Serre subcategory C X given by the full subcategory of MHM(X × A 1 ) containing those objects F such that the total cohomology of each ({x} × A 1 → X × A 1 ) * F is an admissible variation of mixed Hodge structure on A 1 . It is generated under extensions by simple objects of the form P 1 .
By Schmid's rigidity theorem, the total cohomology of the restriction to the fibres {x} × A 1 of any such mixed Hodge module is constant, and C X is the essential image of the functor π * [1] : is the projection. We define following [29,Sec.7] the category of monodromic mixed Hodge modules MMHM(X ) = B X /C X . Since the objects of MMHM(X ) are the objects of B X , we deduce that all isomorphism classes of objects in MMHM(X ) are obtained from iterated extensions of simple objects of type (1) satisfying L = L =1 , and of type (2). We identify MMHS with MMHM(pt).
In [29] the category of monodromic mixed Hodge modules is presented as a subcategory of MHM(X × A 1 ), whereas for us it is a quotient. We collect together some category theoretic lemmas that clarify this shift in point of view.
ι Condition (2) implies that (F) ∈ ob(D) for all F ∈ ob(B), and so we obtain a factorization : In the lemma, and from now on, we abuse notation by denoting the resulting functor B → D also by .
Proof Via the above abuse of notation we consider ν as a natural transformation id B → ι • . We claim that this is the unit of the adjunction, while will be the unit. We need to check that the compositions of morphisms are the identity. Pick F ∈ ob(B). Then

Lemma 2.2
With the assumptions of Lemma 2.1, assume also that B is Abelian, and is exact. Let C be the full subcategory of B containing those objects F for which (F) = 0. Then C is a Serre subcategory. We denote the Serre quotient B/C. The functor induces a functor˜ : B/C → B, which is right adjoint to the canonical functor Q : B → B/C.
Proof The category C is a Serre subcategory by exactness of . By the universal property of B/C, induces a functor˜ : B/C → B. We claim that ν : id B → provides a unit for the adjunction. Let F ∈ B/C, and consider the map ν F : F → (F). Since (ν F ) is an isomorphism, and is exact, we deduce that (ker(ν F )) = (coker(ν F )) = 0, and so ν F represents an isomorphism ν F in B/C. Arguing as above, (ν F ) −1 provides the counit to the adjunction.
The proof of the following lemma is again constructed from the above adjunctions, and is omitted. Now we apply these abstractions to certain categories of mixed Hodge modules. We define as in [29] the exact functor X : B X → B X : The functor is exact since it sends each of the simple mixed Hodge modules identified at the start of this section to mixed Hodge modules. Consider the distinguished triangle We define the natural transfromation ν, for F ∈ B X , via the following composition of mixed Hodge modules on X × A 1

Lemma 2.4
The pair ( X , ν) satisfies the conditions of Lemma 2.1.
Proof Consider the commutative diagram We have where we have used commutativity of (25) for the final equality. On the other hand, we have and by commutativity of +. We compute Proof We denote by π : X × A 1 → X the projection. By definition, C is the full subcategory containing those objects F such that X (F) = 0. This is equivalent to the condition that the natural composition is an isomorphism. It follows that the objects of C are contained in the objects of C X . On the other hand, the natural transformation π * π * π * → π * is an isomorphism and the reverse inclusion holds.
Via the same arguments, we deduce the following Lemma.

Lemma 2.6
Under the assumptions of Lemma 2.5 and with the terminology of Lemma 2.1, D is the full subcategory of B X containing those objects F satisfying π * F = 0.
The (sub)category D is identified as the category of monodromic mixed Hodge modules by Kontsevich and Soibelman; as we have shown, it is equivalent to our (quotient) category of monodromic mixed Hodge modules.
is an equivalence of categories, where MHM(X × G m ) mon is the full subcategory of MHM(X × G m ) containing those F such that the total cohomology of each pullback ({x} × G m → X × G m ) * F is an admissible variation of mixed Hodge structure. An explicit inverse equivalence X is provided by where˜ X is functor induced by X , as above. In terms of the two types of simple mixed Hodge modules identified at the start of the section, we have From the existence of a right adjoint to the functor B X → MMHM(X ), one can show (see e.g. [1,06XM]) that the natural functor is an equivalence of categories, where D C X (B X ) is the full subcategory of D(B X ) consisting of those objects whose cohomology objects lie in C X . The subcategory D C X (B X ) is stable under the Verdier duality functor D X ×A 1 , and so we obtain a Verdier duality functor on D(MMHM(X )) which we denote D mon X . The associated graded object Gr W • (F) of an object in C X with respect to the weight filtration is also in C X , and so the weight filtration descends to MMHM(X ).

Definition 2.7 Given an element
is a pure variation of Hodge structure of weight 1, while the monodromic mixed If f : X → Y is a morphism of varieties, we define the functors f ! , f * , f ! , f * between the associated derived categories of monodromic mixed Hodge modules to be those induced by the functors between the associated derived categories of mixed Hodge modules.

Definition 2.9
Assume X is a variety X τ − → N Q 0 over a monoid N Q 0 of dimension vectors for a quiver Q. We define H(X, F) to be the total cohomology of τ * F. So H(X, F) may be thought of as a cohomologically graded N Q 0graded monodromic mixed Hodge module on a point, e.g. the N Q 0 -graded monodromic mixed Hodge structure underlying the total hypercohomology of F. Similarly, we define H c (X, F) to be the total cohomology of τ ! F.
The monoidal structures ⊗ on D ≥ (MMHM(X )) and D ≤ (MMHM(X )) are defined by where pr i, j : X × A 1 × A 1 → X × A 1 is the projection onto the ith and the jth component.

Remark 2.10
More generally, let X be a monoid in Sch Y , the category of schemes over Y , with finite type monoid map ⊕ : X × Y X → X . Then define We recover (27) in the special case in which (X This external tensor product is biexact and preserves weight filtrations by [29,Sec.4], [10,Prop.3.2], or the proof of Proposition 3.8 below. There is a fully faithful embedding MHM(X ) → MMHM(X ) given by which is furthermore a monoidal functor, commuting with Verdier duality, as i is proper.
Define X as in (26). Let e : X is also faithful (again using rigidity for variations of mixed Hodge structure [45,Thm.4.20]), and so we can define an exact faithful (non-derived) functor by setting forg mon this cone can indeed be made functorial-see [25] for details, or the proof of Proposition 3.11 below for a functorial definition of φ f . The functors ψ f and φ f have lifts to endofunctors of D(MHM(X )), forming a key part of Saito's theory.
In the sequel we consider vanishing cycles always as a functor D(MHM(X )) → D(MMHM(X )) via the definition of [29,Def.27] In (29), u denotes the coordinate on G m .
In other words, φ mon 0 F ∼ = F, where we consider F on the right hand side of the isomorphism as a monodromic mixed Hodge module via pushforward along Remark 2.12 Generalising the above example; in fact it follows from exactness of the functors φ f /u [−1] (see [3]), π * [1] and j ! that φ mon f is exact in general.
We collect together some useful properties of φ mon f . Proposition 2.13 (1) (Verdier duality): There is a natural isomorphism where D X is the usual Verdier duality functor.
is an isomorphism.
The first five statements follow from the corresponding statements for φ f . The first of these is proved at the level of perverse sheaves as the main theorem of [32], and for mixed Hodge modules as the main theorem of [40], see also Schürmann's appendix to [5]. The second statement is given by combining [43, Thm.2.14, Thm.4.3]. Homotopy invariance then follows from the homotopy invariance statement for perverse sheaves. The hard part of the exactness statement is the statement that the shift of the usual vanishing cycle functor, φ f [−1], is exact. This is a result of Gabber, and can be found in [3]. The version of the decomposition theorem quoted here follows from Saito's version of the decomposition theorem [43], and statements (4) and (2). The statement regarding the Thom-Sebastiani isomorphism is in fact false after replacing φ mon Saito [38]; again we refer the reader to Schürmann's appendix to [5] for the compatibility between this proof and the proof of Massey [31] at the level of complexes of perverse sheaves. The integral identity is proved in the above form in [29], and is a central background result in the proof of the integrality conjecture 6 in [29]. Somewhat surprisingly, given its crucial role in the theory in other treatments of Hall algebras in Donaldson-Thomas theory, it is the only one of the seven facts about vanishing cycles above that we will not use.
For ease of exposition we make the following simplification in what follows.

Assumption 2.
14 For all functions f : X → C for which we wish to take φ mon f , if X is smooth, we assume that crit( f ) ⊂ f −1 (0) as sets. Under the assumption, the Thom-Sebastiani isomorphism for mixed Hodge modules simplifies to The assumption can be dropped, with a little care. If it does not hold, one can instead work with the functor φ mon,fib or with exponential mixed Hodge structures-see [12,29], respectively.
The former category contains the element which is pure: it is concentrated entirely in cohomological degree 2, and has weight 2. There is no square root of L in D b (MHM(pt)), i.e. an element L 1/2 such that (L 1/2 ) ⊗2 ∼ = L, but after embedding there is a square root. We set where x 2 : A 1 → C is considered as a regular function, and Q A 1 is the constant (cohomologically shifted) mixed Hodge module on A 1 . Using the Thom-Sebastiani isomorphism one may show that this is indeed a tensor square root of L. We fix an isomorphism This amounts to fixing an isomorphism r : In particular, since A 1 carries a canonical orientation, there is a canonical choice of r and thus of l. We set so there is a canonical isomorphism with target the monoidal unit in MMHM(pt).
Since L is pure, we deduce from Remark 2.10 that L 1/2 is pure, concentrated in cohomological degree 1. Note that due to the definition of the category of monodromic mixed Hodge modules on a point (i.e. monodromic mixed Hodge structures), this cohomological degree is with respect to the perverse t-structure on the underlying derived category of constructible sheaves on If F ∈ MMHM(X ) and G ∈ MMHM(pt) we use the abbreviation where τ : X → pt is the map to a point. For X a variety and d ∈ Z we define If X is a smooth equidimensional variety, we define This complex of monodromic mixed Hodge modules is pure, and an element of MMHM(X ), again by Remark 2.10. If X is not smooth, but is irreducible, we define the monodromic mixed Hodge module IC X (Q)

Remark 2.15
Because of the shift in the definition of IC X (Q), there are natural isomorphisms D mon for X a finite disjoint union of irreducible varieties, and f a regular function on X .
For X a smooth equidimensional variety we define and since in the stack-theoretic sense the dimension of dim(BC * ) is −1, we extend this notation by defining

Equivariant vanishing cycles
We do not propose here to write down a full six functor and vanishing cycles functor formalism for equivariant monodromic mixed Hodge modules via a theory of monodromic mixed Hodge modules on stacks. Instead we mimic the constructions of [4] and Totaro's approximation [48] of the Chow ring of classifying spaces by finite-dimensional algebraic approximations to produce only the definitions and constructions we will need for the rest of this paper. We will want to be able to work with equivariant monodromic mixed Hodge modules, in the following generality. We assume that we have a G-action on a smooth algebraic variety X , for G an affine algebraic group, and a regular function f on the stack X/G, i.e. a G-invariant regular function on X . Furthermore we assume that we are given a map of stacks p : X/G → Y , where Y is a locally finite type scheme. We will also assume that G is special, i.e. all étale locally trivial principal G-bundles are Zariski locally trivial-see [22, Def.2.1] for a concise discussion of this condition in this context, or [7] for the original references. As noted in [22], all such G are connected.
The element H p * φ mon f IC X (Q) will be an element of D ≥ (MMHM(Y )), the derived category of bounded below complexes of monodromic mixed Hodge modules on Y .
We define H p * φ mon f IC X (Q) as follows. Let V 1 ⊂ V 2 ⊂ . . . be a chain of inclusions of G-representations, and let U 1 ⊂ U 2 ⊂ . . . be an ascending chain of subvarieties of the underlying vector spaces of V 1 , V 2 , . . ., considered as Gequivariant algebraic varieties. We suppose that G acts scheme-theoretically freely on each U i , that each principal bundle quotient U i → U i /G exists in the category of schemes, and that codim V i (V i \U i ) → ∞ as i → ∞. The map X × U i → X × G U i exists as a principal bundle quotient in the category of schemes by [14,Prop.23]. We define f i : X × G U i → C to be the induced map, and ι i : X × G U i → X × G U i+1 to be the inclusion.
To fix notation, we fix an embedding G ⊂ GL t (C) for some t. We set and define U i ⊂ V i to be the subscheme of surjective maps; if i ≥ t then U i does indeed carry a free G-action via the GL t (C)-action on C t . For each i, we define X i := X × G U i . We obtain an explicit sequence of maps and so a sequence of mixed Hodge modules

Proposition 2.16
Fix n ∈ N. Then for i 0 the map in MMHM(Y ) is an isomorphism.
Proof Since the functor forg mon (28) is faithful, it suffices to show that (31) induces an isomorphism at the level of perverse sheaves. So let F i denote the complex of perverse sheaves p i, * φ f i Q X i . Say we can prove the same proposition, but with the map Λ replaced by the map of constructible sheaves on Y (here and below we use H con to denote constructible cohomology sheaves). Then for sufficiently large i, and the original proposition follows. Consider the space U i,i+1 ⊂ Hom(C i+1 , C t ) of linear maps which are surjective after precomposing with the map given by (z 1 , . . . , z i+1 ) → (z 1 , . . . , z i , 0). This subspace is open and dense for i ≥ t. We denote by j i the inclusion Note that G acts freely on U i,i+1 , and there is a G-equivariant affine fibration , denote by f i,i+1 : X i,i+1 → C the function induced by f , and denote by the open embedding induced by j i . The projection τ i,i+1 induces an affine fibration and we define the induced morphism We factorise Λ con as the composition where the second map is an isomorphism by homotopy invariance. So it is enough to show that the map a is an isomorphism for sufficiently large i.
Consider the function f i+1 : X × U i+1 → C given by the composition .
is an isomorphism for sufficiently large i, since the codimension of U i+1 \U i,i+1 inside U i+1 goes to infinity as i goes to infinity. Since the external tensor product is exact, we deduce that for fixed m and sufficiently large i, is an isomorphism. On the other hand, taking a Zariski open subspace C ⊂ X i+1 such that the principal bundle and so using exactness of external tensor product again, we deduce that for fixed n and sufficiently large i, the map is an isomorphism. The pushforward p i+1, * maps D ≥n+1 con (X ) and the map a is an isomorphism for sufficiently large i, as required.

Proposition 2.17
The complex is well defined up to canonical isomorphism in D(MMHM(Y )).
Proof The proposition says that if, for l = 1, 2 we have two choices V i etc. with reference to them, then there is a canonical isomorphism, for each n, and for sufficiently large i: By another application of [14,Prop.23], X i × (U (1) i × U (2) i ) is a principal Gbundle over X (12) i ). We denote by p (12) i : X (12) i → Y the projection; note that it factors through both p (1) i and p (2) i . Via the same argument as Proposition 2.16, each of the morphisms is an isomorphism, and σ (12) = κ −1 τ is the desired isomorphism. From the obvious commutative diagrams of projections between different principal Gbundles, there are equalities σ (23) σ (12) = σ (13) and σ (11) = id.
We denote by H p * φ mon f Q X the element defined in Proposition 2.17. If M = s∈S M s , with M s ∼ = X s /G s and each X s a smooth algebraic variety, and each G s a special affine algebraic group, and p : M → Y = s∈S Y s is a map to a locally finite type scheme respecting the decompositions of the source and the target, for c ∈ Z we define ) in similar fashion. We give the definition in the case that M = X/G, for X a smooth irreducible variety and G a special affine algebraic group, and extend to the case of a disjoint union of such stacks as above.
Consider the isomorphism where ι i,i+1 is as defined in (32). Arguing as in Proposition 2.16, for fixed n the natural map is an isomorphism for sufficiently large i, and we can define H n p ! φ mon f Q X/G to be the limit of H n p i,! φ mon as i tends to infinity, and we set

Remark 2.18
Note that we do not offer here a definition of p * φ mon, f Q X/G , or p ! φ mon, f Q X/G as objects of the derived category, but instead limit ourselves to defining the total cohomology of these direct images with respect to the natural t-structure on D(MMHM(Y )). Of course in case X/G is an actual scheme, p * φ mon f Q X/G and p ! φ mon f Q X/G are well defined monodromic mixed Hodge modules before passing to cohomology, and our definitions of H p * φ mon f Q X/G and H p ! φ mon f Q X/G recover their respective total perverse cohomology.

Remark 2.19
As a special case of the above construction, if τ : → N Q 0 is a stack over a monoid of dimension vectors, with each similarly. This is the definition used in [29,Sec.7] in the definition of the underlying N Q 0 -graded monodromic mixed Hodge structure of the critical cohomological Hall algebra.

Definition 2.20
Let X/G → N Q 0 be as in Proposition 2.17, and let υ : X S /G → X/G be an inclusion of stacks. We denote by the induced map, and by p S i the restriction of p i to X S × G U i . We define the restricted absolute critical cohomology as the complex of limits with zero differential and likewise we define Let h : X → X be a morphism of G-equivariant varieties over the Ginvariant locally finite type scheme Y . Then for each i we obtain maps h i : X i → X i . There are natural maps which are isomorphisms if h is proper or an affine fibration (see Proposition 2.13). We precompose with the natural map Now assume that X and X are smooth, or that h is. Taking H(D Y (δ 1 • δ 2 )) and letting i → ∞, we define the map Finally, let υ : H → G be an inclusion of groups-the only examples we will consider are when υ is the inclusion of a parabolic subgroup inside GL n (C), or the inclusion L ⊂ P of the Levi subgroup of a parabolic subgroup of GL n (C). Let G act on X as above, with f a G-invariant regular function on X . Let h : X/H → X/G be the associated morphism of stacks. Then we obtain maps which we use in the same way as above to obtain the map

Remark 2.21
If H → G is the inclusion of a parabolic subgroup, then the induced maps h i are proper. As such, there is a natural isomorphism φ mon given by the natural isomorphism h i, * ∼ = h i,! and Verdier duality, we obtain, in the limit, the map

Basic notions
We will use the notations and conventions from [12], which we briefly recall. Let Q = (Q 0 , Q 1 , s, t) denote a quiver, that is, a pair of finite sets Q 0 and Q 1 , and a pair of maps s : Q 1 → Q 0 and t : Q 1 → Q 0 , taking an arrow to its source and target, respectively. Denote by CQ the free path category of Q over C. Alternatively we may think of CQ as the free path algebra of Q, with a distinguished family of mutually orthogonal idempotents e i in bijection with the vertices Q 0 , summing to 1 CQ . Let Sch C be the category of schemes over Spec(C). For S ∈ Sch C we denote by Vect f.d.
S the category of finite rank vector bundles over S. Let d ∈ N Q 0 be a dimension vector. We denote by M d the groupoid valued functor on Sch C that assigns to S ∈ Sch C the groupoid obtained from forgetting the non-invertible morphisms in the full subcategory of functors in Fun(CQ, Vect f.d. S ) such that i ∈ Q 0 is sent to a vector bundle of dimension d i . This prestack is an Artin stack, as it is represented by the following global quotient stack. First define This affine space carries the change of basis action of and there is an equivalence of stacks M d ∼ = X d /G d . We denote by M the union d∈N Q 0 M d , the stack of finite-dimensional representations of Q, which by the equivalences just given is a countable disjoint union of finite type global quotient Artin stacks.
In numerous instances we wish to take cohomology of sheaves restricted to a substack of M d . To that end, we assume that for each d ∈ N Q 0 we are given reduced subschemes which are preserved by the action of G d , and such that the set S of CQrepresentations that are isomorphic to representations parametrised by points of X S = X S d are the objects in a Serre subcategory of the category of finite-dimensional CQ representations. In other words, if is a short exact sequence of CQ-representations, ρ and ρ are in S if and only if ρ is in S. We set M S ⊂ M to be the reduced substack, the closed points of which correspond to modules in S. Then M S d = X S d /G d . We denote by For the rest of the paper, X d and X S d will be as in (36) and (37) respectively. Where we wish to be specific regarding the quiver with respect to which these spaces are defined, we will instead use the notation X (Q) d or X (Q) S d .
S ) and ι : F → F is a natural transformation, such that rank(F (i)) = d i , rank(F(i)) = d i , and ι(i) is injective, with locally free cokernel, for every i. Again, M d ,d is a finite type Artin stack, which can be described as follows. Let X d ,d ⊂ X d be the subspace of representations such that the flag C d i ⊂ C d i is preserved for all i ∈ Q 0 , and let G d ,d ⊂ G d be the subgroup preserving these same flags. Then We likewise define M S d ,d ⊂ M d ,d to be the reduced substack of the stack parametrising triples as above, for which the d-dimensional CQ-representation F x corresponding to each of the closed points x are elements of S. For each such x there is a short exact sequence and our condition is equivalent to asking that F x and F x are in S, since S defines a Serre property. So we have provides a Bridgeland stability condition, as defined in [6], with central charge defined on finite-dimensional CQ-modules We define the slope of a nonzero representation ρ by setting Likewise we define ζ (d), for d ∈ N Q 0 \{0}, to be the slope of any representation ρ of dimension d. A CQ-representation ρ is called ζ-semistable if for all proper submodules ρ ⊂ ρ we have ζ (ρ ) ≤ ζ (ρ), and is ζ-stable if instead we have ζ (ρ ) < ζ (ρ) for every proper submodule. To simplify notation in what follows, we will assume that all representations satisfy ζ (ρ) < ∞ in this paper. In other words, we choose our Bridgeland stability conditions to belong to We define two pairings on Z Q 0 : Note that (d, d) = − dim M d .
As in the introduction, for every μ ∈ (−∞, ∞) we denote by Λ ζ μ ⊂ N Q 0 the submonoid of dimension vectors d which are either zero, or have slope μ with respect to the stability condition ζ.

Definition 3.1
We say ζ is μ-generic if d, e ∈ Λ ζ μ implies d, e = 0. We say ζ is generic if it is μ-generic for all μ.
We say that ζ is a King stability condition if m(ζ i ) = 1 and e(ζ i ) ∈ Q for all i ∈ Q 0 . Given a King stability condition ζ, we can fix m ∈ N such that m e(ζ i ) ∈ Z for every i. We linearize the G d -action on X d via the trivial line bundle on X d and the character and define X ζ -ss d to be the variety of semistable points with respect to this linearization. By [26], using the constructions and definitions of [35], the GIT quotient X ζ -ss d / / χ d G d provides a coarse moduli space of ζ-semistable representations of dimension d, which we denote M ζ -ss d . Similarly we denote by M ζ -ss,S d the scheme X ζ -ss,S d / / χ d G d , and we denote bỹ the natural inclusion.
Remark 3.2 Fix a dimension vector d ∈ N Q 0 of slope μ, for a μ-generic stability condition ζ. Then we can always find a μ -generic King stability condition ζ such that a d-dimensional CQ-module is ζ-stable if and only if it is ζ -stable, by [11,Lem.4.21], where μ is the slope of d with respect to ζ . By construction, a d-dimensional CQ-module is ζ -semistable if and only if it is ζ-semistable. We deduce that for every μ-generic Bridgeland stability condition ζ and every dimension vector d of slope μ, there is a coarse moduli space M ζ -ss d of d-dimensional ζ-semistable CQ-modules.

Remark 3.3
Pick a rational slope μ ∈ (−∞, ∞). Then we can define a maximally degenerate stability King condition, for which every CQ-module is automatically semistable, by fixing ζ i = + √ −1 − μ for all i ∈ Q 0 . In this case we have Λ ζ μ = N Q 0 , and M = M ζ -ss μ . As a result, all the results in this paper in which we do not assume that we are working with a generic stability condition apply to the case in which we do not impose any stability condition. In addition, those results in which we do impose a genericity assumption on ζ apply to the case in which we impose no stability condition and Q is symmetric, since in this case maximally degenerate stability conditions are still generic in the sense of Definition 3.1.
We write M d for the coarse moduli space, taken with respect to the above degenerate stability condition. Then explicitly For a slope μ, we define and We denote by the maps from the stacks to their respective coarse moduli spaces, and by and the maps to the subschemes of points in the union of the affinizations M μ corresponding to representations in S. Deleting all superscripts S in the above definitions we obtain morphisms p ζ d , q ζ d etc.

Monoidal products
In this section we define and introduce the first properties of the categorification of the quantum torus from refined DT theory.

Definition 3.4
Let F ∈ D(MMHM(X )) for X a scheme. We say that F is locally finite if for each Z ∈ π 0 (X ) (MMHM(X )) the full subcategory of locally finite objects.
The category D ≥,lf (MMHM(N Q 0 )) is going to play the role of the categorification of the motivic quantum torus of [27,Sec.6.2]. For now we remark that this quantum torus is a power series ring with coefficients in Z((q 1/2 )) and variables x d for d ∈ N Q 0 , and if ζ is a generic stability condition then the subring of power series in variables x d for d ∈ Λ ζ μ is commutative, while the whole quantum torus in general is not. The categorification of this picture, then, should be a monoidal category, for which the monoidal product cannot be upgraded to a symmetric monoidal product, except on fixed subcategories indexed by the slope μ, for which we should define a symmetric monoidal product.
The moduli scheme M ζ -ss μ carries a symmetric monoidal structure given by the direct sum, and the product defined as in (27).

Proposition 3.5 The monoidal product ⊕ is biexact and preserves the weight filtration.
Proof Let F ∈ MMHM(X ) and G ∈ MMHM(Y ) for two algebraic varieties X and Y . We define their external tensor product as in Remark 2.10. Then by [29,Lem.1], there is an isomorphism in is left exact, and decreases weights, while p * is right exact and increases weights, we deduce that the external tensor product is exact and preserves weights. μ . We briefly summarize the results of Maxim, Saito and Schürmann [33], dealing with exterior products and symmetric group actions on mixed Hodge modules. Let X i , i ∈ I be a finite set of algebraic varieties, let L i be objects of D ≥,lf (MHM(X i )) for each i ∈ I , and let f i : X i → Y i be a set of morphisms of algebraic varieties. Set f = i∈I f i . While [33] treats the bounded derived category, and certainly it makes no sense to apply their results at the generality of the unbounded derived category, their arguments extend without modification to the case of the categories D ≥,lf (MHM(X i )). They show that external tensor product commutes with the direct image, that is, there is a natural isomorphism Furthermore, if X i = X for all i, and Y i = Y for all i, then there is an action of the symmetric group S I on both external products, which is respected by the above natural isomorphism.
Remark 3.6 This is the usual action, incorporating the Koszul sign rulewhen we consider cohomological Hall algebras later, we will have cause to modify this action, to express commutativity results for the cohomological Hall algebra. However, for the purposes of Theorems A and B we may equivalently use the default action of [33] as we are only interested in the isomorphism classes of underlying objects (see Proposition 6.2). Now let L i = L for all i, and let I = {1, . . . , n}. The authors then define Sym n (L) := ( * n L) S n , where : X n → Sym n X is the natural map, and show that there is a canonical isomorphism H(Sym n X, Sym n L) ∼ = Sym n (H(X, L)).
Furthermore, they show that the Kunneth isomorphism is an isomorphism of S n -representations. Now let L ∈ D ≥,lf (MMHM(X )). Since there is a commutative diagram we obtain a S n -action on X, * ( n L) by taking r * of the action defined in [33], and we can define Sym n L to be the S n -invariant summand. Similarly, we define the functor We then define This functor is well defined, since has finite fibers. The same fact implies the following lemma:

Proposition 3.8
The functor Sym ⊕ takes pure objects to pure objects.
is pure. On the other hand, Sym n ⊕ F ⊂ G is the isotrivial direct summand under the S n -action, and is therefore pure. We deduce that Sym ⊕ F is a direct sum of pure objects, and is therefore pure.
We define a new monoidal structure on D ≥,lf (MMHM(M ζ -ss )) by setting ). Since we are twisting by a pure twist, this monoidal product again preserves weights. If ζ is μ-generic, the restriction of tw ⊕ to D ≥ (MMHM(M ζ -ss μ )) is naturally isomorphic to the untwisted symmetric monoidal product ⊕ , but in general there is no symmetrizing natural isomorphism of bifunctors making tw ⊕ into a symmetric monoidal product.

Remark 3.9
By skew symmetry of •, • Q and finiteness of the maps of schemes ⊕ and +, there are natural isomorphisms of bifunctors Note the swap of arguments.

Framed moduli spaces
Framed moduli spaces will play a central role in what follows. Their cohomology provides an approximation to the cohomology of M ζ -ss , in a way which we will make precise in Sect. 4.1.
Let f ∈ N Q 0 be a dimension vector (called the framing vector). We form a new quiver Q f by setting . Given a stability condition ζ for Q, and a slope μ ∈ (−∞, ∞) we extend ζ to a stability condition ζ for sufficiently small > 0, and picking |ζ fsemistable if and only if the underlying CQ-module is ζ-semistable, and for every CQ f -submodule ρ ⊂ ρ such that dim(ρ ) ∞ = 1, the underlying CQmodule of ρ has slope strictly less than μ. A ζ f -stable, and we write M ζ f,d for the fine moduli space of ζ

Remark 3.10 In fact G d acts freely on the smooth variety
and M ζ f,d is the quotient.
We denote by

Jacobi algebras and potentials
Let W ∈ CQ/[CQ, CQ] be a finite linear combination of equivalence classes of cyclic words in CQ. Such a W is called a potential. A potential W induces a function Tr(W ) on M, defined as follows. Firstly, assume that W lifts to a single cyclic word c = a r . . . a 0 in CQ. Then a CQ-module F determines an endomorphism and Tr(F(a r ) • · · · • F(a 0 )) determines a function on X (Q)  We then extend the definition to general W by linearity. We define M W , the stack of finite-dimensional Jac(Q, W )-modules, in the same way as the stack of finite-dimensional CQ-modules. In particular there is a natural closed embedding of stacks M W ⊂ M, and it is easy to show that M W = crit(Tr(W )) as substacks of M.
In order to keep to Assumption 2.14 we will assume that W ∈ ∂ W/∂a|a ∈ Q 1 , for then crit(Tr(W )) ⊂ Tr(W ) −1 (0). One very common set of circumstances in which this requirement is met is when there is a grading of the arrows Q 1 with integers such that W is homogeneous of nonzero weight. As mentioned after Assumption 2.14, we can drop this requirement at the expense of slightly more complicated definitions.
where the horizontal maps are induced by the symmetrizing natural isomorphisms of Sect. 3.2, and the vertical maps are given by the Thom-Sebastiani natural isomorphism. By faithfulness of the functor forg mon it is enough to prove commutativity of the diagram at the level of perverse sheaves, or constructible complexes. Since ⊕ is finite, by natural commutativity of vanishing cycle functors with proper maps, it is enough to prove commutativity of the diagram Let ι : M ζ μ → X be an embedding inside a smooth scheme, let f be a function on X extending T r (W ) ζ μ and consider F as a perverse sheaf on X via the direct image. Then we define the functor on the category of constructible sheaves on X and we may alternatively define the Thom-Sebastiani isomorphism is given by the natural morphism induced by the inclusion and the horizontal maps in (53) are induced by the natural morphism on both sides. Applying the natural isomorphism α to this morphism, we obtain the diagram (53).

Approximation of p ζ d by proper maps
Recall from (43) (and the remark following it) the morphism taking a ζ-semistable d-dimensional CQ-representation to the associated polystable representation. We start this section by showing that there is a module-theoretic compactification of Totaro's construction relative to M ζ -ss d , which we may use as in Sect. 2.2 to define the direct image along p ζ d of the monodromic mixed Hodge module of vanishing cycles from the stack of ddimensional ζ-semistable representations of CQ.
Recall the definition of ζ (μ) f from Sect. 3.3. Recall from (52) the notation We replace ζ , and the extra GL 1 (C) factor acts by rescaling V f,d . We define U f,d ⊂ V f,d to be the subspace of Q 0 -tuples of surjective maps. The group G d acts freely on U f,d , and the quotient is a product of Grassmannians, and is a fibre bundle quotient in the category of schemes. Therefore G d also acts freely on X ζ -ss d ×U f,d , which is a fibre bundle in the category of schemes by [14,Prop.23]. Consider the commutative diagram All of the objects in the above diagram are algebraic varieties, with the exception of (X ζ -ss d × V f,d )/G d , which is strictly an Artin stack. The diagram obtained by deleting this stack and all arrows incident to it is a relative compactification of the map κ ζ f,d . In what follows we use the notation f 0 to mean that f i 0 for every i ∈ Q 0 .

Lemma 4.1 For fixed n and f 0 the natural map
Proof As in the proof of Proposition 2.16 it is enough to show that for fixed is the open inclusion and is the composition of T r (W ) ζ f,d with the quotient map. On the other hand, the complex of sheaves φ is given by restriction of the pullback It follows that for each x ∈ X ζ -ss d , the complex of constructible sheaves φ is a constant complex, supported in degrees that are bounded independently of x. The codimension of the complement of (X ζ -ss tends to infinity as f → ∞, and so for sufficiently large f is an isomorphism for all x ∈ X ζ -ss d , and the result follows.
We deduce that for fixed d ∈ N Q 0 and n ∈ Z, and for f 0 there are isomorphisms f,d,W : H n π ζ f,d, * φ mon and where the argument that f,d,W is an isomorphism is as in Lemma 4.1.
On the other hand, for f 0, the right hand side of (54) is by definition H n ( p ζ d, * φ mon , while the left hand side of (55) is . For f 0 we obtain isomorphisms in the same way.
Since each map π ζ f,d is proper, and φ mon is exact, we deduce the following proposition.
Proof The isomorphisms ν d are obtained by considering the left hand side of (54) and using the natural isomorphisms The isomorphisms ν d are well-defined by commutativity of the square where f > f and ι f,f : M ζ f,d → M ζ f ,d is the natural inclusion obtained by extending a framing by zero. The square commutes as it is obtained by applying the natural transformation Similarly, the natural isomorphisms φ mon , along with exactness of φ mon whereω ζ d is as in (40).
Proof Fix n ∈ Z. We prove the existence of the final isomorphism, the proof of the second follows from the special case M ζ -ss,S d = M ζ -ss d , and the proof of the first follows from commutativity of Verdier duality with φ mon For sufficiently large f we may write the degree n piece of the left hand side as while the right hand side is written as The result then follows from proper base change, and the following chain of isomorphisms, coming from properness of π ζ f,d , exactness of vanishing cycles functors, and the decomposition theorem Remark 4.5 Throughout the paper we work over the complex numbers, and in the algebraic setting. For greater generality, we could instead have considered analytic mixed Hodge modules-by Saito's work the same fundamental facts that we have used regarding the vanishing cycle functor remain true in the category of analytic mixed Hodge modules (see [43,Sec.2]). In particular, if W is a formal potential such that T r (W ) ζ d defines an analytic function in some neighbourhood U d of 0 ∈ M ζ -ss d , then Proposition 4.3 applies in the neighbourhood U d . If, moreover, there is a Serre subcategory U of the category of ζ-semistable CQ-modules of slope μ such that for all d ∈ Λ ζ μ the inclusion is an analytic open inclusion factoring through an open set U d as above, then the relative versions of Theorems A, B, C and D hold with unmodified proofs. See [47] for results defining such a subcategory U of the category of coherent sheaves on a Calabi-Yau threefold.

The integrality isomorphism-Theorem A
Assume that ζ is a μ-generic Bridgeland stability condition. As in [12] and the introduction, for d ∈ Λ ζ μ \{0} we define the following elements of MMHM(M ζ -ss d ) and D b (MMHM(pt)), respectively is not pure either.
Remark 4.7 By Proposition 2.13 there are isomorphisms and so D mon and an isomorphism in Proof We start by proving that there is an isomorphism as in (61). By definition, the left hand side of (61) is isomorphic to its total cohomology. On the other hand, H(BC * ) vir is also isomorphic to its total cohomology, and BPS ζ W,μ is an object of MMHM(M ζ -ss μ ) ⊂ D(MMHM(M ζ -ss μ )), and is trivially isomorphic to its total cohomology. It follows from the exactness of ⊕ (Proposition 3.5) that the right hand side of (61) is also isomorphic to its total cohomology, and so it is sufficient to construct the isomorphism (61) at each cohomological degree.
We first show the result, under the assumption that W = 0. That is, we show that For this special case, the idea of the proof is to use the purity of all relevant complexes of monodromic mixed Hodge modules to upgrade the results of [34], from equalities in a Grothendieck ring, to isomorphisms.
as required-for the second equality we have used the main result of [34]. For the case W = 0, by Proposition 3.11 we deduce the existence of isomorphisms H p ζ μ, * φ mon where for the third isomorphism we have used that φ mon T r (W ) ζ μ is a symmetric monoidal functor (Proposition 3.11).
For the absolute case, we compose the following chain of isomorphisms, the first of which is Proposition 4.4.

Corollary 4.11
There is a canonical split inclusion Proof First we prove the corollary in the case W = 0. In this case, the left hand side of (63) is precisely the summand of the right hand side with strict supports equal to M ζ -ss d for d ∈ Λ ζ μ by Theorem 4.10, and the result follows from the decomposition theorem. For the general case, we apply the functor φ mon T r (W ) ζ μ to the inclusion, and its left inverse, from the case W = 0.

The cohomological wall crossing isomorphism-Theorem B
In this section we prove Theorem B, which is a categorification of the motivic wall crossing formula (8). In Sect. 6.4 we will prove that this isomorphism can be realised in terms of multiplication in the cohomological Hall algebra. Even without considering the CoHA we can still prove that there is some isomorphism (10). The mere existence of this isomorphism is enough for many applications.
Fix a dimension vector d ∈ N Q 0 . Denote by HN d the set of Harder- (73) q ζ 5 Cohomological Hall algebras

The relative cohomological Hall algebra
In this section we define the relative cohomological Hall algebra H(A ζ W,μ ). For now we will not assume that the stability condition ζ ∈ H we obtain Here we have used that to be the composition We define Let d (h) for h = 1, 2, 3 be a triple of dimension vectors, and set J e := H p ζ e, * φ mon By the standard argument (see [29]) the diagram (1) ,d (2) )+χ(d (1) ,d (3) )+χ(d (2) ,d (3) ) ⊗ J d (1) commutes. It follows that we can describe both the maps Taking N sufficiently large (for each cohomological degree), and composing the appropriate twist of with −1 , we define the isomorphism Similarly, with notation as in (80), applying H c ω * N φ mon and passing to the limit, we obtain the morphism We set to obtain the "absolute cohomological Hall algebra" in the sense of Sect. 1.2. This is precisely the CoHA defined and studied by Kontsevich and Soibelman in [29,Sec.7].

The ambient perverse filtration
For f, d ∈ N Q 0 set Since M ζ f,d is smooth, and π ζ f,d : M ζ f,d → M ζ -ss d is proper, by the decomposition theorem there is an isomorphism This decomposition is not canonical, but the mere existence of such a decomposition implies that the natural map admits a right inverse, where τ ≥ p is the truncation functor with respect to the natural t-structure on the category of monodromic mixed Hodge modules. We deduce that the morphism Γ given by the composition of natural maps Setting . This is a split injection, since it is the dual of a split surjection with right inverse H c ( −1 •ω ζ, * f,d ). We thus arrive at a canonical filtration, indexed by p ∈ Z, which we call the ambient perverse filtration: Warning 5.5 Throughout the paper, we always consider the perverse truncation functors for M ζ d , and never the truncation functors for monodromic mixed Hodge modules on M ζ,S d . As a result, the associated graded of is in general not isomorphic as a graded object to the hypercohomology of the total perverse cohomology ofω ζ,! d π ζ f,d, * φ mon  Remark 5.6 The distinction between different perverse filtrations exemplified by Warning 5.5 is the reason for our being explicit about picking the ambient perverse filtration. Since this is the only type of filtration we consider, we will omit the word ambient from now on. the (split) injection of Corollary 4.11 to the locus of points in S. Therefore ϒ ζ,S,abs W,μ is an injection.

Symmetric monoidal structures, revisited
Let ζ ∈ H Q 0 + be a stability condition, and let μ ∈ (−∞, ∞) be a slope. We assume that ζ is μ-generic. We define X ζ -ss d,N and X ζ -ss d ,d ,N as in (78) and (79) respectively. As throughout the paper, we assume that we are given a Serre subcategory of the category of finite-dimensional CQ-modules, and denote by the inclusions of the reduced loci corresponding to CQ-modules in S. Consider again the algebra from the end of Sect. 5.1  1,1 , . . . , x 1,d 1 , . . . , x n,1 , . . . , x n,d n ] Sym d ⊗ C[y 1,1 , . . . , y 1,d 1 , . . . , y n,1 , . . . , y n,d n ] Sym d with Q 0 = {1, . . . , n}, satisfying some natural compatibility conditions with the multiplication, see [9,Def.5.3]. We next describe the most important of these conditions, which is a localised variant of the condition that the multiplication and comultiplication together endow H A ζ,S W,μ with a bialgebra structure. Let where now the map c is defined to be the map swapping the second and third terms via the symmetric monoidal structure in D ≥,lf (MMHM(Λ ζ μ )), and then applying the multiplication. Here, as before. The relation between the two diagrams is as follows. The objects in diagram (91) are tensor products of terms I • tensored on the left with half Tate twists, which we may commute to the left. Then tensoring the morphisms a, b, c, d on the left by an overall half Tate twist and commuting the required half Tate twists into the tensor product, we obtain the maps a , b , c , d respectively. In order to arrange commutativity of (91), then, we define the sign occurring in the symmetrizing morphism for D ≥,lf (MMHM(Λ ζ μ )) to be given by where sw is the standard symmetrizing morphism. We pick the superscript τ since the bilinear form (15) defines the deviation from the usual sign convention. The χ(d 2 , d 3 ) term is as in the definition of the morphism c. We denote by τ D ≥,lf (MMHM(Λ ζ μ )) the symmetric monoidal category obtained via this modified sign convention. Proposition 6.1 Let (B, * ) be a free supercommutative algebra in the category D(MMHM(Λ ζ μ )), given the above symmetric monoidal structure. Then if we define ψ B by modifying the product as in (17), it is a free supercommutative algebra in D(MMHM(Λ ζ μ )) with its usual symmetric monoidal structure. Explicitly, we define τ sw via the chain of isomorphisms where we have applied the usual symmetrizing natural isomorphism for the tensor product of the objects L −χ(d ,d )/2 ⊗ F d and L −χ(d ,d )/2 ⊗ F d . We define the twisted symmetric monoidal structure on D ≥,lf (MMHM(M ζ -ss μ )) via the same recipe as (92), with + replaced with ⊕ . It then follows as before from [33] that is a symmetric monoidal functor.
The algebras H A ζ,S W and H( ψ A ζ,S W,μ ) differ by the above type of sign twist. In particular, their underlying graded monodromic mixed Hodge structures are the same, and Theorem C implies that there is an isomorphism in D ≥,lf (MMHM(Λ ζ μ )): The next proposition shows that this is a general phenomenon.
Then there is an isomorphism Proof Let F be represented by the complex (G, d) of mixed Hodge modules on M ζ -ss μ × A 1 . Let ψ be as in (17). Let G · · · G n times be the algebra generated by G in the category along with its natural differential. Via the results of [33], as recalled in Sect. 3.2, T n (G, d) carries an action of S n , determined by morphisms for each π ∈ S n and a 1 , . . . , a n ∈ Λ ζ μ G a 1 · · · G a n π # a 1 ,...,an − −−−− → π * G π(a 1 ) · · · G π(a n ) .
Setting π #,τ a 1 ,...,a n := 1≤i< j≤n|π(i)>π( j) (−1) τ(a i ,a j ) π # a 1 ,...,a n we obtain the τ-twisted action. Then the morphisms a n commute with the differential, and intertwine the two S n -actions. Passing to the invariant subcomplexes, and taking the direct image along the iterated monoid morphism we deduce the result.

The perverse associated graded Hopf algebra
Next we describe the localised comultiplication in a little more detail, for further details see [9]. Consider the proper map s d Since the morphism Dim factors through a map to the base M ζ -ss d , we deduce as in Sect. 5.3 that γ preserves the perverse filtration, i.e.
Composing with the isomorphism since Γ is obtained by taking the hypercohomology of a morphism of complexes of monodromic mixed Hodge modules on M ζ -ss μ . The final equality (95) does not preserve the cohomological degree, or the mixed Hodge structure. We define This comultiplication then respects cohomological degree, and lifts to a morphism in the category of cohomologically graded monodromic mixed Hodge structures. For a dimension vector e, we define |e| = i∈Q 0 e i . So, for example, L d ,d is of cohomological degree 2|d ||d |. We extend the perverse filtration to the right hand side of (90) by setting is an inclusion, since the operation ·L d ,d is injective on the domain. By definition (97), f d ,d preserves the perverse filtration. By Lemma 5.8 multiplication by Combining the shifts in perverse degree in (99)  The proof of the following is essentially the original proof of the Atiyah-Bott lemma of [2], adapted to deal with vanishing cycles and passage to the associated graded of the perverse filtration.
where f is the function induced by Tr(W ) d Tr(W ) d on (X ζ -ss Lemma 6.5 Let F, G ∈ MMHM(X ). Then f : F → G is an isomorphism if and only if f x is an isomorphism for every closed point x ∈ X.
Proof One implication is trivial, so we assume that f x is an isomorphism for every x and prove that f is an isomorphism. Since the functor forg mon X : MMHM(X ) → Perv(X ) is faithful, it suffices to prove the lemma with the category MMHM(X ) replaced by Perv(X ). Write C = cone( f ). Assume for a contradiction that C = 0. Let i ∈ Z be the lowest number such that the constructible cohomology sheaf H i con (C) is nonzero, and set Denote by ι x : x → X the inclusion. The functor ι * x is exact for the natural t-structure on the derived category of constructible sheaves, and there is an isomorphism ι * x C ∼ = cone( f x ), so the first term in the exact sequence is zero, as well as the last, by supposition. Then R[i] is a nonzero constructible sheaf satisfying ι * x R[i] = 0 for all x, a contradiction. Proof Again, one direction is trivial, and we may assume that we are working in Perv(X ) throughout, by faithfulness of forg mon X . So assume that f x = 0 for all x. Let {S t } t∈T be the set of all simple perverse sheaves appearing in a direct sum decomposition of F and G. Then there is a commutative diagram where id t : S t → S t is the identity map, and f t : Hom(S t , F) → Hom(S t , G) is obtained from composition with f . Writing for Y ⊂ X a closed irreducible subvariety, and L a local system defined on Y ⊂ Y a regular open subvariety, and picking x ∈ Y , we deduce that ι * x id t = 0, and so f t = 0 for all t.
With these lemmas in hand, we move back to consideration of cohomological Hall algebras. Throughout this section we assume that ζ is μ-generic. By Proposition 4.11 there is a canonical embedding of H(BC * ) vir ⊗ BPS ζ,S W,μ inside Gr P (H(A ζ,S W,μ )).
Since P ζ,S W,μ is generated by primitive elements of the localised Hopf algebra, it follows from Lemma 6.3 that the localised bialgebra structure on P ζ,S W,μ lifts to an honest cocommutative bialgebra structure. Here, cocommutativity is with respect to the symmetrizing morphism τ sw defined in Sect. 6.1. We denote by ζ,S W,μ : P ζ,S W,μ → P ζ,S W,μ + P ζ,S W,μ the induced coproduct. extends to a Hopf algebra.
Proof All that is missing is a compatible antipode, but existence and uniqueness of an antipode is a formal consequence of connectedness of the algebra.
We define H(Γ ζ W,μ ) to be the composition of maps in the following diagram where the upper horizontal arrow comes from the natural inclusion τ Sym n ⊕ (H(BC * ) vir ⊗ BPS ζ W,μ ) ⊂ H(BC * ) vir ⊗ BPS ζ W,μ ⊕ · · · ⊕ H(BC * ) vir ⊗ BPS ζ W,μ n times , the lower horizontal arrow is given by iterated relative CoHA multiplication, and ϒ ζ W,μ is as in (63). The relative version of Theorem C amounts to the following theorem. and M x d ⊂ M ζ -ss d is a discrete set of points containing x. So | x is an isomorphism if and only if | M x d is. By Theorem A and Proposition 6.2, there is an isomorphism of N Q 0 ⊕ Z-graded vector spaces (the extra Z-factor is the cohomological grading) On the other hand, by Proposition 6.7 the subspaces H(BC * ) vir ⊗ BPS ζ,x W,μ ⊂ Gr P H c (M x , IC ζ W,μ ) ∨ are primitive for the induced coproduct, so they form a Lie algebra under the commutator Lie bracket. Letting g be the space of primitives for Gr P H c (M x , IC ζ W,μ ) ∨ , and letting U (g) be the universal enveloping algebra of g,then by the Milnor-Moore theorem, there is an isomorphism is an isomorphism, so that H(Γ ζ,S W,μ ) is at least an injection. The domain and target of this map are graded vector spaces of the same dimension (finite in every graded degree) by Theorem A. It follows that H(Γ ζ,S W,μ ) is an isomorphism. This completes all but the free commutativity statements of Theorem C, which we now deduce as a corollary. Corollary 6.10 The (twisted) relative cohomological Hall algebra H(A ζ,S W,μ ) is a free commutative algebra (for the symmetrizing morphism τ sw), as is the algebra Gr P H(A ζ,S W,μ ) , and so the twisted algebra Gr P H( ψ A ζ,S W,μ ) is a free supercommutative algebra (for the usual symmetrizing morphism sw).
Proof The result regarding the relative cohomological Hall algebra follows from Theorem 6.9 and the claim that H(A ζ W,μ ) is commutative. This claim in turn can be checked at fibres as in the proof of Theorem 6.9, this time using Lemma 6.6, and so it is sufficient to prove commutativity for Gr P H(A ζ,S W,μ ) (as in the same proof). Let P ⊂ K = Gr P H(A ζ,S W,μ ) be the subspace of primitives. Then the algebra generated by P is a cocommutative sub bialgebra of K, and so there is a chain of inclusions τ Sym H(BC * ) vir ⊗ BPS ζ,S W,μ ⊂ τ Sym(P) ⊂ K where the first inclusion is given by Proposition 6.7 and the second by the Milnor-Moore theorem. Since by Theorem A the first and last graded vector spaces have the same graded dimensions, all of the inclusions are equalities, and in particular P = BPS ζ,S W,μ ⊗ H(BC * ) vir , and K is the universal enveloping algebra of P, considered as a Lie sub-algebra of K. On the other hand, the Lie bracket on P is zero, since it respects the perverse grading, and P is concentrated entirely in odd perverse degree. The statement regarding the ψtwisted algebra then follows.
Finally, we are in a position to define the BPS Lie algebra: Corollary 6.11 Let ψ be as in (16). The subspace is closed under the commutator Lie bracket in H( ψ A ζ,S W,μ ), and so carries the structure of a Lie algebra, called the BPS Lie algebra.
The proof is an immediate consequence of Corollary 6.10, as explained in Sect. 1.7. by submodules with the dimensions of successive subquotients given by d. We by the filtration indexed by the Harder-Narasimhan filtration, it follows that the associated graded morphism is an isomorphism between pure complexes of mixed Hodge modules, and hence is an injection, and so an isomorphism, since by Theorem B the domain and image are isomorphic. Since η * μ is a morphism of monoids, the diagram η * μ (τ) Sym ⊕ η μ, * BPS ζ μ ⊗ H(BC * ) vir commutes, with the horizontal maps defined via the relative multiplications on H( (ψ) A μ ) and H( (ψ) A ζ μ ) respectively. We deduce as above that the theorem is true after passing to the associated graded with respect to the Harder-Narasimhan filtration, and so is injective, and hence an isomorphism since the domain and target are isomorphic pure monodromic mixed Hodge modules by Theorems A and B. is an isomorphism.
The meaning of the bracketed superscripts is as in Theorem 6.12.
Proof By Theorem 6.12 and Proposition 5.7, the corollary is true after replacing H(A S W ) with the perverse associated graded Gr P (H(A S W )) = H c (M S , dim ! H( p * IC W )). Then for any lift of the embedding BPS ζ,S W,μ ⊗ H (BC * ) vir ⊂ Gr P (H(A S W )) to an embedding BPS ζ,S W,μ ⊗ H(BC * ) vir ⊂ H(A S W ), the result follows.