Intersecting Surface Defects and Instanton Partition Functions

We analyze intersecting surface defects inserted in interacting four-dimensional N = 2 supersymmetric quantum field theories. We employ the realization of a class of such systems as the infrared fixed points of renormalization group flows from larger theories, triggered by perturbed Seiberg-Witten monopole-like configurations, to compute their partition functions. These results are cast into the form of a partition function of 4d/2d/0d coupled systems. Our computations provide concrete expressions for the instanton partition function in the presence of intersecting defects and we study the corresponding ADHM model.


Introduction
Half-BPS codimension two defect operators form a rich class of observables in supersymmetric quantum field theories. Their vacuum expectation values, as those of all defect operators, are diagnostic tools to identify the phase of the quantum field theory [1][2][3]. Various quantum field theoretic constructions of codimension two defects have been proposed and explored in the literature, see for example the review [4]. First, one can engineer a defect by defining a prescribed singularity for the gauge fields (and additional vector multiplet scalars) along the codimension two surface, as in [5]. Second, a defect operator can be constructed by coupling a quantum field theory supported on its worldvolume to the bulk quantum field theory. The coupling can be achieved by gauging lower-dimensional flavor symmetries with higher-dimensional gauge fields and/or by turning on superpotential couplings. Third, a codimension two defect in a theory T can be designed in terms of a renormalization group flow from a larger theory T triggered by a position-dependent, vortex-like Higgs branch vacuum expectation value [6,7]. 1 Naturally, some defects can be constructed in multiple ways. Nevertheless, it is of importance to study all constructions separately, as their computational difficulties and conceptual merits vary. Such study is helped tremendously by the fact that when placing the theory on a compact Euclidean manifold, all three descriptions are, in principle, amenable to an exact analysis using localization techniques. See [17] for a recent comprehensive review on localization techniques.
The M-theory construction of four-dimensional N = 2 supersymmetric theories of class S (of type A N −1 ) [18] allows one to identify the class of concrete defects of interest to this paper: adding additional stacks of M2-branes ending on the main stack of N M5-branes can introduce surface defects in the four-dimensional theory. The thus obtained M2-brane defects are known to be labeled by a representation R of SU (N ). In [19], the two-dimensional quiver gauge theory residing on the support of the defect and its coupling to the bulk four-dimensional theory were identified in detail. In fact, for the case of defects labeled by symmetric representations two different coupled systems were proposed. For the purposes of this paper, it is important to remark that one of these descriptions can alternatively be obtained from the third construction described in the previous paragraph. 2 Allowing for simultaneous insertions of multiple half-BPS defects, intersecting each other along codimension four loci, while preserving one quarter of the supersymmetry, enlarges the collection of defects considerably and is very well-motivated. Indeed, in [21] it was conjectured and overwhelming evidence was found in favor of the statement that the squashed four-sphere partition function of theories of class S in the presence of intersecting M2-brane defects, wrapping two intersecting two-spheres, is the translation of the insertion of a generic degenerate vertex operator in the corresponding Liouville/Toda conformal field theory correlator through the AGT dictionary [22,23], extending and completing [19,24]. Note that such defects are labeled by a pair of representations (R , R), which is precisely the defining information of a generic degenerate vertex operator in Liouville/Toda theory. 3 In [21], the insertion of intersecting defects was engineered by considering a coupled 4d/2d/0d system. In this description, the defect is engineered by coupling quantum field theories supported on the respective codimension two worldvolumes as well as additional degrees of freedom residing at their intersection to each other and to the bulk quantum field theory. The precise 4d/2d/0d coupled systems describing intersecting M2-brane defects were conjectured. As was also the case for a single defect, intersecting defects labeled by symmetric representations can be described by two different coupled systems.
A localization computation, performed explicitly in [21], allows one to calculate the squashed four-sphere partition function of such system. 4 Let T denote the four-dimensional theory and let τ L/R denote two-dimensional theories residing on the defects wrapping the two-spheres S 2 L and S 2 R , which intersect each other at the north pole and south pole. The full partition function then takes the schematic form where the factors Z intersection are the one-loop determinants of the degrees of freedom at the two intersection points respectively, and |Z (T ,R 2 L ∪R 2 R ⊂R 4 ) inst | 2 are two copies of the instanton partition function, one for the north pole and one for the south pole, describing instantons in the presence of the intersecting surface defects spanning the local coordinate planes R 2 L ∪ R 2 R in R 4 . In [21] the focus was on the already very rich dynamics of 4d/2d/0d systems without four-dimensional gauge fields, thus avoiding the intricacies of the instanton partition functions. In this paper we aim at considering intersecting defects in interacting four-dimensional field theories and addressing the problem of instanton counting in the presence of such defects. 5 Our approach will be, alternative to that in [21], to construct theories T in the presence of intersecting M2-brane defects labeled by symmetric representations using the aforementioned third strategy, i.e., by considering a renormalization group flow from a larger theory T triggered by 3 A generic degenerate momentum reads α = −bΩR − b −1 Ω R , in terms of the highest weight vectors ΩR, Ω R of irreducible representations R and R respectively, and b parametrizes the Virasoro central charge. 4 See also [25] for a localization computation in the presence of a single defect. 5 By taking one of the intersecting defects to be trivial, one can always simplify our results to the case of a single defect. In [19] an extensive study was performed of the squashed four-sphere partition function of theories of free hypermultiplets in the presence of a single defect. a position-dependent vacuum expectation value with an intersecting vortex-like profile. 6 When the theory T is a Lagrangian theory on S 4 b , this Higgsing prescription offers a straightforward computational tool to calculate the partition function Z (T ,S 2 L ∪S 2 R ⊂S 4 b ) of T in the presence of said intersecting defects. In more detail, it instructs one to consider the residue of a certain pole of the partition function Z (T ,S 4 b ) , which can be calculated by considering pinching poles of the integrand of the matrix integral computing Z ( T ,S 4 b ) . The result involves intricate sums over a restricted set of Young diagrams, which we subsequently cast in the form of a coupled 4d/2d/0d system as in (1.1), by reorganizing the sums over the restricted diagrams into the integrals over gauge equivariant parameters and sums over magnetic fluxes of the partition functions of the two-dimensional theories τ L/R . This step heavily relies on factorization properties of the summand of instanton partition functions, which we derive in appendix C, when evaluated at special values of their gauge equivariant parameter. More importantly, we obtain concrete expressions for the instanton partition function, computing the equivariant volume of the instanton moduli space in the presence of intersecting codimension two singularities, and their corresponding ADHM matrix model.
The main result of the paper, thus obtained, is the S 4 b -partition function of a four-dimensional N = 2 SU (N ) gauge theory with N fundamental and N antifundamental hypermultiplets, 7 i.e., SQCD, in the presence of intersecting M2-brane surface defects, labeled by n R and n L -fold symmetric representations respectively. It takes the form (1.1) and can be found explicitly in (4.13). To be more precise, the coupled system we obtain involves chiral multiplets as zero-dimensional degrees of freedom, i.e., it coincides with the one described in conjecture 4 of [21] with four-dimensional N = 2 SQCD. The left subfigure in figure 1 depicts the 4d/2d/0d coupled system under consideration. We derive the instanton partition function Z (T ,R 2 L ∪R 2 R ⊂R 4 ) inst in the presence of intersecting planar surface defects and find it to take the form where we omitted all gauge and flavor equivariant parameters. It is expressed as the usual sum over N -tuples Y of Young diagrams. The summand contains the new fctors z R 2 L/R defect , which can be found explicitly in (4.17), capturing the contributions to the instanton counting of the additional zero-modes in the presence of intersecting surface defects, in addition to the standard factors z R 4 vect , z R 4 fund and z R 4 afund describing the contributions from the vector multiplet and N + N hypermultiplets. The coefficient of q k of the above result can be derived from the ADHM model for k-instantons  Figure 1: On the left, the coupled 4d/2d/0d quiver gauge theory realizing the insertion, in fourdimensional N = 2 SQCD, of intersecting M2-brane surface defects labeled by symmetric representations of rank n R and n L respectively is depicted. The zero-dimensional multiplets are denoted using twodimensional N = (0, 2) quiver notation reduced to zero dimensions. Various superpotential couplings are turned on, in direct analogy to the ones given in detail in [21]. On the right, the ADHM model for k-instantons of the left theory is shown. The model preserves the dimensional reduction to zero dimensions of two-dimensional N = (0, 2) supersymmetry. We used the corresponding quiver conventions. A J-type superpotential equal to the sum of the U (k) adjoint bilinears formed out of the two pairs of chiral multiplets is turned on for the adjoint Fermi multiplet. The flavor charges carried by the various multiplets are also compatible with a quadratic J-or E-type superpotential for the Fermi multiplets charged under U (n L/R ). 8 the brane construction of said instantons, see section 5 for all the details. In section 6 we present conjectural generalizations of the instanton counting in the case of generic intersecting M2-brane defects.
The paper is organized as follows. We start in section 2 by briefly recalling the Higgsing prescription to compute squashed sphere partition functions in the presence of (intersecting) M2brane defects labeled by symmetric representations. We also present its brane realization. In section 3 we implement the prescription for the case where T is a four-or five-dimensional theory of N 2 free hypermultiplets placed on a squashed sphere. The vacuum expectation value in T of intersecting M2-brane defects on the sphere has been computed in [21] from the point of view of the 4d/2d/0d or 5d/3d/1d coupled system and takes the form (1.1) (without the instanton contributions). For the case of symmetric representations, we reproduce this expression directly, and provide a derivation of a few details that were not addressed in [21]. We notice that the superpotential constraints of the coupled system on the parameters appearing in the partition function are reproduced effortlessly in the Higgsing computation thanks to the fact that they have a common origin in the theory T , which in this case is SQCD. These relatively simple examples allow us to show in some detail the interplay of the various ingredients of the Higgsed partition function of theory T , and how to cast it in the form (1.1). In section 4 we turn our attention to inserting defects in four-dimensional N = 2 SQCD. We apply the Higgsing prescription to an SU (N ) × SU (N ) gauge theory with bifundamental hypermultiplets and for each gauge group an additional N fundamental hypermultiplets, and cast the resulting partition function in the form (1.1). As a result we obtain a sharp prediction for the instanton partition function in the presence of intersecting surface defects. This expression provides 8 The partition function is insensitive to the presence of superpotential couplings.
concrete support for the ADHM matrix model that we obtain in section 5 from a brane construction.
We present our conclusions and some future directions in section 6. Five appendices contain various technical details and computations.

Higgsing and codimension two defects
In this section we start by briefly recalling the Higgsing prescription to compute the partition function of a theory T in the presence of (intersecting) defects placed on the squashed four/fivesphere [6,7]. We also consider the brane realization of this prescription, which provides a natural bridge to the description of intersecting surface defects in terms of a 4d/2d/0d (or 5d/3d/1d) coupled system as in [21].

