x|}=|G|\sum_{A\in X/G}\sum_{x\in A}\frac{1}{|A|}=|G||X/G|\leavevmode\nobreak\
.$ (3.49) Since the number of fixed points are simply given by the expectation
values of the $\mathcal{U}^{\gamma}(\mathcal{C})$ operator on the two-torus,
we have

$\left|\mathcal{S}_{\text{BE}}/\mathbb{Z}_{N}^{(0)}\right|=\frac{1}{N}\sum_{\gamma\in\mathbb{Z}_{N}^{(0)}}\langle\mathcal{U}^{\gamma}(\mathcal{C})\rangle_{T^{2}}\leavevmode\nobreak\
.$ (3.50)

Sums of these kinds occur when gauging the 0-form symmetry – of course, on
$T^{2}$ we essentially need two such insertions, which we will discuss in
detail below. Amusingly, by 3d modularity, the sum (3.50) is also equal to the
sum over $\langle\Pi^{\gamma}\rangle$, namely the gauging of
$\mathbb{Z}_{N}^{(1)}$ given by (3.29) with $s=0$, so that the total number of
$\mathbb{Z}_{N}^{(0)}$ orbits is also the number
$\left|\mathcal{S}_{\text{BE}}^{\vartheta_{s=0}}\right|$ of ground states in
the $\theta_{s}=0$ universe of the decomposition imposed by
$\mathbb{Z}_{N}^{(1)}$:

$\left|\mathcal{S}_{\text{BE}}/\mathbb{Z}_{N}^{(0)}\right|=\left|\mathcal{J}_{N,K}^{s=0}\right|\leavevmode\nobreak\
.$ (3.51)

Labelling the group elements by $\gamma=n\gamma_{0}$, the sum (3.50) can be
written as a sum over $n$. For an arbitrary integer $N$, due to (3.47), some
terms inside the sum can be identical for different values of $n$ – this
occurs for any two integers $n,n^{\prime}$ related by $d(n)=d(n^{\prime})$.
Indeed, the sum over the full $\mathbb{Z}_{N}$ group collapses to a sum over
the divisors $d$ of $N$ and $K$ only. We are thus interested in the
distribution of subgroups generated by all elements of $\mathbb{Z}_{N}$. The
number of elements of $\mathbb{Z}_{N}$ generating a $\mathbb{Z}_{d}$ subgroup
for given $d$ is given by Euler’s totient function $\varphi(d)$. It counts the
positive integers up to a given integer $d$ that are relatively prime to
$d$.181818In other words, it is the number of integers $k$ in the range $1\leq
k\leq d$ for which the greatest common divisor $\gcd(d,k)$ is equal to 1.
Clearly, $\varphi(1)=1$, and $\varphi(d)=d-1$ if $d$ is prime. The identity:

$\sum_{d|n}\varphi(d)=n\leavevmode\nobreak\ ,$ (3.52)

due to Gauss, partitions any integer $n\in\mathbb{N}$ into the Euler totients
of its positive divisors $d$. We list some useful properties of $\varphi$ in
appendix E.2. This allows us to simplify the sum over $n$ as a sum over
divisors $d$ of $N$ and $K$,

$\sum_{n=0}^{N-1}\langle\mathcal{U}^{n\gamma_{0}}(\mathcal{C})\rangle_{T^{2}}=\sum_{d|\gcd(N,K)}\varphi(d)\binom{\frac{K}{d}-1}{\frac{N}{d}-1}\leavevmode\nobreak\
.$ (3.53)

As a consistency check, let $N$ be prime and $N|K$. Then the only divisors are
$d=1$ and $d=N$, and using $\varphi(N)=N-1$ we obtain $\langle
1\rangle_{T^{2}}+N-1$, which agrees with (3.43) since there are $N-1$ non-
identity elements in $\mathbb{Z}_{N}$. Assuming again the 3d modularity
relation (3.41), (3.53) gives us furthermore the result (3.30) for the 1-form
symmetry gauging in the case where $N$ is prime.

The expression (3.53) is always a multiple of $N$. This is not clear from the
sum itself, and generally no summand inside the sum (3.53) is divisible by
$N$. Rather, the divisibility is a consequence of the Cauchy–Frobenius lemma
(3.50):

$\left|\mathcal{S}_{\text{BE}}/\mathbb{Z}_{N}^{(0)}\right|=\frac{1}{N}\sum_{d|\gcd(N,K)}\varphi(d)\binom{\frac{K}{d}-1}{\frac{N}{d}-1}\leavevmode\nobreak\
.$ (3.54)

Note that this formula holds for any value of $N$ and $K$. For instance, in
the maximally anomalous case where $K$ and $N$ do not share any divisors other
than $d=1$, we demonstrated above that all orbits are of length $N$. This is
consistent with (3.54), which implies that there are
$\left|\mathcal{S}_{\text{BE}}\right|/N$ orbits of equal length, which must
therefore be of length $N$.191919The integer-valued number-theoretic function
(3.54) is well-known in the combinatorics literature: The right-hand-side of
(3.54) is known as the number of cycles of Bulgarian solitaire brandt1982 ;
akin-davis1985 , and it is also the number of _necklaces_ of type $K$, with
$N$ 0’s and $K-N$ 1’s Sloane2014ANO . See also the OEIS sequence A047996.

The Cauchy–Frobenius formula does _not_ tell us directly how many orbits of a
given dimension exist, beyond the total number of orbits given by (3.54).
Indeed, we can imagine partitioning the orbits
$\\{\hat{\omega}\in\mathcal{S}_{\text{BE}}/\mathbb{Z}_{N}^{(0)}\\}$ into all
orbits of the same length, or equivalently, into all orbits with fixed
stabiliser. Since the stabiliser orders – or equivalently the orbit lengths –
are all divisors of $N$, this suggests that we can rewrite (3.54) into a sum
over orbits of length $d$. We will explain below that this is not a simple
rearrangement of the sum – that is, the numbers of orbits of fixed lengths
cannot, in general, be expressed in terms of simple binomial factors.

Insertion of zero-form symmetry operators. Let us now consider the insertion
of arbitrary line operators for the zero-form symmetry, as set up in section
2.2. Consider first the case $g=1$, which has a spatial direction
$\mathcal{C}$ and a Euclidean time direction $\tilde{\mathcal{C}}$. According
to (2.61), the general insertion of
$\mathcal{U}^{\gamma}(\mathcal{C})\;\mathcal{U}^{\gamma^{\prime}}(\widetilde{\mathcal{C}})$
on $T^{2}$ counts the number of fixed points under both $\gamma$ and
$\gamma^{\prime}$. This amounts to solving a slightly modified counting
problem: if some Bethe vacuum $\hat{u}$ is fixed under
$\gamma\in\mathbb{Z}_{N}$, it is consequently also fixed under $n\gamma$, for
any $n$. Thus if $n^{\prime}$ is a multiple of $n$, then the fixed points
under both $n\gamma_{0}$ and $n^{\prime}\gamma_{0}$ are simply the ones fixed
under $n\gamma_{0}$ (and vice versa). But even if neither $n$ or $n^{\prime}$
is a multiple of the other, they can still be embedded into a larger subgroup
of $\mathbb{Z}_{N}$.202020As an example, consider $N=12$, where the subgroups
are depicted in figure 8. Then $n=4$ and $n^{\prime}=6$ generate a
$\mathbb{Z}_{3}$ and $\mathbb{Z}_{2}$ subgroup of $\mathbb{Z}_{12}$,
respectively. However, even though the orders of the subgroups are coprime,
they both sit in a $\mathbb{Z}_{\text{lcm}(2,3)}=\mathbb{Z}_{6}$ subgroup of
$\mathbb{Z}_{12}$, generated of course by $2\gamma_{0}$. The fixed points
under both $4\gamma_{0}$ and $6\gamma_{0}$ thus include the fixed points under
$2\gamma_{0}$. But these are in fact all fixed points that are shared by
$4\gamma_{0}$ and $6\gamma_{0}$. This is because the group generated by
$4\gamma_{0}$ and $6\gamma_{0}$ necessarily contains $2\gamma_{0}$, and thus
if $\hat{u}$ is fixed by both $4\gamma_{0}$ and $6\gamma_{0}$, then it is also
fixed by $2\gamma_{0}$.

To make this precise, consider two group elements $n\gamma_{0}$ and
$n^{\prime}\gamma_{0}$, labelled by $n,n^{\prime}=1,\dots,N-1$. Then $\langle
n\gamma_{0}\rangle$ and $\langle n^{\prime}\gamma_{0}\rangle$ generate
subgroups of order $\frac{N}{\gcd(n,N)}$ and $\frac{N}{\gcd(n^{\prime},N)}$.
Both of these groups sit in the larger group
$\langle\gcd(n,n^{\prime})\gamma_{0}\rangle$ inside $\mathbb{Z}_{N}$, in the
sense that the latter contains both elements $n\gamma_{0}$ and
$n^{\prime}\gamma_{0}$. The subgroup
$\langle\gcd(n,n^{\prime})\gamma_{0}\rangle={\rm
H}_{(n\gamma,n^{\prime}\gamma)}^{(0)}$ is precisely the one described above
equation (2.63). Therefore, the vacua that are fixed under both $n\gamma_{0}$
and $n^{\prime}\gamma_{0}$ are exactly those fixed by
$\gcd(n,n^{\prime})\gamma_{0}$, hence we have:

$\displaystyle\langle\mathcal{U}^{n\gamma_{0}}(\mathcal{C})\;\mathcal{U}^{n^{\prime}\gamma_{0}}(\widetilde{\mathcal{C}})\rangle_{T^{2}}=\langle\mathcal{U}^{\gcd(n,n^{\prime})\gamma_{0}}(\mathcal{C})\rangle_{T^{2}}\leavevmode\nobreak\
.$ (3.55)

We can alternatively understand this identity from the geometry of the two-
torus inside $T^{3}=T^{2}\times S^{1}$. We can associate to the operator
$\mathcal{U}^{n\gamma_{0}}(\mathcal{C})\;\mathcal{U}^{n^{\prime}\gamma_{0}}(\widetilde{\mathcal{C}})$
the cycle $n\mathcal{C}+n^{\prime}\tilde{\mathcal{C}}$ in the first homology
$H_{1}(T^{2},\mathbb{Z})$. The mapping class group of $T^{2}$ allows us to
simplify this cycle to $\gcd(n,n^{\prime})\mathcal{C}$, which is again
associated to the operator
$\mathcal{U}^{\gcd(n,n^{\prime})\gamma_{0}}(\mathcal{C})$.

Using (3.48), we can make (3.55) completely explicit. Since the gcd is
associative, it follows that:

$\langle\mathcal{U}^{n\gamma_{0}}(\mathcal{C})\;\mathcal{U}^{n^{\prime}\gamma_{0}}(\widetilde{\mathcal{C}})\rangle_{T^{2}}=\binom{\frac{K}{N}\gcd(n,n^{\prime},N)-1}{\gcd(n,n^{\prime},N)-1}\,\delta_{K\text{
mod }\frac{N}{\gcd(n,n^{\prime},N)},0}\leavevmode\nobreak\ .$ (3.56)

The insertion of an arbitrary topological line for $\mathbb{Z}_{N}^{(0)}$ on
$\Sigma_{g}$ follows analogously. When inserting the generic topological
operator $\mathcal{U}^{\bm{\gamma}}$ (2.57), we sum over the fixed points
$\mathcal{S}_{\text{BE}}^{(\bm{\gamma})}$, where
$\bm{\gamma}=(\gamma_{i})\in\mathbb{Z}_{N}^{2g}$. For $g>1$, the insertion
furthermore involves the evaluation of the handle-gluing operator
$\mathcal{H}$ on the fixed points, as in (2.62). Unlike in the case where
there is only one fixed point and we were able to evaluate (3.44), we do not
have such a simple formula available in the case of multiple fixed points.
Indeed, we do not expect such a simple formula for arbitrary $\bm{\gamma}$ –
after all, even for $\bm{\gamma}$ the trivial element,
$\langle\mathcal{U}^{\bm{\gamma}=0}\rangle_{\Sigma_{g}}=\langle
1\rangle_{\Sigma_{g}}$ is given by the Verlinde formula (3.12), for which no
‘simpler’ algebraic expression is known.

####  3.1.3 ’t Hooft anomaly and the allowed $(SU(N)/\mathbb{Z}_{r})_{K}$ CS
theories

The ’t Hooft anomaly (2.40) can be computed from the twisted superpotential
(3.2). It reads:

$\mathcal{A}(\gamma_{(0)},\gamma_{(1)})=\gamma_{(1)}K\gamma_{(0)}\text{ mod
}1={(N-1)K\over N}nm\text{ mod }1\leavevmode\nobreak\ ,$ (3.57)

hence the anomaly coefficient that enters in (2.47) is $\mathfrak{a}=-K\text{
mod }N$. Here we parameterise $\mathbb{Z}_{N}^{(1)}\oplus\mathbb{Z}_{N}^{(0)}$
by the two integers $m,n\in\mathbb{Z}_{N}$, with $\gamma_{(1)}=m\gamma_{0}$
and $\gamma_{(0)}=n\gamma_{0}$. We thus have the anomalous commutator:

$\Pi^{m\gamma_{0}}\mathcal{U}^{n\gamma_{0}}=e^{-2\pi imn{K\over
N}}\,\mathcal{U}^{m\gamma_{0}}\Pi^{n\gamma_{0}}\leavevmode\nobreak\ .$ (3.58)

This directly implies that certain mixed correlation functions must vanish:

$mn\frac{K}{N}\not\in\mathbb{Z}\qquad\Longrightarrow\qquad\left\langle\Pi^{m\gamma_{0}}\mathcal{U}^{n\gamma_{0}}(\mathcal{C})\right\rangle_{\Sigma_{g}}=0\leavevmode\nobreak\
.$ (3.59)

Note that having an anomalous commutator is a sufficient condition for the
correlator to vanish, but not a necessary one. In fact, 3d modularity implies
that the mixed correlator in (3.59) vanishes if and only if $d=N/\gcd(m,n,N)$
is not a divisor of $K$, that is, if $\gcd(m,n,N)K/N$ is not an integer – this
will be discussed in subsection 3.2 below.

It is interesting to look for subsets of topological operators that are
mutually commuting, so that the corresponding symmetries can be gauged. These
correspond to $n$, $m$ such that:

$mn{K\over N}\in\mathbb{Z}\qquad\Leftrightarrow\qquad
mn\in\frac{N}{\gcd(N,K)}\mathbb{Z}\leavevmode\nobreak\ .$ (3.60)

As discussed above (see (3.46) in particular), each element
$n\in\mathbb{Z}_{N}$ generates a subgroup
$\mathbb{Z}_{d(n,N)}\subseteq\mathbb{Z}_{N}$. Then, one finds that the
possible non-anomalous subgroups
$\mathbb{Z}_{d}^{(1)}\oplus\mathbb{Z}_{d^{\prime}}^{(0)}\subseteq\mathbb{Z}_{N}^{(1)}\oplus\mathbb{Z}_{N}^{(0)}$
are:

$\left\\{\mathbb{Z}_{d}^{(1)}\oplus\mathbb{Z}_{d^{\prime}}^{(0)}\,\Big{|}\,d,d^{\prime}|N\text{
and }dd^{\prime}\in\gcd(N,K)N\,\mathbb{Z}\right\\}\leavevmode\nobreak\ .$
(3.61)

We are particularly interested in the case $d=d^{\prime}\equiv r$, so that
$\mathbb{Z}_{r}$ can be interpreted as a one-form symmetry in 3d. These are
the subgroups:

$\left\\{\mathbb{(}\mathbb{Z}_{r}^{(1)})_{\rm
3d}\subseteq(\mathbb{Z}_{N}^{(1)})_{\rm 3d}\,\Big{|}\,r|N\text{ and
}r^{2}\in\gcd(N,K)N\,\mathbb{Z}\right\\}\leavevmode\nobreak\ ,$ (3.62)

which simply correspond to a particular subset of divisors of $N$. Note that
having a non-anomalous $(\mathbb{Z}_{r}^{(1)})_{\rm 3d}$ is equivalent to the
existence of the corresponding Chern–Simons theory on spin three-manifolds:

${KN\over r^{2}}\in\mathbb{Z}\qquad\Leftrightarrow\qquad\text{3d
$\mathcal{N}=2$ CS }(SU(N)/\mathbb{Z}_{r})_{K}\;\text{ exists.}$ (3.63)

See e.g. Argurio:2024oym ; Hsin:2020nts  for recent discussions of this
condition.

###  3.2 Mixed correlators and a modular anomaly on $T^{3}$

It is interesting to compute the action the $\mathbb{Z}_{N}^{(1)}$ operators
on Bethe states fixed by (part of) $\mathbb{Z}_{N}^{(0)}$. In the simplest
case, consider the case where $\hat{u}^{(\mathbb{Z}_{N})}$ is fixed by the
full $\mathbb{Z}_{N}^{(0)}$. Such vacua only occur in the non-anomalous case,
$\kappa\equiv{K\over N}\in\mathbb{Z}$, and the calculation (D.2) in Appendix
D.1 shows that:

$\Pi^{\gamma_{0}}\lvert\hat{u}^{(\mathbb{Z}_{N})}\rangle=(-1)^{(N-1)(\kappa-1)}\,\lvert\hat{u}^{(\mathbb{Z}_{N})}\rangle\leavevmode\nobreak\
.$ (3.64)

This directly implies that:

$\left\langle\Pi^{\gamma_{0}}\mathcal{U}^{\gamma_{0}}(\mathcal{C})\right\rangle_{T^{2}}=\sum_{\hat{u}\in\mathcal{S}_{\text{BE}}^{(\gamma_{0})}}\langle\hat{u}\rvert\Pi^{\gamma_{0}}\lvert\hat{u}\rangle=\langle\hat{u}^{(\mathbb{Z}_{N})}\rvert\Pi^{\gamma_{0}}\lvert\hat{u}^{(\mathbb{Z}_{N})}\rangle=(-1)^{(N-1)(\kappa-1)}\leavevmode\nobreak\
.$ (3.65)

Hence we have:

$\left\langle\Pi^{\gamma_{0}}\mathcal{U}^{\gamma_{0}}(\mathcal{C})\right\rangle_{T^{2}}=(-1)^{(N-1)(\kappa-1)}\,\left\langle\mathcal{U}^{\gamma_{0}}(\mathcal{C})\right\rangle_{T^{2}}\leavevmode\nobreak\
.$ (3.66)

On $T^{3}$, we should be able to map the 1-cycle $\mathcal{C}+[S^{1}_{A}]$ to
the 1-cycle $\mathcal{C}$ at no cost by a 3d modular transformation, hence the
non-trivial sign when $N$ and $\kappa$ are both even is interpreted as a non-
trivial 3d modular anomaly. (Note that the simplest instance of this anomaly
is for $N=2$ and $K\in 4\mathbb{Z}$, as discussed already in (1.20) in section
1.1.)

More generally, we may consider the action of $\Pi^{m\gamma_{0}}$ on the Bethe
states fixed by $\mathbb{Z}_{d}^{(N)}\subseteq\mathbb{Z}_{N}^{(0)}$:

$\Pi^{m\gamma_{0}}\lvert\hat{u}^{(\mathbb{Z}_{d})}\rangle=(-1)^{m(N-1)}e^{-2\pi
im{\ell\over N}}\lvert\hat{u}^{(\mathbb{Z}_{d})}\rangle\leavevmode\nobreak\ .$
(3.67)

Here, the action is generally by a $N$-th root of unity, and different states
is the same orbit $\hat{\omega}$ with ${\rm
Stab}(\hat{\omega})=\mathbb{Z}_{d}$ can have different values of $\ell$ (they
differ by integer multiples of $K$ mod $N$, as implied by (3.38)). The
explicit computation of mixed correlations functions on $T^{3}$ is therefore
more involved. We find:

$\big{\langle}\Pi^{m\gamma_{0}}\mathcal{U}^{n\gamma_{0}}(\mathcal{C})\big{\rangle}_{T^{2}}=(-1)^{mn\left({K\over
N}+1\right)(N-1)}\big{\langle}\mathcal{U}^{{\rm
gcd}(m,n)\gamma_{0}}(\mathcal{C})\big{\rangle}_{T^{2}}\leavevmode\nobreak\ ,$
(3.68)

which naturally generalises (3.66). Here the correlators on both sides vanish
whenever $mn({K\over N}+1)\notin\mathbb{Z}$, which can be shown to follow from
(3.56). For the non-zero correlators, we find the non-trivial sign in (3.68) –
this give us the general form of the 3d modular anomaly on $T^{3}$.

This anomaly should be understood as a 3d mixed anomaly between gravity (the
3d Lorentz group) and the one-form symmetry $(\mathbb{Z}_{N}^{(1)})_{\rm 3d}$,
or more generally between gravity and a non-anomalous subgroup
$(\mathbb{Z}_{r}^{(1)})_{\rm 3d}$ for $r|N$. The corresponding four-
dimensional anomaly theory takes the form Hsin:2018vcg :

