Elliptic Quantum Curves of Class $\mathcal{S}_k$

Quantum curves arise from Seiberg-Witten curves associated to 4d $\mathcal{N}=2$ gauge theories by promoting coordinates to non-commutative operators. In this way the algebraic equation of the curve is interpreted as an operator equation where a Hamiltonian acts on a wave-function with zero eigenvalue. We find that this structure generalises when one considers torus-compactified 6d $\mathcal{N}=(1,0)$ SCFTs. The corresponding quantum curves are elliptic in nature and hence the associated eigenvectors/eigenvalues can be expressed in terms of Jacobi forms. In this paper we focus on the class of 6d SCFTs arising from M5 branes transverse to a $\mathbb{C}^2/\mathbb{Z}_k$ singularity. In the limit where the compactified 2-torus has zero size, the corresponding 4d $\mathcal{N}=2$ theories are known as class $\mathcal{S}_k$. We explicitly show that the eigenvectors associated to the quantum curve are expectation values of codimension 2 surface operators, while the corresponding eigenvalues are codimension 4 Wilson surface expectation values.

In this paper we focus on 6d SCFTs arising from N M5 branes probing C 2 Z k singularities. When compactified on a 2-torus T 2 , BPS partition functions of such theories have been computed in [15,16] (k = 1) and [17] (k > 1). As it turns out, a crucial property of these partition functions is that they can be expressed in terms of an infinite sum over elliptic genera of BPS strings wrapping the torus. These elliptic genera are Jacobi forms with modular parameter τ , being the complex structure of the torus, and several elliptic parameters arising from gauge, flavour, and R-symmetry chemical potentials. Using the correspondence described in the first paragraph, the torus-compactified theory can be equally understood as a circle compactification of a 5d gauge theory whose moduli space of vacua also carries this elliptic structure [18]. In particular, the corresponding Seiberg-Witten curve can be expressed in terms of a polynomial in a variable t whose coefficients are Jacobi forms v l of an elliptic parameter z: (1.1) A central question is about the interpretation of this curve as a quantum curve. To this end, the variables w and z are promoted to operators satisfying a non-trivial commutation relation Interpretingẑ as a position operator, by the above commutation relationŵ becomes a momentum operator and Y ≡ e −ŵ will be a shift operator. In this framework the algebraic curve equation (1.1) becomes a difference equation in the sense that the operatorĤ(ŵ,ẑ) acts on a wave-function with zero eigenvalue. This notion of a quantum curve is intimately related to partition functions arising from surface defects in gauge theories [19]. In this interpretation the wave-function annihilated by the operatorĤ(ŵ,ẑ) is the expectation value of a codimension 2 defect operator. In the context of our 6d SCFT such defect operators arise from half BPS operators extended over T 2 × R 2 and localised at a point on the remaining R 2 . Localisation is done by turning on the Omega-background R 4 1 , 2 × T 2 [15,20] and ̵ h is identified with 1 , while 2 is sent to zero in the Nekrasov-Shatashvili limit [21]. The theory living on the defect flows in the IR to a 4d N = 1 SCFT and in some instances the defect partition function in the NS-limit can be understood as the superconformal index of this SCFT on S 1 × S 3 [22]. In this correspondence, the S 3 is understood as a Hopf-fibration of a circle over a two-sphere such that the two circles are identified with T 2 and the two-sphere is identified with a compactification of R 2 .
From a more geometric point of view, 6d SCFTs can be engineered by compactifying F-theory on an elliptic Calabi-Yau manifold. Performing F-theory/M-theory duality, one observes that the BPS partition function of the theory on T 2 × R 4 1 , 2 corresponds to the refined topological string partition function of the Calabi-Yau manifold [15,17]. In this picture, the surface defect arises from an M5 brane wrapping a Lagrangian cycle inside the Calabi-Yau threefold and extended over S 1 ×R 2 transverse to the Calabi-Yau. The theory living on such a defect is expected to flow to a 3d SCFT with four supercharges coupled to the parent 5d gauge theory. Using the 3d/3d correspondence of [23], the partition function of the 3d SCFT is equivalent to the partition function of SL(2, C) Chern-Simons theory on a three-manifold which is a knot complement. As is well-known, the moduli space of flat SL(2, C) connections on the knot complement is characterised by the socalled A-polynomial A(z, w) where z and w characterise holonomies around the two cycles of the boundary torus. The equation A(z, w) = 0 then describes the subspace of those holonomies which can be extended to the entire three-manifold. The partition function of SL(2, C) Chern-Simons theory on the knot complement satisfies a difference equation which arises from the quantisation of the A-polynomial [24][25][26]. By the 3d/3d correspondence, the partition function of the 3d SCFT then satisfies the same difference equation. In the case of our 3d defect, the 3d SCFT is coupled to a 5d gauge theory and the A-polynomial receives a Q-deformation [27][28][29][30] where by Q we collectively denote the moduli of the 5d theory. The quantised Q-deformed A-polynomial can then be identified with our difference operator H(ŵ,ẑ). As our 5d theory arises from a 6d SCFT, we find that the difference operator is elliptic with elliptic modulus Q = e 2πiτ .
The concrete example, on which we focus in this paper, is the 6d SCFT arising from 2 M5 branes probing a Z k singularity. In this case, compactification on a two-torus leads to the following Seiberg-Witten curve [18] t + q φ where q φ ≡ e 2πiφ with φ being the tensor branch parameter of the 6d theory, the µ l denote collectively the flavour chemical potentials, and z l are complicated functions of gauge chemical potentials. For the definition of the theta functions ϑ 1 we refer to Appendix A.2.1. A central result of the present paper is that the defect partition function Ψ of the torus-compactified (or equivalently the circlecompactified 5d affine quiver gauge theory) satisfies the following difference equation corresponding to the quantisation of the above algebraic curve where we have identified with ⟨W⟩ the Wilson surface expectation value of a codimension 4 operator wrapping the torus to be further specified in the main text.
The remainder of this paper is organised as follows: After reviewing the 6d N = (1, 0) theory and its partition function, Section 2 details the inclusion of codimension 2 and 4 defects. For both cases, the partition functions are derived and evaluated up to order q 2 φ . Thereafter, the difference equation is derived in Section 3. In detail, starting from a path integral representation for the partition function of the codimension 2 defect, the corresponding saddle point equation naturally leads to a difference equation. Crucially, one contribution of the difference equation is identified with the partition function of the codimension 4 defect. The 6d theories originating from 2 M5 branes on a C 2 Z k family have 8 supercharges for k > 1, but 16 supercharged for k = 1. The analysis of this enhanced N = (2, 0) case is presented in Section 4, and compared to the dual 5d N = 2 theory. Finally, Section 5 provides a conclusion and outlook. Appendix A contains definitions and conventions used in the evaluation of the various partition functions as well as computational results. As a remark, most computational details are delayed to Appendix A in order to ease the readability of the main text.

