Domain walls in 4dN\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathcal{N} $$\end{document} = 1 SYM

4dN\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathcal{N} $$\end{document} = 1 super Yang-Mills (SYM) with simply connected gauge group G has h gapped vacua arising from the spontaneously broken discrete R-symmetry, where h is the dual Coxeter number of G. Therefore, the theory admits stable domain walls interpolating between any two vacua, but it is a nonperturbative problem to determine the low energy theory on the domain wall. We put forward an explicit answer to this question for all the domain walls for G = SU(N), Sp(N), Spin(N) and G2, and for the minimal domain wall connecting neighboring vacua for arbitrary G. We propose that the domain wall theories support specific nontrivial topological quantum field theories (TQFTs), which include the Chern-Simons theory proposed long ago by Acharya-Vafa for SU(N). We provide nontrivial evidence for our proposals by exactly matching renormalization group invariant partition functions twisted by global symmetries of SYM computed in the ultraviolet with those computed in our proposed infrared TQFTs. A crucial element in this matching is constructing the Hilbert space of spin TQFTs, that is, theories that depend on the spin structure of spacetime and admit fermionic states — a subject we delve into in some detail.

1 Domain walls in 4d N = 1 SYM 4d N = 1 super Yang-Mills (SYM) -Yang-Mills theory with a massless adjoint fermionis believed to share with QCD nonperturbative phenomena such as confinement, existence of a mass gap, and chiral symmetry breaking. 4d N = 1 SYM with simple and simplyconnected gauge group G has h trivial vacua arising from the spontaneously broken Z 2h chiral R-symmetry down to Z 2 , where h is the dual Coxeter number of G (see table 1). The vacua are distinguished by the value of the gluino condensate [1][2][3] tr λλ = Λ 3 e 2πia/h , a = 0, 1, . . . , h − 1 . A supersymmetric domain wall that interpolates between two arbitrary vacua a and b at x 3 → ±∞ can be defined. The Z 2h symmetry implies that the domain wall theory depends only on the difference between vacua, on n ≡ a − b mod h. We denote the resulting 3d low energy theory on the wall by W n (see figure 1).
While the n-wall tension is fixed by the supersymmetry algebra [4], it is a nonperturbative problem to determine the low energy (i.e. E Λ) effective theory on the domain wall. A supersymmetric domain wall preserves 3d N = 1 supersymmetry and therefore a universal 3d N = 1 Goldstone multiplet describes the spontaneously broken translation and supersymmetry. The nontrivial dynamical question is whether anything else remains in the infrared, a topological quantum field theory (TQFT) or gapless modes and, if so, which one(s).
In this paper we put forward a detailed answer to this question for all the n-domain walls for G = SU(N ), Sp(N ), Spin(N ) and G 2 , and for n = 1 for arbitrary gauge group G. 1 The proposal for G = SU(N ) was put forward long ago by Acharya-Vafa [7] motivated by brane constructions. 2 We provide nontrivial new evidence for the SU(N ) proposal and for all the new proposals in this paper. The case G = Spin(N ) is particularly subtle and rich.

JHEP03(2021)259
Simons level k = 1 2 h − n . (1.2) In other words, we propose the infrared description Since the n and h − n domain walls are related by time-reversal (see figure 1), consistency of this proposal requires that the corresponding infrared phases must also be related by time-reversal, that is, by sending k → −k in the 3d theory. This requirement is indeed fulfilled by the identification between n and k in (1.2).
Determining the infrared phase of 3d N = 1 SYM is also a nonperturbative problem. In [22] it was proposed that this theory flows in the infrared to a nontrivial TQFT. The domain wall theories, we conjecture, are the "quantum phases" put forward in [22][23][24]. This predicts the following domain wall theories: 3 • G = SU(N ). The n-domain wall theory is W n = U(n) N −n,N Chern-Simons theory.
This reproduces the proposal in [7].
• G = Sp(N ). The n-domain wall theory is W n = Sp(n) N +1−n Chern-Simons theory.
• G = Spin(N ). The n-domain wall theory is W n = O(n) 1 N −2−n,N −n+1 Chern-Simons theory. We review the construction of this TQFT in section 4.3.
• G = G 2 . The theory has h = 4 vacua and two independent walls: n = 1, 2. The 2-domain wall theory is W 2 = SO(3) 3 × S 1 , with SO(3) 3 Chern-Simons theory and S 1 the 3d sigma model on the circle. For the n = 1 wall see below.
The expectation is that the n and (h − n)-domain walls are related by time-reversal, that is W h−n = W n (see figure 1). This is realized by virtue of the level-rank dualities of Chern-Simons theories [23,25,26] and time-reversal flipping the sign of the Chern-Simons levels: (1.4) The domain walls with n = h/2 are nontrivially time-reversal invariant. These TQFTs emerge in the infrared of 3d N = 1 SYM G 0 , with vanishing Chern-Simons level, which is time-reversal invariant. We also conjecture that: • Arbitrary group G. The n = 1 domain wall theory connecting neighboring vacua is W 1 = G −1 Chern-Simons theory. This is consistent with the proposals put forward above due to the level-rank dualities U(1) N ↔ SU(N ) −1 , Sp(1) N ↔ Sp(N ) −1 and O(1) 1 N −3,N = (Z 2 ) N ↔ Spin(N ) −1 . 3 The notation G k for Chern-Simons theories refers to Chern-Simons theory with gauge group G at level k ∈ Z. The Chern-Simons theory U(n) k,k ≡ SU(n) k ×U(1) nk Zn has two levels, and the theory based on O(n) has three levels (see section 4.3).

JHEP03(2021)259
We subject the conjecture (1.3) to a number of nontrivial quantitative tests. We exactly match renormalization-group invariant partition functions computed in the 4d N = 1 domain walls with the corresponding partition functions computed in the proposed infrared 3d TQFTs. This lends nontrivial support for our domain wall proposals in 4d N = 1 SYM. We stress that one computation is performed using the 4d degrees of freedom, and the other using the proposed 3d TQFT degrees of freedom.
The most basic partition function of the n-domain wall is the Witten index [27,28] I n = tr Wn (−1) F , (1.5) where tr Wn denotes the trace over the torus Hilbert space of W n with periodic boundary conditions, and (−1) F fermion parity. This partition function was first computed by Acharya and Vafa in [7] using the 4d N = 1 SYM fields. We introduce and compute additional partition functions on the domain wall theory where the Witten index is twisted by a global symmetry of SYM. 4d N = 1 SYM with gauge group G can have charge conjugation zero-form symmetry C and one-form symmetry Γ [29]. 4 Γ is the center of G, since the fermion in 4d N = 1 SYM is in the adjoint representation of the gauge group. The symmetries C and Γ do not commute when acting on Wilson lines, and combine into S = Γ C (see table 1). C acts on local operators and Wilson lines, and Γ on the Wilson lines of the theory. These symmetries are unbroken in each of the h vacua of 4d N = 1 SYM. S is the unbroken symmetry at each vacuum, while Z 2h is spontaneously broken to Z 2 . This allows us to define the following twisted Witten indices on the n-domain wall theory 5 I c n = tr Wn (−1) F c , (1.6) where c ∈ C, and I g n = tr Wn (−1) F g , (1.7) where g ∈ Γ. Consistency of our conjecture requires that these partition functions, computed on either side of (1.3), match. We compute the Witten indices in terms of the 4d degrees of freedom in section 2, and in the 3d TQFTs in section 4. Computing the domain wall Witten indices on the 3d side of the proposal requires understanding the Hilbert space of spin TQFTs, and not merely counting the number of states on the torus, as has been often stated in the literature. We delve into the details of constructing the Hilbert space of spin TQFTs and determining the fermionic parity of the states in section 3. The (twisted) Witten indices (1.5), (1.6), (1.7) map to twisted partition functions in the infrared spin TQFT. Importantly, the dimension of the Hilbert space and the index differ in general, as we shall see. In particular, the index sometimes vanishes in theories of interest. While the index can vanish, the twisted indices are non-vanishing, and supersymmetry on the domain wall is unbroken. 4 C is the outer automorphism group of the Dynkin diagram g of G while S is the outer automorphism group of the extended Dynkin diagram g (1) of the affine Lie algebra associated to G. The group Γ is defined as the quotient S/C, i.e., the symmetries of g (1) that are not symmetries of g. 5 One could also twist by any element cg ∈ S.

JHEP03(2021)259
G SU(N ) Sp(N ) Spin(2N + 1) Spin(4N ) Spin(4N + 2) Table 1. Lie data for the simple Lie groups G. Here h denotes the dual Coxeter number (defined as tr(t adj t adj ) ≡ 2h(t, t ), where (·, ·) denotes the Killing form on g, normalized so that the highest root has (θ, θ) = 2). C, Γ are the zero-form and one-form symmetry groups of 4d N = 1 SYM with gauge group G, and S = Γ C. D N denotes the dihedral group with 2N elements, and S N the symmetric group with N ! elements. For SU(2) the zero-form symmetry group is trivial, and for Spin(8) the zero-form symmetry group is enhanced to S 3 and the total symmetry group to S 4 . The D N symmetry of pure SU(N ) YM was considered in [30].
We summarize here the results of our computations, performed both in terms of the 4d fields and the conjectured 3d topological degrees of freedom, for which we find perfect agreement. We find it convenient to organize the results into master partition functions, which are defined as the generating functions for the twisted Witten indices. In other words, we sum the (twisted) partition functions over all n-walls: where q is a fugacity parameter, and where s ∈ S is an element of the unbroken symmetry group. These partition functions have an elegant interpretation as twisted partition functions of a collection of free fermions in 0 + 1 dimensions with energies determined by the Lie data of G (see section 2). Interestingly, the twisted partition function can be expressed as the untwisted partition function of an associated affine Lie algebra, whose extended Dynkin diagram is obtained by the "folding procedure" introduced in [31]. The master partition functions take a rather simple form: • SU(N ): where c denotes the non-trivial element of C = Z 2 , and g is any element of Γ = Z N , thought of as an N -th root of unity.
• Spin(N ), N odd: where g denotes the non-trivial element of Γ = Z 2 .
• Spin(N ), N even: where c denotes the non-trivial element of C = Z 2 . (1.18) Expanding these formulas in a series in q yields I s n (see section 2). See also section 2.6 for the n = 1 domain wall twisted Witten indices for arbitrary simply-connected G.
The plan of the rest of the paper is as follows. In section 2 we review the calculation of the untwisted Witten index for general domain walls in 4d N = 1 SYM, develop the necessary tools to study the twisted indices, and present a detailed calculation thereof, for all the classical Lie groups. In section 3 we explain how the Hilbert space of a spin Chern-Simons theory is constructed and, in particular, how to determine the fermion parity (−1) F of the different states. In section 4 we use this refined understanding of spin Chern-Simons theories to compute the twisted partition functions of the 3d TQFTs that, conjecturally, describe the infrared dynamics of the domain walls, and show exact agreement. We end with some forward-looking comments in section 5. We delegate to appendices some technical details that are needed in the computation of the twisted partition functions in section 4 and some additional material.