$S_{\text{grav anomaly}}=2\pi
h\int_{\mathfrak{M}_{4}}w_{2}(\mathfrak{M}_{4})\cup
B^{(r)}\leavevmode\nobreak\ ,\qquad\qquad h\equiv{(K-N)N\over 2r^{2}}\text{
mod }1\leavevmode\nobreak\ ,$ (3.69)

where $w_{2}(\mathfrak{M}_{4})\in H^{2}(\mathfrak{M}_{4},\mathbb{Z}_{2})$ is
the second Stiefel–Whitney class of the 4-manifold and $B^{(r)}$ is the
$(\mathbb{Z}_{r}^{(1)})_{\rm 3d}$ background gauge field. This is a
$\mathbb{Z}_{2}$-valued anomaly: for $(\mathbb{Z}_{r}^{(1)})_{\rm 3d}$ a non-
anomalous subgroup, the anomaly coefficient $h$ in (3.69) takes the values
$h=0$ or ${\frac{1}{2}}$, as one can readily check e.g. using the property
(3.63) that ${KN\over r^{2}}\in\mathbb{Z}$. In fact, one can check that:

$h=\begin{cases}{\frac{1}{2}}\qquad&\text{if }N\text{ is even,
}\tfrac{N}{r}\text{ is odd and }\tfrac{K}{r}\text{ is even,}\\\
0\quad&\text{otherwise.}\end{cases}$ (3.70)

Indeed, we have $h={\frac{1}{2}}$ if and only if the sign appearing in (3.68)
is non-trivial.212121This is explained in detail in appendix D.3. Physically,
this anomaly is best understood by considering the spin of the topological
lines in the underlying bosonic 3d TQFT Hsin:2018vcg , which is the
$\mathcal{N}=0$ $SU(N)_{k}$ CS theory with $k=K-N$. As we will discuss further
in section 4.1, the $\mathbb{Z}_{N}$ one-form symmetry is generated by a
particular Wilson line in 3d, the abelian anyon denoted by
$a\cong\mathcal{U}^{\gamma_{0}}$ that satisfies $a^{N}=1$ under fusion. Given
the $(\mathbb{Z}_{N}^{(1)})_{\rm 3d}$ ’t Hooft anomaly $\mathfrak{a}=-K\,{\rm
mod}\,N$, one can show that the 3d spin of the invertible symmetry line
$a^{n}\cong\mathcal{U}^{n\gamma_{0}}$ is given by Hsin:2018vcg :

$h[a^{n}]={(K-N)n^{2}\over 2N}\,\text{ mod }1\leavevmode\nobreak\ .$ (3.71)

The line $a^{n}$ generates the subgroup $(\mathbb{Z}_{r}^{(1)})_{\rm 3d}$ with
$r={N/n}$, assuming ${\rm gcd}(N,n)=n$ without loss of generality. Hence we
have:

$h[a^{n}]={(K-N)N\over 2r^{2}}\text{ mod }1={\frac{1}{2}}{K\over r}{N\over
r}-{\frac{1}{2}}\left({N\over r}\right)^{2}\text{ mod }1\leavevmode\nobreak\
.$ (3.72)

This satisfies $h[a^{n}]\in{\frac{1}{2}}\mathbb{Z}$ if and only
$(\mathbb{Z}_{r}^{(1)})_{\rm 3d}$ is non-anomalous. Furthermore, we directly
notice that $h[a^{n}]$ exactly reproduces the
gravity-$(\mathbb{Z}_{r}^{(1)})_{\rm 3d}$ anomaly coefficient $h$ in (3.69),
not coincidentally, hence the generating line $a^{n}$ has half-integer spin
depending on the properties of $N$, ${K\over r}$ and ${N\over r}$ exactly as
in (3.70).

The generating line $a^{n}$ being non-anyonic (that is, having
$h\in{\frac{1}{2}}\mathbb{Z}$) is necessary for having a consistent gauging of
the 3d TQFT. While the underlying $\mathcal{N}=0$ CS theory $SU(N)_{K-N}$ is a
bosonic TQFT, the CS theory $(SU(N)/\mathbb{Z}_{r})_{K-N}$ that results from
the $\mathbb{Z}_{r}$ one-form gauging is actually a spin-TQFT if and only if
$h={\frac{1}{2}}$, as explained in Hsin:2018vcg . The fact that gauging a one-
form symmetry in a bosonic TQFT results in a spin-TQFT is the most physical
way to understand the existence of the mixed anomaly (3.69) – see e.g.
Hsin:2018vcg ; Cordova:2018acb . Thus, we also find the condition for the
bosonic CS theory after gauging to be fermionic – that is, a spin-TQFT:

$\mathcal{N}=0\;\,(SU(N)/\mathbb{Z}_{r})_{K-N}\text{ is a spin-TQFT
}\;\Leftrightarrow\;N\text{ even, }\frac{N}{r}\text{ odd and
}\frac{K}{r}\text{ even.}$ (3.73)

Correspondingly, the 2d WZW$[G_{k=K-N}]$ models for $G=SU(N)/\mathbb{Z}_{r}$
are fermionic CFTs in those cases. For $r=N$, this is the well-known statement
that the $\mathcal{N}=0$ $PSU(N)_{k=K-N}$ CS theory is a spin-TQFT if only if
$N$ is even and ${k\over N}$ is odd Dijkgraaf:1989pz . The result (3.73) is
also in agreement with the literature on 2d (bosonic) WZW$[G]$ for $G$ non-
simply-connected Gepner:1986wi ; Dijkgraaf:1989pz ; Felder:1988sd ;
Numasawa:2017crf ; Alvarez-Gaume:1986rcs .

###  3.3 The $PSU(N)_{K}$ twisted index for $N$ prime

In this subsection, we study the case of $N$ an odd prime number.222222The
case of an even prime number, $N=2$, was discussed in the introduction. It
involves additional subtleties common to all even $N$, which we will address
in the next subsections. For $N$ prime, $\mathbb{Z}_{N}$ has no non-trivial
subgroup and every non-zero element $n\in\mathbb{Z}_{N}$ is a generator. Then,
as explained above, there is a single fixed point if
$\mathfrak{a}\equiv-K\,{\rm mod}\,N=0$ for every $\gamma=n\gamma_{0}$, and no
fixed point if $\mathfrak{a}\neq 0$. Indeed, this follows from our general
discussion of the $\Gamma^{(0)}$ orbits of Bethe vacua in section 2.1.2. For
$N$ prime, we either have no ’t Hooft anomaly ($\mathfrak{a}=0$) or the
maximal anomaly ($\mathfrak{a}\neq 0$); in the former case, we have a unique
orbit of dimension $1$ and all the other orbits are of dimension $N$, while in
the latter case all orbits must be of dimension $N$. This directly implies
that the Witten index of the $\mathbb{Z}_{N}^{(0)}$-gauged $A$-model is given
by:

$Z_{T^{3}}\left[SU(N)_{K}/\mathbb{Z}^{(0)}_{N}\right]={1\over
N}\binom{K-1}{N-1}+\delta_{\mathfrak{a},0}\left(-{1\over
N}+N\right)\leavevmode\nobreak\ ,$ (3.74)

where we are just counting the number of ground states as in (2.79), including
the twisted sectors. Indeed, for $\mathfrak{a}=0$ we have
$(\binom{K-1}{N-1}-1)/N$ maximal orbits plus $N$ twisted sectors from the
length-$1$ orbit, while for $\mathfrak{a}\neq 0$ we only have
$\binom{K-1}{N-1}/N$ maximal orbits.

Let us now gauge the $\mathbb{Z}_{N}^{(1)}$ and $\mathbb{Z}_{N}^{(0)}$
separately, before combining the two if $\mathfrak{a}=0$. The gauging of
$\mathbb{Z}_{N}^{(1)}$ was already discussed in subsection 3.1.1. In
particular, the Witten index of the $\mathbb{Z}_{N}^{(1)}$-gauged $A$-model
for $N\geq 3$ prime is given in (3.30). If we only gauge
$\mathbb{Z}_{N}^{(0)}$ instead, we have:

$Z_{\Sigma_{g}\times S^{1}}\left[SU(N)_{K}/\mathbb{Z}^{(0)}_{N}\right]={1\over
N^{2g-1}}\Big{(}\langle
1\rangle_{\Sigma_{g}}+(N^{2g}-1)\langle\mathcal{U}^{\gamma_{0}}(\mathcal{C})\rangle_{\Sigma_{g}}\Big{)}\leavevmode\nobreak\
,$ (3.75)

where $\mathcal{C}$ is any basis element of $H_{1}(\Sigma_{g},\mathbb{Z})$.
Here, we used the fact that, for $N$ prime, any insertion of the form (2.57)
is equivalent to inserting $\mathcal{U}^{\gamma_{0}}(\mathcal{C})$ because
$\mathbb{Z}_{N}$ has no non-trivial subgroups. Note that we will not keep
track of the dual $1$-form symmetry in what follows – that is, we choose
$C^{D}=0$ in the notation of section 2.4. For $g=1$, we directly see that
(3.75) reproduces (3.74).

The Witten index of the $PSU(N)_{K}$ theory ($N$ prime). For $K\in
N\mathbb{Z}$, the 3d 1-form symmetry is non-anomalous and we can gauge it
fully. We can thus compute the full partition function on $\Sigma_{g}\times
S^{1}$ of the resulting $PSU(N)_{K}$ theory, including the dependence on
$\theta_{s}$, as:

$Z_{\Sigma_{g}\times S^{1}}\left[PSU(N)_{K}^{\theta_{s}}\right]={1\over
N^{2g}}\sum_{m=0}^{N-1}e^{2\pi i{sm\over
N}}\Big{(}\langle\Pi^{m\gamma_{0}}\rangle_{\Sigma_{g}}+(N^{2g}-1)\langle\Pi^{m\gamma_{0}}\mathcal{U}^{\gamma_{0}}(\mathcal{C})\rangle_{\Sigma_{g}}\Big{)}\leavevmode\nobreak\
.$ (3.76)

In particular, setting $g=1$, we find the Witten index of the $PSU(N)_{K}$
$\mathcal{N}=2$ CS theory with $\theta_{s}$ turned on:

$I_{W}\left[PSU(N)_{K}^{\theta_{s}}\right]={1\over
N^{2}}\left(\binom{K-1}{N-1}-1\right)+\delta_{0,s}N\leavevmode\nobreak\ .$
(3.77)

It is a non-trivial mathematical fact that (3.77) defines an integer for any
prime number $N$ and $K\in N\mathbb{Z}$. Let us define the rational number
$M_{N,K}$ through the decomposition:

$\binom{K-1}{N-1}=1+M_{N,K}N^{2}\leavevmode\nobreak\ .$ (3.78)

For $N\geq 3$ prime, the numbers $M_{N,2N}$ are integers called Babbage
quotients babbage1819 , while $\frac{1}{N}M_{N,2N}$ for $N\geq 5$ prime are
integers known as Wolstenholme quotients wolstenholme1862certain . Crucially,
if $N\geq 3$ is prime and $N|K$, then $M_{N,K}$ is an integer. This is a
consequence of Glaisher’s theorem glaisher1900congruences , which we discuss
in some detail in appendix E.1 (see in particular Proposition 1). From (3.78),
we therefore have that:

$\text{I}_{W}[PSU(N)^{\theta_{s}}_{K}]=M_{N,K}+N\delta_{s,0}$ (3.79)

is the Witten index of the pure $PSU(N)_{K}$ CS theory with theta angle
$\theta_{s}$. This gives the seemingly arbitrarily defined integer $M_{N,K}$ a
physical meaning as the Witten index of the $PSU(N)_{K}^{\theta_{s}}$ theory
with $\theta_{s}\neq 0$.

The higher-genus twisted index of the $PSU(N)_{K}$ theory ($N$ prime). For any
$g$, the twisted index (3.76) can be written as:

$\displaystyle Z_{\Sigma_{g}\times
S^{1}}\left[PSU(N)_{K}^{\theta_{s}}\right]={1\over
N^{2g-1}}\left(\sum_{\hat{u}\in\mathcal{S}_{\text{BE}}^{\vartheta_{s}}}\mathcal{H}(\hat{u})^{g-1}+(N^{2g}-1)\sum_{\hat{u}\in\mathcal{S}_{\text{BE}}^{\vartheta_{s}}\cap\mathcal{S}_{\text{BE}}^{(\gamma_{0})}}\mathcal{H}(\hat{u})^{g-1}\right)$
(3.80) $\displaystyle\qquad\qquad\qquad\quad={1\over
N^{2g-1}}\left(\sum_{\underline{l}\in\mathcal{J}^{s}_{N,K}}\mathcal{H}(\hat{u}_{\underline{l}})^{g-1}+(N^{2g}-1)\delta_{s,0}\left({K\over
N}\right)^{(g-1)(N-1)}\right)\leavevmode\nobreak\ ,$

where the set of Bethe vacua in the universe set by $\theta_{s}$ was defined
in (3.26), and in the second line we used (3.44) and the fact that the unique
$\mathbb{Z}_{N}^{(0)}$ fixed point lives in the $\theta_{s}=0$ sector. One
easily checks that setting $g=1$ in (LABEL:Zg_PSUN_N_prime), together with
(3.30), reproduces (3.77).

Explicit examples. For $N$ prime and any $g$, we find:

$\displaystyle Z_{\Sigma_{g}\times
S^{1}}[PSU(N)_{N}^{0}]=N\leavevmode\nobreak\ .$ (3.81)

With some effort, we can work out some closed-form formulas as a function of
$g$ in some special instances. Two such examples are:

$\displaystyle Z_{\Sigma_{g}\times S^{1}}[PSU(3)_{6}^{0}]$
$\displaystyle=4^{g}\leavevmode\nobreak\ ,$ (3.82) $\displaystyle
Z_{\Sigma_{g}\times S^{1}}[PSU(5)_{10}^{0}]$
$\displaystyle=\frac{1}{400}\Big{(}\\!\\!\\!$
$\displaystyle\\!\\!\\!\\!\big{(}9+4\sqrt{5}\big{)}4^{-6g}5^{-5g}\big{(}\sqrt{5}-1\big{)}^{4g}\big{(}3\
20^{5g}\big{(}\sqrt{5}-5\big{)}^{2g}$
$\displaystyle+2\big{(}5-\sqrt{5}\big{)}^{7g}\big{(}5+\sqrt{5}\big{)}^{5g}\big{)}+5\big{(}9-4\sqrt{5}\big{)}\big{(}1+\sqrt{5}\big{)}^{4g}$
$\displaystyle\times\big{(}\frac{1}{2}\big{(}5+\sqrt{5}\big{)}\big{)}^{2g}+32\
5^{g+1}+75\ 2^{4g+1}\Big{)}\leavevmode\nobreak\ .$

Amazingly, the latter expression is an integer. For
$g=0,\;1,\;2,\;3,\;4,\;5,\dots$, we have:

$Z_{\Sigma_{g}\times
S^{1}}[PSU(5)_{10}^{0}]=1,\;10,\;1546,\;2062386,\;2958360826,\;4246815114466,\;\dots\leavevmode\nobreak\
.$ (3.83)

More generally, we checked numerically, in many cases, that the formula
(LABEL:Zg_PSUN_N_prime) always returns an integer, as expected physically.

###  3.4 Gauging the 3d one-form symmetry on $T^{3}$

Let us now compute the Witten index – that is, the $T^{3}$ partition function
– for the 3d $(SU(N)/\mathbb{Z}_{r})_{K}$ $\mathcal{N}=2$ Chern–Simons
theories, for any $N$ and $r$. We do this by gauging a non-anomalous
$\mathbb{Z}_{r}^{(1)}\oplus\mathbb{Z}_{r}^{(0)}$ symmetry in the $A$-model on
$T^{2}$.

Gauging $\mathbb{Z}_{N}^{(0)}$ on $T^{2}$. We first consider gauging only
$\mathbb{Z}_{N}^{(0)}$, which corresponds to summing over all insertions on
$T^{2}$. Using (3.56), we have:

$\displaystyle Z_{T^{3}}\left[SU(N)_{K}/\mathbb{Z}^{(0)}_{N}\right]\\!\\!$
$\displaystyle=$ $\displaystyle\,\,{1\over
N}\sum_{n,n^{\prime}\in\mathbb{Z}_{N}}\langle\mathcal{U}^{n\gamma_{0}}(\mathcal{C})\;\mathcal{U}^{n^{\prime}\gamma_{0}}(\widetilde{\mathcal{C}})\rangle_{T^{2}}$
(3.84) $\displaystyle=$ $\displaystyle\,\,{1\over
N}\sum_{n,n^{\prime}\in\mathbb{Z}_{N}}\binom{\frac{K}{N}\gcd(n,n^{\prime},N)-1}{\gcd(n,n^{\prime},N)-1}\,\delta_{K\text{
mod }\frac{N}{\gcd(n,n^{\prime},N)},0}\leavevmode\nobreak\ ,$

This can be written more elegantly. Similarly to the single sum (3.53), the
double sum in (LABEL:ZN0_gauging_T3_gen_sum) can be reorganised as a sum over
the divisors $d$ of $N$. Thus, for each divisor $d$, we need to count the
pairs $(n,n^{\prime})\in\mathbb{Z}_{N}^{2}$ such that ${\rm
gcd}(n,n^{\prime})\gamma_{0}$ generates
$\mathbb{Z}_{d}\subseteq\mathbb{Z}_{N}^{(0)}$. This number is determined by
Jordan’s totient function $J_{k}(d)$ (which we review below) for $k=2$, so
that:

$Z_{T^{3}}\left[SU(N)_{K}/\mathbb{Z}^{(0)}_{N}\right]={1\over
N}\sum_{d|\gcd(N,K)}J_{2}(d)\binom{\frac{K}{d}-1}{\frac{N}{d}-1}\leavevmode\nobreak\
.$ (3.85)

For $N$ prime, in particular, we have $J_{2}(N)=N^{2}-1$ and $J_{2}(1)=1$, and
then one can easily check that (3.85) reproduces (3.74). We also checked
‘experimentally’ that (3.85) returns an integer for any $N$.232323We checked
this statement numerically for $N,K\leq 4000$. A mathematical proof would be
nice to have. This provides an important consistency check of our overall
normalisation, consistent with the discussion of section 2.4. Indeed, (3.85)
should be integer because it is the 2d Witten index of the orbifolded
$A$-model.

Basics of Jordan’s totient function. Let us briefly review Jordan’s totient
function $J_{k}(d)$ for general $k$, as it will be useful below. Given two
positive integers $k$ and $d$, $J_{k}(d)$ equals the number of $k$-tuples of
positive integers $(n_{i})_{i=1}^{k}$ that are less or equal to $d$ and such
that the $k+1$ integers $(n_{1},\cdots,n_{k},d)$ are coprime. It can be
explicitly computed as:

$J_{k}(d)=d^{k}\prod_{p|d}\left(1-\frac{1}{p^{k}}\right)\leavevmode\nobreak\
,$ (3.86)

where $p$ ranges through all prime divisors of $d$. Note that this obviously
generalises Euler’s totient function $\varphi(d)=J_{1}(d)$. The Jordan’s
totient function allows us to decompose the $k$-power of any integer $N$ into
the divisors of $N$:

$\sum_{d|N}J_{k}(d)=N^{k}\leavevmode\nobreak\ .$ (3.87)

Note also that $J_{k}(1)=1$ and that, for any prime number $p$, we have
$J_{k}(p)=p^{k}-1$. We list further relevant properties of $J_{k}(d)$ in
appendix E.2.

Jordan’s totient function $J_{2}(d)$ has appeared sporadically in the physics
literature, for instance in the context of cyclic group orbifolds in monstrous
moonshine Lin:2022wpx ; Albert:2022gcs , and in the enumeration of the allowed
electric-magnetic charge lattices in 4d $\mathcal{N}=4$ SYM with gauge algebra
$\mathfrak{su}(N)$ Bashmakov:2022uek . More relevantly to the present context,
this function has appeared in the mathematical literature on dimensions of
Verlinde bundles over curves Oprea+2011+181+217 ; alekseev2000formulas ;
beauville1998picard ; osti_10067008 ; oprea2010note .

The Witten index for $PSU(N)_{K}$ for any $N$ and $\theta_{s}=0$. Assuming for
now that $\mathfrak{a}=-K\text{ mod }N=0$, we can gauge the full
$\mathbb{Z}_{N}^{(1)}\oplus\mathbb{Z}_{N}^{(0)}$ to obtain the 3d Witten index
of the $PSU(N)_{K}$ $\mathcal{N}=2$ CS theory. This amounts to summing the
topological lines over all three generators of
$H_{1}(T^{3},\mathbb{Z})\cong\mathbb{Z}^{3}$:

