Toroidal and Elliptic Quiver BPS Algebras and Beyond

The quiver Yangian, an infinite-dimensional algebra introduced recently in arXiv:2003.08909, is the algebra underlying BPS state counting problems for toric Calabi-Yau three-folds. We introduce trigonometric and elliptic analogues of quiver Yangians, which we call toroidal quiver algebras and elliptic quiver algebras, respectively. We construct the representations of the shifted toroidal and elliptic algebras in terms of the statistical model of crystal melting. We also derive the algebras and their representations from equivariant localization of three-dimensional $\mathcal{N}=2$ supersymmetric quiver gauge theories, and their dimensionally-reduced counterparts. The analysis of supersymmetric gauge theories suggests that there exist even richer classes of algebras associated with higher-genus Riemann surfaces and generalized cohomology theories.


Introduction and summary
For centuries physics and mathematics are tied together and their mutual influence goes in both directions. While physicists have often used known mathematical results to derive new results in physics, physicists can also use their insights to create new mathematics, which can be of independent interest to mathematicians.
The quiver Yangian (introduced in [1] and studied further in [2,3]) in our opinion is an excellent example for such a new mathematical output arising from the physics of supersymmetric gauge theories and string theory. The quiver Yangian Y(Q, W ) is an infinite-dimensional algebra defined from a quiver Q and a superpotential W , and can be regarded as a vast generalization of the affine Yangians for Lie superalgebras gl m|n . The consistency of the algebras, as well as of their representations on the statistical-mechanical model of crystal melting, on the one hand can be checked algebraically from the definitions, and on the other hand can be derived physically in terms of equivariant localization of supersymmetric quantum mechanics [2,3].
In the realm of integrable models it has long been known that Yangians lie at the bottom of the elliptic-trigonometric-rational hierarchy of algebras underlying those models (cf. [4]). It is therefore a natural question to ask if there exist trigonometric and elliptic counterparts of quiver Yangians.
In this paper we answer this question positively. We define elliptic and trigonometric counterparts E τ (Q, W ) and T β (Q, W ) of quiver Yangians, thus completing the elliptic-trigonometric-rational hierarchy for quiver Yangians. (In the following we sometimes suppress the dependence on the superpotential W and use simplified notations E τ (Q) and T β (Q).) As in the case of quiver Yangians, our algebras can be regarded as generalizations of elliptic algebras and quantum toroidal algebras for gl m|n discussed previously in the literature (see e.g. [5][6][7][8][9][10][11]). We hope that the study of our general elliptic and toroidal quiver algebras and their representation theories will grow into a new exciting research area.
In physics language, these algebras are realized by 3d/2d/1d quantum field theories with four supercharges, in which the algebras are related by dimensional reductions. Moreover all these theories are effective field theories on the D-branes probing toric Calabi-Yau three-folds: (1.1) Here the elliptic-trigonometric-rational hierarchy is represented by three odd functions, namely the theta function ζ(z) = Θ q (z) (where as we will see q = exp(2πiτ ) with τ being the modulus of the torus) for the elliptic case, the hyperbolic sine function ζ(z) = 2 sinh(βz/2) (where β determines the periodicity along the circle direction of the cylinder) for the trigonometric case, and ζ(z) = z for the rational case. We will see that the physics of supersymmetric gauge theories gives not only these algebras and their crystal-melting representations, but also their Hopf-algebra and shuffle-algebra structures.
Somewhat surprisingly, the physics derivation from quiver gauge theories actually points to even richer possibilities: we can consider more general Riemann surfaces (of genus greater than one, and also possibly with punctures): (generalized cohomology theories) . (1.2) While we leave many questions for future work, we argue in this paper that we can define quiver BPS algebras for more general cases, associated with moduli spaces of supersymmetric field theories and/or generalized cohomology theories (and "formal group laws"). For this reason the possible family of quiver BPS algebras will go well beyond the traditional elliptic-trigonometric-rational hierarchy of quiver BPS algebras (and hence the word 'beyond' in the title of this paper). 1 The rest of this paper is organized as follows. In section 2 we define elliptic and toroidal quiver algebras. In section 3 we construct representations of the elliptic and toroidal quiver algebras from the statistical model of crystal melting. In section 4 we discuss the derivations of the quiver BPS algebras from the analysis of supersymmetric quiver gauge theories arising from D-branes. This analysis is extended further in section 5, where we derive Hopf-algebra structures and shuffle-algebra structures. Section 6 is about the generalization to higher genus, and connections to generalized cohomology theories and formal group laws. We have also included appendices on more technical materials. This paper is intended for a mixed readership of both mathematicians and physicists. For mathematicians interested in our algebras and their representation theories, note that sections 2 and 3 do not require any knowledge of supersymmetric field theories, and will serve as a self-contained guide to the algebras. Sections 4 and 5, while written partly in the language of physics, contain more geometrical and algebraic discussions of the algebras. For physicists, one option is to start with the definitions of the algebras in sections 2 and 3, however those wishing to get intuitions and understand the physics contexts first might prefer to start with section 4, where we discuss the first-principle derivations of the quiver BPS algebras from supersymmetric quiver gauge theories.
Note added: During the final stages of this project, a preprint [15] appeared in the arXiv, which discusses the toroidal version of our quiver algebras but only for the unshifted cases s (a) = 0 and with the focus on the non-chiral quivers; the overlaps are within sections 2 and 3 of this paper.

Elliptic and toroidal quiver algebras
In this section we define elliptic and toroidal quiver BPS algebras E τ (Q, W ) and T β (Q, W ), generalizing the quiver Yangian Y(Q, W ) for the rational case. The quiver Yangian can be regarded as a reduction of the toroidal quiver algebra, which in turn is a reduction of the elliptic quiver algebra. In fact, we will see that all the three algebras can be defined in a unified manner with essentially the same ingredients, if we keep in mind some important differences between them.
Let us here comment on the naming conventions of the algebras. Since we have the elliptic-trigonometric-rational hierarchy, one systematic naming scheme is to call our algebras "elliptic/trigonometric/rational quiver BPS algebra," or simply "elliptic/trigonometric/rational quiver algebra," respectively. While our elliptic/trigonometric algebras are in general new, the complication is that they (as we will see in section 2.3) coincide with known algebras for Lie superalgebras gl n|m when the associated toric Calabi-Yau manifold has no compact four-cycles; in these cases various names are already given to the algebras. For the rational case the algebra is called the affine Yangian, the spherical Hecke central (SHc) algebra or the universal enveloping algebra for the W 1+∞ -algebra [16][17][18][19][20][21], while for the trigonometric case 2 it is called the quantum toroidal algebra [5,9,22] or Ding-Iohara-Miki (DIM) algebra [6,7,23] (for the case of gl 1 ); 3 the elliptic case of the DIM algebra [10,24] is sometimes called the elliptic DIM algebra (again for gl 1 ), for example. In order to reflect this state-of-the-art in the community, in this paper we call the rational quiver algebra as the quiver Yangian (as in our previous papers), the trigonometric quiver algebra as the toroidal quiver algebra, while we will use the terminology elliptic quiver algebra for the elliptic case. 4 rational trigonometric elliptic rational quiver algebra trigonometric quiver algebra elliptic quiver algebra = quiver Yangian = toroidal quiver algebra

Quivers and equivariant parameters
As in the case of quiver Yangians [1], we start with a pair (Q, W ) of a quiver Q and a superpotential W . 5 While our definition applies to general quivers and superpotentials, in practice our focus will be on quivers whose vacuum moduli spaces describe toric Calabi-Yau three-folds (see [25,26] and references therein). We denote the set of vertices of the quiver by Q 0 and that of the arrows by Q 1 .
We introduce an equivariant parameter h I for each arrow I ∈ Q 1 . We impose two constraints on h I . One is the loop constraint, which says that we have loop constraint: for each closed loop L associated with a term in the superpotential W . Namely for each closed path in the superpotential the weights h I 's for the arrows in the path add up to zero. Another is the vertex constraint vertex constraint: I∈a sign a (I) h I = 0 (2.2) for each vertex a, where sign a (I) is +1 if the arrow I flows towards the vertex a, −1 if the arrow I flows outwards from the vertex a, and 0 otherwise. For quivers and superpotentials associated with toric Calabi-Yau three-folds, we can show that we are left with two independent parameters h 1 and h 2 when both loop and vertex constraints are imposed [1] -the two parameters represent equivariant torus actions on the toric Calabi-Yau three-fold.
Throughout the paper we adopt the following notations: {a → b} : the set of all arrows pointing from node a to node b , |a → b| : the total number of arrows pointing from node a to node b . (2.3) For a pair of nodes a, b ∈ Q 0 we define their chirality parameter as: which satisfies χ aa = χ ab + χ ba = 0. The quiver is called non-chiral when |a → b| = |b → a| for any pair of nodes a, b ∈ Q 0 ; otherwise the quiver is called chiral. A quiver that corresponds to a toric Calabi-Yau three-fold with (resp. without) compact 4-cycles is chiral (resp. non-chiral).

