1Physics Department, University of California, Berkeley CA, USA

2School of Natural Sciences, Institute for Advanced Study, Princeton NJ, USA

We study several exotic systems, including the X-cube model, on a flat three-
torus with a twist in the $xy$-plane. The ground state degeneracy turns out to
be a sensitive function of various geometrical parameters. Starting from a
lattice, depending on how we take the continuum limit, we find different
values of the ground state degeneracy. Yet, there is a natural continuum limit
with a well-defined (though infinite) value of that degeneracy. We also
uncover a surprising global symmetry in $2+1$ and $3+1$ dimensional systems.
It originates from the underlying subsystem symmetry, but the way it is
realized depends on the twist. In particular, in a preferred coordinate frame,
the modular parameter of the twisted two-torus $\tau=\tau_{1}+i\tau_{2}$ has
rational $\tau_{1}=k/m$. Then, in systems based on $U(1)\times U(1)$ subsystem
symmetries, such as momentum and winding symmetries or electric and magnetic
symmetries, the new symmetry is a projectively realized
$\mathbb{Z}_{m}\times\mathbb{Z}_{m}$, which leads to an $m$-fold ground state
degeneracy. In systems based on $\mathbb{Z}_{N}$ symmetries, like the X-cube
model, each of these two $\mathbb{Z}_{m}$ factors is replaced by
$\mathbb{Z}_{\gcd(N,m)}$.

###### Contents

  1. 1 Introduction
    1. 1.1 The twisted torus
    2. 1.2 A new, surprising symmetry
    3. 1.3 Outline
  2. 2 Geometry
    1. 2.1 Continuum geometry
    2. 2.2 Lattice geometry
  3. 3 Winding on the twisted two-torus
    1. 3.1 Transition functions and winding charges
    2. 3.2 Winding configurations of $\phi$
      1. 3.2.1 Special configurations
      2. 3.2.2 More general configurations
    3. 3.3 Comments about the $2+1$-dimensional $\phi$-theory
  4. 4 $2+1$-dimensional $\mathbb{Z}_{N}$ tensor gauge theory
    1. 4.1 Special $\mathbb{Z}_{N}$ configurations
    2. 4.2 $\phi-A$ theory
      1. 4.2.1 Using transition functions
    3. 4.3 $BF$-type $\mathbb{Z}_{N}$ tensor gauge theory
    4. 4.4 Global symmetry operators
  5. 5 Winding in $3+1$ dimensions
  6. 6 $3+1$-dimensional $\mathbb{Z}_{N}$ tensor gauge theory
    1. 6.1 $\phi-A$ theory
    2. 6.2 Comments on the $U(1)$ $\hat{A}$ theory
    3. 6.3 $\hat{\phi}-\hat{A}$ theory
    4. 6.4 $BF$-type $\mathbb{Z}_{N}$ tensor gauge theory
    5. 6.5 Global symmetry operators
  7. A $2+1$ dimensional plaquette Ising model
  8. B Invariants of the transition functions for $\phi$ on a two-torus
  9. C Additional operators in the $\phi$-theory
  10. D Wilson operators of the $\mathbb{Z}_{N}$ theory
  11. E Winding configurations of $\hat{\phi}$

##  1 Introduction

The exciting, growing field of fracton phases of matter started with the
discovery of two peculiar models [1, 2]. They have stimulated a lot work,
which has uncovered additional models of fractons and has led to deeper
insights. This subject is reviewed nicely in [3, 4]. These reviews include
many references to other interesting papers.

These models are not rotationally invariant, and the Hamiltonian depends on
preferred directions, which we will denote by $(x,y,z)$. They are typically
formulated on a lattice with $L_{x}$, $L_{y}$, and $L_{z}$ sites in these
directions with periodic boundary conditions. Then, the number of ground
states depends on these three integers. Models based on $\mathbb{Z}_{N}$ spins
typically have ground state degeneracy

$\displaystyle\text{GSD}=N^{Q(L_{x},L_{y},L_{z})}~{},$ (1.1)

but, as we will see, other functional forms are also possible. A
characteristic example, which will also be studied below, is that of the
X-cube [5], or more generally, its $\mathbb{Z}_{N}$ version, where the entropy
$Q$ is given by

$\displaystyle Q(L_{x},L_{y},L_{z})=2(L_{x}+L_{y}+L_{z})-3~{}.$ (1.2)

This expression is peculiar for two reasons. First, even though the system is
gapped, the number of ground states diverges as the system size goes to
infinity, i.e., in the limit $L_{x},L_{y},L_{z}\to\infty$. Second, the
expression (1.2) is not extensive. It is sub-extensive; it grows linearly with
the size of the system. Other examples, including the original Haah code [2],
exhibit an even more bizarre $Q(L_{x},L_{y},L_{z})$, which is not even
monotonic in the three sizes.

The existence of these models raises many interesting and deep questions. One
of them is how to formulate a continuum quantum field theory description of
them. Early work on the subject appeared in [6, 7, 8]. Here we will follow the
systematic approach of [9, 10, 11, 12, 13, 14].

The original models were formulated on a flat right-angled torus aligned with
the preferred directions $(x,y,z)$. This immediately raises the question how
to formulate these models on more complicated manifolds. An important idea in
this direction is to place the system on a foliated space [15, 16, 17, 18, 19,
20, 7, 21, 8]. The foliation then determines the alignment of the preferred
coordinates $(x,y,z)$.

Our goal here is to place such a system on a slightly nontrivial space such
that the analysis is still straightforward. We will keep the torus flat, but
will allow it to be slanted – not right-angled. We will also allow a twist of
the torus relative to the preferred $(x,y,z)$ coordinate system. The local
interaction is still invariant under the appropriate subgroup of the rotation
group, but the global boundary conditions do not respect this rotation
symmetry.

###  1.1 The twisted torus

Specifically, we will study the system with twisted boundary conditions. On
the lattice, we label the sites by integers $(\hat{x},\hat{y},\hat{z})$ and
impose the identifications

$\displaystyle(\hat{x},\hat{y},\hat{z})\sim(\hat{x}+L_{x}^{u},\hat{y}+L_{y}^{u},\hat{z}+L_{z}^{u})\sim(\hat{x}+L_{x}^{v},\hat{y}+L_{y}^{v},\hat{z}+L_{z}^{v})\sim(\hat{x}+L_{x}^{w},\hat{y}+L_{y}^{w},\hat{z}+L_{z}^{w})~{}.$
(1.3)

Related problems were studied in [15, 16, 22, 23, 24, 25]. Although our
approach is different, some of the issues we will address have counterparts in
these papers.

Actually, for simplicity, we will limit ourselves to nontrivial twists only in
two of the directions, i.e.,

$\displaystyle(\hat{x},\hat{y},\hat{z})\sim(\hat{x}+L_{x}^{u},\hat{y}+L_{y}^{u},\hat{z})\sim(\hat{x}+L_{x}^{v},\hat{y}+L_{y}^{v},\hat{z})\sim(\hat{x},\hat{y},\hat{z}+L_{z})~{}.$
(1.4)

We will refer to the closed cycles associated with these identifications as
the $U$, $V$, and $Z$ cycles, respectively.

There is a lot of freedom in choosing the generators of the identifications.
We will take all the integer coefficients $L_{i}^{r}$ to be non-negative.

Without loss of generality, we can also align the $U$ cycle with the $x$
direction – the $X$ cycle. Then, in order to have a complete basis, we need
$V$ to be dual to $X$, the $\tilde{X}$ cycle. In this case $L_{y}^{u}=0$, and
some of our expressions below simplify. Alternatively, we can align the $V$
cycle with the $y$ direction – the $Y$ cycle. In this case, we need $U$ to be
dual to $Y$, the $\tilde{Y}$ cycle. It is important to note that in general,
the $X$ and $Y$ cycles do not generate all the cycles, and therefore they
cannot be used as a complete basis. This fact will have interesting
consequences.

We have analyzed all the models in [10, 11, 12] on such a torus. Some of these
models are gapless. Their states with generic momenta have a peculiar
dispersion relation, but other than that, they are quite standard. As these
modes reflect local physics, the effect of the twisted boundary conditions on
them is quite trivial. These gapless theories also have strange states at non-
generic momenta – specifically, states where two of the momenta $p_{x}$,
$p_{y}$, $p_{z}$ vanish. Some peculiarities of these modes were discussed in
[10, 11].111As emphasized in [10, 11], some of the detailed features of the
charged states in the gapless models depend on higher-derivative terms that go
beyond the leading order terms in the continuum Lagrangian. This subtlety is
not present in the gapped models and does not affect the peculiarities we will
discuss below.

Here we will focus on the consequences of the twisted boundary conditions and
will find that the system has states that realize the underlying subsystem
symmetry in a surprising way. In some of the non-gauge systems, some momentum
and winding symmetries do not commute. In some of the gauge theories, some
electric and magnetic symmetries do not commute. These effects are reminiscent
of effects found in [26, 27] and discussed further in [28, 29].

The gapped models are particularly interesting, and we will follow and extend
their analysis in [10, 12]. The twisted boundary conditions change the ground
state degeneracy and the surprising realization of the subsystem symmetry in
some gapless models has counterparts in the gapped systems.

Analyzing the X-cube model along the lines of [12], we will show that in this
case (1.2) is replaced by

$\displaystyle\text{GSD}=N^{2(L_{x}^{\textrm{eff}}+L_{y}^{\textrm{eff}}+L_{z})-3}\text{gcd}(N,M)\,,$
(1.5)

where

$\displaystyle L_{x}^{\textrm{eff}}=\text{gcd}(L_{x}^{u},L_{x}^{v})\,,$ (1.6)
$\displaystyle L_{y}^{\textrm{eff}}=\text{gcd}(L_{y}^{u},L_{y}^{v})\,,$
$\displaystyle M={L_{x}^{u}L_{y}^{v}-L_{x}^{v}L_{y}^{u}\over
L_{x}^{\textrm{eff}}L_{y}^{\textrm{eff}}}.$

As stated above, without loss of generality we can take $L^{u}_{y}=0$, and
then these expressions simplify:

$\displaystyle L_{x}^{\textrm{eff}}=\text{gcd}(L_{x}^{u},L_{x}^{v})\,,$ (1.7)
$\displaystyle L_{y}^{\textrm{eff}}=L_{y}^{v}\,,$ $\displaystyle
M={L_{x}^{u}\over\text{gcd}(L_{x}^{u},L_{x}^{v})}.$

A special case of this expression was found in [25].

The ground state degeneracy (1.5) has several interesting features.

  * •

As in the untwisted model, the ground state degeneracy (1.2) depends on the
number of sites in the lattice. As we rescale the lattice data to infinity
$L_{i}^{r}\to\infty$ with fixed ratios, the number of ground states diverges
in a sub-extensive manner.

  * •

Relative to the untwisted model, the number of ground states (1.5) depends on
more lattice data $L_{i}^{r}$. Small changes in these integers can make a
large effect on the number of ground states. In fact, the ground state
degeneracy does not change monotonically with this data. These facts are
reminiscent of the dependence of the ground state degeneracy on the number of
sites in the Haah code [2].

  * •

As in the Haah code [2], the previous point makes it clear that the model does
not have an unambiguous continuum limit. Unlike the original untwisted model,
where the logarithm of the ground state degeneracy diverges linearly in the
size, but is otherwise well-defined, here different ways of taking the
continuum limit lead to different answers.

  * •

The exponential dependence of the ground state degeneracy (1.5) on $L_{i}^{r}$
has a natural interpretation in the layer constructions of these models [30,
31]. The model is constructed out of $L_{z}$ layers in the $xy$-plane,
$L_{x}^{\textrm{eff}}$ layers in the $yz$-plane, and $L_{y}^{\textrm{eff}}$
layers in the $xz$-plane. The exponential part of the degeneracy is then as in
the untwisted model with the same number of layers. The connection to the
layers construction was discussed in a special case in [23]. See also the
general discussions in [16], which advocates the use of foliated manifolds.

  * •

In addition to the exponential behavior in (1.5), there is also a factor of
$\text{gcd}(N,M)$. It reflects an interesting symmetry group, which is a
central extension of
$\mathbb{Z}_{\text{gcd}(N,M)}\times\mathbb{Z}_{\text{gcd}(N,M)}$. We will
discuss it in detail below.

These peculiarities of (1.5) follow from properties of the charges of the
subsystem global symmetry (or equivalently, the logical operators) of the
system. Some of these charges are associated with closed lines along $x$, or
$y$, or $z$. Because of the twisted boundary conditions (1.3), (1.4), these
lines wrap the torus an integer number of times. Consequently, the number of
distinct charges depends sensitively on $L_{i}^{r}$. The ground state
degeneracy follows from the number of such charges. This sensitivity leads to
the peculiarities of the ground state degeneracy mentioned above. This fact is
reminiscent of the way the ground state degeneracy arises in the Haah code.

Let us comment on the continuum limit in more detail. The continuum limit is
taken by introducing a lattice spacing $a$ and taking $L_{i}^{r}\to\infty$
with fixed

$\displaystyle\ell_{i}^{r}=\lim_{a\to 0}aL_{i}^{r}~{}.$ (1.8)

The fact that $L_{i}^{\textrm{eff}}$ can diverge in this limit and can lead to
infinite $Q$ is common in these models. The important point here is that the
limits $\lim_{a\to 0}L_{i}^{\textrm{eff}}$ and $\lim_{a\to
0}aL_{i}^{\textrm{eff}}$ can depend on the way we take the continuum limit.
This means that different sequences of lattice models, all approaching
$L_{i}^{r}\to\infty$ with the same continuum values (1.8), can have different
ground state degeneracies.

This might lead us to question to what extent the continuum Lagrangian
describes the physics of such a system. The system must be regularized, and
the limit as the regularization is removed can lead to an infinite ground
state degeneracy that depends sensitively on the regularization. However,
there is a natural way to regularize the continuum system such that the answer
is unambiguous. In particular, we let integers $L_{i}^{r}$ go to infinity in
fixed ratios. More explicitly, starting with the continuum quantities
$\ell_{i}^{r}$, we introduce a lattice spacing $a$ with lattice integers
$L_{i}^{r}$ such that $aL_{i}^{r}=\ell_{i}^{r}$. (This is possible only when
the ratios of $\ell_{i}^{r}$ are rational.)

Taking this natural limit, we find the continuum limits of (LABEL:QXcuberIs):

$\displaystyle\ell_{x}^{\textrm{eff}}=\lim_{a\to 0}aL_{x}^{\textrm{eff}}\,,$
(1.9) $\displaystyle\ell_{y}^{\textrm{eff}}=\lim_{a\to
0}aL_{y}^{\textrm{eff}}\,,$ $\displaystyle m=\lim_{a\to 0}M\,.$

This means that in the continuum, the torus in the $xy$-plane is subject to
the identifications

$\displaystyle(x,y)\sim(x+m\ell_{x}^{\textrm{eff}},y)\sim(x+k\ell_{x}^{\textrm{eff}},y+\ell_{y}^{\textrm{eff}})\qquad,$
(1.10) $\displaystyle m,k\in\mathbb{Z}\qquad,\qquad\text{gcd}(m,k)=1\,.$

The real part of the modular parameter $\tau=\tau_{1}+i\tau_{2}$ for this
torus is rational, i.e., $\tau_{1}={k\over m}$.

We would like to stress an important point about the integers $m$ and $k$.
From (LABEL:torusiden), they appear to be related to the geometry of the torus
rather than its topology. However, the integers $m$ and $k$ have a topological
meaning. As we will discuss below, they are associated with intersection
numbers of preferred cycles on the torus. One way to realize their topological
nature is to replace the metric $ds^{2}=dx^{2}+dy^{2}$ in the $xy$ coordinate
system with another flat metric. Then $\tau$ will be different, but the
intersection numbers will not change.

###  1.2 A new, surprising symmetry

The analysis of [10, 11, 12] starts with the $2+1$-dimensional XY-plaquette
model of [32]. We refer to its continuum limit as the $\phi$-theory. Its
Lagrangian is

$\displaystyle{\cal L}={\mu_{0}\over 2}(\partial_{0}\phi)^{2}-{1\over
2\mu}(\partial_{x}\partial_{y}\phi)^{2}\qquad,\qquad\phi\sim\phi+2\pi\Big{(}n^{x}(x)+n^{y}(y)\Big{)}~{}.$
(1.11)

with $n^{x}(x),n^{y}(y)\in\mathbb{Z}$. The two operators

$\displaystyle J_{0}=\mu_{0}\partial_{0}\phi\,,$ (1.12) $\displaystyle
J^{xy}=-{1\over\mu}\partial^{x}\partial^{y}\phi$

form the Noether current of a momentum $U(1)$ subsystem symmetry with the
conservation equation

$\displaystyle\partial_{0}J_{0}=\partial_{x}\partial_{y}J^{xy}\,.$ (1.13)

The conserved $U(1)$ charges are

$\displaystyle\oint dxJ_{0}\,,~{}~{}~{}~{}~{}~{}\oint dyJ_{0}\,.$ (1.14)

They are conserved also on the twisted torus. The number of independent
conserved charges is infinite, and we discretize them on a lattice. It was
$L_{x}+L_{y}-1$ on an untwisted torus, and reduces to
$L_{x}^{\textrm{eff}}+L_{y}^{\textrm{eff}}-1$ on a twisted torus.

The same local operators (up to rescaling) (LABEL:phicop) lead to a conserved
current for a winding $U(1)$ subsystem symmetry

$\displaystyle J_{0}^{xy}={1\over 2\pi}\partial^{x}\partial^{y}\phi\,,$ (1.15)
$\displaystyle J={1\over 2\pi}\partial_{0}\phi\,,$
$\displaystyle\partial_{0}J_{0}^{xy}=\partial_{x}\partial_{y}J\,,$

with the conserved $U(1)$ charges

$\displaystyle\oint dxJ_{0}^{xy}\,,~{}~{}~{}~{}~{}~{}\oint dyJ_{0}^{xy}\,.$
(1.16)

Again, their number is reduced by the twist from $L_{x}+L_{y}-1$ to
$L_{x}^{\textrm{eff}}+L_{y}^{\textrm{eff}}-1$. As argued in [10], all the
states that are charged under these symmetries acquire large energy, of order
$1\over a$, in the continuum limit. A conservative approach simply ignores
them.

We will see that the theory on the twisted torus (LABEL:torusiden) has another
symmetry constructed out of the same momentum and winding currents. It is a
clock and shift symmetry generated by two operators $U$ and $\tilde{U}$
satisfying

$\displaystyle U^{m}=\tilde{U}^{m}=1,\qquad U\tilde{U}=e^{2\pi i\over
m}\tilde{U}U\,.$ (1.17)

This symmetry is a central extension of
$\mathbb{Z}_{m}\times\mathbb{Z}_{m}$.222 More precisely, the operators of the
theory are in linear representations of $\mathbb{Z}_{m}\times\mathbb{Z}_{m}$.
So strictly, this is the symmetry group of the system. This symmetry is
realized projectively on the Hilbert space. This can be interpreted as an ’t
Hooft anomaly in the symmetry.  Here the first factor can be interpreted as a
momentum symmetry and the second factor as a winding symmetry. Surprisingly,
these two symmetries do not commute.

One consequence of the clock and shift algebra (1.17) is that every state in
the Hilbert is in an $m$-dimensional representation. In particular, the system
(1.11) on the twisted torus (LABEL:torusiden) with $\tau_{1}={k\over m}$ has
$m$ ground states!

The same conclusion is true for the $3+1$-dimensional version of this model,
which was analyzed on the untwisted torus in [11]. This model is dual to a
gauge theory, the $\hat{A}$-theory [11]. In the language of this gauge theory,
the theory has electric and magnetic subsystem symmetries, and the central
extension of $\mathbb{Z}_{m}\times\mathbb{Z}_{m}$ represents non-commutativity
between electric and magnetic fluxes.

This situation is reminiscent of the analysis of ordinary $U(1)$ gauge
theories in $3+1$ dimensions on a manifold with torsion cycles [26, 27]. A
cycle $\gamma$ in space is torsion if $\gamma$ is not contractible, but
$m\gamma$ is contractible, i.e., there is a surface $\Sigma$ such that
$m\gamma=\partial\Sigma$. Following [28, 29], we can interpret [26, 27] as
follows. The operator

$\displaystyle U=e^{i\oint_{\gamma}A-{i\over m}\int_{\Sigma}dA}$ (1.18)

satisfies $U^{m}=1$, but $U$ itself is nontrivial. Similarly, using the dual
gauge field $\tilde{A}$, the operator

$\displaystyle\tilde{U}=e^{i\oint_{\gamma}\tilde{A}-{i\over
m}\int_{\Sigma}d\tilde{A}}$ (1.19)

satisfies $\tilde{U}^{m}=1$. The parts of these operators associated with the
surface $\Sigma$ are similar to the charges of the magnetic one-form symmetry
and the electric one-form symmetry respectively. However, since they include
also the Wilson and the ’t Hooft lines, they are charged under the electric
and the magnetic one-form symmetries respectively. As a result, $U$ and
$\tilde{U}$ do not commute and obey (1.17).

