Riemann–Hilbert problems from Donaldson–Thomas theory

We study a class of Riemann–Hilbert problems arising naturally in Donaldson–Thomas theory. In certain special cases we show that these problems have unique solutions which can be written explicitly as products of gamma functions. We briefly explain connections with Gromov–Witten theory and exact WKB analysis.


Introduction
In this paper we study a class of Riemann-Hilbert problems arising naturally in Donaldson-Thomas theory. They involve maps from the complex plane to an algebraic torus, with prescribed discontinuities along a collection of rays, and are closely related to the Riemann-Hilbert problems considered by Gaiotto et al. [14]; in physical terms we are considering the conformal limit of their story. The same problems have also been considered by Stoppa and his collaborators [1,12]. One of our main results is that in the 'uncoupled' case the Riemann-Hilbert problem has a unique solution which can be written explicitly using products of gamma functions (Theorem 3.2). The inspiration for this comes from a calculation of Gaiotto [13].
We begin by introducing the notion of a BPS structure. This is a special case of Kontsevich and Soibelman's notion of a stability structure [21]. In B Tom Bridgeland t.bridgeland@sheffield.ac.uk mathematical terms, it describes the output of unrefined Donaldson-Thomas theory applied to a three-dimensional Calabi-Yau category with a stability condition. There is also a notion of a variation of BPS structures over a complex manifold, which axiomatises the behaviour of Donaldson-Thomas invariants under changes of stability: the main ingredient is the Kontsevich-Soibelman wall-crossing formula.
To any BPS structure satisfying a natural growth condition we associate a Riemann-Hilbert problem. We go to some pains to set this up precisely. We then prove the existence of a unique solution in the uncoupled case referred to above. Given a variation of BPS structures over a complex manifold M, and a family of solutions to the corresponding Riemann-Hilbert problems, we can define a piecewise holomorphic function on M which we call the τ -function. In the uncoupled case we give an explicit expression for this function using the Barnes G-function (Theorem 3.4).
Variations of BPS structures also arise in theoretical physics in the study of quantum field theories with N = 2 supersymmetry (see for example [14]). Our τ -function then seems to be closely related to the partition function of the theory. Thus, as a rough slogan, one can think of the BPS invariants as encoding the Stokes phenomena which arise when Borel resumming the genus expansion of the free energy. As an example of this relationship, we compute in Section 8 the asymptotic expansion of log(τ ) for the variation of BPS structures arising in topological string theory, and show that it reproduces the genus 0 part of the Gopakumar-Vafa expression for the Gromov-Witten generating function.
Another interesting class of BPS structures arise in theoretical physics from supersymmetric gauge theories of class S. In the case of gauge group SU(2) these theories play a central role in the paper of Gaiotto et al. [15]. The corresponding BPS structures depend on a Riemann surface equipped with a meromorphic quadratic differential, and the BPS invariants encode counts of finite-length geodesics. These structures arise mathematically via the stability conditions studied by the author and Smith [8]. The work of Iwaki and Nakanishi [18] shows that the corresponding Riemann-Hilbert problems can be partially solved using the techniques of exact WKB analysis. We expect our τ -function in this case to be closely related to the one computed by topological recursion [10].
The theory we attempt to develop here is purely mathematical. One potential advantage of our approach is its generality: the only input for the theory is a triangulated category satisfying the three-dimensional Calabi-Yau condition. When everything works, the output is a complex manifold-the space of stability conditions-equipped with an interesting piecewise holomorphic function: the tau function. Note that the theory is inherently global and nonperturbative: it does not use expansions about some chosen limit point in the space of stability conditions. We should admit straight away that at present there many unanswered questions and unsolved technical problems with the theory. In particular, for general BPS structures we have no existence or uniqueness results for solutions to the Riemann-Hilbert problem. It is also not clear why the τ -function as defined here should exist in the general uncoupled case. Nonetheless, the strong analogy with Stokes structures in the theory of differential equations, and the non-trivial answers obtained here (see also [5]) provide adequate mathematical motivation to study these problems further.

Plan of the paper
In Sect. 2 we introduce basic definitions concerning BPS structures. Section 3 contains a summary of the contents of the paper with technical details deferred to later sections. In Sect. 4 we discuss the Riemann-Hilbert problem associated to a BPS structure. In Sect. 5 we solve this problem in the uncoupled case using elementary properties of the gamma function. Sections 6 and 7 discuss the connections with Gromov-Witten invariants and exact WKB analysis referred to above. In "Appendix A" we give a rigorous definition of a variation of BPS structures following Kontsevich and Soibelman. "Appendix B" contains some simple analytic results involving partially-defined self-maps of algebraic tori.

BPS structures: initial definitions
In this section we introduce the abstract notion of a BPS structure and explain the corresponding picture of active rays and BPS automorphisms. In mathematics, these structures arise naturally as the output of generalized Donaldson-Thomas theory applied to a three-dimensional Calabi-Yau triangulated category with a stability condition. These ideas go back to Kontsevich and Soibelman [21,Section 2], building on work of Joyce (see [4] for a gentle review). The same structures also arise in theoretical physics in the study of quantum field theories with N = 2 supersymmetry [15, Section 1].

Definition and terminology
The following definition is a special case of the notion of stability data on a graded Lie algebra [21,Section 2.1]. It was also studied by Stoppa and his collaborators [1,Section 3], [12,Section 2]. (i) Symmetry: (−γ ) = (γ ) for all γ ∈ , (ii) Support property: fixing a norm · on the finite-dimensional vector space ⊗ Z R, there is a constant C > 0 such that The lattice will be called the charge lattice, and the form −, − is the intersection form. The group homomorphism Z is called the central charge. The rational numbers (γ ) are called BPS invariants. A class γ ∈ will be called active if (γ ) = 0.

Donaldson-Thomas invariants
The Donaldson-Thomas (DT) invariants of a BPS structure ( , Z , ) are defined by the expression where the sum is over integers m > 0 such that γ is divisble by m in the lattice . The BPS and DT invariants are equivalent data: we can write where μ(m) is the Möbius function. One reason to prefer the BPS invariants is that in many examples they are known, or conjectured, to be integers. Note however that this depends on a genericity assumption (see Definition 2.3), without which integrality fails even in very simple examples (see Sect. 2.9).

Poisson algebraic torus
Given a lattice ∼ = Z ⊕n equipped with a skew-symmetric form −, − as above, we consider the algebraic torus and its co-ordinate ring (which is also the group ring of the lattice ) We write y γ ∈ C[T + ] for the character of T + corresponding to an element γ ∈ . The skew-symmetric form −, − induces an invariant Poisson structure on T + , given on characters by As well as the torus T + , it will also be important for us to consider an associated torsor which we call the twisted torus. This space is discussed in more detail in the next subsection, but since the difference between T + and T − just has the effect of introducing signs into various formulae, it can safely be ignored at first reading.

Twisted torus
Let us again fix a lattice ∼ = Z ⊕n equipped with a skew-symmetric form −, − . The torus T + acts freely and transitively on the twisted torus T − via Choosing a base-point g 0 ∈ T − therefore gives a bijection We can use the identification θ g 0 to give T − the structure of an algebraic variety. The result is independent of the choice of base-point g 0 ∈ T − , since the translation maps on T + are algebraic. Similarly, the Poisson structure (4) on T + is invariant under translations, and hence can be transferred to T − via the map (5).

Fig. 1
The ray diagram associated to a BPS structure The co-ordinate ring of T − is spanned as a vector space by the functions which we refer to as twisted characters. Thus The Poisson bracket on C[T − ] is given on twisted characters by From now on we shall denote the twisted torus T − simply by T.

Ray diagram
Let ( , Z , ) be a BPS structure. The support property implies that in any bounded region of C there are only finitely many points of the form Z (γ ) with γ ∈ an active class. It also implies that all such points are nonzero. By a ray in C * we mean a subset of the form = R >0 · z for some z ∈ C * . Such a ray will be called active if it contains a point Z (γ ) for some active class γ ∈ . Taken together the active rays form a picture as in Fig. 1, which we call the ray diagram of the BPS structure. In general there will be countably many active rays. We define the height of an active ray ⊂ C * to be Non-active rays are considered to have infinite height. The support property ensures that for any H > 0 there are only finitely many rays of height < H . Associated to any ray ⊂ C * is a forma < H . Associated to any ray ⊂ C * is a formal sum of twisted characters Naively, we would like to view DT( ) as a well-defined holomorphic function on the twisted torus T, and consider the associated time 1 Hamiltonian flow as a Poisson automorphism We refer to this as the BPS automorphism associated to the ray ; making good sense of it is one of the main technical problems we shall need to deal with.