The Higgsing prescription
We will be interested in four/five-dimensional quantum field theories with eight supercharges. 9 Let us for concreteness start by considering four-dimensional N = 2 supersymmetric theories.
Consider a theory T whose flavor symmetry contains an SU (N ) factor, and consider the theory of N 2 free hypermultiplets, which has flavor symmetry U Sp(2N 2 ) ⊃ SU (N ) × SU (N ) × U (1). By gauging the diagonal subgroup of the SU (N ) flavor symmetry factor of the former theory with one of the SU (N ) factors of the latter theory, we obtain a new theory T . As compared to T , the theory T has an extra U (1) factor in its flavor symmetry group. We denote the corresponding mass parameter asM .
The theory T can be placed on the squashed four-sphere S 4 b , 10 and its partition function can be computed using localization techniques [27,28]. Let us denote the supercharge used to localize the theory as Q. Its square is given by where M R/L are generators of the U (1) R/L isometries of S 4 b (see footnote 10), R is the SU (2) R Cartan generator and F J are the Cartan generators of the flavor symmetry algebra. The coefficients 9 The localization computations we will employ throughout this paper rely on a Lagrangian description, but the Higgsing prescription is applicable outside the realm of Lagrangian theories. We will restrict attention to (Lagrangian) four-dimensional N = 2 supersymmetric quantum field theories of class S and their five-dimensional uplift. 10 We consider S 4 b defined through the embedding equation in five-dimensional Euclidean space R 5 = R × C 2 with coordinates x, z1, z2 in terms of parameters r, ,˜ with dimension of length. The squashing parameter b is defined as b 2 = ˜ . The isometries of S 4 b are given by U (1) R × U (1) L , which act by rotating the z1 and z2 plane respectively. The fixed locus of U (1) R is a squashed two-spheres: S 2 R = S 4 b z 1 =0 and, similarly, the fixed locus of U (1) L is S 2 L = S 4 b z 2 =0 . The two-spheres S 2 R and S 2 L intersect at their north pole and south pole, i.e., the points with coordinates z1 = z2 = 0 and x0 = ±r.
M J are mass parameters rescaled by ˜ , where and˜ are two radii of the squashed sphere (see footnote 10), to make them dimensionless. Localization techniques simplify the computation of the S 4 b partition function to the calculation of one-loop determinants of quadratic fluctuations around the localization locus given by arbitrary constant values for Σ T , the imaginary part of the vector multiplet scalar of the total gauge group. 11 The final result for the S 4 b partition function of the theory T is then denotes the classical action evaluated on the localization locus, Z 1-loop is the oneloop determinant and |Z ( T ,R 4 ) inst (q, Σ, M )| 2 are two copies of the Nekrasov instanton partition function [29,30], capturing the contribution to the localized path integral of instantons residing at the north and south pole of S 4 b . In [6,7], it was argued, by considering the physics at the infrared fixed point of the renormalization group flow triggered by a position dependent Higgs branch vacuum expectation value for the baryon constructed out of the hypermultiplet scalars, which carries charges necessarily has a pole when Moreover, the residue of the pole precisely captures the partition function of the theory T in the presence of M2-brane surface defects labeled by n R -fold and n L -fold symmetric representations respectively up to the left-over contribution of the hypermultiplet that captures the fluctuations around the Higgs branch vacuum. These defects wrap two intersecting two-spheres S 2 R/L , the fixed loci of U (1) R/L . The pole at (2.3) of Z ( T ,S 4 b ) (M ) finds its origin in the matrix integral (2.2) because of poles of the integrand pinching the integration contour. To see this, let us separate out the SU (N ) gauge group that gauges the free hypermultiplet to T , and split Σ T accordingly: Σ T = (Σ T , Σ), where Σ T is the vector multiplet scalar of the full gauge group of theory T , and Σ the SU (N ) vector multiplet scalar. We can then rewrite (2.2) as More precisely, this is the "Coulomb branch localization" locus. Alternatively, one can perform a "Higgs branch localization" computation, see [15,16].
The first factor in the second line is the one-loop determinant of the SU (N ) vector multiplet, while the second factor is the contribution of the N 2 extra hypermultiplets, organized into N SU (N ) fundamental hypermultipets. 12 Here M I , I = 1, . . . , N denote the mass parameters associated to the SU (N ) flavor symmetry (with I M I = 0). The integrand of the Σ-integral has poles (among many others) located at where σ denotes a permutation of N variables. These poles arise from the one-loop determinant of the extra hypermultiplets. When the U (1) mass parameterM takes the value of (2.3), they pinch the integration contour if 3) is equal to the sum over all partitions of n R , n L in (2.6) of the residue of the Σ-integrand of Z ( T ,S 4 b ) at the pole position (2.5) when treating the Σ A as N independent variables. 13 A similar analysis can be performed for five-dimensional N = 1 theories. The theory T can be put on the squashed five-sphere S 5 ω , 14 and its partition function can again be computed using localization techniques [31][32][33][34][35][36]. The localizing supercharge Q squares to where M (α) are the generators of the U (1) (1) × U (1) (2) × U (1) (3) isometry of the squashed five-sphere S 5 ω (see footnote 14). The localization locus consists of arbitrary constant values for the vector multiplet scalar Σ T , hence the partition function reads 12 See appendix A for the definition and some useful properties of the various special functions that are used throughout the paper. 13 Upon gauging the additional U (1) flavor symmetry and turning on a Fayet-Iliopoulos parameter, which coincides with the gauged setup of [6,7], the residues of precisely these poles were given meaning in the "Higgs branch localization" computation of [16] in terms of Seiberg-Witten monopoles.
14 The squashed five-sphere S 5 ω=(ω 1 ,ω 2 ,ω 3 ) is given by the locus in C 3 satisfying , which act by rotations on the three complex planes respectively. The fixed locus of U (1) (α) is the squashed three-sphere S 3 (α) = S 5 ω zα=0 , while the fixed locus of U (1) (α) × U (1) (β =α) is the circle S 1 (α∩β) = S 5 ω zα=z β =0 . The notation indicates that it appears as the intersection of the three-spheres S 3 (α) and S 3 (β) . A convenient visualization of the five-sphere and its fixed loci under one or two of the U (1) isometries is as a T 3 -fibration over a solid triangle, where on the edges one of the cycles shrinks and at the corners two cycles shrink simultanously.
One can argue that Z ( T ,S 5 ω ) (M ) has a pole at whose residue computes the S 5 ω partition function of T in the presence of codimension two defects labeled by n (α) -fold symmetric representations and wrapping the three-spheres S 3 (α) obtained as the fixed loci of the U (1) (α) isometries (see footnote 14), respectively. These three-spheres intersect each other in pairs along a circle. Again, this pole arises from pinching the integration contour by poles of the one-loop determinant of the N 2 hypermultiplets located at A . The residue of Z ( T ,S 5 ω ) (M ) at the pole given in (2.10) equals the sum over partitions of the integers n (α) of the residue of the integrand at the pole position (2.11) with the Σ A treated as independent variables. 15

Brane realization
To sharpen one's intuition of the Higgsing prescription outlined in the previous subsection, one may look at its brane realization [7]. Consider a four-dimensional N = 2 gauge theory T described by the linear quiver and corresponding type IIA brane configuration 16 Gauging in a theory of N 2 hypermultiplets amounts to adding an additional NS5-brane on the right end of the brane array. The Higgsing prescription of the previous subsection is then trivially implemented by pulling away this additional NS5-brane (in the 10-direction of footnote 16), while suspending n R D2 R and n L D2 L -branes between the displaced NS5-brane and the right stack of D4-branes, see figure 2. 15 In [13], these residues were interpreted as the contribution to the partition function of K-theoretic Seiberg-Witten monopoles. 16 The branes in this figure as well as those in figure 2 and the following discussion span the following dimensions:   Figure 3: Coupled 4d/2d/0d quiver gauge theory realizing intersecting M2-brane surface defects labeled by symmetric representations, of rank n R and n L respectively, in a four-dimensional N = 2 linear quiver gauge theory. The two-dimensional degrees of freedom, depicted in N = (2, 2) quiver notation, are coupled to the four-dimensional ones through cubic and quartic superpotential couplings. The explicit superpotentials can be found in [21]. The zero-dimensional degrees of freedom, denoted using two-dimensional N = (0, 2) quiver notations dimensionally reduced to zero dimensions, with solid lines representing chiral multiplets, participate in E-and J-type superpotentials.
Various observations should be made. First of all, the brane picture in figure 2 was also considered in [21] to describe intersecting M2-brane surface defects labeled by n R and n L -fold symmetric representations respectively. Its field theory realization is described by a coupled 4d/2d/0d system, described by the quiver in figure 3 (see [21]). Note that the two-dimensional theories, residing on the D2 R and D2 L -branes, are in their Higgs phase, with equal Fayet-Iliopoulos parameter ξ FI proportional to the distance (in the 7-direction) between the displaced NS5-brane and the next right-most NS5-brane. Before Higgsing, this distance was proportional to the inverse square of the gauge coupling of the extra SU (N ) gauge node: (2.12) In particular, the Higgsing prescription will produce gauge theory results in the regime where ξ FI is positive, and where the defect is inserted at the right-most end of the quiver. In this paper we will restrict attention to this regime. Note however that sliding the displaced NS5-brane along the brane array in figure 2 implements hopping dualities [19,37] (see also [38,39]), which in the quiver gauge theory description of figure 3 translate to coupling the defect world volume theory to a different pair of neighboring nodes of the four-dimensional quiver, while not changing the resulting partition function.
In [21], a first-principles localization computation was performed to calculate the partition function of the coupled 4d/2d/0d system when placed on a squashed four-sphere, with the defects wrapping two intersecting two-spheres S 2 R/L , the fixed loci of U (1) R/L , in the case of non-interacting four-dimensional theories. Our aim in the next section will be to reproduce these results from the Higgsing point of view. When the four-dimensional theory contains gauge fields, the localization computation needs as input the Nekrasov instanton partition function in the presence of intersecting planar surface defects, which modify non-trivially the ADHM data. The Higgsing prescription does not require such input, and in section 4 we will apply it to N = 2 SQCD. This computation will allow us to extract the modified ADHM integral.
The brane realization of figure 2 already provides compelling hints about how the ADHM data should be modified. In this setup, instantons are described by D0-branes stretching between the NS5-branes. Their worldvolume theory is enriched by massless modes (in the Coulomb phase, i.e., when ξ FI = 0), if any, arising from open strings stretching between the D0-branes and the D2 R and D2 L -branes. These give rise to the dimensional reduction of a two-dimensional N = (2, 2) chiral multiplet to zero dimensions, or equivalently, the dimensional reduction of a two-dimensional N = (0, 2) chiral multiplet and Fermi multiplet. We will provide more details about the instanton counting in the presence of defects in section 5. Our Higgsing computation of section 4 will provide an independent verification of these arguments.

