Branes and symmetries for $\mathcal N=3$ S-folds

We describe the higher-form and non-invertible symmetries of 4d $\mathcal N= 3$ S-folds using the brane dynamics of their holographic duals. In cases with enhancement to $\mathcal N=4$ supersymmetry, our analysis reproduces the known field theory results of Aharony, Seiberg and Tachikawa, and is compatible with the effective action recently given by Bergman and Hirano. Likewise, for two specific $\mathcal N=3$ theories for which Zafrir has conjectured $\mathcal N=1$ Lagrangians our results agree with those implied by the Lagrangian description. In all other cases, our results imply novel predictions about the symmetries of the corresponding $\mathcal N=3$ field theories.


Introduction
In recent years there has been a rapid increase in our understanding of the structure of symmetries in quantum field theory. One of the foundational papers of this subject is the analysis by Aharony, Seiberg and Tachikawa of the possible global forms of N = 4 quantum field theories [1]. Those with unitary, orthogonal or symplectic gauge groups all admit a holographically dual description in the large N limit, so it is natural to look for a holographic description of these global forms as well.
For N = 4 theories with Lie algebra su(N), 1 such a holographic description was found by Witten [2]. The essential observation is that there is a topological field theory (TFT) on AdS 5 , and different choices of boundary conditions for this TFT lead to the different choices of global form in the field theory. To better understand this TFT and its implications for the global structure of the boundary theory, we replace AdS 5 with a more general manifold M 5 which is asymptotically of the form M 4 × R, with M 4 closed, Spin, and, for simplicity, without torsion.
The TFT described in [2] has two types of extended two-surface operators, which arise from D1 and F1 branes that wrap surfaces in M 5 . We denote these operators by D1(Σ 2 ) and F1(Ξ 2 ), respectively. These two operators do not commute due to the presence of N units of F 5 RR flux on the S 5 factor, and instead satisfy the relation D1(Σ 2 )F1(Ξ 2 ) = e 2πiΣ 2 ·Ξ 2 /N F1(Ξ 2 )D1(Σ 2 ), (1.1) see, for instance, §2.5 for a derivation. Here Σ 2 and Ξ 2 are surfaces on M 4 , Σ 2 · Ξ 2 is their intersection product in M 4 , and we are viewing the radial direction, R, as time so that there is a Hilbert space associated to M 4 on which the two operators act. The commutation relations (1.1) are those of a discrete Z N gauge theory. The physical content of such a theory is encoded in the spectrum of operators and their algebra, 2 but it is also possible in this case to give a description in terms of continuous fields [4,5]. This is achieved by the following action, with B F1 and B D1 2π periodic two-form connections on a higher U(1) bundle, or in more correct differential cohomology notation (see [6][7][8] for reviews), withH F1 ,H D1 ∈H 3 (M 5 ). This is precisely the coupling one obtains on M 5 after reducing IIB supergravity on the S 5 factor in the long wavelength limit [2]. 3 The remaining N = 4 theories with a large N limit can be obtained by taking the near horizon limit of D3 branes atop an orientifold plane. Depending on the sign of the orientifold, the gauge algebra on the brane is either so(N) or usp(N). The structure of the holographic dual is much more subtle in this case. Many important aspects of this dual were explained in [12], and recently Bergman and Hirano [13] have constructed a topological action in AdS 5 that reproduces all the so(N) and usp(N) global structures identified in [1] together with their SL(2, Z) duality orbits.
Encouraged by these successes, it is natural to apply the holographic viewpoint to study the global structures of field theories with fewer supersymmetries. In particular, in this paper we will do so for the N = 3 S-folds of [14,15], which are type IIB backgrounds of the form AdS 5 × S 5 /Z k where the Z k torsion one-cycle (k = 2, 3, 4 or 6) carries a suitable discrete Wilson line for the Z k subgroup of SL(2, Z). As the dual field theories are all non-Lagrangian for k > 2, they are much harder to access by purely field theoretic means, so the holographic results we obtain are largely new predictions that remain to be verified on the field theory side of the correspondence. However, in two special cases Zafrir has proposed N = 1 theories whose N = 1 IR fixed point lives on the same conformal manifold as the N = 3 theories in question [16], and in these special cases our results agree with those that follow from the proposed N = 1 Lagrangians.
Since O3 planes can be viewed as k = 2 S-folds, the N = 4 theories studied by Bergman and Hirano [13] also fall within our analysis, and we reproduce their results as an additional consistency check. We also provide a microscopic derivation of their bulk TFT action, slightly generalizing it by including the zero-form sector and demonstrating how to derive certain cubic couplings responsible for various mixed 't Hooft anomalies and Stückelberg couplings on the field theory side. We further include a detailed dictionary that maps Wilson and 't Hooft lines to bulk branes. This paper is organized as follows. In §2, we derive the higher form symmetries of S-folds. In §2.1, we show which kinds of branes are present in the k = 2 (N = 4) case, and we generalize to arbitrary k in §2. 3. In §2.4, we give a microscopic derivation of the commutation relations between branes for general S-folds, and we reproduce the N = 4 results in §2.5. In §2.6, we produce a microscopic derivation of the generalization of the effective bulk TFT action of [13] in the N = 4 case. In §2.7 and §2.8, we discuss Freed-Witten anomalies. In §2.9 we discuss mixed anomalies and certain non-invertible symmetries that follow from the existence of the mixed anomalies. In §3, we explain in detail how to connect our results for the k = 2 case to known results in the literature. In §3.1 we provide a dictionary between bulk worldsheets and field theory lines. Then, in §3.2 we use the commutation relations of §2 to derive the known mutual locality relations of [1]. We then show in §3.4 that the SL(2, Z) duality webs of [1] for N = 4 theories match the duality webs of the bulk theories. We conclude and discuss future directions in §4.

Higher form symmetries of S-folds
Our target is to understand the symmetries of the N = 3 S-folds constructed in [14,15] (see also [17] for an earlier construction of the holographic dual we study below). We will do this by directly computing commutation relations between branes in the holographic dual, which is of the form M 5 × (S 5 /Z k ), where we view S 5 as the i |z i | 2 = 1 base of C 3 , and the Z k action on S 5 is then the one induced from the Z k action on C 3 : (z 1 , z 2 , z 3 ) → (ω k z 1 , ω k z 2 , ω k z 3 ), with ω k = exp(2πi/k). There is additionally a ρ k ∈ SL(2, Z) duality action, when going around the generator of π 1 (S 5 /Z k ) = Z k , given by These monodromies can be understood as Z k rotations on the F-theory torus T 2 . The values of k are restricted to 2, 3, 4, and 6, so that the rotation is an automorphism of the T 2 (for specific values of τ whenever k > 2). The k = 2 case corresponds to the N = 4 so and usp theories, while the cases with k > 2 preserve only N = 3. By studying the set of allowed dynamical objects of worldvolume dimension 0, 1, 2 and 3 on M 5 , and their commutation relations, we learn about the 3, 2, 1, and 0form symmetries of the field theory holographically dual to the S-fold. We first review the sources of these dynamical objects in the more familiar k = 2 setting, and then compute the linking pairing for general k. With the linking pairing we compute the commutation relations of the branes in all of the above S-folds. We then argue for a bulk effective action for the symmetry TFT, discuss the anomalies of the theories, and explore the non-invertibility of the symmetries.