Trigonometric and elliptic versions of quiver Yangians
In this section we summarize the definitions of the quiver Yangians and their trigonometric and elliptic generalizations in a unified manner. Since all the algebras in this paper incorporate the shifts, we will not distinguish between the unshifted and the shifted version, and will omit the adjective "shifted" from the names.
From now on we use the convention that variables written in the upper case (such as Z, W , H, C) are exponentiated versions of variables written in the lower case (such as z, w, h, c): The choice of β will not play a significant role in our consideration and can be re-absorbed by a proper re-scaling of variables; we keep it to make a comparison to known algebras easier. Throughout this paper, we use the following modified hyperbolic sine function and q-theta function: 6 Sin β (z) := 2 sinh (2.6) Apart from the normalization factors that do not play a role in the later analysis, we divide the canonical q-theta function by the factor of Z 1/2 in order to convert it into an odd function of z -this property will be important when we derive the quiver BPS algebras.
where for the rational case, there is one set of ψ, namely ψ + = ψ − . These relations have a lot of additional ingredients, let us explain an application of them all one by one.
Let us first explain the common features shared by the three classes of, namely elliptic/trigonometric/rational, algebras in the definition (2.7). The Z 2 grading (i.e. the Bose/Fermi statistics) of the e (a) and f (a) generators is denoted by |a|, and is defined as |a| = (|a → a| + 1) mod 2 , (2.8) while the ψ (a) ± (z) generators are always even. Namely, the e (a) and f (a) generators are bosonic (resp. fermionic) when |a| = 0 (resp. |a| = 1) while the ψ (a) ± (z) generators are always bosonic. The notation [⋆, ⋆} in (2.7) denotes the supercommutator, namely it is an anti-commutator for two fermions and a commutator otherwise. And throughout the paper, we define (2.9) The properties of the quiver BPS algebras are encoded in the so-called bond factor -a function constructed from the quiver Q according to the following rule where the form of the weight factor ζ(u) from each arrow depends on whether we are considering the rational, trigonometric, or elliptic case. Expression (2.10) is a direct generalization of the bond factor function (see, say, [3, equation (2.9)]) from the rational case to the case of a generic odd function ζ(u). Also we have introduced a supplementary sign factor, so that the bond factor satisfies a reciprocity condition for a quiver of arbitrary chirality: Clearly, we have a freedom in the definition (2.10) to multiply the r.h.s. expression by a sign function (−1) f ab , subject to f ab = f ba (mod 2). For non-chiral quivers associated with Calabi-Yau 3-folds without compact 4-cycles, the choice of the function f ab can be fixed by a comparison with a canonical definition of quantum rational/trigonometric/elliptic algebras associated with gl m|n . For algebras associated with chiral quivers, there is no other a priori definition, hence there is no preferred choice of the sign function (−1) f ab . We propose (2.10) as a canonical definition of the algebras while keeping in mind that, in principle, we can simultaneously define the whole family of algebras that differ by a sign choice (−1) f ab for each arrow between quiver nodes.
Unlike the case of quiver Yangians, the bond factor (2.10) actually has to be slightly modified before we can use it to define the algebras and study their representations, especially for the general case of the chiral quivers. Therefore, we will call bond factor (2.10) bare. As we will show later, to deal with chiral quivers and to study general representations (for both non-chiral and chiral quivers), 7 we need to introduce the balanced bond factor: where t is defined as The prefactor (ZW ) t 2 χ ab in (2.12) is called the "balancing factor", its key role is to balance a Laurent expansion of (2.10) since for chiral quivers it may go over 7 As shown in [3], the representations of a quiver algebra are related to the framing of the quivers, which in general results in the shift of the algebra. The framed quiver is in general chiral, even when the corresponding unframed quiver is non-chiral. The balanced bond factor of the framed quiver enters the description of the representations of the algebra, see (3.13).
half-integer powers of Z, and we would prefer to work with Laurent series in Z. For the rational case (i.e. the quiver Yangian) or when the quiver is non-chiral, the balancing factor equals 1 and the balanced bond factor reduces to the bare one. The balanced bond factor (2.12) satisfies the reciprocity condition where we have used the reciprocity for the bare bond factor (2.11) and that χ ab + χ ba = 0.
The difference among the three classes of algebras are in (1) the weight factor ζ(u) in the definition of the balanced bond factor ϕ a⇐b (z, w), (2) the value of the central term c, (3) the mode expansions of the generators (e (a) (z), ψ (a) ± (z), f (a) (z)), (4) the meaning of ≃ in (2.7) and (5) the definition of the propagator p(z). Let us now explain them in turn.
1. In the bare bond factor (2.10) and hence in the balanced bond factor (2.12), the weight factor ζ(u) for each arrow is where the functions Sin β (u) and Θ q (u) are defined in (2.6).
2. The central term reads: 3. The three cases differ in the mode expansions for their generators. For the e (a) (z) and f (a) (z) generators, for both the non-chiral and chiral quivers, we have e (a) (z) = n∈Z α∈Z ≥0 f (a) n,α Z n q α elliptic (2.17) For the ψ ± generators in the case of non-chiral quivers, ±,n,α Z ∓n q α elliptic (2.18) where we have used the fact that in the rational case, ψ = ψ ± . Note that compared with the known algebras for some of the non-chiral quivers in the literature, we have introduces the additional integer s (a) (called the "shift") since it will be important when studying the generic, in particular non-vacuum, representations of the algebras, see [3] for the case of shifted quiver Yangians. For the ψ ± generators in the case of chiral quivers, ψ (a) ±,n Z ∓(n+s (a) ) trig.   4. The meaning of the "≃" signs are also different in the three classes. In the case of the rational algebra relations are among Taylor series expansions around z = ∞, therefore the expansions of the l.h.s. and the r.h.s. are equivalent up to terms z n w m≥0 and z n≥0 w m . In the trigonometric and elliptic cases we compare Laurent series in Z and W , namely, for a relation L 1 ≃ (P/Q)L 2 , where L i are two Laurent series and P/Q is a ratio of two hyperbolic sines or thetafunctions, the "≃" means that the Laurent expansions of QL 1 and P L 2 are equivalent.
5. Finally, the propagator p(z) is a formal delta function operator, defined differently for the three cases: where the δ-function is a "formal" delta function. For details on the properties of the formal delta function δ(Z) see Appendix A.
As explained in the introduction, the form of the algebras in (2.7) comes from the natural trigonometric and elliptic generalizations of the quiver Yangians of [1], i.e. as the uplift u → Sin β (u) → Θ q (u), which will be confirmed later from the gauge theory computation, see section 4. However, the trigonometric and elliptic versions have important features that are absent in the rational case. In the algebra (2.7) these features manifest as the appearance of c and χ ab , as well as the fact that it is the balanced bond factor (2.12) instead of the bare one (2.10) that enters the definition of the algebra (2.7). Note that some of the new ingredients, such as the factor C ǫ t χ ab in the first equation of the (2.7), have been missing in most of the existing literature; this is because for the trigonometric and elliptic versions it is often the case that only some of the non-chiral quivers have been considered in the literature.
We perform four types of consistency checks for the algebra defined in (2.7). The most straightforward one is to explicitly check the mutual consistency of various equations of (2.7), in the spirit of Jacobi identities. For example, if we assume the last three equations, i.e. the e-e, f -f , and e-f relations, in (2.7), we can derive all the remaining ones. (We leave this computation to Appendix B.) The second consistency check is that when c = 0, we can construct crystalmelting representations, see section 3.
Thirdly, as for the three equations that we assume for mutual consistency checks, note that since the e-e and f -f relations are both independent of cand the consistency check for the c = 0 case is taken care of by the construction of the crystal representations -essentially we have only one important relation, namely the e-f relation, to justify, which we do by comparing with the known algebras, see section 2.3.
Lastly, one can try to realize the algebra (2.7) explicitly using free fields. In applications the so-called free field representation of the discussed algebras might become useful. As far as we are aware, a complete free field realization is known only for algebras associated with the root system of gl n , whereas for the subalgebra generated by ψ (a) ± (z) it can be constructed for general quivers. We discuss a free field realization for the subalgebras generated by ψ