Intersecting defects in theory of N 2 free hypermultiplets
In this section we work out in some detail the Higgsing computation for the case where T is a theory of free hypermultiplets. We will find perfect agreement with the description of intersecting M2brane defects labeled by symmetric representations in terms of a 4d/2d/0d (or 5d/3d/1d) system [21].
Our computation also provides a derivation of the Jeffrey-Kirwan-like residue prescription used to evaluate the partition function of the coupled 4d/2d/0d (or 5d/3d/1d) system, and of the flavor charges of the degrees of freedom living on the intersection. In the next section we will consider the case of interacting theories T .
3.1 Intersecting codimension two defects on S 5 ω As a first application of the Higgsing prescription of the previous section, we consider the partition function of a theory of N 2 free hypermultiplets on S 5 ω in the presence of intersecting Figure 4: A convenient representation of S 5 ω in terms of a T 3 -fibration over a triangle. Each edge represents a three-sphere invariant point-wise under one of the U (1) isometries, and each vertex represents an S 1 , where two S 3 's intersect, invariant point-wise under two U (1) isometries. Each S 1 has two tubular neighborhoods of the form S 1 × R 2 in the two intersecting S 3 's, with omega-deformation parameters given in terms of b ±1 (α) , as shown in the figure.
codimension two defects wrapping two of the three-spheres S 3 (α) fixed by the U (1) (α) isometry (see footnote 14, and also figure 4), say S 3 (1) and S 3 (2) . Our aim will be to cast the result in the manifest form of the partition function of a 5d/3d/1d coupled system, as in [21]. We consider this case first since the fact that the intersection S 3 (1) ∩ S 3 (2) = S 1 (1∩2) has a single connected component is a simplifying feature that will be absent in the example of S 4 b in the next subsection.

S 5 ω partition function of T
Our starting point, the theory T , is described by the quiver That is, it is an SU (N ) gauge theory with N fundamental and N anti-fundamental hypermultiplets, i.e., N = 2 SQCD. 17 The S 5 ω -partition function of T is computed by the matrix integral (2.9) [31-36, 40, 41] The explicit expression for the classical action is given by 1-loop is the product of the one-loop determinants of the SU (N ) vector multiplet, the N fundamental hypermultiplets and the N antifundamental hypermultiplets: , (3.4) written in terms of the triple sine function. Here we used the notation | ω| = ω 1 + ω 2 + ω 3 . Note that we did not explicitly separate the masses for the SU (N ) × U (1) flavor symmetry, but instead considered U (N ) masses. Finally, there are three copies of the K-theoretic instanton partition function, capturing contributions of instantons residing at the circles kept fixed by two out of three ωα . Each factor can be written as a sum over an N -tuple of Young diagrams [29,30] of a product over the contributions of vector and matter multiplets: Here we have omitted the explicit dependence on 1 , 2 in all factors z R 4 ×S 1 . The instanton counting parameter q is given by q = exp − 8π 2 β g 2

Y M
, and | Y | denotes the total number of boxes in the N -tuple of Young diagrams. The expression for z fund reads while those of z R 4 ×S 1 vect and z R 4 ×S 1 afund are given in (C.2)-(C.3) in appendix C. 18 Note that the masses that enter in (3.7) are slightly shifted (see [42]):

Implementing the Higgsing prescription
As outlined in the previous section, to introduce intersecting codimension two defects wrapping the three-spheres S 3 (1) and S 3 (2) and labeled by the n (1) -fold and n (2) -fold symmetric representation respectively, we should consider the residue at the pole position (2.11) with n (3) = 0 (and hence n (3) while treating Σ A as N independent variables, and sum over all partitions n (1) of n (1) and n (2) of n (2) . As before, σ(A) is a permutation of A = 1, ..., N which we take to be, without loss of generality, σ(A) = A. At this point let us introduce the notation that "→" means evaluating the residue at the pole (3.10) and removing some spurious factors. As we aim to cast the result in the form of a matrix integral describing the coupled 5d/3d/1d system, we try to factorize all contributions accordingly in pieces depending only on information of either three-sphere S 3 (1) or S 3 (2) . As we will see, the non-factorizable pieces nicely cancel against each other, except for a factor that will ultimately describe the one-dimensional degrees of freedom residing on the intersection.
It is straightforward to work out the residue at the pole position (3.10). The classical action (3.2) and the one-loop determinant (3.3) become, using recursion relations for the triple sine functions (see (A.8)), 20 1-loop| n (2) Z T ; n (1) , n (2) cl,extra Z T ; n (1) , n (2) 1-loop,extra . 1-loop is the one-loop determinant of N 2 free hypermultiplets, which constitute the infrared theory T . It reads .
(3.12) 18 In appendix C we have simultaneously performed manipulations of four-dimensional and five-dimensional instanton partition functions, which is possible after introducing the generalized factorial with respect to a function f (x), defined in appendix A.1, with f (x) in four and five dimensions given in (C.1). 19 Recall that we have regrouped the mass for the U (1) flavor symmetry and those for the SU (N ) flavor symmetry into U (N ) masses. 20 Here we omitted on the right-hand side the left-over hypermultiplet contributions mentioned in the previous section as well as the classical action evaluated on the Higgs branch vacuum at infinity, i.e., on the position-independent Higgs branch vacuum.
Note that the masses of the N 2 free hypermultiplets, represented by a two-flavor-node quiver, are N ω 2 . Second, we find the classical action and one-loop determinant of squashed three-sphere partition functions of a three-dimensional N = 2 supersymmetric U (n (α) ) gauge theory with N fundamental and N antifundamental chiral multiplets and one adjoint chiral multiplet, i.e., the quiver gauge theory N N n (α) We will henceforth call this theory 'SQCDA.' 21 These quantities are in their Higgs branch localized form, 22 hence the additional subscript indicating the Higgs branch vacuum, i.e., the partition n (α) .
Their explicit expressions can be found in appendix B.2. The Fayet-Iliopoulos parameter ξ (3.14) Note that the relation on the U (1) mass 1 N ω 2 translates into a relation on the U (1) mass of the fundamental chiral multiplets. Finally, both the classical action and the one-loop determinant produce extra factors which cannot be factorized in terms of information 21 Note that the rank of the gauge group is the rank of one of the symmetric representations labeling the defects supported on the codimension two surfaces, or in other words, it can be inferred from the precise coefficients of the pole of the T partition function, see (2.10). 22 The squashed three-sphere partition function of a theory τ can be computed using two different localization schemes. The usual "Coulomb branch localization" computes it as a matrix integral of the schematic form [43][44][45][46] while a "Higgs branch localization" computation brings it into the form [10,11] Here the sum runs over all Higgs vacua HV and the subscript |HV denotes that the quantity is evaluated in the Higgs vacuum HV. Furthermore, one needs to include two copies of the K-theoretic vortex partition function Z R 2 ×S 1 vortex . The two expressions for Z are related by closing the integration contours in the former and summing over the residues of the enclosed poles. In the main text the theory τ will always be SQCDA and hence we omit the superscripted label. Note that for SQCDA, the sum over vacua is a sum over partitions of the rank of the gauge group. See appendix B for all the details. depending only on n (1) or n (2) , ZT ; n (1) , n (2) 1-1oop,extra = Z n (1) , n (2) vf,extra (M ) Z n (1) , n (2) afund,extra (M ) , where Z n L , n R afund,extra captures the non-factorizable factors from the antifundamental one-loop determinant, while Z n L , n R vf,extra captures those from the vector multiplet and fundamental hypermultiplet one-loop determinants, which can be found in (C.21)-(C.22). These factors will cancel against factors produced by the instanton partition functions, which we consider next.
When employing the Higgsing prescription to compute the partition function in the presence of defects, the most interesting part of the computation is the result of the analysis and massaging of the instanton partition functions (3.5) evaluated at the value (3.10) for their gauge equivariant parameter. We find that each term in the sum over Young diagrams can be brought into an almost factorized form. As mentioned before, certain non-factorizable factors cancel against the extra factors in (3.11), but a simple non-factorizable factor remains. When recasting the final expression in the form of a 5d/3d/1d coupled system, it is precisely this latter factor that captures the contribution of the degrees of freedom living on the intersection S 1 (1∩2) of the three-spheres on which the defects live.

Let us start by analyzing the instanton partition functions
the N -tuple of Young diagrams Y has zero contribution if any of the Young diagrams Y A has more than n does not receive contributions from Y if any of its members Y A has more than n (1) A rows. Hence the sum over Young diagrams simplifies to a sum over all possible sequences of n (α) non-decreasing integers. The summands of the instanton partition functions undergo many simplifications at the special value for the gauge equivariant parameter, and in fact one finds that they become precisely the K-theoretic vortex partition function for SQCDA upon using the parameter identifications (3.13) (see appendix C.2 for more details): 23 with the three dimensional squashing parameters defined as The third instanton partition function, Z , behaves more intricately when substituting the gauge covariant parameter of (3.5). From (3.8) one immediately finds that N -tuples of Young 23 This fact has for example also been observed in [47][48][49][50], and can also be read off from the brane picture in figure  2. Before Higgsing, the instantons of the extra SU (N ) gauge node are realized by D0-branes spanning in between the NS5-branes. After Higgsing, the D0-branes can still be present if they end on the D2R and D2L-branes. If, say, n L = 0, they precisely turn into vortices of the two-dimensional theory living on the D2-branes.
The red box denotes the "forbidden box" with coordinates (n (1) + 1, n (2) + 1). The green and blue areas denote Y L and Y R respectively. The definitions of m L µ and m R ν , see (3.19), are also indicated.
diagrams Y have zero contribution if any of its constituting diagrams Y A contain the "forbidden box" with coordinates (column,row) = (n (1) A + 1). We split the remaining sum over N -tuples of Young diagrams into two, by defining the notion of large N -tuples, as those N -tuples satisfying the requirement that all of its members Y A contain the box with coordinates (n A ), and calling all other N -tuples small. Let us focus on the former sum first.
Given a large N -tuple Y , we define Y L and Y R as the Young diagrams Furthermore, we define the non-decreasing sequences of integers , ν = 0, ..., n Figure 5 clarifies these definitions. With these definitions in place, one can show (see appendix C.3) the following factorization of the summand of the instanton partition function for large tuples of Here we used Z R 2 ×S 1 vortex| n (m|b) to denote the summand of the U (n) SQCDA K-theoretic vortex partition function, i.e., As announced, the extra factors in the second line of (3.20) cancel against those in (3.11).
For small diagrams, we can still define Y R as in the second line of (3.18), but Y L is not a proper N -tuple of Young diagrams due to the presence of negative entries. Nevertheless, we can define sets of non-decreasing integers as It is clear that m L Aµ can take negative values. Then one can show (see appendix C.4) that (2) intersection (m L , m R ) Z T ; n (1) , n (2) cl,extra The intersection factor for generic (small) N -tuples of Young diagrams is a generalization of (3.22) that can be found explicitly in (C.25). The factor Z Putting everything together, and noting that summing over all N -tuples of Young diagrams avoiding the forbidden box is equivalent to summing over all possible values of m L/R Aµ , we find the following result for the Higgsed partition function and similarly for Z n (2) (m R |b (2) ). The expression forẐ n 1 (m L |b (1) ) is obtained by replacing Z The prime on the sums over Young diagrams in (3.25) indicates that only N -tuples of Young diagrams avoiding the "forbidden box" are included. To obtain the final result of the Higgsed partition function, we need to sum the right-hand side of (3.25) over all partitions n (1) of n (1) and n (2) of n (2) .

Matrix model description and 5d/3d/1d coupled system
Our next goal is to write down a matrix model integral that reproduces the S 5 ω -partition function of the theory T of N 2 free hypermultiplets in the presence of intersecting codimension two defects, i.e., a matrix integral that upon closing the integration contours appropriately reproduces the expression on the right-hand side of (3.25), summed over all partitions of n (1) and n (2) , as its sum over residues of encircled poles. A candidate matrix model is obtained relatively easily by analyzing the contribution of the large tuples of Young diagrams in (3.25). It reads (1) (σ (1) ) denotes the classical action times the one-loop determinant of the S 3 (1) partition function of SQCDA, that is, of a three-dimensional N = 2 gauge theory with gauge group U (n (1) ), and N fundamental, N antifundamental and one adjoint chiral multiplet, and similarly for Z S 3 (2) (σ (2) ). 24 The contribution from the intersection S 1 (1∩2) reads a . Note that from (3.13) we deduce that the Fayet-Iliopoulos parameters ξ  satisfy relations which follow from the identifications in (3.13)-(3.14). Concretely, we find X are the fundamental, antifundamental and adjoint masses on the respective spheres. Moreover, the differences of the relations in (3.14), for fixed α, relate the three-dimensional mass parameters on S 3 (α) to the five-dimensional mass parameters of the N 2 free hypermultiplets, i.e., to M IJ = M I −M J + i | ω| 2 : The matrix integral (3.27) is evaluated using a Jeffrey-Kirwan-like residue prescription [51].
We have derived it explicitly by demanding that the integral (3.27) reproduces the result of the Higgsing computation (see below). The prescription is fully specified by the following charge assignments: the matter fields that contribute to Z S 3 (σ (2) ) are assigned their standard charges under the maximal torus (2) ), while all factors contributing to Z intersection (σ (1) , σ (2) ) are assigned charges of the form Before verifying that the matrix model (3.27), with the pole prescription just described, indeed faithfully reproduces the expression (3.25) summed over all partitions n (1) , n (2) , we remark that it takes precisely the form of the partition function of the 5d/3d/1d coupled system of figure 6, which is the trivial dimensional uplift of figure 3 specialized to the case of N 2 free hypermultiplets described by a two-flavor-node quiver. This statement can be verified by dimensionally uplifting the localization computation of [21]. In some detail, Z 1-loop captures the contributions to the partition function of the five-dimensional degrees of freedom, i.e., of the theory T consisting of N 2 free hypermultiplets, while Z S 3 (α) encodes those of the degrees of freedom living on S 3 (α) , described by U (n (α) ) SQCDA, for α = 1, 2, and the factor Z intersection precisely equals the one-loop determinant of the one-dimensional bifundamental chiral multiplets living on the intersection S 3 (1) ∩ S 3 (2) = S 1 (1∩2) . Moreover, the mass relations (3.30), which we find straightforwardly from the Higgsing prescription, are the consequences of cubic superpotential couplings in the 5d/3d/1d coupled system, which were analyzed in detail in [21]. The mass relations among the (anti)fundamental chiral multiplet masses in (3.29) are in fact a solution of (3.30) obtained by subtracting the equation for α = 1 and α = 2 and subsequently performing a separation of the indices I, J. The separation constants appearing 5d 3d (1) 3d (2) 1d N N n (1) n (2) Figure 6: Coupled 5d/3d/1d quiver gauge theory realizing intersecting M2-brane surface defects labeled by n R -and n L -fold symmetric representations in the five-dimensional theory of N 2 free hypermultiplets. The three-dimensional degrees of freedom are depicted in N = 2 quiver gauge notation, while the onedimensional ones are denoted using one-dimensional N = 2 quiver notations, with solid lines representing chiral multiplets. Various superpotential couplings are turned on, as in figure 3 (see [21]). Applying the Higgsing prescription to SQCD precisely results in the partition function of this quiver gauge theory.
in the resulting solutions can be shifted to arbitrary values by performing a change of variables in the three-dimensional integrals, up to constant prefactors stemming from the classical actions.
The Higgsing prescription also fixes the classical actions and hence we find specific values for the separation constants. The adjoint masses in (3.29) are the consequence of a quartic superpotential.
Also observe that our computation fixes the flavor charge of the one-dimensional chiral multiplets, which enter explicitly in Z intersection , and for which no first-principles argument was provided in [21].
The integrand of (3.27) has poles in each of the three factors; the Jeffrey-Kirwan-like residue prescription is such that, among others, it picks out classes of poles, which we refer to as poles of type-ν. They read, for partitions n (1) and n (2) of n (1) and n (2) respectively, over all of which we sum, and for sequences of integers Note that if allν A = −1 these poles are simply obtained by assigning to σ (1) a pole position of Z S 3 (1) and to σ (2) a pole position of Z S 3 , whose residues precisely reproduce the sum over large diagrams in (3.25). Precisely this fact motivated the candidate matrix model in (3.27). In appendix D.2, we describe a simple algorithm to construct Young diagrams avoiding the "forbidden box" associated with poles of type-ν. Furthermore, we show in appendix D.3 that the sum over the corresponding residues precisely reproduce the sum over Young diagrams in (3.25). Finally, we show in appendix D.4 that the residues of poles not of type-ν, but contained in the Jeffrey-Kirwan-like prescription, cancel among themselves by studying a simplified example. We thus conclude that the integral (3.27) indeed faithfully reproduces the sum over Young diagrams in (3.25).