Defects for M5 branes on A-type singularity
The 6d N = (1, 0) SCFTs originating from N M5 branes on a A-type singularity C 2 Z k are naturally labeled by two integers (N, k). For k = 1, the 6d world-volume theories have enhanced supersymmetry and are known as the A N −1 N = (2, 0) theories [31,32], whose 4d descendants are the A N −1 N = 2 theories of class S [33]. For k > 1, the resulting N = (1, 0) world-volume theories are well-studied [34][35][36][37] and their 4d descendants are the N = 1 theories of class S k [8]. In this section, the set-up is reviewed and, thereafter, defects of codimension 2 and 4 are introduced.

2 M5 branes on A-type singularity
In this work, the focus is placed on 6d N = (1, 0) SCFTs for N = 2. The M-theory set-up admits a dual realisation in Type IIA superstring theory. The 2 M5 branes become NS5 branes filling the space-time directions x 0 , x 1 , . . . , x 5 and being points in the transverse directions. The A-type ALE space C 2 Z k dualises into a stack of k D6 branes filling space-time directions x 0 , x 1 , . . . , x 6 , which are transverse to the original singularity. The set-up is summarised in Figure 1. The 6d N = (1, 0) low-energy effective theory living on the world-volume of the D6 branes is composed of M-theory TN k 0 1 2 3 4 5 6 7 8 9 10 S-dual and x 10 ↔x 1 Figure 1: Brane set-up for codimension 2 and codimension 4 defect. The theory without defect is realised via 2 M5 branes transverse to a Taub-NUT space TN k , which is a resolution of the C 2 Z k singularity. The isometries of TN k can be identified with the admissible 1,2 twists defining the Omega background and the U(1) b symmetry. The codimension 2 defect is realised via an additional M5 brane, while the codimension 4 defect corresponds to an M5 ′ brane. Assuming the M-theory circle is either along x 1 or x 10 direction, one arrives at two different Type IIA realisation. The reduction on x 1 leads to branes on a non-trivial TN k background, while the reduction on x 10 results in an intersecting brane configuration on a flat background. Further employing T-duality on either x 10 or x 1 , respectively, leads to two 5-brane web configurations, which are S-dual to one another. hypermultiplets and vector multiplets encoded in the following quiver diagram for 8 supercharges: and one tensor multiplet. The global symmetry SU(2k) y can be decomposed into SU(k) m,n , from the two stacks of semi-infinite D6 branes for x 6 → ±∞, and U(1) b , which is the C 2 Z k isometry.
As a remark, the general family, i.e. N M5 branes on a C 2 Z k or N NS5s intersected by k D6 branes in Type IIA, leads to a 6d N = (1, 0) quiver gauge theory on the tensor branch with global symmetry SU(k) m × U(1) × SU(k) n . For N = 2 there exists an accidental enhancement SU(k) m × U(1) × SU(k) n ⊂ SU(2k) as indicated in (2.1).
Partition function. In order to evaluate the partition function, the 6d theory is placed on where the 2-torus is along x 0,1 and the 4d Omega background R 4 1 , 2 fills directions x 2 , . . . , x 4 , see Figure 1. The two parameters 1 and 2 denote rotations in the x 2,3 and x 4,5 planes, respectively. The full partition function is composed of two contributions denoting the perturbative contributions Z pert and the non-perturbative contributions Z str . The perturbative part is fully determined by the 6d supermultiplets in (2.1) plus a single tensor multiplet. In contrast, the non-perturbative parts originate from the 2d N = (0, 4) world-volume theories of D2 branes filling x 0 , x 1 , x 6 directions, see Figure 1. The instanton string partition function can be written as sum of elliptic genera of the 2d theories: where φ is the vacuum expectation value of the scalar field in the tensor multiplet. The BPS partition functions have been computed for k = 1 in [15,16] and for k > 1 in [17]. In this work, the partition function of the 6d N = (1, 0) without defect is required for the computation of the normalised partition function in the presence of defects, see Appendix A.3.1. For completeness and concreteness, the details of Z pert and Z str are discussed in turn in the following subsections.

Perturbative contribution
Following [38], the perturbative single-letter contribution of the 6d supermultiplets are given as follows: where the {a i } gauge as well as the {m l }, {n l }, and b flavour charges of the hypermultiplets are derived from (2.1). The SU(k) a gauge as well as the SU(k) n,m flavour fugacities need to satisfy Moreover, p = e 2πi 1 , q = e 2πi 2 denote the Cartan generators of the rotation symmetries of the Omega background R 4 1 , 2 . The total perturbative contribution becomes which includes the contributions of the KK-modes generated by ∑ ∞ n=1 Q n = Q 1−Q , with Q = e 2πi τ .

Elliptic genus
To compute the l-th instanton string partition function Z l , one can add l D2 branes along the x 0 , x 1 , x 2 directions, see Figure 1. The D2 world-volume theory is a 2d N = (0, 4) effective theory, whose elliptic genera encode the Z l partition functions.
All these N = (0, 4) multiplets can be decomposed into N = (0, 2) multiplets as follows: From the decomposition, one can read off the charges of these N = (0, 2) multiplets as summarised in Figure 2. This 2d quiver gauge theory is known from [39] and reduces to the N = (0, 4) gauge Charge assignments of the fields in the 2d world-volume theory from the D2-D6-NS5 system with or without the presence of a D4 or D4 ′ defect, see Figure 1. Here J l , J r , and J I denote the Cartans of SU(2) l , SU(2) r , and SU(2) I respectively. U(l) is the 2d gauge group on the D2 world-volume. The U(k) a,m,n denote the 6d gauge and flavour symmetries, whose fugacities need to be subjected to the constraint (2.5) in order to reduce to SU(k) a,m,n . U(1) b is part of the 6d global symmetry. The U(1) x,z denote the defect groups for the D4 and D4 ′ defects, respectively. theory description for M-strings introduced in [17] for case k = 1. For completeness, the 2d quiver gauge theory with multiplets (2.8) can be written as with the conventions: circles ○ denote N = (0, 4) or N = (0, 2) vector multiplets, and squares ◻ are flavour nodes. In addition, for lines without/with arrows: solid lines denote hypermultiplets / chiral multiplets, and dashes lines denote Fermi multiplets, respectively. The arrow in N = (0, 2) bifundamental matter fields points towards that node under which the field transforms in the fundamental representation.
For a fixed number l of D2 branes, the partition function of the 2d N = (0, 4) theory placed on a torus T 2 , with complex structure τ , is known to coincide with the elliptic genus [40,41]. The non-perturbative contributions are then encoded in the elliptic genera for all l ≥ 1. The elliptic genus Z l for the 2d theory with gauge group U(l) on torus T 2 is computed by picking up N = (0, 2) supercharges Q ≡ Q 11 − and Q † ≡ Q 22 − , and evaluating l l p,q=1 p≠q where, inspired from [42,43], the following conventions have been used: Note, in particular, the change to ϑ 1 (τ z) defined in (A.13), which is more convenient than the Theta function θ 1 (τ z). Lastly, one needs to integrate the several 1-loop determinants (2.13) over the zero modes {u p }. As shown in [40,41], this integral becomes a contour integral. The contour integration needs to be performed with care, as the choice of integration contour determines whether the results yields the partition function or not. A consistent choice of contour is given by the Jeffrey-Kirwan residue prescription [44]. The expression becomes where the sum is taken over existing poles u ⋆ in the integrand Z 1−loop . For details on the computational aspects of the JK residue, the reader is referred to [40,41]. The following conventions are useful for the residue calculus of the elliptic genera: .
(2.16b) For the Nekrasov-Shatashvili limit, the following abbreviations are used: For later purposes, the l = 1, 2 genera are computed.
1-string. The l = 1 elliptic genus reads 18) and the details are presented in Appendix A.4.1.
2-string. The l = 2 elliptic genus reads and the derivation is summarised in Appendix A.4.2.

