BPS partition functions for S-folds

We derive a formula for the BPS partition functions of arbitrary S-fold theories. We first generalize the known result for the N=4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathcal{N}=4 $$\end{document} U(N) supersymmetric Yang-Mills theory to SO and Sp theories, and then we extend the formula to N=3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathcal{N}=3 $$\end{document} theories. We confirm that the results for rank 1 and 2 are consistent to the supersymmetry enhancement from N=3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathcal{N}=3 $$\end{document} to N=4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathcal{N}=4 $$\end{document}. We also derive the same formula from the quantization of D3-branes in S5/ℤk.


Introduction
Four-dimensional superconformal field theories (SCFT) have been studied for many years. We have learned a lot especially in N = 1, 2, and 4 cases. However, N = 3 theories are not well understood. This is because genuine N = 3 theories, which do not have hidden N = 4 supersymmetry, have no Lagrangian description and realized only at the strong coupling regime.
In recent years, some progress has been made toward understanding of the theories. Aharony and Evtikhiev [1] derived some universal properties of N = 3 theories from arguments based on the N = 3 superconformal algebra. In particular, they showed that genuine N = 3 theories cannot have marginal deformations. See also [2] for more comprehensive analysis of marginal deformations. The absence of marginal deformations is consistent to the well-known fact that the only N = 3 free field multiplet is the vector multiplet, which is after the CPT completion equivalent to the N = 4 vector multiplet. Therefore, a construction of a genuine N = 3 theory is necessarily non-perturbative.
A class of N = 3 theories were constructed in [3] as the theories on D3-branes in S-fold backgrounds. (See also [4] for a construction of related supergravity backgrounds.) S-folds JHEP03(2019)172 formula by quantizing D3-branes in S 5 /Z k . Finally, in section 6 we discuss our results and open questions. In appendix A we give the definition of the Molien series and its application to the U(N ) theory.

BPS partition functions of U(N ) SYM
In this section we review the BPS partition function for the N = 4 U(N ) SYM, which has been well understood, and define some notations which will be used in the following sections. Analysis in this section is based mainly on [12]. See also [14] for a generalization to a large class of theories associated with Calabi-Yaus.

BPS partition function
The BPS partition function of an N = 4 SYM is defined by Z(x, y, z) = tr(x J 1 y J 2 z J 3 ), (2.1) where the trace is taken over gauge invariant BPS operators consisting of the adjoint scalar fields X, Y, and Z. J 1 , J 2 , and J 3 are Cartan generators of SU(4) R . We use an so(6) basis for these generators. Namely, J 1 , J 2 , and J 3 count the numbers of X, Y, and Z, respectively. There are several types of BPS operators. Operators consisting of one of the scalar fields, say, Z, preserve half of 16 supersymmetries, and are called 1 2 -BPS operators. In the context of the N = 2 subalgebra Z is regarded as the scalar component of the N = 2 vector multiplet, and the 1 2 -BPS operators are called Coulomb branch operators. The corresponding partition function is often called the Coulomb branch Hilbert series.
BPS operators consisting of X and Y preserve quarter supersymmetry, and are called 1 4 -BPS operators. 1 4 -BPS operators are also called Higgs branch operators because X and Y belong to the N = 2 hypermultiplet, and operators made of them parameterize the Higgs branch. The corresponding partition function is often called the Higgs branch Hilbert series.
The most general BPS operators consisting of the three scalar fields X, Y, and Z preserve only two supersymmetries, and are called 1 8 -BPS operators. Although all gauge invariant operators made of X, Y, and Z are BPS when g YM = 0, some of them become non-BPS if we turn on the coupling constant. In this paper we are interested in BPS operators in theories with non-vanishing coupling constant.
If we take the trace over 1 2 ( 1 4 , 1 8 ) BPS operators in (2.1), the partition function is called the 1 2 ( 1 4 , 1 8 , respectively) BPS partition function. Because 1 2 and 1 4 BPS operators form subsets of 1 8 -BPS operators, once we obtain the 1 8 -BPS partition function, the 1 2 and 1 4 BPS partition functions are obtained by the following specializations: In the following, we describe BPS operators in two ways. The first is "the Casimir representation" in which we represent operators as polynomials of trace operators (and Pfaffian operators in some cases). The other is "the oscillator representation" in which we give gauge invariant operators as polynomials of diagonal components of scalar fields. The former is convenient to describe 1 2 -BPS operators and we can easily calculate the 1 2 -BPS partition function with this representation for an arbitrary gauge group. The latter is suitable to describe more general BPS operators and enable us to calculate the 1 8 -BPS partition function of the U(N ) SYM.