k = 2 allowed brane wrappings, a warm up
We now review how to generalise the analysis of brane non-commutativity leading to (1.1) in the su(N) case to the so(N) and usp(N) cases. These cases arise from placing a stack of D3 branes on top of an O3 plane. The holographic dual can be obtained by taking the near horizon limit, and it is given by M 5 × RP 5 , where in RP 5 := S 5 /Z 2 the Z 2 identifies antipodal points, and additionally acts with (−1) F L Ω, due to the orientifold action on the worldsheet. This can be equivalently described as the k = 2 S-fold, since what we call (−1) F L Ω in worldsheet language can alternatively be described as −1 ∈ SL(2, Z).
The symmetry operators arise from branes wrapping various cycles in the internal space. Branes which are insensitive to the −1 ∈ SL(2, Z) action wrap cycles classified by homology classes in This classification is in particular relevant for D3 branes, which are indeed singlets under SL(2, Z). By wrapping a brane on H 0 (RP 5 ; Z) = Z, we obtain domain walls that change the rank of the theory by one (for instance interpolating from so(2N) to so(2N + 2)). As this changes the local dynamics of the boundary theory, we will not consider these walls any further. More relevant to our analysis are branes wrapped on H 1 (RP 5 ; Z) = Z 2 and H 3 (RP 5 ; Z) = Z 2 , which lead to dynamical three-surfaces and dynamical strings on M 5 , respectively. When these objects are pushed to the boundary, depending on the choice of boundary conditions [15,18] they either become trivial or give rise to symmetry operators 4 for 0-form symmetries or 2-form symmetries, respectively. 5 We will see below that these two kinds of D3 branes do not commute, so we cannot choose both symmetries to be realized simultaneously [19]: we either have 0form symmetries on the boundary, or we have 2-form symmetries. In the simplest cases the choice comes from the fact that for a given set of local dynamics, we have the choice of whether to gauge the 0-form symmetry or not. When we do gauge it, we obtain a "magnetic", or "quantum", 2-form symmetry, which when gauged gives back the original 0-form symmetry. The general situation is complicated by the presence of mixed 't Hooft anomalies between the 0-form and the 1-form symmetries for some choices of global form. Gauging the 1-form symmetries leads to the 0-form symmetries becoming non-invertible [20,21]. A detailed field theory analysis of the non-invertible symmetries for the cases discussed in this paper has been presented in [22] and has been given a holographic interpretation in [23] (see also [29,30] for related work in other cases).
The other set of branes that play a role in this paper are D1/F1 branes, and D5/NS5 branes. The −1 ∈ SL(2, Z) monodromy acts non-trivially on these branes, so their possible wrappings in the internal space are classified by homology groups with 4 To heuristically explain how the insertion of a brane-with its non-trivial local degrees of freedomcan give rise to a topological defect in the dual CFT, note that as we push the brane towards the boundary we push the corresponding operator insertion farther into the UV. This suppresses any non-topological (dimension larger than 0) piece of the insertion, yielding a topological defect. By contrast, a brane ending on the boundary creates a scale-invariant/-covariant defect that is typically not topological. 5 In the 0-form symmetry sector there are additional symmetries of a geometric origin-such as the R-symmetry group-which we do not consider here.
local coefficients [24], which in this case are [12] Below we write pt for any point in RP 5 when we wish to view it as a representative of H 0 (RP 5 ; Z) = Z 2 , and we choose any RP 2 ⊂ RP 5 and RP 4 ⊂ RP 5 as generators of H 2 (RP 5 ; Z) and H 4 (RP 5 ; Z).
We have various possibilities: the D1s and F1s on pt give rise to 2-surface excitations on M 5 , which when pushed to the boundary can (again depending on the choice of boundary conditions) give rise to 1-form symmetry generators in the field theory.
We can also wrap 5-branes on RP 2 . These give rise to codimension one objects in M 5 , which lead to domain walls interpolating between so(2N) and so(2N + 1) (for the D5) or between so(2N) or so(2N + 1) and usp(2N) (for the NS5) [12]. We will not consider these cases further. Finally, we can wrap 5-branes on RP 4 . Depending on the choice of boundary conditions, these can lead to symmetry generators for 1-form symmetries when pushed to the boundary.