Enhancement of global symmetry
For the case of two NS5 branes, one needs to recover the global symmetry enhancement to SU(2k), as indicated in (2.1).
Perturbative part. The perturbative contribution of the 6d N = (1, 0) hypermultiplets can be rewritten as and one verifies that y l are SU(2k) fugacities via using (2.5).
Non-perturbative part. For the 2d elliptic genus (2.15), the Ψ, Ψ ′ Fermi multiplet contributions can also be rearranged with y l fugacities as defined in (2.21).

Higgs mechanism in partition functions
For later purposes, in which a codimension 2 defect is introduced via a position dependent vacuum expectation value (VEV), this section reviews the standard Higgs mechanism. To begin with, consider the Higgsing of the 6d gauge theory on the tensor branch: The first task is to find a suitable VEV assignment for a gauge invariant operator and then derive a condition in terms of fugacities for the gauge invariant operator that realises the Higgs mechanism on the level of partition functions.
and eliminating the contributions of the flat directions as well as any appearing Goldstone modes. Note that the condition for a k+1 in (2.28) is derived by requiring that the fugacity of the chiral Q k+1 k+1 orQ k+1 k+1 equals unity, respectively. In the Type IIA brane configuration, the mesonic Higgsing is realised via aligning a semi-infinite flavour D6 brane on the left and right hand side with a gauge D6 such that a single D6 is free to move along the Higgs branch directions x 7,8,9 , see Figure 3. The codimension 2 defect is introduced via a D4 brane that connects the remaining brane configuration with the single D6 on the Higgs branch. Moving the D6 to infinity in Figure 3, leads to the natural connection between defect via Higgsing and defect via additional branes, see also Section 2.3.
Perturbative contribution. Consider the perturbative partition function for 6d SU(k + 1) theory with N f = 2k + 2 flavours (2.29) The Higgsing (2.28b) takes the form where the Goldstone modes for the breaking of the global symmetry contribute as such that there are 4k +2 massless chiral fields. Considering the Higgsing (2.24), one computes that the sub-space of the Higgs branch, where the theory is broken to SU(k), has complex dimension 4k + 2, which matches the degrees of freedom in (2.33). Taking the closure of this sub-space, the 2k + 1 quaternionic degrees of freedom parametrise the closure of the minimal nilpotent orbit of SU(2k + 2), see [46].
Elliptic genus. Consider the elliptic genus (2.15) for the theory without defect. Suppose one aims to realise the Higgs mechanism (2.24) on the level of the elliptic genus, then starting from k + 1 one factorises (2.15) as follows: Since the Higgsing process should reduce Z k+1 l → Z k l , the last fraction is expected to be equal to one upon any of the fugacity assignments of (2.28). Explicitly, for (2.28b) one verifies that holds. Therefore, the elliptic genus is compatible with the fugacity assignment (2.28) derived for the Higgs mechanism.

Higgsing to defects
Building on (2.28), a surface defect of type (r, s) can be introduced via a position dependent VEV [19,45,47] which is related to a pole at such that the condition for the 6d gauge fugacity remains unchanged.
Without loss of generality, one can restrict to one choice of mesonic VEV. For this note, consider ⟨ M k+1 k+1 ⟩ such that (2.28b) and (2.36b) are relevant. If the defect is of type (r, 0) then the codimension 2 defect occupies R 2 1 while being a point on R 2 2 inside the 4d Omega background; whereas an (0, s) defect occupies R 2 2 inside R 4 1 , 2 and is point-like in R 2 1 .

Codimension 2 defect
There are multiple ways to introduce a codimension 2 defect. For instance, one may either employ a position dependent vacuum expectation value (2.36) as in [19,45,47] or one may include an additional D4 brane in the Type IIA brane configuration as in Figure 1, see also [48,49] for surface defects in 4d theories. In the original M-theory setting of Figure 1, the defect introduced via the D4 brane corresponds to another M5 brane filling (x 0 , x 1 , x 3 , x 4 , x 7 , x 10 ), as studied in [50]. Further, codimension 2 defects in 6d N = (1, 0) SU(N ) theories with adjoint matter are studied in [51].

Defect via D4 brane
One way to add a codimension 2 defect into the 6d theory is given by including additional D-branes.
In the Type IIA brane configuration, this can be realised by introducing an additional D4 brane with world-volume (x 0 , x 1 , x 4 , x 5 , x 7 ) ending on a NS5 brane, see Figure 1. This D4 is, indeed, of codimension 2 for the 6d world-volume theory on the D6 branes. One notes that this space-time occupancy of the branes breaks supersymmetry further to 4 supercharges. Moreover, the D4 brane breaks the space-time symmetry (2.7) to x 1 normal Higgsing defect Higgsing  Figure 1. The mesonic Higgsing of the 6d theory SU(k+1) with N f = 2k+2 to SU(k) with N f = 2k, is realised by moving one D6 away along the x 7,8,9 direction. For the dual 5d theory, the corresponding baryonic Higgsing of the affine A k quiver to the affine A k−1 quiver is realised by moving one NS5 brane along x 7,8,9 . A codimension 2 defect for the 6d brane configuration is introduced via a D4 brane that is attached to the D6 brane which is moved along x 7,8,9 . In the dual 5d system this becomes a D3 brane suspended between the 5-brane web and the NS5 that is displaced in charges are summarised in Figure 2 and the resulting 2d quiver gauge theory is given by where the difference compare to (2.9) is given by the U(1) x defect flavour node of the additional bosonic and fermionic multiplets. Considering the elliptic genus, the 2d multiplets from the theory without defect contribute the 1-loop determinants (2.13), while the additional multiplets σ and Ξ have determinants where x denotes the fugacity of the U(1) symmetry. The 2 charge of the new multiplets follows because the D4 occupies R 2 45 , whose rotation parameter is 2 . Collecting the determinants (2.11) and (2.39), one finds The claim is that the additional D4 brane induces a (r, s) = (0, 1) defect in the sense of (2.36), see also [19,45,47]. As a remark, a (r, s) = (1, 0) defect can be constructed via a D4 brane that extends along (x 0 , x 1 , x 2 , x 3 , x 7 ), such that the 2d defect multiplets are charged under 1 instead.
Consequently, one may label the resulting 2d elliptic genera as follows: As a next step, the result (2.39) is re-derived and generalised to a (r, s) defect via a positiondependent vacuum expectation values, as in Section 2.2.

