The quantum UV-IR map for line defects in $\mathfrak{gl}(3)$-type class $S$ theories

We consider the quantum UV-IR map for line defects in class $S$ theories of $\mathfrak{gl}(3)$-type. This map computes the protected spin character which counts framed BPS states with spin for the bulk-defect system. We give a geometric method of computing this map motivated by the physics of five-dimensional $\mathcal{N}=2$ supersymmetric Yang-Mills theory, and compute it explicitly in various examples. As a spin-off we propose a new way of computing a certain specialization of the HOMFLY polynomial for links in $\mathbb{R}^3$, as a sum over BPS webs attached to the link.


Introduction
This paper is a continuation of [1]. In that paper we considered the quantum UV-IR map (or q-nonabelianization map). In general, this map takes links L in a 3-manifold M to Z[q, q −1 ]-linear combinations of links L in a branched N -fold cover M . It has two important specializations: • When M = C × R for a compact surface C, the quantum UV-IR map gives the IR effective description for supersymmetric line defects in a class S theory of type gl(N ) at a point in its Coulomb branch.
• When M = R 3 , the quantum UV-IR map gives a new way of computing a certain 1-parameter specialization of the HOMFLY polynomial of a link.
In [1] we gave a description of the quantum UV-IR map, motivated from the physics of five-dimensional N = 2 U (N ) super Yang-Mills theory. We also gave an explicit construction of the quantum UV-IR map in the case of N = 2 and M = C × R or M = R 3 . The extension from N = 2 to N > 2 brings in many new features and complications. In this paper we give a construction of the quantum UV-IR map for N = 3 (in cases where no multi-loop BPS webs appear), and compute it in various cases.
The constructions in this paper and in [1] are inspired by various previous works in the physics literature, especially [2][3][4][5], and in the math literature, particularly [6,7], [8] for the N = 2 case, and [9] for N = 3. We discuss the comparison to those works in more detail in subsection 1.5 below.
In the rest of this introduction we review the motivation for our constructions; in subsection 1.5 we give a summary of results and outlook.

Motivation
Line operators are important tools in quantum field theory. Wilson and 't Hooft lines are well-known and important observables in the study of phases of 4d gauge theories [10,11]. More recently the study of line operators has led to insights on the global structure of quantum field theories. Additionally, studying the response of a quantum field theory to insertion of line defects modeling infinitely massive particles can also inform us about the spectrum in the original theory. For a sampling of recent developments in the study of lines in 4d theories see e.g. .
In this paper, we study supersymmetric line defects in a large class of four-dimensional N = 2 theories called class S [41,42]. Examples of such line defects include not only familiar supersymmetric Wilson-'t Hooft lines in supersymmetric gauge theories, but also generalizations in non-Lagrangian theories.
A special case occurs in abelian gauge theories, where it is easier to describe supersymmetric line defects explicitly. An abelian gauge theory has an electromagnetic charge lattice Γ. Supersymmetric line defects in the theory are then labeled by charges γ ∈ Γ, and can be understood as representing the insertion of an infinitely massive BPS dyon with charge γ. As a simple example, we consider 4d N = 2 U (1) gauge theory, and take γ to be purely electric; then a supersymmetric Wilson line extended in the time direction can be explicitly written as follows, where the integral is along the time direction, and A and φ are the U (1) gauge field and complex scalar in the N = 2 vector multiplet. This line defect preserves half of the supercharges of the N = 2 theory; which half of the supercharges are preserved is determined by the parameter ζ ∈ C × . As it is often simpler to study line defects in abelian gauge theories, one strategy to study line defects in a 4d N = 2 theory is to deform to a generic point u in the Coulomb branch [18], where the low energy effective theory is U (1) r gauge theory [43,44]. Following a supersymmetric line defect L into the infrared, its IR limit can be expanded as a superposition of IR dyonic line defects L IR γ in the abelian theory, with integer coefficients Ω(L, u, γ) counting the ground states of the bulk-line system in the IR charge sector labeled by γ [18]. We will give a proper definition of Ω(L, u, γ) in subsection 1.2. 1

The quantum UV-IR map and protected spin characters
It was argued in [18] that the coefficients Ω(L, u, γ) in the IR expansion of a 1/2-BPS line defect L can equivalently be understood as an index counting framed BPS states of L, as follows. We consider the Hilbert space of the 4d N=2 theory on R 3 , where the insertion of line defect L modifies the Hilbert space at the origin of R 3 . Moreover the vacuum at infinity is fixed corresponding to a point u in the Coulomb branch. This defect Hilbert space H L,u then admits a decomposition into different superselection sectors labeled by the IR electromagnetic (and flavor) charge γ: Within each charge sector, one can define an index Ω(L, u, γ) counting the lowest-energy states. As the 1/2-BPS line defect L also preserves the SU (2) P spatial rotation around the line and the SU (2) R R-symmetry, we can refine the counting of lowest-energy states by the spin data. This gives the protected spin character 2 [18]: We denote f as the quantum UV-IR map, which maps a line defect L to the generating function for its protected spin characters at at a point u in the Coulomb branch.
Here X γ are formal variables corresponding to IR dyonic line defects with charge γ.
Determining the quantum UV-IR map f at the point u is equivalent to solving the problem of computing the spin-refined framed BPS spectra of all line defects in the theory at u.

The case of class S theories
In this paper we consider line defects in specific N = 2 theories known as class S theories [41,42], obtained by partially-twisted compactification of 6d (2, 0) theory on a Riemann surface C. For these theories, as we describe in subsection 2.1 below: • There is a class of 1/2-BPS line defects L corresponding to simple closed curves 3 on the Riemann surface C (up to isotopy). This correspondence comes from the 6d construction. Consider a two-dimensional surface defect in 6d, wrapping ⊂ C and extending along the time direction. After the compactification on C, this produces a line defect L extending along the time direction.
• The IR line defects likewise correspond to simple closed curves on an N -fold cover C of C (up to homology), i.e. the Seiberg-Witten curve for the class S theory at the point u in the Coulomb branch.
• The operator products of line defects correspond to natural skein algebra structures in the space of formal linear combinations of closed curves, both in the UV and IR.
Due to supersymmetry, computing the line defects OPE commutes with the RG flow. It then follows that the quantum UV-IR map f must induce a homomorphism of skein algebras, This property, together with the fact that line defects only depend on simple closed curves up to isotopy, give very strong constraints on the quantum UV-IR map. We exploit these constraints heavily in computing it. Figure 1. Illustration of the three-manifold M = C × R h . A generic link L ⊂ M , such as the knot L 3 in the figure, has a finite extent along the R h direction that can't be isotoped away. For special links that can be isotoped to simple closed curves on C, such as the knot L 1 in the figure, F (L) computes the generating function of protected spin characters for the corresponding 1/2-BPS line defects. There are also special links which are contained in a 3-ball, such as the trefoil knot L 2 in the figure. In this case F (L) is expected to compute the 1-parameter limit of HOMFLY polynomial (1.6).
The skein algebra Sk(M, gl(N )) is generated by links L ⊂ M = C × R. In the context of the 6d (2, 0) theory of type gl(N ), we consider two-dimensional surface defects wrapping L while extending along the time direction, which descend to defects in class S theories after the compactification on C. Similarly Sk(M, gl(1)) is generated by links L ⊂ M = C × R, corresponding to surface defects in the abelian 6d (2, 0) gl(1) theory. In this context the quantum UV-IR map can be thought of as a map sending a surface defect in the 6d gl(N ) theory into a combination of surface defects in the 6d gl(1) theory. We refer the readers to [1] for a more detailed description of this 6d picture.
If the link can be isotoped to a simple closed curve on C at a fixed point along the R h -axis, such as L 1 in Figure 1, then the corresponding surface defect in 6d descends to a 1/2-BPS line defect L 1 in the 4d class S theory. In this case F (L 1 ) computes the generating function of protected spin characters for L 1 . In general, though, the link L will have a finite extent along the R h -direction that can not be isotoped away, as for L 3 shown in Figure 1. In this case, as we will describe in subsection 2.1, the corresponding defect L 3 in class S theory is effectively a 1/4-BPS line defect, which breaks the spatial rotation to U (1) P while preserving a U (1) R ⊂ SU (2) R R-symmetry. For such 1/4-BPS line defects, we can still define the protected spin characters similar to (1.3), whose generating function is once again computed by the map F . Before we continue we would like to comment on our notations. Due to the geometric construction of line defects in class S theories, the quantum UV-IR map f as introduced in subsection 1.2 is equivalent to the homomorphism F in (1.5). In the following we often also denote the quantum UV-IR map by F .

Application to HOMFLY polynomials
As we discussed in [1], the quantum UV-IR map we consider has broader applicability than computing the protected spin characters for line defects in 4d N = 2 theories of class S. In particular, we can take the case of M = R 3 and M a disjoint union of N copies of R 3 . In that case the IR line defects are all trivial as M only has trivial homology class, and the quantum UV-IR map just assigns to a link L ⊂ R 3 a polynomial F (L) ∈ Z[q, q −1 ]. From the skein relations obeyed by the 6d surface defects, it follows that F (L) computes the following 1-parameter specialization of the HOMFLY polynomial: where wr(L) denotes the writhe of L.
More generally, we expect (1.6) to hold also for a special class of links in generic M = C ×R h , namely for links contained inside a 3-ball in M , such as the trefoil knot L 2 shown in Figure 1. We give a simple example of this kind for N = 3 in subsection 4.2, and more examples for the N = 2 case can be found in [1].