1 2 -BPS partition function
We first discuss the 1 2 -BPS sector. An operator in the 1 2 -BPS sector consists only of one adjoint scalar field Z.
In general the Coulomb branch chiral ring of an N = 4 SYM is freely generated by the Casimir operators made of the scalar field Z. The number of independent Casimir operators is the same as the rank of the gauge group. Let O i (i = 1, . . . , r) be the independent Casimir operators and d i be their scaling dimensions. The 1 2 -BPS partition function is given in terms of d i by where Pexp is the plethystic exponential defined by This is a general formula applicable to the N = 4 SYM with an arbitrary gauge group. The dimensions d i for some groups are shown in table 1. Let us consider the U(N ) case more explicitly. The Casimir operators are Operators tr(Z i ) with i ≥ N + 1 are not independent of them and decomposable into smaller traces. The partition function is (2.6) To study the 1 4 and 1 8 -BPS sectors the oscillator representation is more suitable. Let us first use this representation to the 1 2 -BPS sector and later generalize it to the 1 8 -BPS sector.

JHEP03(2019)172
We diagonalize the scalar field Z by the gauge transformation and let z i (i = 1, . . . , N ) be the diagonal components. 1 2 -BPS gauge invariant operators are polynomials of these N variables that are invariant under the Weyl group W U(N ) = S N . We can use the set of following symmetric polynomials as a basis.
Gauge invariant operators can be regarded as functions in the moduli space, and the symmetric polynomials are generators of the coordinate ring of the Coulomb branch moduli space These basis functions are labeled by a vector of N non-negative integers {m 1 , . . . , m N }. This is the same as the Hilbert space of N one-dimensional harmonic oscillators. Two vectors with different orders of the components are identified, and this is interpreted as the Bose statistics of the particles. Namely, the 1 2 -BPS partition function of the U(N ) theory is identical to the partition function of N bosonic particles in the one-dimensional harmonic potential.
The equivalence of two descriptions, the Casimir representation and the oscillator representation, becomes obvious if we use partitions to specify operators. In the Casimir representation, we can adopt the set of operators labeled by a non-ascending series of integers bounded by N with an arbitrary length as a basis of gauge invariant operators. In the oscillator representation, the symmetric polynomials (2.7) are labeled by N non-negative integers in non-ascending order: Elements of both bases are labeled by a non-ascending series of non-negative integers, each of which can be represented as a Young diagram. The two Young diagrams are transposition of each other, and the two descriptions give the same partition function.
In the oscillator representation, it is natural to define the grand partition function (2.10) We use " * " as a wildcard character to represent the summation over the rank N . The grand partition function is given as the product of the partition function of each state of the harmonic oscillator, We can easily show by the q-binomial formula that (2.6) is obtained from (2.11) by the Taylor expansion with respect to t.

JHEP03(2019)172
In (2.11) k = 0, 1, 2, . . . labels energy eigenstates of the harmonic oscillator. It is important that k starts from zero corresponding to the ground state. When the energy of the whole system of N particles is much smaller than N , only small part of N particles are excited, and the majority of the particles are in the ground state. The finiteness of N affects the degeneracy of states only when the energy is comparable to or greater than N .
2.3 1 8 -BPS partition function Let us move on to the 1 8 -BPS operators. In this case we can use single trace operators made of X, Y, and Z as generators of the chiral ring. However, it is known that unlike the 1 2 -BPS sector the chiral ring is not freely generated and there are non-trivial relations called syzygies [14] among the generators, and it is not so easy to count independent operators in the Casimir representation. The oscillator representation is more suitable. Indeed, it is quite easy to give a set of independent operators in the oscillator representation, and we can find that they are equivalent to the states of N bosonic particles in a three-dimensional harmonic potential [12] as is shortly explained.
Thanks to the F -term conditions [X, Y] = [Y, Z] = [Z, X] = 0 we can diagonalize the three fields X, Y, and Z simultaneously by the gauge transformation. Let (x i , y i , z i ) (i = 1, . . . , N ) be the diagonal components. The symmetric polynomial (2.7) is replaced by where Ψ m (x, y, z) = x mx y my z mz is the monomial which is labeled by a three-dimensional vector m = (m x , m y , m z ) with non-negative integer components. As in the 1 2 -BPS case these can be regarded as basis functions of the coordinate ring of the total moduli space We regard Ψ m as the wave function of a three-dimensional harmonic oscillator in the state specified by m. The symmetrization is again interpreted as the Bose statistics, and (2.12) can be regarded as the wave function of N bosonic particles in the threedimensional harmonic potential. The grand partition function is Ξ U( * ) (x, y, z; t) = Pexp (tI(x, y, z)) = ∞ p,q,r=0 where I(x, y, z) is the function . (2.14) By picking up the coefficient of the t N term from the Taylor expansion of (2.13) we obtain Z U(N ) , the 1 8 -BPS partition function of the U(N ) theory. In appendix A we show that the BPS partition functions obtained from (2.13) are equal to those from the Molien series.
Interestingly, this partition function can be reproduced on the gravity side as the contribution of sphere giants [15] or AdS giants [16]. Descriptions of two types of giant gravitons are complementary, and each of them gives the result identical to (2.13).

