# The flow tree formula for Donaldson-Thomas invariants of quivers with potentials

aa r X i v : . [ m a t h . R T ] F e b THE FLOW TREE FORMULA FOR DONALDSON-THOMASINVARIANTS OF QUIVERS WITH POTENTIALS

H ¨ULYA ARG ¨UZ AND PIERRICK BOUSSEAU

Abstract.

We prove the ﬂow tree formula conjectured by Alexandrov and Pioline whichcomputes Donaldson-Thomas invariants of quivers with potentials in terms of a smallerset of attractor invariants. This result is obtained as a particular case of a more generalﬂow tree formula reconstructing a consistent scattering diagram from its initial walls.

Contents

1. Introduction 12. Trees and ﬂows 93. Scattering diagrams 174. The ﬂow tree formula for scattering diagrams 235. The ﬂow tree formula for DT invariants 42References 471.

Introduction

Donaldson-Thomas (DT) theory is a topic at the intersection of algebraic geometry,symplectic geometry, representation theory and theoretical physics. Given a triangulatedcategory C which is Calabi-Yau of dimension 3 (CY3) together with a choice of Bridgelandstability condition θ [12], DT invariants are deﬁned by virtually counting θ -semistableobjects in C [28, 40, 45, 64]. In quantum ﬁeld theory and string theory, they play animportant role as counts of BPS states and D-branes [7].Quivers with potentials [27] provide a natural source of examples of CY3 categoriescoming from representation theory [32, 42]. Due to its more algebraic nature, DT theory ofquivers with potentials is an ideal setting to study and explore many questions which arealso of interest in the geometric incarnations of DT theory given by counts of semistableobjects in the derived category of coherent sheaves on Calabi-Yau 3-folds [64] and by countsof special Lagrangian submanifolds in Calabi-Yau 3-folds [39, 65].A key phenomenon in DT theory is wall-crossing in the space of stability conditions: DTinvariants are constant in the complement of countably many real codimension one loci in Date : February 23, 2021. the space of stability conditions called walls, but they jump discontinuously in general whenthe stability condition crosses a wall. The precise description of this jumping behaviour ofDT invariants across walls in the space of stability conditions is given by the wall-crossingformula of Joyce-Song and Kontsevich-Soibelman [40, 45], which is a universal algebraicexpression that contains some amount of combinatorial complexity.By successive applications of the wall-crossing formula, one can show that the DT in-variants of a quiver with potential are determined by a much smaller subset of attractorDT invariants deﬁned by picking particular stability conditions [2, 46]. In [2], Alexandrov-Pioline conjectured, based on string-theoretic predictions, a new formula that expressesDT invariants in terms of the attractor DT invariants as a sum over trees, called the ﬂowtree formula . Their conjecture reduces the general wall-crossing formula to an iterativeapplication of the much simpler primitive wall-crossing formula. The main result of thepresent paper is a proof of the ﬂow tree formula. In fact, we prove a version of the ﬂowtree formula in the more general context of consistent scattering diagrams.The ﬂow tree formula is a new tool to unravel some of the deep and hidden structuresin DT theory. For example, versions of the ﬂow tree formula are a major tool in the recentformulation of the conjectural proposal of [3] (see also [1]) for the construction of modularcompletions for generating series of DT invariants counting coherent sheaves supported onsurfaces inside Calabi-Yau 3-folds.1.1.

Background.