Commutation relations from topology
Our goal is to compute the commutation relations of the various bulk branes in a way that readily generalizes to N = 3 S-folds. We will first compute the commutation relations in a simplified model, and then generalize the result to the settings of interest.
Let us ignore for a moment the Chern-Simons terms in IIB supergravity, and consider the generalized Maxwell theory in d = 10 for the RR field C 2 In this expression dC 2 represents the curvature of an elementF 3 ∈H 3 Z (M 5 ×RP 5 ). The Z subindex indicates that we are not dealing with ordinary cohomology, but rather cohomology with local coefficients, or "twisted" cohomology. 6 This is due to the intrinsic effect of the orientifold action (−1) F L Ω = −1 ∈ SL(2, Z) onF 3 [12].
D5/D1 commutation relations before orientifolding. We proceed as in [7,25,26] (the following is mostly a review of the results in those papers, we refer the reader to them for more in-depth explanations). We will consider the untwisted classical theory 6 See §3.H in [24] for the relevant mathematical background on cohomology with local coefficients, and [6] for how to construct differential cohomology for generalized cohomology theories. The cohomology with local coefficients that we are using here is a particularly simple generalization, since via the F-theory/M-theory duality map (or mathematically, via the Leray-Serre spectral sequence) it can be understood as the ordinary differential cohomology of a simple elliptic fibration over RP 5 × M 5 .
first. This is because the classical twisted Maxwell theory in our case is rather vacuous: due to the orientifold projection the C 2 field is projected out to torsional data, so the classical field theory -which is formulated in terms of continuous differential formsis trivial. On the other hand, the classical untwisted theory is interesting, and it helps understand the expressions that arise in the twisted quantum theory. In the classical untwisted generalized Maxwell theory we can measure the electric charge by integrating the electric field strength * F 3 over 7-cycles Σ 7 on M 4 × RP 5 : 7 (2.5) Since d * F 3 = 0, we can equivalently formulate this as where ς 2 is a representative of the Poincaré dual (on M 4 × RP 5 ) to Σ 7 . The (still untwisted) quantum theory involves a number of modifications. First, already semi-classically we need to make a precise choice of gauge group, since the basic object is the connection. We will make the standard choice that we are in a U(1) theory, so that C 2 is a connection on an integrally quantized U(1) 2-bundle. This quantization is automatically encoded in the formalism if we think in terms of a differential cohomology classF 3 .
We also wish to promote the classical observables to operators acting on states. We can parametrize our state in terms ofF 3 , and we write Ψ(F 3 ). Because the charges are integrally quantized in the quantum theory, it is more natural to consider the exponentiated charge operator: where α ∈ T := R/Z. Another standard modification introduced by the quantum theory is that, since * F 3 is canonically conjugate to C 2 , canonical quantization implies that U α (ς 2 ) acts by a shift of the wavefunction by ας 2 : 8) 7 We note that to compute the commutation relations we are using canonical quantization, which relies on foliating spacetime with Cauchy surfaces. In our Euclidean setting we may take our foliation to be along the radial direction of M 5 near the asymptotic boundary. Labeling the field theory spacetime as M 4 , this means we are performing our foliation in the asymptotic neighborhood M 4 × [0, 1] × RP 5 . The operators whose commutations we are computing are then taken to live in a single leaf M 4 × RP 5 .
where we have used the inclusion map i : H d−1 (M 4 × RP 5 ; T) →H d (M 4 × RP 5 ) of flat connections into differential cohomology.
In fact, as observed in [7,26], in the quantum theory one needs to generalize this class of operators slightly to account for torsional effects. The generalization is very natural: ς 2 ∈ H 2 (M 4 × RP 5 ; Z), and α ∈ T, so ας 2 is an element of H 2 (M 4 × RP 5 ; T). But crucially, not every element of H 2 (M 4 × RP 5 ; T) is of this form. Rather, we have a short exact sequence 8 where β is the Bockstein map. In the presence of torsion we can therefore extend the set of charge operators to U(σ 2 ), with σ 2 any flat connection, or equivalently an arbitrary element of H 2 (M 4 × RP 5 ; T). These operators act, by definition, as and are interpreted as the operators measuring both integral and torsional electric charges.
We are now ready to compute the desired commutation relations. Consider an operator measuring the holonomy of the RR 2-form C 2 on Ξ 2 × pt ⊂ M 4 × RP 5 . We have (2.12) The phase Ξ 2 ×pt i(σ 2 ) is purely topological information descending from the cycles the branes are wrapped on called the linking pairing. In the next section we explicitly compute the linking pairing for the S-folds, allowing us to immediately determine the commutation relations between branes from generalized Maxwell theory. We will see in §2.5 how to treat the commutation relations of branes linked via Chern-Simons terms (such as D1 and F1). Before we do that, let us show how to compute string/5-brane commutation relations in the k = 2 S-fold. 8 This follows from the universal coefficient theorem for cohomology (theorem 2.33 in [27]) with R = T using that Tor D5/D1 commutation relations after orientifolding. We want to detect any noncommutativity of the D1 wrapping a two-surface Σ 2 × pt ⊂ M 4 × RP 5 , and a D5 wrapping Ξ 2 × RP 4 ⊂ M 4 × RP 5 . More accurately, what we are computing are the commutation relations of operators acting on the boundary conditions in the holographic setup. The non-commutativity comes from couplings of the branes to the RR fields in the Wess-Zumino terms in the action. We note that we are interpreting the asymptotic D1 and D5 as the symmetry operators themselves (associated to the integrals ofF 3 ∼ dC 2 and * F 3 ∼ * dC 2 respectively) [23,29,30]. Choosing C 2 as our basic variable, as above, and still modeling IIB by generalized Maxwell (we will refine this momentarily), our previous discussion implies that , using that this element is torsional, and the surjective Bockstein β in (2.9). (We abuse notation slightly and also denote by β the Bockstein β : The same arguments apply to the F1/NS5 commutations relations: a F1 wrapping Ξ 2 × pt and a NS5 wrapping Σ 2 × RP 4 do not commute:

The branes of general k and the linking pairing
The classification of the symmetry operators for general k goes along the same lines as above, but now the relevant twisted (co)homology groups are slightly more involved. For a given k, the cohomology groups classifying fields which transform as a doublet 9 of SL(2, Z) are H * (S 5 /Z k ; (Z ⊕ Z) ρ k ). For instance, the different possibilities for introducing 3-form flux are classified by H 3 (S 5 /Z k ; (Z ⊕ Z) ρ k ). This group was computed [15], using methods that we now review, and which also allow us to compute all the other (co)homology groups we need for our analysis (as also done recently in [30]). In general, H * (S 5 /Z k ; A) with A a Z k -module can be computed as the homology of the chain complex [15] . . , 5}, and t the action of Z k on A. In the twisted case we have A = (Z ⊕ Z) ρ k (this is simply Z ⊕ Z seen as a Z k module, with ρ k the Z k action) and t = ρ k . In the untwisted case A = Z and t = 1. The differentials alternate between 1 + t + t 2 + . . . + t k−1 and 1 − t, so the composition of two consecutive differentials is The twisted homology groups follow from here by Poincaré duality: These groups determine where we can wrap 1-branes and 5-branes. (Due to the nontrivial monodromy it is not well defined to talk about specific (p, q) charges any more, such as F1s and D1s separately.) For completeness, we also list here the cohomology groups in the untwisted case. They can be computed from the formula above taking A = Z and t = 1, so that 1 + t + . . . + t k−1 = k and 1 − t = 0. We find The case with no internal fluxes extends the case of so(2n) N = 4 theories, where the mixed anomaly (see §2.8) plays an important role. A similar type of anomaly exists in the k > 2 (N = 3) cases. To see this, we need to discuss the pairing between elements in H * (S 5 /Z k ; (Z ⊕ Z) ρ k ). One convenient way of computing these is by going to the M-theory dual, as in [30,31], where we have ordinary homology groups with global coefficients, at the cost of introducing an additional torus fiber.
Consider first the simpler case of the linking pairing on where the Z k action on S 1 = R/Z is by shifts by 1/k. Topologically S 1 /Z k = S 1 , but we use this notation to remind ourselves of the non-trivial SL(2, Z) holonomy acting on the Z ⊕ Z coefficients. Physically, due to F/M-theory duality, we expect this group to be related to the homology groups of the mapping torus Here z is a complex coordinate for the T 2 , and ω k = exp(2πi/k). This gluing is only possible for k = {1, 2, 3, 4, 6}. For k > 2 the complex structure is restricted: the gluing can only be done consistently for τ = exp(2πi/k).
Mathematically, the connection goes via the Leray-Serre spectral sequence: 10 for any fibration F → X → B this is a spectral sequence with second page abutting to H p+q (X). Note that the coefficient system in (2.23) is a local one. In our case B = S 1 /Z k and F = T 2 , and the only non-vanishing entries in the second page are Here we use that the holonomy acts trivially on H 0 (T 2 ; Z) = Z and H 2 (T 2 ; Z) = Z, and acts via ρ k on H 1 (T 2 ; Z) = Z ⊕ Z, so that a discussion similar to the one around (2.17) applies. All differentials vanish for degree reasons, so the spectral sequence converges to The only possibly non-trivial extension comes from the filtration of 10 See [32] for a nice introduction to spectral sequences. with From here we conclude that H 1 (M k ; Z) = Z ⊕ C k , since Ext(Z, −) = 0, so gathering results we have (as in [30,31]) One can interpret this result directly from the geometry. Recall that M k is a T 2 fibration over a circle, so H 0 (M k ; Z) = H 3 (M k ; Z) = Z follows from connectedness and Poincaré duality. H 2 (M k ; Z) = Z is generated by the class of the T 2 fiber, and the Z factor in H 1 (M k ; Z) is its Poincaré dual, given by the z = 0 section of the fibration. Our interest is in the remaining C k factor, which comes from fibering a one-cycle in T 2 over the base. Due to the non-trivial monodromy for k > 1 this cycle becomes torsional. Consider for instance the k = 4 case (which requires τ = i). As our generator, we choose a point * on the base and the A cycle on the T 2 over it (we take the standard choice of A and B generators on the T 2 , given by the horizontal and vertical cycles).
Consider the chain C 1 obtained by dragging this 1-cycle on the fiber once around the base. Due to the monodromy ρ 4 , after going around the base A transforms to B, so Dragging the cycle twice around the base, the action of ρ 2 4 sends A to −A, so by the same reasoning 2[ * ×A] = 0. This shows that the homology generated by the A and B cycles on the fiber times a point in the base projects down to Z 2 . More generally the boundary of a chain that goes once around the base identifies any cycle γ on T 2 with ρ k γ, so the part of H 1 (T 2 ; Z) that gives non-trivial contributions to We are interested in the linking pairing where again T := R/Z (thought of as an abelian group with addition). Recall that this torsional pairing is defined as follows. Given two torsional cycles a, b ∈ Tor H 1 (M k ; Z) there is some n ∈ Z such that na = 0 in homology. This implies that there is a 2chain C such that ∂C = na. We define L(a, b) = C · b/n mod 1. (The result of this computation does not depend on the possible choices one can make.) In the case at hand, choose a to be a generator of Tor H 1 (M k ; Z) = C k given a 1-cycle on T 2 times a point * in the base S 1 . Consider for instance the case k = 4. Then we know that we can choose a = * × A, n = 2, and C is the total space that arises by dragging the A cycle over the base twice. The relevant intersections of a and C are at the point * on the base, once with the cycle A itself and once (after going around the base S 1 ) with B. Using A · A = 0, ρ 4 A = B and A · B = 1, we find The k = 2 case works similarly, to give in agreement with the result in [31]. Finally, when k = 6 the linking pairing is trivial, since C 6 = Z 1 .
We now extend this discussion to S 5 /Z k . This is in fact fairly straightforward: if we represent S 5 as a circle fibration over CP 2 , the Z k action acts purely on the fiber as a 1/k shift, precisely as above. 11 The uplift of the non-trivial SL(2, Z) bundle to M-theory is therefore a fibration of M k over CP 2 .
The origin of the twisted homology groups (2.20) in this picture is then clear: the generators of H even (S 5 /Z k ; (Z⊕Z) ρ k ) = C k arise from the generators of H 1 (M k ; Z) = C k fibered over the generators of H * (CP 2 ; Z) = {Z, 0, Z, 0, Z}, and the linking pairing is the linking pairing on M k times the intersection product on the CP 2 base.

