# Gauging C on the Lattice

Theodore<EMAIL_ADDRESS>

1Mani L. Bhaumik Institute for Theoretical Physics, Department of Physics and
Astronomy,
University of California, Los Angeles, CA 90095, USA

###### Abstract

We discuss general aspects of charge conjugation symmetry in Euclidean lattice
field theories, including its dynamical gauging. Our main focus is
$O(2)=U(1)\rtimes\mathbb{Z}_{2}$ gauge theory, which we construct using a non-
abelian generalization of the Villain formulation via gauging the charge
conjugation symmetry of pure $U(1)$ gauge theory. We describe how to construct
gauge-invariant non-local operators in a theory with gauged charge conjugation
symmetry, and use it to define Wilson and ’t Hooft lines as well as non-
invertible symmetry operators. Our lattice discretization preserves the
higher-group and non-invertible symmetries of $O(2)$ gauge theory, which we
explore in detail. In particular, these symmetries give rise to selection
rules for extended operators and their junctions, and constrain the properties
of the worldvolume degrees of freedom on twist vortices (also known as Alice
or Cheshire strings). We propose a phase diagram of the theory coupled to
dynamical magnetic monopoles and twist vortices, where the various generalized
symmetries are typically only emergent.

###### Contents

  1. 1 Introduction
  2. 2 Generalities: Charge Conjugation on the Lattice
    1. 2.1 Constructing Gauge-Invariant Operators
      1. 2.1.1 Twisted Sector Operators
  3. 3 Villain Formulation of $O(2)$ Gauge Theory
    1. 3.1 Wilson Lines and Representations
  4. 4 Higher-Group Symmetry
    1. 4.1 Anomalies
    2. 4.2 Action on Twist Vortices
  5. 5 Twist Vortices and Junctions
    1. 5.1 Three Dimensions
      1. 5.1.1 Consistency with the 2-Group
      2. 5.1.2 Junctions
    2. 5.2 Four Dimensions
      1. 5.2.1 Consistency with the 3-Group
      2. 5.2.2 Junctions
  6. 6 Non-Invertible Symmetries
    1. 6.1 Electric Symmetry
      1. 6.1.1 Action on Wilson Lines
      2. 6.1.2 Three-Loop Braiding
      3. 6.1.3 Selection Rules
    2. 6.2 Magnetic Symmetry
      1. 6.2.1 Action on Monopole Operators
  7. 7 Phase Diagram with Monopoles and Vortices
  8. 8 Summary and Discussion
  9. A Twisted Differentials and Cup Products
    1. A.1 Twisted Differentials
    2. A.2 Twisted Cup Products
    3. A.3 Cup Product Identities
  10. B Gauge-Invariance of the $O(2)$ Wilson Line
  11. C Orbifolding the Particle on a Circle
  12. D Orbifolding the Compact Boson
  13. E $O(2)$ vs. $Pin^{-}(2)$

##  1 Introduction

Lattice gauge theory has historically served as an important testing ground
for novel concepts in quantum field theory, ranging from confinement and other
strong coupling phenomena to kinematic features such as symmetries and
dualities. In part inspired by developments in condensed matter physics
concerning topological phases of matter, more recently the lattice has proven
to be a fruitful setting to explore generalized global symmetries and their
anomalies [1, 2, 3, 4, 5]. Notably, various ‘modern’ concepts such as higher-
form symmetry appear quite naturally on the lattice, and some of their
features were appreciated in early studies of lattice gauge theories, for
instance Refs. [6, 7, 8, 9, 10] (see also [11] and references therein).

Given some target continuum quantum field theory of interest, it is an
important but challenging task to find a lattice discretization which
preserves as many continuum features as possible. Global symmetries, together
with their ’t Hooft anomalies, constitute some of the most basic features of a
quantum field theory, and provide non-perturbative constraints on the dynamics
and possible long distance behavior of lattice and continuum theories alike.
As the landscape of generalized symmetries continues to expand (see Refs. [12,
13, 14, 15, 16, 17, 18, 19] for reviews), it is also important to establish
concrete realizations of novel symmetry structures. The lattice is a useful
arena for providing such realizations and exploring their implications.
Indeed, there is a large collection of works exploring generalized symmetries
in Euclidean spacetime lattice models [3, 20, 21, 22, 23, 24, 25, 26, 27, 28,
29, 30, 31, 32, 33, 34, 35, 36] as well as Hamiltonian lattice systems [37,
38, 39, 40, 41, 42, 32, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55],
including higher-group [3, 30, 38, 39, 40, 31, 41] and non-invertible
symmetries [20, 21, 37, 22, 23, 24, 25, 26, 27, 29, 36, 33, 34, 32, 46, 47,
48, 49, 50, 51, 54, 42, 43, 44, 45, 52, 53, 54, 55].

In this paper, we use the lattice to study a familiar global symmetry, namely
charge conjugation, through the lens of generalized symmetry. What makes
charge conjugation special is that it is a 0-form symmetry (i.e. it is
generated by a codimension-1 operator) that nonetheless has an intrinsic
action on extended operators such as lines and surfaces in addition to local
operators.222See e.g. Ref. [56] for a treatment of charge conjugation and
other 0-form symmetries in topological theories _without_ local operators.  It
is this property that sets charge conjugation apart from more conventional
0-form internal symmetries which (intrinsically) only act on local
operators.333A generic 0-form symmetry can also act projectively on extended
operators — this is known as symmetry fractionalization. The lattice is
particularly well-suited for studying gauge theories of charge conjugation:
first, discrete gauge theories are very natural on the lattice, and second,
the action on extended operators is inherited in a straightforward way from
the transformation properties of fields living on higher-dimensional cells of
the lattice, i.e. links, plaquettes, cubes, etc.

Promoting the charge conjugation symmetry of a gauge theory to a local gauge
redundancy results in a disconnected, non-abelian gauge group. Gauge theories
with disconnected gauge groups were first studied in Refs. [57, 58] and
further explored in the ’90s, see for instance Refs. [59, 60, 61, 62, 63, 64,
65], and more recently in Refs. [66, 67, 68, 69, 70, 23, 71, 72, 73, 74]. Much
of the earlier literature on disconnected gauge groups was focused on the
peculiar properties of non-abelian vortices dubbed ‘Alice’ or ‘Cheshire’
strings. The simplest example is furnished by $O(2)=U(1)\rtimes\mathbb{Z}_{2}$
gauge theory, which can be obtained by gauging the charge conjugation symmetry
of $U(1)$ gauge theory. Alternatively, in the continuum $O(2)$ gauge theory
can be realized by Higgsing $SO(3)$ using a Higgs field in the spin-2
representation [58].444If the UV gauge group is taken instead to be $SU(2)$,
the resulting gauge group in the IR is a double cover of $O(2)$ called
$Pin^{-}(2)$ [62]. We discuss the differences between these two theories on
the lattice in Appendix E.  The Alice strings of $O(2)$ gauge theory in the
continuum arise as semiclassical vortex solutions characterized by the fact
that a charged particle encircling the vortex experiences a reflection,
flipping the sign of its charge.

In a conventional Wilson-type formulation of $O(2)$ lattice gauge theory, one
integrates over $O(2)$-valued link fields in the path integral using an
appropriate Haar measure, and Wilson loops are given by traces (in some
representation) of path-ordered products of $O(2)$ link fields. Despite its
simplicity, this formulation obscures certain global properties, in particular
the role of topological excitations. Instead, in this paper we introduce a
novel, non-abelian generalization of the Villain formulation [75]: we start
with a non-compact $\mathbb{R}$ gauge theory, gauge a $\mathbb{Z}$ 1-form
symmetry to obtain $U(1)=\mathbb{R}/2\pi\mathbb{Z}$ gauge theory, and then
gauge charge conjugation symmetry to land on the non-abelian
$O(2)=U(1)\rtimes\mathbb{Z}_{2}$ theory. On the one hand, in this formulation
it takes more work to construct gauge-invariant operators such as Wilson lines
— our method for defining gauge-invariant operators refines a construction in
Ref. [65] with projection operators, or ‘condensation defects.’ However, the
advantage of this formulation is that we can easily identify and control
magnetic monopoles and twist vortices. The former are familiar from $U(1)$
lattice gauge theories, while the latter are specific to disconnected gauge
groups like $O(2)$ — they are nothing but the Alice strings mentioned above,
i.e. the codimension-2 defects which induce a holonomy for reflections.

In order to endow our lattice theory with the global symmetries of the
continuum $O(2)$ theory, we employ the modified Villain formulation [76, 77]
and completely suppress dynamical monopoles and twist vortices (see Refs. [78,
76, 77, 79, 80, 81, 82, 83, 84, 85, 35, 86, 87, 88, 89, 90, 91, 92, 93] for
the development and subsequent applications of this formalism). In particular,
this enables us to preserve the higher-group [94] and non-invertible [23, 72]
symmetries of $O(2)$ gauge theory at finite lattice spacing. As mentioned
above, one of the main motivations of this work is to study the implications
of these generalized symmetries using a concrete lattice realization.

The higher-group symmetry involves the $\mathbb{Z}_{2,e}^{(1)}$ and
$\mathbb{Z}_{2,m}^{(d-3)}$ electric and magnetic symmetries (the invertible
subgroups of $U(1)_{e}^{(1)}$ and $U(1)_{m}^{(d-3)}$ in the $U(1)$ theory
which commute with the action of charge conjugation) as well as the dual, or
quantum, symmetry $\mathbb{Z}_{2,v}^{(d-2)}$ arising from the suppression of
dynamical twist vortices. The higher-group arises from the fact that
$\mathbb{Z}_{2,e}^{(1)}$ and $\mathbb{Z}_{2,m}^{(d-3)}$ are consistent
symmetries on their own, but one cannot turn on backgrounds for both
symmetries simultaneously without also activating $\mathbb{Z}_{2,v}^{(d-2)}$.
As we discuss in Sections 4 and 5, the higher-group has important implications
for the physics of twist vortices. In particular, the twist vortex must
support charged degrees of freedom in order to match anomaly inflow from the
bulk, and the higher-group constrains how these degrees of freedom couple to
the bulk electric and magnetic symmetries. Our analysis of twist vortices
clarifies the connection between the notion of ‘Cheshire charges’ in lattice
models of condensed matter systems [95, 96, 38, 97] to the treatment of Alice
strings in continuum high-energy physics [61, 60].

The non-invertible symmetries we study here are among the simplest — they
arise from gauging a discrete 0-form symmetry which acts non-trivially on
invertible symmetries. This class of symmetries has been studied in a number
of works, for instance Refs. [67, 23, 72, 98, 99, 100, 101, 73, 102, 16, 103,
104, 54, 105], and we follow Ref. [54] and refer to them as ‘coset’ non-
invertible symmetries. In the context of $O(2)$ gauge theory, we have electric
and magnetic coset non-invertible symmetries which we denote by
$(O(2)/\mathbb{Z}_{2})_{e}^{(1)}$ and $(O(2)/\mathbb{Z}_{2})_{m}^{(d-2)}$ —
these are the non-invertible counterparts of $U(1)_{e}^{(1)}$ and
$U(1)_{m}^{(d-3)}$ in the $U(1)$ theory. In our lattice construction, the non-
invertibility arises from the need to dress the symmetry operators with
condensation defects which effectively ‘ungauge’ charge conjugation on the
defect. The non-invertible symmetries give rise to (sometimes subtle)
selection rules, and their realization can be used to label phases of the
lattice theory. For instance, near the continuum limit the non-invertible
electric and magnetic symmetries are spontaneously broken, and this phase is
robust to the introduction of dynamical magnetic monopoles and twist vortices
— we present a possible phase diagram in Section 7.

The remainder of the paper is organized as follows. We begin in Section 2 with
lattice preliminaries, and explain how to couple a generic Euclidean lattice
theory to gauge fields for charge conjugation. In Section 2.1 we describe how
to use projection operators, or condensation defects, to construct gauge-
invariant extended operators in a theory where charge conjugation symmetry is
gauged. The construction is also used to define twisted-sector _extended_
operators. We apply these methods to $O(2)$ gauge theory in Section 3, and
observe that the fusion rules of our unconventionally-defined Wilson lines
match the representation theory of $O(2)$. In Section 4 we discuss the higher-
group symmetry of $O(2)$ gauge theory at the lattice level, and analyze its ’t
Hooft anomaly. We also use the higher-group to derive a charge relation for
degrees of freedom on twist vortices, which we study in more detail in Section
5. There we give explicit examples of worldvolume degrees of freedom which
cancel anomaly inflow from the bulk, their consistency with the higher-group,
and the possible junctions with Wilson and ’t Hooft lines. In Section 6 we
construct the topological operators for the non-invertible electric and
magnetic symmetries, analyze their fusion and action on charged operators, and
discuss their selection rules. In Section 7 we give a possible phase diagram
of $O(2)$ gauge theory on the lattice with dynamical magnetic monopoles and
twist vortices. We conclude in Section 8 and give some directions for future
work.

Various technical details and ancillary results are collected in the
Appendices. In Appendix A we give explicit formulae for twisted (or
$\mathsf{C}$-covariant) exterior derivatives and cup products on the
(hyper)cubic lattice, together with some useful identities. In Appendix B we
prove the gauge-invariance of our unconventional definition of the $O(2)$
Wilson line. In Appendices C and D we present Villain lattice discretizations
of the orbifolded particle on a circle and compact boson theories, which
feature as the worldvolume degrees of freedom of twist vortices in three and
four dimensions, respectively. Finally, in Appendix E we compare the global
symmetries of pure gauge theories with gauge group $O(2)$ and its double cover
$Pin^{-}(2)$.

##  2 Generalities: Charge Conjugation on the Lattice

Throughout the paper we will be considering gauge theories defined on
Euclidean spacetime lattices $\Lambda$ with periodic boundary conditions, i.e.
with the topology of a torus. The lattice consists of sites (or $0$-cells,
denoted by $s$), links ($1$-cells $\ell$), plaquettes ($2$-cells $p$), cubes
($3$-cells $c$), and hypercubes ($4$-cells $h$), etc. depending on the
dimension. It will sometimes be useful to label an $i$-cell by a ‘root’ site
$s$ together with an ordered list of $i$ integers valued in $\\{1,\ldots,d\\}$
indicating the directions spanned by the $i$-cell. For instance we may denote
a plaquette in the 13 plane with root site $s$ as $p=(s,13)$. A field living
on an $i$-cell is referred to as an $i$-cochain, with
$\mathcal{C}^{i}(\Lambda,F)$ denoting the set of $F$-valued $i$-cochains (we
will consider $F=\mathbb{R},\mathbb{Z},\mathbb{Z}_{2}$ in this paper). We will
also make use of the dual lattice $\tilde{\Lambda}$, and a notion of Hodge
duality $\star$ exchanging $i$-cochains on $\Lambda$ with $(d-i)$-cochains on
$\tilde{\Lambda}$. Finally, it will be useful to use cup products and their
higher generalizations on the (hyper)cubic lattice [106], which are discrete
analogs of the continuum wedge product: the standard cup product joins
together an $i$\- and $j$-cochain to make a $(i+j)$-cochain. We refer the
reader to Appendix A and Refs. [76, 85] for more details regarding operations
on lattice cochains.

Working at the lattice level allows us to study charge conjugation symmetry
systematically by coupling the theory to discrete background gauge fields. For
ordinary $0$-form symmetries, the coupling to background fields is achieved by
replacing the finite difference operator $d$ acting on $0$-cochains with an
appropriate covariant derivative. Since charge conjugation acts on generic
$i$-cochains with $i\geq 0$, one has to first decide how an $i$-cochain
transforms under _local_ background gauge transformations, and subsequently
define an appropriate covariant derivative for generic $i$-cochains. This is
handled using the technology of twisted differentials.

To begin, let us describe the (for now background) charge conjugation gauge
field, which is a $\mathbb{Z}_{2}$-valued $1$-cochain
$\mathsf{C}\in\mathcal{C}^{1}(\Lambda,\mathbb{Z})$ equal to $\pm 1$ on each
link. Alternatively, we can write $\mathsf{C}=e^{i\pi C}$ with
$C\in\mathcal{C}^{1}(\Lambda,\mathbb{Z}_{2})$ equal to 0 or 1 on each
link.555Throughout the paper we use sans-serif fonts to indicate cochains
taking values in multiplicative presentation of the group, and ordinary fonts
for the additive presentation. Under a background gauge transformation,

$\mathsf{C}_{s,i}\to\mathsf{G}_{s}\,\mathsf{C}_{s,i}\,\mathsf{G}_{s+\hat{i}}\,,\quad
C\to C+dG\text{ mod }2\,,$ (1)

where $\mathsf{G}=e^{i\pi G}\in\mathcal{C}^{0}(\Lambda,\mathbb{Z}_{2})$ is the
$\mathbb{Z}_{2}$-valued gauge parameter. In terms of cup products, we can
write the transformation rule as
$\mathsf{C}\to\mathsf{G}\cup\mathsf{C}\cup\mathsf{G}$. If we want the
background field to be flat, then we restrict $\prod_{\ell\in\partial
p}\mathsf{C}_{\ell}=1$, or equivalently $dC=0$ mod $2$. Then we have
$\mathsf{C}\in Z^{1}(\Lambda,\mathbb{Z}_{2})$. Modding out by gauge
transformations, which are exact $1$-cochains (or coboundaries) $dG\in
B^{1}(\Lambda,\mathbb{Z}_{2})$, $\mathsf{C}$ can be viewed as the
representative of a class in
$H^{1}(\Lambda,\mathbb{Z}_{2})=Z^{1}(\Lambda,\mathbb{Z}_{2})/B^{1}(\Lambda,\mathbb{Z}_{2})$.

Dynamical fields $X\in\mathcal{C}^{i}(\Lambda,F)$ transform under charge
conjugation as $X\to(-1)^{Q_{\mathsf{C}}}X$ with $Q_{\mathsf{C}}=0,1$. We
promote this to a local transformation via the rule

$X_{s,\,j_{1}j_{2}\ldots
j_{i}}\to\mathsf{G}_{s}^{Q_{\mathsf{C}}}\,X_{s,\,j_{1}j_{2}\ldots
j_{i}}\,,\text{ or }X\to\mathsf{G}^{Q_{\mathsf{C}}}\cup X\,.$ (2)

Intuitively, a $\mathsf{C}$-odd $i$-cochain transforms under local
$\mathsf{C}$-gauge transformations at the ‘root site’ from which it emanates.
Let $X$ be $\mathsf{C}$ odd, with $Q_{\mathsf{C}}=1$. We define the (left)
charge conjugation-covariant derivative, or twisted differential, to be

$d_{\mathsf{C}}X\equiv dX+(\mathsf{C}-\mathbbm{1})\cup X=dX-2C\cup X\,,$ (3)

recalling that $C$ takes values 0 or 1. Here we have introduced the
$i$-cochain $\mathbbm{1}$ which is equal to $+1$ on each positively oriented
$i$-cell (the degree of this cochain should be obvious from context). We refer
the reader to Appendix A for an explicit formula for the above twisted
differential, with relevant examples shown graphically in Fig. 18. Eq. (3)
indeed defines a covariant derivative — under a gauge transformation (see
Appendix A for the derivation)