Further terminology
In this section we gather some terminology for describing BPS structures of various special kinds.

Definition 2.2
We say that a BPS structure (Z , , ) is (a) finite, if there are only finitely many active classes γ ∈ ; (b) ray-finite, if for any ray ⊂ C * there are only finitely many active classes γ ∈ for which Z (γ ) ∈ ; (c) convergent, if for some An equivalent condition to (9) already appears in the work of Gaiotto et al. [14,Appendix C]. The same condition also plays a prominent role in the work of Barbieri and Stoppa [1, Definition 3.5].
The uncoupled condition ensures that the Hamiltonian flows for any pair of functions on T of the form DT(γ ) · x γ commute. This situation corresponds to the case of 'mutually local corrections' in [14]. Genericity is the weaker condition that all such flows for which Z (γ ) lies on a given fixed ray ⊂ C * should commute.

BPS automorphisms
As mentioned above, the main technical problem we have to deal with is making suitable definitions of the BPS automorphisms S( ) associated to a BPS structure. Since we will use three different approaches at various points in the paper, it is perhaps worth briefly summarising these here.
(i) Formal approach If we are only interested in the elements S( ) for rays ⊂ C * lying in a fixed acute sector ⊂ C * , then we can work with a variant of the algebra C[T] consisting of formal sums of the form such that for any H > 0 there are only finitely many terms with |Z (γ )| < H . This is the approach we shall use in "Appendix A" to define variations of BPS structures: it has the advantage of not requiring any extra assumptions. (ii) Analytic approach In "Appendix B", we associate to each convex sector ⊂ C * , and each real number R > 0, a non-empty analytic open subset U (R) ⊂ T defined to be the interior of the subset We then show that if the BPS structure is convergent, and R > 0 is sufficiently large, then for any active ray ⊂ , the formal series DT( ) is absolutely convergent on U (R) ⊂ T, and that the time 1 Hamiltonian flow of the resulting function defines a holomorphic embedding We can then view this map as being a partially-defined automorphism of T. For a more precise statement see Proposition 4.1.
(iii) Birational approach In the case of a generic, integral and ray-finite BPS structure, the partially-defined automorphisms S( ) discussed in (ii) extend to birational automorphisms of T; see Propostion 4.2. The induced pull-back of twisted characters is expressed by the formula which is often taken as a definition (see e.g. [14, Section 2.2]).

Doubling construction
It is often useful to be able to assume that the form −, − is non-degenerate.
To reduce to this case we can use the following doubling construction [21, Section 2.6]. Suppose given a BPS structure ( , Z , ). The doubled BPS structure takes the form where ∨ = Hom Z ( , Z) is the dual lattice. We equip the doubled lattice D = ⊕ ∨ with the non-degenerate skew-symmetric form The central charge is defined by Z (γ , λ) = Z (γ ), and the BPS invariants by The support property reduces to that for the original structure. Slightly more generally, we can consider BPS structures of the form ( ⊕ ∨ , Z ⊕ Z ∨ , ) where Z ∨ : ∨ → C is an arbitrary group homomorphism; we sometimes refer to these as twisted doubles.

A basic example: the Kronecker quiver
Interesting examples of BPS structures can be obtained from Donaldson-Thomas theory. It is important to note that with our conventions the form −, − should be taken to be the negative of the Euler form. In the case of the generalised Kronecker quiver with k > 0 arrows (see also [17]) these BPS structures ( , Z , ) have = Ze 1 ⊕ Ze 2 , e 1 , e 2 = k, and are specified by a central charge Z : → C satisfying Im Z (e i ) > 0 for i = 1, 2. The BPS invariants depend only on the sign of ν = Im (Z (e 2 )/Z (e 1 )).
The case k = 2 has the infinite set of nonzero invariants with all others being zero. In general, for k > 2, these BPS structures are not very well-understood. However, it is known [26,Theorem 6.4] that they are not in general ray-finite. It is also expected that there exist regions in C * in which the active rays are dense.
(a) As t ∈ C * crosses an active ray ⊂ C * in the anti-clockwise direction, the function X (t) undergoes a discontinuous jump described by the formula (c) As t → ∞ the element X (t) has at most polynomial growth.
The gist of condition (a) is that the function X should be holomorphic in the complement of the active rays, and for each active ray ⊂ C * the analytic continuations of the two functions on either side should differ by composition with the corresponding automorphism S( ).
To make sense of (b), note that is an element of the torus T + , and recall that T = T − is a torsor for T + . We often write which then defines a map Y : C * → T + . Clearly the maps X and Y are equivalent data; we use whichever is most convenient.
Composing with the (twisted) characters of T ± , we can alternatively encode the solution in either of the two systems of maps Condition (c) is then the statement that for each γ ∈ there should exist k > 0 such that Problem 3.1 is closely analogous to the Riemann-Hilbert problems which arise in the study of differential equations with irregular singularities. In that case the Stokes factors S( ) lie in a finite-dimensional group GL n (C), whereas in our situation they are elements of the infinite-dimensional group of Poisson automorphisms of the torus T. We will return to this analogy in the sequel to this paper [6].

Solution in the uncoupled case
In the case of a finite, integral, uncoupled BPS structure, and for certain choices of ξ ∈ T, the Riemann-Hilbert problem introduced above has a unique solu-tion, which can be written explicitly in terms of products of modified gamma functions. The inspiration for this comes from work of Gaiotto [13, Section 3.1].
Consider the multi-valued meromophic function on C * defined by Taking the principal value of log on C * \R <0 , we consider (w) as a singlevalued holomorphic function on this domain. The formula (13) is obtained by exponentiating the initial terms in the Stirling expansion, and ensures that (w) → 1 as w → ∞ in the complement of any closed subsector of C * containing the negative real axis R <0 .
where the product is over the finitely many active classes with Im Z (γ )/t > 0.
Note that the uncoupled assumption implies that the active classes γ ∈ span a subgroup of on which the form −, − vanishes, and this ensures that there exist elements ξ ∈ T satisfying ξ(γ ) = 1 for all such classes. The proof of Theorem 3.2 is a good exercise in the basic properties of the gamma function. The details are given in Sect. 5.

Variations of BPS structure
The variation of BPS invariants in Donaldson-Thomas theory under changes in stability parameters is controlled by the Kontsevich-Soibelman wall-crossing formula. This forms the main ingredient in the following definition of a variation of BPS structures, which is a special case of the notion of a continuous family of stability structures from [21,Section 2.3]. Full details can be found in "Appendix A"; here we just give the rough idea. (b) Given a covariantly constant family of elements γ p ∈ p , the central charges Z p (γ p ) ∈ C are holomorphic functions of p ∈ M. (c) The constant in the support property (1) can be chosen uniformly on compact subsets. (d) For each acute sector ⊂ C * , the clockwise product over active rays in is covariantly constant as p ∈ M varies, providing the boundary rays of are never active.
Note that the local system in (a) induces a flat Ehresmann connection on the bundle of tori over the manifold M, and hence also on the associated bundle of twisted tori T p . It will require some work to make rigorous sense of the wall-crossing formula, condition (d). We do this using formal completions in "Appendix A" following [21]. This needs no convergence assumptions and completely describes the behaviour of the BPS invariants as the point p ∈ M varies: once one knows all the invariants (γ ) at some point of M, they are determined at all other points.
The material of Sect. 2.9 gives interesting examples of variations of BPS structures. For a fixed k ≥ 1 the corresponding BPS structure ( , Z , ) is determined by the pair where h denotes the upper half-plane. As this point varies we obtain a variation of BPS structures. In particular, the BPS invariants for ν < 0 are completely determined by the trivial case ν > 0 and the wall-crossing formula (15).