Comparison to known algebras
While our elliptic/trigonometric algebras are in general new, we can compare our results against existing definitions in the literature, when the toric Calabi-Yau three-fold has no compact four-cycles. Let us verify that this is indeed the case, by extending the similar analysis for the quiver Yangians in [1].
Consider gl m|n . In order to specify the algebra we need to choose a Dynkin diagram. This is determined by a signature (cf. [27,28]  Then the quiver and the superpotential are given by (see e.g. Figure 1) Let us define the Cartan matrix and the auxiliary matrix following [28]: (2.23) We can choose the following equivariant weights for the arrows: The resulting relations for T β (Q m|n ) can then be transformed into: On the other hand, the resulting relations for E τ (Q m|n ) can be transformed into: (2.27) These relations can now be compared with (3.55) -(3.62) in [29].

Serre relations
The relations given in (2.7) can in general be supplemented by further relations, often called the Serre relations, without spoiling the consistency of the algebras. When (a maximal set of) such relations are imposed we obtain the reduced elliptic quiver algebra E τ (Q, W ): (2.28) We can call the original algebra E τ (Q, W ) the unreduced elliptic quiver algebra when we want to emphasize that the Serre relations are not imposed. We can similarly define the reduced quantum-toroidal quiver algebra T β (Q, W ) by imposing Serre relations on T β (Q, W ).
Serre relations are established naturally for the quivers corresponding to gl m|n discussed in section 2.3, see [28] for the quantum-toroidal cases, and [29] for the elliptic case with gl n . For algebras associated with chiral quivers Serre relations are unknown in general since there is no apparent bridge to a Lie superalgebra counterpart. Nevertheless we present our proposal for relations that could play a role of the Serre relations in the cases of Calabi-Yau three-folds with compact four-cycles in Appendix D. To describe this, let us define the root pairing by and extend it over the weights by linearity. We define the weight operators following [28]: so that we can define a weight w(X) of the operator X through a relation: Finally we introduce a graded q-commutator: In terms of these we can write down the following Serre relations for T β (Q m|n ): If mn = 2, m + n > 2: If m|n = 1|1: In these expressions Sym z 1 ,z 2 denotes the symmetrization of the expression with respect to the exchange of z 1 and z 2 .
Here we should mention that our derivation of these relations works for an analytic continuation of (2.7) when we treat the l.h.s. and the r.h.s. as functions rather than Laurent series, and we use the bond factors simply as ratios of functions ζ(u) that are defined in (2.15). In practice this implies that in addition to this derivation one needs to check Serre relations for the first few generators in the mode expansion (2.17).
To derive the Serre relations for E τ (Q m|n ) let us introduce free field operators χ i (z) commuting with E τ (Q m|n ) and having the following correlators: Using the vertex operators of χ i (z) we can define new algebra generators analogous to "dressed" generators in [30]: Then if the correlators are applied to the free fields, the new generators behave as those of T β (Q m|n ): We can derive the corresponding Serre relations for the elliptic case by simply starting with a relation for T β (Q m|n ), substituting the generators e (i) (z) with E (i) (z) and taking correlators * of the whole expressions. The correlators will produce the necessary Pochhammer factors in the expressions. For instance, let us consider the simplest relation (2.33a). After following the procedure described above, one obtains the following Serre relation in E τ (Q m|n ): We can compare this relation to (3.24) in [29] when n = 0 (or m = 0).
For the quiver Yangians, the ψ (a) (z) are Cartan generators, and the crystal configurations are eigenstates of ψ (a) (z). Based on a certain ansatz, one can bootstrap the entire algebra using these crystal representations, see [1] for the unshifted quiver Yangian and [3] for the shifted quiver Yangian.
By contrast, for the trigonometric and elliptic quiver Yangians, the ψ − generators mutually commute, and the form of the algebraic relations are almost identical to those for the rational quiver Yangian; as a result, the molten crystals that are representations of the quiver Yangians are also representations of the trigonometric and elliptic quiver Yangians when c = 0. In this section, we will first review the crystals (see [36,37]), then show that they are representations of trigonometric and elliptic quiver BPS algebras when c = 0.

Crystals from quivers
As we have explained, a quiver with a superpotential can encode the information of a toric Calabi-Yau three-fold geometry. Such a quiver-superpotential pair actually has two equivalent descriptions: as an abstract quiver graph with a superpotential (Q, W ) or a periodic quiver on a torusQ = (Q 0 , Q 1 , Q 2 ), where Q 2 is the set of loops in the fundamental domain ofQ. (The equivalence between these two descriptions can be explained by brane constructions from which the quiver description arises, see [26].) For the purpose of studying the crystal representations, we will need the description of the quiver-superpotential pair as a periodic quiverQ = (Q 0 , Q 1 , Q 2 ).
To a pair (Q, W ) one associates a geometric object known as the quiver path algebra. This construction goes as follows. Consider an algebra CQ of formal variables associated to paths in a quiver. We impose a simple multiplication rule dictating that the result of multiplication of two paths p 1 and p 2 is the joint path p 1 p 2 if p 1 and p 2 can be concatenated, and zero otherwise. In this language the superpotential W is an element in CQ that is a formal combination of loops in the quiver Q. It is natural to define a formal derivation of a loop path ℓ with respect to any other path p as the sum of all possible complements of p in loop ℓ. Denote I W the two-sided ideal in CQ generated by ∂ I W for all I ∈ Q 1 . The quiver path algebra is then defined as: (3.1) Each quiver arrow I ∈ Q 1 has two physical characteristics: the equivariant weight (complex mass) and the R-charge. The former characteristic is a complex parameter h I satisfying loop and vertex constraints discussed in section 2.1. The latter characteristic is assigned to I in such a way that the total R-charges of all loop paths contributing to W is +2 (instead of 0 for equivariant weights).
Consider all monomials in ℘(Q, W ) corresponding to paths starting with one quiver vertex v ∈ Q 0 . All these monomials m can be uniquely characterized by their equivariant weight h(m) and R-charge R(m). The set of possible values forms a lattice C 0 in the 3d space. The R-charges can be chosen in such a way that R(I) ≥ 0, so that C 0 is a part of a lattice filling only a convex region of the 3d space. By forgetting the R-charge we obtain a 2d projection of C 0 to the h-plane, and this projection can be identified with a periodic quiverQ. Therefore an alternative definition of C 0 is a lift of paths inQ to 3d where the third coordinate is given by twice the number of loops around faces the path is encircling.
The crystal C 0 defines the vacuum representation of the quiver algebra, as studied in [1,2] for the quiver Yangians, and is named the canonical crystal in [3]. As shown in [3], any subcrystal ♯ C ⊂ C 0 can be used to define a representation (although not every subcrystal can give rise to an irreducible representations). Different subcrystals ♯ C ∈ C 0 correspond to different framings of the same quiver. 8 A triplet of quiver, superpotential and framing defines a subcrystal ♯ C ∈ C 0 and thus defines a representation of a shifted quiver Yangian [3]. Here we would like to use a similar identification between crystals and representations of T β (Q) and E τ (Q).
A crystal ♯ C is a configuration of points in 3d. We will call these points "atoms" and denote them by . The atoms are "colored" by quiver vertices v ∈ Q 0 . The coloring function works as follows: when we project an atom to a vertex inQ, this vertex is a lift of some vertex v ∈ Q 0 to the periodic quiver Q covering Q, as a result we claim the color of the atom is v and denote this as v . The edges of the crystal correspond to multiplication of corresponding monomials in ℘(Q, W ) by I ∈ Q 1 . We use the notation I · to denote a new atom that corresponds to a monomial in ℘(Q, W ) that is given by multiplying the monomial associated with by I on the right.
For a crystal ♯ C we define a set of molten crystals K as a finite subset of ♯ C satisfying the melting rule: If I · is in K for an atom and for an edge I ∈ Q 1 , then itself is in K . Let us define the set Add(K) (resp. Rem(K)) as the set of atoms that can be added (resp. subtracted) to (resp. from) K so that the resulting set is again a molten crystal.
An extensive selection of such crystal constructions can be found in [1,3,37]. Let us mention here the simplest example of crystals associated with C 3 . The corresponding unframed quiver is a trefoil quiver with a canonical superpotential, that corresponds toQ represented by a triangular lattice: . (3.4) A canonical crystal fills the first octant in a cubic lattice Z 3 . The molten crystals are represented by plane partitions where atoms are depicted as boxes piling up in a corner of a 3d room (see Figure 2). The corresponding set Add(K) (resp. Rem(K)) includes boxes that can be added (resp. removed) to (resp. from) the pile such that the resulting construction remains stable.

Representations for c = 0
In this subsection, we determine crystal representations of the algebra (2.7) when the central charge is c = 0.
A molten crystal representation ♯ Rep is defined by a crystal ♯ C, which is a subcrystal of the canonical crystal C 0 . (For the special case of ♯ C = C 0 , the representation ♯ Rep is the vacuum representation.) The module ♯ Rep is spanned by vectors labeled by molten crystal states |K from ♯ C.
Let us explain the ansatz for how the generators (e, ψ ± , f ) should act on the set of crystal states {|K }. The reasoning is almost identical to the one for the rational case of the quiver Yangian, see [1, section 6.1].
Therefore, they can have simultaneous eigenstates. Moreover, for c = 0, ψ + (z) and ψ − (z) are actually indistinguishable, therefore the two have the same action: ψ where [⋆] ± are two expansions in the Laurent series defined in Appendix A for the cases of trigonometric and elliptic algebras. In the case of a rational algebra there is no need to consider a Laurent expansions and both [⋆] ± coincide with the very argument ⋆.

2.
The generator e (a) (u) adds an atom to |K and f (a) (u) removes an atom from |K : where p(u) captures the dependence on the spectral parameter and E(K → K + a ) and F(K → K + a ) describe the coefficients for different final states.
We further separate the statistical factor ± from the modulus of the coefficients by defining The goal now is to fix Ψ (a) , K → K ± a , and ǫ(K → K ± a ). This takes five steps.
1. From the ψ − e and ψ − f relations, we have Given the form of the function p(u), taking ∼ picks up the w → h a value, and we have Ψ which gives Ψ (a) The prefactor ♯ ψ (a) 0 (u) describes the contribution from the ground state of the representation ♯ Rep, and is determined by the shape of the crystal ♯ C. For the rational case, it is given by [3, eq. (3.7)], and uplifting which gives its expression for the general algebra (2.7). It is easiest to express ♯ ψ (a) 0 (u) in the language of the framed quiver, 9 as where f denotes the framing vertex. 9 For how to translate the shape of the crystal ♯ C to the framed quiver, see [3, section 3].
2. Let us define the notation 14) and (3.15) Then from the e − e and f − f relations, we have the constraints on the coefficients K → K ± a as and From the e − f relations, we have 4. From the definition (3.14) and the constraints (3.16) and (3.18), one can determine the solution for K → K ± a to be For the reason behind the factor (−1) |a| , see [1, section 6.5.3.3].
5. For the prescription on how to fix the statistical factors ǫ(K → K ± a ), see [1, section 6]. The explicit result for a specific choice of signs f ab (see the discussion below (2.14)) is given in [2, equation (2.62)], and here we generalize it for the generic sign choice f ab in Appendix E: In summary, the crystal representations for the rational, trigonometric, and elliptic quiver BPS algebras (2.7) with c = 0 are given by (3.21) One can explicitly check that this representation is consistent with the algebraic relations (2.7), namely that (3.21) indeed gives a legitimate representation of the algebra (2.7) when c = 0. Further, one can check that by choosing the ζ(u) and p(u) to be the rational ones in (2.15) and (2.20), respectively, the representation (3.21) reduces to the one for the rational quiver Yangians of [1,3].
We just saw that the K → K ± a are solved by demanding that the ansatz (3.6) and (3.7) indeed give a representation of the algebra (2.7) when c = 0. In the next section, we will compute these coefficients directly from gauge theories. (For the rational case, see [2, section 2]) for the unshifted quiver Yangians and [3, section 4] for the shifted quiver Yangians.) Since they acquire an independent definition in the gauge theory, see (4.30), we will use [K → K ± a ] to denote the coefficients that are computed directly from the gauge theory.
The result from the gauge theory computation is that for all the rational, toroidal and quantum elliptic quiver BPS algebras in the case c = 0, the matrix elements satisfy: where we actually encounter a slightly modified bond factor (which satisfy the reciprocity condition (2.14)): and correspondingly a modified charge functioñ Ψ (a) Using this set of coefficients, the matrix elements of generators are defined in the crystal representation in the following way: is the total number of atoms of color a, and sign corrections read (see Appendix E): 10 For an unprepared reader the representation (3.26) might seem more complicated than (3.21). In fact, the difference between these two sets of formulas are concentrated in a few factors that we introduced to incorporate the difference between our definitions of the two bond factors, ϕ in (2.12) andφ in (3.23). From the algebra point of view, the definition of ϕ seems more natural, whereas from the physics point of viewφ emerges as the result of the supersymmetric localization. As we have shown explicitly, they give rise to equivalent representations.