JHEP03(2021)259 2 Twisted Witten indices
In this section we study the twisted Witten indices on the 3d N = 1 domain walls, as computed in terms of the ultraviolet 4d degrees of freedom, namely the gluons and gluinos. This requires considering 4d N = 1 SYM on a two-torus and quantizing the space of zero energy states. This leads to a 2d N = (2, 2) sigma model on the moduli space of flat Gconnections on a two-torus, which is the weighted projective space WCP r i is the comark for the i-th node in the extended Dynkin diagram g (1) of the affine Lie algebra associated to G and r = rank(G) [32,33]. Just as 4d N = 1 SYM, this 2d theory also has h quantum vacua. A supersymmetric domain wall in 4d N = 1 SYM corresponds to a supersymmetric soliton in the 2d N = (2, 2) sigma model [7].
Using the 2d N = (2, 2) sigma model, Acharya and Vafa argued that the Witten index of the domain wall is encoded in the Hilbert space of r +1 free fermions in 0+1 dimensions. Each fermion ψ i is associated to the i-th node of the extended Dynkin diagram g (1) of G and the energy of each fermion is a ∨ i . The fermion Hilbert space is graded by the energy of the states The Witten index of all n-domain walls is encoded in the partition function of the fermions with periodic boundary conditions on a circle, corresponding to a sum over all states weighted by the energy: This partition function is readily evaluated which implies, in particular, that the Witten index for the n and h − n wall are the same (I n = (−1) r+1 I h−n ) since the fermionic Hilbert space for the n and h − n walls are related by particle-hole symmetry. This beautifully reproduces the expectation that the n domain wall and the h − n domain wall (cf. figure 1) are related to each other by time-reversal!

JHEP03(2021)259
A symmetry s ∈ S of 4d N = 1 SYM acts in a simple way on the Wilson lines of the gauge theory. A Wilson line is labeled by a representation of G with highest weight λ ≡ λ 1 ω 1 + λ 2 ω 2 + · · · + λ r ω r , where ω i is the fundamental weight associated to the i-th node of the Dynkin diagram g. The Wilson line W i labeled by the fundamental weight ω i transforms under c ∈ C as c : where ω c(i) is the fundamental weight which is charge conjugate to ω i . An element g ∈ Γ acts by g : where α g (ω i ) ∈ Γ * is the charge of ω i under the center Γ of G. The action of a symmetry on the fundamental Wilson lines W i induces an action on the fermions ψ i , which are labeled by a node in the extended Dynkin diagram g (1) . We recall that C acts as an outer automorphism of g, S acts as an outer automorphism of g (1) and Γ = S/C. We now proceed to compute the Witten index on the domain wall twisted by the symmetries of the system, S. This group is identified with the group of symmetries of the extended Dynkin diagram g (1) , i.e., a given s ∈ S can be thought of as a permutation of the nodes i → s(i) that leaves the diagram g (1) invariant. The induced action on the effective 0 + 1 system of fermions is s : where ψ i is the fermion associated to the i-th node of g (1) .
Similarly, the twisted partition function computes the generating function of twisted indices: An efficient way to compute this partition function is as follows. Take the i-th fermion, and consider its orbit under s: 12) where N i denotes the length of the orbit of the i-th node under the symmetry s, i.e., the minimal integer such that s N i (i) ≡ i. In the trace (2.10), the only configurations that contribute are those where the occupation number λ i in (2.2) is constant along the orbit:

JHEP03(2021)259
This means that we may restrict the sum over H n F in (2.2) to those configurations where this identity is satisfied. We enforce this by dropping all but one of these labels, and multiplying its energy by N i , i.e., we replace (2.2) by where the sum is over one representative for each orbit, r is the number of orbits of s, and a i ∨ = N i a ∨ i is the combined energy of all the elements of the orbit of λ i . With this, the twisted Witten index (1.6) on the domain wall can be computed as the untwisted partition function of r + 1 free fermions with energies a i ∨ : Since h = r i=0 a ∨ i we see that I s n = (−1) r +1 I s h−n , as required by time-reversal. Diagrammatically, twisting by a symmetry folds the Dynkin diagram g (1) according to the action of s on the nodes [31]. This yields a new affine Dynkin diagram, which has r + 1 < r + 1 nodes, and comarks a i ∨ = N i a ∨ i . The twisted Witten index is identical to the untwisted Witten index of the folded diagram.
A quick remark is in order. Let λ i be a node in the folded diagram, and let N i be the number of nodes in the original diagram that folded into λ i . The node λ i is therefore a bound state of N i fermions, and thus has fermion parity (−1) F = (−1) N i . Moreover, the symmetry s permutes these fermions, which generates an extra sign corresponding to the signature of the permutation. When the permutation is cyclic, which is the case relevant to this paper, the signature is just N i − 1. All in all, the contribution of λ i to the twisted trace is (−1) F s = (−1) (N i +N i −1) = −1. Therefore, in the folded diagram the node behaves as a regular fermion, just with more energy, and so (2.15) is correct as written: the fermionic signs are all taken care of automatically by the folding.
The twisted Witten index can also be computed by diagonalizing the action of s (2.12) by a direct sum of unitary transformations, one for each orbit, which is a symmetry of the collection of fermions. In this basis, s acts with eigenvalue s i on the i-th fermion, where s i is an N i -th root of unity. The twisted partition function can, therefore, also be expressed as This also makes the action of time-reversal symmetry on the domain walls manifest, cf. I s n = (−1) r+1 det(s)I s h−n , where det(s) = s 0 s 1 · · · s r = (−1) r+r is the parity of the permutation induced by s. We now discuss zero-form symmetries and one-form symmetries in turn.
Zero-form symmetries. 4d N = 1 SYM has charge conjugation symmetry C if and only if the (unextended) Dynkin diagram g of the Lie algebra of G has a symmetry. This corresponds to an outer automorphism of the Lie algebra of G (see table 1). Such symmetry is present for the A r , D r , E 6 algebras, where C acts as a transposition (order-two JHEP03(2021)259 permutation) on the nodes of the Dynkin diagram (with low-rank exceptions A 1 , D 4 ). In this case, folding the diagram by C gives rise to what is usually called the twisted affine Dynkin diagram g (2) [34,35], which is constructed by identifying the nodes of g that are permuted by C (and adding the extending node).
As C = Z 2 , the eigenvalues in (2.16) are trivial to determine: if a node i is fixed by c ∈ C, then its eigenvalue is c i = +1. On the other hand, if the pair of nodes i, j are swapped, then the eigenvalues are ±1, which can be assigned as c i = +1 and c j = −1 (or vice-versa).
One-form symmetries. As discussed in section 1, 4d N = 1 has a one-form symmetry group Γ given by the center of the gauge group G. Here, the eigenvalues s i in (2.16) have a very natural interpretation. An element g ∈ Γ acts as an outer automorphism of g (1) , a permutation of the r + 1 nodes. Diagonalizing this permutation results on an eigenvalue g i on the fermion ψ i associated to the i-th node, which is the charge of the element of the center g ∈ Γ on the i-th fundamental weight of g [36][37][38][39][40], that is (2.17) Note that this is precisely how g ∈ Γ acts on the ultraviolet Wilson loops W i (cf. (2.7)).
We now proceed to compute the twisted Witten indices for G = SU(N ), Sp(N ), Spin(N ), and G 2 respectively.

G = SU(N )
Consider the algebra A N −1 = su N . The symmetries of this algebra are as follows: • The group SU(N ) has a Z 2 zero-form symmetry, which corresponds to complex conjugation. It acts by interchanging the i-th node with the (N − i)-th node in g. The associated diagonal action can be chosen as follows: take c 0 = +1 for the extended node, and c i = +1 for the first half of the unextended nodes, and c i = −1 for the second half.
• The group SU(N ) has a Z N one-form symmetry, whose associated charge is the Nality (the number of boxes in the Young diagram modulo N ). If g denotes a primitive root of unity, then a generic element g t ∈ Z N acts on the extended diagram g (1) as a cyclic permutation by t units, λ i → λ i+t mod N . The center acts on a representation with highest weight λ as follows:  This result was also obtained, by an entirely different method, in [41]. We now move on to the twisted indices. Charge conjugation acts on the extended Dynkin diagram A (1) N −1 as follows: where the blue node denotes the affine root, and the integers denote the comarks a ∨ i . The automorphism folds the diagram in half. 6 The result is where the folded diagrams both have m + 1 = N/2 + 1 nodes. From this we conclude that the folded diagram has r + 1 = (N + 1)/2 and r = (N + 2)/2 nodes for N odd and N even, respectively. In the first case, one node has comark equal to 1, and the rest equal to 2; while in the second case, there are two nodes with comark 1, and the rest equal to 2. Using (2.15), the c-twisted partition function is 7 and, expanding, the c-twisted Witten indices are (−1) n/2 (N − 1)/2 n/2 N odd, n even, (2.24) 6 For N odd, the (N ± 1)/2-th nodes would naively fold into a loop, which does not yield a valid Dynkin diagram. The correct folding is given by the theory of twisted Kač-Moody algebras [34,35]. We henceforth fold the diagrams following [34,35]. The only information we need from the diagram are the comarks. 7 In SU(2) the action of c is a gauge transformation and c is not a symmetry; indeed, Z c (q) = Z(q).