Tau functions
Let us consider a variation of BPS structures ( p , Z p , p ) over a complex manifold M. We call such a variation framed if the local system ( p ) p∈M is trivial, so that we can identify all the lattices p with a fixed lattice . We can always reduce to this case by passing to a cover of M, or by restricting to a neighbourhood of a given point p ∈ M.
Associated to a framed variation ( , Z p , p ) there is a holomorphic map π : M → Hom Z ( , C) ∼ = C n , p → Z p which we call the period map. We say that the variation is miniversal if the period map is a local isomorphism. In that case, if we choose a basis (γ 1 , . . . , γ n ) ⊂ , the functions z i = Z (γ i ) form a system of local co-ordinates in a neighbourhood of any given point of M.
Consider a framed, miniversal variation ( p , Z p , p ) over a manifold M, and choose a basis (γ 1 , . . . , γ n ) ⊂ as above. For each point p ∈ M we can consider the Riemann-Hilbert problem associated to the BPS structure ( , Z p , p ). The wall-crossing formula, Definition 3.3 (d), makes it reasonable to ask for a family of solutions to these problems which is a piecewise holomorphic function of p ∈ M. Such a family of solutions is given by a piecewise holomorphic map which we view as a function of the co-ordinates (z 1 , . . . , z n ) ∈ C n and the parameter t ∈ C * . We define a τ -function for the given family of solutions to be a piecewise holomorphic function which is invariant under simultaneous rescaling of all co-ordinates z i and the parameter t, and which satisfies the equations where i j = γ i , γ j . When the form −, − is non-degenerate these conditions uniquely determine τ up to multiplication by a constant scalar factor. It is not clear at present why a τ -function should exist in general, and the above definition should be thought of as being somewhat experimental. Nonetheless, in the uncoupled case we will see that τ -functions do exist, and are closely related to various partition functions arising in quantum field theory. We hope to return to the general case in future publications.

Tau function in the uncoupled case
Suppose given a miniversal variation of finite, uncoupled BPS structures over a complex manifold M. We will show that the family of solutions given by Theorem 3.2 has a corresponding τ -function. To describe this function we first introduce the expression where G(x) is the Barnes G-function, and ζ(s) the Riemann zeta function.
is a τ -function for the family of solutions given by Theorem 3.2.
The known asymptotics of the G-function imply that τ (Z , t) has an asymptotic expansion involving the Bernoulli numbers valid as t → 0 in any half-plane whose boundary rays are not active.

Two classes of examples
There are two important classes of examples of BPS structures where we can say something about solutions to the Riemann-Hilbert problem. Both are also of interest in theoretical physics. They are treated a little more thoroughly in Sects. 6 and 7 , but there are many unanswered questions which we leave for future research.
(i) Topological strings Let X be a compact Calabi-Yau threefold. There is a variation of BPS structures over the complexified Kähler cone arising mathematically from generalised Donaldson-Thomas theory applied to coherent sheaves on X supported in dimension ≤ 1. The BPS invariants are expected to coincide with the genus 0 Gopakumar-Vafa invariants (see [19,Conjecture 6.20]). Assuming this, we argue that the asymptotic expansion of the resulting τ -function should be related to the Gromov-Witten partition function of X . More precisely, it should reproduce the g ≥ 2 terms in those parts of the partition function arising from constant maps and genus 0 degenerate contributions: We give a complete proof of this result in the case of the resolved conifold in [5]: this involves writing down a non-perturbative version of the above expression and checking that it gives rise via (16) to a solution to the Riemann-Hilbert problem.
(ii) Theories of class S Our second example relates to the class of N = 2, d = 4 gauge theories known as theories of class S. We consider only the case of gauge group SU (2). To specify the theory we need to fix a genus g ≥ 0 and a collection of d ≥ 1 integers Mathematically, we can then proceed by introducing a complex orbifold Quad(g, m) parameterizing pairs (S, q) consisting of a Riemann surface S of genus g, and a meromorphic quadratic differential q on S which has simple zeroes, and poles of the given multiplicities m i . It is proved in [8] that this space also arises as a (discrete quotient of) the space of stability conditions on a triangulated category D(g, m) having the three-dimensional Calabi-Yau property. Applying generalized Donaldson-Thomas theory then leads to a variation of BPS structures over Quad(g, m), whose central charge is given by the periods of the differential q, and whose BPS invariants are counts of finite-length trajectories. Work of Iwaki and Nakanishi [18] shows that the Riemann-Hilbert problem corresponding to a pair (S, q) is closely related to exact WKB analysis of the corresponding Schrödinger equation where z is some local co-ordinate in a fixed projective structure on S, and h should be identified with the variable t in Problem 3.1. This story is the conformal limit of that described by Gaiotto et al. in the paper [15].

The BPS Riemann-Hilbert problem
In this section we discuss the Riemann-Hilbert problem defined by a convergent BPS structure. It is closely related to the Riemann-Hilbert problem considered by Gaiotto et al. [14], and has also been studied by Stoppa and his collaborators [1,12].

Analytic BPS automorphisms
We begin by summarising some basic analytic facts which are proved in "Appendix B". Let ( , Z , ) be a BPS structure, let T be the associated twisted torus, and fix an acute sector ⊂ C * . For each real number R > 0 define the open subset U (R) ⊂ T to be the interior of the subset It follows from the support property that the subset U (R) ⊂ T is non-empty (see Lemma B.2). Recall the definition of the height of a ray ⊂ C * from Sect. 2.5. (iii) For each H > 0, the composition in clockwise order corresponding to the finitely many rays i ⊂ of height < H exists, and the pointwise limit We think of the maps S( ) constructed in Proposition 4.1 as giving partiallydefined automorphisms of the twisted torus T. We will usually restrict attention to BPS structures which in the terminology of Sect. 2.6 are ray-finite, generic and integral. The map S( ) can then be computed using the following result.

Proposition 4.2 Suppose that ( , Z , ) is ray-finite, generic and integral.
Then for any ray ⊂ C * the embedding S( ) of Proposition 4.1 extends to a birational automorphism of T, whose action on twisted characters is given by Proof See "Appendix B", Proposition B.6.
Note that if the BPS structure ( , Z , ) satisfies the stronger condition of being finite, then there are only finitely many active rays, so for any acute sector ⊂ C * the map S( ) of Proposition 4.1 also extends to a birational automorphism of T.

Statement of the problem
Let ( , Z , ) be a convergent BPS structure and denote by T the associated twisted torus. Given a ray r ⊂ C * we consider the corresponding half-plane We shall be dealing with functions of the form Composing with the twisted characters of T we can equivalently consider functions The Riemann-Hilbert problem associated to the BPS structure ( , Z , ) depends on a choice of element ξ ∈ T which we refer to as the constant term. It reads as follows: Fix an element ξ ∈ T. For each non-active ray r ⊂ C * we seek a holomorphic function X r : H r → T such that the following three conditions are satisfied: (RH1) Jumping. Suppose that two non-active rays r 1 , r 2 ⊂ C * form the boundary rays of a convex sector ⊂ C * taken in clockwise order. Then for all t ∈ H r 1 ∩ H r 2 with 0 < |t| 1. (RH2) Finite limit at 0. For each non-active ray r ⊂ C * and each class γ ∈ we have as t → 0 in the half-plane H r . (RH3) Polynomial growth at ∞. For any class γ ∈ and any non-active ray r ⊂ C * , there exists k > 0 such that To make sense of the condition (RH1) note that by Proposition 4.2 we can find R > 0 such that the partially-defined automorphism S( ) is welldefined on the open subset U (R) ⊂ T. Observe that if an active class γ ∈ satisfies Z (γ ) ∈ and we take t ∈ H r 1 ∩ H r 2 then the quantity Z (γ )/t has strictly positive real part. Using the support property it follows (see the proof of Lemma B.2) that for 0 < |t| 1 Remark 4.4 When the BPS structure ( , Z , ) is finite, integral and generic, we can rewrite the condition (RH1) using Proposition 4.2. Given an active ray , consider a small anticlockwise perturbation r − , and a small clockwise perturbation r + , both rays being non-active. Then (RH1) is the condition that Note that the generic assumption ensures there is no need to distinguish the functions X r ± (t) inside the product, since for classes γ ∈ satisfying Z (γ ) ∈ they are equal.
It will be useful to consider the maps Y r : H r → T + defined by Composing with the characters of T + we can also encode the solution in the system of maps Of course the maps X r and Y r are equivalent data: we use whichever is most convenient.
Remark 4.5 It follows from the condition (RH1) that if two non-active rays r 1 , r 2 bound a convex sector containing no active rays, then the two functions X r i : H r i → T required in Problem 4.3 glue together to give a holomorphic function on H r 1 ∪ H r 2 . It follows that if a non-active ray r ⊂ C * is not a limit of active rays, then the corresponding function X r extends analytically to a neighbourhood of the closure of H r ⊂ C * .