Toroidal and elliptic quiver algebras from gauge theories
In this section we derive the elliptic quiver algebra E τ (Q, W ) from the analysis of the three-dimensional N = 2 quiver gauge theory associated with the quiver Q and the superpotential W . (See [26] and references therein for realizations of these theories from D-branes and NS5-branes.) The theory is then compactified on the elliptic curve of modulus τ , along which the theory reduces to a two-dimensional N = (2, 2) theory for the toroidal quiver algebra and a one-dimensional N = 4 theory for the quiver Yangian.

Vortices on elliptic curves
We consider the three-dimensional quiver gauge theory associated with a quiver Q and a superpotential W . For a node v ∈ Q 0 we have an N = 2 vector multiplet (A, X, λ,λ) (with A a gauge field, X a scalar in the adjoint representation, and λ,λ are fermions), and an Fayet-Illiopolous (FI) parameter r: Here and in the following we choose the 1 and 2-directions to be along the elliptic curve, with 0 being the residual direction. For an arrow I ∈ Q 1 , we have an N = 2 chiral multiplet (φ, ψ,ψ) (φ is a complex scalar and ψ,ψ are fermions), with a flavor charge (equivariant parameter) h I : In the rest of the paper we would like to work with the so-called cyclic chamber (cf. [3]): The vacuum moduli space is described by a set of equations (see Appendix F): where the explicit expressions for the supercharge Q can be found in Appendix F.
There is a BPS bound for the Hamiltonian eigenvalues: where the central charge reads: The Bradlow limit (see e.g. [38,39]) on the vortex number reads: The Hilbert space (4.6) is naturally graded by a lattice of central charges that is a lattice of vorticity quantum numbers. The Bradlow limit (4.9) indicates that the number of graded components is finite in general.
The BPS Hilbert space can be calculated by usual localization techniques where wave functions will be represented by effective Gaussian fluctuations around the classical vacua. This procedure can be systematized in the Wilsonian renormalization approach where the renormalization is one-loop exact. The linearized deviation modes will be organized in the usual Kaluza-Klein (KK) towers of winding modes, whose temporal frequency is given by the following effective expression: ω = p x n + p y m + flavor charge . (4.10) As a result of the compactification along the cycles of the elliptic curve, either p x or p y tends to infinity so that the effective flavor charges for the corresponding higher winding modes become greater than the renormalization cutoff. Those modes thus do not contribute to the effective action. During this procedure the area of the elliptic curve: shrinks and does not allow vortex solutions due to (4.9).
Therefore we assume that the elliptic and toroidal quiver BPS algebras correspond to the zero vorticity graded component of the BPS Hilbert space.
In the next subsection we will consider the zero vorticity BPS Hilbert space and construct the representations for E τ (Q, W ) and T β (Q, W ) algebras; and we will return to the discussion on contributions of vortices later in subsection 4.3.