JHEP03(2019)172
We call the function I in (2.14) "the single-particle partition function" by two reasons: 1. I is the partition function of a single three-dimensional harmonic oscillator.
2. From the viewpoint of the gravity dual in the large N limit I can be regarded as the partition function of a single KK particle in S 5 (up to the difference by 1).
Concerning the second reason, the N → ∞ limit of Z U(N ) can be read off from the pole of Ξ U( * ) at t = 1 as (2.15) "−1" in the last expression eliminates the contribution of the harmonic oscillator ground state. Therefore, only the excited states of the harmonic oscillator correspond to the KK gravitons. We can define the "single-particle" partition function I U(N ) for finite N by Z U(N ) = Pexp I U(N ) . For the 1 2 -BPS states, the finite N correction is given as the simple cut-off at O(z N +1 ). (See (2.6).) For 1 4 and 1 8 -BPS states, the finite N correction becomes more complicated.
We point out that the U(1) partition function agrees with the function I: We also note that the SU(N ) partition function can be obtained by removing the U(1) factor from the U(N ) partition function: (2.17)

BPS partition functions for SO and Sp theories
3.1 1 2 -BPS partition function Let us extend the derivations of BPS partition functions in the last section to the SO and Sp gauge theories.
We first consider the 1 2 -BPS sector. For SO theories, the adjoint fields become antisymmetric matrices, and the trace operators with odd order become identically zero, and only ones with even order exist. In addition, for SO(2N ), the Pfaffian operator Pf Z joins the generators of the chiral ring.
Let us first consider the SO(2N + 1) theory. The generators are These freely generate the Coulomb branch chiral ring, and the corresponding partition function is

JHEP03(2019)172
This is obtained simply by replacing z in Z U(N ) by z 2 . Therefore, the grand partition function is also obtained from (2.11) by the same replacement: In the SO(2N ) case the generators are Although we can of course directly calculate Z The corresponding grand partition function is where I Z 2 m (z) (m = 0, 1) are defined by These are even and odd part of I(z) ≡ I(0, 0, z), respectively. Namely, I(z) = I Z 2 0 (z)+I Z 2 1 (z), and they satisfy I Z 2 m (−z) = (−1) m I Z 2 m (z).

1 8 -BPS partition function
We can obtain similar expressions to (3.3) and (3.6) for the 1 8 -BPS partition functions by using the oscillator description.
Let us consider the SO(2N +1) case first. Similarly to the U(N ) case, we can diagonalize X, Y, and Z simultaneously by the gauge transformation so that they become elements of so(2) N ⊂ so(2N + 1), (3.8) and eigenvalues (x i , y i , z i ) and (−x i , −y i , −z i ) associated with the i-th so(2) factor always appear in pair except a single zero corresponding to the (2N + 1)-th direction. Gauge