$\textbf{I}_{\text{W}}[PSU(N)^{0}_{K}]=Z_{T^{3}}\left[PSU(N)_{K}^{0}\right]={1\over
N^{2}}\sum_{m,n,n^{\prime}\in\mathbb{Z}_{N}}\langle\Pi^{m\gamma_{0}}\mathcal{U}^{n\gamma_{0}}(\mathcal{C})\;\mathcal{U}^{n^{\prime}\gamma_{0}}(\widetilde{\mathcal{C}})\rangle_{T^{2}}\leavevmode\nobreak\
.$ (3.88)

Whenever we have the full 3d modularity, with the trivial sign in (3.68), it
is clear from the above discussions that we can massage the sum (3.88) into a
sum similar to (3.85), with $J_{2}$ replaced with $J_{3}$ – see the definition
of $J_{k}$ above (3.86). The modular anomaly (3.68) spoils this naive
expectation, however. In fact, one can easily check that this naive
expectation would lead to non-integer results for the index in examples where
the $T^{3}$ anomaly is non-trivial – thus, the subtle sign in (3.68) is
absolutely crucial to obtain sensible physical results.

Given (3.68) together with the $T^{2}$ modularity (3.55), we have:

$\langle\Pi^{m\gamma_{0}}\mathcal{U}^{n\gamma_{0}}(\mathcal{C})\mathcal{U}^{n^{\prime}\gamma_{0}}(\widetilde{\mathcal{C}})\rangle_{T^{2}}=(-1)^{m\gcd(n,n^{\prime})\left(\frac{K}{N}+1\right)}\langle\mathcal{U}^{\gcd(m,n,n^{\prime})\gamma_{0}}(\mathcal{C})\rangle_{T^{2}}\leavevmode\nobreak\
.$ (3.89)

Now we need to count the triples $(m,n,n^{\prime})$ so that
$\gcd(m,n,n^{\prime})\gamma_{0}$ generates $\mathbb{Z}_{d}$ with some specific
signs. For each divisor $d|N$, we can partition Jordan’s totient function as
$J_{3}(d)=n_{+}+n_{-}$, where the contributions $n_{\pm}$ are those that come
with the $\pm$ signs. Due to the specific partially symmetric form of the sign
in (3.89), the number of positive and negative terms are related as
$3n_{+}=4n_{-}$ for any divisor $d$ giving rise to a minus sign. We are then
interested in the number $n_{+}-n_{-}=\frac{1}{7}J_{3}(d)$ after the
cancellation. This suggests to use the following refinement of Jordan’s
totient $J_{3}(d)$, which depends on specific arithmetic properties of $K$ and
$N$:

$\mathscr{J}_{3}^{N,K}(d)\equiv\begin{cases}\tfrac{1}{7}J_{3}(d)\quad&\text{for
}N\text{ even, }\frac{N}{d}\text{ odd, }\frac{K}{d}\text{
even}\leavevmode\nobreak\ ,\\\
J_{3}(d)\quad&\text{otherwise}\leavevmode\nobreak\ .\end{cases}$ (3.90)

Then we have that, for all $N$ and all $K$:

$\sum_{m,n,n^{\prime}\in\mathbb{Z}_{N}}\langle\Pi^{m\gamma_{0}}\mathcal{U}^{n\gamma_{0}}(\mathcal{C})\;\mathcal{U}^{n^{\prime}\gamma_{0}}(\widetilde{\mathcal{C}})\rangle_{T^{2}}=\sum_{d|\gcd(N,K)}\mathscr{J}_{3}^{N,K}(d)\binom{\frac{K}{d}-1}{\frac{N}{d}-1}\leavevmode\nobreak\
.$ (3.91)

Let us comment briefly on the non-trivial denominator in the definition
(3.90). First of all, since $\mathscr{J}_{3}^{N,K}(d)=\tfrac{1}{7}J_{3}(d)$
only if $N$ is even and $\frac{N}{d}$ is odd, this value only occurs if $d$ is
even. In that case, one can show that $7|J_{3}(d)$ for all even integers
$d$.242424We leave this as an exercise to the enthusiastic reader. See also
appendix E.2 for more divisibility properties.  This number has a rather
natural interpretation as $J_{3}(2)=7$.252525Recall that $J_{k}(p)=p^{k}-1$
for $p$ prime and $k\in\mathbb{N}$. Jordan’s totient is a multiplicative
function, see (E.11). Thus in particular if $d$ is even and $\frac{d}{2}$ is
odd, then $\frac{1}{7}J_{3}(d)=J_{3}(\tfrac{d}{2})$. Clearly this is not the
case for all values $d$ of which $\mathscr{J}_{3}^{N,K}(d)$ is evaluated in
(3.91): For instance, $d=4$ is an even divisor of $N=12$ such that
$\frac{N}{d}$ is odd, but $\frac{d}{2}$ is even as well. Therefore,
$\mathscr{J}_{3}^{N,K}(d)$ does not have a simple interpretation as being
either $J_{3}(d)$ or $J_{3}(\tfrac{d}{2})$. Thus we have that
$\mathscr{J}_{3}^{N,K}:\mathbb{N}\to\mathbb{N}$ is a well-defined integral map
for all values of $N$ and all $K$.

Coming back to the case $K|N$, we have thus written the $PSU(N)_{K}$ Witten
index as:

$\textbf{I}_{\text{W}}[PSU(N)^{0}_{K}]=\frac{1}{N^{2}}\sum_{d|N}\mathscr{J}_{3}^{N,K}(d)\binom{\frac{K}{d}-1}{\frac{N}{d}-1}\leavevmode\nobreak\
.$ (3.92)

We list this index for small allowed values of $N$ and $K$ in table 1. Since
the full symmetry $(\mathbb{Z}_{N}^{(1)})_{\rm 3d}$ is non-anomalous, the
resulting $PSU(N)_{K}$ theory exists and the index should be a non-negative
integer.262626This Witten index cannot be negative because it is also counting
the lines in a 3d TQFT. See the discussion in section 4.1. We conjecture this
is the case, namely that:

$\textbf{I}_{\text{W}}[PSU(N)^{0}_{K}]\in\mathbb{N}\leavevmode\nobreak\ ,$
(3.93)

for any $N|K$.272727We have checked this numerically for $N\leq K\leq 100000$.
As a small consistency check for the formula (3.92), consider the case where
$N\geq 3$ is prime and $N|K$. Then there are only two terms in the sum, $d=1$
and $d=N$, and using $J_{3}(p)=p^{3}-1$ for $p$ prime (see appendix E.2) we
precisely reproduce (3.77) for $s=0$. Another small check of (3.92) is that,
for $N=2$, it precisely reproduces (LABEL:SO(3)-index).282828The function
(3.92) seems to be relatively unexplored in the literature. For $K=3N$,
$\textbf{I}_{\text{W}}[PSU(N)^{0}_{3N}]$ is the integer sequence A244036 and
it appears in the study of chiral algebras (Isachenkov:2014zua, , Section
3.1.2).

$\kappa\backslash N$ | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10
---|---|---|---|---|---|---|---|---|---
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10
2 | 1 | 4 | 4 | 10 | 16 | 42 | 108 | 312 | 930
3 | 3 | 6 | 16 | 45 | 186 | 798 | 3860 | 19305 | 100235
4 | 2 | 9 | 32 | 160 | 942 | 6048 | 41144 | 290592 | 2119200
5 | 4 | 13 | 68 | 430 | 3328 | 27454 | 240448 | 2188095 | 20545320
6 | 3 | 18 | 116 | 955 | 9030 | 91770 | 982884 | 10942308 | 125656965
7 | 5 | 24 | 192 | 1860 | 20868 | 250446 | 3171084 | 41742027 | 566724020
8 | 4 | 31 | 288 | 3295 | 42628 | 591633 | 8645360 | 131347320 | 2058115980
9 | 6 | 39 | 420 | 5435 | 79794 | 1254589 | 20780280 | 357870942 | 6356282290
10 | 5 | 48 | 580 | 8480 | 139092 | 2446486 | 45294044 | 871916841 | 17310311600
Table 1: The Witten index $\textbf{I}_{\text{W}}[PSU(N)^{0}_{\kappa N}]$,
evaluated from (3.92), for small values of $N$ and $\kappa\equiv{K\over
N}\in\mathbb{Z}$

The Witten index for $(SU(N)/\mathbb{Z}_{r})_{K}$. Given the above discussion,
it is now straightforward to consider gauging a non-anomalous subgroup
$\mathbb{Z}_{r}\subset(\mathbb{Z}_{N}^{(1)})_{\rm 3d}$ on $T^{3}$. As
described in subsection 3.1.3, we can find a non-anomalous subgroup as long as
$N$ and $K$ have a common divisor. These common divisors are precisely
labelled as the summation index in (3.91). This suggests that the ‘maximal’
non-anomalous subgroup we can gauge is $\mathbb{Z}_{\gcd(N,K)}$.

Summing over the topological lines on $T^{3}$ for the maximal non-anomalous
subgroup $\mathbb{Z}_{\gcd(N,K)}\subseteq\mathbb{Z}_{N}$ also involves a sum
over all non-anomalous subgroups contained in $\mathbb{Z}_{N}$. These are
precisely the groups $\mathbb{Z}_{d}$ with $d|\gcd(N,K)$. The result for the
torus partition function of the $(SU(N)/\mathbb{Z}_{\gcd(N,K)})_{K}$ theory
then takes a very similar form as before, with normalisation factor
$|\Gamma|^{2}$ adjusted to the cardinality of the group we sum over:

$\textbf{I}_{\text{W}}[(SU(N)/\mathbb{Z}_{\gcd(N,K)})^{0}_{K}]=\frac{1}{\gcd(N,K)^{2}}\sum_{d|\gcd(N,K)}\mathscr{J}_{3}^{N,K}(d)\binom{\frac{K}{d}-1}{\frac{N}{d}-1}\leavevmode\nobreak\
.$ (3.94)

More generally, let us consider the discrete gauging of any non-anomalous
subgroup $\mathbb{Z}_{r}$, where $r$ is a divisor of $\gcd(N,K)$. Then the sum
over the $\mathbb{Z}_{r}$ topological lines involves a sum over all divisors
$d$ of $r$. Accordingly, the Witten index reads:

$\textbf{I}_{\text{W}}[(SU(N)/\mathbb{Z}_{r})^{0}_{K}]=\frac{1}{r^{2}}\sum_{d|r}\mathscr{J}_{3}^{N,K}(d)\binom{\frac{K}{d}-1}{\frac{N}{d}-1}\leavevmode\nobreak\
.$ (3.95)

We again conjecture that this is an integer, as we also checked numerically
for a large set of values of $N$, $K$ and $r$. Let us note that the
normalisation $1/r^{2}$ in (3.95) is the ‘maximal’ allowed, i.e. $2$ is the
largest exponent of the order of the gauged subgroup that leads to an integral
index. We emphasise that this is a rather strong consistency check – in
general, none of the summands in (3.95) are integers, and only the whole sum
has the right divisibility property. Note also that the sum (3.95)
automatically ‘skips’ the would-be contribution from anomalous subgroups of
$\mathbb{Z}_{N}$. Finally, we extend the conjecture (3.93) to the general
case, as:

$r|\gcd(N,K)\quad\Rightarrow\quad\textbf{I}_{\text{W}}[(SU(N)/\mathbb{Z}_{r})^{0}_{K}]\in\mathbb{N}\leavevmode\nobreak\
.$ (3.96)

A mathematical proof of this ‘physical fact’ would be extremely
interesting.292929A curiosity for $N$ prime concerns the fact that
$\textbf{I}_{\text{W}}[PSU(N)^{0}_{K}]$ for $N|K$ is divisible again by $N$,
but only for $N\geq 5$. This is a consequence of Proposition 2 in Appendix
E.1, which refines Proposition 1 by excluding the case $N=3$. For this case,
the integers $M_{N,K}$ defined in (3.78) are divisible again by $N$.

In summary, the expression (3.95) gives the Witten index for all possible 3d
$\mathcal{N}=2$ Chern–Simons theories with gauge algebra $\mathfrak{su}(N)$,
which are indexed by $N$, $K$ and $r$ such that $NK/r^{2}\in\mathbb{Z}$ as
discussed above (3.63). At fixed $N$ and $K$, the allowed integers $r$ run
over the divisors of $\gcd(N,K)$.

The Witten index with a non-trivial $\theta$-angle. The
$(SU(N)/\mathbb{Z}_{r})_{K}$ theory has a non-trivial
$(\mathbb{Z}_{r}^{(0)})_{\rm 3d}$ 0-form symmetry, whose quantum numbers are
the $\mathbb{Z}_{r}$-valued ‘Stiefel–Whitney’ classes that indicate whether a
$SU(N)/\mathbb{Z}_{r}$ principal bundle can be lifted to an $SU(N)$ bundle –
see e.g. Kapustin:2005py ; Aharony:2013hda . We can keep track of this
symmetry in the Witten index by introducing a discrete fugacity for it. In the
$A$-model formalism, this is precisely the $\theta_{s}$ index introduced
above, which at the same time serves as a background gauge field for the dual
$(-1)$-form symmetry.

Let us first consider the $PSU(N)_{K}$ theory with $N|K$. Then, the sum over
topological lines in (3.88) generalises to:

$\textbf{I}_{\text{W}}[PSU(N)^{\theta_{s}}_{K}]=Z_{T^{3}}\left[PSU(N)_{K}^{\theta_{s}}\right]={1\over
N^{2}}\sum_{m,n,n^{\prime}\in\mathbb{Z}_{N}}e^{2\pi i{ms\over
N}}\langle\Pi^{m\gamma_{0}}\mathcal{U}^{n\gamma_{0}}(\mathcal{C})\;\mathcal{U}^{n^{\prime}\gamma_{0}}(\widetilde{\mathcal{C}})\rangle_{T^{2}}\leavevmode\nobreak\
.$ (3.97)

with $s\in\mathbb{Z}_{N}$. The oscillating phase makes the counting problem
more involved. It turns out to probe additional arithmetic features of the
theory such as the divisibility of $N$ by square numbers: if $N$ is _square-
free_ , all theories are in the same gauge ‘orbit’.303030Square-free means
that no prime factor appears more than once in the prime factor decomposition.
If $N$ is not square-free, then $\mathbb{Z}_{N}$ is not a product of cyclic
groups and there can be disjoint gauge orbits. Furthermore, these cases can
feature mixed anomalies between gauged and residual symmetries Gaiotto:2014kfa
; Aharony:2013hda .

The sum (3.97) is most strategically analysed in three steps: $N$ square-free,
$N$ arbitrary but with $K$ such that the gravitational anomaly (3.69) vanishes
for all $r|N$, and finally the generic case with both $N$ and $K$ arbitary.
The even simpler case where $N$ is prime is discussed in the previous section,
where the theta angle $\theta_{s}$ enters the result (3.77) depending only on
whether $s$ is divisible by $N$ or not. In general, the nontrivial phases
$e^{2\pi i\frac{ms}{N}}$ affect crucially the counting of signs that were
important in the definition of the symbol $\mathscr{J}_{3}$ (3.90).
Consequently, for generic values of $N$, we are looking for a generalisation
of the symbol $\mathscr{J}_{3}$ depending on the value $s$ interacting with
the mixed anomaly signs (3.89) in the geometric sums. It is rather elaborate
to work out the explicit $s$-dependence of (3.97), and we discuss these
subtleties for general $N$ and $K$ in appendix D.4. At the moment, we are only
able to obtain a general result for the second step, that is, for any $N$ such
that the gravitational anomaly (3.69) vanishes for _all_ divisors $r$ of $N$.
A practical way to guarantee this is to choose $K$ to be a square-free
integer: if for some divisor $r$, $N$ is even, $\frac{N}{r}$ is odd and
$\frac{K}{r}$ is even, then $r$ is automatically even and thus $K$ is
divisible by $4=2^{2}$ and hence not square-free. This condition is not an ‘if
and only if’ statement – for instance, $SU(4)_{12}$ has subgroups
$\mathbb{Z}_{r}$ with $r=1,2,4$, but all $(SU(4)/\mathbb{Z}_{r})_{12-4}$ CS
theories are bosonic (see (3.73)), while $K=12$ is not square-free.

In order to state the result here, let us define for any integer $d$ the
_radical_ $\text{rad}(d)$ as the product of the distinct prime numbers
dividing $d$.313131The radical is also known as largest square-free factor or
square-free kernel Then we refine Jordan’s totient $J_{k}(d)$ as
Oprea+2011+181+217 :323232This refined Jordan’s totient was defined in
Oprea+2011+181+217 , where the notations are related as
$J_{2g}(d,s)=\left\\{\frac{s}{d}\right\\}_{g}$.

$J_{k}(d,s)\equiv d^{k}\delta_{s\text{ mod
}\frac{d}{\text{rad}(d)},0}\,\prod_{p|d}\left(\delta_{s\text{ mod
}p^{e_{d}(p)},0}-\frac{1}{p^{k}}\right),$ (3.98)

where, for any prime divisor $p$ of $d$, $e_{d}(p)$ is the maximal exponent of
which $p$ appears in the prime factor decomposition of $d$.333333That is, we
can write $d=\prod_{p|d}p^{e_{d}(p)}$. By setting $s=0$, we obtain back the
ordinary Jordan totient (3.86). The number-theoretic interpretation is that
$J_{k}(d,s)$ is the contribution of the partition of $N^{k}$ times the
Kronecker delta $\delta_{s\text{ mod }N,0}$ into a sum over divisors $d$ of
any integer $N$:

$\sum_{d|N}J_{k}(d,s)=N^{k}\delta_{s\text{ mod }N,0}\leavevmode\nobreak\ ,$
(3.99)

generalising (3.87). It occurs due to the convoluted geometric series
appearing in the sum over $m$ in (3.97). This function is suitable to
calculate (3.97) for any value of $N$, as long as the gravitational anomaly
(3.69) vanishes for all $r|N$ – in particular, for $K$ a square-free integer.
In this case, we find:

$\textbf{I}_{\text{W}}[PSU(N)^{\theta_{s}}_{K}]=\frac{1}{N^{2}}\sum_{d|N}J_{3}(d,s)\binom{\frac{K}{d}-1}{\frac{N}{d}-1}\leavevmode\nobreak\
.$ (3.100)

Let us provide some evidence to this result. When $N$ is prime and $K$
divisible by $N$, then the sum collapses to the divisors $d=1$ and $d=N$. We
have $J_{3}(N,s)=N^{3}\delta_{s\text{ mod }N,0}-1$, while $J_{3}(1,s)=1$.
Combining both contributions exactly reproduces the previous result (3.77).
Another check is the case $N=2$ where we require that $K\in 2\mathbb{Z}$ is
square-free and a multiple of 2, that is, $K\in 2+4\mathbb{Z}$. In that case,
we calculate
$I_{\text{W}}[SO(3)^{\theta_{s}}_{K}]=\left(K-2+8\,\delta_{s\text{ mod
}2,0}\right)/4$ from (3.100), which matches precisely with the $N=2$
calculation (LABEL:SO(3)-index).

This formula (3.100) does not hold for generic values of $K$. As we discuss
briefly in appendix D.4, when $K$ is not square-free for instance, we obtain
alternating geometric series rather than geometric series, which shifts $s$
inside the $\delta$-symbols (3.98) – a similar modification is necessary when
summing over the gauge flux operators, see (3.24). We expect that, in the case
of arbitrary $N$ and $K$, there exists a modification of (3.98) taking care of
these special cases, which we will leave as a problem for future work.

The discrete gauging of a proper non-anomalous subgroup proceeds as explained
above in the case $\theta_{s}=0$. If the $SU(N)_{K}$ theory has a non-
anomalous subgroup $\mathbb{Z}_{r}$, then we truncate the sum (3.100) at
$d=r$, that is, we only sum over divisors of $r$. At the same time, the
correct normalisation is $r^{-2}$ rather than $N^{-2}$, corresponding to the
order of the $\mathbb{Z}_{r}$ group we discretely gauge, and we have:

$\textbf{I}_{\text{W}}[(SU(N)/\mathbb{Z}_{r})^{\theta_{s}}_{K}]=\frac{1}{r^{2}}\sum_{d|r}J_{3}(d,s)\binom{\frac{K}{d}-1}{\frac{N}{d}-1}\leavevmode\nobreak\
.$ (3.101)

in the cases without modular anomaly.

###  3.5 Gauging the 3d one-form symmetry on $\Sigma_{g}\times S^{1}$

As a final application of our detailed study of the 3d $A$-model for the
$SU(N)_{K}$ theory and of its higher-form symmetries, let us consider the
gauging of the 3d one-form symmetry for the theory on $\Sigma_{g}\times
S^{1}$. This gives us the topologically twisted index on $\Sigma_{g}$ for any
allowed $(SU(N)/\mathbb{Z}_{r})_{K}$ $\mathcal{N}=2$ Chern–Simons theory. The
twisted index is obtained by basic surgery operations on the Riemann surface,
which for $g>1$ includes the insertion of the handle-gluing operator
$\mathcal{H}$. In contrast to the case where $N$ is prime discussed above, in
general there are several fixed points, which makes the evaluation more
intricate.

