Donaldson-Thomas invariants from tropical disks

We prove that the quantum DT invariants associated to quivers with genteel potential can be expressed in terms of certain refined counts of tropical disks. This is based on a quantum version of Bridgeland's description of cluster scattering diagrams in terms of stabilitiy conditions, plus a new version of the description of scattering diagrams in terms of tropical disk counts. We also show via explicit counterexample that Hall algebra broken lines do not result in consistent Hall algebra theta functions, i.e., they violate the extension of a lemma of Carl-Pumperla-Siebert from the classical setting.


Introduction
In [GHKK14], Gross-Hacking-Keel-Kontsevich used scattering diagrams to construct canonical bases for cluster algebras. Several articles [Rei10,GP10,KS,Nag13,Kel11] have developed connections between DT-invariants and various scattering diagrams or cluster transformations. Building off these ideas, Bridgeland [Bri17] constructed Hall algebra scattering diagrams whose classical integrals often recover the cluster scattering diagrams (cf. our Prop. 3.13 for the quantum analog). On the other hand, [GPS10,CPS,FS15,Man] show how to express various scattering diagrams in terms of certain (refined) counts of tropical curves or disks. By extending and combining these ideas, we obtain new expressions for quantum DT invariants in terms of refined counts of tropical disks.
1.1. Quantum DT invariants from tropical ribbons. Let Q be a finite quiver without loops or oriented 2-cycles, with vertex set denoted Q 0 and arrows Q 1 . Let W be a potential on Q (i.e., a finite linear combination of cycles). Let rep(Q, W ) be the category of finite-dimensional representations of (Q, W ), and let M be the moduli stack of objects in rep(Q, W ). Let N = Z Q0 , with {e i } i∈Q0 denoting the natural basis. Let M R := Hom(N, R). For θ ∈ M R , let 1 ss (θ) denote the space of θ-semistable objects in rep(Q, W ) (Def. 3.7). We say θ ∈ M R is general if it is not in the intersection of two distinct hyperplanes of the form n ⊥ for n ∈ N \ {0} (cf. Remark 3.9). Let B denote the skew-symmetric Euler form on N , cf. (2), and define p * : N → M , p * (n) = B(n, ·). We let I t denote the quantum integration map taking varieties over M to elements of a quantum torus algebra C t [N ⊕ ], cf. §2.6 (if W = 0, then I t is the generalized Poincaré polynomial).
Let w be a weight-vector, i.e., a tuple w = (w i ) i∈Q0 , where each w i = (w ij ) j=1,...,li consists of positive integers w i1 ≤ w i2 ≤ . . . ≤ w ili . Let l(w) = i l i . Let Aut(w) be the group of automorphisms of the second indices of the w i 's which act trivially on w. Let R w := ij (−1) w ij −1 wij (q w ij −1) . We say that a tropical disk h : Γ → M R (cf. §4.1) has degree ∆ w if the unbounded edges E ij are labelled by the indices of w, and if the weighted outgoing direction of h(E ij ) equals w ij p * (e i ). Let A w be a collection of affine subspaces {A ij ⊂ M R }, with A ij a generic translate of e ⊥ i . For δ > 0, we say that a tropical disk matches the constraints δA w if h(E ij ) ⊂ δA ij for each i, j.
Given θ ∈ M R , let T w (θ) denote the set of tropical disk types τ such that, for each > 0, there exists for all sufficiently small δ > 0 a tropical disk of degree ∆ w , type τ , matching the constraint δA w , and with endpoint V ∞ mapping into an -neighborhood of θ. Let T w (θ) denote the corresponding space of tropical ribbon types, i.e., tropical disk types plus the additional data of a cyclic ordering of the edges at vertex. Let B denote the form B(p * (n 1 ), p * (n 2 )) = B(n 1 , n 2 ) on p * (N ). For τ ∈ T w (θ), let ν( τ ) denote (−1) to the power of the number of vertices of τ where the ribbon structure does not agree with the orientation induced by B, cf. §4.2.2.
The ribbon structure induces an ordering E i1,j1 , . . . E i l(w) j l(w) on the E ij 's. Given such a tropical ribbon type τ , let Flag( τ ) denote the variety over M whose fiber over an a (stacky) point corresponding to a representation M is the space of composition series 0 = M 0 ⊂ M 1 ⊂ . . . ⊂ M ij wij = M such that the first w i1j1 quotients M i /M i−1 are isomorphic to the simple representation S i1 , then the next w i2j2 quotients M i /M i−1 are isomorphic to the simple representation S i2 , and so on. The following is the quantum integral case of Theorem 4.9.
(1) Genteelness of W is known to at least hold for acyclic quivers with W = 0 [Bri17,Lem. 11.5]. We use this genteelness to say that two a priori different scattering diagrams actually agree. Lang Mou [Mou] and Fan Qin [Qin,Thm. 1.2.2] show that this agreement also applies for quivers with non-degenerate potential which admit a green-to-red sequence, so Theorem 1.1 applies in these cases as well.
The same statement applies with I t replaced by the classical integration map I (i.e., the t → 1 limit, i.e., taking generalized Euler characteristics), and similarly for I t replaced by other projections I i of the Hall algebra defined in §3.2.1. For the classical version though, one should view I(R w Flag( τ )) as living in A cl , a logarithmic version of the Weyl algebra, cf. Example 4.1. These factors I t (R w Flag( τ )) and I(R w Flag( τ )) can be more easily computed as products in the quantum torus algebra or Weyl algebra, respectively, cf. Remark 4.10.
Alternatively, one can replace the sum over tropical ribbons with a sum over tropical disks, and then the tropical ribbon multiplicities ν( τ )I t (R w Flag( τ )) are replaced with Block-Göttsche [BG16] style refined tropical disk multiplicities R w V [Mult(V )] t , and similarly for the classical cases, cf. Remark 4.10 again. Our intention in this paper though is to give a representation-theoretic description of the tropical multiplicities, which is why we state Theorem 1.1 in terms of moduli of flags. See Example 4.11 for a sample computation of a term on the right-hand side of (1).
1.2. Hall algebra broken lines violate the [CPS] lemma. One might hope (as we had hoped) that Theorem 1.1 holds without applying the integration maps, i.e., as an identity in the Hall algebra. Unfortunately, this fails as a result of the fact that elements of the Hall algebra with parallel dimension vectors need not commute (although we see that the result does hold after modding out by the ideal generated by these commutators). In §5, we show that similar issues cause problems for theta functions.
As in [CPS,GHK15,GHS], the construction of theta functions in [GHKK14] is based on enumerating broken lines (an abridged version of tropical disks). This enumeration depends on the designated endpoint of the broken lines, but according to [CPS,§4], different choices of endpoint are related by path-ordered product, essentially meaning that these choices glue to give well-defined global functions on the mirror. [Man,Thm. 2.14] gives a refined version of this [CPS] result, implying that the analogous gluing property holds for quantum theta functions (cf. Lemma 5.2). Refining further, [Che16] defines Hall algebra broken lines, and from these one might hope to define Hall algebra theta functions. Unfortunately, this is not a well-behaved notion: Proposition 1.2 (Prop. 5.4 in the main text). The [CPS] lemma does not hold for Hall algebra broken lines.
Our proof is via the explicit construction of a counterexample for an A 3 -quiver, cf. §5.3.
1.3. Motivation. When B has rank 2, the tropical disk counts of Theorem 1.1 can be replaced with tropical curve counts, cf. [GPS10, Thm. 2.8] and [FS15,Cor. 4.9]. In higher-dimensions this is only the case for certain limits of choices of θ, cf. [Man,Thm 3.7]. The tropical curve versions are nice because in the classical limit they can be related via [NS06] to log Gromov-Witten invariants, cf. [GPS10,Prop. 5.3]. As the authors have learned from Mark Gross, the classical versions of our tropical disk counts should also have an algebraic Gromov-Witten theoretic meaning: according to the announced result [GS18,Thm. 2.14], they should be related to certain punctured Gromov-Witten invariants (one also expects the existence of correspoding holomorphic disk counts defined from the perspective of open Gromov-Witten theory, e.g., as in [Lin] for the case of K3 surfaces). One expects DT/GW correspondence results to follow from [GS18, Thm. 2.14] combined with [Bri17,Lem. 11.4].
On the other hand, the quantum tropical curve counts in rank 2 are Block-Göttsche invariants [BG16], which have been related to higher-genus Gromov-Witten invariants in [Bou19,Bou] and to real curve counts in [Mik17]. Upcoming work of the second author will extend the correspondence of [Mik17] to higher-dimensions, although an extension to tropical disks is still more distant. Still, we hope that Theorem 1.1 will lead to new refined DT/GW correspondence results, and we further hope that this correspondence will be enriched by our interpretation of tropical ribbon multiplicities in terms of moduli of composition series.
A version of Theorem 1.1 for bipartite quivers was previously observed in [FS15,Thm. 5.3]. Their argument was based on the observation that in these cases, (1) is equivalent to a representationtheoretic formula of Manschot-Pioline-Sen [MPS11]. We therefore hope that our result may be related to some generalization of this MPS formula. With this in mind, we strongly suspect that our tropical counts are closely related to the attractor flow trees studied by physicists, cf. [AP] in particular, as well as [KS14].
We note that [LMY], which appeared immediately after this paper was first posted, deals with similar problems on scattering diagrams and tropical disks using a differential-geometric perspective.
1.4. Outline of the paper. In §2.1-2.2, we review Joyce's construction [Joy07] of the Hall algebra associated to a quiver with potential, following [Bri17,[4][5]. Then in §2.3-2.4, we use [Bri12,Lem. 4.4] to describe certain products in the Hall algebra in terms of moduli of composition series. We review the quantum and classical integration maps in §2.5-2.6.
We review the definition of scattering diagrams in §3.1, and in Theorem 3.5 we generalize previously known results about initial scattering diagrams uniquely determining consistent scattering diagrams. We then we review Bridgeland's Hall algebra scattering diagrams (and some variants) in §3.2. If the potential W is genteel, then the Hall algebra scattering diagram is determined by an initial scattering diagram which we describe explicitly in §3.3.
We review the notion of tropical disks in §4.1, and in §4.2 we focus on the tropical ribbons and multiplicities associated to an initial scattering diagram. The description of scattering diagrams in terms of tropical disks (Theorem 4.3) is given in §4.3 and proven in §4.4. This is applied to the Hall algebra scattering diagram in §4.5 to prove our main results, Theorems 4.8 and 4.9.
We turn our attention to theta functions in §5. We review the definitions of broken lines and theta functions in §5.1, explaining how these apply to various flavors of cluster varieties in §5.2. Finally, in §5.3, we work out an explicit counterexample to show that a foundational result of [CPS] (cf. Lemma 5.2) does not extend to the Hall algebra setting (Proposition 5.4).
Acknowledgements. The authors are very grateful to Ben Davison for patiently and repeatedly explaining the definition of the quantum integration map and for checking the corresponding part of our draft. We also thank Tom Bridgeland, Lang Mou, and Tom Sutherland for helpful conversations.
2. The motivic Hall algebra of a quiver with potential 2.1. Preliminaries on quivers with potential and their representations. Let Q be a finite quiver without loops or oriented 2-cycles. Denote the sets of vertices and arrows of Q as (Q 0 , Q 1 ). Let CQ denote the path algebra of Q. Suppose that Q is equipped with a finite potential, i.e., a finite linear combination of cycles, denoted W ∈ CQ. Define a two-sided ideal I W ⊆ CQ on Q by where δ abi is 1 if a = b i and 0 otherwise. Then the Jacobi algebra for (Q, W ) is the quotient algebra CQ/I W . Let rep(Q, W ) := modCQ/I W be the abelian category of finite-dimensional representations of the quiver with potential (Q, W ), i.e., finite-dimensional left CQ/I W -modules.
Let {e i } i∈Q0 be the natural basis indexed by the vertices of Q. Denote N ⊕ := { i a i e i ∈ N |a i ∈ Z ≥0 ∀i}, and N + := N ⊕ \ {0}. There is a group homomorphism dim : K 0 (rep(Q, W )) → N sending a representation to its dimension vector. For vertices i, j ∈ Q 0 , let a ij denote the number of arrows from i to j. Let B denote the integral skew-symmetric bilinear form on N determined by setting We will also use a second Z-valued bilinear form χ on N given by It is well-known (cf. [Bri17,Lem 4.1]) that there is an algebraic moduli stack M parameterizing all objects of the category rep(Q, W ). Briefly, objects of M over a scheme S are isomorphism classes of locally free finite-rank O S -modules E, together with morphisms ρ : where M d is the open and closed substack parametrizing objects of dimension vector d. There is a 2-category of algebraic stacks over M, and we let St /M denote the full subcategory consisting of objects f : X → M for which X is of finite type over Spec C and has affine stabilizers. We similarly write St /C for the analogous category of stacks over Spec C.