JHEP03(2019)172
invariant operators, or functions in the moduli space C 3N /W SO(2N +1) , are expressed as polynomials of 3N variables x i , y i , and z i . We treat a triplet (x i , y i , z i ) as the coordinates of a three-dimensional harmonic oscillator. The Weyl group W SO(2N +1) = S N Z N 2 consists of permutations among these N triplets and sign change for an arbitrary i, which is realized by SO(3) rotation acting on the R 3 consisting of the two directions associated with the i-th so(2) factor in (3.8) and the exceptional (2N + 1)-th direction. Again, we can regard this as a system of N bosonic particles in the three-dimensional harmonic potential. The invariance under the sign change requires the wave function of each particle to be even under the Z 2 action. Namely, the one-particle wave function Ψ must satisfy This condition projects out one-particle states with odd energy eigenvalues, and the grand partition function is given by where On the AdS side, (3.11) has a clear interpretation at least in the large N limit. We can treat the fugacities x, y, and z as if they are the coordinates of C 3 which contains S 5 . The is nothing but the orientifold action, and (3.11) can be regarded as the single-particle partition function of KK modes in S 5 /Z 2 .
In the SO(2N ) case, we can again use N triplets (x i , y i , z i ) to describe gauge invariant operators. The difference from the SO(2N + 1) case is that the Weyl group of SO(2N ) is and we cannot change the signs independently for each i, because there is no room to perform the SO(3) rotation which we used to flip the sign in the SO(2N + 1) case. Although we can change signs of two triplets simultaneously, it is not possible to change the sign of a single triplet. This restriction of the sign change weakens the requirement of the Weyl invariance, and in addition to (3.9) we have the other solution for the wave function, which satisfies the twisted boundary condition (3.13) The associated projection leaves odd order terms in the Taylor expansion of the singleparticle partition function, 14)

JHEP03(2019)172
and gives the grand partition function Pexp tI Z 2 1 . Namely, the 1 8 -BPS grand partition function of the SO(2N ) SYM is the sum of two contributions just like the 1 2 -BPS partition function (3.6), The twisted boundary condition (3.13) removes even energy eigenvalues of the harmonic oscillator. In particular, oscillators in the twisted sector cannot be in the zero energy ground state. All N oscillators contribute at least one unit to the energy, and the total energy is at least N . Therefore, it is natural to identify the twisted sector to the contribution of the Pfaffian type operators including the tensor. This sector decouples in the large N limit, and is effective only for finite N .
How should we interpret this "twisted sector" on the gravity side? It is known that a gauge invariant operator containing the tensor corresponds to a D3-brane wrapped around the non-trivial three-cycle in S 5 /Z 2 [5]. The mass of the wrapped D3-brane is N/(AdS radius), and the corresponding operator has dimension ∼ N . Therefore, it is natural to identify the twisted sector to the contribution of a wrapped D3-brane.
We can calculate the partition function of the Sp(N ) theory in a similar way. The scalar fields X, Y, and Z are 2N × 2N matrices, and we can diagonalize them so that they become elements of sp(1) N ⊂ sp(N ). Each sp(1) factor is associated with the coordinates (x i , y i , z i ) of a three-dimensional harmonic oscillator. Unlike the SO(2N ) case we can flip the sign of the coordinates of each particle independently by the rotation in the Sp(1) factor, and therefore W Sp(N ) = W SO(2N +1) . The condition imposed on the wave function is the same as (3.9) in the SO(2N + 1) case, and the partition function is given by (3.10). This is of course the expected result from the Montonen-Olive duality.
As we saw above, the difference between Ξ SO(even) and Ξ SO(odd) = Ξ Sp( * ) is the choice of sectors summed up. For unified description of these formulas we introduce the parameter p ∈ Z 2 , which is p = 0 for SO(2N ) and p = 1 for SO(2N + 1) and Sp(N ). Then, the formulas (3.10) and (3.15) are unified into Ξ S(2, * ,p) (x, y, z; t) = pm=0 Pexp tI Z 2 m (x, y, z) . (3.16) The summation is taken over m ∈ {0, 1} satisfying pm = 0. Namely, m = 0, 1 for p = 0 and m = 0 for p = 1. From the viewpoint of the gravity dual, p is related to the discrete torsion of the three-form fluxes [5]. In string theory SO and Sp theories are realized by using O3-planes. There are four types of planes O3 ± and O3 ± , which are distinguished by an element of the discrete torsion group associated with the three-form flux fields: where Z + Z is the sheaf of a pair of integers twisted by the orientifold action. The trivial element corresponds to p = 0, and the others to p = 1.