Intersecting surface defects on S 4 b
Let us next study the partition function of N 2 free hypermultiplets on S 4 b in the presence of intersecting codimension two defects wrapping the two-spheres S 2 L/R , the fixed loci of the U (1) L/R isometries (see footnote 10). The intersection of S 2 L with S 2 R consists of two points. The analysis largely parallels the one in the previous subsection, so we will be more brief.
The theory T is an N = 2 supersymmetric gauge theory with gauge group SU (N ) and N fundamental and N antifundamental hypermultiplets. Its squashed four-sphere partition function is computed by the matrix integral (2.2) (or (2.4)), The classical action is given by and the one-loop factor reads We have denoted the masses associated with the U (N ) flavor symmetry of the N fundamental hypermultiplets as M I and those of the N antifundamental hypermultiplets asM J . We also denote The instanton partition functions can be written as a sum over N -tuples of Young diagrams as  38) and the modulus squared simply entails sending q = exp(2πiτ ) →q, with τ = ϑ 2π + 4πi

Implementing the Higgsing prescription
The Higgsing prescription instructs us to consider the poles of the fundamental one-loop factor given by with σ a permutation of N elements, which we choose to be the identity. At the end of the computation, we should sum over all partitions n L/R of n L/R , i.e., n L/R = A n L/R A . The fact that the two two-spheres intersect at two disjoint points, namely their north poles and south poles, adds another layer of complication compared to the analysis in the previous subsection.
Even so, when evaluating the residue at (3.39), the analysis of the classical action and one-loop determinants is straightforward. Both can be brought into a factorized form in terms of pieces depending only on information on either two-sphere, using the shift formula (A.11) for the latter, up to extra factors which will cancel against certain non-factorizable factors coming from the instanton partition functions. Explicitly, 1-loop is the one-loop determinant of N 2 hypermultiplets, which constitute the infrared theory T , and have masses . . . | n L/R denote factors in the Higgs branch localized two-dimensional N = (2, 2) SQCDA two-sphere partition function (see footnote 22 for the equivalent three-sphere discussion, and appendix B.1 for explicit expressions).
The two-dimensional FI-parameter ξ FI , fundamental masses m I , antifundamental massesm J and adjoint masses m X are related to the four-dimensional parameters as Finally the extra factors are where Z n L , n R vf,extra and Z n L , n R afund,extra are as before the non-factorizable pieces produced by applying the shift formulae to the vector and (anti)fundamental one-loop determinant and can be found in The massaging of each of the two instanton partition functions, which now both describe instantons located at intersection points, is completely similar to the one we performed above.
First, the sum over N -tuples of Young diagrams Y can be restricted to a sum over tuples whose constituents Y A all avoid the "forbidden" box at (n L A + 1, n R A + 1). Second, the left-over sum can be decomposed into sums over large and small diagrams, and moreover their summands can almost be factorized in terms of the summands of vortex partition functions, after canceling some overall factors with the extra factors from the classical action and one-loop determinants in (3.40). The remaining non-factorizable factor is an intersection factor, The final result for the Higgsed partition function is obtained by summing the right-hand side of this expression over all partitions n L/R of n L/R .

Matrix model description and 4d/2d/0d coupled system
As in the previous subsection, the contribution of large tuples in both instanton partition functions suggests the following matrix integral where Z S 2 R (σ R , B R ) denotes the summand/integrand of the S 2 R partition function for SQCDA with gauge group U (n R ), and similarly for Z S 2 L (σ L , B L ). 25 The intersection factors read and where b is the four-sphere squashing parameter.
The factor labeled by the plus sign arises from the intersection point at the north pole, and the other factor from the south pole. The mass and other parameters on both two-spheres satisfy relations, which can be derived from (3.41)-(3.42), while the hypermultiplet masses M IJ = M I −M J + i Q 2 are related to the two-dimensional mass parameters as   Figure 7: Coupled 4d/2d/0d quiver gauge theory realizing intersecting M2-brane surface defects labeled by n R -and n L -fold symmetric representations in the four-dimensional theory of N 2 free hypermultiplets. Various superpotential couplings are turned on and are given in detail in [21]. The Higgsing prescription applied to SQCD precisely reproduces the partition function of this coupled system. the case of N 2 free hypermultiplets described by a two-flavor-node quiver, reproduced in figure 7 for convenience, precisely equals the matrix integral (3.46). In particular, ± Z ± intersection computes the one-loop determinant of the zero-dimensional bifundamental chiral multiplets at the two intersection points of the two-spheres S 2 R and S 2 L . In the first-principles localization computation of [21], the relations (3.49) are consequences of cubic superpotential couplings. Up to separation constants, their solutions can be found to be the mass relations in (3.48). As explained in the previous subsection, the Higgsing computation fixes the separation constants to specific values. Note that our computations fixes the flavor symmetry charges of the zero-dimensional fields and provides a derivation of the residue prescription.
The proof that the matrix integral reproduces the result of the Higgsing computation follows the same logic as the one in the previous subsection, but is substantially more involved due to the fact that two copies of the intersection factor are present. We present some of the details in appendix E.