In the case of the X-cube model, the $U(1)$ subsystem symmetry of the gauge
theory is replaced by a $\mathbb{Z}_{N}$ subsystem symmetry. In that case,
this central extension of $\mathbb{Z}_{m}\times\mathbb{Z}_{m}$ is changed to a
central extension of $\mathbb{Z}_{\gcd(N,m)}\times\mathbb{Z}_{\gcd(N,m)}$. Its
irreducible representation is $\gcd(N,m)$-dimensional. This leads to a factor
of $\gcd(N,m)$ in the ground state degeneracy and corresponds to the factor of
$\gcd(N,M)$ in the lattice expression (1.5).

Below we will discuss this symmetry and its consequences in much more detail.

We end this subsection by pointing out that this relation to [26, 27, 28, 29]
and the analysis in Appendix C suggest that our discussion can be phrased in
an appropriate version of differential cohomology. (See an introduction for
physicists in [26, 27, 28, 29, 33, 34].) We will not do it here.

###  1.3 Outline

In Section 2, we will discuss the geometry of the foliated torus. For
simplicity, we will focus on a two-torus. We will first analyze a continuous
torus and then discuss its lattice version.

In Section 3, we will place a classical, circle-valued field
$\phi\sim\phi+2\pi$ on our twisted torus and will explore its winding
configurations. Here we will find the $\mathbb{Z}_{m}$ winding charges we
mentioned above. This will lead us to a discussion of the symmetries and the
spectrum of the $2+1$-dimensional $\phi$-theory of [10] on the twisted torus.

In Section 4, we will study a $2+1$-dimensional $\mathbb{Z}_{N}$ tensor gauge
theory on the twisted torus. This model was analyzed on an untwisted torus in
[10]. Starting with a lattice, this model is not robust under small
deformations of the lattice system. However, as discussed in [10], it makes
sense as a continuum field theory. We will study its two dual continuum
presentations of [10]. We will analyze the ground state degeneracy and the
spectrum of operators. We will also comment on the bundles and transition
functions of the $2+1$-dimensional $U(1)$ $A$-theory of [10] and the
$2+1$-dimensional $\mathbb{Z}_{N}$ tensor gauge theory on the twisted torus.

Section 5 will analyze the winding configurations of a circle-valued field on
the twisted three-torus. This information will be important in Section 6,
where we will use the various dual continuum field theory descriptions in [12]
to analyze the $3+1$-dimensional X-cube model (i.e., the $3+1$-dimensional
$\mathbb{Z}_{N}$ tensor gauge theory) on our twisted torus (1.4).

We will present some more technical information in appendices. In Appendix A,
we will analyze the $2+1$-dimensional $\mathbb{Z}_{N}$ plaquette Ising model
in the broken phase. In the continuum limit it becomes the $\mathbb{Z}_{N}$
tensor gauge theory of Section 4 [10]. We will compute the ground state
degeneracy on a twisted torus and match it with the answer from the continuum
treatment. This provides a further check of our answer. In Appendix B, we will
discuss the invariants of the transition functions for a circle-valued field
$\phi$ in Section 3. Appendix C will discuss additional operators that lead to
the $\mathbb{Z}_{m}\times\mathbb{Z}_{m}$ symmetry in the $\phi$-theory. The
analogous operators in the $2+1$-dimensional $\mathbb{Z}_{N}$ theory will be
subsequently analyzed in Appendix D. Finally, Appendix E will discuss the
winding configurations of a circle-valued field $\hat{\phi}^{i(jk)}$ in the
$\mathbf{2}$ of $S_{4}$.

##  2 Geometry

In this section, we focus on the geometry of a flat two-dimensional torus
$T^{2}$ on which we are going to place our system.

###  2.1 Continuum geometry

Our system is equipped with a preferred coordinate system $(x,y)$. We place it
on a torus by imposing identifications generated by

$\displaystyle(x,y)\sim(x+\ell_{x}^{u},y+\ell_{y}^{u})\sim(x+\ell_{x}^{v},y+\ell_{y}^{v})~{}.$
(2.1)

As in (1.4), we can take all $\ell_{i}^{r}\geq 0$. These two identifications
correspond to two cycles of the torus, which we denote by $U$ and $V$
respectively. See Figure 1 for an illustration of this geometry.

The preferred coordinate system $(x,y)$ leads to a foliation of the torus. It
is given by the special lines of constant $x$ and constant $y$. As we will
see, the physical answers depend both on the parameters of the torus and on
the choice of foliation. For simplicity, we are going to limit ourselves to
the case where these special lines wrap the torus a finite number of times.
Otherwise, some of the integers below are infinite.

Figure 1: The fundamental domain of the spatial torus.

  * •

The $Y$ cycle of the torus is characterized by constant $x$. It wraps the $V$
cycle $w_{x}^{v}$ times and it wraps the $U$ cycle $-w_{x}^{u}$ times.
$w_{x}^{v}$ and $w_{x}^{u}$ are non-negative integers satisfying
$\gcd(w_{x}^{v},w_{x}^{u})=1$. Using (2.1), we have

$\displaystyle\ell_{x}^{u}w_{x}^{u}=\ell_{x}^{v}w_{x}^{v}\,.$ (2.2)

  * •

The $X$ cycle of the torus is characterized by constant $y$. It wraps the $V$
cycle $-w_{y}^{v}$ times and it wrap the $U$ cycle $w_{y}^{u}$ times. Again,
$w_{y}^{v}$ and $w_{y}^{u}$ are non-negative integers satisfying
$\gcd(w_{y}^{v},w_{y}^{u})=1$. Using (2.1), we have

$\displaystyle\ell_{y}^{u}w_{y}^{u}=\ell_{y}^{v}w_{y}^{v}\,.$ (2.3)

The condition that the $w_{i}^{r}$ must be finite integers amounts to the
statement that $\ell_{x}^{v}/\ell_{x}^{u}$ and $\ell_{y}^{v}/\ell_{y}^{u}$ are
rational.

More mathematically, consider the first homology group $\Gamma\equiv
H_{1}(T^{2},\mathbb{Z})\simeq\mathbb{Z}^{2}$ of the torus with integer
coefficients. The lattice $\Gamma$ is generated by the $U$ and the $V$ cycles.
Their intersection numbers are $\langle U,V\rangle=-\langle V,U\rangle=1$. The
$X$ and $Y$ cycles mentioned above are

$\displaystyle X=w_{y}^{u}U-w_{y}^{v}V$ (2.4) $\displaystyle
Y=-w_{x}^{u}U+w_{x}^{v}V~{}.$

The intersection between these two cycles is

$m\equiv\langle X,Y\rangle=\det\left(\begin{array}[]{cc}w_{x}^{v}&w_{y}^{v}\\\
w_{x}^{u}&w_{y}^{u}\\\
\end{array}\right)=w_{x}^{v}w_{y}^{u}-w_{y}^{v}w_{x}^{u}\,.$ (2.5)

By exchanging the $U$ and the $V$ cycle, we can take $m$ to be positive.

We will denote the sublattice generated by the $X$ and the $Y$ cycles by
$\hat{\Gamma}$. Using (2.5), the index of this sublattice is $m$, i.e.,

$\displaystyle{\Gamma/\hat{\Gamma}}=\mathbb{Z}_{m}\,.$ (2.6)

When $m\neq 1$, $\hat{\Gamma}\subset\Gamma$ and the $X$ and $Y$ cycles are not
a complete basis of $\Gamma$. However, we can still choose a basis involving
$X$. It is related to the more generic $\\{U,V\\}$ basis by an
$SL(2,\mathbb{Z})$ transformation

$\displaystyle\left(\begin{array}[]{c}X\\\
\tilde{X}\end{array}\right)=\left(\begin{array}[]{cc}w_{y}^{u}&\,-w_{y}^{v}\\\
-n_{y}^{u}&\,n_{y}^{v}\end{array}\right)\left(\begin{array}[]{c}U\\\
V\end{array}\right)$ (2.7) $\displaystyle
w_{y}^{u}n_{y}^{v}-w_{y}^{v}n_{y}^{u}=1~{},$

where the condition on $n_{y}^{v}$ and $n_{y}^{u}$ can be satisfied because
$\text{gcd}(w^{u}_{y},w^{v}_{y})=1$. This defines the dual cycle
$\tilde{X}=-n_{y}^{u}U+n_{y}^{v}V$. The transformation $SL(2,\mathbb{Z})$
(LABEL:XtildeXbasis) guarantees that the cycles $X$ and $\tilde{X}$ generate
the entire lattice $\Gamma$, and their intersection is

$\displaystyle\langle X,\tilde{X}\rangle=1~{}.$ (2.8)

The cycle $\tilde{X}$ can be redefined further by adding to it an arbitrary
integer multiple of $X$.

When $m\neq 1$, while $\tilde{X}$ is not an element of $\hat{\Gamma}$,
$m\tilde{X}$ is. More explicitly,

$\displaystyle m\tilde{X}=Y+\langle\tilde{X},Y\rangle X\in\hat{\Gamma}\,.$
(2.9)

The cycle $\tilde{X}$ can be taken to be the generator of $\mathbb{Z}_{m}$ in
(2.6). Intuitively, if we mod out by the cycles generated by $X$ and $Y$, we
can think of $\tilde{X}$ as a torsion cycle. This fact will have important
consequences below.

Figure 2: The $X$ and $\tilde{X}$ cycles.

Similarly, we can define the dual of the $Y$ cycle:

$\displaystyle\tilde{Y}=-n_{x}^{u}U+n_{x}^{v}V~{},$ (2.10)
$\displaystyle\langle Y,\tilde{Y}\rangle=1$ $\displaystyle
w^{v}_{x}n^{u}_{x}-w^{u}_{x}n^{v}_{x}=1\,,$

where again we can satisfy the $SL(2,\mathbb{Z})$ condition since
$\text{gcd}(w^{u}_{x},w^{v}_{x})=1$. The two dual cycles $Y$ and $\tilde{Y}$
lead to a complete basis of $\Gamma$. And as for $\tilde{X}$, we can redefine
$\tilde{Y}$ by adding to it an arbitrary integer multiple of $Y$.

Other interesting intersections are

$\displaystyle\langle\tilde{X},\tilde{Y}\rangle=-n_{y}^{u}n_{x}^{v}+n_{y}^{v}n_{x}^{u}$
(2.11)
$\displaystyle\langle\tilde{X},Y\rangle=-n_{y}^{u}w_{x}^{v}+n_{y}^{v}w_{x}^{u}$
$\displaystyle\langle\tilde{Y},X\rangle=n_{x}^{u}w_{y}^{v}-n_{x}^{v}w_{y}^{u}~{}.$

The $\\{X,\tilde{X}\\}$ basis is related to the $\\{Y,\tilde{Y}\\}$ basis as

$\displaystyle\left(\begin{array}[]{c}X\\\
\tilde{X}\end{array}\right)=\left(\begin{array}[]{cc}\langle
X,\tilde{Y}\rangle&\,\,-\langle X,Y\rangle\\\
\langle\tilde{X},\tilde{Y}\rangle&\,\,-\langle\tilde{X},Y\rangle\end{array}\right)\left(\begin{array}[]{c}Y\\\
\tilde{Y}\end{array}\right)\,.$ (2.12)

Since this is an $SL(2,\mathbb{Z})$ transformation, we have the identity

$\displaystyle
m\langle\tilde{X},\tilde{Y}\rangle=1-\langle\tilde{X},Y\rangle\langle\tilde{Y},X\rangle\,.$
(2.13)

We limit ourselves to flat space with the obvious metric
$ds^{2}=dx^{2}+dy^{2}$. Then, the lengths of the $U$ and $V$ cycles and the
angle between them are

$\displaystyle\ell_{u}=\sqrt{(\ell_{x}^{u})^{2}+(\ell_{y}^{u})^{2}}$ (2.14)
$\displaystyle\ell_{v}=\sqrt{(\ell_{x}^{v})^{2}+(\ell_{y}^{v})^{2}}$
$\displaystyle\cos\varphi={\ell_{y}^{u}\ell_{y}^{v}+\ell_{x}^{u}\ell_{x}^{v}\over\ell_{u}\ell_{v}}~{}.$

The lengths of the closed $X$ cycle and $Y$ cycle are

$\displaystyle\ell_{x}=w_{y}^{u}\ell_{x}^{u}-w_{y}^{v}\ell_{x}^{v}\,,$ (2.15)
$\displaystyle\ell_{y}=w_{x}^{v}\ell_{y}^{v}-w_{x}^{u}\ell_{y}^{u}\,.$

We also introduce the effective lengths

$\displaystyle\ell^{\rm eff}_{x}\equiv{1\over m}\ell_{x}={\ell^{u}_{x}\over
w^{v}_{x}}={\ell^{v}_{x}\over w^{u}_{x}}\,,$ (2.16) $\displaystyle\ell^{\rm
eff}_{y}\equiv{1\over m}\ell_{y}={\ell^{u}_{y}\over
w^{v}_{y}}={\ell^{v}_{y}\over w^{u}_{y}}\,.$

Note that the area of our torus can be expressed as

$m\ell_{x}^{\textrm{eff}}\ell_{y}^{\textrm{eff}}=\ell_{u}\ell_{v}\sin\varphi=\ell_{x}^{u}\ell_{y}^{v}-\ell_{y}^{u}\ell_{x}^{v}\,.$
(2.17)

As we said above, it is convenient to replace the basis of cycles $\\{U,V\\}$
by $\\{X,\tilde{X}\\}$, i.e., to align the $U$ cycle with the $X$ cycle (see
Figure 2). This corresponds to setting $\ell_{y}^{u}=0$ in (2.1) and leads to
simplifications in some of the expressions above. The modular parameter of our
torus is then

$\displaystyle\tau=\tau_{1}+i\tau_{2}={k\over
m}+i{\ell_{y}^{\textrm{eff}}\over m\ell_{x}^{\textrm{eff}}}\,,$ (2.18)
$\displaystyle k\equiv\langle\tilde{X},Y\rangle\,.$

This makes it clear that our condition of finite wrapping amounts to
$\tau_{1}={k\over m}$ being rational. Here we also see that the independent
data is $\ell_{x}^{\textrm{eff}}$, $\ell_{y}^{\textrm{eff}}$ and the two
coprime integers $m$ and $k$. In addition, the freedom mentioned above in
shifting $k$ by a multiple of $m$ is recognized as being generated by the
familiar $T$ transformation on $\tau$.

As we go around the $X$ and $\tilde{X}$ cycle, the coordinates $(x,y)$ are
shifted as

$\displaystyle X:~{}(x,y)\to(x+m\ell_{x}^{\textrm{eff}},y)\,,$ (2.19)
$\displaystyle\tilde{X}:~{}(x,y)\to(x+k\ell_{x}^{\textrm{eff}},y+\ell_{y}^{\textrm{eff}})\,.$

The geometric interpretation of the effective lengths is the following.
Consider a periodic function on the torus that depends only on $y$. The
periodicity around the $\tilde{X}$ cycle (LABEL:xtxperiod) means that

$\displaystyle f(y)=f(y+\ell^{\rm eff}_{y})\,.$ (2.20)

Repeating this for a function $g(x)$ that depends only on $x$ we conclude that

$\displaystyle g(x)$ $\displaystyle=g(x+\ell_{x}^{\textrm{eff}})\,,$ (2.21)

i.e., their periodicities are smaller than $\ell_{x}$ and $\ell_{y}$.

The length of a closed contour along $y$ at fixed $x$ is given by
$\ell_{y}=m\ell_{y}^{\textrm{eff}}$, whereas the length of a closed contour
along $x$ at fixed $y$ is given by $\ell_{x}=m\ell_{x}^{\textrm{eff}}$. In
other words,

$\oint dy\equiv\int_{0}^{m\ell_{y}^{\textrm{eff}}}dy\,,~{}~{}~{}\oint
dx\equiv\int_{0}^{m\ell_{x}^{\textrm{eff}}}dx\,.$ (2.22)

Any well-defined function on our torus $f(x,y)$ must satisfy the periodicity
constraints

$\oint dyf(x,y)=\oint dyf(x+\ell_{x}^{\textrm{eff}},y)\,,~{}~{}~{}\oint
dxf(x,y)=\oint dxf(x,y+\ell_{y}^{\textrm{eff}})\,.$ (2.23)

To integrate a function $f(x,y)$ over the entire fundamental domain, we may
first integrate over a closed contour at fixed $x$ and then integrate $x$ over
a region of length $\ell_{x}^{\textrm{eff}}$, or we may first integrate over a
closed contour at fixed $y$ and then integrate $y$ over a region of length
$\ell_{y}^{\textrm{eff}}$. In particular, we have

$\displaystyle\int_{T^{2}}dxdyf(x,y)$
$\displaystyle=\int_{0}^{\ell_{x}^{\textrm{eff}}}dx\oint
dyf(x,y)=\int_{0}^{\ell_{y}^{\textrm{eff}}}dy\oint dxf(x,y)\,.$ (2.24)

Pictorially, the rewriting of the integral is shown in Figure 3.

Figure 3: The surface integral over the twisted torus in terms of the $x$ and
$y$ integrals. The contour of the integral $\oint dy$ runs along the blue
lines, and the $\int dx$ integral runs over the red segment of length
$\ell_{x}^{\textrm{eff}}$.

###  2.2 Lattice geometry

We now consider a discretization of the twisted geometry by putting it on the
lattice, whose sites are labeled by integers ($\hat{x},\hat{y}$). In
particular, as in (2.1), we consider identifications generated by

$(\hat{x},\hat{y})\sim(\hat{x}+L_{x}^{u},\hat{y}+L_{y}^{u})\sim(\hat{x}+L_{x}^{v},\hat{y}+L_{y}^{v})\,,$
(2.25)

with non-negative integers $L_{i}^{r}$.

As in the continuum discussion, we define integers $W_{i}^{r}$ describing the
number of times a fixed $x$ or fixed $y$ curve runs around the cycles of our
torus. In terms of the parameters $L_{i}^{r}$ they are

$\displaystyle
W_{x}^{u}\equiv\frac{L_{x}^{v}}{\text{gcd}(L_{x}^{u},L_{x}^{v})}\,,~{}~{}W_{x}^{v}\equiv\frac{L_{x}^{u}}{\text{gcd}(L_{x}^{u},L_{x}^{v})}\,,{}{}$
$\displaystyle
W_{y}^{u}\equiv\frac{L_{y}^{v}}{\text{gcd}(L_{y}^{u},L_{y}^{v})}\,,~{}~{}W_{y}^{v}\equiv\frac{L_{y}^{u}}{\text{gcd}(L_{y}^{u},L_{y}^{v})}\,,$
(2.26) $\displaystyle\gcd(W_{x}^{v},W_{x}^{u})=$
$\displaystyle\gcd(W_{y}^{v},W_{y}^{u})=1\,,$

The lengths of the $X$ and $Y$ cycles are (compare with (LABEL:fixedxl))

$\displaystyle L_{x}=W^{u}_{y}L^{u}_{x}-W^{v}_{y}L^{v}_{x}\,,$ (2.27)
$\displaystyle L_{y}=W^{v}_{x}L^{v}_{y}-W^{u}_{x}L^{u}_{y}\,.$

As in the continuum discussion (2.5), we define

$\displaystyle M\equiv W_{x}^{v}W_{y}^{u}-W_{x}^{u}W_{y}^{v}\,.$ (2.28)

The effective lengths of the $X$ and $Y$ cycles are

$\displaystyle L_{x}^{\textrm{eff}}\equiv{L_{x}\over
M}=\text{gcd}(L_{x}^{u},L_{x}^{v})\,,$ (2.29) $\displaystyle
L_{y}^{\textrm{eff}}\equiv{L_{y}\over M}=\text{gcd}(L_{y}^{u},L_{y}^{v})\,,$

which are the lattice versions of continuum parameters
$\ell_{x}^{\textrm{eff}}$, $\ell_{y}^{\textrm{eff}}$ of (LABEL:leffxyd). They
represent the periodicities of functions that depend only on $x$ or only on
$y$.

As in the continuum description, it is convenient to use the basis of cycles
$X$ and $\tilde{X}$ (see (LABEL:XtildeXbasis))

$\displaystyle\left(\begin{array}[]{c}X\\\
\tilde{X}\end{array}\right)=\left(\begin{array}[]{cc}W_{y}^{u}&\,-W_{y}^{v}\\\
-N_{y}^{u}&\,N_{y}^{v}\end{array}\right)\left(\begin{array}[]{c}U\\\
V\end{array}\right)$ (2.30) $\displaystyle
W_{y}^{u}N_{y}^{v}-W_{y}^{v}N_{y}^{u}=1~{}.$

These cycles correspond to

$\displaystyle X:(\hat{x},\hat{y})\to(\hat{x}+ML_{x}^{\textrm{eff}},\hat{y})$
(2.31)
$\displaystyle\tilde{X}:(\hat{x},\hat{y})\to(\hat{x}+KL_{x}^{\textrm{eff}},\hat{y}+L_{y}^{\textrm{eff}})\,,$
$\displaystyle K\equiv-N_{y}^{u}W_{x}^{v}+N_{y}^{v}W_{x}^{u}~{}.$

Next, we consider the continuum limit. We introduce a lattice spacing $a$ and
scale the integers $L_{i}^{r}$ such that the four limits