Remarks on the formulation
The Riemann-Hilbert problem of the last subsection is the main subject of this paper. Unfortunately we have no general results giving existence or uniqueness of its solutions. Moreover one could easily imagine various small perturbations of the statement of Problem 4.3, and it will require further work to decide for sure exactly what the correct conditions should be. We make a few remarks on this here.
Remarks 4.6 (i) From a heuristic point-of-view it is useful to consider a Riemann-Hilbert problem involving maps from C * into the group G of Poisson automorphisms of the torus T. The above formulation is obtained by evaluating a t-dependent automorphism of T at the chosen point ξ ∈ T.
If we replace the infinite-dimensional group G with the finite-dimensional group GL n (C) the analogous Riemann-Hilbert problems are familiar in the theory of linear differential equations with irregular singularities, and play an important role in the theory of Frobenius manifolds [9,Lecture 4]. This connection between stability conditions and Stokes phenomena goes back to [7], and will be revisited in [6]. (ii) In Sect. 3.1 we gave a simplified formulation of the Riemann-Hilbert problem which considers a single function X : C * → T with prescribed discontinuities along active rays. This becomes a little tricky to make sense of when the active rays are dense in regions of C * , so we prefer the formulation given in Problem 4.3, which is modelled on the standard approach in the finite-dimensional case. We can obtain a solution to Problem 3.1 from a solution to Problem 4.3 by defining X (t) = X R >0 ·t (t); Remark 4.5 shows that this defines a holomorphic function away from the closure of the union of the active rays. Note that Problem 4.3 imposes strictly stronger conditions on the resulting function X (t), because the conditions (RH2) and (RH3) are assumed to hold in half-planes. (iii) We can weaken the conditions in Problem 4.3 in various ways, and until we have studied more examples in detail it is not possible to be sure exactly what is the correct formulation. For example, we could allow the functions X r,γ (t) to have poles on the half-plane H r , or we could replace H r by a smaller convex sector of some fixed angle. We can also consider a variant of Problem 4.3 where we only assume that the map X r is defined and holomorphic on the intersection of H r with some punctured disc {t ∈ C * : |t| < r }, and drop condition (RH3) altogether. We shall refer to this last version as the weak Riemann-Hilbert problem associated to the BPS structure.

Symmetries of the problem
There are a couple of obvious symmetries of the Riemann-Hilbert problem which deserve further comment. For the first, note that the twisted torus T has a canonical involution σ : T → T which acts on twisted characters by σ * (x γ ) = x −γ . The fixed point set is the finite subset whose elements are quadratic refinements of the form −, − . The symmetry property (−γ ) = (γ ) of the BPS invariants implies that It follows that given a collection of functions X ξ r (t) solving the Riemann-Hilbert problem for the constant term ξ , we can generate another solution, this time for the constant term σ (ξ), by defining In particular, if we had uniqueness of solutions, we could conclude that whenever ξ ∈ T σ is a quadratic refinement of the form −, − , any solution to the Riemann-Hilbert problem satisfies For the second symmetry of the Riemann-Hilbert problem, note that given a BPS structure ( , Z , ) we can obtain a new BPS structure ( , λZ , ) by simply multiplying the central charges Z (γ ) ∈ C by a fixed scalar λ ∈ C * . It is then clear that if X r (t) is a system of solutions to the Riemann-Hilbert problem for the BPS structure ( , Z , ), then the functions X λr (λt) will be a system of solutions to the problem for ( , λZ , ) with the same constant term. Again, if we had uniqueness of solutions, we could conclude that all solutions to Problem 4.3 are invariant under simultaneous rescaling of Z and t.

Null vectors and uniqueness
Let (Z , , ) be a BPS structure, and denote by T the corresponding twisted torus.
Definition 4.7 An element γ ∈ will be called null if it satisfies α, γ = 0 for all active classes α ∈ . A twisted character x γ : T → C * corresonding to a null element γ ∈ will be called a coefficient.
Note that the definition of the wall-crossing automorphisms S( ) shows that they fix all coefficients: S( ) * (x γ ) = x γ . This leads to the following partial uniqueness result. (Z , , ) be a convergent BPS structure and γ ∈ a null element. Then for any solution to the Riemann-Hilbert problem, and any nonactive rays r ⊂ C * , one has Y r,γ (t) = 1 for all t ∈ H r .

Lemma 4.8 Let
Proof Since coefficients are unchanged by wall-crossing, condition (RH1) shows that the functions Y r,γ (t) for different rays r ⊂ C * piece together to give a single holomorphic function Y γ : C * → C * . Since we can cover C * by halfplanes H r i corresponding to finitely many non-active rays r i ⊂ C * , condition (RH2) shows that this function has a removable singularity at 0 ∈ C with value Y γ (0) = 1, and condition (RH3) shows that it has at worst polynomial growth at ∞. It follows that Y γ extends to a meromorphic function CP 1 → CP 1 which has neither zeroes nor poles on C. This implies that Y γ (t) is constant, which proves the result. of (21) are null. Lemma 4.8 shows that for these classes the corresponding functions are uniquely determined. It follows that if we have two systems of solutions to the Riemann-Hilbert problem, then the ratios q r,β (t) = X (2) r,β (t) · (X (1) r,β (t)) −1 : H r → C * piece together to give a single holomorphic function q β : C * → C * . Arguing exactly as in Lemma 4.8 we can use conditions (RH2) and (RH3) to conclude that q β (t) = 1 for all t ∈ C * which proves the claim.
is null, because it is orthogonal to any class of the form (α, 0) ∈ ⊕ ∨ by the formula (11). Lemma 4.8 therefore implies that any solution to the Riemann-Hilbert problem for the double satisfies Y γ D ,r (t) = 1. This implies that for all t ∈ C * and all non-active rays r ⊂ C * .
In this way one sees that if a BPS structure has a non-degenerate form −, − , then solving the Riemann-Hilbert problem for the doubled BPS structure is precisely equivalent to solving the problem for the original BPS structure. However, when the form −, − is degenerate a solution to the Riemann-Hilbert problem for the doubled BPS structure contains strictly more information than a solution to the original problem. We will see an example of this in Sect. 5.1 below.

Tau functions
Let us consider a family of solutions to the Riemann-Hilbert problems associated to the BPS structures ( , Z p , p ). For each ray r ⊂ C * we assume that Y r ( p, t) is a piecewise holomorphic function, with discontinuities at points p ∈ M where the ray r ⊂ C * is active in the BPS structure ( , Z p , p ). Differentiating with respect to t and translating to the identity 1 ∈ T + we get a map Composing with the inverse of (23), this can be viewed as a vector field V (t) on M depending on t ∈ C * . A τ -function for the family of solutions Y r ( p, t) is a piecewise holomorphic function such that V (t) is the Hamiltonian vector field of the function (2πi) · log τ r . In terms of the co-ordinates z i = Z (γ i ) described above, the condition is that By the second symmetry property of Sect. 4.4 it is natural to also impose the condition that τ is invariant under simultaneous rescaling of Z and t. In the case when the form −, − is non-degenerate this is enough to determine the τ function uniquely up to multiplication by an element of C * .

Explicit solutions in the finite, uncoupled case
In this section we show how to solve the Riemann-Hilbert problem associated to a finite, uncoupled, integral BPS structure, and compute the τ -function associated to a variation of such structures. The situation considered here corresponds to the case of 'mutually local corrections' in [14]. The inspiration for our solution comes from a calculation of Gaiotto [13, Section 3].