Defect via Higgsing: Perturbative contribution
Here, the chosen approach is to modify the standard Higgsing (2.28) such that the VEV becomes dependent on one R 2 plane of the R 4 1 , 2 as in (2.36). For later purposes, one defines the defect fugacity x in (2.36b) as follows: (2.42) For the exponentiated fugacities, the Higgsing (2.36b) takes the form using the definition of the defect fugacity (2.42). As detailed in Appendix A.1.2, this Higgsing results in and (2.45) contains the additional contributions from the codimension 2 defect, i.e.
where the Goldstone mode contribution have been removed. Note that Z (r,s)def pert = 1 for (r, s) = (0, 0). To be specific, specialising (2.45) to (r, s) = (0, s) yields In the NS limit q → 1, one obtains Thus, the contribution of a (0, s) defect factorises into s copies of a (0, 1) defect in the NS limit.

Defect via Higgsing: Elliptic genus
The fugacity assignment for a Higgsing with a position dependent VEV has been derived in (2.36b).
Inserting the fugacity assignment into (2.34) yields the following: with the definition which corresponds to the contribution of an (r, s) defect. In other words, (2.50) are the 1-loop determinants of the Fermi and chiral multiplet that define the defect. In particular, for (r, s) = (0, 1) the defect contribution reduces to the results (2.39) of the defect introduced by the D4 brane.
The resulting 1-loop determinant and elliptic genus are then defined as follows: 1-string. Performing the integration for l = 1 yields: The normalised 1-string contribution in the NS-limit [21] reads (0,1)def 1 and the (0, s) defect part is the product of s copies of the (0, 1) defect contribution. L(⋅) is defined in (2.17). The detailed derivation of (2.53) and (2.54) is provided in Appendix A.5.1.

2-string.
The l = 2 case yields the following elliptic genus: Consider the normalised 2-string elliptic genus The full normalised 2-string elliptic genus for the codimension 2 defect in the NS-limit is given bỹ with L(⋅) and K(⋅) as defined in (2.17). The computational details of (2.55) and (2.57) are presented in Appendix A.5.2.
Full defect partition function. The 6d partition function in the presence of the codimension 2 defect is then denoted as in the rest of this paper.

Codimension 4 defect
A natural candidate for a codimension 4 defect is a Wilson surface Σ [52,53] that acquires a vacuum expectation value. The VEV of a Wilson surface in representation R can formally be expressed in terms of the two-form potential B µν and the associated supersymmetric strings as, where . . . denotes the necessary supersymmetric partners of B µν . There exists another type of codimension 4 BPS defects that couples to the 6d gauge symmetry. One can consider a 2d chiral fermion field ψ localised at the origin of R 4 that couples to the bulk 6d gauge group through the following action: where D i = ∂ i +iA i with i = 0, 1 and A i is the bulk SU(k) gauge field. Adding this action to the path integral introduces a codimension 4 defect preserving half the supersymmetries. This defect is a 6d generalisation of the Wilson loop generating function in a 5d gauge theory that can also be called the 6d qq-character [54,55]. The codimension 4 defect that is discussed below is a product of these two types (2.59) and (2.60) which is called the Wilson surface defect from now on. Consequently, the Wilson surface defect carries both tensor and gauge charges.
In practice, because of the lack of a field theoretical formulation of 6d SCFTs, one has to resort to string theory to formulate the Wilson surface defect and compute it. Wilson surface defects have, for example, been considered on the Ω-deformed R 4 × T 2 in [54][55][56][57], see also [58]. Following [57], a Wilson surface defect in the 6d N = (1, 0) A 1 SCFTs can be realised in the Type IIA brane construction via an additional D4 ′ brane filling the x 0 , x 1 , x 7 , x 8 , x 9 space-time directions, see Figure 1. As the D4 ′ occupies different space-time directions as the D4 brane of Section 2.3, the codimension 4 defect differs from the codimension 2 defect. In contrast to the D4 brane, the addition of the D4 ′ brane to the D2-D6-NS5 brane preserves the broken space-time symmetry (2.7) of the original set-up. As a consequence, the 2d world-volume theory is composed of the multiplets (2.8) of the D2-D6-NS5 system which are then supplemented by additional multiplets that originate from the presence of the D4 ′ brane. These new multiplets originate from the following: Decomposing N = (0, 4) multiplets into N = (0, 2) multiplets, yields the field content from the original theory (2.8) plus the additional N = (0, 2) multiplets due to the additional D4 ′ brane. For the latter, one finds [57] twist hyper and the charges are detailed in Figure 2. The resulting 2d quiver gauge theory can be encoded in where the changes due to the D4 ′ brane are manifest in the additional U(1) z defect flavour node compared to (2.9).
Analogously to the elliptic genus (2.15) of the theory without defect, the 1-loop determinant contributions from the 2d multiplets include the terms (2.11) form the original theory plus the following defect parts: where the z-fugacity labels the U(1) charge of the additional twisted hyper multiplet φ A and Fermi multiplets Γ α , ρ due to the D4 ′ brane. Collecting all the contributions from (2.11) and (2.63), one obtains where the following definitions have been used Note that W pert is independent of the 2d gauge fugacities such that its contribution in the contour integral reduces to an identical prefactor for all elliptic genera. Hence, one may define using the definitions (2.64)-(2.65). Therefore, the partition function of the theory in the presence of a Wilson surface is given by where Z pert is the perturbative contribution (2.6) of the theory without defect, see also [57,Sec. 3.3]. Since the interest is placed on the Wilson surface expectation value, one has to normalise the partition function with respect to the partition function of the theory without codimension 4 defect. Therefore, the expectation value of Wilson surface is given by see also Appendix A.3.1. Before turning to the computation details, one may wonder in which representation R the Wilson surface transforms. As argued in [57], the codimension 4 defect of a single D4 ′ brane introduces a Wilson surface in the fundamental representation.

Wilson surface: Perturbative contribution
The perturbative contribution acts as a multiplicative factor. The explicit contribution is

Wilson surface: Elliptic genus
For the non-perturbative contributions of the Wilson surface expectation value, the 1-string and 2-string contributions are computed in this section.
1-string. Similar to the codimension 2 defect computation (2.53), one finds for the l = 1 case of the contour integral (2.66) the following result The normalised 1-string contribution in the NS-limit becomes The detailed computations that lead to (2.70) and (2.71) are summarised in Appendix A.7.1.