Our main results and outlook
As we have described, the quantum UV-IR map unifies the computation of protected spin characters for line defects in class S theories and the 1-parameter limit (1.6) of the HOMFLY polynomials for links in R 3 . Thus it is desirable to understand this map better, and in particular to have a concrete way of computing it.
In [1] we set out a general scheme for computing the quantum UV-IR map. This scheme is motivated by the physics of 5d N = 2 U (N ) super Yang-Mills theory; concretely it is a geometric recipe mapping a link L ⊂ M to a linear combination of links L ⊂ M . The links L consist partly of lifts of segments of L and partly of extra contributions from BPS webs attached to L. We also described in [1] the detailed implementation of this scheme in the case of N = 2. In particular, we determined the precise q-dependent prefactors which weigh the contributions from each L to F (L), and gave sketch proofs that our scheme indeed produces a map F with all the expected properties.
In this paper we continue the construction of the quantum UV-IR map to the case N = 3. This case is considerably more complicated than N = 2, because the BPS webs which occur can have more complicated topologies. For N = 2, each BPS web consists only of a single segment; for N = 3 they can be general trivalent graphs, with or without loops. Part of the problem of describing the UV-IR map is to determine the q-dependent factors accompanying BPS webs with all of these different topologies. In subsection 2.4 we give detailed formulas for the factors associated to webs without loops, as well as for webs containing a single loop, and all of the other q-dependent factors entering the map.
These formulas are already enough to compute F (L) in various examples, and we obtain results which pass all tests we have available; some of these are described in section 4. In particular, the examples in subsection 4.3-subsection 4.5 illustrate how the quantum UV-IR map leads to a new recipe for computing the specialized HOMFLY polynomial (1.6), and in subsection 4.6-subsection 4.7 we give new results for protected spin characters in a few class S theories of type gl(3).
Most of our computations were done with the aid of computer programs, described in Appendix A. With the arXiv version of this preprint we include Mathematica and Python code which implements our computations in detail, and which can be used to do other similar computations.
We indicate here a few open questions: • For the case of M = C × R h , the quantum UV-IR map generically depends on the Coulomb branch data of the corresponding class S theory. As we move around on the Coulomb branch, the map is locally constant; however, it is expected to jump across certain codimension-one walls, according to the framed wall-crossing formula [18,[45][46][47]. By examining the quantum UV-IR map before and after the jump, one should be able to extract the BPS spectrum with spin in the bulk class S theory; similar computations were done in [4,18], using interfaces between surface defects instead of line defects. One can also ask whether there is a way to construct an invariant of L ⊂ C × R h which does not suffer wall-crossing. An interesting possibility is to compose the quantum UV-IR map 5 with the IR formula for computing the line defect Schur index developed in [27].
• The quantum UV-IR map gives an IR effective description for supersymmetric line defects in class S theory at a point on its Coulomb branch. In other words, it tells the behavior of line defects when the bulk theory is deformed onto its Coulomb branch. 6 It would be very interesting to understand this map more directly from a 4-dimensional field theory point of view, especially at generic points of the Coulomb branch (the UV-IR map near infinity has been computed by semiclassical means in [26]).
• It should be possible to complete our construction by giving explicit formulas for the weights associated to webs with arbitrary numbers of loops. However, this may require different techniques than the brute-force isotopy-invariance methods we have used so far. Ideally one should be able to determine the weights by a direct computation in 5d N = 2 super Yang-Mills theory. We would like to pursue this in the future.
• As we have remarked, when applied to a link L ⊂ R 3 , our construction of F (L) computes the specialized HOMFLY polynomial (1.6). In a special "almostdegenerate" limit our computation of F (L) reduces to a conventional sort of vertex model; see subsection 3.1 for this. Away from this limit, it seems to give a new way of computing (1.6) by summing over webs attached to the link L, and it would be interesting to know whether this new method can be used to expose any new structures in this link invariant.
• Our construction of F (L) for class S theories is applicable at any point of the Coulomb branch, and thus it determines the protected spin characters at any point (as long as multi-loop webs do not appear). So far, we have done explicit computations at special "almost-degenerate" regions of the Coulomb branch, where the enumeration of the BPS webs simplifies considerably (see subsection 3.2). It would be very interesting to use our method to compute F (L) at more general loci of the Coulomb branch.
• Although we have made various checks of our description of F , we do not have a general mathematical proof that it has the expected isotopy invariance properties or that it respects the skein relations. (In the N = 2 case we were able to give a sketch proof by considering an appropriate list of "Reidemeister-type" moves [1]; for N = 3 this kind of approach does not seem feasible at present.) It would be very interesting to find such a proof. One intriguing possibility would be to somehow realize F in Floer thory, which has recently been related to skein relations [55], and then appeal to general properties of that theory.
• Up to minor differences in conventions, we expect that the quantum UV-IR map for M = C × R in almost-degenerate regions of the Coulomb branch should be equal to the "quantum trace" introduced in [8] for N = 2 and [9] for N = 3, as well as with the computation of protected spin characters given in [5]. For N = 2, it was shown in [56] that the approach of [5] indeed reproduces the quantum trace of [8], up to some adjustments (see also [57] for more on the relation between qnonabelianization and the quantum trace). For N = 3, we have checked in some examples, with the help of Daniel Douglas, that our formulas agree with those of [9] -see subsection 4.6 and subsection 4.7. It would be desirable to establish this equality directly along the lines of [56].

The quantum UV-IR map
As described in section 1, the computation of framed BPS spectrum for line defects in class S theories and the computation of HOMFLY polynomials are unified through the quantum UV-IR map between the following two skein algebras: (1)). (2.1) We recall the definitions of these two skein algebras in subsection 2.1, motivated from considerations of line defects OPE. The map F depends on certain foliation data on the surface C; this is described in subsection 2.3. Our approach to construct the map F is a combination of physical considerations and bootstrap-like methods. We outline the strategy in subsection 2.2, and then give a concrete description of F in subsection 2.4.