S-fold theories
A Z k S-fold with k = 3, 4, 6 is defined as a generalization of the orientifold by replacing the Z 2 action (3.12) by the Z k action which also acts non-trivially on one of the four supercharges in the N = 4 SYM [3]. In the following subsections we study BPS partition functions of such theories. Before starting the analysis let us carefully choose the Z k action on the scalar fields and comment on the relations to the Coulomb branch and Higgs branch Hilbert series. The choice of Z k is not unique and depends on the choice of the eliminated supercharge in the reduction from N = 4 to N = 3. This must be consistent to the definition of the BPS partition function, in which we need to use one supercharge to write down the BPS condition. Each of the choices of a supercharge breaks SU(4) R symmetry to SU(3) × U(1), and the scalar fields in the vector representation 6 split into 3 +1 +3 −1 , "holomorphic" ones and "anti-holomorphic" ones. Namely, a choice of supercharge fixes a complex structure in R 6 . The scalar fields X, Y, and Z are holomorphic with respect to the complex structure associated with the supercharge used in the BPS condition. What is important is that the supercharge chosen in the construction of the S-fold should be different from the one used in the BPS condition. As a consequence the S-fold action on X, Y, and Z cannot be homogeneous. We adopt the convention with If we are interested in the Coulomb branch or the Higgs branch Hilbert series we need to choose an N = 2 subalgebra in the N = 3 algebra. Again, we need to specify one supercharge from three, that is not contained in the N = 2 subalgebra. This again gives a corresponding complex structure, which is different from the ones appearing above. This splits three scalar fields X, Y, and Z into one belonging to an N = 2 vector multiplet and two belonging to an N = 2 hypermultiplet. This 1 + 2 splitting is different from that associated with the S-folding. Namely, the scalar field belonging to the N = 2 vector multiplet cannot be X. If we adopt the convension in which Z belongs to the N = 2 vector multiplet the Coulomb (Higgs) branch Hilbert series is obrained from the BPS partition function given below by the specialization x = y = 0 (z = 0) as shown in (2.2).

Grand partition functions for Z 3,4,6 S-folds
Let us generalize the formula (3.16) to S-folds with k = 3, 4, 6. We use the oscillator representation. Namely, we express gauge invariant operators as polynomials which are invariant under "the Weyl group" W S(k,N,p) . Of course an S-fold theory with k ≥ 3 is not JHEP03(2019)172 a gauge theory, and we cannot define the Weyl group as a subgroup of the gauge group. However, because an S-fold theory is defined as the theory on D3-branes, we can define W S(k,N,p) as the permutation group of N D3-branes put in the S-fold background. Aharony and Tachikawa [6] proposed the action of W S(k,N,p) on the Coulomb branch coordinates z i by generalizing the Weyl groups for k = 1 and k = 2 cases. We simply generalize it to the total moduli space, and define W S(k,N,p) as the group generated by the following operations.
The integer p in (4.4) can be assumed to be a divisor of k. We use p = 0 instead of p = k. We want to interpret these operations from the viewpoint of the oscillator description.
We regard a function of 3N variables (x i , y i , z i ) as the wave function of an N -particle system, and require it to be invariant under (4.2), (4.3), and (4.4). The first operation (4.2) generates permutations of N particles, and the invariance under this operation can be implemented as the Bose statistics of the particles, and the N -particle wave function is given in the form (2.12). The invariance under the second operation requires all singleparticle wave functions satisfy a common boundary condition where the integer m ∈ {0, 1, 2, . . . , k − 1} is common for all particles, and specifies one of k sectors. m = 0 is the untwisted sector and the others are twisted sectors. The corresponding single-particle partition function is x nx y ny z nz , (4.6) where the summation nx,ny,nz is taken over the three integers satisfying the conditions n x , n y , n z ≥ 0, −n x + n y + n z = m mod k.
In the m-th sector with m = 0 the Z k projection leaves only single-particle states with non-vanishing energies, and the lowest energy of the N -particle system is of order N . These states are related to the Pfaffian-like operators. On the gravity side we regard m-th sector as the contribution of wrapped D3-brane with the winding number m ∈ H 3 (S 5 /Z k , Z) = Z k .