Commutation relations for N = 3 S-folds
With this information at hand we can work out the commutation relations between the generators of the higher form symmetries for S-folds, including the effective theory on M 5 . We initially assume that all internal fluxes vanish, so we do not need to concern 11 To see this, recall that we can construct CP 2 starting from C 3 in two steps: first we take the unit radius sphere i |z i | 2 = 1 over the origin, and then quotient by the U (1) action (z 1 , z 2 , z 3 ) → (e iα z 1 , e iα z 2 , e iα z 3 ). The U (1) quotient gives as a projection map p : S 5 → CP 2 , with fiber S 1 . Clearly the Z k action (z 1 , z 2 , z 3 ) → (ω k z 1 , ω k z 2 , ω k z 2 ) then acts on the S 1 fiber as a shift, leaving the CP 2 base invariant.
ourselves with some of the symmetry generators being projected out due to the Freed-Witten anomaly [33]. (We will address this point in §2.8 below.) The discussion of the N = 4 cases (that is, k = 2) is more involved than the N = 3 cases (k > 2), so we will postpone the analysis of the former to §2.5.
In this case we have symmetry generators arising from D3 branes wrapping generators Γ 1 of H 1 (S 5 /Z k ; Z) and Γ 3 of H 3 (S 5 /Z k ; Z), associated (depending on the choice of boundary conditions) with Z k 0-form and 2-form symmetries on the boundary theory. These symmetries were the ones described in [15]. The commutation relations of these operators on M 4 are straightforward to compute given the linking pairing for untwisted cohomology (the geometric linking pairing). We have, for k > 2 As in su, we can alternatively describe the Z k effective theory on M 5 describing these branes in terms of dynamical A 1 and A 3 fields with an effective action (2.34) We also have 1-form symmetries arising from wrapping 5-branes and 1-branes on cycles in the internal space. These branes transform non-trivially under SL(2, Z), so the different wrapping possibilities are those classified by (2.20). We can wrap 5-branes on The first possibility leads to generators of (−1)-form symmetries, which we will not discuss further in this paper. The second possibility leads to a generator of a 1-form C k symmetry. Similarly we can wrap 1-branes on H 0 (S 5 /Z k ; (Z⊕Z) ρ k ) = C k and H 2 (S 5 /Z k ; (Z⊕Z) ρ k ) = C k , leading to generators of 1-form and 3-form symmetries. We again focus on the 1-form symmetry part. The commutator between the 1-brane and the 5-brane symmetry generators, which we will denote as I and V respectively, is, for k > 2 We have, in other words, a C k gauge theory, which we can also represent as where B I and B V are U(1)-valued 2-form connections. We note explicitly that there are no string/string or 5-brane/5-brane commutation relations because there are not distinct (p, q) configurations, due to the nontrivial monodromy. Since there is only one string state and one 5-brane state they trivially must commute with themselves.

Commutation relations for N = 4 S-folds
This case is somewhat more complicated than the previous one, mainly because the components of the SL(2, Z) doublet stay distinct. In particular we will see that the commutation relations between F1/D1 and D5/NS5 are nontrivial to compute and essential to the analysis.
String/5-brane commutation relations Given the linking pairing 2.31 it is immediate to compute the D1/D5 and F1/NS5 commutation relations as (2.37) So far we have ignored the Chern-Simons terms in the IIB supergravity action. Given that one of the original examples of brane non-commutativity [2] relies on the existence of the Chern-Simons terms, this is a fairly large omission, which we now remedy. We will focus on the C 4 ∧ H 3 ∧ F 3 term in the IIB (pseudo) action, which is the one that plays a fundamental role both in [2] and in our analysis. This term affects our discussion above in that it add a term proportional to C 4 ∧ H 3 to the canonical momentum conjugate to C 2 . 12 This does not modify our conclusions above about the commutator of the D1 and the D5: if we choose and the integral in the exponential vanishes.
We next consider the F1/D1 commutator. This commutator was the crucial one in the su(N) case analysed in [2], where it was found that the F1 and D1 branes generically did not commute. In our case, due to the fact that theH 3 andF 3 fluxes live in twisted cohomology, the analogous commutator will turn out to vanish. To see why this is the case, we will first reformulate the analysis in [2] in terms of differential cohomology, and then discuss why the orientifold action forces the commutator to vanish. F1/D1 commutator in the su(N) theory. In the untwisted case studied in [2], due to the N units of F 5 flux in the internal space we have whereF 5 is the background RR 5-form field. This suggests looking to the generator ΠF 3 (η) ofF 3 displacements byη := i(θ(PD[Σ 2 × S 5 ] ⊗ 1/N)) (the map θ was defined in (2.9)), which does indeed induce the commutation relation (2.41). Due to the presence of theH 3 ⋆F 3 ⋆F 5 Chern-Simons term we have The second term vanishes in the absence of background F 7 flux, 13 and the first term is the WZ term in the F1 action, as in (2.39). The commutation relation found in [2] now follows immediately F1/D1 commutator in the orientifolded theory. The orientifold changes this analysis significantly. The main difference is that H 2 (M 4 × RP 5 ; Z) is purely torsional, so H 2 (M 4 × RP 5 ; Z) ⊗ T = 0, and thereforeη = 0. So inserting an F1 string on Σ 2 × pt does not lead to a shift ofF 3 for any value of N. Accordingly: We see that, crucially, there is a B 2 C 4 contribution which will be affected by the shift. The effect of the shift on this coupling is best understood in the context of differential cohomology by constructing a singular chain C 7 such that ∂C 7 = Ξ 2 × RP 4 +Ξ 2 × RP 4 , where Ξ 2 andΞ 2 are slightly displaced copies of the same cycle (and have, in particular, the same orientation), and then writing 14 (2.44) 13 Note that the flux being measured here is the non-torsional part ofF 7 , so it can consistently be set to 0 throughout.
14 Given than the integrand is valued in T multiplication by 1 2 ultimately leads to dependence on a choice of quadratic refinement, see the comments below.
Such a chain was constructed in section 4 of [12], and from the discussion there it follows that The last integral on the right is the number of mobile D3 branes on the orientifolded configuration, or in field theory terms the rank of the gauge group on the singularity. 15 We will denote this integral by n. The action ofH 3 From here, we conclude that We note that in writing this formula for odd n we have chosen a specific quadratic refinement of the holonomy term The other option would have been to choose −1/4 mod 1.) This choice is meaningful whenever n / ∈ 2Z. The actual choice does not affect the classification of global forms, but it appears to be related to the structure of SL(2, Z) duality orbits, see the discussion in §3. The fact that the definition of the Chern-Simons terms in string theory requires a choice of quadratic refinement is well known, see [36][37][38][39][40][41] for a sampling of detailed discussions, and we expect that the choice of sign in (2.48) should follow from there.
D3/D3 commutation relations. For completeness, let us mention the case of D3 branes wrapping RP 3 ⊂ RP 5 and RP 1 ⊂ RP 5 . They lead to line and 3-surface excitations on the theory on M 5 , and line and 3-surface operators acting on the boundary states. These branes are associated with 0-form and 2-form symmetries on the field theory. We can analyse this system via techniques very similar to the ones above, with the added simplification that we are now working in the untwisted sector. We find that 15 It is only in the so(2n) case that we have both NS5s and D5s as symmetry generators.