JHEP03(2021)259
One can also compute the partition function in the diagonal basis, where c i = +1 for the first half of the nodes, and c i = −1 for the second half. Plugging this into (2.16) yields the same expression for the twisted partition function. Let us now consider the partition function twisted by the Γ = Z N one-form symmetry. If g denotes a primitive N -th root of unity, then a generic element g t ∈ Z N acts on the extended diagram as follows: where the folded diagram has gcd(N, t) nodes, each with energy N/ gcd(N, t). In other words, g t folds the diagram into the affine diagram of SU(gcd(N, t)), with comarks N/ gcd(N, t). This immediately yields the twisted partition function as (2.15) (2.26) The twisted index reads Naturally, for t = 0 this reduces to the untwisted result. Alternatively, we may compute the same partition function in the diagonal basis. Using equations (2.16) and (2.18), the twisted partition function is given by the so-called q-Pochhammer symbol, essentially defined by this product. One may prove that this is in fact identical to (2.26). Expanding the product, the twisted index becomes I g n = (−1) n g 1 2 n(n−1) N n g , N n g := (g; g) N (g; g) n (g; g) N −n , (2.29) where the term in parentheses denotes the so-called q-binomial coefficient. This is again identical to (2.27).

G = Sp(N )
Consider the algebra C N = sp N . The symmetries of this algebra are as follows: • The group Sp(N ) has no zero-form symmetry.
• The group Sp(N ) has a Z 2 one-form symmetry, whose charged representations are the pseudo-real ones. The non-trivial element g ∈ Z 2 acts on the extended diagram by reversing the nodes λ i → λ N −i . The center acts on a representation λ as follows: and, expanding, the Witten index 4d Sp(N ) N = 1 SYM has no charge conjugation symmetry. We can consider instead the index twisted by the Γ = Z 2 one-form center symmetry, which acts on the extended Dynkin diagram as follows: where the blue node denotes the affine root, and the integers denote the comarks a ∨ i . The automorphism folds the diagram in half (see footnote 6). The result is where the folded diagrams have m + 1 = N/2 + 1 nodes. From this we learn that the folded diagram has r +1 = (N +2)/2 and r +1 = (N +1)/2 nodes, for N even and N odd, respectively. In the first case, one of these nodes has energy JHEP03(2021)259 equal to 1, and the rest equal to 2; while in the second case, they are all of energy 2. Plugging this into (2.15) the one-form twisted partition function is (2.35) and, expanding, the twisted Witten index N even, n odd, (2.36) One can also compute the partition function in the diagonal basis, where g i = +1 for the even nodes, and g i = −1 for the odd ones. Plugging this into (2.16) yields the same expression for the twisted partition function.

G = Spin(2N + 1)
Consider the algebra B N = so 2N +1 . The symmetries of this algebra are as follows: • The group Spin(2N + 1) has no zero-form symmetry.
• The group Spin(2N + 1) has a Z 2 one-form symmetry, whose charged representations are the spinors. The non-trivial element g ∈ Z 2 acts on the extended diagram by permuting the zeroth and first nodes, λ 0 ↔ λ 1 . The center acts on a representation λ as follows: which means that the eigenvalues in (2.16) are Let us begin by computing the untwisted partition function. The comarks for Plugging this into equation (2.5) we obtain the untwisted partition function and, expanding, the Witten index (2.39)

JHEP03(2021)259
Note that the index vanishes for N = 1 mod 4 and n = (N − 1)/2 and by time-reversal for n = h − n = (3N − 1)/2. This clearly illustrates the crucial difference between the dimension of the Hilbert space and the index. 4d Spin(2N + 1) N = 1 SYM has no charge conjugation symmetry. We can consider instead the index twisted by the Γ = Z 2 one-form center symmetry. The non-trivial element g ∈ Z 2 acts on the extended Dynkin diagram as follows: 2N : (2.40) where the blue node denotes the affine root, and the integers denote the comarks a ∨ i . From this we learn that the folded diagram has r + 1 = N nodes, one of which has energy equal to 1, and the rest all energy equal to 2. Plugging this into (2.15) the one-form twisted partition function is and, expanding, the Witten index One can also compute the partition function in the diagonal basis, where g i = +1 for all the nodes except for the last one, which has g N = −1. Plugging this into (2.16) yields the same expression for the twisted partition function.

G = Spin(2N )
Consider the algebra D N = so 2N . The symmetries of this algebra are as follows: • The group Spin(2N ) has a Z 2 zero-form symmetry. The corresponding charge is the chirality of the representation. This symmetry acts by permuting the last two nodes in the unextended Dynkin diagram. The associated diagonal action can be chosen as follows: take c i = +1 for all but the last two nodes, and c N −1 = +1 and c N = −1.
• The group Spin(2N ) has a Z 2 × Z 2 one-form symmetry if N is even, and Z 4 if odd. They act on the extended Dynkin diagram as follows: one of the Z 2 's for N even, and the Z 2 subgroup of Z 4 for N odd, acts as the permutation λ 0 ↔ λ 1 and λ N −1 ↔ λ N , while fixing the rest of Dynkin labels in the extended diagram. The other Z 2 factor reverses the order of the extended Dynkin labels, while Z 4 acts as and it reverses the order of the rest of Dynkin labels.
For N even, let (g 1 , g 2 ) ∈ Z 2 × Z 2 ; and, for N odd, let g ∈ Z 4 ; all thought of as roots of unity. The center acts on a representation λ as follows:

JHEP03(2021)259
Therefore, the eigenvalues in (2.16) are and, expanding, the Witten index Note that the index vanishes when N is even and n corresponds to the time-reversal symmetric wall n = h/2 = N − 1. It also vanishes for the exceptional pairs (N, n) such that 2 + 4n + 2n 2 − 3N − 4nN + N 2 = 0.
Let us now consider the index twisted by charge conjugation. Its action on the extended Dynkin diagram, and the resulting folded diagram, are as follows: where the folded diagram has N nodes. From this we learn that the folded diagram has r + 1 = N nodes, two of which have energy equal to 1, and the rest all energy equal to 2. Plugging this into (2.15) the zero-form twisted partition function is and, expanding, the twisted Witten index (2.49)

JHEP03(2021)259
One can also compute the partition function in the diagonal basis, where c i = +1 for all the nodes except for the last one, which has c N = −1. Plugging this into (2.16) yields the same expression for the twisted partition function.
Let us now consider the one-form-twisted partition functions. The symmetry depends on whether N is even or odd, which we consider in turn.

N even.
Here the symmetry is Z 2 × Z 2 . g 1 and g 2 act as follows: The folded diagrams are which have N − 1 and N/2 + 1 nodes, respectively. The folding by g 1 g 2 is in fact identical to that of g 2 , i.e., the second diagram. The twisted partition functions read and, expanding, the twisted Witten indices N odd. Here the one-form symmetry is Z 4 , whose action on the extended Dynkin diagram, and the corresponding folded diagram, are as follows: where the comarks are all 4 if we fold by a generator of Z 4 , and all 2 if we fold by a generator squared. The number of nodes is (N − 1)/2 in the first case, and N − 1 in the second case. The folded diagram corresponds to C (1) (N −1)/2 and C (1) N −1 , respectively. If we let g denote a generator of Z 4 , the twisted partition function is and, expanding, the twisted Witten indices (2.56) As usual, one may also compute these partition functions in the diagonal basis. Using the phases (2.44) in (2.16) yields the same expressions for the twisted partition functions, as expected.

G = G 2
G 2 has no zero-form or one-form symmetry. The comarks for G 2 are a ∨ 0 = a ∨ 2 = 1 and a ∨ 1 = 2. Plugging this into equation (2.5) we obtain the untwisted partition function and, expanding, the Witten indices (2.58) Note that I 3 = −I 1 , as expected from the action of time-reversal on domain walls.

Minimal wall for arbitrary gauge group
The domain wall theory for n = 1 admits a uniform description for all simply-connected groups, including the exceptional ones. Indeed, the only fermion configurations with total energy equal to 1, that is the solutions to (2.2) are clearly of the form λ i = 1 for one i such that a ∨ i = 1, and λ j = 0 for all j = i. In other words, in each configuration there is only one excited fermion, which moreover JHEP03(2021)259 necessarily has energy a ∨ i = 1. All these configurations have the same fermion number, namely (−1) F = −1, which means that the index is where m 1 denotes the number of nodes in the extended Dynkin diagram g (1) with comark equal to 1. The values of m 1 are given in the following table: Note that, for simply-laced G, m 1 is the order of Γ.
The index twisted by a symmetry s ∈ S is where m s 1 denotes the number of nodes in the extended Dynkin diagram g (1) with comark equal to 1 that are fixed by s. m s 1 has already been computed for the classical groups SU(N ), Sp(N ), Spin(2N + 1) and Spin(2N ). For the exceptional groups, only E 6 and E 7 have non-trivial symmetry group S (see table 1). In E 6 , the zero-form charge-conjugation symmetry leaves invariant the extended node, which has comark 1, and permutes the other two nodes with comark 1. In E 6 and E 7 , the one-form center symmetry permutes all the nodes with comark 1. Therefore, letting c denote the non-trivial element of C, and g any non-trivial element of Γ, the indices are The (twisted) indices for the exceptional groups E 6 , E 7 , E 8 , F 4 and arbitrary n have been included in appendix B for completeness.
This concludes our discussion of the twisted Witten indices of the domain walls, as computed in terms of the 4d ultraviolet degrees of freedom. A rather nontrivial consistency test of our proposal is that the Witten indices on the domain walls we just computed are reproduced by the corresponding partition functions of our conjectured 3d TQFTs. Computing the image of the (twisted) Witten indices in these TQFTs is nontrivial and requires understanding in detail the Hilbert space of spin TQFTs and the action of (−1) F on it, a subject to which we now turn.