Zero vorticity BPS subalgebra
The energy functional is positive definite on a BPS configuration and contains a squared field-strength term: (4.12) For the zero vorticity component of the BPS Hilbert space Z = 0, therefore the only solutions to the differential equations (4.4) are constant field configurations, and (4.4) reduces to a system of algebraic equations for the expectation values (and hence with the z-derivatives dropped): (4.13) The discussion is then essentially the same as in the case of quantum mechanics in [2], if we disregard the periodicities along the elliptic curve. In particular the torus fixed points of the moduli space are given by three-dimensional crystals.
By invoking the Narasimhan-Seshadri-Hitchin-Kobayashi correspondence, we can simplify the equations if we complexify the gauge transformations. This gives the moduli space of quiver representations: where the FI parameters r v are now traded for the stability parameters θ v . Note that more precisely we should rather consider isomorphism classes of quiver representations where a homomorphism of quiver representations R and R ′ is defined as a collection of linear maps: such that the following diagram commutes: As in [2] we consider large values of the stability parameters θ v , and consider the infrared effective theory where heavy degrees of freedom are integrated out. This leaves the infrared effective meson space as a tangent bundle in R to a fixed point defined by K modulo linearized gauge transformations, and the effective wave-function Ψ is a function on this moduli space.
Since we are interested in the BPS sectors the wave-function is annihilated by the effective superchargeQ , which reads in terms of meson fields as (see (F.18) and [2]): where we substituted the fermion fields by suitable forms on the cotangent bundle to the field configuration space. While this expression of the supercharge involves functional derivatives, we can be more explicit if we decompose the fields into an orthogonal basis of doubly-periodic functions: φ(x, y) = m,n∈Z φ m,n e 2πi(mx+ny) , where we parameterize the elliptic curve with modulus τ in the following way: aτ a a Im τ z = a(x + τ y) , where the effective frequencies ω a (m, n) are given by ω a (m, n) = π(n −τ m) a Im τ + h a . Following [2] (see also [40]), we identify the effective BPS wave functions in fixed points with the Euler classes of cotangent bundles, and a Thom representative for such an Euler class is given by a character: Now the contribution from a single meson reads: where is the Jacobi theta function satisfying ϑ 11 (−z|τ ) = −ϑ 11 (z|τ ). In terms of Θ q (z) in (2.6) we have: provided that the map between lower case variables and upper case variables is given by Z = e 2πiz .
Apparently, the Euler class we are calculating is defined by a chiral Dirac determinant on the Riemann surface. Strictly speaking this quantity is not a periodic holomorphic gauge-invariant scalar as the naive product formula (4.24) suggests. The ζ-regularization breaks a part of symmetries. Rather a regularization is chosen in such a way that the result is a holomorphic section of a holomorphic line bundle on the torus Jacobian [41], in this way ζ(z) acquires properties that will be crucial for us as we will see soon: ζ(z) is a holomorphic odd function.
So far we have focused on 3d N = 2 quiver gauge theories on the elliptic curve. However, it is now clear that the same discussion will go through in parallel for 2d N = (2, 2) theory on a circle, or for 1d N = 4 quantum mechanics; such dimensional reductions lead to shrinking cycles of the elliptic curve that reduce the theta function to a hyperbolic sine function (for 2d) and a linear function (for 1d), when both or one of the cycles are contracted, respectively. As a result we derive the sequence of reductions depicted in (1.1).
Following this observation we propose a generic expression for a regularized Euler class for the meson space following [2, eq. (3.29)]: Eul ζ (R IR ) := (−1) a: ha=0 where the function ζ is defined for in (2.15) and it depends on the choice of the algebra (equivalently the dimensionality of the gauge theory).
We define the generators of the BPS algebra following [2,3] (analogously to [42,43]) as the Hecke modification operators for bundles carried by D-branes. As a result of the action of Hecke modifications, the quiver representations are embedded into each other: where 1 v is a simple vector with a unit at position v and zeros elsewhere. By embedding we imply that there is a homomorphism defined in (4.15) from the bigger space into the smaller one.
For fixed points on the representation, this homomorphism is possible only if one of the corresponding crystals is embedded into the other crystal. In other words the corresponding crystals differ by just a single atom and we can denote them as K and K + .
We define the incidence locus in the following way: Defined in this way the incidence locus is a subspace of a graded meson space and, therefore, it is a graded meson space itself. Correspondingly, the Euler class can be defined for the incidence locus as well.
We define matrix elements in the following way: , K)) .

(4.30)
While we do not have generic combinatorial closed formulas for these expressions, we have analyzed these expressions for a large number of rather generic configurations with the help of Mathematica. In all the examples presented in [2,3], which include various Calabi-Yau three-folds (both without and with compact 4-cycles) and the various framed quivers for them (which correspond to different representations), we find that the following conclusion holds:  To complete this subsection let us note that in the vacuum a complexified Wilson loop: commutes with the superchargeQ˙2, therefore it contributes to the BPS algebra. It is natural to consider a generating function for these observables, and its action is diagonal in the crystal basis:

