Surface defects as transfer matrices

The supersymmetric index of the 4d $\mathcal{N} = 1$ theory realized by a brane tiling coincides with the partition function of an integrable 2d lattice model. We argue that a class of half-BPS surface defects in brane tiling models are represented on the lattice model side by transfer matrices constructed from L-operators. For the simplest surface defects in theories with $\mathrm{SU}(2)$ flavor groups, we identify the relevant L-operator as that discovered by Sklyanin in the context of the eight-vertex model. We verify this identification by computing the indices of class-$\mathcal{S}$ and -$\mathcal{S}_k$ theories in the presence of the surface defects.


Introduction
Remarkable connections have been uncovered in the past several years between supersymmetric field theories and integrable lattice models [1][2][3][4][5][6][7][8][9]. A prominent example is the correspondence [1][2][3]7] between 4d N = 1 quiver gauge theories realized by certain brane configurations in string theory, known as brane tilings [10][11][12], and the 2d lattice models that Bazhanov and Sergeev [13,14] constructed using elliptic hypergeometric integrals discovered by Spiridonov [15][16][17][18][19]. In this correspondence, the supersymmetric index of a brane tiling model is equated with the partition function of a lattice model, and the integrability of the latter follows from Seiberg duality. In this paper we study a class of half-BPS surface defects in 4d N = 1 theories from the perspective of the above correspondence. We argue that a surface defect in this class is represented on the lattice model side by a transfer matrix, an object which we depict as represents an object we call an L-operator. In the simplest case, we identify the concrete form of the relevant L-operator and present a formula for the corresponding transfer matrices. We compare our formula with computations based on a different approach developed in connection with class-S and -S k theories, and find that they agree.
Since the results obtained in the present work bridge two areas of physics in a way that may be unfamiliar to many readers, in this introduction we provide a somewhat detailed overview.
To begin with, let us briefly review where the correspondence between brane tilings and integrable lattice models comes from, following the discussion in [7]. We will give a more thorough explanation in section 2.
In fact, the correspondence in question is a combination of two correspondences: one between brane tilings and 2d topological quantum field theories (TQFTs) equipped with line operators, and another one between 2d TQFTs with line operators localized in extra dimensions and integrable lattice models [4,6].
The first correspondence has its origin in six dimensions. A brane tiling model is constructed from a stack of D5-branes on R 3,1 × Σ, intersected by NS5-branes that occupy R 3,1 and, roughly speaking, are supported on curves in the Riemann surface Σ. From the viewpoint of the 6d theory living on the D5-branes, the NS5-branes create codimension-1 defects or domain walls. At low energies, the 6d theory compactified on Σ in the presence of these codimension-1 defects is described by a 4d N = 1 theory. Under nice circumstances, it is a gauge theory characterized by a quiver diagram with SU(N ) nodes drawn on Σ, where N is the number of the D5-branes.
The situation is therefore similar to the construction of 4d N = 2 theories of class S [20][21][22]. A class-S theory is defined by compactification of a 6d N = (2, 0) superconformal field theory on a Riemann surface in the presence of codimension-2 defects. The locations of these defects ("punctures") in the surface are parameters of the theory, and generally physical quantities depend on them. If, however, we place the theory on S 3 × S 1 and compute its partition function, the result is the supersymmetric index [23,24] which is a protected quantity independent of continuous parameters and hence determined by the topological data of the punctured surface. It follows that the index of a class-S theory is captured by a correlation function of local operators in a TQFT on the associated surface [25].
By the same logic, the index of a brane tiling model coincides with a topological correlator on Σ, albeit of line operators in another TQFT. We get a different TQFT because of the different 6d origin, namely 6d N = (1, 1) super Yang-Mills theory instead of a 6d N = (2, 0) theory, and line operators rather than local ones since our defects are of codimension-1 and not of codimension-2.
The second correspondence relates TQFTs and integrable lattice models defined on the same surface Σ. Nevertheless, a higher-dimensional point of view is also crucial here.
Given a configuration of line operators in a TQFT on Σ, we can express its correlation function in the form of the partition function of a lattice model. Generically, these operators form a lattice with no three lines meeting at a point. Therefore, we can cut Σ into square pieces in such a way that each of them contains a crossing of two lines,