An effective action on AdS 5
We will now verify that the brane commutation relations that we have obtained agree with those that can be derived from the action given in [13]. We will discuss the so(2n) case first, and then discuss the modifications needed in the other cases. The action in the so(2n) case given in [13] is (the choice of sign is for convenience) (2.50) We normalize the U(1) B I fields to have period 1 (as opposed to the perhaps more standard convention in physics of period 2π), and I stands for the type of brane which couples electrically to B I . So, for instance, B D5 should arise from reduction of the C 6 RR field in supergravity. We can derive the brane (non-)commutation relations from here following [2]. We work in the path integral formulation (on a euclidean spacetime), instead of the Hamiltonian formulation on a constant time slice M 4 that we have been using so far. Assume that we have two operators U(Σ 2 ) and V (Ξ 2 ), defined as in section 2.5 (we assume that there are no torsional cycles on M 4 , so we have chosen to replace σ 2 by the Poincaré dual 2-cycle Σ 2 on M 4 ) such that on M 4 We interpret this as V having charge q under the abelian symmetry generated by U, or equivalently as V having charge −q under U (assuming that both operators are topological). The path integral version of this statement is with L G (Σ 2 , Ξ 2 ) the Gauss linking pairing on M 5 . This is the kind of relation that we aim to prove now, starting from the action (2.50).
The presence of a brane of type I wrapped on a 2-cycle C I = ∂D I leads to a factor exp 2πi in the path integral. The equations of motion that follow from (2.50) in the presence of brane insertions are where C F1 is the cycle in M 4 wrapped by the F1 (which we can assume to be trivial in M 5 [12]), and similarly in the other cases. It is convenient to rewrite (2.54) as (2.55) From here we can easily compute the charges of one type of operator under another. Consider for instance a D5 wrapping a curve C D5 that links L G (C D5 , C NS5 ) = D NS5 · C D5 times a curve C NS5 wrapped by an NS5 branes. Assuming that there are no other branes in the problem, using the equations of motion we have exp 2πi which indeed reproduces (2.47). The rest of the commutation relations give above can be derived similarly.

Review of discrete torsion and Freed-Witten anomaly for k = 2
As discussed in §2.1 we may wrap 3 and 5 branes on various cycles of the internal RP 5 , but in addition to the topological restrictions there are quantum restrictions governed by a type of Freed-Witten anomaly [33], which were worked out in [12]. In this section we review the consequences of this anomaly for the symmetry structure of the theory. We will discuss the k = 2 case explicitly, a very similar analysis holds for the k > 2 cases discussed in the next section. As argued in [12], and reviewed in §3, the algebras of the gauge theories correspond to the discrete torsion in the following ways. For this case, consider an F1 pushed to the boundary, which leads to an insertion of a topological 2-surface in the field theory. The F1 string can end on a D3 brane wrapped on RP 3 , so that the Freed-Witten anomaly on the D3 cancels by an explicit source term. This implies that in the field field theory the topological 2-surface can end on a 1-surface. Since the topological 2-surface can "open up", it cannot measure any conserved 1-form symmetries, as any line whose charge we would like to potentially measure can leak through the holes we can nucleate on the 2-surface.
Suppose instead that the F1 ends on the boundary, by which we mean that asymptotically it looks like R × γ, with R the asymptotic radial direction in M 5 ∼ R × M 4 and γ a 1-chain in M 4 . From the field theory perspective, this is a Wilson line insertion on γ. The F1 can still end on a D3 brane, which now implies that the Wilson line can end on a point operator. Therefore, there is no operator under which the Wilson line can carry charge. This has a simple origin in the bulk theory: due to the Freed-Witten anomaly the NS5 brane cannot wrap a RP 4 -cycle for this choice of torsional flux, and thus in this case there do not exist wrapped NS5 branes to be the symmetry operators under which the F1 string would be charged.
Finally we note that, while the boundary of the F1 along the wrapped D3 cancels the Freed-Witten anomaly on the D3, we cannot use this mechanism to cancel the Freed-Witten anomaly on a NS5. This follows from Poincaré duality: the insertion in the internal space must be along a Poincaré dual to the class induced by the flux, and on the NS5 on RP 4 this is not a point (which is what the F1 generator wraps in the internal RP 5 ), but a line.