Hilbert space of spin TQFTs
The domain wall theory preserves 3d N = 1 supersymmetry and observables depend on the choice of a spin structure. Therefore, the TQFT that emerges in the deep infrared of the domain wall must also depend on a choice of a spin structure, that is, it must be a spin TQFT [42].
The data of a TQFT in 3d includes the set of anyons A (or Wilson lines) and the braiding matrix B : A × A → U(1) encoding their braiding. A spin TQFT is a TQFT that JHEP03(2021)259 has an abelian 8 line ψ that braids trivially with all lines in A and has half-integral spin. 9 Transparency of ψ implies that it fuses with itself into the vacuum, that is ψ × ψ = 1. Since ψ is transparent and has half-integral spin, the observables of a spin TQFT depend on the choice of a spin structure.
A spin TQFT can be constructed from a parent bosonic TQFT which has an abelian, non-transparent fermion ψ with ψ ×ψ = 1, that is, a bosonic TQFT that has a Z ψ 2 one-form symmetry generated by a fermion [43][44][45][46][47]. The bosonic parent theory defines a spin TQFT upon gauging its Z ψ 2 one-form symmetry generated by ψ This procedure is an extension of the notion of bosonic "anyon condensation" [48][49][50]. 10 Upon gauging, the fermion ψ in the parent bosonic theory becomes the transparent fermion ψ in the spin TQFT. The gauged one-form symmetry Z ψ 2 of the parent bosonic theory gives rise to an emergent zero-form symmetry Z 2 in the spin TQFT that is generated by the fermion parity operator (−1) F , and which acts on the "twisted sector". We will discuss the action of (−1) F on the Hilbert space of spin TQFTs shortly.
The lines of the parent bosonic theory A can be arranged as the disjoint union of two sets A = A NS ∪ A R according to their braiding with ψ. Lines in A NS , by definition, braid trivially with ψ while lines in A R have braiding −1 with ψ. This partitions the lines of the bosonic TQFT according to their Z ψ 2 quantum number. The lines in each set can be organized into orbits of Z ψ 2 , generated by fusion with ψ. The orbits can be either two-or one-dimensional. The lines in one-dimensional orbits are referred to as "Majorana lines" in that they can freely absorb the fermion ψ: The Majorana lines, if any, are necessarily in A R . 11 The lines of the bosonic parent theory thus split as An abelian line is one that yields a single line in its fusion with any line in A. 9 A TQFT that has a line with half-integral spin which braids nontrivially with at least one line in the theory is not spin. There is no unambiguous way to assign a sign to the fermion as we move it around a circle since the phase it acquires depends on which lines link with the circle, unlike when the fermion is transparent. 10 More precisely, the parent bosonic TQFT must be attached to a suitable 4d SPT phase so that the combined system is non-anomalous, and the symmetry can be gauged. 11 To prove this we compute the braiding of ψ with a Majorana line m and show that it necessarily has where h denotes spin of lines and in the second equality we have used the defining relation for a Majorana line (3.2). See also [47].

JHEP03(2021)259
The first set, referred to as the Neveu-Schwarz (NS) lines, is what is usually regarded as the set of Wilson line operators in the spin TQFT. The second set, the Ramond (R) lines, change the spin structure background. This decomposition will be useful shortly in the construction of the Hilbert space of the spin TQFT. The Hilbert space of the spin TQFT on the spatial torus depends on the choice of spin structure. There are two equivalence classes of spin structures on the torus (or, more generally, on any Riemann surface): even and odd spin structures. Consider the even and odd spin structure Hilbert spaces H NS-NS and H R-R . H NS-NS correspond to choosing antiperiodic boundary conditions on the two circles while H R-R corresponds to periodic boundary conditions. The other two even spin-structure Hilbert spaces H NS-R and H R-NS can be obtained from H NS-NS by the action of the mapping class group. This group is a non-trivial extension of the modular group SL 2 (Z) by the Z 2 fermion parity symmetry. It is known as the metaplectic group Mp 1 (Z). It does not preserve the individual spin structures but it does preserve their equivalence class. The Hilbert spaces of spin TQFTs realize a unitary representation of this group.
The states in the Hilbert space H B of a bosonic TQFT are constructed from the path integral on a solid torus by inserting lines M ∈ A along the non-contractible cycle [51]. This defines conformal blocks on the torus. We represent this pictorially by The Hilbert space of the spin TQFT can be constructed from its definition as a quotient of the bosonic parent TQFT (3.1). 12 The states in H NS-NS are labeled by a ∈ A NS , and are represented as The states in H R-R are constructed from conformal blocks of the bosonic parent TQFT on the torus and, in the presence of Majorana lines (3.2), from the once-punctured torus conformal blocks of the bosonic parent TQFT. By virtue of m being a Majorana line obeying the fusion rule ψ × m = m, the one-point conformal block on the torus with m along the cycle and ψ at the puncture is nontrivial, as it is allowed by the fusion rules. The states in H R-R are labeled by x, m ∈ A R , and are represented as 13 (3.6) 12 More details of the explicit construction of the Hilbert space of spin TQFTs will appear elsewhere [52]. 13 Unlike in bosonic anyon condensation, where a fixed line in the parent theory yields multiples states in the quotient theory, a Majorana line is in an irreducible representation of Cliff(1|1) and yields a unique state in the quotient (spin) TQFT.

JHEP03(2021)259
Modular transformations preserve the odd spin structure, i.e., they map H R-R into itself. The negative sign in (3.6) guarantees that under modular transformations the states in H R-R are mapped into themselves. Note that the pair of lines a and a × ψ in the bosonic parent descend to a pair of lines in the spin TQFT, because these are distinct anyons, being distinguishable by their spin. On the other hand, the pair of states |a and |a × ψ descend to a single state in the spin TQFT. Thus, while in a bosonic TQFT the number of states is the same as the number of lines, in a spin TQFT there are twice as many lines as there are states.
Our next task is to compute the action of fermion parity, i.e. (−1) F , on the Hilbert space of the spin TQFT. The Z 2 symmetry generated by (−1) F is the emergent zeroform symmetry that appears upon quotienting the parent bosonic theory by Z ψ 2 in (3.1). The charged states are therefore those constructed from the once-punctured torus in the bosonic theory (−1) F |m spin = −|m spin , (3.7) (−1) F acts nontrivially on the ψ puncture in the once-punctured torus.
Depending on the choice of spin structure on the "time" circle we can define the following 2 3 = 8 partition functions for spin TQFTs: 14 where O is an operator in the theory. We will be interested in the case when O is a symmetry of the TQFT. We note that (−1) F is only non-trivial in the R-R sector, because this is the only Hilbert space that may contain Majorana states. This is the most subtle and rich sector, and the one of interest as far as the twisted Witten indices is concerned.

Partition function of spin TQFTs
The twisted Witten index of the domain wall theory is computed by considering the odd spin structure on the spatial torus and periodic boundary condition on the time circle. This implies that the twisted Witten indices, computed via the 4d ultraviolet fields, must be reproduced by appropriate odd-spin-structure partition functions of our conjectured 14 − represents antiperiodic boundary condition while + period boundary conditions.

JHEP03(2021)259
infrared 3d spin TQFTs. In other words, a nontrivial check that our proposed infrared spin TQFTs describe the n-domain wall theories is proving that for symmetries s ∈ S. This requires, in particular, identifying the image of the symmetries s ∈ S in the infrared TQFT. Let us begin by considering the untwisted partition function. Given the construction of the Hilbert space H R-R in (3.6) and the action of (−1) F in (3.7) we can compute the desired partition function as follows • For N odd, Spin(N ) 1 is the Ising category, which has three lines {1, σ, ψ}: the vacuum 1, the spin operator σ, and the energy operator ψ. These primaries have spins h = 0, N 16 , 1 2 , and fusion rules σ 2 = 1 + ψ, ψ 2 = 1, ψ × σ = σ.
The theory SO(N ) 1 is obtained by condensing ψ, that is SO(N ) 1 = Spin(N ) 1 /Z ψ 2 . Using the fusion rules and the spins we see that 1, ψ are neutral under Z ψ 2 and e, m and σ are charged. In other words, the Neveu-Schwarz sector is while the Ramond sector is {e, m} N even.