Line defect OPE and skein algebras
The set of line defects in a 4d N = 2 theory is equipped with a natural algebra structure given by the line defect OPE, defined by considering the theory with the insertion of two line defects. Concretely we consider two 1/2-BPS line defects L 1 and L 2 , extending along the time direction while inserted at two points x 1 and x 2 in the spatial R 3 , preserving a common half of the supercharges in the bulk 4d N = 2 theory. The dependence of the correlation function on x 1 − x 2 is Q-exact where Q is one of the common preserved supercharges. Up to Q-exact terms the limit x 1 → x 2 is nonsingular, and by locality this limit should be equivalent to another line defect [18], which we denote as L 1 · L 2 . In this way the line defect OPE defines a ring multiplication on the space of line defects. The line defect OPE admits a distinguished noncommutative deformation, or quantization [18,22]. Physically this quantization can be understood as arising from turning on the Nekrasov-Shatashvili limit [58] of Omega background along a spatial R 2 -plane [20,31,59]. 7 After turning on such a background supersymmetric line defects are restricted to sit at the origin of the R 2 -plane, or equivalently, the insertion points are restricted to a real line R h in spatial R 3 , perpendicular to the R 2 -plane. Due to this restriction of the insertion points, the OPE of line defects L 1 and L 2 becomes noncommutative; we denote it as L 1 L 2 . This is illustrated in Figure 2.
In a generic 4d N = 2 theory, the noncommutative product could be complicated. However, the situation is better in abelian gauge theories, where 1/2-BPS line defects could be explicitly written down as in (1.1). Denoting a line defect with electromagnetic charge γ as L γ , the noncommutative OPE is concretely given by the following quantum torus relation: where ·, · denotes the Dirac-Schwinger-Zwanziger pairing on the electromagnetic charge lattice. This quantum torus relation also has a nice physical interpretation. The line defects L γ could be thought of as worldlines of heavy BPS dyons with charge γ. Bringing together two dyons with charges γ 1,2 produces a dyon with charge γ 1 + γ 2 , but one needs to take into account the angular momentum stored in the electromagnetic field sourced by the two dyons, which gives rise to the extra prefactor in (2.2).
In this paper we focus on the case of class S theories, where line defects and their OPEs have an extra geometric meaning. For a sampling of references see [5,6,[16][17][18][60][61][62][63][64][65][66]. To produce a line defect in a class S theory, one starts with a two-dimensional surface defect in the 6d (2, 0) theory of type g and wrap it along × R t , where is a certain topologically nontrivial one-dimensional trajectory on the Riemann surface C and R t is the time direction in 4d spacetime. The surface defect in 6d carries a representation of g; throughout our discussion in this paper we take g = gl(3) and consider surface defects in the fundamental representation. Moreover we restrict ourselves to the case where ⊂ C is a simple closed curve, as indicated in Figure 3. The cases where is a lamination or contains junctions are deferred to future work. At a point on the Coulomb branch of a class S theory, the low energy effective theory is an abelian gauge theory with couplings described by the Seiberg-Witten curve C ⊂ T * C, where C is generically a branched covering of the Riemann surface C [41][42][43][44]. The 4d IR effective theory can be viewed as the compactification of 6d (2, 0) gl(1) theory on C. In this context, IR line defects can be obtained from wrapping surface defects in the 6d abelian theory along loops˜ ⊂ C. From this point of view, the UV-IR map for line defects corresponds to a procedure which takes a loop on the Riemann surface C and lifts it to a combination of loops˜ i on the branched covering Seiberg-Witten curve C, where generically i runs over a finite set. This is illustrated in Figure 4. This geometric picture suffices for obtaining the integer coefficients / framed BPS indices in the UV-IR decomposition for line defects; indeed this was the strategy used in [2]. However to obtain the Z[q, q −1 ]-valued protected spin characters, or equivalently to construct the quantum UV-IR map (1.4), this picture is not enough. It turns out instead of just thinking about loops ⊂ C and˜ ⊂ C, we need to consider links L ⊂ C × R and L ⊂ C × R, as we will describe next. Here we show the Seiberg-Witten curve C as a branched covering over the Riemann surface C associated with a 4d class S theory. 1/2-BPS UV line defects correspond to topologically nontrivial loops ⊂ C while 1/2-BPS IR line defects are represented by loops ⊂ C. The classical limit (q = −1) of the quantum UV-IR map is a procedure which takes ⊂ C and uplifts it to combinations of˜ ⊂ C.
A crucial ingredient in formulating the quantum UV-IR map is the compatibility with line defects OPE. Geometrically the commutative line defects OPE correspond to the concatenation of loops ⊂ C in the UV and the concatenation of loops˜ ⊂ C in the IR. On the other hand, the noncommutative line defects OPE are described by skein algebras. Intuitively speaking, to incorporate the non-commutativity we need to introduce an ordering of loops ⊂ C and˜ ⊂ C respectively. Instead of simply considering loops on C and C, we are led to think about links in 3-manifolds with a product structure, namely M = C × R h for the UV lines and M = C × R h for the IR lines respectively. The non-commutative algebra structure is then given by stacking the links along the R h direction. The quantum UV-IR map should send a link L ⊂ M to combinations of links L ⊂ M , compatible with the algebra structures on both sides. In other words, the quantum UV-IR map should correspond to a homomorphism of skein algebras.
In the following we recall the definition of skein algebras and skein modules; for a more detailed description we refer to [1]. Fixing an oriented 3-manifold M , the gl(N ) HOMFLY skein module Sk(M, gl(N )) is defined as the free Z[q ±1 ]-module generated by ambient isotopy classes of framed oriented links in M , modulo the submodule generated by the skein relations shown in Figure 5. On the IR side, we consider another oriented 3-manifold M , where M is an N -fold covering of M branched along a codimension-2 locus F. The gl(1) skein module with branch locus, Sk( M , gl(1)), is the free Z[q ±1 ]module generated by ambient isotopy classes of framed oriented links in M \ F, modulo the submodule generated by skein relations shown in Figure 6.   (1)) for links in blackboard framing. The orange cross represents the codimension-2 branch locus F.
As described above, in this paper we take M = C × R h and M = C × R h , where C is the Riemann surface associated with a class S theory and C corresponds to its Seiberg-Witten curve at a point in the Coulomb branch. Both C and C are oriented surfaces; we take the orientation of M (resp. M ) to be the one induced from the orientation of C (resp. C) and the standard orientation of R h . Then the skein modules Sk(M, gl(N )) and Sk( M , gl(1)) defined above are actually algebras over Z[q ±1 ], where the multiplication is given by stacking links along the R h direction, with a sign twist as explained in [1].
The IR skein algebra Sk( M , gl (1)) is isomorphic to a quantum torus Q Γ , where Γ = H 1 ( C, Z) is the IR electromagnetic charge lattice, and the skew bilinear intersection pairing ·, · on Γ is identified with the Dirac-Schwinger-Zwanziger pairing. The quantum torus Q Γ is a Z[q ±1 ]-algebra with a basis {X γ } γ∈Γ obeying the product law Each X γ is represented by a certain loop on M in homology class γ; we refer the readers to Section 3 of [1] for details. This isomorphism is consistent with the physical picture we described above: the noncommutative line defect OPE is described by the skein algebra; identifying X γ with the IR line defect L γ , this product law exactly matches the noncommutative IR dyonic line defect OPE (2.2).
We started this section describing 1/2-BPS line defects in class S theories corresponding to loops on the Riemann surface C; considerations regarding their noncommutative OPE led us to skein algebras generated by links L in the 3-manifold M = C × R h . If M were a compact hyperbolic 3-manifold, this would be the setup to study line defects in the 3d N = 2 theory T [M ] obtained by the twisted compactification of 6d (2, 0) theory on M , where the line defects descend from two-dimensional surface defects in the 6d theory wrapping links L ⊂ M [67][68][69][70][71][72][73][74].
However, here we are taking the 3-manifold M to be C × R h and performing the twisted compactification of the 6d (2, 0) theory on C to obtain 4d N = 2 class S theories. A reasonable question to ask is: what are the defect objects in class S theories that geometrically correspond to links L in M = C ×R h ? Strictly speaking such defects are strips with a finite width, as the links L have a finite extent along the R h -direction, which is one of the spatial directions in 4d. However if we go to a length scale which is much larger than the finite extent of the strips, we effectively obtain line defects L in 4d class S theories. 8 Such line defects explicitly break the SU (2) P spatial rotation symmetry to U (1) P and only preserve U (1) R ⊂ SU (2) R R-symmetry. Moreover, these effective line defects L preserve 2 supercharges of the bulk theory, i.e. they are 1/4-BPS. For these 1/4-BPS effective line defects, we can still define the protected spin character Ω(L, u, γ, q) as in (1.3), counting ground states with spin of the bulk-defect system. Moreover, the generating function of the protected spin characters is again computed by the quantum UV-IR map.

Strategy to construct the quantum UV-IR map
Thanks to the geometric construction of supersymmetric line defects in class S theories, the quantum UV-IR map also has a physical meaning in 6d, as a UV-IR map for supersymmetric surface defects in two different (2, 0) theories. In the UV, we have 6d (2, 0) superconformal field theory of type gl(N ) on M × R 2,1 , with insertion of a supersymmetric surface defect (in the fundamental gl(N )-representation) on R 0,1 × L, where L is a link in M = C × R. Deforming to the tensor branch of the gl(N ) theory, in the IR we then have 6d (2, 0) theory of type gl(1) on M × R 2,1 , with insertion of supersymmetric surface defects on R 0,1 × L, where L are links in M = C × R and C is the Seiberg-Witten curve. From this point of view, we expect the quantum UV-IR map to be a map sending links L ⊂ M to combinations of links L ⊂ M .
It is illuminating to think about the 5d picture. We Euclideanize and compactify the time direction to S 1 with an extra insertion of (−q) 2J 3 q 2I 3 , and we reduce on the S 1 . In the UV we then have a Ω-deformed 9 5d N = 2 U (N ) super Yang-Mills (SYM) on (C × R) × R 2 with the class S twist on C (as introduced in [42]), with the insertion of a fundamental Wilson line along L. Going to a point in the Coulomb branch corresponds to turning on VEV for a complex adjoint scalar Φ := Φ 1 + iΦ 2 , where Φ 1,2 are two real adjoint scalars in the 5d N = 2 U (N ) SYM charged under the so(2) R ⊂ so(5) R R-symmetry that gets identified with the so(2) C holonomy algebra in the class S twist. In particular, eigenvalues of Φ correspond to the N sheets of the Seiberg-Witten curve C; generically Φ breaks the 5d gauge group U (N ) to U (1) N .
In this context, the quantum UV-IR map F (L) in principle could be understood through computing the partition function of the Ω-deformed twisted 5d N = 2 U (N ) SYM on (C × R) × R 2 , in presence of a fundamental Wilson line along the link L, and in the symmetry-breaking background determined by the Seiberg-Witten curve C. It would be great to derive the UV-IR map using localization methods in this setup. We defer this to future work.
Our current strategy is to combine the above physical picture with the fact that F is a homomorphism between two skein algebras as written in (2.1). Our construction can be understood as a two-step process: • Step 1: Given a link L ⊂ M , we enumerate all possible L ⊂ M that contribute in the UV-IR map. Physically speaking, L correspond to Wilson lines in the IR 5d theory. Constructing all possible L requires semi-classical analysis plus consideration of instanton-like massive W -boson corrections. 10 • Step 2: To each L, we assign a weight factor α( L) ∈ Z[q ±1 ]. These weight factors are worked out by requiring that the quantum UV-IR map F preserves the skein relations and should be isotopy-invariant.
We report the details of our construction in subsection 2.4, with a brief description in subsection 2.5 of the bootstrap-like methods to determine weight factors α( L). The construction of quantum UV-IR map requires an important ingredient. In the 5d N = 2 theory context, the massive W -bosons have to be mutually BPS with the fundamental Wilson line inserted along L. As a result, the W -bosons have to travel along particular trajectories called the WKB leaves. We will describe the WKB leaves and the associated WKB foliation structure on C in subsection 2.3.