Doubled A 1 example
The following BPS structure arises from the A 1 quiver, which consists of a single vertex and no arrows. It depends on a parameter z ∈ C * . (i) The lattice = Z · γ has rank one, and thus −, − = 0; (ii) The central charge Z : → C is determined by Z (γ ) = z ∈ C * ; (iii) The only non-vanishing BPS invariants are (±γ ) = 1. The Riemann-Hilbert problem associated to this BPS structure is trivial since all elements of are null. Let us instead consider the double of this BPS structure Let γ ∨ ∈ ∨ be the unique generator satisfying γ ∨ (γ ) = 1. Note that the definition (11) shows that the skew-symmetric form −, − on D satisfies γ ∨ , γ = 1.
To define the Riemann-Hilbert problem for the doubled BPS structure we must first choose a constant term ξ D ∈ T D , where T D is the twisted torus corresponding to the lattice D . For simplicity we take ξ D (γ ∨ ) = 1, and write The only active rays are ± = ±R >0 · z, and Lemma 4.8 shows that X r,γ (t) = exp(−z/t) · ξ for any non-active ray r ⊂ C * . The non-trivial part of the Riemann-Hilbert problem for the doubled BPS structure consists of the functions It follows from Remark 4.5 that the functions Y r (t) for non-active rays r ⊂ C * lying in the same component of C\R · z are analytic continuations of each other. Thus we obtain just two holomorphic functions corresponding to non-active rays lying in the half-planes ± Im(z/t) > 0. Using Remark 4.4, the Riemann-Hilbert problem for the doubled BPS structure can therefore be restated as follows.
(iii) There exists k > 0 such that To understand condition (i) note that if t ∈ H + then t lies in the domains of definition H r of the functions Y r corresponding to sufficiently small deformations of the ray + . Thus (21) applies to the ray + and we obtain the first of the relations (25). The second follows similarly from (21) applied to the opposite ray − .

Solution in the doubled A 1 case
The formula defines a meromorphic function of w ∈ C * , which is multi-valued due to the factor Since (w) is meromorphic on C with poles only at the non-positive integers, it follows that (w) is holomorphic on C * \R <0 . We specify it uniquely by taking the principal branch of log. The Stirling expansion [28, Section 12.33] gives an asymptotic expansion where B 2g denotes the (2g)th Bernoulli number. This expansion is valid as w → ∞ in the complement of a closed sector containing the ray R <0 . It implies in particular that (w) → 1.

Proposition 5.2
When ξ = 1, Problem 5.1 has a unique solution, namely Proof Note that the function Y + (t) is indeed holomorphic on the domain C * \i + as required, because if we set w = z/2πit then Similarly Y − (t) is holomorphic on C * \i − . The Euler reflection formula gives , w ∈ C\Z.
Since (n) = (n − 1)! for n ∈ Z >0 , it follows that (w) is nowhere vanishing. The same is therefore true of (w). The reflection formula also implies that for w ∈ C\Z where we used (1 − w) = (−w) · (−w). For the principal branch of log we have log(w) = log(−w) ± πi when ± Im(w) > 0.
Thus we conclude that when Im(w) > 0. Note that if w = z/2πit then t ∈ H − ⇐⇒ Im(w) > 0, so we get the second of the relations (25). The other follows in the same way. Property (ii) is immediate from the Stirling expansion (27). Property (iii) is a simple consequence of the fact that (w) has a simple pole at w = 0. Finally, the uniqueness statement follows from Lemma 4.9.

The finite uncoupled case
In the case of a finite, uncoupled, integral BPS structure we can construct a unique solution to the Riemann-Hilbert problem by superposing the solutions from the previous section.

Theorem 5.3 Let (Z , , ) be a finite, uncoupled, integral BPS structure.
Suppose that ξ ∈ T satisfies ξ(γ ) = 1 for all active classes γ ∈ . Then the corresponding Riemann-Hilbert problem has a unique solution, which associates to a non-active ray r the function where the product is taken over the finitely many active classes γ ∈ for which Z (γ ) ∈ iH r .
Proof Note first that the expression (29) is holomorphic and non-zero on H r because in each factor both Z (γ )/i and t lie in H r , so the argument of does not lie in R <0 . The properties (RH2) and (RH3) then follow immediately as in the proof of Proposition 5.2. Consider two non-active rays r − and r + obtained by small perturbations, anti-clockwise and clockwise respectively, of an active ray . Then ⊂ iH r + whereas − ⊂ iH r − . Assume that t ∈ H r − ∩ H r + . Then t ∈ H and hence −Z (γ )/2πit lies in the upper half-plane whenever Z (γ ) ∈ . Using (28) we therefore obtain This is precisely the condition (21) since Lemma 4.8 and the assumption on ξ implies that X γ (t) = exp(−Z (γ )/t) whenever (γ ) = 0.
Using the Stirling expansion we obtain an asymptotic expansion valid as t → 0 in the half-plane H r . We have set ξ(β) = exp(2πiθ(β)). The extra factor of 2 in the denominator arises because in (29) we take a product over half the classes in . Note that this expansion is independent of the choice of ray r ⊂ C * .

Tau function in the uncoupled case
Consider the expression where G is the Barnes G-function [2], [27,Appendix], and ζ(s) is the Riemann zeta function. It defines a holomorphic and nowhere vanishing function on C * \R <0 which we specify uniquely by defining the factor w w 2 /2 using the principal value of log. The asymptotic expansion of ϒ(w) is valid as w → ∞ in the complement of any sector in C * containing the ray R <0 . This can be found for example in [2,Section 15]  as the Glaisher-Kinkelin constant.

Lemma 5.4 There is an identity
Proof Note that this is obvious at the level of the asymptotic expansions. For the proof we use the identity which can be found in [2, Section 12] (see also [27,Formula (A.13)]) to get The result then follows from (26) by taking log and differentiating.
In the case of variations of BPS structures satisfying the conditions of Theorem 5.3 the following result gives a natural choice of τ -function.

Theorem 5.5 Let ( , Z p , p ) be a framed, miniversal variation of finite, uncoupled, integral BPS structures over a complex manifold M. Given a ray r ⊂ C * , the function
is a τ -function for the family of solutions of Theorem 5.3.
Proof The expression (32) is holomorphic and non-zero on H r for the same reason given in the proof of Theorem 5.3. It is also clearly invariant under simultaneous rescaling of Z and t. Choosing a basis (γ 1 , . . . , γ n ) ⊂ , and using the local co-ordinates where we wrote i j = γ i , γ j and used the decomposition γ = i m i (γ )γ i . Using Lemma 5.4 this can be rewritten as which gives (24), and hence completes the proof that (32) defines a τ -function.
Applying (31) we get an asymptotic expansion valid as t → 0 in the half-plane H r . Once again this expansion is independent of the ray r ⊂ C * .

Remark 5.6 The function ϒ(w) is closely related to the function γh(x; )
which plays an important role in Okounkov and Nekrasov's work on supersymmetric gauge theories [23, Appendix A]. More precisely, they consider a function γh(x; ) which is uniquely defined up to a linear function in x by two properties: a difference equation, and the existence of an asymptotic expansion. Using the property G(w + 1) = (w) · G(w) of the Barnes G-function, and the expansion (31), it follows that we can take The term appearing in the exponential on the right-hand side gives rise to the prepotential of the gauge theory. We hope that a clearer understanding of the definition of the τ -function will enable us to give a mathematical definition of the prepotential.

Geometric case: Gromov-Witten invariants
In this section we consider a class of BPS structures related to closed topological string theory on a compact Calabi-Yau threefold. In mathematical terms they arise from stability conditions on the category of coherent sheaves supported in dimension ≤ 1. These BPS structures are uncoupled but not finite. We will show that formally applying the expression (33) in this case reproduces the genus 0 degenerate contributions to the Gromov-Witten generating function. In [5] we give a more careful analysis for the special case of the resolved conifold.