JHEP03(2019)172
The grand partition function is obtained by summing up the contribution of sectors. The contribution of the m-th sector is Pexp tI Z k m , and the sectors summed up are determined by the invariance under (4.4). It requires m to satisfy the condition pm = 0 mod k. (4.9) Namely, the grand partition function is given by Pexp tI Z k m (x, y, z) = pm=0 nx,ny,nz where the product in the final expression is taken over three integers satisfying the conditions (4.7). This is the main result in this paper.
As is explained in [6], p is related to the discrete torsion in the gravity dual, and it is shown that only p = 0 or p = 1 is allowed for a consistent theory. The discrete torsion group for the Z k S-fold is where Z + Z is the sheaf of a pair of integers twisted by the S-fold action. For each k this is given by [6,7]: The sectors summed up are determined by the condition that the gauge bundle of the corresponding wrapped D3-brane is consistently defined. If the discrete torsion is trivial, this is the case for an arbitrary winding number m ∈ H 3 (S 5 /Z k , Z) = Z k , and this corresponds to p = 0. Otherwise, the non-trivial NS-NS and R-R three-form fluxes induce electric and magnetic charge on the worldvolume of the wrapped D3-brane. This obstructs the definition of the gauge bundle, and only m = 0 sector is allowed. This corresponds to p = 1.
In the large N limit only the m = 0 sector contributes to the partition function and (4.10) reduces to (The relation (4.13) holds not only for the BPS partition function but also for the superconformal index. This was used in [7] to calculate the superconformal indices of S-folds in the large N limit.)

SUSY enhancement from N = 3 to N = 4
It is known that in S-fold theories S(k, 1, 0) and S(k, 2, 0) with k = 3, 4, 6 the supersymmetry is enhanced from N = 3 to N = 4 [6,13]. Let us confirm the consistency of our formula

JHEP03(2019)172
S-folds N = 4 SYMs Table 2. N = 4 SYMs expected to be equivalent to S(k, 2, 0). to this phenomenon. For the trivial discrete torsion p = 0 the grand partition function is the sum of the contributions of all sectors m = 0, . . . , k − 1: (4.14) By picking up t 1 terms from (4.14) we obtain the partition function of the rank one S-fold theories (4.15) and this is the partition function of the N = 4 U(1) theory. The rank two S-fold theories are expected to be equivalent to N = 4 SYM with the gauge groups shown in table 2.

JHEP03(2019)172
This is expected to be the same as Z G 2 . The specialization of this partition function by x = y = 0 agrees with the 1 2 -BPS partition function obtained from the general formula (2.3) with {d 1 , d 2 } = {2, 6} for G 2 shown in table 1. We can also compare this partition function to the partition function of the Z 2 gauging of the SU(3) SYM. As is pointed out in [17] the 1 2 -BPS partition function of the G 2 SYM is obtained from the SU(3) SYM by the discrete gauging of Z 2 charge conjugation symmetry. This is also the case for the 1 8 -BPS partition function, and the 1 8 -BPS partition function of the G 2 theory is given by It is also possible to use (a refinement of) the Molien series to obtain the same partition function. We can directly confirm the agreement of (4.20) and (4.21).

Discrete gauging
The discrete gauging is the prescription to obtain a new theory from a parent theory by gauging a discrete symmetry of the parent theory. It provides another way to construct N = 3 theories [17,18]. We remark that the gauging is different from the S-folding, and S-fold partition functions are not necessarily obtained from Z U(N ) by a gauging. Instead, the gaugings give additional relations among S-fold partition functions as we will show shortly. Some of the relations below belong to the class of discrete gaugings associated with the principal extensions of the gauge groups, which are investigated in [19].
As is pointed out in [6] the S-fold theory S(k, N, p) has a Z p global symmetry. (In this section we use p = k instead of p = 0.) Let q be a divisor of p. We can gauge the subgroup Z q ⊂ Z p to define another theory. Let us denote the new theory by S(k, N, p)/Z q . In terms of oscillator variables Z q is generated by the rotation (4.4) for a single oscillator with p replaced by p = p/q. This rotates the total wave function (2.12) by the phase factor ω mp k , and the gauge invariance requires p m = 0 mod k. (4.23) As the result, the partition function of this theory is the same as that of S(k, N, p ): N,p ) . and is consistent to the spectrum of Coulomb branch operators given in [6].