Fluxes and Freed-Witten anomalies
The analysis in the previous section can be generalised to the general N ≥ 3 Sfold case as follows. The background 3-form fluxes are given by an element F ∈ H 3 (S 5 /Z k ; (Z ⊕ Z) ρ k ). We note that this element is in all cases torsional, and admits a flat differential cohomology upliftF . Let us assume that we now have a 5-brane wrapping a representative Σ of a class in the twisted homology H 4 (S 5 /Z k ; (Z ⊕ Z) ρ k ). We represent this class by its dual cohomology class σ ∈ H 1 (S 5 /Z k ; (Z ⊕ Z) ρ k ), which can again be uplifted to a flat differential cohomology classσ. A necessary condition for the Freed-Witten anomaly to vanish is that L(F ,σ ⋆λ) = 0 mod 1 (2.58) for all λ ∈ H 2 (S 5 /Z k ; Z) = Z k . The intuitive idea behind this condition is that by probing by all λ we can in favourable circumstances detect whether the restriction of F to Σ is trivial or not. If the restriction is trivial, the linking pairing above will necessarily always vanish, and therefore if we detect any non-trivial linking pairing we will have a Freed-Witten anomaly. (The geometries wrapped by our branes are simple enough that (2.58) is in fact sufficient for detecting absence of anomalies.) We note that in general it is possible to have a term on the right hand side of (2.58) which does not depend onF , and only depends on the structure of the cycle wrapped by the brane. For instance, it was shown in [33] that in the case of a trivial SL(2, Z) bundle over a D-brane wrapping a cycle M the right hand side is β(w 2 (T M)), with β the Bockstein associated to the short exact sequence 0 → Z → Z → Z 2 → 0. The orientifolded case was considered in [12] (see also [41]) where it was conjectured that the right topological term on the right hand side wasβ(w 2 (T M)), withβ now associated to the local version of the short sequence above, namely 0 → Z → Z → Z 2 → 0, and we use the fact that Z 2 = Z 2 , so we can promote w 2 (T M) to a class in H 2 (M; Z 2 ).
The case of interest to us is M = RP 4 , and w 2 (T RP 4 ) = 0, so (2.58) does not need to be modified, at least in the k = 2 case. (Assuming that the conjecture in [12] is correct.) This is also needed in order for the holographic results to match the field theory results.
We can phrase the previous results for k = 2 in a SL(2, Z)-covariant way. Consider the short exact sequence of local coefficients 0 → Z ⊕ Z → Z ⊕ Z → C k → 0, with associated Bockstein β k . In the k = 2 case we can embed w 2 (T M) into H 2 (M; C 2 ) = H 2 (M; Z 2 ) ⊕ H 2 (M; Z 2 ) simply by taking two copies. Denote the corresponding element of H 2 (M; C 2 ) by w 2 . (Recall that in the case of interest to us we have w 2 = 0.) It is then not hard to see that we reproduce the Freed-Witten anomalies found in [12] for the k = 2 case if we replace (2.58) by L(F −β k (w 2 ),σ ⋆λ) = 0 mod 1 . (2.59) It is much less clear to us what to do in the k > 2 case, so in the rest of the analysis we will assume that, as in the k ≤ 2 cases, the naïve condition (2.58) onF is the correct one for all k, and no additional geometric contribution appears for the branes we study. 16 We will momentarily give evidence in support of this assumption in the k = 3 case by showing that it leads to results consistent with [16].
Under this assumption, we can work out easily the k > 2 cases. Consider for instance the k = 3 case. Here we have a flux F ∈ H 3 (S 5 /Z k ; (Z ⊕ Z) ρ 3 ) = Z 3 and 5branes wrapping representatives Σ of H 4 (S 5 /Z k ; (Z ⊕ Z) ρ 3 ) = Z 3 . The condition (2.58) then projects out the 5-brane generating the 1-form symmetry if and only if there is a non-trivial 3-form flux in the internal space.
These results support the claims in [16]. Two of the N = 1 theories constructed in that paper were argued to flow to SCFTs in the same N = 1 conformal manifolds as certain N = 3 theories: a k = 3 N = 3 theory of rank one with non-trivial internal flux (corresponding to the G (1, 1, 3) complex reflection group, in the notation of [15]), and a k = 3 N = 3 theory of rank three with no internal flux (corresponding to G (3, 3, 3)). According to our analysis 17 we expect the first theory to have trivial 1-form symmetry group, and the second to admit a global form having a Z 3 1-form symmetry group. The N = 1 theories in proposed in [16] do indeed exhibit these 1-form symmetry structure. 18 Finally, let us comment briefly on the 0-form symmetries of the models. This was in fact already done in [15], so we just quote their results (which were obtained by a similar reasoning to the one above): in the absence of flux the N = 3 theory associated to the Z k quotient of S 5 has a Z k 2-form symmetry, generated by D3 branes wrapping the Z k generators of H 3 (S 5 /Z k ; Z), for appropriate boundary conditions. Different choices of boundary conditions lead to 0-form symmetries, and the D3 branes just described end on the boundary, giving the point operators charged under the 0-form symmetry. Non-trivial fluxes make these brane wrappings suffer from a Freed-Witten anomaly, and the boundary SCFTs do not have the 0-form symmetry any longer. 16 We should be able to prove or refute this conjecture by lifting the 5-branes to M-theory M5 branes, and analysing the analogous correction there. The form of the correction in M-theory was conjectured in [42] (see also [38,[43][44][45]). The relevant computation seems to be rather involved, and we will not attempt it here. 17 We are assuming that our analysis remains valid for arbitrarily small rank. We expect this to be the case: while we have focused on the holographic description in order to stay close to the literature on the N = 4 case, the analysis of the "SymTFT reduction" along the lines of [8,30,46] proceeds along nearly identical lines, and applies to the arbitrary rank case. 18 One might hope to also compare the 0-form symmetry sector, and more generally the full noninvertible symmetry sector we describe below, but unfortunately the theories in [16] are not expected to flow to N = 3 SCFTs, only to N = 1 SCFTs in the same conformal manifold as the N = 3 SCFTs. The marginal operators that interpolate between both fixed points are expected to break the relevant discrete 0-form symmetries. We thank Gabi Zafrir for explaining this last point to us.

't Hooft anomalies and non-invertible symmetries
The action given in (2.50) does not include a term involving the outer automorphism 0-form symmetry of the Spin(2N) theory. To account for this we add two U(1) fields A 1 and A 3 with a coupling (2.60) This theory can also be described as a Z 2 gauge theory with action where the A 1 , A 3 fields are Z 2 := Z/2Z fields related to the continuous fields by A i := 2A i (reducing coefficients appropriately from R/2Z to Z 2 ). The operators in this theory behave precisely as the D3 branes wrapped on RP 1 and RP 3 described above. More generally, for k > 2 we have [15] S k A = 2πik 62) or in terms of finite fields This is nevertheless not the full answer: as discussed in [47] (see also [48]), the interplay of the outer automorphism 0-form symmetry with the 1-form symmetry sector is subtle. For instance, in the SO(2n) theory there is a mixed 't Hooft anomaly involving 0-form and 1-form symmetries, which leads to 2-group symmetries in the Spin(2n) case upon gauging the magnetic 1-form symmetry [49]. Other choices of gauging lead to noninvertibles symmetries, see [22]. In this section we would like to reproduce some of these results from the holographic perspective, and extend them to the N = 3 case, where we also find non-invertible symmetries. 19 Our analysis is incomplete in two important respects: first, we will restrict ourselves to the case of n = 2k ∈ 2Z, with vanishing discrete θ angle. And we will focus on deriving the anomaly of the SO(4k) theory. Since other global forms are obtained by gauging, we expect that the bulk dynamics is the same in all cases, but it is still important to understand the structure of the field theory symmetries directly from the holographic dual for all global forms. The noninvertible symmetries for the theories at hand were understood in [23] (see also [29,30] for closely related results), and below we generalise this analysis to the N = 3 case. To our knowledge the case of 2-group symmetries has not yet been fully understood in holographic terms, but see [89][90][91][92][93][94][95] for progress on understanding 2-groups in various string constructions.
In general, extending slightly the discussion in [8], given a (possibly twisted) differential cohomology cochainF on M 5 × RP 5 , up to topologically trivial terms we can express its leading contribution to the effective theory on M 5 in terms of torsional differential cohomology classes on RP 5 times differential cochains on M 5 . We havȇ in the twisted sector, witht NSNS i ,t RR i flat differential cohomology uplifts of the generators of H i (RP 5 ; ( Z ⊕ Z) ρ 2 ), and F 5 =Ȃ 1 ⋆ȗ 4 +Ȃ 3 ⋆ȗ 2 + . . . (2.65) in the untwisted sector (ȗ 4 is a flat uplift of the generator of H i (RP 5 ; Z)). We have omitted some terms inF 5 proportional to n that do not enter in the computation of the anomaly. The IIB pseudo-action on M 5 × RP 5 includes a term of the form (which we can derive using similar arguments to the ones given above, see the general derivation below) we obtain the effective coupling Here we have used that this integral is a primary invariant to express it in terms of more conventional cochain integrals. If we choose Dirichlet boundary conditions for A 1 , B F1 and B D1 , which corresponds to the SO(2n) choice of global form, this is precisely the anomaly theory described in [47].
The coupling (2.66) can be written more covariantly as where the factor of −1/2 encodes the fact that we are dealing with a quadratic refinement, as we will explain momentarily. The overall choice of sign is conventional, we have chosen the sign that agrees with existing conventions in M-theory, where the dual coupling arises from expanding − 1 6 G 3 4 , withG 4 =F 4 +F 4 . HereF 4 andF 4 are the M-theory duals of F 5 andF respectively. The subtleties in dealing with this fractional prefactor have been extensively discussed in the M-theory setting, starting with [36,37].
For k > 2, switching on a background for the 1-form symmetry corresponds to takingF witht 1 a flat uplift of the single generator of H 1 (S 5 /Z k ; (Z ⊕ Z) ρ k ) = C k . Expanding F 5 as in (2.65), and integrating, we find an effective coupling and the anomaly theory (2.68) for k = 2. (With a caveat to be discussed below.) We note that the sign of q k can be absorbed in a redefinition of A 1 , or in the F-theory formulation in a sign redefinition ofC 3 . To compute q k , consider the F-theory description of the system, where we have Here X 7 k is an elliptically fibered 7-fold over S 5 /Z k encoding the data of the SL(2, Z) fibration over S 5 /Z k . We have abused notation slightly and also called u 4 the pullback to H 4 (X 7 k ; Z) of the generator of H 4 (S 5 /Z k ; Z), which in turn is the pullback of the generator of H 4 (P 2 ; Z). (This last statement follows easily from the Gysin exact sequence.) The class t 2 ∈ H 2 (X 7 k ; Z) should be understood as the uplift to M-theory of t 1 ∈ H 1 (S 5 /Z k ; (Z ⊕ Z) ρ k ). Mathematically, what we mean by "uplift" is that the given element of H 1 (S 5 /Z k ; (Z ⊕ Z) ρ k ) survives to a non-trivial element of H 2 (X 7 k ; Z) in the Leray-Serre spectral sequence (keeping in mind H 1 (T 2 ; Z) = (Z ⊕ Z) ρ k as a local coefficient system).
A useful alternative viewpoint on X 7 k is that it is a fibration of M k (defined in §2.3 above) over P 2 . The class u 4 is still a pullback of the fundamental class of P 2 to the total space of the fibration, while t 2 arises from the generator of H 2 (M k ; Z) = C k in the Leray-Serre spectral sequence. By a push-pull argument, this implies that q k reduces to a quadratic refinement of the Chern-Simons coupling on M k , which we can write (again abusing notation slightly, by denoting t 2 the generator of H 2 (M k ; Z) andt 2 a flat uplift to differential cohomology) This kind of quadratic refinement, in a situation very analogous to ours, was computed in [8]. The idea is to construct a (Calabi-Yau) manifold K 4 k such that ∂K 4 k = M k , and then translate the computation of the quadratic refinement of the Chern-Simons term to a problem in intersection theory on K 4 k . We refer the reader to [8] for details. In our case there is a natural choice of K 4 k : consider an elliptic fibration over C with a Kodaira singularity at z = 0 of type IV * (leading to an E 6 gauge theory, if this was an M-theory background). We take K 4 3 to be the total space of the fibration over a disk D = {|z| ≤ 1}. Recalling that the monodromy around the singularity is precisely ρ 3 , we have ∂K 4 3 = M k . Similarly, K 4 4 comes from an E 7 singularity, K 4 6 from an E 8 singularity, and K 4 2 from a D 4 singularity. Repeating the computation of [8] for these geometries leads to the results for q k stated above. (The local form of the geometry close to the singular locus is of the form C 2 /Γ, with Γ ⊂ SU(2), which are some of the cases studied in that paper, so the details are essentially identical.) The k = 2 case requires some additional comments. In this case we have H 2 (M k ; (Z⊕ Z) ρ k ) = Z 2 ⊕ Z 2 . We denote the two generators t NSNS 2 and t RR 2 . From the arguments above one obtains These couplings in fact vanish under the assumption that M 5 is Spin and has no torsion. First, note that since M 5 has no torsion, B F1 is necessarily the mod 2 reduction of a class in H 2 (M 5 ; Z). This implies, in particular, that Sq 1 (B F1 ) = ρ 2 (β(B F1 )) = 0, where ρ 2 indicates reduction modulo 2 and β is the Bockstein homomorphism associated to 0 → Z → Z → Z 2 → 0. We therefore have (viewing all classes as living in singular cohomology with Z 2 coefficients) with ν 2 the second Wu class of M 5 , which vanishes since M 5 is a Spin manifold by assumption. It would be interesting to understand what is the fate of these couplings when we relax our assumptions on M 5 .