,
( and perform the path integral separately on these pieces first. The path integral on a single piece defines the R-operator, or the Boltzmann weight, assigned to the vertex of the lattice contained in that piece. To reconstruct the original surface, we glue these pieces back together, which amounts to multiplying the R-operators from all vertices and summing over all states on the boundaries of the pieces, or in other words, computing the partition function. Hence, the structure of a 2d TQFT equipped with line operators gives rise to some lattice model. This fact may not be noteworthy-it is merely rewriting of the path integral-were it not for the following observation by Costello [4,6]: the lattice model thus obtained would be integrable if there exist extra dimensions in the TQFT. For a lattice model to be integrable, the lattice lines must carry continuous parameters, called spectral parameters, and the R-operator should satisfy the Yang-Baxter equation = (1.4) (or more generally, transfer matrices must commute). Imagine that there are extra dimensions hidden in this picture and the lines sit at different points there. Then, the topological invariance on Σ implies the Yang-Baxter equation, since it allows us to move any one of the three lines past the intersection of the other two without possibly causing a phase transition. Moreover, the lines naturally come equipped with continuous parameters, as their locations can vary in the extra dimensions. Thus, a correlation function of line operators in a 2d TQFT with extra dimensions is equal to the partition function of an integrable lattice model. The model is defined on the lattice formed by the line operators, whose coordinates in the extra dimensions provide the spectral parameters.
We have to ask whether the 2d TQFT arising from brane tiling models has desired hidden extra dimensions. It actually has one: the 11th dimension that emerges when the brane system is embedded into M-theory via string dualities. Consequently, the index of a brane tiling model is the partition function of an integrable lattice model.
The main theme of this paper is to incorporate surface defects into the above story of connections between brane tilings, TQFTs and integrable lattice models. We address this question in section 3.
In order to create a surface defect in our 4d theory, we add to the brane system a D3-brane supported on a plane in R 3,1 and ending on the D5-branes along a curve in Σ. The total brane configuration preserves N = (0, 2) supersymmetry on the plane. Inside the 4d theory, the D3-brane appears as a half-BPS surface defect. This is the most basic example of a class of half-BPS surface defects, all of which admit a similar, if slightly more elaborate, brane construction. Surface defects in this class are specified by a representation of SU(N ). The one just described corresponds to the fundamental representation.
Since the D3-brane ends on the D5-branes along a curve in Σ, it creates a line operator in the 2d TQFT. In the lattice model, the introduction of the surface defect is therefore translated to insertion of an extra line, which we represent by a dashed line: which involves both the L-operator (1.2) and the R-operator (1.3). It is called an RLL relation. It turns out that when the dashed line is labeled with the fundamental representation of SU(2), the above RLL relation was studied by Derkachov and Spiridonov in [26]. According to their work, an L-operator that solves the RLL relation is essentially Sklyanin's L-operator [27], a 2×2 matrix whose entries are difference operators acting on meromorphic functions. This observation allows us to infer that in this simplest case, the L-operator (1.2) for our theory is Sklyanin's L-operator. If this is true, one consequence is that the integrable model realized on a lattice consisting solely of dashed lines should be the eight-vertex model [28,29].
As the Yang-Baxter equations do not determine the L-operator uniquely, it is important to check our proposal by comparing it with independent computations from the gauge theory side. Fortunately, such checks can be performed, as we do in sections 4 and 5.
The brane tiling models we mainly consider in this paper are also examples of N = 1 theories of class S k [30][31][32][33], which are generalizations of class-S theories. As such, their indices in the presence of surface defects can be computed by the method developed in [30,34].
Briefly, the procedure goes as follows. A class-S k theory of type A N −1 arises from N M5-branes placed on a C 2 /Z k orbifold singularity and further compactified on a punctured surface. To this surface we introduce an extra puncture carrying a U(1) flavor symmetry (known as a "minimal" puncture). The addition of the puncture modifies the 4d theory. The index of the new theory has a series of poles in the fugacity parameter associated with the flavor symmetry of the puncture. These poles are labeled with a pair of nonnegative integers, and the residue at the pole (r, s) encodes the index of the original theory in the presence of two surface defects, supported on different tori inside S 3 × S 1 and labeled with the rth and sth symmetric representations, respectively.
String dualities map the class-S k setup to the brane tiling setup. Under this map, the addition of a minimal puncture corresponds to the introduction of an NS5-brane. In turn, the latter operation inserts a lattice line in the lattice model. Taking the residue converts this line to a dashed one representing the surface defect. Incidentally, the integrability of the lattice model is nothing but the statement that the index is invariant under interchange of the positions of minimal punctures.
We carry out the residue computation for N = 2 and (r, s) = (0, 1), first for k = 1 (i.e., for class-S theories) in section 4, then for general k in section 5. In each case, the index in the presence of the surface defect is obtained by letting a difference operator act on the bare index, in the absence of the surface defect. We find that this operator precisely matches the corresponding transfer matrix calculated based on our proposal.
A reader familiar with the class-S k story may ask the following question: The residue method described above produces 2k distinct difference operators for a given pair (r, s) [30]. How can they all be accommodated in a single transfer matrix? The answer is that although there is only one transfer matrix, it carries a continuous parameter, namely the spectral parameter of the dashed line. The 2k difference operators are unified into this one-parameter family as 2k values of the spectral parameter.
While we focus on a particular class of surface defects in this paper, 4d N = 1 theories have many other aspects that should be equally illuminated by the integrability structure. In this sense, the present work may be regarded as a first step in the broader program of studying 4d N = 1 theories through integrability. In section 6 we suggest a couple of possible directions to be taken for next steps. Clearly, though, they are only a tiny fraction of the long list of interesting topics for future research in this ambitious program.

Brane tilings and integrable lattice models
In this section we review the correspondence between 4d N = 1 theories realized by brane tilings and integrable 2d lattice models. A central role is played by a 2d TQFT equipped with line operators that are localized in a hidden extra dimension emerging from M-theory. Our presentation follows [7], to which we refer the reader for more details.

Quiver gauge theories and their supersymmetric indices
Throughout our discussion we will encounter gauge and flavor groups that are either U(1) or SU(N ). 1 To each such group, we assign fugacities parameterizing the maximal torus. For instance, an element in the maximal torus of an SU(N ) group takes the form diag(z 1 , . . . , z N ), hence z = {z 1 , . . . , z N } is a set of fugacities for this group, obeying the constraint N I=1 z I = 1. Fugacities are also used to label the groups themselves; thus SU(N ) z is an SU(N ) gauge or flavor group whose associated set of fugacities is z. The quiver diagrams we will deal with involve SU(N ) gauge and flavor nodes. Since N is fixed in each quiver, we label the nodes with the fugacities of the corresponding SU(N ) groups, rather than the rank: z is a gauge group SU(N ) z , while z is a flavor group SU(N ) z .
Building blocks of 4d N = 1 supersymmetric quiver gauge theories are vector multiplets and bifundamental chiral multiplets. A vector multiplet is present at a gauge node. A bifundamental chiral multiplet has two flavor groups, say SU(N ) z and SU(N ) w , and transforms in the fundamental representation under SU(N ) z and in the antifundamental representation under SU(N ) w . We represent it by an arrow going from w to z (if SU(N ) z and SU(N ) w are gauged). In general, a bifundamental chiral multiplet is also charged under an R-symmetry group U(1) R , which we assume to exist and be anomaly-free, and under additional flavor groups U(1) uα . When we need to indicate the charges under these U(1) symmetries, we mark the arrow with where R is the R-charge (and not the fugacity for U(1) R ), F α is the charge of U(1) uα , and p, q are complex parameters to be introduced momentarily. We refer to this value as the fugacity of the multiplet. Given a theory T with flavor group SU(N ) w and another theory T ′ with flavor group SU(N ) w ′ , we can couple them to obtain a new theory (T × T ′ )/SU(N ) z by gauging the diagonal subgroup SU(N ) z of SU(N ) w × SU(N ) w ′ . To construct a quiver gauge theory, we take a number of bifundamental chiral multiplets and couple them by gauging all or part of the flavor nodes.
In what follows, we will mainly study the supersymmetric indices of N = 1 quiver gauge theories formulated on the Euclidean spacetime S 3 × S 1 [23,24,35]. The index of an N = 1 theory is defined by the trace taken over the space H S 3 of states on S 3 . Here (−1) F is the fermion parity, and j 1 , j 2 are generators of the maximal torus U(1) 1 × U(1) 2 of (the double cover of) the isometry group Spin(4) ∼ = SU(2) 1 × SU(2) 2 of S 3 . If S 3 is described by the equation |ζ 1 | 2 + |ζ 2 | 2 = 1 with (ζ 1 , ζ 2 ) ∈ C 2 , then U(1) p and U(1) q , generated by j p = j 1 + j 2 and j q = j 1 − j 2 , rotate ζ 1 and ζ 2 by phase, respectively. Also, the index f runs over all U(1) flavor symmetries with charges F f , including the maximal tori of nonabelian flavor groups. Thanks to supersymmetry, the index (2.2) receives contributions only from those states whose energies belong to a certain discrete spectrum determined by the R-charge assignment. As a result, it remains invariant under continuous changes of the parameters of the theory. This protected nature of the index will be important for our argument.
The index I T of a 4d N = 1 theory T with flavor group SU(N ) z is a symmetric meromorphic function of the fugacities z 1 , . . . , z N . The symmetricity property reflects the gauge invariance of the index. At the level of the index, gauging of a flavor group is realized by introduction of the corresponding vector multiplet and integration over its fugacities. In particular, with the integration performed over the unit circle T for each variable z I . The index I V (z) of the vector multiplet is given by elliptic gamma functions: 2 .
See the appendix for the definition of the elliptic gamma function and various identities it satisfies. From now on we fix p, q and omit them from the notation unless needed. The index of a bifundamental chiral multiplet with fugacity a is given by This identity says that as far as the index is concerned, we can cancel a pair of arrows making a loop if their R-charges add up to 2 and flavor charges add up to 0: Physically, the reason is that we can turn on a mass term for such a pair. The index is invariant under this deformation, and the bifundamental chiral multiplets decouple from the theory if we send the mass to infinity, leaving a trivial contribution to the index. We will make use of this identity frequently.
Another useful fact is that if we define the "delta function" z w (2.8) 2 As in this equation, we will often use a quiver to mean the index of the corresponding theory. It should be clear from the context whether a given quiver represents a theory or its index. by the relation This is a consequence of confinement and chiral symmetry breaking [36,37]. At low energies the theory on the left-hand side is described by the mesons and the baryons. It has a vacuum in which the mesons take nonzero expectation values and the flavor symmetry SU(N ) w × SU(N ) z is broken to the diagonal subgroup. In this vacuum the fugacities w and z are identified, so we get the quiver on the second line. The factor Γ(a ±N ) = Γ(a N )Γ(a −N ) is the contribution from the baryons. We can readily write down the formula for the index of a general quiver gauge theory. For simplicity, suppose that the theory is described by a quiver that contains no flavor node. Then, the index is computed by where the two products are taken over all nodes and all arrows, respectively. The index is a function of the parameters p, q and the flavor fugacities u α , which are suppressed in the above expression. If the quiver contains flavor nodes, the index is also a function of their fugacities.

Supersymmetric index and integrable lattice models
The supersymmetric index (2.11) of a quiver gauge theory may be interpreted as the partition function of a statistical mechanics model with continuous spins. Indeed, this formula precisely computes the partition function of a spin model in which spins are placed at the gauge nodes. The spin variables at z are the fugacities z 1 , . . . , z N , and they interact among themselves as well as with spins at nearest-neighbor nodes, namely those connected by arrows. The Boltzmann weights for the self-interaction and the nearestneighbor interaction are I V and I B , respectively. This is not particularly surprising in view of the fact that the index is a protected quantity and can be computed in the free theory limit. In this limit, vector and bifundamental chiral multiplets decouple, so their contributions factorize. What is remarkable is that for a certain class of N = 1 theories, the index is equal to the partition function of an integrable model defined on a 2d lattice.
The connection between the supersymmetric index and the lattice model comes from higher dimensions. Consider a 6d supersymmetric theory T 6d equipped with codimension-1 defects. (Here we have in mind the 6d theory living on a stack of D5-branes, though our argument is more general.) We compactify this theory on a two-manifold Σ and place codimension-1 defects W i along various curves C i in Σ. Suppose that this kind of configuration preserves four supercharges for any choice of Σ and {C i }. Then, at low energies, the system is described effectively by a 4d N = 1 theory T 4d [Σ, {C i }; {W i }]. We can place it on S 3 × S 1 and perform the path integral to compute its index. The index is invariant under continuous changes of the parameters of the theory, and the geometric data of the curves C i are such parameters. As a consequence, this procedure defines a map from the set of topological configurations of curves to the set of supersymmetric indices, given a choice of codimension-1 defects. Now start again from the same 6d theory, placed on the spacetime S 3 × S 1 × Σ with the same configuration of defects. In the previous paragraph it was implicitly assumed that the size of Σ is much smaller than S 3 and S 1 so that the description by the 4d theory is sensible. This time, let us make Σ much larger than S 3 × S 1 ; the index remains invariant under the rescaling of the metric of Σ. In this case, the low-energy physics is described instead by a 2d theory T 2d [S 3 × S 1 ] on Σ, and the codimension-1 defects W i inserted on S 3 ×S 1 ×C i become line operators L i supported along C i in this theory. This consideration leads to the relation (2.12) Moreover, the right-hand side depends only on the topology of the configuration of the line operators, as we just explained. Thus, T 2d [S 3 × S 1 ] is a 2d TQFT. We can compute the above correlation function by dividing Σ into square pieces, each containing segments of two line operators crossing in the middle: 3 i j . (2.13) We use arrows to represent line operators together with their orientation, and label them with numbers. This picture is topologically equivalent to the following one: (2.14) Intuitively, we can view it as the worldsheet of a scattering process involving two "open strings," each of which carries a "particle" whose worldline is either of the line operators. Let V i be the space of states on an interval intersected by L i ; this is the Hilbert space for the "open string" with the ith "particle" attached. Then, the path integral on the above piece produces the S-matrix 4Ř To reconstruct the correlation function for the original configuration of line operators on Σ, we simply glue these pieces back together. We will mainly study the case where Σ is either a cylinder or torus and line operators form a square lattice. To be specific, let us take Σ = T 2 and wrap line operators around 1-cycles C i , i = 1, . . . , m + n making up an m × n lattice. We divide the torus into m × n square pieces as above, and to each side of these squares assign a variable σ ij that labels basis vectors for the state space on that side. The situation for (m, n) = (2, 3) is illustrated in Fig. 1. For the computation of the correlation function, first we take the product of the matrix elements ofŘ from all squares for each configuration of state variables, then sum over all configurations: where σ k,n+1 = σ k1 and σ l,n+m+1 = σ l,n+1 . Let us shift our perspective slightly and look at the operatorŘ as assigned to the vertices of the lattice, not the square pieces containing them. Also, we think of the state variables σ ij as living on the edges of the lattice, not the sides of the squares. If we view the system in this way, the above formula is precisely the partition function of a vertex model in statistical mechanics: spins σ ij live on the edges of a lattice, and interact at the vertices with the Boltzmann weightŘ. In the context of vertex models, the S-matrixŘ is known as the R-matrix or R-operator.
Thus, we find that the correlation function in question is equal to the partition function of a vertex model V[S 3 × S 1 ; {L i }] defined on the lattice formed by the curves {C i }: (2.17) Combined with the equality (2.12), this relation implies that the index of the 4d theory is equal to the partition function of the lattice model. So far we have discussed the connection between the supersymmetric index and vertex models. We now explain how integrability comes into the picture.
To talk about the integrability of a vertex model, we should consider the situation that each lattice line carries a continuous parameter, called the spectral parameter assigned to that line. Correspondingly, the R-operator depends on two spectral parameters in general: (2.18) By concatenating the R-operators horizontally, we obtain the transfer matrix T (r; r 1 , . . . , r n ) = r . . . More precisely, 5 where V is the vector space assigned to the unnumbered horizontal line andŘ i : is the R-operator at the crossing of the horizontal and ith vertical lines. The hooks on the ends of the horizontal line indicate the periodic boundary condition, which leads to the trace in the above formula. The transfer matrix is an endomorphism of n i=1 V i that maps a state just below the horizontal line to another state just above it.
A vertex model is said to be integrable if transfer matrices at different values of the spectral parameter for the horizontal line commute: [T (r; r 1 , . . . , r n ), T (r ′ ; r 1 , . . . , r n )] = 0 . (2.21) By expanding T (r; r 1 , . . . , r n ) in powers of r (or of a related parameter in which T is analytic), we get a series of endomorphisms of n i=1 V i as expansion coefficients. This equation ensures that these infinitely many linear operators mutually commute.
Therefore, for the vertex model constructed from line operators in a 2d TQFT to be integrable, the line operators must carry spectral parameters, and transfer matrices must commute. These two features arise naturally if there are extra dimensions in the theory.
Suppose that our 2d TQFT is really a higher-dimensional theory compactified on some manifold M , and the line operators L i in the correlation function (2.17) are placed at some points p i in M , which we assume for simplicity to be all different. Suppose also that the correlation function is topological on Σ, but varies nontrivially along M . Then, the lattice lines carry continuous parameters, namely their locations in M . Furthermore, the 5 In matrix elements, T (r; r1, . . . , rn) commutativity of transfer matrices holds: The TQFT structure itself is not strong enough to imply the commutativity, simply because the two configurations of line operators are topologically distinct; even though we can slide the horizontal lines freely in a generic situation, a phase transition may occur when the two lines meet and pass each other. In the presence of extra dimensions, such a singular situation is avoided as the lines do not actually meet. Even better, in this setup the R-operator satisfies the unitarity relatioň and the Yang-Baxter equation 6   .

(2.27)
In the second equality we used the cyclic property of trace; we "rotated" the cylinder until the crossing on the left comes to the right. Let us recapitulate the logic of our argument. We consider a 4d N = 1 theory that is constructed from a 6d theory by compactification on a two-manifold Σ, in the presence of codimension-1 defects supported on curves in Σ. Due to its protected nature, the supersymmetric index of the theory is captured by the correlation function of a lattice of line operators in a 2d TQFT on Σ. In turn, by dividing Σ into square pieces, the correlation function can be mapped to the partition function of a vertex model defined on the same lattice. This vertex model is furthermore integrable if the 2d TQFT has hidden extra dimensions along which the correlation function varies nontrivially.
It is clear that the above argument applies to any protected quantities, not just the supersymmetric index on S 3 ×S 1 . For example, we can use the index on M ×S 1 with the 3manifold M different from S 3 . For each protected quantity, there is a corresponding TQFT and hence an integrable lattice model. The case when M is a lens space was investigated in [5]. In this paper we focus on the S 3 index since this is a well-understood quantity and, accordingly, there are nice mathematical results available.

Brane tilings
Now we turn to a specific class of 4d N = 1 theories that have the desired properties described above. These theories are constructed using branes in string theory.
Consider a stack of N D5-branes extending along the 012346 directions. We introduce a number of NS5-branes intersecting these D5-branes and occupying either the 012345 or 012367 directions: All branes are located at the same point on the 89-plane. On the 46-plane, an NS5-brane intersects the D5-branes along the X 4 -or X 6 -direction. Each of the three types of branes breaks half of the 32 supercharges. Altogether, the system preserves 4 supercharges. They are acted on by the U(1) R-symmetry group originating from the rotational symmetry on the 89-plane. If NS5-branes of either type are absent, this brane setup is T-dual to the Hanany-Witten brane configuration [38]. Let us replace the 46-plane with an arbitrary Riemann surface Σ. To preserve supersymmetry, we take the background spacetime to be R 3,1 × T * Σ × R 2 and place the D5-branes on R 3,1 × Σ × {0}, where T * Σ is the 4567-space and Σ is embedded in it as the zero section. NS5-branes intersect the D5-branes along curves C i ⊂ Σ. More precisely, they are placed on R 3,1 × Σ i × {0}, where Σ i are surfaces in T * Σ such that they restrict to C i on Σ. Provided that Σ i are chosen appropriately, this system preserves 4 supercharges. 7 7 In a neighborhood of the zero section Σ ⊂ T * Σ, there exists a hyperkähler structure compatible with the canonical holomorphic symplectic structure: there are complex structures J1, J2, J3 satisfying the quaternion relations, with J3 being the canonical complex structure of T * Σ. If we decompose the canonical holomorphic symplectic form Ω3 into the sum of real two-forms as Ω3 = ω1 + iω2, then ω1 and ω2 are the Kähler forms associated with the complex structures J1 and J2, respectively. By construction, Σ is a complex Lagrangian submanifold, i.e., Ω3 vanishes on Σ. It follows that Σ is a special Lagrangian submanifold in the complex structure J2 since ω2 and the imaginary part of the holomorphic symplectic On the D5-branes lives 6d N = (1, 1) super-Yang-Mills theory with gauge group SU(N ). The theory is placed on R 3,1 × Σ and topologically twisted along Σ, as can be seen by noting that two of its four scalar fields describing fluctuations of the D5-branes are not really scalars, but rather sections of T * Σ. Thanks to the twisting, 8 of the 16 supercharges are left unbroken by the curvature of Σ. In this 6d theory the NS5-branes create half-BPS codimension-1 defects, or domain walls, supported on R 3,1 × C i . (The four supercharges preserved by the two types of NS5-branes are compatible with the twisting [7].) If Σ is compact, the 6d theory is effectively described by a 4d N = 1 theory. We call 4d theories constructed in this way brane box models [39].
We are now in the situation considered before: we have a 6d theory that produces 4d N = 1 theories by compactification in the presence of codimension-1 defects. By following the same logic, we conclude that the index of a brane box model is given by a correlation function of line operators in a 2d TQFT, and coincides with the partition function of a lattice model.
Furthermore, an extra dimension emerges if the brane system is embedded into Mtheory. For the computation of the index, we take the spacetime of the 4d theory to be S 3 × S 1 . Thus, we are considering type IIB string theory on S 3 × S 1 × T * Σ × R 2 . We can apply T-duality along the S 1 and lift the resulting type IIA system to M-theory. In this process, the D5-branes are transformed to M5-branes wrapping the 11th dimension, the M-theory circle. On the other hand, the NS5-branes become M5-branes supported at points on the circle. Hence, the M-theory circle provides the extra dimension along which NS5-branes, or line operators in the 2d TQFT, can avoid one another. The existence of the extra dimension implies that the lattice model is integrable.
In fact, theories we will consider in this paper are not really brane box models. Rather, we will study brane tiling models [10,11] whose brane construction is slightly more complicated.
In a brane box model, the NS5-branes intersect the D5-branes along curves C i ⊂ Σ. We can resolve the intersections to trivalent junctions. Each junction connects N D5-branes, a single NS5-brane, and their bound state; in the terminology of (p, q) 5-branes, they are (N, 0), (0, 1) and (N, ±1) 5-branes, respectively. Upon this resolution, the intersection curves C i spilt into pairs of curves representing the 5-brane junctions. See Fig. 2 for illustration. These curves, which separate Σ into regions supporting different values of the 5-brane charge q, are called zigzag paths. We orient them in such a way that q increases by 1 as we cross a zigzag path from left to right.
We can consider more general configurations of zigzag paths, not necessarily those obtained by resolving D5-NS5 intersections. Each configuration encodes a 5-brane system: the NS5-branes approach the D5-branes from transverse directions, meet them along the zigzag paths, and together make bound states over some regions. Such a brane configuration form Ω2 = ω3 + iω1 associated with J2 vanish on Σ. As such, Σ is a supersymmetric cycle. Similarly, for any given analytic curve Ci ⊂ Σ, we can find a supersymmetric cycle Σi ⊂ T * Σ such that Σi ∩ Σ = Ci. To see this, pick a complex structure J different from J3, and take complex coordinates (z, w) on T * Σ such that their real parts (x, y) define coordinates on Σ. If Ci is given by y = y(x), then its analytic continuation z = z(w) defines a complex Lagrangian submanifold in the complex structure J. is known as a brane tiling. Provided that the NS5-branes wrap appropriate surfaces in T * Σ, a brane tiling configuration preserves 4 supercharges.
If the string coupling is strong enough, the tension of D5-branes is much larger than that of NS5-branes. In that situation, the shape of the D5-branes is unaffected by the NS5branes, which simply make 90 degree turns when they hit the D5-branes. (Away from the D5-branes, the NS5-branes wrap the same kinds of supersymmetric cycles as in the case of brane box models.) Hence, the 6d theory on the D5-branes may be regarded as formulated on the fixed spacetime R 3,1 × Σ, irrespective of the precise configuration of the NS5-branes. From the point of view of the 6d theory, the latter branes create codimension-1 defects supported on the zigzag paths.
For compact Σ, the 6d theory in the presence of these defects is described at low energies by a 4d N = 1 theory. This construction therefore defines a map from brane tilings on compact Riemann surfaces to 4d N = 1 theories. Composing it with the supersymmetric index, we get a 2d TQFT equipped with line operators and the associated lattice model.
As before, an extra dimension emerges via embedding into M-theory, implying integrability of the lattice model. Accordingly, each zigzag path naturally carries a circle-valued spectral parameter which is the X 10 coordinate of the corresponding M5-brane. If X 10 has period 2π, then exp(iX 10 ) is identified with a U(1) flavor fugacity in the index of the 4d theory. (Flavor fugacities are often analytically continued to complex parameters.) The relevant flavor symmetry comes from the U(1) gauge symmetry on the NS5-brane. Via the boundary condition on the brane junction, this symmetry is related to a U(1) gauge symmetry on the D5-branes, which gets frozen at low energies and becomes a global symmetry in the field theory.

Integrable lattice models from quiver gauge theories
In order to actually write down the R-operator of the integrable lattice model arising from brane tilings, we need to know more precisely what 4d theory results from a given configuration of zigzag paths. The answer is known when there is no region supporting (N, q) 5-brane with |q| > 1 on Σ. 8 In this case, the 4d theory is a quiver gauge theory.
The rule for reading off the quiver is as follows [11,12,40]. We indicate regions with q = +1 by dark shading and those with q = −1 by light shading. Regions with q = 0 are left unshaded. On an unshaded region there lies an SU(N ) node, produced by open strings attached on this region. This is a flavor node if the region contains part of the boundary of Σ, and otherwise a gauge node. (We allow Σ to have boundary components where the N D5-branes end separately on N D7-branes.) A crossing of two zigzag paths gives rise to a bifundamental chiral multiplet, produced by open strings that start from one unshaded region and end on another: (2.29) For clarity, we have labeled the unshaded regions with the fugacities for the corresponding nodes. As explained at the end of section 2.3, there is a U(1) flavor symmetry for each zigzag path. We choose the convention that the above arrow has charge −1 and +1 under the flavor symmetries U(1) a and U(1) b associated with the horizontal and vertical zigzag paths, respectively. Since every arrow is oppositely charged under two different U(1) flavor symmetries coming from zigzag paths, the diagonal combination of all U(1) flavor symmetries associated with zigzag paths acts on the theory trivially. Therefore, the zigzag paths provide as many U(1) flavor symmetries as their number minus 1, and these generate the nonanomalous U(1) flavor symmetries of the theory [41].
The R-charge R is not uniquely determined since it can be shifted by U(1) flavor charges. From the point of view of the index, the shift amounts to a redefinition of flavor fugacities by some factors. That said, the R-charge assignment is constrained by two conditions. 9 From zigzag paths bounding a shaded region, we get a sequence of arrows making a loop. For example, in our brane tiling we may have a configuration of zigzag paths shown in Fig. 3a. For each such loop, worldsheet instantons induce a superpotential term given by the product of the bifundamental chiral multiplets, with sign determined by the orientation of the arrows. Thus, the R-charges of the arrows must add up to 2. 8 The case N = 2 seems to be somewhat special, as we will explain in section 3.3. 9 For flat Σ, one way to satisfy these conditions is to make the zigzag paths straight and set the R-charge of a bifundamental chiral multiplet to R = θ/π, where θ is the angle between two zigzag paths through which the arrow goes [12]. Then the two conditions are satisfied since the sum of the interior angles of an n-gon is equal to (n − 2)π, while the exterior angles add up to 2π. This prescription is not desirable for our purposes, however. The supersymmetric index depends on the R-charge assignment. We want the index to be a topological invariant of the brane tiling, so the R-charges should not change as zigzag paths are deformed. We will describe our R-charge assignment for specific classes of brane tilings that we study. Likewise, from zigzag paths bounding an unshaded region, we get arrows starting from or ending at a gauge node, as in Fig. 3b. For U(1) R to be free of anomaly, the sum of the R-charges of the arrows must equal the number of the arrows minus 2.
As already said, we would not be able to compute the supersymmetric index without detailed knowledge of the theory. For the purpose of identifying the integrable lattice model, we should therefore study brane tilings in which no regions with |q| > 1 appear, at least as a first step of more general analysis. However, even if we do restrict to that case and identify the lattice model, it is not possible to check the integrability directly using the index formula (2.11). Unfortunately, the Yang-Baxter equation for three zigzag paths always involves regions with |q| > 1.
To circumvent this difficulty, we take a pair of zigzag paths with opposite orientation and regard them as a single thick line: (2.30) If we make a lattice using this line in an (N, −1) 5-brane background, undesirable regions do not arise. Indeed, a crossing of two lines gives a diamond of arrows: An example of a quiver constructed from crossings of this type is shown in Fig. 4. Note that our R-charge assignment satisfies the two constraints described above.
for the corresponding lattice model is given by the supersymmetric index of the quiver (2.31), and depends on two pairs of spectral parameters. This is in fact the lattice model discovered by Bazhanov and Sergeev in [14]. The vector space V supported on a line is the space of symmetric meromorphic functions f (z) of N complex variables z = {z 1 , . . . , z N } satisfying the constraint z 1 · · · z N = 1. The variables z are to be identified with the fugacities for the SU(N ) node on that line. For For X ∈ End(V ), we define its matrix elements X w z by Then the matrix elements ofŘ ij are 10 Here I B is a normalized index of a bifundamental chiral multiplet: We choose this normalization for contributions from arrows with R = 0 so that the Roperator satisfies the unitarity relation (2.25). Plugging this R-operator into the Yang-Baxter equation (2.26), we see that the integrability of the lattice model is the statement that the indices of two quivers are equal: This is indeed true, as the two quivers describe theories that are dual in the infrared; repeated application of the basic Seiberg duality transformation [42] cyclically four times to the three gauge nodes turns the quiver on the left-hand side to the one on the right-hand side [7]. There is another R-operatorŘ ij : V i ⊗ V j → V j ⊗ V i that can be constructed from the line (2.30) [7]. When two lines meet, we can let them exchange their constituent zigzag paths: (2.36) A lattice constructed from crossings of this type consists of triangles of arrows, as shown in Fig. 5. The lattice model thus obtained is an interaction-round-a-face (IRF) model, for which spins are assigned on the faces of the lattice. In the open string picture (2.14), all physical degrees of freedom are localized at the ends of strings as "Chan-Paton factors." Formally, we can reformulate this model as a vertex model. To do so, we take the vector space V supported on a line to be the tensor product of the Chan-Paton spaces from both ends, and include in the definition of the R-operator, delta functions that ensure that the Chan-Paton factors match correctly. In the present case, the matrix elements ofŘ ij arě Strictly speaking, this reformulation is a little problematic in the present case where the spin variables are continuous, as the integration over each set of gauge fugacities z gets accompanied by a factor δ(z, z). It is understood that this factor is to be dropped. The Yang-Baxter equation is simpler for this R-operator. After canceling some factors and using the identity (2.7), we find that the equation reduces to the following form: The two quivers are related by Seiberg duality for SU(N ) SQCD with 2N flavors, hence their indices are indeed equal. Mathematically, it is a consequence of an integral identity [16,43] obeyed by the elliptic gamma function, as pointed out in [44]. Note that we obtained Seiberg duality for 2N flavors from the Yang-Baxter equation, even though the quiver for the lattice model has 3N flavors for each gauge group. This is necessary: the duality transformation would change the rank of the gauge group if the number of flavors were different from 2N .

Surface defects as transfer matrices
Having understood how the supersymmetric indices of brane tiling models give rise to integrable lattice models, we now discuss the lattice model realization of a class of half-BPS surface defects in the 4d theories. We will see that these surface defects are mapped to transfer matrices constructed from L-operators. In the simplest case, we will identify the concrete form of the relevant L-operator.

Surface defects and L-operators
For the sake of clarity, let us go back to the brane box configuration (2.28) and explain the construction of these surface defects in this situation; adapting the construction to brane tilings is straightforward. To this configuration we add r D3-branes: The D3-branes come from X 7 = +∞ and end on the D5-branes located at, say X 7 = 0 ( Fig. 6). Out of the 4 supercharges preserved by the other branes, they preserve the half that generate N = (0, 2) supersymmetry on the 01-plane. From the point of view of the 6d theory on the D5-branes, they create a codimension-3 defect. In the 4d theory obtained by compactifying the 46-plane, this is a codimension-2 or surface defect. Figure 6: D3-branes ending on the D5-branes create a surface defect. In the absence of NS5-branes extending along the 012367 directions, this brane configuration is related, via T-duality along the X 4 -direction, to the familiar configuration of D2-branes creating a surface defect [45] in a 4d N = 2 gauge theory realized by a D4-NS5 system [20]. If those NS5-branes are present, the T-duality converts them to an orbifold which breaks the N = 2 supersymmetry to N = 1. Still, our setup is locally identical to the N = 2 case, and we can rely on various results that have been obtained in that context.
Instead of letting the D3-branes extend indefinitely along the X 7 -axis, we can make them end on an NS5-brane that spans the 012345 directions and is located at some X 7 > 0 (Fig. 7a). The number r of D3-branes can be any integer, so this configuration may be thought of as corresponding to a symmetric representation of SU(N ). Hence, we label the surface defect created by this configuration of D3-branes with the rth symmetric representation [46].
Rather than the above NS5-brane, we may also introduce an NS5-brane extending along the 014589 directions and have the D3-branes end on it (Fig. 7b). In this case, due to the fermionic nature of D-branes, the other ends of the D3-branes must attach to separate D5-branes ("s-rule"). Thus, r cannot exceed N . Furthermore, if we pass the NS5-brane to the other side of the D5-branes, by the Hanany-Witten transition we obtain a similar configuration with N − r D3-branes. This means that we can label the corresponding surface defect with the rth antisymmetric representation of SU(N ). This configuration is dual to that for a Wilson line in the antisymmetric representation in 4d N = 4 super Yang-Mills theory [47][48][49].
We can generate many more surface defects by taking products of these basic ones. It is known that they form a class of surface defects classified by irreducible representations of SU(N ). The brane configuration for a surface defect labeled with a general representa-  Figure 8: (a) A surface defect labeled with a general representation R is constructed from r 1 , . . . , r n D3-branes suspended between the D5-branes and an NS5-brane, with r 1 ≥ · · · ≥ r n . The NS5-branes are separated vertically in this picture, but should really be positioned at the same level. (b) The Young diagram for R has n columns with r 1 , . . . , r n boxes.
In the above construction, we may replace the 46-plane with any Riemann surface Σ and let the D3-branes end on the D5-branes along curves in Σ. The NS5-branes can also take more general configurations representing a brane tiling. Now that we have a 4d N = 1 theory with a half-BPS surface defect, we can place it on S 3 × S 1 and compute its supersymmetric index. Assuming that the system flows to a conformal fixed point, we can do this by conformally mapping the Euclidean spacetime R 4 (minus the origin) to S 3 × R and then compactifying the radial direction R. After the mapping, the surface defect wraps S 1 × S 1 ⊂ S 3 × S 1 . The first S 1 factor may be taken to be either {ζ 1 = 0} or {ζ 2 = 0} in the parameterization |ζ 1 | 2 + |ζ 2 | 2 = 1 of S 3 . These are the only circles in S 3 that are left invariant under the action of the isometry group U(1) p × U(1) q , for the orbit of a point outside these circles is two-dimensional.
The index in the presence of the surface defect is again given by a correlation function of line operators in a 2d TQFT on Σ. The difference is that this time, the correlator contains a new line operator created by the D3-branes ending on the D5-branes. We represent it by a dashed arrow: .
As we have seen, this line operator is specified by a representation of SU(N ). In fact, it is labeled with a pair of representations (R 1 , R 2 ) since in general we can take superposition of two surface defects, each wrapped around either circle in S 3 . In any case, the correlation function equals the partition function of a lattice model whose lattice is made of two kinds of lines, zigzag paths coming from NS5-branes and the dashed line coming from the D3-branes. An extra dimension emerges as the M-theory circle if the brane system is embedded in the M-theory via T-duality along the second S 1 factor. Under this embedding, the D3-branes are mapped to M2-branes supported at points on the M-theory circle. Thus, the inclusion of the dashed line does not spoil the integrability of the lattice model.
The position of the M2-branes on the M-theory circle (which is also the position of the M5-brane on which they have one end) provides a spectral parameter for the dashed line. From the viewpoint of the theory on the D3-branes, this is the holonomy around the second S 1 of the dual gauge field for the diagonal U(1) subgroup of the U(r) gauge group. For the theory on the D2-branes obtained by T-duality along the X 4 -direction, it is the holonomy of the U(1) gauge field dual to a periodic scalar.
We denote by W (R 1 ,R 2 ) the vector space for a dashed line labeled (R 1 , R 2 ). At least when one of the representations is trivial, (R 1 , R 2 ) = (R, ∅), it is natural to expect that this space is isomorphic to the representation space V R of R for the following reason. Under the M-theory embedding, the N D5-branes become M5-branes and support the 6d N = (2, 0) superconformal theory of type A N −1 , placed on S 3 × Σ × S 1 . It is known that a BPS sector of the 6d theory compactified on S 3 is equivalent to Chern-Simons theory with gauge group SL(N, C) [54][55][56][57][58][59]. The D3-branes, on the other hand, become M2-branes and create a half-BPS codimension-4 defect supported on S 1 × C × {p}, where C ⊂ Σ is the curve along which the D3-branes are attached on the D5-branes, and p is a point on the M-theory circle. In the Chern-Simons theory, this defect reduces to a line operator labeled R. This is a Wilson line operator in the representation R, which may be thought of as the worldline of a heavy charged particle whose Hilbert space is V R . Thus we expect In particular, W (R,∅) is a finite-dimensional space. For general (R 1 , R 2 ), it is likely that To avoid clutter, in what follows we fix the representations and simply write W for W (R 1 ,R 2 ) . Let us ask how the introduction of the surface defect is represented on the lattice model side. Consider a general brane tiling configuration (which may or may not have a quiver description), and suppose that the D3-branes end on the D5-branes along a loop in Σ. Due to the periodic boundary condition, the dashed line crosses zigzag paths coming from the right as many times as those coming from the left. By deforming these zigzag paths near the dashed line, we can always make the two cases occur alternately. Then, the neighborhood of the dashed line looks like . . .
We call it an L-operator. In this terminology, the object (3.4) created by the surface defect is the transfer matrix We conclude that the surface defect is represented in the lattice model by the insertion of a transfer matrix constructed from L-operators.
We can also use two dashed lines to make an R-operatorŘ ij : W i ⊗ W j → W j ⊗ W i , which is the Boltzmann weight for the lattice model constructed from dashed lines. In total, we have three R-operators: (3.6) Correspondingly, we have four Yang-Baxter equations, involving 0, 1, 2, or 3 dashed lines.
Those that contain dashed lines, implies integrability of the lattice model on dashed lines. We emphasize that the surface defect is represented by an object that is defined locally near the dashed line. Hence, the same dashed line acts on the indices of any brane tiling models in the same way, as long as the neighborhoods of the dashed line in the respective models are topologically equivalent and the spectral parameters match. This locality holds even when we couple a brane tiling model to an arbitrary 4d N = 1 theory by gauging appropriate flavor groups: to compute the index of the combined theory in the presence of a surface defect, we can first let the corresponding transfer matrix act on the index of the brane tiling model, and then couple the result to the index of the other theory by formula (2.3). This property is a consequence of "associativity" of the gauging operation. The surface defect considered here may be thought of as a 2d N = (0, 2) theory coupled to a 4d N = 1 theory. To insert it in the combined 4d theory, we may first couple the 2d theory to a brane tiling model and then couple the resulting 2d-4d system to the other 4d theory.

Fundamental representation of SU(2)
Let us consider the simplest interesting setup where we have two D5-branes and a single D3-brane, and identify the concrete form of the transfer matrix (3.4) in this case. For N = 2, (N, q) and (N, q + 2) 5-branes are related by an SL(2; Z) transformation of type IIB string theory. Therefore, we can go to a duality frame in which the transfer matrix only involves either (N, 0) and (N, −1) regions, or (N, 0) and (N, 1) regions. The two cases are on an equal footing, and in fact related in a simple way, as we will see. We first consider the transfer matrix in the (N, −1) background.
We denote the L-operator in this case byĽ since it is the operator that arises when a dashed line is inserted in a brane tiling model described by the diamond quiver constructed from the R-operator (2.31). In the situation under consideration, the gauge group of a brane tiling model is a product of SU(2) groups, and the surface defect is labeled (R 1 , R 2 ) = (∅, ); the D3-brane wraps the circle {ζ 2 = 0} in S 3 . Thus, V is the space of meromorphic functions f (z) such that f (z) = f (1/z), and W = C 2 . Accordingly, we can represenť L : W ⊗ V → V ⊗ W as a 2 × 2 matrix whose entries are operators acting on functions in V . The R-operatorŘ ij : Sklyanin constructed [27] an L-operatorĽ S : W ⊗ V → V ⊗ W that solves the RLL relatioň [28,29]. Here u i is a complex spectral parameter for W i , and (ν, ℓ) is a pair of complex spectral parameters for V . Baxter's R-operator satisfies the Yang-Baxter equatioň If we write σ 0 for the 2 × 2 unit matrix and σ 1 , σ 2 , σ 3 for the Pauli matrices, theň where P : W i ⊗ W j → W j ⊗ W i is the permutation operator, θ a+1 (ζ) = θ a+1 (ζ|τ ) are the Jacobi theta functions, and τ , η are complex parameters of the eight-vertex model. Sklyanin's L-operator is defined by The operators S (ℓ) a act on meromorphic functions f (ζ) as difference operators: They generate the so-called Sklyanin algebra [27,60].
In [26], Derkachov and Spiridonov constructed an R-operatorŘ DS ij : V i ⊗V j → V j ⊗V i that satisfies the RLL relation 12 The L-operatorĽ DS : W ⊗ V → V ⊗ W is essentially Sklyanin's L-operator, differing only by an automorphism of the Sklyanin algebra: This L-operator also satisfies the RLL relation withŘ B . We will say more about the construction of Derkachov and Spiridonov in section 3.3. At this point, what is important for us is that their R-operator is precisely the R-operator (2.33) for the diamond quiver.
For the computation of the transfer matrix, we exploit the fact thatĽ really consists of three parts separated by zigzag paths: (3.22) Reflecting this structure,Ľ can be expressed in the following factorized form: In this expression, ∆ ±1/2 i are difference operators acting on functions of z i as (∆ whereθ a (z) = θ a (z; √ p) and we used the multiplicative notation for the theta functions.
Roughly speaking, we may think of the three matrices in the expression (3.23) as corresponding to the left, middle and right parts of the above diagram. The transfer matrix (3.4) is obtained by concatenating n copies of the object (3.22) along a loop: Using formulas in the appendix, we calculate its matrix elements and find  where s i−1 , s i take ±1 and we defineď Multiplying n copies of this matrix and then setting z 0 = z n and b 0 = b n , we obtain the following formula for the transfer matrix: In this formula we have dropped an overall constant independent of the spectral parameters. At any rate, the overall normalization of the L-operator cannot be determined by the RLL relations.
The RLL relations actually admit more degrees of freedom than just the overall normalization. For example, we can multiplyĽ (c, (a, b)) by a function f (c, (a, b)) of its spectral parameters, and the result still solves the RLL relations. In sections 4 and 5 we will check our proposal by comparing it with independent computations from gauge theory.
With the knowledge of the transfer matrix in the (N, −1) 5-brane background, we can identify the transfer matrix in the (N, 1) background from the relation So far we have treated the surface defect labeled (R 1 , R 2 ) = (∅, ). Of course, we may also consider the case with (R 1 , R 2 ) = ( , ∅) in the same manner, by letting surface defects wrap around the other S 1 inside S 3 . Hence, there are two sets of L-operators related by the symmetry exchanging p and q. The underlying algebraic structure is the product of two copies of the Sklyanin algebra, known as the elliptic modular double [61].

Relation to the Bazhanov-Sergeev model
The reason that we introduced the thick line (2.30) by pairing up two zigzag paths was that brane tiling diagrams constructed using this line do not contain regions supporting (N, q) 5-branes with |q| > 1. If those regions are present, in general we do not have a description of the 4d theory in terms of a quiver and hence cannot use the formula (2.11) for the supersymmetric index. Since the Yang-Baxter equation for three zigzag paths always involves undesirable regions, simply restricting ourselves to the quiver case is not sufficient for checking the integrability of the model explicitly.
The situation is different when the number of D5-branes, N = 2. In this case, any (N, q) 5-brane falls into one of two equivalence classes under the SL(2; Z) duality of type IIB string theory: either (N, 0) or (N, 1) 5-brane, which we may visualize as an unshaded or shaded region. Every unshaded region generates an SU(2) gauge or flavor group. This fact raises the hope that a general brane tiling with N = 2 leads to a quiver gauge theory. If so, there should be the corresponding integrable lattice model whose R-matrix is made out of the bifundamental factor I B .
For brane tilings on flat surfaces, such an integrable lattice model was indeed discovered by Bazhanov and Sergeev in [13]. Given a brane tiling, we can map it to the Bazhanov-Sergeev model as follows. First of all, we assume that we can deform the zigzag paths so that each of them heads either upward or downward and its slope is never zero (taking the X 6 -direction as horizontal and the X 4 -direction as vertical, say). With this assumption, the orientations of zigzag paths are actually irrelevant for the lattice model, so we omit them from the brane tiling diagram. Then the diagram consists of two building blocks, and we assign quivers to them: We can also drop orientation from arrows since the fundamental representation of SU (2) is pseudoreal. Finally, we define the partition function of the lattice model by the supersymmetric index of the quiver gauge theory obtained in this way. As usual, we use the normalized factor (2.34) for bifundamental chiral multiplets with R-charge R = 0. Note that I B (z, w; u) is symmetric under exchange of z and w, as is consistent with the fact that arrows are unoriented. (3.37) This "star-triangle" relation is a consequence of identity (A.23) and expresses the RG flow from SU(2) SQCD with three flavors to the infrared theory: So if we define S 2 (b 1 , a 2 ) ∈ End(V 1 ⊗ V 2 ) by multiplication with I B (z 1 , z 2 ; √ pqb 1 /a 2 ), or more graphically, then its action onĽ 2Ľ1 interchanges b 1 and a 2 : . (3.46) Then, S 1 , S 2 , S 3 correspond to generators s 1 , s 2 , s 3 of the symmetric group S 4 permuting a quadruple of fugacities a = (a 1 , b 1 , a 2 , b 2 ), and by the Yang-Baxter equations, act as such onĽ 2Ľ1 (c, a) =Ľ 2 (c, (a 2 , b 2 ))Ľ 1 (c, (a 1 , b 1 )): These permutation operators were used in [26] to construct the R-operatorŘ DS =Ř , which satisfies the RLL relation (3.7). In fact, we havě where P 12 acts on a function f (z 1 , z 2 ) as (P 12 f )(z 1 , z 2 ) = f (z 2 , z 1 ). As mentioned already, this R-operator satisfies the Yang-Baxter equation thanks to the star-triangle relation (3.37). In the operator form used here, the last relation arises naturally from the Bailey lemma proved in [17]. Its higher-rank generalization [62] leads to a web of dualities connecting 4d N = 1 quiver gauge theories [63].

Surface defects in A 1 theories of class S
Now we aim to check our proposal on surface defects and transfer matrices by comparing it with independent computations. In this section we perform the simplest such check for surface defects in A 1 theories of class S [21,22], which arise from compactification of the 6d N = (2, 0) theory of type A 1 on punctured Riemann surfaces. The action of surface defects on the supersymmetric indices of class-S theories have been studied before [34,46,51,52]. Here we review the computation for the surface defect labeled with the fundamental representation of SU(2) based on the method developed in [21], and show that the result agrees with the prediction from the transfer matrix (3.29).

N = 2 linear and circular quiver theories
Prototypical examples of class-S theories are N = 2 gauge theories characterized by linear and circular quivers with SU(N ) nodes. They are actually also examples of brane tiling models discussed in the previous sections. As such, they allow us to translate key notions in class-S theories to the language of brane tilings, and vice versa. Our first task is to describe these theories as class-S theories as well as brane tiling models, and understand the relation between the two descriptions. Although we are mainly interested in the case with N = 2, for now we keep N general.
Let us consider the standard type IIA brane configuration for an N = 2 linear quiver theory with m + 1 nodes. It consists of N D4-branes spanning the 01236 directions, intersected by m NS5-branes extending along the 012345 directions: This brane configuration is lifted in M-theory to N M5-branes, wrapped on a cylinder with m punctures created by intersecting M5-branes. Therefore, the N = 2 linear quiver theory is obtained by compactification of the 6d N = (2, 0) theory of type A N −1 on a cylinder with m punctures, or a sphere with m + 2 punctures. We distinguish the two punctures coming from the ends of the cylinder from the m punctures in between. They are referred to as maximal and minimal punctures, respectively. In the class-S language, the N = 2 linear quiver theory is a class-S theory associated to a sphere with 2 maximal and m minimal punctures. Fig. 9 illustrates the correspondence between the quiver and the sphere.
The R-symmetry of the theory is SU(2) I × U(1) r , where SU(2) I originates from the rotational symmetry of the 789-space, and U(1) r from the rotational symmetry of the 45plane. The SU(N ) flavor node from each end of the quiver is associated to the maximal . . . . . . Figure 9: An N = 2 linear quiver theory associated to a punctured sphere. puncture on the corresponding side of the sphere. The ith gauge node is associated to the region between the ith and (i + 1)th minimal punctures. To the ith minimal puncture is associated a flavor symmetry U(1) α i which acts on the hypermultiplet charged under the (i − 1)th and ith gauge nodes.
Following the philosophy of class-S theories, we decompose this theory into basic building blocks by decoupling gauge fields. Roughly speaking, the gauge coupling of the ith gauge node is inversely proportional to the length between the ith and (i + 1)th minimal punctures. To make the gauge couplings small, we take the minimal punctures far apart from one another. Then the geometry looks like a string of m spheres, each containing a single minimal puncture, connected by long tubes. The smaller the gauge couplings get, the longer the tubes become, and eventually these spheres spilt up as the couplings go to zero. Each of the spheres represents a bifundamental hypermultiplet, which is a linear quiver with m = 1, so it has one minimal and two maximal punctures. The quiver thus breaks into a collection of three-punctured spheres, or trinions.
Conversely, a sphere with 2 maximal and m minimal punctures is obtained by gluing m trinions together, i.e., by replacing pairs of maximal punctures with tubes. In general, we can connect two Riemann surfaces with a tube at maximal punctures. From the point of view of gauge theory, gluing corresponds to gauging the diagonal combination of the SU(N ) flavor symmetries associated to the maximal punctures involved. Using trinions with one minimal and two maximal punctures, we can obtain any linear quiver in this way, and for that matter, also a circular quiver by further gluing the two ends of a linear quiver together. In this sense, these trinions are building blocks for linear and circular quivers. As these two kinds of quivers can be treated essentially in the same manner, we will focus on linear quivers.
To make contact with brane tilings, we need to describe the N = 2 linear quiver theory as an N = 1 quiver gauge theory. In terms of N = 1 supermultiplets, the N = 2 vector multiplet for the ith gauge node decomposes into a vector multiplet and a chiral multiplet Φ i in the adjoint representation with (r, is a flavor symmetry. We denote the fugacity for F by t. For the standard definition of the N = 2 index, r and F enter the trace through the combination (pq) −r t F . Then, the   Figure 11: The building block of class-S theories associated to a trinion.
fugacities of Q i , Q i and Φ i are √ t/α i , √ tα i and pq/t, respectively. It is helpful for us to prepare two copies for each node of the quiver and impose identification between them. We draw the arrows in such a way that Φ i connects the two copies of the ith node and makes a triangle with Q i and Q i , as in Fig. 10. Drawn in this form, it is clear that the N = 2 linear quiver is a special case of the triangle quiver described in section 2, except that the vertical arrow is missing between the flavor nodes at the right end. The corresponding brane tiling diagram is therefore essentially the same, as shown in Fig. 10. Note that the cubic superpotentials, generated around the triangles by worldsheet instantons, are precisely what we need for the theory to have N = 2 supersymmetry.
As we can split the (m+1)-punctured sphere into a collection of m trinions, we can also break the brane tiling diagram into basic pieces. Each piece represents a single trinion and is made of three zigzag paths; see Fig. 11. Gluing two trinions corresponds to concatenating two such diagrams side by side. In the course of this operation, we must interchange the positions of the zigzag paths labeled b and c near the glued side of one of the diagrams. This results in an additional vertical arrow in the combined quiver, which is the adjoint chiral multiplet in the N = 2 vector multiplet used in the gauging.
Let us find the relationship between the convention we use for brane tilings and that used above. The R-charge R in the brane tiling model is given in terms of the charges of the N = 2 theory by The flavor charges associated to the zigzag paths can be written as Without loss of generality, we can set Plugging these relations into the combination (pq) R/2 i a Before proceeding, we should mention a peculiarity in the A 1 case. When N = 2, the U(1) flavor symmetry of a bifundamental hypermultiplet is enhanced to SU(2) due to the fact that the fundamental representation of SU(2) is pseudoreal. For this reason there is no distinction between minimal and maximal punctures, and each trinion can be regarded as a half-hypermultiplet in the trifundamental representation of SU(2) 3 . This is reflected in the index of a trinion, which is manifestly symmetric under permutations of α, z and w.

Surface defects in A 1 class-S theories
In [34], it was explained how to construct a surface defect labeled with a pair of integers (r, s), and how to determine its action on the supersymmetric index. Although the method applies to general N = 2 theories with SU(N ) flavor symmetry, here we review it in the language of class-S theories. Suppose we have a class-S theory T IR associated to a Riemann surface that contains a maximal puncture, whose flavor group we call SU(N ) z . To this surface we introduce an extra minimal puncture. Concretely, we can do this as follows. First, we rename the flavor group SU(N ) z to SU(N ) w ′ . Then, we take a trinion representing a hypermultiplet (Q, Q) with flavor symmetry SU(N ) w ′′ × SU(N ) z × U(1) α , and glue it to T IR by gauging the diagonal subgroup SU(N ) w of SU(N ) w ′ × SU(N ) w ′′ . The resulting theory T UV has one more flavor symmetry, U(1) α , than T IR . Correspondingly, the surface associated to T UV has one more minimal puncture than the original surface.
The theory T UV is related to T IR via the RG flow induced by a diagonal constant vev given to the quark Q, or equivalently, to the baryon B = det Q. (We may instead give a vev to the antibaryon B = det Q, but this does not lead to anything different because of the SU(2) I symmetry.) The vev higgses the gauge group SU(N ) w and breaks SU(N ) w ×SU(N ) z down to the diagonal subgroup. Moreover, it turns the cubic superpotential QΦQ into a quadratic one that makes Q and Φ massive, where Φ is the adjoint chiral multiplet introduced in the gluing. Up to Nambu-Goldstone multiplets that survive the higgsing, in the infrared the multiplets we added are gone and we recover T IR , with SU(N ) w replaced with SU(N ) z . In effect, the minimal puncture introduced by gluing the trinion is "closed." The R-charge I 3 is broken by the vev, but the combination I 3 + F α /2 is preserved and identified with a Cartan generator of the infrared SU(2) R-symmetry.
To create a surface defect in T IR , we instead give the baryon a position-dependent vev B = ζ r 1 ζ s 2 . Here, as before, ζ 1 and ζ 2 are complex coordinates of the two orthogonal planes rotated by j p = j 1 + j 2 and j q = j 1 − j 2 , respectively. Away from the origin, the effect of the position-dependent vev is the same as that of the constant vev, so we get T IR in the infrared. If r = 0, however, the infrared theory is modified on the plane {ζ 1 = 0} since the vev vanishes there. By the same token, the theory is modified on the plane {ζ 2 = 0} if s = 0. Hence, in general we obtain T IR with the insertion of a surface defect labeled with the pair of integers (r, s), supported on the planes {ζ 1 = 0} and {ζ 2 = 0}. This surface defect is to be identified with the surface defect labeled with the pair ( · · · r , · · · s ) of symmetric representations of SU(N ) discussed in the previous section [46]. The index of T UV has a pole in the α-plane at α = √ tp r/N q s/N , and the residue there gives the index of T IR in the presence of the surface defect of type (r, s). The reason is the following. The position-dependent vev B = ζ r 1 ζ s 2 breaks U(1) p , U(1) q , and SU(2) I . At this value of α, however, the only combinations of charges that enter the trace defining the index are those that are preserved by the vev. Thus, we can still define the index in this background. As explained above, T UV flows to T IR plus Nambu-Goldstone multiplets in the infrared. The latter contains massless degrees of freedom, and they contribute to the index by a diverging factor, in fact a simple pole in the α-plane. Therefore, the residue at this pole gives the index of T IR , together with some factor associated with the Nambu-Goldstone multiplets.
We wish to compute this residue and determine the action of the surface defect on the index in the simplest nontrivial case, namely when N = 2 and (r, s) = (0, 1). But first, let us look at the trivial case (r, s) = (0, 0) to gain a better understanding of the computation.
In the construction of a surface defect described above, Q and Φ actually play no role. The essential point is that the vev given to the baryon built from Q replaces SU(N ) w with SU(N ) z in the infrared. So we couple T IR just to Q for the moment. The index of the combined theory is given by where ρ = √ t/α is the fugacity of Q and κ = (p; p) ∞ (q; q) ∞ /2. In this integral, |ρ| < 1 is assumed, but we can analytically continue ρ to a complex parameter and study its pole structure. At ρ = 1, a constant vev can be turned on for B without conflicting with the definition of the index. The integral should have a pole at this point in the ρ-plane, and we want to calculate the residue there.
The integrand has two pairs of poles in the w-plane at As ρ → 1, the first pair of poles collide and pinch the integration contour, and the integral diverges. Likewise, the second pair also collide in this limit. The pole of the integral in the ρ-plane arises from the contributions from these poles in w. Using formula (A.22), we find that the contribution from the pole at w = ρz is The last factor Γ(ρ 2 ) indeed has a pole at ρ = 1, with residue 1/4κ. The pole at w = ρz −1 makes an equal contribution, and we get As expected, the residue reproduces the index of T IR , multiplied by some factors. The factor of 1/2 comes from the fact that B has fugacity ρ 2 , and disappears if we add the equal contribution from the pole at ρ = −1. The factor 1/2κ is the contribution from a decoupled free chiral multiplet contained in a Nambu-Goldstone multiplet. It is the inverse of the index of a free vector multiplet since higgsing of a U(1) gauge theory with a single chiral multiplet leads to a trivial theory whose index is 1.
In order to express this result in a concise form, we introduce the notation of "striking out an arrow" in a quiver diagram to indicate that a constant vev is given to the baryonic operator built from the bifundamental chiral multiplet represented by that arrow, and the contributions from the accompanying Nambu-Goldstone multiplets are discarded. In this notation, what we just found is the identity where the right-hand side is the delta function defined by the relation (2.9). This identity holds when the index of any theory with SU(2) flavor symmetry (or more generally, any meromorphic function f (w) such that f (w) = f (1/w)) is coupled to the right node. With the help of this identity, we can readily show that when a constant vev is turned on for B (and the Nambu-Goldstone multiplets are thrown away), the index of T UV reduces to that of T IR . All we have to do is to look at the part of T UV describing the coupling to the trinion, and compute the relevant residue: In the first equality we used the identity (4.12) and set ρ = 1, and in the second we canceled the pair of arrows making a loop. Thus, the vev transforms the trinion into the original flavor node of T IR . We can compute the index of T IR in the presence of a surface defect in a similar manner. To indicate that the position-dependent vev B = ζ r 1 ζ s 2 is turned on, we put the label (r, s) on the struck-out arrow: (4.14) Then the action of the surface defect of type (r, s) on the index is encoded in the diagram z w w ( r , s ) .

(4.15)
Let us calculate the residue (4.14) for (r, s) = (0, 1). At ρ = q −1/2 , the index I B (z, w; ρ) = Γ(ρz ±1 w ±1 ) of Q has four sets of colliding poles in the w-plane. Two of them are while the other two are The contributions to the residue come from these poles. A small calculation shows that the first two sets of poles contribute in the same way: they set w = q 1/2 z and give a factor of 1/θ(q −1 )θ(z 2 ) in total. Similarly, the contributions from the last two set w = q −1/2 z and give a factor of 1/θ(q −1 )θ(z −2 ). Altogether, we find that the result can be expressed as We remind the reader that θ(z) = θ(z; p) and ∆ ±1/2 act on functions of z as (∆ ±1/2 f )(z) = f (q ±1/2 z). Unlike the case of the constant vev, this identity does not cause a complete cancelation of the indices of Q and Φ. Rather, for ρ = q −1/2 and w = q ±1/2 z, we have Therefore, the effect of introducing the surface defect of type (0, 1) on the index is realized by the difference operator  Figure 12: The brane tiling representation of a surface defect acting on a maximal puncture.
The prefactor θ(t)/θ(q −1 ) is equal to the index of a free chiral field in two dimensions, and represents the center-of-mass degree of freedom of the surface defect. The difference operator S (0,1) acts on the fugacity for the maximal puncture on which the surface defect was constructed. This fact has a natural interpretation. To construct the surface defect, we first introduced an extra minimal puncture, and then took the residue of a pole in the fugacity of the associated flavor symmetry. The latter step can be thought of as transforming the minimal puncture to another kind of puncture which represents the surface defect. By construction, this puncture is located in the neighborhood of a maximal puncture contained in a trinion. We can take the surface defect puncture and collide it to the maximal puncture. The collision produces a new puncture, and defines the action of the surface defect on the maximal puncture.

Comparison with the transfer matrix
Let us compare the result with our proposal. For clarity of presentation, take a minimal puncture in T IR and move it close to the maximal puncture on which the surface defect acts. Then the neighborhood of these punctures looks like a trinion glued to another maximal puncture, and is represented by zigzag paths as in Fig. 12.
According to our proposal, the surface defect creates a dashed line with some spectral parameter d, also drawn in the picture. It acts on the lattice model as the transfer matrix From the relation (4.6), we see that if we set the transfer matrix indeed reproduces the difference operator (4.20), up to an overall factor which cannot be fixed by the Yang-Baxter equations. As noted in [34], the above transfer matrix is essentially the Hamiltonian of the elliptic Ruijsenaars-Schneider model [64,65] of type A 1 . This fact follows from a general result obtained in [66].
Here we have considered only the surface defect of type (0, 1), but the general story is similar. The surface defect of type (r, s) acts on the index by a difference operator S (r,s) . This operator is expected to coincide with the transfer matrix for an appropriate L-operator. If so, by the RLL relation (3.8), the operators S (r,s) for all (r, s) should commute with one another. This is indeed true [34]. From the class-S point of view, the mutual commutativity is guaranteed by the fact that the index is independent of the positions of punctures representing surface defects. Therefore, the order in which they act on a maximal puncture is irrelevant. Note that this argument also exploits the existence of an extra dimension, which is the M-theory circle that emerges as the type IIA brane configuration is lifted to M-theory.
For the same reason, a surface defect puncture can be placed between any two punctures, whether minimal or maximal, and still yield the same result. From the point of view of the type IIA system, this property appears to be quite nontrivial and is known as the "hopping invariance" of the index [46]. From the lattice model viewpoint, this is guaranteed by the other RLL relation (3.7).

N = 1 theories of class S
There are generalizations of class-S theories that preserve only N = 1 supersymmetry. For these theories, we can compute the index in the presence of a surface defect either by the residue method or using the transfer matrix, and compare the results.
Suppose we have an N = 2 theory of class S, obtained by compactification of M5branes on a punctured Riemann surface C. In the ordinary class-S case, C is embedded in the cotangent bundle T * C. If we modify this setup in such a way that C becomes a holomorphic curve in a generic Calabi-Yau threefold, the N = 2 supersymmetry gets broken to N = 1. A situation commonly studied in the literature is when C is the zero section of the total space of the direct sum of two line bundles over C, satisfying an appropriate topological condition [67][68][69][70][71][72][73].
For our purpose, it is sufficient to consider N = 1 theories that are realized by simple modifications of the type IIA brane configuration (4.1) for N = 2 linear quiver theories. In order to break supersymmetry by half, we rotate some of the NS5-branes so that they span the 012389 directions. We refer to these rotated NS5-branes as NS5 − , while calling the unrotated ones NS5 + . Lifted to M-theory, the two types of NS5-branes, NS + and NS − , both become M5-branes supported at points on a cylinder. Correspondingly, there are now two types of minimal punctures labeled with a sign σ = ±1. We denote positive and negative minimal punctures by + and − , respectively.
Recall that in the A 1 case, there is no distinction between minimal and maximal punctures. This fact suggests that maximal punctures also come in two types, positive and negative, denoted by + and − . To incorporate maximal punctures of different signs, we have to modify the brane setup slightly. In the type IIA picture, we terminate the D4branes on a D6-brane on each side of the brane system, rather than letting them continue to X 6 = ±∞. Then, a D6-brane D6 + extending along the 0123789 directions represents a maximal puncture with σ = +1, and D6 − along the 0123457 directions represents one with σ = −1. The total brane configuration is summarized as follows: D4-branes suspended between two NS5-branes of the same sign give rise to an N = 2 vector multiplet as before. From those suspended between NS5-branes of different signs, we get an N = 1 vector multiplet. D4-branes suspended between an NS5-brane and a D6-brane of different signs produce an extra chiral multiplet in the adjoint representation of the SU(N ) flavor symmetry of the maximal puncture.
Flipping the sign of a puncture can be understood geometrically in terms of an operation on zigzag paths. The trinion in Fig. 11 has three punctures with σ = +1. Changing the sign of a maximal puncture to σ = −1 amounts to interchanging the positions of the corresponding pair of zigzag paths so that the adjoint chiral multiplet arises from the crossing; see Fig. 13. Reversing the sign of a minimal puncture entails flipping of the orientation of the corresponding vertical zigzag path. A trinion with all punctures having σ = −1 is shown in Fig. 14.
Let us compute the action of the surface defect of type (0, 1) on the index of an A 1 theory that contains a negative maximal puncture. To this end, we couple the trinion in Fig. 13 to the theory by connecting the positive maximal puncture of the former and the negative maximal puncture of the latter, and take the residue of the index of the resulting Thus, the action of the surface defect on a negative maximal puncture is represented by the difference operator In the brane tiling picture, the surface defect is represented by a dashed line traversing zigzag paths sandwiching an (N, 1) 5-brane region, as illustrated in Fig. 15. Plugging the relations (4.6) and (4.22) into formula (3.32), we see that the transfer matrix reproduces the above difference operator.
5 Surface defects in A 1 theories of class S k Lastly, we study surface defects in A 1 theories of class S k [30], which are 4d N = 1 superconformal theories obtained by compactification of the 6d N = (1, 0) superconformal theory of type (A 1 , Z k ), or two M5-branes probing a C 2 /Z k orbifold singularity [74,75]. After reviewing basic elements of class-S k theories with emphasis on their relation to brane tilings, we compute their supersymmetric indices in the presence of simple surface defects, extending calculations in [30]. The results agree with our proposal based on the lattice model approach: these surface defects are represented by transfer matrices constructed from k copies of the relevant L-operator.

Class-S k theories
As in our discussion on class-S theories in the previous section, we first treat A N −1 theories for general N . We will later set N = 2 when we actually carry out the index computation.
Let us consider a brane tiling model with SU(N ) gauge groups described by the quiver shown in Fig. 16. The quiver consists of m + 1 columns, each containing k nodes. The vertical direction is periodic, whereas the horizontal direction is a finite interval. When k = 1, the theory reduces to the N = 2 linear quiver theory considered in the previous . . . . . . Figure 16: A brane tiling model as a class-S k theory associated to a punctured sphere.
section. Like that case, we could make the horizontal direction also periodic by gluing the leftmost and rightmost columns in a consistent manner, but we will leave the quiver as it is in the following discussion.
If we apply T-duality to the vertical direction (which we take to be the X 4 -direction), we arrive at the type IIA brane configuration (4.1) for an N = 2 linear quiver theory, superposed on a C 2 /Z k orbifold singularity, with Z k acting on v = exp(i(X 4 + iX 5 )) and w = exp(i(X 8 + iX 9 )) by This is a situation studied in [76,77]. Lifting this type IIA system to M-theory, we obtain N M5-branes placed on the orbifold and wrapped on a sphere with 2 maximal and m minimal punctures. The low-energy dynamics of the N M5-branes probing a C 2 /Z k orbifold singularity is governed by the 6d N = (1, 0) theory of type (A N −1 , Z k ). The quiver gauge theory under consideration is therefore an example of a class-S k theory. Various symmetries of the 4d theory arise from six dimensions as follows. The global symmetry of the 6d theory is SU(2) R ×U(1) t ×SU(k) β ×SU(k) γ . The theory is topologically twisted along the punctured sphere by a subgroup U(1) R of the R-symmetry SU(2) R (i.e., the structure group U(1) C of the sphere is replaced with the diagonal subgroup of U(1) C × U(1) R ). Due to the twisting, only the U(1) R part of SU(2) R commutes with the rotation group, and it descends to an R-symmetry of the 4d theory. 14 Also, we turn on Wilson lines for SU(k) β × SU(k) γ so that the 4d theory has a nice Lagrangian description. The Wilson lines break the flavor symmetry to its abelian part U (1) Additionally, the 4d theory inherits flavor symmetries U(1) α j , j = 1, . . . , m from the minimal punctures. The symmetries associated to the zigzag paths come from these U(1) flavor symmetries. Finally, each maximal puncture gives rise to a set of k SU(N ) flavor symmetries, represented in the quiver by a column of k flavor nodes. A building block of quivers of this kind is a strip of bifundamental chiral multiplets depicted in Fig. 17. It is associated to a trinion with one minimal and two maximal punctures. (Anticipating introduction of punctures of different types, we have drawn the minimal and maximal punctures with a plus sign as + and + , respectively.) A puncture is labeled with its flavor symmetry, U(1) or SU(N ) k . In addition, a maximal puncture carries labels called "color" χ ∈ Z k and "orientation" o ∈ {±1}. The orientation simply distinguishes the two maximal punctures in the trinion. In our pictures, we will always place the maximal puncture with positive orientation on the left and the one with negative orientation on the right. The color is defined by the relation between fugacities: arrows with fugacities √ tβ i /α and √ tα/γ i−χ+o start from or end at the same node in the column of nodes corresponding to a maximal puncture labeled (χ, o). The color of the positively oriented puncture is greater than that of the negatively oriented puncture by 1.
The brane tiling diagram for a trinion is also shown in Fig. 17. The minimal puncture corresponds to the vertical zigzag path in the middle, while the maximal punctures correspond to the unshaded regions on the sides of the diagram. The two sets of fugacities (α, β i , γ i ) and (a, b i , c i ) are related by From the brane tiling point of view, the color of a maximal puncture can be defined by the rule that the (N, o) 5-brane regions are sandwiched by pairs of zigzag paths with fugacities To reconstruct the quiver with m + 1 columns that we started with, we glue together m copies of trinions to get the (m+2)-punctured sphere. Gluing can be done only between two maximal punctures with opposite orientation and the same color. This operation gauges the diagonal combination of the SU(N ) k flavor symmetries of the maximal punctures, and at the same time, adds in bifundamental chiral multiplets corresponding to arrows going upward between the gauged nodes. The restriction on the color and orientation ensures that the mixed anomalies for U(1) β i and U(1) γ i cancel.
The rule for gluing is transparent in the brane tiling picture. When we concatenate two brane tiling diagrams, we must connect the zigzag paths in a way consistent with their labels, or the associated flavor symmetries would be lost. Therefore, the colors of the maximal punctures glued together are required to match. Furthermore, each pair of horizontal paths near the glued sides is forced to cross once, resulting in the additional vertical arrows in the combined quiver.
From the brane tiling perspective, it is also clear that the color of the positively oriented maximal puncture increases by 1 as we glue a trinion to it, since the zigzag paths with fugacities c i shift upward when they cross a vertical path. In particular, the color comes back to the original value after k trinions are glued.

Turning on flux
By definition, class-S k theories arise from compactification of the 6d theory on punctured Riemann surfaces. In order to completely specify a class-S k theory, however, we need more data than just a punctured Riemann surface. When we compactify the 6d theory, we can turn on flux for the abelian part of its flavor symmetry, i.e., we have a choice of the associated line bundles. Consequently, there are different theories associated to the same punctured Riemann surface, corresponding to different flux backgrounds for U(1) t , U(1) β i , and U(1) γ i . In fact, for k = 1 we have already analyzed the case with U(1) F flux in section 4. This is the class-S counterpart of the case with U(1) t flux, which we will treat in section 5.5. Here we discuss flux for U(1) β i and U(1) γ i .
A procedure for turning on flux in class-S k theories was proposed in [30]. Suppose we want to create flux for U(1) β * in a class-S k theory, where * ∈ Z k is a fixed index. To do that, we glue a trinion (of the sort depicted in Fig. 17) to a maximal puncture of the associated Riemann surface. The new surface thus obtained has one more minimal puncture than the original surface does, hence one more flavor symmetry U(1) α . Then we "close" this puncture: we give a constant vev to the baryon made of the bifundamental chiral multiplet with fugacity √ tβ * /α, and "flip" the other baryons in the same column, whose fugacities are ( √ tβ i /α) N with i = * . By "flipping a chiral operator X," we mean coupling X to an external chiral multiplet φ X through a superpotential φ X X. After closing the puncture, we obtain a theory associated to the same surface as the original one, but with the color of the maximal puncture shifted by 1. The result is interpreted as a theory with one unit of U(1) β * flux turned on.
Similarly, we can turn on (minus) one unit of U(1) γ * flux by giving a vev to the antibaryon with fugacity ( √ tα/γ * ) N . More generally, we can repeat the above procedure to add any amount of flux for U(1) β i and U(1) γ i . If we turn on flux for more than one flavor symmetries, there are different orders of doing this. However, they all lead to the same result due to the S-duality permuting minimal punctures.
An important point is that adding one unit of U(1) β i flux for every i (or one unit of U(1) γ i flux for every i) is equivalent to doing nothing. This is because the U(1) β i symmetries come from the SU(N ) β symmetry of the 6d theory, hence the sum of their charges is zero. We can see this property more explicitly as follows.
To create one unit of flux for each and every U(1) β i in a given theory, we attach to the theory a sphere with 2 maximal and k minimal punctures, and give vevs to k baryons charged under distinct U(1) β i . Let us suppose that the maximal puncture to which we (a) (b) (c) Figure 18: Closing k minimal punctures. In the first step, we give vevs to the baryons at the arrows on the diagonal. In the subsequent steps we apply relation (2.10) repeatedly.
attach the sphere has o = −1. We align the minimal punctures horizontally and number them 1, . . . , k from left to right. Denoting by α i the fugacity for the U(1) flavor symmetry associated to the ith puncture, we choose to give vevs to the baryons with fugacities ( √ tβ i /α i ) N , i = 1, . . . , k. Fig. 18a illustrates the situation. The vevs identify pairs of nodes as we explained before, and also turn the cubic superpotentials involving the stuck-out arrows into quadratic ones that give masses to the other arrows participating in these superpotentials. After the massive arrows are integrated out, we have the situation in Fig. 18b. The quiver now contains a number of gauge nodes with two arrows attached. These nodes exhibit confinement and chiral symmetry breaking, and as a result, further pairs of nodes are identified, as in Fig. 18c. The identification of nodes results in more gauge nodes with two arrows attached, which again equate pairs of nodes. This process continues until all flavor nodes are identified with the gauge nodes coming from the maximal puncture to which the sphere was attached. There are baryons left over from the confinement, but they couple to the scalars introduced in the flip operation and together become massive. In the end, all minimal punctures are gone, and we recover the original theory.

Surface defects in A 1 theories
Surface defects in class-S k theories can be realized via RG flows in much the same way as in their counterparts in class-S theories. Given a theory T IR , we construct another theory T UV by gluing a trinion to it. Then, we give a position-dependent vev B = ζ r 1 ζ s 2 to a baryon B charged under the flavor symmetry of the new minimal puncture, while flipping the other baryons in the same column. The vev triggers T UV to flow to the original theory T IR , but in the presence of a surface defect labeled with the pair of integers (r, s), or the pair ( · · · r , · · · s ) of symmetric representations of SU(N ).
A novelty in class-S k theories is that maximal punctures have colors. For the color of the maximal puncture of T IR to remain unchanged by the above operation, the trinion we attach to it must have two maximal punctures of the same color. This is not the case for the trinion in Fig. 17, as it has maximal punctures differing in their colors by 1.
Luckily, we know how to make the colors of the maximal punctures match: we glue to it k − 1 more trinions of the same type, and close all minimal punctures introduced in the process. More precisely, we prepare a sphere with 2 maximal and k minimal punctures, pick * ∈ Z k , and for all i = * , give constant vevs to the baryons with fugacities ( √ tβ i /α i ) N and flip those with fugacities ( √ tβ j /α i ) N , j = i. Then, the (k + 2)-punctured sphere flows to a trinion with one minimal puncture and two maximal punctures of the same color, with minus one unit of flux turned on for U(1) β * .
In summary, a surface defect in T IR is realized as follows. First, we construct T UV by coupling to T IR a sphere with 2 maximal and k minimal punctures. Next, we give constant vevs to the baryons with fugacities ( √ tβ i /α i ) N , i = * . Finally, we give the positiondependent vev to the baryon with fugacity ( √ tβ * /α * ) N , and flip all other baryons. There are k choices for the index * , and each choice leads to a different surface defect. Of course, we could follow the same procedure with the roles of baryons and antibaryons exchanged, so in total there are 2k inequivalent surface defects that may be constructed in this way for a given pair of integers (r, s).
What we have to do for the computation of the supersymmetric index with a surface defect is clear now. We couple the quiver shown in Fig. 18a to T IR by gauging the diagonal combination of the SU(N ) k flavor symmetry in the leftmost column of the quiver and the SU(N ) k flavor symmetry of a maximal puncture of T IR . Then we replace one of the arrows with (r, s) , and compute the residues accordingly. The result is the index of T IR in the presence of a surface defect of type (r, s). Let us carry out this computation in the simplest case of A 1 theories and (r, s) = (0, 1), when the surface defect is labeled with the fundamental representation of SU (2).
Without loss of generality, we assume that the maximal puncture of T IR to which we glue the (k + 2)-punctured sphere has color χ = 0. The baryon B that is given the positiondependent vev B = ζ 2 is made of the bifundamental chiral multiplet with fugacity ρ * , where ρ i = √ tβ i /α i . Since the index is independent of the position of punctures, we can rearrange the minimal punctures so that the * th puncture comes to the rightmost position and the rest follow in descending order in their labels. After the rearrangement, the neighborhood of the baryon looks as in Fig. 19a, where we have introduced the symbols ♯ = * − 1 and ♭ = * − 2 for convenience.
The identity (4.12) obtained in the previous section states that the constant vevs given to k − 1 arrows identify pairs of nodes and make the neighboring arrows massive, producing the quiver shown in Fig. 19b.
For the arrow with the position-dependent vev, we use relation (4.18). This relation says that w * is set to q 1/2 z ♯ or q −1/2 z ♯ after taking the residue. To be specific, let us consider the former case. In this case, at ρ * = q −1/2 the w ♯ -integral involves 12 factors of elliptic gamma functions of the form 6 a=1 Γ(t a w ±1 ♯ ): Using identity (A.23), we see that the w ♯ -integral evaluates to a product of elliptic gamma We can perform a similar computation for the case when the antibaryon charged under U(1) γ * is given the position-dependent vev. The corresponding difference operator is Note that in either case, the difference operator depends on the choice of the index * only through the value of the fugacity β * or γ * .

Comparison with transfer matrices
In the brane tiling picture, the above surface defects should be represented by a dashed line that crosses k pairs of horizontal zigzag paths as in Fig. 20. We see that it inserts the transfer matrix constructed from the product ofĽ i (d, (c i , b i+1 )). Using formula (3.29) and relation (5.2), we can check up to an overall factor independent of the spectral parameters, with d β * = 1 √ qtβ * , d γ * = t pq 1 γ * . (5.10) As expected, the transfer matrix reproduces the effects of these surface defects on the index. Interestingly, the transfer matrix unifies the 2k difference operators S (β i ) (0,1) , S (γ i ) (0,1) , corresponding to the 2k choices of the position-dependent vev given to the trinion attached to T IR , into a single one-parameter family of difference operators. These operators differ simply in the value of the spectral parameter for the dashed line.

The case with U(1) t flux
Finally, we consider surface defects in theories with U(1) t flux [30][31][32]. This is the C 2 /Z korbifold version of the N = 1 class-S theories discussed in section 4.4. The type IIA brane Then, we close the minimal puncture contained in the latter trinion by giving a vev to its baryon charged under U(1) β * for some * ∈ Z k , to obtain a trinion with one minimal and two maximal punctures having the same color and different signs. This trinion has minus one unit of flux for U(1) β * . We attach it to a negative maximal puncture (which we assume to have color χ = 0) in some theory from the right, and give the position-dependent vev B = ζ 2 to the baryon charged under U(1) β * in the trinion. This gives a surface defect of type (0, 1) acting on the negative maximal puncture.
A calculation similar to the one we performed before shows that the surface defect acts on the index as the difference operator We can also make a surface defect by giving the position-dependent vev to the antibaryon charged under U(1) γ * . This surface defect is represented by In the brane tiling diagram, the surface defect creates a dashed line as in Fig. 23. From formula (3.32) and relations (5.2) and (5.10), we can check that the above difference operators are reproduced from the transfer matrix.

Outlook
The key element underlying various connections between 4d N = 1 supersymmetric field theories and integrable lattice models is the emergence of the structure of a 2d TQFT equipped with line operators that are localized in extra dimensions [4,6,7]. Branes in string theory, combined with protected quantities such as supersymmetric indices, provide a natural framework in which such structures may be found.
In this paper we have utilized this framework to elucidate the integrability aspect of surface defects in 4d N = 1 theories. As we have seen, under the correspondence between brane tilings and integrable lattice models, a class of half-BPS surface defects labeled with representations of SU(N ) are mapped to transfer matrices constructed from L-operators. In the case of the fundamental representation of SU(2), the relevant L-operator is that of Sklyanin, which satisfies an RLL relation with Baxter's R-operator for the eight-vertex model. We have shown that the corresponding transfer matrix unifies the 2k difference operators obtained by the residue method for A 1 theories of class S k .
Our analysis is far from complete, however. Obviously lacking is the answer to the following question: What is the L-operator for a general representation of SU(N )?
We may approach this important question either from the lattice model side or from the field theory side. The strategy on the lattice model side would be to search for an L-operator that solves the appropriate Yang-Baxter equations, as we have done for the fundamental representation of SU (2).
From the field theory side, the strategy is to somehow compute the indices of brane tiling models in the presence of general surface defects, and read off the L-operator from them. For example, we may combine the residue method for class-S k theories, which can handle the symmetric representations, and analysis of the algebra generated by the resulting difference operators. This program had some success in the class-S case [51,52]. A different method is to realize a surface defect as a 2d N = (0, 2) theory, and compute the index of the coupled 4d-2d system by localization of the path integral. This was done in [46] for k = 1 and symmetric representations. A related computation appeared in [79].
Either strategy is not without shortcomings. The Yang-Baxter equations do not uniquely determine the L-operator. The supersymmetric indices, on the other hand, encode transfer matrices but not the L-operator directly. We would therefore need to combine approaches from both sides.
Another direction we have left unexplored is the study of the 2d TQFT itself, which in our discussion just served as an intermediate step whereby brane tilings and integrable lattice models were connected. String theory predicts that this TQFT is related to the 2d TQFT arising from the indices of class-S k theories through a duality exchanging line operators in the former and local operators in the latter. It may be possible to determine these TQFTs by localization computations along the lines of [59,[80][81][82][83][84].
There are many more interesting questions to be asked in relation to 4d N = 1 supersymmetric field theories and integrable lattice models. We wish to answer some of them in future work. work of J.Y. is supported by the ERC Starting Grant no. 335739 "Quantum fields and knot homologies" funded by the European Research Council under the European Union's Seventh Framework Programme.

A Definitions and useful formulas
In this appendix we collect definitions and useful formulas concerning special functions we encounter in this paper.

(A.24)
The left-hand side of the above formula is known as the elliptic beta integral.