$d_{\mathsf{C}}X\to d_{\mathsf{G}\cup\mathsf{C}\cup\mathsf{G}}(\mathsf{G}\cup
X)=\mathsf{G}\cup d_{\mathsf{C}}X\,.$ (4)

A crucial point is that while the ordinary differential $d$ is nilpotent, i.e.
$d^{2}=0$, the twisted differential is in general not. Instead (again see
Appendix A),

$d_{\mathsf{C}}^{2}X=\mathsf{C}\cup\mathsf{C}\cup X\,.$ (5)

Unpacking the cup product on the right hand side,

$(\mathsf{C}\cup\mathsf{C})_{s,ij}=\mathsf{C}_{s,i}\mathsf{C}_{s+\hat{i},j}(1-e^{i\pi(dC)_{s,ij}})=-2\mathsf{C}_{s,i}\mathsf{C}_{s+\hat{i},j}\,\overline{(dC)}_{s,ij}\,,$
(6)

where $\overline{dC}\equiv dC\text{ mod }2$.666Throughout the following,
barred quantities refer to their reduction modulo $2$. We learn that the
twisted differential is nilpotent, $d_{\mathsf{C}}^{2}=0$, _only_ if the
$\mathsf{C}$ gauge field is flat. This is familiar from the continuum, where
the exterior covariant derivative associated to a non-flat connection fails to
be nilpotent.

When $\mathsf{C}$ is a background field, we are free to consider only flat
gauge field configurations. It is often useful to view a background
$\mathbb{Z}_{2}$ gauge field configuration in terms of its Poincaré dual — for
each $\mathsf{C}$ we can write

$\mathsf{C}=e^{i\pi\star[\tilde{\Omega}_{d-1}]}\,,\quad
C=\star[\tilde{\Omega}_{d-1}]\text{ mod }2\,,$ (7)

where $\tilde{\Omega}_{d-1}$ is a (not necessarily connected) codimension-1
surface on the dual lattice $\tilde{\Lambda}$, and
$\star[\tilde{\Omega}_{d-1}]\in\mathcal{C}^{1}(\Lambda,\mathbb{Z}_{2})$ is a
1-cochain whose value on a link is the oriented number of times the link
pierces $\tilde{\Omega}_{d-1}$. The flatness condition translates to the
condition that $\partial\tilde{\Omega}_{d-1}=0$ mod $2$, i.e.
$\tilde{\Omega}_{d-1}$ cannot have a boundary unless a multiple of two
codimension-1 surfaces end on it. Since $\tilde{\Omega}_{d-1}$ is only
physical mod 2, its orientation is unimportant, so we can think of every
_flat_ background $\mathsf{C}$ gauge field in terms of a collection of
_closed_ , unoriented codimension-1 surfaces. Intuitively, moving such a
surface past a charged operator implements the $\mathsf{C}$ action, as shown
in Fig. 1.

Figure 1: The charge conjugation action is implemented by sweeping its
associated codimension-1 symmetry defect past charged operators, such as the
local monopole operator $\mathcal{M}_{k}$ or Wilson line $W_{q}$ in 3d $U(1)$
gauge theory.

To make the charge conjugation gauge field dynamical, we simply replace
capital letters by lower case ones $\mathsf{C}\to\mathsf{c}$ and $C\to c$,
which are summed over in the path integral with weight

$\sum_{\mathsf{c}\in\mathcal{C}^{1}(\Lambda,\mathbb{Z}_{2})}=\
\prod_{\ell\in\Lambda}\sum_{\mathsf{c}_{\ell}=\pm 1}=\
\prod_{\ell\in\Lambda}\sum_{c_{\ell}=0,1}\,.$ (8)

This gives rise to a new Wilson loop observable,

$\eta(\gamma)=\prod_{\ell\in\gamma}\mathsf{c}_{\ell}=\exp\left(i\pi\sum_{\ell\in\gamma}c_{\ell}\right)\,,$
(9)

which is invariant under dynamical charge conjugation gauge transformations
$\mathsf{c}\to\mathsf{g}\cup\mathsf{c}\cup\mathsf{g}$ (or $c\to c+dg$)
provided $\gamma$ is a closed loop. In the context of $O(2)$ gauge theory,
$\eta(\gamma)$ is simply the Wilson loop associated to the one-dimensional
‘determinant’ representation which maps all group elements containing a
reflection to $-1$.

Note that in the path integral, we sum over all $\mathbb{Z}_{2}$ 1-cochains
$\mathsf{c}$ including field configurations which are not flat. We can
eliminate such configurations from the path integral by introducing a Lagrange
multiplier $v\in\mathcal{C}^{d-2}(\Lambda,\mathbb{Z}_{2})$, with coupling

$i\pi\sum_{d\text{-cells}}dc\cup v\,.$ (10)

We will refer to the field $v$ as the ‘twist field.’ It is a $(d-2)$-form
$\mathbb{Z}_{2}$ gauge field with its own gauge redundancy $v\to v+dt$ for
$t\in\mathcal{C}^{d-3}(\Lambda,\mathbb{Z}_{2})$. Provided the only term in the
action involving $v$ is the one in Eq. (10), the twist field sets $dc=0$ mod
$2$, and the Wilson line $\eta(\gamma)$ becomes a topological line. It also
squares to 1, and so defines a $(d-2)$-form $\mathbb{Z}_{2}$ symmetry
$\mathbb{Z}_{2,v}^{(d-2)}$ which shifts the twist field by a $\mathbb{Z}_{2}$
$(d-2)$-cocycle $\omega\in Z^{(d-2)}(\Lambda,\mathbb{Z}_{2})$,

$\mathbb{Z}_{2,v}^{(d-2)}:v\to v+\omega\,,\ d\omega=0\,.$ (11)

From the twist field we can construct codimension-$2$ operators

$T(\Gamma_{d-2})=\exp\left(i\pi\sum_{(d-2)\text{-cells}\in\Gamma}v\right)\,,$
(12)

whose effect is to force the charge conjugation gauge field to be non-flat
precisely at the location of the insertion,

$dc=\star[\Gamma^{\vee}_{d-2}]\text{ mod }2\,.$ (13)

In other words, we must sum over codimension-1 surfaces $\tilde{\Omega}_{d-1}$
subject to the constraint $\partial\tilde{\Omega}_{d-1}=\Gamma^{\vee}_{d-2}$.
Here $\Gamma^{\vee}_{d-2}$ is a codimension-2 surface on the dual lattice
obtained from $\Gamma_{d-2}$ by applying a shift in the
$-\frac{\hat{1}+\hat{2}+\cdots+\hat{d}}{\sqrt{d}}$ direction, so that

$[\Gamma^{\vee}_{d-2}]_{\tilde{s},\,j_{1},j_{2},\ldots,j_{d-2}}=[\Gamma_{d-2}]_{\tilde{s}-\frac{1}{2}(\hat{1}+\hat{2}+\cdots+\hat{d}),\,j_{1},j_{2},\ldots,j_{d-2}}\,,$
(14)

and we define a similar shift in the
$+\frac{\hat{1}+\hat{2}+\cdots+\hat{d}}{\sqrt{d}}$ direction so that
$(\Gamma^{\vee})^{\wedge}=(\Gamma^{\wedge})^{\vee}=\Gamma$. We follow [72] and
refer to the operator (12) as the ‘twist vortex.’ It is the charged object
under the dual, or ‘quantum,’ symmetry generated by $\eta(\gamma)$.

Up to this point, our discussion has been very general and can be applied to
any lattice quantum field theory with a charge conjugation symmetry. Since we
will be mostly focused on lattice gauge theories, we need to consider one
further point, namely how dynamical gauge redundancies are modified in the
presence of charge conjugation backgrounds. Simply put, a $\mathsf{C}$-odd
$i$-form gauge field $Y\in\mathcal{C}^{i}(\Lambda,F)$ which shifts by the
exterior derivative $Y\to Y+dV$ of a $(i-1)$-form
$V\in\mathcal{C}^{i-1}(\Lambda,F)$ must now shift by the
$\mathsf{C}$-covariant derivative, $Y\to Y+d_{\mathsf{C}}V$. This ensures that
the resulting gauge parameters compose according to the semi-direct product
$F\rtimes\mathbb{Z}_{2}$, so that for instance doing a $\mathsf{C}$-gauge
transformation after an $F$ gauge transformation flips the sign of the
original $F$ gauge transformation,
$(1,\mathsf{G})\circ(V,1)=(\mathsf{G}V,\mathsf{G})$.

Figure 2: The codimension-1 charge conjugation defect hosts a junction
(represented by the black dot) between Wilson lines with charge $q$ and $-q$,
which is gauge invariant thanks to the twisted gauge transformations (15).
Background gauge transformations topologically deform the surface,
‘converting’ $W_{q}$ into $W_{-q}$ in the process.

As a concrete example, and the one which is most relevant for the remainder of
the paper, consider a $U(1)$ gauge field in the Villain formulation. The
ingredients are a real link field $a\in\mathcal{C}^{1}(\Lambda,\mathbb{R})$
and an integer plaquette field $n\in\mathcal{C}^{2}(\Lambda,\mathbb{Z})$. Both
fields are $\mathsf{C}$-odd, transforming as $a\to\mathsf{G}\cup a$ and
$n\to\mathsf{G}\cup n$. In the presence of charge conjugation background
fields, the small (parameterized by
$\lambda\in\mathcal{C}^{0}(\Lambda,\mathbb{R})$) and large (parameterized by
$m\in\mathcal{C}^{1}(\Lambda,\mathbb{Z})$) gauge transformation rules become

$a\to a+d_{\mathsf{C}}\lambda+2\pi m\,,\ n\to n+d_{\mathsf{C}}m\,.$ (15)

This twisted gauge transformation rule also has a pleasing interpretation in
terms of the junctions between non-local operators which meet at a
codimension-1 surface implementing the charge conjugation action, as depicted
in Fig. 2. In words, given a link variable which pierces the charge
conjugation defect, the twist flips the sign of the gauge parameter on one
side of the defect, allowing for a gauge-invariant junction between Wilson
lines of charge $q$ and $-q$.

The final technical ingredient for our construction is a $\mathsf{C}$-twisted
version of the cup product. Such twisted cup products were for instance
discussed in Appendix A of Ref. [107] on triangulations, and we give explicit
formulae for the twisted cup products on (hyper)cubic lattices in Appendix A
(in particular, see Fig. 19 for a figure with some relevant examples in 3d).
Intuitively, the twisted cup product $X\cup_{\mathsf{C}}Y$ between $p$\- and
$q$-cochains $X$ and $Y$ with $\mathsf{C}$ charges $Q_{\mathsf{C}}^{X}$ and
$Q_{\mathsf{C}}^{Y}$ is a $(p+q)$-cochain with $\mathsf{C}$ charge
$Q_{\mathsf{C}}^{X}+Q_{\mathsf{C}}^{Y}$. The crucial feature of the twisted
cup product is that it obeys a Leibniz rule with respect to the
$\mathsf{C}$-covariant exterior derivative. In particular, when both $X$ and
$Y$ are $\mathsf{C}$ odd, we have

$d(X\cup_{\mathsf{C}}Y)=d_{\mathsf{C}}X\cup_{\mathsf{C}}Y+(-1)^{p}\,X\cup_{\mathsf{C}}d_{\mathsf{C}}Y\,,$
(16)

provided $\mathsf{C}$ is flat.777The twisted cup products are also non-
associative in the presence of non-flat $\mathsf{C}$ gauge fields. This allows
us to ‘sum by parts’ on closed manifolds.

###  2.1 Constructing Gauge-Invariant Operators

The operators of a quantum field theory with gauged charge conjugation
symmetry fall into distinct classes. One class consists of new operators which
arise from gauging but which were not present before, such as the Wilson line
$\eta$ and twist vortex $T$ we discussed above. The second class consists of
operators which were present in the ungauged theory, and can be organized
under their parity under charge conjugation — roughly speaking, neutral
operators survive in the gauge theory while odd operators are projected out.
For local operators it is straightforward to form charge conjugation
eigenstates by taking symmetric and antisymmetric linear combinations of
operators exchanged by $\mathsf{C}$. The former give rise to gauge-invariant
operators in the gauged theory, while the latter become twisted-sector
operators, i.e. non-genuine local operators living at the endpoints of the
topological line $\eta$. For instance, the local monopole operator
$e^{i\sigma_{s}}$ in the 3d $U(1)$ gauge theory survives in the $O(2)$ theory
as $\mathcal{M}(s)=e^{i\sigma_{s}}+e^{-i\sigma_{s}}$. On the other hand, for
extended operators this procedure is more subtle, since the local action of
charge conjugation in general only transforms a _portion_ of a non-local
operator. As a result, the naive symmetric linear combination of e.g. a Wilson
loop, $W_{q}(\gamma)+W_{-q}(\gamma)$, is not invariant under local charge
conjugation gauge transformations. The purpose of this section is to make the
intuitive notion of a linear combination of extended operators precise, at the
nonperturbative lattice level.

To illustrate the basic construction, we start with the quintessential
extended operator, namely the Wilson line of $U(1)$ gauge theory. As we
described above, the simple linear combination of lines $W_{q}+W_{-q}$ is not
locally charge conjugation-invariant. As a naive first attempt to fix this
issue, let us sum over the gauge orbits of each segment of the Wilson line
_before_ taking the product over all links, and write

$W_{q}(\gamma)\stackrel{{\scriptstyle?}}{{=}}\prod_{\ell\in\gamma}\sum_{\hat{\mathsf{g}}_{\ell}=\pm
1}e^{iq\,\hat{\mathsf{g}}_{\ell}\,a_{\ell}}=\prod_{\ell\in\gamma}\cos(q\,a_{\ell})\,.$
(17)

While this is clearly $\mathsf{c}$ gauge invariant, it is not invariant under
$U(1)\subset O(2)$ gauge transformations! Expanding the $2^{|\gamma|}$ terms
in a given fixed $\mathsf{c}$ background, only two (or zero) terms from the
above sum will be gauge invariant under $a\to a+d_{\mathsf{c}}\lambda$. This
is not detrimental, since the remaining gauge-non-invariant terms will be
projected out in any correlation function with gauge-invariant operators.
However, depending on the context (for instance a Monte Carlo simulation) it
may be inconvenient or impractical to use such a non-gauge-invariant
representation of the Wilson loop. What’s more, we can do better.

Before proceeding, let us note an amusing fact: _none_ of the terms in the
expansion of Eq. (17) are $U(1)$ gauge-invariant in a $\mathsf{c}$ background
for which $\eta(\gamma)=-1$. Therefore the only field configurations which
contribute to correlation functions of Wilson loops have $\eta(\gamma)=1$, so
we can write $W_{q}(\gamma)\,\eta(\gamma)=W_{q}(\gamma)$ as an operator
identity. This says that the charge-$q$ Wilson line can ‘absorb’ the
$\mathsf{c}$ Wilson line, and suggests that a gauge-invariant definition of
$W_{q}(\gamma)$ will involve a projection operator

$P(\gamma)=\frac{1+\eta(\gamma)}{2}\,.$ (18)

We now describe how to make $W_{q}(\gamma)$ fully gauge-invariant. Inspired by
a related construction in Ref. [65] (see also Ref. [108] and more recently
Ref. [53]), we begin by choosing a basepoint $*$ on $\gamma$, and for each
link $\ell\in\gamma$, a path $\gamma_{\ell,*}$ lying in $\gamma$ which
connects the basepoint to the site from which $\ell$ emanates. We refer to
this set of paths $\\{\gamma_{\ell,*}\\}$ as the _scaffolding_ of the curve
$\gamma$. Then we define888In the original construction of Ref. [65] upon
which the definition here is inspired, the projection factor $P(\gamma)$ is
absent and replaced with the requirement that the union of all scaffolding
paths contains no closed loops. Furthermore, the paths were not restricted to
lie on $\gamma$, which introduces ambiguities in the choice of paths.

$W_{q}(\gamma)\equiv P(\gamma)\sum_{\hat{\mathsf{g}}_{*}=\pm
1}\exp\left(iq\,\hat{\mathsf{g}}_{*}\sum_{\ell\in\gamma}\eta(\gamma_{\ell,*})\,a_{\ell}\right)\,.$
(19)

The operator is defined such that under $\mathsf{c}$ gauge transformations,
each term in the exponent transforms covariantly _at the basepoint_. In other
words, for each $\ell\in\gamma$, we have that
$\eta(\gamma_{\ell,*})a_{\ell}\to\mathsf{g}_{*}\eta(\gamma_{\ell,*})a_{\ell}$
under a general $\mathsf{c}$ gauge transformation. The operator is rendered
$\mathsf{c}$-gauge invariant by summing over gauge transformations at the
basepoint. Equivalently, we can view $\hat{\mathsf{g}}_{*}$ as a degree of
freedom localized at the basepoint, and assign
$\hat{\mathsf{g}}_{*}\to\mathsf{g}_{*}\hat{\mathsf{g}}_{*}$ under $\mathsf{c}$
gauge transformations. The above definition is independent of the choice of
basepoint, since we can effectively shift its location by redefining
$\hat{\mathsf{g}}_{*}\to\hat{\mathsf{g}}_{*}\,\eta(\gamma_{*,*^{\prime}})$,
where $\gamma_{*,*^{\prime}}$ is a path in $\gamma$ connecting the old and new
basepoints.

Figure 3: An example of a curve $\gamma$ and the scaffolding paths
$\gamma_{\ell,*}$ connecting the basepoint $*$ to the root site (indicated by
the black circle) of each link. Under a $\mathsf{c}$ gauge transformation,
each term transforms by multiplication by $\mathsf{g}_{*}$.

The operator appears to be quite non-local, depending on the scaffolding paths
$\gamma_{\ell,*}$. On the other hand, we expect the dependence to be quite
mild since $\eta$ is a topological operator. In fact, Eq. (19) is completely
independent of the choice of paths $\gamma_{\ell,*}$. To see this, we note
that the projection factor $P(\gamma)$ ensures that the $\mathsf{c}$-holonomy
evaluated on the difference of any two paths from a given link to the
basepoint will be trivial. When $\gamma$ is contractible this would be true
without the projection factor (assuming the absence of twist vortices).
However, when $\gamma$ is non-contractible, two paths from a given link to the
basepoint may differ by $\gamma$ itself, leading to a sign ambiguity if
$\eta(\gamma)=-1$. The factor $P(\gamma)$ enforces $\eta(\gamma)=+1$, thereby
eliminating this ambiguity. We conclude that the Wilson loop does not depend
on the choice of scaffolding used to define it in Eq. (19).

Finally, it is not immediately obvious that we have achieved our original goal
of defining a Wilson loop which is invariant under $U(1)\subset O(2)$ gauge
transformations. The argument is slightly involved and is presented in
Appendix B.

If we restrict ourselves to configurations where $\mathsf{c}=1$ near $\gamma$,
the complicated expression in Eq. (19) reduces to the naive linear combination
$W_{q}(\gamma)=W_{q}^{U(1)}(\gamma)+W_{-q}^{U(1)}(\gamma)$, while more
generally, it reduces to the earlier definition in Eq. (17) in any fixed field
configuration of $\mathsf{c}$. Hence Eq. (19) provides a fully gauge-invariant
alternative to the naive definition in Eq. (17).