Gauging the 2d 0-form symmetry. Let us first consider the gauging of the non-
anomalous 0-form symmetry $\mathbb{Z}_{N}^{(0)}$ for arbitrary genus $g$,
following the discussion in section 2.4. Recall that we label the $2g$ cycles
on $\Sigma_{g}$ by $\mathcal{C}_{i}$ and associate to them the topological
operators $\mathcal{U}^{\gamma_{i}}(\mathcal{C}_{i})$, whose product (2.57) we
denote by $\mathcal{U}^{\bm{\gamma}}$. Let us further label the
$\mathbb{Z}_{N}$ elements by $\gamma_{i}=n_{i}\gamma_{0}$, and collect
$\bm{n}=(n_{1},\dots,n_{2g})$. As described in (2.62), the insertion of
$\mathcal{U}^{\bm{\gamma}}$ on the surface $\Sigma_{g}$ amounts to summing
over the Bethe vacua fixed by all elements $\bm{\gamma}$ simultaneously, which
using our analysis for $SU(N)_{K}$ can be written as:

$\langle\mathcal{U}^{\bm{\gamma}}\rangle_{\Sigma_{g}}=\sum_{\hat{u}\in\mathcal{S}_{\text{BE}}^{(\gcd(\bm{n})\gamma_{0})}}\mathcal{H}(\hat{u})^{g-1}\leavevmode\nobreak\
.$ (3.102)

Then we gauge the discrete 0-form symmetry $\mathbb{Z}_{N}$ by summing over
all inserted lines:

$Z_{\Sigma_{g}\times S^{1}}\left[SU(N)_{K}/\mathbb{Z}^{(0)}_{N}\right]={1\over
N^{2g-1}}\sum_{\bm{n}\in\mathbb{Z}_{N}^{2g}}\sum_{\hat{u}\in\mathcal{S}_{\text{BE}}^{(\gcd(\bm{n})\gamma_{0})}}\mathcal{H}(\hat{u})^{g-1}\leavevmode\nobreak\
,$ (3.103)

with the normalisation (2.80) as before. Of course, this double sum can be
drastically simplified by realising that the second sum depends only on the
value of $\gcd(\bm{n})$. Similarly to the genus 1 analysis above, we can
enumerate the $N^{2g}$ numbers $\bm{n}$ with fixed $\gcd$ by the sum
$N^{2g}=\sum_{d|N}J_{2g}(d)$ (see (3.87)). Then the sum over the $2g$ cycles
collapses to a sum over divisors $d$ of $N$. Note that
$\gcd(\bm{n})\gamma_{0}$ generates the same subgroup as
$\gcd(\bm{n},N)\gamma_{0}$, which due to (3.46) is $\mathbb{Z}_{d}$ with
$d=N/\gcd(\bm{n},N)$. Thus, for each divisor $d$, the set of fixed vacua is
simply $\mathcal{S}_{\text{BE}}^{(\frac{N}{d}\gamma_{0})}$, which one may also
denote by $\mathcal{S}_{\text{BE}}^{\mathbb{Z}_{d}}$. We therefore obtain:

$Z_{\Sigma_{g}\times S^{1}}\left[SU(N)_{K}/\mathbb{Z}^{(0)}_{N}\right]={1\over
N^{2g-1}}\sum_{d|N}J_{2g}(d)\\!\\!\sum_{\hat{u}\in\mathcal{S}_{\text{BE}}^{\mathbb{Z}_{d}}}\mathcal{H}(\hat{u})^{g-1}\leavevmode\nobreak\
.$ (3.104)

We checked for small values of $g$, $N$ and $K$ that (3.104) leads to integer
partition functions, with precisely this normalisation.343434One may check as
well that this the ‘maximal’ normalisation, meaning that if we divide by $N$
another time (i.e.  $N^{2g}$ in the denominator) we do note get integers, in
general.

Gauging the 2d 1-form symmetry. The gauging of the 2d 1-form symmetry
$\mathbb{Z}_{N}^{(1)}$ has been discussed in the general case in 3.1.1. While
for $g=1$ the insertion of a single line in $T^{3}$ enjoys full 3d modularity
and we were able to relate the 1-form gauging to an enumeration of fixed
points, for higher genus this is not possible. Instead, it is still the case
that gauging $\mathbb{Z}_{N}^{(1)}$ with a fixed $\theta_{s}$ projects us onto
one of the disjoint universes of decomposition, giving us (3.27).

Gauging the full 3d 1-form symmetry. The full 3d 1-form symmetry can be gauged
by summing over all insertions $\Pi^{\delta}\,\mathcal{U}^{\bm{\gamma}}$ on
$\Sigma_{g}\times S^{1}$, as described in section 2.5. This amounts to
combining the expressions (3.104) with (3.27) in a suitable way: Since the
insertion of the 0-form operators $\mathcal{U}^{\bm{\gamma}}$ project onto the
fixed points, we may simply evaluate the sum over the gauge flux operators
$\Pi^{\delta}$ on those fixed points. This immediately gives the $\Sigma_{g}$
twisted index:

$Z_{\Sigma_{g}\times
S^{1}}[PSU(N)_{K}^{\theta_{s}}]=\frac{1}{N^{2g-1}}\sum_{d|N}J_{2g}(d)\\!\\!\sum_{\hat{u}\in\mathcal{S}_{\text{BE}}^{\vartheta_{s},\,{\mathbb{Z}_{d}}}}\mathcal{H}(\hat{u})^{g-1}\leavevmode\nobreak\
.$ (3.105)

where the second sum is over the Bethe vacua in the universe set by
$\theta_{s}$ which are invariant under the action of $\mathbb{Z}_{d}$:

$\mathcal{S}_{\text{BE}}^{\vartheta_{s},\,{\mathbb{Z}_{d}}}\equiv\mathcal{S}_{\text{BE}}^{\vartheta_{s}}\cap\mathcal{S}_{\text{BE}}^{\mathbb{Z}_{d}}\leavevmode\nobreak\
.$ (3.106)

By direct computation, we checked that this formula returns an integer for
small values of the parameters. The expression (3.105) generalises known
expressions in the mathematical literature, where Verlinde dimensions for
$PSU(N)_{K}$ with $N$ odd were already written in terms of the genus-$g$
generalisation of Jordan’s totient Oprea+2011+181+217 . In the mathematical
setup, Jordan’s totient $J_{2g}(d)$ has a geometric meaning as the number of
elements of order $d$ in the Jacobian variety $J(\Sigma_{g})$ associated with
the Riemann surface Oprea+2011+181+217 .353535This Jacobian is the variety
that carries the Verlinde bundles. Finally, the result (3.105) appears to
agree with the some explicit results of Gukov:2021swm  as expected, as well as
with the mathematical framework for non-simply connected groups
alekseev2000formulas ; Meinrenken2018 . To the best of our knowledge, the
result (3.105) has not been obtained before in the mathematical literature for
$N$ and $K/N$ both even, essentially due to the difficulties related to the
gravity-$(\mathbb{Z}_{N}^{(1)})_{\rm 3d}$ anomaly discussed in section 3.2. It
would be interesting to give a firm mathematical footing to the formula
(3.105) in this case.

It is rather difficult to obtain more explicit (i.e. more efficiently
computable) results for genus-$g$ twisted indices for all values of $g$. One
simple result is:

$Z_{\Sigma_{g}\times S^{1}}[PSU(N)_{N}^{0}]=N\leavevmode\nobreak\ ,$ (3.107)

generalising (3.81) to non-prime $N$. One can further check that, for $g=1$
and $s=0$, the result (3.105) is compatible with (3.92). This identification
expresses $\mathscr{J}_{3}(d)$ as a combination of $N$, $J_{2}(d)$ and the
Kronecker-delta $\Delta^{N}_{\ell(\hat{u})}$ over the fixed Bethe vacua, as:

$NJ_{2}(d)\left|\mathcal{S}_{\text{BE}}^{\vartheta_{s=0},\,{\mathbb{Z}_{d}}}\right|=\mathscr{J}_{3}(d)\Big{|}\mathcal{S}_{\text{BE}}^{\mathbb{Z}_{d}}\Big{|}\leavevmode\nobreak\
.$ (3.108)

This relation characterises the distribution of values $\ell(\hat{u})$ among
the vacua $\hat{u}$ fixed under a $\mathbb{Z}_{d}$ subgroup. We checked it
explicitly in examples for small values of $N$ and $K$, but we leave a proof
for future work. Another check is the comparison to $N\geq 3$ prime and $N|K$.
In that case, the only divisors are $d=1$ and $d=N$. Using
$J_{2g}(N)=N^{2g}-1$ and (3.44), a simple calculation derives the previous
result (LABEL:Zg_PSUN_N_prime) from (3.105).

The $\Sigma_{g}$ twisted index for $(SU(N)/\mathbb{Z}_{r})_{K}$. As
anticipated from the presentation (3.105) of the $PSU(N)_{K}$ twisted index,
it is straightforward to consider gauging only a subgroup $\mathbb{Z}_{r}$
rather than the full $\mathbb{Z}_{N}$, and we can also gauge any non-anomalous
$(\mathbb{Z}_{r}^{(1)})_{\rm 3d}$ even if $(\mathbb{Z}_{N}^{(1)})_{\rm 3d}$
has a ’t Hooft anomaly. The twisted index of the $(SU(N)/\mathbb{Z}_{r})_{K}$
theory is simply obtained by summing only over the topological lines operators
for the $\mathbb{Z}_{r}$ subgroup. Following the logic from the previous
subsection, we simply restrict the divisor sum to divisors of $r$ only:

$\displaystyle Z_{\Sigma_{g}\times
S^{1}}[(SU(N)/\mathbb{Z}_{r})^{\theta_{s}}_{K}]$ $\displaystyle=$
$\displaystyle\frac{1}{r^{2g-1}}\sum_{d|r}J_{2g}(d)\\!\\!\sum_{\hat{u}\in\mathcal{S}_{\text{BE}}^{\mathbb{Z}_{d}}}\Delta^{N,r}_{\ell}(s)\mathcal{H}(\hat{u})^{g-1}$
(3.109) $\displaystyle=$
$\displaystyle\frac{1}{r^{2g-1}}\sum_{d|r}J_{2g}(d)\\!\\!\sum_{\hat{u}\in\mathcal{S}_{\text{BE}}^{\vartheta_{s}^{(\mathbb{Z}_{r})},{\mathbb{Z}_{d}}}}\mathcal{H}(\hat{u})^{g-1}\leavevmode\nobreak\
,$

where $\Delta^{N,r}_{\ell}(s)$ as defined in (LABEL:theta_symbol_Zr), and
$\mathcal{S}_{\text{BE}}^{\vartheta_{s}^{(\mathbb{Z}_{r})},{\mathbb{Z}_{d}}}\equiv\mathcal{S}_{\text{BE}}^{\mathbb{Z}_{d}}\cap\mathcal{S}_{\text{BE}}^{\vartheta_{s}^{(\mathbb{Z}_{r})}}$
similarly to (3.106). This final result includes as special cases all previous
results – the $PSU(N)_{K}$ Witten index (3.92) and more generally the
$(SU(N)/\mathbb{Z}_{r})_{K}$ Witten index (3.95), as well as the $\Sigma_{g}$
twisted index (LABEL:Zg_PSUN_N_prime) for $PSU(N)_{K}$ with $N$ prime.

##  4 Further aspects of the 3d $\mathcal{N}=2$ $SU(N)_{K}$ CS theory

In this section, we study some further aspects of the $\mathcal{N}=2$
supersymmetric $SU(N)_{K}$ Chern–Simons theory, which provides us with
interesting consistency checks of our results above. In section 4.1, we study
the gauging of the 3d 1-form symmetry using the fusion rules of the associated
3d TQFT, and find a precise (and non-trivial) agreement with our $A$-model
result for the Witten index. In section 4.2, we brielfy comment on the
level/rank duality for the $\mathcal{N}=2$ $SU(N)_{K}$ Chern–Simons theory,
and on how the higher-form symmetries should match across the duality.

###  4.1 Gauging the 1-form symmetry in the 3d TQFT

Extending our discussion of the $SU(2)$ example from section 1.1 in the
introduction, we can check some of our results for the $SU(N)_{K}$ theory
using the purely 3d description of the underlying 3d TQFT. Indeed, we can
consider gauging the 1-form symmetry $(\mathbb{Z}_{N}^{(1)})_{\rm 3d}$ by the
condensation of the abelian anyons for $\mathbb{Z}_{N}$. Here we follow
closely the approach of Hsin:2018vcg .

Let us first review the fusion rules of the Wilson lines in the $SU(N)_{K}$ CS
theory, which are the same as the fusion rules of chiral primaries in the
corresponding 2d WZW model – see e.g. Cummins1994 ; Cummins:1990ay ;
Gepner:1986wi ; Cummins:1990je ; GOODMAN1990244 ; Begin:1992rt ; Fuchs:1993et
; DiFrancesco1997 . They are best expressed in terms of Young diagrams. First,
recall that the $SU(N)_{K}$ $\mathcal{N}=2$ supersymmetric CS theory has a
spectrum of Wilson lines $W_{\bm{\lambda}}$ indexed by the Young tableaux:

$\bm{\lambda}=[\lambda_{1},\cdots,\lambda_{N-1}]\leavevmode\nobreak\
,\qquad\lambda_{i}\leq K-N\leavevmode\nobreak\ ,\;\forall
i\leavevmode\nobreak\ .$ (4.1)

The generator of the 3d $\mathbb{Z}_{N}$ one-form symmetry is simply:

$a=[K-N,0,\cdots,0]\leavevmode\nobreak\ ,$ (4.2)

where we used the obvious notation $W_{\bm{\lambda}}={\bm{\lambda}}$. Linking
any line with $a$, we pick up a phase:

$W_{\bm{\lambda}}\rightarrow e^{2\pi in(\bm{\lambda})\over
N}W_{\bm{\lambda}}\leavevmode\nobreak\ ,\qquad
n(\bm{\lambda})\equiv\sum_{i=1}^{N-1}\lambda_{i}\;\text{mod}\,N\leavevmode\nobreak\
,$ (4.3)

where $n(\bm{\lambda})$ is the $N$-ality of the representation (the number of
boxes in the Young tableau mod $N$). The fusion of any Wilson line with the
abelian anyon $a$ is easily found to be:

$a\times[\lambda_{1},\lambda_{2},\cdots,\lambda_{N-1}]=[K-N-\lambda_{N-1},\lambda_{1}-\lambda_{N-1},\lambda_{2}-\lambda_{N-1},\cdots,\lambda_{N-2}-\lambda_{N-1}]\leavevmode\nobreak\
.$ (4.4)

It corresponds to adding the row $a$ on top of the Young tableau
$\bm{\lambda}$, and subsequently removing $\lambda_{N-1}$ columns on the left.
As an example, consider the fusion of a Wilson line in the $SU(5)_{10}$
theory:

$\ytableausetup{boxsize=1em}\ytableau\leavevmode\nobreak\ &\hskip
8.5359pt\times\hskip 8.5359pt\ytableau\leavevmode\nobreak\ &\\\
\leavevmode\nobreak\ \\\ \leavevmode\nobreak\ \\\ \leavevmode\nobreak\ \\\
\hskip 8.5359pt=\hskip 8.5359pt\ytableau*(gray!40)&*(gray!40)\\\
*(gray!40)*(gray!40)\\\ *(gray!40)*(gray!40)\\\ *(gray!40)*(gray!40)\\\
*(gray!40)*(gray!40)\\\ \hskip 8.5359pt=\hskip
8.5359pt\ytableau\leavevmode\nobreak\ &\\\ \leavevmode\nobreak\ \\\
\leavevmode\nobreak\ \leavevmode\nobreak\ .$ (4.5)

Given these rules, we can carry out the three-step gauging procedure
Hsin:2018vcg  at the level of the 3d line spectrum. Before studying the case
where $N$ is prime (and then for $N$ arbitrary), let us demonstrate this
procedure in a simple example.

Example: $\bm{SU(3)_{6}}$. The $SU(3)_{6}$ theory has 10 lines:

$\bm{\lambda}=[0,0],[1,0],[2,0],[3,0],[1,1],[2,1],[2,2],[3,1],[3,2],[3,3]\leavevmode\nobreak\
.$ (4.6)

Out of these, we have the $\mathbb{Z}_{3}$ lines:

$[0,0]={\bf 1}\leavevmode\nobreak\ ,\qquad[3,0]=a\leavevmode\nobreak\
,\qquad[3,3]=a^{2}\leavevmode\nobreak\ .$ (4.7)

Keeping only the $\mathbb{Z}_{3}$-neutral lines (under linking), we are left
with the four lines:

${\bf 1}\leavevmode\nobreak\ ,\quad a\leavevmode\nobreak\ ,\quad W_{\rm
adj}\equiv[2,1]\leavevmode\nobreak\ ,\qquad a^{2}\leavevmode\nobreak\ .$ (4.8)

Next, we should identify lines related by the fusion (4.4). Note that $aW_{\rm
adj}=W_{\rm adj}$, so it is left invariant under fusion as well. We then
discard the non-trivial $\mathbb{Z}_{3}$ lines, but we need to keep three
copies of $W_{\rm adj}$. We then find the $PSU(3)_{6}$ lines:

${\bf 1}\leavevmode\nobreak\ ,\quad W_{{\rm adj},1}\leavevmode\nobreak\ ,\quad
W_{{\rm adj},2}\leavevmode\nobreak\ ,\quad W_{{\rm adj},3}\leavevmode\nobreak\
.$ (4.9)

This is a total of four lines, which of course agrees with our $A$-model
computation (see e.g. table 1).

$N$ prime. Consider now the case where $N$ is an arbitrary prime number, and
$K$ a multiple of $N$. Out of the $\binom{K-1}{N-1}$ Young tableaux
$\bm{\lambda}$, as the first step we keep only the $\mathbb{Z}_{N}$-neutral
lines, that is, the ones with $n(\bm{\lambda})\equiv 0\mod N$. In order to
enumerate them, we use again the decomposition (3.78) of the $SU(N)_{K}$ index
into the sum of 1 and $M_{N,K}N^{2}$. In the 3d prescription, the $1$ has an
important meaning: It is the unique neutral Wilson line which is left
invariant under fusion with the abelian anyon. We can find a general form for
this invariant Wilson line:

$\bm{\lambda}_{\text{inv}}=(\tfrac{K}{N}-1)[N-1,N-2,\dots,2,1]\leavevmode\nobreak\
,$ (4.10)

where the prefactor multiplies all number of boxes. It is clear that the
fusion (4.4) with $a$ (4.2) leaves it invariant: The Young tableau $a$ has
$\frac{K}{N}-1$ boxes more than the first row of $\bm{\lambda}_{\text{inv}}$,
whose last row has $\frac{K}{N}-1$ boxes as well. Removing $\frac{K}{N}-1$
columns on the left results in the same Young diagram
$\bm{\lambda}_{\text{inv}}$.

The $N$-ality of (4.10) is
$n(\bm{\lambda}_{\text{inv}})=(\tfrac{K}{N}-1)\tfrac{N-1}{2}N$, which is
divisible by $N$ since $N\geq 3$ is prime and thus odd. Using (Captain) hook’s
formula, we find that it has dimension:

$\dim\bm{\lambda}_{\text{inv}}=\left(\frac{K}{N}\right)^{K-N}\leavevmode\nobreak\
,$ (4.11)

and that it is self-dual, and thus a real representation of $SU(N)$ (see e.g.
Peluse2014 ).363636This representation is the adjoint only for $N=3$ at level
$K=6$. For instance, the invariant Wilson line for $SU(5)_{15}$ is:

$\ytableau\leavevmode\nobreak\ &\\\ \leavevmode\nobreak\ \\\
\leavevmode\nobreak\ \\\ \leavevmode\nobreak\ \\\ $ (4.12)

This allows us to correctly enumerate the remaining lines in each step of the
3d gauging procedure Hsin:2018vcg . In step 1, we discard the lines that are
not neutral under $\mathbb{Z}_{N}$. The line $\bm{\lambda}_{\text{inv}}$ is
neutral, while from the other $M_{N,K}N^{2}$ lines only every $N$-th line is
neutral. This gives us:

$\text{Step 1}:\qquad 1+M_{N,K}N^{2}\longrightarrow
1+M_{N,K}N\leavevmode\nobreak\ $ (4.13)

for the number of invariant lines. In step 2, we identify all lines $W$ and
$aW$ obtained by fusing with $a$. While $W_{\bm{\lambda}_{\text{inv}}}$ is
invariant, this partitions the remaining $M_{N,K}N$ lines into $M_{N,K}$
orbits under the $a$-fusion of orbit length $N$ each. It is clear that this
has to be the case, since the fusion with the abelian anyon constitutes a
group action of $\mathbb{Z}_{N}$ on the collection of Wilson lines, and, since
$\mathbb{Z}_{N}$ has no subgroups, there cannot be shorter orbits. This leaves
us with:

$\text{Step 2}:\qquad 1+M_{N,K}N\longrightarrow 1+M_{N,K}\leavevmode\nobreak\
$ (4.14)

for the number of lines. Finally, at step 3, for the fixed point
$W_{\bm{\lambda}_{\text{inv}}}$ under the fusion we create $N$ copies. We thus
obtain:

$\text{Step 3}:\qquad 1+M_{N,K}\longrightarrow N+M_{N,K}\leavevmode\nobreak\
,$ (4.15)

for the number of Wilson lines, precisely agreeing with the earlier result
(3.79) for the $PSU(N)_{K}$ Witten index with vanishing theta angle.

General $N$. When $N$ is not prime, the only modification to the gauging
procedure is the third step. Note that when $N$ is prime, then $a^{n}$ is a
generator of the 3d 1-form symmetry for any positive integer $n$ with
$n\;(\text{mod }N)\neq 0$. If $N$ has a divisor $d$, then $a^{n}$ can generate
a proper $\mathbb{Z}_{d}$ subgroup of $\mathbb{Z}_{N}$ for specific values of
$n$. Consequently, if $n$ is the smallest divisor of $N$ such that a line $W$
is invariant under the fusion with $a^{n}$, then we generate $N/n$ copies of
$W$ in the third step Hsin:2018vcg .

The gauging procedure then proceeds almost as before. We start with the
spectrum $\\{W_{\bm{\lambda}}\\}$ of Wilson lines (4.1). Discarding the lines
that are not invariant under the $\mathbb{Z}_{N}$ 1-form symmetry leaves us
with a smaller set
$\\{W_{\bm{\lambda}}\\}^{\mathbb{Z}_{N}}=\\{W_{\bm{\lambda}}:n(\bm{\lambda})\equiv
0\mod N\\}$. The fusion with $a$ furnishes a partition into orbits:

$\\{W_{\bm{\lambda}}\\}^{\mathbb{Z}_{N}}=\bigcup_{\bm{\lambda}^{\prime}}\text{Orb}(W_{\bm{\lambda}^{\prime}})\leavevmode\nobreak\
.$ (4.16)

Since $a$ constitutes a $\mathbb{Z}_{N}$ group action, the lengths
$|\text{Orb}(W_{\bm{\lambda}^{\prime}})|$ of the orbits are divisors of $N$.
Any line in an orbit $\text{Orb}(W_{\bm{\lambda}^{\prime}})$ is then invariant
under the fusion with $a^{m}$, where
$m=|\text{Orb}(W_{\bm{\lambda}^{\prime}})|$. Consequently, for each orbit
$\text{Orb}(W_{\bm{\lambda}^{\prime}})$ we keep
$N/|\text{Orb}(W_{\bm{\lambda}^{\prime}})|$ copies. This gives us the
$PSU(N)_{K}$ spectrum of lines:

$\\{W_{\bm{\lambda}}\\}/\mathbb{Z}_{N}^{(1)}=\bigcup_{\bm{\lambda}^{\prime}}\bigcup_{j=1}^{N/|\text{Orb}(W_{\bm{\lambda}^{\prime}})|}W_{\bm{\lambda}^{\prime},j}\leavevmode\nobreak\
,$ (4.17)

from which we easily calculate

$\textbf{I}_{\text{W}}[PSU(N)_{K}]=\sum_{\bm{\lambda}^{\prime}}\frac{N}{|\text{Orb}(W_{\bm{\lambda}^{\prime}})|}\leavevmode\nobreak\
.$ (4.18)

This matches with the case $N$ prime, where there is one orbit of length 1 and
$M_{N,K}$ orbits of length $N$, giving back (4.15). For given arbitrary values
of $N$ and $K$, it is straightforward to implement the fusion (4.4) on a
computer, and we find that (4.18) agrees precisely with the general-$N$ result
(3.92) for all $N\leq K\leq 19$. This provides us with another consistency
check of our 3d $A$-model calculations. Since (4.18) does not explicitly take
into account the $T^{3}$ modular anomaly discussed in section 3.2, the above
3d calculation provides us with some independent evidence for the correctness
of the analysis that lead to the general formula (3.92).

###  4.2 Comments on level/rank duality

It is also instructive to consider level/rank duality for our 3d
$\mathcal{N}=2$ supersymmetric CS theory Aharony:2015mjs ; Aharony:2016jvv ;
Hsin:2016blu ; Benini:2017dus ; Closset:2023jiq :

$SU(N)_{K}\qquad\longleftrightarrow\qquad U(K-N)_{-K,-N}\leavevmode\nobreak\
.$ (4.19)

The underlying 3d field theory has a $\mathbb{Z}_{N}^{(1)}$ 1-form symmetry,
but it is realised differently on either side – for instance, the fundamental
Wilson line of $SU(N)$ maps to a Wilson line in the determinant representation
of $U(K-N)$. These lines generate the 3d 1-form symmetry in each description.
In the following, we make some preliminary comments on the duality (4.19) from
the perspective of their respective 3d $A$-models. We comment on the matching
of Bethe vacua between the two sides, but unfortunately we did not find an
explicit dual map between the two descriptions; this is left as a challenge
for future work.

Bethe vacua. Let us look at the vacua of the $U(K-N)_{-K,-N}$ theory, assuming
$K>N>0$. The Bethe equations read:

$q\,(-x_{a})^{-K}\,\det{x}=1\leavevmode\nobreak\ ,\qquad
a=1,\cdots,K-N\leavevmode\nobreak\ ,$ (4.20)

and here $q=e^{2\pi i\tau}$ is the complexified FI term for the $U(K-N)$ gauge
group. The level/rank duality (4.19) is a little bit subtle (in particular due
to $U(K-N)_{-K,-N}$ being spin if $N$ is odd Hsin:2016blu ), and here we
should really set $q=1$. So, for simplicity, let us just assume the Bethe
equations are:373737That is, we assume $K$ even for simplicity. We can of
course keep track of the signs for $K$ odd, but for our purposes here this
will be immaterial.

$x_{a}^{K}=\det{x}\leavevmode\nobreak\ ,\qquad\forall a\leavevmode\nobreak\ .$
(4.21)

We can parameterise the solutions as:

$\hat{u}_{a}={j_{a}\over KN}\leavevmode\nobreak\
,\qquad(j_{a})\subset\\{0,1,\cdots,KN-1\\}\leavevmode\nobreak\ ,$ (4.22)

where $(j_{a})$ is an ordered subset which satisfies the conditions (4.21),
namely:

$\sum_{b=1}^{K-N}j_{b}\equiv Kj_{a}\mod KN\leavevmode\nobreak\ ,$ (4.23)

for all $a=1,\dots,K-N$. As an example, consider $K=4$ and $N=2$. Then the
$U(2)_{-4,-2}$ theory has 3 vacua with:

$(j_{a})=\\{(2,6)\leavevmode\nobreak\ ,\;(1,3)\leavevmode\nobreak\
,\;(5,7)\\}\leavevmode\nobreak\ .$ (4.24)

Of course, this matches the expected number of vacua of $SU(2)_{4}$. It turns
out that the first vacuum is the one fixed under the action of
$\mathbb{Z}_{2}^{(0)}$, as we will discuss below.

Witten index.  Let us count the Bethe vacua, i.e. solutions to (4.23), more
systematically. Given any tuple $(j_{1},\dots,j_{K-N})$, denote their sum by
$\sigma=\sum_{a=1}^{K-N}j_{a}$. Then from (4.23) we have that $\sigma$ is
divisible by $K$. That is, we can write $\sigma=kK$ with some integer $k$.
From (4.23), we find that $k\equiv j_{a}\mod N$ for each $a=1,\dots,K-N$. This
in particular implies that the values of $l_{a}$ differ by multiples of $N$.
Therefore, for any given $K-N$-tuple $(j_{a})$, we can find a unique number
$\tilde{k}=0,\dots,N-1$ such that $j_{a}\equiv\tilde{k}\mod N$ for all $a$,
where $\tilde{k}$ is simply $k$ reduced modulo $N$.

Given any solution $(j_{a})$ with a particular value of $\tilde{k}$, we can
always construct a new solution $(j_{a}^{\prime})$ whose value is
$\tilde{k}+1$. This implies in particular that, for each value of $\tilde{k}$,
there are the same number of solutions to (4.23). Since there are $N$ possible
values of $\tilde{k}$, let us therefore study the case where $\tilde{k}=0$.

For $\tilde{k}=0$, we are then looking at tuples $(j_{a})$ such that
$j_{a}\equiv 0\mod N$. Since the domain for the solutions is
$j_{a}=0,\dots,KN-1$, this restricts the solution space to the values
$j_{a}=0,N,2N,\dots,(K-1)N$. These are $K$ numbers, and we are selecting $K-N$
numbers from those $K$ numbers, for which there are $\binom{K}{K-N}$
possibilities. These candidate solutions are solutions of (4.23) if
$\sigma\equiv 0\mod KN$. Since each $j_{a}$ is divisible by $N$, it follows
that only every $K$-th tuple satisfies this condition. Hence, the number
solutions to the Bethe equations with $\tilde{k}=0$ is
$\frac{1}{K}\binom{K}{K-N}$. Since we have $N$ set of solutions of equal size
for every $\widetilde{k}$, as explained above, the total value for the Witten
index is:

$\textbf{I}_{\text{W}}[U(K-N)_{-K,-N}]=\frac{N}{K}\binom{K}{K-N}=\binom{K-1}{N-1}\leavevmode\nobreak\
.$ (4.25)

As anticipated, this matches precisely with the Witten index (3.9) of the
$SU(N)_{K}$ theory.

This result suggests ideas to find an explicit isomorphism between the Bethe
equations of the $SU(N)_{K}$ theory and that of the $U(K-N)_{-K,-N}$ theory.
From (4.25) we see that the level/rank duality can be naturally formulated as
complements of a set Closset:2017bse ; Closset:2019hyt ; Closset:2017zgf ;
Closset:2018ghr : while in the $SU(N)_{K}$ theory we consider selecting $N$
elements from a set with $K$ elements, in the $U(K-N)$ theory it is natural to
select rather $K-N$ elements. These subsets are precisely complements of each
other. It is still non-trivial to find the set $\\{j_{a}\\}$ labelling a
vacuum of the $U(K-N)_{-K,-N}$ theory that corresponds to a specific
$\underline{l}=(l_{a};\ell)$ in the $SU(N)_{K}$ theory. We leave this
important question as a challenge for future work.

0-form and 1-form symmetry. The action of $\mathbb{Z}_{N}^{(0)}$ on the Bethe
vacua simply corresponds to $\hat{x}_{a}\mapsto e^{\frac{2\pi
i}{N}}\hat{x}_{a}$, or $\hat{u}_{a}\rightarrow\hat{u}_{a}+{1\over N}$ for all
$a$. In other words, this acts as

$\hat{u}\mapsto\hat{u}+\gamma\leavevmode\nobreak\ :\qquad j_{a}\mapsto
j_{a}+K\;\,\text{mod}\;\,KN\leavevmode\nobreak\ ,$ (4.26)

up to a permutation of the $j_{a}$’s, which is the Weyl symmetry $S_{K-N}$. By
the level-rank duality (4.19), this 0-form action is supposed to be reflected
in the $SU(N)_{K}$ theory with the same $N$ and $K$. Indeed, from (3.6) and
(3.38), this $\mathbb{Z}_{N}^{(0)}$ symmetry acts on the $SU(N)$ on-shell
variables $\hat{x}_{a}$ as $\hat{x}_{a}\mapsto e^{\frac{2\pi
i}{N}}\hat{x}_{a}$ as well.

The generator of the 1-form symmetry $\mathbb{Z}_{N}^{(1)}$ in the $A$-model
for the $U(K-N)_{-K,-N}$ theory is the flux operator:

$\Pi^{\gamma_{0}}=(\det x)^{-1}\leavevmode\nobreak\ .$ (4.27)

Comparing with the action of the 1-form symmetry operator (3.18) in the
$SU(N)_{K}$ theory, we find the relation:

$\frac{1}{K}\sum_{b}j_{b}=\ell+K\mod N\leavevmode\nobreak\ ,$ (4.28)

Here, $\ell$ is defined for each $SU(N)_{K}$ Bethe vacuum as in (3.7), and it
is essentially $\sum_{a}l_{a}$. From (4.23), it is clear that $\sum_{b}j_{b}$
is divisible by $K$, and hence the left-hand-side is indeed an integer. In
some cases, (4.28) gives a unique relation between the $SU(N)_{K}$ vacua and
the $U(K-N)_{-K,-N}$ vacua.

IR duality. Any infrared IR duality between two 3d $\mathcal{N}=2$ theories
$\mathcal{T}$ and $\mathcal{T}^{\prime}$ induces an isomorphism between the
ground-state Hilbert spaces:

$\mathscr{D}\,:\,\mathcal{H}_{S^{1}}[\mathcal{T}]\longrightarrow\mathcal{H}_{S^{1}}[\mathcal{T}^{\prime}]\leavevmode\nobreak\
,$ (4.29)

which is a unitary transformation that commutes with all symmetry actions,
including higher-form symmetries:

$\mathscr{D}^{\dagger}\mathcal{U}_{\mathcal{T}}\mathscr{D}=\mathcal{U}_{\mathcal{T}}\leavevmode\nobreak\
.$ (4.30)

Here, $\mathcal{U}_{\mathcal{T}}$ represents the symmetry operators
$\mathcal{U}^{\gamma}$ and $\Pi^{\gamma}$ in the $A$-model for the theory
$\mathcal{T}$, for some symmetry group $\Gamma$. Then, a particular
consequence of the duality is that all correlation functions of the symmetry
operators necessarily agree, and therefore the allowed gauging operations for
discrete symmetries will always give rise to dual theories
$\mathcal{T}/\Gamma$ and $\mathcal{T}^{\prime}/\Gamma$. For the level/rank
duality at hand, we hope to construct the explicit isomorphism (4.29) in later
work.

##  5 Including matter: $U(1)$ and $SU(N)$ theories

So far, we have been discussing higher-form symmetries for pure $(S)U(N)$
gauge theories. In this section, we couple the 3d vector multiplets to matter
in chiral multiplets. These theories retain a one-form symmetry $\Gamma$ if
the matter fields preserve some subgroup of the center symmetry of the pure
gauge theory:

$\Gamma\subseteq Z(\widetilde{G})\leavevmode\nobreak\ .$ (5.1)

We will first consider the very simple case of an abelian gauge theory with
matter fields of non-minimal electric charge. Next, for definiteness, we will
consider the $SU(N)_{k}$ Chern–Simons-matter theory with $n_{\text{adj}}$
chiral multiplets in the adjoint representation. We will only provide
preliminary comments. More explicit computations of twisted indices for these
theories could be performed e.g. using the computational algebraic geometric
methods discussed in Closset:2023vos . This is left as another challenge for
future work.

###  5.1 $U(1)_{k}$ with matter

Consider a $U(1)_{k}$ vector multiplet coupled to chiral multiplets $\Phi_{i}$
with electric charge $Q_{i}\in\mathbb{Z}$. The UV effective CS level $k$ is
related to the bare CS level $K\in\mathbb{Z}$ as:

$K=k+{\frac{1}{2}}\sum_{i}Q_{i}^{2}\leavevmode\nobreak\ .$ (5.2)

Let us also denote by $Q_{i}=(Q_{i_{+}},Q_{i_{-}})$ the positive and negative
charges, respectively. The effective twisted superpotential reads:

$\mathcal{W}(u,\nu)=\tau u+{K\over 2}(u^{2}+u)+{1\over(2\pi
i)^{2}}\sum_{i}{\text{Li}_{2}}{\left(e^{2\pi
iQ_{i}u}y_{i}\right)}\leavevmode\nobreak\ ,$ (5.3)

where $\tau$ is the complexified FI parameter and $y_{i}$ are flavour
fugacities. We thus have the Bethe equation:

$\Pi(u,\nu)\equiv q(-x)^{K}\prod_{i}\left({1\over
1-x^{Q_{i}}y_{i}}\right)^{Q_{i}}=1\leavevmode\nobreak\ ,$ (5.4)

with $q=e^{2\pi i\tau}$. The Witten index of this theory is simply
Intriligator:2013lca :

$\textbf{I}_{\text{W}}=|\mathcal{S}_{\text{BE}}|={\rm
max}\left(|K|+\sum_{i_{-\epsilon}}Q^{2}_{i_{-\epsilon}}\leavevmode\nobreak\
,\,\sum_{i_{\epsilon}}Q^{2}_{i_{\epsilon}}\right)\leavevmode\nobreak\
,\qquad\epsilon\equiv\operatorname{sign}(K)\leavevmode\nobreak\ .$ (5.5)

This theory has a one-form symmetry:

$\Gamma^{(1)}_{\rm 3d}\cong\mathbb{Z}_{M}\leavevmode\nobreak\ ,\qquad
M\equiv\gcd(K,Q_{i})\leavevmode\nobreak\ .$ (5.6)

This act on the $u$ variable as:

$u\mapsto u+\gamma_{0}\leavevmode\nobreak\ ,\qquad\gamma_{0}\equiv{1\over
M}\leavevmode\nobreak\ .$ (5.7)

Indeed, the gauge flux operator $\Pi$ is invariant under such a shift, and it
admits a $M$-th root:

$\Pi^{\gamma_{0}}\equiv\Pi^{1\over M}\leavevmode\nobreak\ .$ (5.8)

It is also easy to check that the one-form symmetry has a ’t Hooft anomaly:

$\mathcal{A}(\gamma_{(0)},\gamma_{(1)})=nm{K\over M^{2}}\leavevmode\nobreak\
,\qquad\textit{{\it i.e.} }\quad\mathfrak{a}={K\over M}\;{\rm
mod}\,M\leavevmode\nobreak\ .$ (5.9)

where we have $\gamma_{(1)}=m\gamma_{0}$ and $\gamma_{(0)}=n\gamma_{0}$.

Whatever the anomaly, the orbit structure of the Bethe vacua under
$\mathbb{Z}_{M}^{(0)}$ is trivial, as all orbits are of dimension $M$. Indeed,
we can solve the Bethe equation (5.4) by writing $x=e^{2\pi i\ell\over
M}z^{1\over M}$ and solve for $z$. Then, for each solution $z=\hat{z}$, we
will have $M$ Bethe roots:

$\hat{x}_{\ell}(\hat{z})=e^{2\pi i\ell\over M}\hat{z}\leavevmode\nobreak\
,\qquad\ell\in\mathbb{Z}_{M}\leavevmode\nobreak\ ,$ (5.10)

which are permuted by $\mathbb{Z}_{M}^{(0)}$:

$\mathcal{U}^{n\gamma_{0}}\;:\;\lvert\hat{u}_{\ell}+n\gamma_{0}\rangle\mapsto\lvert\hat{u}_{\ell+n}\rangle\leavevmode\nobreak\
.$ (5.11)

Moreover, all insertions of topological lines are tivial:

$\langle\mathcal{U}^{n\gamma_{0}}(\mathcal{C})\rangle_{\Sigma_{g}}=\delta_{n,0}\langle
1\rangle_{\Sigma_{g}}\leavevmode\nobreak\
,\qquad\langle\Pi^{m\gamma_{0}}\rangle_{\Sigma_{g}}=\delta_{m,0}\langle
1\rangle_{\Sigma_{g}}\leavevmode\nobreak\ ,$ (5.12)

as one can readily check. If $K=0$ mod $M$ the ’t Hooft anomaly vanishes, and
we can then gauge the full $(\mathbb{Z}_{M}^{(1)})_{\rm 3d}$, yet due to
(5.12) this has only the trivial effect of dividing the twisted index by
$M^{2g}$. The interpretation is simply that, in the absence of the anomaly, we
can rescale the vector multiplet by $1/M$, which leads to a $U(1)$ theory with
minimal charges $Q_{i}/M$.

The pure $U(1)_{K}$ theory. In the special case of the pure $U(1)$
$\mathcal{N}=2$ CS theory without matter, we have $M=K$. Thus we have the
Bethe equation and Bethe roots:

$\Pi(u)=q(-x)^{K}\leavevmode\nobreak\ ,\qquad\hat{u}_{\ell}={\ell-\tau\over
K}+{\frac{1}{2}}\;{\rm mod}\,1\leavevmode\nobreak\
,\quad\ell\in\mathbb{Z}_{K}\leavevmode\nobreak\ ,$ (5.13)