Intersecting surface defects in interacting theories
In the previous section, we have computed the expectation value of intersecting surface defects in four-/five-dimensional theories T of free hypermultiplets placed on the four-/five-sphere. In this section, we consider intersecting surface defects inserted in interacting theories. More precisely, we focus on T being an N = 2 supersymmetric theory with gauge group SU (N ) and N fundamental and N anti-fundamental hypermultiplets, i.e., N = 2 SQCD.
The partition function of SQCD on the four-sphere has appeared in our earlier computations, see (3.33). In particular, it involves the contribution of instantons located at the north pole and south pole of the four-sphere. When decorating the computation with intersecting surface defects, which precisely have these points as their intersection locus, we should expect the instanton counting to be modified non-trivially. By performing the Higgsing procedure on a theory T described by the we will be able to derive a precise description of the modified ADHM integral by casting both the Higgsed partition function as well as its instanton contributions in a matrix integral form.
The S 4 b -partition function of T is given by while the one-loop determinant is given by where all factors were defined in (3.36) but The instanton partition function is given by a double sum over N -tuples of Young diagrams The contributions of the various multiplets can be found in appendix C. The superscripts again denote the usual shift [42] Implementing the Higgsing prescription once again amounts to considering the poles of the fundamental one-loop factor given by with σ a permutation of N elements, which we choose to be the identity. Here n L/R is a partition of n L/R , and we will sum over all.
It is straightforward to compute the residues of the one-loop determinant at (4.7): Here 1-loop are the classical action and one-loop determinant of the theory T , i.e., of four-dimensional N = 2 supersymmetric SQCD. Their expression can be found in (3.34) and (3.35) respectively. 26 The antifundamental masses of T are simply given byM J , but the fundamental masses take the values in terms of the fundamental and bifundamental masses of the quiver theory T . As before, Z   4.5), the only non-vanishing contributions arise from N -tuples Y avoiding the "forbidden box" and arbitrary N -tuples Y . As before, we can split the sum over the former into one over large and one over small tuples. As we have learned in the previous section, the analysis of the large tuples is sufficient to derive the matrix model integral describing the infrared system, i.e., the theory T with 26 In the previous section the theory T was SQCD.
intersecting defects inserted. We thus focus only on such large tuples. We find (1) , n (2) cl,extra The intersection factor was already given in (3.44). The expression for the factors z Here the factors in the first lines are the classical action and one-loop determinant of T , i.e., four-dimensional SQCD, and the factors in the second line are the S 2 L/R partition functions for SQCDA as well as the intersection factors (3.47). The last line contains two copies of the instanton partition function, computed in the presence of the locally planar intersecting surface defects.
The mass parameters on the two two-spheres are related as in (3.48), while the parameters of the four-dimensional theory T are related to the two-dimensional ones as Note that when performing the integral over the four-dimensional gauge parameter Σ , one should  Figure 8: Coupled 4d/2d/0d quiver gauge theory realizing the insertion, in four-dimensional N = 2 SQCD, of intersecting M2-brane surface defects labeled by symmetric representations of rank n R and n L respectively . Various superpotential couplings are turned, in direct analogy to the ones given in detail in [21]. The Higgsing prescription applied to a linear quiver gauge theory with two gauge nodes reproduces the partition function of this coupled system. The contribution of the locally planar surface defect, supported on the local R 2 L , to the north pole copy of the instanton partition function is given by where W Y B denotes the width of the Young diagram Y B . Similarly, z R 2 R defect is obtained by swapping L ↔ R, 1 ↔ 2 and Y B ↔Ỹ B . The combination iσ + 1 2 B is valid for the north pole contributions; to get the south pole counterpart one replaces it with iσ − 1 2 B. One can verify that if we perform the integrations over σ L/R and the sums over B L/R using the same Jeffrey-Kirwan-like residue prescription as discussed in the previous section, the matrix model The 4d/2d/0d coupled system whose partition function is computed by (4.13) is depicted in figure 8. The first line of (4.13) captures the classical action and one-loop determinant of the four-dimensional theory, while the second line captures the contributions of the two-dimensional degrees of freedom residing on the intersecting two-spheres as well as the one-loop determinants of the 27 Note that in terms of the effective variables, the relation (4.14) remains unaffected, but (3.48) is modified as Figure 9: The left part of the figure depicts the brane configuration realizing k-instantons in N = 2 SQCD, in the presence of intersecting surface defects, of M2-type and labeled by symmetric representations, represented by the gray branes. 28 The right part of the figure shows the quiver description of the worldvolume theory of the D0-branes. As the system preserves two-dimensional N = (0, 2) supersymmetry dimensionally reduced to zero dimensions, the quiver is drawn using N = (0, 2) notations, with full lines representing chiral multiplets and dashed lines Fermi multiplets. In the absence of the defects, the preserved supersymmetry is N = (0, 4). We thus learn that one needs to turn a J-type superpotential J Λ for the adjoint Fermi multiplet Λ consisting of the sum of the adjoint bilinears of the scalars of the two pairs of chiral multiplets. The charges in table 1 are also compatible with quadratic E-or J-type superpotentials for the Fermi multiplets charged under U (n L/R ).
zero-dimensional bifundamental chiral multiplets at their intersection points. The most salient new feature of this coupled system is the fact that part of the two-dimensional flavor symmetry is gauged by the four-dimensional gauge symmetry. This fact is reflected in the relations in (4.14), relating the two-dimensional mass parametersm to the gauge parameter Σ , which are the consequence of the usual cubic superpotential couplings. As mentioned above, when computing the squashed four-sphere partition function of the coupled system, the instanton counting is modified non-trivially due to the presence of the intersecting surface defects. The argument of the modulus squared in the last line of (4.13) provides a concrete expression for the modified instanton partition function. In the next section, we turn to a more detailed analysis of the degrees of freedom which give rise to this instanton partition function. supersymmetry. Its matter content can be straightforwardly read off by quantizing the open strings stretching between the D0-brane and the various D4-branes, as well as between the D0-branes 28 The brane directions are as in footnote 16. themelves, see [52,53]. We summarize it in table 1, and have depicted the resulting quiver gauge theory in the right part of figure 9 (omitting the gray quiver nodes and links). The partition function of this zero-dimensional theory computes the (non-perturbative) k-instanton partition function, which we denote as Z R 4 k . In some more detail, the instanton partition function of a four-dimensional N = 2 supersymmetric theory is computed by a localization computation on R 4 1 , 2 , i.e., in the Ω-background parametrized by 1 , 2 [29,30]. The localizing supercharge Q squares to Dimensionally reducing the localization results of [54] and in particular [55], it is now straight- 29 The Ω-deformation breaks the rotational symmetry to SO(2)1 × SO(2)2. In terms of their Cartan generators J1, J2 one has J l = 1 2 (J1 − J2) and Jr = 1 2 (J1 + J2).

Instanton partition function and intersecting surface defects
forward to compute Z R 4 k as where φ IJ = φ I − φ J , and the prime on (φ IJ ) indicates to omit the factors with I = J. Here we denoted the equivariant parameters for the various SU (N ) symmetries as in the previous section.
The integral (5.2) is computed using the Jeffrey-Kirwan residue prescription. We choose to select the contributions of negatively charged fields, and thus collect the residues of the poles defined by solving the equations The contributing poles are labeled by N -tuples of Young diagrams Y = {Y A } such that A |Y A | = k, It is easy to convince oneself that summing over the residues precisely reproduces the q k term of the SQCD instanton partition function given in (3.37).
Let us now re-introduce the intersecting surface defects in the setup. 30 The brane configuration was already depicted in the left part of figure 9, now also considering the gray branes. Upon inserting the defects, the N = (0, 4) symmetry, dimensionally reduced to zero dimensions, carried by the D0-branes is broken to the dimensional reduction of N = (0, 2). We have used precisely this subalgebra in the previous paragraphs already. The zero-dimensional model is enriched by the modes arising from the quantization of the open strings stretching between the D0 and D2 L and D2 R -branes. They each contribute an additional N = (0, 2) Fermi and chiral multiplet, 31 and the 30 See also [7] for an analysis of the equivariant integral of a five-dimensional theory in the presence of threedimensional chiral multiplets. 31 The brane system consisting of a stack of D0-branes and one stack of D2-branes, each ending on an NS5-brane, preserves on the D0-brane the dimensional reduction to zero dimensions of N = (2, 2) supersymmetry. The open string modes thus organize themselves in an N = (2, 2) chiral multiplet.
final ADHM quiver theory is depicted in the right part of figure 9. The additional multiplets carry charges under J and J l as in table 1. It is then straightforward to include their contributions to the ADHM matrix model. It is given by . Noting that our JK-prescription does not select the poles of the above factor, it is straightforward to see that the matrix integral precisely reproduces the modified instanton partition function as it appeared in the last line of (4.13).