The same construction can be generalized to an arbitrary operator in the pre-
gauged theory defined on a (closed) submanifold $\Sigma_{i}$ which is built
from the exponential of a $\mathsf{c}$-odd $i$-cochain $X$. First one chooses
a scaffolding: a basepoint $*$ and a set of paths $\gamma_{i,*}$ lying in
$\Sigma_{i}$ from the root site of each $i$-cell in $\Sigma_{i}$ to the
basepoint. Then we can define the gauge invariant operator

$\mathcal{O}_{\alpha}(\Sigma_{i})=P(\Sigma_{i})\sum_{\hat{\mathsf{g}}_{*}=\pm
1}\exp\left(i\alpha\,\hat{\mathsf{g}}_{*}\sum_{\text{$i$-cells}\in\Sigma_{i}}\eta(\gamma_{i,*})\,X_{i}\right)\,,$
(20)

where the projector is proportional to the sum over lines $\eta(\gamma)$ on
the homology cycles of $\Sigma_{i}$,

$P(\Sigma_{i})=\frac{1}{|H_{1}(\Sigma_{i},\mathbb{Z}_{2})|}\sum_{\gamma\in
H_{1}(\Sigma_{i},\mathbb{Z}_{2})}\eta(\gamma)\,.$ (21)

This ensures that the operator (20) is independent of the choice of
scaffolding. Up to the normalization factor, the above projector is an example
of a condensation defect [95, 96, 56, 109, 97] — an operator defined by
summing over (in other words condensing) higher codimension operators on its
worldvolume. More specifically, this condensation defect is equivalent to
higher-gauging the $\mathbb{Z}_{2,v}^{(d-2)}$ symmetry on $\Sigma_{i}$. Such
condensation defects have been studied in detail from this perspective in Ref.
[56]. We can also write the condensation defect as a $\mathbb{Z}_{2}$ gauge
theory on $\Sigma_{i}$ coupled to the charge conjugation gauge field,999The
normalization factor is (see e.g. Appendix A of Ref. [26])
$\mathcal{X}=\frac{|H^{i-2}(\Sigma_{i},\mathbb{Z}_{2})||H^{i-4}(\Sigma_{i},\mathbb{Z}_{2})|\cdots}{|H^{i-1}(\Sigma_{i},\mathbb{Z}_{2})||H^{i-3}(\Sigma_{i},\mathbb{Z}_{2})|\cdots}\frac{2^{\\#(i-3)\text{-cells}+\\#(i-5)\text{-cells}+\cdots}}{2^{\\#i\text{-cells}+\\#(i-2)\text{-cells}+\cdots}}\,.$
(22)

$P(\Sigma_{i})=\mathcal{X}\sum_{\begin{subarray}{c}u\in\mathcal{C}^{0}(\Sigma_{i},\mathbb{Z}_{2}),\\\
b\in\mathcal{C}^{i-1}(\Sigma_{i},\mathbb{Z}_{2})\end{subarray}}\exp\left(i\pi\sum_{\text{$i$-cells}\in\Sigma_{i}}c\cup
b+u\cup db\right)\,.$ (23)

The 0-form field $u$ shifts by $u\to u+g$ under charge conjugation, and (for
$i\geq 2$) we impose the gauge redundancy $b\to b+dz$ with
$z\in\mathcal{C}^{i-2}(\Sigma_{i},\mathbb{Z}_{2})$. Notably, this is only
respected provided $c$ is flat, which means that twist vortex insertions are
not allowed to pierce $\Sigma_{i}$.101010More specifically, we must assign
$v\to v+z\cup\star[\Sigma^{\wedge}]$ in the presence of a condensation defect.
This means that the intersection locus between $\Gamma$ and $\Sigma$ is not
gauge-invariant under the worldvolume gauge redundancies. This can be
cancelled by attaching a $b$ Wilson operator on the condensation defect, which
generates the higher quantum symmetry [56] acting as shifts of $u$.  This
representation is equivalent to (18) since summing over $u$ sets $db=0$ mod
$2$, so that $b$ is Poincaré dual to closed curves $\gamma\in
Z_{1}(\Sigma_{i},\mathbb{Z}_{2})$. The coupling $i\pi\sum c\cup b$ is
equivalent to $i\pi\sum_{\gamma}c$, and summing over $b$ (equivalently
$\gamma$) reproduces Eq. (18). This way of writing the projector also provides
the following useful perspective: the projector _ungauges_ the charge
conjugation symmetry at the location of the defect. To see this, we can
instead sum over $b$ first, which sets $c=du$ mod $2$ along $\Sigma_{i}$, i.e.
sets $c$ to be pure gauge. This is to be expected, since the condensation
defect gauges the dual symmetry obtained from gauging $\mathsf{c}$ to begin
with, and gauging the dual symmetry returns back the ungauged theory [110].

As an example, let us apply the more general construction (20) to the magnetic
flux surfaces in $O(2)$ gauge theory. Specifically, we start with the magnetic
flux operator in the $U(1)$ theory,

$V_{\alpha}^{U(1)}(S)=\exp\left(i\alpha\sum_{p\in S}n_{p}\right)\,.$ (24)

We can construct the gauge-invariant image of this operator in the $O(2)$
theory by picking a scaffolding of $S$ (see Fig. 4 for an example) and writing

$V_{\alpha}(S)=P(S)\sum_{\hat{\mathsf{g}}_{*}=\pm
1}\exp\left(i\alpha\,\hat{\mathsf{g}}_{*}\sum_{p\in
S}\eta(\gamma_{p,*})\,n_{p}\right)\,,$ (25)

where in this case the projector is

$P(S)=\frac{|H^{0}(S,\mathbb{Z}_{2})|}{|H^{1}(S,\mathbb{Z}_{2})|}\frac{1}{2^{\\#\text{plaq.}+\\#\text{sites}}}\sum_{\begin{subarray}{c}u\in\mathcal{C}^{0}(S,\mathbb{Z}_{2}),\\\
b\in\mathcal{C}^{1}(S,\mathbb{Z}_{2})\end{subarray}}\exp\left(i\pi\sum_{p\in
S}c\cup b+u\cup db\right)\,.$ (26)

One can use a generalization of the argument in Appendix B to show that the
above operator is invariant under large $U(1)$ gauge transformations which
shift $n\to n+d_{\mathsf{c}}m$. We will discuss the properties of
$V_{\alpha}(S)$ in more detail later in Section 6.2 where we show that it
generates a non-invertible magnetic symmetry. Finally, we note that the
operator in $U(1)$ gauge theory that measures magnetic flux mod $2$ is charge
conjugation-invariant, so if we set $\alpha=\pi$ we have the relation

$V_{\pi}(S)=2P(S)V_{\pi}^{U(1)}(S)\,.$ (27)

In particular, both $V_{\pi}^{U(1)}$ and $V_{\pi}$ are valid operators in the
$O(2)$ theory.

Figure 4: An example of a closed surface $S$ on the lattice and some of the
scaffolding paths $\gamma_{p,*}$ needed to define the surface operator
$V_{\alpha}(S)$ in Eq. (25).

The above construction can also be extended to manifolds $\Sigma_{i}$ with
boundary — one simply imposes Dirichlet boundary conditions for the gauge
field $b$ and includes an additional projector for the boundary components
$\partial\Sigma_{i}$. For instance, consider an open line $L_{x,y}$ consisting
of $|L|$ sites, and with no self-intersections. To build an open Wilson line,
we can start with a charge-$q$ matter field $\varphi$, transforming as
$\varphi\to\varphi+q\lambda$, and write

$W_{q}(L_{x,y})=P(L_{x,y})P(\partial L_{x,y})\sum_{\hat{\mathsf{g}}_{*}=\pm
1}\exp\left(i\hat{\mathsf{g}}_{*}\sum_{\ell\in
L_{x,y}}\eta(\gamma_{\ell,*})(qa_{\ell}-(d_{\mathsf{c}}\varphi)_{\ell})\right)\,.$
(28)

The boundary projector is trivial and

$P(L_{x,y})=\frac{1}{2^{|L|}}\sum_{\begin{subarray}{c}u\in\mathcal{C}^{0}(L_{x,y},\mathbb{Z}_{2}),\\\
b\in\mathcal{C}^{0}(L_{x,y},\mathbb{Z}_{2}),b_{x}=b_{y}=0\end{subarray}}\exp\left(i\pi\sum_{\ell\in
L_{x,y}}c\cup b+u\cup db\right)=1\,,$ (29)

since the only $\mathbb{Z}_{2}$ $0$-cocycle on $L$ obeying the Dirichlet
boundary conditions is $b=0$. Intuitively, since a line segment has no non-
trivial cycles, there are no ambiguities in the choices of scaffolding paths,
so there is no need for a projector. Finally, if we note that

$\sum_{\ell\in
L_{x,y}}\eta(\gamma_{\ell,*})(d_{\mathsf{c}}\varphi)_{\ell}=\eta(\gamma_{y,*})\,\varphi_{y}-\eta(\gamma_{x,*})\,\varphi_{x}\,,$
(30)

we can write a more compact expression for the open Wilson line

$W_{q}(L_{x,y})=\sum_{\hat{\mathsf{g}}_{*}}\exp\left(-i\hat{\mathsf{g}}_{*}\,\eta(\gamma_{x,*})\,\varphi_{x}\right)\exp\left(iq\,\hat{\mathsf{g}}_{*}\sum_{\ell\in
L_{x,y}}\eta(\gamma_{\ell,*})\,a_{\ell}\right)\exp\left(i\hat{\mathsf{g}}_{*}\,\eta(\gamma_{y,*})\,\varphi_{y}\right)\,.$
(31)

Finally, while we have been focusing on the case when the charge conjugation
gauge field is flat, this is not strictly necessary. Relaxing the cocycle
condition $dc=0$ mod $2$ allows twist vortices as dynamical excitations, and
breaks the dual $\mathbb{Z}_{2,v}^{(d-2)}$ symmetry. As a result, we can no
longer interpret the projector (23) as the condensation defect obtained by
higher-gauging a symmetry (it is also no longer topological). Nonetheless, the
projector still forces the charge conjugation gauge field to be pure gauge,
making all $\mathsf{c}$-holonomies trivial on $\Sigma_{i}$. This is all that
is needed for the operator (20) to be gauge-invariant and independent of its
scaffolding.

####  2.1.1 Twisted Sector Operators

One can also use the recipe described above to construct twisted sector
operators, i.e. the images of $\mathsf{c}$-odd operators in the pre-gauged
theory. Let us start with the more familiar case of a local operator, for
instance the monopole operator in the twisted sector of 3d $O(2)$ gauge
theory. Such an operator lives at the endpoint of the dual symmetry line
$\eta$,

$\widetilde{\mathcal{M}}_{k}(s)\,\eta(\gamma_{s,\infty})=(e^{ik\sigma_{s}}-e^{-ik\sigma_{s}})\,\eta(\gamma_{s,\infty})=\sum_{\hat{\mathsf{g}}_{s}=\pm
1}\hat{\mathsf{g}}_{s}\,\,\eta(\gamma_{s,\infty})\,e^{ik\hat{\mathsf{g}}_{s}\sigma_{s}}\,,$
(32)

where $\gamma_{s,\infty}$ is a half-infinite line ending at the site $s$. The
last presentation above generalizes to non-local operators in the twisted
sector — we simply insert the basepoint degree of freedom
$\hat{\mathsf{g}}_{*}$ and multiply by a half-infinite line
$\eta(\gamma_{*,\infty})$ ending at the basepoint. In other words, starting
with a $\mathsf{c}$-odd $i$-cochain $X$, we have

$\widetilde{\mathcal{O}}_{\alpha}(\Sigma_{i};*)\,\eta(\gamma_{*,\infty})=P(\Sigma_{i})\sum_{\hat{\mathsf{g}}_{*}=\pm
1}\hat{\mathsf{g}}_{*}\,\eta(\gamma_{*,\infty})\,\exp\left(i\alpha\,\hat{\mathsf{g}}_{*}\sum_{\text{$i$-cells}\in\Sigma_{i}}\eta(\gamma_{i,*})\,X_{i}\right)\,.$
(33)

Note that while the two factors on the left-hand side individually depend on
the choice of basepoint $*$, their product does not. Such non-local twisted-
sector operators appear due to the action of non-invertible symmetries, as we
discuss in Sec. 6.

##  3 Villain Formulation of $O(2)$ Gauge Theory

We now turn to a specific application of the general ideas from the previous
sections. Our starting point is the modified Villain action for $U(1)$ gauge
theory in $d$ spacetime dimensions, which we take to be

$S_{U(1)}=\frac{\beta}{2}\sum_{\text{plaq.}}(da-2\pi
n)^{2}+i\sum_{d\text{-cells}}dn\cup\tilde{a}\,.$ (34)

This differs slightly from the action written down in Ref. [76] in that we
place the Lagrange multiplier field
$\tilde{a}\in\mathcal{C}^{d-3}(\Lambda,\mathbb{R})$ on the lattice instead of
the dual lattice. While this presentation obscures the lattice rotation
symmetry, it allows a more convenient coupling to $\mathsf{C}$ gauge fields —
we will return to the fate of rotation symmetry at the end of this section.
The gauge redundancies are

$\begin{split}a&\to a+d\lambda+2\pi m\,,\ n\to n+dm\,,\
\tilde{a}\to\tilde{a}+d\tilde{\lambda}+2\pi\tilde{m}\,,\\\
\lambda&\in\mathcal{C}^{0}(\Lambda,\mathbb{R})\,,\
\tilde{\lambda}\in\mathcal{C}^{d-4}(\Lambda,\mathbb{R})\,,\
m\in\mathcal{C}^{1}(\Lambda,\mathbb{Z})\,,\
\tilde{m}\in\mathcal{C}^{d-3}(\Lambda,\mathbb{Z})\,.\end{split}$ (35)

In four dimensions, $\tilde{a}$ is itself a 1-form $U(1)$ gauge field, namely
the magnetic gauge field, and in three dimensions $\tilde{a}\equiv\sigma$ is a
compact scalar, namely the dual photon. In two dimensions this field is
absent, and instead we have the option to write a $2\pi$-periodic theta term
$i\theta\sum n$ (we set the 4d lattice theta term [76, 84, 85] to zero for
simplicity).

To obtain the modified Villain action for $O(2)$ gauge theory, we simply
covariantize the derivative and cup product and include the coupling from Eq.
(10),111111This amounts to gauging $\mathsf{C}$ with a particular choice of
fractionalization class. We could in principle change this by shifting the
background field for the electric 1-form symmetry (discussed below) by
$B_{e}\to B_{e}+\frac{1}{2}dc$, and/or a similar shift for the magnetic
symmetry in 4d. Furthermore, for simplicity we omit the 3d Dijkgraaf-Witten
twist $\frac{i\pi}{2}c\cup dc$. We thank Z. Sun for discussions on these
points.

$S_{O(2)}=\frac{\beta}{2}\sum_{\text{plaq.}}(d_{\mathsf{c}}a-2\pi
n)^{2}+i\sum_{d\text{-cells}}d_{\mathsf{c}}n\cup_{\mathsf{c}}\tilde{a}+i\pi\sum_{d\text{-cells}}dc\cup
v\,.$ (36)

This action is designed to be invariant under dynamical $\mathsf{c}$-gauge
transformations parameterized by
$\mathsf{g}=(-1)^{g}\in\mathcal{C}^{0}(\Lambda,\mathbb{Z}_{2})$, which act as

$c\to c+dg\,,\ a\to\mathsf{g}\cup a\,,\ n\to\mathsf{g}\cup n\,,\
\tilde{a}\to\mathsf{g}\cup\tilde{a}\,.$ (37)

For the moment we restrict ourselves to on-shell configurations where $dc=0$
mod $2$, i.e. we do not consider insertions of twist vortices. In this case,
the covariant derivative $d_{\mathsf{c}}$ obeys the same Leibniz and
integration-by-parts identities as $d$, and the action is invariant under

$a\to a+d_{\mathsf{c}}\lambda+2\pi m\,,\ n\to n+d_{\mathsf{c}}m\,,\
\tilde{a}\to\tilde{a}+d_{\mathsf{c}}\tilde{\lambda}+2\pi\tilde{m}\,,\ v\to
v+dt\,.$ (38)

Continuing to assume that there are no twist vortex insertions, we can
integrate by parts and dualize the above action by writing it as

$\frac{1}{2\beta}\sum_{(d-2)\text{-cells}}z^{2}+i\sum_{d\text{-cells}}(d_{\mathsf{c}}a)\cup_{\mathsf{c}}z-n\cup_{\mathsf{c}}(d_{\mathsf{c}}\tilde{a}+2\pi
z)+i\pi\sum_{d\text{-cells}}dc\cup v\,,$ (39)

where $z\in\mathcal{C}^{d-2}(\Lambda,\mathbb{R})$ is a $\mathsf{c}$ odd
auxiliary field. Now the sum on $n$ sets $2\pi
z+d_{\mathsf{c}}\tilde{a}=2\pi\tilde{n}$ for some $\mathsf{c}$ odd integer
field $\tilde{n}\in\mathcal{C}^{d-2}(\Lambda,\mathbb{Z})$ which transforms as
$\tilde{n}\to\tilde{n}+d_{\mathsf{c}}\tilde{m}$. Integrating by parts again,
we arrive at a dual representation,

$\tilde{S}_{O(2)}=\frac{1}{2\beta(2\pi)^{2}}\sum_{(d-2)\text{-cells}}(d_{\mathsf{c}}\tilde{a}-2\pi\tilde{n})^{2}+i\sum_{d\text{-cells}}a\cup_{\mathsf{c}}d_{\mathsf{c}}\tilde{n}+i\pi\sum_{d\text{-cells}}dc\cup
v\,.$ (40)

In $d=4$ this is the S-dual $O(2)$ Lagrangian where the roles of the ($U(1)$
part of the) electric and magnetic gauge fields are reversed and the coupling
$\beta\to\frac{1}{(2\pi)^{2}\beta}$, while in $d=3$ this is simply the
modified Villain action for the 3d compact boson, with gauged charge
conjugation symmetry. Hence the exact lattice dualities of the modified
Villain $U(1)$ gauge theory commute with the operation of gauging charge
conjugation.

Any attempt to perform numerical Monte Carlo simulations directly with the
actions in either Eq. (36) or Eq. (40) would face a severe sign problem.
However, the sign problem can in principle be avoided by simply integrating
out the Lagrange multiplier fields. First, in the absence of twist vortex
insertions we can sum over $v$ in favor of the constraint $dc=0$ mod $2$. It
is straightforward to propose Monte Carlo updates which satisfy this
constraint, see for instance Refs. [111, 35] for examples. Second, integrating
out the dual field $\tilde{a}$ in Eq. (36) or the original gauge field $a$ in
Eq. (40) give the constraints

$d_{\mathsf{c}}n=0\ \Longrightarrow\ dn=2c\cup n\,,\text{ or
}d_{\mathsf{c}}\tilde{n}=0\ \Longrightarrow\ d\tilde{n}=2c\cup\tilde{n}\,.$
(41)

One likely needs more sophisticated techniques, for instance a modified
version of the surface worm algorithm [112], to efficiently generate
configurations satisfying such non-linear constraints. The point remains that
at least in principle, it is possible to simulate $O(2)$ gauge theory using
the non-abelian Villain formulation without a sign-problem.

We also hasten to mention that the action Eq. (36) does not respect the full
cubic rotational symmetry of the lattice. This can be traced back to the fact
that the local charge conjugation action (2) itself breaks rotation symmetry
by picking a preferred root site for each $i$-cochain. However, summing over
flat charge conjugation gauge fields does not introduce any local dynamics,
and should not affect local correlation functions sensitive to rotational
symmetry. Therefore, at least for flat gauging of charge conjugation, we
expect the full $SO(d)$ Euclidean rotational symmetry to emerge in the
continuum limit.

###  3.1 Wilson Lines and Representations

We now describe how the spectrum and fusion of Wilson lines in our modified
Villain theory match the representation theory of $O(2)$. In a more
conventional lattice discretization, Wilson lines are defined as traces of
path-ordered products of link matrices (i.e. characters in some
representation), so that their fusion automatically coincides with tensor
product decomposition. In our case this is less obvious, and matching the
tensor product decomposition of $O(2)$ representations serves as a non-trivial
check for our more unconventional Wilson loops.

The irreducible representations of $O(2)$ consist of two-dimensional irreps
$\mathbbm{2}_{q}$ (with $q>0$), a one-dimensional ‘det’ representation
$1_{\text{det}}$ (the adjoint), and a one-dimensional trivial representation
$\mathbbm{1}$, which satisfy

$\begin{split}\mathbbm{1}_{\det}&\otimes\mathbbm{1}_{\det}=\mathbbm{1}\,,\\\
\mathbbm{2}_{q}&\otimes\mathbbm{1}_{\det}=\mathbbm{2}_{q}\,,\\\
\mathbbm{2}_{q}&\otimes\mathbbm{2}_{q^{\prime}}=\mathbbm{2}_{q+q^{\prime}}\oplus\mathbbm{2}_{|q-q^{\prime}|}\,,\text{
for }q\not=q^{\prime}\\\
\mathbbm{2}_{q}&\otimes\mathbbm{2}_{q}=\mathbbm{2}_{2q}\oplus\mathbbm{1}\oplus\mathbbm{1}_{\det}\,.\end{split}$
(42)

The corresponding Wilson lines are identified as
$\mathbbm{2}_{q}\leftrightarrow W_{q}$ and
$\mathbbm{1}_{\det}\leftrightarrow\eta$. The first line above is matched by
the fact that the $\eta$ line generates a $\mathbb{Z}_{2}$ symmetry, and the
second line is matched by the projector in the definition of $W_{q}$ (this was
already discussed near Eq. (18) in Section 2.1).

Since we are at finite lattice spacing, we can compute the fusion of the
remaining non-topological Wilson lines by simply placing them on the same
contour $\gamma$ and re-expanding the result. Since the basepoints and
scaffolding paths can be chosen arbitrarily, we choose them to be the same for
the two lines being fused. Then, by rewriting the sum over gauge
transformations at the basepoint, we find

$W_{q}(\gamma)W_{q^{\prime}}(\gamma)=P(\gamma)P(\gamma)\sum_{\hat{\mathsf{g}}_{*}=\pm
1}\sum_{\hat{\mathsf{g}}_{*}^{\prime}=\pm
1}\exp\left(i(q\hat{\mathsf{g}}_{*}+q^{\prime}\hat{\mathsf{g}}_{*}^{\prime})\sum_{\ell\in\gamma}\eta(\gamma_{\ell,*})a_{\ell}\right)\\\
=P(\gamma)\sum_{\hat{\mathsf{g}}_{*}=\pm
1}\sum_{\hat{\mathsf{g}}_{*}^{\prime}=\pm\hat{\mathsf{g}}_{*}}\exp\left(i\hat{\mathsf{g}}_{*}(q+q^{\prime}\hat{\mathsf{g}}_{*}\hat{\mathsf{g}}_{*}^{\prime})\sum_{\ell\in\gamma}\eta(\gamma_{\ell,*})a_{\ell}\right)\\\
=W_{q+q^{\prime}}(\gamma)+W_{q-q^{\prime}}(\gamma)\,,$ (43)

where in the last line we performed the sum over
$\hat{\mathsf{g}}_{*}^{\prime}$. Note that $W_{q}=W_{-q}$ so this reproduces
the third line of Eq. (42). We also reproduce the last line of Eq. (42), since
setting $q^{\prime}=q$ gives

$W_{q}(\gamma)W_{q}(\gamma)=W_{2q}(\gamma)+W_{0}(\gamma)=W_{2q}(\gamma)+2P(\gamma)=W_{2q}(\gamma)+1+\eta(\gamma)\,.$
(44)

Finally, the same fusion rules apply to the ’t Hooft lines in 4d, defined as
Wilson lines of the magnetic gauge field $\tilde{a}$,

$H_{\tilde{q}}(\gamma)=P(\gamma)\sum_{\hat{\mathsf{g}}_{*}=\pm
1}\exp\left(i\tilde{q}\,\hat{\mathsf{g}}_{*}\sum_{\ell\in\gamma}\eta(\gamma_{\ell,*})\tilde{a}_{\ell}\right)\,.$
(45)

##  4 Higher-Group Symmetry

In this section we study the group-like, invertible symmetries of the $O(2)$
gauge theory on the lattice. As discussed in Section 2, gauging the charge
conjugation symmetry of the $U(1)$ theory gives rise to a dual
$\mathbb{Z}_{2,v}^{(d-2)}$ symmetry which acts on the codimension-2 twist
vortices. In addition, the gauging process breaks the $U(1)_{e}^{(1)}$ and
$U(1)_{m}^{(d-3)}$ symmetries down to their $\mathbb{Z}_{2}$ subgroups which
commute with the charge conjugation action. These three $\mathbb{Z}_{2}$
symmetries are however not independent, and combine into a non-trivial higher-
group [94].

We can uncover the higher-group structure by coupling to flat background
fields for the 1-form electric and $(d-3)$-form magnetic symmetries.
Specifically, we work with integer lifts of $\mathbb{Z}_{2}$ gauge fields,
$B_{e}\in\mathcal{C}^{2}(\Lambda,\mathbb{Z})$,
$B_{m}\in\mathcal{C}^{d-2}(\Lambda,\mathbb{Z})$, which are closed mod 2. The
action minimally coupled to background fields is

$S(B_{e},B_{m})=\frac{\beta}{2}\sum_{\text{plaq.}}(d_{\mathsf{c}}a-\pi
B_{e}-2\pi
n)^{2}+i\sum_{d\text{-cells}}\left(d_{\mathsf{c}}n+\frac{1}{2}d_{\mathsf{c}}B_{e}\right)\cup_{\mathsf{c}}\tilde{a}\\\
+i\pi\sum_{d\text{-cells}}\left(n+\frac{1}{2}B_{e}\right)\cup
B_{m}+i\pi\sum_{d\text{-cells}}c\cup dv\,.$ (46)

Before checking the invariance under background gauge transformations, let us
make sure that the dynamical gauge redundancies are respected. Since the
background fields are classical sources, they cannot transform under dynamical
gauge redundancies. As a result, the presence of $B_{e}$ in the gauge field
kinetic term spoils the usual $\mathsf{c}$ gauge transformations, and we must
augment the transformation rule of the Villain field $n$ by

$n\to\mathsf{g}\cup n+\frac{1}{2}(\mathsf{g}-\mathbbm{1})\cup B_{e}\,,$ (47)

such that the combination $n+\frac{1}{2}B_{e}$ transforms covariantly. Even
with this modification, the second line of Eq. (46) is not $\mathsf{c}$ gauge-
invariant, but shifts by

$\begin{split}\Delta
S=i\pi\sum_{d\text{-cells}}(\mathsf{g}-\mathbbm{1})\cup(n+\frac{1}{2}B_{e})\cup
B_{m}=i\pi\sum_{d\text{-cells}}g\cup B_{e}\cup B_{m}\text{ mod }2\pi
i\,.\end{split}$ (48)

This gauge variation is simply reflecting the mixed anomaly between
$\mathbb{Z}_{2,e}^{(1)}\times\mathbb{Z}_{2,m}^{(d-3)}$ and $\mathsf{C}$ in the
pure $U(1)$ gauge theory. As described in Ref. [110], gauging a symmetry which
participates linearly in such a discrete anomaly gives rise to some kind of
extension of the other symmetries participating in the anomaly. In this case,
gauging $\mathsf{C}$ gives rise to a higher-group. The anomalous variation
(48) simply states that the point-like intersection of a codimension-2
$\mathbb{Z}_{2,e}^{(1)}$ symmetry operator (surface in 4d and line in 3d) and
a $\mathbb{Z}_{2,m}^{(d-3)}$ surface is $\mathsf{C}$-odd. When we gauge
$\mathsf{C}$, a Wilson line $\eta$ must terminate at the intersection point to
render it gauge invariant. Since $\eta$ is the generator of
$\mathbb{Z}_{2,v}^{(d-2)}$, this means that turning on general backgrounds for
$\mathbb{Z}_{2,e}^{(1)}\times\mathbb{Z}_{2,m}^{(d-3)}$ requires us to turn on
(non-flat) backgrounds for $\mathbb{Z}_{2,v}^{(d-2)}$.

Indeed, let us turn on a background field
$B_{v}\in\mathcal{C}^{d-1}(\Lambda,\mathbb{Z})$ for the $(d-2)$-form twist
vortex symmetry,

$i\pi\sum_{d\text{-cells}}c\cup dv\ \to\ i\pi\sum_{d\text{-cells}}c\cup(dv-
B_{v})$ (49)

which itself shifts by

$i\pi\sum_{d\text{-cells}}g\cup dB_{v}$ (50)

under $\mathsf{c}$ gauge transformations. This variation would vanish for an
ordinary flat, $(d-1)$-form $\mathbb{Z}_{2}$ gauge field satisfying $dB_{v}=0$
mod $2$, but we can cancel Eq. (48) by twisting the flatness condition,

$dB_{v}=B_{e}\cup B_{m}\text{ mod }2\,,$ (51)

leading to a higher-group structure. This equation captures the fact that a
$\mathbb{Z}_{2,v}^{(d-2)}$ symmetry line must emanate from the point-like
intersection of $\mathbb{Z}_{2,e}^{(1)}$ and $\mathbb{Z}_{2,m}^{(d-3)}$
generators, as we described above. In three dimensions, we can equivalently
say that when a $\mathbb{Z}_{2,e}^{(1)}$-generating line pierces a
codimension-1 $\mathbb{Z}_{2,m}^{(0)}$ surface, it emerges as the line that
generates the diagonal
$\mathbb{Z}_{2}\subset\mathbb{Z}_{2,e}^{(1)}\times\mathbb{Z}_{2,v}^{(1)}$,
i.e. the 0-form magnetic symmetry permutes the 1-form symmetry lines $e$ and
$ev$. This is illustrated in Fig. 5.

Figure 5: The modified cocycle condition characterizing the 2-group in three
dimensions implies that when a $\mathbb{Z}_{2,e}^{(1)}$ line pierces a
codimension-1 $\mathbb{Z}_{2,m}^{(0)}$ surface, it emerges as the line for
$\mathbb{Z}_{2}\subset\mathbb{Z}_{2,e}^{(1)}\times\mathbb{Z}_{2,v}^{(1)}$. In
other words, the magnetic symmetry acts non-trivially on the 1-form symmetry
by exchanging the $e$ and $ev$ lines.

In order for this twisted cocycle condition to be background gauge invariant
(i.e. for the aforementioned junction to be topological), the background field
for the twist vortex symmetry must transform under gauge transformations for
the electric and magnetic symmetries,

$\begin{split}B_{e}&\to B_{e}+dV_{e}+2K_{e}\,,\\\ B_{m}&\to
B_{m}+dV_{m}+2K_{m}\,,\\\ B_{v}&\to B_{v}+dV_{v}+2K_{v}+V_{e}\cup
B_{m}+B_{e}\cup V_{m}+dV_{e}\cup V_{m}\,,\end{split}$ (52)

where
$V_{e}\in\mathcal{C}^{1}(\Lambda,\mathbb{Z}),V_{m}\in\mathcal{C}^{d-3}(\Lambda,\mathbb{Z}),V_{v}\in\mathcal{C}^{d-2}(\Lambda,\mathbb{Z})$
parameterize ‘small’ $\mathbb{Z}_{2}$ gauge transformations and
$K_{e}\in\mathcal{C}^{2}(\Lambda,\mathbb{Z}),K_{m}\in\mathcal{C}^{d-2}(\Lambda,\mathbb{Z}),K_{v}\in\mathcal{C}^{d-1}(\Lambda,\mathbb{Z})$
parameterize changes in the choices of integer lifts. This modified gauge
transformation rule for $B_{v}$ has a nice geometric interpretation in terms
of symmetry defects — it says that whenever we pass a $\mathbb{Z}_{2,e}^{(1)}$
generator through a $\mathbb{Z}_{2,m}^{(d-3)}$ surface (or visa versa), we
generate a $\mathbb{Z}_{2,v}^{(d-2)}$ line. This is depicted in Fig. 6. The
higher-group shift (52) is also consistent with ‘gauge transformations of
gauge transformations’ of the sort described in Refs. [1, 3, 113] whereby e.g.
we simultaneously take $V_{e}\to V_{e}+2X_{e},K_{e}\to K_{e}-dX_{e}$. Such a
shift represents a trivial gauge transformation and can be absorbed by taking
$K_{v}\to K_{v}-X_{e}\cup B_{m}$.

Figure 6: The higher-group gauge transformations (52) imply that a
$\mathbb{Z}_{2,v}^{(d-2)}$ line gets nucleated whenever a
$\mathbb{Z}_{2,e}^{(1)}$ generator and a $\mathbb{Z}_{2,m}^{(d-3)}$ surface
cross. In 4d, the $\mathbb{Z}_{2,e}^{(1)}$ generator above is a surface
spanning the suppressed fourth dimension while the $\mathbb{Z}_{2,m}^{(d-3)}$
and $\mathbb{Z}_{2,v}^{(d-2)}$ generators are localized.

###  4.1 Anomalies

Now we can check the background gauge transformation properties of the action
coupled to the higher-group background fields. The dynamical fields shift by

$\begin{split}\mathbb{Z}_{2,m}^{(d-3)}:&\ \tilde{a}\to\tilde{a}+\pi
V_{m}\,,\\\ \mathbb{Z}_{2,e}^{(1)}:&\ a\to a+\pi V_{e}\,,\ n\to
n+\frac{1}{2}(\mathsf{c}-\mathbbm{1})\cup V_{e}-K_{e}\,,\\\
\mathbb{Z}_{2,v}^{(d-2)}:&\ v\to v+V_{v}\,.\end{split}$ (53)

The unconventional shift of $n$ ensures that the combination
$d_{\mathsf{c}}a-2\pi n$ shifts by $\pi dV_{e}$ and not $\pi
d_{\mathsf{c}}V_{e}$. Under a background gauge transformation the action (Eq.
(46) plus Eq. (49)) is not invariant, but transforms by terms involving the
background fields and their gauge parameters (assuming no twist vortex
insertions)

$\Delta S=i\pi\sum_{d\text{-cells}}\left[(B_{e}+dV_{e})\cup
K_{m}+\frac{1}{2}V_{e}\cup dB_{m}\right]\in i\pi\mathbb{Z}\,.$ (54)

While at face value this seems to indicate that the mixed anomaly between
$\mathbb{Z}_{2,e}^{(1)}$ and $\mathbb{Z}_{2,m}^{(d-3)}$ in the $U(1)$ theory
survives in $O(2)$, since these symmetries are involved in a higher-group
there are more counter-terms available and it is possible for this putative
anomaly to be trivialized. This turns out to be the case in three
dimensions.121212This is entirely analogous to the fact that the $D_{8}$
symmetry of the $\mathbb{Z}_{2}$ orbifold of the compact boson CFT is anomaly
free [98]. To proceed, we note that the above phase can be cancelled by a bulk
inflow term

$\mathcal{A}=\frac{i\pi}{2}\sum_{(d+1)-\text{cells}}B_{e}\cup dB_{m}\,,$ (55)

assuming we can extend $B_{e}$ and $B_{m}$ to some bulk $(d+1)$-dimensional
lattice while maintaining their flatness. In three dimensions where $B_{m}$ is
a 1-cochain we can make use of the following identity (see Eq. (121) in
Appendix A),

$d\overline{B}_{m}=2B_{m}\cup B_{m}\text{ mod }4\,,$ (56)

which holds provided $dB_{m}=0$ mod $2$, to write the inflow action as

$\mathcal{A}=\frac{i\pi}{2}\sum_{\text{hyper-cu.}}B_{e}\cup dB_{m}-B_{e}\cup
d\overline{B}_{m}+2B_{e}\cup B_{m}\cup B_{m}\\\
=\frac{i\pi}{2}\sum_{\text{hyper-cu.}}B_{e}\cup
d(B_{m}-\overline{B}_{m})+2dB_{v}\cup B_{m}\\\
=\frac{i\pi}{2}\sum_{\text{hyper-
cu.}}d\left[B_{e}\cup(B_{m}-\overline{B}_{m})+2B_{v}\cup B_{m}\right]\,.$ (57)

In the second line we used the twisted cocycle condition Eq. (51), and in the
third line we used mod 2 flatness of $B_{e}$ and $B_{m}$ and the fact that
$B_{m}-\overline{B}_{m}\in 2\mathbb{Z}$. We see that the anomaly inflow action
is the total derivative of a local 3d counter-term whose variation cancels Eq.
(54). The correct coupling to 2-group background fields in three dimensions is
then

$S(B_{e},B_{m},B_{v})=\frac{\beta}{2}\sum_{\text{plaq.}}(d_{\mathsf{c}}a-\pi
B_{e}-2\pi
n)^{2}+i\sum_{\text{cubes}}\left(d_{\mathsf{c}}n+\frac{1}{2}d_{\mathsf{c}}B_{e}\right)\cup_{\mathsf{c}}\sigma\\\
+i\pi\sum_{\text{cubes}}\left(n+\frac{1}{2}B_{e}-B_{v}\right)\cup\overline{B}_{m}+i\pi\sum_{\text{cubes}}c\cup(dv-
B_{v})\,,$ (58)

which is indeed invariant under the 2-group gauge transformations Eqs. (52),
(53). As a result, there is no obstruction to gauging the entire 2-group
global symmetry in three dimensions. In four dimensions the inflow action in
Eq. (55) is non-trivial, so the mixed anomaly between $\mathbb{Z}_{2,e}^{(1)}$
and $\mathbb{Z}_{2,m}^{(1)}$ from the $U(1)$ theory survives as a non-trivial
3-group anomaly in the $O(2)$ theory.

###  4.2 Action on Twist Vortices

One important implication of the higher-group structure (51) is that the
worldvolumes of extended operators charged under the highest form symmetry
(here $\mathbb{Z}_{2,v}^{(d-2)}$) must carry degrees of freedom which break
the lower form symmetries ($\mathbb{Z}_{2,e}^{(1)}$ or
$\mathbb{Z}_{2,m}^{(d-3)}$). This is a consequence of the fact that
$\mathbb{Z}_{2,e}^{(1)}$ and $\mathbb{Z}_{2,m}^{(d-3)}$ fail to commute when
acting on the operators charged under $\mathbb{Z}_{2,v}^{(d-2)}$, namely the
twist vortices. To see this, we consider a general twist vortex operator $T$
and pass a magnetic symmetry surface $m$ and a codimension-2 electric symmetry
generator $e$ across it in two different (but ultimately equivalent) ways, as
in Figs. 7 and 8 (see Ref. [38] for a similar analysis in topological lattice
models described by discrete gauge theories).131313Alternatively we can study
what happens in a local neighborhood when we move the point-like higher-group
junction around the twist vortex.

Figure 7: In three dimensions, the electric symmetry line $e$ leaves behind a
local operator $\mathcal{O}_{e}^{(0)}$ on the twist vortex $T$ while the
magnetic symmetry surface $m$ leaves behind a line operator
$\mathcal{O}_{m}^{(1)}$. Passing the symmetry operators across the twist
vortex in two different ways yields a relation (59) between the charges of
these operators.

Naively, the twist vortex is neutral under both $\mathbb{Z}_{2,m}^{(d-3)}$ and
$\mathbb{Z}_{2,e}^{(1)}$. We might expect that the associated symmetry
operators can move freely past the twist vortex, but this would be
inconsistent — passing the symmetry operators past the twist vortex in two
different ways would give results which differ by a sign. To get around this,
we have to allow a more general action of $\mathbb{Z}_{2,m}^{(d-3)}$ and
$\mathbb{Z}_{2,e}^{(1)}$. In general, when the $\mathbb{Z}_{2,m}^{(d-3)}$
surface crosses $T(\Gamma_{d-2})$ it may deposit a line operator
$\mathcal{O}_{m}^{(1)}$ on $\Gamma_{d-2}$. Consistency with the bulk
topological $\mathbb{Z}_{2,e}^{(d-3)}$ operators and their fusion implies that
$\mathcal{O}_{m}^{(1)}$ must itself be topological on $\Gamma_{d-2}$ and that
$(\mathcal{O}_{m}^{(1)})^{2}=1$. Similarly, the codimension-2
$\mathbb{Z}_{2,e}^{(1)}$ generator may act on $T(\Gamma_{d-2})$ by depositing
a $(d-3)$-dimensional operator $\mathcal{O}_{e}^{(d-3)}$ on $\Gamma$, and
consistency with the bulk $\mathbb{Z}_{2,e}^{(1)}$ operators implies that
$\mathcal{O}_{e}^{(d-3)}$ must be topological on $\Gamma_{d-2}$ and
$(\mathcal{O}_{e}^{(d-3)})^{2}=1$.141414In three dimensions, since
$\mathcal{O}_{m}^{(1)}$ is a codimension-0 operator on $\Gamma$, the fact that
the bulk $\mathbb{Z}_{2,m}^{(0)}$ surface is topological implies that it
realizes a topological junction between $T$ and $T\mathcal{O}_{m}^{(1)}$. From
the perspective of the $\tilde{d}=(d-2)$-dimensional twist vortex worldvolume
$\Gamma$, $\mathcal{O}_{m}^{(1)}$ generates a $\mathbb{Z}_{2}$
$(\tilde{d}-2)$-form symmetry while $\mathcal{O}_{e}^{(\tilde{d}-1)}$
generates a 0-form symmetry.151515These symmetries are not required to act
faithfully on genuine operators in the worldline theory. For instance, they
could be completely trivial, or only act on the junctions of twist vortices
with bulk operators.

The worldline operators $\mathcal{O}_{m}^{(1)}$ and $\mathcal{O}_{e}^{(d-3)}$
have the right dimensionalities to carry charge under the bulk electric and
magnetic symmetries, respectively. Let us denote the $\mathbb{Z}_{2,e}^{(1)}$
charge of $\mathcal{O}_{m}^{(1)}$ by $Q_{\mathcal{O}_{m}}^{e}$ and the
$\mathbb{Z}_{2,m}^{(d-3)}$ charge of $\mathcal{O}_{e}^{(d-3)}$ by
$Q_{\mathcal{O}_{m}}^{e}$. Passing electric and magnetic symmetry operators
through the twist vortex in the two ways shown in Figs. 7 and 8 gives the
following relation between these charges:

$Q_{\mathcal{O}_{e}}^{m}+Q_{\mathcal{O}_{m}}^{e}=1\text{ mod }2\,.$ (59)

This implies that the electric and magnetic symmetries fail to commute in
their action on the twist vortex. The featureless twist vortex with
$\mathcal{O}_{e}^{(d-3)}=1$ and $\mathcal{O}_{m}^{(1)}=1$ fails to satisfy Eq.
(59), so there must exist non-trivial worldvolume degrees of freedom on
$\Gamma_{d-2}$.161616The featureless twist vortex is anyway not gauge-
invariant, and requires charged degrees of freedom in order to cancel this
worldvolume anomaly. This is true even in the absence of the higher-group.
Matching the relation in Eq. (59) is an additional requirement which
constrains the possible worldvolume degrees of freedom. In the next section we
will give explicit examples of twist vortex degrees of freedom which match the
above consistency relation.

Figure 8: In four dimensions, the electric and magnetic symmetry generators
leave behind line operators $\mathcal{O}_{m}^{(1)}$ and
$\mathcal{O}_{e}^{(1)}$ on the twist vortex. Passing the symmetry operators
across the twist vortex in two different ways yields a relation (59) between
the 1-form charges of these operators. The topological operators in this
figure span the fourth dimension, while the twist vortex does not.

The fact that the twist vortex carries non-trivial degrees of freedom charged
under $\mathbb{Z}_{2,e}^{(1)}$ or $\mathbb{Z}_{2,m}^{(d-3)}$ (or both) gives
an intuitive explanation of the fact that
$\mathbb{Z}_{2,e}^{(1)}\times\mathbb{Z}_{2,m}^{(d-3)}$ does not form a ‘good
subgroup’ of the higher-group. From the background field perspective, we
cannot turn on generic backgrounds for these symmetries without turning on
backgrounds for $\mathbb{Z}_{2,v}^{(d-2)}$, so if $\mathbb{Z}_{2,v}^{(d-2)}$
is explicitly broken then at least one of $\mathbb{Z}_{2,e}^{(1)}$ or
$\mathbb{Z}_{2,m}^{(d-3)}$ must be broken as well. This hierarchical breaking
pattern is reflected in the worldvolume degrees of freedom on the twist vortex
— if we explicitly break $\mathbb{Z}_{2,v}^{(d-2)}$ by allowing dynamical
twist vortices then we necessarily introduce dynamical objects which are
either electrically or magnetically charged and which break
$\mathbb{Z}_{2,e}^{(1)}$ or $\mathbb{Z}_{2,m}^{(d-3)}$ (or both). This has
important implications for the phase diagram of the theory with dynamical
twist vortices, which we explore in Section 7.

##  5 Twist Vortices and Junctions

We now return to a more detailed analysis of the twist vortices, or Alice
strings, introduced in Section 2.171717The results in this section apply
equally well to twist _defects_ for charge conjugation symmetry in $U(1)$
gauge theory, i.e. codimension-1 charge conjugation defects with (non-
topological) boundaries.  In the current context of $O(2)$ gauge theory,
inserting a twist vortex is equivalent to constraining the holonomy of the
gauge field around a codimension-2 surface to lie in the conjugacy class of
reflections. In other words, we pick up a $\mathsf{c}$ gauge transformation
when encircling the twist vortex. So far, we have ignored the effects of twist
vortices when analyzing the gauge transformation and symmetry properties of
the action Eq. (36). A basic problem is that the naive twist vortex defined in
Eq. (12),

$T(\Gamma_{d-2})\stackrel{{\scriptstyle?}}{{=}}\exp\left(i\pi\sum_{(d-2)\text{-cells}\in\Gamma}v\right)\,,$
(60)

is in fact not gauge-invariant. The effect of this insertion is simply to set
$dc=1$ mod $2$ for plaquettes pierced by $\Gamma^{\vee}$. In such a
background, the action in Eq. (36) remains invariant under $\mathsf{c}$ gauge
transformations but transforms under $U(1)\subset O(2)$ gauge transformations
by

$i\sum_{d\text{-cells}}d_{\mathsf{c}}^{2}\lambda\cup_{\mathsf{c}}z+d_{\mathsf{c}}n\cup_{\mathsf{c}}d_{\mathsf{c}}\tilde{\lambda}+d_{\mathsf{c}}^{2}m\cup_{\mathsf{c}}(\tilde{a}+d_{\mathsf{c}}\tilde{\lambda})\\\
=i\sum_{d\text{-cells}}(\mathsf{c}\cup\mathsf{c}\cup\lambda)\cup_{\mathsf{c}}z+d_{\mathsf{c}}n\cup_{\mathsf{c}}d_{\mathsf{c}}\tilde{\lambda}+(\mathsf{c}\cup\mathsf{c}\cup
m)\cup_{\mathsf{c}}(\tilde{a}+d_{\mathsf{c}}\tilde{\lambda})\,,$ (61)

where we have made use of the auxiliary variable $z$ from Eq. (39). Note that
both terms above are nonzero precisely where $\mathsf{c}\cup\mathsf{c}$, which
is proportional to $dc$ mod $2$, is nonzero, i.e. at the location of the twist
vortex insertion. Our strategy will be to introduce dynamical degrees of
freedom on the twist vortex which can cancel the above gauge-non-invariance,
effectively implementing a lattice version of Callan-Harvey anomaly inflow
[114].181818A similar gauge variation localized on twist vortices was found in
the context of $\mathbb{Z}_{N}$ gauge theory in Ref. [115], where the authors
simply restricted gauge transformations to vanish at the appropriate loci to
render the twist vortex gauge invariant. Our approach is more general, and is
well-suited for non-topological theories. The choice of these degrees of
freedom is not unique, and we will present minimal examples that do the job.
We will also describe how these worldline degrees of freedom give rise to
junctions between the twist vortices and Wilson and (in 4d) ’t Hooft lines,
and how such junctions are consistent with the electric and magnetic
symmetries.

Notably, the electric- and magnetically-charged worldvolume degrees of freedom
in our lattice setup exactly parallel the zero modes found on Alice strings in
the continuum which arise from Higgsing some UV gauge group down to a non-
abelian subgroup [61, 60]. Moreover, we can dial parameters on the twist
vortex worldvolume to make either the electric or magnetic particles light
and, in particular limits, condense. In these extreme limits we can view the
twist vortex itself as a (non-topological) condensation defect where the bulk
(electric or magnetic) gauge field is Higgsed on a codimension-2 surface in
spacetime. Such condensation defects have been studied in the context of
topological phases of condensed matter systems (see for instance Refs. [95,
38, 97]) where they are also dubbed ‘Cheshire strings.’

###  5.1 Three Dimensions

In three dimensions the twist vortex-localized gauge variation we need to
cancel is (renaming $\tilde{a}\equiv\sigma$ to be the dual photon)

$i\sum_{\text{cubes}}(\mathsf{c}\cup\mathsf{c}\cup\lambda)\cup_{\mathsf{c}}z+(\mathsf{c}\cup\mathsf{c}\cup
m)\cup_{\mathsf{c}}\sigma\,.$ (62)

The specific examples we will consider involve a compact scalar on the twist
vortex worldline, in other words a particle on a circle (but with charge
conjugation symmetry gauged). This system admits a Villain lattice description
described in Appendix C, whose ingredients are a real scalar
$\varphi\in\mathcal{C}^{0}(\Gamma,\mathbb{R})$ and associated integer Villain
field $w\in\mathcal{C}^{1}(\Gamma,\mathbb{Z})$, with gauge redundancy
$\varphi\to\varphi+2\pi r,w\to w+d_{\mathsf{c}}r$, where
$r\in\mathcal{C}^{0}(\Gamma,\mathbb{Z})$. Both fields are odd under charge
conjugation, $\varphi\to\mathsf{g}\cup\varphi$ and $w\to\mathsf{g}\cup w$.
Before gauging charge conjugation, this quantum mechanical system has a $U(1)$
global shift symmetry $\varphi\to\varphi+\text{constant}$ and a theta angle
$\theta$ with periodicity $2\pi$ (formally a $(-1)$-form symmetry). An
important fact about this system is that there is a generalized mixed anomaly
between the $U(1)$ global symmetry and the periodicity of the $\theta$
parameter [116, 117, 118] which is preserved in the Villain lattice
discretization, as reviewed in Appendix C. This anomaly is precisely what we
need in order to cancel the gauge variation (61), in other words the anomaly
inflow, from the bulk. Recalling that
$z=\tilde{n}-\frac{1}{2\pi}d_{\mathsf{c}}\sigma$ on shell, the terms in Eq.
(62) match exactly the anomalous terms in Eq. (131).

We begin by coupling the shift symmetry of $\varphi$ to the bulk gauge field
with charge $q_{\varphi}$, replacing the usual kinetic term with

$\frac{\kappa_{v}}{2}\sum_{\text{links}\,\in\Gamma}(d_{\mathsf{c}}\varphi-
q_{\varphi}a-2\pi w)^{2}\,.$ (63)

The fields on the twist vortex worldline transform under bulk gauge
transformations as $\varphi\to\varphi+q_{\varphi}\lambda$ and $w\to
w-q_{\varphi}m$. The first term in Eq. (61), i.e. the non-invariance under
small $U(1)$ gauge transformations, can be written as

$-2i\sum_{\text{cubes}}\overline{dc}\cup\lambda\cup z\,,$ (64)

where $\overline{dc}\equiv dc$ mod $2$, and can be cancelled by including the
coupling

$\frac{2i}{q_{\varphi}}\sum_{\text{links}\,\in\Gamma}\varphi\cup z\,.$ (65)

To find the effect of this term in the usual presentation of the action, we
simply integrate out $z$ to find that the gauge field kinetic term gets
replaced by

$\frac{\beta}{2}(d_{\mathsf{c}}a-2\pi n)_{p}^{2}\ \to\
\frac{\beta}{2}(d_{\mathsf{c}}a-\frac{1}{q_{\varphi}}d_{\mathsf{c}}^{2}\varphi-2\pi
n)_{p}^{2}=\frac{\beta}{2}(d_{\mathsf{c}}a-\frac{1}{q_{\varphi}}\mathsf{c}\cup\mathsf{c}\cup\varphi-2\pi
n)_{p}^{2}\,.$ (66)

Note that this is a non-trivial change only for the plaquettes
$p\in\star[\Gamma^{\vee}]$. For this modification to preserve the compactness
of $\varphi$, we must assign $n\to
n-\frac{1}{q_{\varphi}}\mathsf{c}\cup\mathsf{c}\cup r$ under the gauge
redundancy (127). Recalling that $\mathsf{c}\cup\mathsf{c}$ is even, this
shift is well-defined only if $|q_{\varphi}|=1,2$. The original monopole-
suppression term in the action is not invariant under this additional twist
vortex-localized transformation of $n$, but shifts by

$-\frac{i}{q_{\varphi}}\sum_{\text{cubes}}d_{\mathsf{c}}(\mathsf{c}\cup\mathsf{c}\cup
r)\cup_{\mathsf{c}}\sigma=-\frac{i}{q_{\varphi}}\sum_{\text{cubes}}(\mathsf{c}\cup\mathsf{c}\cup
d_{\mathsf{c}}r)\cup_{\mathsf{c}}\sigma\,,$ (67)

where we made repeated use of Eq. (107).

Conveniently, the transformation properties of $w$ are such that we can cancel
both the second term in Eq. (61), as well as Eq. (67), by adding to the action
the coupling191919This can be written as a sum over links on $\Gamma$, but it
takes a complicated form since the twisted cup product is not associative. To
save space we write this term as if it were a bulk term, with the knowledge
that it localizes to terms involving $w$ and $\sigma$ on $\Gamma$. For
instance if we consider a straight twist vortex, we could write this as
$-\frac{2i}{q_{\varphi}}\sum_{\text{links}\,\in\Gamma}w\cup_{\mathsf{c}}\sigma\,.$
(68)

$\frac{i}{q_{\varphi}}\sum_{\text{cubes}}(\mathsf{c}\cup\mathsf{c}\cup
w)\cup_{\mathsf{c}}\sigma\,.$ (69)

Note that since $|q_{\varphi}|=1,2$ and $\mathsf{c}\cup\mathsf{c}$ is even
this preserves the periodicity of $\sigma$. This couples the bulk monopole
operator to the topological charge density of the particle on a circle, and
can be thought of as gauging its $(-1)$-form symmetry, i.e. promoting the
theta parameter to a dynamical axion.

In summary, we have the improved, gauge invariant twist vortex operators202020
The ‘sum’ over $\varphi\in\mathcal{C}^{0}(\Gamma,\mathbb{R})$ is schematic.
Since the worldvolume theory has a $\mathbb{Z}$ gauge redundancy, one must
gauge-fix in order to get a finite result for the expectation value of the
twist vortex. One possibility is to choose the ‘Villain gauge’ where $\varphi$
is restricted to lie in the range $(-\pi,\pi]$, and the gauge variation
$q_{\varphi}\lambda$ is also projected to this interval.

$\displaystyle
T_{q_{\varphi}}(\Gamma)=\sum_{\begin{subarray}{c}\varphi\in\mathcal{C}^{0}(\Gamma,\mathbb{R}),\\\
w\in\mathcal{C}^{1}(\Gamma,\mathbb{Z})\end{subarray}}\exp\Bigg{[}i\sum_{\text{links}\in\Gamma}\left(\pi
v-\frac{2}{q_{\varphi}}\varphi\cup
z\right)-\frac{\kappa_{v}}{2}\sum_{\text{links}\in\Gamma}($ $\displaystyle
d_{\mathsf{c}}\varphi-q_{\varphi}a-2\pi w)^{2}$ (70)
$\displaystyle-\frac{i}{q_{\varphi}}\sum_{\text{cubes}}$
$\displaystyle(\mathsf{c}\cup\mathsf{c}\cup
w)\cup_{\mathsf{c}}\sigma\Bigg{]}\,,\quad|q_{\varphi}|=1,2\,,$

which are invariant under the combined gauge redundancies

$\begin{split}\varphi&\to\varphi+2\pi r+q_{\varphi}\lambda\,,\ w\to
w+d_{\mathsf{c}}r-q_{\varphi}m\,,\\\ a&\to a+d_{\mathsf{c}}\lambda+2\pi m\,,\
n\to n+d_{\mathsf{c}}m-\frac{1}{q_{\varphi}}\mathsf{c}\cup\mathsf{c}\cup r\,,\
\sigma\to\sigma+2\pi\tilde{m}\,.\end{split}$ (71)

The twist vortices fall into two classes, depending on whether
$|q_{\varphi}|=1,2$, which we will refer to as type-$e$ and type-$m$,
respectively. Roughly, the type-$e$ vortex breaks the $\mathbb{Z}_{2,e}^{(1)}$
electric symmetry of the bulk and preserves the $\mathbb{Z}_{2,m}^{(0)}$
magnetic symmetry, while the type-$m$ vortex breaks the magnetic symmetry and
preserves the electric symmetry. From the perspective of the bulk, the
particle on the circle serves as a charge-$q_{\varphi}$ Higgs field localized
on $\Gamma$. If we take the limit $\kappa_{v}\to\infty$ we pin
$a=\frac{1}{q_{\varphi}}(d_{\mathsf{c}}\varphi-2\pi w)$, which restricts the
bulk gauge field to be a $\mathbb{Z}_{|q_{\varphi}|}$ gauge field on the twist
vortex worldline. In this strict limit, the twist vortex can be thought of as
a kind of condensation defect, where charge-$q_{\varphi}$ excitations
proliferate on its worldvolume.

####  5.1.1 Consistency with the 2-Group

In Section 4 we derived a consistency relation between the charges of
operators deposited by electric and magnetic symmetry generators on the twist
vortex worldvolume. Here we describe how the specific twist vortices in Eq.
(70) satisfy these conditions.

  * •

Type-$e$: If we take $q_{\varphi}=1$, the twist vortex is invariant under
shifts $\sigma\to\sigma+\pi V_{m}$ and therefore respects the
$\mathbb{Z}_{2,m}^{(0)}$ symmetry. In other words, nothing gets deposited on
$\Gamma$ as we pass a magnetic symmetry surface past it, so
$\mathcal{O}_{m}^{(1)}=1$ and $Q_{\mathcal{O}_{m}}^{e}=0$. On the other hand,
performing a 1-form symmetry transformation does not leave the twist vortex
invariant, but leaves behind an insertion of

$e^{-\frac{\kappa_{v}}{2}\sum_{\ell\in\Gamma}(d_{\mathsf{c}}\varphi-a-\pi
V_{e}-2\pi w)_{\ell}^{2}-(d_{\mathsf{c}}\varphi-a-2\pi
w)_{\ell}^{2}}\,e^{-\frac{i}{2}\sum_{\text{cubes}}(\mathsf{c}\cup\mathsf{c}\cup
V_{e})\cup_{\mathsf{c}}\sigma}\,.$ (72)

Since $V_{e}=\star[\tilde{D}]$, with $\tilde{D}$ a surface on the dual
lattice, this effectively inserts a local operator $\mathcal{O}_{e}^{(0)}$ at
the location where $\tilde{D}$ pierces $\Gamma$. In the presence of this
operator, we must modify the $\mathsf{c}$ gauge transformation of $w$ to
$w\to\mathsf{g}\cup w+\frac{1}{2}(\mathsf{g}-1)\cup V_{e}$. To see that this
worldline operator is topological, we can perform a shift
$\varphi\to\varphi-\pi U_{e}$ together with $w\to
w+\frac{1}{2}(\mathsf{c}-1)\cup U_{e}$ and $n\to
n-\frac{1}{2}\mathsf{c}\cup\mathsf{c}\cup U_{e}$, which leaves the modified
gauge field kinetic term (66) invariant but alters the insertion to

$e^{-\frac{\kappa_{v}}{2}\sum_{\ell\in\Gamma}(d_{\mathsf{c}}\varphi-a-\pi(V_{e}+dU_{e})-2\pi
w)_{\ell}^{2}-(d_{\mathsf{c}}\varphi-a-2\pi
w)_{\ell}^{2}}\,e^{-\frac{i}{2}\sum_{\text{cubes}}(\mathsf{c}\cup\mathsf{c}\cup(V_{e}+dU_{e}))\cup_{\mathsf{c}}\sigma}\,.$
(73)

This effectively moves the location of $\mathcal{O}_{e}^{(0)}$ along the twist
vortex, making it topological. One can also verify that the operator
$\mathcal{O}_{e}^{(0)}$ has $\mathbb{Z}_{2}$ fusion rules consistent with the
bulk $\mathbb{Z}_{2,e}^{(1)}$ line. The last factor in Eq. (72) is charged
under the magnetic symmetry so that $Q_{\mathcal{O}_{e}}^{m}=1$. Hence and
$Q_{\mathcal{O}_{e}}^{m}+Q_{\mathcal{O}_{m}}^{e}=1+0=1$, and Eq. (59) is
satisfied.

  * •

Type-$m$: If we take $q_{\varphi}=2$, we can preserve $\mathbb{Z}_{2,e}^{(1)}$
by assigning $w\to w-V_{e}$, so in this case $\mathcal{O}_{e}^{(0)}=1$. On the
other hand, performing a magnetic symmetry transformation $\sigma\to\sigma+\pi
V_{m}$ inserts a line operator $\mathcal{O}_{m}^{(1)}$

$e^{i\pi\sum_{\ell\in\Gamma}w\cup V_{m}}$ (74)

along the twist vortex. Since $V_{m}=\star[\tilde{Y}]$ for some 3-volume
$\tilde{Y}$, this operator is localized along the line segment where $\Gamma$
lies in $\tilde{Y}$. Since $w\to w-V_{e}$ under the 1-form symmetry, we now
have that $Q_{\mathcal{O}_{e}}^{m}=0$ and $Q_{\mathcal{O}_{m}}^{e}=1$, and Eq.
(59) is again satisfied.

####  5.1.2 Junctions

Both types of twist vortices host electrically charged matter on their
worldlines which we can use to terminate bulk Wilson lines. Specifically, we
can construct open Wilson lines as described in Eq. (31) which end (roughly
speaking) on the twist vortex-localized operator $e^{i\varphi}$. This operator
has charge 1 on a type-$e$ twist vortex, so all Wilson lines $W_{q}$ with
$q\geq 1$ can end on it. In the type-$m$ case, this operator has charge 2, so
that only even charge Wilson lines can end (alternatively, $e^{i\varphi}$ can
serve as a junction between $W_{1}$ in the bulk and line operators on the
twist vortex such as $W_{1}$ or $\mathcal{O}_{m}^{(1)}$).

Figure 9: Junction between a minimally charged Wilson line $W_{1}$ and a
type-$e$ twist vortex $T_{e}$. When a $\mathbb{Z}_{2,e}^{(1)}$ symmetry line
crosses $T_{e}$, it deposits the topological local operator
$\mathcal{O}_{e}^{(0)}$ which acts on the point-like junction with the Wilson
line. As a result, the junction is consistent with the
$\mathbb{Z}_{2,e}^{(1)}$ symmetry.

At first glance, the fact that the minimal Wilson line can end on the type-$e$
vortex seems to violate the $\mathbb{Z}_{2,e}^{(1)}$ symmetry. In fact, the
junction is perfectly consistent with the electric 1-form symmetry — the local
operators $\mathcal{O}_{e}^{(0)}$ left behind by the $\mathbb{Z}_{2,e}^{(1)}$
line act on the junction operator $e^{i\varphi}$, as discussed above. This is
depicted in Fig. 9.

Finally, the $\mathbb{Z}_{2,e}^{(1)}$ electric 1-form symmetry gives selection
rules for the allowed junction configurations. In particular, the net charge
of a ‘ladder’ of Wilson loops stretched between two twist vortices has to be
even, otherwise the configuration vanishes (see Fig. 10). It is
straightforward to find configurations in the strong coupling expansion that
contribute to e.g. a charge-2 Wilson line stretched between two non-
contractible twist vortices.212121The invertible symmetries do not give rise
to constraints on the same configuration but where the twist vortices are both
contractible. However, such a configuration is constrained by the non-
invertible electric symmetry discussed in Section 6.1.  We discuss such
configurations in more detail in Section 6.1.3.

Figure 10: An example of a selection rule for Wilson loop junctions arising
due to $\mathbb{Z}_{2,e}^{(1)}$ symmetry.

###  5.2 Four Dimensions

The four dimensional uplift of the story involves the (orbifolded) compact
boson on the twist vortex worldsheet $\Sigma$. We review the Villain
discretization of this system and compute the ’t Hooft anomaly for its global
$U(1)_{m}^{(0)}\times U(1)_{w}^{(0)}$ symmetry in Appendix D. The ingredients
are a compact scalar and its dual
$\varphi,\tilde{\varphi}\in\mathcal{C}^{0}(\Sigma,\mathbb{R})$, and an integer
Villain field $w\in\mathcal{C}^{1}(\Sigma,\mathbb{Z})$ subject to the gauge
redundancies

$\varphi\to\varphi+2\pi r\,,\ w\to w+d_{\mathsf{c}}r\,,\
\tilde{\varphi}\to\tilde{\varphi}+2\pi\tilde{r}\,.$ (75)

The naive twist vortex induces a gauge variation of the action

$i\sum_{d\text{-cells}}-2\overline{dc}\cup\lambda\cup
z+d_{\mathsf{c}}n\cup_{\mathsf{c}}d_{\mathsf{c}}\tilde{\lambda}+(\mathsf{c}\cup\mathsf{c}\cup
m)\cup_{\mathsf{c}}(\tilde{a}+d_{\mathsf{c}}\tilde{\lambda})\,.$ (76)

Note that despite appearances the
$d_{\mathsf{c}}n\cup_{\mathsf{c}}d_{\mathsf{c}}\tilde{\lambda}$ term is
localized on the twist vortex — the non-flatness of $c$ is what prevents this
term from being a total derivative. Since
$z=\tilde{n}-\frac{1}{2\pi}d_{\mathsf{c}}\tilde{a}$ on-shell, the terms above
are in 1-1 correspondence with the anomalous terms in Eq. (139). Hence,
paralleling the 3d discussion, we can cancel the above gauge variation by
coupling the momentum and winding symmetries of the compact boson to the bulk
electric and magnetic gauge fields.

Cutting to the chase, we again have a choice of the charge $q_{\varphi}$ (with
$|q_{\varphi}|=1,2$) of $\varphi$ with respect to the electric gauge field
$a$. The magnetic charge of $\tilde{\varphi}$ with respect to the dual gauge
field $\tilde{a}$ is then fixed to be $2/q_{\varphi}$. The gauge-invariant
twist vortex is

$T_{q_{\varphi}}(\Sigma)=\sum_{\begin{subarray}{c}\varphi\in\mathcal{C}^{0}(\Sigma,\mathbb{R}),\tilde{\varphi}\in\mathcal{C}^{0}(\Sigma,\mathbb{R}),\\\
w\in\mathcal{C}^{1}(\Sigma,\mathbb{Z})\end{subarray}}\exp\Bigg{[}i\sum_{\text{plaq.}\in\Sigma}\left(\pi
v+\frac{2}{q_{\varphi}}\varphi\cup
z\right)+\frac{\kappa_{v}}{2}\sum_{\text{links}\in\Sigma}(d_{\mathsf{c}}\varphi-
q_{\varphi}a-2\pi w)^{2}\\\ +i\sum_{\text{hyper-
cu.}}\frac{q_{\varphi}}{2}d_{\mathsf{c}}n\cup_{\mathsf{c}}d_{\mathsf{c}}\tilde{\varphi}-\frac{1}{2}(\mathsf{c}\cup\mathsf{c}\cup
w)\cup_{\mathsf{c}}\left(\frac{2}{q_{\varphi}}\tilde{a}-d_{\mathsf{c}}\tilde{\varphi}\right)\Bigg{]}\,.$
(77)

Again, the measure is meant to be schematic, see the remarks in Footnote 20.
It is straightforward to check that the insertion of such a twist vortex
operator is invariant under the following gauge redundancies:

$\begin{split}\varphi&\to\varphi+2\pi r+q_{\varphi}\lambda\,,\ w\to
w+d_{\mathsf{c}}r-q_{\varphi}m\,,\
\tilde{\varphi}\to\tilde{\varphi}+2\pi\tilde{r}+\frac{2}{q_{\varphi}}\tilde{\lambda}\,,\\\
a&\to a+d_{\mathsf{c}}\lambda+2\pi m\,,\ n\to
n+d_{\mathsf{c}}m-\frac{1}{q_{\varphi}}\mathsf{c}\cup\mathsf{c}\cup r\,,\
\tilde{a}\to\tilde{a}+d_{\mathsf{c}}\tilde{\lambda}+q_{\varphi}\pi
d_{\mathsf{c}}\tilde{r}+2\pi\tilde{m}\,.\end{split}$ (78)

The twist vortices again fall into two classes which we call type-$e$ (with
$|q_{\varphi}|=1$, i.e. minimally charged electric matter and non-minimally
charged magnetic matter) and type-$m$ (with $|q_{\varphi}|=2$, i.e. non-
minimally charged electric matter and minimally charged magnetic matter).
These two choices are clearly exchanged by the bulk electric-magnetic duality
which involves T-duality on the twist vortex worldsheet.

We can also consider an extreme limit where we send $\kappa_{v}\to\infty$ so
as to pin $a=\frac{1}{q_{\varphi}}(d_{\mathsf{c}}\varphi-2\pi w)$. Since there
is no kinetic term for the dual field $\tilde{\varphi}$, integrating it out
further sets $d_{\mathsf{c}}w=-q_{\varphi}n=0$ mod $q_{\varphi}$. In other
words in this limit the electric gauge field is Higgsed to a _flat_
$\mathbb{Z}_{|q_{\varphi}|}$ gauge field on $\Sigma$, and we can think of the
twist vortex as a genuine condensation defect. If on the other hand we take
$\kappa_{v}=0$, we can sum over $w$ to set
$\tilde{a}=\frac{q_{\varphi}}{2}(d_{\mathsf{c}}\tilde{\varphi}-2\pi\tilde{w})$
for some $\tilde{w}\in\mathcal{C}^{1}(\Sigma,\mathbb{Z})$. Integrating out
$\varphi$ then sets $d_{\mathsf{c}}\tilde{w}=\frac{2}{q_{\varphi}}\tilde{n}$.
We can therefore view this limit as Higgsing the _magnetic_ gauge field to
$\mathbb{Z}_{|2/q_{\varphi}|}$. T-duality of the orbifolded compact boson,
which takes $\kappa_{v}\to\frac{1}{(2\pi)^{2}\kappa_{v}}$, exchanges these two
limits.

####  5.2.1 Consistency with the 3-Group

Here we describe how the specific twist vortices in Eq. (77) satisfy the
relation Eq. (59) between the 1-form charges of the lines
$\mathcal{O}_{m}^{(1)}$ and $\mathcal{O}_{e}^{(1)}$ deposited by the bulk
$\mathbb{Z}_{2,e}^{(1)}$ and $\mathbb{Z}_{2,m}^{(1)}$ symmetries.

  * •

Type-$e$: When $q_{\varphi}=1$ the twist vortex is transparent to the magnetic
symmetry, so that $\mathcal{O}_{m}^{(1)}=1$, while an electric 1-form
transformation generates an insertion of

$e^{-\frac{\kappa_{v}}{2}\sum_{\ell\in\Sigma}(d_{\mathsf{c}}\varphi-a-\pi
V_{e}-2\pi w)_{\ell}^{2}-(d_{\mathsf{c}}\varphi-a-2\pi
w)_{\ell}^{2}}\,e^{-\frac{i}{2}\sum_{\text{hyper-
cu.}}(\mathsf{c}\cup\mathsf{c}\cup
V_{e})\cup_{\mathsf{c}}(\tilde{a}-\frac{1}{2}d_{\mathsf{c}}\tilde{\varphi})}\,.$
(79)

Here $V_{e}=\star[\tilde{Y}]$ is dual to a three-volume $Y$ whose intersection
with $\Sigma$ is a line. We identify the above insertion as
$\mathcal{O}_{e}^{(1)}$. The location of the insertion can be shifted by
redefining $\varphi\to\varphi+\pi dU_{e}$, $w\to
w+\frac{1}{2}(\mathsf{c}-\mathbbm{1})\cup U_{e}$ and $n\to
n-\frac{1}{2}\mathsf{c}\cup\mathsf{c}\cup U_{e}$ as in the 3d case. Because
the last factor involves the magnetic gauge field, this operator is charged
under the magnetic symmetry and $Q_{\mathcal{O}_{e}}^{m}=1$. Eq. (59) is
satisfied because $Q_{\mathcal{O}_{e}}^{m}+Q_{\mathcal{O}_{m}}^{e}=1+0=1$.

  * •

Type-$m$: If $q_{\varphi}=2$, we can make the twist vortex transparent to the
electric 1-form symmetry by taking $w\to w-V_{e}$, so that
$\mathcal{O}_{e}^{(1)}=1$. If we perform a magnetic symmetry transformation
$\tilde{a}\to\tilde{a}+\pi V_{m}$, the result is to insert

$e^{i\pi\sum_{p\in\Sigma}w\cup V_{m}}\,,$ (80)

which will be some line operator lying on $\Sigma$, which we identify as
$\mathcal{O}_{m}^{(1)}$. We can move its location by shifting
$\tilde{\varphi}\to\tilde{\varphi}+\pi dU_{m}$, which does not affect the
first term in the second line of Eq. (77), but changes the insertion to

$e^{i\pi\sum_{p\in\Sigma}w\cup(V_{m}+dU_{m})}\,,$ (81)

which topologically deforms the line on which the operator is supported.
Because $w$ transforms under the electric 1-form symmetry, we have
$Q_{\mathcal{O}_{m}}^{e}=1$, while $Q_{\mathcal{O}_{e}}^{m}=0$ so again Eq.
(59) is satisfied.

####  5.2.2 Junctions

As the names suggest, a minimal Wilson line can terminate on the electric
Higgs field $e^{i\varphi}$ on the type-$e$ twist vortex while a minimal ’t
Hooft line can terminate on the magnetic Higgs field $e^{i\tilde{\varphi}}$ on
a type-$m$ twist vortex. These junctions are shown in Fig. 11, and are clearly
exchanged by electric-magnetic duality. As in the 3d case, the non-trivial
degrees of freedom on the twist vortex ensure that these junctions are
consistent with the bulk electric and magnetic 1-form symmetries.
Specifically, when an electric (magnetic) symmetry surface crosses a type-$e$
(type-$m$) twist vortex, it deposits the topological line operator
$\mathcal{O}_{e}^{(1)}$ ($\mathcal{O}_{m}^{(1)}$) which can act on the point-
like junction with the Wilson (’t Hooft) line. The invertible symmetries
constrain the allowed junction configurations — for instance, any collection
of junctions which involves Wilson or ’t Hooft lines with odd net charge
vanishes.

Figure 11: Consistent junctions on type-$e$ and type-$m$ twist vortices
$T_{e}$ and $T_{m}$, which carry charge-1 (resp. charge-2) electric matter and
charge-2 (resp. charge-1) magnetic matter. On the right we show a
configuration which survives selection rules due to $\mathbb{Z}_{2,v}^{(2)}$
and $\mathbb{Z}_{2,e}^{(1)}$ symmetries. The $T_{e}$ and $T_{m}$ twist
vortices are exchanged under electric-magnetic duality, which is realized as
T-duality on the twist vortex worldsheet.

##  6 Non-Invertible Symmetries

When we gauge the charge conjugation symmetry of $U(1)$ gauge theory we
naively expect to break the $U(1)_{e}^{(1)}$ and $U(1)_{m}^{(d-3)}$ symmetries
down to their $\mathbb{Z}_{2}$ subgroups which commute with the charge
conjugation action. This turns out to be just part of a much larger
categorical symmetry structure in the $O(2)$ theory that also includes _non-
invertible_ analogs of $U(1)_{e}^{(1)}$ and $U(1)_{m}^{(d-3)}$. These types of
non-invertible symmetries arise after gauging 0-form symmetries that act as
outer automorphisms of group-like symmetries, and have been studied previously
in a number of works, see for instance Refs. [67, 23, 72, 98, 99, 100, 101,
73, 102, 16, 103, 104, 54, 105]. Roughly, the idea is that the invertible
symmetry operator $U_{\theta}$ of e.g. the $U(1)_{e}^{(1)}$ symmetry in the
$U(1)$ theory gets replaced by the operator $U_{\theta}+U_{-\theta}$ in the
$O(2)$ theory, which does not have an inverse. We can make this recipe precise
by applying the general construction from Section 2.1 to the electric and
magnetic symmetry operators of the $U(1)$ theory. This gives the
$(O(2)/\mathbb{Z}_{2})^{(1)}_{e}$ and $(O(2)/\mathbb{Z}_{2})^{(d-3)}_{m}$
coset symmetry operators, whose non-invertibility is made obvious from the
fact that projection operators are part of their definition. In this Section
we describe our concrete realization of the symmetry defects and study their
fusion rules, action on operators, and associated selection rules.

###  6.1 Electric Symmetry

We start with the symmetry operator for the $U(1)_{e}^{(1)}$ electric symmetry
of $U(1)$ gauge theory, namely

$U_{\theta}^{U(1)}(\tilde{\Gamma})=\prod_{p\in\star[\tilde{\Gamma}]}\exp\left[-\frac{\beta}{2}(d_{\mathsf{c}}a-\theta\star[\tilde{\Gamma}]-2\pi
n)_{p}^{2}+\frac{\beta}{2}(d_{\mathsf{c}}a-2\pi n)_{p}^{2}\right]\,.$ (82)

This operator effectively replaces $n\to
n+\frac{\theta}{2\pi}\star[\tilde{\Gamma}]$ in the gauge field kinetic term,
which is a non-trivial shift for all plaquettes pierced by the codimension-2
surface $\tilde{\Gamma}$ on the dual lattice. These operators satisfy the
$U(1)$ fusion rule
$U_{\theta}^{U(1)}U_{\theta^{\prime}}^{U(1)}=U_{\theta+\theta^{\prime}\text{
mod }2\pi}^{U(1)}$. Obviously the above operator is not $\mathsf{c}$
invariant, and applying (a slightly modified version of) the recipe from
Section 2.1, we define

$U_{\theta}(\tilde{\Gamma})=P(\tilde{\Gamma}^{\vee})\sum_{\hat{\mathsf{g}}_{*}=\pm
1}\prod_{p\in\star[\tilde{\Gamma}]}\exp\left[-\frac{\beta}{2}(d_{\mathsf{c}}a-\hat{\mathsf{g}}_{*}\,\eta(\gamma_{p,*})\,\theta\star[\tilde{\Gamma}]-2\pi
n)_{p}^{2}+\frac{\beta}{2}(d_{\mathsf{c}}a-2\pi n)_{p}^{2}\right]\,,$ (83)

where $\tilde{\Gamma}^{\vee}$ is $\tilde{\Gamma}$ shifted down to the original
lattice where the scaffolding paths $\gamma_{p,*}$ and basepoint $*$ live.
This is the Gukov-Witten operator associated with the $O(2)$ conjugacy class
of rotations through an angle $\theta\sim-\theta\sim\theta+2\pi$.

Roughly speaking, we can topologically deform $U_{\theta}(\tilde{\Gamma})$ by
performing field redefinitions of the form $a_{\ell}\to
a_{\ell}+\hat{\mathsf{g}}_{*}\,\eta(\gamma_{\ell,*})\,\theta$ (the projector
$P(\tilde{\Gamma}^{\vee})$ is topological on its own, and comes for the ride).
As an explicit example, let us take $\tilde{\Gamma}=\partial\tilde{\Sigma}$
where $\tilde{\Sigma}$ is dual to a single link $(s,i)$. In 3d this
corresponds to a plaquette-sized contractible loop, so that
$\star[\tilde{\Gamma}]$ is non-zero on the four plaquettes touching the link
$(s,i)$, i.e. the coboundary of $(s,i)$. Taking the expectation value of this
contractible operator computes the quantum dimension of
$U_{\theta}(\tilde{\Gamma})$. To evaluate the expectation value we simply
redefine $a_{(s,i)}\to a_{(s,i)}+\hat{\mathsf{g}}_{*}\,\theta$, effectively
removing the insertion. What is left over is the projector, which is equal to
1 for a contractible curve, and the sum over $\hat{\mathsf{g}}_{*}$, which
gives a factor of two. Hence we find the quantum dimension

$\langle U_{\theta}(\partial\tilde{\Sigma})\rangle=2.$ (84)

As another example, we compute the parallel fusion of two symmetry operators
$U_{\theta}(\tilde{\Gamma})$ and
$U_{\theta^{\prime}}(\tilde{\Gamma}^{\prime})$. Since the location of the
basepoints of the two operators is arbitrary, we choose them to lie on the
same line in the direction of fusion. Performing field redefinitions to join
the lines, and using $P(\tilde{\Gamma}^{\vee})^{2}=P(\tilde{\Gamma}^{\vee})$,
we find

$U_{\theta}(\tilde{\Gamma})U_{\theta^{\prime}}(\tilde{\Gamma})\\\
=P(\tilde{\Gamma}^{\vee})\sum_{\hat{\mathsf{g}}_{*},\hat{\mathsf{g}}_{*}^{\prime}=\pm
1}\,\prod_{p\in\star[\tilde{\Gamma}]}\exp\Bigg{[}-\frac{\beta}{2}(d_{\mathsf{c}}a-\eta(\gamma_{p,*})(\hat{\mathsf{g}}_{*}\theta+\hat{\mathsf{g}}_{*}^{\prime}\theta^{\prime})\star[\tilde{\Gamma}]-2\pi
n)_{p}^{2}+\frac{\beta}{2}(d_{\mathsf{c}}a-2\pi n)_{p}^{2}\Bigg{]}\\\
=U_{\theta+\theta^{\prime}}(\tilde{\Gamma})+U_{\theta-\theta^{\prime}}(\tilde{\Gamma})\,.$
(85)

In the special case that $\theta=\theta^{\prime}$, this reduces to

$U_{\theta}(\tilde{\Gamma})U_{\theta}(\tilde{\Gamma})=U_{2\theta}(\tilde{\Gamma})+2P(\tilde{\Gamma}^{\vee})\,.$
(86)

This matches the continuum results in Refs. [72, 100, 102].

####  6.1.1 Action on Wilson Lines

Let us now examine the action on Wilson lines. We start with a configuration
where $\tilde{\Gamma}$ is contractible and links a Wilson line, and denote the
basepoints of $W$ and $U$ as $*$ and $*^{\prime}$ which respectively host
$\mathbb{Z}_{2}$ degrees of freedom $\hat{\mathsf{g}}_{*}$ and
$\hat{\mathsf{g}}_{*^{\prime}}$. Performing
$\hat{\mathsf{g}}_{*^{\prime}}$-dependent shifts of $a$ to remove the operator
$U$ gives

$\begin{split}U_{\theta}(\tilde{\Gamma})W_{q}(\gamma)&=P(\gamma)\sum_{\hat{\mathsf{g}}_{*},\hat{\mathsf{g}}_{*^{\prime}}=\pm
1}\exp\left(iq\theta\,\hat{\mathsf{g}}_{*^{\prime}}\,\eta(\gamma_{*^{\prime},*})\hat{\mathsf{g}}_{*}\right)\exp\left(iq\,\hat{\mathsf{g}}_{*}\sum_{\ell\in\gamma}\eta(\gamma_{\ell,*})\,a_{\ell}\right)\\\
&=2\cos(q\theta)\,W_{q}(\gamma)\,,\end{split}$ (87)

where $\gamma_{*^{\prime},*}$ is a path in $\gamma$ from $*^{\prime}$ to $*$.

Figure 12: The action of the non-invertible electric 1-form symmetry on a
Wilson line. The result is a sum of two terms, the latter involving the
twisted-sector Wilson line $\widetilde{W}_{q}$ and Gukov-Witten operator
$\widetilde{U}_{\theta}$ connected by the dual symmetry line $\eta$.

More generally, we can study what happens when $\tilde{\Gamma}$ locally
crosses $\gamma$. In that case, we can locally wrap part of the Gukov-Witten
operator on the Wilson line. Let us write
$W_{q}(\gamma)=\sum_{\hat{\mathsf{g}}_{*}}W_{q}(\gamma;\hat{\mathsf{g}}_{*})$
and
$U_{\theta}(\tilde{\Gamma})=\sum_{\hat{\mathsf{g}}_{*^{\prime}}}U_{\theta}(\tilde{\Gamma};\hat{\mathsf{g}}_{*^{\prime}})$.
The result is

$\begin{split}U_{\theta}(\tilde{\Gamma})W_{q}(\gamma)&=\sum_{\hat{\mathsf{g}}_{*},\hat{\mathsf{g}}_{*^{\prime}}=\pm
1}\exp\left(iq\theta\,\hat{\mathsf{g}}_{*^{\prime}}\eta(\gamma_{*^{\prime},*})\hat{\mathsf{g}}_{*}\right)U_{\theta}(\tilde{\Gamma}^{\prime};\hat{\mathsf{g}}_{*^{\prime}})W_{q}(\gamma;\hat{\mathsf{g}}_{*})\\\
&=\sum_{\hat{\mathsf{g}}_{*},\hat{\mathsf{g}}_{*^{\prime}}=\pm
1}\left[\cos(q\theta)+i\sin(q\theta)\,\hat{\mathsf{g}}_{*^{\prime}}\eta(\gamma_{*^{\prime},*})\hat{\mathsf{g}}_{*}\right]U_{\theta}(\tilde{\Gamma}^{\prime};\hat{\mathsf{g}}_{*^{\prime}})W_{q}(\gamma;\hat{\mathsf{g}}_{*})\\\
&=\cos(q\theta)U_{\theta}(\tilde{\Gamma}^{\prime})W_{q}(\gamma)+i\sin(q\theta)\widetilde{U}_{\theta}(\tilde{\Gamma}^{\prime};*^{\prime})\eta(\gamma_{*^{\prime},*})\widetilde{W}_{q}(\gamma;*)\,.\end{split}$
(88)

Here $\tilde{\Gamma}^{\prime}$ is the final configuration of the Gukov-Witten
operator and $\gamma_{*^{\prime},*}$ is a path connecting the basepoint
$*^{\prime}$ of the Gukov-Witten operator to the basepoint $*$ of the Wilson
loop. The final expression consists of two terms — the first reproduces the
action in Eq. (87) while the second involves twisted-sector operators

$\widetilde{U}_{\theta}(\tilde{\Gamma}^{\prime};*^{\prime})=\sum_{\hat{\mathsf{g}}_{*^{\prime}}=\pm
1}\hat{\mathsf{g}}_{*^{\prime}}\,U_{\theta}(\tilde{\Gamma}^{\prime};\hat{\mathsf{g}}_{*^{\prime}})\,,\
\widetilde{W}_{q}(\gamma;*)=\sum_{\hat{\mathsf{g}}_{*}=\pm
1}\hat{\mathsf{g}}_{*}\,W_{q}(\gamma;\hat{\mathsf{g}}_{*})$ (89)

connected by a dual symmetry line $\eta$. This is shown in Fig.
12.222222Notably, the fact that locally pinching $U_{\theta}$ produces
$1+\eta$ but not $U_{2\theta}$ as one might have expected from the fusion rule
(85) is consistent with the vanishing tadpole condition discussed in e.g. Ref.
[119].

####  6.1.2 Three-Loop Braiding

As an application, we consider the three-loop braiding discussed in Refs. [64,
65], limiting ourselves to 3d for simplicity. We consider the configuration
shown in Fig. 13 consisting of a Wilson loop $W_{q}(\gamma)$, a Gukov-Witten
operator $U_{\theta}(\tilde{\Gamma})$ for the conjugacy class $\theta$, and a
twist vortex $T(\Gamma)$ (i.e. a Gukov-Witten operator for the conjugacy class
of reflections). The loops form a Borromean ring configuration where no two
loops are linked with each other but no loop can be topologically shrunk to a
point without crossings.

Figure 13: A Borromean ring configuration involving a Wilson loop $W_{q}$, a
twist vortex $T$, and a Gukov-Witten operator $U_{\theta}$. On the right, we
show the scaffolding paths from the basepoints of the Wilson loop ($*$) and
Gukov-Witten operator ($*^{\prime}$) to the links $\ell_{A},\ell_{B}$. The
union of these paths forms a closed loop which links non-trivially with the
twist vortex.

We can remove $U_{\theta}(\tilde{\Gamma})$ by shifting the link variables in
$\star[\tilde{\Sigma}]$ where $\partial\tilde{\Sigma}=\tilde{\Gamma}$. In
particular, we must perform field redefinitions of links $\ell_{A}$ and
$\ell_{B}$ which lie along the Wilson loop, as indicated in Fig. 13.
Specifically, we shift $a_{\ell_{A}}\to
a_{\ell_{A}}+\hat{\mathsf{g}}_{*^{\prime}}\eta(\gamma_{\ell_{A},*^{\prime}})\theta$
and $a_{\ell_{B}}\to
a_{\ell_{B}}+\hat{\mathsf{g}}_{*^{\prime}}\eta(\gamma_{\ell_{B},*^{\prime}})\theta$,
where $\hat{\mathsf{g}}_{*^{\prime}}$ is the basepoint degree of freedom
associated to $U_{\theta}$. Performing these shifts results in

$\begin{split}U_{\theta}(\tilde{\Gamma})T(\Gamma)W_{q}(\gamma)&=T(\Gamma)\sum_{\hat{\mathsf{g}}_{*},\hat{\mathsf{g}}_{*^{\prime}}=\pm
1}W_{q}(\gamma;\hat{\mathsf{g}}_{*})\,e^{iq\hat{\mathsf{g}}_{*}\eta(\gamma_{\ell_{A},*})\eta(\gamma_{\ell_{A},*^{\prime}})\hat{\mathsf{g}}_{*^{\prime}}\theta}e^{-iq\hat{\mathsf{g}}_{*}\eta(\gamma_{\ell_{B},*})\eta(\gamma_{\ell_{B},*^{\prime}})\hat{\mathsf{g}}_{*^{\prime}}\theta}\\\
&=T(\Gamma)\sum_{\hat{\mathsf{g}}_{*},\hat{\mathsf{g}}_{*^{\prime}}=\pm
1}W_{q}(\gamma;\hat{\mathsf{g}}_{*})\,e^{iq\hat{\mathsf{g}}_{*}\left[\eta(\gamma_{*,*^{\prime}}^{A})-\eta(\gamma_{*,*^{\prime}}^{B})\right]\hat{\mathsf{g}}_{*^{\prime}}\theta}\,,\end{split}$
(90)

where
$\gamma_{*,*^{\prime}}^{A/B}=\gamma_{\ell_{A/B},*}\circ\gamma_{\ell_{A/B},*^{\prime}}$
are two paths from $*$ to $*^{\prime}$. Crucially, the difference between
these two paths links non-trivially with $\Gamma^{\vee}$, so that
$\eta(\gamma^{A}_{*,*^{\prime}})=-\eta(\gamma^{B}_{*,*^{\prime}})$. As a
result, when we sum over $\hat{\mathsf{g}}_{*^{\prime}}$ we get a non-trivial
factor that depends on $q$ and $\theta$,

$\langle
U_{\theta}(\tilde{\Gamma})T(\Gamma)W_{q}(\gamma)\rangle=2\cos(2q\theta)\,\langle
T(\Gamma)W_{q}(\gamma)\rangle=\cos(2q\theta)\langle
U_{\theta}(\tilde{\Gamma})\rangle\langle T(\Gamma)W_{q}(\gamma)\rangle.$ (91)

####  6.1.3 Selection Rules

Because of its peculiar action, the selection rules arising from the non-
invertible electric symmetry are not as strong as those arising from its
invertible counterpart. Specifically, selection rules from non-invertible
symmetries typically arise only in infinite volume [28]. In the invertible
case, we can derive selection rules by wrapping a non-contractible Wilson loop
with a codimension-2 surface and removing it in two ways — shrinking the
surface on the loop gives a phase, while expanding the surface to remove it
does not. In the non-invertible case, the second step of expanding the surface
can only be performed when some spacetime directions are infinite.

Figure 14: Leading-order contributions in the strong coupling expansion for
the expectation values of a charge-2 Polyakov loop and a charge-2 Wilson line
ending on twist vortices. Both results are non-zero but vanish exponentially
quickly with the volume. The transparent blue plaquettes indicate
$\tilde{\Omega}^{\vee}$ while the light teal plaquettes represent the electric
flux whose sign is indicated by the direction of the arrows. The electric flux
flips sign when it crosses the $\mathsf{c}$ defect and changes by 2 units when
it crosses the Wilson loop. Here $\mathcal{A}_{ij}$ refers to the area of the
$ij$ cycle of the torus.

To illustrate the idea, we consider two examples. First, take a charge-2
Wilson loop wrapped on a non-contractible cycle, i.e. a charge-2 Polyakov
loop. This operator is neutral under $\mathbb{Z}_{2,e}^{(1)}$, so based on
invertible symmetries alone we might expect it to have an order one
expectation value. On the other hand, it is charged under the non-invertible
electric symmetry. To give a concrete comparison to the case of a charge-1
Polyakov loop, we work in the strong coupling expansion. Namely, we drop the
Lagrange multiplier suppressing monopoles, and apply the dualization procedure
from Section 3. Summing over $n$ constrains
$z=\tilde{n}\in\mathcal{C}^{d-2}(\Lambda,\mathbb{Z})$, which is interpreted as
the integer electric flux (more specifically,
$\tilde{n}=\star[\Sigma^{\wedge}]$ where $\Sigma$ is a surface of electric
flux). We begin by considering a charge-1 Polyakov loop extending in the
$\hat{3}$ direction — we denote the spacetime cycle by $\gamma_{3}$. It is
easy to see that on a finite torus there are simply _no_ strong coupling
diagrams one can write down that contribute to its expectation value, so that

$\langle W_{1}(\gamma_{3})\rangle=0\,,$ (92)

consistent with unbroken $\mathbb{Z}_{2,e}^{(1)}$ symmetry. In contrast, one
_can_ find contributions to the expectation value of a charge-2 Polyakov loop
on the torus, see Fig. 14. The non-vanishing contributions require activating
a charge conjugation defect on a non-contractible cycle. The leading term
consists of a sheet of flux spanning the 2-cycle with the smallest area which
is parallel to the Polyakov loop — in this case the $23$ plane with area
$\mathcal{A}_{23}=4\times 6=24$. As a result, we find

$\langle
W_{2}(\gamma_{3})\rangle=2\,e^{-\frac{1}{2\beta}\mathcal{A}_{23}}+\mathcal{O}(e^{-\frac{2}{\beta}})\,.$
(93)

Notably, the result is nonzero, but vanishes exponentially quickly in the
spacetime volume. This is consistent with the general remarks we made above.

As another example, consider a charge-2 Wilson loop ending on a pair of non-
contractible twist vortices. This configuration is unconstrained by the
invertible 1-form symmetry but transforms non-trivially under the non-
invertible symmetry. Again we find that in the strong coupling expansion, the
leading contributions decay exponentially quickly in the area
$\mathcal{A}_{12}$ of one of the spacetime 2-cycles, see Fig. 14.

Figure 15: Using the non-invertible electric symmetry to derive a selection
rule for open charge-2 Wilson lines ending on contractible twist vortices.

Finally, there are examples of selection rules arising from non-invertible
symmetries that lead to exact zeros even in finite spacetimes. For instance,
while the expectation value of a charge-2 Wilson loop stretched between two
_non_ -contractible twist vortices only vanishes in the infinite volume limit,
a charge-2 Wilson loop stretched between two contractible twist vortices is
effectively an open charge-2 Wilson line, and has exactly vanishing
correlation functions due to the non-invertible symmetry. The argument is
shown in Fig. 15 — shrinking a non-invertible electric symmetry operator in
two ways leads to the relation

$\langle U_{\theta}\,T\,W_{2}\,T\rangle=\langle U_{\theta}\rangle\langle
T\,W_{2}\,T\rangle=\cos(2\theta)\langle U_{\theta}\rangle\langle
T\,W_{2}\,T\rangle\,,$ (94)

and since $\langle U_{\theta}\rangle=2$ we have that $\langle
T\,W_{2}\,T\rangle=0$. Moreover, since this argument can be repeated in the
presence of arbitrary additional operator insertions, all correlation
functions of the above operator vanish. This is consistent with the
‘endability’ criteria discussed in Refs. [120, 28], which states that a line
charged under a 1-form symmetry, invertible or not, cannot end on local
operators. In this case, the putative open line operator simply vanishes.

###  6.2 Magnetic Symmetry

The properties of the non-invertible magnetic symmetry are analogous to the
electric symmetry, so we will just briefly outline the main points. The
symmetry is generated by the operator we constructed in Section 2,

$V_{\alpha}(S)=P(S)\sum_{\hat{\mathsf{g}}_{*}=\pm
1}\exp\left(i\alpha\,\hat{\mathsf{g}}_{*}\sum_{p\in
S}\eta(\gamma_{p,*})\,n_{p}\right)\,,$ (95)

where the projector is

$\begin{split}P(S)&=\frac{1}{|H^{1}(S,\mathbb{Z}_{2})|}\sum_{\gamma\in
H^{1}(S,\mathbb{Z}_{2})}\eta(\gamma)\\\
&=\frac{|H^{0}(S,\mathbb{Z}_{2})|}{|H^{1}(S,\mathbb{Z}_{2})|}\frac{1}{2^{\\#\text{plaq.}+\\#\text{sites}}}\sum_{\begin{subarray}{c}u\in\mathcal{C}^{0}(S,\mathbb{Z}_{2}),\\\
b\in\mathcal{C}^{1}(S,\mathbb{Z}_{2})\end{subarray}}\exp\left(i\pi\sum_{p\in
S}c\cup b+u\cup db\right)\,.\end{split}$ (96)

Like in the electric case, these symmetry operators have quantum dimension 2:
the expectation value of a $V_{\alpha}(S)$ with $S=\partial\Omega$ equal to
the boundary of a ball reduces to the sum over the basepoint degree of
freedom, so that

$\langle V_{\alpha}(\partial\Omega)\rangle=2\,.$ (97)

The parallel fusion works as in the electric case, and we find

$\begin{split}V_{\alpha}(S)V_{\beta}(S)&=V_{\alpha+\beta}(S)+V_{\alpha-\beta}(S)\,\text{
for }\alpha\not=\beta\,,\\\
V_{\alpha}(S)V_{\alpha}(S)&=V_{2\alpha}(S)+2P(S).\end{split}$ (98)

####  6.2.1 Action on Monopole Operators

In 4d, the action of the magnetic symmetry on ’t Hooft lines is completely
analogous to the action of the electric symmetry on Wilson lines. The only
subtlety is that in our setup both the magnetic symmetry and the ’t Hooft line
live on the original lattice, so that the correct notion of linking is that
the ’t Hooft line supported on $\gamma$ links with $S^{\wedge}$, where
$S^{\wedge}$ is obtained from $S$ by a positive half-lattice-unit translation
in each direction. In 3d, the magnetic symmetry is a 0-form symmetry acting on
monopole operators $\mathcal{M}_{k}(s)=\sum_{\hat{\mathsf{g}}_{s}=\pm
1}e^{ik\hat{\mathsf{g}}_{s}\sigma_{s}}$. If we wrap such a local operator with
a contractible surface, it is easy to see that

$V_{\alpha}(S)\mathcal{M}_{k}(s)=P(\gamma)\sum_{\hat{\mathsf{g}}_{s},\hat{\mathsf{g}}_{*}=\pm
1}\exp\left(ik\alpha\,\hat{\mathsf{g}}_{*}\,\eta(\gamma_{*,s})\hat{\mathsf{g}}_{s}\right)\exp\left(ik\,\hat{\mathsf{g}}_{s}\sigma_{s}\right)=2\cos(k\alpha)\,\mathcal{M}_{k}(s)\,.$
(99)

Figure 16: Action of the non-invertible magnetic 0-form symmetry on a local
monopole operator in 3d.

To study the more general action, we write
$V_{\alpha}(S)=\sum_{\hat{\mathsf{g}}_{*}}V_{\alpha}(S;\hat{\mathsf{g}}_{*})$.
Then when a magnetic surface is swept from $S\to S^{\prime}$ past a local
monopole operator, the action is (see Fig. 16)

$\begin{split}V_{\alpha}(S)\mathcal{M}_{k}(s)&=\sum_{\hat{\mathsf{g}}_{s},\hat{\mathsf{g}}_{*}=\pm
1}\exp\left(ik\alpha\,\hat{\mathsf{g}}_{*}\eta(\gamma_{*,s})\hat{\mathsf{g}}_{s}\right)V_{\alpha}(S^{\prime};\hat{\mathsf{g}}_{*})\exp\left(ik\,\hat{\mathsf{g}}_{s}\sigma_{s}\right)\\\
&=\sum_{\hat{\mathsf{g}}_{s},\hat{\mathsf{g}}_{*}=\pm
1}\left[\cos(k\alpha)+i\sin(k\alpha)\,\hat{\mathsf{g}}_{*}\eta(\gamma_{*,s})\hat{\mathsf{g}}_{s}\right]V_{\alpha}(S^{\prime};\hat{\mathsf{g}}_{*})\exp\left(ik\,\hat{\mathsf{g}}_{s}\sigma_{s}\right)\\\
&=\cos(k\alpha)V_{\alpha}(S^{\prime})\mathcal{M}_{k}(s)+i\sin(k\alpha)\widetilde{V}_{\alpha}(S^{\prime};*)\eta(\gamma_{*,s})\widetilde{\mathcal{M}}_{k}(s)\,,\end{split}$
(100)

where $\gamma_{*,s}$ is a path from the basepoint of the $V_{\alpha}$ operator
to $s$. As in the electric case, the result consists of two terms, the second
of which involves the twisted-sector operators

$\widetilde{V}_{\alpha}(S^{\prime};*)=\sum_{\hat{\mathsf{g}}_{*}=\pm
1}\hat{\mathsf{g}}_{*}\,V_{\alpha}(S^{\prime};\hat{\mathsf{g}}_{*})\,,\
\widetilde{\mathcal{M}}_{k}(s)=\sum_{\hat{\mathsf{g}}_{s}=\pm
1}\hat{\mathsf{g}}_{s}\,e^{ik\hat{\mathsf{g}}_{s}\sigma_{s}}\,.$ (101)

To see that the first term in the last line of Eq. (100) reproduces the local
action in Eq. (99), we simply note that if $S$ (and therefore $S^{\prime}$)
are contractible, shrinking $S^{\prime}$ to a point gives
$V_{\alpha}(S^{\prime})=2$ while $\widetilde{V}_{\alpha}(S^{\prime};*)=0$.

##  7 Phase Diagram with Monopoles and Vortices

So far we have focused on $O(2)$ gauge theory with monopole ($dn\not=0$) and
twist vortex ($dc\not=0\text{ mod }2$) configurations suppressed. We now
consider deformations away from this limit. Relaxing the no-monopole
constraint is straightforward: we simply drop the Lagrange multiplier term
involving the magnetic gauge field.232323Alternatively, we can introduce
magnetic Higgs fields in 4d or a suitable potential for the dual photon in 3d
and achieve the same effect.  Introducing dynamical twist vortices is more
subtle — even in the absence of higher-group symmetry we have to include
degrees of freedom on the twist vortices in order to render them gauge-
invariant. We emphasize that at the lattice level we are free to choose what
these degrees of freedom are, and the choice is not unique. Here we consider a
minimal scenario consisting of a single Villain scalar $\varphi$ with charge
$q_{\varphi}$, such that the full action is

$S=\frac{\beta}{2}\sum_{\text{plaq.}\in\Lambda}(d_{\mathsf{c}}(a-\frac{1}{q_{\varphi}}d_{\mathsf{c}}\varphi)-2\pi
n)^{2}+\frac{\kappa}{2}\sum_{\text{plaq.}\in\Lambda}(dc-2h)^{2}\\\
+\frac{\kappa_{v}}{2}\sum_{\text{links}\in\partial\Omega}(d_{\mathsf{c}}\varphi-
q_{\varphi}a-2\pi w)^{2}\,,$ (102)

where $h\in\mathcal{C}^{2}(\Lambda,\mathbb{Z})$. The $\kappa$ term is a
Villain-type kinetic term for a non-topological $\mathbb{Z}_{2}$ gauge theory
and depends explicitly on the value of $dc$ — unlike the action (36) which
only depends on $\overline{dc}$. Now it becomes important that the reflection
gauge transformations act as $c\to c+\overline{dg}$, so that $dc\to
dc+d\,\overline{dg}$. Since $d\,\overline{dg}$ vanishes modulo 2, we can make
the action gauge invariant by assigning $h\to
h+\frac{1}{2}d\,\overline{dg}$.242424Alternatively, we work with an integer
lift $c\in\mathcal{C}^{1}(\Lambda,\mathbb{Z})$ with gauge redundancies $c\to
c+dg+2l$ with $g\in\mathcal{C}^{0}(\Lambda,\mathbb{Z})$ and
$l\in\mathcal{C}^{1}(\Lambda,\mathbb{Z})$, and assign $h\to h+dl$.  The
remaining gauge redundancies are

$\begin{split}a&\to a+d_{\mathsf{c}}\lambda+2\pi m\,,\ n\to
n+d_{\mathsf{c}}m-\frac{1}{q_{\varphi}}\mathsf{c}\cup\mathsf{c}\cup r\,,\\\
\varphi&\to\varphi+2\pi r+q_{\varphi}\lambda\,,\ w\to
w+d_{\mathsf{c}}r-q_{\varphi}m\,.\end{split}$ (103)

Recall that for the above shift of $n$ to be well-defined, we must take
$|q_{\varphi}|=1$ or $2$. The value of $q_{\varphi}$ is a choice which is made
once and for all, and is part of the definition of our theory with dynamical
twist vortices. Note that the action is manifestly real and positive definite
and would be an interesting target for Monte Carlo simulations.

For any finite value of $\kappa$ the $\mathbb{Z}_{2,v}^{(2)}$ symmetry is
explicitly broken, which means that the non-invertible $O(2)/\mathbb{Z}_{2}$
electric 1-form symmetry is also explicitly broken to its invertible
$\mathbb{Z}_{|q_{\varphi}|}$ subgroup. Since we have dynamical unit-charge
magnetic monopoles, there is also no magnetic 1-form symmetry. Therefore, the
only exact symmetry of the model is $\mathbb{Z}_{|q_{\varphi}|}$, which is
non-trivial only if we choose $q_{\varphi}=\pm 2$. The explicitly broken
symmetries can however re-emerge in various limiting regions in parameter
space. There are two extreme limits where the model simplifies and its
behavior can be straightforwardly analyzed:

Figure 17: Possible phase diagram for $O(2)$ gauge theory in four dimensions
with dynamical monopoles and twist vortices. We have chosen the dynamical
twist vortices to carry charge-2 electric degrees of freedom so that
$\mathbb{Z}_{2,e}^{(1)}$ is an exact symmetry everywhere in the phase diagram.
As $\beta\to 0$ there is an emergent $\mathbb{Z}_{2,c}^{(1)}$ 1-form symmetry
which is spontaneously broken for large $\kappa$. As $\kappa\to\infty$ there
is an emergent $\mathbb{Z}_{2,v}^{(2)}$ due to the absence of twist vortices,
which in turn enhances $\mathbb{Z}_{2,e}^{(1)}$ to the non-invertible
$(O(2)/\mathbb{Z}_{2})^{(1)}_{e}$ electric symmetry. When both $\kappa$ and
$\beta$ are large there is a gapless Coulomb phase with an emergent, and
spontaneously broken, $(O(2)/\mathbb{Z}_{2})^{(1)}_{m}$ magnetic symmetry. We
have assumed that the twist vortex-localized hopping parameter $\kappa_{v}$ is
sufficiently large such that proliferating twist vortices enables the
condensation of charge-2 electric particles in the Higgs phase in the upper
left hand corner.

  * •

Weak $\mathsf{c}$ coupling limit ($\kappa=\infty$): This limit corresponds to
the flat gauging of charge conjugation with $dc=0$ mod $2$ where twist
vortices are non-dynamical (so that there is an exact $\mathbb{Z}_{2,v}^{(2)}$
dual symmetry), and the $\mathsf{c}$-gauging does not introduce any local
dynamics. Therefore the phase diagram in this limit is the same as that of the
standard Villain $U(1)$ gauge theory, with a first order confinement-to-
Coulomb transition as we increase $\beta$ [121, 122]. In the $O(2)$ context we
should view the Coulomb phase at large $\beta,\kappa$ as a phase where the
non-invertible electric and (emergent) magnetic symmetries are spontaneously
broken. When $\kappa$ is large but finite, the $\mathbb{Z}_{2,v}^{(2)}$
symmetry is approximate and emerges at long distances.252525This assumes that
$\mathbb{Z}_{2,v}^{(2)}$ is spontaneously broken at $\kappa=\infty$, so that
twist vortices are not confined, see e.g. Ref. [123] for a discussion of
related issues. This is however expected because in the ungauged theory,
charge conjugation symmetry is _not_ spontaneously broken in the 4d $U(1)$
lattice gauge theory.

  * •

Strong $U(1)$ coupling limit ($\beta=0$): In this limit we drop the first term
in Eq. (102) and integrate out the $U(1)$ part of the gauge field — this
removes the last term in Eq. (102) in favor of an overall
$\kappa_{v}$-dependent constant. Hence the model reduces to a pure, non-
topological $\mathbb{Z}_{2}$ gauge theory with exact $\mathbb{Z}_{2,c}^{(1)}$
1-form symmetry acting on the $\mathsf{c}$ gauge field. In four dimensions
pure $\mathbb{Z}_{2}$ gauge theory on the lattice has a first-order
confinement-to-deconfinement transition as we increase $\kappa$ from zero
[124, 125], where $\mathbb{Z}_{2,c}^{(1)}$ is spontaneously broken in the
large $\kappa$, topologically ordered phase. From the perspective of the
charge conjugation gauge field, turning on $\beta$ corresponds to adding
fundamental matter, which does not immediately destroy the transition at
$\beta=0$ [8].

Finally, there is a third limit where the dynamics should simplify, but where
our assumptions about the behavior of the model are more speculative:262626In
particular, the effects of broken lattice rotation symmetry are potentially
significant in this regime.

  * •

Strong $\mathbb{Z}_{2,c}$ coupling limit ($\kappa=0$): In this limit there is
no per-unit-area action penalty for twist vortex configurations, and we expect
them to proliferate in the vacuum. This in turn liberates the charged
worldsheet degrees of freedom which become genuine bulk excitations. Whether
or not these charged degrees of freedom themselves condense depends on
$\kappa_{v}$ — if $\kappa_{v}$ is small, the charged particles are heavy,
while if $\kappa_{v}$ is large, they are light. If $\kappa_{v}$ is
sufficiently large we expect charged particle worldlines to proliferate in the
full 4d spacetime, Higgsing the bulk gauge field to
$\mathbb{Z}_{|q_{\varphi}|}$. If $|q_{\varphi}|=2$, then as we increase
$\beta$ we will again find a first-order confinement-deconfinement transition,
while if $|q_{\varphi}|=1$ the dependence on $\beta$ will be smooth.

In Fig. 17 we show a possible phase diagram which is consistent with the
expected behavior in the limiting cases discussed above.

##  8 Summary and Discussion

In this work we described how to gauge charge conjugation symmetry in generic
Euclidean lattice field theories, and applied the construction to $O(2)$ gauge
theory in three and four spacetime dimensions. The result is a non-abelian
version of the modified Villain formulation. The benefit of this approach is
that in contrast to a more conventional Wilson formulation, our lattice
discretization preserves the higher-group and non-invertible symmetries of the
continuum $O(2)$ theory. We presented a recipe for how to define gauge-
invariant extended operators in the $O(2)$ theory starting from operators in
the $U(1)$ theory — the construction is inspired by related proposals from the
’90s [65] and employs the more recent technology of condensation defects [95,
96, 56]. We used this method to explicitly construct Wilson and ’t Hooft lines
as well as the non-invertible symmetry operators under which they are charged.
We studied various implications of the generalized symmetries at the lattice
level, including their exact and approximate selection rules, constraints on
worldvolume degrees of freedom of extended operators, and impact on the phase
diagram upon including dynamical magnetic monopoles and twist vortices.

There are a number of worthwhile extensions of our construction. The methods
used in this paper can be extended to construct other disconnected, non-
abelian lattice gauge theories such as $U(1)^{N-1}\rtimes S_{N}$ [23, 102],
and to the gauging of non-normal subgroups of global symmetries in lattice
systems more generally. By adding matter fields with electric charge $N$ we
can Higgs our $O(2)$ gauge theory down to discrete, dihedral $D_{2N}$ gauge
theories. The resulting phase diagram with electric and magnetic matter will
be quite rich, with phases labelled by the realization of non-invertible
$\text{Rep}(D_{2N})$ and emergent $O(2)/\mathbb{Z}_{2}$ symmetries. The
lattice theories we constructed can in principle be simulated without a sign
problem, and it would be particularly interesting to numerically study
dynamical twist vortices and the effects of their worldvolume degrees of
freedom.

Another natural next step would be to generalize existing lattice
discretizations of $U(1)$ Chern-Simons theories [78, 85, 91] to the non-
abelian $O(2)$ case [66, 69, 54]. In that context, the electric Wilson lines
become topological and the braiding relations between non-abelian anyons will
involve the three-loop braiding discussed in Section 6.1.2. This in turn is
related to studying the ’t Hooft anomalies of non-invertible symmetries, see
e.g. Refs. [119, 126, 127, 128, 129, 33, 130, 131, 54]. Since the modified
Villain formulation of $U(1)$ gauge theory preserves the mixed ’t Hooft
anomaly between the invertible electric and magnetic symmetries, it is natural
to expect that one could study the putative mixed anomaly between their non-
invertible counterparts in $O(2)$ gauge theory. Our lattice construction may
also help clarify the notion of a background gauge field for a non-invertible
symmetry. We also note that we studied the action of the non-invertible coset