2-string.
Consider the l = 2 elliptic genus (2.66), a computation yields The normalised 2-string elliptic genus for the codimension 4 defect reads

Difference equation
In Section 2, several partition functions have been discussed. Focusing on the defects introduced by a single D4 and single D4 ′ , the partition functions are related as follows: normal Higgs (2.28) Z 6d denotes the normalised partition function in the presence of a codimension 2 defect. Consequently, Z 6d 4d k depends on the defect fugacity x. In addition, one may introduce a codimension 4 defect to the 6d theory, which in terms of partition functions means Z 6d is the normalised partition function in the presence of the codimension 4 defect. This codimension 4 defect is characterised by another defect fugacity z.
The aim of this section is to derive a difference operator D, which acts via shifts on the codimension 2 defect fugacity x, and, similarly to [8,22,45,47,59,60], is expected to generate the partition functions for the 6d theory in the presence of both, the codimension 2 and the codimension 4 defect, i.e.
Clearly, since Z 6d 4d only depends on the defect fugacity x, and the flavour and gauge fugacities inherited from the pure 6d theory, the generated Z 6d 4d 2d cannot depend on z. In the NS-limit [21], one expects a factorisation of the latter with ⟨W⟩ being the Wilson surface expectation value of the 6d theory. In other words, ⟨W⟩ ≅ Z 6d 2d for a suitable identification of the defect fugacity z. As a consequence, the Z 6d 4d partition function is annihilated by the following operator in the NS-limit: which, in the spirit of [19,61], is expected to yield a quantisation of the Seiberg-Witten curve of the 6d N = (1, 0) A 1 theory. The defect fugacity x becomes the coordinate of the SW-curve.

Path integral representation
As a first step towards the quantised SW-curve, one may try to express the non-perturbative parts of the partition function with codimension 2 defect as a path integral. Following the approach of [62], one may write the elliptic genus contributions via (2.14) and (2.50) as follows: For all specific considerations, the defect is specialised to (r, s) = (0, s). Next, introduce the densitȳ and rewrite the partition function du # ρ(u)(log(Q(u)) + log(V (r,s) (u))) .
The sum over l can be evaluated Analogous to [62], one may employ a shift in the auxiliary variable 1 This represents a path integral representation of the elliptic genera for the theory with codimension 2 defect. For the the theory without defect, one simply puts (r, s) = (0, 0) because V (0,0) (u) = 1.

Leading and next-to-leading order
Following [62], consider the behaviour as 2 → 0. One computes the following expansions: where the abbreviation L(⋅) is defined in (2.17). For the D(u − u ′ )-terms one considers such that the 2 -expansion leads to using the L(⋅), K(⋅) notation (2.17). Similarly, for the Q(u)-terms the 2 expansion yields and similarly for the (0, s) defect terms V (0,s) (u) one finds The 2 expansion of the path integral for 2 ≪ 1 becomes and the expression for Z str ≡ Z (0,0)def str is obtained by setting all the codimension 2 defect contributions V n to zero, i.e. r = s = 0.

Saddle point analysis
Considering (3.16), the saddle point contribution comes from the leading order term such that the saddle point equation is which then defines a critical density ρ * . Inspired by [43], define the following objects: ) 20) and observe that The saddle point equation (3.18) becomes for some points u * . Next, define the following function: the properties of f indicate that it can be written as a product of k Theta functions with roots e l to be determined. The saddle point equation (3.22) becomes equivalent to From (3.25) one can now derive a difference equation for the defect partition function.

Shift operator
Having derived a path integral expression (3.14), which is dominated by the contribution of the saddle point (3.25), the next step is to define a shift operator. For this, the (exponentiated) defect fugacity X is promoted to a non-commutative parameter together with conjugate coordinate Y such that . Now, one can act with the shift operator Y on the two parts of the partition function. For the perturbative part, one proceeds with the natural expressions; while the Y -action on the non-perturbative part is greatly simplified by the path integral representation.
Perturbative contribution. The normalised perturbative part (2.48) for an (0, s) defect can be written asZ for A i = e a i . A direction computation, see Appendix A.6.1, shows that the action of Y is given by (3.28) Note that the sign of the argument of the theta function can be flipped without any consequence.
Elliptic genus. Consider the defect contribution (2.50), (3.15d), which one may write as The shift operator acting on the normalised instanton-strings partition function yields Consequently, one arrives at where one notes the cancellation of the contribution from the perturbative part. In particular, notice the ratioZ

Difference equation
Finally, following the logic of [43,63], the saddle point equation can be used to derive a difference equation on the level of the normalised codimension 2 partition function. For this, one starts from the saddle point equation (3.25) and performs the following manipulations: Hence, (3.34) shows the existence of an operator that annihilates the codimension 2 defect partition function. Nevertheless, the expression needs to be considered with care. Comparing to the results of [17], the form is already suggestive of the Seiberg-Witten curve. In order to consolidate this further, one can equivalently rewrite (3.34) as where the left-hand-side contains expressions that are fully known, while the right-hand-side contains the degree k modular form P (u) of (3.24), whose existence follows from the saddle point analysis. Therefore, the purpose of the remainder of this section is to establish a physical interpretation of P (x + 1 ). As it turns out, the codimension 4 defect in form of the VEV of a Wilson surface is a suitable object to consider.

Comparison to Wilson surface
The strategy for determining the physical meaning of P (x + 1 ) has two steps: (i) Starting from (3.35), together with the known normalised codimension 2 defect partition functionZ (0,1)def (x), one can compute P (x + 1 ) order by order in q φ .
such that (3.34) becomes Next, one can try to match the predictions for P l (x + 1 ) with the results from the Wilson surface. Based the explicit computations detailed below, the claim is that i.e. the fugacities x and z are suitably identified.

Perturbative level
The lowest order in the q φ expansion reads and one finds . (3.40) Comparing to W part in the NS-limit yields

1-string level
Next, the linear q φ order reads and, using (3.39), one finds Using the results from above, one computes the prediction (3.43) to be (3.45)

2-string level
Lastly, the quadratic q φ order in the expansion reads and using (3.39) and (3.42) one finds (3.47) Using the results from above, one compute the prediction (3.47) to be

Implications
The results of Sections 3.4.1-3.4.3 provide evidence that the claim (3.38) is correct. Thus, the difference equation (3.35) can be re-written which identifies the operator D of (3.3) in the NS limit. In addition, the degree k modular form P of (3.24) has been identified with the expectation value of the Wilson surface defect.
As a comment, the found identification (3.38) is a qualitatively new feature of the N = (1, 0) theories in contrast to the N = (2, 0) case discussed in the next section. As shown in the 6d N = (2, 0) A 1 case [57], the Wilson surface expectation value is independent of the defect fugacity z; similarly, the dual 5d picture has been considered in [61], where the Wilson loop expectation values also has no dependence on the defect fugacity.