$\displaystyle\ell_{i}^{r}=\lim_{a\to 0}aL_{i}^{r}$ (2.32)

converge to their continuum counterparts. Similarly,

$\displaystyle\lim_{a\to 0}{W_{x}^{v}\over W_{x}^{u}}={w_{x}^{v}\over
w_{x}^{u}}$ (2.33) $\displaystyle\lim_{a\to 0}{W_{y}^{v}\over
W_{y}^{u}}={w_{y}^{v}\over w_{y}^{u}}$ $\displaystyle\lim_{a\rightarrow
0}a\sqrt{(L_{x}^{u})^{2}+(L_{y}^{u})^{2}}=\ell_{u}$
$\displaystyle\lim_{a\rightarrow
0}a\sqrt{(L_{x}^{v})^{2}+(L_{y}^{v})^{2}}=\ell_{v}~{}.$

However, the limits

$\displaystyle\lim_{a\to 0}W_{i}^{r}\qquad,\qquad\lim_{a\to
0}M\qquad,\qquad\lim_{a\to 0}aL_{i}\qquad,\qquad\lim_{a\to
0}aL_{i}^{\textrm{eff}}$ (2.34)

are not well-defined. They do not necessarily converge to the continuum
quantities $w_{i}^{r}$, $m$, $\ell_{i}$, $\ell_{i}^{\textrm{eff}}$. They
depend on the details of how we take $L_{i}^{r}$ to infinity.

As an extreme example of dependence on how we take the limit, consider two
sequences of lattice geometries labeled by $L$, which we will take to infinity
as $\ell/a$ with finite $\ell$. The first is

$\displaystyle L_{x}^{u}=L_{y}^{v}=L\,,\qquad L_{x}^{v}=L_{y}^{u}=0\,.$ (2.35)

and hence $W_{x}^{v}=W_{y}^{u}=1$, $W_{x}^{u}=W_{y}^{v}=0$,
$L_{x}^{\textrm{eff}}=L_{y}^{\textrm{eff}}=L$. The second is

$\displaystyle L_{x}^{u}=L_{y}^{v}=L\,,\qquad L_{x}^{v}=L_{y}^{u}=1\,.$ (2.36)

and hence $W_{x}^{v}=W_{y}^{u}=L$, $W_{x}^{u}=W_{y}^{v}=1$,
$L_{x}^{\textrm{eff}}=L_{y}^{\textrm{eff}}=1$.

As in (LABEL:simplelimit), both of them lead to the untwisted geometry
$\ell_{x}^{u}=\ell_{y}^{v}=\ell$, $\ell_{x}^{v}=\ell_{y}^{u}=0$,
${w_{x}^{u}\over w_{x}^{v}}={w_{y}^{v}\over w_{y}^{u}}=0$,
$\ell_{u}=\ell_{v}=\ell$. However, while the first one leads to finite
$w_{i}^{r}=\lim_{a\to 0}W_{i}^{r}$, the second one leads to divergent
$\lim_{a\to 0}W_{i}^{r}$, and misses the fact that the continuum values
derived from $\ell_{x}^{u}=\ell_{y}^{v}=\ell$, $\ell_{x}^{v}=\ell_{y}^{u}=0$
should be $w_{x}^{v}=w_{y}^{u}=1$, $w_{x}^{u}=w_{y}^{v}=0$. Relatedly, it
leads to $\lim_{a\to 0}L_{i}^{\textrm{eff}}=1$ and hence $\lim_{a\to
0}aL_{i}^{\textrm{eff}}=0$.

This example demonstrates also the discussion around (1.8). The sequence
(2.35) is the one that leads to a natural regularization of the continuum
system. Indeed, the continuum values of $w_{i}^{r}$ are the limits of the
lattice values.

##  3 Winding on the twisted two-torus

In this section, we place circle-valued fields on our twisted torus.

As a warmup, let us start with a map from a one-dimensional circle of
circumference $\ell$, which is parameterized by $x$ (i.e., $x\sim x+\ell$) to
a target-space $f(x)$. First, consider a smooth $f(x)$. If $f$ is real-valued,
then $f(x+\ell)=f(x)$. If $f$ is circle valued, i.e., $f\sim f+2\pi$, then

$\displaystyle e^{if(x+\ell)}=e^{if(x)}\,.$ (3.1)

Lifting $f(x)$ to a real-valued function, we learn that $f(x+\ell)=f(x)+g$
with $g\in 2\pi\mathbb{Z}$. We interpret $g$ as a transition function, which
measures the winding number of the map ${g\over 2\pi}={1\over 2\pi}\oint
dx\partial_{x}f(x)$.

Since we allow discontinuous $f$, this discussion should be modified. We again
lift $f$ to be real-valued. Then, we gauge $f(x)\sim f(x)+2\pi n(x)$ with
$n(x)\in\mathbb{Z}$, i.e., we allow an $x$ dependent, integer-valued gauge
parameter $n(x)$. Unlike the case of smooth $f$, where the lift at one point
$x$ constrains the lift at nearby points, now there is no such constraint. We
can again consider a transition function $f(x+\ell)=f(x)+g(x)$ with $g(x)\in
2\pi\mathbb{Z}$, but now we can choose another “trivialization” where
$g(x)=0$, and therefore there is no winding number. More explicitly, we can
perform a non-periodic transformation $f(x)\to f(x)+2\pi n(x)$, $g(x)\to
g(x)+2\pi(n(x+\ell)-n(x))$ to set $g(x)=0$. (Note that locally this is a gauge
transformation, but it changes the transition function because it is not
periodic.)

Equivalently, as in [10], we can say that in this case $f$ and all its
derivatives are not gauge invariant. Only $e^{if}$ and its derivatives are
gauge invariant. Therefore, the winding charge ${1\over 2\pi}\oint
dx\partial_{x}f$ is also not gauge invariant and it is not meaningful.

This discussion might appear as a fancy way of stating a well known fact. When
the circle parameterized by $x$ is a lattice and $f(x)$ is circle-valued, the
configuration space does not break into sectors labeled by winding number –
there is no winding number on the lattice. Nonetheless, our extended
discussion here will prove quite useful below.

As preparation for later analysis, let us define some useful functions. First,
we will use the periodic delta function

$\displaystyle\delta^{\rm
P}(x,x_{0},\ell)=\sum_{I\in\mathbb{Z}}\delta(x-x_{0}+I\ell)~{}.$ (3.2)

We will also find it convenient to define

$\displaystyle\Theta^{\textrm{P}}(x,x_{0},\ell_{s})=\int_{0}^{x}dx^{\prime}\delta^{\rm
P}(x^{\prime},x_{0},\ell)~{}.$ (3.3)

Note that $\Theta^{\textrm{P}}(x,x_{0},\ell)$ is not periodic.333Below we will
sometimes use $\Theta^{\textrm{P}}(x,0,\ell_{s})$, which is subject to
ambiguity given our convention that $\Theta^{\textrm{P}}(0,x_{0},\ell_{s})=0$
for any $x_{0}$. To be more precise, we will define
$\Theta^{\textrm{P}}(x,0,\ell_{s})$ as
$\Theta^{\textrm{P}}(x,\epsilon,\ell_{s})$ with $\epsilon$ positive and
infinitesimally small.

###  3.1 Transition functions and winding charges

We want to place a circle-valued field $\phi$, subject to the rules of [10],
on the twisted torus. In order to simplify the notation we will use the
$SL(2,\mathbb{Z})$ freedom in redefining $U$ and $V$ and choose $U=X$ and
$V=\tilde{X}$ from this point on. Note that this choice also breaks the
symmetry exchanging $X$ and $Y$ together with the other data characterizing
these cycles.

As in [10], we will be interested in discontinuous functions $\phi$ with
certain discontinuities. Specifically, we allow $\phi$ to be discontinuous and
therefore $\partial_{x}\phi$ and $\partial_{y}\phi$ can have delta-functions.
However, we restrict the discontinuities of $\phi$, such that
$\partial_{x}\partial_{y}\phi$ can include a delta function in $x$ or in $y$,
but we exclude situations where $\partial_{x}\partial_{y}\phi$ has terms like
$\delta(x-x_{0})\delta(y-y_{0})$. A special case of it is a discontinuous
$\phi$ with finite $\partial_{x}\partial_{y}\phi$.

We view the field $\phi$ as real-valued and to make it circle-valued by
imposing the gauge identification

$\displaystyle\phi(x,y)\sim\phi(x,y)+2\pi\Big{(}n^{x}(x)+n^{y}(y)\Big{)}\qquad,\qquad
n^{x}(x),n^{y}(y)\in\mathbb{Z}~{}.$ (3.4)

For an ordinary periodic scalar, the identification involves a position-
independent integer. Here we allow discontinuous identifications of the form
(3.4). We do not include in the gauge identification an arbitrary integer
valued function of both $x$ and $y$, as this takes us out of the space of
functions we defined above.

We start with a real-valued field $\phi$ on $\mathbb{R}^{2}$. We need to
impose the gauge identification (3.4) and place it on our torus
$\mathbb{R}^{2}/\Gamma$. Every vector in $\Gamma$ leads to a closed cycle
$\cal C$ on our torus. The identification across $\cal C$ should involve a
transition function of the form (3.4)

$\displaystyle\phi(x+{\cal C}^{x},y+{\cal C}^{y})=\phi(x,y)+g_{\cal C}(x,y)$
(3.5) $\displaystyle g_{\cal C}(x,y)=2\pi\Big{(}n_{\cal C}^{x}(x)+n_{\cal
C}^{y}(y)\Big{)}\qquad,\qquad n_{\cal C}^{x}(x),n_{\cal
C}^{y}(y)\in\mathbb{Z}~{}.$

Here $({\cal C}^{x},{\cal C}^{y})$ is the vector on the covering space
corresponding to ${\cal C}$. For example, for our basis of cycles $X$ and
$\tilde{X}$,

$\displaystyle(X^{x},X^{y})=(m\ell_{x}^{\textrm{eff}},0)$ (3.6)
$\displaystyle(\tilde{X}^{x},\tilde{X}^{y})=(k\ell_{x}^{\textrm{eff}},\ell_{y}^{\textrm{eff}})~{}$

We will also discuss the $Y$ cycle, for which

$\displaystyle(Y^{x},Y^{y})=(0,m\ell_{y}^{\textrm{eff}})~{}.$ (3.7)

Our goal is to identify the distinct bundles. This involves two steps. First,
we trivialize the bundle by choosing the transition functions. Here we must
impose the constraints from the cocycle conditions. Second, we identify
bundles labeled by different transition functions that are related by
redefinitions. Locally, these are gauge transformations, but globally they are
not.

The composition of cycles ${\cal C}={\cal A}+{\cal B}$ leads to the cocycle
condition

$\displaystyle g_{\cal C}(x,y)=g_{\cal B}(x,y)+g_{\cal A}(x+{\cal
B}^{x},y+{\cal B}^{y})=g_{\cal A}(x,y)+g_{\cal B}(x+{\cal A}^{x},y+{\cal
A}^{y})~{}.$ (3.8)

Using such a composition, it is enough to consider the transition functions
for two generators of $\Gamma$, say $X$ and $\tilde{X}$, and express the other
transition functions as linear combinations of these. For example, the
transition function of the $Y$ cycle is

$\displaystyle Y=-kX+m\tilde{X}$ (3.9) $\displaystyle
g_{Y}(x,y)=-\sum_{I=1}^{k}g_{X}(x-Im\ell_{x}^{\textrm{eff}},y)+\sum_{J=1}^{m}g_{\tilde{X}}\left(x-Jk\ell_{x}^{\textrm{eff}},y+(m-J)\ell_{y}^{\textrm{eff}}\right)~{}.$

The fact that the transition functions are separate functions of $x$ and $y$
(LABEL:transitioncon) and the cocycle condition (3.8) impose important
constraints. For example, the cocycle condition of the $X$ and $\tilde{X}$
cycles leads to

$\displaystyle
n_{X}^{y}(y+\ell_{y}^{\textrm{eff}})-n_{X}^{y}(y)=\left[n_{\tilde{X}}^{x}(x+m\ell_{x}^{\textrm{eff}})-n_{\tilde{X}}^{x}(x)\right]-[n_{X}^{x}(x+k\ell_{x}^{\textrm{eff}})-n_{X}^{x}(x)]$
(3.10)

and the cocycle condition of the $X$ and $Y$ cycles leads to

$\displaystyle
n_{X}^{y}(y+m\ell_{y}^{\textrm{eff}})-n_{X}^{y}(y)=n_{Y}^{x}(x+m\ell_{x}^{\textrm{eff}})-n_{Y}^{x}(x)~{}.$
(3.11)

From these two conditions and the equation obtained from (3.10) by exchanging
$X$ and $Y$, we find the periodicity

$\displaystyle g_{X}(x,y+\ell_{y}^{\textrm{eff}})=g_{X}(x,y)+2\pi n_{xy}$
(3.12) $\displaystyle g_{Y}(x+\ell_{x}^{\textrm{eff}},y)=g_{Y}(x,y)+2\pi
n_{xy}\,$

with the same constant $n_{xy}$.

Next, we should identify bundles with different transition functions that are
related by certain transformations. Locally, these are gauge transformations,
but they are not single valued. Specifically, we identify

$\displaystyle g_{\cal C}(x,y)\sim g_{\cal C}(x,y)+2\pi\Big{(}n^{x}(x+{\cal
C}^{x})-n^{x}(x)+n^{y}(y+{\cal C}^{y})-n^{y}(y)\Big{)}~{}.$ (3.13)

As a check, the cocycle condition (3.8) is invariant under this
identification.

Let us identify the invariant information in the transition functions. The
action of the transformation (3.13) on the transition functions of the $X$ and
$Y$ cycles implies that the $U(1)$ winding charges (LABEL:windingci)

$\displaystyle Q^{x}(x)={1\over 2\pi}\oint
dy\partial_{x}\partial_{y}\phi={1\over
2\pi}\partial_{x}g_{Y}(x,y)=\partial_{x}n_{Y}^{x}(x)\,,$ (3.14) $\displaystyle
Q^{y}(y)={1\over 2\pi}\oint dx\partial_{x}\partial_{y}\phi={1\over
2\pi}\partial_{y}g_{X}(x,y)=\partial_{y}n_{X}^{y}(y)\,,$

are invariant. Note that since $n_{Y}^{x}(x)$ and $n_{X}^{y}(y)$ are integers,
the charges are linear combinations of delta functions with integer
coefficients. Furthermore, we have the periodicity (LABEL:XYperiodicity). The
integer $n_{xy}$ in (LABEL:XYperiodicity) can now be interpreted as a constant
used in [10]:

$\displaystyle\int_{0}^{\ell_{x}^{\textrm{eff}}}dxQ^{x}(x)=\int_{0}^{\ell_{y}^{\textrm{eff}}}dyQ^{y}(y)=n_{xy}~{}.$
(3.15)

So far we have identified a continuum of $U(1)$ charges $Q^{x}(x)$ and
$Q^{y}(y)$ labeled by $0\leq x<\ell_{x}^{\textrm{eff}},0\leq
y<\ell_{y}^{\textrm{eff}}$, subject to the constraint (3.15). If we regularize
the theory on a lattice, it leads to
$L_{x}^{\textrm{eff}}+L_{y}^{\textrm{eff}}-1$ integer charges.

In addition to these integers, we have a $\mathbb{Z}_{m}$-valued phase:

$\displaystyle{\cal U}(x,y)$ $\displaystyle=\exp\left[-{i\over
m}\sum_{I=0}^{m-1}g_{\tilde{X}}(x+I\ell_{x}^{\textrm{eff}},y)+{i\over
m}\sum_{J=0}^{k-1}g_{X}(x+J\ell_{x}^{\textrm{eff}},y)\right]\,.$ (3.16)

We will motivate this operator and discuss it further in Appendices B and C.
It is straightforward to check that it is invariant under (3.13). Naively this
defines many $\mathbb{Z}_{m}$ charges depending on the choice of $x,y$.
However, using (LABEL:gY) and the cocycle conditions, we have

$\displaystyle{{\cal U}(x,y)\over{\cal U}(0,0)}=\exp\left[-{2\pi i\over
m}\int_{0}^{x}dx^{\prime}Q^{x}(x^{\prime})\right]\exp\left[{2\pi ki\over
m}\int_{0}^{y}dy^{\prime}Q^{y}(y^{\prime})\right]\,,$ (3.17)

which is a function of $Q^{x}(x)$ and $Q^{y}(y)$. Therefore, ${\cal U}(x,y)$
leads to a single $\mathbb{Z}_{m}$ invariant beyond the $U(1)$ charges
$Q^{x}(x),Q^{y}(y)$.

This $\mathbb{Z}_{m}$ charge can also be written directly in terms of $\phi$:

$\displaystyle{\cal U}(x,y)$ $\displaystyle=\exp\left[-{i\over
m}\sum_{I=0}^{m-1}\left(\,\phi\left(x+(k+I)\ell_{x}^{\textrm{eff}},y+\ell_{y}^{\textrm{eff}}\right)-\phi\left(x+(k+I)\ell_{x}^{\textrm{eff}},y\right)\,\right)\right]\,.$
(3.18)

We refer the readers for a more detailed discussion on related points to the
appendices. In Appendix B, we will verify the number of winding charges by
classifying all the invariants of the transition functions. In Appendix C, we
will discuss additional operators in the $\phi$-theory and motivate the
$\mathbb{Z}_{m}$ charge (3.16).

We can summarize this discussion as follows. Windings around the $X$ and $Y$
cycles are measured by the charges $Q^{y}(y)$ and $Q^{x}(x)$. They are
essentially the same as the windings in the untwisted torus, except that they
have periodicities $\ell_{x}^{\textrm{eff}}$ and $\ell_{y}^{\textrm{eff}}$
respectively. The new charge $\cal U$ is present because our torus has
additional cycles. As stated after (2.9), if we mod out by the $X$ and $Y$
cycles, the $\tilde{X}$ cycle behaves like a torsion cycle. This leads to the
fact that the new charge is a $\mathbb{Z}_{m}$ charge.

###  3.2 Winding configurations of $\phi$

In this section, we present winding configurations of $\phi$ that realize the
winding charges in Section 3.1.

####  3.2.1 Special configurations

We start with the winding configurations satisfying

$\displaystyle\partial_{x}\partial_{y}\phi=0\,.$ (3.19)

These special configurations will be useful for other discussions below.

As a warmup, let us start with a real-valued function on the torus. In (2.20)
and (2.21), we studied a real-valued function that depends only on $x$ or only
on $y$ and found that it has periodicity $\ell_{x}^{\textrm{eff}}$ and
$\ell_{y}^{\textrm{eff}}$ respectively. A trivial extension of this analysis
applies to the case of a real-valued function $f$ satisfying
$\partial_{x}\partial_{y}f=0$. Because of the differential equation, we have
$f(x,y)=f^{x}(x)+f^{y}(y)$, and the boundary conditions set

$\displaystyle f^{x}(x+\ell_{x}^{\textrm{eff}})=f^{x}(x)\,,$ (3.20)
$\displaystyle f^{y}(y+\ell_{y}^{\textrm{eff}})=f^{y}(y)\,.$

We will see that the conclusion is different for a circle-valued field
$\phi\sim\phi+2\pi$. Locally, we can solve (3.19) as

$\displaystyle\phi(x,y)=\phi^{x}(x)+\phi^{y}(y)\,.$ (3.21)

The boundary conditions tell us that

$\displaystyle e^{i\phi^{x}(x+m\ell_{x}^{\textrm{eff}})}=e^{i\phi^{x}(x)}\,,$
(3.22) $\displaystyle
e^{i\phi^{x}(x+k\ell_{x}^{\textrm{eff}})}e^{i\phi^{y}(y+\ell_{y}^{\textrm{eff}})}=e^{i\phi^{x}(x)}e^{i\phi^{y}(y)}\,.$

This means that

$\displaystyle e^{i\phi^{x}(x+\ell_{x}^{\textrm{eff}})}=\eta e^{i\phi^{x}(x)}$
(3.23) $\displaystyle
e^{i\phi^{y}(y+\ell_{y}^{\textrm{eff}})}=\eta^{-k}e^{i\phi^{y}(y)}$
$\displaystyle\eta^{m}=1$

with a position-independent $\eta$.

We see that while a real-valued function $f$ has the simple periodicity
(LABEL:fxyp), a circle-valued function $\phi$ has a new $\mathbb{Z}_{m}$ phase
$\eta$ in that periodicity (LABEL:phizxy).

The most general such $\phi$ can be expressed as

$\displaystyle\phi(x,y)={2\pi r\over
m}\left({x\over\ell_{x}^{\textrm{eff}}}-k{y\over\ell_{y}^{\textrm{eff}}}\right)+f^{x}(x)+f^{y}(y)\,,$
(3.24) $\displaystyle
e^{if^{x}(x+\ell_{x}^{\textrm{eff}})}=e^{if^{x}(x)}\,,~{}~{}~{}~{}e^{if^{y}(y+\ell_{y}^{\textrm{eff}})}=e^{if^{y}(y)}\,,$
$\displaystyle r=1,2,...,m\,.$

It carries a nontrivial $\mathbb{Z}_{m}$ charge (3.16), ${\cal U}(x,y)=e^{2\pi
ikr/m}$, but zero $U(1)$ charges, $Q^{i}(x^{i})=0$.