WKB foliations
The quantum UV-IR map depends on some extra structure on C, which we call WKB foliation data. We fix a complex structure on C and a N-fold covering C → C given in the form where each φ k is a meromorphic k-differential on C. Moreover we choose generic φ k such that all branch points are simple. Locally on C we then have N 1-forms λ i , given by the sheets of C, i.e. the branches of solutions to (2.3). We define N 2 foliations locally on C using pairs of these oneforms: for example ij-leaves are the paths on C along which λ i − λ j is real. 11 In the context of the 5d N = 2 theory described previously in subsection 2.2, these ijleaves are potential trajectories of the ij-type W -bosons, where the above conditions is equivalent to the requirement that such W -bosons preserve the supercharges preserved by the fundamental Wilson line inserted along L. 12 Although these leaves are not naturally oriented, choosing a sheet induces an orientation as follows: for an ij-leaf suppose we choose sheet i, then the positive direction is the direction for which the pairing between λ i − λ j and the tangent vector is negative. Thus the lift of an ij-leaf to either sheet i or sheet j is naturally oriented.
i j Figure 7. An ij-leaf with its two orientations.
Recall that for N = 2, locally at a branch point there is a three-pronged singularity as shown in Figure 8 The WKB foliations around a simple branch point for N > 2 look considerably more complicated than for N = 2. A typical picture in the neighborhood of a simple branch point for the N = 3 case is shown in Figure 9 below. 13 To understand this three-pronged structure note that around a branch point at z = 0 we have  Suppose locally we label the sheets i = 1, 2, 3 so that the branch point is of type (12). Then the 12-leaves, colored blue in Figure 9, give a single well defined foliation around the branch point, looking just like the foliation around a branch point in the N = 2 case. The 13-leaves and 23-leaves, on the other hand, mix with one another under monodromy around the branch point. There is also another important phenomenon: there is a curve emanating from the branch point, called a "caustic", along which the λ i − λ j all have the same phase. Therefore along the caustic all three ij-foliations are all tangent to one another (though not tangent to the caustic itself!) A good local model for this behavior is for constants a, b ∈ C; then In particular, to first approximation near the branch point the 13-leaves and 23-leaves are parallel, and point in a generic direction in the plane. In a sense, this local model is similar to the N = 2 case. The difference is that we now have two more types of leaves.
For N > 2 the global topology of WKB foliations is more complicated than for N = 2, and we will not try to discuss it in full detail. Instead we just point out some general features: • In a neighborhood of a generic point of C, there are N 2 distinct foliations. Globally, these foliations mix with one another, since the monodromy around branch points permutes the sheets. Around a branch point where sheets i and j collide, the local structure of the ij-foliation is three-pronged as in Figure 8.
• For any i, j, k the local structure around a generic point of C looks topologically (but not necessarily conformally) like Figure 10. • Locally on C, dividing by the equivalence relation that identifies points lying on the same ij-leaf, one obtains the leaf space C ij . Thus locally we have N 2 projection maps p ij : C → C ij , where each C ij is a 1-manifold. Each C ij also comes with a natural Euclidean structure induced by the 1-form |Im(e −iϑẇ(ij) )|.
Globally, the C ij mix with one another.
The WKB foliations of C induce foliations of M = C ×R, again with 1-dimensional leaves: the leaves on M have the form × {x 3 = c} where c is any constant and ⊂ C is a leaf. As before, the leaf spaces M ij = C ij × R inherit natural Euclidean structures, so locally they look like patches of R 2 . Locally choosing a sheet i induces an orientation on M ij . The induced orientation is determined by the orientation of ij-leaves on sheet i, together with the ambient orientation of M . We take it to be opposite to the quotient orientation.

2.4
The quantum UV-IR map for N = 3 Following the strategy described in subsection 2.2, we have constructed the quantum UV-IR map in the case of N = 2 in [1]. Here we describe the quantum UV-IR map in the case of N = 3. In this sum, L runs over all framed oriented links in M = C × R h built out of the following types of local pieces: • Direct lifts of a strand of L to a single sheet of M , equipped with the standard framing. Each sufficiently short strand admits N direct lifts.
i Figure 11. The direct lift of a segment of L to sheet i of the covering M .
In the 5d N = 2 SYM setup, these lifts can be understood as follows. Locally away from the branch locus of C → C, the gauge group U (N ) is broken to U (1) N . Correspondingly the fundamental representation of U (N ) is split into its N weight spaces. Therefore locally a fundamental Wilson line in the U (N ) SYM is expected to decompose into N Wilson lines in the U (1) N theory.
• Lifted webs defined as follows. Let a web be a collection of ij-leaf segments on M , where each ij-segment ends either at an ij-branch point, at a point of the link L, or at a trivalent junction, as shown in Figure 12. A lifted web is a 1-chain on M , obtained by lifting each ij-segment in the web to sheets i and j of M , equipping each lift with its canonical orientation and standard framing.
In the 5d N = 2 SYM setup, lifted webs correspond to trajectories of massive W -bosons, which had been integrated out in reducing to the abelian description. To be mutually BPS with the Wilson lines, such W -bosons must travel along ij-leaves as described in subsection 2.3. Lifted webs represent corrections from massive W -bosons to the semiclassical picture involving only direct lifts.
Simple examples of lifted webs are the detours and exchanges which already appeared in the N = 2 case in [1]: -If the web consists of a single ij-segment connecting an ij-branch point to the link L, then we get a detour as shown in Figure 13. -If the web consists of a single ij-segment connecting two different points of the link L, then we get an exchange as shown in Figure 14. (The term "exchange" comes from the fact that the two strands of L exchange their labels i ↔ j as they go across the web.) An example of a more generic web is illustrated in Figure 15. After we enumerate all possible L by assembling direct lifts and lifted webs, we move on to the second and more complicated step of our construction: to each L, we associate a weight factor α( L) ∈ Z[q ±1 ]. The weight α( L) is built as a product of local factors of various kinds, which we describe in subsubsection 2.4.1-subsubsection 2.4.7 below.
In [1] we have also formulated the quantum UV-IR map for N = 2 in a covariant way, which would make sense on a general 3-manifold M , without the product structure M = C × R h . It would be desirable to formulate the quantum UV-IR map for N = 3 in a similarly covariant way, but we do not do that in this paper. In the following we let x 3 denote the coordinate along R h .

Tangency factors
At every place where the projection of L onto C becomes tangent to an ij-leaf, if L is on sheet i or j, we get a contribution q ± 1 2 to α( L), with the sign determined by Figure 16. An exception arises for segments of L consisting of lifted ij-leaves; such a segment is everywhere tangent to the leaf, and we do not include any tangency factor associated to such a segment.
Unlike the N = 2 case considered in [1], these tangency factors really depend on the particular lift L we consider; for example, for a strand of L on sheet 1, we only consider contributions from the tangencies to the 12-and 13-leaves, not the 23-leaves.  Figure 16. Tangency factors contributing to the overall weight α( L). The black line denotes a WKB leaf of type ij. Here the word "up" or "down" next to a segment of L indicates the behavior in the R h -direction, which is perpendicular to the paper.

Winding factors
There is a contribution q w( L) to α( L), where w( L) denotes the total leaf space winding of L, defined as follows. We divide L into small arcs; let a denote such an arc. Suppose arc a is on sheet i. The arc a projects to an arc in each of the 2 leaf spaces M ij with i = j. In a neighborhood of the image of a, each M ij is equipped with an orientation and flat metric, as we have discussed in subsection 2.3 above. Thus we can define the winding w ij of a in each of the leaf spaces M ij . We define the total winding of a to be i =j w ij . Finally, summing up the total winding over all the arcs a we get the total winding w( L) of L.

Weight factors for exchanges
If L includes the lift of an exchange which does not cross a caustic, then there is an additional contribution to α( L), of the form ±q m (q − q −1 ) with m ∈ Z. The precise factor is the product of two pieces, as follows.
• The first factor depends on two pieces of data: whether the two legs of L cross the exchange in the same direction or in opposite directions when viewed in the standard projection C × R → C, whether the crossing in the ij-leaf space projection of L is an overcrossing or an undercrossing.
Sample configurations of the four possible types, and the corresponding factors, are listed in Figure 17.
This piece of the exchange factor is very similar to the exchange factor for N = 2 described in [1]; the only difference is that the prefactors q ±1 which appeared there are replaced here by q ±2 .
To avoid confusion, we remark that in Figure 17 we have only shown the ij-leaf space projection up to certain rotations. In particular one can adjust the height tendencies (indicated as the e 3 -direction in Figure 17) of the two strands, as long as the handedness of the crossing doesn't change; this kind of adjustment does not change the assigned factor. Another remark is that Figure 17 only shows the projections for link strands in C × R; after applying our path-lifting rules there are link strands in C × R going along lifted ij-leaves as indicated in Figure 14.
We also refer to Figure 19 of [1] for projections in C × R of the configurations shown here in Figure 17. For each of the points a where the link attaches to the exchange, let v a denote the oriented tangent vector to the link at a. We have δ = 0 unless the two v a have opposite components in the height direction (one up, one down). So from now on assume they are opposite. In this case the exchange has a natural orientation, pointing toward the leg which is going up. Let v exch be a tangent vector to the exchange, compatible with this orientation. Let k / ∈ {i, j} be the third sheet label, and let v k be a vector tangent to either the ik or jk foliation, with the orientation induced by choosing sheet k. Then we consider the x 3 -component of w = v exch × v k , evaluated at some point along the exchange. If w points up, and the leaf space crossing is an overcrossing, then δ = 2. If w points down, and the leaf space crossing is an undercrossing, then δ = −2. In all other cases δ = 0.
The above formula for δ also has another interpretation in an important special case. Consider the case where the ij-, ik-and jk-leaves are almost degenerate.
Then δ = 0 exactly when the following happens: in addition to lifts on sheet i and sheet j that contain the lifted ij-exchange, there is also a small loop on sheet k containing lifted ik-and jk-exchanges. This is illustrated in Figure 18. (Note that there is another possible configuration of foliations given by swapping the kj-and ik-foliations; the analysis works similarly in that case.) We remark that δ depends both on the link configuration and the almost-degenerate foliation. For example, suppose we change the foliation in Figure 18  Above we have restricted to the case of exchanges which do not cross caustics. We leave the case of an exchange which does cross a caustic to future work. (One can see that some modification of the rules above will be required: our description of the factor q δ relies on the property that v exch × v k is has the same height tendency at every point along the exchange, which would be violated if the exchange crosses a caustic. Another way to see that this case should be more subtle is to note that when there is an exchange crossing a caustic there is also a continuous 1-parameter family of webs.)