Gopakumar-Vafa invariants
Let X be a smooth projective Calabi-Yau threefold. For the sake of notational simplicity we will assume that the group H 2 (X, Z) is torsion-free. The Gromov-Witten potential of X is a formal series where GW(g, β) ∈ Q is the genus g Gromov-Witten invariant for stable maps of class β ∈ H 2 (X, Z). Note that by definition these invariants are nonzero only for effective curve classes β ≥ 0. The symbols x β are formal variables living in a suitable completion of the effective cone in the group ring of H 2 (X, Z), and λ is a formal parameter corresponding to the string coupling. We can split the series (34) into contributions from constant and nonconstant maps The contribution from the constant maps [11,Theorem 4] is where the expressions a 0 (x) and a 1 (x) can be found for example in [24]. Although the precise form of these expressions will not be relevant here it is worth noting that, unlike the higher genus terms, they involve the variables x β . Turning now to the contributions from non-constant maps, the Gopakumar-Vafa conjecture [16,24] claims that there exist integers GV(g, β) ∈ Z, such that We will be particularly interested in the expression β>0 GV(0, β) which gives the contribution from genus 0 Gopakumar-Vafa invariants. Note that using the Laurent expansion we can write the coefficient of λ 2g−2 in (36) as at least for g ≥ 2.

Torsion sheaf BPS invariants
Let A = Coh ≤1 (X ) denote the abelian category of coherent sheaves on X supported in dimension ≤ 1. Any sheaf E ∈ A has a Chern character ch(E) ∈ H * (X, Z), which via Poincaré duality we can view as an element We note that for any objects E 1 , E 2 of A, the Riemann-Roch theorem tells us that because the intersection number of any two curves on a threefold is zero. We therefore take −, − to be the zero form on . We define a central charge Z : → C via the formula where ω C = B + iω ∈ H 2 (X, C) is a complexified Kähler class. The assumption that ω is Kähler ensures that for any nonzero object E ∈ A the complex number Z (E) ∈ C lies in the semi-closed upper half-planē It follows that Z defines a stability condition on the abelian category A.
They are defined using moduli stacks of semistable objects in A, and should not be confused with the ideal sheaf curve-counting invariants appearing in the famous MNOP conjectures [22]. Joyce and Song prove that the numbers (γ ) are independent of the complexified Kähler class ω C . This is to be expected, since wall-crossing is trivial when the form −, − vanishes: see Remark A.4 below.
A direct calculation [19,Section 6.3] shows that It is expected [19,Conjecture 6.20] that when β > 0 is a positive curve class and, in particular, is independent of n. We shall assume this in what follows. We emphasise that the higher genus Gopakumar-Vafa invariants are invisible from the point-of-view of the torsion sheaf invariants (γ ).

Formal computation of the τ -function
The discussion of the last subsection gives rise to a framed variation of BPS structures over the complexified Kähler cone of X , in which the BPS invariants Nothing interesting is gained by doing this however. (ii) We view the doubled structures defined here as an approximation to the correct BPS structures, which should also incorporate BPS invariants corresponding to objects of the full derived category D b Coh(X ) supported in all dimensions. To define these rigorously would involve constructing stability conditions on D b Coh(X ), which for X a general compact Calabi-Yau threefold is a well-known unsolved problem (see [3] and [25] for more on this).
Although our BPS structures are not finite, we can nonetheless try to solve the associated Riemann-Hilbert problem by superposing infinitely many gamma functions. Let us formally apply (33) to compute for g ≥ 2 the coefficient of (2πit) 2g−2 in the asymptotic expansion of the τ -function. 1 The contribution from zero-dimensional sheaves is which agrees with (35). The contribution from one-dimensional sheaves is where v β = ω C · β. Using the identity valid for Im(z) > 0 and g ≥ 2, we can rewrite (40) as which then agrees with (37). We conclude that under the variable change the log of the τ -function reproduces the genus 0 degenerate contributions to the Gromov-Witten generating function (34), at least for positive powers of λ.
Remark 6.2 In the paper [5] we give a rigorous solution to the Riemann-Hilbert problem in the case when X is the resolved conifold. This involves writing down a non-perturbative function which has the above asymptotic expansion.

Quadratic differentials and exact WKB analysis
The only examples of CY 3 categories where the full stability space is understood come from quivers with potential associated to triangulated surfaces. The associated stability spaces can be identified with moduli spaces of meromorphic quadratic differentials on Riemann surfaces [8], and the associated BPS invariants then count finite-length trajectories of these differentials. It turns out that the corresponding Riemann-Hilbert problems are closely related to the exact WKB analysis of time-independent Schrödinger equations. We give a brief and sketchy treatment of this connection here; we hope to return to this subject in future papers.

Quadratic differentials
For more details on the contents of this section see [8]. Let us start by fixing data and consider the space Quad(g, m) consisting of equivalence classes of pairs (S, q), where S is a compact Riemann surface of genus g and q a meromorphic quadratic differential on S with simple zeroes, and poles of multiplicities m i . It is a complex orbifold of dimension Associated to a point (S, q) is a double cover π :Ŝ → S branched at the zeroes and odd-order poles of q. We denote byŜ • ⊂Ŝ the complement of the inverse image of the poles of q, and define the hat-homology group where the superscript denotes the −1 eigenspace under the action of the covering involution of π :Ŝ → S. The intersection form defines a skew-symmetric form −, − : × → Z.
The groups form a local system over Quad(g, m).
The meromorphic abelian differential √ q is well-defined on the double coverŜ, and holomorphic onŜ • . It defines a de Rham cohomology class in H 1 (Ŝ • ; C) − and can be viewed as a group homomorphism Z : → C It was proved in [8] that the period map is a local analytic isomorphism. By a trajectory of a differential (S, q) we mean a path in S along which √ q has constant phase θ . A finite-length trajectory is of one of two types: (a) a saddle connection connects two zeroes of the differential (not necessarily distinct); (b) a closed trajectory: any such moves in an annulus of trajectories called a ring domain.
Any finite-length trajectory can be lifted to a closed cycle inŜ which defines an associated class γ ∈ . All trajectories in a ring domain have the same class, so we can also talk about the class associated to the ring domain. Let us assume that our quadratic differential is generic in the sense that if γ 1 , γ 2 are two finite-length trajectories of the same phase, then their classes are proportional in . We then define the BPS invariants of q by (γ ) = # saddle connections of class γ − 2 · # ring domains of class γ .
The reason for the coefficient −2 is that a ring domain leads to a moduli space of stable objects isomorphic to P 1 . See [8,Theorem 1.4]. In physical terms saddle connections represent hypermultiplets, whereas ring domains represent vector multiplets.

Claim 7.1
The data ( , Z , ) described above defines a miniversal variation of convergent BPS structures over the orbifold Quad(g, m).
Sketch proof To check the wall-crossing formula one can use the results of [8] to view Quad(g, m) as an open subset of a space of stability conditions on a CY 3 triangulated category defined by a quiver with potential, and then apply the theory of wall-crossing for generalised DT invariants [19,21].
The fact that the BPS structures are convergent should follow from the results of [8,Section 5]. The basic point is that the only non-finiteness in the BPS spectrum arises from finitely many ring domains. Each of these contributes an infinite collection of saddle connections with classes of the form γ + nα, where α is the class of the ring domain. But for sufficiently large R > 0 these saddle connections give a finite contribution to the sum (9).

Voros symbols
The weak Riemann-Hilbert problem (see Remark 4.6(iii)) defined by the above BPS structures can be solved using exact WKB analysis of an associated Schrödinger equation. This was essentially proved by Iwaki and Nakanishi [18] following Gaiottoc et al. [15].
Suppose given a quadratic differential (S, q) as above. Let us also choose a projective structure on the Riemann surface S. 2 We can then invariantly consider the holomorphic Schrödinger equation where z is a co-ordinate in the chosen projective structure. The WKB method involves substituting and then solving for T j (z) order by order. This gives rise to a recursion together with the initial condition T 0 (z) 2 = q(z). Depending on the choice of square-root taken to define T 0 (z) one then obtains two systems of solutions T ± k (z). The differences are single-valued meromorphic one-forms on the spectral coverŜ, which vanish unless k is even. One has ω 0 = √ q(z) dz. The formal cycle Voros symbol associated to a class γ ∈ is the formal sum Iwaki and Nakanishi, relying on analytic results of [20], show that if r ⊂ C * is a non-active ray for the BPS structure defined by (S, q), then the sum over g ≥ 1 in the above formal expressions can be Borel summed in the direction r . This results in Voros symbols which are holomorphic functions of t =h defined in a neighbourhood of 0 in the half-plane H r . They also compute the wall-crossing behaviour for these Borel sums as one varies the active ray r ⊂ C * .