As in [10], we are also interested in discontinuous functions with certain
discontinuities. In particular, $f^{x}(x)$ and $f^{y}(y)$ in
(LABEL:generalphiz) can be discontinuous. Also, the field $\phi$ is subject to
a discontinuous gauge transformation (3.4).

This has two important consequences. First, we can replace the first term in
(LABEL:generalphiz) by another function with the same transition functions,
e.g.

$\displaystyle\phi(x,y)={2\pi r\over
m}\left(\Theta^{\textrm{P}}(x,0,\ell_{x}^{\textrm{eff}})-k\Theta^{\textrm{P}}(y,0,\ell_{y}^{\textrm{eff}})\right)+f^{x}(x)+f^{y}(y)$
(3.25)

with different $f^{x}$ and $f^{y}$. Second, as in the discussion of the one-
dimensional case above, the fact that
$e^{if^{x}(x+\ell_{x}^{\textrm{eff}})}=e^{if^{x}(x)}$ and
$e^{if^{y}(y+\ell_{y}^{\textrm{eff}})}=e^{if^{y}(y)}$ means that we can choose
a lift where $f^{x}(x+\ell_{x}^{\textrm{eff}})=f^{x}(x)$ and
$f^{y}(y+\ell_{y}^{\textrm{eff}})=f^{y}(y)$ as real functions.

####  3.2.2 More general configurations

Next, we consider configurations that carry nontrivial $U(1)$ charges with
$\partial_{x}\partial_{y}\phi\neq 0$. The minimal winding configuration with
nontrivial $Q^{x}(x)$ and $Q^{y}(y)$ should satisfy

$\displaystyle Q^{x}(x)=$ $\displaystyle{1\over 2\pi}\oint
dy\partial_{x}\partial_{y}\phi=\delta^{\rm
P}(x,x_{0},\ell_{x}^{\textrm{eff}})\,,$ (3.26) $\displaystyle Q^{y}(y)=$
$\displaystyle{1\over 2\pi}\oint dx\partial_{x}\partial_{y}\phi=\delta^{\rm
P}(y,y_{0},\ell_{y}^{\textrm{eff}})\,,$

for some $x_{0}$ and $y_{0}$. The periodic delta function
$\delta^{\textrm{P}}(x,x_{0},\ell_{x}^{\textrm{eff}})$ was defined in (3.2).
These configurations can also carry the $\mathbb{Z}_{m}$ charge (3.16).

The charges (3.26) lead us to look for a configuration satisfying

$\displaystyle\partial_{x}\partial_{y}\phi(x,y)={2\pi\over m}\Bigg{[}$
$\displaystyle\frac{1}{\ell_{x}^{\textrm{eff}}}\delta^{\rm
P}(y,y_{0},\ell_{y}^{\textrm{eff}})+\frac{1}{\ell_{y}^{\textrm{eff}}}\delta^{\rm
P}(x,x_{0},\ell_{x}^{\textrm{eff}})-\frac{1}{\ell_{x}^{\textrm{eff}}\ell_{y}^{\textrm{eff}}}\Bigg{]}$
(3.27)

for some $x_{0}$ and $y_{0}$. Such a minimal winding configuration is given by

$\displaystyle\phi=2\pi\left({x\over\ell_{x}}-\langle\tilde{X},Y\rangle{y\over\ell_{y}}\right)\,\Theta^{\textrm{P}}(y,y_{0},\ell_{y}^{\textrm{eff}})+2\pi\left({y\over\ell_{y}}-\langle\tilde{Y},X\rangle{x\over\ell_{x}}\right)\,\Theta^{\textrm{P}}(x,x_{0},\ell_{x}^{\textrm{eff}})$
(3.28) $\displaystyle-{2\pi
m}\left[-\frac{1}{2}\langle\tilde{X},Y\rangle\left({y\over\ell_{y}}\right)^{2}-\frac{1}{2}\langle\tilde{Y},X\rangle\left({x\over\ell_{x}}\right)^{2}+{xy\over\ell_{x}\ell_{y}}\right]+2\pi\left(c_{x}{x\over\ell_{x}}+c_{y}{y\over\ell_{y}}\right)$
$\displaystyle c_{x}={m\over
2}\langle\tilde{Y},X\rangle+r\,,~{}~{}~{}~{}~{}c_{y}=-{m\over
2}\langle\tilde{X},Y\rangle\left(\langle\tilde{X},\tilde{Y}\rangle+\langle\tilde{Y},X\rangle\right)-\langle\tilde{X},Y\rangle
r\,.$

Here we have chosen $c_{x},c_{y}$ such that the transition functions take a
simple form (see below). We also have the freedom of adding a standard winding
configuration (LABEL:generalphiz) to $\phi$ and shifting the value of $r$.

Let us check that the transition functions are indeed $2\pi\mathbb{Z}$-valued.
Using (3.8), it suffices to check this for the transition functions for the
$X$ and $\tilde{X}$ cycles. The transition function around the $X$ cycle is

$\displaystyle
g_{X}(x,y)=\phi\left(x+m\ell_{x}^{\textrm{eff}}\,,\,y\right)-\phi(x,y)=2\pi\Theta^{\textrm{P}}(y,y_{0},\ell_{y}^{\textrm{eff}})-2\pi\langle\tilde{Y},X\rangle\Theta^{\textrm{P}}(x,x_{0},\ell_{x}^{\textrm{eff}})+2\pi
r\,.$ (3.29)

Similarly, the transition function around the $\tilde{X}$ cycle is

$\displaystyle
g_{\tilde{X}}(x,y)=\phi\left(x+\langle\tilde{X},Y\rangle\ell_{x}^{\textrm{eff}}\,,\,y+\ell_{y}^{\textrm{eff}}\right)-\phi(x,y)=2\pi\langle\tilde{X},\tilde{Y}\rangle\Theta^{\textrm{P}}(x,x_{0},\ell_{x}^{\textrm{eff}})\,.$
(3.30)

Using (2.13), one finds that the cocycle condition is satisfied.

In addition to the winding charges $Q^{x}(x),Q^{y}(y)$, the minimal winding
configuration (LABEL:minimalphi) also carries the $\mathbb{Z}_{m}$ charge
(3.16)

$\displaystyle{\cal U}(x,y)$ $\displaystyle=\exp\left[-{2\pi i\over
m}\int_{0}^{x}dxQ^{x}(x)\right]\exp\left[{2\pi ki\over
m}\int_{0}^{y}dyQ^{y}(y)\right]$ (3.31)
$\displaystyle\quad\times\exp\left[{2\pi i\over
m}\left(kr+r_{0}\right)\right]$

where $r_{0}=-{(m-1)m\over 2}\langle\tilde{X},\tilde{Y}\rangle-{(k-1)k\over
2}\langle\tilde{Y},X\rangle$. The first line, which depends on $x,y$, is
expressed in terms of the the winding charges $Q^{x}(x),Q^{y}(y)$.

###  3.3 Comments about the $2+1$-dimensional $\phi$-theory

The $2+1$-dimensional $\phi$-theory (1.11), which had been introduced in [32],
was studied in [10] on an untwisted torus. Its main features are

  * •

The theory has “momentum” and “winding” subsystem symmetries, (LABEL:phicop)
and (LABEL:windingJ), each of which leads (on the lattice) to $L_{x}+L_{y}-1$
conserved $U(1)$ charges.

  * •

In the quantum theory, all the states charged under these symmetries acquire
large energy, of the order of the UV cutoff.

  * •

The theory is self-dual. The duality exchanges the original field $\phi$ with
another field $\phi^{xy}$. It also exchanges the momentum and winding
symmetries.

Let us see how this picture changes on the twisted torus. First, it is clear
that the conserved momentum and winding currents remain conserved. By analogy
to the untwisted case, we now have
$L_{x}^{\textrm{eff}}+L_{y}^{\textrm{eff}}-1$ conserved $U(1)$ charges. It is
also clear that all the states charged under these symmetries acquire large
energy in the quantum theory.

The main novelty in the problem on the twisted torus is associated with the
configurations (LABEL:generalphiz) with $r\neq 0$ mod $m$. These
configurations have two consequences. First, they carry a discrete
$\mathbb{Z}_{m}$ winding charge under (3.16). Since this operator can be
defined in terms of the transition functions, it is a conserved operator in
the $\phi$-theory. See Appendix C for more discussion on the winding operator.

Second, a shift of $\phi$ by (LABEL:generalphiz) is a momentum symmetry.
Clearly, it is not included in the $L_{x}^{\rm eff}+L_{y}^{\rm eff}-1$ $U(1)$
momentum symmetries. Instead, this shift amounts to a $\mathbb{Z}_{m}$
momentum symmetry. This symmetry operator cannot be written simply in terms of
the $\phi$ field – it is a twist operator of $\phi$. Alternatively, it is
represented, as in (3.18), in terms of the dual field $\phi^{xy}$ as

$\displaystyle{\cal V}(x,y)=\exp\left[-{i\over
m}\sum_{I=0}^{m-1}\left(\,\phi^{xy}\left(x+(k+I)\ell_{x}^{\textrm{eff}},y+\ell_{y}^{\textrm{eff}}\right)-\phi^{xy}\left(x+(k+I)\ell_{x}^{\textrm{eff}},y\right)\,\right)\right]\,.$
(3.32)

This operator has all the properties of ${\cal U}(x,y)$ that we mentioned
above. In particular, up to adding momentum charges, it is independent of $x$
and $y$.

The two $\mathbb{Z}_{m}$ global symmetries generated by (3.18) and (3.32)
commute with all the $U(1)$ momentum and winding symmetries. But they do not
commute with each other. They generate a clock and shift algebra

$\displaystyle{\cal U}^{m}={\cal V}^{m}=1\,,$ (3.33) $\displaystyle{\cal
U}{\cal V}=e^{-2\pi i{k\over m}}{\cal V}{\cal U}~{}.$

(Since $\text{gcd}(k,m)=1$, we can redefine the generators of this algebra to
make the phase above $e^{2\pi i/m}$ as in (1.17).) This algebra has an
$m$-dimensional representation. Therefore, the Hilbert space of our problem
includes a factor of this $m$-dimensional representation. In particular, the
system must have $m$ degenerate ground states.

We conclude that unlike the theory on the untwisted torus, here we have two
$\mathbb{Z}_{m}$ symmetries, and these two symmetries do not commute. Clearly,
these two symmetries are exchanged under the self-duality of the system. Also,
unlike the $U(1)$ momentum and winding symmetries, all the states in the
theory transform under these symmetries in their $m$-dimensional
representation. As we mentioned in the introduction, these effects are
reminiscent of the phenomena discovered in [26, 27].

##  4 $2+1$-dimensional $\mathbb{Z}_{N}$ tensor gauge theory

As a warm-up for the $3+1$-dimensional X-cube model, we start by placing the
$2+1$-dimensional $\mathbb{Z}_{N}$ tensor gauge theory in [10] on a two-
dimensional spatial torus with twisted boundary condition (2.1). We will
analyze this model using the two dual presentations in [10].

###  4.1 Special $\mathbb{Z}_{N}$ configurations

In the rest of this paper, we will frequently consider a
$\mathbb{Z}_{N}$-valued $\phi$ field on a twisted torus. More explicitly, such
a $\mathbb{Z}_{N}$ field $\phi$ obeys the same rule as in Section 3.1 plus one
$\mathbb{Z}_{N}$ condition:

$\displaystyle{N\phi\over 2\pi}\in\mathbb{Z}\,.$ (4.1)

Similar to Section 3.2.1, of particular interest is the special case when

$\displaystyle\partial_{x}\partial_{y}\phi=0,$ (4.2)

is obeyed.

The most general expression of such a $\mathbb{Z}_{N}$-valued $\phi$ can be
found through an analysis similar to that of Section 3.2.1. The phase $\eta$
there now obeys not only $\eta^{m}=1$, but also $\eta^{N}=1$. Hence it is a
$\mathbb{Z}_{\text{gcd}(N,m)}$ phase. In conclusion, the most general such
$\phi$ takes the form:

$\displaystyle\phi={2\pi
r\over\text{gcd}(N,m)}\left(\Theta^{\textrm{P}}(x,0,\ell_{x}^{\textrm{eff}})-k\Theta^{\textrm{P}}(y,0,\ell_{y}^{\textrm{eff}})\right)+{2\pi\over
N}\left(W^{x}(x)+W^{y}(y)\right)\,,$ (4.3)

where $r=1,\cdots,\text{gcd}(N,m)$ and $W^{i}(x^{i})\in\mathbb{Z}$. Using the
freedom in (3.4) to redefine $\phi$, we can choose a lift of $W^{i}(x^{i})$
such that $W^{i}(x^{i}+\ell_{i}^{\rm eff})=W^{i}(x^{i})$.

###  4.2 $\phi-A$ theory

The first presentation of the $\mathbb{Z}_{N}$ model is based on the
Lagrangian

$\displaystyle{\cal L}={1\over
2\pi}\widetilde{E}^{xy}(\partial_{x}\partial_{y}\phi-NA_{xy})+{1\over
2\pi}\widetilde{B}(\partial_{0}\phi-NA_{0})\,,$ (4.4)

where $(A_{0},A_{xy})$ are $U(1)$ tensor gauge fields and $\phi$ is a
$2\pi$-periodic real scalar field that Higgses the $U(1)$ gauge symmetry to
$\mathbb{Z}_{N}$. The gauge transformations of these fields are

$\displaystyle\phi\sim\phi+N\alpha\,,$ (4.5) $\displaystyle A_{0}\sim
A_{0}+\partial_{0}\alpha\,,$ $\displaystyle A_{xy}\sim
A_{xy}+\partial_{x}\partial_{y}\alpha\,.$

The fields $\widetilde{E}^{xy}$ and $\widetilde{B}$ are Lagrange multipliers.
Their coefficients are are not important at this stage, but we set them such
that $\widetilde{E}^{xy}$ and $\widetilde{B}$ are standardly normalized field
strengths in the dual picture. The equations of motion are

$\displaystyle\partial_{x}\partial_{y}\phi-NA_{xy}=0\,,$ (4.6)
$\displaystyle\partial_{0}\phi-NA_{0}=0\,,$
$\displaystyle\widetilde{E}^{xy}=\widetilde{B}=0\,.$

Using the equations of motion (LABEL:eomZN1), we can solve all the other
fields in terms of $\phi$. Then, we mod out by gauge transformations
$\phi\sim\phi+N\alpha$. The remaining configurations are linear combinations
of the winding mode (LABEL:minimalphi) with different $x_{0},y_{0}$. The
coefficients in the linear combinations are in the set $\\{0,1,...,N-1\\}$. In
addition, the winding configuration is labeled by an integer $r$, which in the
$\mathbb{Z}_{N}$ theory is defined modulo gcd$(N,m)$.

We will regularize the ground state degeneracy by putting the theory on a
lattice. As discussed in Section 2, the discretization of a continuum geometry
is not unique, and we will see that the ground state degeneracy depends not
only the continuum geometric data $\ell_{i}^{r}$, but also the details of the
lattice regularization.

Let us consider a lattice geometry of the form discussed in Section 2.2. From
this point on, the analysis of the ground state degeneracy proceeds in an
analogous way as in [10], with the replacement $L_{x}\to L_{x}^{\rm
eff},L_{y}\to L_{y}^{\rm eff}$. Recall that
$L_{x}^{\textrm{eff}}=\text{gcd}(L_{x}^{u},L_{x}^{v})\,,~{}L_{y}^{\textrm{eff}}=\text{gcd}(L_{y}^{u},L_{y}^{v})$.
A general winding configuration on this lattice is labeled by a choice of
integers $W^{x}_{\alpha}\in\\{0,1,...,N-1\\}$ for each
$\hat{x}_{\alpha}=1,\cdots,L_{x}^{\rm eff}$ on the lattice and
$W^{y}_{\beta}\in\\{0,1,...,N-1\\}$ for each
$\hat{y}_{\beta}=1,\cdots,L_{y}^{\rm eff}$ on the lattice. We also have the
constraint

$\displaystyle\sum_{\alpha}W^{x}_{\alpha}=\sum_{\beta}W^{y}_{\beta}\,.$ (4.7)

In addition to these integers, the winding configuration is further labeled by
a $\mathbb{Z}_{\text{gcd}(N,M)}$ -valued integer $r$. (Recall that $M$ is the
lattice version of $m$.) Combining these together, the ground state degeneracy
of our model is given by

$\displaystyle
N^{L_{x}^{\textrm{eff}}+L_{y}^{\textrm{eff}}-1}\,\text{gcd}(N,M)\,.$ (4.8)

This formula for the ground state degeneracy has several peculiar features.
Like that of the untwisted model in [10], the logarithm of the ground state
degeneracy grows with the size of the system in a sub-extensive manner. In
contrast with that of the untwisted model, however, this ground state
degeneracy does not vary monotonically under small changes in the parameters
$L_{i}^{r}$. Relatedly, it does not have a well-defined continuum limit. To
see this, let us compare the ground state degeneracy of two sequences of
lattice models with the same continuum limit. In particular, consider the
sequence in (2.35),

$\displaystyle L_{x}^{u}=L_{y}^{v}=L\,,\qquad L_{x}^{v}=L_{y}^{u}=0\,,$ (4.9)

and the sequence in (2.36),

$\displaystyle L_{x}^{u}=L_{y}^{v}=L\,,\qquad L_{x}^{v}=L_{y}^{u}=1\,.$ (4.10)

These sequences both approach the same continuum quantities $\ell^{r}_{i}$.
But the first of these sequences has
$L_{x}^{\textrm{eff}}=L_{y}^{\textrm{eff}}=L$, and $M=1$, and hence a ground
state degeneracy of $N^{2L-1}$, whereas the second sequence has
$L_{x}^{\textrm{eff}}=L_{y}^{\textrm{eff}}=1$, and $M=L^{2}-1$, and hence a
ground state degeneracy of $N\text{gcd}(N,L^{2}-1)$. The ground state
degeneracy of these models is therefore completely different: the first
diverges in the continuum limit $L\rightarrow\infty$, whereas the second is
ill-defined. As we said above, the first sequence is the natural choice for
this continuum theory.

####  4.2.1 Using transition functions

In the previous analysis, as in the discussion of this theory on the untwisted
torus in [10], we assumed that we can always set the transition functions of
the gauge theory on the spatial two-torus to be trivial. Here we will show
that the same conclusion is obtained by allowing arbitrary transition
functions.

We consider nontrivial circle-valued transition functions $\gamma_{\cal C}$
that determine

$\displaystyle A_{xy}(x+{\cal C}^{x},y+{\cal
C}^{y})=A_{xy}(x,y)+\partial_{x}\partial_{y}\gamma_{\cal C}(x,y)\,$ (4.11)
$\displaystyle\Phi(x+{\cal C}^{x},y+{\cal C}^{y})=e^{iJ\gamma_{\cal
C}(x,y)}\Phi(x,y)\,$

where $\Phi$ is a complex field with charge $J$. (We will limit ourselves to
static configurations.) The composition of cycles ${\cal C}={\cal A}+{\cal B}$
leads to the cocycle condition:

$\displaystyle\exp\left[i\gamma_{\cal B}(x,y)+i\gamma_{\cal A}(x+{\cal
B}^{x},y+{\cal B}^{y})\right]=\exp\left[i\gamma_{\cal A}(x,y)+i\gamma_{\cal
B}(x+{\cal A}^{x},y+{\cal A}^{y})\right]\,.$ (4.12)

Next, we identify configurations with different transition functions that are
related by certain transformations. Specifically, for any circle-valued
function $e^{i\beta}$, we identify

$\displaystyle\exp[i\gamma_{\cal C}(x,y)]\sim\exp\left[i\gamma_{\cal
C}(x,y)+i\beta(x+{\cal C}^{x},y+{\cal C}^{y})-i\beta(x,y)\right]\,,$ (4.13)
$\displaystyle A_{xy}(x,y)\sim
A_{xy}(x,y)+\partial_{x}\partial_{y}\beta(x,y)\,$ $\displaystyle\Phi(x,y)\sim
e^{iJ\beta(x,y)}\Phi(x,y)\,.$

If $e^{i\beta}$ is single-valued on our torus, then this is a gauge
transformation, and it does not change the transition functions. Otherwise, it
relates different trivializations of the same configuration.

Consider first the pure gauge $A$-theory. Locally, we can choose $A_{xy}=0$
and then all the information about the gauge fields is in the transition
functions. The analysis of these transition functions is parallel to the
discussion of the transition functions and winding configurations in the
$\phi$-theory in Section 3.1 and Appendix B. There is only one difference: the
integer valued functions $g_{\cal C}$ of the scalar theory are replaced in the
gauge theory with real, circle-valued functions $\gamma_{\cal C}$.

First, we focus on the $X$ and $Y$ cycles. We will return to the $\tilde{X}$
cycle shortly. We find