Weight factors for detours
The weight factor q ± 1 2 associated with a detour is shown in Figure 19. This is the same as the detour factor in the N = 2 case, given in [1]. Figure 19. Detour factors contributing to the overall weight factor α( L). The notation is the same as in Figure 16.
We remark that this factor can also be interpreted in another way: its effect is to cancel a factor q ± 1 2 coming from the winding of the detour in the ij-leaf space. Thus, alternatively, one could adopt the rule that we do not count the winding of the detour in the ij-leaf space (while still counting the winding in other leaf spaces), and then omit the detour factor.  Figure 20. An example of a trivalent tree (shown in black) with five legs attached to the link L (shown in blue). This trivalent tree has in total seven legs, two of which are internal in the sense that they are not attached to the link L. Now let us consider a web with the topology of a trivalent tree, with all external legs (i.e. legs which have at least one end point not being an internal vertex) attached to the link L. Let K denote the number of external legs, and assume K > 2 (the case K = 2 corresponds to an exchange, which we have already considered above.). In Figure 20 we show an example of such a trivalent tree. The web factor associated with such a tree is of the form Here the index a runs over the K external legs of the tree that are attached to the link L, runs over the 2K − 3 total legs (including the internal legs), and the quantities m a , σ are defined below.
• The quantity m a ∈ Z for an external leg a is defined as follows. Let t be a positively oriented tangent vector to the link, and let l be a tangent vector to the external leg a, oriented into the tree. Then m a = +1 if t and t × l have the same sign for their x 3 components (both pointing out of or into the paper), and m a = −1 otherwise. As an example consider the external leg a in Figure 20 that is attached to the link strand labeled as A. If the link strand A points out of (into) the paper, we then have m a = −1 (m a = −1).
• The sign σ ∈ {±1} for a leg is defined as follows. We first realize as a transverse intersection of two surfaces (which we call thickenings in the following) in M , associated to the two ends of . Each thickening is a union of ij-half-leaves.
For an end p of which lies on the link L, the corresponding thickening is just the union of all ij-half-leaves beginning at points p near p on L. For an end p which lies on an internal vertex v, the thickening is defined by induction, as follows.
We consider the other two legs , incident on v, and we denote their common endpoint on v as q. Let the ends of be q and q , and likewise let the ends of be q and q . We assume we already know the thickening of associated to the end q , and likewise for . The intersection of these two thickenings is a curve passing through q; we think of this curve as a kind of virtual link segment on which q lies. This procedure is illustrated in Figure 21, where we show a virtual link segment in red, obtained as the intersection of two thickenings associated with q and q . We can then proceed as if q were lying on the actual link L: we obtain a thickening of by taking the union of all ij-half-leaves beginning at points near q on the virtual link segment. In this way we inductively obtain thickenings of all legs, and a virtual link segment passing through each end of each leg.
Each virtual link segment has a canonical orientation: let v in denote a vector pointing into q along a leg of type ij with its i-orientation, and let v out denote a vector pointing out of q along a leg of type ki with its i-orientation; then v in × v out · t > 0, where t is a positively oriented tangent vector to the virtual link.
Finally, once we have defined the (actual or virtual) oriented link segments passing through the two ends of , we are ready to define the sign σ . Namely, projecting these two link segments to the ij leaf space we get a crossing; the sign σ = +1 if this crossing is an overcrossing, σ = −1 if it is an undercrossing.
Note that making the transformation x 3 → −x 3 sends m a → −m a , and also sends σ → −σ when is one of the K − 3 legs connecting two internal vertices; thus it changes σ by a factor (−1) K−3 . These changes in (2.7) are equivalent to taking q → q −1 , as expected since the map x 3 → −x 3 reverses the orientation of M .

Weight factors for more general trees
We can also consider webs with the topology of a tree which has some ends on branch points and some ends on the link L, like the one depicted in Figure 15. In this case we obtain a weight factor which is a hybrid of the detour and tree factors above. Namely, we take the factor (2.7) as before, where the index a still runs only over those ends which are attached to the link; for the legs attached to branch points we adopt the rule mentioned at the end of subsubsection 2.4.4 (namely, don't include any explicit extra factor and don't count the ij leaf space winding along these legs).
In the examples in section 4 we will not meet this kind of web, but we expect that such webs should appear when we explore further away from the almost-degenerate locus of the Coulomb branch. Such webs come in a continuous family bounded by two limiting configurations. One limit is a web containing a loop with six vertices where one vertex is directly attached to a link strand; this limit is shown in pink. The other limit is a tree with a self-intersection; this limit is shown in light blue. The vertex of the limiting web that is directly attached to a link strand is called the critical vertex below.

Weight factors for webs containing one loop
In simple examples (including all the examples we will discuss in section 4 below), all of the webs that appear are trees. In more complicated cases, however, there can be webs containing loops. We have not completely determined the weight factors associated with webs containing loops; we leave that to future work. However, we did explore the case of webs which contain exactly one loop.
Such webs come in continuous families, bounded by two limiting configurations. One limiting configuration is a web containing a loop which is directly attached to one of the link strands. The other limiting configuration is a trivalent tree in which two of the legs cross one another. An example illustrating both limiting configurations bounding a family of webs with one loop is shown in Figure 22.
Since webs with one loop come in a continuous family, our usual prescription for the quantum UV-IR map lead to an infinite sum coming from all members in this continuously family. A crucial fact is that all the webs in the interior of such a continu-ous family are all isotopic, therefore their contributions to the F (L) could be summed together and treated as a single contribution. Concretely we can choose any single representative web from the interior of this continuous family and only use this representative to build the lifted links L, where the total contribution from the continuous family is absorbed into the weight factor associated with this single representative.
As usual, we need to include a weight factor associated with this web. By performing an isotopy which kills the continuous family (dragging the link strand where the critical vertex is attached towards the interior), we have determined the necessary weight factor: where α tree is the weight factor associated with the limiting web with a tree topology (e.g. the light blue web illustrated in Figure 22) using the rules described in subsubsection 2.4.5. 15 The extra factor q := q 1 2 is determined by two pieces of data associated with the critical vertex: • 2 is determined by the type of the critical vertex, as follows. There are two types of trivalent vertices, as shown in Figure 23; they differ in the orientation of leaves corresponding to the three legs. We assign 2 to be ±1 according to the type, as indicated in Figure 23.

Bootstrapping the weight factors α( L)
In this section we briefly describe the bootstrap-like method which we used to determine the weight factors α( L), which are important ingredients in the construction of quantum UV-IR map described in subsection 2.4. We used two properties of the quantum UV-IR map F : • Given a framed oriented link L in M , F (L) must only depend on the ambient isotopy class of L. This puts very strong constraints on F , as there are a large number of ambient isotopies which need to be respected by the map F .
• F must be a homomorphism from the UV skein algebra Sk(M, gl(N )) to the IR skein algebra Sk( M , gl (1)): said otherwise, it must respect the UV skein relations, up to the IR skein relations.
Our general strategy is to cook up isotopies which relates webs with K legs to webs with less than K legs; an example of such isotopies is illustrated in Figure 24. This kind of isotopies allow us to solve for the weight factors in a recursive way. O Figure 24. Here we demonstrate an example of an isotopy used to obtain the weight factors associated with webs. We show link segments (in blue) contained in a small contractible region inside C × [0, 1]. The relevant isotopy move here is dragging part of a link segment (denoted as A in the figure) past an internal vertex (denoted as O) along the arrow direction. The configuration before this isotopy is shown on the left, where a single 5-legged web (green) is stretched between the link segments. After the isotopy, the 5-legged web disappears; instead we have two 3-legged webs (red) and 4 exchanges (black).
Concretely, we proceed as follows. We tune the link configuration to single out a K-legged web lying in a small contractible region. For example, in Figure 24 we show on the left a 5-legged web attached to four link segments. Then we perform an isotopy which deforms part of a link segment near the point where it is attached to the web, stretching it past an internal vertex of the web. After making such an isotopy, the original K-legged web disappears, and we end up with (multiple) webs with fewer legs. This procedure is illustrated in Figure 24. As F (L) should be the same before and after the isotopy, we obtain an equality relating the local factor for a K-legged web to those for webs with less than K legs. This enables us to determine the local web factors in an inductive way.