Non-invertible symmetries
The existence of the cubic anomalies (2.68) and (2.71) implies the existence of noninvertible symmetries upon gauging the 1-form symmetries appearing in the anomaly, as argued in [21] and further studied in [22]. In this case the generator of the 0-form symmetry in the SO(4k) theory is not invariant under gauge transformations in the 1-form symmetry sector, so the operator does not survive in the theory where the full Z 2 × Z 2 1-form symmetry of the SO(4k) theory has been gauged (which by a suitable choice of conventions we can call the Sc(4k) theory). The fundamental observation of [21,22] is that we can still construct a gauge invariant operator by stacking U(Σ 3 ) with an Z 2 gauge theory coupling to the 1-form background in a suitably anomalous way: Here γ 1 and φ 1 are dynamical (topological) fields living on the defect, which should be integrated over. The operator N (Σ 3 ) is now invariant under gauge transformations of the 1-form symmetry backgrounds B D1 and B F1 , and survives in the Sc(4k) theory. The price to pay is that N (Σ) −1 does no longer exist (we say that N (Σ 3 ) is non-invertible), and in particular N (Σ 3 ) × N (Σ 3 ) † is not the identity but rather a condensation defect [56] (see also [54,96,97]). The analysis in [21] extends straightforwardly to the N = 3 S-folds that we studied above: due to the cubic anomaly (2.71) the 0-form symmetry generator will not survive in the theory where we gauge the 1-form symmetry, but if a suitably anomalous dressing exists then this might lead to a non-invertible symmetry generator.
Interestingly, a number of recent works [23,29,30] have argued that the anomalous BF theory in (2.80) arises from reducing the Chern-Simons action on the symmetry generating D-branes along torsional cycles in the internal space. It is natural to guess that this is also the case for the cases studied here. Luckily, the relevant analysis has already been done in [23] for the k = 2 case and in [30] for the k > 2 case. (The theories studied in [30] were non-Higgsable clusters in d = 6 and not N = 3 S-folds, but the relevant computation is identical in both cases.) In all cases one can see that the resulting theory is anomalous in precisely the right way to lead to a gauge-invariant defect in the gauged theory. For instance, it follows from the discussion in [30] that in the k > 2 cases, after reduction on the torsional cycle in the internal space, there is an effective Chern-Simons theory on the dynamical symmetry generator with action 20 with c a dynamical cocycle valued on C k , and A 3 , B 2 background fields as above. (The difference in the normalisation of the A 3 dependent term with respect to [30] is due to the difference in the setups we are considering.) The anomalous variation of this action under gauge transformations for B 2 precisely cancels the anomalous variation due to (2.71).

Freed-Witten anomalies as a Stückelberg mechanism
Finally, let us briefly comment on the effective action in the case with 3-form flux in the internal space, namely, with θ RR or θ NS different from 0. We emphasise that the discussion in this section is not needed for the rest of the paper, but it provides a nice alternative viewpoint on the operator-centered viewpoint that we have adopted in most of the paper. (2.83) In continuous notation, this modifies the combined action (2.50) and (2.60) to The presence of the Stückelberg terms gives a nice effective field theory reinterpretation of the fact, pointed out above, that some of the symmetry operators are absent in the presence of background 3-form fluxes.
3 The N = 4 theories from the k = 2 S-fold Specializing to k = 2, we now compare the results of the above analysis with existing results on so and usp N = 4 gauge theories [1,2,12,13,23], yielding an important cross check of our methods.
To do so, we start with the dictionary between branes and line operators established in [2,12,13]. Applying this dictionary to the bulk-commutation relations derived in §2.5, we reproduce the field-theory mutual locality relations of [1], thereby demonstrating that the allowed global structures of N = 4 S-folds perfectly agrees with the known global structures of N = 4 theories with so and usp gauge algebras. We also discuss how the 1-form symmetries can be understood using the bulk effective action considered in §2.6, §2.9. As a final check, we conclude by showing that the SL(2, Z) orbits of the bulk theory agree with the field theory orbits described in [1].
Let us fix the action of S and T generators of SL(2, Z) in string theory to be where the bar over a brane denotes an antibrane, and the sum of two branes is interpreted as a bound state.

The line operator dictionary
The (non-topological) Wilson and 't Hooft lines of N = 4 gauge theories are described holographically as the boundaries of dynamical strings in the AdS 5 dual. The latter can arise either from ten-dimensional strings or from ten-dimensional five-branes wrapped on (torsion) four cycles. The dictionary between the two was first worked out for su theories (i.e., for k = 1) in [2,12]. Here we focus on the k = 2 dictionary for so and usp theories obtained in [2,12,13] and summarized in table 1. Let us describe briefly how this dictionary is worked out. Since an F1 string ending on the M 4 boundary is dual to a Wilson line in the vector representation of the gauge group, applying S-duality simultaneously to the bulk and boundary theories implies that a D1 string ending on M 4 is dual to an 't Hooft line in the vector representation of the dual gauge group. Meanwhile, it was argued in [12] that the boundary of a D5 brane wrapping a RP 4 cycle in RP 5 and ending on M 4 is dual to a Wilson line in the spinor representation of the gauge group. (As reviewed in §2.7 this is only possible when the gauge algebra is so(n), i.e. when θ NS = 0.) Thus, by S-duality the boundary of an NS5 brane wrapping a RP 4 cycle in RP 5 and ending on M 4 is dual to an 't Hooft line in the spinor representation of the Langlands dual gauge group.
Turning on discrete torsion restricts which five-branes can wrap RP 4 , hence in the so(2n + 1) and usp(2n) theories, only one of the D5, NS5, and D5+NS5 branes will be present as a line operator in the dual theory. Likewise, depending on the torsion either the F1, the D1 or the F1+D1 can end on a wrapped D3 brane, hence the corresponding line operator is no longer charged under a 1-form symmetry.