On vortices and 4d crystals
The dynamics of vortices is rather rich [38,39,[44][45][46][47][48][49][50] and deserves a separate discussion. Apparently, an inclusion of non-zero-vorticity BPS states into the whole BPS dynamics will extend the BPS algebra. As we have seen already, however, such topological configurations are a feature of super-Yang-Mills-Higgs theory in flat 2+1 space-time dimensions, and hence those states will not survive during a compactification from 3d to 1d -the Bradlow limit (4.9) singles out states with zero vorticity. Therefore the dynamics of the vortex BPS states seems to be irrelevant for the algebra hierarchy (1.1) and goes beyond the scope of the present paper. In this subsection we will highlight briefly some natural perspectives for the BPS algebra modifications and extensions with vortices included, and leave a thorough approach to this problem for discussions elsewhere.
Let us start with simple Abrikosov-Nielsen-Olesen (ANO) Abelian vortices in a super Yang-Mills-Higgs model with a single chiral scalar. The vortex moduli space for this system reads: where ω Σ is the top volume form on the Riemann surface Σ. It is well-known that this moduli space admits a smooth induced metric and is parameterized by the zeros of the chiral field φ on Σ [44,46,48]. The topological charge -the vorticity number -is defined by the first Chern character of the resulting gauge bundle and coincides with the number of zeros of φ: At low energies the wave-functions of BPS states containing vortices localize to the cohomologies of the vortex moduli space: (4.37) Singular monopole/anti-monopole operators are defined in [51][52][53]. TheQ˙2 supersymmetry preserving version of this operators has the following form: where ∂ µ γ = πǫ µνλ F νλ is the dual photon field and the last term (namely the integration over the time-like Dirac string) is required by the supersymmetry.
The choice of the sign in (4.38) depends whether a monopole or anti-monopole operator is chosen and which part of the original supersymmetry it preserves. The (anti-)monopole operator raises (lowers) the vorticity number of a BPS state by 1: On a non-trivial surface the algebra of monopole operators becomes extended naturally by mixing with zero-mode fields in the vortex background. In the simplest example of a single vortex on a torus surface, the BPS Hilbert space is identified simply with the cohomologies of the surface (see e.g. [50]) and has dimension 4. We therefore expect the monopole operator to have, in fact, 4 non-trivial matrix elements pairing the vacuum with 4 vorticity-1 states.
In the IR the gauge group is broken first to its Abelian subgroup: where each U(1) factor is associated with an atom of a crystal, and |K| is the total number of atoms in crystal K. Further this group is broken completely by the chiral field vacuum expectation values (VEVs).
The fields producing VEVs in the IR can be described as "baryons". For each given atom ∈ K consider a path ℘ in the crystal K connecting this atom to any root atom. We can define baryon fields as products over matrix elements associated with arrow links I in the path ℘ : In general, the dynamics of such vortices is rather involved, since we need to take into account the F-term constraints for the expectation values. We can nevertheless calculate easily their quantum numbers. Let us define a vector of vortex numbers associated with the atoms of the crystal K: (4.41) The numbers n define the magnetic flux of U(1) through Σ and how many zeros the field B has on Σ.
The factorization condition (4.40) imposes further restrictions on possible values of N K . Indeed for two atoms 1 and 2 connected by an arrow link I, the baryons satisfy a factorization relation: (4.42) An expectation value of the chiral field φ I is also physically observable, therefore φ I is not allowed to have poles on Σ, only zeros. Therefore we derive a constraint for the zeros of the baryon fields or, equivalently, the fluxes of U(1) components in (4.39): If for a pair of atoms 1 and 2 there is The constraint (4.43) has a lot in common with the melting rule for 3d crystals (3.3). If one considers the case of plane-partition molten crystals associated with C 3 , then one assigns numbers to boxes of the plane partition following the rule (4.43) with inequality n 1 ≤ n 2 substituted by n 1 ≥ n 2 . The result then will be a 3d image of a 4d solid partition.
To a pair (K, N K ) satisfying (4.43) one can assign a 4d configuration of atoms in a space parameterized by the following axes: where the atoms are arranged in the following way. We start with embedding the 3d crystal lattice in Λ 4 by simply assigning to all the atoms ∈ K the fourth coordinate equal to 0, then we fill the points along the fourth axis of the lattice Λ 4 starting with 0 and going upwards up to n ′ = N − n for some large common number N (for example as N we can accept the Bradlow limit (4.9)). All such configurations represent molten 4d crystals in the lattice Λ 4 where the lattice is generated by the quiver maps Q 1 all having the fourth coordinate n equal to zero and a new monopole map M + having coordinates (0,0,0,1).
We should stress that the appearance of 4d crystals is not surprising. Vortices are quasi-particles in the super-Yang-Mills-Higgs theory associated to a system of D8/D6/D4/D2/D0 branes probing the whole geometry of CY 3 × T 2 , where the torus T 2 is a spatial slice of our system. An appearance of 4d melting crystals (also referred to as brane brick models) was already noticed in the literature (see e.g. [54,55]) in applications to enumerative geometry counting problems of toric Calabi-Yau four-folds [56][57][58]. Although CY 3 × T 2 is not a toric CY 4 (for which a color/shape generalization of the solid partition should be relevant [59,60], nevertheless we expect that these two setups may have common features, in their countings for BPS states of D-branes.

Hopf algebra and shuffle algebra from gauge theories
In the previous section we have seen that the quiver gauge theories give firstprinciple derivations of the representations of our quiver BPS algebras. In this section we see the added bonus that the quiver gauge theories also explain naturally the Hopf-algebra structures and shuffle-algebra structures.

Coproduct on crystal representations
For the discussion of the coproduct, the crucial ingredients are the representations of the shifted quiver Yangians in terms of non-canonical crystals [3]. While we refer [3] for the details, the essential points are that we change the framing of the quiver, which in turn makes it possible to start growing crystals at different multiple points ('starters') on the spectral curve. For the toroidal case the spectral curve is a cylinder and this looks as follows: Unlike shifted quiver Yangian representations considered in [3], the crystal 2d lattices are shifted with respect to each other along the spectral parameter cylinder for generic vectors that are not an integral combination of h 1 , h 2 and the cylinder circumference, therefore the crystals are not intersecting in general.
We treat a configuration like (5.1) as a disjoint union of crystals, we will denote a state corresponding to multiple crystals K i growing from different seeds in the following way: We can observe naturally an analogy between these crystal configurations and partition vectors of [61]. An application to a braiding problem [62] suggests to treat multiple crystal configurations as tensor products of representations associated with individual crystals analogously to [2, Section 2.7].
There is a certain freedom in the definition of the tensor product and the coproduct action on it. For example, there are different variants of the coproduct on quantum enveloping algebras, obtained by twisting the canonical coproduct. Moreover, for any definition there are two canonical ways to define a coproduct that are related by the R-matrix morphism. For us there is a freedom in choosing a representation. Although we expect that a bootstrap representation (3.25) and a representation following from the QFT localization (4.30) are isomorphic, the state norms in these two representations are different. We will concentrate this freedom in a function u to be defined in such a way that the coproduct will acquire a certain canonical form. Eventually the tensor product of representations is defined in the following way: In [2, Section 2.7] the function u was treated as an additional statistical factor keeping track of ordering crystals in the tensor product.
For multiple tensor factors the relation has the following form: The right hand side of (5.2) is a vector of an ordinary crystal representation, and for the algebra action on it we can use expressions (3.26). It is natural to treat this action of the generator g on the left hand side of (5.2) as the coproduct ∆(g). Notice that on the right hand side the generators satisfy algebra relations, and, therefore, ∆ is an algebra homomorphism by construction.
Summarizing, we derive the following representation for the coproduct action on the bootstrap representation (3.25): Also we used the following short-hand notations: We choose the following function u: For this choice, the expressions for the generator actions simplify: is a mutual statistics factor for a pair of crystals.
Let us define the following action of graded generators on the tensor product: (5.10) The tensor product is defined canonically for homogeneous elements in the following way: The function Ψ in expression (5.8) is a product: where ∈ K 1 and ′ ∈ K 2 for the raising generators ∆(e), and the situation is opposite for the lowering generators ∆(f ). We assume that the crystals are widely separated: This allows one to approximate the following ratios: Using these manipulations, we derive the following closed-form expressions for the coproducts of the raising/lowering generators: The corresponding expressions for the coproducts for the Cartan generators can also be easily derived since the Cartan generators act diagonally in the crystal basis.
Having our quiver BPS algebra A we can introduce a co-unit ε : A → A ⊗ A and an antipode S : A → A satisfying [63]: where m is a multiplication. Therefore our BPS algebra is a Hopf algebra.
For future reference let us list here the whole set of relations (compare to [28, As a result the coproduct ∆ and the co-unit ε are algebra homomorphisms, whereas the antipode S is an algebra anti-homomorphism: We should stress that the resulting coproduct structure is a bit naive. It works well for the quantum toroidal algebras (see e.g. [11]). However the canonical coproduct structures chosen for affine Yangians [20] and quantum elliptic algebras [64][65][66] are more intricate.

Shuffle algebra
Consider a modification of the Borel positive part of the crystal representation (3.26) where extra factors are absent: These generators satisfy a different algebra: where the modified bond factorφ is defined in (3.23). We will call this algebrâ E + τ (Q).
Following [67,68] we define a function: Using this definition it is possible to recombine the generator relations as In what follows we will construct a shuffle algebra Sh(Q) associated to a quiver Q following [69]. It will be natural to identify this algebra with an algebra of the Coulomb branch, similar to the one constructed in [70], whereas the BPS algebra constructed in Section 4.2 can be called an algebra of the Higgs branch (since we performed the localization with respect to the Higgs branch of our quantum field theory). A generic approach to localization dictates that both ways of localization are expected to give isomorphic Hilbert spaces of BPS states, and this observation is referred to as the Higgs-Coulomb duality in the literature. However, the Higgs-Coulomb duality should be approached with some care (see e.g. [71]). The reason is that both Higgs and Coulomb branches may have singularities, so that not all the BPS states are well defined in both frames. We will treat the following homomorphism: as being reminiscent of the Higgs-Coulomb duality.
In the literature [68,[72][73][74][75] on the shuffle algebras related to examples of quantum Yangians, toroidal and elliptic algebras, it is proven that the homomorphism (5.22) may go both ways, promoting ξ to an algebra isomorphism.
Analogously to [69] we consider a subspace Sh (Q, d), where d is a dimension vector of the quiver, being generated by Laurent series in the variables {x i,a }. The index a run over the quiver nodes, and i = 1, . . . , d a . The functions generating Sh(Q, d) are symmetric in each group of variables {x i,a } da i=1 labeled by a ∈ Q 0 . This symmetry is reminiscent of the Weyl subgroup of the broken gauge symmetry of the quantum filed theory in question. The shuffle product is a binary operation acting in the following way: Explicitly the shuffle product acts on elements of Sh(Q) in the following way (compare to [69,Theorem 2] and [76, Proposition 2.3] for generalized cohomology theories): where the symmetrization is re-shuffling the elements of the groups {x i,a } and {x ′ i,a } in such a way that the result is symmetric with respect to each subgroup for each a ∈ Q 0 , and the total number of shuffles is Let us rewrite this definition in a more "field-theoretic way." Let us introduce a coupling between two types of variables: and combine double indices (i, a) in single indices α. Thus one could rewrite (5.24) in the following way: In this form it becomes clear that the shuffle product is associative.
The homomorphism ξ is then given by a simple identification of generator modesê (a) n with a multiplication in the shuffle algebra by a monomial x n i,a , where each generator ofÊ + τ (Q) corresponds to a new index i.
To justify this definition it is enough to show that simple generators satisfy (5.21) and extend it to the whole algebra by the shuffle product associativity. Indeed notice that for simple generators we have the following relations: (5.28)

Beyond elliptic BPS algebras: hyperelliptic curves and generalized cohomologies
In our discussion of elliptic and toroidal quiver algebras, it has become clear that one of the essential ingredients is the choice of an odd function ζ: once we fix this we can define the generalized Euler class by (4.27), and compute all the matrix elements of the algebra generators, thus recovering the representations of the algebra.
In fact, one can be even bolder and try to consider compactifications of quiver gauge theories on more general Riemann surfaces Σ with genus g > 1, and consider an even larger class of functions ζ there. Notice that it is indeed possible to consider compactification on such a manifold, by a partial topological twist of the theory along the surface (cf. [77,78]).
The fact that surfaces with genus g > 1 do not have Abelian additive laws defined on them is not a problem for us. As discussed around (4.33), the equivariant parameters, and hence the spectral parameter, of the algebra take values in the space of Wilson lines for the complex gauge fields, and since we are interested in the zero-vorticity sector the space is the Jacobian J(Σ) ≃ H 1 (Σ, R)/H 1 (Σ, Z) of the curve Σ. We can then choose an odd function ζ on the Jacobian J(Σ) (which is an Abelian variety and has the additive structure), and this is enough to define the quiver algebra -we can define the bond factor by (2.10), and then define the algebra by the relations (2.7).
In practice, which function should we choose as ζ? Since we have the theta function for the elliptic case, a natural generalization is to consider analogues of theta functions for the Jacobian J(Σ) as sections of corresponding determinant bundles (see e.g. [41]). The theta functions depend on the choice of the spin structures or equivalently the choice of the quadratic refinement of the intersection form. While there are 2 2g such spin structures, there are 2 g−1 (2 g − 1) spin structures (odd spin structures) whose associated theta functions are odd. This means that we have a set of 2 g−1 (2 g − 1) possible functions ζ, for a genus g surface. Since different odd spin structures are related by the large coordinate transformations, it follows that we need to consider all the 2 g−1 (2 g − 1) choices of ζ simultaneously. This is one crucial difference from the genus g = 1 case. Moreover, for each choice of the theta function we in practice need to choose the set of A and B-cycles, and the functions ζ transform non-trivially under the large coordinate transformations of the Jacobian -in this sense, the algebras themselves behave more as a "wavefunction", rather than a "partition function". Due to these subtleties it would be of great interest to further study the algebras associated with higher genus surfaces.
In addition to the algebras, we can discuss the geometry, in the language of the associated generalized cohomology theories for the moduli spaces of quiver gauge theories. To explain this, let us recall some relevant facts and definitions from algebraic topology. (Our discussion below will be far from complete, and readers are referred to e.g. [79] for a modern review.) Suppose that one has an oriented generalized cohomology theory (GCT) E * (−). From the axioms one finds that E * (CP ∞ ) = E * (pt) [[x]] (for an extensive review of generalized cohomology and homology theories see also [80]), where the generator x represents the first Chern class c 1 (O(1)) of the universal line bundle O(1) on CP ∞ . Now, by considering the product of two line bundles we have a map CP ∞ × CP ∞ → CP ∞ . When translated into the cohomology theory this defines a map where the last equality follows from the Atiyah-Hirzebruch spectral sequence. This map is represented by the image y]]. It turns out that this image satisfies some consistency conditions, and is a formal group law.
A formal group law 11 over a commutative ring R is a power series F (x, y) ∈ 11 More precisely, this defines a one-dimensional commutative formal group law. In the fol-R[[x, y]], such that the following three conditions are satisfied: 3) The most obvious example of a formal group law is F (x, y) = x + y: this is called the additive formal group law, and represents the ordinary cohomology theory. While a general formal group law does not represent generalized cohomology theories, certain necessary and sufficient conditions for representing generalized cohomology theories are known in the literature [81].
The logarithm ℓ F of a formal group F is an isomorphism from the additive formal group law to the formal group law F , so that For a given formal group law F we can construct its logarithm by a formal integral For the additive formal group law we have a trivial logarithm ℓ F (x) = x.
By comparing the logarithm ℓ F with the weight factor ζ (2.15) playing the central role in our BPS algebra construction, we note that the two functions are inverse to each other: For simple line bundles the formal group law (6.4) boils down to a relation between their Chern characters: The function ζ specifies the relation between the first Chern class of some line bundle and its characteristic that behaves linearly under tensor multiplication.
lowing by a formal group law we always mean a one-dimensional commutative formal group law.
The physical nature of such a quantity is transparent: it is a charge -in our particular case when we consider simple flavor bundles this charge is the flavour charge, or the complex mass of the corresponding chiral field, or its equivariant weight. This physical intuition allows us to restore the relation between an elementary contribution of a weighted subspace in the meson space to the Euler class coincident in this case with the Chern class and its equivariant weight: We can now come back to our discussion of the cohomology theories underlying our algebra. As the notation suggests, our ζ for each of the rational/trigonometric/elliptic versions of quiver BPS algebras can be regarded as a particular example of the inverse logarithm of a formal group law underlying one of the ordinary cohomology/K-theory/elliptic cohomology theories. We can however consider more general cohomology theories, or more general formal group laws, and we expect that such choices will lead to general quiver BPS algebras, including those associated with hyperelliptic curves (see [76] for a related discussion on a generalized cohomology theory applied to Nakajima quiver varieties and [82] for an elliptic chomology example). In other words, we expect to have a "quiver BPS algebra of type F " (which we can denote by F(Q, W )) for each formal group law F .

Summarizing, we have a chain of concepts
It is also worth pointing out that the cobordism can be regarded as a universal cohomology theory [83,84], and this suggests that we can define a "universal BPS algebra" directly from oriented cobordism. Related to this, our function ζ(u) can be expanded as where ϕ : Ω SO * → Q is a multiplicative genus from the oriented cobordism Ω SO * , and the oriented cobordism classes of complex projective spaces [CP 2n ] represent the polynomial generators of the oriented cobordism with rational coefficients, i.e. Ω SO * ⊗ Q.
If we define a theory on a generic Riemann surface as a spatial slice, why is the result related to a generalized cohomology theory of the target space? Although we have already given a somewhat mathematical answer to this question, another more physical argument is that we have already started with a cohomological theory by construction (4.6). Ideally, we wish to verify the axioms of GCT directly from this definition. However, unfortunately, we can not claim that our theory is some GCT E * (−) since (4.6) is defined for a specific class of target spaces specified by a family of quivers, therefore we are unable to check if defined in this way cohomology H * (−, Q) satisfies the set of GCT axioms for arbitrary CW complexes. We do not think that this issue is insurmountable. To put forward our arguments let us make a brief step back to K-theory. We may claim that the theory of maps from a circle represents K-theory since this situation mimics another well-known scenario in string theory (see e.g. [85][86][87]). If we Wick-rotate the temporal direction of the space-time cylinder S 1 × R t , the partition function of the resulting configuration represents the Witten index of a BPS string state stretched between two branes. The brane boundary conditions are well-known to carry the structure of coherent sheaves under derived equivalences of the resulting BPS string states as Chan-Paton factors [88,89]. The Witten indices of these BPS Hilbert spaces correspond to the Grothendieck group K 0 of the category of coherent sheaves. There exists a crucial difference between this setup and the cohomology (4.6): in the K-theory case we can choose a generic algebraic variety as the support of a stalk produced by a Wilson line operator of a superconnection defined in [90] in a theory with, say, a CP n target space. If we were able to present for a theory on a generic Riemann surface a surface operator commuting with the supercharges and associated with a generic algebraic variety, we might try to argue that a theory defined as a cohomology of maps from a generic Riemann surface to some target space always corresponds to some GCT of the target space by checking whether it satisfies the GCT axioms. As an eventual outcome of this program we might be able to construct a physically motivated cocycle GCT model (see [91] for such a construction for the equivariant elliptic cohomology theory).
where C 0 and C ∞ are small clockwise contours encircling zero and infinity, respectively, and s ± g are finite integers that bound the two sums from above and below correspondingly.
Suppose a function g(z) has the following form: where I and J are some sets of indices. Then we have the following "residue formula": Apparently, this analysis goes through if the function g(z) is multiplied by any monomial z k . This observation allows us to extend this formula to the situation when g(z) is multiplied by a Laurent series of z: we just apply it term by term.
In a similar fashion we deal with the cases when g(z) is a ratio of thetafunctions -we expand the theta-functions in q and apply this formula to each q-term that is represented by a rational function multiplied by a finite Laurent polynomial. We apply this tactics whenever we deal with the ratio of thetafunctions, hence, in particular, the two decompositions of the theta function read: 12

B Consistency check of the algebra
In this appendix, we check the consistency of the algebra defined in (2.7). 12 Here traditionally [n] q = (q

B.1 Mutual consistency of algebraic relations
The relations in (2.7) can be classified into three groups: 1. ψ ± − ψ ± relations: 2. ψ ± − e and ψ ± − f relations: 3. e − e, f − f , and e − f relations: We will start with the equations in group-3, and first derive the equations in group-2, and finally using the equations in group-3 and group-2 to derive those in group-1.
First, write the last equation in (B.3) (with a slight change of variables) as Let us consider the product L a,b (z 1 , z 2 ) e (d) (w): passing the e (d) (w) to the other side of L a,b (z 1 , z 2 ) using the e − e and e − f relations, we have (B.5) Using L a,b (z 1 , z 2 ) ≃ R a,b (z 1 , z 2 ) to replace all the L's in (B.5) by the R's (with appropriate superscripts and variables), we have (B.6) Plugging in the definition of R's (the 2nd equation of (B.4)) into (B.6), we obtain a relation that involves ψ ± and e. Focusing on each delta function, one thus obtain the ψ ± − e relations in (B.2). In particular, the last line in (B.6) vanishes due to the reciprocity condition (2.14) of the bond factor. Now, repeating the procedure above, but replacing e (b) (w) by f (b) (w), we obtain the ψ ± − f relations in (B.2). We have thus obtained all the equations in group-2.
Finally, let's derive the equations in group-1. Again, we use the relation L a,b (z 1 , z 2 ) ≃ R a,b (z 1 , z 2 ) with (B.4). First, consider the product L a,b (z 1 , z 2 ) ψ  ± (w) to the other side of L a,b (z 1 , z 2 ) using the ψ ± − e and ψ ± − f relations that we just derived, we have Then plugging in the expression of R a,b (z 1 , z 2 ) from the second equation of (B.4) into (B.8), we obtain a relation among ψ ± . Focusing on each delta function, one thus obtains the ψ ± − ψ ± relations in (B.1). This concludes our check on the mutual consistency of the algebra (2.7).

B.2 Consistency of central extension
Although we have just checked explicitly the mutual consistency of the algebraic relations in (2.7), let us discuss further the potential subtlety of the central extension. Ultimately, the check that the central extension is possible again boils down to checking the mutual consistency of the algebra (2.7) when c = 0.
In (2.7) we have introduced a central extension of the toroidal and elliptic quiver BPS algebras by a central element c. These relations are a natural algebra deformation based on known extensions in quantum toroidal [28] and elliptic algebras [29]. For the case c = 0 we have constructed explicitly a non-trivial crystal representation. However this setup raises a natural question whether a generic elliptic quiver BPS algebra for c = 0 constructed as a quotient of a free algebra of generators e (a) (z), f (a) (z), ψ (a) (z) by the relations (2.7) is non-empty.
To convince ourselves that the resulting algebra is non-trivial we propose the following construction mechanism. We start with a free associative algebra A 0 of only e (a) (z) and f (a) (z) elements. If one considers further the quotient A 1 of this algebra by the e-e and f -f relations in (2.7), the resulting quotient is non-zero since the e-e and f -f relations are not affected by the central extension. Then for all commutators in the resulting algebra we introduce two novel generators ψ (a) ± (z) according to the rule dictated by the e-f relation in (2.7). This last operation is a standard introduction of a central extension. One can switch the order of taking the quotient and first take the quotient of A 0 by the e-f relation to get A 2 . The only information on the quiver entering A 2 is the number of generators and their statistics, and we can therefore easily mimic A 2 by the generators and relations of the suitable quantum toroidal algebra associated with gl m|n that is known to be non-empty.
We have seen in the previous subsection that the remaining ψ-e, ψ-f and ψ-ψ relations can be derived from the e-e, f -f , e-f relations. Since the c = 0 case is actually slightly simpler than the general case, we repeat the computation for c = 0 here again.
First let us note that when c = 0, the e-f relation allows us to define ψ ± as the corresponding contact terms: It is a simple exercise to derive the remaining relations for a = b.
In this section we will construct a free field representation for a subalgebra generated by the generators ψ (a) ± (z) similarly to [92]. Unfortunately, unlike the field OPE (2.7) this representation is not universal with respect to the hierarchy (1.1). We will restrict ourselves to T(Q), assuming that the corresponding representation for E(Q) can be derived along the lines of [30].
In this representation, the expressions for the fields ψ Here the new generators form a Heisenberg algebra with relations: and all the other commutators are trivial.
The commutators of the Heisenberg algebra generators with the operators e (a) (z) and f (a) (z) read: . (C.8) D On Serre relations for T β (K P 2 ) and T β (K P 1 ×P 1 ) Calabi-Yau threefolds in general may have chiral unframed quivers Q, corresponding quiver algebras A(Q) can not be associated with a deformation of some affine Lie superalgebra gl m|n . Here by A we imply any of Y, T β or E τ . This issue makes it difficult to assign some Serre relations to them. However it is possible to summarize some set of rules the Serre relations obey for quiver algebras associated with gl m|n : 1. The Serre relations are automatically satisfied for an analytic continuation of (2.7) when e-e relations are treated as an equality. We could take this set of rules as a guiding principle and suggest relations allowing one to reduce the corresponding algebra further consistently even for the cases of chiral quivers. By analogy, we will call these relations Serre relations for our quiver algebras. Unfortunately, at present we do not have a generic algorithm to construct the Serre relations for an arbitrary quiver algebra A(Q), however we can present corresponding Serre relations for few examples associated with chiral quivers to demonstrate that such a construction is valid in principle.
We will consider examples of Calabi-Yau threefolds K P 2 and K P 1 ×P 1 both having a compact four-cycle. Corresponding quivers and superpotentials read: Correspondingly, we propose the following sets of Serre relations for Y (K P 2 ) and Y (K and for T β (K P 2 ) and T β (K P 1 ×P 1 ) respectively: Here by a symbol CycSym we imply a symmetrization with respect to all cyclic permutations of respective sets of indices and superscripts.
These Serre relations (D.2) and (D.3) are automatically satisfied for analytic continuation of the quiver algebras. Furthermore, they reduce the numbers of states at modules M i to those of canonical molten crystals up to level 5 in both cases. For the number of states in modules M i to match the number of molten crystals one needs to apply higher order Serre relations.

E Sign equations
In this section we describe a method to solve the equations (3.17).
The crystal atoms have internal statistics, therefore processes re-shuffling atoms may lead to additional ± signs multiplying the crystal wave functions. Let us consider a process of adding/removing an atom a to/from the crystal K. This process produces a statistical multiplier that we denote as P ( a , K). Now suppose we add/remove first an atom a then another atom b . Then if we apply the same set of operations to the atoms a and b but in the reverse order, the result might be different: where the function f ab only depends on the atom colors a and b and satisfies f ab + f ba = 0 (mod 2) . where subscripts 1, 2 are used to stress that the atoms contributing to this equation never coincide, therefore the functions f ab are not subject to the further constraint f aa = 0 (mod 2).
To solve (E.4) further, let us assign a global ordering to a generic set of atoms in the canonical crystal lattice, for example, by following a lexicographic ordering < of monomials in the quiver path algebra associated to crystal atoms. We then introduce a function: Then a solution to (E.4) reads: υ ( a , b ) = exp πi f ab 1 + sgn ( a , b ) 2 .
(E. 6) We note that this is not the unique solution to (E.4): for example, different choices of the ordering function for (E.5) will lead to unequal solutions to (E.1).
Let us introduce a notation for a solution to (E.1) that we will use throughout the paper: (E. 7) F 3d N = 2 SUSY in curved space-time In this appendix we place a 4d N = 1 theory on R t × S 1 × Σ g with appropriate topological twist, where R t is the temporal direction, and Σ g is a Riemann surface of genus g. Our aim is to study the 3d N = 2 theory on R t × Σ g that can be derived from the 4d N = 1 theory on R t × S 1 × Σ g by dimensional reduction along the S 1 . Nevertheless notations for the former theory are more compact and symmetric than those for the latter, therefore we construct supersymmetric Lagrangians and transformations in 4d -to reduce to the latter theory we simply assume that all the fields are constant along S 1 , and the gauge field component A 3 gives rise to a real scalar X.
In this section and throughout the paper we adopt the notations of [93].
On R t ×S 1 ×Σ g we choose a product metric and a metric along Σ g component in a conformally flat form: ds 2 = g µν dx µ dx ν = − dx 0 2 + dx 3 2 + e ϕ dx i dx i . (F.1) In these terms the spin connection reads (ǫ 12 = −ǫ 21 = 1): We gauge the R-symmetry with the following connection: where R is a 2d scalar curvature of Σ g : Recall that the canonical R-charges of the various components in the Lagrangian are: The 3d action consists of five components -gauge, chiral, superpotential, Fayet-Iliopolous and Chern-Simons terms: S = S gauge + S χ + S W + S FI + S top . (F.6) The gauge extension of the covariant derivatives reads: (F.7) The supersymmetry (SUSY) is generated by a covariantly-constant Killing spinor ξ: (F.11) The chiral action is: with the SUSY transformations: (F.13) The superpotential term reads: This is invariant under SUSY only if the superpotential W is gauge invariant and has R-charge +2. In the case of the curved surface Σ g , the R-charge contributes manifestly to the coupling with A (R) .
The FI term is defined by a real FI parameter r: Traditionally one considers in 3d a Chern-Simons topological term as well (see e.g. [94]). We will omit it in our consideration since we are aiming to consider a sequence of dimensional compactifications from 4d super Yang-Mills theory towards 1d quiver quantum mechanics, and a Chern-Simons topological term is not universal in view of this reduction.
The anti-commutators for the fermionic fields are: The Gauss law constraint says that the following operator annihilates physical states: (F.17) The supercharges generate SUSY transformations: The only supercharge components generated by ξ are Q 2 andQ˙2. Expressions for them can be easily derived from covariantized supercharge expressions in a flat background: (F.18) These supercharges satisfy the following superalgebra: where H is the Hamiltonian, the gauge-transformation operator reads: (F.20) The central charge term is specific to a particular form of the spatial manifold S 1 × Σ g admitting non-trivial fluxes of magnetic field through Σ g : (F.21)