where the $K$ vacua are permuted by $\mathbb{Z}_{K}^{(0)}$. The handle-gluing
operator is $\mathcal{H}=K$, and hence $Z_{\Sigma_{g}\times S^{1}}=K^{g}$ for
this theory. The anonaly is $\mathfrak{a}=1$ mod $K$ and it is maximal, in the
sense of section 2.1.2. Nonetheless, we can still gauge a subgroup
$\mathbb{Z}_{r}\subset\mathbb{Z}_{K}$ in 3d if $r^{2}|K$. In such a case,
since all non-trivial insertions of symmetry operators vanish, the
$\mathbb{Z}_{r}^{(1)}\oplus\mathbb{Z}_{r}^{(0)}$ gauging trivially gives:

$Z_{\Sigma_{g}\times S^{1}}[U(1)_{K}/(\mathbb{Z}_{M}^{(1)})_{\rm 3d}]={1\over
r^{2}}Z_{\Sigma_{g}\times S^{1}}[U(1)_{K}]=\left({K\over
r^{2}}\right)^{g}\leavevmode\nobreak\ .$ (5.14)

This is interpreted as a rescaling of the vector multiplet by $1/r$, which
gives us a well-defined $U(1)_{{K\over r^{2}}}$ CS theory precisely if
$r^{2}|K$.

###  5.2 $SU(N)_{k}$ with adjoint matter

Let us discuss some general aspects of the $SU(N)_{k}$ $\mathcal{N}=2$ CS
theory coupled with $n_{\text{adj}}$ chiral multiplets in the adjoint
representation of the gauge group. For $n_{\text{adj}}=1$, this theory allows
one to compute the so-called equivariant Verlinde formula Gukov:2015sna  for
$\widetilde{G}=SU(N)$, which was extended to $G=\widetilde{G}/\Gamma$ in
Gukov:2021swm .

Here, the integer $k$ is the UV effective CS level. In our conventions (see
e.g. Closset:2019hyt ), it is related to the bare CS level $K$ that appear in
the twisted superpotential as:

$K=k+n_{\text{adj}}N\leavevmode\nobreak\ .$ (5.15)

The effective twisted superpotential of this theory is given by:

$\mathcal{W}(u,\nu)=\frac{K}{2}\sum_{a=1}^{N}u_{a}^{2}+u_{0}\sum_{a=1}^{N}u_{a}+\frac{1}{(2\pi{i})^{2}}\sum_{i=1}^{n_{\text{adj}}}\sum_{\begin{subarray}{c}a,b=1\\\
a\neq
b\end{subarray}}^{N}\text{Li}_{2}\left(e^{2\pi{i}(u_{a}-u_{b})}y_{i}\right)\leavevmode\nobreak\
,$ (5.16)

where the first two contributions are the same as in (3.2), including the
Lagrange multiplier $u_{0}$ that imposes tracelessness, while the dilogarithms
are the contributions from the adjoint chiral multiplets, with $\nu_{i}$ their
twisted masses and $y_{i}\equiv e^{2\pi i\nu_{i}}$. Then, the Bethe equations
read:

$\displaystyle\begin{split}&\Pi_{a}(u,\nu)\equiv
q{x}_{a}^{k}\prod_{i=1}^{n_{\text{adj}}}\prod_{\begin{subarray}{c}b=1\\\ b\neq
a\end{subarray}}^{N}\frac{{x}_{a}-y_{i}{x}_{b}}{{x}_{b}-y_{i}{x}_{a}}=1\leavevmode\nobreak\
,\qquad a=1,\cdots,N\leavevmode\nobreak\ ,\\\
&\Pi_{0}(u,\nu)\equiv\prod_{a=1}^{N}x_{a}=1\leavevmode\nobreak\ ,\end{split}$
(5.17)

where we defined $q=e^{2\pi iu_{0}}$ exactly as in section 3.1.

Eigenvalues of the $A$-operators. Since the adjoint matter multiplets are not
charged under the center $\mathbb{Z}_{N}\subset SU(N)$, we retain the full 3d
1-form symmetry $(\mathbb{Z}_{N}^{(1)})_{\rm 3d}$. Using the explicit form of
the effective twisted superpotential provided above, we can explicitly compute
the eigenvalues of the $\Pi^{\gamma}$ operator (2.12) (which is diagonalised
by the Bethe vacua):

$\Pi^{\gamma_{0}}(\hat{u})=\hat{x}_{1}^{k}\prod_{i=1}^{n_{\text{adj}}}\prod_{b=2}^{N}\frac{\hat{x}_{1}-y_{i}\hat{x}_{b}}{\hat{x}_{b}-y_{i}\hat{x}_{1}}=\hat{q}^{-1}\leavevmode\nobreak\
,$ (5.18)

where $\gamma_{0}$ is the generator of $\mathbb{Z}_{N}^{(1)}$ defined in
(3.16) and $\hat{q}$ denotes the on-shell value of $q$, as we used the
equations (5.17). Note that, in general, one might want to add an overall
phase to (5.18), as discussed in the previous sections.

The anomaly factor. The fact that the adjoint matter is not charged under the
$(\mathbb{Z}_{N}^{(1)})_{\rm 3d}$ symmetry directly implies that:

$\mathcal{W}_{\text{adj}}(u+\gamma_{0})=\mathcal{W}_{\text{adj}}(u)\leavevmode\nobreak\
,$ (5.19)

as one can readily check. The same argument would apply to any gauge theory
with matter preserving some 1-form symmetry. Hence, we see that the ’t Hooft
anomaly factor (2.40) only receives contributions only from the bare CS terms.
We thus find that the ’t Hooft anomaly is:

$\mathfrak{a}=-K\;{\rm mod}N=-k\;{\rm mod}N\leavevmode\nobreak\ ,$ (5.20)

where we use the relation (5.15). Hence the general constraints on orbit
structures that follow from the presence of a ’t Hooft anomaly are exactly the
same as for the pure $\mathcal{N}=2$ CS theory.

In principle, it is now straightforward to apply the formalism of section 2 to
this theory. In practice, explicit computations remain challenging. We hope to
come back to this problem in future works.

##  6 Conclusion and outlook

Three-dimensional $\mathcal{N}=2$ supersymmetric gauge theories with a
$U(1)_{R}$ $R$-symmetry allow for the computation of many exact observables,
but previous methods on half-BPS three-manifolds $\mathcal{M}_{3}$ with non-
trivial first homology were restricted to gauge groups $\widetilde{G}$ whose
fundamental group $\pi_{1}(G)$ is a free abelian group. In this work, we
lifted this restriction in the case of $\mathcal{M}_{3}=\Sigma_{g}\times
S^{1}$, wherein the supersymmetric partition computes the topologically
twisted index Nekrasov:2014xaa ; Benini:2015noa ; Benini:2016hjo ;
Closset:2016arn .

We developed a systematic formalism to compute the twisted index
$Z_{\Sigma_{g}\times S^{1}}$ by gauging a one-form symmetry
$(\Gamma^{(1)})_{\rm 3d}\cong\Gamma$ of the 3d gauge theory. We performed this
gauging in the 3d $A$-model formalism on $\Sigma_{g}$, hereby gauging the two
distinct discrete higher-form symmetries $\Gamma^{(1)}$ and $\Gamma^{(0)}$ in
the 2d TQFT description:

$Z_{\Sigma_{g}\times S^{1}}[\mathcal{T}/(\Gamma^{(1)})_{\rm
3d}]={1\over|\Gamma|^{2g}}\sum_{B\in H^{2}(\Sigma_{g},\Gamma)}\sum_{C\in
H^{1}(\Sigma_{g},\Gamma)}Z_{\Sigma_{g}\times
S^{1}}[\mathcal{T}](B,C)\leavevmode\nobreak\ .$ (6.1)

This gauging was be done very explicitly, building directly on earlier
insights willett ; Eckhard:2019jgg ; Gukov:2021swm . In particular, we refined
the results of Gukov:2021swm  and connected them to the 2d Hilbert-space
approach in the $A$-model. As an intermediate step, we carefully studied the
correlation functions of topological point and line operators that implement
the symmetries in the $A$-model:

$Z_{\Sigma_{g}\times S^{1}}[\mathcal{T}](B,C)\cong\langle\Pi^{\gamma}({\rm
pt})\,\mathcal{U}^{\delta}(\mathcal{C})\rangle_{\Sigma_{g}}\leavevmode\nobreak\
,\qquad\gamma\in\Gamma^{(1)}\leavevmode\nobreak\
,\quad\delta\in\Gamma^{(1)}\leavevmode\nobreak\ .$ (6.2)

We also studied the ’t Hooft anomalies that can affect these symmetries, and
showed how they usefully constrain the structure of the 2d ground states (also
known as Bethe vacua).

The core of this paper was the study of the $SU(N)_{K}$ $\mathcal{N}=2$
Chern–Simons theory with a $\mathbb{Z}_{N}$ symmetry, for any $N$, and of all
the $(SU(N)/\mathbb{Z}_{r})_{K}$ $\mathcal{N}=2$ CS theories that one can
obtain by discrete gauging. Our analysis leads to very explicit formulas for
the twisted indices, and especially for the Witten index (at $g=1$), which we
can write down in terms of simple number-theoretic functions for any $N$, $r$
and $K$. While our results match with many previous results in special cases
(see e.g. beauville1996verlinde ; alekseev2000formulas ; Oprea+2011+181+217 ;
Meinrenken2018  in the mathematical literature), our most general formulas
appear to be new results. In particular, we noticed and exploited a subtle
gravitational-$(\Gamma^{(1)})_{\rm 3d}$ mixed anomaly of the $SU(N)_{K}$
theory for $N$ even, whose treatment is crucial in order to obtain the correct
results for any $r|N$. As already emphasised in the introduction, this mixed
anomaly is already present for $SU(2)_{K}$ with $K/2$ even, and it is always
related to the corresponding $(SU(N)/\mathbb{Z}_{r})_{k=K-N}$ $\mathcal{N}=0$
CS theory being a spin-TQFT instead of a bosonic 3d TQFT.

Outlook. Many different research directions could be followed to extend the
results of this paper. Let us briefly enumerate the most salient ones:

  * •

Using the formalism of this paper, one can compute twisted indices for any
$\mathcal{N}=2$ gauge theory with a real compact gauge group $G$.383838That
is, with the usual assumptions for the 3d $A$-model to exist, including the
existence of an $R$-symmetry. To do this as explicitly as possible, one should
further develop powerful computational algebraic methods, as was recently done
for unitary gauge groups Closset:2023vos  – in that language, $\Gamma^{(0)}$
and $\Gamma^{(1)}$ correspond to a non-trivial action and to a grading,
respectively, on the Bethe ideal defined by the Bethe equations. It is then
conceivable that a more algebraic approach to the computation of the
correlators (6.2) is possible.

  * •

One low-hanging fruit might be the explicit computation of Witten indices for
general gauge groups with general $(\Gamma^{(1)})_{\rm 3d}$ a finitely-
generated abelian group, possibly with matter, given the result for
$G=\widetilde{G}$. For non-cyclic groups $\Gamma^{(1)}_{3d}$, we expect an
analogous result as for the $\widetilde{G}=SU(N)$ case of this paper, with the
enumerating functions being appropriate totient functions for finite abelian
groups (see e.g. HALL1936 ).

  * •

While we focussed on one-form symmetries of 3d $\mathcal{N}=2$ theories, such
field theories can admit even more interesting generalised symmetries,
including non-invertible symmetries. This will be particularly important to
explore when studying $SO(N)$ gauge theories, where we would need to study the
gauging of both 1-form and 0-form symmetries in 3d, corresponding to rich
combinations of 1-, 0- and $(-1)$-form symmetries in the $A$-model. See e.g.
Kapustin:2011gh ; Mekareeya:2022spm ; Verlinde:1988sn ; Tachikawa:2017gyf ;
Huang:2021zvu ; Benini:2018reh ; Hsin:2020nts ; Cordova:2017vab ;
Aharony:2016jvv ; Delmastro:2022pfo  for relevant studies.

  * •

The approach of this paper can be extended to compute more general partition
functions for $G=\widetilde{G}/\Gamma$, by inserting Seifert-fibering
operators on $\Sigma_{g}$ to obtain $Z_{\mathcal{M}_{3}}$ for any Seifert
3-manifold $\mathcal{M}_{3}$ Closset:2012ru ; Closset:2018ghr ;
Closset:2019hyt .

  * •

The $A$-model approach is also applicable to 4d $\mathcal{N}=1$ supersymmetric
field theories compactified on $T^{2}$ Nekrasov:2014xaa ; Closset:2013vra ;
Closset:2017bse ; Closset:2019ucb , and it will be very interesting to study
higher-form symmetries in that context. We expect ’t Hooft anomalies and their
consequences to be particularly intricate in this case.

Other interesting questions include the study of higher-form symmetries for
the $T[M_{3}]$ theory of the 3d/3d correspondence Dimofte:2011ju ;
Gukov:2016gkn ; Gukov:2017kmk ; Eckhard:2019jgg , and the application of the
2d perspective to other 3d TQFTs (whether or not the UV completion is
supersymmetric), for instance the theories of Gang:2018huc ; Gang:2021hrd ;
Gang:2023rei  and of Bonetti:2024cvq . Finally, our explicit expressions for
the $(SU(N)/\mathbb{Z}_{r})_{K}$ indices seem amenable to large-$N$ studies,
which could be very interesting to explore, for instance, in connection to
supersymmetric black holes in holography Benini:2016rke .

###### Acknowledgements.

We are grateful to Riccardo Argurio, Lakshya Bhardwaj, Lea Bottini, Sergei
Gukov, Dragos Oprea, Du Pei, Sakura Schafer-Nameki for correspondence and
discussions, and we are particularly grateful to Brian Willett for allowing us
to use his unpublished results in this work. CC also acknowledges many
influential discussions with Heeyeon Kim and with Brian Willett on the subject
of the 3d $A$-model over many years. CC is a Royal Society University Research
Fellow. EF is supported by the EPSRC grant “Local Mirror Symmetry and Five-
dimensional Field Theory”. The work of OK is supported by the School of
Mathematics at the University of Birmingham. We thank the Galileo Galilei
Institute for Theoretical Physics for the hospitality and the INFN for partial
support during the completion of this work.

##  Appendix A 3d $A$-model for $\widetilde{G}$: a lightning review

In this appendix, we review some aspects of the 3d $A$-model for 3d
$\mathcal{N}=2$ Chern–Simons-matter gauge theory $\mathcal{T}_{\widetilde{G}}$
with a gauge group $\widetilde{G}$, a product of simply connected compact Lie
groups and of unitary gauge groups. We refer to Closset:2017zgf ;
Closset:2019hyt  for further background and explanations, as well as to
Closset:2023vos  for a recent review in the case of unitary gauge groups.

###  A.1 The Coulomb branch parameters

The main player in this discussion is the 3d classical Coulomb branch
parameter, which we denote by $u$. To define this variable, we put our 3d
theory on $\mathbb{R}^{2}\times S_{\beta}^{1}$. Effectively, this gives us a
2d $\mathcal{N}=(2,2)$ theory with an infinite number of massive Kaluza-Klein
(KK) modes that carry momentum along the compactified dimension
$S^{1}_{\beta}$ with radius $\beta$. In the 2d $\mathcal{N}=(2,2)$ language,
the vector multiplet is repackaged into a twisted chiral multiplet whose
lowest component is a complex scalar $u$. This dimensionless scalar is defined
by combining the real scalar $\sigma$ with the 3d gauge field along the
$S^{1}$-direction, $A_{3}$:

$u=\beta(i\sigma+A_{3})\in\mathfrak{t}/\Lambda^{\widetilde{G}}_{\rm
mw}\leavevmode\nobreak\ .$ (A.1)

Here, $\mathfrak{t}$ is the Cartan subalgebra of $\tilde{G}$, and
$\Lambda^{\widetilde{G}}_{\rm mw}$ is the magnetic weight lattice. We refer to
appendix B for a brief review of the relevant electric and magnetic weight
lattices for general gauge groups. Choosing
$\\{e^{a}\\}_{a=1}^{\text{rk}\;{\widetilde{G}}}$ to be an integral basis for
the magnetic weight lattice $\Lambda^{\widetilde{G}}_{\rm mw}$, we can expand
$u$ as follows:

$u=u_{a}e^{a}\leavevmode\nobreak\ ,$ (A.2)

where the sum over the index $a=1,\cdots,{\rm rank}(\widetilde{G})$ is
assumed. This basis is integral in the sense that we have:

$\rho(u)=\rho^{a}u_{a}\leavevmode\nobreak\
,\qquad\qquad\rho^{a}\equiv\rho(e^{a})\in\mathbb{Z}\leavevmode\nobreak\ ,$
(A.3)

for any electric weight $\rho\in\Lambda_{\text{w}}^{\widetilde{G}}$. Under
large gauge transformations, the Coulomb branch parameters $u_{a}$ transform
as:

$u_{a}\sim u_{a}+n_{a}\leavevmode\nobreak\ ,\qquad
n_{a}\in\mathbb{Z}\leavevmode\nobreak\ .$ (A.4)

Therefore, it is sometimes useful to introduce the single-valued parameters:

$x_{a}\equiv e^{2\pi iu_{a}}\leavevmode\nobreak\ ,\qquad
a=1,\cdots,\text{rk}\;{\widetilde{G}}\leavevmode\nobreak\ .$ (A.5)

One can play a similar game for any flavour symmetry group $G_{\text{F}}$ that
might be present in the theory. In this case, we consider a 3d $\mathcal{N}=2$
vector multiplet with real scalar $m^{\text{F}}$ and gauge field
$A^{\text{F}}$, and we define the 2d twisted masses:

$\nu\equiv\beta(im_{\text{F}}+A_{3}^{\text{F}})\in\mathfrak{t}^{\text{F}}/\Lambda^{G_{\text{F}}}_{\rm
mw}\leavevmode\nobreak\ ,$ (A.6)

As in the case of the gauge group $\widetilde{G}$, we can pick an integral
basis $\\{e^{\alpha}_{\text{F}}\\}_{\alpha=1}^{\text{rk}\;G_{\text{F}}}$ for
the flavour magnetic weight lattice $\Lambda^{G_{\text{F}}}_{\rm mw}$, so
that:

$\nu=\nu_{\alpha}e_{\text{F}}^{\alpha}\leavevmode\nobreak\ ,$ (A.7)

where $\alpha=1,\cdots,{\rm rank}(G_{\text{F}})$ runs over a maximal torus of
the flavour group.

###  A.2 The effective twisted superpotential and the effective dilaton

The 2d $\mathcal{N}=(2,2)$ low energy effective description on $\Sigma$ is
controlled by the so-called effective twisted superpotential
$\mathcal{W}(u,\nu)$ and by the effective dilaton $\Omega(u,\nu)$, which one
obtains upon integrating out the massive charged chiral multiplets on
$\Sigma\times S^{1}$ Nekrasov:2014xaa .

Effective twisted superpotential. The twisted superpotential receives
contributions from the CS action and from the 3d $\mathcal{N}=2$ chiral
multiplets. It has the following general form:

$\mathcal{W}(u,\nu)=\mathcal{W}_{\text{matter}}(u,\nu)+\mathcal{W}_{\text{CS}}(u,\nu)\leavevmode\nobreak\
.$ (A.8)

The matter contribution reads:

$\mathcal{W}_{\text{matter}}(u,\nu)\equiv\frac{1}{(2\pi
i)^{2}}\sum_{(\rho,\rho^{\text{F}})\in\mathfrak{R}\times\mathfrak{R}^{\text{F}}}\text{Li}_{2}\left(e^{2\pi
i(\rho(u)+\rho_{\text{F}}(\nu))}\right)\leavevmode\nobreak\ ,$ (A.9)

where $\mathfrak{R}\times\mathfrak{R}^{\text{F}}$ is the gauge and flavour
representation of the 3d $\mathcal{N}=2$ chiral multiplets $\Phi$ under
${\widetilde{G}}\times G_{\text{F}}$, and
$(\rho,\rho^{\text{F}})\in\Lambda^{\widetilde{G}}_{{\rm
mw}}\times\Lambda^{G_{\text{F}}}_{{\rm mw}}$ are the corresponding weights.
The CS contributions are schematically given by:

$\mathcal{W}_{\text{CS}}(u)=\frac{1}{2}\sum_{a,b}K_{ab}\left(u_{a}u_{b}+\delta_{ab}u_{a}\right)\leavevmode\nobreak\
,$ (A.10)

where $K_{ab}$ denote the effective UV CS levels associated with the gauge
group $\widetilde{G}$ in the so-called $U(1)_{-\frac{1}{2}}$ quantization
Closset:2019hyt .393939For a recent review, see also section 2.2 of
Closset:2023vos . The expression (A.10) is the contribution from the gauge CS
terms, but the flavour CS levels Closset:2012vp  contribute similarly.

Effective dilaton. This effective dilaton is a holomorphic function that
couples $u$ to the curvature of $\Sigma$ Closset:2014pda ; Nekrasov:2014xaa .
For our gauge theory, it reads:

$\Omega(u,\nu)=\Omega_{\text{CS}}(u,\nu)+\Omega_{\text{matter}}(u,\nu)+\Omega_{\text{W-boson}}(u)\leavevmode\nobreak\
.$ (A.11)