Comments on possible derivations of the weight factors
As described earlier, we obtained various local contributions to the weight factors α( L) using bootstrap-like methods, by exploiting the homomorphism property of F and isotopy invariance. It would be very desirable to give a physical derivation for these factors, perhaps in the context of twisted Ω-deformed 5d N = 2 super Yang-Mills theory on M × R 2 with insertion of a fundamental Wilson line along L ⊂ M , as described in subsection 2.2. We leave this to future work.
We can also uplift the setup back to 6d, where the quantum UV-IR map is interpreted as the correspondence mapping a surface defect in the strongly-interacting 6d (2, 0) gl(N ) theory to combinations of surface defects in the abelian (2, 0) theory at a point of the tensor branch. In this context, the WKB webs stretched between link segments correspond to dynamical BPS strings in the 6d theory. It would be very interesting to derive the weight factors α( L) from the 6d point of view, taking into account contributions from the 6d abelian theory as well as contributions from the worldvolume theory of the BPS strings. We leave this derivation to future work.
As one comment, we notice that the weight factor (2.7) associated with a tree web is proportional to (q − q −1 ) P −Q , where P is the total number of legs in the tree web (including the internal legs) and Q is the total number of trivalent vertices. The simplest example of a tree web, namely an exchange, has P = 1, Q = 0 and contributes a weight factor proportional to (q − q −1 ). As already pointed out in [3] (see also [75]), this factor can be interpreted as counting the ground states on the BPS string stretched between two strands of the link. Concretely this string has two states which differ by 1 in fermion number and angular momentum. 16 Similarly we can also hope to interpret (q −q −1 ) P −Q as counting the ground states for the BPS string web stretched between link strands. For example, it might be possible to consider an effective quantum mechanical model, which assigns two Majorana fermions to each leg of the string web. Each internal vertex represents a certain interaction lifting off some of the degenerate states. It would be interesting to pursue this direction.

Comments on isotopy invariance
In the case of N = 2, we gave a sketch proof in [1] that the F we constructed indeed has the expected isotopy invariance and homomorphism properties, by checking that it behaves correctly under a set of Reidemeister-type moves. In so doing we were 16 Recall that our definition (1.3) for protected spin character contains q 2J instead of q J aided by the fact that we only had to consider one foliation, and everything was (in an appropriate sense) local in the two-dimensional leaf space of that foliation. For N ≥ 3 we do not have this kind of locality available in general, and so it seems more difficult to find an appropriate finite set of Reidemeister-type moves. Thus we have not been able to prove the full isotopy invariance or the homomorphism property for the F we construct; however, they must be true if our physical picture is correct. It would be very desirable to give a proof.
Lacking a full proof, we have conducted various experimental checks, mostly with computer assistance (see Appendix A for some discussion of the algorithms). For instance, we generated random polygonal knots with n ≤ 8 vertices in R 3 and verified that in all cases our recipe produces the expected polynomial invariants. We also studied various examples of knots on surfaces, again obtaining the expected results in all cases. A few of these checks are described in more detail in section 4 below.

The limit of almost-degenerate foliations
In this section we consider an important simplifying limit, where the quantum UV-IR map becomes much easier to compute. This limit was previously considered in [76].
Recall that the 1-forms λ i which determine the WKB foliations are determined by an equation of the form where φ r is a meromorphic r-differential on C. Now suppose we take φ 1 = 0 and take φ 3 to be much smaller in norm than φ 2 . Then the λ i can be written locally, to first order in φ 3 , as Thus we have (writing λ ij = λ i − λ j ) In particular, all three of these have approximately the same phase (that of √ φ 2 ), so that the three local foliations collapse approximately to one foliation F approx . If we take φ 3 = 0, then they collapse exactly.

The case of R 3
Let us consider the case where C = C, so M = C × R R 3 . As we have stated in (1.6), in this case we must have F (L) = q 3wr(L) P HOMFLY (L, a = q 3 , z = q − q −1 ). (3.4) This must hold no matter what we choose for the WKB foliations, and in particular it must hold if the WKB foliations are nearly degenerate as just discussed. In this section we will describe more explicitly how this happens.
To be definite, we take From (3.3) we then have Thus the three WKB foliations approximately coincide with the foliation F approx whose leaves point in the x 1 -direction, where z = x 1 + ix 2 . See Figure 25 for the picture in the x 1 -x 2 plane. This choice leads to a simplification of the UV-IR map, as follows. For a generic link L, the only type of webs which occur are exchanges. Moreover, these exchanges occur in clusters: if L crosses a leaf of F approx at two points, there is a cluster of 3 possible exchanges near the crossing points. See Figure 26 for a sample picture. The possible lifts involving such a cluster of exchanges depend on which way the link segments are oriented and on the sign of Im . Fortunately, though, by enumerating all cases, one finds that they can be captured by a simple "effective" rule which is independent of this sign. Thus in what follows we will not need to worry about the sign of Im . 17 17 Concretely, this effective rule can be described as follows. We allow lifts including a single detour along any one of the 3 exchanges. However, instead of the N = 3 exchange weight from subsubsection 2.4.3, we use the simpler N = 2 exchange weight given in [1]. This means that the prefactors q ±2 in the first two columns of Figure 17 are replaced by q ±1 , and the extra prefactor q δ is omitted. Now suppose given a framed link L in M = C × R R 3 , such that the projection of L to the x 2 -x 3 plane is a smooth link diagram, with all crossings transverse. By a small isotopy we may standardize the restriction of L to a domain R × D c , where D c denotes a small disc in the x 2 -x 3 plane containing the crossing c: we require that it enters and exits pointing in the positive x 2 -direction, as shown in Figure 27. We decompose M into a collection of cylinders R × D c and the complement R × P . Importantly, all of the leaves of the WKB foliations are oriented approximately in the x 1 direction, which runs parallel to the domain boundaries, and thus the computation of F (L) does not involve any webs or exchanges which cross from one domain to another. (There are exchange contributions to F (L), but they are localized around the crossings in the link diagram, so each is contained in a single domain.) This fact means that the desired F (L) can be computed by first applying the UV-IR map in each domain independently, then gluing together the resulting lifted paths in all possible ways, subject only to the rule that the sheet labels on the lifts L have to match at the boundaries.
The results from the individual domains are as follows: • In each cylinder D c × R the result is given by one of the lines of Figure 28.
Moreover, we do not include any extra tangency factors associated to the detour; thus in this effective description the only tangency factors come from places where L itself is tangent to a WKB foliation. We include the winding of the lifts L as usual. • For the complement P × R the result is given by the sum over direct lifts L, with no contributions from webs or exchanges. The direct lifts correspond to labelings of the components of L ∩ (P × R) by sheets i ∈ {1, 2, 3}. Each lift L comes with a weight α( L), which is a power of q, determined as follows. For each component s, let w(s) be the counterclockwise winding number of s in the x 2 -x 3 plane, 18 and let i(s) be the label on s. Then α( L) = s q 2(2−i(s))w(s) .
We now describe the result of gluing together these local contributions directly. Let a labeling of the knot diagram be an assignment of a label i ∈ {1, 2, 3} to each arc. For any labeling and crossing c, let β( , c) denote the weight factor with which the labeled crossing c appears in Figure 29, or β( , c) = 0 if this crossing does not appear in the figure. Then define an overall weight for the labeling by where w i ( ) is the sum of the windings of the arcs labeled i. Finally, F (L) is the sum over all labelings, The formula (3.8) for F (L) is similar to the vertex model for the Jones polynomial. This is not surprising since we already know that F (L) should be computing a specialization of the HOMFLY polynomial, (3.4). We have made various experimental checks that (3.8) indeed computes (3.4), some of which we will see in section 4 below. One way to derive this relation would be to connect (3.8) to the standard construction of knot invariants from quantum groups [77], in the case of U q (gl 3 ). In this interpretation, the labels i on the arcs run over a basis for the fundamental representation of U q (gl 3 ), and the contributions from crossings in Figure 29 come from the R-matrix.