JHEP03(2021)259
For a second example let us now consider the spin TQFT SO(3) 3 Chern-Simons theory, which is the simplest non-trivial spin TQFT. The bosonic parent theory is SU(2) 6 since where the abelian line ψ is the line in SU(2) 6 with j = 3 and spin h = 3/2. The lines in A = {j = 0, 1 2 , 1, . . . , 3} which have braiding −1 with ψ are those with half-integral isospin: Under fusion with ψ we have the following Z ψ 2 orbits (3.15) Therefore, in the R-R sector of SO(3) 3 there is a length-2 orbit with (j = 1 2 , 5 2 ) and a Majorana line with j = 3 2 . Thus, N x = N m = 1. There are N x + N m = 2 states, but one of them is a boson and the other is a fermion, which means that the partition function with periodic boundary conditions vanishes The vanishing of this trace will be important when discussing the 2-domain wall theory in 4d N = 1 SYM with gauge group G 2 (cf. section 4.4). This example clearly illustrates the importance of looking at the appropriate partition function and not merely at the dimension of the Hilbert space. We now discuss a different way to compute the partition function that does not rely on computing N x and N m directly. The basic idea is to gauge the emergent zero-form Z 2 symmetry generated by (−1) F in the spin TQFT to obtain the bosonic parent theory back [45,46,[53][54][55] spin TQFT Gauging this Z 2 amounts to summing the spin TQFT over all spin structures of the threemanifold M . Taking M to the three-torus, and summing over the 2 3 = 8 spin structures, corresponding to either periodic or antiperiodic boundary conditions around each of the three circles, we find that tr ±,± (see (3.8)-(3.9)) denotes the trace over the Hilbert space on the spatial torus with boundary conditions ±, ±, and tr H B the trace over the torus Hilbert space of the bosonic parent theory. Using the fact that the dimension of the torus Hilbert space is the same in all spin structures and that (−1) F acts nontrivially only in H R-R (see (3.7)), we find the formula

JHEP03(2021)259
where dim(H B ) is the dimension of the torus Hilbert space of the bosonic parent TQFT and dim(H F ) the dimension of the torus Hilbert space in any one spin structure of the spin TQFT. This formula offers a significant advantage in that it requires computing the total number of states dim(H F ) = N x + N m , and not separately N x and N m , as in formula (3.11). Even simpler, one may compute dim(H F ) = N a in the NS-NS sector directly, where all orbits are of length-2: the number of states is just half the number of lines of the spin TQFT. 15 As a consistency check, consider the case where G F is the product of a bosonic theorỹ G times a trivial/invertible spin TQFT which is precisely what one would expect, given the tensor product structure of G F and the fact that the trace over SO(N ) 1 is (−1) N . Put differently, in the Hilbert space of G F =G × SO(N ) 1 we have N a = N x and N m = 0 for N even, and N a = N m and N x = 0 for N odd. That is, in the R-R sector, either no states are Majorana or all are, depending on the parity of N . This implies that which indeed equals (3.21). There are spin TQFTs which factorize in a nontrivial fashion into the product of a bosonic TQFT and a trivial spin TQFT by virtue of a level-rank duality, as for example U(1) k ↔ SU(k) −1 ×{1, ψ}. In these theories tr H R-R (−1) F also just measures the dimension of the Hilbert space (up to possibly a sign).

JHEP03(2021)259
Indeed, the single state of SO(N ) 1 in H R-R is a Majorana state and thus has odd fermion parity for N odd only. Therefore, when comparing the spin TQFT partition function with the Witten index of the domain wall, we will match their absolute values, as if those match, the signs can be also be matched by stacking a suitable trivial spin TQFT, which can be thought of as a purely gravitational counterterm [56]. 16 The generalization to twisted indices is straightforward. Given a symmetry s ∈ S TQFT of the TQFT, which acts s : H R-R → H R-R , the partition function counts the number of bosons fixed by s, minus the number of fermions fixed by s. That being said, there are some subtleties that must be kept in mind. A state fixed by s does not necessarily contribute with s = +1 to the trace -it might contribute with s = −1 instead, the reason being that the symmetry s might be realized projectively in the Hilbert space. The most common example where this may happen is charge-conjugation c. We can illustrate this in U(1) 1 Chern-Simons theory, the simplest theory where this phenomenon occurs. This is an invertible spin TQFT, which means that it has a unique state on any spin structure. This state is clearly fixed by c but, interestingly, it has c = −1 in the odd-spin-structure Hilbert space H R-R . We can show this as follows. The bosonic parent theory is U(1) 4 Chern-Simons theory, which has four states, labeled by q = 0, 1, 2, 3. The U(1) 1 theory is obtained by condensing the fermion ψ, which has q = 2. The Ramond lines are easily checked to be q = 1, 3, and they are paired by fusion with ψ into a single two-dimensional orbit, since 1×2 = 3. Thus, the unique state in the R-R sector is (cf. (3.6)) This indeed satisfies c|1 spin = −|1 spin , inasmuch as c : q → −q mod 4 in the bosonic parent, which exchanges |1 and |3 .

Domain wall TQFT partition functions
In this section we calculate partition functions twisted by a symmetry s ∈ S TQFT tr H R-R (−1) F s (4.1) of the Chern-Simons TQFTs we proposed emerge in the infrared of the domain wall theories (see section 1). Our calculations beautifully reproduce the results obtained in section 2. Namely, we will now demonstrate that the trace (4.1) agrees with the twisted Witten index on the n-domain wall W n (cf. (2.10)) as computed in terms of the original 4d fields We identify each symmetry s ∈ S in 4d N = 1 SYM with a symmetry s ∈ S TQFT in the infrared TQFT. 16 Staking SO(N )1 for odd N to a 3d theory has the same effect as stacking to a 2d theory the trivial spin TQFT known as the Arf-invariant, which changes the sign of the partition with odd spin structure.

JHEP03(2021)259
In 4d N = 1 SYM with gauge group Sp(N ) our proposed domain wall theory corresponds to a Chern-Simons theory based on a group that is simple, connected, and simplyconnected, whereas for SYM with SU(N ), Spin(N ) and G 2 gauge groups, the proposed infrared Chern-Simons theories are based on a group that is neither. We discuss both cases in turn.
Chern-Simons theory G k , with G simple, connected and simply-connected is always a bosonic TQFT. These theories are made spin by tensoring with the trivial spin TQFT SO(N ) 1 . It follows from our discussion in section 3 that since all states have the same fermion parity -all bosonic, or all fermionic, depending on the parity of N . Therefore the partition function of G k × SO(N ) 1 in (4.3) is, up to possibly a sign, the dimension of the Hilbert space of G k Chern-Simons theory on the two-torus. The states in the torus Hilbert space of G k Chern-Simons theory are conformal blocks on the torus, which are labeled by the integrable representations of the corresponding affine lie algebra g (1) at level k [51,57]. By definition, the representations of G that are integrable are those whose highest weight λ satisfies (λ, θ) ≤ k, with θ the highest root of G. Expanding the latter in a basis of simple coroots, and introducing an extended label λ 0 := k − (λ, θ), integrability can be expressed as The dimension of the Hilbert space tr G k (1) is equal to the number of solutions to this equation.
Much like the discussion in section 2, where the Witten index on the domain wall was computed through an auxiliary system of free fermions, tr G k (1) has a nice combinatorial interpretation in terms of a system of free bosons in 0 + 1 dimensions. Indeed, the number of integrable representations tr G k (1) is the number of ways of creating a state of energy k from r + 1 free bosons, each with energy a ∨ i . Each boson is associated with a node in the extended Dynkin diagram g (1) , and λ i ∈ {0, 1, 2, . . . } in (4.4) corresponds to the occupation number of the i-th boson. Introducing a fugacity parameter q defines a generating function, which is the partition function of the bosons on the circle The partition function is thus The Chern-Simons trace tr G k (1) is the coefficient of q k in (4.6).
In a similar fashion, we define the trace twisted by a symmetry s ∈ S TQFT of G k Chern-Simons theory: tr G k (s) .

JHEP03(2021)259
When s = c is a zero-form symmetry, this corresponds to inserting a surface operator, i.e., the symmetry defect is supported on the whole spatial torus. On the other hand, if s = g denotes a one-form symmetry, the symmetry defect is a line operator, and one must specify a homology cycle on the torus on which it is supported. The states of G k Chern-Simons are created by wrapping on a cycle Wilson lines labeled by integrable representations λ; if g is supported on the same cycle, it acts on the states via fusion: Conversely, if g is supported on the dual cycle, it acts on the states via braiding: where α g (λ) is the charge of λ under the center of G (cf. (2.7)). More generally, one can wrap a pair of symmetry defects on both cycles, but one can always conjugate such configuration via a modular transformation to either of the two options above. This operation, being a similarity transformation, does not affect the value of the trace. In other words, the value of tr G k (g) is independent of which cycle we define g on.
When s is a symmetry of the classical action of G k Chern-Simons theory, it is induced by an outer automorphism of the extended Dynkin diagram g (1) , and it acts as a permutation of the nodes thereof. In that case, s induces an action on the system of bosons, which permutes them in the same way it permutes the nodes of the Dynkin diagram. As in the system of free fermions, the trace above can be obtained from the partition function of these bosons where Z s (G, q) denotes the bosonic partition function twisted by the permutation s. One can evaluate this partition function by the same methods as in section 2, i.e., by diagram folding or directly in the diagonal basis where s i are the eigenvalues of the permutation. Note that, for s = g a one-form symmetry, diagram folding naturally corresponds to g acting as a permutation, i.e. (4.8), while the diagonal action corresponds to g acting via braiding, i.e. (4.9). Indeed, it is a well-known fact that an S modular transformation -which interchanges the two cycles -diagonalizes the fusion rules. It should be noted that Chern-Simons theories can have "quantum symmetries". These are symmetries of the entire TQFT data that are not symmetries of the Lagrangian. Many

JHEP03(2021)259
explicit examples of these symmetries have been found in [58]. These symmetries permute the Wilson lines of the theory, in a way that does not necessarily correspond to a permutation of their Dynkin labels. As such, the free boson representation cannot be used to evaluate the twisted trace, but it must be computed from the action of the symmetry on the Hilbert space of the TQFT. That being said, we find that the symmetries S in the ultraviolet domain wall map to classical symmetries of the infrared Chern-Simons theories, and we can compute the twisted index using (4.11).
Some of our proposed domain wall TQFTs are Chern-Simons theory with a group G that is not connected and/or simply-connected, in which case the theory G k (with k a set of integers that defines the Chern-Simons action) may depend on the spin structure of the underlying manifold. There are four distinct Hilbert spaces corresponding to the four spin structures on the spatial torus (see section 3), but our interest here is in the Hilbert space H R-R . Now G k can have fermionic states, which correspond to once-punctured conformal blocks of the parent bosonic theory, and (−1) F is in general a non-trivial operator. Our goal is to compute where we use the latter to simplify notation. We shall next compute the twisted traces for all the Chern-Simons theories of interest. We begin by considering the simply-connected group Sp(n), and then we move on to the more subtle and interesting cases U(n), O(n). We finally make a few remarks concerning the exceptional groups. The remaining simply-connected groups SU(n), Spin(n) as well as SO(n) are studied in appendix A.

G = Sp(n)
The n-domain wall theory for 4d N = 1 SYM with G = Sp(N ) is proposed to be Sp(n) N +1−n Chern-Simons theory. Let us proceed to study the partition functions of Sp(n) k .
Consider the algebra C n = sp n . The comarks are all a ∨ i = 1. Plugging this into (4.11) we obtain the generating function as (4.13) and, by expanding, the untwisted trace This is the number of integrable representations of Sp(n) k , that is, the dimension of the torus Hilbert space of this Chern-Simons theory. Let us also compute the partition function twisted by the one-form symmetry Γ = Z 2 . This symmetry reverses the order of the extended labels, and the charged representations are the pseudo-real ones. Denoting by g the non-trivial element of Z 2 , and using (4.11) and (2.30), we get the twisted partition function
We are now ready to test our proposal. Recall that the conjectured infrared theory corresponding to the n-domain wall of Sp(N ) SYM was W n = Sp(n) k , with k = N + 1 − n. Using this value of the level in (4.14) and (4.16) indeed reproduces the (twisted) Witten indices computed in the ultraviolet, cf. (2.32) and (2.36).

G = U(n)
The n-domain wall theory for 4d N = 1 SYM with G = SU(N ) is proposed to be U(n) N −n,N Chern-Simons theory. Let us proceed to study the partition functions of U(n) k,n+k .
The Chern-Simons gauge group is not simply connected. The theory is defined as where Z n is the one-form symmetry generated by the line ψ = [0, k, 0, . . . , 0] ⊗ (n + k).
Here and in what follows, [λ 0 , λ 1 , . . . , λ n−1 ] denotes the Dynkin labels of an SU(n) k representation, and (q) ∈ Z the charge of a U(1) n(n+k) representation. The spin of the generator is easily computed to be h ψ = k(n−1) This theory is spin if and only if k is even.
We now proceed to compute the relevant traces. As the theory can be a spin TQFT, the theory may contain fermionic states, and (−1) F will in general be a non-trivial operator, which we need to understand to compute tr((−1) F s). In other words, we have to identify which of the states of this Chern-Simons theory are bosons, and which are fermions.
Note that, unlike the general discussion of section 3, this theory is more conveniently presented as a Z n quotient rather than a Z 2 quotient, so let us slightly generalize the discussion in that section to such quotients. In section 3 we argued that the bosonic states after a Z 2 fermionic quotient are the length-2 orbits, while the fermions are the fixed-points. We now claim that the general statement for Z n fermionic quotients is that the bosonic states are the orbits of even length, while the fermions are the orbits of odd length.
To prove this claim, consider a general spin TQFT that can be written as

JHEP03(2021)259
where G B is some bosonic TQFT, and where Z n is a one-form symmetry generated by a fermion ψ. Since h ψ p = ph ψ , ψ p is a fermion if p is odd, and a boson if p is even. This means that n is necessarily even, because ψ n = 1 is a boson. The braiding phase with respect to ψ is always an n-th root of unity, it is the charge with respect to the Z n symmetry. This fact allows us to partition the lines of G B into n equivalence classes according to their n-ality j, i.e., the value of braiding B(α, ψ) = e 2πij/n , j = 0, 1, . . . , n − 1. The lines with j = 0 are the NS lines (so that B(α, ψ) = +1), and those with j = n/2 are the R lines (so that B(α, ψ) = −1). The rest of lines are projected out by the Z n quotient (unless we turn on a suitable background for the dual Z n zero-form symmetry). Furthermore, in each sector the lines are organized into Z n orbits, {α, ψα, ψ 2 α, . . . , ψ |α|−1 α}, (4.19) where |α| ∈ [1, n] denotes the length of the orbit -the minimal integer such that ψ |α| ×α = α. An orbit is Majorana if and only if its length is odd, for then and only then it may absorb a fermion. Indeed, the conformal block with puncture ψ |α| is non-vanishing only if ψ |α| × α = α. In conclusion, the fermionic states in the R-R sector of the quotient theory G F correspond to the orbits of G B R-lines with an odd number of elements, as claimed.
We are now in position to study the theory U(n) k,n+k . The discussion above has taught us how to identify fermionic states in the Hilbert space of the theory. Rather anticlimactically, we shall now argue that this theory has, in fact, no fermionic states at all! This means that the trace tr(−1) F actually just counts the number of states of the theory, much like in a bosonic theory. This explains why the counting of states in [7] matched the domain wall index -because all states are bosonic. This, importantly, is not always the case for other spin TQFTs, such as O(n) (see below, section 4.3).
Let us prove that the theory has no fermionic states. U(n) k,n+k is level-rank dual to U(k) −n,−(n+k) as a spin TQFT. Therefore, if either k or n is odd, the theory factorizes as a bosonic theory times an invertible spin TQFT, and so the theory clearly has no Majorana states. The only non-trivial case is, therefore, that of n, k both even, which we assume in what follows.
The theory in the numerator of the quotient description of U(n) k,n+k in (4.17) is bosonic (recall that U(1) K is spin for K odd and bosonic for K even; here K = n(n + k), which is even). The states of U(n) k,n+k are Z n orbits of SU(n) k × U(1) n(n+k) representations. If we manage to prove that there are no orbits of odd length, we succeed in proving that the theory has no Majorana states. In fact, we show that, more generally, all orbits have length-n, i.e., all orbits are long. This implies that the states correspond to conformal blocks with no punctures, i.e., all states are bosonic, (−1) F ≡ +1.

JHEP03(2021)259
Let us now use this information to compute the different U(n) k,n+k partition functions. The untwisted trace is the number of conformal blocks (in any of the 2 3 spin structures). Counting this is a straightforward exercise in combinatorics: we have a factor of n(n + k) due to U(1) n(n+k) , times a factor of n+k−1 k due to SU(n) k (cf. (A.2)), and a factor of 1/n 2 due to the quotient Z n (one factor of n is due to the projecting out of lines, and the other one because the neutral lines are organized into length-n orbits). All in all, the number of states -the untwisted trace -is This standard argument was already used in [7]. An important aspect of this computation, much overlooked in the literature, is that this equals tr(−1) F only because all the states have trivial fermion parity, which is nontrivially true in this theory. This shall not be the case in the orthogonal group O(n), where tr(−1) F does not just count the total number of states, but rather the bosons minus the fermions, both sets being typically nonempty.
Recall that the conjectured infrared TQFT corresponding to the n-domain wall of SU(N ) is W n = U(n) k,n+k , with k = N − n. Using this value of the level in (4.21) indeed reproduces the Witten index computed in the ultraviolet, cf. (2.20).
We now proceed to computing the trace twisted by the charge conjugation symmetry c of U(n) k,n+k . Consider first the case of odd k, where the theory is naturally bosonic. In this case, computing the trace amounts to counting the real representations of U(n) k,n+k . A representation of U(n) k,n+k can be labeled by the pair (R, q), where R is an SU(n) k representation, and q ∈ [0, n(n + k)), subject to |R| = q mod n, where |R| denotes the number of boxes in the Young diagram of R. Representations (R, q) and (σ ·R, q+ (n+k)), with σ ·R the SU(n) representation with Dynkin labels (σ ·λ) i = λ i− mod n , are identified by Z n spectral flow.
The abelian charge q is correlated with the SU(n) representation. Indeed, if n is even and R is real modulo σ , there is a single charge q ∈ [0, n(n + k)) that makes (R, q) real; if n is odd, there are two such charges. 17 Therefore, the number of real representations in U(n) k,n+k is the number of representations of SU(n) k that are real up to the action of σ, divided by n (the length of the orbits), and multiplied by 2 if n is odd. Let us now count the SU(n) k representations.

JHEP03(2021)259
The number of solutions to this equation is n even, odd, k odd, 2 (n + k − 1)/2 (k − 1)/2 n even, even, k odd, (n + k)/2 k/2 + (n + k)/2 − 1 k/2 − 1 n even, even, k even, (n + k)/2 − 1 k/2 n even, odd, k even, (4.23) where, for future reference, we have also included the case of k even. We now sum over all = 0, 1, . . . , n − 1. For n odd, this just multiplies (n+k)/2−1 (k−1)/2 by n. If n is even, it multiplies 2 (n+k−1)/2 (k−1)/2 by n/2, because half the cases yield no solutions. Next, we divide by n (due to the quotient), and multiply by 2 if n is odd. This yields the number of real representations of U(n) k,n+k with k odd as 18 (n + k − 1)/2 (k − 1)/2 n even, k odd. The case of k even is slightly more complicated because the theory is naturally spin. For n odd we can obtain the twisted trace from the k odd case by using level-rank duality U(n) k,n+k ↔ U(k) −n,−(n+k) . But for n, k both even, the theory is spin, and cannot be written as a bosonic theory times a trivial spin theory -at least not using the standard level-rank duality. Thus, we have to explicitly compute the trace of c in the R-R sector. This is non-trivial because, among other things, c may act as −1 on some states (see the discussion around (3.26)), and thus it is not enough to just count real representations.
A shortcut to compute the trace of c over the odd spin structure, for k, n both even, is to sum over all spin structures: where tr B denotes the trace over the bosonic parent. From this expression, and noting that (−1) F is trivial in U(n) k,n+k theories (due to the lack of Majorana lines), we can solve for JHEP03(2021)259 the trace we are after: Let us begin with the first term. As this is a trace over a bosonic Hilbert space, we are just to count real representations of SU(n) k × U(1) n(n+k) . The first factor corresponds to = 0 in (4.23), while the second factor has two real representations (namely, q = 0 and q = n(n + k)/2). The end result is Let us now compute the second term in (4.26). This is a trace over a fermionic Hilbert space, but over the NS-NS sector, and so we only have to count fixed-points, as they all contribute with c = +1. In other words, the trace is just the number of real representations of U(n) k,n+k , that is, the number of solutions to (4.22), summed over = 0, 1, . . . , n − 1, and divided by n due to the quotient. Using (4.23), we get (4.28) Plugging these two traces into (4.26), the twisted index, for n, k even, becomes Note that this is invariant under n ↔ k, as required by level-rank duality. 19 This expression for the twisted partition function of U(n) k,n+k with k = N − n matches the twisted Witten index computed in the ultraviolet, cf. (2.24). Finally, we briefly sketch the computation of the trace twisted by the one-form symmetry g t ∈ Z n+k of U(n) k,n+k , where g denotes a primitive root of unity, and t ∈ [0, n + k). The states of U(n) k,n+k are orbits of the form {(σ · R, q + (n + k))} , (4.30) where ranges from 0 to n − 1. All the orbits are of length-n. The theory has a Z n+k one-form symmetry that acts as q → q + tn, where t ∈ [0, n + k). A state is invariant if and only if this transformation cyclically permutes the elements of the orbit, i.e., if a representative (R, q) is mapped into itself up to spectral flow, (R, q + tn) ≡ (σ · R, q + (n + k)) . (4.31) It is clear that if tn is not of the form (n + k) for some ∈ Z, then no state is invariant, and the twisted trace vanishes. So let us assume that such an exists; it is JHEP03(2021)259 clear that it is unique, so counting invariant orbits reduces to counting appropriate SU(n) k representations. More specifically, the number of invariant states is tr U(n) k,n+k (g t ) = n(n + k) n 2N , (4.32) where n(n + k) denotes the number of states in U(1) n(n+k) , and the factor of n 2 is due to the Z n quotient.N denotes the number of SU(n) k representations that satisfy R = σ · R, with := tn/(n + k) ∈ Z.
Counting such SU(n) k representations is easy, because this is a simply-connected group, so the states are labelled by the Dynkin labels, λ 0 , λ 1 , . . . , λ n−1 , which can be thought of a collection of independent bosons (cf. (4.11)). The most efficient way to count the representations that are invariant under σ is to recall that the associated diagonal phase is just the charge under the center (2.18), which is a multiplicative phase, so the partition function factorizes: and thereforeN Recall that the q-binomial coefficient at a root of unity can be expressed as a regular binomial coefficient, cf. (2.29) and (2.27).

G = O(n)
The n-domain wall theory for 4d N = 1 SYM with G = Spin(N ) is proposed to be O(n) 1 N −2−n,N −n+1 Chern-Simons theory. Let us proceed to study the partition functions of O(n) 1 k,L . The O(n) 1 k,L Chern-Simons theory is defined as [23] O(n) 1 k,L := where (Z 2 ) L ↔ Spin(L) −1 denotes a Z 2 gauge theory with twist L, and the quotient denotes the gauging of a diagonal Z 2 one-form symmetry. The value of the level we shall be interested in is L = k + 3. On the other hand, the first factor is given by the following:

JHEP03(2021)259
• If n is even, the theory O(n) 1 k,0 is defined as the CM-orbifold of SO(n) k . Here C denotes the charge-conjugation Z 2 zero-form symmetry that acts by permuting the last two Dynkin labels in SO(n), and M is the magnetic Z 2 zero-form symmetry that is dual to the gauged one-form Z 2 symmetry in the denominator of SO(n) k ≡ Spin(n) k /Z 2 . As such, it permutes the lines that split in the quotient, i.e., the lines of Spin(n) k that are fixed by fusion with the extending simple current.
• If n is odd, the group O(n) is a direct product of SO(n) and Z 2 . The Chern-Simons theory O(n) 1 k,0 itself does not necessarily factorize, because of the convention of which Z 2 subgroup the reflection represents. The choice in [23] was (4.37) Let us compute the different traces in this theory. As above, the details depend sensitively on the parity of n and k, so we consider each case separately.
Even/Even. We begin with the theory Spin(2n) 2k . Its integrable representations satisfy which has tr Spin(2n) 2k (1) solutions (cf. (A.12)). We now construct SO(2n) 2k , i.e., we gauge a Z 2 one-form symmetry, which acts as λ 0 ↔ λ 1 and λ n−1 ↔ λ n . This is a bosonic quotient. The neutral representations satisfy λ n−1 + λ n = even, which has solutions. These are divided into length-2 orbits, and fixed points. The former satisfy λ 0 = λ 1 ∨ λ n−1 = λ n , and the latter λ 0 = λ 1 ∧ λ n−1 = λ n . The number of fixed points is (4.40) and the number of length-2 orbits is 1 2 (N − F). Finally, the number of representations of SO(2n) 2k is which is invariant under n ↔ k, as expected by level-rank duality. This also agrees with expression (A.15). We now orbifold by CM, which acts by swapping the lines in 2F pairwise, and as λ n−1 ↔ λ n . The representations that are fixed under CM are the subset of the length-2

JHEP03(2021)259
Take the states of O(2n) 1 2k,0 as above, i.e., N twisted and N untwisted , and tensor by Spin(2k + 3) −1 = {1, σ, χ}. The NS and R lines are as follows: We now quotient by the Z 2 one-form symmetry. This symmetry maps 1 ↔ χ, and it fixes σ; and, also, it permutes lines in A pairwise, a ↔ a , and it fixes those in 1 4 B+F. Therefore, in the NS sector it acts as which are all length-two orbits (recall that there are never fixed-points in the NS sector). Thus, the dimension of the Hilbert space is This corresponds to the trace of 1 over the Hilbert space on any of the spatial spin structures. Consider now the R sector. The one-form symmetry acts as and so all of A are in length-two orbits, while all of 1 4 B + F are fixed-points. Thus, the number of fermions and bosons is (4.52) Note that N boson +N fermion agrees with the dimension of the Hilbert space as computed in the NS sector (cf. (4.50)). On the other hand, the trace in the odd spin structure, weighted by fermion parity, is N boson − N fermion : As a consistency check, recall that one can also express the fermionic trace as (3.19)). The dimension of the bosonic Hilbert space is  (4.55) which indeed matches the expression above.
Recall that the conjectured infrared theory corresponding to the n-domain wall of Spin(N ) was W n = O(n) 1 k,k+3 , with k = N − 2 − n. Using this value of the level in (4.53) indeed reproduces the Witten indices computed in the ultraviolet, cf. (2.46).