A quiver with potential ( Q, W ) is given by a ﬁnite oriented graph Q ,and a ﬁnite formal linear combination W of oriented cycles in Q . We denote by Q the setof vertices of Q . For every dimension vector γ ∈ N ∶= Z Q and stability parameter(1.1) θ ∈ γ ⊥ ⊂ M R ∶= Hom ( N, R ) , where γ ⊥ ∶= { θ ∈ M R ∣ θ ( γ ) = } , the theory of King’s stability for quiver representations [43]deﬁnes a quasiprojective variety M θγ , parametrizing S-equivalence classes of θ -semistablerepresentations of Q of dimension γ , and a regular function(1.2) Tr ( W ) θγ ∶ M θγ Ð → C . Assuming that θ is γ -generic in the sense that θ ( γ ′ ) = γ ′ collinear with γ , theDonaldson-Thomas (DT) invariant Ω θγ is an integer which is a virtual count of the criticalpoints of Tr ( W ) θγ . Applying Hodge theory to the sheaf of vanishing cycles of Tr ( W ) θγ , theinteger Ω θγ can be reﬁned into a Laurent polynomial Ω θγ ( y, t ) in two variables y and t andwith integer coeﬃcients, referred to as reﬁned DT invariants [19, 20, 40, 45, 54, 60, 61]. It isoften convenient to use the rational functions Ω θγ ( y, t ) ∈ Q ( y, t ) deﬁned as in [40, 45, 50] by(1.3) Ω θγ ( y, t ) ∶= ∑ γ ′ ∈ Nγ = kγ ′ , k ∈ Z ≥ k y − y − y k − y − k Ω θγ ′ ( y k , t k ) , HE FLOW TREE FORMULA 3 and referred to as rational DT invariants .The DT invariants Ω θγ ( y, t ) are locally constant functions of the γ -generic stability pa-rameter θ ∈ γ ⊥ and their jumps across the loci of non- γ -generic stability parameters aregiven by the wall-crossing formula of Joyce-Song and Kontsevich-Soibelman [40, 45]. Usingthe wall-crossing formula, the DT invariants can be computed in terms of the simpler at-tractor DT invariants , which are DT invariants at speciﬁc values of the stability parameter.Let ⟨ − , − ⟩ ∶ N × N → Z be the skew-symmetric form given by(1.4) ⟨ γ, γ ′ ⟩ = ∑ i,j ∈ Q ( a ij − a ji ) γ i γ ′ j , where a ij is the number of arrows in Q from the vertex i to the vertex j . The speciﬁc point ⟨ γ, − ⟩ ∈ γ ⊥ ⊂ M R is called the attractor point for γ [2, 57]. In general, the attractor point ⟨ γ, − ⟩ is not γ -generic and we deﬁne the attractor DT invariants Ω ∗ γ ( y, t ) by(1.5) Ω ∗ γ ( y, t ) ∶= Ω θ γ γ ( y, t ) , where θ γ is a small γ -generic perturbation of ⟨ γ, − ⟩ in γ ⊥ [2,57]. One can check that Ω ∗ γ ( y, t ) is independent of the choice of the small perturbation [2, 57].For Q acyclic (and so W = ( Q, W ) admitting a green-to-red se-quence [55], the attractor DT invariants are as simple as possible:(1.6) Ω ∗ γ ( y, t ) = ⎧⎪⎪⎨⎪⎪⎩ γ = ( δ ij ) i ∈ Q for some j ∈ Q , where δ ij is the Kronecker delta. Similarly, for a quiver with potential ( Q, W ) describing thederived category of coherent sheaves on a local del Pezzo surface, it is recently conjectured[8, 57] that Ω ∗ γ ( y, t ) = γ = ( δ ij ) i ∈ Q for some j ∈ Q or unless γ is the class ofthe skyscraper sheaf of a point. However, for quivers with potential ( Q, W ) describinginteresting parts of the derived category of coherent sheaves on a compact Calabi-Yau 3-fold, the attractor DT invariants are expected to be non-vanishing and to typically exhibitan exponential growth. We refer to [9, 26, 47, 48, 51] for some explicit examples involving n -gon quivers.The rational DT invariants Ω θγ ( y, t ) for general γ -generic stability parameters θ ∈ γ ⊥ areexpressed in terms of the rational attractor DT invariants Ω ∗ γ ( y, t ) by a formula of the form(1.7) Ω θγ ( y, t ) = ∑ r ≥ ∑ { γ i } ≤ i ≤ r ∑ ri = γ i = γ ∣ Aut ({ γ i } i )∣ F θr ( γ , . . . , γ r ) r ∏ i = Ω ∗ γ i ( y, t ) , where the second sum is over the multisets { γ i } ≤ i ≤ r with γ i ∈ N and ∑ ri = γ i = γ . Here, thedenominator ∣ Aut ({ γ i } i )∣ is the order of the symmetry group of { γ i } : if m γ ′ is the numberof times that γ ′ ∈ N appears in { γ i } i , then ∣ Aut ({ γ i } i )∣ = ∏ γ ′ ∈ N m γ ′ !. The coeﬃcients H ¨ULYA ARG ¨UZ AND PIERRICK BOUSSEAU F θr ( γ , . . . , γ r ) are element of Q ( y ) and are universal in the sense that they depend on ( Q, W ) only through the skew-symmetric form ⟨ − , − ⟩ on N . Our main result is the proof ofan explicit formula, called the ﬂow tree formula and conjectured by Alexandrov-Pioline [2],which computes the coeﬃcients F θr ( γ , . . . , γ r ) in (1.7) combinatorially in terms of a sumover binary rooted trees, and where the contribution of each tree is computed followingthe ﬂow on the tree starting at the root and ending at the leaves.1.2. Main result: the ﬂow tree formula.

We introduce some notations which arenecessary to state precisely the ﬂow tree formula in Theorem 1.1 below. We ﬁx γ ∈ N , a γ -generic stability parameter θ ∈ γ ⊥ , and γ , . . . , γ r ∈ N such that ∑ ri = γ i = γ .An essential ingredient in the formulation of the ﬂow tree formula for F θr ( γ , . . . , γ r ) is the choice of a generic skew-symmetric perturbation ( ω ij ) ≤ i,j ≤ r of the skew-symmetricmatrix (⟨ γ i , γ j ⟩) ≤ i,j ≤ r . The matrix ( ω ij ) ≤ i,j ≤ r cannot be viewed in general as a skew-symmetric bilinear form on the sublattice of N generated by γ , . . . , γ r because γ , . . . , γ r are not necessarily linearly independent in N . Nevertheless, the matrix ( ω ij ) ≤ i,j ≤ r canalways be interpreted as a skew-symmetric bilinear form ω on a rank r free abelian group N ∶= ⊕ ri = Z e i with a basis { e i } ≤ i ≤ r and such that ω ij = ω ( e i , e j ) . From this point of view,there is a natural additive map p ∶ N Ð→ N (1.8) e i z→ γ i , which enables us to deﬁne a skew-symmetric bilinear form η on N as being the pullbackof ⟨ − , − ⟩ on N , that is, η ( e i , e j ) ∶= ⟨ γ i , γ j ⟩ , and we consider a real-valued skew-symmetricform ω on N obtained as a small enough generic perturbation of η . Let M R ∶= Hom ( N , R ) and q ∶ M R → M R be the map induced from p ∶ N → N by duality. We denote by(1.9) α ∶= q ( θ ) the image in M R of the stability parameter θ ∈ M R by the map q .The ﬂow tree formula in Theorem 1.1 below takes the form of a sum over trees. Moreprecisely, we consider rooted trees which apart from the root vertex have r univalentvertices, or leaves, decorated by the basis elements e , . . . , e r of N . For such a tree T , wedenote by V ○ T the set of interior, that is, non-univalent, vertices. We endow each such treewith the ﬂow from the root to the leaves. Given a vertex v in a tree, the vertex adjacentto v coming before v along the ﬂow is referred to as the parent of v and denoted by p ( v ) ,and the vertices adjacent to v and coming after v along the ﬂow are referred to as the children of v , as illustrated in Figure 1.1. Any vertex that comes after v along the ﬂow isa descendent of v . Let T r be the set of such trees which are binary , that is such that eachinterior vertex v of a tree T ∈ T r has exactly two children. For every tree T ∈ T r and v avertex of T , we deﬁne e v ∈ N as the sum of all elements that appear as decorations on the HE FLOW TREE FORMULA 5 v ′ v ′′ Children of v Parent of v The root vertex e e e e e e v ′′ = e + e e v ′ = e + e e v = e v ′ + e v ′′ = e + e + e + e p ( v ) R T v Figure 1.1.

A binary tree T with ﬁve leaves for N = Z e ⊕ Z e ⊕ Z e ⊕ Z e ⊕ Z e .leaves which are descendent of a vertex v . We denote by T ηr the set of trees T ∈ T r suchthat η ( e v ′ , e v ′′ ) ≠ v is the child of the root and v ′ , v ′′ are the children of v .For every tree T ∈ T ηr and v a vertex of T distinct from the leaves, we deﬁne θ α,ωT,v ∈ M R recursively as follows: If v is the root vertex, then set θ α,ωT,v ∶ = α . If v is not the root, let p ( v ) be the parent of v , and for any of the children, say v ′ of v , and ι e v ω ∶ = ω ( e v , − ) ∈ M R ,deﬁne(1.10) θ α,ωT,v ∶ = θ α,ωT,p ( v ) − θ α,ωT,p ( v ) ( e v ′ ) ω ( e v , e v ′ ) ι e v ω . We show in Lemma 2.12 that this deﬁnition is independent of the choice of the child v ′ of v . Following [2], we call v ↦ θ α,ωT,v the discrete attractor ﬂow .For every tree T ∈ T ηr and interior vertex v ∈ V ○ T , we ﬁx a labeling v ′ and v ′′ of the twochildren of v , and we deﬁne(1.11) ǫ α,ωT,v ∶ = − sgn ( θ α,ωT,p ( v ) ( e v ′ )) + sgn ( ω ( e v ′ , e v ′′ )) ∈ { , , − } , where sgn ( x ) ∈ { ± } is the sign of x ∈ R − { } . We show in § ω ∈ ⋀ M R ,we have θ α,ωT,p ( v ) ( e v ′ ) ≠ ω ( e v ′ , e v ′′ ) ≠ ǫ α,ωT,v indeed makes sense.Our main result is the following ﬂow tree formula , conjectured in [2], which enables us todetermine the coeﬃcients F θr ( γ , . . . , γ r ) in (1.7) expressing the DT invariants Ω θγ ( y, t ) interms of the attractor DT invariants Ω ∗ γ i ( y, t ) . Theorem 1.1 .

For every choice a small enough generic perturbation ω ∈ ⋀ M R of theskew-symmetric bilinear form η , the universal coeﬃcient F θr ( γ , . . . , γ r ) in (1.7) is givenby the ﬂow tree formula: (1.12) F θr ( γ , . . . , γ r ) = ∑ T ∈T ηr ∏ v ∈ V ○ T ǫ α,ωT,v κ ( η ( e v ′ , e v ′′ )) , where ǫ α,ωT,v is as in (1.11) and (1.13) κ ( x ) ∶ = ( − ) x ⋅ y x − y − x y − y − H ¨ULYA ARG ¨UZ AND PIERRICK BOUSSEAU for every x ∈ Z . Theorem 5.5 presents a version of Theorem 1.1 in which we phrase more explicitly thecondition that ω should be a small enough generic perturbation of η .We also prove a variant of the ﬂow tree formula recently conjectured by Mozgovoy [56],which relies on a perturbation of points in M R rather than the skew-symmetric form.We ﬁrst remark that θ ∈ γ ⊥ implies that α ∈ M R deﬁned in (1.9) satisﬁes α ∈ (∑ ri = e i ) ⊥ .For β a small perturbation of α in the hyperplane (∑ ri = e i ) ⊥ , we deﬁne θ β,ηT,v ∈ M R and ǫ β,ηT,v ∈ { , , − } by replacing α by β and ω by η in (1.10) and (1.11). Theorem 1.2 .

For every choice β ∈ (∑ ri = e i ) ⊥ of small enough generic perturbation of α ∶ = q ( θ ) in the hyperplane (∑ ri = e i ) ⊥ , the universal coeﬃcient F θr ( γ , . . . , γ r ) is given by: (1.14) F θr ( γ , . . . , γ r ) = ∑ T ∈T ηr ∏ v ∈ V ○ T ǫ β,ηT,v κ ( η ( e v ′ , e v ′′ )) , where ǫ α,ωT,v is as in (1.11) and κ is as in (1.13) . In Theorem 5.6, we present a version of Theorem 1.2 in which we state more preciselythe condition that β should be a small enough generic perturbation of α .1.3. Structure of the proof.

The proof of Theorems 1.1 and 1.2 relies on the notionof a scattering diagram , introduced in [38], based on the insights of [44], to provide analgebro-geometric understanding of the mirror symmetry phenomenon in physics. To givethe rough idea of a scattering diagram, which we elaborate further in § N + -graded Lie algebra g = ⊕ n ∈ N + g n . There is an associated unipotent algebraic group G with a bijective exponential map exp ∶ g → G deﬁned using the Baker–Campbell–Hausdorﬀformula. Given this data, a ( N + , g ) -scattering diagram is deﬁned as the collection of realcodimension 1 cones in M R , called walls, which are decorated by wall-crossing automor-phisms, that are elements of G . We focus attention on scattering diagrams relevant toDT and cluster theory, which have wall-crossing automorphism preserving a holomorphicsymplectic form as in [13,17,18,34,36,37,46,49,55], and not on the more general scatteringdiagrams that have wall-crossing automorphisms preserving a holomorphic volume form,and which appear frequently in the context of mirror symmetry [6, 35, 38, 41].A codimension 2 locus in M R along which distinct walls intersect is called a joint . Ascattering diagram is said to be consistent if for any joint, the path-ordered product ofall wall-crossing automorphisms of walls that are adjacent to the joint is identity. It isshown in [38, 44] that there is an algorithmic prescription for constructing a consistentscattering diagram from the data of an initial set of walls. This prescription is based oninserting new walls, along with wall-crossing automorphisms, which order-by-order decreasethe divergence of the path-ordered products of wall-crossing automorphisms around jointsfrom being identity. HE FLOW TREE FORMULA 7

Given a quiver with potential ( Q, W ) , Bridgeland [13] constructed from the DT in-variants of ( Q, W ) a consistent scattering diagram in M R , called the stability scatteringdiagram , whose initial walls are determined by the attractor DT invariants. The stabilityscattering diagram is a very useful tool to study DT invariants of quivers. For example,the transformation properties of DT invariants under mutations of a quiver with potential,conjectured in [53] [57, Conjecture 3.14], are proved in [55, Theorem 4.22] by a study ofthe corresponding transformation of the stability scattering diagram.The main technical goal of the paper is to prove Theorems 4.22 and 4.24: they are ﬂowtree formulas for consistent scattering diagrams which express as a sum over binary treesthe wall-crossing automorphism attached to a general wall in terms of the wall-crossingautomorphisms attached to the initial walls. In §

5, we then derive Theorems 1.1 and1.2 from the ﬂow tree formulas for scattering diagram applied to the stability scatteringdiagram.The proof of Theorems 4.22 and 4.24 is given in § § ( N + , g ) -scattering diagrams, whichlive in M R , to auxiliary ( N + , h ) -scattering diagrams which live in M R , where h is a N + -graded Lie algebra constructed from g . In the second part of the proof in § M R . The images of the treesin M R are embedded graphs in M R with a balancing condition satisﬁed at each vertexdistinct from the root, that is, essentially tropical disks in M R [14, 33, 58]. The genericperturbation of either the skew-symmetric form or the position in M R of the root of theembedded trees guarantees that the vertices of the embedded trees are always containedin double intersections of walls, but never in triple intersections. The iteration of the localconsistency condition around double intersection of walls determines the contribution ofeach tree. In the language of DT invariants, this reduces the general wall-crossing formulato an iteration of the much simpler primitive wall-crossing formula.We note in Remark 4.25 that the perturbation of the position in M R of the root of thetrees used in the formulation of Theorems 1.2 and 4.24 is related to a way of perturbingscattering diagrams going back to the work of Gross-Pandharipande-Siebert [37]. Howeverthe perturbation of the skew-symmetric form used in the formulation of Theorems 1.1 and4.22 seems to be a completely new way to study scattering diagrams. Thus, most of thepaper is focused on the study of this perturbation of the skew-symmetric form and on theproof of Theorems 1.1 and 4.22.1.4. Related work.

Operads and wall-crossing.

Very recently, while this paper was being completed,Mozgovoy [56] proved using an operadic approach to the wall-crossing formula, a diﬀerent

H ¨ULYA ARG ¨UZ AND PIERRICK BOUSSEAU formula for the coeﬃcients F θr ( γ , . . . , γ r ) , called the attractor tree formula and originallyconjectured in [57], following [1, 3]. The key diﬀerences between the ﬂow tree formula thatwe prove in this paper and the attractor tree formula proved in [56] are the following:the ﬂow tree formula involves binary trees, requires a choice of generic perturbation, andis naturally phrased in terms of Lie algebras, whereas the attractor tree formula involvesgeneral (not necessarily binary) trees, does not require the choice of generic perturbation,and is naturally phrased in terms of associative algebras. It is currently not known if oneof these two formulas implies the other in a simple way.Both the ﬂow tree formula and the attractor tree formula, formulated precisely andproved for DT invariants of quivers with potentials, are expected to have versions holdingmore generally in DT theory as long as a global understanding of the space of stabilityconditions is available. For example, the ﬂow tree formula and the attractor tree formulaplay an important role in the conjectural proposal of Alexandrov and Pioline [3] (seealso [1]) for the construction of modular completions for generating series of DT invariantscounting coherent sheaves supported on surfaces inside Calabi-Yau 3-folds.1.4.2. BPS states.

From a physics perspective, a quiver with potential ( Q, W ) deﬁnes asupersymmetric quantum mechanical system with 4 supercharges [24] and the (reﬁned) DTinvariants are counts of supersymmetric ground states, which often can be identiﬁed withsupersymmetric indices counting BPS particles in 4-dimensional N =

N =

N = single-centered invariants [51],which are expected to be of great physics relevance as describing BPS conﬁgurations ofsingle black holes in

N =

N =

Tropical curves and mirror symmetry.

In [14, 30, 37, 49], the perturbation of scatter-ing diagrams originally introduced by Gross-Pandharipande-Siebert [37] is used to expressgeneral walls of a consistent scattering diagram in terms of the initial walls using sumsover tropical curves. The connection between scattering diagrams and tropical geometryis particularly interesting from the point of view of mirror symmetry and connection withGromov–Witten theory, as shown in dimension 2 by Gross-Pandharipande-Siebert [37] ingenus 0 and the second author [11] in higher genus, and generalized to higher dimensionsin the work of the ﬁrst author with Gross [6].

HE FLOW TREE FORMULA 9

However, the point of view adopted in the present paper is diﬀerent: the main interestof the ﬂow tree formula is that it is not written as a sum over tropical curves but as a sumover abstract trees. The resulting formula is therefore entirely combinatorial, and moreamenable to formal manipulations, as exempliﬁed in [1–3]. In particular, the ﬂow treeformula can be easily implemented eﬃciently on a computer, as done in [59].1.5.

Plan of the paper. In §

2, we introduce our notation for trees and the discreteattractor ﬂow, and we prove the existence of suitably generic perturbations of the skew-symmetric form. In §

3, we ﬁrst review the reconstruction of consistent scattering diagramsfrom initial data, and then we state the ﬂow tree formula for scattering diagrams. Thetechnical heart of the paper is § § Acknowledgments.

We thank Boris Pioline and Sergey Mozgovoy for exchanges ontheir works [57] and [56]. 2.

Trees and flows In § § § § § N of ﬁnite rank r , and let M ∶ = Hom Z ( N , Z ) and M R ∶ = M ⊗ Z R . We introduce the notation I ∶ = { , . . . , r } , we ﬁx a basis { e i } i ∈ I of N , and we denote(2.1) N + ∶ = { ∑ i ∈ I a i e i ∣ a i ≥ , ∑ i ∈ I a i > } . We also ﬁx a skew-symmetric bilinear form η ∈ ⋀ M on N , a subset J ⊂ I of cardinality ∣ J ∣ , and let(2.2) e J ∶ = ∑ i ∈ J e i . Finally, for every n ∈ N , we denote n ⊥ ∶ = { θ ∈ M R ∣ θ ( n ) = } .2.1. Trees.Deﬁnition 2.1. A rooted tree T is a connected tree with a ﬁnite number of verticesand edges, with no divalent vertices, together with the additional data of a distinguishedunivalent vertex referred to as the root . We denote by V T the set of vertices of T , by R T the set with the root for unique element, V ○ T the set of interior vertices , which are vertices e e e e e e e e e e e e Figure 2.1.

Decorated binary rooted trees with ≤ V LT the set of univalent vertices that are not the root, or leaves of T . An isomorphism between two rooted trees T and T ′ is a bijection ϕ ∶ V T → V T ′ ,which maps adjacent vertices of T to adjacent vertices of T ′ and the root of T to the rootof T ′ . Deﬁnition 2.2. A J-decorated rooted tree is a rooted tree T endowed with a decorationof the leaves of T by { e i } i ∈ J , that is, a bijection ψ ∶ V LT → { e i } i ∈ J . An isomorphism betweentwo J -decorated rooted trees ( T, ψ ) and ( T ′ , ψ ′ ) is an isomorphism of tree ϕ ∶ V T → V T ′ compatible with the decorations, in the sense that ψ = ψ ′ ○ ϕ . Deﬁnition 2.3.

Let T be a rooted tree. The parent of a vertex v ∈ V T ∖ R T is the uniquevertex denoted by p ( v ) which is adjacent to v and lies on the shortest path between v andthe root. A child of a vertex v ∈ V T is a vertex for which v is a parent, and a descendant of v is any vertex which is either the child of v or is (recursively) the descendant of any ofthe children of v . Deﬁnition 2.4.

A rooted tree T is binary if the root has exactly one child and each interiorvertex has two children. Remark . We illustrate in Figure 2.1 some decorated binary rooted trees. Our binaryrooted trees are unordered in the sense that we do not ﬁx an order on the set of children ofa vertex. In a binary rooted tree T , for every vertex v ∈ V ○ T , we denote by { v ′ , v ′′ } the setof the children of v , without specifying an ordering. Nonetheless, for some constructionsin what follows it will be sometimes useful to choose an ordering for the children. At anyoccasion where such a choice is made we will show that the result of the construction is infact independent of this choice. Lemma 2.6 .

Let T be a J -decorated binary rooted tree. Then, T has ∣ J ∣ vertices and ∣ J ∣ − edges.Proof. The proof is by induction on the cardinality ∣ J ∣ of J . The result is immediate for ∣ J ∣ =

1. For ∣ J ∣ >

1, write J = { i } ⊔ { i } i ∈∣ J ′ ∣ with ∣ J ′ ∣ = ∣ J ∣ −

1. Removing from T the legdecorated by e i , and erasing the resulting divalent vertex, we obtain a J ′ -decorated binary HE FLOW TREE FORMULA 11 rooted tree T ′ . The result follows since T ′ has two less edges and two less vertices than T . (cid:3) Lemma 2.7 .

The set T J of isomorphism classes of J -decorated binary rooted trees is ofcardinality ( ∣ J ∣ − ) !! = ∏ ∣ J ∣− k = ( k − ) .Proof. The proof is by induction on the cardinality ∣ J ∣ of J . The result is immediatefor ∣ J ∣ =

1. For ∣ J ∣ >

1, write J = { i } ⊔ { i } i ∈∣ J ′ ∣ with ∣ J ′ ∣ = ∣ J ∣ −

1. Removing from T the leg decorated by e i , we obtain a J ′ -decorated binary rooted tree T ′ with an addeddivalent vertex on one of its edges E . Conversely, given a J ′ -decorated binary rooted tree T ′ and an edge E of T ′ , then adding a divalent vertex v in the middle of E and gluinga leg decorated by e i to v , we obtain a J -decorated binary rooted tree. Therefore, wehave a bijection between T J and the set of pairs ( T ′ , E ) , where T ′ ∈ T J ′ and E is anedge of T ′ . By Lemma 2.6, a J ′ -decorated binary rooted tree has 2 ∣ J ′ ∣ − ∣ T J ∣ = ( ∣ J ′ ∣ − )∣ T J ′ ∣ = ( ∣ J ∣ − )∣ T J ′ ∣ . (cid:3) Skew-symmetric bilinear forms.

We view elements ω ∈ ⋀ M R as R -valued skew-symmetric bilinear forms on N , given by ω ∶ N × N Ð→ R (2.3) ( v , v ) z→ ω ( v , v ) . Deﬁnition 2.8.

For every tree T ∈ T J , and a vertex v ∈ V T , we deﬁne an associated element e v ∈ N + , referred to as the charge of v as follows: Let J T,v ⊂ J be the subset of indices withwhich the leaves that are descendant to v are labeled, that is, j ∈ J T,v if and only if theleaf decorated by e j is a descendant of v . Then, we set(2.4) e v ∶ = e J T,v = ∑ i ∈ J T,v e i . Note that if v is the leaf decorated by e i , then the associated charge e v = e i . For v ∈ V ○ T ,the sets J T,v ′ and J T,v ′′ are disjoint, and we have e v = e v ′ + e v ′′ . If v is the root of T or thechild of the root of T , then J T,v = J and e v = e J . Lemma 2.9 .

For every tree T ∈ T J and interior vertex v ∈ V ○ T , the linear form ∧ M R Ð→ R (2.5) ω z→ ω ( e v ′ , e v ′′ ) is not identically zero.Proof. As { e i } i ∈ I is a basis of N , the linear forms ω ↦ ω ( e i , e j ) for i, j ∈ I and i < j form abasis of the space of linear forms on ⋀ M R . We have(2.6) ω ( e v ′ , e v ′′ ) = ∑ j ′ ∈ J T,v ′ ∑ j ′′ ∈ J T,v ′′ ω ( e j ′ , e j ′′ ) . As the sets J T,v ′ and J T,v ′′ are disjoint, each basis element ω ↦ ω ( e j ′ , e j ′′ ) with j ′ < j ′′ appears up to sign at most once in the sum (2.6). In particular, there are no cancellationsand ω ↦ ω ( e v ′ , e v ′′ ) is not the zero linear form. (cid:3) Proposition 2.10 .

Let U J ⊂ ⋀ M R be the subset of ω ∈ ⋀ M R such that for every tree T ∈ T J and interior vertex v ∈ V ○ T , we have ω ( e v ′ , e v ′′ ) ≠ . Then, the following holds: (i) U J is open and dense in ⋀ M R . (ii) For every ω ∈ U J , T ∈ T J and v ∈ V ○ T , we have ω ( e v , e v ′ ) ≠ and ω ( e v , e v ′′ ) ≠ . (iii) For every J ⊂ J ⊂ I , we have U J ⊂ U J .Proof. By Lemma 2.9, U J is the complement of ﬁnitely many hyperplanes in ⋀ M R . Thus,the statement in (i) follows. To show (ii), observe that as e v = e v ′ + e v ′′ , we have ω ( e v , e v ′ ) = ω ( e v ′′ , e v ′ ) and ω ( e v , e v ′′ ) = ω ( e v ′ , e v ′′ ) . Finally, (iii) follows from the fact that every J -decorated binary rooted tree can be realized as a subtree of a J -decorated binary rootedtree. (cid:3) The discrete attractor ﬂow.

We review the description of the discrete attractorﬂow introduced in [2, § Deﬁnition 2.11.

Fix a tree T ∈ T J , a skew-symmetric bilinear form ω ∈ U J ⊂ ⋀ M R and α ∈ e ⊥ J ⊂ M R . We also ﬁx a labeling v ′ , v ′′ of children of vertices v ∈ V ○ T . The discreteattractor ﬂow for ( T, ω, α ) is the map θ α,ωT ∶ R T ∪ V ○ T Ð→ M R (2.7) v z→ θ α,ωT,v deﬁned inductively, following the ﬂow on T starting at the root and ending at the leaves,as follows:(1) For the root vertex v ∈ R T , we set(2.8) θ α,ωT,v ∶ = α (2) For v ∈ V ○ T , and a child v ′ of v , we set(2.9) θ α,ωT,v = θ α,ωT,p ( v ) − θ α,ωT,p ( v ) ( e v ′ ) ω ( e v , e v ′ ) ι e v ω . where p ( v ) is the parent of v , and for every n ∈ N , ι n ω = ω ( n, − ) ∈ M R .Note that since ω ∈ U J , we have ω ( e v , e v ′ ) ≠ v ∈ V ○ T by Proposition 2.10, andso (2.9) makes sense. Lemma 2.12 .

Using the notations of Defn. 2.11, we have for every v ∈ V ○ T : (2.10) θ α,ωT,v ∈ e ⊥ v ′ ∩ e ⊥ v ′′ ⊂ e ⊥ v , HE FLOW TREE FORMULA 13 and (2.11) θ α,ωT,v = θ α,ωT,p ( v ) − θ α,ωT,p ( v ) ( e v ′′ ) ω ( e v , e v ′′ ) ι e v ω . In particular, the discrete ﬂow θ α,ωT deﬁned as in (2.11) is independent of the choice oflabeling v ′ and v ′′ of children of vertices v ∈ V ○ T .Proof. We prove the result inductively following the ﬂow on T starting at the root andending at the leaves. If v ∈ V ○ T is the child of the root of T , then θ α,ωT,v is given by (2.9). By(2.8), we have θ α,ωT,p ( v ) = α and so(2.12) θ α,ωT,v ( e v ′ ) = α ( e v ′ ) − α ( e v ′ ) ω ( e v , e v ′ ) ω ( e v , e v ′ ) = . On the other hand, as α ∈ e ⊥ J , we have α ( e v ) = α ( e J ) =

0, and so, using e v = e v ′ + e v ′′ , wehave α ( e v ′′ ) = − α ( e v ′ ) . As we also have ω ( e v , e v ′ ) = − ω ( e v , e v ′′ ) , we ﬁnally obtain(2.13) θ α,ωT,v ( e v ′′ ) = α ( e v ′′ ) + α ( e v ′′ ) ω ( e v , e v ′ ) ω ( e v , e v ′′ ) = . Similarly, if v ∈ V ○ T is not the root of T , then θ α,ωT,v is given by (2.9) and so(2.14) θ α,ωT,v ( e v ′ ) = θ α,ωT,p ( v ) ( e v ′ ) − θ α,ωT,p ( v ) ( e v ′ ) ω ( e v , e v ′ ) ω ( e v , e v ′ ) = . By the induction hypothesis, we have θ α,ωT,p ( v ) ( e v ) = e v = e v ′ + e v ′′ , we have θ α,ωT,p ( v ) ( e v ′′ ) = − θ α,ωT,p ( v ) ( e v ′ ) . As we also have ω ( e v , e v ′ ) = − ω ( e v , e v ′′ ) , we ﬁnally obtain (2.11)and(2.15) θ α,ωT,v ( e v ′′ ) = θ α,ωT,p ( v ) ( e v ′′ ) + θ α,ωT,p ( v ) ( e v ′′ ) ω ( e v , e v ′ ) ω ( e v , e v ′′ ) = . (cid:3) Generic skew-symmetric bilinear forms.

Recall that we are ﬁxing a skew-symmetricbilinear form η ∈ ⋀ M . Deﬁnition 2.13.

We denote by T ηJ the set of trees T ∈ T J such that η ( e v ′ , e v ′′ ) ≠ v is the child of the root of T . Deﬁnition 2.14.

A point α ∈ M R is ( J, η ) -generic if α ∈ e ⊥ J and for every tree T ∈ T ηJ , wehave α ( e v ′ ) ≠

0, where v is the child of the root of T .Note that for T ∈ T ηJ and v the child of the root of T , we have e v ′ + e v ′′ = e v = e J , andso, if α ∈ e ⊥ J , then α ( e v ′ ) ≠ α ( e v ′′ ) ≠

0. Equivalently, a point α ∈ e ⊥ J is ( J, η ) -generic if α ∉ e ⊥ J ′ for every strict subset J ′ of J such that η ( e J , e J ′ ) ≠ Deﬁnition 2.15.

Let α ∈ e ⊥ J be a ( J, η ) -generic point. A skew-symmetric bilinear form ω ∈ U J ⊂ ⋀ M R is called ( J, α ) -generic if for every T ∈ T ηJ and v ∈ V ○ T , we have(2.16) θ α,ωT,p ( v ) ( e v ′ ) ≠ θ α,ωT,p ( v ) ( e v ′′ ) ≠ . We denote by U J,α ⊂ U J the set of ( J, α ) -generic skew-symmetric bilinear forms. Lemma 2.16 .

Using the notations of Defn. 2.15, for every T ∈ T ηJ and v ∈ V ○ T , we have θ α,ωT,p ( v ) ( e v ) = and θ α,ωT,p ( v ) ( e v ′ ) = − θ α,ωT,p ( v ) ( e v ′′ ) .Proof. As e v = e v ′ + e v ′′ , it is enough to show that θ α,ωT,p ( v ) ( e v ) =

0. If v is the child of theroot, then θ α,ωT,p ( v ) = α by (2.8), and so, as α ∈ e ⊥ J , we have α ( e v ) = α ( e J ) =

0. If v is not thechild of the root, the result follows by (2.10) of Lemma 2.12 applied to the parent p ( v ) of v . (cid:3) Lemma 2.17 .

Let α ∈ e ⊥ J be a ( J, η ) -generic point, T ∈ T ηJ and v ∈ V T . Denote by v , . . . , v m the unique sequence of vertices of T such that v is the root of T , v m = v , andfor every ≤ a ≤ m − , v a + is a child of v a . Then, the following holds. (i) The elements e v , . . . , e v m are linearly independent in N . (ii) For every ≤ a, b ≤ m , the map U J Ð→ R ω z→ θ α,ωT,v a ( e v b ) is a rational function with R -coeﬃcients, in the variables given by the linear maps U J Ð→ R ω z→ ω ( e v a ′ , e v b ′ ) for ≤ a ′ , b ′ ≤ m and min ( a ′ , b ′ ) ≤ a . (iii) For every ≤ a ≤ m − , the map U J Ð→ R ω z→ θ α,ωT,v a ( e v a + ) is not identically zero.Proof. (i) Assume that ∑ mi = a i e v i = a i ≠

0. Let i min be the smallest index i suchthat a i ≠

0. There exists j ∈ J T,v i min such that j ∉ J T,v i for every i > i ′ , and so we obtain acontradiction.(ii) We prove this by induction on a . For a = v is the root of T , and so by (2.8) wehave θ α,ωT,v ( e v b ) = α ( e b ) which is constant as a function of ω . Now, assume that the resultholds for a ≥

0. We have v a + ∈ V ○ T , and so by (2.9),(2.17) θ α,ωT,v a + ( e v b ) = θ α,ωT,v a ( e v b ) − θ α,ωT,v a ( e v a + ) ω ( e v a + , e v a + ) ω ( e v a + , e v b ) . HE FLOW TREE FORMULA 15

By the induction hypothesis, θ α,ωT,v a ( e v b ) and θ α,ωT,v a ( e v a + ) are rational functions in the vari-ables ω ( e v a ′ , e v b ′ ) with min ( a ′ , b ′ ) ≤ a and so in particular with min ( a ′ , b ′ ) ≤ a +

1. The onlyextra variables appearing in θ α,ωT,v a + ( e v b ) are ω ( e v a + , e v a + ) and ω ( e v a + , e v b ) , which are bothof the form ω ( e v a ′ , e v b ′ ) with min ( a ′ , b ′ ) ≤ a +

1. This shows the result for a + e v , . . . , e v m are linearly independent in N ,and so the linear forms ω ↦ ω ( e v a , e v b ) with a < b are linearly independent.We prove the result by induction on a . For a = v is the root of T and we have by(2.8) that θ α,ωT,v ( e v ) = α ( e v ) , which is nonzero because T ∈ T ηJ and α is ( J, η ) -generic (seeDefn. 2.14).Assume that the result holds for a and let us show that it holds for a +

1. We have v a + ∈ V ○ T and so by (2.9),(2.18) θ α,ωT,v a + ( e v a + ) = θ α,ωT,v a ( e v a + ) − θ α,ωT,v a ( e v a + ) ω ( e v a + , e v a + ) ω ( e v a + , e v a + ) . By Lemma 2.17 (ii), ω ↦ θ α,ωT,v a ( e v a + ) and ω ↦ θ α,ωT,v a ( e v a + ) are rational functions in thelinear forms ω ↦ ω ( e v a ′ , e v b ′ ) with min ( a ′ , b ′ ) ≤ a . In particular, they are algebraicallyindependent of ω ↦ ω ( e v a + , e v a + ) and ω ↦ ω ( e v a + , e v a + ) . On the other hand, by theinduction hypothesis, ω ↦ θ α,ωT,v a ( e v a + ) is not identically zero. We conclude that ω ↦ θ α,ωT,v a + ( e v a + ) is not identically zero. (cid:3) Proposition 2.18 .

Let α ∈ e ⊥ J be a ( J, η ) -generic point. Then the set U J,α ⊂ U J ⊂ ⋀ M R deﬁned in Defn. 2.15 is the complement of ﬁnitely many algebraic hypersurfaces in U J . Inparticular, U J,α is open and dense in U J , and so in ⋀ M R .Proof. By Lemma 2.17 (ii) and (iii), for every T ∈ T ηJ , v ∈ V ○ T and v ′ child of v , themap ω ↦ θ α,ωT,p ( v ) ( e v ′ ) is a not identically zero rational function. Therefore, the set { ω ∈ U J ∣ θ α,ωT,p ( v ) ( e v ′ ) ≠ } is the complement of an algebraic hypersurface in U J . By deﬁnition, U J,α is the intersection of the ﬁnitely many sets of this form obtained by varying T , v , and v ′ . Hence, U J,α is the complement of ﬁnitely many algebraic hypersurfaces in U J and isopen and dense in U J . By Proposition 2.10, U J is open and dense in ⋀ M R , and so it isalso the case for U J,α . (cid:3) We end this section in a diﬀerent direction: instead of ﬁxing α ∈ e ⊥ J and looking for ( J, α ) -generic ω ∈ ⋀ M R , we look for all α ∈ e ⊥ J such that the ﬁxed η ∈ ⋀ M R is ( J, α ) -generic. Lemma 2.19 .

Let T ∈ T ηJ and v ∈ V T . Denote by v , . . . , v m the unique sequence of verticesof T such that v is the root of T , v m = v , and for every ≤ a ≤ m − , v a + is a child of v a . Then for every ≤ a ≤ m − , the map e ⊥ J Ð→ M R (2.19) α z→ θ α,ηT,v a is linear, and the linear form e ⊥ J Ð→ R (2.20) α z→ θ α,ηT,v a ( e v a + ) is not identically zero.Proof. The result is easily proved by induction on a , using Lemma 2.17(i) and the fact thatthe linear form α ↦ θ α,ηT,v a ( e v a + ) is equal to the sum of the linear form α ↦ α ( e v a + ) and ofa linear combination of the linear forms α ↦ α ( e v b ) with b < a + (cid:3) Proposition 2.20 .

Let V J,η be the set of α ∈ e ⊥ J ⊂ M R such that α is ( J, η ) -generic and η is ( J, α ) -generic. Then V J,η is open and dense in e ⊥ J .Proof. It follows from Defn. 2.14 and Lemma 2.19 that V J,η is the complement of ﬁnitelymany hyperplanes in e ⊥ J . (cid:3) The ﬂow tree map.

Let h = ⊕ n ∈N + h n be a Lie algebra over Q which is N + -graded,that is, such that [ h n , h n ] ⊂ h n + n for every n , n ∈ N + . We say that h is ﬁnitely N + -graded if its support Supp ( h ) ∶ = { n ∈ N + ∣ h n ≠ } is ﬁnite. Note that a ﬁnitely N + -gradedLie algebra is nilpotent. In what follows, we ﬁx h = ⊕ n ∈N + h n a ﬁnitely N + -graded Liealgebra. For every x ∈ R − { } , we denote by sgn ( x ) the sign of x deﬁned as follows:(2.21) sgn ( x ) = ⎧⎪⎪⎨⎪⎪⎩ x > , and − x < . Deﬁnition 2.21.

Fix a ( J, η ) -generic point α ∈ e ⊥ J ⊂ M R , a skew-symmetric bilinear form ω ∈ U J,α ⊂ ⋀ M R as in Defn. 2.15, a tree T ∈ T ηJ , and for every interior vertex v ∈ V ○ T alabeling v ′ and v ′′ of the children of v . We deﬁne a multilinear map(2.22) A α,ωJ,T,v ∶ ∏ i ∈ J T,v h e i Ð→ h e v for every v ∈ V LT ∪ V ○ T inductively, following the ﬂow on T starting at the leaves and endingat the root, as follows:(1) If v ∈ V LT , that is, if v is a leaf of T decorated by some e i , we deﬁne A α,ωJ,T,v ∶ h e i → h e i as the identity map.(2) If v ∈ V ○ T , we set(2.23) ǫ α,ωT,v ∶ = − sgn ( θ α,ωT,p ( v ) ( e v ′ )) + sgn ( ω ( e v ′ , e v ′′ )) ∈ { , , − } , HE FLOW TREE FORMULA 17 and(2.24) A α,ωJ,T,v ∶ = ǫ α,ωT,v [ A α,ωJ,T,v ′ , A α,ωJ,T,v ′′ ] , where [ A α,ωJ,T,v ′ , A α,ωJ,T,v ′′ ] is the composition of the maps A α,ωJ,T,v ′ ∶ ∏ j ∈ J v ′ h e j Ð→ h e v ′ and A α,ωJ,T,v ′′ ∶ ∏ j ∈ J v ′′ h e j Ð→ h e v ′′ with the Lie bracket [ − , − ] ∶ h e v ′ × h e v ′′ Ð→ h e v ′ + e v ′′ = h e v . Note that by the deﬁnition of U J , we have ω ( e v ′ , e v ′′ ) ≠ v ∈ V ○ T . Moreover, byDefn. 2.15 of U J,α , we have θ α,ωT,p ( v ) ( e v ′ ) ≠

0. Hence, both of the signs sgn ( ω ( e v ′ , e v ′′ )) andsgn ( θ α,ωT,p ( v ) ( e v ′ )) in 2.23 make sense. Lemma 2.22 .

Using the notations of Defn. 2.21, for every v ∈ V ○ T , we have (2.25) A α,ωJ,T,v = − sgn ( θ α,ωT,p ( v ) ( e v ′′ )) + sgn ( ω ( e v ′′ , e v ′ )) [ A α,ωJ,T,v ′′ , A α,ωJ,T,v ′ ] . In particular, the map A α,ωJ,T,v is independent of the choice of the labeling of the children v ′ and v ′′ of v ∈ V ○ T .Proof. Since the Lie bracket is skew-symmetric, we have [ A α,ωJ,T,v ′′ , A α,ωJ,T,v ′ ] = − [ A α,ωJ,T,v ′ , A α,ωJ,T,v ′′ ] .Moreover, since ω is skew-symmetric, we have sgn ( ω ( e v ′′ , e v ′ )) = − sgn ( ω ( e v ′ , e v ′′ )) . Finally,by Lemma 2.16, we have sgn ( θ α,ωT,p ( v ) ( e v ′′ )) = − sgn ( θ α,ωT,p ( v ) ( e v ′ )) . (cid:3) Deﬁnition 2.23.

For every ( J, η ) -generic α ∈ e ⊥ J , ω ∈ U J,α and T ∈ T ηJ , let(2.26) A α,ωJ,T ∶ ∏ i ∈ J h e i Ð→ h e J be the linear map associated to T , deﬁned by A α,ωJ,T ∶ = A α,ωJ,T,v , where v is the child of the rootof T . For every ( J, η ) -generic α ∈ e ⊥ J and ω ∈ U J,α , we deﬁne the ﬂow tree map A α,ωJ withinitial point α , by summing over all the trees in T ηJ :(2.27) A α,ωJ ∶ = ∑ T ∈T ηJ A α,ωJ,T . Scattering diagrams In § § § Consistent scattering diagrams.

Throughout this section, we ﬁx a free abeliangroup N of ﬁnite rank ℓ , and let M ∶ = Hom ( N, Z ) and M R ∶ = M ⊗ Z R . We ﬁx a basis { s i } ≤ i ≤ ℓ of N , and we denote(3.1) N + ∶ = { ℓ ∑ i = a i s i ∣ a i ∈ Z ≥ , ℓ ∑ i = a i > } . For every n ∈ N − { } , we denote n ⊥ ∶ = { θ ∈ M R ∣ θ ( n ) = } , and for every subset d ⊂ M R ,we denote d ⊥ ∶ = { n ∈ N + ∣ θ ( n ) = θ ∈ d } . Finally, we ﬁx a ﬁnitely N + -graded Liealgebra g = ⊕ n ∈ N + g n over Q , that is, a N + -graded Lie algebra whose support(3.2) Supp ( g ) ∶ = { n ∈ N + ∣ g n ≠ } is a ﬁnite set. In particular, g is a nilpotent Lie algebra.For us, a cone in M R is a closed, convex, rational, polyhedral cone in M R , that is, asubset of M R of the form(3.3) σ = { q ∑ i = λ i m i ∣ λ i ∈ R ≥ } , m , . . . , m q ∈ M. By deﬁnition, the codimension of a cone is the codimension of the subspace of M R it spans.A wall is a cone of codimension 1 and a joint is a cone of codimension 2. If d is a wall in M R , we denote by n d the unique primitive element in N + ∩ d ⊥ , referred to as the normalvector to the wall . A face of a cone σ is a subset of the form σ ∩ n ⊥ where n ∈ N satisﬁes θ ( n ) ≥ θ ∈ σ . Note that every face of a cone is itself a cone, and every intersectionof faces of a given cone is also a face. Finally, a cone complex in M R is a ﬁnite collection S of cones in M R , such that any face of a cone in S is also a cone in S , and the intersectionof any two cones in S is a face of each. Deﬁnition 3.1.

For every ﬁnite subset P ⊂ N + , we denote by S P the cone complex in M R whose cones are indexed by disjoint unions of sets P = P + ⊔ P ⊔ P − with P non-empty andgiven by σ ( P + , P , P − ) ∶ = { θ ∈ M R ∣ θ ( n ) = n ∈ P , ± θ ( n ) ≥ n ∈ P ± } . We denote byWall P the set of walls in S P .In what follows, we take for the ﬁnite set P ⊂ N + in Defn. 3.1 the support Supp ( g ) ⊂ N + of the Lie algebra g deﬁned by (3.2). Deﬁnition 3.2. A ( N + , g ) -scattering diagram is a map φ ∶ Wall

Supp ( g ) → g with the propertythat φ ( d ) ∈ ⊕ n ∈ Z ≥ n d g n ⊂ g for every d ∈ Wall

Supp ( g ) . For every n ∈ Z ≥ n d , the projection of φ ( d ) on g n is denoted by φ ( d ) n . Deﬁnition 3.3.

A smooth path p ∶ [ , ] → M R is g -generic if(1) the endpoints p ( ) and p ( ) do not lie in any wall d ∈ Wall

Supp ( g ) ,(2) p does not meet any cone of S Supp ( g ) of codimension > γ with walls d ∈ Wall

Supp ( g ) are transversal.Note that, given a g -generic path p ∶ [ , ] → M R there is a ﬁnite set of points(3.4) 0 < t < . . . < t k < p ( t i ) lies in ⋃ d ∈ Wall

Supp ( g ) d , and for each of these points t i there is a unique wall d i ∈ Wall

Supp ( g ) such that p ( t i ) ∈ d i . Given a ( N + , g ) -scattering diagram φ and a g -generic HE FLOW TREE FORMULA 19 path p ∶ [ , ] → M R , we deﬁne the path-ordered product along p of φ by(3.5) Ψ p ,φ ∶ = exp ( ǫ k φ ( d k )) ⋅ exp ( ǫ k − φ ( d k − )) . . . exp ( ǫ φ ( d )) ⋅ exp ( ǫ φ ( d )) ∈ G , where ǫ i ∈ { ± } is the sign of the derivative of t ↦ − p ( t )( n d i ) at t = t i , G is the unipotentgroup associated to the nilpotent Lie algebra g , and exp ∶ g → G is the exponential map. Deﬁnition 3.4. A ( N + , g ) -scattering diagram φ is consistent if Ψ p ,φ = Ψ p ,φ for every two g -generic paths p and p .Note that Defn. 3.4 is equivalent to the deﬁnition of the consistency mentioned in theintroduction, which requires the composition of all wall-crossing automorphisms on wallsadjacent to a given joint to be identity. We set M + R ∶ = { θ ∈ M R ∣ θ ( n ) > ∀ n ∈ N + } and M − R ∶ = { θ ∈ M R ∣ θ ( n ) < ∀ n ∈ N + } . The cone complex S Supp ( g ) is disjoint from M + R and M − R . Therefore, if φ is a consistent ( N + , g ) -scattering diagram, we can deﬁne an elementΨ φ ∈ G by Ψ φ ∶ = Ψ p ,φ , where p is a g -generic path with initial point in M + R and ﬁnal point in M − R . By consistency of φ , Ψ p ,φ is independent of the particular choice of path or endpoints. Proposition 3.5 .

The map φ ↦ Ψ φ is a bijection between consistent ( N + , g ) -scatteringdiagrams and elements of the group G .Proof. In the setting of scattering diagrams as cone complexes, this is exactly Proposition3.3 of [13]. In the setting of scattering diagrams as set of walls, this result is originallyTheorem 2.1.6 of [46] (see also Theorem 1.17 of [34]). Note that Proposition 3.3 of [13]in fact shows that these two possible points of view on scattering diagrams are in factequivalent. (cid:3)

Initial data for scattering diagrams.

From now on, we assume given a real-valuedskew-symmetric bilinear form ⟨ − , − ⟩ on N such that the ﬁnitely N + -graded Lie algebra g = ⊕ n ∈ N + g n satisﬁes(3.6) [ g n , g n ] = ⟨ n , n ⟩ = . In this section we review the notion of initial data for a ( N + , g ) -scattering diagram.For every primitive n ∈ N + , we have a direct sum decomposition g = g n, + ⊕ g n, ⊕ g n, − of g into Lie subalgebras(3.7) g n, + ∶ = ⊕ n ∈ N + ⟨ n,n ⟩> g n , g n, ∶ = ⊕ n ∈ N + ⟨ n,n ⟩= g n , g n, − ∶ = ⊕ n ∈ N + ⟨ n,n ⟩< g n . It follows that, denoting by G n, + ∶ = exp ( g n, + ) , G n, ∶ = exp ( g n, ) , G n, − ∶ = exp ( g n, − ) thecorresponding subgroups of G , every element g ∈ G can be written uniquely as a product g = g n, + g n, g n, − with g n, + ∈ G n, + , g n, ∈ G n, , g n, − ∈ G n, − . We have a further decomposition g n, = g ∥ n, ⊕ g ⊥ n, , where(3.8) g ∥ n, ∶ = ⊕ n ∈ Z ≥ n g n , g ⊥ n, ∶ = ⊕ n ∈ N + ⟨ n,n ⟩= n ∉ Z ≥ n g n . If n + n = kn with ⟨ n, n ⟩ = ⟨ n, n ⟩ =

0, then ⟨ n , n ⟩ = [ g n , g n ] = [ g n, , g ⊥ n, ] ⊂ g ⊥ n, . Hence, g ⊥ n, is a Lie ideal in g n, and so thesubgroup G ⊥ n, ∶ = exp ( g ⊥ n, ) is normal. We denote by(3.9) π n, ∶ G n, Ð→ G n, / G ⊥ n, = G ∥ n, the quotient group morphism, where G ∥ n, ∶ = exp ( g ∥ n, ) . Given g = g n, + g n, g n, − , set g ∥ n, ∶ = π n, ( g n, ) . This deﬁnes a map π n ∶ G Ð→ G ∥ n, (3.10) g z→ g ∥ n, . Proposition 3.6 .

The map π ∶ G Ð→ ∏ n ∈ N + n primitive G ∥ n, (3.11) g z→ ( π n ( g )) n is a bijection.Proof. This is Proposition 3.3.2 of [46]. See also Proposition 1.20 of [34]. (cid:3)

Deﬁnition 3.7.

For every n ∈ N + , the initial data I φ,n of a consistent ( N + , g ) -scatteringdiagram φ is the projection on g n of(3.12) log ( π n ( Ψ φ )) ∈ g ∥ n, = ⊕ n ′ ∈ Z ≥ n g n ′ , where n is the unique primitive element of N + such that n ∈ Z ≥ n , and Ψ φ is the elementof G attached to φ as in Proposition 3.5. Proposition 3.8 .

The map φ ↦ ( I φ,n ) n ∈ N + is a bijection between equivalence classes ofconsistent ( N + , g ) -scattering diagrams and elements of g = ⊕ n ∈ N + g n . In other words, forevery ( I n ) n ∈ N + ∈ g = ⊕ n ∈ N + g n , there exists a unique consistent ( N + , g ) -scattering diagram φ with initial data ( I φ,n ) n ∈ N + = ( I n ) n ∈ N + .Proof. This is an immediate consequence of Propositions 3.5 and 3.6. (cid:3)

The next Proposition 3.9 describes how to read the initial data I φ,n of a consistent ( N + , g ) -scattering diagram φ from the walls. HE FLOW TREE FORMULA 21

Proposition 3.9 .

Let φ be a consistent ( N + , g ) -scattering diagram, n ∈ N + and n theunique primitive element of N + such that n ∈ Z ≥ n . For every wall d ∈ Wall

Supp ( g ) with n d = n and containing the attractor point ⟨ n, − ⟩ ∈ M R for n , we have (3.13) φ ( d ) n = I φ,n . Proof.

This follows from Theorem 1.21-(1) of [34]. (cid:3)

Note that in the context of Proposition 3.9 there are in general several walls d with n d = n and containing the attractor point ⟨ n, − ⟩ . Proposition 3.9 implies in particular that φ ( d ) n does not depend on the choice of d .3.3. Universality of the reconstruction of scattering diagrams from initial data.

The next proposition shows that the elements φ ( d ) ∈ g assigned to walls d ∈ Wall

Supp ( g ) bya consistent ( N + , g ) -scattering diagram φ are determined by the initial data ( I φ,n ) n ∈ N + viauniversal formulas. Deﬁnition 3.10.

A ﬁnite multiset Γ = { γ i } ≤ i ≤ r of elements of N + is a ﬁnite unorderedcollection γ , . . . , γ r of elements of N + where multiple occurrences of elements are allowed.For every n ∈ N + , the multiplicity m Γ ( n ) ∈ Z ≥ of n in Γ is the number of occurrences of n in Γ. Given a multiset Γ, we denote by Γ the set of n ∈ N + such that m Γ ( n ) ≠

0. The setof ﬁnite multisets of elements of N + is denoted by mult ( N + ) . Proposition 3.11 .

For every Γ ∈ mult ( N + ) and d ∈ Wall

Supp ( g ) , there exists a uniquemap (3.14) F g , d Γ ∶ ∏ n ∈ Γ g n Ð→ g ∑ n ∈ Γ n which is a homogeneous polynomial of degree m Γ ( n ) in restriction to the factor g n , and suchthat for every consistent ( N + , g ) -scattering diagram φ and γ ∈ Z ≥ n d ∈ N + , the component φ ( d ) γ of φ ( d ) in g γ is given by (3.15) φ ( d ) γ = ∑ Γ ∈ mult ( N + )∑ n ∈ Γ n = γ F g , d Γ (( I φ,n ) n ∈ Γ ) , where the sum is over all ﬁnite multisets Γ of N + whose elements sum up to γ .Proof. We ﬁrst prove the uniqueness part. Assume that we have two collections ( F g , d Γ ) and ( F g , d Γ ) of maps satisfying the conditions of Proposition 3.11. By Proposition 3.8,there exists a consistent ( N + , g ) -scattering diagram for every initial data. Therefore (3.15)implies the equality of maps(3.16) ∑ Γ ∈ mult ( N + )∑ n ∈ Γ = γ ( F g , d Γ ) = ∑ Γ ∈ mult ( N + )∑ n ∈ Γ n = γ ( F g , d Γ ) . For every Γ ∈ mult ( N + ) with ∑ n ∈ Γ n = γ , isolating on both sides of (3.16) the part homo-geneous of degree m Γ ( n ) in restriction to each factor g n , we obtain ( F g , d Γ ) = ( F g , d Γ ) .We now prove the existence claim. Let δ ∶ N → Z be an additive map such that δ ( N + ) ⊂ Z ≥ . For every k ∈ Z ≥ , we deﬁne the Lie subalgebra g > k ∶ = ⊕ n ∈ N + δ ( n )> k g n ⊂ g . We prove byinduction on k that for every k ∈ Z ≥ , Γ ∈ mult ( N + ) and d ∈ Wall

Supp ( g ) , there exists a map(3.17) F g , d k, Γ ∶ ∏ n ∈ Γ g n Ð→ g ∑ n ∈ Γ n , such that for every consistent ( N + , g ) -scattering diagram φ and γ ∈ Z ≥ n d , we have(3.18) φ ( d ) γ = ∑ Γ ∈ mult ( N + )∑ n ∈ Γ n = γ F g , d k, Γ (( I φ,n ) n ∈ Γ ) mod g > k . As g is nilpotent, we have g > k = k large enough, and so it will be enough to take F g , d Γ ∶ = F g , d k, Γ for k large enough.For the base step of the induction, we have g > = g , so φ ( d ) γ = g > for every φ , d , γ , and so we can take F g , d , Γ = d . For the induction step, ﬁx k ≥ F g , d k, Γ is know. We have to show the existence ofthe maps F g , d k + , Γ . For every wall d ∈ Wall

Supp ( g ) and for every consistent ( N + , g ) -scatteringdiagram φ , deﬁne(3.19) φ ( d ) ∶ = ∑ Γ ∈ mult ( N + )∑ n ∈ Γ n ∈ Z ≥ n d F g , d k, Γ (( I φ,n ) n ∈ Γ ) . By the induction hypothesis, we have(3.20) φ ( d ) = φ ( d ) mod g > k . By [34, Deﬁnition-Lemma C.2], a joint j ∈ S Supp ( g ) , that is a codimension 2 cone, is perpendicular if for every wall d ∈ Wall

Supp ( g ) containing j , the contraction ι n d ⟨ − , − ⟩ = ⟨ n d , − ⟩ of ⟨ − , − ⟩ with the normal vector n d to d is not contained in the R -linear span of j . For everyperpendicular joint j ∈ S Supp ( g ) , let Wall ( j ) be the set of walls d ∈ Wall

Supp ( g ) containing j , and let p j ∶ [ , ] → M R be a g -generic loop around j , intersecting only once each wall d ∈ Wall ( j ) and no other wall. For every wall d ∈ Wall ( j ) , denote by t jd ∈ [ , ] the pointsuch that p j ( t jd ) ∈ d , and denote by ǫ jd ∈ { ± } the sign of the derivative of t ↦ − p j ( t )( n d ) at t = t jd . We label d , . . . , d m the elements of Wall ( j ) so that 0 < t jd < ⋅ ⋅ ⋅ < t jd m <

1. By Defn.3.4 the relation(3.21) exp ( ǫ jd m φ ( d m )) ⋅ exp ( ǫ jd m − φ ( d m − )) . . . exp ( ǫ jd φ ( d )) ⋅ exp ( ǫ jd φ ( d )) = HE FLOW TREE FORMULA 23 holds for every consistent ( N + , g ) -scattering diagram φ . Therefore, it follows from (3.20)that(3.22) log ( exp ( ǫ jd m φ ( d m )) . . . exp ( ǫ jd φ ( d ))) = ∑ γ ∈ N + δ ( γ )≥ k + g j φ,γ for some g j φ,γ ∈ g n . Using the Baker-Campbell-Hausdorﬀ formula to compute the left-hand side of (3.22), together with (3.19), we deduce that for every Γ ∈ mult ( N + ) , thereexists a map G j Γ ∶ ∏ n ∈ Γ g n → g ∑ n ∈ Γ n , which is a homogeneous polynomial of degree m Γ ( n ) in restriction to the factor g n , such that for every consistent ( N + , g ) -scattering diagram φ and γ ∈ N + with δ ( γ ) ≥ k +

1, we have(3.23) g j φ,γ = ∑ Γ ∈ mult ( N + )∑ ri = γ i = γ G j Γ (( I φ,n ) n ∈ Γ ) . where the sum is over multisets Γ = { γ i } i ∈ I for some index set I , whose elements sum upto γ inN + . According to Appendix C.1 of [34] (see the Equations deﬁning ˜ D k + and D [ j ] before Lemma C.6), for every wall d ∈ Wall

Supp ( g ) we have(3.24) φ ( d ) = φ ( d ) + ∑ γ ∈ Z ≥ n d δ ( γ )= k + I φ,γ − ∑ γ ∈ Z ≥ n d ∑ j ǫ jd j g j φ,γ mod g > k + , where the sum over j is over the perpendicular joints j such that d ⊂ j − R ≥ ⟨ n d , − ⟩ , andwhere d j ∈ Wall ( j ) is the wall containing j and contained in j − R ≥ ⟨ n d , − ⟩ . Therefore, forevery Γ ∈ mult ( N + ) with ∑ n ∈ Γ n ∈ Z ≥ n d , we can take(3.25) F g , d k + , Γ = F g , d k, Γ + I d k + , Γ − ∑ j ǫ jd j G j Γ . where I d k + , Γ is the identity map g γ → g γ if Γ = { γ } with γ ∈ Z ≥ n d such that δ ( γ ) = k + I d k + , Γ = (cid:3) The flow tree formula for scattering diagrams

In this section we prove our main result, Theorem 4.22, which provides an explicitdescription of the maps F g , d Γ in (3.14) in terms of the (specialization of the) ﬂow tree maps.4.1. ( N + , h ) -scattering diagrams. As in §

3, we work with ( N + , g ) -scattering diagrams.We ﬁx a wall d ∈ Wall

Supp ( g ) , γ ∈ Z ≥ n d ⊂ N + proportional to the normal vector n d to d , and a multiset Γ = { γ i } i ∈ I ∈ mult ( N + ) of elements of N + such that ∑ i ∈ I γ i = γ , where I = { , . . . r } is some index set. Applying Proposition 3.11 to the multiset Γ = { γ i } i ∈ I andto the wall d , we obtain a map(4.1) F h , d Γ ∶ ∏ n ∈ Γ g n → g γ . Our goal is to state a formula for the map F d , d Γ . As a ﬁrst step to achieve this goal, wedeﬁne in this section another class of scattering diagrams, referred to as ( N + , h ) -scatteringdiagrams.We introduce a rank r free abelian group N ∶ = ⊕ i ∈ I Z e i with a basis { e i } i ∈ I , and theadditive map p ∶ N Ð→ N (4.2) e i z→ γ i . For every J ⊂ I , let e J ∶ = ∑ i ∈ J e i . (4.3)In particular, we have p ( e I ) = γ . Following the notations set-up in §

2, we denote M ∶ = Hom ( N , Z ) , M R ∶ = M ⊗ R and N + ∶ = { ∑ i ∈ I a i e i ∣ a i ≥ , ∑ i ∈ I a i > } . The map p ∶ N → N deﬁnes by duality a linear map q ∶ M R Ð→ M R (4.4) θ z→ θ ○ p . We deﬁne a skew-symmetric bilinear form η ∈ ⋀ M by η ( e i , e j ) ∶ = ⟨ γ i , γ j ⟩ (4.5)for every i, j ∈ I . In other words, η is the pullback of ⟨ − , − ⟩ by p . Deﬁnition 4.1.

We deﬁne a N + -graded Lie algebra h = ⊕ n ∈N + h n as follows. First, weintroduce the ﬁnite set(4.6) N + e ∶ = { ∑ i ∈ I a i e i ∈ N + ∣ a i ∈ { , } ∀ i ∈ I } = { e J ∣ J ⊂ I, J ≠ ∅ } ⊂ N + . Then, as vector spaces, we set h n ∶ = g p ( n ) if n ∈ N + e , and h n ∶ = x ∈ h n and y ∈ h n , we deﬁne the bracket [ x, y ] as being the bracket [ x, y ] in h n + n = g p ( n )+ p ( n ) if n , n , n + n ∈ N + e , and as being 0 else.One checks easily that this deﬁnes a Lie bracket on h and that the resulting Lie algebrais ﬁnitely N + -graded: by construction, the support Supp ( h ) = { n ∈ N + ∣ h n ≠ } of h iscontained in N + e . It follows from (3.6) that [ h n , h n ] = η ( n , n ) =

0. Thus, we canconsider ( N + , h ) -scattering diagrams as in Defn. 3.2 and their initial data as in Defn. 3.7,where N + , g and ⟨ − , − ⟩ ∈ ⋀ M are replaced by N + , h and η ∈ ⋀ M .Let e ∈ Wall

Supp ( h ) be a wall in M R with normal vector n e = e I and which contains theimage q ( d ) of the wall d ∈ Wall

Supp ( g ) by the map q ∶ M R → M R as in (4.4). Applying HE FLOW TREE FORMULA 25

Proposition 3.11 to the multiset Γ e ∶ = { e i } i ∈ I ∈ mult ( N + ) of elements of N + and to the wall e ∈ Wall

Supp ( h ) , we obtain a map(4.7) F h , e Γ e ∶ ∏ i ∈ I h e i → h e I , where we used the fact that, as { e i } i ∈ I is a basis of N , Γ e = Γ e = { e i } i ∈ I .4.2. From ( N + , g ) to ( N + , h ) -scattering diagrams. The main result of this section,Theorem 4.9 provides a comparison of the map F g , d Γ in (4.1) and the map F h , e Γ e in (4.7). Toprove it, we ﬁrst need to compare the Lie algebras g and h . We do this by going throughan intermediate N + -graded Lie algebra ˜ g = ⊕ n ∈ N + ˜ g n (4.8)deﬁned using the map p ∶ N → N in (4.2) and the ﬁnite subset N + e ⊂ N + in (4.6).4.2.1. The Lie algebra ˜ g . Deﬁnition 4.2.

Deﬁne the Lie algebra ˜ g as follows: As vector spaces, we set ˜ g n ∶ = g n if n ∈ p ( N + e ) , and ˜ g n ∶ = x ∈ ˜ g n and y ∈ ˜ g n , we deﬁne the bracket [ x, y ] as beingthe bracket [ x, y ] in ˜ g n + n = g n + n if n , n , n + n ∈ p ( N + e ) , and as being 0 else.One checks easily that this deﬁnes a Lie bracket on ˜ g and that the resulting Lie algebrais ﬁnitely N + -graded. It follows from (3.6) that [ ˜ g n , ˜ g n ] = ⟨ n , n ⟩ =

0. As γ = p ( e ) ∈ Supp ( ˜ g ) , there exists a unique wall ˜ d ∈ Wall

Supp ( ˜ g ) such that d ⊂ ˜ d . Applying Proposition3.11 for ( N + , ˜ g ) -scattering diagram to the multiset Γ ∈ mult ( N + ) and the wall ˜ d , we obtaina map(4.9) F ˜ g , ˜ h Γ ∶ ∏ n ∈ Γ ˜ g n → ˜ g γ . Proposition 4.3 .

The maps F g , d Γ in (4.1) and F ˜ g , ˜ d Γ in (4.9) are equal: F g , d Γ = F ˜ g , ˜ d Γ .Proof. Note that by deﬁnition of ˜ g , we have ˜ g n = g n for every n ∈ Γ ∪ { γ } , and so the maps F g , d Γ and F ˜ g , ˜ d Γ have the same domain and codomain. The result follows from the fact thatthe algorithmic construction of F g , d Γ reviewed in the proof of Proposition 3.11 involves onlybrackets [ x, y ] with x ∈ g n , y ∈ g n , [ x, y ] ∈ g n + n and n , n , n + n ∈ p ( N + e ) . (cid:3) In what remains, we compare the Lie algebras ˜ g and h . Proposition 4.4 .

Let q ∶ M R → M R be the linear map deﬁned in (4.4) . Then, (i) For every n ∈ N , the preimage q − ( n ⊥ ) of the hyperplane n ⊥ ⊂ M R under q ∶ M R → M R is the hyperplane ( p ( n )) ⊥ ⊂ M R . (ii) For every cone σ ∈ S Supp ( ˜ g ) , the image q ( σ ) of σ by q ∶ M R → M R is a cone q ( σ ) ∈ S Supp ( h ) . xyz σ + σ − σ Figure 4.1.

Paths around a codimension two cone σ . Proof.

The ﬁrst part (i) of the Lemma follows immediately since we have θ ∈ q − ( n ⊥ ) if andonly if ( q ( θ ))( n ) = θ ( p ( n )) = σ ∈ S Supp ( ˜ g ) implies that thereexists a partition of the set Supp ( ˜ g ) ⊂ N + into subsets Supp ( ˜ g ) = P + ⊔ P ⊔ P − such that(4.10) σ ∶ = { θ ∈ M R ∣ θ ( n ) = n ∈ P , ± θ ( n ) ≥ n ∈ P ± } . Deﬁne Q ± ∶ = { n ∈ Supp ( h )∣ p ( n ) ∈ P ± } and Q ∶ = { n ∈ Supp ( h )∣ p ( n ) ∈ P } . As Supp ( ˜ g ) = p ( Supp ( h )) , we have Supp ( h ) = Q + ⊔ Q ⊔ Q − . Using that θ ( p ( n )) = ( q ( θ ))( n ) for every n ∈ N , we obtain q ( σ ) = { θ ∈ M R ∣ θ ( n ) = n ∈ Q , ± θ ( n ) ≥ n ∈ Q ± } . Hence, q ( σ ) ∈ S Supp ( h ) by Defn. 3.1. (cid:3) Proposition 4.5 .

For every n ∈ N , the attractor points ⟨ p ( n ) , − ⟩ for p ( n ) and ι n η = η ( n, − ) for n as in Proposition 3.9 are related by: (4.11) q (⟨ p ( n ) , − ⟩) = ι n η , where η ∈ ⋀ M is deﬁned by (4.5) .Proof. For every m ∈ N , we have(4.12) ( q (⟨ p ( n ) , − ⟩))( m ) = ⟨ p ( n ) , p ( m )⟩ = η ( n, m ) = ( ι n η )( m ) , where the ﬁrst equality uses (4.4) and the second equality uses (4.5). (cid:3) The ( N + , ˜ g ) -scattering diagram and consistency. In this section, we construct a con-sistent ( N + , ˜ g ) -scattering diagram φ ρ starting from a consistent ( N + , h ) -scattering diagram ρ . Let ρ ∶ Wall

Supp ( h ) → h be a consistent ( N + , h ) -scattering diagram. Following [55, § ρ ∶ S Supp ( h ) → h of ρ where the set of walls Wall Supp ( h ) is HE FLOW TREE FORMULA 27 replaced by the set S Supp ( h ) of all cones. For a cone σ ∈ S Supp ( h ) , there exists by Defn. 3.1a decomposition Supp ( h ) = P + ⊔ P ⊔ P − such that(4.13) σ ∶ = { θ ∈ M R ∣ θ ( n ) = n ∈ P , ± θ ( n ) ≥ n ∈ P ± } . We denote σ + ∶ = { θ ∈ M R ∣ θ ( m ) > , ∀ m ∈ P + ∪ P } and σ − ∶ = { θ ∈ M R ∣ θ ( m ) < , ∀ m ∈ P + ∪ P } . Let p ∶ [ , ] → M R be a h -generic path with p ( ) ∈ σ + and p ( ) ∈ σ − (see Figure4.1). By (3.5), we have the corresponding path-ordered product Ψ p ,ρ ∈ H ∶ = exp ( h ) , andwe deﬁne(4.14) ρ ( σ ) ∶ = log Ψ p ,ρ ∈ h . By consistency of ρ , this deﬁnition of ρ ( σ ) is independent of the choice of the path p .By Defn. 4.1 and Defn. 4.2, we have ˜ g = ⊕ n ∈ p (N + e ) g n and h = ⊕ n ∈N + e g p ( n ) . We denote by ν ∶ h → ˜ g the natural projection map sending h n = g p ( n ) onto g p ( n ) = ˜ g p ( n ) . We now deﬁnea ( N + , ˜ g ) -scattering diagram φ ρ ∶ Wall

Supp ( ˜ g ) → ˜ g . For every wall σ ∈ Wall

Supp ( ˜ g ) , the image q ( σ ) of σ by q is a cone in S Supp ( h ) by Proposition 4.4 (ii). Therefore, one can applied ρ to σ to obtain ρ ( σ ) ∈ h , and ﬁnally ν ∶ h → ˜ g : φ ρ ( σ ) ∶ = ν ( ρ ( q ( σ ))) ∈ ˜ g . (4.15) Lemma 4.6 .

For every consistent ( N + , h ) -scattering diagram ρ ∶ Wall

Supp ( h ) → h , the ( N + , ˜ g ) -scattering diagram φ ρ ∶ Wall

Supp ( ˜ g ) → ˜ g deﬁned by (4.15) is consistent.Proof. Let p ∶ [ , ] → M R be a ˜ g -generic loop. Let q be a small generic perturbationof t ↦ q ( p ( t )) such that, for every σ ∈ Wall

Supp ( g ) and t ′ ∈ [ , ] with p ( t ′ ) ∈ d ′ , theperturbed path t ↦ q ( t ) goes from ( q ( σ )) − to ( q ( σ )) + , or from ( q ( σ )) + to ( q ( σ )) − , in asmall neighborhood of t ′ . By the deﬁnition of φ ρ in (4.15), the group element Ψ p ,φ ρ is theimage in ˜ G = exp ( ˜ g ) of the group element Ψ q ,ρ by exp ( ν ) ∶ H → ˜ G . By consistency of ρ wehave Ψ q ,ρ = id, and hence Ψ p ,φ ρ = id. (cid:3) Lemma 4.7 .

For every consistent ( N + , h ) -scattering diagram ρ ∶ Wall

Supp ( h ) → h , the ini-tial data of ρ and of the ( N + , ˜ g ) -scattering diagram φ ρ ∶ Wall

Supp ( ˜ g ) → ˜ g deﬁned by (4.15) are related as follows: for every n ∈ Supp ( ˜ g ) = p ( Supp ( h )) , we have (4.16) I φ ρ ,n = ∑ m ∈ Supp ( h ) p ( m )= n ν ( I ρ,m ) , where I φ ρ ,n and I ρ,m are the initial data of φ ρ and ρ as in Defn. 3.7.Proof. Let σ ∈ Wall

Supp ( ˜ g ) be a wall containing the attractor point ⟨ n, − ⟩ for n and suchthat n ∈ Z ≥ n σ . By Proposition 3.9 applied to φ , we have(4.17) I φ,n = ( φ ( σ )) n . Let ∆ ⊂ Supp ( h ) be the subset of primitive m ∈ Supp ( h ) such that p ( m ) ∈ Z ≥ n σ . ByProposition 4.4, for every primitive m ∈ Supp ( h ) , the hyperplane m ⊥ contains the cone q ( σ ) if and only if m ∈ ∆.Let p ∶ [ , ] → M R be a h -generic path with p ( ) ∈ ( q ( σ )) + and p ( ) ∈ ( q ( σ )) − . Forevery m ∈ ∆, we have θ ( m ) > θ ∈ ( q ( σ )) + and θ ( m ) < θ ∈ ( q ( σ )) − .Therefore, up to straightening p , one can assume that for every m ∈ ∆, the path p intersectsthe hyperplane m ⊥ exactly once. We can also assume that for every m ∈ ∆, the intersectionof p with m ⊥ lies in a wall d m ⊂ m ⊥ containing the cone q ( σ ) . For every m, m ′ ∈ ∆, wehave η ( m, m ′ ) = ⟨ p ( m ) , p ( m ′ )⟩ =

0, and so [ ρ ( d m ) , ρ ( d m ′ )] =

0. Thus it follows from thedeﬁnition (4.15) of φ ρ that(4.18) φ ρ ( σ ) n = ∑ m ∈ ∆ , k ∈ Z ≥ p ( km )= n ν ( ρ ( d m ) km ) . By Proposition 4.5, for every m ∈ ∆ and k ∈ Z ≥ such that p ( km ) = n , we have ι km η = q (⟨ n, − ⟩) ∈ q ( σ ) ⊂ d m . We deduce from Proposition 3.9 applied to ρ that(4.19) ρ ( d m ) km = I ρ,km . Equation (4.16) follows from (4.17)-(4.18)-(4.19). (cid:3)

Deﬁnition 4.8.

Given a map ϕ ∶ ∏ i ∈ I h e i → h e I , the specialization of ϕ is the map ˆ ϕ ∶ ∏ n ∈ Γ g n → g γ deﬁned as follows. For ( x n ) n ∈ Γ ∈ ∏ n ∈ Γ g n , deﬁne ( y i ) i ∈ I ∈ ∏ i ∈ I h e i by y i ∶ = x p ( e i ) , where p ∶ N → N is as in (4.2), and set(4.20) ˆ ϕ (( x n ) n ∈ Γ ) ∶ = ϕ (( y i ) i ∈ I ) . Theorem 4.9 .

Let d ∈ Wall

Supp ( g ) be a wall in M R and Γ = { γ i } i ∈ I ∈ mult ( N + ) a multisetof elements in N + such that d ⊂ γ ⊥ , where γ = ∑ i ∈ I γ i . Let Γ e = { e i } i ∈ I ∈ mult ( N + ) , and e ∈ Wall

Supp ( h ) a wall in M R such that e ⊂ e ⊥ I and containing the image q ( d ) of d by themap q ∶ M R → M R as in (4.4) . Then, the maps F g , d Γ in (4.1) and F h , e Γ e in (4.7) satisfy (4.21) F g , d Γ = ∏ n ∈ N + m Γ ( n ) ! ˆ F h , e Γ e , where ˆ F h , e Γ e is the specialization of F h , e Γ e as in Defn. 4.8.Proof. By Proposition 4.3, it is enough to show that(4.22) F ˜ g , ˜ d Γ = ∏ n ∈ N + m Γ ( n ) ! ˆ F h , e Γ e . Let ∆ ⊂ Supp ( h ) be the subset of primitive m ∈ Supp ( h ) such that p ( m ) ∈ Z ≥ n ˜ d . As p ( e ) = γ , we have e ∈ ∆. By Proposition 4.4, for primitive m ∈ Supp ( h ) , the hyperplane m ⊥ contains the cone q ( ˜ d ) if and only if m ∈ ∆. Arguing as in the proof of Lemma 4.7, onecan ﬁnd a h -generic path p ∶ [ , ] → M R with p ( ) ∈ ( q ( ˜ d )) + , p ( ) ∈ ( q ( ˜ d )) − , and such that HE FLOW TREE FORMULA 29 for every m ∈ ∆, the path p intersects the hyperplane m ⊥ at a single point, lying in a wall d m ⊂ m ⊥ which contains the cone q ( ˜ d ) . We can also assume that d e = e .Let ρ ∶ Wall

Supp ( h ) → h be a consistent ( N + , h ) -scattering diagram and φ ρ ∶ Wall

Supp ( ˜ g ) → ˜ g the consistent ( N + , ˜ g ) -scattering diagram φ ρ ∶ Wall

Supp ( ˜ g ) → ˜ g deﬁned by (4.15). As in theproof of Lemma 4.7, for every m, m ′ ∈ ∆, we have [ ρ ( d m ) , ρ ( d m ′ )] = φ ρ that(4.23) φ ρ ( ˜ d ) γ = ∑ m ∈ ∆ , k ∈ Z ≥ p ( km )= γ ν ( ρ ( d m ) km ) . We show below that the equality (4.22) follows from identifying on both sides of (4.23) theterms homogeneous of degree m Γ ( n ) in the initial data I φ ρ ,n .By Proposition 3.11 applied to φ ρ , we have(4.24) φ ρ ( ˜ d ) γ = ∑ Γ ′ ={ γ ′ }∈ mult ( N + ) γ ′ ∈ Supp ( ˜ g ) , ∑ γ ′∈ Γ ′ γ ′ = γ F ˜ g , ˜ d Γ ′ (( I φ ρ ,γ ′ ) γ ′ ∈ Γ ′ ) . The only term homogeneous of degree m Γ ( n ) in the initial data I φ ρ ,n in (4.24) is obtainedfor Γ ′ = Γ and is equal to F ˜ g , ˜ d Γ (( I φ ρ ,n ) n ∈ Γ ) .On the other hand, by Proposition 3.11 applied to ρ , the right-hand side of (4.23) isequal to(4.25) ∑ m ∈ ∆ , k ∈ Z ≥ p ( km )= γ ∑ Γ ′ ={ n ′ }∈ mult (N + ) n ′ ∈ Supp ( h ) , ∑ n ′∈ Γ ′ n ′ = km ν ( F h , d m Γ ′ (( I ρ,n ′ ) n ′ ∈ Γ ′ )) . The only term homogeneous of degree 1 in the initial data I ρ,e i in (4.25) is obtained forΓ ′ = Γ e and is equal to ν ( F h , e Γ e (( I ρ,e i ) ≤ i ≤ r )) .Finally, by Lemma 4.7, we have for every n ∈ Γ,(4.26) I φ ρ ,n = ∑ e i ,p ( e i )= n ν ( I ρ,e i ) . Note that the sum in (4.26) contains m Γ ( n ) terms. Therefore, (4.22) follows from thefollowing algebraic claim applied to ( x i ) i = ( I φ ρ ,n ) n , ( y ij ) ij = ( ν ( I ρ,e i )) i , f = F ˜ g , ˜ d Γ and g = ν ( F h , e Γ e ) : Claim:

Let f (( x i ) ≤ i ≤ s ) be a polynomial function of s variables which is homogeneous ofdegree a i in the variable x i . Write each variable x i as a sum of a i variables y ij : x i = ∑ a i j = y ij ,and let g (( y ij ) ≤ i ≤ r, ≤ j ≤ a i ) be the component of f (( ∑ a i j = y ij ) ≤ i ≤ s ) which is homogeneousof degree 1 in each variable y ij . Finally, let ˆ g (( x i ) ≤ i ≤ s ) be the function obtained from g (( y ij ) ≤ i ≤ s, ≤ j ≤ a i ) by the specialization of variables y ij ↦ x i , for every 1 ≤ i ≤ s and 1 ≤ j ≤ a i .Then, we have(4.27) ˆ g (( x i ) ≤ i ≤ s ) = ( s ∏ i = a i ! ) f (( x i ) ≤ i ≤ s ) . Proof of the claim:

It is enough to prove the result for f = ∏ si = x a i i . For f = ∏ i x a i i , g is the term proportional to ∏ i,j y ij in ∏ i ( ∑ j y ij ) a i . So, g = ( ∏ i a i ! ) ∏ i,j y ij and soˆ g = ( ∏ i a i ! ) ∏ i x a i i = ( ∏ i a i ! ) f . Hence, the result follows. (cid:3) ( N + , h ) -scattering diagrams and ﬂow tree maps. This section includes the tech-nical heart of the paper, Theorem 4.14. The key result of the paper, the ﬂow tree formulain Theorem 4.22, will follow from Theorem 4.14 and Theorem 4.9.4.3.1.

Small enough generic perturbations of the skew-symmetric bilinear form.

In thissection, we deﬁne small enough generic perturbations of the skew-symmetric bilinear form η ∈ ⋀ M deﬁned by (4.5). Deﬁnition 4.10.

We denote by U η the set of ω ∈ ⋀ M R such that for every n , n ∈ N + e with η ( n , n ) nonzero, ω ( n , n ) is nonzero and has the same sign as η ( n , n ) . We have η ∈ U η and U η is an open neighborhood of η in ⋀ M R .For a ﬁxed ( I, η ) -generic point α ∈ e ⊥ I ⊂ M R as in Defn. 2.14, we call a perturbation ω of η generic if it belongs to the open dense subset U I,α ⊂ ⋀ M R , as in Defn. 2.15, and we saythat the perturbation is small enough if ω belongs to the open neighborhood U η ⊂ ⋀ M R ,as in Defn. 4.10. Hence, ω is a small enough generic perturbation of η ∈ ⋀ M if(4.28) ω ∈ U I,α ∩ U η . Embedding treees in M R via the discrete attractor ﬂow. We ﬁx a ( I, η ) -generic point α ∈ e ⊥ I ⊂ M R as in Defn. 2.14 and ω ∈ U I,α as in Defn. 2.15. In this section we use thediscrete attractor ﬂow deﬁned in § M R asfollows. For every tree T ∈ T I , where T I is deﬁned as in Lemma 2.7, we denote by T ○ thegraph obtained from T by removing all the leaves v ∈ V LT , and extending the resulting openintervals to unbounded edges. For every tree T ∈ T I , we ﬁx a continuous map(4.29) j α,ωT ∶ T ○ Ð→ M R such that:(1) for every vertex v ∈ R T ∪ V ○ T , we have(4.30) j α,ωT ( v ) = θ α,ωT,v . (2) for every bounded edge E of T ○ , connecting vertices v and v ′ , the image of the map j α,ωT restricted to E is the line segment in M R with endpoints θ α,ωT,v and θ α,ωT,v ′ .(3) for every unbounded edge E of T ○ obtained by removing the leaf decorated by e i ,the image of the map j α,ωT restricted to E is the half-line θ α,ωT,v + R ≥ ι e i ω in M R ,where v is the vertex in V ○ T incident to E . HE FLOW TREE FORMULA 31

Remark . For every tree T ∈ T I , the embedded graph j α,ωT ( T ○ ) ⊂ M R in (4.29) deﬁnedusing the discrete ﬂow has a natural structure of tropical disks in M R [14, 37, 58] if ω ∈ ⋀ M ⊗ Z Q ⊂ ⋀ M R : edges have then rational weighted directions of the form ι e v ω andthe tropical balancing condition at vertices distinct from the root follows from the relation e v = e v ′ + e v ′′ in Defn. 2.8. Proposition 4.12 .

For every tree T ∈ T ηI and interior vertex v ∈ V ○ T , we have j α,ωT ( v ) ∉ j α,ωT ( p ( v )) , that is, the edge connecting v and p ( v ) is not contracted to a point by j α,ωT .Proof. From the assumption ω ∈ U I,α and Defn. 2.15 of U I,α , we have θ α,ωT,p ( v ) ( e v ′ ) ≠

0, andso θ α,ωT,p ( v ) ≠ θ α,ωT,v by (2.9). (cid:3) Deﬁnition 4.13.

We consider the union of all the images of the trees T ○ by the maps j α,ωT for T ∈ T ηI :(4.31) F α,ω ∶ = ⋃ T ∈T ηI j α,ωT ( T ○ ) ⊂ M R . We view F α,ω as a graph embedded in M R . Note that we have α ∈ F , as α is the commonimage by the maps j α,ωT of the roots of the trees T ∈ T ηI .4.3.3. Scattering diagrams via ﬂow tree maps.

Now we are ready to state our main theoremof this section, that allows us to describe scattering diagrams in terms of ﬂow tree maps.This is the technical heart of this paper.

Theorem 4.14 .

Fix a ( I, η ) -generic point α ∈ e ⊥ I ⊂ M R as in Defn. 2.14 and a smallenough generic perturbation ω ∈ U I,α ∩ U η of η as in § J ⊂ I be a nonempty indexset, and x ∈ e ⊥ J a ( J, η ) -generic point such that x ∈ F α,ω and the line segment ( x + R ι e J ω ) ∩ F α,ω is not a point. Let σ ∈ Wall

Supp ( h ) be a wall containing x and with normal vector n σ = e J . Then for every consistent ( N + , h ) -scattering diagram φ constructed from initialdata I φ,n that satisﬁes I φ,n = if n ∉ { e i } i ∈ I , we have (4.32) φ ( σ ) e J = A x,ωJ (( I φ,e i ) i ∈ J ) where φ ( σ ) e J ∈ h e J is the component of φ ( σ ) ∈ h in h e J , and A x,ωJ is the ﬂow tree map withinitial point x as in Defn. 2.23.Proof. The proof is done by induction on the cardinality of the subset J ⊂ I . For theinitial step of the induction, let J be a singleton, that is, J = { i } for some i ∈ J . Then byLemma 2.7, T J consists of a single tree T , with one root and one leg connected by a singleedge. Therefore by item (1) of Defn. 2.21, the map A x,ωJ,T ∶ g e i → g e i is the identity map.Hence, A x,ωJ ( I φ,e i ) = I φ,e i . On the other hand, let σ be a wall with n σ = e i . As e i does notadmit any non-trivial decomposition as a sum of elements of Supp ( h ) ⊂ N + e , it follows fromthe algorithmic construction of scattering diagrams from initial data reviewed in the proof of Proposition 3.11 that φ ( σ ) e i = I φ,e i for every consistent ( N + , h ) -scattering diagram φ .Therefore, we conclude φ ( σ ) e i = A x,ωJ ( I φ,e i ) , and hence the initial step of the induction.For the induction step, let J ⊂ I of cardinality ∣ J ∣ >

1. We assume that Theorem 4.14holds for every J ′ ⊂ I with ∣ J ′ ∣ < ∣ J ∣ . Let σ ∈ Wall

Supp ( h ) be a wall such that n σ = e J andlet x ∈ F α,ω ∩ σ be a ( J, η ) -generic point such that ( x + R ι e J ω ) ∩ F α,ω is a non-trivial linesegment.In the remaining part of the section, we show that the statement of the theorem holdsfor J , x , σ in the following four steps:Step I: We deﬁne a set of relevant joints J , and show in Lemma 4.15 that if two wallscontained in e ⊥ J intersect along any joint that is not relevant, then the elementsof the Lie algebra h associated to these walls are the same. This enables us topartition the hyperplane e ⊥ J into regions where any wall in a given region has thesame associated element of the Lie algebra, which we denote by φ i − ,i ∈ h e J in (4.34),for i ∈ { , . . . , k } , and φ k, ∞ ∈ h e J in (4.35).Step II: Using the genericity of ω , we prove Lemma 4.16 and we obtain (4.36), expressingthe diﬀerence φ i − ,i − φ i,i + in terms of some Lie brackets. On the other hand, usingthat ω is close enough to η , we prove that φ k, ∞ = φ ( σ ) e J . This, together with the fact that φ k, ∞ = Step I : We deﬁne the set J of relevant joints : a joint j ∈ S Supp ( h ) , that is, a codimension2 cone of the cone complex S Supp ( h ) is relevant if there exists a subindex set J ′ ⊂ J with j ⊂ e ⊥ J ′ ∩ e ⊥ J and η ( e J ′ , e J ) ≠

0. Note that the point x is not contained in a relevantjoint because of the assumption that x is ( J, η ) -generic. Let 0 = t < t < ⋅ ⋅ ⋅ < t k bean increasing sequence of positive real numbers, such that the intersection points of thehalf-line x + R ≥ ι e J ω with relevant joints j ∈ J correspond to points(4.33) x i = x + t i ι e J ω ⊂ e ⊥ J ⊂ M R , for i ∈ { , . . . , k } , as illustrated in Figures 4.2 and 4.3. Lemma 4.15 .

Let φ be a consistent ( N + , h ) -scattering diagram, such that I φ,n = if n ∉ { e i } i ∈ J . Let σ , σ ∈ Wall

Supp ( h ) such that n σ = n σ = e J . Assume that the joint σ ∩ σ does not belong to J . Then we have φ ( σ ) e J = φ ( σ ) e J .Proof. By consistency of φ applied around the joint σ ∩ σ , the diﬀerence φ ( σ ′ ) e J − φ ( σ ) e J is an element of h e J equal to a sum of iterated Lie brackets in the elements φ ( d k ) , where HE FLOW TREE FORMULA 33 σx + R ≥ ι e J ωσ ∞ x i σ i − ,i σ i,i + ι e J ω ι e J ηe ⊥ J x j i Figure 4.2.

Joints in red on the wall e ⊥ J , the perturbation ι e J ω of ι e J η , andthe half line x + R ≥ ι e J ω in blue. xxxi xie ⊥ J e ⊥ J j i e ⊥ J e ⊥ J j i σ i − ,i Figure 4.3.

Walls intersecting along joints in red on the left and the wall σ i − ,i ⊂ e ⊥ J on the right. d k ∈ Wall

Supp ( h ) are the walls containing σ ∩ σ . As by assumption σ ∩ σ ∉ J , for everysuch wall d k , we have either n d k = e J ′ for J ′ ⊂ I not contained in J , or n d k = e J ′ with J ′ ⊂ J and η ( e J , e J ′ ) =

0. If J ′ ⊂ I is not contained in J , then [ h e J ′ , h ] ∩ h e J = { } and so in thiscase the wall d k does not contribute non-trivially to the sum of iterated Lie brackets. If J ′ ⊂ J and η ( e J ′ , e J ) =

0, then η ( e J ′ , n ) = [ e J ′ , h n ] = n ∈ N such that e J = e J ′ + n , and so also in this case the wall d k does not contribute to the sum of iteratedLie brackets. We conclude that φ ( σ ) e J − φ ( σ ) e J = (cid:3) By Lemma 4.15, for any i ∈ { , . . . , k } , if σ , σ are two walls with n σ = n σ = e J suchthat σ ∩ ( x + R ≥ ι e J ω ) and σ ∩ ( x + R ≥ ι e J ω ) are non-trivial line segments contained in T Evv ′ v ′′ ( v ′ ) ′′ T e J e J e J T ( v ′ ) ′ Figure 4.4.

A tree ˜ T as in the proof of Lemma 4.16. x + [ t i − , t i ] ι e J ω , then φ ( σ ) e J = φ ( σ ) e J . We denote by(4.34) φ i − ,i ∈ h e J this common value. Note that φ ( σ ) e J = φ , . Similarly, for every walls σ , σ with n σ = n σ = e J such that σ ∩ ( x + R ≥ ι e J ω ) and σ ∩ ( x + R ≥ ι e J ω ) are non-trivial line segmentscontained in x + [ t k , ∞ ) ι e J ω , we have φ ( σ ) e J = φ ( σ ) e J , and we denote by φ k, ∞ ∈ h e J (4.35)this common value. Step II:

In this step, we show that the diﬀerences between φ i − ,i and φ i,i + have theform given by (4.36), and we prove that φ k, ∞ = Lemma 4.16 .

Let ω ∈ U I,α as in Defn. 2.15. Let J = J ⊔ ⋅ ⋅ ⋅ ⊔ J s be a partition of J in s subsets such that x i ∈ e ⊥ J ∩ ⋅ ⋅ ⋅ ∩ e ⊥ J s . Then, we have s ≤ .Proof. If s ≥

3, then writing J ′ = J , J ′ = J and J ′ = ⋃ sk = J k , we have J = J ′ ⊔ J ′ ⊔ J ′ and x i ∈ e ⊥ J ′ ∩ e ⊥ J ′ ∩ e ⊥ J ′ . Thus, it is enough to prove that the case s = J = J ⊔ J ⊔ J such that x i ∈ e ⊥ J ∩ e ⊥ J ∩ e ⊥ J . As we are assuming that ( x + R ι e J ω ) ∩ F α,ω is a non-trivial line segment,there exists a tree T ∈ T ηI and an edge E of T such that, denoting by v the vertex of T incident to E on the path from E to the leaves, x is in the interior of j α,ωT ( E ) and thecharge e v as in Defn. 2.8 is given by e v = e J .We choose a tree T ∈ T J ⊔ J such that, denoting by v the child of the root of T , wehave e v ′ = e J and e v ′′ = e J . We also choose a tree T ∈ T J . We construct a new tree˜ T ∈ T ηI from T , T and T as follows (see Figure 4.4). First, let T be the tree obtained byremoving from T all the edges and vertices descendant from v , so that v becomes a leaf of T . Then, we obtain ˜ T by gluing the three trees T , T , and T : we identify the leaf v of T with the roots of T and T . We still denote by v the vertex of ˜ T where T , T and T areglued together, and by E the edge of ˜ T incident to v on the path from v to the root. Wehave e v = e J , and we label v ′ and v ′′ the children of v so that e v ′ = e J + e J , e v ′′ = e J , and ( v ′ ) ′ and ( v ′ ) ′′ the children of v ′ so that e ( v ′ ) ′ = e J and e ( v ′ ) ′′ = e J . HE FLOW TREE FORMULA 35

By (4.30), we have j ˜ T ( v ) = θ α,ω ˜ T ,v and it follows from Lemma 2.12 that j ˜ T ( v ) ∈ ( e J + e J ) ⊥ ∩ e ⊥ J . As we also have j ˜ T ( E ) ⊂ x + R ι e J ω , we deduce that j ˜ T ( v ) is the intersectionpoint of the line x + R ι e J with ( e J + e J ) ⊥ ∩ e ⊥ J and so j ˜ T ( v ) = x i . As we are assuming x i ∈ e ⊥ J ∩ e ⊥ J ∩ e ⊥ J , we have in particular θ α,ω ˜ T ,v ( e J ) =

0, so θ α,ω ˜ T ,v ( e ( v ′ ) ′ ) =

0, in contradictionwith our assumption that ω ∈ U I,α and Defn. 2.15 of U I,α . (cid:3) For every i ∈ { , . . . , k } , we pick a relevant joint j i ∈ J containing the point x i . Byconsistency of φ around the joint j i , the diﬀerence φ i − ,i − φ i,i + can be written in terms ofthe walls containing j i as a sum of iterated Lie brackets. By Lemma 4.16, φ i − ,i − φ i,i + onlyreceives contributions from two-terms decompositions e J = e J + e J . Denote by P j i the setof { J , J } with J , J ⊂ J , J = J ⊔ J , j i ⊂ e ⊥ J ∩ e ⊥ J , and η ( e J , e J ) ≠

0. Then, we have(4.36) φ i − ,i − φ i,i + = ∑ { J ,J }∈ P j i g j i J ,J where g j i J ,J is a scalar multiple of a Lie bracket produced by the walls contained in thehyperplanes e ⊥ J and e ⊥ J and intersecting along the joint j i . It follows from Lemma 4.16that one can compute each term g j i J,J ′ as if the only walls intersecting along the joint j i werecontained in the hyperplanes e ⊥ J , e ⊥ J and e ⊥ J . The precise form of g j i J ,J is given in Lemma4.18 below. Proposition 4.17 .

For ω ∈ U η , we have φ k, ∞ = .Proof. As the set of walls Wall

Supp ( h ) is ﬁnite, there exists a wall σ ∞ ∈ Wall

Supp ( h ) such that n σ ∞ = e J and x + tι e J ω ⊂ σ ∞ for t large enough, as illustrated in Figures 4.2. As σ ∞ is a conein M R , this last condition is only possible if ι e J ω ∈ σ ∞ . As Supp ( h ) ⊂ N + e , it follows fromthe assumption ω ∈ U η and from the Defn. 4.10 of U η that ι e J η ∈ σ ∞ : indeed the conditionthat ω ( e J , n ) has the same sign as η ( e J , n ) for all n ∈ N + e exactly means that there are nohyperplane n ⊥ with n ∈ N + e and separating the points ι e J ω and ι e J ω . Therefore, we haveby Proposition 3.9 that φ ( σ ∞ ) e J = I φ,e J . But we are assuming that I φ,n = n ∉ { e i } i ∈ I and ∣ J ∣ >

1, so I φ,e J =

0. We conclude that φ k, ∞ = φ ( σ ∞ ) e J = (cid:3) Step III:

In this step, we apply the consistency condition for φ around the joint j i through the point x i = x + t i ι e J ω to compute the quantities g j i J ,J appearing in (4.36).We denote by σ i − ,i (resp. σ i,i + ) the wall containing j i such that n σ i − ,i = e J and σ i − ,i ⊂ j i − R ≥ ι e J ω (resp. σ i,i + ⊂ j i + R ≥ ι e J ω ), as illustrated in Figures 4.2 and 4.3. We have φ ( σ i − ,i ) = φ i − ,i and φ ( σ i,i + ) = φ i,i + .Let { J , J } ∈ P j i . We denote by d in , d in , d out and d out the walls containing j i such that n d in = n d out = e J , n d in = n d out = e J ,(4.37) d in ⊂ j i + R ≥ ι e J ω , d in ⊂ j i + R ≥ ι e J ω (4.38) d out ⊂ j i − R ≥ ι e J ω , d out ⊂ j i − R ≥ ι e J ω . σ i,i + σ i − ,i j i p ( ) ι e J ω ι e J ωǫ − ǫ − ǫ − ǫǫ d in d out d out d in ǫ ι e J ω Figure 4.5.

Consistency around the joint j i .By Lemma 4.16, there are no non-trivial decomposition e J = ∑ sj = n j with n j ∈ N + e and j i ⊂ ∩ sj = n ⊥ j , and so it follows from the consistency of φ around j i that φ ( d out ) e J = φ ( d in ) e J .Similarly, we have φ ( d out ) e J = φ ( d in ) e J . Lemma 4.18 .

Let p ∶ [ , ] → M R be a h -generic oriented loop around j i intersectingsuccessively d in , σ i,i + , d in , d out , σ i − ,i , d out (see Figure 4.5). Then, we have (4.39) g j i J ,J = − sgn ( ω ( n , n ))[ φ ( d in ) e J , φ ( d in ) e J ] . Proof.

Denote by ǫ (resp. ǫ and ǫ ) the sign of the derivative of t ↦ − p ( t )( e J ) (resp. − p ( t )( e J ) and − p ( t )( e J ) ) at the intersection point of p with d in (resp. d in and σ i,i + ).According to (3.5), we have(4.40) Ψ p ,φ = e − ǫ φ ( d in ) eJ e − ǫφ i − ,i e − ǫ φ ( d in ) eJ e ǫ φ ( d in ) eJ e ǫφ i,i + e ǫ φ ( d in ) eJ . Therefore, the consistency of φ around j i implies(4.41) ǫ ( φ i,i + − φ i − ,i ) + ǫ ǫ [ φ ( d in ) e J , φ ( d in ) e J ] = g j i J ,J = ǫǫ ǫ [ φ ( d in ) e J , φ ( d in ) e J ] . We show − sgn ( ω ( n , n )) = ǫǫ ǫ in the remaining part of the proof. We work in the planetransverse to j i spanned by ι e J ω , ι e J ω , and we view ( e J , e J ) as coordinates on this plane.Up to smoothly deforming p , one can assume that p intersects p in (resp. σ i,i + and d in ) at HE FLOW TREE FORMULA 37

E TE ′′ v ′′ vE ′ T v ′ e J e J T Figure 4.6.

A tree ˜ T as in the proof of Lemma 4.19.the point j i + ι e J ω (resp. j i + ι e J ω and j i + ι e J ω ), which has coordinates ( − ω ( e J , e J ) , ) (resp. ( − ω ( e J , e J ) , ω ( e J , e J )) and ( , ω ( e J , e J )) ).By deﬁnition, ǫ is minus the sign of variation of the coordinate e J when p crosses d in .When p goes from j i + ι e J ω to j i + ι e J ω , the variation of the coordinate e J is ω ( e J , e J ) ,and so ǫ = − sgn ( ω ( e J , e J )) . Similarly, one checks that ǫ = − sgn ( ω ( e J , e J )) and ǫ = − sgn ( ω ( e J , e J )) . (cid:3) Lemma 4.19 .

We can apply the induction hypothesis to J , d in , x i and J , d in , x i . Hence, φ ( d in ) = A x i ,ωJ (( I φ,e j ) j ∈ J ) , (4.43) φ ( d in ) = A x i ,ωJ (( I φ,e j ) j ∈ J ) . (4.44) Proof.

To show we can apply the induction hypothesis to J , d in , x i and J , d in , x i , we needto show that:(i) the point x i is ( J , η ) -generic and ( J , η ) -generic,(ii) the intersections ( x i + R ι e J ω ) ∩ F α,ω and ( x i + R ι e J ω ) ∩ F α,ω are non-trivial linesegments.To prove (i), ﬁrst note that x i ∈ j i ⊂ e ⊥ J ∩ e ⊥ J . If there were J ′ ⊊ J such that x i ∈ e ⊥ J ′ ,then, writing J = J ′ ⊔ J ′′ , one would have e J = e J ′ + e J ′′ + e J and x i ∈ e ⊥ J ′ ∩ e ⊥ J ′′ ∩ e ⊥ J , incontradiction with Lemma 4.16. Therefore, x i is ( J , η ) -generic. Exchanging the roles of J and J , this also proves that x i is ( J , η ) -generic.To prove (ii), we follow the same logic as in the proof of Lemma 4.16. As we are assumingthat x + R ι e J ω ⊂ F is a non-trivial line segment, there exists a tree T ∈ T ηI and an edge E of T such that, denoting by v the vertex of T incident to E on the path from E to theleaves, x is in the interior of j α,ωT ( E ) and e v = e J .We choose trees T ∈ T J and T ∈ T J . We construct a new tree ˜ T ∈ T ηI from T , T and T as follows (see Figure 4.6). First, let T be the tree obtained by removing from T allthe edges and vertices descendant from v , so that v becomes a leaf of T . Then, we obtain˜ T by gluing the three trees T , T , and T : we identify the leaf v of T with the roots of T and T . We still denote by v the vertex of ˜ T where T , T and T are glued togetherand by E the edge of ˜ T incident to v on the path from v to the root. We have e v = e J and we label v ′ and v ′′ the children of v so that e v ′ = e J and e v ′′ = e J . Let E ′ (resp. E ′′ )be the edge of ˜ T connecting v to v ′ (resp. v ′′ ). We have j ˜ T ( e v ) = θ α,ω ˜ T ,v , and so by Lemma2.12, j ˜ T ( e v ) ∈ e ⊥ J ∩ e ⊥ J . As we also have j ˜ T ( E ) ⊂ x + R ι e J ω , we deduce that j ˜ T ( v ) = x i .We conclude that j ˜ T ( E ′ ) ⊂ ( x i + R ι e J ω ) ∩ F α,ω and j ˜ T ( E ′′ ) ⊂ ( x i + R ι e J ω ) ∩ F α,ω . ByProposition 4.12, j ˜ T ( E ′ ) and j ˜ T ( E ′′ ) are non-trivial line segments and and hence the proofof (ii) follows. (cid:3) Thus, we can rewrite Lemma 4.18 as(4.45) g j i J ,J = − sgn ( ω ( e J , e J ))[ A x i ,ωJ , A x i ,ωJ ](( I φ,e j ) j ∈ J ) . By Defn. 2.23 of the ﬂow tree maps as sum over trees, this can be rewritten as(4.46) g j i J ,J = − ∑ T ∈T ηJ ∑ T ∈T ηJ sgn ( ω ( e J , e J ))[ A x i ,ωJ ,T , A x i ,ωJ ,T ](( I φ,e j ) j ∈ J ) . Step IV:

As a ﬁnal step, we show that(4.47) φ ( σ ) e J = φ k, ∞ + A x,ωJ (( I φ,e j ) j ∈ J ) . To prove (4.47), ﬁrst observe that summing the equations (4.36) side by side for allvalues i ∈ { , . . . , k } we obtain φ ( σ ) e J = φ k, ∞ + ∑ ki = ∑ { J ,J }∈ P j i g j i J ,J . Then, using (4.46),we get(4.48) φ ( σ ) e J = φ k, ∞ − k ∑ i = ∑ { J ,J }∈ P j i ∑ T ∈T ηJ ∑ T ∈T ηJ sgn ( ω ( e J , e J ))[ A x i ,ωJ ,T , A x i ,ωJ ,T ](( I φ,e j ) j ∈ J ) . On the other hand, we have A x,ωJ = ∑ T ∈T ηJ A x,ωJ,T by Defn. 2.23, and so, using Defn. 2.21:(4.49) ∑ T ∈T ηJ A x,ωJ,T = − ∑ T ∈T ηJ sgn ( x ( e v ′ T )) + sgn ( ω ( e v ′ T , e v ′′ T )) [ A x,ωJ,T,v ′ T , A x,ωJ,T,v ′′ T ] , where v T is the child of the root of the tree T , and v ′ T , v ′′ T are the children of v T .Comparing (4.48) and (4.49), it remains to show that k ∑ i = ∑ { J ,J }∈ P j i ∑ T ∈T ηJ ∑ T ∈T ηJ sgn ( ω ( e J , e J ))[ A x i ,ωJ ,T , A x i ,ωJ ,T ] (4.50) = ∑ T ∈T ηJ sgn ( x ( e v ′ T )) + sgn ( ω ( e v ′ T , e v ′′ T )) [ A x,ωJ,T,v ′ T , A x,ωJ,T,v ′′ T ] . (4.51)Given T ∈ T ηJ and writing J = J T,v ′ T and J = J T,v ′′ T , we obtain a tree T ∈ T J (resp. T ∈ T J ) by considering the subtree of T made of v T and its descendant through the child v ′ T (resp. v ′′ T ) (see Figure 4.7). If the contribution of T in (4.51) is nonzero, we have infact T ∈ T ηJ and T ∈ T ηJ . We claim that x ( e J ) and ω ( e J , e J ) are of the same sign if and HE FLOW TREE FORMULA 39 TT T e J e J Figure 4.7.

Trees T , T and T .only if the intersection point of the line x + R ι e J ω with e ⊥ J ∩ e ⊥ J is contained in the half-line x + R ≥ ι e J ω . Indeed, the intersection point of the line x + R ι e J ω with e ⊥ J ∩ e ⊥ J is the point(4.52) x − x ( e J ) ω ( e J , e J ) ι e J ω . Thus, if sgn ( x ( e J )) + sgn ( ω ( e J , e J )) ≠

0, the intersection point of the line x + R ι e J ω with e ⊥ J ∩ e ⊥ J is equal x i for some 1 ≤ i ≤ k such that { J , J } ∈ j i , and we have(4.53) x i = x − x ( e J ) ω ( e J , e J ) ι e J ω = θ x,ωT,v . Then, it follows from Defn. 2.21 and 2.23 that A x i ,ωJ ,T = A x,ωJ,T,v ′ T and A x i ,ωJ ,T = A x,ωJ,T,v ′′ T . Con-versely, for every 1 ≤ i ≤ k and { J , J } ∈ P j i , every T ∈ T ηJ and T ∈ T ηJ are obtained inthis way. Hence, (4.47) follows.From (4.47) together with Proposition 4.17, we obtain φ ( σ ) e J = A x,ωJ (( I φ,e j ) j ∈ J ) and soTheorem 4.14 holds for J , σ and x . Hence, this concludes our proof of Theorem 4.14. (cid:3) The ﬂow tree formula for scattering diagrams.Deﬁnition 4.20.

A point τ ∈ γ ⊥ ⊂ M R is γ -generic if for every γ ′ ∈ N , θ ( γ ′ ) = γ ′ is collinear with γ . Lemma 4.21 .

Let τ ∈ γ ⊥ ⊂ M R be a γ -generic point as in Defn. 4.20. Then, the image α ∶ = q ( τ ) ∈ e ⊥ I ⊂ M R of τ by the map q ∶ M R → M R given by (4.4) is ( I, η ) -generic as inDefn. 2.14.Proof. Assume by contradiction that α is not ( I, η ) -generic, which means by Defn. 2.14that there exists a tree T ∈ T ηI such that α ( e v ′ ) =

0, where v is the child of the root of T .Thus, we have τ ( p ( e v ′ )) =

0, that is, τ ∈ p ( e v ′ ) ⊥ , and so the condition that τ is γ -genericimplies by Defn. 4.20 that p ( e v ′ ) is collinear with γ = p ( e I ) . Recalling that e v = e I , thisimplies that η ( e v ′ , e v ) = η ( e v ′ , e I ) = ⟨ p ( e v ′ ) , p ( e I )⟩ =

0, in contradiction with the assumptionthat T ∈ T ηI and the Defn. 2.13 of T ηI . (cid:3) Let τ ∈ γ ⊥ be a γ -generic point as in Defn. 4.20. By Lemma 4.21, the point α ∶ = q ( τ ) ∈ e ⊥ I is ( I, η ) -generic. Therefore, by Proposition 2.18 the set U I,α of ( I, α ) -generic skew-symmetricbilinear form is open and dense in ⋀ M R , and for every ω ∈ U I,α the ﬂow tree map A α,ωI ∶ ∏ i ∈ I h e i → h e is deﬁned by Defn. 2.23.Finally, we arrive at our main theorem of this section, the ﬂow tree formula for scatteringdiagrams I: Theorem 4.22 .

Let d ∈ Wall

Supp ( g ) be a wall in M R and Γ = { γ i } i ∈ I ∈ mult ( N + ) a multisetof elements of N + such that d ⊂ γ ⊥ , where γ = ∑ i ∈ I γ i . Let τ ∈ d be a γ -generic point and α ∶ = q ( τ ) ∈ M R the image of τ by the map q ∶ M R → M R as in (4.4) . For every smallenough generic perturbation ω ∈ U I,α ∩ U η of η as in 4.3.1, the map F g , d Γ in (3.14) is givenby the “ﬂow tree formula for scattering diagrams I”: (4.54) F g , d Γ = ∏ n ∈ N + m Γ ( n ) ! ˆ A α,ωI . where ˆ A α,ωI is as in Defn. 4.8 the specialization of the ﬂow tree map A α,ωI deﬁned in Defn.2.23.Proof. Let e ∈ Wall

Supp ( h ) be a wall in M R containing q ( d ) such that e ⊂ e ⊥ I . In particular,we have α ∈ e . By Theorem 4.9, we have(4.55) F g , d Γ = ∏ n ∈ N + m Γ ( n ) ! ˆ F h , e Γ e . On the other hand, as α is ( I, η ) -generic by Lemma 4.21, we can apply Theorem 4.14 for J = I , σ = e , x = α , and we obtain(4.56) F h , e Γ e = A α,ωI . The result follows from (4.55) and (4.56). (cid:3)

We provide also a variant of the ﬂow tree formula for scattering diagrams, the ﬂow treeformula for scattering diagrams II, which involves perturbing the points in M R rather thanthe skew-symmetric bilinear form, as in Theorem 4.22.Note that from Proposition 2.20 that the set V I,η of β ∈ e ⊥ I ⊂ M R such that β is ( I, η ) -generic and η is β -generic is open and dense in e ⊥ I . For every β ∈ V I,η , we deﬁne the ﬂowtree maps A β,ηI ∶ ∏ i ∈ I h e i → h e as in Defn. 2.23 and its specialization ˆ A β,ηI ∶ ∏ n ∈ Γ g n → g γ asin Defn. 4.8. For every β ∈ V I,η , we deﬁne F β,η as F α,ω in 4.31 and replacing α with β ,and ω with η . We also deﬁne V α ⊂ e ⊥ I as the set of β ∈ e ⊥ I such that there exists a wall e ∈ Wall

Supp ( h ) with e ⊂ e ⊥ I which contains both α and β . We have α ∈ V α and V α is anopen neighborhood of α in e ⊥ I . We say that β is a small enough generic perturbation of α in e ⊥ I if(4.57) β ∈ V I,α ∩ V α . HE FLOW TREE FORMULA 41

Theorem 4.23 .

Fix a ( I, η ) -generic point α ∈ e ⊥ I ⊂ M R as in Defn. 2.14 and a smallenough generic perturbation β ∈ V I,α ∩ V α of α in e ⊥ I . Let J ⊂ I be a nonempty index set,and x ∈ e ⊥ J a ( J, η ) -generic point such that x ∈ F β,η and the line segment ( x + R ι e J ω ) ∩ F β,η is not a point. Let σ ∈ Wall

Supp ( h ) be a wall containing x and with normal vector n σ = e J .Then for every consistent ( N + , h ) -scattering diagram φ such that I φ,n = if n ∉ { e i } i ∈ I , wehave (4.58) φ ( σ ) e J = A x,ηJ (( I φ,e i ) i ∈ J ) Proof.

The proof is analogous to the proof of Theorem 4.14, with α , ω replaced respectivelyby β , η , and with an extra simpliﬁcation in Proposition 4.17: for t positive large enough, x + tι e J η is contained in a wall σ ∞ , which thus necessarily contains ι e J η and so φ k, ∞ = (cid:3) Theorem 4.24 .

Let d ∈ Wall

Supp ( g ) be a wall in M R and Γ = { γ i } i ∈ I ∈ mult ( N + ) a multisetof elements of N + such that d ⊂ γ ⊥ , where γ = ∑ i ∈ I γ i . Let τ ∈ d be a γ -generic point and α ∶ = q ( τ ) ∈ M R the image of τ by the map q ∶ M R → M R as in (4.4) . For every smallenough generic perturbation β ∈ V I,α ∩ V α of α in e ⊥ I , the universal map F g , d Γ in (3.14) isgiven by by the “ﬂow tree formula for scattering diagrams II”: (4.59) F g , d Γ = ∏ n ∈ N + m Γ ( n ) ! ˆ A β,ηI . Proof.

Let e ∈ Wall

Supp ( h ) be a wall in M R such that e ⊂ e ⊥ I and containing both q ( d ) and β . By Theorem 4.9, we have(4.60) F g , d Γ = ∏ n ∈ N + m Γ ( n ) ! ˆ F h , e Γ e . On the other hand, as α is ( I, η ) -generic by Lemma 4.21, we can apply Theorem 4.23 for J = I , σ = e , x = β , and we obtain(4.61) F h , e Γ e = A β,ηI . The result follows from (4.60) and (4.61). (cid:3)

Remark . We compare brieﬂy the passage from scattering diagrams in N to scatteringdiagrams in N and the perturbation of scattering diagrams introduced in [37]. Usingour notations, the perturbation of [37] consists in replacing the hyperplanes γ ⊥ i = { θ ∈ M R ∣ θ ( γ i ) = } by the aﬃne hyperplanes { θ ∈ M R ∣ θ ( γ i ) = ǫ i } where ǫ i ∈ R are genericperturbation parameters. On the other hand, denoting by K the kernel of p ∶ N → N , weobtain by duality a surjective map π ∶ M R → K ∨ R , where K ∨ R ∶ = Hom ( K, R ) . We claim thatour scattering diagram in M R is a universal family of perturbed scattering diagrams in thesense of [37]. Indeed, ﬁxing ǫ ∈ K ∨ R is equivalent to ﬁxing the perturbation parameters ǫ i of [37], and the intersections of our scattering diagram in M R with the ﬁbers π − ( ǫ ) areessentially the perturbed scattering diagrams of [37]. The embedded trees j β,ηT ( T ○ ) used in the proof of Theorem 4.24 are all contained in theﬁber π − ( π ( β )) of π . Indeed, all edges have directions of the form ι e v η , and so for every k ∈ K , we have ι e v η ( k ) = η ( e v , k ) = η is the pullback of ⟨ − , − ⟩ by p . Therefore,these embedded trees viewed inside π − ( π ( β )) essentially coincide with the tropical curvescontained in the perturbed scattering diagrams considered in [37] (see also [17, 49]).By contrast, the embedded trees j α,ωT ( T ○ ) used in the proof of Theorem 4.22 are notcontained in a given ﬁber of π in general: one cannot use the perturbed scattering diagramsin the sense of [37] and it is essential to work with scattering diagrams in M R .5. The flow tree formula for DT invariants In § § § § Quivers with potentials. A quiver Q is a ﬁnite oriented graph. A potential W ∈ C Q for Q is a ﬁnite linear combination of oriented cycles of Q in the path algebra C Q of Q .We denote by Q the set of vertices of Q , and set N ∶ = Z Q , with dual M R ∶ = Hom ( N, R ) ,and(5.1) N + ∶ = N Q /{ } ⊂ N .

Deﬁnition 5.1. A representation E of Q is a ﬁnite-dimensional left-module over the pathalgebra C Q , that is, the data of a ﬁnite-dimensional C -vector space E i for each vertex i ∈ Q and of a linear map f α ∶ E i → E j for every arrow α ∶ i → j in Q . Every nonzerorepresentation of Q has a dimension vector ( dim E i ) i ∈ Q ∈ N + . Deﬁnition 5.2.

Given γ ∈ N + and a stability parameter θ ∈ γ ⊥ = { θ ′ ∈ M R ∣ θ ′ ( γ ) = } ,a representation E of Q of dimension vector γ is θ - semistable (resp. θ - stable ) if for everystrict subrepresentation F ⊊ E , we have θ ( F ) ≤ θ ( F ) < M θ − stγ parametrizingisomorphism classes of θ -stable representations of Q of dimension vector γ , and a generallysingular quasiprojective variety M θγ parametrizing S-equivalence classes of θ -semistablerepresentations of Q of dimension vector γ . A potential W ∈ C Q deﬁnes regular functionsTr ( W ) θγ on the moduli spaces M θγ as follows: Given a representation E = ( E i , f α ) i,α ∈ M θγ and an a oriented cycle c = α r . . . α in Q starting and ending at the vertex i ∈ Q , thecomposition(5.2) f c ∶ = f α r ○ ⋅ ⋅ ⋅ ○ f α HE FLOW TREE FORMULA 43 of the linear maps f α i along the arrows of the cycle is an endomorphism of E i , and wedeﬁne the evaluation of the function Tr ( c ) θγ on E as being the trace of this endomorphism.More generally, W is a linear combination ∑ k a k c k of oriented cycles c k and we deﬁneTr ( W ) θγ by linearity, that is, Tr ( W ) θγ ∶ = ∑ k a k Tr ( c k ) θγ .5.2. DT invariants of quivers with potentials and ﬂow trees.

Let ( Q, W ) be aquiver with potential, γ ∈ N + a dimension vector and θ ∈ γ ⊥ ⊂ M R a stability parameter.We assume that θ is γ -generic in the sense that θ ( γ ′ ) = γ ′ collinear with γ . Then,the (reﬁned) Donaldson-Thomas invariant of ( Q, W ) for the dimension vector γ and thestability parameter θ is a Laurent polynomial(5.3) Ω θγ ( y, t ) ∈ Z [ y ± , t ± ] in two variables y and t , and with integer coeﬃcients. In the ideal case where M θγ issmooth and the critical locus of Tr ( W ) θγ is non-degenerate, Ω θγ ( y, t ) coincides with the(signed symmetrized) Hodge polynomial of the critical locus of Tr ( W ) θγ . In general, thesingularities of M θγ and the degeneracy of the critical locus require respectively the use ofthe theory of perverse sheaves [10] and of the theory of vanishing cycles [22]. We will ina moment review the deﬁnition of Ω θγ ( y, t ) following the approach of [20, 54] and referringto [20] for technical details.We deﬁne the DT sheaf DT θγ on M θγ by(5.4) DT θγ = ⎧⎪⎪⎨⎪⎪⎩ φ Tr ( W ) θγ ( IC M θγ ) if M θ − stγ ≠ ∅ , where IC M θd denotes the intersection cohomology sheaf on M θγ and φ Tr ( W ) θγ is the vanishingcycle functor deﬁned by the function(5.5) Tr ( W ) θγ ∶ M θγ → C . The cohomological DT invariant DT θγ is then deﬁned as the cohomology of the DT sheaf:(5.6) DT θγ ∶ = H ∗ ( M θγ , DT θγ ) . By Saito’s theory of mixed Hodge modules [62], the graded vector space DT θγ is natu-rally endowed with a (monodromic) mixed Hodge structure, and so in particular with anincreasing weight ﬁltration W and a decreasing Hodge ﬁltration F . The Hodge-Delignenumbers of DT θγ are(5.7) h p,q ∶ = ∑ i ∈ Z ( − ) i dim Gr p F Gr W p + q H i ( M θγ , DT θγ ) , where Gr ∗ F and Gr W ∗ are the graded pieces of the ﬁltrations F and W . The (reﬁned) DTinvariant Ω θγ ( y, t ) is by deﬁnition a Laurent polynomial with coeﬃcients the Hodge-Deligne numbers of DT θγ :(5.8) Ω θγ ( y, t ) ∶ = ∑ p,q h p,q y p + q t p − q ∈ Z [ y ± , t ± ] . The ﬂow tree formula is more naturally formulated in terms of the rational DT invariantsΩ θγ ( y, t ) ∈ Q ( y, t ) deﬁned by(5.9) Ω θγ ( y, t ) ∶ = ∑ γ ′ ∈ N + γ = kγ ′ , k ∈ Z ≥ k y − y − y k − y − k Ω θγ ′ ( y k , t k ) . It is proved in [20] that the dependence on θ of the invariants Ω θγ ( y, t ) is given by thewall-crossing formula of Joyce-Song and Kontsevich-Soibelman, and that the invariantsΩ θγ ( y, t ) coincide with those previously deﬁned in [40, 45] using the motivic Hall algebra.5.3. Attractor invariants and the ﬂow tree formula.

In this section we state ourmain result, the ﬂow tree formula in Theorem 5.5, which expresses the DT invariants interms of a smaller subset of invariants, referred to as attractor invariants and deﬁned asfollows.Let ⟨ − , − ⟩ ∶ N × N → Z be the skew-symmetric bilinear form deﬁned by(5.10) ⟨ γ, γ ′ ⟩ ∶ = ∑ i,j ∈ Q ( a ij − a ji ) γ i γ ′ j , where a ij is the number of arrows in Q from the vertex i to the vertex j . Deﬁnition 5.3.

For every γ ∈ N + , the rational attractor invariant Ω ∗ γ ( y, t ) is deﬁned by(5.11) Ω ∗ γ ( y, t ) ∶ = Ω θ γ γ ( y, t ) , where Ω θ γ γ ( y, t ) is as in (5.9), and θ γ is a small γ -generic perturbation of the attractor point ⟨ γ, − ⟩ ∈ M R . Remark . The deﬁnition 5.3 of rational attractor invariants is independent of the choiceof the small γ -generic perturbation (see [57, Theorem 3.1]): indeed, if there is a wall ofmarginal stability associated to a decomposition γ = γ ′ + γ ′ passing through the attractorpoint ⟨ γ, − ⟩ , then ⟨ γ, γ ′ ⟩ = θγ ( y, t ) does not jump through this wall according to thewall-crossing formula. Replacing Ω θ γ γ ( y, t ) in Defn. 5.3 by Ω θ γ γ ( y, t ) in (5.8), we obatin thedeﬁnition of an attractor invariants , which are related to rational attractor invariants viathe formula (5.9). In what follows, we often make use of the rational attractor invariants,which suit better to wall-crossing computations.By iteration of the wall-crossing formula, the DT invariants Ω θγ ( y, t ) for any γ -genericstability parameter θ ∈ γ ⊥ can be expressed in terms of the attractor invariants Ω ∗ γ by a HE FLOW TREE FORMULA 45 formula of the form(5.12) Ω θγ ( y, t ) = ∑ r ≥ ∑ { γ i } ≤ i ≤ r ∑ ri = γ i = γ ∣ Aut ({ γ i } i )∣ F θr ( γ , . . . , γ r ) r ∏ i = Ω ∗ γ i ( y, t ) , where the second sum is over the multisets { γ i } ≤ i ≤ r with γ i ∈ N and ∑ ri = γ i = γ . Here, thedenominator ∣ Aut ({ γ i } i )∣ is the order of the symmetry group of { γ i } : if m γ ′ is the numberof times that γ ′ ∈ N appears in { γ i } i , then ∣ Aut ({ γ i } i )∣ = ∏ γ ′ ∈ N m γ ′ !. The coeﬃcients F θr ( γ , . . . , γ r ) are universal in the sense that they depend on ( Q, W ) only through theskew-symmetric form ⟨ − , − ⟩ on N . The ﬂow tree formula gives an explicit formula forcoeﬃcients F θr ( γ , . . . , γ r ) as a sum over binary trees. We state the ﬂow tree formula inTheorem 5.5 after introducing some notation.Let γ , . . . , γ r ∈ N such that ∑ ri = γ i = γ . As in (4.2)-(4.4), we set I ∶ = { , . . . , r } andwe introduce a rank r free abelian group N = ⊕ i ∈ I Z e i , along with the map p ∶ N → N as in (4.2) and the map q ∶ M R → M R = Hom ( N , R ) deﬁned as in (4.4). We also deﬁne askew-symmetric bilinear form η ∈ ⋀ M on N by η ( e i , e j ) ∶ = ⟨ γ i , γ j ⟩ , and consider the image α of the stability parameter θ by q :(5.13) α ∶ = q ( θ ) ∈ M R . By Lemma 4.21 the assumption that θ is γ -generic implies that α is ( I, η ) -generic and sowe can consider a small enough generic perturbation ω ∈ U I,α ∩ U η of η as in Defn. 2.15and Defn. 4.10.In the following theorem we state our main result, the ﬂow tree formula , which pro-vides an explicit description for the universal coeﬃcient F θr ( γ , . . . , γ r ) that appears in theformula (1.7) expressing the DT invariants Ω θγ ( y, t ) in terms of the attractor invariantsΩ ∗ γ i ( y, t ) . Theorem 5.5 .

For every small enough generic perturbation ω ∈ U I,α ∩ U η ⊂ ⋀ M R of η ∈ ⋀ M R , the universal coeﬃcients F θr ( γ , . . . , γ r ) in (1.7) are given by the ﬂow treeformula : (5.14) F θr ( γ , . . . , γ r ) = ∑ T ∈T ηr ∏ v ∈ V ○ T ǫ α,ωT,v κ ( η ( e v ′ , e v ′′ )) , where the sum is over binary trees as in § ǫ α,ωT,v ∈ { , , − } is as in (2.23) and (5.15) κ ( x ) ∶ = ( − ) x ⋅ y x − y − x y − y − for every x ∈ Z . The ﬂow tree formula stated in Theorem 5.5 was conjectured by Alexandrov and Piolinein [2]. The assumption ω ∈ U I,α ∩ U η in Theorem 5.5 makes precise and explicit theconditions “small enough” and “generic” which were left slightly vague in the original formulation of the conjecture in [2]: ω ∈ U η is the condition “small enough”, and ω ∈ U I,α is the condition “generic”.We also prove a variant of the ﬂow tree formula recently conjectured by Mozgovoy [56]in which one perturbs points in M R rather than the skew-symmetric form. Recall thatwe denote e I ∶ = ∑ i ∈ I e i . By Proposition 2.20, the set V I,η of β ∈ e ⊥ I ⊂ M R such that β is ( I, η ) -generic and η is β -generic is open and dense in e ⊥ I . Finally, we denote by V α theopen neighborhood of α in e ⊥ I deﬁned by: β ∈ V α if and only if for every n ∈ N + e such that α ( n ) is nonzero, β ( n ) is nonzero and of the same sign as α ( n ) . Theorem 5.6 .

For every small enough generic perturbation β ∈ V I,η ∩ V α of α in e ⊥ I , theuniversal coeﬃcient F θr ( γ , . . . , γ r ) which appears in the formula (1.7) expressing the DTinvariants Ω θγ ( y, t ) in terms of the attractor invariants Ω ∗ γ i ( y, t ) is given by: (5.16) F θr ( γ , . . . , γ r ) = ∑ T ∈T ηr ∏ v ∈ V ○ T ǫ β,ηT,v κ ( η ( e v ′ , e v ′′ )) , where the sum is over binary trees as in § ǫ α,ωT,v is as in (1.11) and κ is as in (5.15) . In Theorem 5.6, the assumption β ∈ V I,η ∩ V α makes precise and explicit the expres-sion “small enough generic perturbation” used in the statement of Theorem 1.2 given inthe introduction: β ∈ V α is the condition “small enough”, and β ∈ V I,η is the condition“generic”.5.4.

Proofs of Theorems 5.5 and 5.6.

We derive the proof of the ﬂow tree formula inTheorem 5.5 (and of its variant in Theorem 5.6), from the ﬂow tree formula for scatteringdiagrams in Theorem 4.22 (and from its variant in Theorem 4.24 respectively). We dothis by applying the latter formulas to the stability scattering diagram, which is a ( N + , g ) -scattering diagram as in Defn. 3.2, introduced by Bridgeland. We roughly review itsdescription here, and for details refer to [13].Let ( Q, W ) be a quiver with potential, and γ ∈ N + be a dimension vector. Deﬁne a N + -graded Lie algebra over Q ( y, t ) by(5.17) ˜ g ∶ = ⊕ n ∈ N + Q ( y, t ) z n , where the Lie bracket [ − , − ] is given by(5.18) [ z n , z n ] ∶ = κ (⟨ n , n ⟩) z n + n . where κ is as in (5.15). Let δ ∶ N → Z be an additive map such that δ ( N + ) ⊂ Z ≥ . Then(5.19) ˜ g > n ( γ ) ∶ = ⊕ n ∈ N + δ ( n )> δ ( γ ) Q ( y, t ) z n is a Lie ideal of ˜ g and we consider the quotient Lie algebra(5.20) g ∶ = ˜ g / ˜ g > δ ( γ ) , HE FLOW TREE FORMULA 47 which is ﬁnitely N + -graded. The support of g is Supp ( g ) = { n ∈ N + ∣ δ ( n ) ≤ δ ( γ )} .For every wall d ∈ Wall

Supp ( g ) , pick a point x d ∈ d such that x d ∉ d ′ for all d ′ ∈ Wall

Supp ( g ) distinct from d . The stability scattering diagram (5.21) φ ∶ Wall

Supp ( g ) Ð→ g is deﬁned by(5.22) φ ( d ) ∶ = ∑ k ≥ δ ( kn d )≤ δ ( γ ) Ω x d kn d ( y, t ) z kn d , for every wall d ∈ Wall

Supp ( g ) , where Ω x d kn d ( y, t ) are rational DT invariants deﬁned as in(5.9). The deﬁnition of φ is in fact independent of the choices of the points x d : by thewall-crossing formula, the DT invariants Ω θn ( y, t ) with δ ( n ) ≤ δ ( γ ) do not jump as longas θ stays in the interior of a wall d ∈ Wall

Supp ( g ) . The following key theorem is due toBridgeland [13, Thm 1.1]: Theorem 5.7 (Bridgeland, 2016).

The stability scattering diagram is consistent.

Hence, by Theorem 5.7, we can apply Theorems 4.22 and 4.24 to the stability scatter-ing diagram φ . By Proposition 3.9, the initial data of φ are given by the attractor DTinvariants:(5.23) I φ,n = Ω ∗ n ( y, t ) z n , for every n ∈ N + with δ ( n ) ≤ γ , and so Theorems 5.5 and 5.6 follow. References [1] Sergei Alexandrov, Jan Manschot, and Boris Pioline. S-duality and reﬁned BPS indices. arXiv preprintarXiv:1910.03098 , 2019.[2] Sergei Alexandrov and Boris Pioline. Attractor ﬂow trees, BPS indices and quivers.

Adv. Theor. Math.Phys. , 23(3):627–699, 2019.[3] Sergei Alexandrov and Boris Pioline. Black holes and higher depth mock modular forms.

Comm.Math. Phys. , 374(2):549–625, 2020.[4] Murad Alim, Sergio Cecotti, Clay C´ordova, Sam Espahbodi, Ashwin Rastogi, and Cumrun Vafa. BPSquivers and spectra of complete

N =

Comm. Math. Phys. , 323(3):1185–1227,2013.[5] Murad Alim, Sergio Cecotti, Clay C´ordova, Sam Espahbodi, Ashwin Rastogi, and Cumrun Vafa.

N =

Adv. Theor. Math. Phys. , 18(1):27–127, 2014.[6] H¨ulya Arg¨uz and Mark Gross. The higher dimensional tropical vertex. arXiv preprintarXiv:2007.08347 , 2020.[7] Paul S. Aspinwall, Tom Bridgeland, Alastair Craw, Michael R. Douglas, Mark Gross, Anton Kapustin,Gregory W. Moore, Graeme Segal, Bal´azs Szendr˝oi, and P. M. H. Wilson.

Dirichlet branes and mirrorsymmetry , volume 4 of

Clay Mathematics Monographs . American Mathematical Society, Providence,RI; Clay Mathematics Institute, Cambridge, MA, 2009. [8] Guillaume Beaujard, Jan Manschot, and Boris Pioline. Vafa-Witten invariants from exceptional col-lections. arXiv preprint arXiv:2004.14466 , 2020.[9] Iosif Bena, Micha Berkooz, Jan de Boer, Sheer El-Showk, and Dieter Van den Bleeken. Scaling BPSsolutions and pure-Higgs states.

J. High Energy Phys. , (11):171, front matter + 36, 2012.[10] A. A. Be˘ılinson, J. Bernstein, and P. Deligne. Faisceaux pervers. In

Analysis and topology on singularspaces, I (Luminy, 1981) , volume 100 of

Ast´erisque , pages 5–171. Soc. Math. France, Paris, 1982.[11] Pierrick Bousseau. The quantum tropical vertex.

Geom. Topol. , 24(3):1297–1379, 2020.[12] Tom Bridgeland. Stability conditions on triangulated categories.

Ann. of Math. (2) , 166(2):317–345,2007.[13] Tom Bridgeland. Scattering diagrams, Hall algebras and stability conditions.

Algebr. Geom. , 4(5):523–561, 2017.[14] Michael Carl, Max Pumperla, and Bernd Siebert. A tropical view of Landau-Ginzburg models. , 2010.[15] Sergio Cecotti, Andrew Neitzke, and Cumrun Vafa. R-twisting and 4d/2d correspondences. arXivpreprint arXiv:1006.3435 , 2010.[16] Sergio Cecotti and Cumrun Vafa. Classiﬁcation of complete N = Surveys in diﬀerential geometry. Geometry and topology , volume 18 of

Surv. Diﬀer.Geom. , pages 19–101. Int. Press, Somerville, MA, 2013.[17] Man-Wai Cheung and Travis Mandel. Donaldson-Thomas invariants from tropical disks.

Selecta Math.(N.S.) , 26(4):Paper No. 57, 46, 2020.[18] Ben Davison and Travis Mandel. Strong positivity for quantum theta bases of quantum cluster alge-bras. arXiv preprint arXiv:1910.12915 , 2019.[19] Ben Davison and Sven Meinhardt. Donaldson-Thomas theory for categories of homological dimensionone with potential. arXiv preprint arXiv:1512.08898 , 2015.[20] Ben Davison and Sven Meinhardt. Cohomological Donaldson-Thomas theory of a quiver with potentialand quantum enveloping algebras.

Invent. Math. , 221(3):777–871, 2020.[21] Jan de Boer, Sheer El-Showk, Ilies Messamah, and Dieter Van den Bleeken. Quantizing N = J. High Energy Phys. , (5):002, 63, 2009.[22] Pierre Deligne and N Katz. Groupes de monodromie en g´eom´etrie alg´ebrique (SGA VII, 2) lecturenotes in math. 340, 1973.[23] Frederik Denef. Supergravity ﬂows and D-brane stability.

J. High Energy Phys. , (8):Paper 50, 40,2000.[24] Frederik Denef. Quantum quivers and Hall/hole halos.

J. High Energy Phys. , (10):023, 42, 2002.[25] Frederik Denef, Brian Greene, and Mark Raugas. Split attractor ﬂows and the spectrum of BPSD-branes on the quintic.

J. High Energy Phys. , (5):Paper 12, 47, 2001.[26] Frederik Denef and Gregory W. Moore. Split states, entropy enigmas, holes and halos.

J. High EnergyPhys. , (11):129, i, 152, 2011.[27] Harm Derksen, Jerzy Weyman, and Andrei Zelevinsky. Quivers with potentials and their representa-tions. I. Mutations.

Selecta Math. (N.S.) , 14(1):59–119, 2008.[28] Simon K Donaldson and Richard P Thomas. Gauge theory in higher dimensions.

Oxford UniversityPress. , 1998.[29] Sergio Ferrara, Renata Kallosh, and Andrew Strominger. N = Phys. Rev. D(3) , 52(10):R5412–R5416, 1995.

HE FLOW TREE FORMULA 49 [30] Sara. A. Filippini and Jacopo Stoppa. Block-G¨ottsche invariants from wall-crossing.

Compos. Math. ,151(8):1543–1567, 2015.[31] Bartomeu Fiol. The BPS spectrum of N = SU ( N ) SYM.

J. High Energy Phys. , (2):065, 23, 2006.[32] Victor Ginzburg. Calabi-Yau algebras. arXiv preprint arXiv:0612139 , 2006.[33] Mark Gross. Mirror symmetry for P and tropical geometry. Adv. Math. , 224(1):169–245, 2010.[34] Mark Gross, Paul Hacking, Sean Keel, and Maxim Kontsevich. Canonical bases for cluster algebras.

J. Amer. Math. Soc. , 31(2):497–608, 2018.[35] Mark Gross, Paul Hacking, and Bernd Siebert. Theta functions on varieties with eﬀective anti-canonical class. arXiv preprint arXiv:1601.07081 , 2016.[36] Mark Gross and Rahul Pandharipande. Quivers, curves, and the tropical vertex.

Port. Math. ,67(2):211–259, 2010.[37] Mark Gross, Rahul Pandharipande, and Bernd Siebert. The tropical vertex.

Duke Math. J. ,153(2):297–362, 2010.[38] Mark Gross and Bernd Siebert. From real aﬃne geometry to complex geometry.

Ann. of Math. (2) ,174(3):1301–1428, 2011.[39] Dominic Joyce. On counting special Lagrangian homology 3-spheres. In

Topology and geometry: com-memorating SISTAG , volume 314 of

Contemp. Math. , pages 125–151. Amer. Math. Soc., Providence,RI, 2002.[40] Dominic Joyce and Yinan Song. A theory of generalized Donaldson-Thomas invariants.

Mem. Amer.Math. Soc. , 217(1020):iv+199, 2012.[41] Sean Keel and Tony Yue Yu. The Frobenius structure theorem for aﬃne log Calabi-Yau varietiescontaining a torus. arXiv preprint arXiv:1908.09861 , 2019.[42] Bernhard Keller. Calabi-Yau triangulated categories. In

Trends in representation theory of algebrasand related topics , EMS Ser. Congr. Rep., pages 467–489. Eur. Math. Soc., Z¨urich, 2008.[43] A. D. King. Moduli of representations of ﬁnite-dimensional algebras.

Quart. J. Math. Oxford Ser. (2) ,45(180):515–530, 1994.[44] Maxim Kontsevich and Yan Soibelman. Aﬃne structures and non-Archimedean analytic spaces. In

The unity of mathematics , volume 244 of

Progr. Math. , pages 321–385. Birkh¨auser Boston, Boston,MA, 2006.[45] Maxim Kontsevich and Yan Soibelman. Stability structures, motivic Donaldson-Thomas invariantsand cluster transformations. arXiv preprint arXiv:0811.2435 , 2008.[46] Maxim Kontsevich and Yan Soibelman. Wall-crossing structures in Donaldson-Thomas invariants,integrable systems and mirror symmetry. In

Homological mirror symmetry and tropical geometry ,volume 15 of

Lect. Notes Unione Mat. Ital. , pages 197–308. Springer, Cham, 2014.[47] Seung-Joo Lee, Zhao-Long Wang, and Piljin Yi. BPS states, reﬁned indices, and quiver invariants.

J.High Energy Phys. , (10):094, front matter + 42, 2012.[48] Seung-Joo Lee, Zhao-Long Wang, and Piljin Yi. Quiver invariants from intrinsic Higgs states.

J. HighEnergy Phys. , (7):169, front matter+18, 2012.[49] Travis Mandel. Scattering diagrams, theta functions, and reﬁned tropical curve counts. arXiv preprintarXiv:1503.06183 , 2015.[50] Jan Manschot, Boris Pioline, and Ashoke Sen. Wall crossing from Boltzmann black hole halos.

J. HighEnergy Phys. , (7):059, 73, 2011.[51] Jan Manschot, Boris Pioline, and Ashoke Sen. From black holes to quivers.

J. High Energy Phys. ,(11):023, front matter + 53, 2012. [52] Jan Manschot, Boris Pioline, and Ashoke Sen. On the Coulomb and Higgs branch formulae for multi-centered black holes and quiver invariants.

J. High Energy Phys. , (5):166, front matter+42, 2013.[53] Jan Manschot, Boris Pioline, and Ashoke Sen. Generalized quiver mutations and single-centeredindices.

Journal of High Energy Physics , 2014(1):50, 2014.[54] Sven Meinhardt and Markus Reineke. Donaldson-Thomas invariants versus intersection cohomologyof quiver moduli.

J. Reine Angew. Math. , 754:143–178, 2019.[55] Lang Mou. Scattering diagrams of quivers with potentials and mutations. arXiv preprintarXiv:1910.13714 , 2019.[56] Sergey Mozgovoy. Operadic approach to wall-crossing. arXiv preprint arXiv:2101.07636 , 2021.[57] Sergey Mozgovoy and Boris Pioline. Attractor invariants, brane tilings and crystals. arXiv preprintarXiv:2012.14358 , 2020.[58] Takeo Nishinou and Bernd Siebert. Toric degenerations of toric varieties and tropical curves.

DukeMath. J. , 135(1):1–51, 2006.[59] Boris Pioline. Mathematica Package CoulombHiggs. ,2020.[60] Markus Reineke. Poisson automorphisms and quiver moduli.

J. Inst. Math. Jussieu , 9(3):653–667,2010.[61] Markus Reineke. Cohomology of quiver moduli, functional equations, and integrality of Donaldson-Thomas type invariants.

Compos. Math. , 147(3):943–964, 2011.[62] Morihiko Saito. Mixed Hodge modules.

Publ. Res. Inst. Math. Sci. , 26(2):221–333, 1990.[63] Andrew Strominger. Macroscopic entropy of N = Phys. Lett. B , 383(1):39–43,1996.[64] R. P. Thomas. A holomorphic Casson invariant for Calabi-Yau 3-folds, and bundles on K J. Diﬀerential Geom. , 54(2):367–438, 2000.[65] R. P. Thomas and S.-T. Yau. Special Lagrangians, stable bundles and mean curvature ﬂow.

Comm.Anal. Geom. , 10(5):1075–1113, 2002.

Laboratoire de Math´ematiques, Universit´e de Versailles St Quentin en Yvelines, France

Email address : [email protected] Universit´e Paris-Saclay, CNRS, Laboratoire de math´ematiques d’Orsay, 91405, Orsay,France

Email address ::