$\displaystyle e^{i\gamma_{X}}=e^{i(f_{X}^{x}(x)+f_{X}^{y}(y))}\,,$ (4.14)
$\displaystyle e^{i\gamma_{Y}}=e^{i(f_{Y}^{x}(x)+f_{Y}^{y}(y))}\,,$
$\displaystyle
e^{if_{Y}^{x}(x+\ell_{x}^{\textrm{eff}})}=e^{if_{Y}^{x}(x)+i\varphi}\,,$
$\displaystyle
e^{if_{X}^{y}(y+\ell_{y}^{\textrm{eff}})}=e^{if_{X}^{y}(y)+i\varphi}\,.$

As in in Section 3.1 and Appendix B, $\partial_{y}f_{X}^{y}(y)$,
$\partial_{x}f_{Y}^{x}(x)$, and $\varphi$ are physical and gauge invariant.
(We will soon relate them to the holonomy around the $X$ and $Y$ cycles.) In
order to check whether there is additional invariant information, we follow
the approach in Appendix B and set these quantities to zero and look for more
data. In particular, we look for additional information in

$\displaystyle e^{i\gamma_{X}}=e^{if_{X}^{x}(x)}\,,$ (4.15) $\displaystyle
e^{i\gamma_{Y}}=e^{if_{Y}^{y}(y)}\,,$ $\displaystyle
e^{i\gamma_{\tilde{X}}}=e^{i(f_{\tilde{X}}^{x}(x)+f_{\tilde{X}}^{y}(y))}\,.$

Imposing the cocycle conditions and using the freedom to change the
trivialization, we find that all the functions here can be set to zero.

Unlike the analysis of the $\phi$-theory, there is no additional
$\mathbb{Z}_{m}$ charge. Specifically, in following the steps in Appendix B
with circle-valued functions, rather than integer-valued functions, the
identification (LABEL:scriptN) becomes

$\displaystyle e^{if^{x}_{\tilde{X}}(x)}\sim
e^{i(f^{x}_{\tilde{X}}(x)+C_{\tilde{X}})}\,,$ (4.16) $\displaystyle
e^{if^{y}_{\tilde{X}}(y)}\sim e^{i(f^{y}_{\tilde{X}}(y)-C_{\tilde{X}})}\,,$
$\displaystyle e^{i{\cal Z}}\sim e^{i({\cal Z}-mC_{\tilde{X}})}\,,$

where $C_{\tilde{X}}$ and ${\cal Z}$ were denoted in Appendix B by
$N_{\tilde{X}}$ and $\cal N$, respectively. Since now they are circle-valued,
we can set $e^{i{\cal Z}}=1$ and there is no additional $\mathbb{Z}_{m}$
charge.

We end up with the same data we have with trivial transition functions, but
with nonzero

$\displaystyle A_{xy}={1\over\ell_{y}}f^{x}(x)+{1\over\ell_{x}}f^{y}(y)\,,$
(4.17)

with $\partial_{x}f_{Y}^{x}(x)=f^{x}(x)+{1\over\ell_{x}}\oint_{Y}dyf^{y}(y)$,
$\partial_{y}f_{X}^{y}(y)=f^{y}(y)+{1\over\ell_{y}}\oint_{X}dxf^{x}(x)$. As a
check, they both have the same holonomies

$\displaystyle
W_{X}=\exp\left(i\int_{y_{1}}^{y_{2}}dy\oint_{X}dx\left({1\over\ell_{y}}f^{x}(x)+{1\over\ell_{x}}f^{y}(y)\right)\right)=e^{i(\gamma_{X}(x,y_{2})-\gamma_{X}(x,y_{1}))}\,,$
(4.18) $\displaystyle
W_{Y}=\exp\left(i\int_{x_{1}}^{x_{2}}dx\oint_{Y}dy\left({1\over\ell_{x}}f^{y}(y)+{1\over\ell_{y}}f^{x}(x)\right)\right)=e^{i(\gamma_{Y}(x_{2},y)-\gamma_{Y}(x_{1},y))}\,.$

Let us repeat this analysis in the $\mathbb{Z}_{N}$ theory using this
perspective of the Higgs theory (4.4). The matter field $\phi$ transforms such
that $\Phi=e^{i\phi}$ in (LABEL:AphitrP) and (LABEL:beta) has charge $J=N$. We
choose the unitary gauge $\phi=0$ and set $A_{xy}=0$. In order for the gauge
choice $\phi=0$ to be meaningful, the transition functions (LABEL:Atheoryt)
should be $N$’th roots of unity. In contrast to the $U(1)$ gauge theory of
$A$, we can no longer use the identification (LABEL:scriptZ) to set $e^{i{\cal
Z}}=1$. In more detail, now $e^{i{\cal Z}}$ and $e^{iC_{\tilde{X}}}$ in
(LABEL:scriptZ) are $N$’th roots of unity. Therefore, (LABEL:scriptZ)
identifies $e^{i{\cal Z}}\sim e^{i({\cal Z}-{2\pi m\over N})}$ and we end up
with $\gcd(N,m)$ distinct values. Placing this result on the lattice, we
reproduce (4.8).

Let us phrase it more explicitly. The $\mathbb{Z}_{N}$ theory has
$\text{gcd}(N,m)$ configurations:

$\displaystyle e^{i\phi}=1\,,~{}~{}~{}~{}A_{0}=A_{xy}=0\,,$ (4.19)
$\displaystyle e^{i\gamma_{X}}=e^{2\pi ir{m\over
N\text{gcd}(N,m)}}\,,~{}~{}~{}~{}e^{i\gamma_{\tilde{X}}}=1\,,$

with $r=0,1,\cdots,\text{gcd}(N,m)-1$. Such configurations are present in the
$U(1)$ $A$-theory, but they do not contribute to the holonomies
(LABEL:Aholonomies). In fact, they are identified with the trivial
configuration with $e^{i\gamma_{X}}=1$ by a change of the trivialization
(LABEL:beta), with e.g.,

$\displaystyle e^{i\beta}=\exp\left[-{2\pi ir\over
N\text{gcd}(N,m)}\left({x\over\ell_{x}^{\textrm{eff}}}-k{y\over\ell_{y}^{\textrm{eff}}}\right)\right]$
(4.20)

or

$\displaystyle e^{i\beta}=\exp\left[-{2\pi ir\over
N\text{gcd}(N,m)}\left(\Theta^{\textrm{P}}(x,0,\ell_{x}^{\textrm{eff}})-k\Theta^{\textrm{P}}(y,0,\ell_{y}^{\textrm{eff}})\right)\right]$
(4.21)

Therefore, the $U(1)$ theory does not have another label associated with these
configurations. This is to be contrasted with the situation in the
$\mathbb{Z}_{N}$ theory. Here, as we explained above,we cannot perform
identifications like (4.20) or (4.21) because they are not
$\mathbb{Z}_{N}$-valued. (Equivalently, they do not preserve the choice
$\phi=0$ in the Higgs theory (4.4).) Consequently, the configurations
(LABEL:AZNe) are nontrivial in the $\mathbb{Z}_{N}$ theory and lead to the
factor $\text{gcd}(N,M)$ in (4.8).

Let us offer a broader view on the analyses of the transition functions in the
various theories. The transition functions for the $\phi$-theory in Section
3.1, and those for the $U(1)$ and $\mathbb{Z}_{N}$ tensor gauge theories in
this section, are subject to similar cocycle conditions and identifications,
but with coefficients valued in different groups, $\mathbb{Z}$, $U(1)$, and
$\mathbb{Z}_{N}$ respectively. In these three cases, there is an additional
$\mathbb{Z}_{m}$ label for the $\phi$-theory, no such label for the $U(1)$
$A$-theory, and an additional $\mathbb{Z}_{\text{gcd}(N,m)}$ label for the
$\mathbb{Z}_{N}$-theory. These additional labels can be thought of as torsion
parts of an appropriate cohomology with $\mathbb{Z}$, $U(1)$, and
$\mathbb{Z}_{N}$ coefficients.

###  4.3 $BF$-type $\mathbb{Z}_{N}$ tensor gauge theory

Next, we compute the ground state degeneracy using a dual presentation of the
same $\mathbb{Z}_{N}$ model [10]:444Since $\phi^{xy}$ is circle-valued, the
Lagrangian has to be defined more carefully. Specifically, we can choose a
trivialization, use this expression in each patch, and add correction terms
similar to those in Appendix C, in the overlap regions. We will not do it
here.

$\displaystyle{\cal L}={1\over
2\pi}N\phi^{xy}(\partial_{0}A_{xy}-\partial_{x}\partial_{y}A_{0})={1\over
2\pi}N\phi^{xy}E_{xy}\,.$ (4.22)

The phase space is given in the temporal gauge $A_{0}=0$ by

$\displaystyle\left\\{\phi^{xy}(x,y),A_{xy}(x,y)~{}\Big{|}~{}\partial_{x}\partial_{y}\phi^{xy}=0\,,~{}~{}A_{xy}(x,y)\sim
A_{xy}(x,y)+\partial_{x}\partial_{y}\alpha(x,y)\right\\}\,.$ (4.23)

This is solved modulo gauge transformations by555Here we take the transition
functions for $A_{xy}$ to be trivial. Alternatively, as above, we can set
$A_{xy}=0$ and have the nontrivial information in the transition functions.

$\displaystyle A_{xy}={1\over\ell_{y}}f^{x}(x)+{1\over\ell_{x}}f^{y}(y)\,,$
(4.24) $\displaystyle\phi^{xy}={2\pi r\over
m}\left(\Theta^{\textrm{P}}(x,0,\ell_{x}^{\textrm{eff}})-k\Theta^{\textrm{P}}(y,0,\ell_{y}^{\textrm{eff}})\right)+\hat{f}_{x}(x)+\hat{f}_{y}(y)\,,$

where $r=1,\cdots,m$. Here the functions $f^{i}(x^{i})$ and
$\hat{f}_{i}(x^{i})$ have periodicity $\ell_{i}^{\rm eff}$. Compare $A_{xy}$
with (4.17) and see Section 3.2.1 for the origin of the first term in
$\phi^{xy}$.

The quantization of $f^{x}$, $f^{y}$ and their conjugate variables
$\hat{f}_{x}$, $\hat{f}_{y}$ proceeds in an analogous way as in [10], with the
replacement
$\ell_{x}\to\ell_{x}^{\textrm{eff}},\ell_{y}\to\ell_{y}^{\textrm{eff}}$. On a
lattice, it leads to $N^{L_{x}^{\rm eff}+L_{y}^{\rm eff}-1}$ states.

The global considerations constrain the allowed values of $r$. One way to see
that, is to note we have the operator statement $e^{iN\phi^{xy}}=1$.
Therefore, $r$ should be a multiple of $m/\text{gcd}(N,m)$. This leads to
$\text{gcd}(N,m)$ values.

Combining the above two contributions, we reproduce the ground state
degeneracy (4.8).

###  4.4 Global symmetry operators

Here we compute the ground state degeneracy using the global symmetry
operators. This calculation mirrors the lattice calculation of the ground
state degeneracy using the logical operators.

The gauge-invariant local operator $e^{i\phi^{xy}}$ generates a
$\mathbb{Z}_{N}$ electric global symmetry. In particular, $e^{iN\phi^{xy}}=1$.
The equation of motion states that

$\displaystyle\partial_{x}\partial_{y}\phi^{xy}=0\,.$ (4.25)

The discussion in Section 4.1 then implies that the $\mathbb{Z}_{N}$ electric
symmetry can be generated by

$\displaystyle e^{i\phi^{xy}(x,y_{0})},~{}~{}x_{0}\leq
x<x_{0}+\ell_{x}^{\textrm{eff}}$ (4.26) $\displaystyle
e^{i\phi^{xy}(x_{0},y)},~{}~{}y_{0}\leq y<y_{0}+\ell_{y}^{\textrm{eff}}\,,$

for any choice of $(x_{0},y_{0})$. There is also a
$\mathbb{Z}_{\text{gcd}(N,m)}$ operator

$\displaystyle{\bf
V}=\exp\left[-i\phi^{xy}(x,y+\ell_{y}^{\textrm{eff}})+i\phi^{xy}(x,y)\right]\,.$
(4.27)

The discussion in Section 4.1 implies that $\bf V$ is independent of $x,y$,
despite its appearance. On a lattice, this leads to $L_{x}^{\rm
eff}+L_{y}^{\rm eff}-1$ $\mathbb{Z}_{N}$ charges and one
$\mathbb{Z}_{\text{gcd}(N,M)}$ charge.

On the other hand, the strip operators

$\displaystyle\textbf{W}_{(x)}(x_{1},x_{2})=\exp\left[i\int_{x_{1}}^{x_{2}}dx\oint
dyA_{xy}\right]\,,$ (4.28)
$\displaystyle\textbf{W}_{(y)}(y_{1},y_{2})=\exp\left[i\oint
dx\int_{y_{1}}^{y_{2}}dyA_{xy}\right]\,$

generate a $\mathbb{Z}_{N}$ dipole global symmetry. They obey the constraint
$\textbf{W}_{(x)}(0,\ell_{x}^{\textrm{eff}})=\textbf{W}_{(y)}(0,\ell_{y}^{\textrm{eff}})$.
On a lattice we therefore have $L_{x}^{\rm eff}+L_{y}^{\rm eff}-1$ such
operators.

There is one more gauge-invariant operator, which is most conveniently
expressed in the $\phi-A$ description:

$\displaystyle{\bf U}=$
$\displaystyle\exp\Big{[}\,{i}{N\over\text{gcd}(N,m)}\int_{0}^{\ell_{y}^{\textrm{eff}}}dy\int_{ky\ell_{x}^{\textrm{eff}}/\ell_{y}^{\textrm{eff}}}^{ky\ell_{x}^{\textrm{eff}}/\ell_{y}^{\textrm{eff}}+m\ell_{x}^{\textrm{eff}}}dx\,\left(\Theta^{\textrm{P}}(x,0,\ell_{x}^{\textrm{eff}})-k\Theta^{\textrm{P}}(y,0,\ell_{y}^{\textrm{eff}})\right)A_{xy}(x,y)$
(4.29)
$\displaystyle-{i}{m\over\text{gcd}(N,m)}\int_{0}^{\ell_{y}^{\textrm{eff}}}ds\,\partial_{y}\phi(ks\ell_{x}^{\textrm{eff}}/\ell_{y}^{\textrm{eff}},s)\,\Big{]}$

We will motivate this $\mathbb{Z}_{\text{gcd}(N,m)}$ operator in Appendix D
and discuss its relation to the Wilson strips $\textbf{W}_{(i)}$. One can
check that this is indeed a gauge-invariant operator. Note that the integrand
in the first line vanishes in the rectangle
$(k-1)\ell_{x}^{\textrm{eff}}<x<k\ell_{x}^{\textrm{eff}},0<y<\ell_{y}^{\textrm{eff}}$.

To summarize, just like on an untwisted torus, the $\mathbb{Z}_{N}$ theory has
a $\mathbb{Z}_{N}$ electric and a $\mathbb{Z}_{N}$ dipole global symmetry.
Similar to the analysis in [10], there are $L_{x}^{\rm eff}+L_{y}^{\rm eff}-1$
$\mathbb{Z}_{N}$ operators for each of these symmetries on a lattice. The
novelty on a twisted torus is that there are two additional
$\mathbb{Z}_{\text{gcd}(N,m)}$ symmetries generated by $\bf V$ and $\bf U$.

The $\mathbb{Z}_{\text{gcd}(N,m)}$ symmetry generated by $\bf U$ in the
$\mathbb{Z}_{N}$ theory comes from the $\mathbb{Z}_{m}$ symmetry generated by
${\cal U}(0,0)$ (see (3.16)) in the $\phi$ theory before Higgsing. More
specifically, when the equation of motion $A_{xy}={1\over
N}\partial_{x}\partial_{y}\phi$ is imposed, the operator $\bf U$ is equal to
${\cal U}(0,0)^{m/\text{gcd}(N,m)}$ on-shell.

Similarly, the $\mathbb{Z}_{\text{gcd}(N,m)}$ symmetry generated by $\bf V$ in
the $\mathbb{Z}_{N}$ theory comes from the $\mathbb{Z}_{m}$ symmetry generated
by $\cal V$ (3.32) in the $\phi$ theory before Higgsing. Using the equation of
motion $\partial_{x}\partial_{y}\phi^{xy}=0$, we see that ${\bf V}$ is equal
to ${\cal V}$ on-shell.

Let us discuss the commutation relations between these operators.

In the unitary gauge, where $\phi=0$, (4.29) is manifestly an operator in the
$\mathbb{Z}_{N}$ gauge theory. It is then clear that $\bf U$ and $\bf V$ form
a $\mathbb{Z}_{\text{gcd}(N,m)}$ clock and shift algebra. This leads to
$\text{gcd}(N,m)$ states in the $\mathbb{Z}_{N}$ theory.

The rest of the operators satisfy

$\displaystyle e^{iN\phi^{xy}}=\textbf{W}_{(x)}^{N}=\textbf{W}_{(y)}^{N}=1\,,$
(4.30) $\displaystyle e^{i\phi^{xy}(x,y)}\textbf{W}_{(x)}(x_{1},x_{2})=e^{2\pi
i/N}\textbf{W}_{(x)}(x_{1},x_{2})e^{i\phi^{xy}(x,y)}\,,~{}~{}~{}~{}~{}\text{if
}x_{1}<x+I\ell_{x}^{\textrm{eff}}<x_{2}\text{ for some $I\in\mathbb{Z}$},$
$\displaystyle e^{i\phi^{xy}(x,y)}\textbf{W}_{(y)}(y_{1},y_{2})=e^{2\pi
i/N}\textbf{W}_{(y)}(y_{1},y_{2})e^{i\phi^{xy}(x,y)}\,,~{}~{}~{}~{}~{}\text{if
}y_{1}<y+I\ell_{y}^{\textrm{eff}}<y_{2}\text{ for some $I\in\mathbb{Z}$},$

and they commute otherwise. (Here, we took for simplicity
$x_{2}-x_{1}\leq\ell_{x}^{\textrm{eff}}$ and
$y_{2}-y_{1}\leq\ell_{y}^{\textrm{eff}}$.)

We can pick the following basis for them:

$\displaystyle\textbf{W}_{(x)}(x,x+a)\,,~{}~{}~{}~{}~{}~{}~{}~{}\exp\left[i\phi^{xy}(x,0)\right]\,,~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}(k-1)\ell_{x}^{\textrm{eff}}\leq
x<k\ell_{x}^{\textrm{eff}}\,,$ (4.31)
$\displaystyle\textbf{W}_{(y)}(y,y+a)\,,~{}~{}~{}~{}~{}~{}~{}~{}\exp\left[i\phi^{xy}\left((k-1)\ell_{x}^{\textrm{eff}},y\right)-i\phi^{xy}\left((k-1)\ell_{x}^{\textrm{eff}},0\right)\right]\,,~{}~{}~{}~{}~{}~{}~{}0<y<\ell_{y}^{\textrm{eff}}\,.$

Here $a$ is an infinitesimal UV regulator, e.g., the lattice spacing. The
range of $x,y$ for these operators is chosen such that they commute with $\bf
U,V$. The pair of operators in each line at the same $x$ or $y$ form a
$\mathbb{Z}_{N}$ clock and shift algebra, and they commute otherwise. On a
lattice, these give $L_{x}^{\rm eff}+L_{y}^{\rm eff}-1$ copies of the
$\mathbb{Z}_{N}$ clock and shift algebra. This algebra leads to
$N^{L_{x}^{\textrm{eff}}+L_{y}^{\textrm{eff}}-1}$ states in the
$\mathbb{Z}_{N}$ theory.

Combining these two contributions, we reproduce the ground state degeneracy
(4.8).

##  5 Winding in $3+1$ dimensions

In this section, we place a classical circle-valued field $\phi$ on a three-
dimensional twisted torus. We perform a twist in the $xy$-plane of the form
discussed in Section 2, but we do not twist in the $xz$-plane or $yz$-plane.
The twist changes the allowed winding configurations relative to those in [11]
on an untwisted torus.

This discussion is relevant both for the $3+1$-dimensional $\phi$-theory of
[11] on the twisted torus and for the discussion of the $\mathbb{Z}_{N}$
tensor gauge theory in Section 6.

The winding charges of a circle-valued $\phi$ field in $3+1$ dimensions are
associated with cycles on the $xy$-, $yz$-, and $zx$-planes. For the
$yz$-plane, we will choose the $Y$ cycle and the $Z$ cycle to parameterize
these charges, and similarly for the $zx$-plane. For the $xy$-plane, however,
the $X$ and the $Y$ cycles do not generate all the cycles. Instead, we will
choose the basis $\\{X,\tilde{X}\\}$. The most general possible winding
charges are given by (recall the definition (3.2))