Odd/Odd. We consider
As the theory is a tensor product, the traces factorize: For example, the Z 2 gauge theory has four states, all bosonic, tr (Z 2 ) 2(n+k) (−1) F ≡ 4, which means that the untwisted index is where we have used the trace of SO(2n + 1) 2k+1 as given in (A.10). Similarly, the index twisted by the zero-form symmetry c has tr (Z 2 ) 2(n+k) (c) ≡ 2, where c acts by permuting the two spinors (this is the only zero-form symmetry of this Z 2 gauge theory, cf. [58,60]; it fixes both the identity and the vector). On the other hand, the only zero-form symmetry of SO(2n + 1) 2k+1 is fermion parity, 20 and there is in fact a natural identification c = (−1) F (cf. [23]). Thus, the c-twisted trace weighted by fermion parity actually computes the untwisted trace, with antiperiodic (NS) boundary conditions on the time circle: where we have used (A.9). All in all, the twisted trace of O(2n + 1) 1 2k+1,2k+4 is The index twisted by the one-form symmetry is also straightforward. This symmetry is Z 2 2 for O(4n + 1) 4k+1 and O(4n + 3) 4k+3 , and Z 4 for O(4n + 1) 4k+3 and O(4n + 3) 4k+1 . 20 The Dynkin diagram of SO(N ) for N odd has no reflection symmetries, i.e., its outer automorphism group is trivial. Thus, the zero-form symmetries of SO(N ), if any, must be due to the global structure of the group, as its algebra has no symmetries. Indeed, the zero-form symmetry comes from π1(SO(N )) = Z2, but this is just the magnetic dual to the gauged Z2 one-form symmetry, which means that the magnetic symmetry is formally just (−1) F . If we were to gauge this symmetry, we would recover Spin(N ).