2 M5 branes: Matching 6d and 5d with enhanced SUSY
In this section, the methods developed in the above sections are applied to the simplest 6d N = (1, 0) theory with SU(2) gauge group and 4 flavours. The interest in this model comes because Higgsing the SU(2) gauge group as above leads to a theory with no gauge theory left. Put differently, in the Type IIA brane construction the Higgsing is realised by removing a D6 brane, see Figure 3. Starting from the 2 D6 branes for the SU(2) theory and removing one of them, leads to a single D6 which is dual to C 2 Z 1 ≅ C 2 , i.e. the A 0 singularity in the original M-theory setup. Thus, the Higgsing leads to a system of M5 branes which preserve 16 supercharges instead of the 8 supersymmetries of the generic case with an A k singularity.
Building on Section 2.2, one can study the N = (2, 0) A 1 theory in the presence of a codimension 2 defect by Higgsing the N = (1, 0) SU(2) theory with a position dependent VEV. In addition, the path integral formalism developed in previous section allows one to derive the quantised Seiberg-Witten curve therein. As a consistency check, it is verify in this section that the established SWcurve matches the result obtained from the 5d/3d perspective by compactifying the 6d N = (2, 0) A 1 theory onto S 1 [61].

Defects in
To begin with, one computes the partition function for the 6d case. In order to find agreement with the 5d result of Section 4.2, the derivation is repeated in a slightly different manner compared to Sections 2 and 3.

Elliptic genus
Firstly, the saddle point approach is used to derive the difference equation of the non-perturbative part of the partition function, analogously to Section 3. The instanton partition function Z k for N = (1, 0) SU(2) with 4 flavours is thus given by the l-th elliptic genus, contributing to the non-perturbative partition function (2.3) with φ IJ ∶= φ I − φ J . Here, ϑ ∨ 1 (φ IJ ) means that those terms in ϑ 1 (φ IJ ) with φ I = φ J are replaced by ϑ ′ 1 (0). Next, a (0, 1) codimension 2 defect is introduced via the Higgsing (2.36b), which becomes such that the elliptic genus of the N = (2, 0) theory with defect is given by  For convenience, one defines µ 1 ≡ e m− 2 2 , and, additionally, shifts the 2d gauge variables as Finally, one ends up with the instanton partition function for the theory with a codimension 2 defect of type (0, 1), which is given by and, following the definitions (2.14) of Section 2, one defines Having set-up the notation, one recasts the instanton partition function in a path integral, analogous to Section 3.1, as follows: with the expansion coefficients , (4.10) with L(⋅) introduced in (2.17). As in (3.19), one may define such that the saddle point equation can be written as for certain specified solutions ρ * and u * .
On the other hand, one can apply the saddle point equation to the normalised Z def str and take the NS-limit, 2 → 0 and q → 1, with (4.14) Therefore, by the virtue of (4.11), one finds For a shift operator Y ∶ x ↦ x − 1 , the action on the partition function is Next, consider the left-hand-side of (4.12) for arbitrary values of u, i.e.
whose purpose is clarified shortly. For u = 2x − 1 2 , one has due to (A.14). To compare with the results in [61], one defines the following variables Therefore, using (4.16), one finds .

(4.20)
Notice that Y X = p −2 XY , for convenience, one defines Now (4.20) can be recast as Lastly, one shifts X → pX and re-defines the right-hand-side of (4.22) to be where W is identified with the 6d partition function of the codimension 4 defect, i.e. the Wilson surface, in Section 4.1.3. Therefore, (4.23) is exactly the difference equation obtained from 5d/3d perspective in [61].

Perturbative part
Next, the difference equation for the perturbative part of the N = (2, 0) A 1 theory is derived. As above, the starting point is the 6d N = (1, 0) SU(2) theory with 4 flavours, whose perturbative contributions to the partition function are given by with 24b)

24c)
where the contributions of the tensor, vector, and hyper multiplets I t , I v and I h , respectively, have been flopped compared to (2.4), for comparison with the 5d result.
Before introducing the codimension 2 defect, one first computes the contribution of Goldstone bosons from the usual Higgsing procedure by assigning The Goldstone boson part is given by With this preparation, one can introduce a (0, 1) codimension 2 defect as in (4.3). The partition function Z pert N =(1,0) A 1 can be factorised as where only Z def pert (X) is a function of the defect parameter X. Using (4.3), computing I v and the µ 2 -dependent part of I h leads to using (4.19) in the last line. Further, all irrelevant terms independent of the defect parameter X have been omitted.
On the other hand, one also needs to extract additional Z def pert (X) contributions 2 , which are µ 1 -dependent, from the Goldstone part Z G . In detail where one has shifted µ 1 → √ qµ 1 in order to compare with the contribution of Goldstone bosons.
With some algebra, apart from some irrelevant terms, one finds −Xη + (Xη) −1 p Q 2 Different from the generic N = (1, 0) case, there is an additional contribution depending on the defect parameter X and flavour fugacity η. Because the (2, 0) A1 theory contains no vector multiplet, the new piece thus originates from the term depending on the a1 gauge fugacity and the left flavour fugacity η. Since the SU(2) fugacities satisfy a1 + a2 = 0, both a1 and a2 have been replaced by the defect parameter X after Higgsing.
using (4.19). Hence, combining the various parts, one arrives at By acting with Y X on it, one finds the following difference equation Therefore, the full partition function satisfies the following difference equation in the NS-limit q → 1: where the last line already bears resemblance to (4.50). As in (4.23), one still has to provide an interpretation of W, which is the subject of the next section.

Wilson surface
In this subsection, W is identified with the Wilson surface from 6d perspective as discussed above for the generic 6d N = (1, 0) case. As in Section 3.4, the identification proceeds in two steps: (i) Computation of the prediction for W from the difference equation (4.23).
(ii) Direct evaluation of the Wilson surface expectation value.
Firstly, one computes W from (4.23) up to one-instanton order. A computation shows that whereθ ′ 1 (X) denotes the derivative ofθ 1 (X). As it turns out, the W expression is independent on X, as can be verified by expanding (4.35) with respect to Q, i.e. (4.36) In fact, q −1 2 φ W coincides with the Wilson line W SU (2) computed from the 5d SU(2) SYM via compactifying the 6d theory on a circle as in [57,61].
Secondly, one can directly compute the expectation value of the 6d Wilson surface in the 6d N = (2, 0) A 1 theory, as studied in [57]. For a Wilson surface in a minuscule representation, for instance the fundamental representation, one finds either from [57] or Section 2.4 that , (4.37) where z denotes the U (1) fugacity from D4 ′ brane, see Figure 1. Up to one-instanton order, one finds which is the same as (4.35) by replacing Z ≡ e z with X. However, as shown in (4.36), W (2,0) is independent of Z or X. As a consequence, the direct 6d computation of the Wilson surface, which coincides with the 5d Wilson loop result [57], also verifies the quantised SW-curve (4.23) proposed in the subsection above for the 6d N = (2, 0) A 1 case.
A codimension 2 defect preserving half of the supersymmetries in the 5d N = 2 SU(2) gauge theory has been studied in [61]. This defect was introduced as a monodromy defect. However, the same defect can also be introduced by Higgsing the SU(2) × SU(2) affine quiver theory with two bi-fundamental hypermultiplets with position dependent VEV of a baryonic operators formed by one of the bi-fundamental hypermultiplets. In terms of a 8 supercharges quiver, the Higgsing is summarised as follows: .

