1 Introduction

In this paper, we address questions in low-dimensional topology using algebraic and geometric methods inspired by mirror symmetry. More precisely, we prove results on the topology of simple closed curves on the 4-punctured sphere and the 1-punctured torus by studying the a priori unrelated problem of counting holomorphic maps from Riemann surfaces to complex cubic surfaces. We present our results on positive bases for the skein algebras of the 4-punctured sphere and 1-punctured torus in Sect. 1.1. We give a survey of the proof, based on enumerative algebraic geometry, in Sect. 1.2. Motivations from theoretical physics are briefly discussed in Sect. 1.3.

1.1 Results on positive bases for \({\text {Sk}}_A(\mathbb {S}_{0,4})\) and \({\text {Sk}}_A(\mathbb {S}_{1,1})\)

1.1.1 Skein modules and algebras

Recall that a knot in a manifold is a connected compact embedded 1-dimensional submanifold, and that a link is the disjoint union of finitely many (possibly zero) knots. A framing of a link is a choice of nowhere vanishing section of its normal bundle.

The Kauffman bracket skein module of an oriented 3-manifold \(\mathbb {M}\) is the \(\mathbb {Z}[A^{\pm }]\)-module generated by isotopy classes of framed links in \(\mathbb {M}\) satisfying the skein relations

(1)

The diagrams in each relation indicate framed links that can be isotoped to identical embeddings except within the neighborhood shown, where the framing is vertical, i.e. pointing out to the reader. The Kauffman bracket skein module was introduced independently by Przytycki [77] and Turaev [95] as an extension to general 3-manifolds of the variant of the Jones polynomial [60] given by the Kauffman bracket polynomial for framed links in the 3-sphere [61]. In the general context of skein modules attached to arbitrary ribbon categories [54], the Kauffman bracket skein module is associated to the ribbon category of finite-dimensional representations of the \({\textit{SL}}_2\) quantum group.

Given an oriented 2-manifold \(\mathbb {S}\), one can define a natural algebra structure on the Kauffmann bracket skein module of the 3-manifold \(\mathbb {M} :=\mathbb {S} \times (-1,1)\): given two framed links \(L_1\) and \(L_2\) in \(\mathbb {S} \times (-1,1)\), and viewing the interval \((-1,1)\) as a vertical direction, the product \(L_1 L_2\) is defined by placing \(L_1\) on top of \(L_2\). We denote by \({\text {Sk}}_A(\mathbb {S})\) the resulting associative \(\mathbb {Z}[A^{\pm }]\)-algebra with unit. The skein algebra \({\text {Sk}}_A(\mathbb {S})\) is in general non-commutative.

We consider the case where \(\mathbb {S}\) is the complement \(\mathbb {S}_{g,\ell }\) of a finite number \(\ell \) of points in a compact oriented 2-manifold of genus g. A multicurve on \(\mathbb {S}_{g,\ell }\) is the union of finitely many disjoint compact connected embedded 1-dimensional submanifolds of \(\mathbb {S}_{g,\ell }\) such that none of them bounds a disc in \(\mathbb {S}_{g,\ell }\). Identifying \(\mathbb {S}_{g,\ell }\) with \(\mathbb {S}_{g,\ell } \times \{0\} \subset \mathbb {S}_{g,\ell } \times (-1,1)\), a multicurve on \(\mathbb {S}_{g,\ell }\) endowed with the vertical framing naturally defined a framed link in \(\mathbb {S}_{g,\ell } \times (-1,1)\). By a result of Przytycki [78, Theorem IX.7.1], isotopy classes of multicurves form a basis of \({\text {Sk}}_A(\mathbb {S}_{g,\ell })\) as \(\mathbb {Z}[A^{\pm }]\)-module.

1.1.2 Positivity of the bracelets basis of \({\text {Sk}}_A(\mathbb {S}_{0,4})\) and \({\text {Sk}}_A(\mathbb {S}_{1,1})\)

Dylan Thurston introduced in [94] a different basis \(\textbf{B}_T\) of \({\text {Sk}}_A(\mathbb {S}_{g,\ell })\), called the bracelets basis and defined as follows. Let \(T_n(x)\) be the Chebyshev polynomials defined by

$$\begin{aligned} T_0(x)=1,T_1(x)=x, T_2(x)=x^2-2,\,\text {and for every}\,\, n \ge 2, \,\, T_{n+1}(x)=xT_n(x)-T_{n-1}(x). \end{aligned}$$
(2)

Writing \(x=\lambda +\lambda ^{-1}\), we have \(T_n(x)=\lambda ^n+\lambda ^{-n}\) for every \(n \ge 1\). Given an isotopy class \(\gamma \) of multicurve on \(\mathbb {S}_{g,\ell }\), one can uniquely write \(\gamma \) in \({\text {Sk}}_A(\mathbb {S}_{g,\ell })\) as \(\gamma =\gamma _1^{n_1} \cdots \gamma _r^{n_r}\) where \(\gamma _1, \ldots , \gamma _r\) are all distinct isotopy classes of connected multicurves and \(n_j \in \mathbb {Z}_{>0}\), and we define

$$\begin{aligned} \textbf{T}(\gamma ) :=T_{n_1}(\gamma _1) \cdots T_{n_r}(\gamma _r). \end{aligned}$$
(3)

As the leading term of \(T_n(x)\) is \(x^n\), the set \(\textbf{B}_T\) of all \(\textbf{T}(\gamma )\), for \(\gamma \) isotopy class of multicurve, is a \(\mathbb {Z}[A^{\pm }]\)-linear basis of \({\text {Sk}}_A(\mathbb {S}_{g,\ell })\). If \(\gamma \) is a connected multicurve, \(\gamma ^n\) is the class of n disjoint isotopic copies of \(\gamma \), whereas \(T_n(\gamma )\) is the class of a connected bracelet made of n isotopic copies of \(\gamma \) (see [94, Proposition 4.4]), hence the name of bracelets basis for \(\textbf{B}_T\).

In [94, Conjecture 4.20], Dylan Thurston made the remarkable positivity conjecture that the structure constants of the bracelets basis, which are a priori in \(\mathbb {Z}[A^{\pm }]\), in fact belong to \(\mathbb {Z}_{\ge 0}[A^{\pm }]\). He proved in [94, Theorem 1] that the conjecture holds after setting \(A=1\). In the present paper, we prove [94, Conjecture 4.20] in the case of the 4-punctured sphere \(\mathbb {S}_{0,4}\), that is, \(g=0\) and \(\ell =4\), and the 1-punctured torus \(\mathbb {S}_{1,1}\), that is, \(g=1\) and \(\ell =1\).

Theorem 1.1

The structure constants for the bracelets basis of the skein algebras \({\text {Sk}}_A(\mathbb {S}_{0,4})\) and \({\text {Sk}}_A(\mathbb {S}_{1,1})\) of the 4-punctured sphere \(\mathbb {S}_{0,4}\) and of the 1-punctured torus \(\mathbb {S}_{1,1}\) belong to \(\mathbb {Z}_{\ge 0}[A^{\pm }]\). In other words, for every x and y in \(\textbf{B}_T\), the product xy in the skein algebra is a linear combination with coefficients in \(\mathbb {Z}_{\ge 0}[A^{\pm }]\) of elements of \(\textbf{B}_T\).

[94, Conjecture 4.20] was previously known in the following cases:

  1. (1)

    For \(g=0\) and \(\ell \le 3\), the skein algebra is a commutative polynomial algebra, more precisely, we have \({\text {Sk}}_A(\mathbb {S}_{0,0})=\mathbb {Z}[A^{\pm }]\), \({\text {Sk}}_A(\mathbb {S}_{0,1})=\mathbb {Z}[A^{\pm }]\), \({\text {Sk}}_A(\mathbb {S}_{0,2})=\mathbb {Z}[A^{\pm }][x]\), and \({\text {Sk}}_A(\mathbb {S}_{0,3})=\mathbb {Z}[A^{\pm }][x,y,z]\), and so [94, Conjecture 4.20] follows directly from the identity \(T_m(x) T_n(x) = T_{m+n}(x)+ T_{|m-n|}(x)\).

  2. (2)

    For \(g=1\) and \(\ell =0\). For every \(p=(a,b) \in \mathbb {Z}^2\), write \(\gamma _p\) for the isotopy class of \(\gcd (a,b)\) disjoint copies of connected multicurves with homology class \(\frac{1}{\gcd (a,b)}(a,b) \in \mathbb {Z}^2=H_1(\mathbb {S}_{1,0},\mathbb {Z})\). Frohman and Gelca proved in [38] the identity

    $$\begin{aligned} \textbf{T}(\gamma _{(a,b)})\textbf{T}(\gamma _{(c,d)}) =A^{ad-bc}\textbf{T}(\gamma _{(a+c,b+d)}) +A^{-ad+bc}\textbf{T}(\gamma _{(a-c,b-d)}). \end{aligned}$$

    [94, Conjecture 4.20] follows because the bracelets basis of \({\text {Sk}}_A(\mathbb {S}_{1,0})\) is made of monomials in the variables \(\textbf{T}(\gamma _p)\).

The cases \((g,\ell )=(0,4)\) and \((g,\ell )=(1,1)\) treated by Theorem 1.1 are the first examples of a proof of [94, Conjecture 4.20] in a situation where no simple closed formula for the structure constants of the bracelets basis seems to exist.

A conceptual approach to the general case of [94, Conjecture 4.20] would be to construct a monoidal categorification of the skein algebras \({\text {Sk}}(\mathbb {S}_{g,\ell })\) and a categorification of the bracelets basis. First steps towards this goal are described by Queffelec and Wedrich in [82]. We do not follow this path to prove Theorem 1.1. Rather, one should view Theorem 1.1 as providing further non-trivial evidence that such monoidal categorification should exist.

For \(\ell >0\), there is a more refined positivity conjecture, [94, Conjecture 4.21], involving the so-called bands basis. We do not adress this conjecture in the present paper. General constraints on possible positive bases of skein algebras are discussed by Lê [67] and Lê, Thurston, and Yu [69].

1.1.3 A stronger positivity result for \({\text {Sk}}_A(\mathbb {S}_{0,4})\)

We will in fact prove a positivity result for \({\text {Sk}}_A(\mathbb {S}_{0,4})\) stronger than Theorem 1.1 and conjectured by Bakshi, Mukherjee, Przytycki, Silvero and Wang in [8, Conjecture 4.10 (1)]. For \(1\le j\le 4\), let \(p_j\) be the punctures of \(\mathbb {S}_{0,4}\), and \(a_j\) the isotopy class of connected peripheral curves around \(p_j\), that is, bounding a 1-punctured disc with puncture \(p_j\). The peripheral curves \(a_j\) are in the center of the skein algebra \({\text {Sk}}_A(\mathbb {S}_{0,4})\), and so \({\text {Sk}}_A(\mathbb {S}_{0,4})\) is naturally a \(\mathbb {Z}[A^{\pm }][a_1,a_2,a_3,a_4]\)-module.

We fix a decomposition of \(\mathbb {S}_{0,4}\) into two pairs of pants, glued along a connected multicurve \(\delta \) of \(\mathbb {S}_{0,4}\) separating the four punctures into the pairs \(p_1\), \(p_2\) and \(p_3\), \(p_4\). Isotopy classes of multicurves on \(\mathbb {S}_{0,4}\) without peripheral components can then be classified by their Dehn-Thurston coordinates with respect to \(\delta \) [72, 76]. For every \(p=(m,n) \in \mathbb {Z}\times \mathbb {Z}_{\ge 0}\) such that \(m \ge 0\) if \(n=0\), there exists a unique isotopy class \(\gamma _p\) of multicurves without peripheral components, such that, the minimal number of intersection points of a multicurve of class \(\gamma _p\) with \(\delta \) is 2n, and such that the twisting number of \(\gamma _p\) around \(\delta \) is m. As a special case of a theorem of Dehn, the map \(p \mapsto \gamma _p\) defines a bijection between

$$\begin{aligned} B(\mathbb {Z}) :=\{(m,n) \in \mathbb {Z}\times \mathbb {Z}_{\ge 0}\,\,\,|\, m \ge 0 \,\,\, \text {if}\,\,\, n=0\} \end{aligned}$$
(4)

and the set of isotopy classes of multicurves on \(\mathbb {S}_{0,4}\) without peripheral components, see [76, Theorem 1.2.1]. For example, \(\gamma _{(0,0)}\) is the isotopy class of the empty multicurve, \(\gamma _{(1,0)}\) is the isotopy class of \(\delta \), and a multicurve of class \(\gamma _p\) with \(p=(m,n)\) has \(\gcd (m,n)\) connected components. Equivalently, if \(p=(m,n)\) with m and n coprime, and if we realize \(\mathbb {S}_{0,4}\) as the quotient of the four-punctured torus \((\mathbb {R}^2 \backslash (\frac{1}{2}\mathbb {Z}\oplus \frac{1}{2} \mathbb {Z}))/\mathbb {Z}^2\) by the involution \(x \mapsto -x\) , then \(\gamma _p\) is the class of the image in \(\mathbb {S}_{0,4}\) of a straight line of slope n/m in \(\mathbb {R}^2 \backslash (\frac{1}{2}\mathbb {Z}\oplus \frac{1}{2} \mathbb {Z})\) (e.g. see [31, Proposition 2.6]). As isotopy classes of multicurves form a basis of the skein algebra as \(\mathbb {Z}[A^{\pm }]\)-module, the set \(\{ \gamma _p \}_{p \in B(\mathbb {Z})}\) is a basis of \({\text {Sk}}_A(\mathbb {S}_{0,4})\) as \(\mathbb {Z}[A^{\pm }][a_1,a_2,a_3,a_4]\)-module.

For every \(p_1,p_2,p \in B(\mathbb {Z})\), we define structure constants \(C_{p_1,p_2}^{\mathbb {S}_{0,4},p} \in \mathbb {Z}[A^{\pm }][a_1,a_2,a_3,a_4]\) by

$$\begin{aligned} \textbf{T}(\gamma _{p_1}) \textbf{T}(\gamma _{p_2}) =\sum _{p \in B(\mathbb {Z})} C_{p_1,p_2}^{\mathbb {S}_{0,4}, p} \textbf{T}(\gamma _p) . \end{aligned}$$
(5)

Following [8], we introduce the notation

$$\begin{aligned} R_{1,0}&:=a_1a_2+a_3a_4 ,\,\,\, R_{0,1} :=a_1a_3+a_2a_4 ,\,\,\, R_{1,1} :=a_1a_4+a_2a_3, \end{aligned}$$
(6)
$$\begin{aligned} y&:=a_1a_2a_3a_4 +a_1^2+a_2^2+a_3^2+a_4^2+(A^2-A^{-2})^2 . \end{aligned}$$
(7)

The following Theorem 1.2 is our main result and proves Conjecture 4.10(1) of [8].

Theorem 1.2

Footnote 1 For every \(p_1,p_2,p \in B(\mathbb {Z})\), we have

$$\begin{aligned} C^{\mathbb {S}_{0,4},p}_{p_1,p_2} \in \mathbb {Z}_{\ge 0}[A^{\pm }] [R_{1,0}, R_{0,1}, R_{1,1},y]. \end{aligned}$$
(8)

As we will see at the end of Sect. 3.1, it is elementary to check that Theorem 1.2 implies Theorem 1.1 for \({\text {Sk}}_A(\mathbb {S}_{0,4})\).

1.1.4 A stronger positivity result for \({\text {Sk}}_A(\mathbb {S}_{1,1})\)

Let \(\eta \) be the isotopy class of connected peripheral curves around the puncture of \(\mathbb {S}_{1,1}\). As \(\eta \) is in the center of \({\text {Sk}}_A(\mathbb {S}_{1,1})\), the skein algebra \({\text {Sk}}_A(\mathbb {S}_{1,1})\) is naturally a \(\mathbb {Z}[A^{\pm }][\eta ]\)-module. Isotopy classes multicurves on \(\mathbb {S}_{1,1}\) without peripheral components are classified by their homology classes, which are well-defined up to sign. Fixing a basis of homology, we get a bijection \(p \mapsto \gamma _p\) between \(B(\mathbb {Z})\) and the set of isotopy classes of multicurves on \(\mathbb {S}_{1,1}\) without peripheral components. For example, multicurve of class \(\gamma _p\) with \(p=(m,n)\) has \(\gcd (m,n)\) components. As isotopy classes of multicurves form a basis of the skein algebra as \(\mathbb {Z}[A^{\pm }]\)-module, the set \(\{ \gamma _p \}_{p \in B(\mathbb {Z})}\) is a basis of \({\text {Sk}}_A(\mathbb {S}_{1,1})\) as \(\mathbb {Z}[A^{\pm }][\eta ]\)-module. For every \(p_1,p_2,p \in B(\mathbb {Z})\), we define structure constants \(C_{p_1,p_2}^{\mathbb {S}_{1,1},p} \in \mathbb {Z}[A^{\pm }][\eta ]\) by

$$\begin{aligned} \textbf{T}(\gamma _{p_1}) \textbf{T}(\gamma _{p_2}) =\sum _{p \in B(\mathbb {Z})} C_{p_1,p_2}^{\mathbb {S}_{1,1}, p} \textbf{T}(\gamma _p) . \end{aligned}$$
(9)

We write

$$\begin{aligned} z :=A^2+A^{-2}+\eta . \end{aligned}$$
(10)

Note that z is the deformation parameter from \({\text {Sk}}_A(\mathbb {S}_{1,0})\) to \({\text {Sk}}_A(\mathbb {S}_{1,1})\): indeed, closing the puncture means setting \(\eta =-A^2-A^{-2}\), that is \(z=0\).

Theorem 1.3

For every \(p_1,p_2,p \in B(\mathbb {Z})\), we have

$$\begin{aligned} C^{\mathbb {S}_{1,1},p}_{p_1,p_2} \in \mathbb {Z}_{\ge 0}[A^{\pm }][z]. \end{aligned}$$
(11)

As we will see at the end of Sect. 3.2, it is elementary to check that Theorem 1.3 implies Theorem 1.1 for \({\text {Sk}}_A(\mathbb {S}_{0,4})\).

1.1.5 Strong positivity for the quantum cluster algebras \(\mathcal {X}^q_{{\textit{PGL}}_2,\mathbb {S}_{0,4}}\) and \(\mathcal {X}^q_{{\textit{PGL}}_2,\mathbb {S}_{1,1}}\)

We can appply our positivity result on the skein algebras \({\text {Sk}}_A(\mathbb {S}_{0,4})\) and \({\text {Sk}}_A(\mathbb {S}_{1,1})\), Theorem 1.2, to prove a similar positivity result for the quantum cluster algebras \(\mathcal {X}^q_{{\textit{SL}}_2,\mathbb {S}_{0,4}}\) and \(\mathcal {X}^q_{{\textit{SL}}_2,\mathbb {S}_{1,1}}\).

For every punctured surface \(\mathbb {S}_{g,\ell }\) with \(\ell >0\), Fock and Goncharov introduced in [34] the cluster varieties \(\mathcal {A}_{{\textit{SL}}_2,\mathbb {S}_{g,\ell }}\) and \(\mathcal {X}_{{\textit{PGL}}_2,\mathbb {S}_{g,\ell }}\): \(\mathcal {A}_{{\textit{SL}}_2,\mathbb {S}_{g,\ell }}\) is a moduli space of decorated \({\textit{SL}}_2\)-local system on \(\mathbb {S}_{g,\ell }\), and \(\mathcal {X}_{{\textit{PGL}}_2,\mathbb {S}_{g,\ell }}\) is a moduli space of framed \({\textit{PGL}}_2\)-local systems on \(\mathbb {S}_{g,\ell }\) and both admit a cluster structure. Fock and Goncharov constructed a “duality map”

$$\begin{aligned} \mathbb {I} :\mathcal {A}_{{\textit{SL}}_2,\mathbb {S}_{g,\ell }}(\mathbb {Z}^t) \longrightarrow \mathcal {O}(\mathcal {X}_{{\textit{PGL}}_2,\mathbb {S}_{g,\ell }}) \end{aligned}$$
(12)

from the set \(\mathcal {A}_{{\textit{SL}}_2,\mathbb {S}_{g,\ell }}(\mathbb {Z}^t)\) of integral tropical points of \(\mathcal {A}_{{\textit{SL}}_2,\mathbb {S}_{g,\ell }}\) to the algebra \(\mathcal {O}(\mathcal {X}_{{\textit{PGL}}_2,\mathbb {S}_{g,\ell }})\) of regular functions on \(\mathcal {X}_{{\textit{PGL}}_2,\mathbb {S}_{g,\ell }}\). They proved that \(\{\mathbb {I}(l)\}_{l \in \mathcal {A}_{{\textit{SL}}_2,\mathbb {S}_{g,\ell }}(\mathbb {Z}^t)}\) is a basis of \(\mathcal {O}(\mathcal {X}_{{\textit{PGL}}_2,\mathbb {S}_{g,\ell }})\) [34, Theorem 12.3].

The cluster variety \(\mathcal {X}_{{\textit{PGL}}_2,\mathbb {S}_{g,\ell }}\) admits a natural Poisson structure, which can be canonically quantized using the cluster structure to produce a quantum cluster algebra \(\mathcal {X}^q_{{\textit{PGL}}_2,\mathbb {S}_{g,\ell }}\) [35]. Fock and Goncharov conjectured in [34, Conjecture 12.4] the existence of a quantization

$$\begin{aligned} \hat{\mathbb {I}} :\mathcal {A}_{{\textit{SL}}_2,\mathbb {S}_{g,\ell }}(\mathbb {Z}^t) \longrightarrow \mathcal {X}^q_{{\textit{PGL}}_2,\mathbb {S}_{g,\ell }} \end{aligned}$$
(13)

of \(\mathbb {I}\) with structure constants in \(\mathbb {Z}_{\ge 0}[q^{\pm \frac{1}{2}}]\), where q is the quantum parameter. Note that to be consistent with the rest of the paper, we denote by \(q^{\frac{1}{2}}\) the parameter denoted by q in [5, 34]. The skein algebra \({\text {Sk}}_A(\mathbb {S}_{g,\ell })\) and the quantum cluster variety \(\mathcal {X}^q_{{\textit{PGL}}_2,\mathbb {S}_{g,\ell }}\) are closely related, and in fact [34, Conjecture 12.4] was a strong motivation [94, Conjecture 4.20]. A precise relation between \({\text {Sk}}_A(\mathbb {S}_{g,\ell })\) and \(\mathcal {X}^q_{{\textit{PGL}}_2,\mathbb {S}_{g,\ell }}\) was established by Bonahon and Wong [13] and then used by Allegretti and Kim [5] to construct a quantum duality map \(\hat{\mathbb {I}}\) with the expected properties, excepted the positivity of the structure constants left as a conjecture. A different construction of \(\hat{\mathbb {I}}\) based on spectral networks was given by Gabella [39] and shown to be equivalent to the one of Allegretti and Kim by Kim and Son [63]. We first remark that the positivity of the stucture constants of the bracelets basis of the skein algebra \({\text {Sk}}_A(\mathbb {S}_{g,\ell })\) implies the positivity of the structure constants defined by \(\hat{\mathbb {I}}\).

Theorem 1.4