Claim 7.2 Given a quadratic differential (S, q) as above, the Borel sums of the cycle Voros symbols give a solution to the corresponding weak Riemann-Hilbert problem with t =h.
Sketch proof For the definition of the weak Riemann-Hilbert problem see Remark 4.6(iii). The claim should follow from the work of Iwaki and Nakanishi [18], although a careful proof would require additional continuity arguments to take care of differentials with multiple saddle connections. See particularly Theorem 2.18, Theorem 3.4 and formula (2.21).
It is interesting to ask whether given a suitable choice of base projective structure, the Voros symbols in fact give solutions to the full Riemann-Hilbert problem as stated in Sect. 4.2. Another interesting topic for further research is the connection with topological recursion [10], which is known to be closely related to exact WKB analysis. In particular, it is interesting to ask whether the τ -function computed by topological recursion gives a τ -function in the sense of this paper.

Appendix A. Variations of BPS structure
For BPS structures satisfying the conditions of Proposition 4.2, the BPS automorphisms S( ) can be realised as birational automorphisms of the twisted torus T. In general however, even for BPS structures coming from quivers with potential, this is not the case. Thus we need some other approach to defining a variation of BPS structures. If we want to avoid making unnecessary assumptions, the only way to proceed is via formal completions of the ring C[T]. In this section we give a rigorous definition along these lines following Kontsevich and Soibelman [21, Section 2].

A.1 Introductory remarks
Before starting formal definitions in the next subsection we consider here a slightly simplified situation which should help to make the general picture clearer. Let ( , Z , ) be a BPS structure. Given a basis (γ 1 , . . . , γ n ) ⊂ there is a corresponding cone whose elements we call positive. We call a class γ ∈ negative if −γ is positive.
Let us assume that we can find a basis such that every active class is either positive or negative, and further that all positive classes γ ∈ satisfy Im Z (γ ) > 0. These assumptions are always satisfied for BPS structures arising from stability conditions on quivers. Let us also temporarily ignore the difference between the tori T ± .
The co-ordinate ring C[T] can be identified with the algebra of Laurent polynomials In what follows we will modify this procedure in two ways. Firstly, to avoid the assumption on active classes we will work with completions of C[T] defined by more general cones in . Secondly, note that if the form −, − = 0 is trivial, the automorphisms S( ) as defined above will all be identity maps, and the wall-crossing formula will become vacuous. One way to avoid this problem would be to force the form −, − to be non-degenerate by passing to the double BPS structure as in Section 2.8. Instead, we will formulate the wall-crossing formula in a group defined abstractly by using the Baker-Campbell-Hausdorff formula to formally exponentiate elements of C[[T]].

A.2 Formal completions
Let ( , Z , ) be a BPS structure. To an acute sector ⊂ C * we associate a Poisson subalgebra We will now introduce a natural completion of this algebra. Define the height of an element a = γ a γ · x γ to be H (a) = inf{|Z (γ )| : γ ∈ such that a γ = 0}.
Note that since is acute, we have H (b)).
In particular, for any N > 0, the subspace consisting of elements of height ≥ N is a Poisson ideal. We can therefore consider the inverse limit of the quotient Poisson algebras as N → ∞: The resulting completion C [[T]] can be identified with the set of formal sums such that for any N > 0 there are only finitely many terms with |Z (γ )| < N . We define the height of such an element to be the minimum value of |Z (γ )| occurring.

A.3 Lie algebra and associated group
Continue with the notation from the last subsection. For each N > 0, the Poisson bracket induces the structure of a nilpotent Lie algebra on the Poisson ideal consisting of elements of positive height. The Baker-Campbell-Hausdorff formula then gives rise to a unipotent algebraic group G ,≤N with a bijective exponential map exp : g ,≤N → G ,≤N .
Taking the limit as N → ∞ we obtain a pro-nilpotent Lie algebra and a pro-unipotent group related by a bijective exponential map exp :ĝ →Ĝ .
More concretely, the Lie algebraĝ consists of formal sums (44) of positive height, viewed as a Lie algebra via the Poisson bracket. The group consists of formal symbols exp(x) for elements x of the Lie algebra. The group structure is defined using the Baker-Campbell-Hausdorff formula: Note that if 1 ⊂ 2 are nested acute sectors then there is an obvious embedding of Lie algebras g 1 ⊂ g 2 , which induces an injective homomorphism G 1 →Ĝ 2 of the corresponding groups. We happily confuse elements of G 1 with the corresponding elements ofĜ 1 .
This exponentiates to give an action ofĜ by Poisson automorphisms: On the left-hand side of (45) the symbol exp is purely formal as discussed above, whereas on the right-hand side it denotes the exponential of the Poisson derivation {x, −}, viewed as an endomorphism of the vector space C [[T]].

A.4 Products over rays
Let ( , Z , ) be a BPS structure. Recall the notion of the height of a ray from Sect. 2.5. Let us now also fix an acute sector ⊂ C. The support property ensures that for any ray ⊂ the expression defines an element of the Lie algebraĝ . By definition, its height is equal to H ( ). We denote the corresponding group element by Given N > 0, we can consider the truncation This element is non-trivial only for the finitely many rays of height < N . Therefore, we can form the finite product Taking the limit N → ∞ then gives a well-defined element The product on the right hand side will usually be infinite.

A.5 Deforming the central charge
There is one more detail we have to deal with before we can give the definition of a variation of BPS structure. The problem is that the groupsĜ andĜ ,<N which we defined above depend on the central charge of the BPS structure in a highly discontinuous way. This problem arises already in the definition (43): the subalgebra C (T) will change whenever the central charge Z (γ ) of any class γ ∈ crosses a boundary ray of , and since this will happen on a dense subset of the set of possible central charges Z : → C this leads to a highly discontinuous family of algebras.
To solve this problem, let us fix C > 0 and consider the subset ( , C) ⊂ consisting of all non-negative integral combinations of elements γ ∈ which satisfy By definition this is a submonoid of under addition, so there is a Poisson subalgebra We can then define Lie algebras and associated groups exactly as above. Moreover, if we take C smaller than the constant in the support property for the BPS structure ( , Z , ) then all the identities of the last subsection will take place in these groups, since we will then have Consider now the quotient algebra C ( ,C) [T] <N defined as before. This depends only on the set of γ ∈ ( , C) for which |Z (γ )| < N , and hence only on the finite subset Moreover, as Z varies, it remains constant in the complement of the finite system of hypersurfaces. Clearly the same remarks apply to the corresponding groupĜ ( ,C),<N .

A.6 Variations of BPS structure
We can now give a rigorous definition of a variation of BPS structures. The conditions are explained more fully below. Uniform support property Fix a covariantly constant family of norms Then for any compact subset F ⊂ M there is a C > 0 such that We say that the variation is framed if the local system of lattices p over M is trivial. The lattices p can then all be identified with a fixed lattice , and we write the variation as ( , Z p , p ). We can always reduce to the case of a framed variation by passing to a cover of M, or by restricting to a contractible open subset U ⊂ M. A framed variation of BPS structures ( , Z p , p ) over a manifold M gives rise to a holomorphic map which we call the period map. The variation will be called miniversal if this map is a local isomorphism. A general variation will be called miniversal if the framed variations obtained by restricting to small open subsets of M are miniversal.