2.2.
Construction of the Hall algebra. We now review the motivic Hall algebra developed by Joyce [Joy07], following the presentation of [Bri17,§5].
Let K(St /M) be the free abelian group with basis given by isomorphism classes of objects of St /M modulo the relations given in [Bri17,Def. 5.1]. In particular, one imposes the scissor relations where [f : X → M] is an object of St /M, Y ⊂ X is a closed substack, and U := X \ Y .
One endows the group K(St /M) with a K(St /C)-module structure by setting [X] · [Y → M] = [X × Y → M] and extending linearly. There is a unique ring homomorphism taking the class of a smooth projective variety X over C to its Poincaré polynomial where q := t 2 and H k (X an , C) denotes singular cohomology. For X ∈ K(St /C), we will often denote |X| := Υ(X).
As a C(t)-module, the (motivic) Hall algebra H(Q, W ) is K Υ (St /M). To define the multiplication, the convolution product, on H(Q, W ) and make it into a C(t)-algebra, we consider the stack M (2) of short exact sequences in rep(Q, W ). There is a diagram where a 1 , a 2 , b sends a short exact sequence to A 1 , A 2 , and B respectively. The convolution product is defined to be This product can be expressed as where Z and h are defined by the Cartesian square The following is due to Joyce [Joy07, Thm. 5.2], see also [Bri12,Thm. 4.3].
Theorem 2.1. The product m gives H(Q, W ) the structure of an associative unital algebra over C(t).
We note that the decomposition (4) of M induces an N ⊕ -grading where H(Q, W ) d is the submodule of K Υ (St /M) generated by objects of the form [X → M d ⊂ M].
2.3. k-fold products. We will also need a description of the k-fold product m k : H(Q, W ) ⊗k → H(Q, W ). For this we follow [Bri12, §4.1-4.2]. Let M (k) denote the algebraic moduli stack of kflags. That is, the objects of M (k) over a scheme S are isomorphism classes of k-tuples of objects (E 1 , ρ 1 ), . . . , (E k , ρ k ) of M(S), together with monomorphisms respecting the maps ρ i and such that each factor F i := E i /E i−1 is flat over S. Given another scheme T , an object (E 1 , ρ 1 ), . . . , (E k , ρ k ) over T , and a morphism f : T → S, a morphism in M (k) lying over f is a collection of isomorphisms of sheaves Φ i : f * (E i ) → E i respecting the maps ρ i and the maps in the sequences of monomorphisms as in (8).
For each i = 1, . . . , k, we have a morphism of stacks a i : M (k) → M taking an object as in (8) to its i-th factor F i = E i /E i−1 . We also have another morphism b : M (k) → M taking the object as in (8) to the final term (E k , ρ k ) of the sequence. One easily sees that the stack M (2) , together with these morphisms a 1 , a 2 , b, is equivlaent to the data we had when defining M (2) as the stack of short exact sequences above. We now obtain a diagram generalizing (6): Bri12], Lemma 4.4). The k-fold product m k : H(Q, W ) ⊗k → H(Q, W ) is given by 2.4. H reg and the composition algebra. Next, recalling the notation q = t 2 , let Let H reg (Q, W ) be the C reg (t)-submodule of H(Q, W ) generated by elements of the form such that X is a variety over C (so in particular, X ∈ St /C, and so we can apply Υ to X). For each vertex i ∈ Q 0 , we have an associated simple representation S i ∈ rep(Q, W ) of dimension vector e i . We denote δ i := δ Si and κ i := κ Si . More generally, for each k ∈ Z ≥0 , we will write the semisimple representation S ⊕k i as S ki , and we will write δ ki := δ S ki and κ ki := κ S ki . As in [Joy07,Ex. 5.20], we define the composition algebra C(Q, W ) to be the subalgebra of H reg (Q, W ) generated by the elements κ i for i ∈ Q 0 . By Lemma 2.4, products of the elements κ i are given in terms of spaces of composition series.
Example 2.5. For i ∈ Q 0 , let us apply Lemma 2.4 to κ k i . The only point in M kei is the one corresponding to the semisimple representation S ki . Furthermore, Flag(S i , . . . , S i ; S ki ) (S i occurring k times before the semicolon) contains only one (stacky) point-all maximal flags of S ki are related by automorphisms of S ki . The stabilizer group for this point (i.e., the space of automorphisms of C k which fix a maximal flag) is the unipotent group U k (C). Thus, Using (10) and the fact that we can re-express (12) as Alternatively, this could be realized directly as . . , S i ; S ki )| (S i again appearing k times before the semicolon). (13) will be useful in §3.3.
2.5. The quantum torus algebra. Let C t [N ⊕ ] denote the quantum torus algebra, by which we mean the N ⊕ -graded algebra defined by: (the monomials z n adjoined here are non-commuting). This forms a Poisson algebra under the bracket Note that where for any a ∈ Z, The usual commutative algebra C[N ⊕ ] also forms a Poisson algebra, with bracket defined by {z n1 , z n2 } := B(n 1 , n 2 )z n1+n2 .
Note that there is a surjective homomorphism of Poisson algebras defined by Remark 2.6. Note that C t [N ⊕ ] viewed as a Lie algebra with its Poisson bracket is isomorphic as a Lie algebra to (t − t −1 ) −1 · C t [N ⊕ ] with its commutator bracket via the map We may thus view π t →1 as a Lie algebra homomorphism ( Similarly, as noted in [Bri17,§5.9], H reg (Q, W ) with the bracket from (9) is isomorphic as a Lie algebra to (t − t −1 ) −1 · H reg (Q, W ) with its commutator bracket. In §2.6, we will discuss the "integration map" I = π t →1 • I t as a homomorphism of Poisson algebras H reg (Q, W ) → C[N ⊕ ], but this can also be viewed as a homomorphism of Lie 2.6. The integration map. There are several constructions of (quantum) integration maps in the literature, i.e., homomorphisms (of algebras, Lie algebras, or Poisson algebras) from H(Q, W ) or H reg (Q, W ) to the (quantum) torus algebra. Reineke [Rei03, Lem. 6.1] first constructed the analog of such a quantum integration map for finitary Hall algebras associated to quivers without potential. Joyce [Joy07,§6] then constructed classical and quantum integration maps with domain H reg (Q, 0). The classical version of Joyce's map (of Lie algebras) was generalized to quivers with potential in [JS12, §7] (cf. [Bri17,Thm. 11.1] for an interpretation as a map of Poisson algebras). On the other hand, a very general construction of algebra homomorphisms from a full Hall algebra to the "motivic quantum torus algebra" (which can then be further integrated to the usual quantum torus algebra) has been outlined by Kontsevich and Soibelman [KS,§6]. Making this more precise and more algebraic, in [KS11, §7], Kontsevich and Soibelman defined a (monodromic) mixed Hodge structure (building off Saito's theory of mixed Hodge modules [Sai90]) on the equivariant cohomology of the vanishing cycle complex, and then [DMb] and [Dav18] built on these ideas to rigorously define a quantum integration map I t .
We give a brief sketch of this integration map essentially as in [Dav18, §3.3]. We then use this to compute the integration in the simplest cases. We note that by the definitions of the Poisson structures in (9) and (14), it is clear that I t being a map of algebras implies it is also a map of Poisson algebras, thus also giving maps of Lie algebras as in Remark 2.6. Recall that M is the moduli stack of objects in rep(Q, W ) := mod CQ/I W . Let M • be the moduli stack of objects in rep(Q, 0). Given an arrow a ∈ Q 1 , let t(a), h(a) ∈ Q 0 denote the tail and head of a respectively. For any i ∈ Q 0 and d ∈ N ⊕ , let d i denote the corresponding component of d. Denote Then where the action by GL d is the one induced by the conjugation action of GL di (C) on C di for each i ∈ Q 0 .
Viewing elements of M • d as modules over the path-algebra CQ, we see that multiplication by W gives an endomorphism of M • d . Since the trace is invariant under the action of GL d , we obtain a function the critical locus of which recovers M: Let Y be a smooth complex variety and let f : Y → C be a regular function on Y . The corresponding vanishing cycle functor ϕ f is defined as follows (following [Dav18, Let This sheaf ϕ X Tr(W )/u Q d on X in fact has the structure of a mixed Hodge module on X, and so the cohomology H c (X, ϕ X Tr(W )/u Q d ) has a mixed Hodge structure. This induces a double-grading However, there may be non-trivial monodromy µ on H c (X, ϕ X Tr(W )/u Q d ) as u travels around the origin in C (most properly, we have the structure of a monodromic mixed Hodge module on X, cf. [Dav18,§3] for this viewpoint). This µ is quasi-unipotent, i.e., the eigenvalues are roots of unity.
where χ is defined as in (3).
This construction simplifies quite a bit for [f : In this case, ϕ Tr(W ) = Id, and so H p,k−p c (X, ϕ X Tr(W ) Q d ) becomes H p c (X, Q), i.e., the usual degree p Betti cohomology with compact support of X. If, furthermore, X is a smooth projective variety, the cohomology is pure and concentrated in even degree, and so the summations in (18) become just the Poincaré polynomial. Recalling the definition of Υ from (5), we have thus recovered the following: In particular, if W = 0 (e.g., for Q acyclic), I t equals the quantum integration map of [Joy07,§6].
As a check, one can use (12) to confirm that Composing I t with π t →1 induces the classical integration map: The classical integration maps of [JS12, §7] and [Bri17, Thm. 11.1] are always (even for nonzero W ) given by the t → 1 limit of (19), i.e., by taking Euler characteristics. Note that (20) is sufficient to completely determine the restrictions of I t and I to the composition algebra C(Q, W ) in which all our computations will lie. Since I agrees with the classical integration maps of [JS12, §7] and [Bri17, Thm. 11.1] on the generators κ i , the maps necessarily agree on all of C(Q, W ).
Let g ≥k := n∈kΛ + g n . Note that g ≥k is a Lie subalgebra of g. Let g k denote the nilpotent Lie algebra g/g ≥k , and let g := lim ← − g k . We have corresponding Lie groups G := exp g, G k := exp g k , and For each n ∈ Λ + , we have a Lie subalgebra g n := k∈Z ≥1 g kn ⊂ g. We say that g has Abelian walls if each g n is Abelian. In particular, g has Abelian walls whenever g is skew-symmetric. Let G n := exp(g n ) ⊂ G.
The Abelian walls condition is usually assumed to hold when working with scattering diagrams, but when defining Hall algebra scattering diagrams, one needs a slight generalization as in [Bri17,§2].
where: • g d ∈ g nd for some primitive n d ∈ Λ + . The element −p * (n d ) is called the direction of the wall. We call g d the scattering function associated to the wall. • d is a closed, convex (but not necessarily strictly convex), rational-polyhedral, codimension-one affine cone in Λ ∨ R , parallel to n ⊥ d . We call d the support of the wall. A scattering diagram D over g is a set of walls in Λ ∨ R over g such that for each k > 0, there are only finitely many (d, g d ) ∈ D with g d not projecting to 0 in g k . If (d 1 , g d1 ) and (d 2 , g d2 ) are two walls of D, and if codim Λ ∨ R (d 1 ∩ d 2 ) = 1, then we require that [g d1 , g d2 ] = 0 (note that this is automatic for Abelian walls).
A wall with direction −v is called incoming if it contains v. Otherwise, the wall is called outgoing.
We will sometimes denote a wall (d, g d ) by just d. Denote Supp(D) := d∈D d, and Note that for each k > 0, a scattering diagram D over g induces a finite scattering diagram D k over g k with walls corresponding to the d ∈ D for which the projection of g d to g k is nonzero.
Consider a smooth immersion γ : [0, 1] → Λ ∨ R \ Joints(D) with endpoints not in Supp(D) which is transverse to each wall of D it crosses. Let (d i , g di ), i = 1, . . . , s, denote the walls of D k crossed by γ, and say they are crossed at times 0 < t 1 ≤ . . . ≤ t s < 1, respectively. 1 Define Let Φ k γ,D := Φ ds · · · Φ d1 ∈ G k , and define the path-ordered product: Definition 3.2. Two scattering diagrams D and D are equivalent if Φ γ,D = Φ γ,D for each smooth immersion γ as above. D is consistent if each Φ γ,D depends only on the endpoints of γ.
We say that x ∈ Λ ∨ R is general if it is contained in at most one hyperplane of the form n ⊥ for n ∈ Λ. For D a scattering diagram over g and where the sum is over all walls (d, g d ) ∈ D with d x. One easily sees the following standard fact (cf. (1) Consider a collection of walls {(d, g i ) ∈ g nd ) ∈ D|i ∈ S}, where S is some countable index set, and n d and d are independent of i. Suppose that [g i , g j ] = 0 for each i, j ∈ S. Then replacing this collection of walls with a single wall (d, i∈S g i ) produces an equivalent scattering diagram.
The following theorem is fundamental to the study of scattering diagrams. The 2-dimensional version was first proved in [KS06], and this was generalized to higher dimensions in [GS11,§3] for scattering diagrams over the module of log derivations. The higher-dimensional version for scattering diagrams over skew-symmetric Lie algebras follows from [KS14, Prop. 3.2.6, 3.3.2] (cf. [GHKK14, Thm. 1.21] for a review of this argument from our viewpoint). As pointed out to us by Lang Mou, this result had not previously been proven in the presence of non-Abelian walls.
Theorem 3.5. Let g be a Λ + -graded Lie algebra, and let D in be a finite scattering diagram over g whose walls are of the form (n ⊥ i , g i ) for various primitive n i ∈ N + . Expand g i as w≥1 g i,w ∈ g ni for g i,w ∈ g wni . Assume that for each i, the terms g i,w of g i pairwise commute. Then there is a uniqueup-to-equivalence scattering diagram D such that D is consistent, D ⊃ D in , and D \ D in consists only of outgoing walls.
Note that the assumption that the g i,w 's commute for each i is automatic in the case of Abelian walls. This assumption is used for our existence proof, but not for the uniqueness proof.
Proof. The existence of such a D will actually be proved in §4.4.2, so for now we just assume existence and focus on the uniqueness. The argument here is inspired by that of [GHKK14, Lem. C.7].
Let D, D be two consistent scattering diagrams over g with incoming walls D in as in the statement of the theorem. We shall prove by induction on k that D k and (D ) k are equivalent over g k for each k, and then the equivalence of D and D follows. Note that D 1 and (D ) 1 are both equivalent to the trivial scattering diagram, hence to each other. Now suppose that D k and (D ) k are equivalent over g k . Let D be a scattering diagram over g k+1 such that Since D k and (D ) k are equivalent over d k , we must have g x,D ∈ g ≥k \g ≥k−1 , hence g x,D is central in g k+1 . Hence, (D ) k ∪ D is a well-defined scattering diagram over g k+1 , and by Lemma 3.3 it is equivalent to D k+1 . Our goal now is to show that D is equivalent to the trivial scattering diagram.
Since both D and D were assumed to be consistent, and the scattering functions of D are all central in g k+1 , D must also be consistent (over g k+1 ). Furthermore, this consistency plus centrality of the scattering functions implies that, up to equivalence, the support of every wall of D is an entire affine hyperplane in Λ ∨ R . But then all walls of D (up to equivalence) are incoming, and since the incoming walls of D and D are the same , this implies that D is equivalent to the trivial scattering diagram over g k+1 , as desired.
A scattering diagram playing the role of D in in Theorem 3.5 will be referred to as an initial scattering diagram. The consistent scattering diagram D (up to equivalence) produced by the theorem will be denoted Scat(D in ).
Example 3.6. Consider Λ = Z 2 . Equip Λ with the skew-symmetric form {·, ·} represented by 0 1 −1 0 , and consider the quantum torus algebra C t [Λ] as in §2.5. Take g to be the Lie subalgebra (with respect to Poisson bracket) with basis {z n : n ∈ Λ + }. Let  (1,1) ; t)), cf.  The consistency of this scattering diagram is equivalent to a version of the quantum pentagon identity of [FK94]. The classical limit is essentially the 1 = 2 = 1 case of [GPS10, Ex. 1.6] (with some small changes in sign conventions). We will see in Example 3.10 that this is the scattering diagram obtained when applying the quantum integration map to the Hall algebra scattering diagram associated to the A 2 -quiver.
3.2.1. Setup for Hall algebra scattering diagrams and their variants. We now take Λ = N , Λ ⊕ = N ⊕ , and {·, ·} = B. Recall that H(Q, W ) admits a grading by N ⊕ as in (7). In particular, we can , viewed as a Lie algebra using the commutator bracket as in Remark 2.6.
The Lie algebra g Hall typically is not skew-symmetric and does not have Abelian walls. To get around this issue, let i skew denote the Lie ideal of g Hall generated by the commutators we wish to vanish, i.e., Here, for S a subset of g reg , S denotes the Lie ideal generated by S, i.e., the intersection of all Lie ideals of g Hall which contain S. Then for any Lie ideal i which contains i skew , we define Note that for any Lie algebra ideal i of g Hall , g Hall /i is skew-symmetric if and only if i ⊃ i skew . Since the commutator bracket on the quantum torus algebra makes it into a skew-symmetric Lie algebra, we in particular have The resulting Lie algebra g q := g ker(It) is just the quantum torus algebra (t − t −1 ) −1 · C t [N ⊕ ] with its commutator bracket as in (14). Similarly, ker(I) ⊃ i skew , and g cl := g ker(I) is just C[N ⊕ ] together with its Poisson bracket as in (16). In general, let I i : g Hall → g i denote the projection.
For g equal to g Hall , g i , g q , or g cl , we denote the corresponding Lie group G by G Hall , G i , G q , or G cl , respectively. The notation for the associated completions and scattering diagrams will be similarly obvious except for sometimes using "Hall" instead of "reg." 2 3.2.2. The Hall algebra scattering diagram.
If, furthermore, this inequality is strict, then we say that E is θ-stable.
The scattering diagram defined in the following theorem of Bridgeland is what one calls the Hall algebra scattering diagram. For this wall, we have exp(g d ) = 1 ss (θ) ∈Ĝ Hall .
Remark 3.9. We say θ ∈ M R is general if it is not in the intersection of two distinct hyperplanes of the form n ⊥ for n ∈ N \ {0}. Since the joints of D Hall are codimension 2 subsets of M R and have rational slope, Theorem 3.8 gives the scattering functions of D Hall at all general points θ ∈ M R . Alternatively, we could use a more refined notion of general. Call θ ∈ M R special if at least one of the following holds: • There exists a pair of θ-semistable objects with non-parallel dimension vectors; • Some E ∈ rep(Q, W ) is θ-semistable, but for 0 < 1, E is either not (θ + p * (dim(E)))semistable or not (θ − p * (dim(E)))-semistable.
The former condition accounts for joints where two walls of different slopes intersect, while the latter accounts for intersections of walls with the same slope. That is, θ ∈ Joints(D Hall ) if and only if θ is special. Theorem 1.1 will still hold and will be slightly stronger if we define general to mean not special.
Note that we obtain new scattering diagrams D i , D q , and D cl over g i , g q , and g cl , respectively, by applying I i , I q , or I cl to D Hall . The scattering diagram D cl is what Bridgeland calls the stability scattering diagram. We call D q the quantum stability scattering diagram.
Example 3.10. Let us consider the A 2 quiver 1 ← 2 with W = 0. The corresponding matrix B is 0 1 −1 0 as in Example 3.6. Let us explicitly describe the Hall algebra scattering diagram D Hall from Theorem 3.8 in this case. Note that there are 3 indecomposable representations of A 2 up to isomorphism: C ← 0, 0 ← C, and C ← C (the last map being nonzero). Consider d = (1, 0) ⊥ . For any point θ ∈ d, one can see that the representations (C ← 0) ⊕k are θ-semistable for any positive integer k, and we find 1 ss (θ) = k≥0 (C ← 0) ⊕k . We similarly compute that for θ ∈ (0, 1) ⊥ , 1 ss (θ) = k≥0 (0 ← C) ⊕k , and for θ ∈ R ≥0 (1, −1), we have 1 ss (θ) = k≥0 (C ← C) ⊕k . Note that (C ← C) contains (C ← 0) as a subrepresentation, and so (C ← C) ⊕k is not (−α, α)-semistable for α ∈ R >0 . There are no other θ-semistable representations for any θ in this example, so the Hall algebra scattering diagram is as in Figure 3.2. Note that D q , obtained from applying the quantum integration map I to the scattering functions of D Hall (cf. §3.3 for such computations) yields the consistent scattering diagram of Example 3.6.  Scat to other cases as well, e.g., to quivers with non-degenerate potential which admit a green-to-red sequence, and upcoming work of Lang Mou [Mou] will prove the equivalence of D q and D q Scat in these cases.
3.3. The initial Hall algebra scattering diagrams. We next wish to better understand the scattering functions of (24). For each i ∈ S, we will find a nice expression for log 1 ss (p * (e i )) in terms of powers of κ i . We will need the quantum dilogarithm , and the standard fact that log Ψ t (x) = − Li(−x; t), where .
By (13), we can rewrite f i as 3 Hence, using that log Ψ t (x) = − Li(−x; t), we find We denote so log f i can be written as It follows immediately from (26), (20), and Theorem 3.5 that applying I t to D Hall Scat produces the quantum cluster scattering diagrams of [Man, §4.2]: Proposition 3.13. Applying I t to D Hall Scat produces the scattering diagram D q Scat := Scat(D q in ) over the quantum torus algebra, where Applying π t →1 , it follows that I applied to D Hall Scat yields Scat(D cl in ), where Here, Li(x) := ∞ k=1 x k k 2 is the classical dilogarithm. This is precisely [Bri17, Lem. 11.4].

Scattering diagrams in terms of tropical disks
4.1. Tropical disks. We now introduce the tropical disks whose enumerations will be related to the scattering diagrams of §3. For now, our tropical disks will live in L R := L ⊗ R for an arbitrary finite-rank lattice L (later we will take L = Λ ∨ = M ). Let Γ be the topological realization of a finite connected tree without bivalent vertices, and let Γ denote the complement of all but one of its 1-valent vertices. Denote this remaining 1-valent vertex by V ∞ , and denote the edge containing this vertex by E ∞ . Let Γ [0] , Γ [1] , and Γ  ∞ for some index set S with #S = e ∞ . For s ∈ S, we denote E s := (s).
A parametrized tropical disk (Γ, w, , h) in L R is data Γ, w, and as above, plus a proper continuous map h : Γ → L R such that: • For each E ∈ Γ [1] , h| E is an embedding into an affine line with rational slope; • For any vertex V and edge E V , denote by u (V,E) the primitive integral vector emanating from h(V ) into h(E). For each V ∈ Γ [0] \ {V ∞ }, the following balancing condition is satisfied: For unbounded edges E s V , we may denote u (V,Es) simply as u Es or u s . An isomorphism of parameterized tropical disks (Γ, h) and (Γ , h ) is a homeomorphism Φ : Γ → Γ respecting the weights and markings such that h = h • Φ. A tropical disk is then defined to be an isomorphism class of parameterized tropical disks. We will let (Γ, h) denote the isomorphism class it represents, and we will often further abbreviate this as simply Γ or h.
A tropical ribbon Γ is a tropical disk (Γ, w, , h) as above, together with the additional data of a cyclic ordering of the edges at each vertex. A tropical disk or ribbon is called trivalent if every vertex other than V ∞ is trivalent.
The degree ∆ of a tropical disk (Γ, w, , h) is the map ∆ : S → L given by Let Flags(Γ) denote the set of flags (V, E), V ∈ E, of Γ. The type of a tropical disk is the data of Γ, w, and , along with the data of the map u : Flags(Γ) → L, (V, E) → u (V,E) . Note that the type of a tropical disk determines its degree. Similarly, the type of a tropical ribbon is the data of the type of the associated tropical disk, plus the data of the ribbon structure, i.e., the data of the cyclic orderings at each vertex.
Let A := (A s ) s∈S be a tuple of affine-linear subspaces A s ⊂ L R , each with rational slope. We say a tropical disk (Γ, w, , h) matches the constraint A if h(E s ) ⊂ A s for each s ∈ S.

4.2.
Tropical degrees, constraints, and multiplicities associated to a scattering diagram. We now combine the setup of §4.1 with that of §3.1. Let L = Λ ∨ . Let {e i } i∈I be a finite collection of vectors in Λ + , indexed by a set I. Suppose we have an initial scattering diagram D in over g, with D in having the form where for each i, we have d i = e ⊥ i and where g i,w ∈ g wei . Assume as in Theorem 3.5 that for each i, the terms g i,w pairwise commute. We denote Associated to w, we consider the degree ∆ w : S w → L given by and For the associated constraints we take the affine-linear space A ij to be a generic translate of e ⊥ i . Here, the translates for different pairs (i, j) are generic relative to each other. We fix such a choice of A w for each w. Given δ > 0, let δA w denote the constraints obtained from A w by multiplying each A ij by δ (i.e., the distance from the origin is multiplied by δ).

Multiplicities.
For each (i, j) ∈ S w , we denote g ij := g i,wij ∈ g wij ei . Now consider a trivalent tropical disk Γ of degree ∆ w . We will denote E (i,j) simply as E ij . We view Γ as flowing towards the univalent vertex V ∞ , and we use this flow to inductively associate an element g E ∈ g n E ⊂ g to each edge E of Γ, where n E is an element of Λ + such that p * (n E ) ∈ L is the weighted tangent vector to h(E) pointing in the direction opposite the flow.
To each of the source edges E ij , we associate the element g ij from (33) above. Now consider a vertex V = V ∞ with E 1 , E 2 flowing into V and E 3 flowing out of V , and suppose that for i = 1, 2, we already have associated elements g Ei ∈ g n E i . By the balancing condition, we have n E3 = n E1 + n E2 . Let us assume that the labelling of the edges E 1 , E 2 is such that {n E1 , n E2 } ≥ 0 (34) (otherwise we re-label). We then define We now define the multiplicity of Γ as Mult(Γ) := g E∞ ∈ g nw . Now suppose that g is a Lie subalgebra of the commutator algebra of a Λ + -graded associative algebra A, i.e., we have an associative product such that [g 1 , g 2 ] = g 1 g 2 − g 2 g 1 .
Example 4.1. For g = g Hall , Remark 2.6 says that we can take Similarly, we can take Moreover, for any i such that i skew ⊆ i ⊆ ker(I t ), since (t − t −1 ) / ∈ i, we can take However, t − t −1 = 0 in g cl , so we cannot apply this localization in the classical setting. Instead, we take A cl to be the universal enveloping algebra of g cl . Alternatively, the Poisson algebra C[N ⊕ ] can be identified with a subalgebra of the module of log Here, z n ⊗ m, typically denoted z n ∂ m , is viewed as acting on C[N ] via z n → n, m Z n+n ∂ m . The commutator of these derivations makes Θ(N ⊕ ) into a Lie algebra with bracket given by Let h be the Lie subalgebra spanned by elements of the form z n ∂ m for n, m = 0. Then C[N ⊕ ] embeds into h via z n → z n ∂ B(n,·) . Hence, instead of taking A cl to be the universal enveloping algebra of C[N ⊕ ], it is reasonable to take it to be the universal enveloping algebra of h or Θ(N ⊕ ). The latter is simply a log version of the Weyl algebra in rank(N ) variables. That is, we may view A cl as an algebra of logarithmic differential forms.
We note that the usual classical multiplicities of tropical curves (as in correspondence theorems like those of [NS06]) can similarly be computed via iterated Lie brackets of polyvector fields, cf. [MR]. Also, the quantum ribbon multiplicities computed using A q are related to certain counts of real curves, cf. [Mik17].
For example, we can always take A to be the universal enveloping algebra of g. Alternatively, for g Hall or g q , we can produce such an A using Remark 2.6.
Suppose that Γ is equipped with a ribbon structure Γ. At each vertex V = V ∞ , let E 1 , E 2 be the vertices flowing into V and E 3 the vertex flowing out of V , and assume the cyclic ordering of the labelling E 1 , E 2 , E 3 agrees with the ribbon structure of Γ at V (otherwise we re-label). We say that the vertex V ∈ Γ [0] is positive if the edges E 1 , E 2 , labelled in this way with respect to the ribbon structure, satisfy the condition (34). Otherwise, we say V is negative.
We now describe a method of inductively associating an element of g n E ⊂ A to each edge E of Γ, this time denoting the elements by g 7 E . The vectors n E will be the same as before, but the elements g 7 E will be different and will depend on the ribbon structure. As before, we take g 7 Eij := g ij for the source edges. But now, for E 1 , E 2 the edges flowing into a vertex V , E 3 the edge flowing out of V , and the labelling agreeing with the ribbon structure at V , we define where and g 7 E1 g 7 E2 is the associative product in A. Finally, we define The ribbon structure induces an ordering of the unbounded edges of Γ, starting with E out and then continuing with E i1j1 , . . . , E i l(w) j l(w) . Using the associativity of A, we can rewrite (35) as One easily sees the following: Lemma 4.2. For each Γ as above, where the sum is over all possible tropical ribbons Γ with underlying tropical curve Γ.
Note that Mult(Γ) and Mult 7 ( Γ) are completely determined by the type τ of Γ or Γ, respectively. We thus define the multiplicity of a tropical disk or ribbon type τ as the multiplicity of any of the tropical disks/ribbons of type τ .

4.3.
Tropical ribbon counts and the consistent scattering diagram. We continue with the setup of §4.2. For each weight vector w, each δ > 0, and each θ ∈ L R , let T w,δ (θ) denote the set of types of tropical disks of degree ∆ w which match the constraint δA w and for which h(V ∞ ) = θ. For each > 0 and θ ∈ L R , let B (θ) denote the open radius ball centered at θ (with respect to the Euclidean metric associated to any fixed choice of basis for L). Let T w (θ) denote the set of types of tropical disks which, for each > 0, are in T w,δ (θ) for some θ ∈ B (θ) and all sufficiently small δ > 0. 4 Genericness of A ensures that all such tropical disks are trivalent, so we can define their multiplicities as in §4.2.2. Define Let T 7 w (θ) denote the set of tropical ribbons types τ such that the associated tropical disk type τ is in T w (θ). By Lemma 4.2, we can express N (θ) as Mult 7 ( τ ).
Note that for each n ∈ Λ + , the strict convexity of Λ + ensures that there are only finitely many w such that n = n w . Furthermore, for each w, there are clearly only finitely many types of tropical disks of degree ∆ w . The well-definedness of N (θ) follows, assuming that we have already fixed A w . The fact that the generic choice of A w does not matter is part of the following theorem. Up to equivalence, we may assume that D has at most one wall (d, g d ) ∈ D with θ ∈ d. If there is no such wall, then N (θ) = 0, and otherwise, Definition 4.4. For any scattering diagram D over a Lie algebra g with Abelian walls, the asymptotic scattering diagram D as of D is defined by replacing every wall (n + d, g d ) ∈ D with the wall (d, g d ).
Here, d denotes a rational polyhedral cone (with apex at the origin) and n ∈ N R translates this cone. Now let T denote the commutative polynomial ring Z[t i |i ∈ I], and let T k := T / t k+1 i |i ∈ I . Let D in,T k and D in,T be the initial scattering diagrams over g ⊗ T k and g ⊗ T , respectively, given by replacing each g di = j≥1 g ij from D in with g di := j≥1 t j i g ij . We will show that Theorem 4.3 holds for D T k := Scat(D in,T k ) for all k, hence for D T := Scat(D in,T ). Taking t i = 1 for each i then recovers the theorem for D = Scat(D in ).
We have an inclusion of commutative rings Using this inclusion to work in g ⊗ T k , we have where the second sum is over all subsets J ⊂ {1, . . . , k} of size w, and i and g i = w≥1 g i,w as in (30). For now we do not assume that g has Abelian walls, but recall that we require [g i,w1 , g i,w2 ] = 0 for each i ∈ I and each w 1 , w 2 ∈ Z ≥1 . Applying the equivalence from Example 3.4(1) in reverse and then perturbing the walls (i.e., translating the walls by some generic amount), we obtain a scattering diagram where d iJ is some generic translation of d i = e ⊥ i . Note that Scat(D 0 k ) as = D in,T k .
It will be useful for us to refine this setup a bit, working over a different commutative ring T k defined by Note that we have a surjective homomorphisms Let D 0 k denote the initial scattering diagram over g ⊗ T k defined as in (38), but with the factors u iJ replaced by u iJ , i.e.,  Note that π takes the scattering functions of D 0 k to those of D 0 k , and so the same will be true for the corresponding consistent scattering diagrams and their asymptotic versions. We will write our walls in the form (d, g d u Jd ), where g d ∈ g nd for some n d ∈ N + , J d is a collection of pairwise-disjoint subsets of I × {1, . . . , k} of the form (i, J) for various i ∈ I and J ⊂ {1, . . . , k}, and We now inductively produce a scattering diagram D ∞ k = Scat(D 0 k ) from D 0 k as follows: whenever two walls (d 1 , g d1 u Jd 1 ) and (d 2 , g d2 u Jd 2 ) intersect and satisfy u Jd 1 u Jd 2 = 0, we add a new wall d(d 1 , d 2 ) defined by This indeed terminates in finitely many steps and produces a consistent scattering diagram D ∞ k , cf.

4.4.2.
Proof of the existence from Theorem 3.5. If g has Abelian walls, then the scattering diagram D = Scat(D in ) as in Theorem 3.5 can be constructed as follows: for each k, we take D T k = (D ∞ k ) as , and we then take D k to be the scattering diagram over g k obtained by setting each t i equal to 1. Taking k → ∞ then yields D.
The exact same argument holds without Abelian walls, except that we must use the following generalized definition of the asymptotic scattering diagram: Let D be an arbitrary finite scattering diagram. Using Example 3.4(2), refine the supports of the walls of D so that if (n + d 1 , g d1 ) and (n + d 2 , g d2 ) are two walls with codim Λ ∨ R (d 1 ∩ d 2 ) = 1, then d 1 = d 2 . For d a cone with apex at the origin which is obtained as the translation of the support of some wall of D, let S d be the set of walls of (the refinement of) D whose supports are translates of d. Let where the order of the product is as follows: Let n d be the primitive element of N + such that g i ∈ g nd for each (d i , g i ) ∈ S d . Let γ be a smooth path which crosses each wall of S d and which satisfies n di , −γ (t) > 0 for all t. Then the product in (43) is ordered from right to left in agreement with the order in which γ crosses the walls of S d . Now, D as : where the union is over all cones d with apex at the origin which are translations of supports of walls of D, and g d is defined as in (43). By design, if γ is a generic smooth closed path, then the path-ordered product Φ γ,Das is equal to the path-ordered product Φ Cγ,D for C 1 a constant re-scaling γ. Thus, consistency of D as follows from that of D, as desired. with #J ij = w ij . Note that each J ∈ J w corresponds to a set of walls and two choices of J correspond to the same D 0 k,J exactly if they are related by an element of Aut(w). Given J, let w J denote the corresponding weight vector w for which J ∈ J w .
Let D ∞ k,J denote the set of walls in D ∞ k whose leaves are precisely the walls of D 0 k,J . Note that, for J ∈ J w and (d, g d u J ) ∈ D ∞ k,J , we must have g d ∈ g nw . We will write T w,δ (θ, A J ) to indicate T w,δ (θ) as in §4.3 with the the representatives of the incidence conditions A w chosen so that A ij = d iJij .
Lemma 4.7. For every wall (d, g d u J ) ∈ D ∞ k,J and every θ in the interior of d, there exists a unique tropical disk h : Γ → L R in T w J ,1 (θ, A J ) with h(V out ) = θ. Furthermore, we have Proof. We construct the tropical disk by starting at h(V ∞ ) = θ ∈ d and following d in the direction p * (n d ) until we reach a point p ∈ d 1 ∩ d 2 , where {d 1 , d 2 } = Parents(d). The resulting segment is given weight |n d | (the index of n d , i.e., n d equals |n d | > 0 times a primitive vector). From p, extend the tropical curve in the directions n d1 and n d2 with weights |n d1 | and |n d2 |, respectively, until reaching the boundaries of the walls d 1 and d 2 . The balancing condition at p follows easily from (42) and the fact that commutators in g respect the N + -grading. The process is repeated for each of these branches, and continues until every branch extends to infinity in some leaf. This gives the desired tropical disk. The formula for g d follows easily from (42) and the definition of g Γ , noting that the w ij ! factor appears because of the fact that g iw is multiplied by w! in the definition of D 0 k in (40), and similarly for the u J factor. We will use the following formula, cf. [Man,(45)]: For a scattering diagram D and δ ∈ R >0 , let δD denote the scattering diagram obtained by multiplying the supports of the walls of D by δ (i.e., multiplying their distances from the origin by 0). Now fix a point θ ∈ L R \ Joints(D T k ). Recall that D T k = ( π(D ∞ k )) as . Hence, if θ / ∈ supp(D T k ), then for sufficiently small δ > 0, no walls of δD ∞ k = Scat(δD 0 k ) will intersect a small -neighborhood of θ. So then by Lemma 4.7, no tropical disks representing a type in any T w J ,1 (θ, A J ) will intersect such an -neighborhood either, and so we obtain N (θ) = 0. Now suppose θ ∈ supp(D k ), and for convenience, use Example 3.4(1) to combine all walls containing θ into a single wall d. Then since D T k = ( π(D ∞ k )) as , we know that g d = π(g J u J ), where the sum is over all walls (d J , g J u J ) ∈ D ∞ k such that for any > 0, there exists a δ > 0 for which δd J intersects B (θ). By Lemma 4.7, this is the same as where here we write T w (θ, A J ) to indicate T w (θ) for our particular choice of A w as A J (since a priori T w (θ) might depend on this choice). Here we use our observation that two choices of J correspond to the same D 0 k,J , hence the same D ∞ k,J , if and only if they are related by an element of Aut(w). Now, note that for each w, (D 0 k ) as is symmetric with respect to permuting the elements of J w , i.e., for J 1 , J 2 ∈ J w , swapping the supports of d iJ1 and d iJ2 in (40) does not affect (D 0 k ) as . Hence, τ ∈Tw(θ,A J ) Mult(τ ) is independent of J ∈ J w , and so we obtain Finally, applying (45) yields the desired result.
4.5. The Main Theorem. We cannot apply Theorem 4.3 directly to D Hall Scat because g Hall is not skew-symmetric. However, the theorem does apply to any of our D i Scat := I i (D Hall Scat ) for i ⊇ i skew as in §3.2. Here, we take the associative algebra A i to be as in Remark 4.1, with A i meaning A cl as Remark 4.1 in the case where i = ker(I).
Given a weight vector w, define where we recall from (27) that R k := (−1) k−1 k(q k −1) . Now, let us fix a quiver with potential (Q, W ) and consider the corresponding D Hall Scat . Consider a weight vector w and a choice of τ ∈ T 7 w (θ). Recall that the ribbon structure induces an ordering of the unbounded edges of τ , starting with E out and then continuing with E i1j1 , . . . , E i l(w) j l(w) . Using (36) and (28), we have . By Lemma 2.4, we have where we write w i k j k S i k to indicate that the entry S i k appears w i k j k times, and we neglect writing the data of the map to M nw ⊂ M. Finally, applying Theorem 4.3 to the image under I i , we obtain: Scat for i ⊃ i skew , and consider θ ∈ L R \ Joints(D). Up to equivalence, we may assume that D has at most one wall (d, g d ) ∈ D with θ ∈ d. If there is no such wall, then N (θ) = 0, and otherwise, Combining Theorem 4.8 with Theorem 3.8 and Proposition 3.12, we immediately obtain the following: Theorem 4.9 (Main result). Let (Q, W ) be a quiver with genteel potential. Let θ ∈ M R be general. Then for any i ⊃ i skew , we have Theorem 1.1 is the special case where i = ker(I t ). The classical limit is the case where i = ker(I).
Remark 4.10. While we find the expression of Mult 7 ( τ ) in terms of moduli of flags to be interesting, it is of course not generally simple to compute Flag( τ ). However, it is not difficult to describe the quantum and classical integrals of the terms R w Flag( τ ).
First, for the quantum cases, recall from (46) that Flag( τ ) arose as a product κ . From (2.9), I t (κ ij ) = tz ei j ∈ C t [N ⊕ ]. Hence, defining R k := (−1) k−1 k(t k −t −k ) and R w := i,j R wij , we have Now for the classical version, recall that the map π t →1 : g q → g cl takes z n t−t −1 to z n . Let us embed g cl into the Weyl algebra A cl as in Example 4.1, so z n becomes z n ∂ B(n,·) . Let R cl k := (−1) k k 2 and R cl w := i,j R cl wij . We then obtain I(R w Flag( τ )) = R cl w · z wi 1 j 1 ei 1 ∂ B(wi 1 j 1 ei 1 ,·) · · · z wi l(w) j l(w) ei l(w) ∂ B(wi l(w) j l(w) ei l(w) ,·) ∈ A cl .
We wrote Theorems 4.8 and 4.9 in terms of tropical disk counts because we do not know a nice moduli-theoretic description of the tropical curve multiplicities. However, there are again nice interpretations for the quantum and classical integrals. Consider a tropical curve type τ ∈ T w (θ). For each vertex V of τ \ {V ∞ }, let u 1 and u 2 be any two of the weighted tangent vectors of edges emanating from V . Define Mult(V ) := |B(u 1 , u 2 )|. Then the classical multiplicity Mult(τ ) is given by and the quantum multiplicity Mult q (τ ), by which we mean Mult(τ ) in the quantum cases, is given by where [Mult(V )] t is defined as in (15). Since there are 3 vertices, there are 2 3 possible ribbon structures on this tropical disk. One such ribbon structure τ is illustrated in Figure 4.6, namely, the ribbon structure for which ν(V ) = −1 for each V .
Alternatively, this may be computed using (48).

Broken lines and theta functions
5.1. Definitions of broken lines and theta functions. Recall the notation and setup of §3.1. Fix a scattering diagram D. Suppose we have a commutative ring R and a Λ-graded R-algebra A = λ∈Λ A λ with A 0 = R on which g acts via Λ-graded R-algebra derivations. We say that this action is skew-symmetric if g n ·A λ = 0 whenever {n, λ} = 0. Let A denote the (Λ + )-adic completion of A. Note that G acts on A via Λ-graded R-algebra automorphisms. (ii) For i = 0 . . . , , γ (t) = −p * (λ i ) for all t ∈ (t i−1 , t i ). (iii) a 0 = z λ . (iv) For i = 0, . . . , − 1, γ(t i ) ∈ Supp(D). Let I.e., g i is the → 0 limit of the wall-crossing automorphism Φ γ| (t i − ,t i + ) defined in (23) (using a smoothing of γ). Then a i+1 is a homogeneous term of g i · a i , other than a i .
The theta function ϑ λ,Q ∈ A is defined by where the sum is over all broken lines γ with ends (λ, Q), and a γ denotes the element of A associated to the last straight segment of γ.
If g is skew-symmetric and the action on A is skew-symmetric, then [Man, Thm. 2.14] (a refinement of [CPS, Lemmas 4.7, 4.7]) states the following: Lemma 5.2 (The [CPS] Lemma). Suppose g is skew-symmetric with skew-symmetric action on A, and suppose D = Scat(D in ) as in Theorem 3.5. Let γ be a smooth path in Λ ∨ R \ Joints(D) from Q 1 to Q 2 , with Q 1 , Q 2 / ∈ Supp(D). Then for any λ ∈ Λ, In any case, we have a copy A Q of A and a collection of elements {ϑ λ,Q |λ ∈ Λ} ⊂ A Q associated to every Q ∈ Λ ∨ R \ Supp(D). If D is consistent, then the identifications of the A Q 's with A are all compatible with the path-ordered products. Furthermore, if Lemma 5.2 holds, it says that the elements ϑ λ,Q ∈ A Q are also compatible with the path-ordered products, thus giving a canonical collection of elements ϑ λ ∈ A. We may therefore simply denote ϑ λ,Q as ϑ λ . 5.2. Hall algebra, quantum, and classical broken lines. Take Λ = N prin := N ⊕ M , and take Λ ⊕ := (N ⊕ , 0). Denote M prin := (N prin ) ∨ = M ⊕ N . Take {·, ·} to be the Z-valued skew-symmetric form B prin on N prin defined via (51) B prin ((n 1 , m 1 ), (n 2 , m 2 )) = B(n 1 , n 2 ) + n 1 , m 2 − n 2 , m 1 .
One can show that B prin is unimodular, so the map p * ,prin is an isomorphism. Now for our Λ-graded algebras, we take the following: The algebra structure on A Hall,prin is determined by specifying that for a d ∈ H reg (Q, W ) d and m ∈ M , we have Similarly, for A q,prin we specify that Equivalently, A q,prin is the quantum torus algebra C t [Λ] with respect to the form B prin . Finally, A cl,prin is just given the usual algebra structure, making it into C[Λ].
For the action of g Hall on A Hall,prin we take the right-hand adjoint action, i.e., g · a := [a, g] = ag − ga, using the natural inclusion of g Hall into (t − t −1 ) −1 · A Hall,prin to make sense of the multiplication. Similarly for the action of g q on A q,prin . The action of g cl is the right-adjoint action with respect to the Poisson bracket, i.e., One sees that the maps I t , I, and π t →1 extend to homomorphisms between these algebras which commute with the corresponding Lie algebra actions. We note that we could also define A i,prin for any other i ⊇ i skew by applying I i to A Hall,prin . The induced g i -actions on A i,prin are skew-symmetric, thus yielding new examples of algebras for which Lemma 5.2 holds.
Let 2 represent Hall, i, q, or cl. We can consider scattering diagrams in M prin R over g 2 . We take D 2,prin Scat := Scat(D 2,prin in ), where D 2,prin in is defined as in (24), but with (e i , 0) ⊥ in place of e ⊥ i , and with log 1 ss (p * (e i )) replaced with its image under I i , I t or I if 2 represents i, q or cl, respectively. Note that the intersection of D 2 with (M R , 0) ⊂ M prin R agrees with what we previously called Scat(D 2 in ).
Remark 5.3. Note that all scattering walls have supports of the form (n, 0) ⊥ for n ∈ N , so they are invariant under translation by (0, N R ). It follows that ϑ λ,Q is invariant under translation of Q by elements of (0, N R ), and when enumerating broken lines, it suffices to consider their projections modulo (0, N R ).
Note that g 2 and the action on A 2,prin are skew-symmetric if 2 = i, q or cl, but typically not for 2 = Hall. With this setup and for 2 = Hall, the broken lines with ends (λ, Q) with Q ∈ (M ⊕ N ) R and λ ∈ Λ are precisely the Hall algebra broken lines discussed in [Che16]. These will be examined in §5.3.
We now briefly explain how the above theta functions for 2 = cl relate to those of [GHKK14]. In the usual cluster algebras language, z m for m ∈ M gives the A cluster variables, while z n for n ∈ N gives the X cluster variables. 6 In the principle coefficients setting, we have z (m,n) = i A mi i X ni i , where m = i m i e * i and n = i n i e i . The theta functions on A prin , A, and X are obtained as follows: • Allowing any λ ∈ Λ, the resulting theta functions ϑ prin λ := ϑ λ are the theta functions which [GHKK14] constructs on the cluster variety with principal coefficients A prin (or rather, on some formal version of this in general). The theta functions ϑ prin λ for λ ∈ (N ⊕ ) ∨ (i.e., the positive span of the vectors e * i ) are the ones examined by Bridgeland [Bri17, Thm. 1.4]. • One obtains the theta function ϑ A λ on the cluster A-variety via the projection (n, m) → m of ϑ prin λ (i.e. setting all the X-variables in ϑ λ equal to 1), assuming that this projection is well-defined, i.e., that it converges. The middle cluster algebra of [GHKK14] is defined to be the span of all the ϑ A λ for which the convergence holds. The corresponding elements λ form a cone Ξ ⊂ M which contains the Fock-Goncharov [FG09] cluster complex C. The ϑ A λ for λ ∈ C give the cluster monomials.
The theta functions for 2 = q are among those considered in [Man] and are expected to give bases for the quantum cluster varieties (or formal versions thereof). These will be further explored in upcoming work of the second author with Ben Davison.

5.3.
Hall algebra theta functions and the CPS lemma. As noted in §5.2, g Hall and its action on A Hall,prin typically fail to be skew-symmetric, and so [Man]'s proof of Lemma 5.2 does not apply to Hall algebra broken lines. In fact, we provide here a counterexample, thus showing that: Proposition 5.4. The analog of Lemma 5.2 does not generally hold for theta functions constructed from Hall algebra broken lines.
We note though that Hall algebra broken lines are still useful for understanding theta functions. For example, by studying Hall algebra broken lines and then integrating, we can understand the quantum or classical broken lines in terms of quiver Grassmannians, cf. [Che16].
Recall from Remark 5.3 that we may compute theta functions using the images of broken lines under the projection M prin R = M R ⊕ N R → M R . We will work in this projection throughout this subsection. Furthermore, the theta function we will consider will be of the form ϑ (0,m),Q with m ∈ π * (N ). Suppose a i ∈ A λi is the homogeneous element element attached to some straight segment of a broken line contributing to ϑ (0,m),Q . Then λ i has the form (n i , m) for n i ∈ N . Using (52), we see that the projection of p * ,prin (λ i ) modulo (0, N ) is π * (n i ) − m ∈ π * (N ). Hence, by Definition 5.1(ii) (modulo (0, N )), we have γ (t) = m − π * (n i ) ∈ π * (N ) (54) for all t in the corresponding straight segment of γ. We thus obtain the following: Lemma 5.5. For m ∈ π * (N ), all broken lines contributing to ϑ (0,m),Q are contained in Q + π * (N R ).
For our counterexample, we use the A 3 -quiver 1 ← 2 → 3. In the corresponding (standard) basis e 1 , e 2 , e 3 for N , the matrix for B is In general, the map π * : N → M takes e i to the i-th row of B. In particular, we see that ker(π * ) is in this case generated by e 1 − e 3 , and Image(π * ) = (e 1 − e 3 ) ⊥ , or the span of the first two rows of B (viewed as vectors in the dual basis).
By inspection, these are the only broken lines contributing to ϑ m,Q1 or ϑ m,Q2 whose attached element of A is in the A m+e1+e2+e3 (the subscript denoting the degree in the N prin -grading). So for our counterexample, it suffices to check that these two attached elements are different from one another.
Recall from §5.2 that when a broken line with attached element a crosses a wall with attached element g ∈ g Hall , the result of the action of g on a is exp[a, g]. In particular, if g = k≥1 g k with g k ∈ g Hall kn for some n ∈ N + , then the action yields [a, g] + (higher order terms). Note that for each of the two broken lines in Figure 5.7, it is only the first-order terms of the scattering functions that contribute. Also note that all the signs in the exponents as in (50)  After applying I i for i ⊃ i skew , the skew-symmetry of the brackets implies that [[z m , κ 3 ], κ 2 ] will vanish, and so this difference is indeed 0 as implied by Lemma 5.2. But in A Hall,prin this is not the case, as we will now check. Using (53), we compute that [z m , κ 3 ] = (1 − q −1 )z m κ 3 , and then [(1 − q −1 )z m κ 3 , κ 2 ] = (1 − q −1 )z m (κ 3 κ 2 − qκ 2 κ 3 ).
Let κ 23,f denote the κ-element of the Hall algebra corresponding to the representation (0 ← C f → C).