The CS contribution involves (mixed) CS levels for the $U(1)_{R}$ symmetry
Closset:2017zgf :

$\Omega_{\text{CS}}(u,\nu)=K_{RG}\sum_{a=1}^{\text{rk}(\widetilde{G})}u_{a}+\sum_{\alpha=1}^{\text{rk}(G_{\text{F}})}K_{R\alpha}\nu_{\alpha}+\frac{1}{2}K_{RR}\leavevmode\nobreak\
.$ (A.12)

The matter contribution reads:

$\Omega_{\text{matter}}(u,\nu)=-\frac{1}{2\pi
i}\sum_{(\rho,\rho^{\text{F}})\in\mathfrak{R}\times\mathfrak{R}^{\text{F}}}(r_{\rho^{\text{F}}}-1)\log\left(1-e^{2\pi
i(\rho(u)+\rho^{\text{F}}(\nu))}\right)\leavevmode\nobreak\ ,$ (A.13)

where $r_{\rho^{\text{F}}}$ denote the R-charges of the chiral multiplets.
Finally, the W-bosons contribute to the effective dilaton potential as:

$\Omega_{\text{W-bosons}}(u)=-\frac{1}{2\pi
i}\sum_{\alpha\in\Delta}\left(1-e^{2\pi i\alpha(u)}\right)\leavevmode\nobreak\
,$ (A.14)

where the sum is over the roots of the gauge group $\widetilde{G}$.

###  A.3 The 3d topologically twisted index

The topologically twisted index for a 3d $\mathcal{N}=2$ gauge theory with
gauge group $\widetilde{G}$ can be computed as a trace over certain operators
in the 3d $A$-model Nekrasov:2014xaa ; Closset:2016arn . All these operators
$\mathcal{O}$ are given ‘off-shell’ as function $\mathcal{O}(u)$ of the gauge
and flavour parameters $u$ and $\nu$. They diagonalise the Bethe vacua, and
their ‘on-shell’ values at solutions of the Bethe equations are denoted by
$\mathcal{O}(\hat{u})$:

$\mathcal{O}\lvert u\rangle=\mathcal{O}(\hat{u})\lvert
u\rangle\leavevmode\nobreak\ .$ (A.15)

The Bethe equations themselves are written in terms of the gauge flux
operators:

$\Pi_{a}(u,\nu)=\exp{\left(2\pi i\frac{\partial\mathcal{W}(u,\nu)}{\partial
u_{a}}\right)}\leavevmode\nobreak\ ,\qquad
a=1,\cdots,\text{rk}\;\widetilde{G}\leavevmode\nobreak\ .$ (A.16)

By definition, the gauge flux operators are trivial on-shell,
$\Pi_{a}(\hat{u})=1$. The set of Bethe vacua is defined as in (2.10), namely:

$\mathcal{S}_{\text{BE}}\equiv\left\\{\hat{u}\in\mathfrak{t}/\Lambda_{\rm
mw}^{\widetilde{G}}:\;\Pi_{a}(\hat{u},\nu)=1\leavevmode\nobreak\ ,\forall
a\quad\text{and}\quad w\cdot\hat{u}\neq\hat{u}\leavevmode\nobreak\ ,\forall
w\in W_{\widetilde{G}}\right\\}/{W_{\widetilde{G}}}\leavevmode\nobreak\ .$
(A.17)

Here we need to exclude putative solutions that have a non-trivial stabiliser
for the action of the Weyl group $W_{\widetilde{G}}$, and we then identify all
solutions related by the Weyl symmetry. Given a non-trivial flavour symmetry
group $G_{\text{F}}$,404040Or rather a flavour symmetry algebra; we may assume
that the fundamental group of $G_{\text{F}}$ is a free abelian group for our
purposes here. we similarly define the flavour flux operator:

$\Pi_{\text{F},\;\alpha}(u,\nu)=\exp{\left(2\pi
i\frac{\partial\mathcal{W}(u,\nu)}{\partial\nu_{\alpha}}\right)}\leavevmode\nobreak\
,\qquad\alpha=1,\cdots,\text{rk}\;G_{\text{F}}\leavevmode\nobreak\ .$ (A.18)

Finally, the most important operator is the handle-gluing operator
$\mathcal{H}_{\widetilde{G}}(u,\nu)$ which is given:

$\mathcal{H}_{\widetilde{G}}(u,\nu)=\exp{\left(2\pi
i\Omega(u,\nu)\right)}\;\det_{1\leq
a,b\leq\text{rk}\;\widetilde{G}}\left(\frac{\partial^{2}\mathcal{W}(u,\nu)}{\partial
u_{a}\partial u_{b}}\right)\leavevmode\nobreak\ ,$ (A.19)

We simply denote it by $\mathcal{H}$ whenever it is clear that we are talking
about the $\widetilde{G}$ theory. The insertion of this operator on $\Sigma$
has the effect of adding a handle, thus increasing the genus of the Riemann
surface Nekrasov:2014xaa .

The 3d flavoured twisted index from the $A$-model. The 3d flavoured twisted
index is the Witten index defined as a trace over the Hilbert space of the
theory compactified on $\Sigma_{g}$ with a topological $A$-twist and with
fugacities $y_{\alpha}\equiv e^{2\pi i\nu_{\alpha}}$ and background magnetic
fluxes $\mathfrak{m}_{\text{F}}$ for the flavour symmetry:

$Z_{\Sigma_{g}\times
S^{1}}=\operatorname{Tr}_{\mathcal{H}_{\Sigma_{g};\mathfrak{m}_{\text{F}}}}\left((-1)^{\text{F}}\prod_{\alpha=1}^{\text{rk}\;G_{\text{F}}}y_{\alpha}^{Q_{\alpha}^{\text{F}}}\right)\leavevmode\nobreak\
.$ (A.20)

It can be computed in the $A$-model formalism as a trace over
$\mathcal{H}_{S^{1}}$, the ground-state Hilbert space spanned by the Bethe
vacua:

$Z_{\Sigma_{g}\times
S^{1}}=\operatorname{Tr}_{\mathcal{H}_{S^{1}}}\left(\mathcal{H}^{g-1}\Pi_{\rm
F}^{\mathfrak{m}_{\rm F}}\right)\leavevmode\nobreak\ .$ (A.21)

For the $\widetilde{G}$ gauge theory, this 2d TQFT formula takes the explicit
form Closset:2016arn :

$Z_{\Sigma_{g}\times S^{1}}[\widetilde{G}](\nu)_{\mathfrak{m}_{\rm
F}}=\sum_{\hat{u}\in\mathcal{S}_{\text{BE}}}\mathcal{H}_{\widetilde{G}}^{g-1}(\hat{u},\nu)\Pi(\hat{u},\nu)^{\mathfrak{m}}\Pi_{\text{F}}(\hat{u},\nu)^{\mathfrak{m}_{\text{F}}}\leavevmode\nobreak\
.$ (A.22)

where we evaluate (A.18) and (A.19) at the Bethe vacua. Note that we use the
shorthand notation $\Pi^{\mathfrak{m}_{\rm
F}}\equiv\prod_{\alpha}\Pi_{\alpha}^{\mathfrak{m}_{{\rm F},\alpha}}$.

The formula (A.21) holds for any 3d $A$-model, and in particular for any 3d
$\mathcal{N}=2$ gauge theory with any choice of (compact, real) gauge group
$G$. In the main text, we effectively compute $\mathcal{H}_{G}$ for
$G=\widetilde{G}/\Gamma$ if $\Gamma$ is non-anomalous. We can further develop
the 2d TQFT perspective by assigning Hilbert-space operations to basic two-
dimensional cobordisms, as discussed in figure 4 in the main text.

##  Appendix B Lattices associated with Lie groups

In this appendix, we review some basic facts about Lie groups. In particular,
starting from any (simple) Lie group $G$, one can build six generally distinct
lattices which are important in the representation theory of $G$. See
Humphreys1972 ; Fulton2004 ; Kapustin:2005py  for a more comprehensive
treatment.

First, for any lattice $L\subseteq\mathbb{R}^{n}$, the dual lattice $L^{*}$ is
defined as:

$L^{*}=\\{f\in(\text{span}(L))^{*}\,|\,f(x)\in\mathbb{Z}\,\,\forall x\in
L\\}\leavevmode\nobreak\ .$ (B.1)

It holds that $(L^{*})^{*}=L$. Without too much loss of generally, let us
assume that the Lie algebra $\mathfrak{g}=\text{Lie}(G)$ of $G$ is simple and
compact.414141Once we complexify the Lie algebra, it does not make sense to
talk about whether the Lie algebra is compact or not. We can still use the
fact that every complex semi-simple Lie algebra always possesses a real form
that is compact. Then, the complexification $\mathfrak{g}_{\mathbb{C}}$ of
$\mathfrak{g}$ admits a decomposition :

$\mathfrak{g}_{\mathbb{C}}=\mathfrak{t}_{\mathbb{C}}\oplus\bigoplus_{\alpha\in\Phi}V_{\alpha}\leavevmode\nobreak\
,$ (B.2)

where $\mathfrak{t}$ is the _Cartan subalgebra_ , i.e. the maximal abelian
subalgebra of $\mathfrak{g}$.424242It is customary to be a bit careless about
whether by $\mathfrak{g}$ one actually means $\mathfrak{g}_{\mathbb{C}}$. The
set $\Phi\subseteq\mathfrak{t}^{*}$ are the set of roots, and
$V_{\alpha}\subseteq\mathfrak{g}_{\mathbb{C}}$ are the root spaces. The Cartan
subalgebra $\mathfrak{t}_{\mathbb{C}}\ni H$ acts on the root spaces
$V_{\alpha}\ni X_{\alpha}$ as:

$[H,X_{\alpha}]=\alpha(H)X_{\alpha}\leavevmode\nobreak\ .$ (B.3)

We can always “diagonalise” the $V_{\alpha}$. For $E_{\alpha}\in V_{\alpha}$,
there is an $H_{\alpha}\in\mathfrak{t}$ for each $\alpha\in\Phi$ such that:

$[E_{\alpha},E_{-\alpha}]=H_{\alpha}\leavevmode\nobreak\
,\qquad[H_{\alpha},E_{\pm\alpha}]=\pm 2E_{\pm\alpha}\leavevmode\nobreak\ .$
(B.4)

The $E_{\alpha}$ are called _root vectors_ and the $H_{\alpha}$ are the
_coroot vectors_. They have a natural pairing: for any $\alpha,\beta\in\Phi$,
$\alpha(H_{\beta})\in\mathbb{Z}$. The coroots span the Cartan subalgebra
$\mathfrak{t}_{\mathbb{C}}$ over $\mathbb{C}$.

The roots span a lattice called the _root lattice_ $\Lambda_{\rm
r}\subseteq\mathfrak{t}^{*}$ of $\mathfrak{g}$, while the coroots span the
coroot lattice $\Lambda_{\rm cr}\subseteq\mathfrak{t}$. The root system
typically has a large isometry group, which is called the Weyl group $W$ of
$\mathfrak{g}$. The _weight lattice_ $\Lambda_{\rm w}=\Lambda_{\rm cr}^{*}$ is
defined as the dual of the coroot lattice. It contains the root lattice
$\Lambda_{\rm r}$ as a sublattice. The quotient

$\Lambda_{\rm w}/\Lambda_{\rm r}\cong Z(\widetilde{G})\leavevmode\nobreak\ ,$
(B.5)

is isomorphic (as an abelian group) to the centre of $\widetilde{G}$, which is
the unique simply connected compact Lie group with
$\text{Lie}(G)=\text{Lie}(\widetilde{G})=\mathfrak{g}$. Furthermore, the
_magnetic weight lattice of $\mathfrak{g}$_, $\Lambda_{\rm mw}=\Lambda_{\rm
r}^{*}$, is defined as the dual of the root lattice. It contains the coroot
lattice as sublattice, and their quotient is again isomorphic to
$Z(\widetilde{G})$.

The four lattices $\Lambda_{\rm r}$, $\Lambda_{\rm w}$, $\Lambda_{\rm mw}$ and
$\Lambda_{\rm cr}$ depend only on the Lie algebra $\mathfrak{g}$ and not on
the global form of the Lie group $G$. In order to construct representations
for $G$ rather than for $\mathfrak{g}$, one must study the exponential map
$\exp:\mathfrak{g}\to G$, $H\mapsto e^{2\pi iH}$. A fundamental theorem states
that, if $G$ is connected and compact, the exponential map is surjective, i.e.
$\exp(\mathfrak{g})=G$. By restricting the exponential map to the Cartan
subalgebra, we can construct two new lattices which depend on the global form
of $G$. Firstly, we have the lattice:

$\Lambda_{\rm
mw}^{G}\equiv\ker\exp|_{\mathfrak{t}}=\\{H\in\mathfrak{t}\,|\,e^{2\pi
iH}=\mathbbm{1}\\}\leavevmode\nobreak\ $ (B.6)

which we call the magnetic weight lattice of $G$. This is the lattice of GNO-
quantised magnetic fluxes for $G$ Goddard:1976qe . The dual lattice
$\Lambda_{\rm w}^{G}\equiv(\Lambda_{\rm mw}^{G})^{*}$ is the weight lattice of
the group $G$. This is a sublattice of $\Lambda_{\rm w}$ which always contains
$\Lambda_{\rm r}$. In summary, we have:

${\mathfrak{t}^{*}:}$${\Lambda_{\rm r}}$${\stackrel{{\scriptstyle
Z(G)}}{{\subseteq}}}$${\Lambda_{\rm
w}^{G}}$${\stackrel{{\scriptstyle\pi_{1}(G)}}{{\subseteq}}}$${\Lambda_{\rm
w}}$${\mathfrak{t}:}$${\Lambda_{\rm mw}}$${\stackrel{{\scriptstyle
Z(G)}}{{\supseteq}}}$${\Lambda_{\rm
mw}^{G}}$${\stackrel{{\scriptstyle\pi_{1}(G)}}{{\supseteq}}}$${\Lambda_{\rm
cr}}$$\scriptstyle{*}$$\scriptstyle{*}$$\scriptstyle{*}$ (B.7)

The groups $Z(G)$ and $\pi_{1}(G)$ above the inclusions denote the groups that
the respective quotients are isomorphic to, i.e..
$B\stackrel{{\scriptstyle\mathcal{G}}}{{\supseteq}}A$ means that
$B/A\cong\mathcal{G}$.

For the purpose of gauging higher-form symmetries, it is useful to further
refine these sequences of sublattices. Let $\Gamma\subseteq Z(G)$ be a
subgroup of the centre of $G$. Then there exists a magnetic weight lattice
$\Lambda_{\rm mw}^{G/\Gamma}$ such that:

$\Gamma\cong\Lambda_{\rm mw}^{G/\Gamma}/\Lambda_{\rm
mw}^{G}\leavevmode\nobreak\ .$ (B.8)

Its dual lattice $\Lambda_{\rm w}^{G/\Gamma}$ in $\mathfrak{t}^{*}$ is a
sublattice of $\Lambda_{\rm w}^{G}$, with the quotient again being isomorphic
to $\Gamma$. The other quotient is isomorphic to $Z(G)/\Gamma$, which is well-
defined since $Z(G)$ is abelian and thus $\Gamma\triangleleft Z(G)$ is normal
in $Z(G)$. We illustrate this in the following diagram:

${\mathfrak{t}^{*}:}$${\Lambda_{\rm r}}$${\stackrel{{\scriptstyle
Z(G)/\Gamma}}{{\subseteq}}}$${\Lambda_{\rm
w}^{G/\Gamma}}$${\stackrel{{\scriptstyle
G/\Gamma}}{{\subseteq}}}$${\Lambda_{\rm
w}^{G}}$${\mathfrak{t}:}$${\Lambda_{\rm mw}}$${\stackrel{{\scriptstyle
Z(G)/\Gamma}}{{\supseteq}}}$${\Lambda_{\rm
mw}^{G/\Gamma}}$${\stackrel{{\scriptstyle\Gamma}}{{\supseteq}}}$${\Lambda_{\rm
mw}^{G}}$$\scriptstyle{*}$$\scriptstyle{*}$$\scriptstyle{*}$ (B.9)

Obviously, as suggested by the notation, $\Lambda_{\rm w}^{G/\Gamma}$ is the
weight lattice for the group $G/\Gamma$.

##  Appendix C Mixed ’t Hooft anomaly from dimensional reduction

In this appendix, we further discuss the 4d anomaly theory (2.31) associated
with the 3d 1-form symmetry $\Gamma^{(1)}_{\text{3d}}\cong\Gamma$. We reduce
the theory along $S^{1}$ and show how the ’t Hooft anomaly reduces to a mixed
’t Hooft anomaly between the 2d 0-form and 1-form symmetries $\Gamma^{(0)}$
and $\Gamma^{(1)}$. We refer to Benini:2018reh ; Kapustin:2013qsa  for recent
physics discussions and to Whitehead1949 ; browder1962  for the original
mathematical background.

Associated with $\Gamma$, there exists a unique abelian group
$\hat{\mathcal{A}}({\Gamma})$, such that for any abelian group
$\Gamma^{\prime}$ there exists a quadratic function
$\gamma:\Gamma\to\hat{\mathcal{A}}(\Gamma)$ that satisfies
$q=\tilde{q}\circ\gamma$ for any quadratic function
$q:\Gamma\to\Gamma^{\prime}$ and some
$\tilde{q}\in\text{Hom}(\hat{\mathcal{A}}(\Gamma),\Gamma^{\prime})$ uniquely
determined by $q$.434343A map $q:\Gamma\rightarrow\Gamma^{\prime}$ is said to
be a quadratic function iff $q(\gamma)=q(-\gamma)$ and
$\langle\gamma,\widetilde{\gamma}\rangle_{q}\equiv
q(\gamma+\widetilde{\gamma})-q(\gamma)-q(\widetilde{\gamma})$ is bilinear. Let
us choose an explicit set of generators of $\Gamma$ such that
$\Gamma\cong\bigoplus_{i}\mathbb{Z}_{N_{i}}$. Then, the associated abelian
group is given by:

$\hat{\mathcal{A}}(\Gamma)=\bigoplus_{i}\hat{\mathcal{A}}(\mathbb{Z}_{N_{i}})\oplus\bigoplus_{i<j}\mathbb{Z}_{N_{i}}\oplus\mathbb{Z}_{N_{j}}\leavevmode\nobreak\
,$ (C.1)

with:

$\hat{\mathcal{A}}(\mathbb{Z}_{N_{i}})=\begin{cases}\mathbb{Z}_{N_{i}}\qquad&\text{if
}N_{i}\in 2\mathbb{Z}+1\leavevmode\nobreak\ ,\\\
\mathbb{Z}_{2N_{i}}\qquad&\text{if }N_{i}\in 2\mathbb{Z}\leavevmode\nobreak\
.\end{cases}$ (C.2)

The map $\Gamma\rightarrow\hat{\mathcal{A}}(\Gamma)$ is also known as the
universal quadratic functor.

Pontryagin square and anomaly theory. The 4d anomaly theory (2.31) is defined
in terms of the Pontryagin square:

$\mathcal{P}:H^{2}(\mathfrak{M}_{4},\Gamma)\rightarrow
H^{4}(\mathfrak{M}_{4},\hat{\mathcal{A}}(\Gamma))\leavevmode\nobreak\ .$ (C.3)

The 4d topological action is essentially a multiple of
$\mathcal{P}(B_{\text{4d}})$, with $B_{\rm 4d}\in
H^{2}(\mathfrak{M}_{4},\Gamma)$ being a background gauge field for the 3d
1-form symmetry $\Gamma$ extended into the 4d bulk. The explicit form of the
Pontryagin square depends on $\Gamma$. For example, for
$\Gamma=\mathbb{Z}_{N}$ and assuming that $H_{1}(\mathfrak{M}_{4},\mathbb{Z})$
is torsion-free, as will be the case for us:

$\mathcal{P}(B_{\text{4d}})=\begin{cases}B_{\text{4d}}\cup
B_{\text{4d}}\leavevmode\nobreak\ ,\qquad&N\in
2\mathbb{Z}+1\leavevmode\nobreak\ ,\\\
\widetilde{B}_{\text{4d}}\cup\widetilde{B}_{\text{4d}}\mod
2N\leavevmode\nobreak\ ,\qquad&N\in 2\mathbb{Z}\leavevmode\nobreak\ ,\\\
\end{cases}$ (C.4)

where $\widetilde{B}_{\text{4d}}\in H^{2}(\mathfrak{M}_{4},\mathbb{Z})$ is an
integral uplift of $B_{\text{4d}}$. In the more general case
$\Gamma=\bigoplus_{i}\mathbb{Z}_{N_{i}}$, we decompose the gauge field as
$B_{\text{4d}}=\sum_{i}B_{i}$ with $B_{i}\in
H^{2}(\mathfrak{M}_{4},\mathbb{Z}_{N_{i}})$. Then, the Pontryagin square can
be expanded accordingly:

$\mathcal{P}(B_{\text{4d}})=\sum_{i}\mathcal{P}(B_{i})+2\sum_{i<j}B_{i}\cup
B_{j}\leavevmode\nobreak\ .$ (C.5)

The four-dimensional anomaly action for $\Gamma^{(1)}_{\rm 3d}$ is given by
the natural generalisation of $\mathcal{P}(B_{\text{4d}})$ given in (2.32).

Continuum formulation of the 4d anomaly theory and circle reduction. Let us
consider the continuum form of the anomaly theory (2.32). It reads
Kapustin:2014gua ; Hsin:2018vcg :

$S_{\text{4d}}^{\text{anom}}=\int_{\mathfrak{M}_{4}}\sum_{i,j}\frac{\mathfrak{a}_{ij}N_{i}N_{j}}{4\pi\gcd(N_{i},N_{j})}B_{i}\wedge
B_{j}+\sum_{i}\frac{N_{i}}{2\pi}B_{i}\wedge dA_{i}\leavevmode\nobreak\ ,$
(C.6)

where $B_{i}\in H^{2}(\mathfrak{M}_{4},U(1)^{(1)})$ and $A_{i}\in
H^{1}(\mathfrak{M}_{4},U(1)^{(0)})$. The integers $\mathfrak{a}_{ij}$ satisfy
the periodicity conditions $\mathfrak{a}_{ij}\sim\mathfrak{a}_{ij}+{\rm
gcd}(N_{i},N_{j})$ on spin four-manifolds.444444It is worth noting that, on
general four-manifolds, the 4d TQFT (C.6) would have the periodicities
$\mathfrak{a}_{ii}\sim\mathfrak{a}_{ii}+2N_{i}$ (and
$\mathfrak{a}_{ij}\sim\mathfrak{a}_{ij}+{\rm gcd}(N_{i},N_{j})$ for $i\neq
j$), and would only be well-defined if $\mathfrak{a}_{ii}N_{i}$ were even
Hsin:2018vcg . We consider spin manifolds only because we are studying
supersymmetric field theories, in which case the anomalies coefficients
$\mathfrak{a}_{ij}$ are indeed valued in $\mathbb{Z}_{{\rm gcd}(N_{i},N_{j})}$
for every $i,j$. The topological action (C.6) enjoys a gauge symmetry under
which the gauge fields $B_{i}$ and $A_{i}$ transform as

$B_{i}\mapsto B_{i}-d\lambda_{i}\leavevmode\nobreak\ ,\qquad A_{i}\mapsto
A_{i}+\sum_{j}\frac{\mathfrak{a}_{ij}N_{j}}{\gcd(N_{i},N_{j})}\lambda_{j}\leavevmode\nobreak\
.$ (C.7)

Given the continuum formulation, it is easy to consider the dimensional
reduction of the anomaly theory on a circle. That is, we consider
$\mathfrak{M}_{4}=\mathfrak{M}_{3}\times S^{1}$ with
$\partial\mathfrak{M}_{3}=\Sigma_{g}$. The gauge fields $B_{i}$ and $A_{i}$
can be decomposed as:

$B_{i}\rightarrow B_{i}+\eta_{i}\wedge C_{i}\leavevmode\nobreak\ ,\qquad
A_{i}\rightarrow A_{i}+\eta_{i}\phi_{i}\leavevmode\nobreak\ ,$ (C.8)

where $\eta_{i}\in H^{1}(S^{1},\mathbb{Z})$, $B_{i}\in
H^{2}(\mathfrak{M}_{3},U(1))$, $C_{i}\in H^{1}(\mathfrak{M}_{3},U(1))$, and
$\phi_{i}\in H^{0}(\mathfrak{M}_{3},U(1))$. Here $B_{i}$ and $C_{i}$ are the
continuum versions of the 3d fields $B$ and $C$ for the anomaly theory of the
two-dimensional theory on $\Sigma$. Plugging this back into (C.6) and
dimensionally reducing, we find that the 3d anomaly theory is given by:

$S_{\text{3d}}^{\text{anom}}=\int_{\mathfrak{M}_{3}}\sum_{i,j}\frac{\mathfrak{a}_{ij}N_{i}N_{j}}{4\pi\gcd(N_{i},N_{j})}(C_{i}\wedge
B_{j}+B_{i}\wedge C_{j})+\sum_{i}\frac{N_{i}}{2\pi}(C_{i}\wedge
dA_{i}+B_{i}\wedge d\phi_{i})\leavevmode\nobreak\ .$ (C.9)

This is the continuum version of the mixed ’t Hooft anomaly (2.34) between
$\Gamma^{(1)}$ and $\Gamma^{(0)}$ discussed in the main text.

##  Appendix D Proofs for $SU(N)_{K}$ CS theory

In this appendix, we discuss proofs and extended derivations of various
results we use in section 3 for calculating expectation values of topological
operators in the $SU(N)_{K}$ theory, for for the discrete gauging procedure.
In section D.1, we find the fixed points under the action of the full
$\mathbb{Z}_{N}$ 0-form symmetry, in the absence of an anomaly. In section
D.2, we extend this analysis to the subgroups of $\mathbb{Z}_{N}$, which
covers all possible anomalies for $SU(N)_{K}$. Section D.3 discusses the sum
over the mixed correlators by carefully studying the mixed gravitational
anomaly. In section D.4, we extend Jordan’s totient function to accommodate a
$\theta$-angle for the gauged 1-form symmetry.

###  D.1 Fixed points under the full group

In this section, we complete the proof that there is a unique fixed point
under the zero-form symmetry $\mathbb{Z}_{N}^{(0)}$ in the $SU(N)_{K}$ theory,
for any $N$, whenever $K$ a multiple of $N$. In section 3, we have shown this
for $N$ odd. Let us now consider the case $N$ even. In (3.42), we found the
general expression for the fixed point

$(l_{a};\ell)=\Big{(}s,s+\kappa,s+2\kappa,\cdots,s+(N-1)\kappa;\,Ns+\kappa{N(N-1)\over
2}\;\text{mod}\;\kappa N\Big{)}\leavevmode\nobreak\ ,$ (D.1)

where $\kappa=\frac{K}{N}\in\mathbb{Z}$. As discussed in section 3, for $N$
odd the fixed point has $\ell=0$.

Existence and uniqueness. Let us now prove that the fixed point (D.1) is
unique also if $N$ is even. First, we prove that
$s=\lceil\frac{\kappa}{2}\rceil$ gives a fixed point, and then we show that it
is unique. Consider $\ell=Ns+\kappa{N(N-1)\over 2}\mod\kappa N$ for $\kappa$
even. With $s=\frac{\kappa}{2}$ we have $\ell=\frac{\kappa}{2}N^{2}$, which is
$\equiv 0\mod\kappa N$, since $N$ is even and thus $\ell=\frac{N}{2}\kappa
N\equiv 0\mod\kappa N$. For $\kappa$ odd, on the other hand, with
$s=\frac{\kappa+1}{2}$ we have $\ell=\frac{N}{2}+\frac{\kappa}{2}N^{2}$, where
the second term is equivalent to 0 modulo $\kappa N$, for the same reason as
above. Since $\frac{N}{2}\in\mathbb{N}$ and is $<N$, we thus have
$\ell=\frac{N}{2}$ in this case. We can summarise all cases as follows:

$e^{-2\pi i\frac{\ell}{N}}=(-1)^{\kappa(N-1)}\leavevmode\nobreak\ .$ (D.2)

We have shown that for both $\kappa$ even and odd,
$s=\lceil\frac{\kappa}{2}\rceil$ in (3.42) gives a fixed point. In order to
show uniqueness, we add to $s$ an integer $b$ in a valid range and show that
it vanishes. For $\kappa$ even, consider therefore $s=\frac{\kappa}{2}+b$ with
$b\in\mathbb{Z}$, which since $0\leq s<\kappa$ is between
$-\frac{\kappa}{2}\leq b<\frac{\kappa}{2}$. For this value of $s$, we find
$\ell=Nb$. Since $|b|\leq\frac{\kappa}{2}<\kappa$, the remainder of $\ell$ is
$Nb\mod N\kappa=Nb$. We now impose $\ell<N$, from which it is clear that
$b=0$. Similarly if $\kappa$ is odd, then for $s=\frac{\kappa+1}{2}+b$ we find
$\ell=Nb\mod N\kappa\equiv Nb<N$ and thus $b=0$.

Fixed Bethe vacua. We have proven the existence and uniqueness of the fixed
point (3.42) for all $N$ and all multiples $K$ of $N$. In fact, the fixed
Bethe vacuum is independent of the value of $K$ and takes a simple form: if
$N$ is odd, then $l_{a}=(a-1)\kappa$ and $\ell=0$. Thus if we denote by
$\hat{u}_{\text{fixed},a}$ the components of the fixed point solution
$\hat{u}_{\text{fixed}}$, we find

$\hat{u}_{\text{fixed},a}=\frac{1}{N}(a-1)\leavevmode\nobreak\ ,\qquad N\text{
odd}.$ (D.3)

When $N$ is even, we need to distinguish the two cases $\kappa$ even and odd.
If $\kappa$ is even, then $l_{a}=\kappa(a-\frac{1}{2})$, while $\ell=0$.
Therefore, we find $\hat{u}_{\text{fixed},a}=\frac{1}{N}(a-\frac{1}{2})$. If
$\kappa$ is odd rather, we have $l_{a}=\frac{1}{2}+\kappa(a-\frac{1}{2})$,
while $\ell=\frac{N}{2}$, such that

$\hat{u}_{\text{fixed},a}=\frac{1}{N}(a-\frac{1}{2})\leavevmode\nobreak\
,\qquad N\text{ even},$ (D.4)

which is precisely the same as for $\kappa$ even. Since the index $a$ runs
from $1,\dots,N$, we find that $2N\hat{u}_{\text{fixed}}$ is the list of even
numbers $0,\dots,2N-2$ if $N$ is odd, and it is the list of odd numbers
$1,\dots,2N-1$ if $N$ is even. Note that for both cases $N$ even and odd, we
have that

$l_{a}-l_{b}=(a-b)\kappa\leavevmode\nobreak\ .$ (D.5)

This identity is important when evaluating the handle-gluing operator (3.11)
on the fixed point, which we use in (3.45).

###  D.2 Fixed points under subgroups

When $N$ is prime, every nontrivial element of $\mathbb{Z}_{N}$ is a generator
of the full group, and the result in the previous subsection applies to any
$\gamma\neq 0$. If $N$ has nontrivial divisors instead, particular elements of
$\mathbb{Z}_{N}$ can generate proper subgroups, as discussed in detail in
section 3.1.2.

Enumeration of fixed points. Let us now study the fixed points under a general
subgroup $\mathbb{Z}_{d}$ of $\mathbb{Z}_{N}$, where of course $d$ is a
divisor of $N$ and $K$. Above, we proved that under the action of the
$\mathbb{Z}_{N}$ subgroup there is precisely one fixed point. From the shift
(3.38) of a Bethe vacuum under the generator $\gamma_{0}$, we find that
$\ell\to\ell$ and $l_{a}\to l_{a}+\frac{K}{N}\mod K$. Applying this map $n$
times, the action under $n\gamma_{0}$ is therefore $l_{a}\to
l_{a}+n\frac{K}{N}\mod K$. Since the $l_{a}\in\\{0,\dots,K\\}$, and we are
free to reorder the $l_{a}$’s, this means that two particular values of
$l_{a}$ are related by an action of $n\gamma_{0}$ if they differ by
$\gcd(n,N)\frac{K}{N}$. On the other hand, all fixed points under
$n\gamma_{0}$ are fixed points under the subgroup $\langle
n\gamma_{0}\rangle\cong\mathbb{Z}_{d}$, where $d=N/\gcd(n,N)$. This shows that
the fixed points under any $\mathbb{Z}_{d}$ subgroup have $l_{a}$ values whose
differences are multiples of $\frac{K}{d}$. This generalises the result
(3.42), where $d=N$ for the generator
$\langle\gamma_{0}\rangle\cong\mathbb{Z}_{N}$, and we found that the values of
$l_{a}$ differed by $\frac{K}{N}$.

The above analysis proves that we can decompose any fixed point
$(l_{1},\dots,l_{N};\ell)$ under the action of a $\mathbb{Z}_{d}$ subgroup
into $d$ orbits of tuples $(\tilde{l}_{1},\dots,\tilde{l}_{\frac{N}{d}})$,
which is determined from $(l_{1},\dots,l_{N};\ell)$ by collapsing the whole
list modulo $\frac{K}{d}$ (i.e.  $\tilde{l}_{a}\in\mathbb{Z}_{\frac{K}{d}}$),
and adding the orbits454545We abuse notation by using $\cup$ as the
concatenation of tuples.

$(l_{1},\dots,l_{N})=\bigcup_{j=0}^{d-1}(\tilde{l}_{1}+j\tfrac{K}{d},\dots,\tilde{l}_{\frac{N}{d}}+j\tfrac{K}{d})\leavevmode\nobreak\
.$ (D.6)

This allows us to count the number of fixed points under a $\mathbb{Z}_{d}$
subgroup. Since the $d$ full orbits do not have any degrees of freedom, we
merely need to enumerate the set of integers
$(\tilde{l}_{1},\dots,\tilde{l}_{\frac{N}{d}})$ where each
$\tilde{l}_{a}\in\mathbb{Z}_{\frac{K}{d}}$. This number is simply
$\binom{\frac{K}{d}}{\frac{N}{d}}$. Since the ‘last’ value $\ell$ is not
affected by the $\mathbb{Z}_{d}$ action, we have $N$ initial possibilities for
it. As discussed in section 3.1, only every $K$-th candidate tuple satisfies
the traclessness condition, which leaves us with

$\frac{N}{K}\binom{\frac{K}{d}}{\frac{N}{d}}=\binom{\frac{K}{d}-1}{\frac{N}{d}-1}$
(D.7)

fixed points. This concludes our counting exercise on fixed points, which we
use in (3.47).

###  D.3 Sum over mixed correlators

In section 3.4, we consider the gauging of the 0-form symmetry on $T^{2}$. Due
to the particular structure (3.55) of the fixed points, this amount to summing
$\langle\mathcal{U}^{\gcd(m,n)\gamma_{0}}(\mathcal{C})\big{\rangle}_{T^{2}}$
over all $m,n\in\mathbb{Z}_{N}$, and results in a counting exercise of mutual
fixed points. In order to study the full 3d one-form gauging, we need to
consider mixed correlators such as

$\big{\langle}\Pi^{m\gamma_{0}}\mathcal{U}^{n\gamma_{0}}(\mathcal{C})\big{\rangle}_{T^{2}}=(-1)^{mn\left({K\over
N}+1\right)(N-1)}\big{\langle}\mathcal{U}^{{\rm
gcd}(m,n)\gamma_{0}}(\mathcal{C})\big{\rangle}_{T^{2}}\leavevmode\nobreak\ ,$
(D.8)

which we studied in section 3.2, or the ‘maximal’ insertion
$\langle\Pi^{m\gamma_{0}}\mathcal{U}^{n\gamma_{0}}(\mathcal{C})\;\mathcal{U}^{n^{\prime}\gamma_{0}}(\widetilde{\mathcal{C}})\rangle_{T^{2}}$.
Due to the modular anomaly on $T^{3}$, the sign (D.8) makes the sum more
elaborate. Before deriving the sum over the maximal insertions required in
section 3.4, let us consider the simpler sum over the smaller mixed
correlators (D.8) first.

As explained in the main text, when $N$ is odd, the relative sign is equal to
one, and the summation proceeds as in (3.85). Let us thus consider the case
$N$ even in the following.

Case 1: no relative sign. There are various cases that we can study, in order
to find a general formula for the sum over $\mathbb{Z}_{N}$. Clearly, it
depends on the value of $\frac{K}{N}$ for which $n,m$ the sign (D.8) is $+1$
or $-1$. For instance, if $N|K$ we can have the cases where $\frac{K}{N}+1$ is
even or odd. If it is even, then there is no relative sign between the two
correlators, and we can proceed in summing over them as described above,

$N|K\text{ and }\frac{K}{N}\text{
odd:}\quad\sum_{m,n=0}^{N-1}\langle\Pi^{m\gamma_{0}}\mathcal{U}^{n\gamma_{0}}(\mathcal{C})\big{\rangle}_{T^{2}}=\sum_{d|\gcd(N,K)}J_{2}(d)\binom{\frac{K}{d}-1}{\frac{N}{d}-1}\leavevmode\nobreak\
.$ (D.9)

Case 2: alternating sign. Let us thus consider the next simplest case, where
$N|K$ but $\frac{K}{N}+1$ is odd. In that case, the relative sign is merely
$(-1)^{mn}$. We can now attempt to enumerate the contributions from all the
$m,n$ with these alternating signs. Rather than partitioning $N^{2}$ into the
divisors of $N$, we first partition the $N^{2}$ tuples $(m,n)$ into two sets
where $(-1)^{mn}$ is $+1$ and $-1$. Since $(-1)^{mn}=1$ if either $m$ or $n$
or both are even, while $(-1)^{mn}=-1$ only if both $m,n$ are odd, this gives
a partition of the sort

$\sum_{m,n=0}^{N-1}(-1)^{mn}=3\left(\frac{N}{2}\right)^{2}-\left(\frac{N}{2}\right)^{2}=\frac{N^{2}}{2}\leavevmode\nobreak\
.$ (D.10)

Indeed, if $N$ is even, then there are $\frac{N}{2}$ even and $\frac{N}{2}$
odd numbers in the set $\\{0,\dots,N-1\\}$. This counting exercise allows us
to find a general rule for which divisors $d$ of $N$ have contributions from
both signs. Collapsing the sum over the $(m,n)$ to a sum over divisors $d$, we
identify $d\gcd(m,n,N)=N$. The sign $(-1)^{mn}$ is a minus sign if and only if
both $m,n$ are odd. Here it becomes apparent that the condition becomes
dependent on the nature of $N$: if $N$ has no odd divisors (i.e. it is
$2^{n}$), then this gcd is always equal to 1. In general, with $\gcd(m,n,N)$
for $m,n$ odd we can probe in this way all _odd_ divisors of $N$. Thus the sum
is alternating precisely if $\frac{N}{d}$ is odd. For any such odd $d|N$ we
count now the number of values of $(-1)^{mn}\langle
U_{\gcd(m,n)\gamma_{0}}(B)\rangle_{T^{2}}$ with plus and minus signs. Using a
similar analysis as above (D.10), one can show that for any fixed odd value of
$\frac{N}{d}$, there are twice as many $+$ signs as $-$ signs, schematically
$n_{+}=2n_{-}$. Since Jordan’s totient $J_{2}=n_{+}+n_{-}$ enumerates those
regardless of signs, we find that the difference is
$n_{+}-n_{-}=\frac{1}{3}J_{2}$. On the other hand if $\frac{N}{d}$ is even,
then $\gcd(m,n,N)$ must be even, in which case $(-1)^{mn}=1$. We have thus
shown

$N|K\text{ and }\frac{K}{N}\text{
even:}\quad\sum_{m,n=0}^{N-1}\langle\Pi^{m\gamma_{0}}\mathcal{U}^{n\gamma_{0}}(\mathcal{C})\big{\rangle}_{T^{2}}=\sum_{d|\gcd(N,K)}\widetilde{\mathscr{J}}_{2}^{N}(d)\binom{\frac{K}{d}-1}{\frac{N}{d}-1}\leavevmode\nobreak\
,$ (D.11)

where we temporarily introduce the symbol

$\widetilde{\mathscr{J}}_{2}^{N}(d)=\begin{cases}\tfrac{1}{3}J_{2}(d)\leavevmode\nobreak\
,\quad\frac{N}{d}\text{ odd}\leavevmode\nobreak\ ,\\\
J_{2}(d)\leavevmode\nobreak\ ,\quad\frac{N}{d}\text{ even}\leavevmode\nobreak\
,\end{cases}$ (D.12)

which we will generalise below.

Case 3: $N$ even. The case remains where $N\nmid K$. Of course, for most
integers $m$ and $n$, the values
$\langle\Pi^{m\gamma_{0}}\mathcal{U}^{n\gamma_{0}}(\mathcal{C})\big{\rangle}_{T^{2}}$
vanish due to the mixed anomaly (3.59). As shown above, in this situation
$\frac{K}{N}$ is not necessarily an integer, however for all $m$ and $n$ such
that the correlator does not vanish, $\frac{mnK}{N}$ is an integer, and the
phase in (D.8) is merely a sign.

Let us study this sign in detail. We focus on the case where the sign is a
$-$, that is, $mn(\tfrac{K}{N}+1)$ is odd. The tricky part is to identify all
those $m,n\in\\{0,\dots,N-1\\}$ for which above combination is odd. This is