Fock-Goncharov type foliations
Next we consider the case where C is a compact Riemann surface and φ 2 , φ 3 are meromorphic, again with φ 3 φ 2 in norm, and φ 1 = 0. We assume the setup is generic, in the sense that all zeroes of φ 2 are simple, no period √ φ 2 is real, and φ 2 has at least one pole of order at least 2. In this case φ 2 induces an ideal triangulation of the surface C, the WKB triangulation described in [42]; the vertices of the triangles are poles of φ 2 , and each triangle has exactly one zero of φ 2 in its interior.
The 3-sheeted covering Σ → C and the WKB foliations in this case are discussed in [76]. Here we briefly recall the main points. When φ 3 = 0 the branch points are the zeroes of φ 2 , with order-2 monodromy around each. Turning on a small φ 3 causes each branch point to split into a group of 3 nearby branch points (to see this note that the branch points are zeroes of the discriminant, ∆ = 4φ 3 2 − 27φ 2 3 .) The 3 foliations are essentially independent near the branch points, while far from the branch points they are closely aligned, and approximately make up a single foliation which we call F approx .
An example of critical leaves before and after such a splitting is shown in Figure 30. In the following, we will make the assumption that the perturbation φ 3 is chosen in such a way that the picture in each triangle looks as in that figure. (In each of the explicit examples we consider below, we exhibit an explicit φ 3 which does the job.) Some non-critical leaves are shown in Figure 31. Figure 31. Some examples of non-critical leaves. The two pictures here correspond to the two pictures in Figure 30 above. In the left picture, we only have one foliation. In the right figure, this one foliation has been perturbed into three distinct foliations. Far from the branch points, we have φ 3 φ 2 and the three foliations are close to the single foliation F approx ; near the branch points, the three foliations are far from parallel.
The charge lattice in these examples has a natural basis [76], which we now recall. It has two elements γ 1 E , γ 2 E associated to each edge E of the triangulation, and one element γ T associated to each triangle T . To fix the choice of which element to call γ 1 E and which to call γ 2 E , we make an auxiliary choice of orientation of E. See Figure 32. This basis is adapted to the cluster structure on moduli spaces of flat SL(3, C)connections [6]: indeed, as explained in [76], the spectral coordinates X γ associated to the basis elements give the cluster coordinates. Now we consider a link L ⊂ C × R. By an isotopy if necessary, we can arrange that L stays away from the branch points. In this case, if L is in generic enough position there will be no contributions from BPS webs involving trivalent junctions; the only BPS webs we have to consider are either exchanges or detours. The structure of the exchanges and detours is determined by how the link L sits relative to the foliation F approx , as follows.
First, suppose L meets a non-critical leaf of F approx at two distinct points. In this case there is a cluster of 3 possible exchanges, as indicated in Figure 33 below. Here we do not show all the lifts explicitly; we just remark that the effect of this cluster can be efficiently captured by the effective rules described in subsection 3.1, just as for the clusters that appear in the case M = R 3 . Second, suppose L crosses a critical leaf of F approx . In this case there will be a cluster of 3 possible detours near the crossing, as indicated in Figure 34.   Figure 35. Four lifts of a link segment crossing a critical leaf of F approx , using the detours shown in Figure 34.
Summing up all the contributions from these exchange and detour clusters, and including all the factors according to the general scheme set out in subsection 2.4, one obtains F (L).
We remark that this recipe for computing F (L) closely resembles the rules of [5], and we expect that (after suitable minor changes reflecting differences in conventions) the two computations are the same. In [5] the detour clusters appeared explicitly, just as they appear here. The exchange clusters, on the other hand, did not appear in [5] explicitly; instead there are R-matrix factors put in "by hand" which play the same role.

Examples
In this section we illustrate our computation of F (L) for various examples of links L.
In the first few examples we work out everything by hand, to give a concrete indication of how our scheme works; in later examples this is infeasible, so we summarize the results of computer computations. (To reproduce these computations one can use the code supplied with the arXiv version of this preprint; see Appendix A.)

A simple unknot
We consider the case N = 3 and C = C, with Thus the covering C is simply given by so the three sheets are λ i = e πi(−1/2+2i/3) dz, (4.3) and in particular there are no branch points. The WKB foliations are as shown in Figure 36. We consider an unknot L in M = R 3 , as shown in Figure 37.  There are three direct lifts L 1 , L 2 , L 3 , and three lifts involving exchanges, shown in Figure 38.
Summing these contributions gives the expected result,

An unknot around a branch point
Now we consider a more interesting example, as follows. We take C = C again, but now let the 1-forms λ i be Then we consider an unknot L ⊂ M whose projection to C is a small loop around z = 0, with a particular profile in the x 3 -direction, as pictured in Figure 39 below.  Figure 39. An unknot L ⊂ M = R 3 . The x 3 -coordinate increases as we traverse the loop, except for a very small region where it decreases. We show, in black, all ij-leaves which participate in BPS webs: this includes in particular the three critical leaves emerging from the branch point at z = 0. We also show, in green, the directions of ij-leaves at tangencies to L or its lifts; these are used in the computations of tangency and winding factors.
The link L has 8 lifts L 1 , . . . , L 8 . For each lift, we show in Figure 40 which BPS webs contribute to the lift, and the sheet label for the lift of each segment of L. We also show the lifted path L 5 explicitly in Figure 41.
There are five lifts L 1 , . . . , L 5 which only involve sheets 1 and 2; these look just like the lifts in the case of a loop around a branch point in the gl(2) theory, shown in Figures 25-27 of [1]. There are also additional lifts L 6 , L 7 , L 8 in which some segments of L get lifted to sheet 3.

An unknot with a three-leaf web
Our examples so far have only involved exchanges and detours, the same basic phenomena one meets in the N = 2 case. Next we consider a more interesting example, the unknot shown in Figure 42. To clarify the notation, in the knot examples containing webs (both in the paper and in the auxiliary code files), we denote external legs of the webs as leaves. Figure 42. A polygonal unknot L in M = R 3 . We show the projection to the x 1 -x 2 plane; the labels "u" and "d" (for "up" and "down") next to link segments indicate how the segment is oriented in the x 3 -direction. We also show all possible BPS strings which can attach to L: there is one exchange (black) and one three-leaf web (dark red). The WKB foliations are as shown in Figure 36.
This link has one exchange and one three-leaf web. There are 5 lifts: 3 direct lifts L 1 , L 2 , L 3 to the 3 sheets, a lift L 4 which uses the exchange, and a lift L 5 which uses the three-leaf web. As we have remarked, the webs in this example were determined using a computer program, which for computational convenience operates on polygonal links; see Appendix A. To apply our rules to compute the winding and tangency factors in this situation, one should imagine that the corners are very slightly rounded off. Then we obtain the following: Again the sum is This example serves as a check on our formula for the contribution from a tree, in subsubsection 2.4.5. The link L shown in Figure 43 is an unknot. It has 11 lifts: 3 direct lifts, 4 lifts which use exchanges, 3 lifts which use three-leaf webs, and 1 lift which uses a four-leaf web. Applying the rules to evaluate the contribution for each of these 11 lifts and summing the results, we obtain the expected F (L) = q 2 + 1 + q −2 . Figure 44. A polygonal trefoil L in M = R 3 . Notation is as in Figure 42. As before, we show all BPS strings which can attach to L; in this case there are only exchanges and three-leaf webs.

A trefoil
The link L shown in Figure 44 is a trefoil. It has 23 webs attached (16 exchanges and 7 three-leaf webs). Enumerating the possible lifts one finds that there are 43 in total; many of the lifts use multiple webs, and 2 of the three-leaf webs are not used in any lift. Applying the rules and summing the 43 contributions we obtain F (L) = −q 5 − q 3 + q −1 + 2q −3 + q −5 + q −7 , matching the expected link polynomial.