JHEP03(2019)172
We can consider another type of discrete gaugings of S-fold theories that is generated by (x i , y i , z i ) → (ω −1 x i , ω y i , ω z i ) for all oscillators. may be or may not be a divisor of k. If is a divisor of k this rotation is realized by repeating N times the rotation of a single oscillator, and this gauging is equivalent to the previous gauging with (4.26) We can describe the overall rotation of the all oscillators by the rotation of the fugacities (x, y, z) → (ω −1 x, ω y, ω z), (4.27) and the partition function of the gauged theory is where Z is the partition function before the Z projection and P Z is the projection operator that eliminates terms that are not invariant under (4.27). This is in contrast to the S-fold projection (4.13) in the large N limit in which the projection is carried out before the plethystic exponential. Let us first confirm if is a divisor of k (4.28) reproduces (4.24) with p given by (4.26). Let R be the operator replacing (x, y, z) by (ω −1 x, ω y, ω z). If is a divisor of k the relation (4.8) holds. Namely, R I Z k m = ω m I Z k m . This relation means that tI Z k m (x, y, z) is invariant under the Z action (x, y, z; t) → (ω −1 x, ω y, ω z; ω −m t), and so is the plethystic exponential Pexp tI Z k m . Therefore, the coefficient of the t N term in the Taylor expansion (4.29) The R invariance requires mN = 0 mod , and this is the same as the condition (4.23) with p given by (4.26).
By using (4.29) we can prove the relation P Z 2 Z S(3,2,0) = Z S(6,2,0) , which we mentioned at the end of the previous subsection, as follows. First we divide the single particle partition function I Z 3 m into two parts; I Z 3 m = I Z 6 m + I Z 6 m+3 . With this decomposition we can rewrite the grand partition function as Pexp tI Z 6 m Pexp tI Z 6 m+3 , (4.30) and by picking up t 2 terms we obtain Pexp tI Z 6 m t r Pexp tI Z 6 m+3 t 2−r . (4.31) When we apply R 2 the summand is rotated by the phase ω rm 2 ω (2−r)(m+3) 2 = (−1) r , and the corresponding projection P Z 2 leaves the terms with r = 0 and r = 2. We obtain Pexp tI Z 6 m+3 t 2 + Pexp tI Z 6 m t 2 = Z S(6,2,0) .

(4.32)
This is the relation we wanted to show.

D3-brane analysis
In this section we reproduce the partition function (4.10) by quantizing D3-branes in S 5 /Z k . The analysis is quite similar to the analysis of sphere giants in [15]. Actually we can use the essential part of the calculation in [15] as it is for our purpose. The analysis in [15] starts from the BPS brane configuration obtained by Mikhailov [20]. Mikhailov showed that an arbitrary BPS solution is given as the intersection of S 5 defined by |X| 2 + |Y | 2 + |Z| 2 = 1 and a holomorphic surface f (X, Y, Z) = 0. We consider the Taylor expansion and treat the coefficients c nx,ny,nz as dynamical variables. Because the overall factor of f is irrelevant to the brane configuration the coefficients are regarded as the projective coordinates of CP ∞ . Due to the coupling of the D3-brane to the background RR flux the wave function is not just a function but a section of the line bundle O(N ) over this configuration space. Therefore, the quantization reduces to the simple problem to find holomorphic sections of this line bundle. There are two issues which make the problem complicated. One is that different functions f may give the same brane configuration, and we should remove the redundancy. The other is that the surface f = 0 may not intersect with S 5 , and the parameter region giving such a surface should be removed from the configuration space. The detailed analysis in [15] shows that even if we take account of these issues the result is the same as what we obtained by naive analysis neglecting these issues. Let us assume that this is the case for the S-fold. Then what we should additionally do is to impose the Z k invariance to the surface f = 0. This requires the function satisfy with some m ∈ Z k . We identify m with the winding number of a D3-brane around the non-trivial cycle in S 5 /Z k . This is easily shown as follows. We can deform the function f by continuously changing coefficients to a simple function, say, f = Z m , without violating the property (5.2). The resulting configutation obviously has the winding number m. Because such a deformation does not change the homology class of the brane configuraion, an arbitrary brane configuration given by a function satisfying (5.2) has winding number m. Now, let us follow the quantization procedure of [15] under the restriction (5.2). The configuration space is again CP ∞ with the homogeneous coordinates c nx,ny,nz . The constraint (5.2) requires (n x , n y , n z ) to satisfy −n x + n y + n z = m mod k, (5.3) and this is the same as (4.7). The wave function is a holomorphic section of the O(N ) line bundle over this configuration space, and is given by an order N homogeneous function of c nx,ny,nz . We can treat each of c nx,ny,nz as if it is a quantum with angular momentum (J 1 , J 2 , J 3 ) = (n x , n y , n z ). Then a quantum state of D3-branes in S 5 is regarded as a collection of N quanta, and the partition function of D3-branes can be calculated as the