Assume that the structure constants of the bracelets basis of the skein algebra \({\text {Sk}}_A(\mathbb {S}_{g,\ell })\) belong to \(\mathbb {Z}_{\ge 0}[A^{\pm }]\). Then the structure constants \(c(l,l',l'') \in \mathbb {Z}[q^{\pm \frac{1}{2}}]\) for \(\mathcal {X}^q_{{\textit{PGL}}_2,\mathbb {S}_{g,\ell }}\), defined by the quantum duality map \(\hat{\mathbb {I}}\) of [5] via

$$\begin{aligned} \hat{\mathbb {I}}(l)\hat{\mathbb {I}}(l')= \sum _{l'' \in \mathcal {A}_{{\textit{SL}}_2,\mathbb {S}_{0,4}}(\mathbb {Z}^t)} c(l,l',l'') \hat{\mathbb {I}}(l''), \end{aligned}$$
(14)

belong to \(\mathbb {Z}_{\ge 0}[q^{\pm \frac{1}{2}}]\).

The proof of Theorem 1.4 is given in Sect. 3.4. Combining Theorem 1.4 with Theorems 1.2 and 1.3, we obtain the following corollary.

Corollary 1.5

The structure constants defined by the quantum duality map \(\hat{\mathbb {I}}\) of [5] for \(\mathcal {X}^q_{{\textit{PGL}}_2,\mathbb {S}_{0,4}}\) and \(\mathcal {X}^q_{{\textit{PGL}}_2,\mathbb {S}_{1,1}}\) belong to \(\mathbb {Z}_{\ge 0}[q^{\pm \frac{1}{2}}]\).

1.2 Structure of the proof: quantum scattering diagrams and curve counting

We will prove Theorems 1.2 and 1.3 by giving an algorithm which computes the structure constants for the bracelets basis of \({\text {Sk}}_A(\mathbb {S}_{0,4})\) and \({\text {Sk}}_A(\mathbb {S}_{1,1})\), and makes manifest their positivity properties. This algorithm is based on the notion of quantum broken lines defined by a quantum scattering diagram.

1.2.1 Quantum scattering diagrams, quantum broken lines and quantum theta functions

Scattering diagrams and broken lines are algebraic and combinatorial objects playing a key role in the Gross–Siebert approach to mirror symmetry. Scattering diagrams were introduced by Gross and Siebert [51], following early insights of Kontsevich and Soibelman [64]. Broken lines were introduced by Gross [45], studied by Carl, Pumperla and Siebert [21], and discussed in a quite general context by Gross, Hacking, and Siebert [49]. Given an integral affine manifold with singularities B, a scattering diagram \(\mathfrak {D}^{{\text {cl}}}\) is a collection of codimension 1 integral affine subspaces of B called walls and which are decorated by power series. A broken line is a continuous picewise integral affine line in B which bends when crossing walls of \(\mathfrak {D}^{{\text {cl}}}\). When the scattering diagram \(\mathfrak {D}^{{\text {cl}}}\) is so called consistent, one can construct a commutative associative algebra \(\mathcal {A}_{\mathfrak {D}^{{\text {cl}}}}\), coming with a basis \(\{\vartheta _p^{{\text {cl}}}\}_{p \in B(\mathbb {Z})}\) of so-called theta functions indexed by integral points \(B(\mathbb {Z})\) of B, and whose structure constants are determined explicitly in terms of the broken lines.

Scattering diagrams and broken lines have q-deformed versions, that we refer to as quantum scattering diagrams and quantum broken lines. Quantum scattering diagrams were considered by Kontsevich and Soibelman [64, 65, 88], and Filippini and Stoppa [33]. Quantum broken lines were studied by Mandel [71] and the author [16]. Given a consistent quantum scattering diagram \(\mathfrak {D}\), one can construct an associative non-necessarily commutative algebra \(\mathcal {A}_\mathfrak {D}\), coming with a basis \(\{\vartheta _p\}_{p \in B(\mathbb {Z})}\) of so-called quantum theta functions, and whose structure constants are determined explicitly in terms of the quantum broken lines.

Scattering diagrams and broken lines have been used by Gross, Hacking, Keel and Kontsevich [47] to construct canonical bases with positive structure constants for cluster algebras. Their quantum versions have been used more recently by Davison and Mandel [27] to construct canonical bases with structures constants in \(\mathbb {Z}_{\ge 0}[q^{\frac{1}{2}}]\) for quantum cluster algebras. It is expected that the canonical basis of [47] coincides with the canonical basis constructed by Fock and Goncharov [34], and that the canonical basis of [27] for \(\mathcal {X}^q_{{\textit{PGL}}_2,\mathbb {S}_{g,\ell }}\) agrees with the canonical basis constructed by Allegretti and Kim [5]. Proving these conjectural expectations would lead to a general proof of the quantum positivity conjecture [34, Conjecture 12.4]. In the present paper, we use quantum scattering diagrams which are slightly different from the ones in [27], but related to them by “moving worms". The positivity properties of our quantum scattering diagrams will follow from their explicit descriptions, and we will not have to use the general quantum positivity result of [27].

In order to prove Theorems 1.2 and 1.3, we will first define explicit quantum scattering diagrams \(\mathfrak {D}_{0,4}\) and \(\mathfrak {D}_{1,1}\) over the integral affine manifold with singularities \(B=\mathbb {R}^2/\langle -{\text {id}}\,\rangle \) and prove that they are consistent. We will then show that the algebras \(\mathcal {A}_{\mathfrak {D}_{0,4}}\) and \(\mathcal {A}_{\mathfrak {D}_{1,1}}\) are respectively isomorphic to the skein algebras \({\text {Sk}}_A(\mathbb {S}_{0,4})\) and \({\text {Sk}}_A(\mathbb {S}_{1,1})\), and that the bases of quantum theta functions agree with the bracelets bases. The positivity of the structure constants will follow from the description in terms of quantum broken lines and from the explicit definitions of \(\mathfrak {D}_{0,4}\) and \(\mathfrak {D}_{1,1}\). As the results for the 1-punctured torus \(\mathbb {S}_{1,1}\) will follow from those for \(\mathbb {S}_{0,4}\) by specialization and change of variables, we focus on the case of the 4-punctured sphere \(\mathbb {S}_{0,4}\). There are two results to show: the consistency of \(\mathfrak {D}_{0,4}\) (Theorem 3.7), and the identification of \(\mathcal {A}_{\mathfrak {D}_{0,4}}\) with \({\text {Sk}}_A(\mathbb {S}_{0,4})\) matching the basis of quantum theta functions with the bracelets basis (Theorem 3.8).

1.2.2 Consistent quantum scattering diagrams from curve counting

We will prove the consistency of \(\mathfrak {D}_{0,4}\) by showing that \(\mathfrak {D}_{0,4}\) arises from the enumerative geometry of holomorphic curves in complex cubic surfaces. It is a general expectation from mirror symmetry that one should obtain consistent scattering diagrams by counting genus 0 holomorphic curves in log Calabi–Yau varieties, see the work of Gross, Pandharipande and Siebert [50] and Gross, Hacking and Keel [46] in dimension 2, and Gross and Siebert [53], Keel and Yu [62], and Argüz and Gross [6] in higher dimensions. Given a maximal log Calabi–Yau variety (YD), that is, the pair of a smooth projective variety Y over \(\mathbb {C}\) and of an anticanonical normal crossing divisor D with a 0-dimensional stratum, one can construct a consistent canonical scattering diagram \(\mathfrak {D}_\textrm{can}^{{\text {cl}}}\) by counting holomorphic maps from genus 0 holomorphic curves to Y whose images intersect D at a single point [46, 53]. More precisely, these counts of holomorphic curves are defined using logarithmic Gromov–Witten theory [1, 52]. The corresponding algebra \(\mathcal {A}_{\mathfrak {D}_\textrm{can}^{{\text {cl}}}}\) is then the algebra of functions on the family of varieties mirror to (YD). Heuristically, the integral affine manifold with singularities B containing \(\mathfrak {D}_\textrm{can}^{{\text {cl}}}\) should be the basis of a special Lagrangian torus fibration on the complement of D in Y [7, 91].

For (YD) a maximal log Calabi–Yau surface, we explained in [16] how to construct a consistent canonical quantum scattering diagram \(\mathfrak {D}_\textrm{can}\) in terms of log Gromov–Witten counts of holomorphic maps from higher genus holomorphic curves to Y whose images intersect D at a single point. The corresponding non-commutative algebra \(\mathcal {A}_{\mathfrak {D}_\textrm{can}}\) is a deformation quantization of the mirror family of holomorphic symplectic surfaces constructed in [46]. The main idea of the present paper is to apply the framework of [16] for Y a smooth cubic surface and D a triangle of lines on Y. Before giving more details, we need to review the general relation between skein algebras and character varieties.

1.2.3 Skein algebras and character varieties

Let \({\text {Ch}}_{{\textit{SL}}_2}(\mathbb {S}_{g,\ell })\) be the \({\textit{SL}}_2\)-character variety of the \(\ell \)-punctured genus g surface \(\mathbb {S}_{g,\ell }\). This is an affine variety of finite type over \(\mathbb {Z}\) obtained as affine GIT quotient by the \({\textit{SL}}_2\) conjugation action of the affine variety of representations of the fundamental group \(\pi _1(\mathbb {S}_{g,\ell })\) into \({\textit{SL}}_2\). The character variety \({\text {Ch}}_{{\textit{SL}}_2}\) admits a natural Poisson structure.

Setting \(A=-e^{\frac{i \hbar }{4}}\), the skein algebra \({\text {Sk}}_A(\mathbb {S}_{g,\ell })\) defines a deformation quantization of the Poisson variety \({\text {Ch}}_{{\textit{SL}}_2}(\mathbb {S}_{g,\ell })\). If \(\gamma \) is a multicurve on \(\mathbb {S}_{g,\ell }\) with connected components \(\gamma _1, \ldots , \gamma _r\), then, the map sending a representation \(\rho :\pi _1(\mathbb {S}_{g,\ell }) \rightarrow {\textit{SL}}_2\) to \(\prod _{j=1}^r (-{\text {tr}}(\rho (\gamma _j)))\) defines a regular function \(f_\gamma \) on \({\text {Ch}}_{{\textit{SL}}_2}(\mathbb {S}_{g,\ell })\). The map \(\gamma \mapsto f_\gamma \) defines a ring isomorphism between the specialization \({\text {Sk}}_{-1}(\mathbb {S}_{g,\ell })\) of the skein algebra at \(A=-1\) and the ring of regular functions of \({\text {Ch}}_{{\textit{SL}}_2}(\mathbb {S}_{g,\ell })\). If \(\gamma \) is a connected multicurve on \(\mathbb {S}_{g,\ell }\), then the building blocks \(T_n(\gamma )\) of the bracelets basis are quantizations of the functions \(\rho \mapsto -{\text {tr}}(\rho (\gamma )^n)\) on \({\text {Ch}}_{{\textit{SL}}_2}(\mathbb {S}_{g,\ell })\).

The general idea of a connection between skein algebras and quantization goes back to Turaev [96]. Bullock [18] and Przytycki and Sikora with a different proof [79] showed that \(\gamma \mapsto f_\gamma \) defines a ring isomorphism between the quotient of \({\text {Sk}}_{-1}(\mathbb {S}_{g,\ell })\) by its nilradical and the ring of regular functions of \({\text {Ch}}_{{\textit{SL}}_2}(\mathbb {S}_{g,\ell })\). The fact that the nilradical of \({\text {Sk}}_{-1}(\mathbb {S}_{g,\ell })\) is trivial was shown by Charles and Marché for \(\ell =0\) [23, Theorem 1.2], and by Przytycki and Sikora [80] in general.

1.2.4 Curve counting in cubic surfaces

It is classically known that the \({\textit{SL}}_2\)-character variety \({\text {Ch}}_{{\textit{SL}}_2}(\mathbb {S}_{0,4})\) of the 4-punctured sphere \(\mathbb {S}_{0,4}\) can be described explicitly as a 4-parameters family of affine cubic surfaces: original 19th century sources are [36, 97, 37, II, Eq.(9), p298] and more recent references include [10, 43, 44, 59, 70]. Recently, Gross, Hacking, Keel and Siebert [48] proved that this family of cubic surfaces is the result of the general mirror construction of [46] for maximal log Calabi–Yau surfaces applied to a pair (YD), where Y is a smooth projective cubic surface in \(\mathbb {P}^3\) and D is a triangle of lines on Y. In other words, they showed that the algebra obtained from the consistent canonical scattering diagram defined by counting genus 0 holomorphic curves in (YD) is exactly the algebra of regular functions on \({\text {Ch}}_{{\textit{SL}}_2}(\mathbb {S}_{0,4})\).

Thus, we now have two ways to produce a deformation quantization of \({\text {Ch}}_{{\textit{SL}}_2}(\mathbb {S}_{0,4})\) and it is natural to compare them: either consider the skein algebra \({\text {Sk}}_A(\mathbb {S}_{0,4})\), or consider the algebra \(\mathcal {A}_{\mathfrak {D}_\textrm{can}}\) obtained from the consistent canonical quantum scattering diagram \(\mathfrak {D}_\textrm{can}\) defined in [16] by counting higher genus holomorphic curves in (YD).

First of all, we will compute explicitly the quantum scattering diagram \(\mathfrak {D}_\textrm{can}\). It involves computing higher genus log Gromov–Witten invariants of (YD). The corresponding calculation in genus 0 was done in [48]: exploiting a large \({\textit{PSL}}_2(\mathbb {Z})\) group of birational automorphisms of (YD), Gross, Hacking, Keel and Siebert showed that the genus 0 calculation can be reduced to genus 0 multiple covers of 8 lines and 2 conics in (YD). Following the same strategy, we will prove that the higher genus calculation reduces to higher genus multiple covers of the same 8 lines and 2 conics. The contribution of multiple covers of lines is fairly standard but the contribution of multiple covers of the conics is more intricate and we will use our previous work [14] on higher genus log Gromov–Witten invariants of log Calabi–Yau surfaces to evaluate it. At the end of the day, we can phrase the result as stating that \(\mathfrak {D}_\textrm{can}\) is equal (after an appropriate specialization of variables) to the explicit quantum scattering diagram \(\mathfrak {D}_{0,4}\). As \(\mathfrak {D}_\textrm{can}\) is consistent by [16], this proves the consistency of \(\mathfrak {D}_{0,4}\).

1.2.5 Comparison of \(\mathcal {A}_{\mathfrak {D}_{0,4}}\) and \({\text {Sk}}_A(\mathbb {S}_{0,4})\)

Once we know that the quantum scattering diagram \(\mathfrak {D}_{0,4}\) is consistent, we have the corresponding algebra \(\mathcal {A}_{\mathfrak {D}_{0,4}}\), with its basis of quantum theta functions \(\{ \vartheta _p \}_{p \in B(\mathbb {Z})}\) and structure constants expressed in terms of quantum broken lines. It remains to construct an isomorphism of algebras \(\varphi :\mathcal {A}_{\mathfrak {D}_{0,4}} \rightarrow {\text {Sk}}_A(\mathbb {S}_{0,4})\) matching the bracelets basis \(\{{\gamma }_p \}_{p \in B(\mathbb {Z})}\) and the basis of quantum theta functions \(\{ \vartheta _p\}_{p \in B(\mathbb {Z})}\), i.e. such that \(\varphi (\vartheta _p)= \textbf{T}(\gamma _p)\) for every \(p \in B(\mathbb {Z})\).

By explicit computations with quantum broken lines in \(\mathfrak {D}_{0,4}\), we will obtain an explicit presentation of \(\mathcal {A}_{\mathfrak {D}_{0,4}}\) by generators and relations as a family of non-commutative cubic surfaces (Theorem 6.13). On the other hand, it was known since Bullock and Przytycki [19] that the description of \({\text {Ch}}_{{\textit{SL}}_2}(\mathbb {S}_{0,4})\) as a family of cubic surfaces deforms into a presentation of the skein algebra \({\text {Sk}}_A(\mathbb {S}_{0,4})\) as a family of non-commutative cubic surfaces (Theorem 6.12). Comparing these two families of non-commutative cubic surfaces, we will define an isomorphism of algebras \(\varphi :\mathcal {A}_{\mathfrak {D}_{0,4}} \rightarrow {\text {Sk}}_A(\mathbb {S}_{0,4})\).

Finally, we will have to prove that \(\varphi (\vartheta _p)= \textbf{T}(\gamma _p)\) for every \(p \in B(\mathbb {Z})\). We will first prove it for \(p=(k,0)\) by some explicit computation of quantum broken lines. In particular, we will see how the recursion relation (2) defining the Chebyshev polynomials \(T_n(x)\) naturally arises from drawing quantum broken lines. To prove the general result, we will check explicitly that \(\varphi \) intertwines the natural action of \({\textit{PSL}}_2(\mathbb {Z})\) on \({\text {Sk}}_A(\mathbb {S}_{0,4})\) via the mapping class group of \(\mathbb {S}_{0,4}\), with an action of \({\textit{PSL}}_2(\mathbb {Z})\) of \(\mathcal {A}_{\mathfrak {D}_{0,4}}\) coming from a \({\textit{PSL}}_2(\mathbb {Z})\)-symmetry of the quantum scattering diagram \(\mathfrak {D}_{0,4}\). This ends our summary of the proof.

We remark that by taking the classical limit of the statement that \(\varphi (\vartheta _p)= \textbf{T}(\gamma _p)\) for every \(p \in B(\mathbb {Z})\), we obtain that the classical theta functions \(\vartheta _p^{{\text {cl}}}\) constructed in [46, 48] agree with the trace functions \(\rho \mapsto -{\text {tr}}(\rho (\gamma _{p_{{\textit{prim}}}})^k)\) on the character variety \({\text {Ch}}_{{\textit{SL}}_2}(\mathbb {S}_{0,4})\), where \(p=kp_{{\textit{prim}}}\) with \(k \in \mathbb {Z}_{\ge 1}\) and \(p_{{\textit{prim}}} \in B(\mathbb {Z})\) primitive (Corollary 3.9).

1.2.6 More on non-commutative cubic surfaces

We briefly comment about works related to an essential ingredient of the proof of our main result: the presentation of \({\text {Sk}}_ A(\mathbb {S}_{0,4})\) as a family of non-commutative cubic surfaces. This non-commutative cubic equation has appeared in quite a number of contexts. The present paper provides one more: the non-commutative cubic surface appears for us as a quantum mirror in the sense of [16] and as the result of calculations in higher genus log Gromov–Witten theory.

The quantization of the family of affine cubic surfaces \({\text {Ch}}_{{\textit{SL}}_2}(\mathbb {S}_{0,4})\) from the point of view of quantum Teichmüller theory has been studied by Chekhov and Mazzocco [24, Eq. (3.20)–(3.24)], and by Hiatt [56]. Quantization from the cluster point of view has been discussed by Hikami [58, Eq. (7.2)–(7.3)]. The general relation between skein algebras and the quantum Teichmüller/cluster points of view follows from the existence of the quantum trace map of Bonahon and Wong [13] (see also [68]).

The skein algebra \({\text {Sk}}_A(\mathbb {S}_{0,4})\) is isomorphic to the spherical double affine Hecke algebra (DAHA) of type \((C^{\vee }_1, C_1)\) defined in [73, 83, 90]. The explicit connection between the spherical DAHA of type \((C^{\vee }_1, C_1)\) and the quantization of cubic surfaces was established by Oblomkov [74]. Terwilliger [92, Proposition 16.4] wrote down an explicit presentation of the spherical DAHA of type \((C^{\vee }_1, C_1)\) from which the isomorphism with \({\text {Sk}}_A(\mathbb {S}_{0,4})\) is clear. A much earlier appearance of the non-commutative cubic surface is the Askey–Wilson algebra \({\textit{AW}}(3)\) of Zhedanov [98]. A comparison between \({\textit{AW}}(3)\) and the spherical DAHA of type \((C^{\vee }_1, C_1)\) was done by Koornwinder [66]. More details on the relation between the skein and DAHA points of view can be found in [11, Section 2], [12, Section 2], [57].

Skein algebras can also be considered in the framework of \({\textit{SL}}_2\)-factorization homology. Explicit presentations of \({\text {Sk}}_A(\mathbb {S}_{0,4})\) and \({\text {Sk}}_A(\mathbb {S}_{1,1})\) as non-commutative cubic surfaces are recovered using this point of view by Cooke [26].

1.3 Line operators and BPS spectrum of the \(\mathcal {N}=2\) \(N_f=4\) SU(2) gauge theory

In this section, which can be ignored by a purely mathematically minded reader, we briefly discuss the string/M-theoretic motivation for a connection between the skein algebra \({\text {Sk}}_A(\mathbb {S}_{0,4})\) and the enumerative geometry of curves in cubic surfaces.

Let \(\mathcal {T}\) be a four-dimensional quantum field theory with \(\mathcal {N}=2\) supersymmetry. Such theory has in general an interesting dynamics connecting its short-distance behaviour (UV) with its long-distance behaviour (IR). The IR behaviour of \(\mathcal {T}\) is largely determined by its Seiberg–Witten geometry \(\nu :\mathcal {M}\rightarrow B\) [85, 86], described as follows. The special Kähler manifold with singularities B is the Coulomb branch of the moduli space of vacua of \(\mathcal {T}\) on \(\mathbb {R}^{1,3}\). The hyperkähler manifold \(\mathcal {M}\) is the Coulomb branch of the moduli space of vacua of \(\mathcal {T}\) on \(\mathbb {R}^{1,2} \times S^1\). The map \(\nu \) is a complex integrable system, that is, \(\nu \) is holomorphic with respect to a specific complex structure I on \(\mathcal {M}\), and the fibers of \(\nu \) are holomorphic Lagrangian with respect to the I-holomorphic symplectic form. General fibers of \(\nu \) endowed with the complex structure I are abelian varieties.

Due to supersymmetry, particular sectors of \(\mathcal {T}\) have remarkable protections against arbitrary quantum corrections and so can be often computed exactly. Examples of such protected sectors are the algebra \(\mathcal {A}_\mathcal {T}\) of \(\frac{1}{2}\)BPS line operators and the spectrum of BPS 1-particle states. The algebra \(\mathcal {A}_\mathcal {T}\) depends only on the UV behaviour of \(\mathcal {T}\). By wrapping around \(S^1\), a line operator on \(\mathbb {R}^{1,3}\) becomes a local operator on \(\mathbb {R}^{1,2}\), and so its expectation value can be viewed as a function on \(\mathcal {M}\). In fact, \(\mathcal {A}_\mathcal {T}\) is an algebra of functions on \(\mathcal {M}\) which are holomorphic for a complex structure J on \(\mathcal {M}\) with respect to which \(\nu \) is a special Lagrangian fibration. By contrast, the BPS spectrum depends on a choice of vacuum \(u \in B\) and changes discontinuously along real codimension-one walls in B.

Gaiotto, Moore and Neitzke [42] described how to construct a non-commutative deformation \(\mathcal {A}_\mathcal {T}^q\) of \(\mathcal {A}_\mathcal {T}\) by twisting correlation functions by rotations in the plane transverse to the line operators. They also explained that, given a choice of vacuum \(u \in B\), line operators have expansions in terms of IR line operators with coefficients given by counts of framed BPS states. These expansions depend discontinuously on u: they jump when the spectrum of framed BPS states jumps by forming bound states with (unframed) BPS states.

The same \(\mathcal {N}=2\) theory can often be engineered in several ways in string/M-theory. Given a punctured Riemann surface \(\mathbb {S}_{g,\ell }\), one obtains a \(\mathcal {N}=2\) theory \(\mathcal {T}_{g,\ell }\) by compactifying on \(\mathbb {S}_{g,\ell }\) the six-dimensional \(\mathcal {N}=(2,0)\) superconformal field theory of type \(A_1\) living, at low energy and after decoupling of gravity, on two coincident M5-branes in M-theory [41]. The corresponding Seiberg–Witten geometry \(\nu :\mathcal {M}\rightarrow B\) is the Hitchin fibration on the moduli space \(\mathcal {M}\) of semistable \({\textit{SL}}_2(\mathbb {C})\)-Higgs bundles on \(\mathbb {S}_{g,\ell }\) (with regular singularities and given residues at the punctures). By non-abelian Hodge theory, \(\mathcal {M}\) with its complex structure J is isomorphic to the \({\textit{SL}}_2(\mathbb {C})\)-character variety of \(\mathbb {S}_{g,\ell }\) (with given conjugacy classes around the punctures). The algebra \(\mathcal {A}_\mathcal {T}\) of line operators is identified with the algebra of regular functions on the \({\textit{SL}}_2(\mathbb {C})\)-character variety, and the non-commutative algebra \(\mathcal {A}_\mathcal {T}^q\) is identified with the skein algebra \({\text {Sk}}_A(\mathbb {S}_{g,\ell })\), which is physically realized as the algebra of loop operators in quantum Liouville theory on \(\mathbb {S}_{g,\ell }\) [30]. Explicit discussions of the families of non-commutative cubic surfaces describing \({\text {Sk}}_A(\mathbb {S}_{0,4})\) and \({\text {Sk}}_A(\mathbb {S}_{1,1})\) can be found in [29, Eq. (3.32)–(3.33)], [42, Eq. (5.29)] [93, Eq. (6.3)–(6.4)], [25, Eq. (3.55)–(3.57)].

The theory \(\mathcal {T}_{0,4}\) has a Lagrangian description: it is the \(\mathcal {N}=2\) SU(2) gauge theory with \(N_f=4\) matter hypermultiplets in the fundamental representation. It is one of the earliest example of \(\mathcal {N}=2\) theory for which the low-energy effective action and the BPS spectrum have been determined by Seiberg and Witten [86]. In particular, \(\mathcal {T}_{0,4}\) admits a \({\textit{PSL}}_2(\mathbb {Z})\) S-duality group and a \({\text {Spin}}(8)\) flavour symmetry group, which are mixed by the triality action of \({\textit{PSL}}_2(\mathbb {Z})\) via its quotient \({\textit{PSL}}_2(\mathbb {Z}/2\mathbb {Z}) \simeq S_3\). The Coulomb branch B of \(\mathcal {T}_{0,4}\) is of complex dimension one. In the complex structure I, the map \(\nu :\mathcal {M}\rightarrow B\) is an elliptic fibration. In the complex structure J, the space \(\mathcal {M}\) is a \({\textit{SL}}_2(\mathbb {C})\)-character variety for \(\mathbb {S}_{0,4}\), and so an affine cubic surface obtained as complement of a triangle D of lines in a smooth projective cubic surface Y.

The key point is that there is a different realization of \(\mathcal {T}_{0,4}\) from M-theory. Consider M-theory on the 11-dimensional background \(\mathbb {R}^{1,3} \times \mathcal {M}\times \mathbb {R}^3\) with an M5-brane on \(\mathbb {R}^{1,3} \times \nu ^{-1}(u)\), where \(u \in B\). Then, the theory living on the \(\mathbb {R}^{1,3}\) part of the M5-brane is \(\mathcal {T}_{0,4}\) in its vacuum u [9, 87]. Furthermore, BPS states are geometrically realized by open M2-branes in \(\mathcal {M}\) with boundary on \(\nu ^{-1}(u)\) [28]. Via the Ooguri–Vafa correspondence between counts of open M2-branes and open topological string theory [75], these counts can be translated into all-genus open Gromov–Witten invariants of \(\mathcal {M}\). In the limit where u is large, one can close open curves in \(\mathcal {M}\) into closed curves in Y meeting D in a single point, and we recover the invariants entering the definition of the canonical quantum scattering diagram \(\mathfrak {D}_{\textrm{can}}\) of (YD). Our explicit description of \(\mathfrak {D}_\textrm{can}\) will agree with the expected \({\textit{PSL}}_2(\mathbb {Z})\)-symmetric BPS spectrum of \(\mathcal {T}_{0,4}\) at large u [32, 86] and can be viewed as a new derivation of it.

We can now obtained the desired connection. When the \(\mathcal {N}=2\) \(N_f=4\) SU(2) gauge theory is realized as a compactification on \(\mathbb {S}_{0,4}\) of the \(\mathcal {N}=(2,0)\) \(A_1\) theory, the skein algebra \({\text {Sk}}_A(\mathbb {S}_{0,4})\) naturally appears as the algebra of line operators. On the other hand, when the \(\mathcal {N}=2\) \(N_f=4\) SU(2) gauge theory is realized on a M5-brane wrapped on a torus fiber of \(\nu :\mathcal {M}\rightarrow B\), the enumerative geometry of holomorphic curves in the cubic surface (YD) naturally appears as describing the BPS spectrum. By Gaiotto, Moore and Neitzke [42], line operators and BPS spectrum are related via the wall-crossing phenomenon for the IR expansions of the line operators in terms of counts of framed BPS states. It is exactly what will happen in our proof: quantum scattering diagrams encode BPS states, quantum broken lines describe framed BPS states, and the skein algebra will be reconstructed from quantum broken lines.

1.4 Plan of the paper

In Sect. 2, we introduce the notions of quantum scattering diagram and quantum broken line in the restricted setting that will be used in all the paper. In Sect. 3, we introduce the quantum scattering diagram \(\mathfrak {D}_{0,4}\), we state Theorem 3.7 on the consistency of \(\mathfrak {D}_{0,4}\) and Theorem 3.8 comparing \(\mathcal {A}_{\mathfrak {D}_{0,4}}\) and \({\text {Sk}}_A(\mathbb {S}_{0,4})\), and we explain how Theorems 1.11.4 follow from Theorems 3.7 and 3.8. In Sect. 4, we define the canonical quantum scattering \(\mathfrak {D}_\textrm{can}\) encoding higher genus log Gromov–Witten invariants of the cubic surface (YD), and we compute \(\mathfrak {D}_\textrm{can}\) explicitly. In Sect. 5, we compute a presentation by generators and relations of the algebra \(\mathcal {A}_{\mathfrak {D}_\textrm{can}}\) defined by \(\mathfrak {D}_\textrm{can}\). Finally, in Sect. 6, we compare \(\mathcal {A}_{\mathfrak {D}_\textrm{can}}\) with \({\text {Sk}}_A(\mathbb {S}_{0,4})\), and we end the proofs of Theorems 3.7 and 3.8.

2 Quantum Scattering Diagrams and Quantum Theta Functions

In Sect. 2.1, we introduce the integral affine manifold with singularity B. In Sect. 2.2, we define the notions of quantum scattering diagram and quantum broken lines on B. In Sect. 2.3, we define the algebra \(\mathcal {A}_\mathfrak {D}\) attached to a consistent quantum scattering diagram \(\mathfrak {D}\).

2.1 The integral affine manifold with singularity B

Let B be the quotient of \(\mathbb {R}^2\) by the linear transformation \((x,y) \mapsto (-x,-y)\). We denote \(0 \in B\) the image of \(0 \in \mathbb {R}^2\). As \((x,y) \mapsto (-x,-y)\) acts freely on \(\mathbb {R}^2 \backslash \{0\}\), the standard integral linear structure of \(\mathbb {R}^2\) induces an integral linear structure on \(B_0 :=B \backslash \{ 0\}\). The integral linear structure on \(B_0\) has the non-trivial order two monodromy \(-{\text {id}}\,\) around 0, and so does not extend to the whole of B. We view B as an integral linear manifold with singularity, with unique singularity 0. We denote by \(B_0(\mathbb {Z})\) the set of integral points of the integral linear manifold \(B_0\) and \(B(\mathbb {Z}) :=B_0(\mathbb {Z}) \cup \{0\}\).

Concretely, we identify B with the upper half-plane \(\{(x,y) \in \mathbb {R}^2\,|\, y \ge 0\}\) the positive x-axis and the negative x-axis being identified by \((x,0) \mapsto (-x,0)\), and we describe \(B(\mathbb {Z})\) as in Eq. (4). Let \(v_1\), \(v_2\), \(v_3\) be the three integral points of B given by \(v_1=(1,0)=(-1,0)\), \(v_2=(0,1)\), and \(v_3=(-1,1)\). We denote by \(\rho _1\), \(\rho _2\), \(\rho _3\) the rays \(\mathbb {R}_{\ge 0} v_1\), \(\mathbb {R}_{\ge 0} v_2\), \(\mathbb {R}_{\ge 0} v_3\), see Fig. 1. We will generally consider the index j of a point \(v_j\) or of a ray \(\rho _i\) as taking values modulo 3, so that it makes sense to talk about the point \(v_{j+1}\) or the ray \(\rho _{j+1}\). For every \(j \in \{1,2,3\}\), we denote by \(\sigma _{j,j+1}\) the closed two-dimensional cone of B generated by the rays \(\rho _j\) and \(\rho _{j+1}\). In particular, every element \(v \in \sigma _{j,j+1}\) can be uniquely written as \(v=av_j+bv_{j+1}\) with \(a,b \in \mathbb {R}_{\ge 0}\). The three cones \(\sigma _{j,j+1}\) define an integral polyhedral decomposition \(\Sigma \) of B.

We write \(\Lambda \) the rank two local system on \(B_0\) of integral tangent vectors to \(B_0\), and we fix a trivialization of \(\Lambda \) on each two-dimensional cone \(\sigma _{j,j+1}\). In particular, for every point \(Q \in \sigma _{j,j+1}\) and \(p \in B(\mathbb {Z}) \cap \sigma _{j,j+1}\), we can view p as an integral tangent vector at the point Q.

Fig. 1
figure 1

\((B,\Sigma )\)

2.2 Quantum scattering diagrams and quantum broken lines

In Sects. 2.2 and 2.3, we fix a \(\mathbb {Z}[A^{\pm }][t^{D_1},t^{D_2}, t^{D_3}]\)-algebra R of coefficients, and an half-integer \(\mu \in \frac{1}{2}\mathbb {Z}\). We will use the skew-symmetric bilinear form \(\langle -,-\rangle :=\mu \det (-,-)\) on \(\Lambda \).

Definition 2.1

A quantum ray \(\rho \) with coefficients in R is a pair \((p_{\rho }, f_\rho )\) where:

  1. (1)

    \(p_{\rho } \in B_0(\mathbb {Z})\) primitive.

  2. (2)

    \(f_\rho \) is an element of \(R\,[\![z^{-p_\rho }]\!]\) such that \(f_\rho =1 \mod z^{-p_\rho }\).

Definition 2.2

A quantum scattering diagram over R is a collection \(\mathfrak {D}=\{\rho =(p_{\rho }, f_{\rho })\}\) of quantum rays with coefficients in R such that \(\rho _1=\rho _2\) if \(\mathbb {R}_{\ge 0} p_{\rho _1}= \mathbb {R}_{\ge 0} p_{\rho _2}\).

Definition 2.3

Let \(\mathfrak {D}\) be a quantum scattering diagram over R. A quantum broken line \(\gamma \) for \(\mathfrak {D}\) with charge \(p \in B_0(\mathbb {Z})\) and endpoint \(Q \in B_0\) is a proper continuous piecewise integral affine map

$$\begin{aligned} \gamma :(-\infty , 0] \rightarrow B_0 \end{aligned}$$

with only finitely many domains of linearity, together with, for each \(L \subset (-\infty , 0]\) a maximal connected domain of linearity of \(\gamma \), a choice of monomial \(m_L=c_L z^{p_L}\) with \(c_L \in R\) non-zero and \(p_L\) a section of the local system \(\gamma ^{-1}(\Lambda )|_L\) on L, such that the following statements hold.

  1. (1)

    For each maximal connected domain of linearity L, we have \(-p_L(t)=\gamma '(t)\) for every \(t \in L\).

  2. (2)

    \(\gamma (0)=Q \in B_0\).

  3. (3)

    For the unique unbounded domain of linearity L, \(\gamma |_L\) goes off to infinity parallel to \(\mathbb {R}_{\ge 0} p\) and \(m_L=z^{p}\) for \(t \rightarrow -\infty \).

  4. (4)

    Let \(t \in (-\infty ,0)\) be a point at which \(\gamma \) is not linear, passing from the domain of linearity L to the domain of linearity \(L'\). Then, there exists a quantum ray \(\rho =(p_{\rho }, f_{\rho })\) of \(\mathfrak {D}\) such that \(\gamma (t) \in \mathbb {R}_{\ge 0} p_{\rho }\). Write \(m_L=c_L z^{p_L}\), \(m_{L'}=c_{L'}z^{p_{L'}}\), \(N :=|\det (p_{\rho },p_L)|\), and

    $$\begin{aligned} f_{\rho }=\sum _{k \ge 0} c_k z^{-k p_{\rho }} . \end{aligned}$$

    If \(\rho \ne \rho _j\) for every \(1 \le j \le 3\), then we set \(\alpha :=1\). If \(\rho =\rho _j\), \(\gamma \) goes from \(\sigma _{j-1,l}\) to \(\sigma _{j,j+1}\), and \(p_L=av_{j-1}+bv_j\), then we set \(\alpha :=t^{aD_j}\). If \(\gamma \) goes from \(\sigma _{j,j+1}\) and \(\sigma _{j-1,j}\), and \(p_L=av_j+bv_{j+1}\), then we set \(\alpha :=t^{bD_j}\). Then there exists a sequence \(n=(n_k)_{k \ge 0}\) of nonnegative integers with \(\sum _{k\ge 0} n_k=N\) such that, denoting by

    $$\begin{aligned} \beta _n \left( \prod _{k \ge 0} c_k^{n_k} \right) z^{-(\sum _{k \ge 0}n_k k)p_\rho } \end{aligned}$$
    (15)

    the term proportional to \( \left( \prod _{k \ge 0} c_k^{n_k} \right) z^{-(\sum _{k \ge 0}n_k k)p_\rho } \) in

    $$\begin{aligned} \prod _{j=0}^{N-1} \left( \sum _{k \ge 0} c_k A^{4 \mu k(j- \frac{N-1}{2})} z^{-kp_\rho } \right) , \end{aligned}$$
    (16)

    we have

    $$\begin{aligned} c_{L'}=\left( \alpha \beta _n \prod _{k \ge 0} c_k^{n_k} \right) c_L \quad \text {and} \quad p_{L'}=p_L- p_{\rho } \sum _{k \ge 0} n_k k . \end{aligned}$$
    (17)

    In other words, when the quantum broken line \(\gamma \) bends from L to \(L'\), the attached monomial changes according to Eq. (17).

Note that in some cases, we will consider a \(\mathbb {Z}[A^{\pm }][t^{D_1},t^{D_2},t^{D_3}]\)-module R where \(t^{D_j}\) acts as the identity on R for all \(1 \le j \le 3\). In such case, we can forget the discussion of the factor \(\alpha \) in Definition 2.3.

The following elementary positivity result will play a key role for us.

Lemma 2.4

Using the notation of Definition 2.3, the coefficient \(\beta _n\) in the expression (15) satisfies

$$\begin{aligned} \beta _n \in \mathbb {Z}_{\ge 0}[A^{\pm }] . \end{aligned}$$
(18)

Proof

Clear by expanding (16). \(\square \)

We recall symmetrized (invariant under \(A \mapsto A^{-1})\) versions of standard q-objects. For every nonnegative integer n, define the A-integer

$$\begin{aligned} {[}n]_A :=\frac{A^{2 n}-A^{-2 n}}{A^{2}-A^{-2}}= A^{-2(n-1)}\sum _{j=0}^{n-1} A^{4 j} \in \mathbb {Z}_{\ge 0}[A^{\pm }] , \end{aligned}$$
(19)

and the A-factorial

$$\begin{aligned} {[}n]_A! :=\prod _{j=1}^n [j]_A \in \mathbb {Z}_{\ge 0}[A^{\pm }]. \end{aligned}$$
(20)

For every nonnegative integers k and n, define the A-binomial coefficient (e.g. see Section 1.7 of [89])

$$\begin{aligned} \left( {\begin{array}{c}n\\ k\end{array}}\right) _A :=\frac{[n]!_A}{[k]!_A [n-k]!_A} \in \mathbb {Z}_{\ge 0}[A^{\pm }] . \end{aligned}$$
(21)

Lemma 2.5

Let \(f_\rho =\sum _{k \ge 0} c_k z^{-kp_\mathfrak {d}}\) such that \(f_\rho =1 \mod z^{-p_\mathfrak {d}}\). Writing

$$\begin{aligned} f_\rho =\prod _{k \ge 1}(1+a_k z^{-kp_\mathfrak {d}}), \end{aligned}$$

we have

$$\begin{aligned} \prod _{j=0}^{N-1} \left( \sum _{k \ge 0} c_k A^{4 \mu k(j- \frac{N-1}{2})} z^{-kp_\rho } \right) =\prod _{k \ge 1}\left( \sum _{j=0}^N \left( {\begin{array}{c}N\\ j\end{array}}\right) _{A^{\mu k}} a_k^j z^{-kj p_\rho } \right) . \end{aligned}$$
(22)

Proof

The result follows from the q-binomial theorem (see e.g. Equation (1.87) of [89]). \(\square \)

Definition 2.6

Using the notation of Definition 2.3, the positive integer \(\sum _{k \ge 0} n_k k\) is the amount of bending of the quantum broken line \(\gamma \) between the domain of linearity L and the domain of linearity \(L'\).

Definition 2.7

Let \(\mathfrak {D}\) be a quantum scattering diagram over R and \(\gamma \) a broken line for \(\mathfrak {D}\). The final monomial of \(\gamma \) is the monomial \(m_L\) attached to the domain of linearity L of \(\gamma \) containing 0. We write the final monomial of \(\gamma \) as \(c(\gamma ) z^{s(\gamma )}\), where \(c(\gamma ) \in R\) and \(s(\gamma ) \in \Lambda _{\gamma (0)}\).

Following [48], we now introduce a function \(F :B \rightarrow \mathbb {R}\), which will be used to constrain the possible broken lines. In order to minimize the number of minus signs, we take for our F the function \(-F\) in the notation of [48]. Let \(F :B \rightarrow \mathbb {R}\) be the continuous function on B, which is linear on each cone of \(\Sigma \) and such that \(F(v_j)=1\) for every \(1 \le j \le 3\). Explicitly, we have \(F((x,y))=x+y\) for \((x,y) \in \sigma _{1,2}\), \(F((x,y))=y\) for \((x,y) \in \sigma _{2,3}\), and \(F((x,y))=x+2y\) for \((x,y) \in \sigma _{3,1}\). Note that, for every \(p \in B(\mathbb {Z})\), F(p) is a nonnegative integer.

Proposition 2.8

Let \(\mathfrak {D}\) be a quantum scattering diagram, \(p_1, p_2 \in B_0(\mathbb {Z})\), \(p \in B(\mathbb {Z})\), and Q a point in the interior of a two-dimensional cone of \(\Sigma \) containing p. Let \((\gamma _1,\gamma _2)\) be a pair of quantum broken lines for \(\mathfrak {D}\) with charges \(p_1\),\(p_2\) and common endpoint Q, such that writing \(c(\gamma _1)z^{s(\gamma _1)}\) and \(c(\gamma _2)z^{s(\gamma _2)}\) the final monomials, we have \(s(\gamma _1)+s(\gamma _2)=p\). Then, the following holds.

  1. (1)

    \(F(p)\le F(p_1)+F(p_2)\).

  2. (2)

    If either \(\gamma _1\) or \(\gamma _2\) crosses one of the rays \(\rho _j\) or bends at a wall, then

    $$\begin{aligned} F(p) \le F(p_1)-F(p_2)-1. \end{aligned}$$
  3. (3)

    The sum over all the walls \(\rho \) at which either \(\gamma _1\) or \(\gamma _2\) bends, of the product of \(F(p_{\rho })\) by the amount of bending, is bounded above by \(F(p_1)+F(p_2)-F(p)\).

Proof

If \(\gamma \) is a broken line, we can consider the piecewise constant function \(dF(\gamma '(.)):t \mapsto dF(\gamma '(t))\) defined on the interior of the domains of linearity of \(\gamma \).

Let \(\gamma _1\) and \(\gamma _2\) be broken lines like in the statement of Proposition 2.8. As \(Q \notin \bigcup _{j=1}^3 \rho _j\), F is linear in a neighborhood of Q, and so for \(t<<0\), we have

$$\begin{aligned} F(p_1)+F(p_2)-F(p)= & {} -dF(\gamma _1'(t))-dF(\gamma _2'(t))+dF(-\gamma _1'(0)-\gamma _2'(0)) \\= & {} (dF(\gamma _1'(0))-dF(\gamma _1'(t)))+ (dF(\gamma _2'(0)-dF(\gamma _2'(t))) . \end{aligned}$$

Therefore, using the notations of Definition 2.3, it is enough to show that each time \(\gamma \) crosses a ray \(\rho _j\), \(dF(\gamma '(.))\) increases at least by 1, and that each time \(\gamma \) bends along a quantum ray \(\rho \) of \(\mathfrak {D}\), \(dF(\gamma '(.))\) increases at least by \(F(p_{\rho }) \sum _{k\ge 0}n_k k\).

We consider first the case where \(\gamma \) crosses a ray \(\rho _j\) without bending at some \(t \in (-\infty ,0]\). Let \(t_-<t\) and \(t_+>t\) be very close to t. Assume for example that \(j=2\) and that \(\gamma \) goes from \(\sigma _{12}\) to \(\sigma _{13}\). Then, \(\gamma '(t_-)=(a,b)\) with \(a<0\), and so \(dF(\gamma '(t_-))=a+b\) and \(dF(\gamma '(t_+)=b\), that is \(dF(\gamma '(.))\) increases by \(-a \in \mathbb {Z}_{\ge 1}\). If \(\gamma \) goes from \(\sigma _{13}\) to \(\sigma _{12}\), then \(\gamma '(t_-)=(a,b)\) with \(a>0\), and so \(dF(\gamma '(t_-))=b\) and \(dF(\gamma '(t_+)=a+b\), and so \(dF(\gamma '(.))\) increases by \(a \in \mathbb {Z}_{\ge 1}\). Cases with \(j=1\) and \(j=3\) follow similarly.

We then consider the case where \(\gamma \) bends along a quantum ray \(\rho \) of \(\mathfrak {D}\). Let \(t_-\) be in the domain of linearity L just before the bending and \(t_+\) the domain of linearity \(L'\) just after the bending. If \(p_\mathfrak {d}\ne v_j\) for every j, then F is linear on a neighborhood of the bending and so

$$\begin{aligned} dF(\gamma '(t_+))-dF(\gamma '(t_-)) =dF(p_{L})-dF(p_{L'})=F(p_{\rho }) \sum _{k \ge 1} n_k k. \end{aligned}$$

If \(p_\mathfrak {d}=v_j\) for some j, then, following the analysis done in the case \(\gamma \) crosses \(\rho _j\) without bending, we have the even stronger bound

$$\begin{aligned} dF(\gamma '(t_+))-dF(\gamma '(t_-)) =dF(p_{L})-dF(p_{L'})>F(p_{\rho }) \sum _{k \ge 1} n_k k. \end{aligned}$$

\(\square \)

Definition 2.9

Let \(\mathfrak {D}\) be a quantum scattering diagram, \(p_1, p_2 \in B_0(\mathbb {Z})\), and \(p \in B(\mathbb {Z})\). We define \(\mathfrak {D}_{p_1,p_2}^p :=\{ \rho =(p_{\rho },f_{\rho }) \in \mathfrak {D}\,\,|\,\, |F(p_{\rho })| \le F(p)-F(p_1)-F(p_2)\} \).

Lemma 2.10

Let \(\mathfrak {D}\) be a quantum scattering diagram, \(p_1, p_2 \in B_0(\mathbb {Z})\), and \(p \in B(\mathbb {Z})\). Then \(\mathfrak {D}_{p_1,p_2}^p\) is finite.

Proof

The function \(F :B \rightarrow \mathbb {R}\) is proper. \(\square \)

Proposition 2.11

Let \(\mathfrak {D}\) be a quantum scattering diagram, \(p_1, p_2 \in B_0(\mathbb {Z})\), \(p\in B(\mathbb {Z})\), and Q a point in the interior of a two-dimensional cone of \(\Sigma \) containing p. Then there are finitely many pairs \((\gamma _1,\gamma _2)\) of quantum broken lines for \(\mathfrak {D}\) with charges \(p_1\),\(p_2\) and common endpoint Q, such that writing \(c(\gamma _1)z^{s(\gamma _1)}\) and \(c(\gamma _2)z^{s(\gamma _2)}\) the final monomials, we have \(s(\gamma _1)+s(\gamma _2)=p\). Furthermore, if \(\rho \) is a bending quantum ray for either \(\gamma _1\) or \(\gamma _2\), then \(\rho \in \mathfrak {D}_{p_1,p_2}^p\).

Proof

By Proposition 2.8 and Lemma 2.10, there are finitely many possible bending quantum rays for \(\gamma _1\) and \(\gamma _2\), and the amount of each bending is uniformly bounded. \(\square \)

2.3 Quantum theta functions

Definition 2.12

Let \(\mathfrak {D}\) be a quantum scattering diagram over R, \(p_1, p_2 \in B_0(\mathbb {Z})\), \(p \in B(\mathbb {Z})\), and \(Q \in B_0\) a point in a connected component of

$$\begin{aligned} B_0 \backslash \left( \bigcup _{j=1}^3 \rho _j\cup \bigcup _{\rho \in \mathfrak {D}_{p_1,p_2}^p} \mathbb {R}_{\ge 0} p_{\rho } \right) \end{aligned}$$

whose closure contains \(\mathbb {R}_{\ge 0}p\), and such that the half-line \(\mathbb {R}_{\ge 0}Q\) has irrational slope. We define the structure constants

$$\begin{aligned} C_{p_1,p_2}^{\mathfrak {D}, p}(Q) :=\sum _{(\gamma _1,\gamma _2)} c(\gamma _1)c(\gamma _2) A^{2 \langle s(\gamma _1), s(\gamma _2) \rangle } \in R, \end{aligned}$$
(23)

where the sum is over pairs \((\gamma _1,\gamma _2)\) of quantum broken lines for \(\mathfrak {D}\) with charges \(p_1\),\(p_2\) and common endpoint Q, such that writing \(c(\gamma _1)z^{s(\gamma _1)}\) and \(c(\gamma _2)z^{s(\gamma _2)}\) the final monomials, we have \(s(\gamma _1)+s(\gamma _2)=p\).

We extend the definition of \(C_{p_1,p_2}^{\mathfrak {D}, p}(Q)\) to all \(p_1,p_2,p \in B(\mathbb {Z})\) by setting

$$\begin{aligned} C_{0,p_2}^{\mathfrak {D}, p}(Q):=\delta _{p_2,p} \quad \text {and} \quad C_{p_1,0}^{\mathfrak {D}, p}(Q) :=\delta _{p_1,p} . \end{aligned}$$
(24)

By Proposition 2.11, the sum in Eq. (23) is indeed finite.

Definition 2.13

A quantum scattering diagram \(\mathfrak {D}\) over R is consistent if the following conditions hold:

  1. (1)

    For every \(p_1, p_2,p \in B(\mathbb {Z})\), the structure constant \(C_{p_1,p_2}^{\mathfrak {D}, p}(Q)\) does not depend on the choice of the point Q. In such case, we write \(C_{p_1,p_2}^{\mathfrak {D}, p}\) for \(C_{p_1,p_2}^{\mathfrak {D}, p}(Q)\).

  2. (2)

    The product on the free R-module

    $$\begin{aligned} \mathcal {A}_{\mathfrak {D}} :=\bigoplus _{p \in B(\mathbb {Z})} R \, \vartheta _p \end{aligned}$$

    defined by

    $$\begin{aligned} \vartheta _{p_1}\vartheta _{p_2}=\sum _{p\in B(\mathbb {Z})} C_{p_1,p_2}^{\mathfrak {D},p} \vartheta _p \end{aligned}$$
    (25)

    is associative.

In other words, given a consistent quantum scattering diagram \(\mathfrak {D}\) over R, one can construct an associative R-algebra \(\mathcal {A}_{\mathfrak {D}}\), coming with a R-linear basis \(\{\vartheta _p\}_{p \in B(\mathbb {Z})}\), called basis of quantum theta functions, and whose structure constants can be computed in terms of quantum broken lines by Eq. (23).

Note that the sum in Eq. (25) is indeed finite: if \(C_{p_1,p_2}^{\mathfrak {D},p} \ne 0\), then \(F(p) \le F(p_1)+F(p_2)\) by Proposition 2.11 and there are finitely many such \(p \in B(\mathbb {Z})\) by properness of F.

Lemma 2.14

Let \(p_1,p_2 \in B(\mathbb {Z})\). If there is no two-dimensional cone of \(\Sigma \) containing both \(p_1\) and \(p_2\), then

$$\begin{aligned} \vartheta _{p_1}\vartheta _{p_2}=\sum _{\begin{array}{c} p\in B(\mathbb {Z})\\ F(p) \le F(p_1)+F(p_2)-1 \end{array} } C_{p_1,p_2}^{\mathfrak {D},p} \vartheta _p . \end{aligned}$$
(26)

If there is a two-dimensional cone of \(\Sigma \) containing both \(p_1\) and \(p_2\), then

$$\begin{aligned} \vartheta _{p_1}\vartheta _{p_2}= A^{2 \langle p_1, p_2 \rangle } \vartheta _{p_1+p_2}+ \sum _{\begin{array}{c} p\in B(\mathbb {Z})\\ F(p) \le F(p_1)+F(p_2)-1 \end{array} } C_{p_1,p_2}^{\mathfrak {D},p} \vartheta _p . \end{aligned}$$
(27)

Proof

By Proposition 2.8, all the non-zero terms in the sum (25) have \(F(p) \ge F(p_1)+F(p_2)\), and the only possibility for \(F(p)=F(p_1)+F(p_2)\) is that all the broken lines contributing to \(C_{p_1,p_2}^{\mathfrak {D},p}\) do not cross \(\bigcup _{j=1}^3 \rho _j\) and do not bend. If there is no two-dimensional cone of \(\Sigma \) containing both \(p_1\) and \(p_2\), then a broken line contributing to \(C_{p_1,p_2}^{\mathfrak {D},p}\) necessarily crosses \(\bigcup _{j=1}^3 \rho _j\), so \(F(p) \le F(p_1)+F(p_2)-1\), and we obtain Eq. (26). If there is a two-dimensional cone of \(\Sigma \) containing both \(p_1\) and \(p_2\), then the only possibly non-zero term with \(F(p)=F(p_1)+F(p_2)\) is obtained for \(p=p_1+p_2\), for which the broken lines are straight, and we obtain Eq. (27). \(\square \)

For every \(n \in \mathbb {Z}_{\ge 0}\), define

$$\begin{aligned} \mathcal {A}_{\mathfrak {D}_\textrm{can}}^n :=\bigoplus _{\begin{array}{c} p \in B(\mathbb {Z}) \\ F(p) \le n \end{array}} R \,\vartheta _p . \end{aligned}$$
(28)

By Lemma 2.14, the increasing filtration \((\mathcal {A}_{\mathfrak {D}_\textrm{can}}^n)_{n \in \mathbb {Z}_{\ge 0}}\) defines a structure of filtered algebra on \(\mathcal {A}_{\mathfrak {D}_\textrm{can}}\). For every \(p \in B(\mathbb {Z})\), we define \(m[p] \in \mathcal {A}_{\mathfrak {D}_\textrm{can}}\) as the following monomials in \(\vartheta _{v_1}\), \(\vartheta _{v_2}\), \(\vartheta _{v_3}\): if \(p=av_j+bv_{j+1}\) with \(a \ge 0\) and \(b \ge 0\), then \(m[p]:=\vartheta _{v_j}^a \vartheta _{v_{j+1}}^b\).

Lemma 2.15

The monomials m[p] for \(p \in B(\mathbb {Z})\) form a R-linear basis of \(\mathcal {A}_{\mathfrak {D}_\textrm{can}}\). In particular, the quantum theta functions \(\vartheta _{v_1}\), \(\vartheta _{v_2}\) and \(\vartheta _{v_3}\) generate \(\mathcal {A}_{\mathfrak {D}_\textrm{can}}\) as R-algebra.

Proof

By Lemma 2.14, we have \(m[p] \in \mathcal {A}_{\mathfrak {D}_\textrm{can}}^{F(p)}\), and the images of m[p] and \(\vartheta _p\) in the quotient \(\mathcal {A}_{\mathfrak {D}_\textrm{can}}^{F(p)}/\mathcal {A}_{\mathfrak {D}_\textrm{can}}^{F(p)-1}\) only differ by a power of A. Therefore, the fact that \(\{\vartheta _p\}_{p\in B(\mathbb {Z})}\) is a R-linear basis of \(\mathcal {A}_{\mathfrak {D}_\textrm{can}}\) implies that \(\{m[p]\}_{p \in B(\mathbb {Z})}\) is also a R-linear basis of \(\mathcal {A}_{\mathfrak {D}_\textrm{can}}\). \(\square \)

3 Algorithms from the Quantum Scattering Diagrams \(\mathfrak {D}_{0,4}\) and \(\mathfrak {D}_{1,1}\)

In Sect. 3.1, we first introduce the quantum scattering diagram \(\mathfrak {D}_{0,4}\), and then we state Theorem 3.7 on the consistency of \(\mathfrak {D}_{0,4}\) and Theorem 3.8 comparing \(\mathcal {A}_{\mathfrak {D}_{0,4}}\) and \({\text {Sk}}_A(\mathbb {S}_{0,4})\). We also explain how to deduce Theorem 1.1 for \({\text {Sk}}_A(\mathbb {S}_{0,4})\) and Theorem 1.2 from Theorems 3.7 and 3.8. In Sect. 3.2, we introduce the quantum scattering diagram \(\mathfrak {D}_{1,1}\) and we explain how Theorem 1.1 for \({\text {Sk}}_A(\mathbb {S}_{1,1})\) and Theorem 1.3 follow from Theorems 3.7 and 3.8. In Sect. 3.3, we use our description of \({\text {Sk}}_{A}(\mathbb {S}_{1,1})\) to recover the results of Frohman and Gelca [38] on the skein algebra \({\text {Sk}}_A(\mathbb {S}_{1,0})\) of the closed torus \(\mathbb {S}_{1,0}\). Finally, in Sect. 3.4, we prove Theorem 1.4 relating positivity for the bracelets basis of the skein algebras and positivity for the quantum cluster \(\mathcal {X}\)-varieties.

3.1 The quantum scattering diagram \(\mathfrak {D}_{0,4}\)

We take \(R =\mathbb {Z}[A^{\pm }][R_{1,0}, R_{0,1}, R_{1,1}, y]\), and \(\mu =1\). We view R as a \(\mathbb {Z}[A^{\pm }][t^{D_1},t^{D_2},t^{D_3}]\)-module R where \(t^{D_j}\) acts as the identity on R for all \(1 \le j \le 3\). This means that we can ignore the discussion of the factors \(\alpha \) in the Definition 2.3 of quantum broken lines.

Definition 3.1

We define

$$\begin{aligned} F(r,s,y,x)&:=1+ \frac{rx(1+x^2)}{(1-A^{-4}x^2)(1-A^4x^2)} +\frac{yx^2}{(1-A^{-4}x^2)(1-A^4x^2)}\nonumber \\&\quad + \frac{sx^3(1+sx+x^2)}{(1-A^{-4}x^2) (1-x^2)^2(1-A^4x^2)}. \end{aligned}$$
(29)

Lemma 3.2

Expanding F(rsyx) as a power series in x, we have

$$\begin{aligned} F(r,s,y,x) \in \mathbb {Z}_{\ge 0}[A^{\pm }][r,s,y][\![x]\!] . \end{aligned}$$

Proof

Immediate from Eq. (29) defining F(rsyx) and from the power series expansion

$$\begin{aligned} \frac{1}{1-u}=\sum _{k \ge 0} u^k . \end{aligned}$$

\(\square \)

The first few terms of F as a power series in x are

$$\begin{aligned} F(r,s,y,x)=1+rx+yx^2 +(s+r(A^{-4}+1+A^4))x^3 +(s^2+A^{-4}+A^4)x^4+\dots \end{aligned}$$
(30)

Definition 3.3

For every \((m,n) \in B_0(\mathbb {Z})\) with m and n coprime, we define a quantum ray \(\rho _{m,n}=(p_{\rho _{m,n}}, f_{\rho _{m,n}})\) with coefficients in \(\mathbb {Z}[A^{\pm }][R_{1,0}, R_{(0,1}, R_{1,1},y]\) by \(p_{\rho _{m,n}}=(m,n)\), and

  1. (1)

    if \((m,n)=(1,0) \mod 2\), \( f_{\rho _{m,n}} :=F(R_{1,0}, R_{0,1}R_{1,1},y,z^{-(m,n)})\),

  2. (2)

    if \((m,n)=(0,1) \mod 2\), \( f_{\rho _{m,n}} :=F(R_{0,1}, R_{1,0}R_{1,1},y,z^{-(m,n)})\),

  3. (3)

    if \((m,n)=(1,1) \mod 2\), \( f_{\rho _{m,n}} :=F(R_{1,1}, R_{1,0}R_{0,1},y,z^{-(m,n)})\).

Lemma 3.4

For every \((m,n) \in B_0(\mathbb {Z})\) with m and n coprime, we have

$$\begin{aligned} f_{\rho _{m,n}} \in \mathbb {Z}_{\ge 0}[A^{\pm }][R_{1,0}, R_{0,1}, R_{1,1},y][\![z^{-(m,n)} ]\!] . \end{aligned}$$

Proof

Immediate from Lemma 3.2 and Definition 3.3. \(\square \)

Definition 3.5

We define a quantum scattering diagram \(\mathfrak {D}_{0,4}\) over \(\mathbb {Z}[A^{\pm }][R_{1,0}, R_{0,1}, R_{1,1}, y]\) by

$$\begin{aligned} \mathfrak {D}_{0,4} :=\{\rho _{m,n}\,|\,(m,n) \in B_0(\mathbb {Z}),\,\gcd (m,n)=1\} . \end{aligned}$$

Physics remark 3.6

In the physics language used in Sect. 1.3, we claim that the quantum scattering diagram \(\mathfrak {D}_{0,4}\) encodes the BPS spectrum of the \(\mathcal {N}=2\) theory \(\mathcal {T}_{0,4}\), that is, of the \(\mathcal {N}=2\) \(N_f=4\) SU(2) gauge theory, at large values of u on the Coulomb branch. The fact that \(f_{\rho _{m,n}}\) only depends on \((m,n) \mod 2\) via permutations of \(\{R_{1,0},R_{0,1},R_{1,1}\}\) reflects the \({\textit{PSL}}_2(\mathbb {Z})\) S-duality symmetry, mixed with the \({\text {Spin}}(8)\) flavour symmetry by the triality action of \({\textit{PSL}}_2(\mathbb {Z}/2\mathbb {Z}) \simeq S_3\) [86]. However, it is not so clear from Eq. (29) that the precise form of \(f_{\rho _{m,n}}\) agrees with the expected BPS spectrum of \(\mathcal {T}_{0,4}\). This will become manifest after some rewriting: see Remark 6.7.

The following Theorems 3.7 and 3.8 are our main technical results and their proof will take the remainder of the paper. The proof of Theorem 3.7 ends in Sect. 6.2, whereas the proof of Theorem 3.8 is concluded in Sect. 6.3.

Theorem 3.7

The quantum scattering diagram \(\mathfrak {D}_{0,4}\) is consistent.

By Theorem 3.7, it makes sense to consider the \(\mathbb {Z}[A^{\pm }][R_{1,0}, R_{0,1}, R_{1,1}, y]\)-algebra \(\mathcal {A}_{\mathfrak {D}_{0,4}}\) given by Definition 2.13, with its basis \(\{ \vartheta _p \}_{p \in B(\mathbb {Z})}\) of quantum theta functions, and structure constants \(C_{p_1,p_2}^{\mathfrak {D}_{0,4},p}\).

Theorem 3.8

There is a unique morphism

$$\begin{aligned} \varphi :\mathcal {A}_{\mathfrak {D}_{0,4}} \longrightarrow {\text {Sk}}_A(\mathbb {S}_{0,4}) \end{aligned}$$

of \(\mathbb {Z}[A^{\pm }][R_{1,0},R_{0,1}, R_{1,1},y]\)-algebras such that

$$\begin{aligned} \varphi (\vartheta _p)=\textbf{T}(\gamma _p) \end{aligned}$$

for every \(p \in B(\mathbb {Z})\). Moreover, after extension of scalars for \(\mathcal {A}_{\mathfrak {D}_{0,4}} \) from \(\mathbb {Z}[A^{\pm }][R_{1,0},R_{0,1}, R_{1,1},y]\) to \(\mathbb {Z}[A^{\pm }][a_1,a_2,a_3,a_4]\), \(\varphi \) becomes an isomorphism of \(\mathbb {Z}[A^{\pm }][a_1,a_2,a_3,a_4]\)-algebras.

In particular, structure constants of the skein algebra \({\text {Sk}}_A(\mathbb {S}_{0,4})\) defined by Eq. (5) coincide with the structure constants of the scattering diagram \(\mathfrak {D}_{0,4}\) defined by Eq. (23): for every \(p_1,p_2,p \in B(\mathbb {Z})\), we have

$$\begin{aligned} C_{p_1,p_2}^{\mathbb {S}_{0,4},p}=C_{p_1,p_2}^{\mathfrak {D}_{0,4},p} . \end{aligned}$$
(31)

Corollary 3.9

The classical theta functions \(\vartheta _p^{{\text {cl}}}\) constructed in [46, 48] coincide with the trace functions \(\rho \mapsto -{\text {tr}}(\rho (\gamma _{p_{{\textit{prim}}}})^k)\) on the character variety \({\text {Ch}}_{{\textit{SL}}_2}(\mathbb {S}_{0,4})\), where \(p=kp_{{\textit{prim}}}\) with \(k \in \mathbb {Z}_{\ge 1}\) and \(p_{{\textit{prim}}} \in B(\mathbb {Z})\) primitive.

Proof

It is an immediate corollary of Theorem 3.8. In the classical limit \(A=-1\), our quantum theta functions \(\vartheta _p\) reduce to the classical theta functions \(\vartheta _p^{{\text {cl}}}\) of [46, 48], and the element \(\textbf{T}(\gamma _p)\) of \({\text {Sk}}_A(\mathbb {S}_{0,4})\) reduces to the function \(\rho \mapsto -{\text {tr}}(\rho (\gamma _{p_{{\textit{prim}}}})^k)\) on \({\text {Ch}}_{{\textit{SL}}_2}(\mathbb {S}_{0,4})\) by the general relation between skein algebras and character varieties reviewed in Sect. 1.2.3. \(\square \)

Theorem 3.8 implies Theorem 1.2. Indeed, by Lemma 3.4, the functions attached to the quantum rays of \(\mathfrak {D}_{0,4}\) have coefficients in \(\mathbb {Z}_{\ge 0}[A^{\pm }][R_{1,0}, R_{0,1}, R_{1,1},y]\), and so it follows from the definition of the structure constants \(C_{p_1,p_2}^{\mathfrak {D}_{0,4},p} \) in Eq. (23) in terms of broken lines, from the formula (17) recursively computing the contribution of a broken line and from the positivity given by Lemma 2.4, that

$$\begin{aligned} C_{p_1,p_2}^{\mathfrak {D}_{0,4},p} \in \mathbb {Z}_{\ge 0}[A^{\pm }][R_{1,0}, R_{0,1}, R_{1,1},y] \end{aligned}$$
(32)

for every \(p_1,p_2,p \in B(\mathbb {Z})\). By Theorem 3.8, we have \(C_{p_1,p_2}^{\mathbb {S}_{0,4},p}=C_{p_1,p_2}^{\mathfrak {D}_{0,4},p}\), and so

$$\begin{aligned} C_{p_1,p_2}^{\mathbb {S}_{0,4},p} \in \mathbb {Z}_{\ge 0}[A^{\pm }][R_{1,0}, R_{0,1}, R_{1,1},y], \end{aligned}$$
(33)

that is, Theorem 1.2 holds.

Finally, we explain how Theorem 1.2 implies Theorem 1.1 for \({\text {Sk}}_A(\mathbb {S}_{0,4})\). A general element of the bracelets basis \(\textbf{B}_T\) of \({\text {Sk}}_A(\mathbb {S}_{0,4})\) is of the form

$$\begin{aligned} T_{n_1}(a_1)T_{n_2}(a_2)T_{n_3}(a_3)T_{n_4}(a_4) \textbf{T}(\gamma _p) \end{aligned}$$
(34)

for some \(n_j \in \mathbb {Z}_{>0}\) for \(1 \le j \le 4\) and some \(p \in B(\mathbb {Z})\). As the \(T_{n_j}(a_j)\) are in the center of \({\text {Sk}}_A(\mathbb {S}_{0,4})\) and

$$\begin{aligned} T_{n_j}(a_j)T_{n_j'}(a_j)=T_{n_j+n_j'}(a_j) +T_{|n_j-n_j'|}(a_j), \end{aligned}$$
(35)

it is enough to show that the structure constants \(C_{p_1,p_2}^{\mathfrak {D}_{0,4},p}\) are polynomials in the variables \(T_n(a_j)\) with coefficients in \(\mathbb {Z}_{\ge 0}[A^{\pm }]\). By Theorem 1.2, we have

$$\begin{aligned} C_{p_1,p_2}^{\mathbb {S}_{0,4},p} \in \mathbb {Z}_{\ge 0}[A^{\pm }][R_{1,0}, R_{0,1}, R_{1,1},y]. \end{aligned}$$

Using Eq. (35) again, it is enough to show that \(R_{1,0}\), \(R_{0,1}\), \(R_{1,1}\) and y are polynomials in the variables \(T_n(a_j)\) with coefficients in \(\mathbb {Z}_{\ge 0}[A^{\pm }]\). Using that \(T_1(x)=x\) and \(T_2(x)=x^2-2\), we have from Eqs. (6)–(7)

$$\begin{aligned} R_{1,0}&=T_1(a_1)T_1(a_2)+T_1(a_3)T_1(a_4), \end{aligned}$$
(36)
$$\begin{aligned} R_{0,1}&=T_1(a_1)T_1(a_3)+T_1(a_2)T_1(a_4), \end{aligned}$$
(37)
$$\begin{aligned} R_{1,1}&=T_1(a_1)T_1(a_4)+T_1(a_2)T_1(a_3), \end{aligned}$$
(38)
$$\begin{aligned} y&=T_1(a_1)T_1(a_2)T_1(a_3)T_1(a_4) +T_2(a_1)^2+T_2(a_2)^2+T_2(a_3)^2\nonumber \\&\quad + T_2(a_4)^2+A^4+6+A^{-4} , \end{aligned}$$
(39)

and so the result holds.

3.2 The quantum scattering diagram \(\mathfrak {D}_{1,1}\)

We take \(R=\mathbb {Z}[A^{\pm }][z]\) and \(\mu =\frac{1}{2}\). We view R as a \(\mathbb {Z}[A^{\pm }][t^{D_1},t^{D_2},t^{D_3}]\)-module where \(t^{D_j}\) acts as the identity on R for all \(1 \le j \le 3\). This means that we can ignore the discussion of the factors \(\alpha \) in the Definition 2.3 of quantum broken lines.

Definition 3.10

We define

$$\begin{aligned} G(z,x) :=1+\frac{zx^2}{(1-A^{-2}x^2) (1-A^2 x^2)} \end{aligned}$$
(40)

Lemma 3.11

Expanding G(zx) as a power series in x, we have

$$\begin{aligned} G(z,x) \in \mathbb {Z}_{\ge 0}[A^{\pm }][z][\![x]\!] . \end{aligned}$$

Proof

Immediate from Eq. (29) defining G(zx) and from the power series expansion

$$\begin{aligned} \frac{1}{1-u}=\sum _{k \ge 0} u^k . \end{aligned}$$

\(\square \)

The first few terms of G as a power series in x are

$$\begin{aligned} G(z,x)=1+zx^2 +(A^{-2}+A^2)x^4+\ldots \end{aligned}$$
(41)

Note that writing \(z=A^2+A^{-2}+\eta \) and \(\eta =\lambda +\lambda ^{-1}\), we have

$$\begin{aligned} G(z,x)=\frac{1+\eta x^2+x^4}{(1-A^{-2}x^2)(1-A^2 x^2)}=\frac{(1+\lambda x^2)(1+\lambda ^{-1}x^2)}{(1-A^{-2}x^2)(1-A^2 x^2)}. \end{aligned}$$
(42)

Definition 3.12

For every \((m,n) \in B_0(\mathbb {Z})\) with m and n coprime, we define a quantum ray \(\tau _{m,n}=(p_{\tau _{m,n}}, f_{\tau _{m,n}})\) with coefficients in \(\mathbb {Z}[A^{\pm }][z]\) by \( p_{\tau _{m,n}}=(m,n)\), and \( f_{\tau _{m,n}} :=G(z ,z^{-(m,n)})\).

Lemma 3.13

For every \((m,n) \in B_0(\mathbb {Z})\) with m and n coprime, we have

$$\begin{aligned} f_{\tau _{m,n}} \in \mathbb {Z}_{\ge 0}[A^{\pm }][z][\![z^{-(m,n)} ]\!] . \end{aligned}$$

Proof

Immediate from Lemma 3.11 and Definition 3.12. \(\square \)

Definition 3.14

We define a quantum scattering diagram \(\mathfrak {D}_{1,1}\) over \(\mathbb {Z}[A^{\pm }][z]\) by

$$\begin{aligned} \mathfrak {D}_{1,1} :=\{\tau _{m,n}\,|\,(m,n) \in B_0(\mathbb {Z}),\,\gcd (m,n)=1\} . \end{aligned}$$

Physics remark 3.15

In the physics language used in Sect. 1.3, the quantum scattering diagram \(\mathfrak {D}_{1,1}\) encodes the BPS spectrum of the \(\mathcal {N}=2\) theory \(\mathcal {T}_{1,1}\) at large values of u on the Coulomb branch. The theory \(\mathcal {T}_{1,1}\) has a Lagrangian description: it is the \(\mathcal {N}=2\) SU(2) gauge theory coupled with a matter hypermultiplet in the adjoint representation, also known as the \(\mathcal {N}=2^{\star }\) theory. The BPS spectrum at large values of u reduces to the BPS spectrum on the Coulomb branch of the theory with zero mass for the matter hypermultiplet, that is of the \(\mathcal {N}=4\) SU(2) gauge theory. Our definition of \(\mathfrak {D}_{1,1}\) agrees with the expected BPS spectrum on the Coulomb branch of the \(\mathcal {N}=4\) SU(2) gauge theory: for every \((m,n) \in \mathbb {Z}^2\) with m and n coprime, we have one vector multiplet of charge (2m, 2n), which corresponds to to the denominator of Eq. (42), two hypermultiplets of charge (2m, 2n), which correspond to the numerator of Eq. (42) and no other states of charge a multiple of (mn) [86]. Note that the \(\mathcal {N}=2\) vector multiplet and the two \(\mathcal {N}=2\) hypermultiplets combine into one \(\mathcal {N}=4\) vector multiplet. The states of charge (2, 0) can be seen classically (as W-bosons and elementary quarks), and the general states of charge (2m, 2n) are obtained from them by \({\textit{SL}}_2(\mathbb {Z})\) S-duality.

Lemma 3.16

\(\mathfrak {D}_{1,1}\) is obtained from \(\mathfrak {D}_{0,4}\) by replacing \(A^4\) by \(A^2\), setting \(R_{1,0}=R_{0,1}=R_{1,1}=0\) and \(y=z\).

Proof

Immediate from comparing the Eqs. (29) and (40) defining F(rsyx) and G(zx). \(\square \)

Theorem 3.17

The quantum scattering diagram \(\mathfrak {D}_{1,1}\) is consistent.

Proof

By Lemma 3.16, \(\mathfrak {D}_{1,1}\) is a specialization of \(\mathfrak {D}_{0,4}\), and so the consistency of \(\mathfrak {D}_{1,1}\) follows from the consistency of \(\mathfrak {D}_{0,4}\) given by Theorem 3.7. \(\square \)

By Theorem 3.17, it makes sense to consider the \(\mathbb {Z}[A^{\pm }][z]\)-algebra \(\mathcal {A}_{\mathfrak {D}_{1,1}}\) given by Definition 2.13, with its basis \(\{ \vartheta _p \}_{p \in B(\mathbb {Z})}\) of quantum theta functions, and structure constants \(C_{p_1,p_2}^{\mathfrak {D}_{1,1},p}\).

Theorem 3.18

There is a unique morphism

$$\begin{aligned} \varphi :\mathcal {A}_{\mathfrak {D}_{1,1}} \longrightarrow {\text {Sk}}_A(\mathbb {S}_{1,1}) \end{aligned}$$

of \(\mathbb {Z}[A^{\pm }][z]\)-algebras such that

$$\begin{aligned} \varphi (\vartheta _p)=\textbf{T}(\gamma _p) \end{aligned}$$

for every \(p \in B(\mathbb {Z})\). Moreover, \(\varphi \) is an isomorphism of \(\mathbb {Z}[A^{\pm }][z]\)-algebras.

In particular, structure constants of the skein algebra \({\text {Sk}}_A(\mathbb {S}_{1,1})\) defined by Eq. (9) coincide with the structure constants of the scattering diagram \(\mathfrak {D}_{1,1}\) defined by Eq. (23): for every \(p_1,p_2,p \in B(\mathbb {Z})\), we have

$$\begin{aligned} C_{p_1,p_2}^{\mathbb {S}_{1,1},p}=C_{p_1,p_2}^{\mathfrak {D}_{1,1},p} . \end{aligned}$$
(43)

Proof

Theorem 3.18 follows from the similar result, Theorem 3.8, for \(\mathbb {S}_{0,4}\). Indeed, by Lemma 3.16, the algebra \(\mathcal {A}_{\mathfrak {D}_{1,1}}\) is obtained from \(\mathcal {A}_{\mathfrak {D}_{0,4}}\) by setting \(R_{1,0}=R_{0,1}=R_{1,1}=0\), \(y=z\), and by matching the quantum theta functions \(\{ \vartheta _p \}_{p \in B(\mathbb {Z})}\). On the other hand, Bullock and Przytycki gave in [19] explicit presentations by generators and relations of \({\text {Sk}}_A(\mathbb {S}_{0,4})\) and \({\text {Sk}}_A(\mathbb {S}_{1,1})\), and observed that \({\text {Sk}}_A(\mathbb {S}_{1,1})\) is obtained from \({\text {Sk}}_A(\mathbb {S}_{0,4})\) by setting \(R_{1,0}=R_{0,1}=R_{1,1}=0\), \(y=z\), and by matching the multicurves \(\{\gamma _p\}_{p \in B(\mathbb {Z})}\). \(\square \)

Theorem 3.18 implies Theorem 1.3. Indeed, by Lemma 3.13, the functions attached to the quantum rays of \(\mathfrak {D}_{1,1}\) have coefficients in \(\mathbb {Z}_{\ge 0}[A^{\pm }][z]\), and so it follows from the definition of the structure constants \(C_{p_1,p_2}^{\mathfrak {D}_{1,1},p} \) in Eq. (23) in terms of broken lines, from the formula (17) recursively computing the contribution of a broken line and from the positivity given by Lemma 2.4, that

$$\begin{aligned} C_{p_1,p_2}^{\mathfrak {D}_{1,1},p} \in \mathbb {Z}_{\ge 0}[A^{\pm }][z] \end{aligned}$$
(44)

for every \(p_1,p_2,p \in B(\mathbb {Z})\). By Theorem 3.18, we have \(C_{p_1,p_2}^{\mathbb {S}_{1,1},p}=C_{p_1,p_2}^{\mathfrak {D}_{1,1},p}\), and so

$$\begin{aligned} C_{p_1,p_2}^{\mathbb {S}_{1,1},p} \in \mathbb {Z}_{\ge 0}[A^{\pm }][z], \end{aligned}$$
(45)

that is, Theorem 1.3 holds.

Finally, we explain how Theorem 1.3 implies Theorem 1.1 for \({\text {Sk}}_A(\mathbb {S}_{1,1})\). A general element of the bracelets basis \(\textbf{B}_T\) of \({\text {Sk}}_A(\mathbb {S}_{1,1})\) is of the form

$$\begin{aligned} T_{n}(\eta ) \textbf{T}(\gamma _p) \end{aligned}$$
(46)

for some \(n \in \mathbb {Z}_{>0}\) and some \(p \in B(\mathbb {Z})\). As the \(T_{n}(\eta )\) are in the center of \({\text {Sk}}_A(\mathbb {S}_{1,1})\), it follows from the identity (35) that it is enough to show that the structure constants \(C_{p_1,p_2}^{\mathfrak {D}_{1,1},p}\) are polynomials in the variables \(T_n(\eta )\) with coefficients in \(\mathbb {Z}_{\ge 0}[A^{\pm }]\). By Theorem 1.3, we have \(C_{p_1,p_2}^{\mathbb {S}_{1,1},p} \in \mathbb {Z}_{\ge 0}[A^{\pm }][z]\). Using Eq. (35) again, it is enough to show that z is a polynomial in the variables \(T_n(\eta )\) with coefficients in \(\mathbb {Z}_{\ge 0}[A^{\pm }]\). As \(z=T_1(\eta )+A^2+A^{-2}\), this indeed holds.

3.3 Recovering the skein algebra of the closed torus

As reviewed in Sect. 1.1.2, Frohman and Gelca [38] described explicitly the skein algebra \({\text {Sk}}_A(\mathbb {S}_{1,0})\) of the (closed) torus \(\mathbb {S}_{1,0}\). We explain below how this result appears as a limit of our description of the skein algebra \({\text {Sk}}_A(\mathbb {S}_{1,1})\) of the 1-punctured torus \(\mathbb {S}_{1,1}\).

The closed torus \(\mathbb {S}_{1,0}\) is obtained from the 1-punctured torus \(\mathbb {S}_{1,1}\) by closing the puncture, that is by making topologically trivial the peripheral curve \(\eta \). Thus, the skein algebra \({\text {Sk}}_A(\mathbb {S}_{1,0})\) is obtained from \({\text {Sk}}_A(\mathbb {S}_{1,1})\) by setting \(\eta =-A^2-A^{-2}\), that is \(z=0\). Theorem 3.18 gives a description of \({\text {Sk}}_A(\mathbb {S}_{1,1})\) in terms of the scattering diagrams \(\mathfrak {D}_{1,1}\). Setting \(z=0\) in the Definition 3.12 of \(\mathfrak {D}_{\textrm{can}}\), we obtain a trivial scattering diagrams whose all quantum rays \(\rho =(p_\rho , f_\rho )\) have \(f_\rho =1\). In particular, no broken line can bend in such scattering diagram, and the structure constants become extremely simple.

Let \(p_1, p_2 \in B_0(\mathbb {Z})\). Using the \({\textit{PSL}}_2(\mathbb {Z})\) action on \(B(\mathbb {Z})\), we can assume that \(p_1\) is horizontal, that is, \(p_1=(a,0)\). Then, there are only two configurations of broken lines contributing to the product \(\vartheta _{p_1} \vartheta _{p_2}\): the one with \(\gamma _1\) straight going to infinity parallel to \(\mathbb {R}_{\ge 0}p_1\) and \(\gamma _2\) straight going to infinity parallel to \(\mathbb {R}_{\ge 0}p_2\), and the one with \(\gamma _1\) straight going to infinity parallel to \(-\mathbb {R}_{\ge 0}p_1\) and \(\gamma _2\) straight going to infinity parallel to \(\mathbb {R}_{\ge 0}p_1\). Therefore, applying Eq. (23), we obtain

$$\begin{aligned} \vartheta _{p_1}\vartheta _{p_2}= A^{\det (p_1,p_2)} \vartheta _{p_1+p_2} +A^{-\det (p_1,p_2)} \vartheta _{p_1-p_2} , \end{aligned}$$
(47)

that is, we recover the product-to-sum formula of Frohman and Gelca [38] (see also [81] for a different proof).

Note that in the limit where the scattering diagram on B becomes trivial, and considering the classical limit \(A=1\), the mirror cubic surface constructed in [48] becomes

$$\begin{aligned} \vartheta _{v_1}\vartheta _{v_2}\vartheta _{v_3} =\vartheta _{v_1}^2+\vartheta _{v_2}^2+\vartheta _{v_3}^2-4 , \end{aligned}$$

which is isomorphic to \((\mathbb {G}_m)^2/(\mathbb {Z}/2\mathbb {Z})\), where \(\mathbb {Z}\) acts on the torus \((\mathbb {G}_m)^2\) by \((x,y) \mapsto (x^{-1},y^{-1})\) (an isomorphism is given by \(\vartheta _{v_1}=x+x^{-1}\), \(\vartheta _{v_2}=y+y^{-1}\), \(\vartheta _{v_3}=xy+x^{-1}y^{-1}\)). This is the classical version of the description given by Frohman and Gelca [38] of \({\text {Sk}}_A(\mathbb {S}_{1,0})\) as a \(\mathbb {Z}/2\mathbb {Z}\)-quotient of the quantum torus.

3.4 Application to quantum cluster algebras

In this section, we prove Theorem 1.4, that is, that the positivity of the structure constants of the bracelets basis of the skein algebra \({\text {Sk}}_A(\mathbb {S}_{g,\ell })\) implies the positivity of the structure constants defined by the quantum duality map \(\hat{\mathbb {I}}\) of [5]. We use the notations introduced in Sect. 1.1.5.

The quantum duality map \(\hat{\mathbb {I}}\) is defined in [5] using the quantum trace map of Bonahon and Wong [13]. Given an ideal triangulation T of \(\mathbb {S}_{g,\ell }\), there is a corresponding quantum trace map, which is an injective algebra morphism

$$\begin{aligned} {\text {Tr}}_T :{\text {Sk}}_A(\mathbb {S}_{g,\ell }) \longrightarrow \hat{\mathcal {Z}}_T , \end{aligned}$$

where \(\hat{\mathcal {Z}}_T\) is the square root Chekhov–Fock algebra.

The set of tropical points \(\mathcal {A}_{{\textit{SL}}_2,\mathbb {S}_{g,\ell }}(\mathbb {Z}^t)\) is the set of even integral laminations on \(\mathbb {S}_{g,\ell }\) [34]. For every \(l \in \mathcal {A}_{{\textit{SL}}_2,\mathbb {S}_{g,\ell }}(\mathbb {Z}^t)\), we can write uniquely \(l = \sum _j k_j l_j\) where the \(l_j\) are connected multicurves with distinct homotopy classes, \(k_j \in \mathbb {Z}_{\ge 1}\) if \(l_j\) is not peripheral, and \(k_j \in \mathbb {Z}\) if \(l_j\) is peripheral. By Definition 3.11 of [5], we have \(\hat{\mathbb {I}}(l)=\prod _j \hat{\mathbb {I}}(k_j l_j)\). Therefore, to prove Theorem 1.4, it is enough to prove the positivity of the structure constants appearing in the products of the form \(\hat{\mathbb {I}}(kl)\hat{\mathbb {I}}(k'l')\) where l and \(l'\) are connected multicurves, \(k \in \mathbb {Z}_{\ge 0}\) (resp. \(k' \in \mathbb {Z}_{\ge 1}\)) if l (resp. \(l'\)) is not peripheral, \(k \in \mathbb {Z}\) (resp. \(k' \in \mathbb {Z}\)) if l (resp. \(l'\)) is peripheral.

By Lemma 3.25 of [5], for l a peripheral connected multicurve, \(k \in \mathbb {Z}\), and \(l'\) a lamination, we have \(\hat{\mathbb {I}}(kl) \hat{\mathbb {I}}(l')= \hat{\mathbb {I}}(kl+l')\). It follows that it is enough to prove the positivity of the structure constants appearing in the products of the form \(\hat{\mathbb {I}}(kl)\hat{\mathbb {I}}(k'l')\) where l and \(l'\) are non-peripheral connected multicurves and \(k,k' \in \mathbb {Z}_{\ge 1}\).

So, let us consider l and \(l'\) non-peripheral connected multicurves and \(k,k' \in \mathbb {Z}_{\ge 1}\). By Definitions 3.4 and 3.8 of [5],we have \(\hat{\mathbb {I}}(kl)={\text {Tr}}_T(T_k(l))\) and \(\hat{\mathbb {I}}(k'l')={\text {Tr}}_T (T_{k'}(l'))\). Therefore, assuming the positivity of the structure constants of the bracelets basis of \({\text {Sk}}_A(\mathbb {S}_{g,\ell })\), we have

$$\begin{aligned} \hat{\mathbb {I}}(kl) \hat{\mathbb {I}}(k'l') ={\text {Tr}}_T(T_k(l)){\text {Tr}}_T (T_{k'}(l')) ={\text {Tr}}_T(T_k(l)T_{k'}(l')) =\sum _\gamma C_{kl,k'l'}^{\gamma } {\text {Tr}}_T(\textbf{T}(\gamma )) , \end{aligned}$$
(48)

where the sum is over finitely many multicurves \(\gamma \) and \(C_{kl,kl'}^{\gamma } \in \mathbb {Z}_{\ge 0} [A^{\pm }]\). Write \(\gamma =\gamma _1^{n_1} \cdots \gamma _r^{n_r}\) with \(\gamma _1, \ldots , \gamma _r\) all distinct isotopy classes of connected multicurves, \(\gamma _1,\ldots , \gamma _s\) non-peripheral and \(\gamma _{s+1},\ldots , \gamma _r\) peripheral, and \(n_j \in \mathbb {Z}_{>0}\). We have

$$\begin{aligned} {\text {Tr}}_T(\textbf{T}(\gamma )) =\prod _{j=1}^r {\text {Tr}}_T(T_{n_j}(\gamma _j)) =\prod _{j=1}^s \hat{\mathbb {I}} (n_j \gamma _j) \prod _{k=s+1}^r ({\text {Tr}}_T(\gamma _k))^{n_k} . \end{aligned}$$
(49)

For \(s+1 \le k \le r\), \(\gamma _k\) is peripheral, and so by Lemma 3.24 of [5], we have

$$\begin{aligned} \hat{\mathbb {I}}(\gamma _k) +\hat{\mathbb {I}}(-\gamma _k)={\text {Tr}}_T(\gamma _k). \end{aligned}$$
(50)

Therefore, using again Lemma 3.25 of [5], we have

$$\begin{aligned} \hat{\mathbb {I}}(kl) \hat{\mathbb {I}}(k'l')&=\sum _\gamma C_{kl,k'l'}^{\gamma } \prod _{j=1}^s \hat{\mathbb {I}} (n_j \gamma _j) \prod _{k=s+1}^r (\hat{\mathbb {I}}(\gamma _k) +\hat{\mathbb {I}}(-\gamma _k))^{n_k}\nonumber \\&=\sum _\gamma C_{kl,k'l'}^{\gamma } \prod _{j=1}^s \hat{\mathbb {I}} (n_j \gamma _j) \prod _{k=s+1}^r \left( \sum _{a=0}^{n_k} \left( {\begin{array}{c}n_k\\ a\end{array}}\right) \hat{\mathbb {I}}((2a-n_k)\gamma _k)\right) \nonumber \\&=\sum _\gamma C_{kl,k'l'}^{\gamma } \sum _{a_{s+1}=0}^{n_{s+1}} \cdots \sum _{a_r=0}^{n_r} \left( {\begin{array}{c}n_{s+1}\\ a_{s+1}\end{array}}\right) \cdots \left( {\begin{array}{c}n_r\\ a_r\end{array}}\right) \hat{\mathbb {I}} \left( \sum _{j=1}^s n_j \gamma _j + \sum _{k=s+1}^r (2a_k-n_k) \gamma _k \right) , \end{aligned}$$
(51)

and so, under our assumption that \(C_{kl,kl'}^\gamma \in \mathbb {Z}_{\ge 0}[A^{\pm }]\), the structure constants of \(\hat{\mathbb {I}}\) belong to \(\mathbb {Z}_{\ge 0}[A^{\pm }]\). On the other hand, by Theorem 1.2 of [5], these structure constants belong to \(\mathbb {Z}[A^{\pm 2}]=\mathbb {Z}[q^{\pm \frac{1}{2}}]\). Thus, the structure constants of \(\hat{\mathbb {I}}\) belong to \(\mathbb {Z}_{\ge 0}[q^{\pm \frac{1}{2}}]\) and this proves Theorem 1.4.

4 The Canonical Quantum Scattering Diagram

We fix \(\mathbb {k}\) an algebraically closed field of characteristic zero, Y a smooth projective cubic surface in \(\mathbb {P}^3_{\mathbb {k}}\), and D the union of three projective lines \(D_1\), \(D_2\), \(D_3\) in \(\mathbb {P}^3_{\mathbb {k}}\) contained in Y and forming a triangle configuration. In Sect. 4.1, we review following [16] the construction of the canonical quantum scattering diagram \(\mathfrak {D}_\textrm{can}\) associated to (YD). After some preliminaries on curve classes in Y presented in Sect. 4.2, we give some explicit description of \(\mathfrak {D}_\textrm{can}\) in Sects. 4.3 and 4.4.

4.1 The canonical quantum scattering diagram \(\mathfrak {D}_{\textrm{can}}\)

Following [16, Section 3], we review the definition of the canonical quantum scattering diagram attached to (YD). The canonical quantum scattering diagram is defined in terms of the enumerative geometry of curves in (YD). More precisely, the canonical quantum scattering diagram encodes the data of logarithmic Gromov–Witten invariants of (YD).

The pair \((B,\Sigma )\) defined in Sect. 2.1 is the tropicalization of (YD). It plays for (YD) the role of a fan for a toric surface. In particular, the three two-dimensional cones \(\sigma _{j,j+1}\) of \(\Sigma \) are in natural correspondence with the three points \(D_j \cap D_{j+1}\), the three one-dimensional rays \(\rho _j\) of \(\Sigma \) are in natural correspondence with the three divisors \(D_j\), and the point \(0 \in B\) is in natural correspondence with the complement U of D in Y. The integral linear structure on \(B_0\) encodes the self-intersection numbers of the divisors \(D_j\): for every \(j \in \{1,2,3\}\), the fact that \(D_j^2=-1\) translates into the fact that \(v_{j-1}+v_j+v_{j+1}=0\). We refer to [48, §1] and [46, §1.2] for further details on the construction of the tropicalization.

Let NE(Y) be the Mori cone of Y, i.e. the cone generated by effective curve classes in the group \(A_1(Y)\) generated by numerical equivalence classes of curves on Y. The group \(A_1(Y)\) is a free abelian group of rank 7. The Mori cone NE(Y) is a strictly convex rational polyhedral cone in \(A_1(Y)\), generated by the classes of the 27 lines on Y. We write \( \mathbb {Q}[\![\hbar ]\!][NE(Y)]\) for the corresponding monoid ring with coefficients in the power series algebra \(\mathbb {Q}[\![\hbar ]\!]\), and \(t^\beta \) for the monomial in \( \mathbb {Q}[\![\hbar ]\!][NE(Y)]\) defined by \(\beta \in NE(Y)\). We will apply the formalism of Sect. 2 with \(R=\mathbb {Q}[\![\hbar ]\!][NE(Y)]\), viewed as a \(\mathbb {Z}[A^{\pm }][t^{D_1},t^{D_2},t^{D_3}]\)-algebra, where A acts by multiplication by \(e^{\frac{i\hbar }{4}}\), and \(t^{D_j}\) acts by multiplication by the corresponding element in \(\mathbb {Z}[NE(Y)]\). We will often use the notation \(q=e^{i\hbar }=A^4\).

Let \(\beta \in NE(Y)\) and \(v \in B_0(\mathbb {Z})\). We can write \(v=av_j + bv_{j+1}\) with \(a,b \in \mathbb {Z}_{\ge 0}\) for some \(j \in \{1,2,3\}\). We are considering genus g one-pointed stable maps \(f:(C,p) \rightarrow (Y,D)\) with \(f^{-1}(D)=\{p\}\), such that g has contact order a with \(D_j\) at p and contact order b with \(D_{j+1}\) at p. Logarithmic Gromov–Witten theory [1, 52] provides a nice compactification \(\overline{M}_{g,v}^\beta (Y/D)\) of the space of such stable maps. The moduli space \(\overline{M}_{g,v}^\beta (Y/D)\) is a proper Deligne–Mumford stack, coming with a virtual fundamental cycle \([\overline{M}_{g,v}^\beta (Y/D)]^{\textrm{virt}}\) of degree g.

Let \(\pi :\mathcal {C}\rightarrow \overline{M}_{g,v}^\beta (Y/D)\) be the universal source curve, \(\omega _\pi \) the relative dualizing sheaf of \(\pi \), and \(\pi _{*} \omega _\pi \) the rank g Hodge bundle on \(\overline{M}_{g,v}(Y/D,\beta )\). The top Chern class \(\lambda _g\) of the Hodge bundle is a (complex) degree g cohomology class on \(\overline{M}_{g,v}^\beta (Y/D)\). We define log Gromov–Witten invariants \(N_{g,v}^{\beta }\) of (YD) by integration of the cohomology class \((-1)^g \lambda _g\) on the virtual fundamental cycle:

$$\begin{aligned} N_{g,v}^{\beta } :=\int _{[\overline{M}_{g,v}^\beta (Y/D)]^{\textrm{virt}}} (-1)^g \lambda _g . \end{aligned}$$
(52)

We have in general \(N_{g,v}^{\beta } \in \mathbb {Q}\). For \(g=0\), we recover the genus 0 log Gromov–Witten invariants \(N_v^{\beta }\) considered in [46, 48].

Lemma 4.1

Given \(v \in B_0(\mathbb {Z})\), there exists finitely many \(\beta \in NE(Y)\) such that \(N_{g,v}^{\beta } \ne 0\) for some g.

Proof

Write \(v=av_j + bv_{j+1}\) with \(a,b \in \mathbb {Z}_{\ge 0}\) for some \(j \in \{1,2,3\}\). The moduli space \(\overline{M}_{g,v}^\beta (Y/D)\) is possibly non-empty, and so the invariant \(N_{g,v}^{\beta }\) possibly non-zero, only if \(\beta \cdot D_j=a\) and \(\beta \cdot D_{j+1}=b\), and so in particular \(\beta \cdot D=a+b\). As D is an ample divisor on Y, the set of such curve classes \(\beta \) is finite. \(\square \)

Definition 4.2

For every \((m,n) \in B_0(\mathbb {Z})\) with m and n coprime, we define a quantum ray \(\mathfrak {d}_{m,n}=(p_{\mathfrak {d}_{m,n}}, f_{\mathfrak {d}_{m,n}})\) with coefficients in \(\mathbb {Q}[\![\hbar ]\!][NE(Y)]\) by \(p_{\mathfrak {d}_{m,n}}=(m,n)\), and

$$\begin{aligned} f_{\mathfrak {d}_{m,n}} :=\exp \left( \sum _{k \ge 1} \sum _{\beta \in NE(Y)} \sum _{g \ge 0} 2 \sin \left( \frac{k \hbar }{2} \right) N_{g,k(m,n)}^{\beta } \hbar ^{2g-1} t^{\beta } z^{-k(m,n)} \right) . \end{aligned}$$
(53)

Note that by Lemma 4.1, we have indeed \(f_{\mathfrak {d}_{(m,n)}} \in \mathbb {Q}[\![\hbar ]\!][NE(Y)][\![z^{-(m,n)}]\!]\), as required by Definition 2.1.

Definition 4.3

We define a quantum scattering diagram \(\mathfrak {D}_{\textrm{can}}\) over \(\mathbb {Q}[\![\hbar ]\!][NE(Y)]\) by

$$\begin{aligned} \mathfrak {D}_{\textrm{can}} :=\{\mathfrak {d}_{m,n}\,|\,(m,n) \in B_0(\mathbb {Z}),\,\gcd (m,n)=1\} . \end{aligned}$$

We refer to \(\mathfrak {D}_{\textrm{can}}\) as the canonical quantum scattering diagram defined by (YD).

The following Theorem 4.4 is the specialization to the case of the cubic surface (YD) of one of the main results of [16] on the consistency of canonical quantum scattering diagrams attached to log Calabi–Yau surfaces.

Theorem 4.4

[16] The quantum scattering diagram \(\mathfrak {D}_{\textrm{can}}\) is consistent.

In the following sections, we give an explicit description of the canonical quantum scattering diagram \(\mathfrak {D}_{\textrm{can}}\).

4.2 Curves on the cubic surface

Recall that lines in \(\mathbb {P}^3_{\mathbb {k}}\) contained in Y are exactly the \((-1)\)-curves on Y. A smooth projective cubic surface \(Y \subset \mathbb {P}^3_{\mathbb {k}}\) contains 27 lines, a classical result going back to Cayley [22] and Salmon [84] (see e.g. [55, V.4]). Three of these lines are \(D_1\), \(D_2\), \(D_3\), whose union is the triangle D. It remains 24 lines on Y not contained in D. By the adjunction formula, each of them intersect D in a single point. One can easily check that for every \(j \in \{1,2,3\}\), there are 8 lines not containing in D and intersecting \(D_j\), that we write \(L_{jk}\) for \(1 \le k \le 8\).

For convenience in describing curves classes of Y, we also fix for every \(j \in \{1,2,3\}\) a pair of disjoint lines \(\{E_{j1},E_{j2}\} \subset \{L_{jm}\}_{1 \le m \le 8} \). Contracting the 6 \((-1)\)-curves \(E_{11}\), \(E_{12}\), \(E_{21}\), \(E_{22}\), \(E_{31}\), \(E_{32}\), gives a presentation of Y as a blow-up of \(\mathbb {P}^2_\mathbb {k}\) in 6 points. We denote by \(H \in NE(Y)\) the pullback of the class of a line in \(\mathbb {P}^2_\mathbb {k}\). Note that for every \(j \in \{1,2,3\}\), we have

$$\begin{aligned} D_j=H-E_{j1}-E_{j2} \end{aligned}$$
(54)

From the explicit description of the 27 lines on \(\mathbb {P}^2\) blown-up in 6 points as the 6 exceptional divisors, the strict transforms of the 15 lines passing through pairs of blown-up points, and the 6 strict transforms of the conics passing though 5-tuples of blown-up points, we obtain the list of the classes of the 8 lines \(L_{1m}\) intersecting \(D_1\) and distinct from \(D_2\) and \(D_3\). We have 2 exceptional divisors, 4 strict transforms of a line, and 2 strict transforms of a conic:

$$\begin{aligned} \{ L_{1m}\}_{1 \le m \le 8}&= \{ E_{11}, E_{12}, H-E_{21}-E_{31}, H-E_{21}-E_{32}, H-E_{22}-E_{31},\nonumber \\&\quad H-E_{22}-E_{32}, 2H-E_{11}-E_{21}-E_{22}-E_{31}-E_{32} , 2H-E_{12}\nonumber \\&\quad -E_{21}-E_{22}-E_{31}-E_{32} \}. \end{aligned}$$
(55)

Similarly, we have

$$\begin{aligned} \{ L_{2m}\}_{1 \le m \le 8}&= \{ E_{21}, E_{22}, H-E_{11}-E_{31}, H-E_{11}-E_{32}, H-E_{12}-E_{31}, \nonumber \\&\quad H-E_{12}-E_{32}, 2H-E_{21}-E_{11}-E_{12}-E_{31}-E_{32} , 2H-E_{22}\nonumber \\&\quad -E_{11}-E_{12}-E_{31}-E_{32} \}, \end{aligned}$$
(56)

and

$$\begin{aligned} \{ L_{3m}\}_{1 \le m \le 8}&= \{ E_{31}, E_{32}, H-E_{11}-E_{21}, H-E_{11}-E_{22}, H-E_{12}-E_{21},\nonumber \\&\quad H-E_{12}-E_{22}, 2H-E_{31}-E_{11}-E_{12}-E_{21}-E_{22} , 2H-E_{32}\nonumber \\&\quad -E_{11}-E_{12}-E_{21}-E_{22} \}. \end{aligned}$$
(57)

For every \(j \in \{1,2,3\}\), writing \(\{1,2,3\}=\{j,k,\ell \}\), there are exactly two conics in Y tangent to \(D_j\) and not intersecting \(D_k \cup D_{\ell }\), that we write \(\mathcal {C}_{jk}\) for \(1 \le k \le 2\). This comes from the fact that there are two conics passing through 4 points and tangent to a given line in \(\mathbb {P}^2_\mathbb {k}\). The class in NE(Y) of the two conics \(\mathcal {C}_{jk}\) for \(1 \le k \le 2\) is

$$\begin{aligned} 2H-E_{k1}-E_{k2}-E_{\ell 1}-E_{\ell 2}=D_k+D_{\ell } . \end{aligned}$$
(58)

4.3 Contribution of the rays \(\mathfrak {d}_j\): calculations in log Gromov–Witten theory

For every \(j \in \{1,2,3\}\), we write \(\mathfrak {d}_j\) for \(\mathfrak {d}_{m,n}\) where \(v_j=(m,n)\). In the following Proposition 4.5, we compute explicitly the quantum rays \(\mathfrak {d}_j\) of \(\mathfrak {D}_{\textrm{can}}\).

Proposition 4.5

For every \(j \in \{1,2,3\}\), writing \(\{1,2,3\}=\{j,k,\ell \}\) , the quantum ray \(\mathfrak {d}_j=(v_j, f_{\mathfrak {d}_j})\) in \(\mathfrak {D}_\textrm{can}\) satisfies

$$\begin{aligned} f_{\mathfrak {d}_j} = \frac{\prod _{m=1}^8(1+t^{L_{jm}}z^{-v_j})}{(1-q^{-1} t^{D_k+D_{\ell }}z^{-2v_j}) (1- t^{D_k+D_{\ell }}z^{-2v_j})^2 (1-q t^{D_k+D_{\ell }}z^{-2v_j})} \end{aligned}$$
(59)

where \(q=e^{i\hbar }\).

The proof of Proposition 4.5 takes the remainder of Sect. 4.3. We will show that the numerator of \(f_{\mathfrak {d}_j}\) is the contribution of multicovers of the lines \(L_{jm}\) for \(1 \le m \le 8\), that the denominator of \(f_{\mathfrak {d}_j}\) is the contribution of the multicovers of the conics \(\mathcal {C}_{jk}\) for \(1 \le k \le 2\), and that no other curve classes contribute to \(f_{\mathfrak {d}_j}\). Given the cyclic \(\mathbb {Z}/3\mathbb {Z}\)-symmetry permuting \(\{1,2,3\}\), we can assume \(j=1\), \(k=2\), \(\ell =3\).

Lemma 4.6

For every \(1 \le j \le 8\) and \(k \in \mathbb {Z}_{\ge 1}\), we have

$$\begin{aligned} \sum _{g \ge 0} N_{g,kv_1}^{kL_{1j}} \hbar ^{2g-1} = \frac{(-1)^{k-1}}{k} \frac{1}{2\sin \left( \frac{k \hbar }{2} \right) } . \end{aligned}$$
(60)

Proof

For every \(1 \le j \le 8\), the line \(L_{1j}\) is a \((-1)\)-curve, so rigid unique representative of its curve class. Hence, every stable log map of class \(k L_{1j}\) factors through \(L_{1j}\). Therefore, we can compute \(N_{g,kv_1}^{kL_{1j}}\) as some integral over a moduli space of stable log maps to \(L_{1j} \simeq \mathbb {P}^1\). More precisely, we have

$$\begin{aligned} N_{g,kv_1}^{kL_{1j}}=\int _{[M_{g,k}]^{\textrm{virt}}} e(R^1 \pi _* f^*(\mathcal {O}_{\mathbb {P}^1} \oplus \mathcal {O}_{\mathbb {P}^1}(-1)) , \end{aligned}$$
(61)

where \(M_{g,k}\) is the moduli space of genus g degree k stable log maps to \(\mathbb {P}^1\) compactifying the moduli space of stable maps fully ramified over a given point \(\infty \in \mathbb {P}^1\), \(\pi :\mathcal {C}\rightarrow M_{g,k}\) is the universal curve and \(f :\mathcal {C}\rightarrow \mathbb {P}^1\) is the universal stable log map. The insertion \(R^1 \pi _*f^* \mathcal {O}_{\mathbb {P}^1}\) comes by Serre duality from the insertion \((-1)^g \lambda _g\) in Eq. (52), and the insertion \(R^1 \pi _*f^* \mathcal {O}_{\mathbb {P}^1}(-1)\) comes from the comparison of the obstruction theories for stable maps to Y with stable maps to \(L_j \simeq \mathbb {P}^1\), using that the normal bundle of \(L_j\) in Y is \(\mathcal {O}_{\mathbb {P}^1}(-1)\). The integral in the right-hand side of Eq. (61) was computed by Bryan and Pandharipande [17, Theorem 5.1] in relative Gromov–Witten theory of \((\mathbb {P}^1,\infty )\), which is known to be equivalent to log Gromov–Witten theory of \((\mathbb {P}^1,\infty )\) by [3]. \(\square \)

Lemma 4.7

For every \(k \in \mathbb {Z}_{\ge 1}\), we have

$$\begin{aligned} \sum _{g \ge 0} N_{g,2kv_1}^{k(D_2+D_3)} \hbar ^{2g-1} =\frac{1}{k} \frac{2 \cos \left( \frac{k\hbar }{2}\right) }{2 \sin \left( \frac{k \hbar }{2} \right) }. \end{aligned}$$
(62)

Proof

The linear system of curves in Y of class

$$\begin{aligned} D_2+D_3=2H-E_{21}-E_{22}-E_{31}-E_{34} \end{aligned}$$

is one-dimensional, made of strict transforms of conics in \(\mathbb {P}^2\) passing through four given points. The only curves of class \(D_2+D_3\) tangent with \(D_1\) are the two conics \(\mathcal {C}_{11}\) and \(\mathcal {C}_{12}\). Hence, every stable log map in the moduli space \(\overline{M}_{g,2v_1}^{k(D_2+D_3)}(Y/D)\) factors through either \(\mathcal {C}_{11}\) or \(\mathcal {C}_{12}\). However, the required multicover computation is more complicated that the one used in Lemma 4.6 and in fact has done been done previously directly in Gromov–Witten theory. We will follow a slightly roundabout path and use a general correspondence theorem between log Gromov–Witten invariants of log Calabi–Yau surfaces and quiver Donaldson–Thomas invariants proved in [14].

As no curve of class \(D_2+D_3\) intersect \(E_{11}\) or \(E_{21}\), we can contract the two \((-1)\)-curves \(E_{11}\) and \(E_{21}\) and compute the invariants \(N_{g,2kv_1}^{k(D_2+D_3)}\) on the resulting surface \(Y'\). Following Section 8.5 of [14], we can attach to \(Y'\) a quiver \(Q_{Y'}\): vertices of \(Q_{Y'}\) in one-to-one correspondence with the exceptional divisors \(E_{21}\), \(E_{22}\), \(E_{31}\), \(E_{32}\). As \(\langle v_2, v_3 \rangle =1\), we have an edge from every vertex corresponding to \(E_{21}, E_{22}\) to every vertex corresponding to \(E_{31}\), \(E_{32}\) (Fig. 2).

Fig. 2
figure 2

The quiver \(Q_{Y'}\)

As in Section 8.5 of [14], let \(M_k^{ss}\) (resp. \(M_k^{st}\)) be the moduli space of semistable (resp. stable) representations of \(Q_{Y'}\) of dimension vector (kkkk), where we consider the maximally non-trivial stability condition. Write \(\iota :M_k^{st} \hookrightarrow M_k^{ss}\) for the natural inclusion and define

$$\begin{aligned} \Omega _k^{Q_{Y'}}(q^{\frac{1}{2}}):=(-q^{\frac{1}{2}})^{-\dim M_k^{st}} \sum _{j=0}^{\dim M_k^{ss}} \dim H^{2j}(M_k^{ss},\iota _{!*} \mathbb {Q}_{M_k^{st}} ) q^j, \end{aligned}$$
(63)

where \(\iota _{!*}\) is the intermediate extension functor. Applying Theorem 8.13 of [14], we obtain

$$\begin{aligned} \sum _{g \ge 0} N_{g,2kv_1}^{k(D_2+D_3)} \hbar ^{2g-1} =- \sum _{k=\ell k'} \frac{1}{\ell } \frac{\Omega _{k'}^{Q_{Y'}}(q^{\frac{\ell }{2}})}{2 \sin \left( \frac{\ell \hbar }{2} \right) } , \end{aligned}$$
(64)

where \(q=e^{i\hbar }\).

We have \(M_1^{st}=M_1^{sst}=\mathbb {P}^1\) and so

$$\begin{aligned} \Omega _1^{Q_{Y'}}(q^{\frac{1}{2}})=-q^{-\frac{1}{2}}-q^{\frac{1}{2}}. \end{aligned}$$
(65)

On the other hand, \(M_k^{st}\) is empty for \(k>1\) and so

$$\begin{aligned} \Omega _k^{Q_{Y'}}(q^{\frac{1}{2}})=0 \end{aligned}$$
(66)

for \(k>1\). To check that \(M_k^{st}\) is empty for \(k>1\), one can argue as follows. Given a representation \((V_{21},V_{22},V_{31},V_{32},f_1,f_2,f_3,f_4)\) of \(Q_{Y'}\), one constructs a representation \((V_{21} \oplus V_{22}, V_{31} \oplus V_{32}, f_1 \oplus f_4, f_2 \oplus f_3)\) of the Kronecker quiver (Fig. 3). One then uses the fact that, by the classification of representations of the Kronecker quiver (see for example Section 1.8 of [40]), every representation of dimension (nn) of the Kronecker quiver contains a subrepresentation of dimension (1, 0).

Lemma 4.7 follows by combination of Eqs. (64)–(65)–(66). \(\square \)

Fig. 3
figure 3

The Kronecker quiver

Lemma 4.8

Let \(k \in \mathbb {Z}_{\ge 1}\) and \(\beta \in NE(Y)\) such that there exists \(g \in \mathbb {Z}_{\ge 0}\) and a stable log map \((f :C \rightarrow Y) \in \overline{M}_{g,kv_1}^{\beta }(Y/D)\) with C irreducible and f generically injective. Then, we have either \(\beta =L_{1j}\) for some \(1 \le j \le 8\) and \(k=1\), or \(\beta =D_2+D_3\) and \(k=2\).

Proof

We write \(\beta =aL-\sum _{j=1}^3 \sum _{m=1}^2 b_{jm} E_{jk}\) with \(a, b_{jm} \in \mathbb {Z}\). As \(\overline{M}_{g,kv_1}^{\beta }(Y/D)\) is not empty, we have \(\beta \cdot D_1 =k\), \(\beta \cdot D_2=0\), \(\beta \cdot D_3=0\), that is \(a-b_{11}-b_{12}=k\), \(a-b_{21}-b_{22}=0\), \(a-b_{31}-b_{32}=0\). As C is irreducible and f is generically injective, the image f(C) is an integral curve of class \(\beta \). In particular, the arithmetic genus \(p_a(f(C))\) of f(C) is nonnegative, and so, by the adjunction formula, we have

$$\begin{aligned} -2 \le 2p_a(f(C))-2 = \beta \cdot (\beta +K_Y) =\beta \cdot (\beta -D_1)=a^2-\sum _{j=1}^3 \sum _{m=1}^2 b_{jm}^2 -k . \end{aligned}$$
(67)

The classes \(\beta \) satisfying these constraints are classified in the first part of the proof of [48, Proposition 2.4] by an argument which does not use the assumption \(g=0\) done in [48]. \(\square \)

Lemma 4.9

Let \(g \in \mathbb {Z}_{\ge 0}\), \(k \in \mathbb {Z}_{\ge 1}\), and \(\beta \in NE(Y)\). Let \(f :C/W \rightarrow Y\) be a stable log map defining a point of \(\overline{M}_{g,kv_1}^{\beta }(Y/D)\). Then \(f(C) \cap D_2 = \emptyset \) and \(f(C) \cap D_3 = \emptyset \).

Proof

The proof relies on the study of the tropicalization of \(f :C \rightarrow Y\). We refer to [2, Section 2.5] for details on tropicalization of stable log maps.

Let

figure a

be a stable log map defining a point of \(\overline{M}_{g,kv_1}^{\beta }(Y/D)\). Here W is a log point

$$\begin{aligned} ({\text {Spec}}\,\mathbb {k}, \overline{M}_W \oplus \mathbb {k}^{\times }) \end{aligned}$$

defined by some monoid \(\overline{M}_W\). Taking the tropicalization, we obtain a diagram of cone complexes

figure b

As cone complexes, we have \(\Sigma (Y) \simeq (B,\Sigma )\). On the other hand, \(\Sigma (\pi ) :\Sigma (C) \rightarrow \Sigma (W)\) is a family of tropical curves parametrized by the cone \(\Sigma (W) = {\text {Hom}}(\overline{M}_W,\mathbb {R}_{\ge 0})\). We pick a point w in the interior of \(\Sigma (W)\) and we denote by \(\Gamma \) the fiber \(\Sigma (\pi )^{-1}(w)\). The graph underlying the tropical curve \(\Gamma \) is the dual graph of C: \(\Gamma \) has a single unbounded edge, corresponding to the marked point on C, vertices of \(\Gamma \) are in one-to-one correspondence with irreducible components of C, and bounded edges of \(\Gamma \) are in one-to-one correspondence with nodes of C. We denote by \(h :\Gamma \rightarrow B\) the restriction of \(\Sigma (f)\) to \(\Gamma = \Sigma (\pi )^{-1}(w)\). The image h(E) of every edge E of \(\Gamma \) is a line segment of rational slope in a cone of \(\Sigma \). In addition, if h(E) is not a point, the line segment h(E) is decorated by a weight \(w(E) \in \mathbb {Z}_{>0}\). For example, denoting by \(E_\infty \) the unique unbounded edge of \(\Gamma \), \(h(E_\infty )\) is a half-line of direction \(v_1\) and weight k.

For every \(j \in \{1,2,3\}\), the formal completion of \(D_j\) in Y is isomorphic to the formal completion of a toric divisor in a toric surface, and the formal completion of \((D_j \cap D_{j+1})\) in Y is isomorphic to the formal completion of a 0-dimensional toric stratum in a toric surface. Furthermore, the integral affine structure on \(B_0\) has been defined based on these toric descriptions. Therefore, it follows from the general balancing condition for stable log maps given in [52, Proposition 1.5] that the toric balancing condition holds on \(B_0\): for every vertex V of \(\Gamma \) with \(h(V) \in B_0\), denoting \(E_\ell \) the edges of \(\Gamma \) adjacent to V and not contracted to a point by \(\Gamma \), and \(u_{V,E_\ell }\) the primitive integral direction of \(h(E_\ell )\) pointing outwards h(V), we have \(\sum _\ell w(E_\ell ) u_{V,E_\ell }=0\). We do not have such simple balancing condition at \(0 \in B\): the integral affine structure is singular at 0 due to the fact that the surface Y is not toric.

If \(f(C) \cap D_2 \ne \emptyset \), then either C has a component dominating \(D_2\) and then \(\Gamma \) has a vertex V with \(h(V) \in {\text {Int}}(\rho _2)\), or C has a component non-dominating but intersecting \(D_2\) and then it follows from the general balancing condition of [52, Proposition 1.5] that \(\Gamma \) has an edge E intersecting \({\text {Int}}(\sigma _{2,3} \cup \rho _2 \cup \sigma _{1,2})\). Similarly, if \(f(C) \cap D_3 \ne \emptyset \), then either C has a component dominating \(D_3\) and then \(\Gamma \) has a vertex V with \(h(V) \in {\text {Int}}(\rho _3)\), or C has a component non-dominating but intersecting \(D_3\) and then \(\Gamma \) has an edge E intersecting \({\text {Int}}(\sigma _{3,1} \cup \rho _3 \cup \sigma _{2,3})\). Therefore, in order to prove Lemma 4.9, it is enough to show that h(V) belongs to the ray \(\rho _1\) for every V vertex of \(\Gamma \). It will automatically imply that \(h(E) \subset \rho _1\) for every edge E of \(\Gamma \).

We recall that we use the upper half-plane description of B given by Fig. 1. In particular, we will refer to this description when using notions of horizontal, vertical, left and right. We argue by contradiction by assuming that there exists a vertex V of \(\Gamma \) with \(h(V) \notin \rho _1\). In particular, we have \(h(V) \in B_0\) and so the toric balancing condition holds at h(V).

We claim that there exists a vertex \(\tilde{V}\) of \(\Gamma \) such that \(h(\tilde{V}) \in B_0\) and a edge \(\tilde{E}\) adjacent to \(\tilde{V}\) such that \(u_{\tilde{V},\tilde{E}}\) has positive vertical component. Indeed, if it were not the case, then \(h(\Gamma )\) would be entirely contained in an horizontal line in \(B_0\). As \(\Gamma \) has a unique unbounded edge, the toric balancing condition cannot hold at both the most left and most right vertices of \(h(\Gamma )\) and we obtain a contradiction.

Fig. 4
figure 4

Illustration of the proof of Lemma 4.9

The unique unbounded edge of \(\Gamma \) being horizontal, the edge \(\tilde{E}\) is bounded. Let \(\tilde{V}'\) be the other vertex of \(\tilde{E}\). As \(u_{\tilde{V},\tilde{E}}\) has positive vertical component, the vertical coordinate of \(h(\tilde{V}')\) is strictly bigger than the one of \(h(\tilde{V})\). In particular, we have \(h(\tilde{V}') \in B_0\), the toric balancing condition holds at \(h(\tilde{V}')\), and so there exists an edge \(\tilde{E}'\) adjacent to \(\tilde{V}'\) such that \(u_{\tilde{V}',\tilde{E}'}\) has positive vertical component. Therefore, we can iterate the argument by replacing \((\tilde{V},\tilde{E})\) by \((\tilde{V}',\tilde{E}')\). Successive iterations produce infinitely many vertices of \(\Gamma \), in contradiction with the finiteness of the set of vertices of \(\Gamma \) (Fig. 4). \(\square \)

Lemma 4.10

Let \(g \in \mathbb {Z}_{\ge 0}\), \(k \in \mathbb {Z}_{\ge 1}\), and \(\beta \in NE(Y)\). Let \(f :C/W \rightarrow Y\) be a stable log map defining a point of \(\overline{M}_{g,kv_1}^{\beta }(Y/D)\), and let \(p \in C\) be the corresponding marked point. Then, f(C) intersects \(D_1\) in a single point, i.e. \(f(C) \cap D_1=\{f(p)\}\), and the set \(f^{-1}(p)\) of points of C mapping to f(p) is connected.

Proof

As in the proof of Lemma 4.9, we attach to \(f :C/W \rightarrow Y\) a tropical curve \(h :\Gamma \rightarrow B\). By Lemma 4.9, we have \(h(\Gamma ) \subset \rho _1\). Let \(C_\infty \) be the irreducible component of C containing the marked point p and let \(V_\infty \) be the corresponding vertex of \(\Gamma \). The unique unbounded edge \(E_\infty \) of \(\Gamma \), corresponding to the marked point, is attached to \(V_\infty \). Let \(C_0\) be an irreducible component of C with \(f(C_0) \cap D_1 \ne \emptyset \), and let \(V_0\) be the corresponding vertex of \(\Gamma \). We have to show that \(f(C_0) \cap D_1=f(p)\). By Lemma 4.9, no component of C dominates \(D_1\). In particular, either \(f(C_0)\) is generically contained in \(Y \backslash D_1\), or \(f(C_0)\) is a point on \(D_1\).

Let us first assume that \(f(C_0)\) is generically contained in \(Y \backslash D_1\), that is \(h(V_0)=\{0\}\). Let \(x \in f^{-1}(D_1) \cap C_0\). By the balancing condition of [52, Proposition 1.5], x defines an edge E of \(\Gamma \) with \(h({\text {Int}}(E)) \subset {\text {Int}}(\rho _1)\). If \(E=E_\infty \), then \(x=p\). If \(E \ne E_\infty \), then E is bounded. In this case, let \(V_1\) be the other vertex of E. We have \(h(V_1) \in {\text {Int}}(\rho _1)\). As \(E_\infty \) is the unique unbounded edge of \(\Gamma \), it follows from the toric balancing condition that there exists a path \(\gamma \) in \(\Gamma \), connecting \(V_1\) to \(V_\infty \), and such that \(h(\gamma ) \subset {\text {Int}}(\rho _1)\). Let \(C_\gamma \subset C\) be the union of irreducible components of C corresponding to the vertices of \(\Gamma \) contained in \(\gamma \). As no component of C dominates \(D_1\), the connected curve \(C_\gamma \) is entirely contracted to a point by f. Therefore, we have \(f(x)=f(C_\gamma )=f(p)\).

If \(f(C_0)\) is a point on \(D_1\), we make a similar argument. We have \(h(V_0) \in {\text {Int}}(\rho _1)\). As \(E_\infty \) is the unique unbounded edge of \(\Gamma \), it follows from the toric balancing condition that there exists a path \(\gamma \) in \(\Gamma \), connecting \(V_0\) to \(V_\infty \), and such that \(h(\gamma ) \subset {\text {Int}}(\rho _1)\). Let \(C_\gamma \subset C\) be the union of irreducible components of C corresponding to the vertices of \(\Gamma \) contained in \(\gamma \). As no component of C dominates \(D_1\), the connected curve \(C_\gamma \) is entirely contracted to a point by f. Therefore, we have \(f(C_0)=f(C_\gamma )=f(p)\).

The two previous paragraphs also show that every point \(x \in C\) such that \(f(x) \in D_1\) is connected to \(C_\infty \) by a chain of irreducible components of C all contracted to a point in \(D_1\). In particular, the set \(f^{-1}(D_1)\) of points of C mapped to \(D_1\) is connected. \(\square \)

Lemma 4.11

Let \(g \in \mathbb {Z}_{\ge 0}\), \(k \in \mathbb {Z}_{\ge 1}\) and \(\beta \in NE(Y)\) be such that, for every stable log map \((f :C \rightarrow Y) \in \overline{M}_{g,kv_1}^{\beta }(Y/D)\), the dual intersection graph of C has positive genus. Then, we have \(N_{g,kv_1}^{\beta }=0\).

Proof

Recall that, by definition, we have

$$\begin{aligned} N_{g,kv_1}^{\beta } :=\int _{[\overline{M}_{g,kv_1}^\beta (Y/D)]^{\textrm{virt}}} (-1)^g \lambda _g . \end{aligned}$$

The class \(\lambda _g\) vanishes for families of stable curves with dual graph of positive genus. This classical fact is for example reviewed in [15, Section 3]. \(\square \)

Lemma 4.12

Let \(g \in \mathbb {Z}_{\ge 0}\), \(k \in \mathbb {Z}_{\ge 1}\) and \(\beta \in NE(Y)\). Let \((f :C \rightarrow Y)\) be a stable log map defining a point of \(\overline{M}_{g,kv_1}^{\beta }(Y/D)\) and such that the dual intersection graph of C has genus 0. Then, for every irreducible component \(C_0\) of C on which f is not constant, \(f^{-1}(D_1) \cap C_0\) consists of a single point.

Proof

By Lemma 4.9, we have \(f(C_0) \cap D_2=f(C_0) \cap D_3=\emptyset \). As f is non-constant on \(C_0\) and \(-K_Y=D_1 \cup D_2 \cup D_3\) is ample, we deduce that \(f^{-1}(D_1) \cap C_0\) is non-empty.

On the other hand, by Lemma 4.10, the set \(f^{-1}(p)\) of points of C mapping to f(p) is connected. As the dual graph of C is of genus 0, we obtain that \(C_0\) intersects \(f^{-1}(p)\) in at most one point. \(\square \)

Lemma 4.13

Let \(k \in \mathbb {Z}_{\ge 1}\) and \(\beta \in NE(Y)\) such that there exists \(g \in \mathbb {Z}_{\ge 0}\) with \(N_{g,kv_1}^{\beta } \ne 0\). Then, we have either \(\beta =k L_{1j}\) for some \(1 \le j \le 8\), or k is even and \(\beta =\frac{k}{2}(D_2+D_3)\).

Proof

As \(N_{g,kv_1}^\beta \ne 0\), there exists by Lemma 4.11 a stable log map \((f :C \rightarrow Y) \in \overline{M}_{g,kv_1}^\beta (Y/D)\) such that the dual intersection graph of C has genus 0. We denote by \(p \in C\) the marked point.

Let \(C_1,\dots , C_n\) the irreducible components of f(C) equipped with the reduced scheme structure. For every \(1 \le \ell \le n\), \(C_j\) is an integral curve in Y. Denoting \(\beta _\ell :=[C_\ell ]\), we have \(\beta =\sum _{\ell =1}^n m_\ell [C_\ell ]\), where \(m_\ell \in \mathbb {Z}_{\ge 1}\) is the multiplicity of \(C_\ell \) in the cycle [f(C)]. By Lemma 4.9, we have \(f(C_\ell ) \cap D_2=f(C_\ell ) \cap D_3= \emptyset \). By Lemma 4.12, we have \(C_\ell \cap D_1 = f(p)\) and \(C_\ell \) is unibranch at the point f(p). Therefore the normalization \(\tilde{C}_\ell \) of \(C_\ell \) defines a stable log map \((f_\ell :\tilde{C}_\ell \rightarrow Y) \in \overline{M}_{g_\ell ,k_\ell v_1}(Y/D)\), where \(g_\ell \) is genus of \(C_\ell \) and \(k_\ell :=\beta _\ell \cdot D_1\). As \(\tilde{C}_\ell \) is irreducible and \(f_\ell \) is generically injective, we can apply Lemma 4.8 and so \(C_\ell \) is either of the 8 lines \(L_{1m}\) or one of the two conics \(\mathcal {C}_{1k}\). It is shown in the proof of [48, Proposition 2.4] that for general Y, the 10 curves of \(L_{1m}\) for \(1 \le m \le 8\) and \(\mathcal {C}_{1k}\) for \(1 \le k \le 2\) intersect \(D_1\) in different points. By deformation invariance of log Gromov–Witten invariants, we can assume that Y is general. Therefore, we have in fact \(n=1\) and \(f :C \rightarrow Y\) is a multiple cover of one of the 10 curves \(L_{1m}\) for \(1 \le m \le 8\) and \(\mathcal {C}_{1k}\) for \(1 \le k \le 2\). \(\square \)

We can now end the proof of Proposition 4.5. From Eq. (53) and Lemma 4.13, we have

$$\begin{aligned} f_{\mathfrak {d}_1}&= \prod _{j=1}^8 \exp \left( \sum _{k \ge 1}\sum _{g \ge 0} 2 \sin \left( \frac{k \hbar }{2} \right) N_{g,kv_1}^{kL_{1j}} \hbar ^{2g-1} t^{kL_{1j}} z^{-kv_1} \right) \\&\quad \times \exp \left( \sum _{k \ge 1}\sum _{g \ge 0} 2 \sin \left( k \hbar \right) N_{g,2kv_1}^{k(D_2+D_3)} \hbar ^{2g-1} t^{k(D_2+D_3)} z^{-2kv_1} \right) . \end{aligned}$$

By Lemma 4.6, we have

$$\begin{aligned}&\exp \left( \sum _{k \ge 1}\sum _{g \ge 0} 2 \sin \left( \frac{k \hbar }{2} \right) N_{g,kv_1}^{kL_{1j}} \hbar ^{2g-1} t^{kL_{1j}} z^{-kv_1} \right) \\&\quad = \exp \left( \sum _{k \ge 1}\frac{(-1)^{k-1}}{k}t^{kL_{1j}} z^{-kv_1} \right) = 1+t^{L_{1j}}z^{-v_1} , \end{aligned}$$

thus producing the numerator of Eq. (59). On the other hand, by Lemma 4.7 and setting \(q=e^{i\hbar }\), we have

$$\begin{aligned}&\exp \left( \sum _{k \ge 1}\sum _{g \ge 0} 2 \sin \left( k \hbar \right) N_{g,2kv_1}^{k(D_2+D_3)} \hbar ^{2g-1} t^{k(D_2+D_3)} z^{-2kv_1} \right) \\&\quad = \exp \left( \sum _{k \ge 1} \frac{(q^k-q^{k})(q^{\frac{k}{2}} +q^{-\frac{k}{2}})}{k(q^{\frac{k}{2}}-q^{-\frac{k}{2}})} t^{k(D_2+D_3)}z^{-2kv_1} \right) \\&\quad = \exp \left( \sum _{k \ge 1} \frac{q^k+2+q^{-k}}{k} t^{k(D_2+D_3)}z^{-2kv_1} \right) \\&\quad =\frac{1}{(1-q^{-1}t^{D_2+D_3}z^{-2v_1}) (1-t^{D_2+D_3}z^{-2v_1})^2(1-qt^{D_2+D_3}z^{-2v_1})}, \end{aligned}$$

thus producing the denominator of Eq. (59). This concludes the proof of Proposition 4.5.

4.4 Contribution of general rays: \({\textit{PSL}}_2(\mathbb {Z})\) symmetry

Following Gross, Hacking, Keel and Siebert [48] treating the classical case, we describe the general quantum rays \(\mathfrak {d}_{m,n}\) of the canonical quantum scattering diagram \(\mathfrak {D}_{\textrm{can}}\) in terms of the quantum rays \(\mathfrak {d}_j\) computed in Proposition 4.5 and of a \({\textit{PSL}}_2(\mathbb {Z})\) symmetry.

Lemma 4.14

Let \(g \in \mathbb {Z}_{\ge 0}\), \(v \in B_0(\mathbb {Z})\) and \(\beta \in NE(Y)\). Let \(f :C/W \rightarrow Y\) be a stable log map defining a point in \(\overline{M}_{g,v}^{\beta }(Y/D)\), and let \(p \in C\) be the corresponding marked point. Then, f(C) intersects D in a single point, i.e. \(f(C) \cap D = \{f(p)\}\).

Proof

We proved this result in Lemmas 4.9 and 4.10 by a tropical argument when v is a multiple of \(v_1\). Exactly the same tropical argument can be applied in general: up to rotating the chart that we are using to describe B, we can assume that \(\mathbb {R}_{\ge 0}v\) is the horizontal direction. \(\square \)

First, the linear action of \({\textit{SL}}_2(\mathbb {Z})\) on \(\mathbb {Z}^2\) induces an action of \({\textit{PSL}}_2(\mathbb {Z})\) on \(B(\mathbb {Z})=\mathbb {Z}^2/\langle -{\text {id}}\,\rangle \). Then, we define an action of \({\textit{PSL}}_2(\mathbb {Z})\) on the set

$$\begin{aligned} \Gamma :=\{ \beta \in NE(Y) \,|\, N_{g,v}^{\beta } \ne 0 \,\,\text {for some} \,\, g\in \mathbb {Z}_{\ge 0} \,\, \text {and} \,\, v\in B_0(\mathbb {Z}) \} \end{aligned}$$
(68)

Note that \(A_1(Y) \simeq \mathbb {Z}^7\) has for basis H, \(E_{11}\), \(E_{12}\), \(E_{21}\), \(E_{22}\), \(E_{31}\), \(E_{32}\), and that \({\textit{PSL}}_2(\mathbb {Z})\) is generated by

$$\begin{aligned} S= \begin{pmatrix} 0 &{} -1 \\ 1 &{} 1 \end{pmatrix} \quad \text {and} \quad T= \begin{pmatrix} 1 &{} 1 \\ 0 &{} 1 \end{pmatrix}. \end{aligned}$$
(69)

We define an action \(S^{*}\) of S on \(A_1(Y)\) is defined by

$$\begin{aligned} S^{*}(H)=H \quad \text {and} \quad S^{*}(E_{jk})=E_{j+1,k}, \end{aligned}$$
(70)

Lemma 4.15

The transformation \(S^{*}\) of \(A_1(Y)\) preserves \(\Gamma \). Moreover, for every \(g \in \mathbb {Z}_{\ge 0}\), \(v \in B(\mathbb {Z})\) and \(\beta \in \Gamma \), we have

$$\begin{aligned} N_{g,v}^{S^{*} \beta }=N_{g,v}^\beta . \end{aligned}$$
(71)

Proof

The transformation \(S^{*}\) is induced by the obvious \(\mathbb {Z}/3\mathbb {Z}\)-cyclic symmetry of (YD) permuting the components \(D_1\), \(D_2\), \(D_3\) of D, and so the result is clear. \(\square \)

Let \(T^{*}\) be the transformation of \(A_1(Y)\) defined by

$$\begin{aligned} T^{*}(H)=2H-E_{31}-E_{32},\,\, T^{*}(E_{1j})=E_{1j},\,\, T^{*}(E_{2j})=H-E_{3j},\,\, T^{*}(E_{3j})=E_{2j}. \end{aligned}$$
(72)

Note that \(T^{*}\) does not define an action of T on \(A_1(Y)\) because \(T^{*}\) is not bijective. Nevertheless, we have the following result.

Lemma 4.16

The transformation \(T^{*}\) of \(A_1(Y)\) preserves \(\Gamma \) and the restriction of \(T^{*}\) to \(\Gamma \) is bijective. Moreover, for every \(g \in \mathbb {Z}_{\ge 0}\), \(v \in B(\mathbb {Z})\) and \(\beta \in \Gamma \), we have

$$\begin{aligned} N_{g,v}^{T^{*} \beta }=N_{g,v}^\beta . \end{aligned}$$
(73)

Proof

It is shown in [48] that the transformation \(T^{*}\) of \(A_1(Y)\) is induced by a log birational modification of the pair (YD): given (YD), one can blow-up the point \(D_1 \cap D_2\) and contract \(D_3\) to obtain a new pair \((Y',D')\). By Lemma 4.14, a class \(\beta \in \Gamma \) is represented by a curve in Y whose all components are generically contained in the complement of D in Y. The result then follows from the invariance of log Gromov–Witten invariants under log birational modification proved by Abramovich and Wise [4]. \(\square \)

By Lemmas 4.15 and 4.16, we have an action of S and T on the set \(\Gamma \), which generates an action of \({\textit{PSL}}_2(\mathbb {Z})\) on \(\Gamma \). Given a power series f with coefficients polynomial in \(t^{\beta }\) for \(\beta \in \Gamma \), and \(M \in {\textit{PSL}}_2(\mathbb {Z})\), we define \(M^{*}(f)\) by \(M^{*}(t^{\beta }):=t^{M^{*}(\beta )}\) for \(\beta \in \Gamma \), and extending by linearity. For a quantum ray \(\mathfrak {d}=(p_{\mathfrak {d}}, f_{\mathfrak {d}})\) and \(M \in {\textit{SL}}_2(\mathbb {Z})\), we define

$$\begin{aligned} M(\mathfrak {d}) :=(M(p_{\mathfrak {d}}), M^{*}(f_{\mathfrak {d}}) ), \end{aligned}$$

where \(M(p_{\mathfrak {d}})\) is the image of \(p_{\mathfrak {d}}\) by the action of M on \(B(\mathbb {Z})\).

Proposition 4.17

For every \((m,n) \in B(\mathbb {Z})\) with m and n coprime, and \(M \in {\textit{SL}}_2(\mathbb {Z})\), we have the following relation between the quantum rays \(\mathfrak {d}_{m,n}\) and \(\mathfrak {d}_{M((m,n))}\) of the canonical quantum scattering diagram \(\mathfrak {D}_{\textrm{can}}\):

$$\begin{aligned} \mathfrak {d}_{M((m,n))}= M(\mathfrak {d}_{m,n}) . \end{aligned}$$

Proof

It is shown in [48] that the action of \({\textit{PSL}}_2(\mathbb {Z})\) on \(B(\mathbb {Z})\) is compatible with the action of \({\textit{PSL}}_2(\mathbb {Z})\) on curve classes. Thus, the result follows from Lemmas 4.15 and 4.16. \(\square \)

As \({\textit{PSL}}_2(\mathbb {Z})\) acts transitively on the set of \((m,n) \in B(\mathbb {Z})\) with m and n coprime, one can use Proposition 4.17 to compute all the rays \(\mathfrak {d}_{m,n}\) in terms of the ray \(\mathfrak {d}_1=\mathfrak {d}_{1,0}\) given by Proposition 4.5.

Corollary 4.18

For every \((m,n) \in B(\mathbb {Z})\) with m and n coprime, we have

$$\begin{aligned} f_{\mathfrak {d}_{m,n}} \in \mathbb {Z}[q^{\pm }][NE(Y)][\![z^{-(m,n)}]\!], \end{aligned}$$

where \(q=e^{i \hbar }\).

Proof

It is a corollary of Proposition 4.17 and of the fact that \(f_{\mathfrak {d}_1} \in \mathbb {Z}[q^{\pm }][NE(Y)][\![z^{-(m,n)}]\!]\) by Eq. (59). \(\square \)

By Corollary 4.18, we can view \(\mathfrak {D}_{\textrm{can}}\) as a quantum scattering diagram over the ring \(\mathbb {Z}[q^{\pm }][NE(Y)]\) rather than over the ring \(\mathbb {Q}[\![\hbar ]\!][NE(Y)]\).

Corollary 4.19

The ray \(\mathfrak {d}_{1,1}\) of the canonical quantum scattering diagram \(\mathfrak {D}_{\textrm{can}}\) is given by \(p_{\mathfrak {d}_{1,1}}=(1,1)=v_1+v_2\) and

$$\begin{aligned} f_{\mathfrak {d}_{1,1}} =\frac{\prod _{m=1}^8(1+t^{D_3+L_{3m}}z^{-v_1-v_2})}{(1-q^{-1} t^{D_1+D_2+2D_3}z^{-2v_1-2v_2}) (1- t^{D_1+D_2+2D_3}z^{-2v_1-2v_2})^2 (1-q t^{D_1+D_2+2D_3}z^{-2v_1-2v_2})} , \end{aligned}$$
(74)

where \(q=e^{i\hbar }\).

Proof

We have \((1,1)=T(0,1)\), so \(\mathfrak {d}_{1,1}=T(\mathfrak {d}_{0,1})=T(\mathfrak {d}_2)\). Therefore, it is enough to check that \(T^{*}(L_{2m})=D_3+L_{3m}\) for \(1 \le m \le 8\), which is clear from the birational description of \(T^{*}\), and \(T^{*}(D_1+D_3)=D_1+D_2+2D_3\), which can be checked using Eq. (72):

$$\begin{aligned} T^{*}(D_1+D_3)= & {} T^{*}(2H-E_{11}-E_{12} -E_{31}-E_{32}) \\= & {} 4H-2E_{31}-2E_{32} -E_{11}-E_{12}-E_{21}-E_{22} =D_1+D_2+2D_3 . \end{aligned}$$

\(\square \)

5 Derivation of the Equations of the Quantum Mirror

In Sect. 4, we defined the canonical quantum scattering diagram \(\mathfrak {D}_{\textrm{can}}\), that we can view as a quantum scattering diagram over \(\mathbb {Z}[q^{\pm }][NE(Y)]\) by Corollary 4.18. By Theorem 4.4, \(\mathfrak {D}_{\textrm{can}}\) is consistent, and so by Sect. 2.2 we have a \(\mathbb {Z}[q^{\pm }][NE(Y)]\)-algebra \(\mathcal {A}_{\mathfrak {D}_{\textrm{can}}}\), coming with a \(\mathbb {Z}[q^{\pm }][NE(Y)]\)-linear basis of quantum theta functions \(\{ \vartheta _p \}_{p\in B(\mathbb {Z})}\), whose structure constants \(C_{p_1,p_2}^{\mathfrak {D}_{\textrm{can}},p}\) can be computed in terms of quantum broken lines by Eq. (23). In this section, we give an explicit presentation of \(\mathcal {A}_{\mathfrak {D}_{\textrm{can}}}\) by generators and relations. The non-commutative algebra \(\mathcal {A}_{\mathfrak {D}_{\textrm{can}}}\) is a deformation quantization of the mirror family of (YD) considered in [48] and our presentation of \(\mathcal {A}_{\mathfrak {D}_{\textrm{can}}}\) will be a non-commutative deformation of the presentation of the mirror family given in [48].

5.1 Statement of the presentation of \(\mathcal {A}_{\mathfrak {D}_\textrm{can}}\) by generators and relations

Theorem 5.1

The \(\mathbb {Z}[q^{\pm }][NE(Y)]\)-algebra \(\mathcal {A}_{\mathfrak {D}_\textrm{can}}\) admits the following presentation by generators and relation: \(\mathcal {A}_{\mathfrak {D}_\textrm{can}}\) is generated by \(\vartheta _{v_1}\), \(\vartheta _{v_2}\), \(\vartheta _{v_3}\), with the relations

$$\begin{aligned} q^{-\frac{1}{2}} \vartheta _{v_1} \vartheta _{v_2} -q^{\frac{1}{2}} \vartheta _{v_2}\vartheta _{v_1}&=(q^{-1}-q) t^{D_3}\vartheta _{v_3} -(q^{\frac{1}{2}}-q^{-\frac{1}{2}}) \left( \sum _{j=1}^8 t^{D_3+L_{3j}} \right) , \end{aligned}$$
(75)
$$\begin{aligned} q^{-\frac{1}{2}} \vartheta _{v_2} \vartheta _{v_3} -q^{\frac{1}{2}} \vartheta _{v_3} \vartheta _{v_2}&=(q^{-1}-q) t^{D_1}\vartheta _{v_1} -(q^{\frac{1}{2}}-q^{-\frac{1}{2}}) \left( \sum _{j=1}^8 t^{D_1+L_{1j}} \right) , \end{aligned}$$
(76)
$$\begin{aligned} q^{-\frac{1}{2}} \vartheta _{v_3} \vartheta _{v_1} -q^{\frac{1}{2}} \vartheta _{v_1} \vartheta _{v_3}&=(q^{-1}-q) t^{D_2} \vartheta _{v_2} -(q^{\frac{1}{2}}-q^{-\frac{1}{2}}) \left( \sum _{j=1}^8 t^{D_2+L_{2j}} \right) , \end{aligned}$$
(77)
$$\begin{aligned} q^{-\frac{1}{2}} \vartheta _{v_1} \vartheta _{v_2} \vartheta _{v_3}&=q^{-1} t^{D_1} \vartheta _{v_1}^2 +q t^{D_2} \vartheta _{v_2}^2 +q^{-1} t^{D_3} \vartheta _{v_3}^2 + q^{-\frac{1}{2}} \left( \sum _{j=1}^8 t^{D_1+L_{1j}} \right) \vartheta _{v_1} \nonumber \\&\quad + q^{\frac{1}{2}} \left( \sum _{j=1}^8 t^{D_2+L_{2j}} \right) \vartheta _{v_2} + q^{-\frac{1}{2}} \left( \sum _{j=1}^8 t^{D_3+L_{3j}} \right) \vartheta _{v_3} \nonumber \\&\quad + \sum _{1 \le j <j' \le 8} t^{D_1+L_{1j}+L_{1j'}} -(q^{\frac{1}{2}}-q^{-\frac{1}{2}})^2 t^{D_1+D_2+D_3}. \end{aligned}$$
(78)

In the classical limit \(q^{\frac{1}{2}} \rightarrow 1\), Theorem 5.1 reduces to the main result of [48] (Theorem 0.1) describing the result of the mirror construction of [46] applied to (YD) as the family of cubic surfaces given in terms of the classical theta functions \(\{ \vartheta _p^{{\text {cl}}}\}_{p \in B(\mathbb {Z})}\) by the equation

$$\begin{aligned} \vartheta _{v_1}^{{\text {cl}}} \vartheta _{v_2}^{{\text {cl}}} \vartheta _{v_3}^{{\text {cl}}}&= t^{D_1} (\vartheta _{v_1}^{{\text {cl}}})^2 +t^{D_2} (\vartheta _{v_2}^{{\text {cl}}})^2 + t^{D_3} (\vartheta _{v_3}^{{\text {cl}}})^2 + \left( \sum _{j=1}^8 t^{D_1+L_{1j}} \right) \vartheta _{v_1}^{{\text {cl}}} \nonumber \\&\quad + \left( \sum _{j=1}^8 t^{D_2+L_{2j}} \right) \vartheta _{v_2}^{{\text {cl}}}+ \left( \sum _{j=1}^8 t^{D_3+L_{3j}} \right) \vartheta _{v_3}^{{\text {cl}}} + \sum _{1 \le j <j' \le 8} t^{D_1+L_{1j}+L_{1j'}}. \end{aligned}$$
(79)

The proof of Theorem 5.1 takes the remainder of Sect. 5. In Sects. 5.2 and 5.3, we check that the relations in Theorem 5.1 are indeed satisfied in \(\mathcal {A}_{\mathfrak {D}_\textrm{can}}\). We use the description of the product of quantum theta functions in terms of broken lines given by Eqs. (23) and (25). Recalling that \(q=A^4\), we have

$$\begin{aligned}&\vartheta _{p_1}\vartheta _{p_2}=\sum _{p\in B(\mathbb {Z})} C_{p_1,p_2}^{\mathfrak {D}_{\textrm{can}},p} \vartheta _p , \end{aligned}$$
(80)
$$\begin{aligned}&C_{p_1,p_2}^{\mathfrak {D}_\textrm{can}, p} :=\sum _{(\gamma _1,\gamma _2)} c(\gamma _1)c(\gamma _2) q^{\frac{1}{2}\langle s(\gamma _1), s(\gamma _2) \rangle }, \end{aligned}$$
(81)

where the sum is over pairs \((\gamma _1,\gamma _2)\) of quantum broken lines for \(\mathfrak {D}_{\textrm{can}}\) with charges \(p_1\), \(p_2\) and common endpoint Q close to p, such that writing \(c(\gamma _1)z^{s(\gamma _1)}\) and \(c(\gamma _2)z^{s(\gamma _2)}\) the final monomials, we have \(s(\gamma _1)+s(\gamma _2)=p\).

Gross, Hacking, Keel and Siebert [48] have done these computations in the classical limit, enumerating the possible configurations of broken lines and using the function F reviewed in Sect. 2.2 to bound the possibilities. The arguments of [48] leading to the enumeration of possible configurations of broken lines still hold in the quantum case. Therefore, we will simply explain how to modify in the quantum case the computations of [48]. Finally, we end the proof of Theorem 5.1 in Sect. 5.4.

5.2 Products and commutators of quantum theta functions

Lemma 5.2

For every \(j,k,\ell \) such that \(\{j,k,\ell \} =\{1,2,3\}\), we have

$$\begin{aligned} \vartheta _{v_j}^2 =\vartheta _{2v_j} +2t^{D_k+D_\ell } . \end{aligned}$$
(82)

Proof

By the cyclic \(\mathbb {Z}/3\mathbb {Z}\)-symmetry permuting \(\{1,2,3\}\), it is enough to treat the case \(j=1\). According to the proof of [48, Lemma 3.6], the only configurations of broken lines contributing to the product \(\vartheta _{v_1}^2\) are given by Figs. 56, and 7 (see [48, Figure 3.2]).

Fig. 5
figure 5

Coefficient of \(\vartheta _{2v_1}\) in \(\vartheta _{v_1}^2\)

Fig. 6
figure 6

Contribution to the coefficient of \(\vartheta _0=1\) in \(\vartheta _{v_1}^2\)

Fig. 7
figure 7

Contribution to the coefficient of \(\vartheta _0=1\) in \(\vartheta _{v_1}^2\)

Figure 5 gives a term \(\vartheta _{2v_1}\) in \(\vartheta _{v_1}^2\): we have

$$\begin{aligned} c(\gamma _1)&=1,\,\, c(\gamma _2)=1,\,\, s(\gamma _1)=(1,0),\,\, s(\gamma _2)=(1,0),\\ \langle s(\gamma _1),s(\gamma _2) \rangle&=\langle (1,0), (1,0) \rangle =0, \end{aligned}$$

and so \(q^{\frac{1}{2} \langle s(\gamma _1),s(\gamma _2) \rangle }=1\).

Figure 6 gives a term \(t^{D_2+D_3}\) in \(\vartheta _{v_1}^2\): we have \(c(\gamma _1)=1\), \(c(\gamma _2)=t^{D_2+D_3}\) because \(\gamma _2\) crosses \(\mathbb {R}_{\ge 0} v_3\) and \(\mathbb {R}_{\ge 0} v_2\) without bending,

$$\begin{aligned} s(\gamma _1)=(1,0),\,\, s(\gamma _2)=(-1,0),\,\, \langle s(\gamma _1),s(\gamma _2) \rangle = \langle (1,0), (-1,0) \rangle =0, \end{aligned}$$

and so \(q^{\frac{1}{2}\langle s(\gamma _1),s(\gamma _2) \rangle }=1\). Similarly, Fig. 7 gives a term \(t^{D_2+D_3}\) in \(\vartheta _{v_1}^2\). \(\square \)

Fig. 8
figure 8

Coefficient of \(\vartheta _{(n+1)v_1}\) in \(\vartheta _{v_1}\vartheta _{nv_1}\)

The following Lemma 5.3 is not part of the proof of Theorem 5.1. It will be used in the proof of Theorem 6.14 showing that the bracelets basis and the quantum theta functions basis agree.

Lemma 5.3

For every \(j,k,\ell \) such that \(\{j,k,\ell \} =\{1,2,3\}\), and for every integer \(n \ge 1\), we have

$$\begin{aligned} \vartheta _{v_j} \vartheta _{nv_j} =\vartheta _{(n+1)v_j}+t^{D_k+D_\ell } \vartheta _{(n-1)v_j} . \end{aligned}$$
(83)

Proof

By the cyclic \(\mathbb {Z}/3\mathbb {Z}\)-symmetry permuting \(\{1,2,3\}\), it is enough to treat the case \(j=1\). We claim that the only configurations of broken lines contributing to the product \( \vartheta _{v_j} \vartheta _{nv_j}\) are given by Figs. 8 and 9. As this case is not treated in [48], we give an argument. The contributing broken lines \(\gamma _1\) and \(\gamma _2\) are horizontal for \(t \ll 0\). Assume that one of them bends somewhere and look at the first bending. The bending occurs along a quantum ray contained in the strict upper half-plane, so the direction of the broken after bending has a positive vertical component. Iterating this argument, we see that the broken line always remains in the strict upper half-plane and its final direction has a positive vertical direction. Therefore, if either \(\gamma _1\) or \(\gamma _2\) bends somewhere, then \(s(\gamma _1)+s(\gamma _2)\) has a negative vertical component, and so \(s(\gamma _1)+s(\gamma _2)\) cannot be equal to an element \(p \in B(\mathbb {Z})\) and so cannot contribute a term in the product \( \vartheta _{v_j} \vartheta _{nv_j}\). Therefore, \(\gamma _1\) and \(\gamma _2\) never bend and so Figs. 8 and 9 are the only possibilities.

Fig. 9
figure 9

Coefficient of \(\vartheta _{(n-1)v_1}\) in \(\vartheta _{v_1} \vartheta _{nv_1}\)

Figure 8 gives a term \(\vartheta _{v_1}\vartheta _{nv_1}\) in \(\vartheta _{v_1}\vartheta _{nv_1}\): we have

$$\begin{aligned} c(\gamma _1)&=1,\,\,c(\gamma _2)=1,\,\, s(\gamma _1)=(1,0)\,\,\,s(\gamma _2)=(n,0),\\ \langle s(\gamma _1),s(\gamma _2) \rangle&= \langle (1,0), (n,0) \rangle =0 \end{aligned}$$

and so \(q^{\frac{1}{2}\langle s(\gamma _1),s(\gamma _2) \rangle }=1\).

Figure 9 gives a term \(t^{D_2+D_3}\vartheta _{(n-1)v_1}\) in \(\vartheta _{v_1}\vartheta _{nv_1}\): we have \(c(\gamma _1)=1\), \(c(\gamma _2)=t^{D_2+D_3}\) because \(\gamma _2\) crosses \(\rho _3\) and \(\rho _2\) without bending,

$$\begin{aligned} s(\gamma _1)=(1,0),\,\,s(\gamma _2)=(-n,0),\,\, \langle s(\gamma _1),s(\gamma _2) \rangle = \langle (1,0), (-n,0) \rangle =0 \end{aligned}$$

and so \(q^{\frac{1}{2}\langle s(\gamma _1),s(\gamma _2) \rangle }=1\). \(\square \)

Fig. 10
figure 10

Coefficient of \(\vartheta _{v_1+v_2}\) in \(\vartheta _{v_1}\vartheta _{v_2}\)

Lemma 5.4

We have

$$\begin{aligned} \vartheta _{v_1} \vartheta _{v_2} =q^{\frac{1}{2}} \vartheta _{v_1+v_2} +q^{-\frac{1}{2}} t^{D_3} \vartheta _{v_3} + \sum _{j=1}^8 t^{D_3+L_{3j}} , \end{aligned}$$
(84)

and

$$\begin{aligned} \vartheta _{v_2}\vartheta _{v_1} =q^{-\frac{1}{2}}\vartheta _{v_1+v_2} +q^{\frac{1}{2}} t^{D_3} \vartheta _{v_3} + \sum _{j=1}^8 t^{D_3+L_{3j}} . \end{aligned}$$
(85)

Proof

According to the proof of [48, Lemma 3.6], the only configurations of broken lines contributing to the product \(\vartheta _{v_1}\vartheta _{v_2}\) are given by Figs. 1011, and 12 (see [48, Figures 3.3-3.4]).

Figure 10 gives a term \(q^{\frac{1}{2}} \vartheta _{v_1+v_2}\) in \(\vartheta _{v_1} \vartheta _{v_2}\): we have

$$\begin{aligned} c(\gamma _1)&=1,\,\,c(\gamma _2)=1 ,\,\, s(\gamma _1)=(1,0),\,\,s(\gamma _2)=(0,1),\\ \langle s(\gamma _1),s(\gamma _2) \rangle&= \langle (1,0),(0,1) \rangle =1, \end{aligned}$$

and so \(q^{\frac{1}{2} \langle s(\gamma _1),s(\gamma _2) \rangle }=q^{\frac{1}{2}}\).

Fig. 11
figure 11

Coefficient of \(\vartheta _{v_3}\) in \(\vartheta _{v_1}\vartheta _{v_2}\)

Fig. 12
figure 12

Coefficient of \(\vartheta _{0}=1\) in \(\vartheta _{v_1}\vartheta _{v_2}\)

Figure 11 gives a term \(q^{-\frac{1}{2}} t^{D_3} \vartheta _3\) in \(\vartheta _{v_1}\vartheta _{v_2}\): we have \(c(\gamma _1)=t^{D_3}\) because \(\gamma _1\) crosses \(\mathbb {R}_{\ge 0} v_3\) without bending, \(c(\gamma _2)=1\),

$$\begin{aligned} s(\gamma _1)=(-1,0),\,\, s(\gamma _2)=(0,1),\ \langle s(\gamma _1),s(\gamma _2) \rangle = \langle (-1,0),(0,1) \rangle =-1, \end{aligned}$$

and so \(q^{\frac{1}{2} \langle s(\gamma _1),s(\gamma _2) \rangle }=q^{-\frac{1}{2}}\).

Figure 12 gives a term \(\sum _{j=1}^8 t^{D_3+L_{3j}}\) in \(\vartheta _{v_1}\vartheta _{v_2}\): we have \(c(\gamma _1)=1\), \(c(\gamma _2)=\sum _{j=1}^8 t^{D_3+L_{3j}}\) because \(\gamma _2\) crosses \(\mathbb {R}_{\ge 0}(v_1+v_2)\) with bending and contribution of the term proportional to \(z^{-v_1-v_2}\) in Eq. (74),

$$\begin{aligned} s(\gamma _1)=(1,0),\,\, s(\gamma _2)=(-1,0),\ \langle s(\gamma _1),s(\gamma _2) \rangle = \langle (1,0),(-1,0) \rangle =0, \end{aligned}$$

and so \(q^{\frac{1}{2} \langle s(\gamma _1),s(\gamma _2) \rangle }=1\). We similarly compute \(\vartheta _{v_2} \vartheta _{v_1}\): as \(\langle -,- \rangle \) is skew-symmetric, only the powers of q change of sign. \(\square \)

Lemma 5.5

We have

$$\begin{aligned} q^{-\frac{1}{2}}\vartheta _{v_1} \vartheta _{v_2} -q^{\frac{1}{2}}\vartheta _{v_2} \vartheta _{v_1}&=(q^{-1}-q) t^{D_3} \vartheta _{v_3} -(q^{\frac{1}{2}} -q^{-\frac{1}{2}}) \left( \sum _{j=1}^8 t^{D_3+L_{3j}} \right) , \end{aligned}$$
(86)
$$\begin{aligned} q^{-\frac{1}{2}} \vartheta _{v_2} \vartheta _{v_3} -q^{\frac{1}{2}}\vartheta _{v_3} \vartheta _{v_2}&=(q^{-1}-q) t^{D_1}\vartheta _{v_1} -(q^{\frac{1}{2}} -q^{-\frac{1}{2}}) \left( \sum _{j=1}^8 t^{D_1+L_{1j}} \right) , \end{aligned}$$
(87)
$$\begin{aligned} q^{-\frac{1}{2}} \vartheta _{v_3} \vartheta _{v_1} -q^{\frac{1}{2}} \vartheta _{v_1} \vartheta _{v_3}&=(q^{-1}-q) t^{D_2}\vartheta _{v_2} -(q^{\frac{1}{2}} -q^{-\frac{1}{2}}) \left( \sum _{j=1}^8 t^{D_2+L_{2j}} \right) . \end{aligned}$$
(88)

Proof

By the cyclic \(\mathbb {Z}/3\)-symmetry permuting \(\{1,2,3\}\), it is enough to compute

$$\begin{aligned} q^{-\frac{1}{2}} \vartheta _{v_1} \vartheta _{v_2} -q^{\frac{1}{2}} \vartheta _{v_2} \vartheta _{v_1}. \end{aligned}$$

The result follows immediately from Lemma 5.4. \(\square \)

Fig. 13
figure 13

Coefficient of \(\vartheta _{2v_1}\) in \(\vartheta _{v_1+v_2} \vartheta _{v_3}\)

Fig. 14
figure 14

Coefficient of \(\vartheta _{2v_2}\) in \(\vartheta _{v_1+v_2} \vartheta _{v_3}\)

Fig. 15
figure 15

Coefficient of \(\vartheta _{v_1}\) in \(\vartheta _{v_1+v_2} \vartheta _{v_3}\)

Lemma 5.6

We have

$$\begin{aligned} \vartheta _{v_1+v_2} \vartheta _{v_3}&= q^{-1} t^{D_1} \vartheta _{2v_1} +q t^{D_2} \vartheta _{2v_2} +q^{-\frac{1}{2}} \left( \sum _{j=1}^8 t^{D_1+L_{1j}} \right) \vartheta _{v_1} + q^{\frac{1}{2}} \left( \sum _{j=1}^8 t^{D_2+L_{2j}} \right) \vartheta _{v_2} \nonumber \\&\quad + \sum _{1 \le j <j' \le 8} t^{D_1+L_{1j}+L_{1j'}} +(q^{\frac{1}{2}} +q^{-\frac{1}{2}})^2 t^{D_1+D_2+D_3} . \end{aligned}$$
(89)

Proof

According to the proof of [48, Lemma 3.6], the only configurations of broken lines contributing to the product \(\vartheta _{v_1+v_2}\vartheta _{v_3}\) are given by Figs. 13141516, and 17 (see [48, Figures 3.5–3.6]).

Figure 13 gives a term \(q^{-1}t^{D_1} \vartheta _{2v_1}\) in \(\vartheta _{v_1+v_2}\vartheta _{v_3}\): we have \(c(\gamma _1)=1\), \(c(\gamma _2)=t^{D_1}\) because \(\gamma _2\) crosses \(\mathbb {R}_{\ge 0} v_1\) without bending,

$$\begin{aligned} s(\gamma _1)=(1,1), s(\gamma _2)=(-1,1),\,\, \langle s(\gamma _1),s(\gamma _2) \rangle =\langle (1,1),(1,-1) \rangle =-2, \end{aligned}$$

and so \(q^{\frac{1}{2} \langle s(\gamma _1),s(\gamma _2) \rangle } =q^{-1}\).

Fig. 16
figure 16

Coefficient of \(\vartheta _{v_2}\) in \(\vartheta _{v_1+v_2} \vartheta _{v_3}\)

Fig. 17
figure 17

Coefficient of \(\vartheta _0=1\) in \(\vartheta _{v_1+v_2} \vartheta _{v_3}\)

Figure 14 gives a term \(q t^{D_2} \vartheta _{2v_2}\) in \(\vartheta _{v_1+v_2}\vartheta _{v_3}\): we have \(c(\gamma _1)=1\), \( c(\gamma _2)=t^{D_2}\) as \(\gamma _2\) crosses \(\mathbb {R}_{\ge 0}v_2\) without bending,

$$\begin{aligned} s(\gamma _1)=(1,1),\,\, s(\gamma _2)=(-1,1),\,\, \langle s(\gamma _1),s(\gamma _2) \rangle =\langle (1,1),(-1,1) \rangle = 2, \end{aligned}$$

and so \(q^{\frac{1}{2} \langle s(\gamma _1),s(\gamma _2) \rangle }=q\).

Figure 15 gives a term \(q^{-\frac{1}{2}} \left( \sum _{j=1}^8 t^{D_1+L_{1j} }\right) \vartheta _{v_1}\) in \(\vartheta _{v_1+v_2}\vartheta _{v_3}\): we have \(c(\gamma _1)=1\), \( c(\gamma _2)=\sum _{j=1}^8 t^{D_1+L_{1j}}\) because \(\gamma _2\) crosses \(\mathbb {R}_{\ge 0} v_1\) with bending and contribution of the term proportional to \(z^{-v_1}\) in Eq. (59),

$$\begin{aligned} s(\gamma _1)=(1,1),\,\, s(\gamma _2)=(0,1),\,\, \langle s(\gamma _1),s(\gamma _2) \rangle = \langle (1,1),(0,-1) \rangle =-1, \end{aligned}$$

and so \(q^{\frac{1}{2} \langle s(\gamma _1), s(\gamma _2) \rangle } =q^{-\frac{1}{2}}\).

Figure 16 gives a term \(q^{\frac{1}{2}} \left( \sum _{j=1}^8 t^{D_2+L_{2j}} \right) \vartheta _{v_2}\) in \(\vartheta _{v_1+v_2}\vartheta _{v_3}\): we have \(c(\gamma _1)=1\), \(c(\gamma _2)=\sum _{j=1}^8 t^{D_2+L_{2j}}\) because \(\gamma _2\) crosses \(\mathbb {R}_{\ge 0}v_2\) with bending and contribution of the term proportional to \(z^{-v_2}\) in Eq. (59),

$$\begin{aligned} s(\gamma _1)=(1,1),\,\, s(\gamma _2)=(-1,0),\,\, \langle s(\gamma _1), s(\gamma _2) \rangle =\langle (1,1), (-1,0) \rangle =1, \end{aligned}$$

and so \(q^{\frac{1}{2} \langle s(\gamma _1),s(\gamma _2) \rangle } =q^{\frac{1}{2}}\).

Figure 17 gives terms

$$\begin{aligned} \sum _{1 \le j <j' \le 8} t^{D_1+L_{1j}+L_{1j'}} +(q^{\frac{1}{2}} +q^{-\frac{1}{2}})^2 t^{D_1+D_2+D_3} \end{aligned}$$

in \(\vartheta _{v_1+v_2} \vartheta _{v_3}\). Indeed, we have

$$\begin{aligned} c(\gamma _1)=1,\,\, c(\gamma _2)=\sum _{1 \le j <j' \le 8} t^{D_1+L_{1j}+L_{1j'}} +(q^{\frac{1}{2}} +q^{-\frac{1}{2}})^2 t^{D_1+D_2+D_3} \end{aligned}$$

because \(\gamma _2\) crosses \(\mathbb {R}_{\ge 0} v_1\) with bending and contribution of the term proportional to \(z^{-2v_1}\) in Eq. (59),

$$\begin{aligned} s(\gamma _1)=(1,1),\,\, s(\gamma _2)=(-1,-1),\,\, \langle s(\gamma _1),s(\gamma _2) \rangle =\langle (1,1), (-1,-1) \rangle =0, \end{aligned}$$

and so \(q^{\frac{1}{2} \langle s(\gamma _1),s(\gamma _2) \rangle }=1\). \(\square \)

5.3 Triple product of quantum theta functions

Lemma 5.7

We have

$$\begin{aligned} q^{-\frac{1}{2}} \vartheta _{v_1} \vartheta _{v_2} \vartheta _{v_3}&=q^{-1} t^{D_1}\vartheta _{v_1}^2 +q t^{D_2} \vartheta _{v_2}^2 +q^{-1} t^{D_3}\vartheta _{v_3}^2 \nonumber \\&\quad + q^{-\frac{1}{2}} \left( \sum _{j=1}^8 t^{D_1+L_{1j}} \right) \vartheta _{v_1} + q^{\frac{1}{2}} \left( \sum _{j=1}^8 t^{D_2+L_{2j}} \right) \vartheta _{v_2} \nonumber \\&\quad + q^{-\frac{1}{2}} \left( \sum _{j=1}^8 z^{D_3+L_{3j}} \right) \vartheta _{v_3} + \sum _{1 \le j <j' \le 8} t^{D_1+L_{1j}+L_{1j'}}\nonumber \\&\quad -(q^{\frac{1}{2}}-q^{-\frac{1}{2}})^2 t^{D_1+D_2+D_3} . \end{aligned}$$
(90)

Proof

By Lemma 5.4, we have

$$\begin{aligned} \vartheta _{v_1} \vartheta _{v_2} \vartheta _{v_3}= & {} \left( q^{\frac{1}{2}} \vartheta _{v_1+v_2} +q^{-\frac{1}{2}} t^{D_3} \vartheta _{v_3} + \sum _{j=1}^8 t^{D_3+L_{3j}} \right) \nonumber \\ \vartheta _{v_3}= & {} q^{\frac{1}{2}} \vartheta _{v_1+v_2}\vartheta _{v_3} +q^{-\frac{1}{2}} t^{D_3}\vartheta _{v_3}^2 + \left( \sum _{j=1}^8 t^{D_3+L_{3j}} \right) \vartheta _{v_3}, \end{aligned}$$

and so

$$\begin{aligned} q^{-\frac{1}{2}} \vartheta _{v_1} \vartheta _{v_2} \vartheta _{v_3} =\vartheta _{v_1+v_2} \vartheta _{v_3} +q^{-1}t^{D_3} \vartheta _{v_3}^2 + q^{-\frac{1}{2}} \left( \sum _{j=1}^8 t^{D_3+L_{3j}} \right) \vartheta _{v_3} . \end{aligned}$$

Using Lemma 5.6, we obtain

$$\begin{aligned} q^{-\frac{1}{2}} \vartheta _{v_1} \vartheta _{v_2} \vartheta _{v_3}&=q^{-1} t^{D_1} \vartheta _{2v_1} +q t^{D_2} \vartheta _{2v_2} +q^{-1} t^{D_3} \vartheta _{v_3}^2 \nonumber \\&\quad + q^{-\frac{1}{2}} \left( \sum _{j=1}^8 z^{D_1+L_{1j}} \right) \vartheta _{v_1} + q^{\frac{1}{2}} \left( \sum _{j=1}^8 t^{D_2+L_{2j}} \right) \vartheta _{v_2} \\&\quad + q^{-\frac{1}{2}} \left( \sum _{j=1}^8 t^{D_3+L_{3j}} \right) \vartheta _{v_3} + \sum _{1 \le j <j' \le 8} t^{D_1+L_{1j}+L_{1j'}}\\&\quad +(q^{\frac{1}{2}} +q^{-\frac{1}{2}})^2 t^{D_1+D_2+D_3}. \end{aligned}$$

By Lemma 5.2, we have

$$\begin{aligned} q^{-1}t^{D_1} \vartheta _{2v_1} = q^{-1} t^{D_1} \vartheta _{v_1}^2 -2 q^{-1} t^{D_1+D_2+D_3} \end{aligned}$$

and

$$\begin{aligned} q t^{D_2} \vartheta _{2v_2} =q t^{D_2} \vartheta _{v_2}^2 -2 q t^{D_1+D_2+D_3}. \end{aligned}$$

Using that

$$\begin{aligned} (q^{\frac{1}{2}}+q^{-\frac{1}{2}})^2 -2q-2q^{-1}=-(q^{\frac{1}{2}}-q^{-\frac{1}{2}})^2 , \end{aligned}$$

we finally obtain Lemma 5.7. \(\square \)

5.4 End of the proof of the presentation of \(\mathcal {A}_{\mathfrak {D}_\textrm{can}}\)

In this section, we end the proof of Theorem 5.1.

Recall that we defined in Sect. 2.2 the monomials \(m[p] \in \mathcal {A}_{\mathfrak {D}_\textrm{can}}\) as follows: if \(p=av_j+bv_{j+1}\) with \(a \ge 0\) and \(b \ge 0\), then \(m[p]:=\vartheta _{v_j}^a \vartheta _{v_{j+1}}^b\). We proved in Lemma 2.15 that \(\{m[p]\}_{p \in B(\mathbb {Z})}\) is a \(\mathbb {Z}[q^{\pm }][NE(Y)]\)-linear basis of \(\mathcal {A}_{\mathfrak {D}_\textrm{can}}\).

Let \(\mathcal {B}\) be the \(\mathbb {Z}[q^{\pm }][NE(Y)]\)-algebra with generators \(\vartheta _1\), \(\vartheta _2\), \(\vartheta _3\) and relations

$$\begin{aligned} q^{-\frac{1}{2}} \vartheta _1 \vartheta _2 -q^{\frac{1}{2}} \vartheta _2 \vartheta _1&=(q^{-1}-q) t^{D_3}\vartheta _3 -(q^{\frac{1}{2}}-q^{-\frac{1}{2}}) \left( \sum _{j=1}^8 t^{D_3+L_{3j}} \right) , \end{aligned}$$
(91)
$$\begin{aligned} q^{-\frac{1}{2}}\vartheta _2 \vartheta _3 -q^{\frac{1}{2}} \vartheta _3 \vartheta _2&=(q^{-1}-q) t^{D_1}\vartheta _1 -(q^{\frac{1}{2}}-q^{-\frac{1}{2}}) \left( \sum _{j=1}^8 t^{D_1+L_{1j}} \right) , \end{aligned}$$
(92)
$$\begin{aligned} q^{-\frac{1}{2}} \vartheta _3 \vartheta _1 -q^{\frac{1}{2}} \vartheta _1 \vartheta _3&=(q^{-1}-q) t^{D_2} \vartheta _2 -(q^{\frac{1}{2}}-q^{-\frac{1}{2}}) \left( \sum _{j=1}^8 t^{D_2+L_{2j}} \right) , \end{aligned}$$
(93)
$$\begin{aligned} q^{-\frac{1}{2}} \vartheta _1 \vartheta _2 \vartheta _3&=q^{-1} t^{D_1} \vartheta _1^2 +q t^{D_2} \vartheta _2^2 +q^{-1} t^{D_3} \vartheta _3^2 + q^{-\frac{1}{2}} \left( \sum _{j=1}^8 t^{D_1+L_{1j}} \right) \vartheta _1 \nonumber \\&\quad + q^{\frac{1}{2}} \left( \sum _{j=1}^8 t^{D_2+L_{2j}} \right) \vartheta _2 + q^{-\frac{1}{2}} \left( \sum _{j=1}^8 t^{D_3+L_{3j}} \right) \vartheta _3 \nonumber \\&\quad + \sum _{1 \le j <j' \le 8} t^{D_1+L_{1j}+L_{1j'}} -(q^{\frac{1}{2}}-q^{-\frac{1}{2}})^2 t^{D_1+D_2+D_3}. \end{aligned}$$
(94)

For every \(p \in B(\mathbb {Z})\), we define \(n[p] \in \mathcal {B}\) as the following monomials in \(\vartheta _1\), \(\vartheta _2\), \(\vartheta _3\): if \(p=av_j+bv_{j+1}\) with \(a \ge 0\) and \(b \ge 0\), then \(n[p]:=\vartheta _j^a \vartheta _{j+1}^b\).

Lemma 5.8

The monomials n[p] for \(p \in B(\mathbb {Z})\) form a \(\mathbb {Z}[q^{\pm }][NE(Y)]\)-linear generating set of \(\mathcal {B}\).

Proof

By definition, \(\vartheta _1\), \(\vartheta _2\) and \(\vartheta _3\) generate \(\mathcal {B}\) as a \(\mathbb {Z}[q^{\pm }][NE(Y)]\)-algebra. From the commutation relations (91)–(92)–(93), we deduce that the monomials \(\vartheta _1^a \vartheta _2^b \vartheta _3^c\) for \(a,b,c \ge 0\) are linear generators of \(\mathcal {B}\). We can use (94) to eliminate from \(\vartheta _1^a \vartheta _2^b \vartheta _3^c\) the theta function with the smallest power. It follows that the monomials n[p] are \(\mathbb {Z}[q^{\pm }][NE(Y)]\)-linear generators of \(\tilde{A}^q\). \(\square \)

By Lemmas 5.5 and 5.7, there exists a unique algebra morphism

$$\begin{aligned} \alpha :\mathcal {B}\longrightarrow \mathcal {A}_{\mathfrak {D}_\textrm{can}} , \end{aligned}$$
(95)

such that \(\alpha (\vartheta _j)= \vartheta _{v_j}\) for every \(j \in \{1,2,3\}\). In order to prove Theorem 5.1, it remains to show that \(\alpha \) is an isomorphism.

By Lemma 2.15, the quantum theta functions \(\vartheta _{v_1}\), \(\vartheta _{v_2}\) and \(\vartheta _{v_3}\) generate \(\mathcal {A}_{\mathfrak {D}_\textrm{can}}\) as \(\mathbb {Z}[q^{\pm }][NE(Y)]\)-algebra, and so \(\alpha \) is surjective. It remains to show that \(\alpha \) is injective. Let \(b \in \mathcal {B}\) with \(\alpha (b)=0\). By Lemma 5.8, we can write b as a \(\mathbb {Z}[q^{\pm }][NE(Y)]\)-linear combination \(b= \sum _p b_p n[p]\). As \(\alpha (n[p])=m[p]\), we have \(\alpha (b)= \sum _b b_p m[p]\). By Lemma 2.15, \(\{m[p]\}_{p \in B(\mathbb {Z})}\) is a \(\mathbb {Z}[q^{\pm }][NE(Y)]\)-linear basis of \(\mathcal {A}_{\mathfrak {D}_\textrm{can}}\), and so we deduce from \(\sum _p b_p m[p]=0\) that \(b_p=0\) for all p. This concludes the proof of Theorem 5.1.

6 Comparison of \(\mathcal {A}_{\mathfrak {D}_\textrm{can}}\) and \({\text {Sk}}_A(\mathbb {S}_{0,4})\)

In this section, we end the proof of Theorems 3.7 and 3.8. In Sect. 6.1, we collect a number of change of variables and algebraic identities, which are then used in Sect. 6.2 to compare the quantum scattering diagrams \(\mathfrak {D}_\textrm{can}\) and \(\mathfrak {D}_{0,4}\), and to end the proof of Theorem 3.7. In Sect. 6.3, we compare the algebras \(\mathcal {A}_{\mathfrak {D}_{0,4}}\) and \({\text {Sk}}_A(\mathbb {S}_{0,4})\), and we conclude the proof of Theorem 3.8.

6.1 Change of variables and identities

Let L be the quotient of \(A_1(Y)\) by the subgroup generated by \(D_1, D_2, D_3\), and let \(\nu :NE(Y) \rightarrow L\) be the quotient map.

Following [48], write

$$\begin{aligned} F_1&:=H-E_{11}-E_{21}-E_{31} ,\nonumber \\ F_2&:=H-E_{11}-E_{22}-E_{32},\nonumber \\ F_3&:=H-E_{12}-E_{21}-E_{32},\nonumber \\ F_4&:=H-E_{12}-E_{22}-E_{31} . \end{aligned}$$
(96)

If we take for Y the (non-general) cubic surface obtained by blowing up the 6 intersection points of a general configurations of four lines \(L_1\), \(L_2\), \(L_3\), \(L_4\) in \(\mathbb {P}^2_{\mathbb {k}}\), then \(F_j\) is the class of the \((-2)\)-curve given by the strict transform of \(L_j\). Note that the \((-2)\)-curves \(F_1\), \(F_2\), \(F_3\) and \(F_4\) are all disjoint. For \(1 \le j \le 4\), write

$$\begin{aligned} G_j :=\nu (F_j) \in L . \end{aligned}$$
(97)

Lemma 6.1

The image in L by \(\nu \) of the classes of the lines \(L_{jk}\) are given as follows:

$$\begin{aligned} \{\nu (L_{1m})\}_{1 \le m \le 8}&=\left\{ \frac{1}{2}(\epsilon _1 G_1+ \epsilon _2 G_2)\,|\, \epsilon _1, \epsilon _2 \in \{ \pm 1\} \right\} \nonumber \\&\cup \left\{ \frac{1}{2}(\epsilon _3 G_3+ \epsilon _4 G_4)\,|\, \epsilon _3, \epsilon _4 \in \{ \pm 1\} \right\} , \end{aligned}$$
(98)
$$\begin{aligned} \{\nu (L_{2m})\}_{1 \le m \le 8}&=\left\{ \frac{1}{2}(\epsilon _1 G_1+ \epsilon _3 G_3)\,|\, \epsilon _1, \epsilon _3 \in \{ \pm 1\} \right\} \nonumber \\&\cup \left\{ \frac{1}{2}(\epsilon _2 G_2+ \epsilon _4 G_4)\,|\, \epsilon _2, \epsilon _4 \in \{ \pm 1\} \right\} , \end{aligned}$$
(99)
$$\begin{aligned} \{\nu (L_{3m})\}_{1 \le m \le 8}&=\left\{ \frac{1}{2}(\epsilon _1 G_1+ \epsilon _4 G_4)\,|\, \epsilon _1, \epsilon _4 \in \{ \pm 1\} \right\} \nonumber \\&\cup \left\{ \frac{1}{2}(\epsilon _2 G_2+ \epsilon _3 G_3)\,|\, \epsilon _2, \epsilon _3 \in \{ \pm 1\} \right\} . \end{aligned}$$
(100)

Proof

Recalling that \(D_1=H-E_{11}-E_{12}\), \(D_2=H-E_{21}-E_{22}\) and \(D_3=2H-E_{31}-E_{32}\), we check that

$$\begin{aligned} \nu (E_{11})=-\frac{1}{2}(G_1+G_2) ,\,\, \nu (E_{12})=-\frac{1}{2}(G_3+G_4) , \nonumber \\ \nu (E_{21})=-\frac{1}{2}(G_1+G_3) ,\,\, \nu (E_{22})=-\frac{1}{2}(G_2+G_4) ,\nonumber \\ \nu (E_{31})=-\frac{1}{2}(G_1+G_4) ,\,\, \nu (E_{32})=-\frac{1}{2}(G_2+G_3) . \end{aligned}$$
(101)

Similarly, as \(H=D_1+D_2+D_3-\frac{1}{2}(F_1+F_2+F_3+F_4)\), we have

$$\begin{aligned} \nu (H)=-\frac{1}{2}(G_1+G_2+G_3+G_4) . \end{aligned}$$
(102)

It remains to apply \(\nu \) to all the classes \(L_{jm}\) expressed in terms of the classes H and \(E_{k\ell }\) by Eqs. (55)–(56)–(57). \(\square \)

Define

$$\begin{aligned} e_1&:=\frac{1}{2}(G_1+G_2) ,\nonumber \\ e_2&:=\frac{1}{2}(G_1+G_3) , \nonumber \\ e_3&:=\frac{1}{2}(G_1+G_4) , \nonumber \\ e_4&:=\frac{1}{2}(G_1+G_2+G_3+G_4) . \end{aligned}$$
(103)

Lemma 6.2

The four elements \(e_1\), \(e_2\), \(e_3\) and \(e_4\) form a \(\mathbb {Z}\)-linear basis of L.

Proof

One checks that the subgroup generated by \(D_1\), \(D_2\) and \(D_3\) in the free abelian group \(A_1(Y)\) of rank 7 is saturated of rank 3, and so the quotient L is free of rank 4.

Note that by Eq. (101), we have \(e_1=\nu (-E_{11})\), \(e_2=\nu (-E_{21})\), \(e_3=\nu (-E_{31})\), and by Eq. (102), \(e_4=\nu (-H)\), so we have indeed \(e_1,e_2,e_3,e_4 \in L\). On the other hand, H and \(E_{ij}\) generate \(A_1(Y)\), and as \(E_{21}= H-E_{11}-D_1\), \(E_{22}=H-E_{21}-D_2\), \(E_{32}=H-E_{31}-D_3\), we deduce that \(e_1,e_2,e_3,e_4\) generate L. As L is free of rank 4, we obtain that \(e_1,e_2,e_3,e_4\) indeed form a basis of L. \(\square \)

Physics remark 6.3

Let \((-,-)\) be the unique symmetric bilinear form on L such that \((G_j,G_j)=2\) for \(1 \le j \le 4\), and \((G_j,G_k)=0\) for every \(j \ne k\). Then \((L,(-,-))\) is isomorphic to the \(D_4\) weight lattice in such a way that \(\{\nu (L_{1m})\}_{1 \le m \le 8}\) (resp. \(\{\nu (L_{2m})\}_{1 \le m \le 8}\) and \(\{\nu (L_{3m})\}_{1 \le m \le 8}\)) is the set of weights of the irreducible fundamental (resp. left chiral spinor and right chiral spinor) representation of \({\text {Spin}}(8)\). Physically, \((L,(-,-))\) is the lattice of flavour charges for the \({\text {Spin}}(8)\) flavour symmetry group of the \(\mathcal {N}=2\) \(N_f=4\) SU(2) gauge theory.

We view L as a subgroup of the group \(\frac{1}{2}L\), and the group algebra \(\mathbb {Z}[A^{\pm }][L]\) as a subalgebra of the group algebra \(\mathbb {Z}[A^{\pm }][\frac{1}{2}L]\). We also view \(\mathbb {Z}[A^{\pm }][a_1,a_2,a_3,a_4]\) as a subalgebra of \(\mathbb {Z}[A^{\pm }][\frac{1}{2}L]\) via the following identifications:

$$\begin{aligned} a_1&= t^{\frac{G_1}{2}} +t^{-\frac{G_1}{2}} ,\nonumber \\ a_2&=t^{\frac{G_2}{2}} +t^{-\frac{G_2}{2}} ,\nonumber \\ a_3&=t^{\frac{G_3}{2}} +t^{-\frac{G_3}{2}} ,\nonumber \\ a_4&=t^{\frac{G_4}{2}} +t^{-\frac{G_4}{2}}. \end{aligned}$$
(104)

Finally, recall that we introduced the elements

$$\begin{aligned} R_{1,0}, R_{0,1}, R_{1,1}, y \in \mathbb {Z}[A^{\pm }][a_1,a_2,a_3,a_4] \end{aligned}$$

in Eqs. (6) and (7). The elements \(R_{1,0}\), \(R_{0,1}\), \(R_{1,1}\) and y are algebraically independent over \(\mathbb {Z}[A^{\pm }]\), and so we have the inclusion

$$\begin{aligned} \mathbb {Z}[A^{\pm }][R_{1,0}, R_{0,1}, R_{1,1}, y] \subset \mathbb {Z}[A^{\pm }][a_1,a_2,a_3,a_4] . \end{aligned}$$
(105)

The algebraic independence of \(R_{1,0}\), \(R_{0,1}\), \(R_{1,1}\) follows from the more precise fact, proved in Appendix B of [20], that the morphism

$$\begin{aligned}&\mathbb {A}^4 \rightarrow \mathbb {A}^4 , (a_1,a_2,a_3,a_4) \nonumber \\ {}&\quad \mapsto (a_1a_2+a_3a_4,a_1a_3+a_2a_4,a_1a_4+a_2a_3, a_1a_2a_3a_4+a_1^2+a_2^2+a_3^2+a_4^2-4) . \end{aligned}$$
(106)

is a ramified cover of degree 24.

Proposition 6.4

Using the identifications (104), the following identity holds between degree 8 polynomials in the variable x and with coefficients in \(\mathbb {Z}[A^{\pm }][\frac{1}{2}L]\):

$$\begin{aligned} \prod _{m=1}^8(1+t^{\nu (L_{1m})}x)&= 1+x^8+R_{1,0}(x+x^7) +(y-A^4-2-A^{-4})(x^2+x^6) \nonumber \\&\quad +(R_{0,1}R_{1,1}-R_{1,0})(x^3+x^5)\nonumber \\&\quad +(R_{0,1}^2R_{1,1}^2-2y+2A^4+2+2A^{-4})x^4. \end{aligned}$$
(107)

Similarly, \(\prod _{m=1}^8(1+t^{\nu (L_{2m})}x)\) and \(\prod _{m=1}^8(1+t^{\nu (L_{3m})}x)\) are given by the same expression up to cyclic permutation of \(R_{1,0}\), \(R_{0,1}\) and \(R_{1,1}\).

Proof

Using the definitions (6) and (7) of \(R_{1,0}\), \(R_{0,1}\), \(R_{1,1}\) and y, we expand the left-hand side of (107) in terms of \(a_1\), \(a_2\), \(a_3\) and \(a_4\). We obtain

$$\begin{aligned} 1+x^8&+(a_1a_2+a_3a_4)(x+x^7) +(a_1a_2a_3a_4+a_1^2+a_2^2+a_3^2+a_4^2-4) (x^2+x^6) \nonumber \\&+(a_1^2a_3a_4 +a_2^2 a_3a_4 +a_1a_2a_3^2+a_1a_2a_4^2 -a_1a_2-a_3a_4)(x^3+x^5)\nonumber \\&+(2a_1a_2a_3a_4+ a_1^2a_3^2+a_1^2a_4^2+a_2^2a_3^2+a_2^2 a_4^2 -2(a_1^2+a_2^2+a_3^2+a_4^2)+6)x^4 , \end{aligned}$$
(108)

which rather amazingly factors as

$$\begin{aligned} (1+a_1a_2x+(a_1^2+a_2^2-2)x^2 +a_1a_2x^3+x^4)(1+a_3a_4x+(a_3^2+a_4^2-2)x^2 +a_3a_4x^3+x^4) . \end{aligned}$$
(109)

Using the identifications (104), we check that

$$\begin{aligned} 1+a_1a_2x+(a_1^2+a_2^2-2)x^2 +a_1a_2x^3+x^4= \prod _{\begin{array}{c} \epsilon _1 \in \{ \pm 1\}\\ \epsilon _2 \in \{\pm 1\} \end{array}} (1+t^{\frac{1}{2}(\epsilon _1G_1+\epsilon _2 G_2)}x) \end{aligned}$$
(110)

and

$$\begin{aligned} 1+a_3a_4x+(a_3^2+a_4^2-2)x^2 +a_3a_4x^3+x^4= \prod _{\begin{array}{c} \epsilon _3 \in \{ \pm 1\}\\ \epsilon _4 \in \{\pm 1\} \end{array}} (1+t^{\frac{1}{2}(\epsilon _3 G_1+\epsilon _4 G_2)}x). \end{aligned}$$
(111)

The result then follows from Lemma 6.1. \(\square \)

Corollary 6.5

Using the identifications (104), the following identities hold in \(\mathbb {Z}[A^{\pm }][\frac{1}{2}L]\):

$$\begin{aligned} R_{1,0}&=\sum _{j=1}^8 t^{\nu (L_{1j})} ,\,\, R_{0,1}=\sum _{j=1}^8 t^{\nu (L_{2j})} ,\,\, R_{1,1}=\sum _{j=1}^8 t^{\nu (L_{3j})} , \end{aligned}$$
(112)
$$\begin{aligned} \sum _{1 \le j<j' \le 8} t^{L_{1j}+L_{1j'}}&= \sum _{1 \le j<j' \le 8} t^{L_{2j}+L_{2j'}} =\sum _{1 \le j<j' \le 8} t^{L_{3j}+L_{3j'}} =y-A^4-2-A^{-4} . \end{aligned}$$
(113)

Proof

Equation (112) (resp. (113)) follows from comparing the coefficients of x (resp. \(x^2\)) in the identity (107) of Proposition 6.4. \(\square \)

Corollary 6.6

The following identity holds:

$$\begin{aligned} \frac{\prod _{m=1}^8(1+t^{L_{1m}}x)}{(1-A^{-4} x^2)(1- x^2)^2 (1-A^4x^2)}&= 1+ \frac{R_{1,0}x(1+x^2)}{(1-A^{-4}x^2)(1-A^4x^2)}\nonumber \\&\quad +\frac{yx^2}{(1-A^{-4}x^2)(1-A^4x^2)} \nonumber \\&\quad + \frac{R_{0,1}R_{1,1}x^3(1+ R_{0,1}R_{1,1}x+x^2)}{(1-A^{-4}x^2) (1-x^2)^2(1-A^4x^2)}. \end{aligned}$$
(114)

Proof

The identity (107) of Proposition 6.4 expresses the numerator of the right-hand side of (114). We expand this expression in powers of \(R_{1,0}\), \(R_{0,1}\), \(R_{1,1}\), y, and we simplify the resulting coefficients with the denominator. \(\square \)

Physics remark 6.7

The left-hand side of Eq. (114) has exactly the form expected from the BPS spectrum of the \(\mathcal {N}=2\) \(N_f=4\) SU(2) gauge theory at large values of u on the Coulomb branch: for every \((m,n) \in \mathbb {Z}^2\) with m and n coprime, we have one vector multiplet of charge (2m, 2n), which corresponds to to the denominator of the left-hand of Eq. (114), 8 hypermultiplets of charge (mn), which correspond to the numerator of the left-hand of Eq. (114), and no other states of charge a multiple of (mn) [86]. The states of charge (2, 0) and (1, 0) can be seen classically (as W-bosons and elementary quarks respectively), and the general states of charge (2m, 2n) and (mn) are obtained from them by \({\textit{SL}}_2(\mathbb {Z})\) S-duality. The states of charge (2m, 2n) are in the trivial representation of the \({\text {Spin}}(8)\) flavour symmetry group, whereas the states of charge (mn) are in the 8-dimensional fundamental (resp. left chiral spinor and right chiral spinor) of the \({\text {Spin}}(8)\) flavour symmetry group if \((m,n)=(1,0) \mod 2\) (resp. \((0,1) \mod 2\) and \((1,1) \mod 2\)). The \({\textit{SL}}_2(\mathbb {Z})\) S-duality group acts on the flavour representations via the triality action of \({\textit{PSL}}_2(\mathbb {Z}/2\mathbb {Z}) \simeq S_3\) permuting the three irreducible 8-dimensional representations of \({\text {Spin}}(8)\) (fundamental, left chiral spinor and right chiral spinor).

6.2 The quantum scattering diagram \(\nu (\mathfrak {D}_\textrm{can})\)

In Sect. 4, we introduced and studied the quantum scattering diagram \(\mathfrak {D}_{\textrm{can}}\) over \(\mathbb {Z}[q^{\pm }][NE(Y)]\). Recall that we use the notation \(q=A^4\), and from now on we view \(\mathfrak {D}_{\textrm{can}}\) as a quantum scattering diagram over \(\mathbb {Z}[A^{\pm }][NE(Y)]\). In Sect. 6.1, we considered the quotient L of \(A_1(Y)\) by the subgroup generated by \(D_1\), \(D_2\), \(D_3\), and the quotient map \(\nu :NE(Y) \rightarrow L\). Given f a power series with coefficients in \(\mathbb {Z}[A^{\pm }][NE(Y)]\), we define the power series \(\nu (f)\) with coefficients in \(\mathbb {Z}[A^{\pm }][L]\) by applying \(\nu \) to each coefficient.

Definition 6.8

We denote by \(\nu (\mathfrak {D}_\textrm{can})\) the quantum scattering diagram over \(\mathbb {Z}[A^{\pm }][L]\) obtained from \(\mathfrak {D}_{\textrm{can}}\) by applying \(\nu \) to the quantum rays:

$$\begin{aligned} \nu (\mathfrak {D}_{\textrm{can}}) :=\{ \nu (\mathfrak {d}_{m,n})\,|\, (m,n) \in B(\mathbb {Z}), \gcd (m,n)=1 \} , \end{aligned}$$
(115)

where, for every quantum ray \(\mathfrak {d}_{m,n} =((m,n), f_{\mathfrak {d}_{m,n}})\),

$$\begin{aligned} \nu (f_{\mathfrak {d}_{m,n}}):=((m,n), \nu (f_{\mathfrak {d}_{m,n}})) . \end{aligned}$$
(116)

As in Sect. 6.1, we view \(\mathbb {Z}[A^{\pm }][a_1,a_2,a_3,a_4]\) as a subalgebra of \(\mathbb {Z}[A^{\pm }][\frac{1}{2}L]\) via (104), and we use the the elements

$$\begin{aligned} R_{1,0}, R_{0,1}, R_{1,1}, y \in \mathbb {Z}[A^{\pm }][a_1,a_2,a_3,a_4] \end{aligned}$$

defined by (6) and (7). Recall that we introduced the rational function F(rsyx) in Eq. (29).

The following Proposition 6.9 computes the quantum ray \(\nu (\mathfrak {d}_1)=\nu (\mathfrak {d}_{1,0})\) of \(\nu (\mathfrak {D}_\textrm{can})\).

Proposition 6.9

The quantum ray \(\nu (\mathfrak {d}_1)=(v_1,\nu (f_{\mathfrak {d}_1}))\) satisfies

$$\begin{aligned} \nu (f_{\mathfrak {d}_1}) = F(R_{1,0},R_{0,1}R_{1,1}, y, z^{-v_1}) . \end{aligned}$$
(117)

Proof

Equation (59) of Proposition 4.5 gives a formula for \(f_{\mathfrak {d}_1}\). The result of applying \(\nu \) is given by the identity (114) in Corollary 6.6. It remains to compare with the definition of F(rsyx) in Eq. (29) to conclude. \(\square \)

In the following Theorem 6.10, we compute all the quantum rays of \(\nu (\mathfrak {D}_\textrm{can})\).

Theorem 6.10

The quantum rays \(\nu (\mathfrak {d}_{m,n})\) of the quantum scattering diagram \(\nu (\mathfrak {D}_\textrm{can})\) are given as follows. For every \((m,n) \in B_0(\mathbb {Z})\) with m and n coprime,

  1. (1)

    if \((m,n)=(1,0) \mod 2\), then \( \nu (f_{\mathfrak {d}_{m,n}})= F(R_{1,0}, R_{0,1}R_{1,1},y,z^{-(m,n)})\),

  2. (2)

    if \((m,n)=(0,1) \mod 2\), then \( \nu (f_{\mathfrak {d}_{m,n}})= F(R_{0,1}, R_{1,0}R_{1,1},y,z^{-(m,n)})\),

  3. (3)

    if \((m,n)=(1,1) \mod 2\), then \( \nu (f_{\mathfrak {d}_{m,n}}) :=F(R_{1,1}, R_{1,0}R_{0,1},y,z^{-(m,n)})\).

Proof

In Sect. 4.4, we expressed a general quantum ray \(\mathfrak {d}_{m,n}\) of \(\mathfrak {D}_\textrm{can}\) in terms of the quantum ray \(\mathfrak {d}_{1,0}\) and a \({\textit{PSL}}_2(\mathbb {Z})\)-symmetry acting on curve classes. We will show that after applying the quotient map \(\nu \), the \({\textit{PSL}}_2(\mathbb {Z})\)-symmetry simplifies dramatically.

The transformation \(S^{*}\) of \(A_1(Y)\) is given by Eq. (70). We have \(S^{*}(D_1)=S^{*}(D_2)\), \(S^{*}(D_2)=S^{*}(D_3)\) and \(S^{*}(D_3)=S^{*}(D_1)\). Therefore, \(S^{*}\) preserves the subgroup of \(A_1(Y)\) generated by \(D_1\), \(D_2\), \(D_3\), and so defines a transformation of the quotient L, that we still denote by \(S^{*}\). Computing the action of \(S^{*}\) on the basis \(e_1,e_2,e_3,e_4\) of L given by Eq. (103) and Lemma 6.2, we find

$$\begin{aligned} S^{*}(e_1)=e_2 ,S^{*}(e_2)=e_3, S^{*}(e_3)=e_1,S^{*}(e_4)=e_4 . \end{aligned}$$
(118)

In particular, \(S^{*} :L \rightarrow L\) is a bijection.

The transformation \(T^{*}\) of \(A_1(Y)\) is given by Eq. (72). We have \(T^{*}(D_1)=D_1+D_3\), \(T^{*}(D_2)=0\) and \(T^{*}(D_3)=D_2+D_3\). Therefore, \(T^{*}\) preserves the subgroup of \(A_1(Y)\) generated by \(D_1\), \(D_2\), \(D_3\), and so defines a transformation of the quotient L, that we still denote by \(T^{*}\). Computing the action of \(T^{*}\) on the basis \(e_1,e_2,e_3,e_4\) of L given by Eq. (103) and Lemma 6.2, we find

$$\begin{aligned} T^{*}(e_1)=e_1, T^{*}(e_2)=e_4-e_3, T^{*}(e_3)=e_2, T^{*}(e_4)=e_4. \end{aligned}$$
(119)

In particular, \(T^{*} :L \rightarrow L\) is a bijection.

Therefore, \(S^{*}\) and \(T^{*}\) on L defines an action of \({\textit{PSL}}_2(\mathbb {Z})\) on L and so on \(\mathbb {Z}[A^{\pm }][L]\) and \(\mathbb {Z}[A^{\pm }][\frac{1}{2} L]\). Computing the action of \(S^{*}\) on \(G_1, G_2, G_3, G_4\), we find

$$\begin{aligned} S^{*}(G_1)=G_1, S^{*}(G_2) =G_3 , S^{*}(G_3)=G_4 , S^{*}(G_4)=G_2 , \end{aligned}$$
(120)

and so

$$\begin{aligned} S^{*}(a_1)&=a_1 , S^{*}(a_2)=a_3 , S^{*}(a_3)=a_4 ,S^{*}(a_4)=a_2, \end{aligned}$$
(121)
$$\begin{aligned} S^{*}(R_{1,0})&=R_{0,1} , S^{*}(R_{0,1})=R_{1,1} , S^{*}(R_{1,1})=R_{1,0}, S^{*}(y)=y. \end{aligned}$$
(122)

Computing the action of \(T^{*}\) on \(G_1, G_2, G_3, G_4\), we find

$$\begin{aligned} T^{*}(G_1)&=\frac{1}{2}(G_1+G_2+G_3-G_4) ,\nonumber \\ T^{*}(G_2)&=\frac{1}{2} (G_1+G_2-G_3+G_4) ,\nonumber \\ T^{*}(G_3)&=\frac{1}{2} (-G_1+G_2+G_3+G_4) ,\nonumber \\ T^{*}(G_4)&=\frac{1}{2} (G_1-G_2+G_3+G_4) . \end{aligned}$$
(123)

and then

$$\begin{aligned} T^{*}(R_{1,0})=R_{1,0} , T^{*}(R_{0,1})=R_{1,1}, T^{*}(R_{1,1})=R_{0,1} , T^{*}(y)=y . \end{aligned}$$
(124)

From Eqs. (70) and (124), we see that \({\textit{PSL}}_2(\mathbb {Z})\) acts trivially on y, and acts on \(R_{1,0}\), \(R_{0,1}\) and \(R_{1,1}\) through its finite quotient \({\textit{PSL}}_2(\mathbb {Z}/2\mathbb {Z})\) acting on indices mn of \(R_{m,n}\) viewed as integers modulo 2. Recalling that \({\textit{PSL}}_2(\mathbb {Z}/2 \mathbb {Z})\) is isomorphic to the symmetric group \(S_3\) of permutations of a set with three elements, \(S^{*}\) acts on \(\{R_{1,0},R_{0,1}R_{1,1}\}\) as a cyclic permutation, whereas \(T^{*}\) acts as a transposition.

We can now end the proof of Theorem 6.10. For every \((m,n) \in B_0(\mathbb {Z})\) with m and n, coprime, there exists \(M \in {\textit{SL}}_2(\mathbb {Z})\) such that \(M(m,n)=(1,0)\). By Proposition 4.17, we have \(\mathfrak {d}_{m,n}=M(\mathfrak {d}_{1,0})\) and so \(\nu (\mathfrak {d}_{m,n})=M(\nu (\mathfrak {d}_{1,0}))\). The result then follows from Proposition 6.9 computing \(\nu (\mathfrak {d}_{1,0})\), and from the above description of the action of \({\textit{PSL}}_2(\mathbb {Z})\) on \(R_{1,0}\), \(R_{0,1}\), \(R_{1,1}\) and y through the finite quotient \({\textit{PSL}}_2(\mathbb {Z}/2\mathbb {Z})\). \(\square \)

In Sect. 3.1, we defined the quantum scattering diagram \(\mathfrak {D}_{0,4}\) over \(\mathbb {Z}[A^{\pm }][R_{1,0},R_{0,1},R_{1,1},y]\). By Theorem 6.10, the quantum scattering diagram \(\nu (\mathfrak {D}_\textrm{can})\), which is a priori defined over \(\mathbb {Z}[A^{\pm }][L]\), can be viewed as a quantum scattering diagram over \(\mathbb {Z}[A^{\pm }][R_{1,0},R_{0,1},R_{1,1},y]\).

Corollary 6.11

We have the equality \(\mathfrak {D}_{0,4}=\nu (\mathfrak {D}_\textrm{can})\) of quantum scattering diagrams over \(\mathbb {Z}[A^{\pm }][R_{1,0},R_{0,1},R_{1,1},y]\).

Proof

This follows from comparing the description of \(\nu (\mathfrak {D}_\textrm{can})\) given by Theorem 6.10 with the Definition 3.5 of \(\mathfrak {D}_{0,4}\). \(\square \)

We can now end the proof of Theorem 3.7. By Theorem 4.4, the quantum scattering diagram \(\mathfrak {D}_\textrm{can}\) is consistent, and so in particular, applying the quotient map \(\nu \), the quantum scattering diagram \(\nu (\mathfrak {D}_\textrm{can})\) is also consistent. Therefore, \(\mathfrak {D}_{0,4}\) is consistent by Corollary 6.11.

6.3 End of the proof of positivity for \({\text {Sk}}_A(\mathbb {S}_{0,4})\)

In the previous Sect. 6.2, we proved that \(\mathfrak {D}_{0,4}=\nu (\mathfrak {D}_\textrm{can})\) and so in particular that \(\mathfrak {D}_{0,4}\). Let \(\mathcal {A}_{\mathfrak {D}_{0,4}}\) be the corresponding \(\mathbb {Z}[A^{\pm }][R_{1,0}, R_{0,1}, R_{1,1}, y]\)-algebra given by Definition 2.13, with its basis \(\{ \vartheta _p \}_{p \in B(\mathbb {Z})}\) of quantum theta functions. Recall from Sect. 1.1.3 that the isotopy classes \(\{ \gamma _p\}_{p \in B(\mathbb {Z})}\) of multicurves without peripheral components on \(\mathbb {S}_{0,4}\) form a basis of \({\text {Sk}}_A(\mathbb {S}_{0,4})\) as \(\mathbb {Z}[A^{\pm }][a_1,a_2,a_3,a_4]\)-module, and that the bracelets basis is \(\{ \textbf{T}(\gamma _p)\}_{p \in B(\mathbb {Z})}\).

In the present section, we prove Theorem 3.8, that is, we will construct a morphism \(\varphi :\mathcal {A}_{\mathfrak {D}_{0,4}} \rightarrow {\text {Sk}}_A(\mathbb {S}_{0,4})\) of \(\mathbb {Z}[A^{\pm }][R_{1,0},R_{0,1}, R_{1,1},y]\)-algebras such that \( \varphi (\vartheta _p)=T(\gamma _p)\) for every \(p \in B(\mathbb {Z})\), and which becomes an isomorphism of \(\mathbb {Z}[A^{\pm }][a_1,a_2,a_3,a_4]\)-algebras after extension of scalars for \(\mathcal {A}_{\mathfrak {D}_{0,4}} \) from \(\mathbb {Z}[A^{\pm }][R_{1,0},R_{0,1}, R_{1,1},y]\) to \(\mathbb {Z}[A^{\pm }][a_1,a_2,a_3,a_4]\).

Bullock and Przytycki gave in [19, Theorem 3.1] the following presentation of \({\text {Sk}}_A(\mathbb {S}_{0,4})\).

Theorem 6.12

( [19, Theorem 3.1]). The \(\mathbb {Z}[A^{\pm }][a_1,a_2,a_3,a_4]\)-algebra \({\text {Sk}}_A(\mathbb {S}_{0,4})\) admits the following presentation by generators and relation: \({\text {Sk}}_A(\mathbb {S}_{0,4})\) is generated by \(\gamma _{v_1}\), \(\gamma _{v_2}\), \(\gamma _{v_3}\), with the relations

$$\begin{aligned} A^{-2} \gamma _{v_1} \gamma _{v_2} -A^2 \gamma _{v_2}\gamma _{v_1}&=(A^{-4}-A^4)\gamma _{v_3} -(A^2-A^{-2}) R_{1,1} , \end{aligned}$$
(125)
$$\begin{aligned} A^{-2} \gamma _{v_2} \gamma _{v_3} -A^2 \gamma _{v_3}\gamma _{v_2}&=(A^{-4}-A^4)\gamma _{v_1} -(A^2-A^{-2}) R_{1,0}, \end{aligned}$$
(126)
$$\begin{aligned} A^{-2} \gamma _{v_3} \gamma _{v_1} -A^2 \gamma _{v_1}\gamma _{v_3}&=(A^{-4}-A^4)\gamma _{v_2} -(A^2-A^{-2}) R_{0,1}, \end{aligned}$$
(127)
$$\begin{aligned} A^{-2} \gamma _{v_1} \gamma _{v_2} \gamma _{v_3}&=A^{-4} \gamma _{v_1}^2 +A^4 \gamma _{v_2}^2 +A^{-4} \gamma _{v_3}^2 + A^{-2} R_{1,0} \gamma _{v_1} + A^2 R_{0,1}\gamma _{v_2} \nonumber \\&\quad +A^{-2} R_{1,1} \gamma _{v_3}+y-2(A^4+A^{-4}). \end{aligned}$$
(128)

Note that in Theorem 6.12, we use the generators \(\gamma _{v_1}\), \(\gamma _{v_2}\), \(\gamma _{v_3}\), whereas the generators \(\gamma _{v_1}\), \(\gamma _{v_2}\), \(\gamma _{v_1+v_2}\) are used in [19, Theorem 3.1]. Using \(\gamma _{v_3}\) rather than \(\gamma _{v_1+v_2}\) has for unique effect on the equations to replace A by \(A^{-1}\).

On the other hand, applying the quotient map \(\nu \) to the presentation of \(\mathfrak {D}_{\textrm{can}}\) given by Theorem 5.1, and using the identities (112) and (113) given by Corollary 6.5, we obtain the following presentation of \(\mathcal {A}_{\mathfrak {D}_{0,4}}\).

Theorem 6.13

The \(\mathbb {Z}[A^{\pm }][R_{1,0},R_{0,1},R_{1,1},y]\)-algebra \(\mathcal {A}_{\mathfrak {D}_{0,4}}\) admits the following presentation by generators and relation: \(\mathcal {A}_{\mathfrak {D}_\textrm{can}}\) is generated by \(\vartheta _{v_1}\), \(\vartheta _{v_2}\), \(\vartheta _{v_3}\), with the relations

$$\begin{aligned} A^{-2} \vartheta _{v_1} \vartheta _{v_2} -A^2 \vartheta _{v_2}\vartheta _{v_1}&=(A^{-4}-A^4)\vartheta _{v_3} -(A^2-A^{-2})R_{1,1} , \end{aligned}$$
(129)
$$\begin{aligned} A^{-2} \vartheta _{v_2} \vartheta _{v_3} -A^2 \vartheta _{v_3} \vartheta _{v_2}&=(A^{-4}-A^4)\vartheta _{v_1} -(A^2-A^{-2})R_{1,0}, \end{aligned}$$
(130)
$$\begin{aligned} A^{-2} \vartheta _{v_3} \vartheta _{v_1} -A^2 \vartheta _{v_1} \vartheta _{v_3}&=(A^{-4}-A^4)\vartheta _{v_2} -(A^2-A^{-2}) R_{0,1}, \end{aligned}$$
(131)
$$\begin{aligned} A^{-2} \vartheta _{v_1} \vartheta _{v_2} \vartheta _{v_3}&=A^{-4} \vartheta _{v_1}^2 +A^4\vartheta _{v_2}^2 +A^{-4} \vartheta _{v_3}^2 + A^{-2}R_{1,0} \vartheta _{v_1} + A^2R_{1,0} \vartheta _{v_2} \nonumber \\&\quad + A^{-2} R_{1,1} \vartheta _{v_3} + y-2(A^4+A^{-4}). \end{aligned}$$
(132)

Comparing Theorems 6.12 and 132, we obtain that there exists a unique morphism

$$\begin{aligned} \varphi :\mathcal {A}_{\mathfrak {D}_{0,4}} \longrightarrow {\text {Sk}}_A(\mathbb {S}_{0,4}) \end{aligned}$$
(133)

of \(\mathbb {Z}[A^{\pm }][R_{1,0},R_{0,1}, R_{1,1},y]\)-algebras such that \( \varphi (\vartheta _{v_j})=\gamma _{v_j}\) for \(j \in \{1,2,3\}\), and moreover that \(\varphi \) becomes an isomorphism of \(\mathbb {Z}[A^{\pm }][a_1,a_2,a_3,a_4]\)-algebras after extension of scalars for \(\mathcal {A}_{\mathfrak {D}_{0,4}} \) from \(\mathbb {Z}[A^{\pm }][R_{1,0},R_{0,1}, R_{1,1},y]\) to \(\mathbb {Z}[A^{\pm }][a_1,a_2,a_3,a_4]\). Therefore, to conclude the proof of Theorem 3.8, it remains to show the following result.

Theorem 6.14

For every \(p \in B(\mathbb {Z})\), we have

$$\begin{aligned} \varphi (\vartheta _p) = \textbf{T}(\gamma _p). \end{aligned}$$
(134)

Proof

We first prove that, for every \(k \ge 0\), we have

$$\begin{aligned} \varphi (\vartheta _{kv_1}) =\textbf{T}(\gamma _{kp_1}). \end{aligned}$$
(135)

The isotopy class \(\gamma _{kp_1}\) is the class of k disjoint curves isotopic to \(\gamma _1\), and so \(\textbf{T}(\gamma _{kp_1})=T_k(\gamma _{kp_1})\). Recall that the Chebyshev polynomials \(T_k(x)\) are defined by \(T_0(x)=1\), \(T_1(x)=x\), \(T_2(x)=x^2-2\), and for every \(k\ge 2\), \(T_{k+1}(x)=xT_k(x)-T_{k-1}(x)\).

We prove that \(\varphi (\vartheta _{kv_1}) =\textbf{T}(\gamma _{kp_1})\) for every \(k \ge 0\) by induction on k. The result holds trivially for \(k=0\) as \(\vartheta _0=1\) and \(\textbf{T}(\gamma _0)=1)\). It holds for \(k=1\) by construction of \(\varphi \): \(\varphi (\vartheta _{v_1})=\gamma _{v_1} =T_1(\gamma _{v_1})\). It also holds for \(k=2\): using Lemma 5.2, we have

$$\begin{aligned} \varphi (\vartheta _{2v_1}) =\varphi (\vartheta _{v_1}^2-2) =\varphi (\vartheta _{v_1})^2-2 =\gamma _{v_1}^2-2=T_2(\gamma _{v_1}) . \end{aligned}$$
(136)

Let \(k \ge 2\) and assume that the result holds for all \(k' \le k\). Then, using Lemma 5.3, we have

$$\begin{aligned} \varphi ( \vartheta _{(k+1)v_1})&=\varphi (\vartheta _{v_1}\vartheta _{kv_1}-\vartheta _{(k-1)v_1}) = \varphi (\vartheta _{v_1})\varphi (\vartheta _{kv_1})-\varphi (\vartheta _{(k-1)v_1}) \nonumber \\&=\gamma _{v_1}T_k(\gamma _{v_1}) -T_{k-1}(\gamma _{v_1})=T_{k+1}(\gamma _{v_1}) , \end{aligned}$$
(137)

and so the result holds for \(k+1\).

We now explain how to deduce the result for general \(p \in B(\mathbb {Z})\) from the result for \(p=kv_1\) using \({\textit{PSL}}_2(\mathbb {Z})\)-symmetry. In order to simplify the notation, we write R for \(\mathbb {Z}[A^{\pm }][R_{1,0},R_{0,1},R_{1,1},y]\). Recall from the proof of Theorem 6.10 that \({\textit{PSL}}_2(\mathbb {Z})\) acts through its finite quotient \({\textit{PSL}}_2(\mathbb {Z}/2\mathbb {Z})\) on R by \(\mathbb {Z}[A^{\pm }]\)-algebra automorphisms permuting \(R_{1,0}\), \(R_{0,1}\), \(R_{1,1}\), and fixing y. We define below actions of \({\textit{PSL}}_2(\mathbb {Z})\) on \(\mathcal {A}_{\mathfrak {D}_{0,4}}\) and \({\text {Sk}}_A(\mathbb {S}_{0,4})\) lifting the action on R.

For every \(M \in {\textit{SL}}_2(\mathbb {Z})\), we define a lift \(\Psi _M\) to \(\mathcal {A}_{\mathfrak {D}_{0,4}}\) of the action of M on R by

$$\begin{aligned} \Psi _M(\vartheta _p) :=\vartheta _{Mp} , \end{aligned}$$
(138)

where \(p \mapsto Mp\) is the action of \({\textit{PSL}}_2(\mathbb {Z})\) on \(B(\mathbb {Z})\). We claim that \(\Psi _M\) is an automorphism of \(\mathcal {A}_{\mathfrak {D}_{0,4}}\) as \(\mathbb {Z}[A^{\pm }]\)-algebra. Indeed, the Definition 3.5 of \(\mathfrak {D}_{0,4}\) has the following manifest \({\textit{PSL}}_2(\mathbb {Z})\)-symmetry: for every \(M \in {\textit{PSL}}_2(\mathbb {Z})\) and \(p=(m,n) \in B(\mathbb {Z})\) with m and n coprime, the function attached to the quantum ray \(\rho _{Mp}\) is obtained by applying the action of \(M \in {\textit{PSL}}_2(\mathbb {Z})\) on R to the coefficients of the function attached to the quantum ray \(\rho _p\). The compatibility of \(\Psi _M\) with the product structure of \(\mathcal {A}_{\mathfrak {D}_{0,4}}\) then follows from the Definition 2.13 of the product of \(\mathcal {A}_{\mathfrak {D}_{0,4}}\) in terms of quantum broken lines for \(\mathfrak {D}_{0,4}\). Thus, \(M \mapsto \Psi _M\) defines an action of \({\textit{PSL}}_2(\mathbb {Z})\) on \(\mathcal {A}_{\mathfrak {D}_{0,4}}\) by automorphisms of \(\mathbb {Z}[A^{\pm }]\)-algebras lifting the action on R.

On the other hand, given the geometric definition of the skein algebra, there is a natural action of the mapping class group \({\textit{MCG}}(\mathbb {S}_{0,4})\) of \(\mathbb {S}_{0,4}\) on \({\text {Sk}}_A(\mathbb {S}_{0,4})\) by automorphisms of \(\mathbb {Z}[A^{\pm }]\)-algebras. Recall that the mapping class group is the group of isotopy classes of orientation-preserving diffeomorphisms. The mapping class group \({\textit{MCG}}(\mathbb {S}_{0,4})\) contains a natural subgroup isomorphic to \({\textit{PSL}}_2(\mathbb {Z})\), which is coming from the description of \(\mathbb {S}_{0,4}\) as a quotient of a 4-punctured torus by an involution, and from the fact that the mapping class group of the torus is \({\textit{SL}}_2(\mathbb {Z})\). In fact \({\textit{MCG}}(\mathbb {S}_{0,4})\) is a semi-direct product of \({\textit{PSL}}_2(\mathbb {Z})\) with \(\mathbb {Z}/2\mathbb {Z}\times \mathbb {Z}/2\mathbb {Z}\) (see e.g. Section 2.2.5 of [31]). The action of \({\textit{PSL}}_2(\mathbb {Z})\) on \({\text {Sk}}_A(\mathbb {S}_{0,4})\) is reviewed at the beginning of Section 4 of [8]: this action \(M \mapsto \Phi _M\) lifts the action of \({\textit{PSL}}_2(\mathbb {Z})\) on R and satisfies

$$\begin{aligned} \Phi _M(\gamma _p) = \gamma _{Mp} , \end{aligned}$$
(139)

for every \(M \in {\textit{PSL}}_2(\mathbb {Z})\) and \(p \in B(\mathbb {Z})\).

We claim that \(\varphi :\mathcal {A}_{\mathfrak {D}_{0,4}} \rightarrow {\text {Sk}}_A(\mathbb {S}_{0,4})\) intertwines between the actions \(\Psi \) and \(\Phi \) of \({\textit{PSL}}_2(\mathbb {Z})\) on \(\mathcal {A}_{\mathfrak {D}_{0,4}}\) and \({\text {Sk}}_A(\mathbb {S}_{0,4})\), that is

$$\begin{aligned} \varphi \circ \Psi _M= \Phi _M \circ \varphi \end{aligned}$$
(140)

for every \(M \in {\textit{PSL}}_2(\mathbb {Z})\). It is enough to check it for the generators S and T of \({\textit{PSL}}_2(\mathbb {Z})\) given in (69). The result is clear for S: we have \(Sv_1=v_2\), \(Sv_2=v_3\), \(Sv_3=v_1\), and so \(\varphi \circ \Psi _S(\vartheta _{v_j})=\Phi _S(\gamma _{v_j})\) for \(j \in \{1,2,3\}\) follows by combining Eqs. (138) and (139). Similarly, we have \(T(v_1)=v_1\), \(T_{v_2}=v_1+v_2\), \(Tv_3=v_2\), so \(\varphi \circ \Psi _T(\vartheta _{v_j})=\Phi _T(\gamma _{v_j})\) for \(j \in \{1,3\}\) follows by combining Eqs. (138) and (139). But we need an extra argument for \(j=2\): one needs to show that \(\varphi (\vartheta _{v_1+v_2}) =\gamma _{v_1+v_2}\). This follows from the fact that

$$\begin{aligned} A^2 \vartheta _{v_1+v_2} =\vartheta _{v_1} \vartheta _{v_2} - A^{-2} \vartheta _{v_3} - R_{1,1} , \end{aligned}$$
(141)

in \(\mathcal {A}_{\mathfrak {D}_{0,4}}\) by Lemma 5.4 and

$$\begin{aligned} A^2 \gamma _{v_1+v_2} =\gamma _{v_1} \gamma _{v_2} -A^{-2} \gamma _{v_3} - R_{1,1} , \end{aligned}$$
(142)

in \({\text {Sk}}_A(\mathbb {S}_{0,4})\) by the formula above Equation (2.5) in [8].

We can now end the proof of Theorem 6.14. Let \(p \in B(\mathbb {Z})\). There exists \(M \in {\textit{PSL}}_2(\mathbb {Z})\) and \(k \in \mathbb {Z}_{\ge 0}\) such that \(p=M(kv_1)\). Then,

$$\begin{aligned} \varphi (\vartheta _p)&=\varphi (\vartheta _{M(kv_1)}) =\varphi (\Psi _M(\vartheta _{kv_1})) =\Phi _M(\varphi (\vartheta _{kv_1})) \nonumber \\&=\Phi _M(\textbf{T}(\gamma _{kv_1})) =\textbf{T}(\Phi _M(\gamma _{kv_1})) =\textbf{T}(\gamma _{M(kv_1)}) =\textbf{T}(\gamma _p) , \end{aligned}$$
(143)

where we use successively (138), (140), (135), the fact that \(\Phi _M\) is an algebra automorphism, and (139). \(\square \)