(4.39)
Equivalently, the Higgsing of a 5d N = 1 affine A k quiver gauge theory with a constant or position dependent VEV is realised in Type IIB superstring theory as shown in Figure 3. From the 6d viewpoint, this corresponds to a mesonic Higgsing of the SU(2) gauge theory with 4 flavours towards the N = (2, 0) A 1 theory with a codimension 2 defect. The duality between the 5d and 6d description can be verified on the level of partition functions.
Partition function before Higgsing. Let us start with the partition function of the 5d SU(2)× SU(2) affine quiver gauge theory on R 4 1 , 2 × S 1 . The perturbative partition function can be written where A 1,2 ≡ e a 1,2 are the gauge fugacities for two SU(2) gauge groups in (4.39) and µ 1 ≡ e M 1 , µ 2 ≡ e M 2 are the fugacities for the bi-fundamental flavours. The instanton partition function can be evaluated from a 1d gauged quantum mechanics and is given by where y and Q y are the instanton fugacities for the SU(2) gauge groups, respectively, and sh(x) ≡ 2 sinh( x 2 ) as well as φ IJ = φ I − φ J ,φ IJ =φ I −φ J . The contour integral (4.41) at each instanton sector can again be evaluated by using the JK-prescription [67]. As expected from the duality between the 5d SU(2)×SU(2) affine quiver gauge theory and the 6d SCFT for 2 M5-branes on A 1 singularity, the full partition function for the 5d SU(2)×SU(2) affine quiver theory coincides with the partition function of the 6d SCFT given in Section 2.1. Namely, with the identification of the 5d/6d fugacities as Here, Z pert N =(1,0) A 1 and Z l are given in (4.24) and (4.2), respectively; and Z extra is an extra factor independent of dynamical fugacities defined as (4.44) One can check the equality (4.42) by expanding both sides in terms of Q and q φ .
Higgsing. Higgsing (4.39) to the 5d N = 2 SU(2) gauge theory can be performed by tuning the fugacities in the partition function as This leads to the partition function of the 5d N = 2 SU(2) gauge theory as 46) up to the extra factor Z extra ′ independent of the dynamical fugacity A 2 . After the Higgsing, A 2 becomes the fugacity for the SU(2) gauge symmetry and µ 1 becomes the fugacity for the SU(2) ⊂ SO(5) flavour symmetry.
Next consider the Higgsing with a position dependent VEV that introduces a codimension 2 defect in the 5d N = 2 SU(2) theory. The Higgsing can achieve by the following fugacity assignment: With this specialisation of the fugacities, the partition function reduces to that of the 5d N = 2 SU(2) theory in the presence of the monodromy defect, called Z [1,1] , introduced in [61]: This shows that the codimension 2 defect introduced by the Higgsing is identical to the monodromy defect considered in [61]. The instanton part of the codimension 2 defect partition function is expanded in terms of y and Q y, and the first few terms are given by with η defined in (4.19).
In the NS limit q → 1, the codimension 2 defect partition function satisfies the following difference equation [61]: where Y y y = pyY y and ⟨W SU(2) ⟩ is the SU(2) fundamental Wilson loop expectation value in the 5d maximal SYM discussed in [56,61]. This is the difference equation of the two-body elliptic Ruijsenaars-Schneider integrable system. Here, the Wilson loop expectation value ⟨W SU(2) ⟩ of the 5d theory is related to the VEV of Wilson surface W (2,0) in the 6d (2,0) A 1 theory in [57] as One can verify that, by replacing (4.34) becomes (4.50). Hence, the difference equations agree.

Conclusions
In this paper we explored elliptic difference equations arising from quantisation of Seiberg-Witten curves of compactified 6d A-type N = (1, 0) SCFTs. In order to obtain a 4d N = 2 supersymmetric theory, the 6d theory is compactified on a two-torus together with an Omega-background. This allows to compute the BPS partition function of the theory together with expectation values of various defect operators using localisation. We explicitly showed, using a matrix-model approach, that the corresponding quantum curves annihilate expectation values of codimension 2 surface defects inside the 6d theory. Moreover, we found that our difference equations can be rewritten as eigenvalue equations with eigenvectors being our codimension 2 defects and eigenvalues corresponding to expectation values of codimension 4 defects arising from Wilson surfaces wrapping the two-torus.
One important insight of our analysis is the fact that our difference operator equally well applies to the 5d dual of the 6d SCFT. This duality, as for example recently explored in [5][6][7], results in a 5d supersymmetric gauge theory admitting an affine quiver description. In our case, this is an affine A-type quiver with SU(N ) gauge nodes [17]. BPS partition functions of the circle-compactified 5d theory are then equal to the torus-compactified 6d partition function. The codimension 2 defect of the 6d theory is mapped to a codimension 2 defect inside the 5d theory giving rise to a coupled 3d/5d system. Difference operators for such systems are not easy to obtain, but our approach via the dual 6d theory gives a recipe to construct such operators from first principles.
Another direction, particularly interesting for future research, is the realisation of 4d N = 1 SCFTs as surface defects inside a 6d SCFT. Indeed, our codimension 2 defect is itself such a 4d theory extended over T 2 × 2 R 2 . The expectation value of the defect operator on such a geometry is related to the supersymmetric index of the corresponding 4d N = 1 SCFT and, thus, it is expected that such indices satisfy similar difference equation. From this point of view, it would be interesting to ask whether the knowledge of the difference operator is enough to reconstruct the index of the corresponding 4d SCFT. First steps in this direction have been taken in [8,22,45]. In particular, in [22] the authors give a detailed derivation of the difference operator associated to N = 1 compactifications of E-string theory. It would be interesting to extend these results by applying our techniques to the torus-compactified E-string theory. The corresponding difference operator should in this case arise from the quantisation of the SW-curve derived in [68]. We leave this and the derivation of quantum curves for a wider class of 6d SCFTs for future work. Likewise, the difference equations of other 6d SCFTs and their relation to integrable models, as for example considered in [51], are interesting future directions.

A Details of partition functions
The computational details of the various partition functions are provided in this appendix.

A.1 Perturbative contribution
The perturbtative part of the partition function is composed of the single letter contributions (2.4) for the 6d N = (1, 0) multiplets.