JHEP03(2019)172
partition function of states which include N quanta. Let us introduce (x, y, z) and t as fugacities for the angular momenta (J 1 , J 2 , J 3 ) and the number of quanta N , respectively, and calculate the grand partition function. The contribution of a single quantum of c nx,ny,nz is tx nx y ny z nz , and the grand partition function for a fixed winding number m is where the sum is taken over non-negative integers (n x , n y , n z ) satisfying (5.3). By summing up (5.4) over m allowed by the discrete torsion, we obtain the grand partition function Ξ S(k, * ,p) (x, y, z; t) in (4.10).

Discussion
In this paper we derived the BPS partition functions for arbitrary S-fold theories. We confirmed that the formula is consistent to the Lie algebra isomorphisms. It is also consistent to the supersymmetry enhancement from N = 3 to N = 4 in rank 1 and 2 theories. Namely, for S(k, 1, 0) the partition function is the same as the U(1) SYM, and for S(k, 2, 0) with k = 3, 4, 6 the partition functions are the same as those of SYM with G = SU (3), SO(5), and G 2 , respectively. We also gave some relations among partition functions via discrete gaugings. The formula gives the partition function as the sum of contributions of sectors. From the holographic point of view, different sectors correspond to different winding numbers of D3-branes around the non-trivial cycle in the internal space S 5 /Z k . We derived the same formula by quantizing D3-branes in S 5 /Z k following the similar analysis of sphere giants [15].
The derivation on the SCFT side is based on the harmonic oscillator description of BPS operators. In the large N limit the sectors with wrapped branes decouple, and only the untwisted sector contributes to the partition function. Each excited state of a harmonic oscillator can be regarded as a KK mode in S 5 /Z k . For finite N , this correspondence is not so obvious. In particular, the twisted sector gives a Pfaffian operator as "a bound state" of N harmonic oscillators. Naively, this may be interpreted on the gravity side that a D3-brane wrapped on the non-trivial cycle in S 5 /Z k is a bound state of KK modes satisfying the twisted boundary condition. However, it is not possible to impose the twisted boundary condition on KK modes due to the absence of gauge fields minimally coupling to gravitons. At present, unfortunately, we have no clear explanation how this is realized. It may be interesting to study the relation between the harmonic oscillator description and the quantization procedure of D3-branes we used in section 5.
Other than the BPS partition function, there is another important quantity reflecting the operator spectrum: the superconformal index. It has many connections to physical quantities. In particular, its Schur limit (the Schur index) are known to be related to the BPS spectrum on the Coulomb branch [21], 2d chiral algebra [22], and correlation functions in 2d topological QFT [23,24]. Furthermore, there is an analytic formula for the Schur index for U(N ) SYM with an arbitrary N [25]. It would be very interesting to investigate the relation of our analysis to the superconformal index. Note that for a specific N only finite number of k j are non-vanishing due to the constraint (A.4). Corresponding to the cycle decomposition, the matrix I N − zD(g(µ)) appearing in (A.3) takes the block-diagonal form. Each block corresponds to each cycle. The block associated with a j-cycle is and det I j = 1 − z j . Therefore, we can rewrite (A.3) as where the sum is taken over {k j } satisfying (A.4).
It is straightforward to extend the analysis above to the 1 8 -BPS partition function. We define three copies of N -dimensional vector spaces V x , V y , V z corresponding to the three scalar fields and replace the vector space V by the direct product V x × V y × V z , and correspondingly replace D(g) by I 3 ⊗ D(g). As the result, we obtain the Molien series for the full moduli space C 3N /S N , which is given by (A.7) with the factor 1/(1 − z j ) k j replaced by 1/(1 − z j ) 3k j . This is the 1 8 -BPS partition function with fugacities x = y = z. To obtain the partition function with generic fugacities we need to consider a refinement of the Molien series [14]. It is defined by using diag(x, y, z) ⊗ D(g) instead of zI 3 ⊗ D(g). Namely, Z Molien U(N ) (x, y, z) = 1 N ! g∈S N 1 det(I 3N − diag(x, y, z) ⊗ D(g)) . (A.8) By repeating the same procedure as above we obtain where I(x, y, z) is the function defined in (2.14). To obtain the grand partition function, we multiply t N = ∞ j=1 (t j ) k j to (A.9).