Field theory mutual locality from bulk non-commutativity
We now use the dictionary above, together with the bulk brane commutation relations derived in §2.5, to reproduce the mutual locality relations obtained used field theory methods in [1]. Label an arbitrary bound state of n F1 F1 strings, n D1 D1 strings, etc., by [n F1 , n D1 , n D5 , n NS5 ] = (n F1 F1 + n D1 D1 + n D5 D5 + n NS5 NS5). (3.2) In §2.5, we obtained the following commutation relations in the k = 2 S-fold Since each commutation produces at most a phase, the same is true for an arbitrary bound state, for which we obtain The bulk theories are selected by a choice of boundary condition on the fields. Commutation relations of the fields constrain the possible boundary conditions [19], and consistent choices thereof are equivalent to mutually commuting sets of operators.
Deriving mutual locality conditions for the so(4j) case We now demonstrate how to derive the mutual locality conditions in field-theory from the bound-state commutators (3.4). We focus here on the so(4j) case with θ NS = 0 = θ RR . The so(4j + 2), usp(2n), and so(2n + 1) cases proceed analogously. In (3.5) Motivated by the dictionary in table 1, we define (z es , z ec ; z ms , z mc ) := (n F1 + n D5 , n F1 ; n D1 + n NS5 , n D1 ) , (3.6) In these new variables, the condition (3.5) becomes That is, the bulk-brane non-commutativity is equivalent to the mutual locality conditions of [1]. Note that the mutual locality conditions in (3.7) distinguishes so(8l) from so(8l+4). For instance, in the so(8l) case, we have j ∈ 2Z, and so the commuting condition reduces to z ec z ms − z es z ′ mc + z mc z ′ es − z ms z ′ ec ∈ 2Z. Extending this result to so(4k + 2), so(2n + 1), and usp(2n) theories is straightforward. The center of so(4k + 2) is Z 4 , corresponding to the fact that condensing two D5 "fat" strings leaves behind an F1 string as explained by [12], consistent with table 1. Analogously, condensing two NS5 fat strings leaves behind a D1 string. Thus we can write the commutativity relation in terms of the number of lines from D5 and NS5 branes, and we recover the Z 4 × Z 4 relation of [1].
In the case of so(2n + 1), the center is Z 2 and only lines from F1, D1, and D5 bulk branes are present with the F1 lines being endable. This simplifies the commutativity relation to the Z 2 × Z 2 relation of [1]. The usp results are analogous.

Interpreting the bulk effective action
For an alternate perspective, consider the effective action (2.84), generalizing [13]: When θ RR = 0 = θ NS and n ∈ 2Z we can perform a GL(4, Z) field redefinition to obtain This describes a Z 2 0-form bulk gauge theory and a Z 2 × Z 2 1-form bulk gauge theory, and these correspond to the global symmetries in the field theory side. Meanwhile, when θ RR = 0 = θ NS and n ∈ 2Z + 1 we can perform a GL(4, Z) field redefinition to obtain (3.10) This describes a Z 2 0-form bulk gauge theory and a Z 4 1-form bulk gauge theory. Finally, when θ RR = 1 2 and θ NS = 0 we, through a Stückelberg mechanism, integrate out A 1 to obtain This is a Z 2 1-form gauge theory. The other two choices of discrete torsion can be obtained from this one via SL(2, Z) transformations.

SL(2, Z) duality webs
In this section, we display the SL(2, Z) duality webs of all of the k = 2 theories. As in [1], the possible theories are classified by their line operator content, which we specify by listing generators for the lines of that theory. Meanwhile, through the dictionary in table 1, each theory is also classified by the boundary conditions for bulk strings / fat strings. These two different classifications are equivalent, and here we demonstrate that the classifications are consistent under the action of SL(2, Z). That is, the duality webs of SL(2, Z) on both the bulk description and the field theory description are equivalent.

so(4j)
As is evident in §3.2, and also discussed in [1], the mutual locality conditions for so(8j) and so(8j + 4) differ. However, there are some duality webs that are common to both cases. We display these below, followed by the remaining duality webs which differ between the so(8j) and so(8j + 4) cases.   These diagrams agree with figures 7 and 8 of [1].

so(4j + 2)
To map out the duality web in this case, note that-unlike in the so(4j) case-a pair of fat D5 strings leave behind an F1 string when they annihilate [12]. Thus, repeatedly applying T takes NS5 → NS5 + D5 → NS5 + 2D5 = NS5 + F1, etc. As noted in table 1, the relative sign of the D5 and NS5 brane charges under the maximal 1-form symmetry is not fixed by our analysis, so we keep it arbitrary in the figure below:  Figure 4: SL(2, Z) webs for so(4j + 2) theories.
Since the relative sign of the NS5 and D5 center charge affects the labels of (Spin(4j + 2)/Z 4 ) ±1 , by comparing with [1] we can deduce that the two have center charges of the same sign for so(8k + 6) and of opposite sign for so(8k + 2). This suggests that the choice of quadratic refinement is sensitive to the amount of 5-form flux supporting the geometry, but we have not attempted to derive this fact from string theory. Up to this subtlety, this diagram agrees with figure 6 of [1].

so(2n + 1) and usp(2n)
There are a few extra subtleties in this case, which is why we have saved it for last. Firstly, note that in our paper, S and T refer to the generators of the SL(2, Z) selfduality of type IIB string theory. As a consequence, our T generator differs slightly from the identically-named field theory operation defined in [1], which we denote T. We have ignored this distinction so far because T = T in most cases, but for usp(2n) theories T = T 2 , related to the fact that the O3 + is not T invariant [12]. 22 A second subtlety relates to the action of T = T 2 on the branes. As before, T 2 maps NS5 → NS5 + 2D5, so the result depends on the end product of the two D5 fat strings annihilating each other (but with the added subtlety that individual D5 fat strings cannot be isolated due to the B 2 torsion). By analogy with before we expect that either complete annihilation occurs or an F1 string is left behind, depending on whether n is even or odd, respectively. Assuming this to be true, we obtain the following duality webs:  Figure 5: SL(2, Z) webs for so(2n + 1) and usp(2n) theories with even n. 22 One also finds T = T 1/2 for so (3), but for simplicity we will ignore this low-n special case .  The agreement between these figures and figure 5 of [1] validates our guess about the end product of the annihilation of two D5 fat strings. It would interesting to derive this directly from string theory.

Conclusions
In this paper we have developed a holographic description of the symmetry operators of N = 3 and N = 4 4d SCFTs via S-folds. The N = 4 S-folds are dual to SYM theories with BCD gauge algebras, and in this setting our results for the symmetry operators, anomaly, global forms and SL(2, Z) orbits are consistent with previous literature. The N = 3 S-folds are dual to non-Lagrangian SCFTs, and our analysis provides novel data on their symmetries.
There is an aspect of our analysis that was not fully justified, that we would like to highlight: in the derivation of the Freed-Witten anomaly cancellation condition, we assumed that there was no non-perturbative contribution on the right hand side of (2.58) (akin to the W 3 term appearing in [33]). Although we gave some circumstantial evidence for the validity of our assumption, it would be interesting to verify if our assumption is valid by a direct analysis of the M5 brane anomaly [38,[42][43][44][45].
Even in the N = 4 case where the field theory dual is well understood, our analysis is not quite complete. In the theories dual to so(4N + 2) there are two inequivalent choices for the quadratic refinement. The choice which correctly reproduces the full SL(2, Z) orbits depends on N. In the field theory this difference is related to the fractional instanton number (see for instance [1,98,99] for the computation of fractional instanton numbers using field theory methods), so we expect that a careful treatment of the relevant quadratic refinement of the string theory action should reproduce this dependence on the fractional instanton number, as in the examples considered in [8,19].
The techniques developed in this paper should be extendable to N < 3 S-folds (see for instance [100,101] for pioneering work in this direction), and a geometric characterization of the symmetries of those theories would be interesting. An alternative direction for generalization is the class of N = 1 orientifold SCFTs studied in [102][103][104][105].
Another direction for further study would be to derive the fusion rules for symmetry generators in the non-invertible case directly using D-brane methods. (See [29] for a study of this problem in a different system.) The non-trivial duality bundle on the non-abelian theory on the stack of D3 branes -or alternatively, the poorly understood dynamics of the non-abelian (2, 0) theory in six dimensions -should make this computation fairly interesting.