JHEP03(2021)259
These correspond to fusion with the abelian anyons of Spin(L) −1 , with L = 0 mod 4 and L = 2 mod 4 respectively, which indeed have a Z 2 2 /Z 4 fusion algebra. As abelian fusion has no fixed-points, all the twisted traces vanish: where (g 1 , g 2 ) ∈ Z 2 2 and g ∈ Z 4 , respectively. Recall that the conjectured infrared theory corresponding to the n-domain wall of Spin ( Odd/Even & Even/Odd. We only need to consider one; the other follows by the levelrank duality. Take Note that there are no fixed points, and all orbits are of length 2: Therefore, a set of representatives can be taken as λ tensor ⊗ 1 and λ spinor ⊗ m. In what follows we drop the second label, as it is correlated with λ in a unique way. The number of tensors and spinors is (cf. (A.5)) We now tensor the theory by a factor of Spin(2k + 3) −1 = {1, σ, χ}, and gauge the fermionic one-form symmetry generated by f = a⊗χ. The Ramond sector requires h α×f = h α mod 1, which means that the lines are (λ tensor , σ), (λ spinor , 1 or χ) . (4.66) Note that only the former can be a fixed-point under the fermionic quotient, inasmuch as χ × σ = σ while χ : 1 ↔ χ. In particular, the fixed-points are λ tensor , λ 0 = λ 1 , (4.67)

G = G 2
The 2-domain wall theory for 4d N = 1 SYM with G = G 2 is SO(3) 3 ×S 1 , where S 1 denotes then nonlinear sigma model with S 1 target space. We already proved in section 3.1 that the theory SO(3) 3 has vanishing Witten index, and since there is a unique vacuum of the S 1 sigma model on the torus, the infrared index vanishes. This matches the Witten index computed in the ultraviolet, which is given by the coefficient of q 2 in (1.20). Indeed, expanding this polynomial one finds that the index vanishes.
The domain wall with n = 1 (and n = 3, which is the anti-wall of n = 1) is addressed below.

Minimal wall for arbitrary gauge group
The n = 1 domain wall theory for 4d N = 1 SYM with arbitrary G is proposed to be G −1 Chern-Simons theory.

JHEP03(2021)259
As G is simply-connected, the theory is naturally bosonic, and the trace tr G −1 (−1) F computes the dimension of the Hilbert space, that is, the number of integrable representations at level 1. In other words, the trace is the number of solutions to (4.4) with k = 1, namely which, as in (2.59), requires λ i = 1 for some i with a ∨ i = 1, and λ j = 0 for all j = i. Therefore, the trace is where m 1 denotes the number of nodes in the Dynkin diagram of G that have comark equal to 1. This clearly reproduces the ultraviolet index (2.60), as required.
For simply-laced G, G −1 Chern-Simons theory is in fact an abelian TQFT, and all the lines generate one-form symmetries. The number of lines is the number of one-form symmetries, that is, the order of Γ, which indeed agrees with m 1 . Equivalently, it is known that simply-laced theories at level 1 admit a K-matrix representation, where one can take K as the Cartan matrix of g. The number of states is indeed det(K) ≡ |Γ|. 21 One can define a zero-form twisted index for (E 6 ) −1 . The only node with comark 1 preserved by the charge conjugation symmetry of this theory is the extended node, and thus (4.73) Since (E 6 ) −1 and (E 7 ) −1 are abelian, twisting by a one-form symmetry has no fixed points and

Concluding remarks and open questions
In this paper we have proposed explicit 3d topological field theories on the domain walls of 4d N = 1 SYM with gauge group G. We have found precise agreement between computations carried out in terms of the ultraviolet 4d degrees of freedom (gluons and gluinos) and the conjectured infrared topological 3d degrees of freedom. We have highlighted the importance in identifying the infrared of the domain wall theories of studying the Hilbert space of spin TQFTs, in particular the partition function in the R-R sector and identifying the fermionic states in the Hilbert space, as opposed to merely counting states. The nontrivial matching of the twisted Witten indices provides strong support for our proposal. A heuristic argument can be made in favor of our proposal that the n-domain wall in 4d N = 1 SYM with gauge group G is the infrared of 3d N = 1 G h/2−n SYM (see equation (1.3)). 22 Consider 4d SYM on R 3 × S 1 with the YM θ-angle linear in the S 1 21 Note that abelian systems typically have a very large number of zero-form symmetries [58], most of which are emergent in our picture, inasmuch as the ultraviolet theory only has C as its zero-form symmetry group. 22 We would like to thank D. Gaiotto for an interesting discussion regarding this point.

JHEP03(2021)259
coordinate and winding number n around the circle. This theory can be defined while preserving half of the supersymmetry. 23 When the radius of the circle is large one can expect the theory to be gapped everywhere except at the location of the wall W n . For small radius, the theory reduces to 3d N = 1 G −n SYM with an adjoint real multiplet (the scalar is compact, as it arises from reducing the gauge field along a circle). It was argued in [61] that with a suitable superpotential for the real multiplet, the multiplet gaps out and flows to 3d N = 1 G h/2−n SYM, where the shift is induced by integrating out the massive fermion in the real multiplet. Assuming that there is no phase transition as the size of the circle is reduced leads to the proposal (1.3). However, the lack of control over the superpotential upon reduction makes the argument suggestive but heuristic. The n > 1 domain wall theories for the groups G = F 4 , E 6 , E 7 and E 8 remain to be discovered. Equivalently, the phase diagram of the corresponding 3d N = 1 G k SYM with k < h/2 − 1 remains elusive. We collect in appendix B the twisted partition functions computed in the ultraviolet for future reference. One strategy towards the identification of the infrared domain wall theory is to search for novel level-rank dualities in G k Chern-Simons theories that go beyond the ones that follow from conformal embeddings. In general, level-rank dualities follow from embeddings into holomorphic theories (theories with only one state), and this approach could lead to suitable level-rank dualities and in turn to explicit proposals for the remaining 3d N = 1 G k SYM phase diagrams (and associated 4d domain walls).
In this paper we have made an intriguing connection between the Hilbert space of Chern-Simons theories on the torus and the Hilbert space of fermions in 0 + 1 dimensions labeled by the extended Dynkin diagram g (1) corresponding to a Lie group G. That is, the fermionic Hilbert space H n F with energy n is isomorphic as super-vector spaces to the R-R Hilbert space of a suitable spin TQFT, which we denote by TQFT n (1) ←→ U(2) 3n,2−n .
(5.2) 23 The Lagrangian of this theory can be written as L = d 2 ϑ XWαW α , where X is a background chiral multiplet and Wα the chiral gauge field strength. Re(X) determines the gauge coupling and Im(X) the θangle. The background Im(X) ∝ nx3 with FX ∝ in preserves half of the supersymmetries. The background for FX induces a mass term for the gaugino ∝ inλγ (5) γ 3 λ, where λ is Majorana. 24 In writing this we use the duality (G2)1 ↔ U(2)3,1 and the notation U(2)6,0 ≡ SO(3)3 × S 1 .

JHEP03(2021)259
Another route to constructing the domain walls for G = F 4 , E 6 , E 7 and E 8 is to identify the TQFT whose R-R Hilbert space on the torus is that of the collection of free fermions based on the corresponding affine Dynkin diagram g (1) .

A Chern-Simons with unitary and orthogonal groups
In this appendix we compute several traces on the torus Hilbert space of Chern-Simons theories over simply-connected Lie groups. These traces are useful when studying more complicated theories over non-simply-connected groups.

A.1 G = SU(n)
Consider the algebra A n−1 = su n . The comarks are all a ∨ i = 1. Plugging this into (4.11) we get the generating function as and, by expanding, the untwisted trace This is the number of integrable representations of SU(n) k , that is, the dimension of the torus Hilbert space of this Chern-Simons theory. This result will be useful when we discuss the Chern-Simons theory over the unitary group U(n), see section 4.2.

JHEP03(2021)259
This is the number of integrable representations of Spin(2n+1) k , that is, the dimension of the torus Hilbert space of this Chern-Simons theory. For future reference, it is also useful to break up the states into the tensors and spinors. In other words, we shall be interested in knowing how many of the states of Spin(2n+1) are tensorial representations, and how many are spinorial representations. These are defined by λ n = even and λ n = odd, respectively, which yields the following: For a more interesting example, let us now compute the partition function of SO(2n + 1) k = Spin(2n + 1) k /Z 2 , which corresponds to the algebra so 2n+1 extended by the simple current χ = [0, k, 0, . . . , 0]. This current has spin h χ = k/2, and so the extension is fermionic for odd k. The current acts on a given representation [λ 0 , λ 1 , . . . , λ n ] as λ 0 ↔ λ 1 .
Consider first the case of even k, so that SO(2n + 1) k makes sense as a bosonic theory. The extension has two effects: first, it projects out all the spinors, and second, it organizes the tensors into Z 2 -orbits. Such an orbit may have length two or one; the latter corresponds to a fixed-point under spectral flow, i.e., to a tensor with λ 0 = λ 1 , which splits into two primaries in the quotient. The number of fixed-points corresponds to the number of solutions to λ 0 + λ 1 + 2(λ 2 + · · · + λ n−1 ) + λ n = k with λ 0 = λ 1 and λ n even, i.e., n+k/2−1 k/2 . Therefore, the number of conformal blocks is Let now k be odd, which makes SO(2n + 1) k a spin theory. The total number of states is the same on every spin structure, so we shall count the bosons and fermions in the Ramond sector (which is the richest case, as only this sector may contain fermions). The total number of states is the sum, while the Witten index is the difference. In the Ramond sector, the quotient projects out the tensors, and it organizes the spinors into Z 2 -orbits. The bosons are the length-two orbits, and the fermions are the fixed-points. The latter are the representations with λ 0 + λ 1 + 2(λ 2 + · · · + λ n−1 ) + λ n = k with λ 0 = λ 1 and λ n odd, for all spatial spin structures, except for the odd structure for which We see that tr (1) is invariant under n ↔ k, as required by level-rank duality. Similarly, tr(−1) F is invariant up to a sign, which is due to the difference in the framing anomalies (i.e., the precise level-rank duality [26] is SO(2n + 1) 2k+1 ↔ SO(2k + 1) −2n−1 × SO((2n + 1)(2k+1)) 1 , with the invertible factor contributing with a global factor of (−1) (2n+1)(2k+1) ≡ −1 to the trace, cf. (3.24)).

(A.12)
This is the number of integrable representations of Spin(2n) k , that is, the dimension of the torus Hilbert space of this Chern-Simons theory. For future reference, it is also useful to break up the states into the tensors and spinors. In other words, we shall be interested in knowing how many of the states of Spin(2n) are tensorial representations, and how many are spinorial representations. These are defined by λ n−1 + λ n = even and λ n−1 + λ n = odd,
Consider first the case of even k, so that SO(2n) k makes sense as a bosonic theory. The extension has two effects: first, it projects out all the spinors, and second, it organizes the tensors into Z 2 -orbits. Such an orbit may have length two or one; the latter corresponds to a fixed-point under spectral flow, i.e., to a tensor with λ 0 = λ 1 and λ n−1 = λ n , which splits into two primaries in the quotient. The number of fixed-points corresponds to the number of solutions to λ 0 + λ 1 + 2(λ 2 + · · · + λ n−2 ) + λ n−1 + λ n = k with λ 0 = λ 1 and λ n−1 = λ n , i.e., n+k/2−2 k/2 . Therefore, the number of conformal blocks is Let now k be odd, which makes SO(2n) k a spin theory. The number of states is the same on every spin structure, so we shall count the bosons and fermions in the Ramond sector (which is the richest case, as only this sector may contain fermions). The total number of states is the sum, while the Witten index is the difference. In the Ramond sector, the quotient projects out the tensors, and it organizes the spinors into Z 2 -orbits. The bosons are the length-two orbits, and the fermions are the fixed-points. Note that the spinors have λ n−1 + λ n = odd, which is incompatible with the fixed-point condition λ n−1 = λ n , and so there are no fixed-points. Thus, the number of bosons and fermions is for all spatial spin structures. Note that the equality of tr(1), tr(−1) F on all spin structures was in fact expected from the level-rank duality SO(2n) 2k+1 ↔ SO(2k + 1) −2n , the

B The exceptional groups
In this appendix we gather the different indices for the exceptional groups, whose domain wall theory is yet to be identified. Any given proposal for the dynamics of such walls ought to be consistent with the indices below. By particle-hole symmetry, the indices satisfy I s n = ±I s h−n , and therefore we only show the first h/2 indices, so as to avoid repetition. We compute the untwisted indices, and the indices twisted by the zero-form and oneform symmetries (see table 1). The symmetries c ∈ C = Z 2 and g ∈ Γ = Z 3 act on the Dynkin diagram of E 6 as follows: The symmetry g ∈ Γ acts on E 7 as follows: Using these diagrams we find: • E 6 : Z(q) = 1 − 3q + 7q 3 − 3q 4 − 6q 5 + · · · Z c (q) = 1 − q − 2q 2 + q 3 + q 4 + 2q 5 + · · · Z g (q) = 1 − 2q 3 + · · · (B.3)