$\displaystyle{1\over 2\pi}\oint
dx\partial_{x}\partial_{y}\phi=\sum_{\beta}W^{y}_{X\,\beta}\,\delta^{\textrm{P}}(y,y_{\beta},\ell_{y}^{\textrm{eff}})\,,$
(5.1) $\displaystyle{1\over 2\pi}\oint
dy\partial_{x}\partial_{y}\phi=\sum_{\alpha}W^{x}_{Y\,\alpha}\,\delta^{\textrm{P}}(x,x_{\alpha},\ell_{x}^{\textrm{eff}})\,,$
$\displaystyle{1\over 2\pi}\oint
dz\partial_{y}\partial_{z}\phi=\sum_{\beta}W^{y}_{Z\,\beta}\,\delta^{\textrm{P}}(y,y_{\beta},\ell_{y}^{\textrm{eff}})\,,$
$\displaystyle{1\over 2\pi}\oint
dz\partial_{x}\partial_{z}\phi=\sum_{\alpha}W^{x}_{Z\,\alpha}\,\delta^{\textrm{P}}(x,x_{\alpha},\ell_{x}^{\textrm{eff}})\,,$
$\displaystyle{1\over 2\pi}\oint
dx\partial_{z}\partial_{x}\phi=\sum_{\gamma}W^{z}_{X\,\gamma}\,\delta^{\textrm{P}}(z,z_{\gamma},\ell_{z})\,,$
$\displaystyle{1\over
2\pi}\oint_{\tilde{X}}(dx\partial_{z}\partial_{x}\phi+dy\partial_{z}\partial_{y}\phi)=\sum_{\gamma}W^{z}_{\tilde{X}\,\gamma}\delta^{\textrm{P}}(z,z_{\gamma},\ell_{z})\,,$

and the $\mathbb{Z}_{m}$ charge discussed in Section 3.1. Here
$\\{x_{\alpha}\\},\\{y_{\beta}\\},\\{z_{\gamma}\\}$ are a finite set of points
on the intervals
$[0,\ell_{x}^{\textrm{eff}}),\,[0,\ell_{y}^{\textrm{eff}}),\,[0,\ell_{z})$ of
the three axes, respectively. The $W^{i}_{I\,\alpha}$’s are integers
associated with the points $\\{x^{i}_{\alpha}\\}$ and $I$ labels the cycle.
These charges obey the constraints

$\displaystyle\sum_{\beta}W^{y}_{X\,\beta}=\sum_{\alpha}W^{x}_{Y\,\alpha}\,,$
(5.2)
$\displaystyle\sum_{\gamma}W^{z}_{X\,\gamma}=m\sum_{\alpha}W^{x}_{Z\,\alpha}\,,$
$\displaystyle\sum_{\gamma}W^{z}_{\tilde{X}\,\gamma}=\sum_{\beta}W^{y}_{Z\,\beta}+k\sum_{\alpha}W^{x}_{Z\,\alpha}\,.$

The winding configurations associated with nontrivial
$W^{x}_{Y\,\alpha},W^{y}_{X\,\beta}$ and the $\mathbb{Z}_{m}$ phase have
already been discussed in Section 3.2. The rest of the winding configurations
are (recall the definition (3.3))

$\displaystyle\phi=2\pi$
$\displaystyle\left[\left({x\over\ell_{x}}-k{y\over\ell_{y}}\right)\sum_{\gamma}W^{z}_{X\,\gamma}\Theta^{\textrm{P}}(z,z_{\gamma},\ell_{z})+{z\over\ell_{z}}\sum_{\alpha}W^{x}_{Z\,\alpha}\Theta^{\textrm{P}}(x,x_{\alpha},\ell_{x}^{\textrm{eff}})\right.$
(5.3)
$\displaystyle-{z\over\ell_{z}}\left({x\over\ell_{x}}-k{y\over\ell_{y}}\right)\sum_{\gamma}W^{z}_{X\,\gamma}$
$\displaystyle+\left.{y\over\ell_{y}^{\textrm{eff}}}\sum_{\gamma}W^{z}_{\tilde{X}\,\gamma}\Theta^{\textrm{P}}(z,z_{\gamma},\ell_{z})+{z\over\ell_{z}}\sum_{\beta}W^{y}_{Z\,\beta}\Theta^{\textrm{P}}(y,y_{\beta},\ell_{y}^{\textrm{eff}})-{z\over\ell_{z}}{y\over\ell_{y}^{\textrm{eff}}}\sum_{\gamma}W^{z}_{\tilde{X}\,\gamma}\right]$

Here
$W^{y}_{Z\,\beta},W^{x}_{Z\,\beta},W^{z}_{X\,\gamma},W^{z}_{\tilde{X}\,\gamma}\in\mathbb{Z}$
are the integer winding charges obeying (LABEL:Wconstraint2).

In order to verify that the function $\phi$ of (5.3) is an allowed
configuration, we need to check its periodicity on the torus. It suffices to
check that $\phi$ is a $2\pi$-periodic function along the $Z$, $X$, and
$\tilde{X}$ cycles. The transition function around the $Z$ cycle is

$\displaystyle
g_{Z}(x,y,z)=\phi(x,y,z+\ell_{z})-\phi(x,y,z)=2\pi\left[\sum_{\alpha}W^{x}_{Z\,\alpha}\Theta^{\textrm{P}}(x,x_{\alpha},\ell_{x}^{\textrm{eff}})+\sum_{\beta}W^{y}_{Z\,\beta}\Theta^{\textrm{P}}(y,y_{\beta},\ell_{y}^{\textrm{eff}})\right]$
(5.4)

The transition function around the $X$ cycle is

$\displaystyle
g_{X}(x,y,z)=\phi(x+m\ell_{x}^{\textrm{eff}},y,z)-\phi(x,y,z)=2\pi\sum_{\gamma}W^{z}_{X\,\gamma}\Theta^{\textrm{P}}(z,z_{\gamma},\ell_{z})\,.$
(5.5)

The transition function around the $\tilde{X}$ cycle is

$\displaystyle
g_{\tilde{X}}(x,y,z)=\phi(x+k\ell_{x}^{\textrm{eff}},y+\ell_{y}^{\textrm{eff}},z)-\phi(x,y,z)=2\pi\sum_{\gamma}W^{z}_{\tilde{X}\,\gamma}\Theta^{\textrm{P}}(z,z_{\gamma},\ell_{z})\,.$
(5.6)

Indeed, all these transition functions are $2\pi\mathbb{Z}$ valued. Using
(LABEL:Wconstraint2), one finds that the cocycle conditions are satisfied.

Combining with the winding configurations in Section 3.2, we have
$2(L_{x}^{\textrm{eff}}+L_{y}^{\textrm{eff}}+L_{z})-3$ integer winding charges
and one $\mathbb{Z}_{m}$ phase in $3+1$ dimensions on a lattice.

##  6 $3+1$-dimensional $\mathbb{Z}_{N}$ tensor gauge theory

Let us now consider the $\mathbb{Z}_{N}$ tensor gauge theory of [12], the
continuum limit of the X-cube model [5], on the twisted torus. We twist in the
$xy$-plane, as in Section 2, but we do not twist in the $xz$-plane or
$yz$-plane.

###  6.1 $\phi-A$ theory

We start with the Higgs Lagrangian using $\phi$ and $A$ [12]:

$\displaystyle{\cal L}=-{1\over 2(2\pi)}\sum_{i\neq
j}\hat{E}^{ij}(\partial_{i}\partial_{j}\phi-NA_{ij})-{1\over
2\pi}\hat{B}(\partial_{0}\phi-NA_{0})\,.$ (6.1)

The fields $\hat{E}^{ij}$ in the $\mathbf{3}^{\prime}$ and $\hat{B}$ in the
$\mathbf{1}$ serve as Lagrange multipliers. Their coefficients are set such
that $\hat{E}^{ij}$ and $\hat{B}$ are standardly normalized field strengths of
a dual theory. The $U(1)$ gauge transformation acts on the fields via

$\displaystyle A_{0}\sim A_{0}+\partial_{0}\alpha\,,~{}~{}~{}~{}A_{ij}\sim
A_{ij}+\partial_{i}\partial_{j}\alpha\,,~{}~{}~{}~{}\phi\sim\phi+N\alpha\,,$
(6.2)

with $2\pi$-periodic $\phi$ and $\alpha$, as in Section 5.

The equations of motion are given by

$\displaystyle\partial_{i}\partial_{j}\phi-NA_{ij}=0\,,$ (6.3)
$\displaystyle\partial_{0}\phi-NA_{0}=0\,,$
$\displaystyle\hat{E}^{ij}=\hat{B}=0\,,$

and they imply the vanishing of the gauge-invariant field strengths of $A$:

$\displaystyle E_{ij}=\partial_{0}A_{ij}-\partial_{i}\partial_{j}A_{0}\,,$
(6.4) $\displaystyle B_{[ij]k}=\partial_{i}A_{jk}-\partial_{j}A_{ik}\,.$

We will sometimes also use $B_{i(jk)}\equiv B_{[ij]k}+B_{[ik]j}$.

Using the equations of motion (LABEL:eom1), we can solve all the other fields
in terms of $\phi$, and the solution space reduces to

$\displaystyle\Big{\\{}\phi\Big{\\}}~{}/~{}\phi\sim\phi+N\alpha\,.$ (6.5)

Then, all the $\phi$ configurations can be gauged to a linear combination of
the winding modes (LABEL:minimalphi), (5.3). In these linear combinations the
coefficients are integers valued in $\\{0,...,N-1\\}$.

For the purpose of finding the ground state degeneracy, we place the system on
a lattice. From this point on, the analysis of these winding modes is similar
to [12] if we replace $L_{x},L_{y}$ by
$L_{x}^{\textrm{eff}},L_{y}^{\textrm{eff}}$. These winding modes are labeled
by $2L_{x}^{\textrm{eff}}+2L_{y}^{\textrm{eff}}+2L_{z}-3$ integers valued in
$\\{0,...,N-1\\}$, plus one $\mathbb{Z}_{\text{gcd}(N,M)}$ phase as in Section
4.2. Therefore, the ground state degeneracy is

$\displaystyle
N^{2L_{x}^{\textrm{eff}}+2L_{y}^{\textrm{eff}}+2L_{z}-3}\text{gcd}(N,M)\,.$
(6.6)

Alternatively, we can compute the ground state degeneracy by choosing a
trivialization where the gauge fields are trivial and all the nontrivial
information is in the transition functions. This proceeds along the same lines
as in Section 4.2, and we again arrive at the same result (6.6).

###  6.2 Comments on the $U(1)$ $\hat{A}$ theory

In the previous subsection we computed the ground state degeneracy of the
$\mathbb{Z}_{N}$ X-cube model using one of the continuum Lagrangians in [12].
Below we will reproduce the same result using the other dual Lagrangians of
the X-cube model in that reference. These presentations involve an exotic
gauge field $\hat{A}$. Before we discuss these other presentations, we first
comment on some new features of the $U(1)$ gauge theory of $\hat{A}$ on a
twisted torus. We refer the readers to [11] for detailed discussion of this
gauge theory on an untwisted torus.

The temporal components $\hat{A}_{0}^{i(jk)}$ and spatial components
$\hat{A}^{ij}$ are in the $\mathbf{2}$ and $\mathbf{3}^{\prime}$ of the
spatial $S_{4}$ rotation symmetry. They are subject to the gauge
transformations

$\displaystyle\hat{A}_{0}^{i(jk)}\sim\hat{A}_{0}^{i(jk)}+\partial_{0}\hat{\alpha}^{i(jk)}\,,$
(6.7)
$\displaystyle\hat{A}^{ij}\sim\hat{A}^{ij}+\partial_{k}\hat{\alpha}^{k(ij)}\,,$

where $\hat{\alpha}^{k(ij)}$ is $2\pi$-periodic and transforms in the
$\mathbf{2}$ of $S_{4}$. The electric and magnetic fields for $\hat{A}$ are

$\displaystyle\hat{E}^{ij}=\partial_{0}\hat{A}^{ij}-\partial_{k}\hat{A}^{k(ij)}_{0}\,,$
(6.8) $\displaystyle\hat{B}=\frac{1}{2}\sum_{i\neq
j}\partial_{i}\partial_{j}\hat{A}^{ij}\,.$

Similar to Section 3.1, we start with gauge fields on the covering space
$\mathbb{R}^{3}$. (We limit ourselves to static configurations.) The
identification across a cycle $\cal C$ should involve the circled-valued
transition function of the form (LABEL:hatAgauge):

$\displaystyle\hat{A}^{ij}(x+{\cal C}^{x},y+{\cal C}^{y},z+{\cal
C}^{z})=\hat{A}^{ij}(x,y,z)+\partial_{k}\hat{\gamma}^{k(ij)}_{\cal C}(x,y,z)$
(6.9)

where $({\cal C}^{x},{\cal C}^{y},{\cal C}^{z})$ is a vector on a covering
space corresponding to the cycle $\cal C$. Since they transform in the
$\mathbf{2}$ of the $S_{4}$ spatial rotation symmetry, the transition
functions are constrained by $e^{i(\hat{\gamma}_{\cal
C}^{x(yz)}+\hat{\gamma}_{\cal C}^{y(zx)}+\hat{\gamma}_{\cal C}^{z(xy)})}=1$.

Complex matter fields $\hat{\Phi}^{i(jk)}$ with charge $J$ satisfy
$\hat{\Phi}^{x(yz)}\hat{\Phi}^{y(zx)}\hat{\Phi}^{z(xy)}=1$. They transform
under (LABEL:hatAgauge) as

$\displaystyle\hat{\Phi}^{i(jk)}\sim
e^{iJ\hat{\alpha}^{i(jk)}}\hat{\Phi}^{i(jk)}$ (6.10)

and under (LABEL:hatAtran) as

$\displaystyle\hat{\Phi}^{i(jk)}(x+{\cal C}^{x},y+{\cal C}^{y},z+{\cal
C}^{z})=e^{iJ\hat{\gamma}_{\cal
C}^{i(jk)}(x,y,z)}\hat{\Phi}^{i(jk)}(x,y,z)~{}.$ (6.11)

The composition of cycles ${\cal C}={\cal A}+{\cal B}$ leads to the cocycle
condition:

$\displaystyle\exp\left[i\hat{\gamma}_{\cal
B}^{i(jk)}(x,y,z)+i\hat{\gamma}_{\cal A}^{i(jk)}(x+{\cal B}^{x},y+{\cal
B}^{y},z+{\cal B}^{z})\right]$ (6.12)
$\displaystyle=\exp\left[i\hat{\gamma}_{\cal
A}^{i(jk)}(x,y,z)+i\hat{\gamma}_{\cal B}^{i(jk)}(x+{\cal A}^{x},y+{\cal
A}^{y},z+{\cal A}^{z})\right]\,.$

Next, we identify configurations with different transition functions that are
related by certain transformations. Specifically, for any three circle-valued
functions $e^{i\hat{\beta}^{i(jk)}}$ satisfying
$e^{i(\hat{\beta}^{x(yz)}+\hat{\beta}^{y(zx)}+\hat{\beta}^{z(xy)})}=1$, we
identify

$\displaystyle\exp[i\hat{\gamma}_{\cal
C}^{i(jk)}(x,y,z)]\sim\exp\left[i\hat{\gamma}^{i(jk)}_{\cal
C}(x,y,z)+i\hat{\beta}^{i(jk)}(x+{\cal C}^{x},y+{\cal C}^{y},z+{\cal
C}^{z})-i\hat{\beta}^{i(jk)}(x,y,z)\right]\,,$ (6.13)
$\displaystyle\hat{A}^{ij}(x,y,z)\sim\hat{A}^{ij}(x,y,z)+\partial_{k}\hat{\beta}^{k(ij)}(x,y,z)$
$\displaystyle\hat{\Phi}^{i(jk)}(x,y,z)\sim
e^{iJ\hat{\beta}^{i(jk)}(x,y,z)}\hat{\Phi}^{i(jk)}(x,y,z)\,.$

If $e^{i\hat{\beta}^{i(jk)}}$ is single-valued, then this is a gauge
transformation and it does not change the transition functions. Otherwise, it
relates different trivializations of the same configuration.

The configurations on our three-torus are characterized by the circled-valued
transition functions $e^{i\hat{\gamma}_{\cal C}^{i(jk)}(x,y,z)}$ subject to
the cocycle conditions (LABEL:hatcocycle) modulo the identifications
(LABEL:hatbeta).

Restrict to flat gauge fields

We will be particularly interested in configurations with $\hat{B}=0$. For
such configurations, we can further set locally $\hat{A}^{ij}=0$ by gauge
transformations, and all the information is then contained in the transition
functions.

Since $\hat{A}^{ij}=0$, the transition functions must obey

$\displaystyle\partial_{k}\hat{\gamma}_{\cal C}^{k(ij)}=0$ (6.14)

for every $\cal C$. Using $e^{i(\hat{\gamma}_{\cal
C}^{x(yz)}+\hat{\gamma}_{\cal C}^{y(zx)}+\hat{\gamma}_{\cal C}^{z(xy)})}=1$,
we find that the transition functions factorize:

$\displaystyle e^{i\hat{\gamma}_{\cal C}^{x(yz)}}=\exp\left[if^{y}_{\cal
C}(y)+if^{z}_{\cal C}(z)\right]\,,$ (6.15) $\displaystyle
e^{i\hat{\gamma}_{\cal C}^{y(zx)}}=\exp\left[if^{x}_{\cal C}(x)-if^{z}_{\cal
C}(z)\right]\,,$ $\displaystyle e^{i\hat{\gamma}_{\cal
C}^{z(xy)}}=\exp\left[-if^{x}_{\cal C}(x)-if^{y}_{\cal C}(y)\right]\,.$

This parametrization has a zero mode ambiguity

$\displaystyle f^{x}_{\cal C}(x)\sim f^{x}_{\cal C}(x)+c_{\cal
C},~{}~{}~{}f^{y}_{\cal C}(y)\sim f^{y}_{\cal C}(y)-c_{\cal
C},~{}~{}~{}f^{z}_{\cal C}(z)\sim f^{z}_{\cal C}(z)+c_{\cal C}\,.$ (6.16)

We will soon discuss the periodicities of these functions $f^{i}_{\cal
C}(x^{i})$.

We will choose
$e^{i\hat{\gamma}^{i(jk)}_{X}},e^{i\hat{\gamma}^{i(jk)}_{\tilde{X}}},e^{i\hat{\gamma}^{i(jk)}_{Z}}$
associated with the $X,\tilde{X},Z$ cycles as our basis for the transition
functions, while the others (including the one associated with the $Y$ cycle)
are determined in terms of them. We will use the zero mode ambiguity (6.16) to
set, $e^{if_{X}^{y}(0)}=e^{if_{\tilde{X}}^{x}(0)}=e^{if_{Z}^{x}(0)}=1$.

As discussed above, not all values of $e^{i\hat{\gamma}^{i(jk)}_{\cal C}}$ are
distinct, and we can relate them using $e^{i\hat{\beta}^{i(jk)}}$. In order to
preserve $\hat{A}=0$, $e^{i\hat{\beta}^{i(jk)}}$ should factorize into three
functions of one variable

$\displaystyle e^{i\hat{\beta}^{x(yz)}}=e^{iF^{y}(y)+iF^{z}(z)}\,,$ (6.17)
$\displaystyle e^{i\hat{\beta}^{y(zx)}}=e^{iF^{x}(x)-iF^{z}(z)}\,,$
$\displaystyle e^{i\hat{\beta}^{z(xy)}}=e^{-iF^{x}(x)-iF^{y}(y)}\,.$

This allows us to set

$\displaystyle
e^{if_{X}^{x}(x)}=e^{if_{\tilde{X}}^{y}(y)}=e^{if_{Z}^{z}(z)}=1$ (6.18)

and then the residual freedom in (LABEL:betafree) is with functions satisfying

$\displaystyle e^{iF^{x}(x+m\ell_{x}^{\textrm{eff}})}=e^{iF^{x}(x)}\,,$ (6.19)
$\displaystyle e^{iF^{y}(y+\ell_{y}^{\textrm{eff}})}=e^{iF^{y}(y)}\,,$
$\displaystyle e^{iF^{z}(z+\ell_{z})}=e^{iF^{z}(z)}\,.$

We are then left with six functions of one variable, $e^{if_{X}^{y}(y)}$,
$e^{if_{X}^{z}(z)}$, $e^{if_{\tilde{X}}^{x}(x)}$, $e^{if_{\tilde{X}}^{z}(z)}$,
$e^{if_{Z}^{x}(x)}$, and $e^{if_{Z}^{y}(y)}$, satisfying
$e^{if_{X}^{y}(0)}=e^{if_{\tilde{X}}^{x}(0)}=e^{if_{Z}^{x}(0)}=1$.

We now discuss the constraints on these six functions from the cocycle
conditions (LABEL:hatcocycle) for the $\\{X,Z\\}$, $\\{\tilde{X},Z\\}$, and
$\\{X,\tilde{X}\\}$ cycles. They constrain the functions to satisfy

$\displaystyle
e^{if^{y}_{X}(y+\ell_{y}^{\textrm{eff}})}=e^{if^{y}_{X}(y)}\,,~{}~{}~{}e^{if^{z}_{X}(z+\ell_{z})}=e^{if^{z}_{X}(z)}\,,~{}~{}~{}e^{if^{x}_{\tilde{X}}(x+m\ell_{x}^{\textrm{eff}})}=e^{if^{x}_{\tilde{X}}(x)}\,,$
(6.20) $\displaystyle
e^{if^{x}_{Z}(x)+if^{y}_{Z}(y)}=e^{i\tilde{f}^{x}_{Z}(x)+i\tilde{f}^{y}_{Z}(y)+2\pi
i{r\over
m}\left(\Theta^{\textrm{P}}(x,0,\ell_{x}^{\textrm{eff}})-k\Theta^{\textrm{P}}(y,0,\ell_{y}^{\textrm{eff}})\right)}\,,$
$\displaystyle e^{if_{\tilde{X}}^{z}(z)}=e^{-2\pi i{kr\over
m}\Theta^{\textrm{P}}(z,0,\ell_{z})+i\tilde{f}_{\tilde{X}}^{z}(z)}\,,$