Discussion
In this paper, we have extended the study of intersecting codimension two defects, initiated in [21], to interacting four-dimensional theories. We have employed the Higgsing prescription of [6,7] to compute the vacuum expectation value of intersecting M2-brane defects, labeled by n L and n R -fold symmetric representations respectively, inserted in four-dimensional N = 2 SQCD.
Subsequently we cast the result in the form of a partition function of a coupled 4d/2d/0d system, see (4.13), which takes the schematic form 33 The leftmost subfigure of figure 10 depicts the 4d/2d/0d coupled system under consideration. The theory T is four-dimensional N = 2 SQCD and τ L/R are identified as two-dimensional N = (2, 2) U (n L/R ) SQCDA. Our computation provides an explicit formula for the instanton partition function in the presence of the above-mentioned intersecting defects, Z (T ,R 2 L ∪R 2 R ⊂R 4 ) inst , appearing in (6.1), see 32 Note that we are using the effective description obtained by performing a change of variables in the two-dimensional integrals and omitting some irrelevant constant prefactor as explained below equation (4.13). 33 Before tackling this computation, we also considered the theory of N 2 free hypermultiplets. Also for this case, we cast the result in the form of a partition function of a coupled system.
Fermi 0d chiral Figure 10: The type IIA brane-configuration in the middle describes the 4d/2d/0d coupled system on the left as the worldvolume theory of the D4/D2 L /D2 R -branes, see also figure 8. The worldvolume theory of the k D0-branes is shown on the right, see figure 9 for more details. Its partition function computes the k-instanton partition function of the 4d/2d/0d coupled system. Figure 11: One starts with the theory T of N 2 free hypermultiplets and successively gauges in two more theories of N 2 free hypermultiplets. The brane realization of the resulting theory T is shown in the leftmost figure. One can then apply the Higgsing prescription twice, corresponding to pulling the two rightmost NS5-branes away from the main stack, and stretching (n L 2 − n L 1 , n R 2 − n R 1 ) (D2 L , D2 R ) branes and (n L 1 , n R 1 ) (D2 L , D2 R ) branes respectively in between them and the flavor D4-branes. The two-dimensional part of the system is in its Higgs phase, and can be brought into its Coulomb phase by aligning the two displaced NS5-branes, as shown in the middle figure. The corresponding 4d/2d/0d coupled system can be read off easily, and is shown in the last figure. This system was also considered in [21]. equation (4.13). We also found the ADHM model whose partition function computes the k-instanton , see the rightmost subfigure in figure 10. This model can be read off from a D-brane construction, as also indicated in the figure.
Starting from a theory T whose flavor symmetry contains an SU (N ) factor, one can gauge in successively multiple, say p, theories of N 2 free hypermultiplets. The resulting theory T has p additional U (1) factors in its flavor symmetry group compared to the original theory T . It is clear that one can apply the Higgsing prescription consecutively to each of these starting from the outermost one along the quiver. The associated type IIA brane-realization is a simple generalization of the one we have discussed in section 2.2. We depict the case p = 2 for T the theory of N 2 free hypermultiplets in figure 11. The corresponding 4d/2d/0d coupled system can be read off from the brane picture and is given in the rightmost subfigure in figure 11. We conjecture that the M-theory interpretation of this procedure corresponds to the insertion of multiple intersecting M2-branes ending on the main stack of M5-branes, describing theory T , all labeled by symmetric representations.
General intersecting M2-brane defects labeled by two generic irreducible representations (R L , R R ) of SU (N ) can also be described by 4d/2d/0d coupled systems [21]; when the four-dimensional theory is N = 2 SQCD, we have depicted an example in the bottom left of figure 12. The two-dimensional degrees of freedom are described by quiver gauge theories which encode the representation R through their gauge group ranks [19]. The coupled system involves zero-dimensional Fermi multiplets, transforming in the bifundamental representation of the innermost two-dimensional gauge groups, as degrees of freedom living at the intersection points. Such 4d/2d/0d coupled system can be engineered as the worldvolume theory of the D4/D2 L /D2 R -branes in the type IIA system shown in figure 12.
When attempting to use this coupled system to compute the vacuum expectation value of general intersecting M2-brane defects, one needs as an input the instanton partition function in the presence of the defects. We propose that the structure of its k-instanton ADHM model can also in this case be read off from the D0-brane worldvolume theory in the type IIA system. The resulting quiver theory, which has two-dimensional N = (0, 2) supersymmetry reduced to zero dimensions, is also included in figure 12. It is almost the same as the one in figure 10, up to the orientation of an arrow. This new ADHM model however leads to a dramatically different ADHM integration: extra poles coming from the factor Z D0-D2 will be selected by the JK-prescription, and the result of the ADHM integral is a double sum over N -tuples of Young diagrams and, separately, n L -tuples of Young diagrams, together having k boxes in total. It would be very interesting to study in more detail these new ADHM integrals.
When R L/R are both symmetric representations, the descriptions of figures 12 and 10 are both valid. In [21], the equality of the resulting squashed four-sphere partition functions was verified for four-dimensional theories without gauge fields, and for defects labeled by fundamental representations. It would be of interest to study the duality between the two descriptions in interacting theories.
A construction for general intersecting M2-brane defects in terms of a renormalization group flow from a larger theory T triggered by some position-dependent Higgs branch vacuum expectation value is currently unknown. Presumably it requires T to be a non-Lagrangian theory of class S.
Reversing the logic, one might hope to recover information about the partition function of the UV non-Lagrangian theory T by investigating the partition function of all intersecting M2-brane defects, for which we have nice quiver description, and to which the UV theory can flow. Note that Higgs branch localized expressions of partition functions are a simple example of this aspiration [16].
It was conjectured in [21] that the partition function of SU (N ) SQCD in the presence of general intersecting M2-brane defects can be identified with Liouville/Toda five-point functions. In particular, identifying x = qz, x = z, with |q|, |z| < 1, along with other parameter identifications, 0d Fermi 0d chiral Figure 12: The type IIA brane realization of general intersecting M2-brane defects labeled by two irreducible representation (R L , R R ) inserted in SQCD, as well as its corresponding 4d/2d/0d coupled system and ADHM model are depicted. one expects generic, while β, α 1 are semi-degenerate momenta determined in terms of the masses of the gauge theory. Let us perform a few checks of this statement, leaving a more thorough analysis for the future.
Consider the simple case with R L = 1 and R R = symm n R 2. In the OPE limit 1 > |q| > |z| → 0, the leading terms in z read, up to the factor A, Here t = N A=1 n R A h A and h A are the weights of the fundamental representation of SU (N ). The set of natural numbers n R is any partition of n R , and the sum over t means summing over all such partitions. On the gauge theory side, in the z → 0 limit, one can close the contour of the integration over σ R in the partition function Z (T ,S 2 R ⊂S 4 b ) , as in (4.13) with n L = 0, and obtain the Higgs branch localized expression as a sum over the two-dimensional Higgs vacua labeled by partitions n R . This sum is mapped to the sum over t in (6.3). The leading terms in z simply come Figure 13: A commuting diagram showing the relation between the Higgsing prescription and degenerating semi-degenerate momentum.
from the zero-vortex sector. The four-dimensional matrix integral in each leading term, which now depends on the Higgs vacuum n R , is simply an S 4 b -partition function with shifted fundamental where → indicates the evaluation at the Higgs vacuum n R . This S 4 b -partition function is mapped to the four-point function in (6.3). In particular, the four-dimensional one-loop determinant together with the two-dimensional one-loop determinant evaluated at the Higgs vacuum n R is precisely equal βĈ α,α 1 ,α∞ , up to some uninteresting constants. In fact, the statement (6.2) in the case of R L/R being both symmetric, can be viewed as a degeneration of the well-established AGT conjecture without surface defects, by considering the commuting diagram in figure 13 [47][48][49]. We remind ourselves that iM n L ,n R = (bn L + b −1 n R )/N + The Higgsing prescription sends the U (1) massM →M n L ,n R , which is equivalent to degenerating the semi- The correspondence (6.2) is a great tool to discover and understand new dualities of the 4d/2d/0d coupled system. The Liouville/Toda correlation functions enjoy various symmetries, including, but not limited to, the invariance under conjugation and Weyl reflection of the momenta, and conformal and crossing symmetries. It would be interesting to translate these CFT symmetries to dualities on the gauge theory side, especially when the intersecting defects are coupled to four-dimensional interacting theories.

Acknowledgments
The authors would like to thank Giulio Bonelli, Jaume Gomis, Bruno Le Floch, Fabrizio Nieri, Daniel Park, Massimiliano Ronzani, Alessandro Tanzini and Maxim Zabzine for helpful conversations and useful suggestions. We are also grateful to Bruno Le Floch for comments on a draft of this paper. Y.P. is supported in part by Vetenskapsrådet under grant #2014-5517, by the STINT grant and by the grant "Geometry and Physics" from the Knut and Alice Wallenberg foundation. The work of W.P. is supported in part by the DOE grant doe-sc0010008.

A Special functions
In this appendix we briefly recall the definitions and some useful properties of the special functions which play an essential role in this paper.

A.1 Factorials
In analyzing vortex and instanton partition functions, one often encounters products of the form m−1 k=0 f 1 , 2 (z + k), for some function f 1 , 2 . Due to its frequent occurrence and to streamline the discussion we introduce the factorial As a trivial example, it includes the standard Pochhammer symbol (x) m ≡ m−1 k=0 (x + k), for f 1 , 2 = id. We often abbreviate f 1 , 2 as f when no confusion is expected.

A.2 Double-and triple-sine functions
Double-sine function s b (z): the double-sine function s b (z) is defined as the regularized version of the product It is a common practice to define The double sine function satisfies the following recursion relation as well as the symmetry properties An alternative definition of the double-sine function is given by The definitions of s b (z) and S 2 (z|ω 1 , ω 2 ) are related by b = ω 1 /ω 2 and Triple-sine function S 3 (z| ω): the triple-sine function S 3 (z| ω) for any triplet ω = (ω 1 , ω 2 , ω 3 ) is defined as the regularization of the product It has no poles, and its zeros are located at z = ( n + 1) · ω or z = − n · ω for n α ≥ 0. It satisfies a convenient recursion relation (where S 1 (z|ω) ≡ 2 sinh(πz/ω)) .8) and has the following symmetry property The function Υ b (z) is defined as It has no poles, but zeros located at z = −mb − nb −1 and z = (m + 1)b + (n + 1)b −1 , for m, n ≥ 0, and satisfies the recursion relation for m, n ∈ Z Here we defined Q ≡ b + b −1 , and for each product, when the lower limit is strictly larger than the upper limit, the product reduces to 1. Some other useful properties include Υ b (Q − z) = Υ b (z) and

B The S 2 and S 3 b SQCDA partition function
In this appendix we briefly recall the two-dimensional N = (2, 2) supersymmetric and threedimensional N = 2 supersymmetric sphere partition function of a U (n c ) gauge theory with n f fundamental, n af antifundamental, and one adjoint chiral multiplet, which we henceforth call SQCDA, and present its Higgs branch localized form.
Here and in the next appendices, we will use the notation (i, µ) in substitution of the original color index a ∈ {1, ..., n c }, where i = 1, ..., n f , µ = 0, ..., k i − 1, with i k i = n c . Each partition k = {k i } corresponds to a Higgs vacuum of the theory. Therefore, for arbitrary functions Φ of arbitrary sequences of n c variables x a , we have