The once-punctured torus
Now we let C be a torus with one puncture. We take the puncture to be "full" in the language of [41], i.e. we consider φ 2 with a second-order pole and φ 3 with a third-order pole. We can view C as obtained by gluing in a cylinder to two of the three punctures on a three-punctured sphere. It follows that the corresponding field theory of class S[gl 3 ] is (up to the decoupled gl 1 part) obtained by gauging a certain SU (3) subgroup of the E 6 global symmetry of the Minahan-Nemeschansky theory.
Let φ 2 be a meromorphic quadratic differential with a second-order pole at the puncture, chosen so that the WKB spectral network is as shown in the leftmost frame of Figure 45, and take φ 3 to be a small perturbation, so that the WKB spectral network is as shown in the second frame. 19 Then we are in the almost-degenerate situation described in section 3, and we can use the simplified rules there to compute the UV-IR map. 19 Concretely, Figure 45 was drawn using the following choice. Let C be the square torus, with modulus τ = i. Let ϑ(z) be the Jacobi theta function specialized to τ = i; this function has a zero at z = 0. Then we take z 1 = 1 where y i are the three nontrivial 2-torsion points, and = 1 200 . Figure 45. Far left: a spectral network on the punctured torus, made up of critical leaves associated to φ 2 described in the main text, and φ 3 = 0. Middle left: a spectral network associated to the same φ 2 and the small perturbation φ 3 described in the main text. Middle right and far right: two loops on the punctured torus.
We consider two line defects in this theory, associated to the loops L 1 and L 2 shown on the right in Figure 45. Because these are simple closed curves on C they correspond to 1 2 -BPS line defects (more general links in C × R would represent 1 4 -BPS line defects [1]).
The IR images F (L 1 ) and F (L 2 ) are independent of the profile we choose in the x 3 -direction for the links L 1 and L 2 , since any two choices differ by an isotopy. It is possible, and convenient, to make a choice of profile for which there are no exchanges or higher webs, only detours. These detours occur in clusters where L 1 or L 2 meets the spectral network, as we described in subsection 3.2. Enumerating all the lifts and summing their contributions is not a task for a human, at least with the methods we have described here; we implemented it in a Mathematica program, see Appendix A.
To describe the result, we recall that the IR skein algebra is a quantum torus, with generators X γ as discussed in subsection 2.1. The coefficient of a given X γ in F (L) gives the number and spins of the framed BPS states with charge γ ∈ Γ for the line defect L. To describe the charge lattice Γ = H 1 ( C, Z), we use the ideal triangulation shown in Figure 46. Recall from subsection 3.2 that there is a canonical 1-cycle γ Ta on C associated to each triangle T a , and two cycles γ b Ea associated to each edge E a . These cycles together make up a basis of the charge lattice in the sl(3) theory. To complete this to a basis of the full charge lattice H 1 ( C, Z) for the gl(3) theory, we need to add two more cycles, subject only to the condition that their projections to C generate H 1 (C, Z). We choose the cycles γ A , γ B shown in Figure 47. Then altogether we have a basis for Γ, and we represent a general charge γ ∈ Γ as a vector in Z 10 giving the expansion relative to this basis. Now we can state the results: • F (L 1 ) is a sum of 8 terms X γ , all with coefficient 1:  • F (L 2 ) is a sum of 19 terms X γ with coefficient 1 and 8 terms X γ with coefficient (−q − q −1 ): We remark that these answers have the expected positivity property when expanded in powers of −q, and moreover they are characters of representations of SU (2) P ; these properties are as expected for the framed BPS spectra of 1 2 -BPS line defects in 4d N = 2 theories [18].
Next we consider the specialization to q = −1 and X γ = 1: this gives the total dimension of the space of framed BPS states. We find F (L 1 ) = 8, F (L 2 ) = 35. On the other hand, in [1] we discussed the analogous computation in the gl(2) theory instead of gl(3), with the same surface C, the same links L 1 , L 2 , and the same φ 2 ; there the same specialization gives F (L 1 ) = 3, F (L 2 ) = 6. These results are related by F gl(3) = F 2 gl(2) − 1. This relation is expected on general grounds: it comes from the fact that if ρ : GL(2) → GL(3) denotes the symmetric square representation then Tr ρ(A) = (Tr A) 2 − 1, and that the symmetric square map on moduli spaces of flat connections maps the SL(2)-connection with all X γ = 1 to the SL(3)-connection with all X γ = 1. 20 Finally we remark that these results for F (L 1 ) and F (L 2 ) agree with computations of the sl(3) quantum trace of [9] for the loops L 1 and L 2 , performed by Daniel Douglas. This gives support for the hypothesis that the quantum UV-IR map on a triangulated surface agrees with the sl(3) quantum trace of [9]. We thank Daniel Douglas for very helpful related discussions.

4.7
The SU (3) gauging of two copies of Minahan-Nemeschansky E 6 theory Next we consider the class S theory with C = CP 1 , g = gl 3 and 4 full punctures, which is (up to the decoupled gl 1 part) a gauging of a diagonal SU (3) flavor symmetry in two copies of the Minahan-Nemeschansky E 6 theory [41].
To study the UV-IR map we proceed as we did in subsection 4.6: let φ 2 be a meromorphic quadratic differential on C with second-order poles at the punctures, chosen so that the WKB triangulation is the standard tetrahedral triangulation of C, and take φ 3 to be a small perturbation. See Figure 48. Figure 48. Far left: a spectral network on the four-punctured sphere, made up of critical leaves associated to φ 2 described in the main text, and φ 3 = 0. Middle left: a spectral network associated to the same φ 2 and the small perturbation φ 3 described in the main text. Middle right and far right: two loops on the four-punctured sphere.  Figure 49. The WKB triangulation associated to the spectral networks shown in Figure 48, with the 3 edges and 2 triangles numbered, and an auxiliary choice of orientation fixed on each edge.
As we did in subsection 4.6 we introduce a basis for the charge lattice H 1 ( C, Z): 4 cycles associated to the triangles, 12 associated to the edges, and 3 additional cycles for the extension from sl(3) to gl(3), depicted in Figure 50. Altogether the basis is 11) and we represent the charges γ relative to this basis as elements of Z 17 . Then, again by computer-aided calculation, we find: • F (L 1 ) is a sum of 48 terms X γ , all with coefficient 1:  Thus the line defect L 1 has 48 framed BPS states, all with distinct charges, and all with spin zero.
• F (L 2 ) is more interesting; there are 707 X γ which appear with coefficient 1, 192 X γ with coefficient (−q − q −1 ), and 16 X γ with coefficient (q 2 + 2 + q −2 ): Thus the line defect L 2 does have framed BPS states with spin 1 2 and spin 1; the spin 1 2 multiplets appear by themselves, while every multiplet of spin 1 is accompanied by a multiplet of spin 0 with the same charge.
The full forms of (4.12) and (4.13) are given in a Mathematica notebook included with the arXiv version of this paper.
Moreover, again these results agree with computations of the sl(3) quantum trace of [9], performed by Daniel Douglas.

A Computer computations
In section 4 we reported the results of various computations, most of which were done with computer assistance. In this section we briefly describe the algorithms involved.

A.1 For computations in M = R 3
For the computations in M = R 3 reported in section 4, we begin by fixing a polygonal link L ⊂ R 3 , with vertices either chosen by hand or randomly generated. To compute F (L), the main difficulty is to somehow identify all possible webs which can attach to L. For this purpose we proceed as follows. (We discuss here only the simple case where there are no webs containing loops; when there are loops, the problem becomes more complicated.) For any line segment S in R 3 , we let P ij (S) denote a strip in R 3 , with boundary S and foliated by half-leaves of the foliation F ij . We begin by collecting the strips P ij (S) for all possible ij and all segments S of the link L. We then iteratively add new strips to the collection as follows. We look at all the strips in the collection and compute their intersections. If P ij (S) intersects P jk (S ), then their intersection is a segment S , and we add to our collection a new strip P ik (S ). We then check to see whether this new strip intersects any of the old ones; if it does, each such intersection may generate a new strip, and so on. We continue this iterative process until there are no new intersections.
Once this process terminates, we look for intersections between strips P ij (S) and P ji (S ) in our collection. When such a "head-on" intersection exists, the intersection segment is a leaf of F ij . If S and S are both segments of L, then such an intersection is a leaf of F ij with both ends on L, i.e. it is an exchange. More generally, S and S may have been generated from intersections of other strips. In this case the intersection segment is not an exchange but rather a piece of a larger web. Our algorithm collects a list of these intersection segments and afterward pieces them together into webs. See Figure 51. Figure 51. The picture in R 3 generated by applying our web-finding algorithm to three short link segments. Each of the link segments (blue) emits six strips (gray). When strips of type ij and jk intersect in a segment (green), they can give birth to an additional strip. When a strip of type ij intersects a strip of type ji, the resulting intersection segment is part of a web; in this example there are just three such segments, which make up a single three-string web (red).
Once the webs have been identified, there are no major conceptual difficulties in enumerating all possible lifts, and calculating the factors associated with each lift according to the rules of subsection 2.4. Having done so, since M is a disjoint union of copies of R 3 , each lift can be reduced using the GL(1) skein relations to a multiple of the empty link. Practically speaking, this reduction just requires us to compute the writhe of the link diagram with respect to some projection, which is straightforward.
We implemented these algorithms in a Python program which we used to make the various computations in R 3 reported above. The code (unfortunately very lightly documented), and a sample Jupyter notebook sample-computations.ipynb which can be used to reproduce the results reported in subsection 4.3-subsection 4.5, are included as auxiliary files with the arXiv version of this preprint. This algorithm heavily exploits the fact that M = R 3 and all of the foliations are by straight lines. One could imagine a version of this algorithm which would work in more general examples, by dividing M up into domains, choosing coordinates in each domain for which the leaves are straight lines, and introducing rules for patching the domains together at their boundaries. This would be in the spirit of a well-known maneuver in the study of compact Riemann surfaces carrying holomorphic quadratic differentials: such a surface can always be obtained by starting with a polygon in C carrying the quadratic differential ϕ = dz 2 , and then gluing the edges together via maps of the form z → ±z + c.

A.2 For computations on a Riemann surface C, with nearly degenerate foliations
For the computations in M = C × R reported in section 4, we proceed differently. As explained in subsection 3.2, since we are working in the limit of nearly degenerate foliations, all the BPS web contributions come from exchanges, clustered around places where L meets a critical leaf of F approx or where L meets a generic leaf of F approx twice These are simple enough to enumerate by hand, given a picture of L (including its profile in the x 3 direction) and the foliation F approx . Once these exchange clusters have been found, the remaining job is to enumerate the lifts L, compute their weights correctly, and express them in terms of the basis elements X γ associated to the triangulated surface. Implementing this in code requires a lot of tedious bookkeeping, but it is conceptually straightforward, following the rules we described in subsection 3.2. We construct a representation of each path as a linear combination of basic 1-chains on M , and then solve a system of linear equations to express the path as a linear combination of the X γ plus boundaries of 2-chains.
We implemented these computations, in various examples, in a Mathematica notebook; in particular this notebook can be used to reproduce the results reported in subsection 4.6-subsection 4.7. This notebook is included as an auxiliary file state-sums.nb with the arXiv version of this preprint.