where

$\displaystyle
e^{i\tilde{f}^{x}_{Z}(x+\ell_{x}^{\textrm{eff}})}=e^{i\tilde{f}^{x}_{Z}(x)}\,,$
(6.21) $\displaystyle
e^{i\tilde{f}^{y}_{Z}(y+\ell_{y}^{\textrm{eff}})}=e^{i\tilde{f}^{y}_{Z}(y)}\,,$
$\displaystyle
e^{i\tilde{f}_{\tilde{X}}^{z}(z+\ell_{z})}=e^{i\tilde{f}_{\tilde{X}}^{z}(z)}\,.$

Here $r=0,1,\cdots,m-1$ is an integer that arises from an argument similar to
that of Section 3.2.1.

Finally, we can use the residual freedom in $e^{i\hat{\beta}^{i(jk)}}$ in
(LABEL:hatresidual) to further restrict the periodicity of
$e^{if^{x}_{\tilde{X}}(x)}$ to $\ell_{x}^{\textrm{eff}}$:

$\displaystyle
e^{if^{x}_{\tilde{X}}(x+\ell_{x}^{\textrm{eff}})}=e^{if^{x}_{\tilde{X}}(x)}\,.$
(6.22)

To summarize, the $\hat{B}=0$ configurations can be described by $\hat{A}=0$
and transition functions that are characterized by six circle-valued functions
of one variable $e^{if_{X}^{y}(y)}$, $e^{if_{X}^{z}(z)}$,
$e^{if_{\tilde{X}}^{x}(x)}$, $e^{i\tilde{f}_{\tilde{X}}^{z}(z)}$,
$e^{i\tilde{f}_{Z}^{x}(x)}$, and $e^{i\tilde{f}_{Z}^{y}(y)}$, satisfying
$e^{if_{X}^{y}(0)}=e^{if_{\tilde{X}}^{x}(0)}=e^{if_{Z}^{x}(0)}=1$, and with
periodicities $\ell_{x}^{\textrm{eff}}$, $\ell_{y}^{\textrm{eff}}$, or
$\ell_{z}$, as well as a $\mathbb{Z}_{m}$-valued integer $r$. These functions
are physical and they contribute to the holonomies.

On a lattice, these lead to $2(L_{x}^{\rm eff}+L_{y}^{\rm eff}+L_{z})-3$
distinct $U(1)$ phases and one $\mathbb{Z}_{M}$-valued integer. (Recall that
we label the lattice quantities by upper case letters and their continuum
counterparts by lower case letters.)

The main novelty on a twisted torus is the $m$ configurations labeled by $r$.
Quantum mechanically, most of these configurations acquire infinite energies
[11]. However, these $m$ degenerate states remain zero-energy states.

Similar to the discussion in Section 3.3, the $3+1$-dimensional $\phi$-theory
also has $m$ degenerate ground states. This provides another check of the
duality derived in [11] between the pure $U(1)$ gauge theory of $\hat{A}$ and
the $\phi$-theory.

###  6.3 $\hat{\phi}-\hat{A}$ theory

We now proceed to compute the number of ground states from the perspective of
a different Higgs Lagrangian using a circle-valued field $\hat{\phi}^{i(jk)}$
in the $\mathbf{2}$ of $S_{4}$ and gauge fields
$(\hat{A}_{0}^{i(jk)},\hat{A}^{ij})$ in the $(\mathbf{2},\mathbf{3}^{\prime})$
of $S_{4}$ [11, 12]. In comparing with the discussion around (6.10),
$\hat{\Phi}^{i(jk)}=e^{i\hat{\phi}^{i(jk)}}$ with charge $J=N$. These fields
are subject to the gauge transformation

$\displaystyle\hat{A}_{0}^{i(jk)}\sim\hat{A}_{0}^{i(jk)}+\partial_{0}\hat{\alpha}^{i(jk)}\,,$
(6.23)
$\displaystyle\hat{A}^{ij}\sim\hat{A}^{ij}+\partial_{k}\hat{\alpha}^{k(ij)}\,,$
$\displaystyle\hat{\phi}^{k(ij)}\sim\hat{\phi}^{k(ij)}+N\hat{\alpha}^{k(ij)}$

where $\hat{\phi}^{k(ij)}$ and $\hat{\alpha}^{k(ij)}$ are $2\pi$-periodic and
transform in the $\mathbf{2}$ of $S_{4}$, as in Section 5. The Lagrangian is:

$\displaystyle{\cal L}={1\over 2(2\pi)}\sum_{i\neq
j}E_{ij}\left(\partial_{k}\hat{\phi}^{k(ij)}-N\hat{A}^{ij}\right)-{1\over
6(2\pi)}\sum_{i\neq j\neq
k}B_{k(ij)}\left(\partial_{0}\hat{\phi}^{k(ij)}-N\hat{A}^{k(ij)}_{0}\right)\,.$
(6.24)

We can choose the unitary gauge $e^{i\hat{\phi}^{i(jk)}}=1$, and then the
equation of motion sets the $\hat{B}=0$. Following the discussion in Section
6.2, we can choose $\hat{A}=0$, and then all the information is contained in
the transition functions $e^{i\hat{\gamma}_{\cal C}^{i(jk)}}$. In order to
preserve the gauge choice $e^{i\hat{\phi}^{i(jk)}}=1$, they should be
$\mathbb{Z}_{N}$ phases. These transition functions are parameterized by six
$\mathbb{Z}_{N}$-valued functions $e^{if_{X}^{y}(y)}$, $e^{if_{X}^{z}(z)}$,
$e^{if_{\tilde{X}}^{x}(x)}$, $e^{i\tilde{f}_{\tilde{X}}^{z}(z)}$,
$e^{i\tilde{f}_{Z}^{x}(x)}$, and $e^{i\tilde{f}_{Z}^{y}(y)}$, satisfying
$e^{if_{X}^{y}(0)}=e^{if_{\tilde{X}}^{x}(0)}=e^{if_{Z}^{x}(0)}=1$ with
periodicities $\ell_{x}^{\textrm{eff}},\ell_{y}^{\textrm{eff}}$, or
$\ell_{z}$, together with a $\mathbb{Z}_{\text{gcd}(N,m)}$-valued integer. On
a lattice, this leads to the ground state degeneracy (6.6).

Of special importance are the $\text{gcd}(N,m)$ states characterized by

$\displaystyle
e^{i\hat{\phi}^{i(jk)}}=1,~{}~{}\hat{A}_{0}^{i(jk)}=\hat{A}^{ij}=0\,,~{}~{}~{}e^{i\hat{\gamma}_{X}^{i(jk)}}=1\,,$
(6.25) $\displaystyle
e^{i\hat{\gamma}_{Z}^{x(yz)}}=e^{{2\pi\over\text{gcd}(N,m)}kr\Theta^{\textrm{P}}(y,0,\ell_{y}^{\textrm{eff}})}\,,~{}~{}~{}~{}e^{i\hat{\gamma}_{Z}^{y(zx)}}=e^{-{2\pi\over\text{gcd}(N,m)}r\Theta^{\textrm{P}}(x,0,\ell_{x}^{\textrm{eff}})}\,,~{}~{}~{}~{}$
$\displaystyle
e^{i\hat{\gamma}_{Z}^{z(xy)}}=e^{{2\pi\over\text{gcd}(N,m)}r(\Theta^{\textrm{P}}(x,0,\ell_{x}^{\textrm{eff}})-k\Theta^{\textrm{P}}(y,0,\ell_{y}^{\textrm{eff}}))}\,,$
$\displaystyle
e^{i\hat{\gamma}_{\tilde{X}}^{x(yz)}}=e^{-i\hat{\gamma}_{\tilde{X}}^{y(zx)}}=e^{{2\pi\over\text{gcd}(N,m)}kr\Theta^{\textrm{P}}(z,0,\ell_{z})}\,,~{}~{}~{}~{}e^{i\hat{\gamma}_{\tilde{X}}^{z(xy)}}=1\,,$

where $r=0,1,\cdots,\text{gcd}(N,m)-1$.

###  6.4 $BF$-type $\mathbb{Z}_{N}$ tensor gauge theory

Now we consider a dual presentation of the $\mathbb{Z}_{N}$ tensor gauge
theory [6, 12], which will permit a different computation of the ground state
degeneracy. This presentation involves gauge fields $(A_{0},A_{ij})$ in the
$(\mathbf{1},\mathbf{3}^{\prime})$ of $S_{4}$, and
$(\hat{A}_{0}^{i(jk)},\hat{A}^{ij})$ in the $(\mathbf{2},\mathbf{3}^{\prime})$
of $S_{4}$. These fields are subject to the gauge transformations
(LABEL:Agauge) and (LABEL:hatAgauge), and their field strengths are
(LABEL:EB0) and (LABEL:hatEB0).

The $BF$-type Lagrangian in this presentation is:

$\displaystyle{\cal L}={N\over 2\pi}\left(\frac{1}{2}\sum_{i\neq
j}A_{ij}\hat{E}^{ij}+A_{0}\hat{B}\right)\,.$ (6.26)

As in [12], we work in temporal gauge, setting $A_{0}=0$ and
$\hat{A}_{0}^{i(jk)}=0$.

The analysis of the terms involving $A_{xy},\hat{A}^{xy}$ proceeds in a
similar way as in Section 4.3. The quantization of the electric modes for
$A_{xy},\hat{A}^{xy}$ leads to the bulk part of the spectrum, which becomes
$N^{L_{x}^{\rm eff}+L_{y}^{\rm eff}-1}$ states on a lattice. In addition,
there are $\text{gcd}(N,m)$ states (LABEL:gcdstates) coming from the
transition functions of the $\hat{A}$ gauge theory. On a lattice, we have in
total $N^{L_{x}^{\rm eff}+L_{y}^{\rm eff}-1}\text{gcd}(N,M)$ states. We will
henceforth focus on the modes associated with
$A_{zx},A_{yz},\hat{A}^{zx},\hat{A}^{yz}$.

The solutions to the Gauss law constraints modulo gauge transformations are

$\displaystyle
A_{zx}={1\over\ell_{x}}f^{z}_{zx}(t,z)+{1\over\ell_{z}}f^{x}_{zx}(t,x)\,,$
(6.27) $\displaystyle
A_{yz}={1\over\ell_{z}}f^{y}_{yz}(t,y)+{1\over\ell_{y}}f^{z}_{yz}(t,z)\,,$
$\displaystyle\hat{A}^{zx}={1\over\ell_{y}}\hat{f}^{zx}_{z}(t,z)+{1\over\ell_{y}}\hat{f}^{zx}_{x}(t,x)\,,$
$\displaystyle\hat{A}^{yz}={1\over\ell_{x}}\hat{f}^{yz}_{x}(t,x)+{1\over\ell_{x}}\hat{f}^{yz}_{z}(t,z)\,.$

These functions are periodic in $x\sim x+\ell_{x}^{\textrm{eff}}$, $y\sim
y+\ell_{y}^{\textrm{eff}}$, and $z\sim z+\ell_{z}$.

The functions $f$ and $\hat{f}$ are subject to a redundancy due to the zero
modes [12]. To remove the redundancy of $f$, we define the following
combinations:

$\displaystyle\bar{f}^{i}_{ij}(t,x^{i})=f^{i}_{ij}(t,x^{i})+{1\over\ell_{i}}\oint
dx^{j}f^{j}_{ij}(t,x^{j})\,.$ (6.28)

They are subject to the constraint

$\displaystyle\oint dx^{i}\bar{f}^{i}_{ij}(t,x^{i})=\oint
dx^{j}\bar{f}^{j}_{ij}(t,x^{j})\,.$ (6.29)

We will use these constraints to solve for the modes
$\bar{f}^{z}_{zx}(t,z=0),\bar{f}^{z}_{yz}(t,z=0)$ in terms of the others.
Correspondingly, we use the redundancy to set their conjugate variables
$\hat{f}_{z}^{zx}(t,z=0),\hat{f}_{z}^{yz}(t,z=0)$ to zero.

Let us now discuss the periodicities of the modes $f$. Using the gauge
transformations $\alpha$ of the form (LABEL:minimalphi), (5.3), we find that
different components of $\bar{f}^{i}_{ij}$ have correlated, delta function
periodicities. To diagonalize these periodicities, we define

$\displaystyle\bar{f}_{\tilde{X}}(t,z)={1\over m}\bar{f}^{z}_{yz}(t,z)+{k\over
m}\bar{f}^{z}_{zx}(t,z)\,.$ (6.30)

Then the modes
$\bar{f}^{z}_{zx}(t,z),\bar{f}_{\tilde{X}}(t,z),\bar{f}^{x}_{zx}(t,x),\bar{f}^{y}_{yz}(t,y)$
have independent periodicities. For example,

$\displaystyle\bar{f}_{\tilde{X}}(t,z)\sim\bar{f}_{\tilde{X}}(t,z)+2\pi\delta^{\textrm{P}}(z,z_{0},\ell_{z})\,,~{}~{}~{}~{}z\neq
0~{}{\rm mod}~{}\ell_{z}$ (6.31)

for each $z_{0}$. The other three modes have similar delta function
periodicities.

We now turn to the periodicities of the modes $\hat{f}$. Their periodicities
arise from the large gauge transformations:

$\displaystyle{1\over
2\pi}\hat{\alpha}^{x(yz)}=\left({x\over\ell_{x}}-\langle\tilde{X},Y\rangle{y\over\ell_{y}}\right)W^{y}_{x}(y)+{x\over\ell_{x}}W^{z}_{x}(z)-{y\over\ell_{y}}\,W^{z}_{y}(z)-{z\over\ell_{z}}\,W^{y}_{z}(y),$
(6.32) $\displaystyle{1\over
2\pi}\hat{\alpha}^{y(zx)}={y\over\ell_{y}}W^{z}_{y}(z)+\left({y\over\ell_{y}}-\langle\tilde{Y},X\rangle{x\over\ell_{x}}\right)W^{x}_{y}(x)-{z\over\ell_{z}}\,W^{x}_{z}(x)-{x\over\ell_{x}}\,W^{z}_{x}(z)\,,$
$\displaystyle{1\over
2\pi}\hat{\alpha}^{z(xy)}={z\over\ell_{z}}\left[W^{x}_{z}(x)+W^{y}_{z}(y)\right]-\left({y\over\ell_{y}}-\langle\tilde{Y},X\rangle{x\over\ell_{x}}\right)\,W^{x}_{y}(x)-\left({x\over\ell_{x}}-\langle\tilde{X},Y\rangle{y\over\ell_{y}}\right)\,W^{y}_{x}(y)\,.$

where $W^{i}_{j}(x^{i})\in\mathbb{Z}$. We will motivate these gauge
transformations in Appendix E where we discuss the winding configurations of a
classical field in the $\mathbf{2}$ on our twisted torus.

These gauge transformations correlate the integer-valued periodicities of
different components of $\hat{f}_{i}^{ij}$. To diagonalize these
periodicities, we define

$\displaystyle{\hat{f}}^{\tilde{X}}(t,z)\equiv\frac{1}{m}{\hat{f}}^{zx}_{z}(t,z)-\frac{k}{m}\hat{f}^{yz}_{z}(t,z)\,.$
(6.33)

Then the modes
${\hat{f}}^{yz}_{z}(t,z),{\hat{f}}^{\tilde{X}}(t,z),{\hat{f}}^{zx}_{x}(t,x),{\hat{f}}^{yz}_{y}(t,y)$
have independent, pointwise $2\pi\mathbb{Z}$ periodicities.

Written in this basis of $\bar{f}$ and $\hat{f}$ with independent
periodicities, the Lagrangian is diagonalized:

$\displaystyle{N\over
2\pi}\int_{0}^{\ell_{x}^{\textrm{eff}}}dx\hat{f}^{zx}_{x}(t,x)\partial_{0}\bar{f}^{x}_{zx}(t,x)+{N\over
2\pi}\int_{0}^{\ell_{y}^{\textrm{eff}}}dy\hat{f}^{yz}_{y}(t,y)\partial_{0}\bar{f}^{y}_{yz}(t,y)$
(6.34) $\displaystyle+{N\over
2\pi}\int_{0^{+}}^{\ell_{z}}dz\left(\hat{f}^{\tilde{X}}(t,z)\partial_{0}\bar{f}^{z}_{zx}(t,z)+\hat{f}^{yz}_{z}(t,z)\partial_{0}\bar{f}_{\tilde{X}}(t,z)\right)\,.$

Recall that we have removed the modes at $z=0$ using the constraint (6.29) of
$f$ and the redundancy of $\hat{f}$. Quantizing these modes on a lattice, we
obtain a Hilbert space with $N^{L_{x}^{\rm eff}+L_{y}^{\rm eff}+2L_{z}-2}$
zero-energy states. Combining with the contributions from
$A_{xy},\hat{A}^{xy}$, we reproduce the ground state degeneracy in (6.6).

###  6.5 Global symmetry operators

We can compute the ground state degeneracy in yet another way, using the
$\mathbb{Z}_{N}$ symmetry operators of the theory. As we will see, the twist
leads to various novelties that are not present when the system is placed on
the untwisted torus. Even though, as in [12], we will use continuum notation,
this approach is easily related to the corresponding lattice analysis using
logical operators. In particular, it mirrors the recent lattice discussion in
[23].

Let us start with the global symmetry operators depending on $A_{xy}$ and its
conjugate variable $\hat{A}^{xy}$. This part of the analysis proceeds as in
Section 4.4, with $e^{i\phi^{xy}}$ there replaced by $e^{i\oint
dz\hat{A}^{xy}}$. We find $N^{L_{x}^{\rm eff}+L_{y}^{\rm
eff}-1}\text{gcd}(N,M)$ states.

We now turn to the remaining gauge-invariant operators. The operators built of
$A_{zx},A_{yz}$ are the Wilson strips:

$\displaystyle\textbf{W}_{(x)}(x_{1},x_{2},Z)=\exp\left[i\int_{x_{1}}^{x_{2}}dx\oint
dzA_{zx}\right]\,,$ (6.35)
$\displaystyle\textbf{W}_{(y)}(y_{1},y_{2},Z)=\exp\left[i\int_{y_{1}}^{y_{2}}dy\oint
dzA_{yz}\right]\,.$

and

$\displaystyle\textbf{W}_{(z)}(z_{1},z_{2},X)=\exp\left[i\int_{z_{1}}^{z_{2}}dz\oint
dxA_{zx}\right]\,,$ (6.36)
$\displaystyle\textbf{W}_{(z)}(z_{1},z_{2},{\tilde{X}})=\exp\left[i\int_{z_{1}}^{z_{2}}dz\oint_{\tilde{X}}\left(dx\,A_{zx}+dy\,A_{yz}\right)\right]\,.$

(Here, for simplicity, we took $0<x_{2}-x_{1}\leq\ell_{x}^{\textrm{eff}}$,
$0<y_{2}-y_{1}\leq\ell_{y}^{\textrm{eff}}$, and $0<z_{2}-z_{1}\leq\ell_{z}$.)
More generally, we can study Wilson strip operators
$\textbf{W}_{(z)}(z_{1},z_{2},{\cal C})$ associated with any curve ${\cal C}$
on the twisted $xy$-torus. They depend only on the homology class of $\cal C$
and not on the explicit representative. Since $\\{X,{\tilde{X}}\\}$ form a
basis of $\Gamma=H_{1}(T^{2},\mathbb{Z})$, every Wilson strip
$\textbf{W}_{(z)}(z_{1},z_{2},{\cal C})$ can be generated by (LABEL:Wz).

The Wilson strips are subject to two constraints, which come from viewing the
same integral in two different ways:

$\displaystyle\textbf{W}_{(x)}(0,\ell_{x}^{\textrm{eff}},Z)^{m}=\textbf{W}_{(z)}(0,\ell_{z},X)\,,$
(6.37)
$\displaystyle\textbf{W}_{(y)}(0,\ell_{y}^{\textrm{eff}},Z)\textbf{W}_{(x)}(0,\ell_{x}^{\textrm{eff}},Z)^{k}=\textbf{W}_{(z)}(0,\ell_{z},\tilde{X})\,.$

Next, the gauge-invariant operators of $\hat{A}^{zx},\hat{A}^{yz}$ involve the
Wilson lines along the $X$ and the $Y$ cycles:

$\displaystyle\hat{\textbf{W}}^{x}(y,z)=\exp\left[i\oint
dx\hat{A}^{yz}\right]\,,$ (6.38)
$\displaystyle\hat{\textbf{W}}^{y}(x,z)=\exp\left[i\oint
dy\hat{A}^{zx}\right]\,.$

The vanishing of the magnetic field of $\hat{A}$ implies that the
$\mathbb{Z}_{N}$ symmetry operator $\hat{\textbf{W}}^{x}(y,z)$ factorizes
[12]:

$\displaystyle\hat{\textbf{W}}^{x}(y,z)=\hat{\textbf{W}}^{x}_{y}(y)\hat{\textbf{W}}^{x}_{z}(z)$
(6.39)