B.1 The S 2 SQCDA partition function
The two-sphere partition function of an N = (2, 2) supersymmetric gauge theory with gauge group U (n c ) and with n f fundamental chiral multiplets with masses m j , n af antifundamental chiral multiplets with massesm t and an adjoint chiral multiplet with mass m X is computed by [8,9] Here we have set the r-charges to zero. They can be reinstated by analytically continuing the masses. In comparison to higher-dimensional sphere partition functions, the two-sphere partition function also involves a sum over magnetic fluxes B. We have also included the two-dimensional ϑ-angle in the classical action. The one-loop determinants for the chiral multiplets are expressed in terms of the standard Gamma-function. Finally, note that we have turned off background fluxes for the flavor symmetries, as they will play no role in this paper.
Assuming that n f > n af or n f = n af with ξ FI > 0, we can close the integration contours of (B.2) in the lower half-plane. The integrand of the σ-integrations in (B.2) is an infinite sum over B ∈ Z nc .
One can show that the sum of the residues of different permutations of the color label give the same result, canceling the n c ! in (B.2). For each summand with a given B a , the relevant poles are then given by where µ = 0, ..., k j − 1, and k is a partition of n c : n f j=1 k j = n c , labeling the Higgs vacua. These poles can be rewritten into a more useful form, by introducing m jµ = N jµ + We collectively denote these poles as σ m,n , poles of type σ m,n : The sum over residues can be brought into the form [19] whereẑ is defined asẑ = e −2πξ FI +iϑ , with ϑ = ϑ + π(n f − n af ). Furthermore, we introduced |m| ≡ jµ m jµ , and similarly for |n|. The classical and one-loop factors read, with m jl ≡ m j − m l andm jt ≡ m j −m t , where γ(x) = Γ(x) Γ(1−x) . The summand Z R 2 vortex| k (m) of the vortex partition function is given by and m denotes a sum over all possible non-decreasing sequences of natural numbers m j .

B.2 The S 3 b SQCDA partition function
The squashed three-sphere is defined by its embedding in C 2 as and the parameter b is given by b = ω 2 /ω 1 . The partition function of an N = 2 supersymmetric gauge theory with gauge group U (n c ) and with n f fundamental chiral multiplets with masses m j , n af antifundamental chiral multiplets with massesm t and an adjoint chiral multiplet with mass m X is computed by [43][44][45][46] where Q = b + b −1 and the matter one-loop determinants are expressed in terms of the double-sine function s b . We have taken the Chern-Simons level to be zero.
When n f > n af or n f = n af and the FI-parameter ξ FI > 0, 34 we again consider poles of type σ m,n in the lower half-plane, labeled by ascending sequences of natural numbers 0 ≤ m j0 ≤ m j1 ≤ ... ≤ m j(k j −1) , ∀j = 1, ..., n f , poles of type σ m,n : Summing over the residues, one obtains the Higgs branch localized S 3 b -partition function [10,11], with Higgs vacua specified by a partition k, where the classical and 1-loop factors, with m ij ≡ m i − m j , are given by 14) The summand Z R 2 ×S 1 vortex| k (m|b) of the vortex partition function is given by Here we used the function (x) f m ≡ m−1 k=0 f (x + k) with f (x) = 2i sinh πib 2 x. See appendix A. Expression (B.15) is summed over all possible sequences of non-decreasing natural numbers 0 ≤ m j0 ≤ m j1 ≤ ... ≤ m j(k j −1) , with weighting factor given in terms of

B.3 Forest-tree representation
The poles (B.4) and (B.11) admit a useful graphical representation in terms of forests of trees.
Such representation will turn out to be useful in later appendices, so we introduce it here already for the simple case of SQCDA [56]. We will consider the example of S 3 b ; the case of S 2 is completely similar.
When n f ≥ n af and the FI-parameter ξ FI > 0, the Jeffrey-Kirwan residue prescription, mentioned below (3.30), selects as poles the solutions to the equations where for each label a the component σ a appears exactly once on the left-hand side, and i a ∈ ... When no confusion is expected, we will sometimes omit the mass node at the root of the tree.
Using the symmetries of the one-loop determinants, one can show that, after summing over all possible poles, namely over all possible forest diagrams, only those forests whose trees are all branch-less and where each fundamental mass is only linked to (at most) one branch-less tree, will contribute. The rest of the diagrams cancel among themselves.
In the residue computation, we encountered partitions k of the rank n c of the gauge group. Each entry k j is precisely the length of the length of the tree (or number of descendant nodes under mass m j )

C Factorization of instanton partition function
In this appendix, we analyze the factorization of the summand of the instanton partition function, evaluated at special values of its gauge equivariant parameter, into the product of the summands of two (semi-)vortex partition functions. We can simultaneously consider the four-dimensional and five-dimensional instanton partition function by using the notation (x) f m (see appendix A), where f (x) = f 1 , 2 (x) is some odd function that might depend on the Ω-deformation parameters.
Replacing f by 4d : f (x) = 2 x, 5d : f (x) = 2i sinh(πi 2 x) , (C.1) the following results apply to the familiar instanton partition function respectively on R 4 1 , 2 and R 4 1 , 2 × S 1 β . In appendix D, E, we will discuss the relation between the factorization results in this appendix, and the poles and residues of the matrix models that describe gauge theories in the presence of intersecting defects.

C.1 The instanton partition function
We start with a four-/five-dimensional supersymmetric quiver gauge theory with gauge group Here Σ AB = Σ A − Σ B and b 2 ≡ 1 / 2 . The full instanton partition function is thus 36 where we omitted the mass dependence.
We are interested in the instanton partition function evaluated at special values for its gauge 35 Instanton counting is typically performed for U (N ) gauge groups. We will not be careful about the distinction. In fact, removing the U (1) factors is expected to just amount to some overall factor (1 − q) # , as in [22]. 36 On the one hand, the simpler case of SU (N ) SQCD, which we used in section 3, can be easily extracted from this expression, by setting all Y A to empty Young diagrams and identifying the antifundamental mass as MA = Σ A +M − i 1 − i 2. On the other hand, it can also easily be generalized to linear SU (N ) quivers. equivariant parameter, The most significant simplification comes from the evaluation of z fund : if any Young diagram Y A of the N -tuple Y contains a box (the "forbidden box") at position (n L A + 1, n R A + 1), then z fund ( Y , Σ) evaluates to zero. Hence, the sum over all Y is effectively restricted to those tuples all of whose members avoid the "forbidden box". 37

C.2 Reduction to vortex partition function of SQCD instanton partition function
Let us consider the SQCD instanton partition function and look at the case where n R = 0. The forbidden boxes sit at (n L A + 1, 1), implying that each Y A in a contributing tuple Y must have width Multiplying in also z afund ( Y , Σ n 37 Such diagrams are sometimes referred to as hook Young diagrams. Figure 15: The left figure demonstrates the decomposition of a large Young diagram Y A into Y L A and Y R A . The latter are filled in gray, while the "forbidden box" is colored red. The figure on the right demonstrates some convenient relations between m R Aµ and Y R Ar .
and identifies the masses as 14) The product of the latter two can be simplified further to We also used the dot product n L · n R ≡ N A=1 n L A n R A . Next, as in the previous appendix, Z vortex| n L/R denotes the vortex partition function of U ( n L/R A ) SQCDA with n f = n af = N , whose explicit expressions on R 2 and R 2 × S 1 can be found in appendix B.1 and B.2. The fundamental and adjoint masses are identified as in (C.10)-(C.11), while the antifundamental masses are given by The factors labeled with 'intersection' are given by The factor z L defect is defined as Finally, the factors labeled by 'extra' read

C.4 Factorization for small N -tuples of Young diagrams
For N -tuples of Young diagrams that are not large, which we refer to as small, a similar factorization of the summand of the instanton partition function occurs, but is more involved. A (tuple of) small Young diagram Y , namely Y An L A < n R A for some A, again defines two non-decreasing sequences of integers as in (3.23). In particular, m L Aµ can be negative: for each A, we defineμ such that m L µ A 0, m L µ A −1 < 0. For simplicity, we show the results for the SQCD instanton partition function. The summand of this instanton partition function evaluated at (C.6), i.e., z n L , n R vf z n L , n R afund , factorizes into, for small N -tuple of Young diagrams Y , where the 'extra' are as before, and the intersection factor reads, again with ∆ Figure 16: An example of a small Young diagram, with the "forbidden box" shown in red. The rectangular region, enclosed by the dashed-lines, is partially filled. In general, the intersection factor Z n L , n R vf,intersection involves a product over those filled boxes. and we defined (C. 26) We remark that in Z n L , n R vf,intersection , the second line is in fact a product over the boxes filled inside the n L A × n R A rectangle, namely the gray boxes inside the region enclosed by the dashed lines in figure  16. Also note that when allμ A = 0, (C.25) turns into (C.18), and the expression for Z (semi-)vortex| n L in (C.26) reduces to the usual vortex partition function, since the small Young diagram has deformed into a large Young diagram.

D Poles and Young diagrams in 3d
In this appendix we analyze the correspondence between poles in the three-dimensional Coulomb branch matrix model describing the worldvolume theory of intersecting codimension two defects, and (Young) diagrams. We will show that one can construct generic Young diagrams using a class of poles of the matrix model, which we call poles of type-ν, and the sum over the corresponding residues is precisely the instanton partition function evaluated at (C.6). All other classes of poles are spurious and their residues should cancel among themselves: we will indeed argue that this is the case by showing that they give rise to certain diagrams, consisting of boxes and anti-boxes, and that these diagrams pair up and the corresponding residues cancel each other. We will first consider generic intersecting defect theories on S 3 (1) ∩ S 3 (2) with gauge groups U (n (1) ) and U (n (2) ), sharing n f = n af = N .

D.1 Poles of type-ν
We recall from subsection 3.1.3 that the proposed matrix model that computes the partition function of the worldvolume theory of intersecting defects has an integrand of the form, see (3.27), FI > 0, and similarly for Z S 3 (2) (σ (2) ). Recall that the parameters entering the two three-sphere integrands satisfy various relations, see (3.29). The intersection factor reads The Jeffrey-Kirwan-like prescription selects a large number of poles in the combined meromorphic integrand (D.1). We now focus on the subclass of poles, defined in (3.31)- (3.32), and referred to as poles of type-ν. It is useful to observe that n L and n R can be decoupled from the following discussion. Using the recursion relations of the double-sine function s b (iQ/2 + z) and the fact that sinh πi(x + n) = (−1) n sinh πx, they can be seen to give rise to Z vortex| n 1 and Z vortex| n 2 , independent of the values of m L and m R . Therefore, without loss of generality, we will ignore the details of n L , n R .
It may be helpful to remark that the poles of type-ν, as defined in (3.31)-(3.32), can be obtained by solving the component equations with the requirement that m R Aν A = 0 (which automatically implies that for all µ ≤ν A also m R Aµ = 0 since the m R Aµ are a non-decreasing sequence). One should also bear in mind the parameter relations 1 + + + + + + + + + + + + + + + + + + + + 3 + + + + + + + + + + + + + + + + + + + + + + + + Figure 17: The three steps in constructing a Young diagram Y using the combinatoric data from a pole of type-ν. Boxes with a black + are normal boxes, while boxes with a red − are anti-boxes. Coincident boxes and anti-boxes, i.e., the ones with red edges in the middle figure, annihilate to create vacant spots.
). Here we assigned to σ (2) the poles locations defined in (B.11). As usual, for each A, σ  are associated with large Young diagrams, while the remaining poles of type-ν are associated with small Young diagrams. The poles of type-ν are special cases of the more general poles that will be discussed in later appendices.