A.7 Behaviour of BPS invariants
Condition (V4) in Definition A.2 completely describes the variation of the BPS (or equivalently DT) invariants: if one knows the p (γ ) at some point p ∈ M then they are uniquely determined at all other points p ∈ M. This statement follows immediately from the following result. Proof Suppose that is the disjoint union of two subsectors = + − where we make the convention that + lies in the anti-clockwise direction. There is an obvious decomposition It follows from this that each element g ∈Ĝ decomposes uniquely as a product g = g + · g − with g ± ∈Ĝ ± . But the obvious relation gives an example of such a decomposition, so by uniqueness it follows that S( ) determines the elements S( ± ).
The product (46) can be thought of as corresponding to a decomposition of into a finite number of subsectors, each containing a single ray of height < N . Applying the first part repeatedly therefore shows that S( ) <N determines each element S( ) <N for rays ⊂ . Since this holds for arbitrarily large N it follows that S( ) determines the elements S( ) for all such rays. But the elements S( ) faithfully encode the invariants DT(γ ) for classes γ ∈ satisfying Z (γ ) ∈ , so the result follows.
Remark A.4 Suppose given a framed variation of BPS structures ( , Z p , p ) over a manifold M such that at some point (and hence at all points) p ∈ M the form −, − = 0 vanishes. Then the Lie algebrasĝ are abelian, and hence so too are the associated groupsĜ . It follows that the wall-crossing formula is satisfied if all elements S p ( ) are taken to be constant as p ∈ M varies. It follows from Lemma A.3 that the BPS invariants p (γ ) = (γ ) are constant.
One can also easily see the following statement: suppose given a framed variation of BPS structures ( , Z p , p ) over a manifold M. Then for any fixed class γ ∈ there is a locally-finite collection of codimension one real submanifolds W i ⊂ M such that the invariant (γ ) is constant on the open complement The submanifolds W i are called walls for the class γ , and the connected components of the complement (51) are called chambers. inequalities The first inequality is the support property and requires the assumption that γ ∈ is active, whereas the second is just the fact that the linear map Z : ⊗ Z R → C has bounded norm. It follows that in expressions such as (52), which are sums over active classes, we can equally well use γ or |Z (γ )| in the exponential factor. ( , Z , ) be a convergent BPS structure and choose a norm · as above. Then for any > 0 there is an R > 0 such that
Proof Clearly it is enough to prove the result for each p ∈ {0, 1, 2} separately, so we can consider p fixed. For x 0 there is an inequality By the discussion above, we can take S > 0 so that the inequality (52) holds with R = S and |Z (γ )| replaced with γ in the exponential factor. The numbers γ are bounded below so increasing S if necessary we can assume that for all classes γ ∈ . Taking R = 2S and using the definition of DT invariants Since the numbers γ appearing in the exponential factor are bounded below, by increasing R we can ensure that this sum is smaller than any given > 0.

B.2 Partially defined automorphisms
Let ( , Z , ) be a BPS structure, and fix a convex sector ⊂ C * . As above, we also fix a norm · on the vector space ⊗ Z R. In the next subsection we will be interested in controlling Hamiltonian flows of functions on the twisted torus T of the form DT(γ ) · x γ , for those classes γ ∈ satisfying Z (γ ) ∈ . Thus it makes sense to define, for each real number R > 0, a subset It is not clear that the subset V (R) ⊂ T is open in general, so we define U (R) to be its interior. We note the obvious implications We think of the open subsets U (R) ⊂ T as forming a system of neighbourhoods of the boundary in some fictitious partial compactification of T.

Lemma B.2 The open subset U
Proof Take an element z ∈ . Since is acute we can find a constant k > 0 such that Take a point ξ ∈ T. Using the support property, we conclude that for any active class γ ∈ with Z (γ ) ∈ , and all real numbers S > 0, there are inequalities for some universal constant c > 0. Since the numbers γ are bounded below, it follows that the element e −S Z/z · ξ ∈ T lies in the subset V (R) for sufficiently large S > 0. The argument applies uniformly to all elements ξ lying in a compact subset of T, so we conclude that V (R) has non-empty interior.
Let us define a -map germ to be an equivalence class of holomorphic maps of the form f : U (R) → T, where two such maps f i : U (R i ) → T are considered to be equivalent if they agree on the intersection U (max(R 1 , R 2 )) of their domains. Thus a -map germ gives a partially-defined holomorphic map f : T T which is well-defined on the open subset U (R) ⊂ T for all sufficiently large R > 0. A -map germ f will be called bounded if for any > 0 one has for all sufficiently large R > 0. It is clear from (55) that composition of such maps is well-defined and hence gives the set of bounded -map germs the structure of a monoid. We write Aut (T) for the group of invertible elements in this monoid, and call the elements of this group invertible bounded -map germs. Elements of Aut (T) give partially-defined holomorphic maps f : T T with partially-defined inverses, and hence give a precise meaning to the idea of a partially-defined automorphism of T.

B.3 BPS automorphisms
Let ( , Z , ) be a convergent BPS structure and fix a convex sector ⊂ C * . Recall the definition of the formal series DT( ) associated to a ray ⊂ C * from Sect. 2.5. In this section we show that this series is absolutely convergent on suitable open subsets of T and that the Hamiltonian flow of the resulting holomorphic function gives a partially-defined automorphism of T in the precise sense described in the last subsection. Proof Take assumptions as in the statement and choose > 0. For convenience we choose the norm · on Z ⊗R so that for all β, γ ∈ there is an inequality Take R > 0 satisfying the conclusion of Lemma B.1. Thus for each ray ⊂ we can choose M( ) > 0 such that for each p ∈ {0, 1, 2}, and such that ⊂ M( ) < .
Since the γ are bounded below, the p = 0 case of (57) immediately implies that for each point ξ ∈ U (R) which proves that DT( ) is absolutely convergent. The Hamiltonian flow of DT( ) is defined by the differential equation Using (56) it follows that providing the flow stays in U (R) it satisfies Let us consider an integral curve φ(t) for this flow which starts at some point φ(0) ∈ U (R + ). We claim that this curve extends to all times t ∈ [0, 1] and remains in U (R). It follows from this that the time 1 Hamiltonian flow S( ) exists, and defines a holomorphic map S( ) : U (R + ) → U (R).
Since we can make > 0 arbitrarily small by increasing R > 0, the resulting -map germ is bounded. Considering the opposite flow then shows that the map is invertible, which completes the proof of Proposition B.3.

B.4 Compositions of BPS automorphisms
Let ( , Z , ) be a convergent BPS structure and fix a convex sector ⊂ C * . Fix > 0 and take R > 0 as in Lemma B.
The proof of Proposition B.3 shows that for each S > R and each ray ⊂ the map S( ) gives a well-defined embedding U (S + M( )) → U (S). For each H > 0, the composition in clockwise order of the -map germs S( ) corresponding to the finitely many rays ⊂ of height ≤ H therefore gives a well-defined map U (R + ) → U (R), and hence a bounded -map germ The remaining task is to make sense of the limit of this map germ as H → ∞.
Suppose that a -map germ f is well-defined on the open subset U (R) ⊂ T. We define the R-norm of f to be the infimum of the real numbers K > 0 such that for all β ∈ and all ξ ∈ U (R) e −K · β |x β (ξ )| ≤ |x β ( f (ξ ))| ≤ e K · β |x β (ξ )|.
The proof of Proposition B.3 shows that the -bounded map germ S( ) is well-defined on U (R + ) and has norm < M( ) there. Proof Let us consider two finite compositions P 1 and P 2 of the maps S( ) with ⊂ as above, which differ by the insertion of one extra term. Thus the two products can be written in the form P 1 = AC and P 2 = ABC with The composite map germ X = P 2 P −1 1 is well-defined on U (R + 2 ). We claim that it has norm < 2M( j ) there. Given heights H 2 > H 1 > 0 we can apply the claim repeatedly and use (63) to deduce that where X (H 1 , H 2 ) has norm at most 2 · e −H 1 . The result then follows from Lemma B.4.
To prove the claim, note first that X = AB A −1 is also the time 1 flow of a vector field on T, namely the Hamiltonian vector field of the function DT( j ) • A −1 pushed forward by the map A. We can therefore apply the same argument as in Proposition B.3 provided we can bound the norm of this vector field as in (61). To do this it is enough to bound the norm of the difference between the derivative of the map A and the identity at points of U (R). This in turn is achieved by the same argument as Proposition B.3 using the p = 2 case of inequality (57). We leave the details to the reader.

B.5 Birational transformations
The following example was first observed by Kontsevich  Proposition B.6 Suppose that ( , Z , ) is a generic, integral and ray-finite BPS structure. Then for any ray ⊂ C * the BPS automorphism S( ) extends to a birational automorphism of T, whose action on twisted characters is given by When the invariants (γ ) are integers this is clearly a birational automorphism of T.