and similarly in the other directions

There is one important novelty here, which was not present in the case of the
untwisted torus: the Wilson line operators
$\hat{\textbf{W}}^{x},\hat{\textbf{W}}^{y},\hat{\textbf{W}}^{z}$ do not
generate all the gauge invariant operators constructed out of $\hat{A}$.
Consider the Wilson strip operators of $\hat{A}$ [12]:666Both the Wilson lines
(LABEL:hatWilson) and the Wilson strip (6.40) can be extended in time to
become defects in the $\mathbb{Z}_{N}$ theory. They are the continuum
representations of the probe limits of a single lineon and a dipole of lineons
(which is a planon) of the X-cube model, respectively. See [12] for more
details.

$\displaystyle\hat{\textbf{P}}(z_{1},z_{2},{\cal
C})=\exp\left[i\int_{z_{1}}^{z_{2}}dz\oint_{\cal
C}\left(\partial_{z}\hat{A}^{yz}dx-\partial_{z}\hat{A}^{zx}dy-\partial_{y}\hat{A}^{xy}dy\right)\right]\,.$
(6.40)

Since the magnetic field of $\hat{A}$ vanishes, this strip operator
$\hat{\textbf{P}}$ depends only on the homology class $[\cal C]$ of the curve
$\cal C$ on the twisted $xy$-torus, and not on its representative.

Let us first consider the case when $[\cal C]$ is a cycle of $\hat{\Gamma}$,
i.e., the sublattice of $\Gamma$ generated by the $X$ and $Y$ cycles. That is,
$[{\cal C}]=n_{x}X+n_{y}Y$ with $n_{x},n_{y}\in\mathbb{Z}$. In this case we
can choose the representative $\cal C$ in (6.40) to first go around the $X$
cycle $n_{x}$ times, and then around the $Y$ cycle $n_{y}$ times. For this
choice of $\cal C$, the term $\partial_{y}\hat{A}^{xy}$ in (6.40) does not
contribute to the integral, and the strip operator can be written in terms of
the Wilson lines:

$\displaystyle\hat{\textbf{P}}(z_{1},z_{2},{\cal
C})=\hat{\textbf{W}}^{x}(y,z_{2})^{n_{x}}\hat{\textbf{W}}^{y}(x,z_{2})^{-n_{y}}\hat{\textbf{W}}^{x}(y,z_{1})^{-n_{x}}\hat{\textbf{W}}^{y}(x,z_{1})^{n_{y}}\,.$
(6.41)

Note that the negative sign in the exponent in (6.40) leads to negative signs
in the exponents here. It is important that because of (6.39) this
$\hat{\textbf{P}}(z_{1},z_{2},{\cal C})$ is independent of $x$ and $y$.

However, if $[{\cal C}]$ is not a cycle in $\hat{\Gamma}$, then the strip
operator $\hat{\textbf{P}}(z_{1},z_{2},{\cal C})$ is not generated by the
Wilson lines. We should then include these operators as independent
$\mathbb{Z}_{N}$ operators in addition to (LABEL:hatWilson). Note that on an
untwisted torus, $\hat{\Gamma}=\Gamma$ and therefore it suffices to study the
Wilson lines $\hat{\textbf{W}}^{x},\hat{\textbf{W}}^{y},\hat{\textbf{W}}^{z}$.

We conclude that the gauge-invariant operator built out of
$A_{zx},A_{yz},\hat{A}^{zx},\hat{A}^{yz}$ are generated by (LABEL:Wxy),
(LABEL:Wz), (LABEL:hatWilson), and (6.40). We can group these operators as
follows:

$\displaystyle\textbf{W}_{(x)}(x,x+a,Z)\,,~{}~{}~{}~{}\hat{\textbf{W}}^{y}(x,z=0)\,,~{}~{}~{}~{}~{}\,0\leq
x<\ell_{x}^{\textrm{eff}}\,,$ (6.42)
$\displaystyle\textbf{W}_{(y)}(y,y+a,Z)\,,~{}~{}~{}~{}\hat{\textbf{W}}^{x}(y,z=0)\,,~{}~{}~{}~{}~{}\,0\leq
y<\ell_{y}^{\textrm{eff}}\,,$
$\displaystyle\textbf{W}_{(z)}(z,z+a,\tilde{X})\,,~{}~{}~{}~{}\hat{\textbf{P}}(0,z,X)\,,~{}~{}~{}~{}~{}~{}~{}~{}~{}0<z<\ell_{z}\,,$
$\displaystyle\textbf{W}_{(z)}(z,z+a,X)\,,~{}~{}~{}~{}\hat{\textbf{P}}(0,z,\tilde{X})^{-1}\,,~{}~{}~{}~{}~{}~{}0<z<\ell_{z}\,.$

Here $a$ is an infinitesimal UV regulator, e.g., lattice spacing. Using
(LABEL:Wilsonconstraint), the operators $\textbf{W}_{(z)}(z,z+a,\tilde{X})$
and $\textbf{W}_{(z)}(z,z+a,\tilde{X})$ at $z=0$ can be solved in terms of
$\textbf{W}_{(x)}$ and $\textbf{W}_{(y)}$ and therefore they are not included
as independent operators in (LABEL:pairs). The operators
$\hat{\textbf{W}}^{x}$ and $\hat{\textbf{W}}^{y}$ at $z>0$ can be generated by
those at $z=0$ and
$\hat{\textbf{P}}(0,z,X),\hat{\textbf{P}}(0,z,\tilde{X})^{-1}$.

The pair of operators at the same point in space in each line in (LABEL:pairs)
form a $\mathbb{Z}_{N}$ clock and shift algebra, and operators at different
points in space or on different lines in (LABEL:pairs) commute with each
other. On a lattice, this gives rise to $L_{x}^{\rm eff}+L_{y}^{\rm
eff}+2L_{z}-2$ copies of the $\mathbb{Z}_{N}$ clock and shift algebra. The
dimension of the minimal representation of this algebra is $N^{L_{x}^{\rm
eff}+L_{y}^{\rm eff}+2L_{z}-2}$. Combining with the contributions from the
operators of $A_{xy},\hat{A}^{xy}$, we have reproduced the ground state
degeneracy (6.6).

## Acknowledgements

We thank M. Hermele for sharing [23] with us long before its publication and
for answering many questions. We also thank M. Cheng for sharing the results
of the unpublished work [25] and for crucial discussions about them. We are
especially grateful to P. Gorantla and H.T. Lam for their critical reading of
the manuscript and for helpful conversations. The work of TR at the Institute
for Advanced Study was supported by the Roger Dashen Membership and by NSF
grant PHY-191129. The work of TR at the University of California, Berkeley,
was supported by NSF grant PHY1820912, the Simons Foundation, and the Berkeley
Center for Theoretical Physics. The work of NS was supported in part by DOE
grant DE$-$SC0009988. NS and SHS were also supported by the Simons
Collaboration on Ultra-Quantum Matter, which is a grant from the Simons
Foundation (651440, NS). SHS thanks the Department of Physics at National
Taiwan University for its hospitality during the course of this work. Opinions
and conclusions expressed here are those of the authors and do not necessarily
reflect the views of funding agencies.

##  Appendix A $2+1$ dimensional plaquette Ising model

In this appendix, we compute the ground state degeneracy of the
$2+1$-dimensional $\mathbb{Z}_{N}$ plaquette Ising model on our twisted
lattice. We will assume the absence of the transverse field and that we are in
the broken phase. The low energy limit of this lattice model is the
$\mathbb{Z}_{N}$ tensor gauge theory of [10].

We will analyze the model in the Hamiltonian formalism. On every site
$(\hat{x},\hat{y})$ there is a pair of $\mathbb{Z}_{N}$ clock and shift
operators $U(\hat{x},\hat{y}),V(\hat{x},\hat{y})$ that obey
$V(\hat{x},\hat{y})U(\hat{x},\hat{y})=e^{2\pi
i/N}U(\hat{x},\hat{y})V(\hat{x},\hat{y})$ and
$U(\hat{x},\hat{y})^{N}=V(\hat{x},\hat{y})^{N}=1$. The Hamiltonian is

$\displaystyle
H=-\beta\sum_{(\hat{x},\hat{y})}V(\hat{x},\hat{y})V(\hat{x}+1,\hat{y})^{-1}V(\hat{x},\hat{y}+1)^{-1}V(\hat{x}+1,\hat{y}+1)+c.c.\,.$
(A.1)

Since there is no $U$ in the Hamiltonian, we can diagonalize the Hilbert space
at every site using $V$.

Let the eigenvalue of $V(\hat{x},\hat{y})$ be $s(\hat{x},\hat{y})$, which is
also a $\mathbb{Z}_{N}$ phase, i.e., $s(\hat{x},\hat{y})^{N}=1$. The
translations along the $X$ and $\tilde{X}$ cycles imply that (see
(LABEL:periodicityLX))

$\displaystyle X:~{}s\left(\hat{x}+ML_{x}^{\rm
eff},\hat{y}\right)=s(\hat{x},\hat{y})\,,$ (A.2)
$\displaystyle\tilde{X}:~{}s\left(\hat{x}+KL_{x}^{\rm
eff}\,,\,\hat{y}+L_{y}^{\rm eff}\right)=s(\hat{x},\hat{y})\,.$

Let us find the ground states. We need to find $\\{s(\hat{x},\hat{y})\\}$
subject to the constraint:

$\displaystyle
s(\hat{x},\hat{y})\,s(\hat{x}+1,\hat{y})^{-1}\,s(\hat{x},\hat{y}+1)^{-1}\,s(\hat{x}+1,\hat{y}+1)=1\,,$
(A.3)

for all lattice sites $(\hat{x},\hat{y})$. This is a lattice version of the
analysis of $e^{i\phi^{xy}}$ in Section 4.4. We will follow steps similar to
the steps there and will reproduce the answer in the continuum (4.8).

Locally, (A.3) is solved by

$\displaystyle s(\hat{x},\hat{y})=s(1,1)^{-1}s(\hat{x},1)s(1,\hat{y})~{},$
(A.4)

thus reducing the number of independent variables to
$L_{x}+L_{y}^{\textrm{eff}}-1$. Next, we impose the boundary conditions
(LABEL:stranslations):

$\displaystyle s\left(\hat{x}+ML_{x}^{\rm eff},1\right)=s(\hat{x},1)\,,$ (A.5)
$\displaystyle s\left(\hat{x}+KL_{x}^{\rm
eff}\,,\,1\right)s\left(1\,,\,\hat{y}+L_{y}^{\rm
eff}\right)=s(\hat{x},1)s(1,\hat{y})~{}.$

This leads to

$\displaystyle s(\hat{x}+L_{x}^{\textrm{eff}},1)=\eta s(\hat{x},1)$ (A.6)
$\displaystyle s(1,\hat{y}+L_{y}^{\textrm{eff}})=\eta^{-K}s(1,\hat{y})$

with a constant $\eta$ satisfying $\eta^{M}=\eta^{N}=1$ and therefore
$\eta^{\gcd(N,M)}=1$.

We conclude that the independent solutions are labeled by
$L_{x}^{\textrm{eff}}+L_{y}^{\textrm{eff}}-1$ integers modulo $N$ from
$s(\hat{x},1)$ and $s(1,\hat{y})$ and an integer modulo $\gcd(N,M)$ from
$\eta$. So we end up with

$\displaystyle N^{L_{x}^{\textrm{eff}}+L_{y}^{\textrm{eff}}-1}\gcd(N,M)$ (A.7)

solutions.

##  Appendix B Invariants of the transition functions for $\phi$ on a two-
torus

In this appendix, we discuss the invariants for the transition functions
$g_{\cal C}(x,y)$ under the identification (3.13). Our goal is to show that
all the invariants are given by the $U(1)$ charges $Q^{x}(x),Q^{y}(y)$ in
(LABEL:U1charges) (subject to (3.15)), and one integer modulo $m$ charge
(3.16).

Starting with a generic $\phi$ configuration, we can always subtract from it a
standard configuration with the same $U(1)$ charges. The resulting $\phi$
configuration has vanishing $U(1)$ charges. Therefore, it is enough to
consider such configurations. We are going to show that for them the only
remaining invariant is a $\mathbb{Z}_{m}$ charge. This means that we start
with a configuration with

$\displaystyle g_{X}=2\pi n^{x}_{X}(x)\,,$ (B.1) $\displaystyle g_{Y}=2\pi
n^{y}_{Y}(y)\,,$

and $n_{xy}=0$. Since there is also invariant information in $g_{\tilde{X}}$,
we should take it into account. (LABEL:gY) leads to

$\displaystyle
n^{y}_{Y}(y)=\sum_{I=0}^{m-1}n_{\tilde{X}}^{y}(y+I\ell_{y}^{\textrm{eff}})-{\cal
N}\,,$ (B.2) $\displaystyle 0={\cal
N}-\sum_{J=1}^{k}n_{X}^{x}(x-Jm\ell_{x}^{\textrm{eff}})+\sum_{I=1}^{m}n^{x}_{\tilde{X}}(x-Ik\ell_{x}^{\textrm{eff}})\,,$

for some integer $\cal N$. The cocycle condition (3.10) leads to

$\displaystyle
n^{x}_{\tilde{X}}(x+m\ell_{x}^{\textrm{eff}})-n^{x}_{\tilde{X}}(x)=n^{x}_{X}(x+k\ell_{x}^{\textrm{eff}})-n^{x}_{X}(x)\,.$
(B.3)

The freedom in splitting the zero mode between $n_{\tilde{X}}^{x}(x)$ and
$n_{\tilde{X}}^{y}(y)$ leads to the following identification

$\displaystyle n^{x}_{\tilde{X}}(x)\sim n^{x}_{\tilde{X}}(x)+N_{\tilde{X}}\,,$
(B.4) $\displaystyle n^{y}_{\tilde{X}}(y)\sim
n^{y}_{\tilde{X}}(y)-N_{\tilde{X}}\,,$ $\displaystyle{\cal N}\sim{\cal
N}-mN_{\tilde{X}}\,.$

Therefore, only

$\displaystyle\exp(2\pi i{\cal N}/m)=\exp\left[-{2\pi i\over
m}\sum_{I=1}^{m}n^{x}_{\tilde{X}}(x-Ik\ell_{x}^{\textrm{eff}})+{2\pi i\over
m}\sum_{J=1}^{k}n_{X}^{x}(x-Jm\ell_{x}^{\textrm{eff}})\right]$ (B.5)
$\displaystyle=\exp\left[-{2\pi i\over
m}\sum_{I=0}^{m-1}n^{x}_{\tilde{X}}(x+I\ell_{x}^{\textrm{eff}})+{2\pi i\over
m}\sum_{J=0}^{k-1}n_{X}^{x}(x+J\ell_{x}^{\textrm{eff}})\right]$

is meaningful. In the second line, we have used (B.3). Indeed, this agrees
with the $\mathbb{Z}_{m}$ charge in (3.16) in the special case when all the
$U(1)$ charges $Q^{x}(x),Q^{y}(y)$ vanish.

To complete the counting, we use the same strategy as above. We subtract from
our configuration a standard configuration with the same nonzero
$\mathbb{Z}_{m}$ charge and find a configuration with vanishing
$\mathbb{Z}_{m}$ charge. We are going to show that in this case there is no
other invariant information.

Using (3.13), we can choose $n_{\tilde{X}}^{x}(x)=n_{\tilde{X}}^{y}(y)=0$.
Then (LABEL:gY0) implies $n^{y}_{Y}(y)=0$ and

$\displaystyle 0=\sum_{J=1}^{k}n^{x}_{X}(x-Jm\ell_{x}^{\textrm{eff}})\,.$
(B.6)

The only remaining transition function $n^{x}_{X}(x)$ has periodicity
$n^{x}_{X}(x+k\ell_{x}^{\textrm{eff}})=n^{x}_{X}(x)$ and is subject to a
residual identification:

$\displaystyle n^{x}_{X}(x)\sim
n^{x}_{X}(x)+n^{x}(x+m\ell_{x}^{\textrm{eff}})-n^{x}(x)\,,$ (B.7)

where $n^{x}(x)$ satisfies

$\displaystyle n^{x}(x+k\ell_{x}^{\textrm{eff}})=n^{x}(x)\,.$ (B.8)

Finally, we show that the remaining transition function $n^{x}_{X}(x)$ can be
set to zero as follows. Since gcd$(m,k)=1$, we can parameterize every point
$x$ as $x=\tilde{x}-Rm\ell_{x}^{\textrm{eff}}+Pk\ell_{x}^{\textrm{eff}}$ for
some $0\leq\tilde{x}<\ell_{x}^{\textrm{eff}}$ and $R,P\in\mathbb{Z}$. This
parametrization of $x$ in terms of $(\tilde{x},R,P)$ has the ambiguity
$(\tilde{x},R,P)\sim(\tilde{x},R+k,P-m)$. Using this parametrization, we
choose $n^{x}(x)$ to be

$\displaystyle
n^{x}(x)=-\sum_{I=1}^{R}n^{x}_{X}(\tilde{x}-Im\ell_{x}^{\textrm{eff}})\,.$
(B.9)

The condition (B.6) ensures that this $n^{x}(x)$ is invariant under the above
ambiguity and has periodicity $k\ell_{x}^{\textrm{eff}}$. This residual
identification then removes all the remaining transition functions.

To conclude, we have shown that all the invariant information in the
transition functions is captured by $Q^{x}(x),Q^{y}(y)$ in (LABEL:U1charges)
and one $\mathbb{Z}_{m}$ charge (3.16).

##  Appendix C Additional operators in the $\phi$-theory

In this appendix, we discuss some additional operators in the $\phi$ theory.
These include the $U(1)$ charges $Q^{x}(x),Q^{y}(y)$ (LABEL:U1charges) and the
$\mathbb{Z}_{m}$ charge (3.16).

We start with a first attempt. We want to use the local winding current
${1\over 2\pi}\partial_{x}\partial_{y}\phi$ to construct an operator by
integrating it against a certain profile function $\phi_{0}(x,y)$:

$\displaystyle``\exp\left[{i\over
2\pi}\int_{T^{2}}\phi_{0}(x,y)\partial_{x}\partial_{y}\phi(x,y)\right]"$ (C.1)

Here $\phi_{0}(x,y)$ is another classical background configuration, which is
distinct from our field $\phi(x,y)$. (For the purpose of this discussion, our
field $\phi(x,y)$ is also a classical field.) Both $\phi_{0}$ and $\phi$ obey
the rules in Section 3.

This definition, however, is not precise. First, since both $\phi_{0}$ and
$\phi$ are not real-valued functions on the torus, the integral generally
depends on the choice of the fundamental domain for the torus. Second, this
expression is not invariant under the gauge transformation (3.4) for
$\phi_{0}$.

In the rest of this appendix, we will give a precise definition of this
operator that does not suffer from the issues above. See [34] for a closely
related discussion in other more familiar models.

For simplicity, we will set
$\ell_{x}^{\textrm{eff}}=\ell_{y}^{\textrm{eff}}=1$ in this appendix.

We claim that the more precise version of the operator (C.1) is

$\displaystyle{\cal U}(\phi_{0})=\exp\Big{[}{i\over
2\pi}\int_{y_{*}}^{y_{*}+1}dy\int_{\tilde{x}_{*}+ky}^{\tilde{x}_{*}+ky+m}dx\,\phi_{0}(x,y)\partial_{x}\partial_{y}\phi(x,y)$
(C.2) $\displaystyle-{i\over
2\pi}\int_{\tilde{x}_{*}+ky_{*}}^{\tilde{x}_{*}+ky_{*}+m}dx\,g_{\tilde{X}}^{0}(x,y_{*})\partial_{x}\phi(x,y_{*})$
$\displaystyle-{i\over
2\pi}\int_{y_{*}}^{y_{*}+1}ds\,\left[g_{X}^{0}(\tilde{x}_{*}+ks,s)\partial_{y}\phi(\tilde{x}_{*}+ks,s)+k\partial_{x}g_{X}^{0}(\tilde{x}_{*}+ks)\,\phi(\tilde{x}_{*}+ks,s)\right]$
$\displaystyle+in^{0}_{x\tilde{x}}\,\phi(\tilde{x}_{*}+ky_{*},y_{*})\Big{]}$

where $\tilde{x}_{*}\equiv x_{*}-ky_{*}$. In the first line we have picked the
fundamental domain in the covering space to be a parallelogram with the lower
left corner at $(x_{*},y_{*})$. Here $g_{\cal C}^{0}$ is the transition
function for $\phi_{0}$ along the cycle $\cal C$ and

$\displaystyle n^{0}_{x\tilde{x}}={1\over
2\pi}\left[g^{0}_{X}(x+k,y+1)-g^{0}_{X}(x,y)\right]={1\over
2\pi}\left[g^{0}_{\tilde{X}}(x+m,y)-g^{0}_{\tilde{X}}(x,y)\right]\,.$ (C.3)

Recall that because of (LABEL:transitioncon), $\partial_{x}g_{X}^{0}$ (and
similarly $\partial_{x}g_{X}$) is a function of one variable.

Alternatively, this operator can be written as

$\displaystyle{\cal U}(\phi_{0})=\exp\Big{[}{i\over