D.2 Constructing Young diagrams
We now construct Young diagrams associated with poles of type-ν, labeled by the integers m L/R , through the following steps. We only present the construction of Y A for a given A, which can be repeated to construct the full N -tuple of Young diagrams {Y A }. The procedure is also depicted in   2) . For each ν = 0, ..., n (2) − 1, attach an extra segment of m R Aν boxes to the ν-th row at the right edge of Y 2 extending towards the right.
2b. Consider each component σ 3. An anti-box annihilates a box at the same location, creating a vacant spot.
It is now obvious that, poles of type-{allν A = −1} generate large Young diagrams, since all m L/R are non-negative. When there is at least oneν A ≥ 0, the poles of type-ν generate small Young diagrams whose n (1) A -th column (labeled as µ = 0) has length n (2)

D.3 Residues and instanton partition function
The correspondence between poles and Young diagrams in the previous subappendix does not stop at the combinatoric level: it also leads to an equality between residues of the matrix model and the summand of the instanton partition function evaluated at Σ n L , n R A as in (C.6). Namely, we will show that σ pole ∈{poles of type-ν} which are trivial to recover).
Let us present some more details. We start with the poles of type-(−1). These poles are simply the familiar SQCDA poles (B.11), and the corresponding residues of Z S 3 (1) and Z S 3 (2) are just the summand of the relevant vortex partition functions multiplied by the classical action and one-loop determinant at the Higgs branch vacuum. The remaining factor Z intersection (σ (1) , σ (2) ) can be trivially evaluated at the pole σ pole , giving, with ∆ C (m) as defined below (C. 19) and using the mass relation (C.11), .

(D.5)
This is precisely the intersection factor appearing in (C.15), 38 see (C.18), with f (x) = 2i sinh πib 2 (1) x. Summing the product of all factors just described over m L , m R , n L , n R reproduces the sum over large diagrams in the right-hand side of (3.25). Note that we have inserted a trivial factor of one written as the ratio of the extra factors appearing in (C.15). One factor of this ratio completes the Higgsed instanton partition function (of the large N -tuples of diagrams), and the other one merges with the three-dimensional one-loop determinants at the Higgs branch vacuum to form the Higgsed five-dimensional one-loop determinant. Of course this should come as no surprise, since the matrix model integrand (D.1) was designed to reproduce the instanton partition functions for large Young diagrams, when evaluated at these poles.
Next we consider the poles of type-ν with someν A > −1, which we claim will reproduce the small Young diagram contributions to the instanton partition function. Defineμ A as the smallest integer for which m L At this point, we will suppress the details about n L and n R , as their computational details are similar to the ones just presented for the large diagrams. We first compute the reside of the fundamental one-loop factor in Z We note that s b (1) (iQ (1) /2 − ib (1) ) = b (1) . Next we take the residue of one of the factors of (D.2) We also denote the other factor in (D.2) as Z intersection,2 . We use again b 2 The residue of Z intersection,1 can then be written as Observe that the last line and b # (1) cancel against the last line in (D.6) and the products of (1) ). The factors in the second line are precisely a product over the filled boxes inside the n (1) A rectangular region, and, together with the leftover factor in the first line and Z intersection,2 (σ pole ), reproduce the intersection factor in the factorization result for small diagrams (C.24). The leftover factors of (D.6) together with the residues of other one-loop factors combine into the "(semi-) vortex" partition function factor in (C.24).

D.4 Extra poles and diagrams
The matrix model (D.1) has more simple poles, which are selected by the JK prescription, than just those of type-ν. All of them assign to σ (2) poles of type σ while σ (1) are solutions to the component equations (D. 10) where at least one of the component σ m,n , which are already discussed). Similar to those of the SQCDA partition functions on S 3 b , the poles specified by (D.9)-(D.10) can be characterized by forest-tree diagrams. However, there are now three possible types of links between two nodes, corresponding to the equations of type-adj., type I and type II. Note that the poles of type-ν discussed in the previous section, which gave rise to large and small Young diagrams, can be recovered as special cases of (D.9)-(D.10).
For simplicity and clarity of the presentation, we consider the cases of n f = n af = 1, gauge groups U (n (1) = 2) on S 3 (1) and U (n (2) ) on S 3 (2) . The flavor index A is spurious in this case and will be omitted. For more general unitary gauge groups, the poles can be analyzed following exactly the same logic. We will show that the general simple poles not of type-ν cancel among themselves.
Again, we decouple the n L , n R in the following discussions.
First of all, there are many families of poles. The components σ (1) µ , σ (2) ν , given by solving (D.10), can be written universally as where h µ (which later determines the horizontal position of the appended boxes) is closely related to the tree structure that describes the pole, and can be negative. In figure 19, we list all classes of contributing forests that describe the above poles, and we tabulate the corresponding values of h µ and m L µ in table 2. Note that poles of type-ν withν ≥ 0 all lie in class A.1. It is easiest to look for potential cancellations by first inspecting the classical factor. The Coulomb branch classical factor on S 3 Substituting in (D.11), and using the fact that ξ 12) where N denotes some common factors shared across all families of poles. Clearly, one necessary condition for two poles to potentially cancel is that they have equal classical contributions, and m (2) . . .  Figure 19: Classes of forests that describe the extra poles. Note that we have omitted some other classes that are obviously not contributing due to symmetry reason. Green and red lines correspond to type I and type II equations, which are used to solve σ (1) 0,1 in terms of component(s) of σ (2) . Poles of type-ν form a subclass of class A.1. The residues of poles corresponding to non-type-ν diagrams enclosed within a dashed rectangle cancel each other. hence equal h 0 + h 1 and m L 0 + m L 1 + n (2) −1 ν=0 m R ν . An excellent tool to pinpoint the canceling pairs of poles is again given by diagrams associated with the poles (D.11). These diagrams consist of boxes and anti-boxes, and it is possible that anti-boxes survive after annihilation. The construction is a simple generalization of that in appendix D.2, and is illustrated in figure 20: step 1. and 2a. are identical. When it comes to appending vertical boxes or anti-boxes corresponding to σ (1) µ , one should, generalizing 2b., append to the h µ -th column. Now that h µ can be negative, these vertical segments of boxes can sit to the right of Y 2 , and can have annihilation with the horizontal segments of boxes corresponding to σ (2) ν . Figure 21 demonstrates a few examples of such diagrams, constructed from several poles.
It can be shown that if two poles contribute opposite residues, then their corresponding diagrams (after annihilation) must be the same. Moreover, given a pole not of type-ν with associated diagram,

E Poles and Young diagrams in 2d
In this appendix we study the poles and their residues of the matrix model computing the partition function of intersecting surface defects supported on S 2 L ∪ S 2 R ⊂ S 4 b . Throughout the appendix we will use (sub-)superscripts L, R for quantities on S 2 L/R , and N, S for quantities associated to the north-or south-pole contributions. The main idea is very similar to the discussion in appendix D, but slightly more involved, due to the fact that the intersection between S 2 L and S 2 R have two connected components, namely the north and south poles. We will need to bring the contributions from both poles together to reproduce the square of the instanton partition function.

E.1 Four types of poles
Recall that for a theory T of N 2 free hypermultiplets in the presence of intersecting defects with U (n L ) SQCDA on S 2 L and U (n R ) SQCDA on S 2 R respectively, the partition function Z (T ,S 2 L ∪S 2 R ⊂S 4 b ) 39 Note that poles of type-ν withν ≥ 0 although being special case of A.1, do not have such canceling siblings, therefore they have non-zero contributions in the end.

has integrand
where the intersection factor is defined in (3.47).
The combined meromorphic integrand (E.1) has many poles. Recall that m R X = ib −2 . It is easy to check that all poles take the form First of all, we define type-old poles by simply taking the (union of) poles of Z S 2 L and Z S 2 R discussed in appendix B.1. Additionally, we introduce three special classes of poles, which we refer to as type-N + ν , S + ν and NS + ν poles. Their definition goes as follows. We start by selecting partitions n L , n R of the ranks n L , n R : this corresponds to choosing a Higgs branch vacuum of the SQCDA theory living on S 2 L and S 2 R respectively. Next we select a set of integers {ν

(E.4)
• Poles of type-NS + ν NνS : (E.5) A few remarks are in order. Poles of type-N + ν N come from solving the equations Naively, simultaneous solutions to the last two equations seem to correspond to double poles of the integrand, since two separate intersection factors develop a pole. However, they are actually simple poles after canceling with the zeros of Z S 2 L . These poles are called type-NS + ν NνS in the above classification: they have negative m L/R 0 , n L/R 0 controlled byν N/S . The presence of these delicate poles forbids us to decouple n from the discussion of m as we did in the previous appendix.
It is clear that one can construct all pairs of N -tuples ( Y N , Y S ) from the four types of poles.
The construction is essentially the same as outlined in appendix D.2, where m L/R will now take care of Y N , and n L/R will take care of Y S . More precisely, one has the correspondence type-old type-N + Exhausting all four types of poles, one recovers all possible pairs of N -tuples of Young diagrams.
Again, the residues of the four types of poles sum up to the modulus squared |Z inst | 2 of the instanton partition function, evaluated at the specific value of its gauge equivariant parameter, which appears in the full S 4 b partition function.

E.2 Extra poles and diagrams
There are many extra poles in the integrand E.1 selected by the JK prescription, besides the four types of poles discussed above. For simplicity, here we only present the cancellation in the simplest case of n L = n f = n af = 1. The main idea is very similar to the discussion in appendix D.4 and techniques to analyze more general cases can be found there as well.
There are four types of extra poles selected by the JK prescription (we recycle the naming appearing in the previous subsection): It is straightforward to verify that the residues of poles of type-N + ν N cancel those of type-N − ν N , and similarly between type-S + ν S and -S − ν S . Again, from the four types of poles one can construct pairs of general diagrams consisting of boxes and anti-boxes. Two poles contribute opposite residues when their corresponding pairs of diagrams coincide (taking into account of annihilation between coincident boxes/anti-boxes).