A.1.1 Higgsing: constant VEV
The perturbative part can be written as (e a i −a k+1 + e a k+1 −a i ) − (1 + pq) e a k+1 (e −m l +b + e −n l −b ) + e −a k+1 (e m l −b + e n l +b ) such that Higgsing (2.28b) yields for the different parts √ pq e a k+1 (e −m k+1 +b + e −n k+1 −b ) + e −a k+1 (e m k+1 −b + e n k+1 +b ) and collecting all the pieces leads to where the additional pieces are attributed to the Goldstone modes for the reduced global symmetry. In detail,

A.1.2 Higgsing: position dependent VEV
Inspecting the different contributions to (A.1) yields for the position dependent Higgsing (2.36b) the following: e a k+1 (e −m l +b + e −n l −b ) + e a k+1 (e m l −b + e n l +b ) and collecting all the pieces leads to Recalling the contribution (2.33) from the Goldstone bosons, one formally arrives at

A.2 Elliptic functions
The non-perturbative contributions of the 6d partition function on T 2 × R 4 1 , 2 equals the infinite sum of 2d elliptic genera. These elliptic genera are naturally composed of elliptic modular forms, whose definitions and properties are summarised in this appendix.

A.3 Conventions for NS-limit
The NS-limit 2 → 0 only yields a finite defect partition function if a suitable normalisation is chosen. In addition, the expansion coefficients in the 2 expansion need to be defined.

A.3.1 Normalised defect partition function
For the 6d theory with and without a defect, one has the following q φ expansions: such that the normalised defect partition function is defined as The q φ expansion of the normalisation factor reads 23) and the standard expansion coefficients of the normalised defect partition functionZ 6d+def arẽ and similarly for higher orders in q φ .

A.3.2 Notation and expansion coefficients
Some frequently appearing combinations of Theta functions have the following expansions: The 2 expansion of functions defined in (2.14), (2.16), (2.50), and (2.65) are given by with L(⋅), K(⋅) as defined in (2.17). In addition, for certain relevant combinations one finds

A.4 Elliptic genera for theory without defect
For the theory without defects of Section 2.1, the non-perturbative contributions can be computed via (2.15). In this section, the details of the 1 and 2-string calculation are presented. As detailed in [40,41], the JK-residue prescription requires the choice of an auxiliary vector that determines the poles which contribute to the contour integral. While the final result is independent of the choice made, the individual residues do not have an invariant meaning. For this paper, the auxiliary vector is chosen to be +1 on 1-string level and (1, 1) on 2-string level.

A.4.1 1-string
For the evaluation of the 1-string contribution, the residues of the following poles are relevant: Since Q(u) = M (u) P 0 (u)P 0 (u+2 +) , this choice of poles corresponds to the zeros of P 0 (u + 2 + ). Using (A.17), one computes where the definitions (2.16) have been used. With this preparation, the elliptic genus becomes using (A.13).
(u 1 , u 2 ) = (a i − + , a j − + ) for i ≠ j . (A.30) • One pole from P 0 (u p + 1 + 2 ) and one from D(±(u 1 − u 2 )), i.e. In order to compute the residues, the following intermediate results are useful: as well as Firstly, consider the contributions for (u 1 , u 2 ) = (a i − + , a j − + ) Summing up all the individual contributions yields where the notation (2.16) has been used.

A.5 Elliptic genera for theory with codimension 2 defect
In Section 2.3, the theory with codiemnsion 2 defect is introduced. The non-perturbative contributions are computed via (2.49), and in this section the 1 and 2-string results are detailed. Again, choice of the auxiliary vector in the JK-residue is +1 on 1-string level and (1, 1) on 2-string level.

A.5.1 1-string
The 1-string elliptic genus is given by .37) and the contour integral is evaluated by selecting the residues of the following poles: such that the elliptic genus for l = 1 reads Following Section A.3.1, the normalised 1-string contribution in the NS-limit reads To further evaluate the limit, consider (0,1)def 1 , using the notation (A.25). Therefore, the (0, s) defect part is the product of s (0, 1) defect contributions.

A.5.2 2-string
Consider the l = 2 elliptic genus with defect given by 43) and the relevant poles can be split into poles that come from the theory without defect such as: • Both poles originate from P 0 (u p + 1 + 2 ) i.e.
(u 1 , u 2 ) = (x, x − 1,2 ) and (u 1 , u 2 ) = (x − 1,2 , x) . (A.47) Now, one can work out the residues for the individual poles as before: Firstly, consider the contributions for (u 1 , u 2 ) = (a i − + , a j − + ) Lastly, both (u 1 , u 2 ) = (x, x − 2 ) and (u 1 , u 2 ) = (x − 2 , x) yield Summing up all the individual contributions leads to Next, consider the normalised 2-string elliptic genus, see Appendix A.3.1, Firstly, focus on the 1-string contributions with 2 expansion coefficients Secondly, consider pure 2-string contributions Z aux k=2 = I 1 + I 2 + I 3 + I 4 (A. 57) with the following four parts: The 2 expansion is defined as The inspection of the most singular terms reveals which is required to vanish by consistency. The less singular expansion coefficients are given by Another consistency check is given by the vanishing of the 1 2 terms if one considers the pure 2-string terms together with the product of the 1-string contributions. Explicitly, one finds as expected. Recalling the notation (A.25), the full normalised 2-string elliptic genus for the codimension 2 defect in the NS-limit is given bỹ the computation has been check against the NS-limit performed with Mathematica for k = 2, 3.

A.6 Shift operator acting on defect partition function
The shift operator Y defined in (3.26) acts on the codimension 2 defect fugacity x. In the appendix, the action on the perturbative and non-perturbative part of the partition function is derived.

A.6.1 Perturbative contribution
The normalised perturbative part (2.48) for an (0, s) defect can be written as Focusing only on the X-dependent part, one proceeds further , which can be expressed in different forms: • As elliptic Gamma functions and the silly looking notation turns out to be useful to resolve a potential sign issues. • As inverse of Gamma functions (A.64) and the clumpsy looking notation is kept on purpose.

A.6.2 Elliptic genus
The defect part (3.15d) can be written as using (A.14) = s ⋅ ∂ u logθ 1 (u − x) + log i ηQ where the log[i ηQ 1 12 ] term vanishes due to the derivative. Then, the shift has the following effect: In total, the l = 1 genus reads where the notation (2.16) has been used. The normalised 1-string contribution in the NS-limit is derived as follows: and the relevant poles can be split into poles that come from the theory without defect such as: • Both poles originate from P 0 (u p + 1 + 2 ) i.e.
A.8 Computation of P (x + 1 ) coefficients In Section 3, the function P (x) appeared in the derivation of the difference equation (3.34). The main focus of Section 3.4 is to argue that P is related to the expectation value of a Wilson surface.
Here, the details of the 1 and 2-string comparison are presented.

A.8.2 2-string
Work out the 2-string prediction (3.47) with the results from above. To begin with, set s = 1 then Next, one needs to work out the following contribution: such that In addition, one needs the following contribution: Combining the individual terms, one finds (3.48)